summary refs log tree commit diff
path: root/api/src/routes/store/published-listings
diff options
context:
space:
mode:
authoruurgothat <cckhmck@gmail.com>2021-09-30 17:57:51 +0300
committeruurgothat <cckhmck@gmail.com>2021-09-30 17:57:51 +0300
commit9e07c72a72e60ca8c3c3e6270867accd32b56ece (patch)
tree730cedf62e5075fd3f3d165d3e1fcbb1a81b91db /api/src/routes/store/published-listings
parentMerge pull request #402 from Thesourtimes/master (diff)
downloadserver-9e07c72a72e60ca8c3c3e6270867accd32b56ece.tar.xz
Add misc routes
Diffstat (limited to 'api/src/routes/store/published-listings')
-rw-r--r--api/src/routes/store/published-listings/applications.ts78
-rw-r--r--api/src/routes/store/published-listings/applications/#id/subscription-plans.ts24
-rw-r--r--api/src/routes/store/published-listings/skus.ts78
-rw-r--r--api/src/routes/store/published-listings/skus/#id/subscription-plans.ts24
4 files changed, 204 insertions, 0 deletions
diff --git a/api/src/routes/store/published-listings/applications.ts b/api/src/routes/store/published-listings/applications.ts
new file mode 100644

index 00000000..53b61c29 --- /dev/null +++ b/api/src/routes/store/published-listings/applications.ts
@@ -0,0 +1,78 @@ +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: "", + summary: "", + sku: { + id: "", + type: 1, + dependent_sku_id: null, + application_id: "", + manifets_labels: [], + access_type: 2, + name: "", + features: [], + relase_date: "", + premium: false, + slug: "", + flags: 4, + genres: [], + legal_notice: "", + application: { + id: "", + name: "", + icon: "", + description: "", + summary: "", + cover_image: "", + primary_sku_id: "", + hook: true, + slug: "", + guild_id: "", + bot_public: "", + bot_require_code_grant: false, + verify_key: "", + publishers: [ + { + id: "", + name: "" + } + ], + developers: [ + { + id: "", + name: "" + } + ], + system_requirements: {}, + show_age_gate: false, + price: { + amount: 0, + currency: "EUR" + }, + locales: [] + }, + tagline: "", + description: "", + carousel_items: [ + { + asset_id: "" + } + ], + header_logo_dark_theme: {}, //{id: "", size: 4665, mime_type: "image/gif", width 160, height: 160} + header_logo_light_theme: {}, + box_art: {}, + thumbnail: {}, + header_background: {}, + hero_background: {}, + assets: [] + } + }).status(200); +}); + +export default router; 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/published-listings/skus.ts b/api/src/routes/store/published-listings/skus.ts new file mode 100644
index 00000000..53b61c29 --- /dev/null +++ b/api/src/routes/store/published-listings/skus.ts
@@ -0,0 +1,78 @@ +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: "", + summary: "", + sku: { + id: "", + type: 1, + dependent_sku_id: null, + application_id: "", + manifets_labels: [], + access_type: 2, + name: "", + features: [], + relase_date: "", + premium: false, + slug: "", + flags: 4, + genres: [], + legal_notice: "", + application: { + id: "", + name: "", + icon: "", + description: "", + summary: "", + cover_image: "", + primary_sku_id: "", + hook: true, + slug: "", + guild_id: "", + bot_public: "", + bot_require_code_grant: false, + verify_key: "", + publishers: [ + { + id: "", + name: "" + } + ], + developers: [ + { + id: "", + name: "" + } + ], + system_requirements: {}, + show_age_gate: false, + price: { + amount: 0, + currency: "EUR" + }, + locales: [] + }, + tagline: "", + description: "", + carousel_items: [ + { + asset_id: "" + } + ], + header_logo_dark_theme: {}, //{id: "", size: 4665, mime_type: "image/gif", width 160, height: 160} + header_logo_light_theme: {}, + box_art: {}, + thumbnail: {}, + header_background: {}, + hero_background: {}, + assets: [] + } + }).status(200); +}); + +export default router; 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;