mirror of
https://github.com/spacebarchat/server.git
synced 2026-07-21 04:40:57 +00:00
oapi: users progress
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
export interface UserNoteUpdateSchema {
|
||||
note: string;
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
[];
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user