oapi: users progress

This commit is contained in:
Puyodead1
2023-04-13 15:38:52 -04:00
parent c97ce59a0a
commit 1ce7879ee8
27 changed files with 573 additions and 267 deletions
+1 -2
View File
@@ -86,8 +86,7 @@ export const PrivateUserProjection = [
// Private user data that should never get sent to the client
export type PublicUser = Pick<User, PublicUserKeys>;
export type UserPublic = Pick<User, PublicUserKeys>;
export type PrivateUser = Pick<User, PrivateUserKeys>;
export interface UserPrivate extends Pick<User, PrivateUserKeys> {
locale: string;
+3
View File
@@ -0,0 +1,3 @@
export interface UserNoteUpdateSchema {
note: string;
}
+2 -2
View File
@@ -16,10 +16,10 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { PublicConnectedAccount, UserPublic } from "..";
import { PublicConnectedAccount, PublicUserResponse } from "..";
export interface UserProfileResponse {
user: UserPublic;
user: PublicUserResponse;
connected_accounts: PublicConnectedAccount;
premium_guild_since?: Date;
premium_since?: Date;
+1
View File
@@ -69,6 +69,7 @@ export * from "./TotpSchema";
export * from "./UserDeleteSchema";
export * from "./UserGuildSettingsSchema";
export * from "./UserModifySchema";
export * from "./UserNoteUpdateSchema";
export * from "./UserProfileModifySchema";
export * from "./UserSettingsSchema";
export * from "./Validator";
@@ -0,0 +1,5 @@
export interface UserNoteResponse {
note: string;
note_user_id: string;
user_id: string;
}
@@ -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;
@@ -0,0 +1,8 @@
import { PublicUser, RelationshipType } from "../../entities";
export interface UserRelationshipsResponse {
id: string;
type: RelationshipType;
nickname: null;
user: PublicUser;
}
@@ -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;
}
[];
+3
View File
@@ -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";