mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-11 05:02:37 +01:00
Merge branch 'master' of http://github.com/fosscord/fosscord-server
This commit is contained in:
commit
bd9a6b38f2
12
api/src/routes/applications/#id/entitlements.ts
Normal file
12
api/src/routes/applications/#id/entitlements.ts
Normal file
@ -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;
|
@ -1,8 +1,30 @@
|
||||
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:
|
||||
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;
|
||||
|
||||
|
12
api/src/routes/discovery.ts
Normal file
12
api/src/routes/discovery.ts
Normal file
@ -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;
|
@ -3,9 +3,8 @@ import { route } from "@fosscord/api";
|
||||
|
||||
const router: Router = Router();
|
||||
|
||||
router.get("/skus/:id", route({}), async (req: Request, res: Response) => {
|
||||
router.get("/", route({}), async (req: Request, res: Response) => {
|
||||
//TODO
|
||||
const { id } = req.params;
|
||||
res.json([]).status(200);
|
||||
});
|
||||
|
79
api/src/routes/store/published-listings/applications.ts
Normal file
79
api/src/routes/store/published-listings/applications.ts
Normal file
@ -0,0 +1,79 @@
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@fosscord/api";
|
||||
|
||||
const router: Router = Router();
|
||||
|
||||
router.get("/:id", route({}), async (req: Request, res: Response) => {
|
||||
//TODO
|
||||
const id = req.params.id;
|
||||
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;
|
@ -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;
|
79
api/src/routes/store/published-listings/skus.ts
Normal file
79
api/src/routes/store/published-listings/skus.ts
Normal file
@ -0,0 +1,79 @@
|
||||
import { Request, Response, Router } from "express";
|
||||
import { route } from "@fosscord/api";
|
||||
|
||||
const router: Router = Router();
|
||||
|
||||
router.get("/:id", route({}), async (req: Request, res: Response) => {
|
||||
//TODO
|
||||
const id = req.params.id;
|
||||
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;
|
@ -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;
|
@ -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;
|
11
api/src/routes/users/@me/billing/payment-sources.ts
Normal file
11
api/src/routes/users/@me/billing/payment-sources.ts
Normal file
@ -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;
|
19
api/src/routes/users/@me/email-settings.ts
Normal file
19
api/src/routes/users/@me/email-settings.ts
Normal file
@ -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;
|
11
api/src/routes/users/@me/entitlements.ts
Normal file
11
api/src/routes/users/@me/entitlements.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import { Router, Response, Request } from "express";
|
||||
import { route } from "@fosscord/api";
|
||||
|
||||
const router = Router();
|
||||
|
||||
router.get("/gifts", route({}), (req: Request, res: Response) => {
|
||||
// TODO:
|
||||
res.json([]).status(200);
|
||||
});
|
||||
|
||||
export default router;
|
@ -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;
|
@ -3,10 +3,12 @@ import { route } from "@fosscord/api";
|
||||
|
||||
const router: Router = Router();
|
||||
|
||||
router.get("/applications/:id", route({}), async (req: Request, res: Response) => {
|
||||
router.put("/:id", route({}), async (req: Request, res: Response) => {
|
||||
//TODO
|
||||
const { id } = req.params;
|
||||
res.json([]).status(200);
|
||||
res.json({
|
||||
message: "400: Bad Request",
|
||||
code: 0
|
||||
}).status(400);
|
||||
});
|
||||
|
||||
export default router;
|
Loading…
Reference in New Issue
Block a user