summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--api/src/routes/applications/#id/entitlements.ts12
-rw-r--r--api/src/routes/channels/#channel_id/messages/#message_id/crosspost.ts27
-rw-r--r--api/src/routes/discovery.ts12
-rw-r--r--api/src/routes/stage-instances.ts11
-rw-r--r--api/src/routes/store/published-listings/applications.ts (renamed from api/src/routes/store/applications/#id/index.ts)0
-rw-r--r--api/src/routes/store/published-listings/applications/#id/subscription-plans.ts24
-rw-r--r--api/src/routes/store/published-listings/skus.ts (renamed from api/src/routes/store/skus/#id/index.ts)0
-rw-r--r--api/src/routes/store/published-listings/skus/#id/subscription-plans.ts24
-rw-r--r--api/src/routes/users/@me/activities/statistics/applications.ts11
-rw-r--r--api/src/routes/users/@me/billing/payment-sources.ts11
-rw-r--r--api/src/routes/users/@me/email-settings.ts19
-rw-r--r--api/src/routes/users/@me/entitlements.ts12
-rw-r--r--api/src/routes/users/@me/guilds/premium/subscription-slots.ts11
-rw-r--r--api/src/routes/users/@me/notes.ts11
14 files changed, 183 insertions, 2 deletions
diff --git a/api/src/routes/applications/#id/entitlements.ts b/api/src/routes/applications/#id/entitlements.ts
new file mode 100644
index 00000000..1152e500
--- /dev/null
+++ b/api/src/routes/applications/#id/entitlements.ts
@@ -0,0 +1,12 @@
+import { Router, Response, Request } from "express";
+import { route } from "@fosscord/api";
+
+const router = Router();
+
+router.get("/", route({}), (req: Request, res: Response) => {
+	// TODO:
+    //const { exclude_consumed } = req.query;
+	res.status(200).send([]);
+});
+
+export default router;
diff --git a/api/src/routes/channels/#channel_id/messages/#message_id/crosspost.ts b/api/src/routes/channels/#channel_id/messages/#message_id/crosspost.ts
index 6753e832..8174a61f 100644
--- a/api/src/routes/channels/#channel_id/messages/#message_id/crosspost.ts
+++ b/api/src/routes/channels/#channel_id/messages/#message_id/crosspost.ts
@@ -1,8 +1,31 @@
 import { Router, Response, Request } from "express";
+import { route } from "@fosscord/api";
 
 const router = Router();
 
-// TODO:
-// router.post("/", (req: Request, res: Response) => {});
+router.post("/", route({ permission: "MANAGE_MESSAGES" }), (req: Request, res: Response) => {
+	// TODO:
+    //const { locale, primary_only } = req.query;
+	res.json({
+        id: "", 
+        type: 0, 
+        content: "", 
+        channel_id: "", 
+        author: {id: "", 
+        username: "", 
+        avatar: "", 
+        discriminator: "", public_flags: 64}, 
+        attachments: [], 
+        embeds: [], 
+        mentions: [], 
+        mention_roles: [], 
+        pinned: false, 
+        mention_everyone: false, 
+        tts: false, 
+        timestamp: "", 
+        edited_timestamp: null, 
+        flags: 1, components: []}).status(200);
+});
 
 export default router;
+
diff --git a/api/src/routes/discovery.ts b/api/src/routes/discovery.ts
new file mode 100644
index 00000000..9e6e0164
--- /dev/null
+++ b/api/src/routes/discovery.ts
@@ -0,0 +1,12 @@
+import { Router, Response, Request } from "express";
+import { route } from "@fosscord/api";
+
+const router = Router();
+
+router.get("/categories", route({}), (req: Request, res: Response) => {
+	// TODO:
+    //const { locale, primary_only } = req.query;
+	res.json([]).status(200);
+});
+
+export default router;
diff --git a/api/src/routes/stage-instances.ts b/api/src/routes/stage-instances.ts
new file mode 100644
index 00000000..411e95bf
--- /dev/null
+++ b/api/src/routes/stage-instances.ts
@@ -0,0 +1,11 @@
+import { Request, Response, Router } from "express";
+import { route } from "@fosscord/api";
+
+const router: Router = Router();
+
+router.get("/", route({}), async (req: Request, res: Response) => {
+	//TODO
+	res.json([]).status(200);
+});
+
+export default router;
diff --git a/api/src/routes/store/applications/#id/index.ts b/api/src/routes/store/published-listings/applications.ts
index 53b61c29..53b61c29 100644
--- a/api/src/routes/store/applications/#id/index.ts
+++ b/api/src/routes/store/published-listings/applications.ts
diff --git a/api/src/routes/store/published-listings/applications/#id/subscription-plans.ts b/api/src/routes/store/published-listings/applications/#id/subscription-plans.ts
new file mode 100644
index 00000000..77f949d9
--- /dev/null
+++ b/api/src/routes/store/published-listings/applications/#id/subscription-plans.ts
@@ -0,0 +1,24 @@
+import { Request, Response, Router } from "express";
+import { route } from "@fosscord/api";
+
+const router: Router = Router();
+
+router.get("/", route({}), async (req: Request, res: Response) => {
+	//TODO
+	res.json([
+        {
+            id: "",
+            name: "",
+            interval: 1,
+            interval_count: 1,
+            tax_inclusive: true,
+            sku_id: "",
+            fallback_price: 499,
+            fallback_currency: "eur",
+            currency: "eur",
+            price: 4199,
+            price_tier: null
+        }]).status(200);
+});
+
+export default router;
diff --git a/api/src/routes/store/skus/#id/index.ts b/api/src/routes/store/published-listings/skus.ts
index 53b61c29..53b61c29 100644
--- a/api/src/routes/store/skus/#id/index.ts
+++ b/api/src/routes/store/published-listings/skus.ts
diff --git a/api/src/routes/store/published-listings/skus/#id/subscription-plans.ts b/api/src/routes/store/published-listings/skus/#id/subscription-plans.ts
new file mode 100644
index 00000000..77f949d9
--- /dev/null
+++ b/api/src/routes/store/published-listings/skus/#id/subscription-plans.ts
@@ -0,0 +1,24 @@
+import { Request, Response, Router } from "express";
+import { route } from "@fosscord/api";
+
+const router: Router = Router();
+
+router.get("/", route({}), async (req: Request, res: Response) => {
+	//TODO
+	res.json([
+        {
+            id: "",
+            name: "",
+            interval: 1,
+            interval_count: 1,
+            tax_inclusive: true,
+            sku_id: "",
+            fallback_price: 499,
+            fallback_currency: "eur",
+            currency: "eur",
+            price: 4199,
+            price_tier: null
+        }]).status(200);
+});
+
+export default router;
diff --git a/api/src/routes/users/@me/activities/statistics/applications.ts b/api/src/routes/users/@me/activities/statistics/applications.ts
new file mode 100644
index 00000000..834be35c
--- /dev/null
+++ b/api/src/routes/users/@me/activities/statistics/applications.ts
@@ -0,0 +1,11 @@
+import { Router, Response, Request } from "express";
+import { route } from "@fosscord/api";
+
+const router = Router();
+
+router.get("/", route({}), (req: Request, res: Response) => {
+	// TODO:
+	res.json([]).status(200)
+});
+
+export default router;
diff --git a/api/src/routes/users/@me/billing/payment-sources.ts b/api/src/routes/users/@me/billing/payment-sources.ts
new file mode 100644
index 00000000..834be35c
--- /dev/null
+++ b/api/src/routes/users/@me/billing/payment-sources.ts
@@ -0,0 +1,11 @@
+import { Router, Response, Request } from "express";
+import { route } from "@fosscord/api";
+
+const router = Router();
+
+router.get("/", route({}), (req: Request, res: Response) => {
+	// TODO:
+	res.json([]).status(200)
+});
+
+export default router;
diff --git a/api/src/routes/users/@me/email-settings.ts b/api/src/routes/users/@me/email-settings.ts
new file mode 100644
index 00000000..2d961a0e
--- /dev/null
+++ b/api/src/routes/users/@me/email-settings.ts
@@ -0,0 +1,19 @@
+import { Router, Response, Request } from "express";
+import { route } from "@fosscord/api";
+
+const router = Router();
+
+router.get("/", route({}), (req: Request, res: Response) => {
+	// TODO:    
+	res.json({
+		categories: { 
+        social: true,
+        communication: true,
+        tips: false,
+        updates_and_announcements: false,
+        recommendations_and_events: false },
+		initialized: false
+	}).status(200);
+});
+
+export default router;
diff --git a/api/src/routes/users/@me/entitlements.ts b/api/src/routes/users/@me/entitlements.ts
new file mode 100644
index 00000000..7be3634b
--- /dev/null
+++ b/api/src/routes/users/@me/entitlements.ts
@@ -0,0 +1,12 @@
+import { Router, Response, Request } from "express";
+import { route } from "@fosscord/api";
+
+const router = Router();
+
+router.get("/gifts", route({}), (req: Request, res: Response) => {
+	// TODO:
+    //const { locale, primary_only } = req.query;
+	res.json([]).status(200);
+});
+
+export default router;
diff --git a/api/src/routes/users/@me/guilds/premium/subscription-slots.ts b/api/src/routes/users/@me/guilds/premium/subscription-slots.ts
new file mode 100644
index 00000000..b487a2ce
--- /dev/null
+++ b/api/src/routes/users/@me/guilds/premium/subscription-slots.ts
@@ -0,0 +1,11 @@
+import { Router, Response, Request } from "express";
+import { route } from "@fosscord/api";
+
+const router = Router();
+
+router.get("/", route({}), (req: Request, res: Response) => {
+	// TODO:
+	res.json([]).status(200));
+});
+
+export default router;
diff --git a/api/src/routes/users/@me/notes.ts b/api/src/routes/users/@me/notes.ts
new file mode 100644
index 00000000..235c2baf
--- /dev/null
+++ b/api/src/routes/users/@me/notes.ts
@@ -0,0 +1,11 @@
+import { Request, Response, Router } from "express";
+import { route } from "@fosscord/api";
+
+const router: Router = Router();
+
+router.put("/", route({}), async (req: Request, res: Response) => {
+	//TODO
+	res.json({code: 0}).status(400);
+});
+
+export default router;