@be-link/ecommerce-backend-bff-service-node-sdk 0.0.11 → 0.0.13
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.
- package/README.md +38 -2
- package/cjs/bff/modules/pandora/store/service.d.ts +53 -0
- package/cjs/bff/modules/pandora/store/service.js +75 -0
- package/cjs/bff/modules/pandora/store/types.d.ts +509 -0
- package/cjs/bff/modules/pandora/store/types.js +25 -0
- package/cjs/bff/modules/pandora/storeSelection/service.d.ts +47 -0
- package/cjs/bff/modules/pandora/storeSelection/service.js +67 -0
- package/cjs/bff/modules/pandora/storeSelection/types.d.ts +274 -0
- package/cjs/bff/modules/pandora/storeSelection/types.js +28 -0
- package/cjs/index.d.ts +33 -25
- package/cjs/index.js +37 -34
- package/esm/bff/modules/pandora/store/service.d.ts +53 -0
- package/esm/bff/modules/pandora/store/service.mjs +68 -0
- package/esm/bff/modules/pandora/store/types.d.ts +509 -0
- package/esm/bff/modules/pandora/store/types.mjs +22 -0
- package/esm/bff/modules/pandora/storeSelection/service.d.ts +47 -0
- package/esm/bff/modules/pandora/storeSelection/service.mjs +60 -0
- package/esm/bff/modules/pandora/storeSelection/types.d.ts +274 -0
- package/esm/bff/modules/pandora/storeSelection/types.mjs +25 -0
- package/esm/index.d.ts +33 -25
- package/esm/index.mjs +26 -26
- package/package.json +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Service = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Store Service 的类型定义
|
|
6
|
+
* 使用命名空间组织类型,与后端 SDK 保持一致
|
|
7
|
+
*/
|
|
8
|
+
var Service;
|
|
9
|
+
(function (Service) {
|
|
10
|
+
/**
|
|
11
|
+
* 响应块类型枚举
|
|
12
|
+
*/
|
|
13
|
+
let ResponseBlock;
|
|
14
|
+
(function (ResponseBlock) {
|
|
15
|
+
let BlockType;
|
|
16
|
+
(function (BlockType) {
|
|
17
|
+
/** 门店基础信息表 */
|
|
18
|
+
BlockType["BASIC_INFO"] = "BASIC_INFO";
|
|
19
|
+
/** 门店结算信息表 */
|
|
20
|
+
BlockType["SETTLEMENT"] = "SETTLEMENT";
|
|
21
|
+
/** 门店仓配信息表 */
|
|
22
|
+
BlockType["WAREHOUSE_DELIVERY"] = "WAREHOUSE_DELIVERY";
|
|
23
|
+
})(BlockType = ResponseBlock.BlockType || (ResponseBlock.BlockType = {}));
|
|
24
|
+
})(ResponseBlock = Service.ResponseBlock || (Service.ResponseBlock = {}));
|
|
25
|
+
})(Service || (exports.Service = Service = {}));
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Service } from './types';
|
|
2
|
+
import BaseService from '../../BaseService';
|
|
3
|
+
import type { StandardResponse } from '../../../../types';
|
|
4
|
+
/**
|
|
5
|
+
* PandoraStoreSelectionService - Pandora 圈选门店服务模块
|
|
6
|
+
* 提供商品圈门店 / 直播间圈门店相关的 API 方法
|
|
7
|
+
* 平台: pandora
|
|
8
|
+
*/
|
|
9
|
+
export declare class PandoraStoreSelectionService extends BaseService {
|
|
10
|
+
protected prefixUrl: string;
|
|
11
|
+
/**
|
|
12
|
+
* 创建标签分组(业务关系类型)
|
|
13
|
+
* @param request - 请求参数
|
|
14
|
+
* @returns Promise,解析为标准响应格式
|
|
15
|
+
*/
|
|
16
|
+
createTagGroup(request: Service.Request.createTagGroup): Promise<StandardResponse<Service.Response.createTagGroup>>;
|
|
17
|
+
/**
|
|
18
|
+
* 创建标签
|
|
19
|
+
* @param request - 请求参数
|
|
20
|
+
* @returns Promise,解析为标准响应格式
|
|
21
|
+
*/
|
|
22
|
+
createTag(request: Service.Request.createTag): Promise<StandardResponse<Service.Response.createTag>>;
|
|
23
|
+
/**
|
|
24
|
+
* 批量创建业务关系(圈选门店)
|
|
25
|
+
* @param request - 请求参数
|
|
26
|
+
* @returns Promise,解析为标准响应格式
|
|
27
|
+
*/
|
|
28
|
+
batchCreateBizRelation(request: Service.Request.batchCreateBizRelation): Promise<StandardResponse<Service.Response.batchCreateBizRelation>>;
|
|
29
|
+
/**
|
|
30
|
+
* 批量删除业务关系(取消圈选门店)
|
|
31
|
+
* @param request - 请求参数
|
|
32
|
+
* @returns Promise,解析为标准响应格式
|
|
33
|
+
*/
|
|
34
|
+
batchDeleteBizRelation(request: Service.Request.batchDeleteBizRelation): Promise<StandardResponse<Service.Response.batchDeleteBizRelation>>;
|
|
35
|
+
/**
|
|
36
|
+
* 根据标签分组和关联主体查询关联对象(查询商品/直播间圈选的门店)
|
|
37
|
+
* @param request - 请求参数
|
|
38
|
+
* @returns Promise,解析为标准响应格式
|
|
39
|
+
*/
|
|
40
|
+
queryRelatedByGroupAndSubject(request: Service.Request.queryRelatedByGroupAndSubject): Promise<StandardResponse<Service.Response.queryRelatedByGroupAndSubject>>;
|
|
41
|
+
/**
|
|
42
|
+
* 根据标签分组和关联对象查询关联主体(查询门店关联的商品/直播间)
|
|
43
|
+
* @param request - 请求参数
|
|
44
|
+
* @returns Promise,解析为标准响应格式
|
|
45
|
+
*/
|
|
46
|
+
querySubjectsByGroupAndRelated(request: Service.Request.querySubjectsByGroupAndRelated): Promise<StandardResponse<Service.Response.querySubjectsByGroupAndRelated>>;
|
|
47
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PandoraStoreSelectionService = void 0;
|
|
7
|
+
const BaseService_1 = __importDefault(require("../../BaseService"));
|
|
8
|
+
/**
|
|
9
|
+
* PandoraStoreSelectionService - Pandora 圈选门店服务模块
|
|
10
|
+
* 提供商品圈门店 / 直播间圈门店相关的 API 方法
|
|
11
|
+
* 平台: pandora
|
|
12
|
+
*/
|
|
13
|
+
class PandoraStoreSelectionService extends BaseService_1.default {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.prefixUrl = '/pandora/store-selection';
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 创建标签分组(业务关系类型)
|
|
20
|
+
* @param request - 请求参数
|
|
21
|
+
* @returns Promise,解析为标准响应格式
|
|
22
|
+
*/
|
|
23
|
+
createTagGroup(request) {
|
|
24
|
+
return this.request(this.createTagGroup, request);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* 创建标签
|
|
28
|
+
* @param request - 请求参数
|
|
29
|
+
* @returns Promise,解析为标准响应格式
|
|
30
|
+
*/
|
|
31
|
+
createTag(request) {
|
|
32
|
+
return this.request(this.createTag, request);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* 批量创建业务关系(圈选门店)
|
|
36
|
+
* @param request - 请求参数
|
|
37
|
+
* @returns Promise,解析为标准响应格式
|
|
38
|
+
*/
|
|
39
|
+
batchCreateBizRelation(request) {
|
|
40
|
+
return this.request(this.batchCreateBizRelation, request);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* 批量删除业务关系(取消圈选门店)
|
|
44
|
+
* @param request - 请求参数
|
|
45
|
+
* @returns Promise,解析为标准响应格式
|
|
46
|
+
*/
|
|
47
|
+
batchDeleteBizRelation(request) {
|
|
48
|
+
return this.request(this.batchDeleteBizRelation, request);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* 根据标签分组和关联主体查询关联对象(查询商品/直播间圈选的门店)
|
|
52
|
+
* @param request - 请求参数
|
|
53
|
+
* @returns Promise,解析为标准响应格式
|
|
54
|
+
*/
|
|
55
|
+
queryRelatedByGroupAndSubject(request) {
|
|
56
|
+
return this.request(this.queryRelatedByGroupAndSubject, request);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* 根据标签分组和关联对象查询关联主体(查询门店关联的商品/直播间)
|
|
60
|
+
* @param request - 请求参数
|
|
61
|
+
* @returns Promise,解析为标准响应格式
|
|
62
|
+
*/
|
|
63
|
+
querySubjectsByGroupAndRelated(request) {
|
|
64
|
+
return this.request(this.querySubjectsByGroupAndRelated, request);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.PandoraStoreSelectionService = PandoraStoreSelectionService;
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Store Selection Service 的类型定义
|
|
3
|
+
* 用于商品圈门店 / 直播间圈门店
|
|
4
|
+
*/
|
|
5
|
+
export declare namespace Service {
|
|
6
|
+
/**
|
|
7
|
+
* 实体定义
|
|
8
|
+
*/
|
|
9
|
+
namespace Entity {
|
|
10
|
+
/**
|
|
11
|
+
* 可见范围
|
|
12
|
+
*/
|
|
13
|
+
enum VisibleScope {
|
|
14
|
+
/** 全站可见 */
|
|
15
|
+
ALL = "ALL",
|
|
16
|
+
/** 仅后台 */
|
|
17
|
+
ADMIN_ONLY = "ADMIN_ONLY",
|
|
18
|
+
/** 仅前台 */
|
|
19
|
+
FRONTEND_ONLY = "FRONTEND_ONLY"
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 业务关系
|
|
23
|
+
*/
|
|
24
|
+
interface BizRelation {
|
|
25
|
+
/** 主键ID */
|
|
26
|
+
id: string;
|
|
27
|
+
/** 创建时间 */
|
|
28
|
+
createdAt: number;
|
|
29
|
+
/** 更新时间 */
|
|
30
|
+
updatedAt: number;
|
|
31
|
+
/** 标签ID */
|
|
32
|
+
tagId: string;
|
|
33
|
+
/** 关联主体类型 */
|
|
34
|
+
subjectType: string;
|
|
35
|
+
/** 关联主体ID */
|
|
36
|
+
subjectId: string;
|
|
37
|
+
/** 关联对象类型 */
|
|
38
|
+
relatedType?: string;
|
|
39
|
+
/** 关联对象ID */
|
|
40
|
+
relatedId?: string;
|
|
41
|
+
/** 备注 */
|
|
42
|
+
remark?: string;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* 请求参数定义
|
|
47
|
+
*/
|
|
48
|
+
namespace Request {
|
|
49
|
+
/**
|
|
50
|
+
* 创建标签分组(业务关系类型)
|
|
51
|
+
*/
|
|
52
|
+
interface createTagGroup {
|
|
53
|
+
/** 分组名称 */
|
|
54
|
+
name: string;
|
|
55
|
+
/** 状态 */
|
|
56
|
+
status?: number;
|
|
57
|
+
/** 可见范围 */
|
|
58
|
+
visibleScope?: Entity.VisibleScope;
|
|
59
|
+
/** 是否互斥 */
|
|
60
|
+
isExclusive?: boolean;
|
|
61
|
+
/** 备注 */
|
|
62
|
+
remark?: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* 创建标签
|
|
66
|
+
*/
|
|
67
|
+
interface createTag {
|
|
68
|
+
/** 标签名称 */
|
|
69
|
+
name: string;
|
|
70
|
+
/** 标签分组ID */
|
|
71
|
+
groupId: string;
|
|
72
|
+
/** 状态 */
|
|
73
|
+
status?: number;
|
|
74
|
+
/** 备注 */
|
|
75
|
+
remark?: string;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* 批量创建业务关系(圈选门店)
|
|
79
|
+
*/
|
|
80
|
+
interface batchCreateBizRelation {
|
|
81
|
+
/** 标签ID */
|
|
82
|
+
tagId: string;
|
|
83
|
+
/** 关联主体类型(如:PRODUCT-商品,LIVE_ROOM-直播间) */
|
|
84
|
+
subjectType: string;
|
|
85
|
+
/** 关联主体ID(商品ID或直播间ID) */
|
|
86
|
+
subjectId: string;
|
|
87
|
+
/** 关联对象类型(STORE-门店) */
|
|
88
|
+
relatedType: string;
|
|
89
|
+
/** 关联对象ID列表(门店ID列表) */
|
|
90
|
+
relatedIds: string[];
|
|
91
|
+
/** 备注 */
|
|
92
|
+
remark?: string;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* 批量删除业务关系(取消圈选门店)
|
|
96
|
+
*/
|
|
97
|
+
interface batchDeleteBizRelation {
|
|
98
|
+
/** 标签ID */
|
|
99
|
+
tagId: string;
|
|
100
|
+
/** 关联主体类型 */
|
|
101
|
+
subjectType: string;
|
|
102
|
+
/** 关联主体ID */
|
|
103
|
+
subjectId: string;
|
|
104
|
+
/** 关联对象类型 */
|
|
105
|
+
relatedType: string;
|
|
106
|
+
/** 关联对象ID列表 */
|
|
107
|
+
relatedIds: string[];
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* 更新业务关系(更新圈选的门店)
|
|
111
|
+
*/
|
|
112
|
+
interface updateBizRelation {
|
|
113
|
+
/** 标签ID */
|
|
114
|
+
tagId: string;
|
|
115
|
+
/** 关联对象类型 */
|
|
116
|
+
relatedType: string;
|
|
117
|
+
/** 关联对象ID列表 */
|
|
118
|
+
relatedIds: string[];
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* 根据标签分组和关联主体查询关联对象(查询商品/直播间圈选的门店)
|
|
122
|
+
*/
|
|
123
|
+
interface queryRelatedByGroupAndSubject {
|
|
124
|
+
/** 标签分组ID */
|
|
125
|
+
groupId: string;
|
|
126
|
+
/** 关联主体类型(PRODUCT/LIVE_ROOM) */
|
|
127
|
+
subjectType: string;
|
|
128
|
+
/** 关联主体ID(商品ID/直播间ID) */
|
|
129
|
+
subjectId: string;
|
|
130
|
+
/** 关联对象类型(STORE) */
|
|
131
|
+
relatedType?: string;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* 根据标签分组和关联对象查询关联主体(查询门店关联的商品/直播间)
|
|
135
|
+
*/
|
|
136
|
+
interface querySubjectsByGroupAndRelated {
|
|
137
|
+
/** 标签分组ID */
|
|
138
|
+
groupId: string;
|
|
139
|
+
/** 关联对象类型(STORE) */
|
|
140
|
+
relatedType: string;
|
|
141
|
+
/** 关联对象ID(门店ID) */
|
|
142
|
+
relatedId: string;
|
|
143
|
+
/** 关联主体类型(PRODUCT/LIVE_ROOM) */
|
|
144
|
+
subjectType?: string;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* 响应数据定义
|
|
149
|
+
*/
|
|
150
|
+
namespace Response {
|
|
151
|
+
/**
|
|
152
|
+
* 创建标签分组响应
|
|
153
|
+
*/
|
|
154
|
+
interface createTagGroup {
|
|
155
|
+
/** 标签分组ID */
|
|
156
|
+
groupId: string;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* 创建标签响应
|
|
160
|
+
*/
|
|
161
|
+
interface createTag {
|
|
162
|
+
/** 标签ID */
|
|
163
|
+
tagId: string;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* 批量创建业务关系响应
|
|
167
|
+
*/
|
|
168
|
+
interface batchCreateBizRelation {
|
|
169
|
+
/** 成功创建的数量 */
|
|
170
|
+
successCount: number;
|
|
171
|
+
/** 创建的业务关系ID列表 */
|
|
172
|
+
relationIds: string[];
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* 批量删除业务关系响应
|
|
176
|
+
*/
|
|
177
|
+
interface batchDeleteBizRelation {
|
|
178
|
+
/** 成功删除的数量 */
|
|
179
|
+
successCount: number;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* 根据标签分组和关联主体查询关联对象响应
|
|
183
|
+
*/
|
|
184
|
+
interface queryRelatedByGroupAndSubject {
|
|
185
|
+
/** 关联对象列表(圈选的门店列表) */
|
|
186
|
+
relatedObjects: Array<{
|
|
187
|
+
/** 关系ID */
|
|
188
|
+
relationId: string;
|
|
189
|
+
/** 标签ID */
|
|
190
|
+
tagId: string;
|
|
191
|
+
/** 标签名称 */
|
|
192
|
+
tagName: string;
|
|
193
|
+
/** 关联对象类型 */
|
|
194
|
+
relatedType: string;
|
|
195
|
+
/** 关联对象ID(门店ID) */
|
|
196
|
+
relatedId: string;
|
|
197
|
+
/** 备注 */
|
|
198
|
+
remark?: string;
|
|
199
|
+
/** 创建时间 */
|
|
200
|
+
createdAt: number;
|
|
201
|
+
}>;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* 根据标签分组和关联对象查询关联主体响应
|
|
205
|
+
*/
|
|
206
|
+
interface querySubjectsByGroupAndRelated {
|
|
207
|
+
/** 关联主体列表(关联的商品/直播间列表) */
|
|
208
|
+
subjects: Array<{
|
|
209
|
+
/** 关系ID */
|
|
210
|
+
relationId: string;
|
|
211
|
+
/** 标签ID */
|
|
212
|
+
tagId: string;
|
|
213
|
+
/** 标签名称 */
|
|
214
|
+
tagName: string;
|
|
215
|
+
/** 关联主体类型 */
|
|
216
|
+
subjectType: string;
|
|
217
|
+
/** 关联主体ID(商品ID/直播间ID) */
|
|
218
|
+
subjectId: string;
|
|
219
|
+
/** 备注 */
|
|
220
|
+
remark?: string;
|
|
221
|
+
/** 创建时间 */
|
|
222
|
+
createdAt: number;
|
|
223
|
+
}>;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Store Selection Controller 接口定义
|
|
228
|
+
* 用于后端 Server 实现
|
|
229
|
+
*/
|
|
230
|
+
interface StoreSelectionController {
|
|
231
|
+
/**
|
|
232
|
+
* 创建标签分组(业务关系类型)
|
|
233
|
+
* @param request 请求参数
|
|
234
|
+
* @param req 请求上下文
|
|
235
|
+
* @returns 响应数据
|
|
236
|
+
*/
|
|
237
|
+
createTagGroup(request: Service.Request.createTagGroup, req: any): Promise<Service.Response.createTagGroup>;
|
|
238
|
+
/**
|
|
239
|
+
* 创建标签
|
|
240
|
+
* @param request 请求参数
|
|
241
|
+
* @param req 请求上下文
|
|
242
|
+
* @returns 响应数据
|
|
243
|
+
*/
|
|
244
|
+
createTag(request: Service.Request.createTag, req: any): Promise<Service.Response.createTag>;
|
|
245
|
+
/**
|
|
246
|
+
* 批量创建业务关系(圈选门店)
|
|
247
|
+
* @param request 请求参数
|
|
248
|
+
* @param req 请求上下文
|
|
249
|
+
* @returns 响应数据
|
|
250
|
+
*/
|
|
251
|
+
batchCreateBizRelation(request: Service.Request.batchCreateBizRelation, req: any): Promise<Service.Response.batchCreateBizRelation>;
|
|
252
|
+
/**
|
|
253
|
+
* 批量删除业务关系(取消圈选门店)
|
|
254
|
+
* @param request 请求参数
|
|
255
|
+
* @param req 请求上下文
|
|
256
|
+
* @returns 响应数据
|
|
257
|
+
*/
|
|
258
|
+
batchDeleteBizRelation(request: Service.Request.batchDeleteBizRelation, req: any): Promise<Service.Response.batchDeleteBizRelation>;
|
|
259
|
+
/**
|
|
260
|
+
* 根据标签分组和关联主体查询关联对象(查询商品/直播间圈选的门店)
|
|
261
|
+
* @param request 请求参数
|
|
262
|
+
* @param req 请求上下文
|
|
263
|
+
* @returns 响应数据
|
|
264
|
+
*/
|
|
265
|
+
queryRelatedByGroupAndSubject(request: Service.Request.queryRelatedByGroupAndSubject, req: any): Promise<Service.Response.queryRelatedByGroupAndSubject>;
|
|
266
|
+
/**
|
|
267
|
+
* 根据标签分组和关联对象查询关联主体(查询门店关联的商品/直播间)
|
|
268
|
+
* @param request 请求参数
|
|
269
|
+
* @param req 请求上下文
|
|
270
|
+
* @returns 响应数据
|
|
271
|
+
*/
|
|
272
|
+
querySubjectsByGroupAndRelated(request: Service.Request.querySubjectsByGroupAndRelated, req: any): Promise<Service.Response.querySubjectsByGroupAndRelated>;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Service = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Store Selection Service 的类型定义
|
|
6
|
+
* 用于商品圈门店 / 直播间圈门店
|
|
7
|
+
*/
|
|
8
|
+
var Service;
|
|
9
|
+
(function (Service) {
|
|
10
|
+
/**
|
|
11
|
+
* 实体定义
|
|
12
|
+
*/
|
|
13
|
+
let Entity;
|
|
14
|
+
(function (Entity) {
|
|
15
|
+
/**
|
|
16
|
+
* 可见范围
|
|
17
|
+
*/
|
|
18
|
+
let VisibleScope;
|
|
19
|
+
(function (VisibleScope) {
|
|
20
|
+
/** 全站可见 */
|
|
21
|
+
VisibleScope["ALL"] = "ALL";
|
|
22
|
+
/** 仅后台 */
|
|
23
|
+
VisibleScope["ADMIN_ONLY"] = "ADMIN_ONLY";
|
|
24
|
+
/** 仅前台 */
|
|
25
|
+
VisibleScope["FRONTEND_ONLY"] = "FRONTEND_ONLY";
|
|
26
|
+
})(VisibleScope = Entity.VisibleScope || (Entity.VisibleScope = {}));
|
|
27
|
+
})(Entity = Service.Entity || (Service.Entity = {}));
|
|
28
|
+
})(Service || (exports.Service = Service = {}));
|
package/cjs/index.d.ts
CHANGED
|
@@ -1,32 +1,13 @@
|
|
|
1
1
|
import { PandoraExampleService } from './bff/modules/pandora/example/service';
|
|
2
|
+
import { PandoraStoreService } from './bff/modules/pandora/store/service';
|
|
3
|
+
import { PandoraStoreSelectionService } from './bff/modules/pandora/storeSelection/service';
|
|
2
4
|
import { MiniProgramDemoService } from './bff/modules/miniprogram/demo/service';
|
|
3
5
|
import type { SdkOptions } from './types';
|
|
4
6
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @deprecated 建议使用平台专用的 SDK:MiniProgramSDK, PandoraSDK
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```typescript
|
|
12
|
-
* // 小程序环境
|
|
13
|
-
* const sdk = new EcommerceBackendBffSDK({
|
|
14
|
-
* getToken: async () => wx.getStorageSync('token') || '',
|
|
15
|
-
* getUserId: async () => wx.getStorageSync('userId') || '',
|
|
16
|
-
* getRoleId: async () => wx.getStorageSync('roleId') || '',
|
|
17
|
-
* environment: 'production'
|
|
18
|
-
* })
|
|
19
|
-
*
|
|
20
|
-
* // Pandora 环境
|
|
21
|
-
* const sdk = new EcommerceBackendBffSDK({
|
|
22
|
-
* getToken: async () => localStorage.getItem('token') || '',
|
|
23
|
-
* getUserId: async () => localStorage.getItem('userId') || '',
|
|
24
|
-
* getRoleId: async () => localStorage.getItem('roleId') || '',
|
|
25
|
-
* environment: 'production'
|
|
26
|
-
* })
|
|
27
|
-
* ```
|
|
7
|
+
* Pandora 平台 SDK(管理后台)
|
|
8
|
+
* 包含所有 Pandora 平台相关的服务
|
|
28
9
|
*/
|
|
29
|
-
export declare class
|
|
10
|
+
export declare class PandoraSDK {
|
|
30
11
|
/**
|
|
31
12
|
* HttpClient 实例,管理平台特定的请求策略
|
|
32
13
|
*/
|
|
@@ -35,12 +16,35 @@ export declare class EcommerceBackendBffSDK {
|
|
|
35
16
|
* Pandora 示例服务模块
|
|
36
17
|
*/
|
|
37
18
|
example: PandoraExampleService;
|
|
19
|
+
/**
|
|
20
|
+
* Pandora 门店服务模块
|
|
21
|
+
*/
|
|
22
|
+
store: PandoraStoreService;
|
|
23
|
+
/**
|
|
24
|
+
* Pandora 圈选门店服务模块
|
|
25
|
+
*/
|
|
26
|
+
storeSelection: PandoraStoreSelectionService;
|
|
27
|
+
/**
|
|
28
|
+
* 使用配置选项初始化 Pandora SDK
|
|
29
|
+
* @param options - SDK 配置,包含凭证回调函数
|
|
30
|
+
*/
|
|
31
|
+
constructor(options: SdkOptions);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* 小程序平台 SDK
|
|
35
|
+
* 包含所有小程序平台相关的服务
|
|
36
|
+
*/
|
|
37
|
+
export declare class MiniProgramSDK {
|
|
38
|
+
/**
|
|
39
|
+
* HttpClient 实例,管理平台特定的请求策略
|
|
40
|
+
*/
|
|
41
|
+
private http;
|
|
38
42
|
/**
|
|
39
43
|
* 小程序 Demo 服务模块
|
|
40
44
|
*/
|
|
41
45
|
demo: MiniProgramDemoService;
|
|
42
46
|
/**
|
|
43
|
-
*
|
|
47
|
+
* 使用配置选项初始化小程序 SDK
|
|
44
48
|
* @param options - SDK 配置,包含凭证回调函数
|
|
45
49
|
*/
|
|
46
50
|
constructor(options: SdkOptions);
|
|
@@ -49,5 +53,9 @@ export { SdkError, BizError, SystemError } from './errors';
|
|
|
49
53
|
export type { SdkOptions, IRequestStrategy, StandardResponse } from './types';
|
|
50
54
|
export { MiniProgramDemoService } from './bff/modules/miniprogram/demo/service';
|
|
51
55
|
export { PandoraExampleService } from './bff/modules/pandora/example/service';
|
|
56
|
+
export { PandoraStoreService } from './bff/modules/pandora/store/service';
|
|
57
|
+
export { PandoraStoreSelectionService } from './bff/modules/pandora/storeSelection/service';
|
|
52
58
|
export type { Service as MiniProgramDemoTypes } from './bff/modules/miniprogram/demo/types';
|
|
53
59
|
export type { Service as PandoraExampleTypes } from './bff/modules/pandora/example/types';
|
|
60
|
+
export type { Service as PandoraStoreTypes } from './bff/modules/pandora/store/types';
|
|
61
|
+
export type { Service as PandoraStoreSelectionTypes } from './bff/modules/pandora/storeSelection/types';
|
package/cjs/index.js
CHANGED
|
@@ -1,48 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PandoraExampleService = exports.MiniProgramDemoService = exports.SystemError = exports.BizError = exports.SdkError = exports.
|
|
3
|
+
exports.PandoraStoreSelectionService = exports.PandoraStoreService = exports.PandoraExampleService = exports.MiniProgramDemoService = exports.SystemError = exports.BizError = exports.SdkError = exports.MiniProgramSDK = exports.PandoraSDK = void 0;
|
|
4
4
|
const client_1 = require("./bff/request/client");
|
|
5
5
|
const service_1 = require("./bff/modules/pandora/example/service");
|
|
6
|
-
const service_2 = require("./bff/modules/
|
|
6
|
+
const service_2 = require("./bff/modules/pandora/store/service");
|
|
7
|
+
const service_3 = require("./bff/modules/pandora/storeSelection/service");
|
|
8
|
+
const service_4 = require("./bff/modules/miniprogram/demo/service");
|
|
7
9
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* @deprecated 建议使用平台专用的 SDK:MiniProgramSDK, PandoraSDK
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```typescript
|
|
15
|
-
* // 小程序环境
|
|
16
|
-
* const sdk = new EcommerceBackendBffSDK({
|
|
17
|
-
* getToken: async () => wx.getStorageSync('token') || '',
|
|
18
|
-
* getUserId: async () => wx.getStorageSync('userId') || '',
|
|
19
|
-
* getRoleId: async () => wx.getStorageSync('roleId') || '',
|
|
20
|
-
* environment: 'production'
|
|
21
|
-
* })
|
|
22
|
-
*
|
|
23
|
-
* // Pandora 环境
|
|
24
|
-
* const sdk = new EcommerceBackendBffSDK({
|
|
25
|
-
* getToken: async () => localStorage.getItem('token') || '',
|
|
26
|
-
* getUserId: async () => localStorage.getItem('userId') || '',
|
|
27
|
-
* getRoleId: async () => localStorage.getItem('roleId') || '',
|
|
28
|
-
* environment: 'production'
|
|
29
|
-
* })
|
|
30
|
-
* ```
|
|
10
|
+
* Pandora 平台 SDK(管理后台)
|
|
11
|
+
* 包含所有 Pandora 平台相关的服务
|
|
31
12
|
*/
|
|
32
|
-
class
|
|
13
|
+
class PandoraSDK {
|
|
33
14
|
/**
|
|
34
|
-
* 使用配置选项初始化 SDK
|
|
15
|
+
* 使用配置选项初始化 Pandora SDK
|
|
35
16
|
* @param options - SDK 配置,包含凭证回调函数
|
|
36
17
|
*/
|
|
37
18
|
constructor(options) {
|
|
38
19
|
// 使用提供的选项初始化 HttpClient
|
|
39
20
|
this.http = new client_1.HttpClient(options);
|
|
40
|
-
// 使用 HttpClient
|
|
21
|
+
// 使用 HttpClient 实例化所有 Pandora 服务模块
|
|
41
22
|
this.example = new service_1.PandoraExampleService(this.http);
|
|
42
|
-
this.
|
|
23
|
+
this.store = new service_2.PandoraStoreService(this.http);
|
|
24
|
+
this.storeSelection = new service_3.PandoraStoreSelectionService(this.http);
|
|
43
25
|
}
|
|
44
26
|
}
|
|
45
|
-
exports.
|
|
27
|
+
exports.PandoraSDK = PandoraSDK;
|
|
28
|
+
/**
|
|
29
|
+
* 小程序平台 SDK
|
|
30
|
+
* 包含所有小程序平台相关的服务
|
|
31
|
+
*/
|
|
32
|
+
class MiniProgramSDK {
|
|
33
|
+
/**
|
|
34
|
+
* 使用配置选项初始化小程序 SDK
|
|
35
|
+
* @param options - SDK 配置,包含凭证回调函数
|
|
36
|
+
*/
|
|
37
|
+
constructor(options) {
|
|
38
|
+
// 使用提供的选项初始化 HttpClient
|
|
39
|
+
this.http = new client_1.HttpClient(options);
|
|
40
|
+
// 使用 HttpClient 实例化所有小程序服务模块
|
|
41
|
+
this.demo = new service_4.MiniProgramDemoService(this.http);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.MiniProgramSDK = MiniProgramSDK;
|
|
46
45
|
// ==================== 导出 ====================
|
|
47
46
|
// 错误类
|
|
48
47
|
var errors_1 = require("./errors");
|
|
@@ -50,7 +49,11 @@ Object.defineProperty(exports, "SdkError", { enumerable: true, get: function ()
|
|
|
50
49
|
Object.defineProperty(exports, "BizError", { enumerable: true, get: function () { return errors_1.BizError; } });
|
|
51
50
|
Object.defineProperty(exports, "SystemError", { enumerable: true, get: function () { return errors_1.SystemError; } });
|
|
52
51
|
// 服务类(按平台分组)
|
|
53
|
-
var
|
|
54
|
-
Object.defineProperty(exports, "MiniProgramDemoService", { enumerable: true, get: function () { return
|
|
55
|
-
var
|
|
56
|
-
Object.defineProperty(exports, "PandoraExampleService", { enumerable: true, get: function () { return
|
|
52
|
+
var service_5 = require("./bff/modules/miniprogram/demo/service");
|
|
53
|
+
Object.defineProperty(exports, "MiniProgramDemoService", { enumerable: true, get: function () { return service_5.MiniProgramDemoService; } });
|
|
54
|
+
var service_6 = require("./bff/modules/pandora/example/service");
|
|
55
|
+
Object.defineProperty(exports, "PandoraExampleService", { enumerable: true, get: function () { return service_6.PandoraExampleService; } });
|
|
56
|
+
var service_7 = require("./bff/modules/pandora/store/service");
|
|
57
|
+
Object.defineProperty(exports, "PandoraStoreService", { enumerable: true, get: function () { return service_7.PandoraStoreService; } });
|
|
58
|
+
var service_8 = require("./bff/modules/pandora/storeSelection/service");
|
|
59
|
+
Object.defineProperty(exports, "PandoraStoreSelectionService", { enumerable: true, get: function () { return service_8.PandoraStoreSelectionService; } });
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Service } from './types';
|
|
2
|
+
import BaseService from '../../BaseService';
|
|
3
|
+
import type { StandardResponse } from '../../../../types';
|
|
4
|
+
/**
|
|
5
|
+
* PandoraStoreService - Pandora Store 服务模块
|
|
6
|
+
* 提供门店管理相关的 API 方法
|
|
7
|
+
* 平台: pandora
|
|
8
|
+
*/
|
|
9
|
+
export declare class PandoraStoreService extends BaseService {
|
|
10
|
+
protected prefixUrl: string;
|
|
11
|
+
/**
|
|
12
|
+
* 创建门店
|
|
13
|
+
* @param request - 请求参数
|
|
14
|
+
* @returns Promise,解析为标准响应格式
|
|
15
|
+
*/
|
|
16
|
+
createStore(request: Service.Request.createStore): Promise<StandardResponse<Service.Response.createStore>>;
|
|
17
|
+
/**
|
|
18
|
+
* 编辑门店信息
|
|
19
|
+
* @param request - 请求参数
|
|
20
|
+
* @returns Promise,解析为标准响应格式
|
|
21
|
+
*/
|
|
22
|
+
updateStoreInfo(request: Service.Request.updateStoreInfo): Promise<StandardResponse<Service.Response.updateStoreInfo>>;
|
|
23
|
+
/**
|
|
24
|
+
* 获取门店详情
|
|
25
|
+
* @param request - 请求参数
|
|
26
|
+
* @returns Promise,解析为标准响应格式
|
|
27
|
+
*/
|
|
28
|
+
getStoreDetail(request: Service.Request.getStoreDetail): Promise<StandardResponse<Service.Response.getStoreDetail>>;
|
|
29
|
+
/**
|
|
30
|
+
* 获取门店列表
|
|
31
|
+
* @param request - 请求参数
|
|
32
|
+
* @returns Promise,解析为标准响应格式
|
|
33
|
+
*/
|
|
34
|
+
getStoreList(request: Service.Request.getStoreList): Promise<StandardResponse<Service.Response.getStoreList>>;
|
|
35
|
+
/**
|
|
36
|
+
* 批量修改门店经营状态
|
|
37
|
+
* @param request - 请求参数
|
|
38
|
+
* @returns Promise,解析为标准响应格式
|
|
39
|
+
*/
|
|
40
|
+
batchUpdateBusinessStatus(request: Service.Request.batchUpdateBusinessStatus): Promise<StandardResponse<Service.Response.batchUpdateBusinessStatus>>;
|
|
41
|
+
/**
|
|
42
|
+
* 绑定用户到门店
|
|
43
|
+
* @param request - 请求参数
|
|
44
|
+
* @returns Promise,解析为标准响应格式
|
|
45
|
+
*/
|
|
46
|
+
bindUserToStore(request: Service.Request.bindUserToStore): Promise<StandardResponse<Service.Response.bindUserToStore>>;
|
|
47
|
+
/**
|
|
48
|
+
* 解绑用户
|
|
49
|
+
* @param request - 请求参数
|
|
50
|
+
* @returns Promise,解析为标准响应格式
|
|
51
|
+
*/
|
|
52
|
+
unbindUserFromStore(request: Service.Request.unbindUserFromStore): Promise<StandardResponse<Service.Response.unbindUserFromStore>>;
|
|
53
|
+
}
|