Implement signed cdn urls
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";
|