UNPKG

@wishcbg/bobcode

Version:

基於店家同步功能的需求,讓店家能夠在不同的店家之間同步各項功能設定,並且能夠檢視各項功能的異動情況。 規劃出一套店家設定即程式碼的機制,讓店家能夠以 config file (.sac) 來定義各項功能設定,並且能夠還原店家各項功能設定。 暫且稱這個機制為「Settings as Code」「店家設定即程式碼」。

25 lines (24 loc) 1.03 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MemberStorePointConfigResourceSchema = void 0; const zod_1 = require("zod"); const memberStorePointConfigResourceSettingSchema = zod_1.z.object({ pointExchangeDisplayName: zod_1.z.string().describe('點數兌換中心自定義名稱'), pointExchangeRecordDisplayName: zod_1.z.string().describe('點數兌換紀錄自定義名稱'), }).describe('點數兌換中心'); // 改成export一個 config 而不是class exports.MemberStorePointConfigResourceSchema = { // —— 基本欄位 resourceType: 'memberStorePointConfig', resourceName: '點數兌換中心', resourceSettingSchema: memberStorePointConfigResourceSettingSchema, // —— 關聯 relationScope: 'shop', relationType: 'single', relationResources: [], // —— apply API path applySingleUpdateApiPath: '/:shopId/memberStorePointConfig', applyCreateApiPath: null, applyUpdateApiPath: null, applyDestroyApiPath: null, };