@be-link/ecommerce-backend-bff-service-node-sdk 0.0.112 → 0.0.114

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/cjs/bff/modules/miniprogram/auth/service.d.ts +46 -0
  2. package/cjs/bff/modules/miniprogram/auth/service.js +66 -0
  3. package/cjs/bff/modules/miniprogram/auth/types.d.ts +133 -0
  4. package/cjs/bff/modules/miniprogram/franchisee/service.d.ts +12 -0
  5. package/cjs/bff/modules/miniprogram/franchisee/service.js +22 -0
  6. package/cjs/bff/modules/miniprogram/franchisee/types.d.ts +25 -0
  7. package/cjs/bff/modules/pandora/auth/service.d.ts +28 -0
  8. package/cjs/bff/modules/pandora/auth/service.js +42 -0
  9. package/cjs/bff/modules/pandora/auth/types.d.ts +94 -0
  10. package/cjs/bff/modules/pandora/auth/types.js +2 -0
  11. package/cjs/bff/modules/pandora/bd/service.d.ts +47 -0
  12. package/cjs/bff/modules/pandora/bd/service.js +67 -0
  13. package/cjs/bff/modules/pandora/bd/types.d.ts +157 -0
  14. package/cjs/bff/modules/pandora/bd/types.js +2 -0
  15. package/cjs/bff/modules/pandora/bdm/service.d.ts +35 -0
  16. package/cjs/bff/modules/pandora/{orderQuery → bdm}/service.js +18 -18
  17. package/cjs/bff/modules/pandora/bdm/types.d.ts +104 -0
  18. package/cjs/bff/modules/pandora/bdm/types.js +2 -0
  19. package/cjs/bff/modules/pandora/common/service.d.ts +34 -0
  20. package/cjs/bff/modules/pandora/common/service.js +50 -0
  21. package/cjs/bff/modules/pandora/common/types.d.ts +125 -0
  22. package/cjs/bff/modules/pandora/common/types.js +2 -0
  23. package/cjs/bff/modules/pandora/coupon/service.d.ts +59 -0
  24. package/cjs/bff/modules/pandora/coupon/service.js +83 -0
  25. package/cjs/bff/modules/pandora/coupon/types.d.ts +403 -0
  26. package/cjs/bff/modules/pandora/coupon/types.js +2 -0
  27. package/cjs/bff/modules/pandora/franchisee/service.d.ts +19 -0
  28. package/cjs/bff/modules/pandora/franchisee/service.js +43 -0
  29. package/cjs/bff/modules/pandora/franchisee/types.d.ts +204 -0
  30. package/cjs/bff/modules/pandora/franchisee/types.js +2 -0
  31. package/cjs/bff/modules/pandora/product/types.d.ts +6 -2
  32. package/cjs/bff/modules/pandora/productExp/service.d.ts +4 -4
  33. package/cjs/bff/modules/pandora/productExp/service.js +7 -7
  34. package/cjs/bff/modules/pandora/productExp/types.d.ts +31 -16
  35. package/cjs/bff/modules/pandora/productLive/service.d.ts +1 -1
  36. package/cjs/bff/modules/pandora/productLive/types.d.ts +1 -1
  37. package/cjs/bff/modules/pandora/role/service.d.ts +47 -0
  38. package/cjs/bff/modules/pandora/role/service.js +67 -0
  39. package/cjs/bff/modules/pandora/role/types.d.ts +135 -0
  40. package/cjs/bff/modules/pandora/role/types.js +2 -0
  41. package/cjs/bff/modules/pandora/storeClerk/service.d.ts +41 -0
  42. package/cjs/bff/modules/pandora/storeClerk/service.js +59 -0
  43. package/cjs/bff/modules/pandora/storeClerk/types.d.ts +130 -0
  44. package/cjs/bff/modules/pandora/storeClerk/types.js +2 -0
  45. package/cjs/bff/modules/pandora/storeManager/service.d.ts +47 -0
  46. package/cjs/bff/modules/pandora/storeManager/service.js +67 -0
  47. package/cjs/bff/modules/pandora/storeManager/types.d.ts +148 -0
  48. package/cjs/bff/modules/pandora/storeManager/types.js +2 -0
  49. package/cjs/bff/modules/pandora/user/service.d.ts +19 -0
  50. package/cjs/bff/modules/pandora/user/service.js +43 -0
  51. package/cjs/bff/modules/pandora/user/types.d.ts +178 -0
  52. package/cjs/bff/modules/pandora/user/types.js +2 -0
  53. package/cjs/bff/request/strategy.js +1 -0
  54. package/cjs/enums.d.ts +1 -0
  55. package/cjs/enums.js +4 -1
  56. package/cjs/index.d.ts +50 -6
  57. package/cjs/index.js +32 -10
  58. package/cjs/utils/env.js +3 -2
  59. package/cjs/utils/http.js +1 -1
  60. package/cjs/utils/string.js +1 -0
  61. package/esm/bff/modules/miniprogram/auth/service.d.ts +46 -0
  62. package/esm/bff/modules/miniprogram/auth/service.mjs +59 -0
  63. package/esm/bff/modules/miniprogram/auth/types.d.ts +133 -0
  64. package/esm/bff/modules/miniprogram/franchisee/service.d.ts +12 -0
  65. package/esm/bff/modules/miniprogram/franchisee/service.mjs +15 -0
  66. package/esm/bff/modules/miniprogram/franchisee/types.d.ts +25 -0
  67. package/esm/bff/modules/pandora/auth/service.d.ts +28 -0
  68. package/esm/bff/modules/pandora/auth/service.mjs +35 -0
  69. package/esm/bff/modules/pandora/auth/types.d.ts +94 -0
  70. package/esm/bff/modules/pandora/auth/types.mjs +1 -0
  71. package/esm/bff/modules/pandora/bd/service.d.ts +47 -0
  72. package/esm/bff/modules/pandora/bd/service.mjs +60 -0
  73. package/esm/bff/modules/pandora/bd/types.d.ts +157 -0
  74. package/esm/bff/modules/pandora/bd/types.mjs +1 -0
  75. package/esm/bff/modules/pandora/bdm/service.d.ts +35 -0
  76. package/esm/bff/modules/pandora/bdm/service.mjs +44 -0
  77. package/esm/bff/modules/pandora/bdm/types.d.ts +104 -0
  78. package/esm/bff/modules/pandora/bdm/types.mjs +1 -0
  79. package/esm/bff/modules/pandora/common/service.d.ts +34 -0
  80. package/esm/bff/modules/pandora/common/service.mjs +43 -0
  81. package/esm/bff/modules/pandora/common/types.d.ts +125 -0
  82. package/esm/bff/modules/pandora/common/types.mjs +1 -0
  83. package/esm/bff/modules/pandora/coupon/service.d.ts +59 -0
  84. package/esm/bff/modules/pandora/coupon/service.mjs +76 -0
  85. package/esm/bff/modules/pandora/coupon/types.d.ts +403 -0
  86. package/esm/bff/modules/pandora/coupon/types.mjs +1 -0
  87. package/esm/bff/modules/pandora/franchisee/service.d.ts +19 -0
  88. package/esm/bff/modules/pandora/franchisee/service.mjs +36 -0
  89. package/esm/bff/modules/pandora/franchisee/types.d.ts +204 -0
  90. package/esm/bff/modules/pandora/franchisee/types.mjs +1 -0
  91. package/esm/bff/modules/pandora/product/types.d.ts +6 -2
  92. package/esm/bff/modules/pandora/productExp/service.d.ts +4 -4
  93. package/esm/bff/modules/pandora/productExp/service.mjs +7 -7
  94. package/esm/bff/modules/pandora/productExp/types.d.ts +31 -16
  95. package/esm/bff/modules/pandora/productLive/service.d.ts +1 -1
  96. package/esm/bff/modules/pandora/productLive/types.d.ts +1 -1
  97. package/esm/bff/modules/pandora/role/service.d.ts +47 -0
  98. package/esm/bff/modules/pandora/role/service.mjs +60 -0
  99. package/esm/bff/modules/pandora/role/types.d.ts +135 -0
  100. package/esm/bff/modules/pandora/role/types.mjs +1 -0
  101. package/esm/bff/modules/pandora/storeClerk/service.d.ts +41 -0
  102. package/esm/bff/modules/pandora/storeClerk/service.mjs +52 -0
  103. package/esm/bff/modules/pandora/storeClerk/types.d.ts +130 -0
  104. package/esm/bff/modules/pandora/storeClerk/types.mjs +1 -0
  105. package/esm/bff/modules/pandora/storeManager/service.d.ts +47 -0
  106. package/esm/bff/modules/pandora/storeManager/service.mjs +60 -0
  107. package/esm/bff/modules/pandora/storeManager/types.d.ts +148 -0
  108. package/esm/bff/modules/pandora/storeManager/types.mjs +1 -0
  109. package/esm/bff/modules/pandora/user/service.d.ts +19 -0
  110. package/esm/bff/modules/pandora/user/service.mjs +36 -0
  111. package/esm/bff/modules/pandora/user/types.d.ts +178 -0
  112. package/esm/bff/modules/pandora/user/types.mjs +1 -0
  113. package/esm/bff/request/strategy.mjs +1 -0
  114. package/esm/enums.d.ts +1 -0
  115. package/esm/enums.mjs +2 -0
  116. package/esm/index.d.ts +50 -6
  117. package/esm/index.mjs +26 -4
  118. package/esm/utils/env.mjs +3 -2
  119. package/esm/utils/http.mjs +1 -1
  120. package/esm/utils/string.mjs +1 -0
  121. package/package.json +9 -5
  122. package/cjs/bff/modules/pandora/orderCore/service.d.ts +0 -23
  123. package/cjs/bff/modules/pandora/orderCore/service.js +0 -35
  124. package/cjs/bff/modules/pandora/orderCore/types.d.ts +0 -15
  125. package/cjs/bff/modules/pandora/orderQuery/service.d.ts +0 -35
  126. package/cjs/bff/modules/pandora/orderQuery/types.d.ts +0 -21
  127. package/esm/bff/modules/pandora/orderCore/service.d.ts +0 -23
  128. package/esm/bff/modules/pandora/orderCore/service.mjs +0 -28
  129. package/esm/bff/modules/pandora/orderCore/types.d.ts +0 -15
  130. package/esm/bff/modules/pandora/orderQuery/service.d.ts +0 -35
  131. package/esm/bff/modules/pandora/orderQuery/service.mjs +0 -44
  132. package/esm/bff/modules/pandora/orderQuery/types.d.ts +0 -21
  133. /package/cjs/bff/modules/{pandora/orderCore → miniprogram/auth}/types.js +0 -0
  134. /package/cjs/bff/modules/{pandora/orderQuery → miniprogram/franchisee}/types.js +0 -0
  135. /package/esm/bff/modules/{pandora/orderCore → miniprogram/auth}/types.mjs +0 -0
  136. /package/esm/bff/modules/{pandora/orderQuery → miniprogram/franchisee}/types.mjs +0 -0
@@ -0,0 +1,403 @@
1
+ import { PROMOTION_SERVICE_ENUM } from '../../../../enums';
2
+ import { StandardResponse } from '../../../../types';
3
+ export declare namespace CouponService {
4
+ namespace Entity {
5
+ /** 券生命周期 */
6
+ interface CouponLifeCycle {
7
+ /** 固定生效时间(时间戳) */
8
+ effectAt?: number;
9
+ /** 固定过期时间(时间戳) */
10
+ expireAt?: number;
11
+ /** 相对生效天数(自领券后开始计算,与生效&过期时间互斥) */
12
+ effectiveDays?: number;
13
+ }
14
+ /** 券使用限制 */
15
+ interface CouponUsageLimit {
16
+ /** 类型:FEE-金额 */
17
+ type: PROMOTION_SERVICE_ENUM.COUPON_ENUM.USAGE_LIMIT_TYPE;
18
+ /** 限制值 */
19
+ value: number;
20
+ /** 生效类型:ITEM-单份商品 */
21
+ effectType: string;
22
+ }
23
+ /** 优惠规则额外信息 */
24
+ interface DiscountRuleExtra {
25
+ /** 阶梯序号 */
26
+ tier?: number;
27
+ /** 门槛金额(分) */
28
+ floor?: number;
29
+ /** 上限金额(分,-1表示无上限) */
30
+ ceiling?: number;
31
+ /** 是否可叠加 */
32
+ stackable?: boolean;
33
+ /** 最大叠加次数 */
34
+ maxStack?: number;
35
+ }
36
+ /** 券领取限制 */
37
+ interface CouponReceiveLimit {
38
+ /** 自增主键 */
39
+ id?: number;
40
+ /** 券ID */
41
+ couponId: string;
42
+ /** 限制维度 */
43
+ type: PROMOTION_SERVICE_ENUM.COUPON_ENUM.RECEIVE_LIMIT_TYPE;
44
+ /** 限制值 */
45
+ limitValue: number;
46
+ /** 创建时间 */
47
+ createdAt?: number;
48
+ /** 更新时间 */
49
+ updatedAt?: number;
50
+ /** 删除时间 */
51
+ deletedAt?: number;
52
+ }
53
+ /** 券优惠规则 */
54
+ interface CouponDiscountRule {
55
+ /** 自增主键 */
56
+ id?: number;
57
+ /** 券ID */
58
+ couponId: string;
59
+ /** 优惠类型 */
60
+ type: PROMOTION_SERVICE_ENUM.COUPON_ENUM.DISCOUNT_RULE_TYPE;
61
+ /** 优惠值(金额:分,折扣:0-100) */
62
+ discountValue: number;
63
+ /** 优惠级别 */
64
+ level: PROMOTION_SERVICE_ENUM.COUPON_ENUM.DISCOUNT_LEVEL;
65
+ /** 同级多规则时的排序 */
66
+ priority: number;
67
+ /** 规则信息 */
68
+ extra?: Entity.DiscountRuleExtra;
69
+ /** 创建时间 */
70
+ createdAt?: number;
71
+ /** 更新时间 */
72
+ updatedAt?: number;
73
+ /** 删除时间 */
74
+ deletedAt?: number;
75
+ }
76
+ /** 券适用范围 */
77
+ interface CouponScope {
78
+ /** ID */
79
+ id?: string;
80
+ /** 创建时间 */
81
+ createdAt?: number;
82
+ /** 更新时间 */
83
+ updatedAt?: number;
84
+ /** 删除时间 */
85
+ deletedAt?: number;
86
+ /** 券ID */
87
+ couponId: string;
88
+ /** 是否可用 */
89
+ available: boolean;
90
+ /** 标签ID */
91
+ tagId: string;
92
+ }
93
+ /** 券操作记录 */
94
+ interface CouponOperateLog {
95
+ /** ID */
96
+ id?: string;
97
+ /** 创建时间 */
98
+ createdAt?: number;
99
+ /** 更新时间 */
100
+ updatedAt?: number;
101
+ /** 删除时间 */
102
+ deletedAt?: number;
103
+ /** 操作类型 */
104
+ operateType: PROMOTION_SERVICE_ENUM.COUPON_ENUM.OPERATE_TYPE;
105
+ /** 操作详情 */
106
+ operateDetail?: any;
107
+ /** 操作人 */
108
+ operator: string;
109
+ /** 券ID */
110
+ couponId: string;
111
+ }
112
+ /** 券库存流水 */
113
+ interface CouponStockFlow {
114
+ /** 主键ID */
115
+ id?: string;
116
+ /** 创建时间 */
117
+ createdAt?: number;
118
+ /** 更新时间 */
119
+ updatedAt?: number;
120
+ /** 删除时间 */
121
+ deletedAt?: number;
122
+ /** 券ID */
123
+ couponId: string;
124
+ /** 渠道 */
125
+ channel: PROMOTION_SERVICE_ENUM.COUPON_ENUM.STOCK_CHANNEL;
126
+ /** 库存变更量(正数) */
127
+ changeStock: number;
128
+ /** 变动类型 */
129
+ changeType: PROMOTION_SERVICE_ENUM.COUPON_ENUM.STOCK_CHANGE_TYPE;
130
+ /** 业务ID */
131
+ bizId: string;
132
+ /** 操作人 */
133
+ operator: string;
134
+ }
135
+ /** 券模版 */
136
+ interface CouponTemplate {
137
+ /** ID */
138
+ id?: string;
139
+ /** 创建时间 */
140
+ createdAt?: number;
141
+ /** 更新时间 */
142
+ updatedAt?: number;
143
+ /** 删除时间 */
144
+ deletedAt?: number;
145
+ /** 创建人ID */
146
+ creatorId: string;
147
+ /** 券名称 */
148
+ name: string;
149
+ /** 券类型 */
150
+ couponType: PROMOTION_SERVICE_ENUM.COUPON_ENUM.COUPON_TYPE;
151
+ /** 券状态 */
152
+ status?: PROMOTION_SERVICE_ENUM.COUPON_ENUM.COUPON_STATUS;
153
+ /** 初始数量(-1为无限) */
154
+ originalQty: number;
155
+ /** 剩余数量(-1为无限) */
156
+ lastQty?: number;
157
+ /** 使用说明 */
158
+ instructions: string;
159
+ /** 券生命周期 */
160
+ lifeCycle: CouponLifeCycle;
161
+ /** 使用限制 */
162
+ usageLimit?: CouponUsageLimit;
163
+ /** 领取限制列表 */
164
+ receiveLimits?: CouponReceiveLimit[];
165
+ /** 优惠规则列表 */
166
+ discountRules?: CouponDiscountRule[];
167
+ /** 适用范围列表 */
168
+ scopes?: CouponScope[];
169
+ }
170
+ }
171
+ namespace Request {
172
+ /** 创建券模版 */
173
+ interface createCouponTemplate {
174
+ /** 券名称 */
175
+ name: string;
176
+ /** 券类型 */
177
+ couponType: PROMOTION_SERVICE_ENUM.COUPON_ENUM.COUPON_TYPE;
178
+ /** 初始数量(-1为无限) */
179
+ originalQty: number;
180
+ /** 使用说明 */
181
+ instructions: string;
182
+ /** 券生命周期 */
183
+ lifeCycle: Entity.CouponLifeCycle;
184
+ /** 使用限制 */
185
+ usageLimit?: Entity.CouponUsageLimit;
186
+ /** 领取限制列表 */
187
+ receiveLimits?: Array<{
188
+ /** 限制维度 */
189
+ type: PROMOTION_SERVICE_ENUM.COUPON_ENUM.RECEIVE_LIMIT_TYPE;
190
+ /** 限制值 */
191
+ limitValue: number;
192
+ }>;
193
+ /** 优惠规则列表 */
194
+ discountRules?: Array<{
195
+ /** 优惠类型 */
196
+ type: PROMOTION_SERVICE_ENUM.COUPON_ENUM.DISCOUNT_RULE_TYPE;
197
+ /** 优惠值(金额:分,折扣:0-100) */
198
+ discountValue: number;
199
+ /** 优惠级别 */
200
+ level: PROMOTION_SERVICE_ENUM.COUPON_ENUM.DISCOUNT_LEVEL;
201
+ /** 同级多规则时的排序 */
202
+ priority: number;
203
+ /** 规则信息 */
204
+ extra?: Entity.DiscountRuleExtra;
205
+ }>;
206
+ /** 适用范围列表 */
207
+ scopes: {
208
+ /** 是否可用 */
209
+ available: boolean;
210
+ /** 范围值 */
211
+ scopeValue?: string;
212
+ /** 商品列表 */
213
+ idList?: string[];
214
+ /** 范围类型 */
215
+ scopeType: PROMOTION_SERVICE_ENUM.COUPON_ENUM.SCOPE_TYPE;
216
+ };
217
+ }
218
+ /** 作废券模版 */
219
+ interface abandonCouponTemplate {
220
+ /** 券ID */
221
+ couponId: string;
222
+ }
223
+ /** 券模版列表查询 */
224
+ interface getCouponTemplateList {
225
+ /** 页码 */
226
+ pageIndex?: number;
227
+ /** 每页数量 */
228
+ pageSize?: number;
229
+ /** 券名称(模糊查询) */
230
+ name?: string;
231
+ /** 券类型 */
232
+ couponType?: PROMOTION_SERVICE_ENUM.COUPON_ENUM.COUPON_TYPE;
233
+ /** 券状态 */
234
+ status?: PROMOTION_SERVICE_ENUM.COUPON_ENUM.COUPON_STATUS;
235
+ }
236
+ /** 增加券库存 */
237
+ interface addCouponStock {
238
+ /** 券ID */
239
+ couponId: string;
240
+ /** 增加数量 */
241
+ addQty: number;
242
+ /** 渠道 */
243
+ channel?: PROMOTION_SERVICE_ENUM.COUPON_ENUM.STOCK_CHANNEL;
244
+ /** 备注 */
245
+ remark?: string;
246
+ }
247
+ /** 获取券模版详情 */
248
+ interface getCouponTemplateDetail {
249
+ /** 券ID */
250
+ couponId: string;
251
+ }
252
+ /** 同步券至火山 */
253
+ interface syncCouponToLive {
254
+ /** 券ID */
255
+ couponId: string;
256
+ }
257
+ /** 修改券模版适用商品 */
258
+ interface updateCouponTemplateProduct {
259
+ /** 券ID */
260
+ couponId: string;
261
+ /** 适用范围 */
262
+ idList?: string[];
263
+ /** 适用范围类型 */
264
+ scopeType: PROMOTION_SERVICE_ENUM.COUPON_ENUM.SCOPE_TYPE;
265
+ /** 是否可用 */
266
+ available: boolean;
267
+ }
268
+ /** 获取券模版的使用商品 */
269
+ interface getProductScopeList {
270
+ /** 券ID */
271
+ couponId: string;
272
+ }
273
+ }
274
+ namespace Response {
275
+ /** 券模版列表项 */
276
+ interface CouponTemplateListItem {
277
+ /** 优惠券ID */
278
+ id: string;
279
+ /** 名称 */
280
+ name: string;
281
+ /** 类型 */
282
+ couponType: PROMOTION_SERVICE_ENUM.COUPON_ENUM.COUPON_TYPE;
283
+ /** 优惠内容(格式化后的文本,如"满100减20") */
284
+ discountContent: string;
285
+ /** 适用商品(格式化后的文本,如"全部商品") */
286
+ applicableScope: string;
287
+ /** 已领取数量 */
288
+ receivedCount: number;
289
+ /** 未领取数量 */
290
+ unreceivedCount: number;
291
+ /** 状态 */
292
+ status: PROMOTION_SERVICE_ENUM.COUPON_ENUM.COUPON_STATUS;
293
+ /** 创建时间 */
294
+ createdAt: number;
295
+ /** 更新时间 */
296
+ updatedAt: number;
297
+ }
298
+ /** 券模版列表响应 */
299
+ interface getCouponTemplateList {
300
+ /** 总数 */
301
+ total: number;
302
+ /** 券模版列表 */
303
+ list: CouponTemplateListItem[];
304
+ /** 当前页码 */
305
+ pageIndex: number;
306
+ /** 每页数量 */
307
+ pageSize: number;
308
+ }
309
+ /** 增加券库存响应 */
310
+ interface addCouponStock {
311
+ /** 是否成功 */
312
+ success: boolean;
313
+ /** 券ID */
314
+ couponId: string;
315
+ /** 增加前的库存 */
316
+ beforeStock: number;
317
+ /** 增加后的库存 */
318
+ afterStock: number;
319
+ /** 库存流水ID */
320
+ stockFlowId?: string;
321
+ }
322
+ /** 获取券模版详情响应 */
323
+ interface getCouponTemplateDetail {
324
+ /** 券ID */
325
+ id: string;
326
+ /** 券名称 */
327
+ name: string;
328
+ /** 券类型 */
329
+ couponType: PROMOTION_SERVICE_ENUM.COUPON_ENUM.COUPON_TYPE;
330
+ /** 初始数量(-1为无限) */
331
+ originalQty: number;
332
+ /** 使用说明 */
333
+ instructions: string;
334
+ /** 券生命周期 */
335
+ lifeCycle: Entity.CouponLifeCycle;
336
+ /** 使用限制 */
337
+ usageLimit?: Entity.CouponUsageLimit;
338
+ /** 领取限制列表 */
339
+ receiveLimits?: Array<{
340
+ /** 限制维度 */
341
+ type: PROMOTION_SERVICE_ENUM.COUPON_ENUM.RECEIVE_LIMIT_TYPE;
342
+ /** 限制值 */
343
+ limitValue: number;
344
+ }>;
345
+ /** 优惠规则列表 */
346
+ discountRules?: Array<{
347
+ /** 优惠类型 */
348
+ type: PROMOTION_SERVICE_ENUM.COUPON_ENUM.DISCOUNT_RULE_TYPE;
349
+ /** 优惠值(金额:分,折扣:0-100) */
350
+ discountValue: number;
351
+ /** 优惠级别 */
352
+ level: PROMOTION_SERVICE_ENUM.COUPON_ENUM.DISCOUNT_LEVEL;
353
+ /** 同级多规则时的排序 */
354
+ priority: number;
355
+ /** 规则信息 */
356
+ extra?: Entity.DiscountRuleExtra;
357
+ }>;
358
+ /** 适用范围列表 */
359
+ scopes?: Array<{
360
+ /** 是否可用 */
361
+ available: boolean;
362
+ /** 范围值 */
363
+ scopeValue?: string;
364
+ /** 范围类型 */
365
+ scopeType: PROMOTION_SERVICE_ENUM.COUPON_ENUM.SCOPE_TYPE;
366
+ /** 商品列表 */
367
+ idList: string[];
368
+ }>;
369
+ }
370
+ /** 扣减券库存响应 */
371
+ interface deductCouponStock {
372
+ /** 是否成功 */
373
+ success: boolean;
374
+ /** 失败消息 */
375
+ message?: string;
376
+ }
377
+ /** 获取券模版的使用商品响应 */
378
+ interface getProductScopeList {
379
+ /** ID列表 */
380
+ idList: string[];
381
+ /** 类型 */
382
+ idType?: PROMOTION_SERVICE_ENUM.COUPON_ENUM.SCOPE_TYPE;
383
+ }
384
+ }
385
+ interface CouponTemplateController {
386
+ /** 创建券模版 */
387
+ createCouponTemplate(request: CouponService.Request.createCouponTemplate): Promise<StandardResponse<void>>;
388
+ /** 作废券模版 */
389
+ abandonCouponTemplate(request: CouponService.Request.abandonCouponTemplate): Promise<StandardResponse<void>>;
390
+ /** 获取券模版列表 */
391
+ getCouponTemplateList(request: CouponService.Request.getCouponTemplateList): Promise<StandardResponse<CouponService.Response.getCouponTemplateList>>;
392
+ /** 增加券库存 */
393
+ addCouponStock(request: CouponService.Request.addCouponStock): Promise<StandardResponse<void>>;
394
+ /** 获取券模版详情 */
395
+ getCouponTemplateDetail(request: CouponService.Request.getCouponTemplateDetail): Promise<StandardResponse<CouponService.Response.getCouponTemplateDetail>>;
396
+ /** 同步券至火山直播 */
397
+ syncCouponToLive(request: CouponService.Request.syncCouponToLive): Promise<StandardResponse<void>>;
398
+ /** 修改券模版适用商品 */
399
+ updateCouponTemplateScope(request: CouponService.Request.updateCouponTemplateProduct): Promise<StandardResponse<void>>;
400
+ /** 获取券模版的使用商品 */
401
+ getProductScopeList(request: CouponService.Request.getProductScopeList): Promise<StandardResponse<CouponService.Response.getProductScopeList>>;
402
+ }
403
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,19 @@
1
+ import { PandoraFranchiseeService as Service } from './types';
2
+ import BaseService from '../../BaseService';
3
+ import type { StandardResponse } from '../../../../types';
4
+ /**
5
+ * PandoraFranchiseeService - Pandora Franchisee 服务模块
6
+ * 提供 Pandora Franchisee 相关的 API 方法
7
+ * 平台: pandora
8
+ */
9
+ export declare class PandoraFranchiseeService extends BaseService implements Service.FranchiseeController {
10
+ protected prefixUrl: string;
11
+ createFranchisee(request: Service.Request.createFranchisee): Promise<StandardResponse<Service.Response.createFranchisee>>;
12
+ updateFranchisee(request: Service.Request.updateFranchisee): Promise<StandardResponse<Service.Response.updateFranchisee>>;
13
+ listFranchisees(request: Service.Request.listFranchisees): Promise<StandardResponse<Service.Response.listFranchisees>>;
14
+ getFranchiseeDetail(request: Service.Request.getFranchiseeDetail): Promise<StandardResponse<Service.Response.getFranchiseeDetail>>;
15
+ getFranchiseeEditHistory(request: Service.Request.getFranchiseeEditHistory): Promise<StandardResponse<Service.Response.getFranchiseeEditHistory>>;
16
+ checkAndUpdateAccountInfo(request: Service.Request.checkAndUpdateAccountInfo): Promise<StandardResponse<Service.Response.checkAndUpdateAccountInfo>>;
17
+ getFranchiseeIdByUserId(request: Service.Request.getFranchiseeIdByUserId): Promise<StandardResponse<Service.Response.getFranchiseeIdByUserId>>;
18
+ updateStatus(request: Service.Request.updateStatus): Promise<StandardResponse<Service.Response.updateStatus>>;
19
+ }
@@ -0,0 +1,36 @@
1
+ import BaseService from '../../BaseService.mjs';
2
+ /**
3
+ * PandoraFranchiseeService - Pandora Franchisee 服务模块
4
+ * 提供 Pandora Franchisee 相关的 API 方法
5
+ * 平台: pandora
6
+ */
7
+ export class PandoraFranchiseeService extends BaseService {
8
+ constructor() {
9
+ super(...arguments);
10
+ this.prefixUrl = '/pandora/franchisee';
11
+ }
12
+ createFranchisee(request) {
13
+ return this.request(this.createFranchisee, request);
14
+ }
15
+ updateFranchisee(request) {
16
+ return this.request(this.updateFranchisee, request);
17
+ }
18
+ listFranchisees(request) {
19
+ return this.request(this.listFranchisees, request);
20
+ }
21
+ getFranchiseeDetail(request) {
22
+ return this.request(this.getFranchiseeDetail, request);
23
+ }
24
+ getFranchiseeEditHistory(request) {
25
+ return this.request(this.getFranchiseeEditHistory, request);
26
+ }
27
+ checkAndUpdateAccountInfo(request) {
28
+ return this.request(this.checkAndUpdateAccountInfo, request);
29
+ }
30
+ getFranchiseeIdByUserId(request) {
31
+ return this.request(this.getFranchiseeIdByUserId, request);
32
+ }
33
+ updateStatus(request) {
34
+ return this.request(this.updateStatus, request);
35
+ }
36
+ }
@@ -0,0 +1,204 @@
1
+ import { StandardResponse } from '../../../../types';
2
+ export declare namespace PandoraFranchiseeService {
3
+ namespace Request {
4
+ /**
5
+ * 创建加盟商
6
+ */
7
+ interface createFranchisee {
8
+ name: string;
9
+ directorName: string;
10
+ directorPhone: string;
11
+ bdDirector?: string;
12
+ stores: string[];
13
+ settleCycle: string;
14
+ financeGroup?: string;
15
+ }
16
+ /**
17
+ * 查询加盟商列表
18
+ */
19
+ interface listFranchisees {
20
+ pageIndex?: number;
21
+ pageSize?: number;
22
+ name?: string;
23
+ directorName?: string;
24
+ directorPhone?: string;
25
+ bdDirector?: string;
26
+ status?: 'VALID' | 'INVALID';
27
+ approvalStatus?: string;
28
+ financeGroup?: string;
29
+ }
30
+ /**
31
+ * 查询加盟商详情
32
+ */
33
+ interface getFranchiseeDetail {
34
+ id: string;
35
+ }
36
+ /**
37
+ * 查询加盟商编辑历史
38
+ */
39
+ interface getFranchiseeEditHistory {
40
+ id: string;
41
+ }
42
+ /**
43
+ * 更新加盟商(基础信息)
44
+ */
45
+ interface updateFranchisee {
46
+ id: string;
47
+ name?: string;
48
+ directorName?: string;
49
+ directorPhone?: string;
50
+ bdDirector?: string;
51
+ stores?: string[];
52
+ type?: 'STORE_BIND_FRANCHISEE';
53
+ settleCycle?: string;
54
+ lastEditor: string;
55
+ financeGroup?: string;
56
+ }
57
+ /**
58
+ * 校验并更新加盟商账户信息
59
+ */
60
+ interface checkAndUpdateAccountInfo {
61
+ id: string;
62
+ userId: string;
63
+ enterpriseName?: string;
64
+ enterpriseType?: string;
65
+ legalRepresentative?: string;
66
+ businessLicense?: string;
67
+ supplementalAgreement?: string[];
68
+ accountName?: string;
69
+ accountNumber?: string;
70
+ bankName?: string;
71
+ bankBranchName?: string;
72
+ contactMobile?: string;
73
+ lastEditor?: string;
74
+ }
75
+ /**
76
+ * 根据用户ID获取加盟商ID
77
+ */
78
+ interface getFranchiseeIdByUserId {
79
+ userId: string;
80
+ }
81
+ /**
82
+ * 更新加盟商状态
83
+ */
84
+ interface updateStatus {
85
+ id: string;
86
+ status: 'VALID' | 'INVALID';
87
+ }
88
+ }
89
+ namespace Response {
90
+ /**
91
+ * 创建加盟商响应
92
+ */
93
+ interface createFranchisee {
94
+ id: string;
95
+ }
96
+ /**
97
+ * 更新加盟商响应
98
+ */
99
+ interface updateFranchisee {
100
+ success: boolean;
101
+ }
102
+ /**
103
+ * 加盟商列表项
104
+ */
105
+ interface franchiseeListItem {
106
+ id: string;
107
+ name: string;
108
+ directorName: string;
109
+ directorPhone: string;
110
+ bdDirector: string;
111
+ status: string;
112
+ stores: Array<{
113
+ storeId: string;
114
+ storeName: string;
115
+ }>;
116
+ settleCycle: string;
117
+ updatedAt: number;
118
+ lastEditor: string;
119
+ username: string;
120
+ approvalStatus: string;
121
+ financeGroup: string;
122
+ }
123
+ /**
124
+ * 加盟商列表响应
125
+ */
126
+ interface listFranchisees {
127
+ list: franchiseeListItem[];
128
+ total: number;
129
+ pageIndex: number;
130
+ pageSize: number;
131
+ }
132
+ /**
133
+ * 加盟商详情响应
134
+ */
135
+ interface getFranchiseeDetail {
136
+ id: string;
137
+ name: string;
138
+ directorName: string;
139
+ directorPhone: string;
140
+ bdDirector: string;
141
+ userId: string;
142
+ status: string;
143
+ createdAt: number;
144
+ updatedAt: number;
145
+ enterpriseName: string;
146
+ enterpriseType: string;
147
+ legalRepresentative: string;
148
+ businessLicense: string;
149
+ supplementalAgreement: string[];
150
+ accountName: string;
151
+ accountNumber: string;
152
+ bankName: string;
153
+ bankBranchName: string;
154
+ contactMobile: string;
155
+ approvalStatus: string;
156
+ lastEditor: string;
157
+ }
158
+ /**
159
+ * 编辑历史项
160
+ */
161
+ interface editHistoryItem {
162
+ relatedType: string;
163
+ operator: string;
164
+ createdAt: number;
165
+ }
166
+ /**
167
+ * 加盟商编辑历史响应
168
+ */
169
+ interface getFranchiseeEditHistory {
170
+ list: editHistoryItem[];
171
+ }
172
+ /**
173
+ * 校验并更新加盟商账户信息响应
174
+ */
175
+ interface checkAndUpdateAccountInfo {
176
+ success: boolean;
177
+ }
178
+ /**
179
+ * 根据用户ID获取加盟商ID响应
180
+ */
181
+ interface getFranchiseeIdByUserId {
182
+ id: string;
183
+ }
184
+ /**
185
+ * 更新加盟商状态响应
186
+ */
187
+ interface updateStatus {
188
+ success: boolean;
189
+ }
190
+ }
191
+ /**
192
+ * Franchisee Controller 接口定义
193
+ */
194
+ interface FranchiseeController {
195
+ createFranchisee(request: Request.createFranchisee): Promise<StandardResponse<Response.createFranchisee>>;
196
+ updateFranchisee(request: Request.updateFranchisee): Promise<StandardResponse<Response.updateFranchisee>>;
197
+ listFranchisees(request: Request.listFranchisees): Promise<StandardResponse<Response.listFranchisees>>;
198
+ getFranchiseeDetail(request: Request.getFranchiseeDetail): Promise<StandardResponse<Response.getFranchiseeDetail>>;
199
+ getFranchiseeEditHistory(request: Request.getFranchiseeEditHistory): Promise<StandardResponse<Response.getFranchiseeEditHistory>>;
200
+ checkAndUpdateAccountInfo(request: Request.checkAndUpdateAccountInfo): Promise<StandardResponse<Response.checkAndUpdateAccountInfo>>;
201
+ getFranchiseeIdByUserId(request: Request.getFranchiseeIdByUserId): Promise<StandardResponse<Response.getFranchiseeIdByUserId>>;
202
+ updateStatus(request: Request.updateStatus): Promise<StandardResponse<Response.updateStatus>>;
203
+ }
204
+ }
@@ -0,0 +1 @@
1
+ export {};