mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-05 10:22:31 +01:00
AAA
This commit is contained in:
parent
6347a77a79
commit
777e7208dc
18595
assets/schemas.json
18595
assets/schemas.json
File diff suppressed because it is too large
Load Diff
@ -22,17 +22,6 @@ import { Request, Response, Router } from "express";
|
||||
|
||||
const router = Router();
|
||||
|
||||
export interface GatewayBotResponse {
|
||||
url: string;
|
||||
shards: number;
|
||||
session_start_limit: {
|
||||
total: number;
|
||||
remaining: number;
|
||||
reset_after: number;
|
||||
max_concurrency: number;
|
||||
};
|
||||
}
|
||||
|
||||
router.get(
|
||||
"/",
|
||||
route({
|
||||
|
@ -22,10 +22,6 @@ import { Request, Response, Router } from "express";
|
||||
|
||||
const router = Router();
|
||||
|
||||
export interface GatewayResponse {
|
||||
url: string;
|
||||
}
|
||||
|
||||
router.get(
|
||||
"/",
|
||||
route({
|
||||
|
@ -16,23 +16,23 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Router, Request, Response } from "express";
|
||||
import {
|
||||
User,
|
||||
Member,
|
||||
UserProfileModifySchema,
|
||||
handleFile,
|
||||
PrivateUserProjection,
|
||||
emitEvent,
|
||||
UserUpdateEvent,
|
||||
} from "@spacebar/util";
|
||||
import { route } from "@spacebar/api";
|
||||
import {
|
||||
Member,
|
||||
PrivateUserProjection,
|
||||
User,
|
||||
UserProfileModifySchema,
|
||||
UserUpdateEvent,
|
||||
emitEvent,
|
||||
handleFile,
|
||||
} from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
|
||||
const router: Router = Router();
|
||||
|
||||
router.get(
|
||||
"/",
|
||||
route({ test: { response: { body: "UserProfileResponse" } } }),
|
||||
route({ responses: { 200: { body: "UserProfileResponse" } } }),
|
||||
async (req: Request, res: Response) => {
|
||||
if (req.params.id === "@me") req.params.id = req.user_id;
|
||||
|
||||
|
@ -16,15 +16,15 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Router, Request, Response } from "express";
|
||||
import { User } from "@spacebar/util";
|
||||
import { route } from "@spacebar/api";
|
||||
import { User } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
|
||||
const router: Router = Router();
|
||||
|
||||
router.get(
|
||||
"/",
|
||||
route({ test: { response: { body: "UserRelationsResponse" } } }),
|
||||
route({ responses: { 200: { body: "UserRelationsResponse" } } }),
|
||||
async (req: Request, res: Response) => {
|
||||
const mutual_relations: object[] = [];
|
||||
const requested_relations = await User.findOneOrFail({
|
||||
|
10
src/util/schemas/responses/GatewayBotResponse.ts
Normal file
10
src/util/schemas/responses/GatewayBotResponse.ts
Normal file
@ -0,0 +1,10 @@
|
||||
export interface GatewayBotResponse {
|
||||
url: string;
|
||||
shards: number;
|
||||
session_start_limit: {
|
||||
total: number;
|
||||
remaining: number;
|
||||
reset_after: number;
|
||||
max_concurrency: number;
|
||||
};
|
||||
}
|
3
src/util/schemas/responses/GatewayResponse.ts
Normal file
3
src/util/schemas/responses/GatewayResponse.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export interface GatewayResponse {
|
||||
url: string;
|
||||
}
|
8
src/util/schemas/responses/UserProfileResponse.ts
Normal file
8
src/util/schemas/responses/UserProfileResponse.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { PublicConnectedAccount, UserPublic } from "../../entities";
|
||||
|
||||
export interface UserProfileResponse {
|
||||
user: UserPublic;
|
||||
connected_accounts: PublicConnectedAccount;
|
||||
premium_guild_since?: Date;
|
||||
premium_since?: Date;
|
||||
}
|
9
src/util/schemas/responses/UserRelationsResponse.ts
Normal file
9
src/util/schemas/responses/UserRelationsResponse.ts
Normal file
@ -0,0 +1,9 @@
|
||||
export interface UserRelationsResponse {
|
||||
object: {
|
||||
id?: string;
|
||||
username?: string;
|
||||
avatar?: string;
|
||||
discriminator?: string;
|
||||
public_flags?: number;
|
||||
};
|
||||
}
|
@ -9,7 +9,11 @@ export * from "./CaptchaRequiredResponse";
|
||||
export * from "./ChannelInvitesResponse";
|
||||
export * from "./ChannelPinsResponse";
|
||||
export * from "./ChannelWebhooksResponse";
|
||||
export * from "./GatewayBotResponse";
|
||||
export * from "./GatewayResponse";
|
||||
export * from "./GenerateRegistrationTokensResponse";
|
||||
export * from "./LocationMetadataResponse";
|
||||
export * from "./TokenResponse";
|
||||
export * from "./UserProfileResponse";
|
||||
export * from "./UserRelationsResponse";
|
||||
export * from "./WebhookCreateResponse";
|
||||
|
Loading…
Reference in New Issue
Block a user