mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-17 09:59:10 +00:00
chore: move types to @roleypoly/types package
This commit is contained in:
parent
38ee680a33
commit
a374030438
46 changed files with 244 additions and 59 deletions
|
@ -1,9 +1,5 @@
|
|||
import { CategoryType, Features, GuildData as GuildDataT } from '@roleypoly/types';
|
||||
import KSUID from 'ksuid';
|
||||
import {
|
||||
CategoryType,
|
||||
Features,
|
||||
GuildData as GuildDataT,
|
||||
} from '../../../src/common/types';
|
||||
import { onlyRootUsers, respond } from '../utils/api-tools';
|
||||
import { GuildData } from '../utils/kv';
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
import {
|
||||
DiscordUser,
|
||||
GuildSlug,
|
||||
PresentableGuild,
|
||||
SessionData,
|
||||
} from '../../../src/common/types';
|
||||
import { DiscordUser, GuildSlug, PresentableGuild, SessionData } from '@roleypoly/types';
|
||||
import { respond, withSession } from '../utils/api-tools';
|
||||
import { getGuild, getGuildData, getGuildMemberRoles } from '../utils/guild';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { SessionData } from '../../../src/common/types';
|
||||
import { SessionData } from '@roleypoly/types';
|
||||
import { respond, withSession } from '../utils/api-tools';
|
||||
|
||||
export const GetSession = withSession((session?: SessionData) => (): Response => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { GuildSlug } from '../../../src/common/types';
|
||||
import { GuildSlug } from '@roleypoly/types';
|
||||
import { respond } from '../utils/api-tools';
|
||||
import { getGuild } from '../utils/guild';
|
||||
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
import { AuthTokenResponse, DiscordUser, GuildSlug, SessionData } from '@roleypoly/types';
|
||||
import KSUID from 'ksuid';
|
||||
import {
|
||||
AuthTokenResponse,
|
||||
DiscordUser,
|
||||
GuildSlug,
|
||||
SessionData,
|
||||
} from '../../../src/common/types';
|
||||
import {
|
||||
AuthType,
|
||||
discordFetch,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { SessionData } from '../../../src/common/types';
|
||||
import { SessionData } from '@roleypoly/types';
|
||||
import { formData, respond, userAgent, withSession } from '../utils/api-tools';
|
||||
import { botClientID, botClientSecret } from '../utils/config';
|
||||
import { Sessions } from '../utils/kv';
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import { difference, groupBy, keyBy, union } from 'lodash';
|
||||
import {
|
||||
GuildData,
|
||||
Member,
|
||||
|
@ -8,7 +7,8 @@ import {
|
|||
RoleUpdate,
|
||||
SessionData,
|
||||
TransactionType,
|
||||
} from '../../../src/common/types';
|
||||
} from '@roleypoly/types';
|
||||
import { difference, groupBy, keyBy, union } from 'lodash';
|
||||
import { AuthType, discordFetch, respond, withSession } from '../utils/api-tools';
|
||||
import { botToken } from '../utils/config';
|
||||
import {
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
"start": "yarn workspace @roleypoly/worker-emulator start --basePath `pwd`"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@roleypoly/types": "*",
|
||||
"@roleypoly/worker-emulator": "*",
|
||||
"ksuid": "^2.0.0",
|
||||
"lodash": "^4.17.21",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { SessionData, UserGuildPermissions } from '../../../src/common/types';
|
||||
import { SessionData, UserGuildPermissions } from '@roleypoly/types';
|
||||
import {
|
||||
evaluatePermission,
|
||||
permissions as Permissions,
|
||||
|
|
|
@ -5,7 +5,7 @@ import {
|
|||
OwnRoleInfo,
|
||||
Role,
|
||||
RoleSafety,
|
||||
} from '../../../src/common/types';
|
||||
} from '@roleypoly/types';
|
||||
import { evaluatePermission, permissions } from '../../../src/common/utils/hasPermission';
|
||||
import { AuthType, cacheLayer, discordFetch } from './api-tools';
|
||||
import { botClientID, botToken } from './config';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue