summary refs log tree commit diff
path: root/src/util/schemas
diff options
context:
space:
mode:
authorPuyodead1 <puyodead@proton.me>2025-04-16 23:28:43 -0400
committerRory& <root@rory.gay>2025-05-03 12:30:22 +0200
commit080b2c7d383b5e09fee97f267d35f4e7cd22f0a9 (patch)
tree066bfcba19fdc7060d28d46db8b1218c0e365011 /src/util/schemas
parentMerge pull request #1274 from dank074/patch/fix-requestGuildMembers-libraires (diff)
downloadserver-ts-080b2c7d383b5e09fee97f267d35f4e7cd22f0a9.tar.xz
Implement signed cdn urls
Diffstat (limited to 'src/util/schemas')
-rw-r--r--src/util/schemas/RefreshUrlsRequestSchema.ts21
-rw-r--r--src/util/schemas/index.ts1
-rw-r--r--src/util/schemas/responses/RefreshUrlsResponse.ts26
-rw-r--r--src/util/schemas/responses/index.ts1
4 files changed, 49 insertions, 0 deletions
diff --git a/src/util/schemas/RefreshUrlsRequestSchema.ts b/src/util/schemas/RefreshUrlsRequestSchema.ts
new file mode 100644

index 00000000..9c1df548 --- /dev/null +++ b/src/util/schemas/RefreshUrlsRequestSchema.ts
@@ -0,0 +1,21 @@ +/* + Spacebar: A FOSS re-implementation and extension of the Discord.com backend. + Copyright (C) 2023 Spacebar and Spacebar Contributors + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. +*/ + +export interface RefreshUrlsRequestSchema { + attachment_urls: string[]; +} diff --git a/src/util/schemas/index.ts b/src/util/schemas/index.ts
index f2d5844b..9701faec 100644 --- a/src/util/schemas/index.ts +++ b/src/util/schemas/index.ts
@@ -59,6 +59,7 @@ export * from "./MfaCodesSchema"; export * from "./ModifyGuildStickerSchema"; export * from "./PasswordResetSchema"; export * from "./PurgeSchema"; +export * from "./RefreshUrlsRequestSchema"; export * from "./RegisterSchema"; export * from "./RelationshipPostSchema"; export * from "./RelationshipPutSchema"; diff --git a/src/util/schemas/responses/RefreshUrlsResponse.ts b/src/util/schemas/responses/RefreshUrlsResponse.ts new file mode 100644
index 00000000..b08efaa4 --- /dev/null +++ b/src/util/schemas/responses/RefreshUrlsResponse.ts
@@ -0,0 +1,26 @@ +/* + Spacebar: A FOSS re-implementation and extension of the Discord.com backend. + Copyright (C) 2023 Spacebar and Spacebar Contributors + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. +*/ + +export interface RefreshedUrl { + original: string; + refreshed: string; +} + +export interface RefreshUrlsResponse { + refreshed_urls: RefreshedUrl[]; +} diff --git a/src/util/schemas/responses/index.ts b/src/util/schemas/responses/index.ts
index d65c7404..856b4a3e 100644 --- a/src/util/schemas/responses/index.ts +++ b/src/util/schemas/responses/index.ts
@@ -44,6 +44,7 @@ export * from "./InstanceStatsResponse"; export * from "./LocationMetadataResponse"; export * from "./MemberJoinGuildResponse"; export * from "./OAuthAuthorizeResponse"; +export * from "./RefreshUrlsResponse"; export * from "./TeamListResponse"; export * from "./Tenor"; export * from "./TokenResponse";