diff options
author | Puyodead1 <puyodead@proton.me> | 2023-03-25 16:09:04 -0400 |
---|---|---|
committer | Puyodead1 <puyodead@proton.me> | 2023-04-13 15:38:52 -0400 |
commit | 1ce7879ee85ea5bb5efaff3cf950e65513098d3c (patch) | |
tree | 825ae4c842b096736221668e59fc4c815998aec3 /src/util/schemas/responses | |
parent | oapi: stickers (diff) | |
download | server-1ce7879ee85ea5bb5efaff3cf950e65513098d3c.tar.xz |
oapi: users progress
Diffstat (limited to 'src/util/schemas/responses')
-rw-r--r-- | src/util/schemas/responses/UserNoteResponse.ts | 5 | ||||
-rw-r--r-- | src/util/schemas/responses/UserProfileResponse.ts | 4 | ||||
-rw-r--r-- | src/util/schemas/responses/UserRelationshipsResponse.ts | 8 | ||||
-rw-r--r-- | src/util/schemas/responses/UserResponse.ts | 22 | ||||
-rw-r--r-- | src/util/schemas/responses/index.ts | 3 |
5 files changed, 40 insertions, 2 deletions
diff --git a/src/util/schemas/responses/UserNoteResponse.ts b/src/util/schemas/responses/UserNoteResponse.ts new file mode 100644 index 00000000..b142811e --- /dev/null +++ b/src/util/schemas/responses/UserNoteResponse.ts @@ -0,0 +1,5 @@ +export interface UserNoteResponse { + note: string; + note_user_id: string; + user_id: string; +} diff --git a/src/util/schemas/responses/UserProfileResponse.ts b/src/util/schemas/responses/UserProfileResponse.ts index 4e5cd8a6..bd1f46dd 100644 --- a/src/util/schemas/responses/UserProfileResponse.ts +++ b/src/util/schemas/responses/UserProfileResponse.ts @@ -1,7 +1,7 @@ -import { PublicConnectedAccount, UserPublic } from "../../entities"; +import { PublicConnectedAccount, PublicUser } from "../../entities"; export interface UserProfileResponse { - user: UserPublic; + user: PublicUser; connected_accounts: PublicConnectedAccount; premium_guild_since?: Date; premium_since?: Date; diff --git a/src/util/schemas/responses/UserRelationshipsResponse.ts b/src/util/schemas/responses/UserRelationshipsResponse.ts new file mode 100644 index 00000000..dff2f118 --- /dev/null +++ b/src/util/schemas/responses/UserRelationshipsResponse.ts @@ -0,0 +1,8 @@ +import { PublicUser, RelationshipType } from "../../entities"; + +export interface UserRelationshipsResponse { + id: string; + type: RelationshipType; + nickname: null; + user: PublicUser; +} diff --git a/src/util/schemas/responses/UserResponse.ts b/src/util/schemas/responses/UserResponse.ts new file mode 100644 index 00000000..21c30cd5 --- /dev/null +++ b/src/util/schemas/responses/UserResponse.ts @@ -0,0 +1,22 @@ +import { DmChannelDTO } from "../../dtos"; +import { Guild, PrivateUser, PublicUser, User } from "../../entities"; + +export type PublicUserResponse = PublicUser; +export type PrivateUserResponse = PrivateUser; + +export interface UserUpdateResponse extends PrivateUserResponse { + newToken?: string; +} + +export type UserGuildsResponse = Guild[]; + +export type UserChannelsResponse = DmChannelDTO[]; + +export interface UserBackupCodesResponse { + expired: unknown; + user: User; + code: string; + consumed: boolean; + id: string; +} +[]; diff --git a/src/util/schemas/responses/index.ts b/src/util/schemas/responses/index.ts index 3f29b779..1f0e2aed 100644 --- a/src/util/schemas/responses/index.ts +++ b/src/util/schemas/responses/index.ts @@ -39,6 +39,9 @@ export * from "./OAuthAuthorizeResponse"; export * from "./StickerPacksResponse"; export * from "./Tenor"; export * from "./TokenResponse"; +export * from "./UserNoteResponse"; export * from "./UserProfileResponse"; +export * from "./UserRelationshipsResponse"; export * from "./UserRelationsResponse"; +export * from "./UserResponse"; export * from "./WebhookCreateResponse"; |