mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-26 03:15:06 +00:00
add store/sku/entitlement schemas/enums
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import { EntitlementSpecialSourceType, EntitlementType, QuestClaimRewardRequestSchema, QuestClaimRewardResponseSchema } from "@spacebar/schemas/quests";
|
||||
import { emitEvent } from "@spacebar/util";
|
||||
import { emitEvent, EntitlementGiftCodeFlags } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
@@ -74,7 +74,7 @@ router.post(
|
||||
type: EntitlementType.QUEST_REWARD,
|
||||
tenant_metadata: {},
|
||||
source_type: EntitlementSpecialSourceType.QUEST_REWARD,
|
||||
gift_code_flags: 0, // PAYMENT_SOURCE_REQUIRED, todo: make a bitfield enum
|
||||
gift_code_flags: EntitlementGiftCodeFlags.FLAGS.PAYMENT_SOURCE_REQUIRED,
|
||||
promotion_id: null,
|
||||
},
|
||||
],
|
||||
|
||||
@@ -331,6 +331,7 @@ router.get(
|
||||
}),
|
||||
async (req: Request, res: Response) => {
|
||||
// TODO: implement
|
||||
console.debug("GET /quests/@me/claimed is incomplete");
|
||||
res.json({
|
||||
quests: [],
|
||||
} as ClaimedQuestsResponseSchema);
|
||||
|
||||
@@ -56,7 +56,17 @@ router.get(
|
||||
});
|
||||
}
|
||||
|
||||
res.json({} as QuestPlacementResponseSchema);
|
||||
// TODO: implement
|
||||
console.debug(`GET /quests/decision?placement=${placement}&client_heartbeat_session_id=${client_heartbeat_session_id} is incomplete`);
|
||||
res.json({
|
||||
request_id: "unique-request-id-1234",
|
||||
quest: null,
|
||||
ad_identifiers: null,
|
||||
ad_context: null,
|
||||
response_ttl_seconds: 300,
|
||||
metadata_raw: "",
|
||||
metadata_sealed: "",
|
||||
} as QuestPlacementResponseSchema);
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user