@be-link/ecommerce-backend-bff-service-node-sdk 0.0.23 → 0.0.25

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.
@@ -0,0 +1,60 @@
1
+ import BaseService from '../../BaseService.mjs';
2
+ /**
3
+ * PandoraStoreSelectionService - Pandora 圈选门店服务模块
4
+ * 提供商品圈门店 / 直播间圈门店相关的 API 方法
5
+ * 平台: pandora
6
+ */
7
+ export class PandoraStoreSelectionService extends BaseService {
8
+ constructor() {
9
+ super(...arguments);
10
+ this.prefixUrl = '/pandora/store-selection';
11
+ }
12
+ /**
13
+ * 创建标签分组(业务关系类型)
14
+ * @param request - 请求参数
15
+ * @returns Promise,解析为标准响应格式
16
+ */
17
+ createTagGroup(request) {
18
+ return this.request(this.createTagGroup, request);
19
+ }
20
+ /**
21
+ * 创建标签
22
+ * @param request - 请求参数
23
+ * @returns Promise,解析为标准响应格式
24
+ */
25
+ createTag(request) {
26
+ return this.request(this.createTag, request);
27
+ }
28
+ /**
29
+ * 批量创建业务关系(圈选门店)
30
+ * @param request - 请求参数
31
+ * @returns Promise,解析为标准响应格式
32
+ */
33
+ batchCreateBizRelation(request) {
34
+ return this.request(this.batchCreateBizRelation, request);
35
+ }
36
+ /**
37
+ * 批量删除业务关系(取消圈选门店)
38
+ * @param request - 请求参数
39
+ * @returns Promise,解析为标准响应格式
40
+ */
41
+ batchDeleteBizRelation(request) {
42
+ return this.request(this.batchDeleteBizRelation, request);
43
+ }
44
+ /**
45
+ * 根据标签分组和关联主体查询关联对象(查询商品/直播间圈选的门店)
46
+ * @param request - 请求参数
47
+ * @returns Promise,解析为标准响应格式
48
+ */
49
+ queryRelatedByGroupAndSubject(request) {
50
+ return this.request(this.queryRelatedByGroupAndSubject, request);
51
+ }
52
+ /**
53
+ * 根据标签分组和关联对象查询关联主体(查询门店关联的商品/直播间)
54
+ * @param request - 请求参数
55
+ * @returns Promise,解析为标准响应格式
56
+ */
57
+ querySubjectsByGroupAndRelated(request) {
58
+ return this.request(this.querySubjectsByGroupAndRelated, request);
59
+ }
60
+ }
@@ -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,25 @@
1
+ /**
2
+ * Store Selection Service 的类型定义
3
+ * 用于商品圈门店 / 直播间圈门店
4
+ */
5
+ export var Service;
6
+ (function (Service) {
7
+ /**
8
+ * 实体定义
9
+ */
10
+ let Entity;
11
+ (function (Entity) {
12
+ /**
13
+ * 可见范围
14
+ */
15
+ let VisibleScope;
16
+ (function (VisibleScope) {
17
+ /** 全站可见 */
18
+ VisibleScope["ALL"] = "ALL";
19
+ /** 仅后台 */
20
+ VisibleScope["ADMIN_ONLY"] = "ADMIN_ONLY";
21
+ /** 仅前台 */
22
+ VisibleScope["FRONTEND_ONLY"] = "FRONTEND_ONLY";
23
+ })(VisibleScope = Entity.VisibleScope || (Entity.VisibleScope = {}));
24
+ })(Entity = Service.Entity || (Service.Entity = {}));
25
+ })(Service || (Service = {}));
package/esm/index.d.ts CHANGED
@@ -1,4 +1,6 @@
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 { PandoraProductService } from './bff/modules/pandora/product/service';
4
6
  import { PandoraProductExpService } from './bff/modules/pandora/productExp/service';
@@ -20,6 +22,14 @@ export declare class PandoraSDK {
20
22
  product: PandoraProductService;
21
23
  productExp: PandoraProductExpService;
22
24
  productLive: PandoraProductLiveService;
25
+ /**
26
+ * Pandora 门店服务模块
27
+ */
28
+ store: PandoraStoreService;
29
+ /**
30
+ * Pandora 圈选门店服务模块
31
+ */
32
+ storeSelection: PandoraStoreSelectionService;
23
33
  /**
24
34
  * 使用配置选项初始化 Pandora SDK
25
35
  * @param options - SDK 配置,包含凭证回调函数
@@ -50,6 +60,8 @@ export { SdkOptions, IRequestStrategy, StandardResponse } from './types';
50
60
  export * from './enums';
51
61
  export { Service as MiniProgramDemoTypes } from './bff/modules/miniprogram/demo/types';
52
62
  export { Service as PandoraExampleTypes } from './bff/modules/pandora/example/types';
63
+ export { Service as PandoraStoreTypes } from './bff/modules/pandora/store/types';
64
+ export { Service as PandoraStoreSelectionTypes } from './bff/modules/pandora/storeSelection/types';
53
65
  export { PandoraProductService as PandoraProductServiceTypes } from './bff/modules/pandora/product/types';
54
66
  export { PandoraProductExpService as PandoraProductExpServiceTypes } from './bff/modules/pandora/productExp/types';
55
67
  export { PandoraProductLiveService as PandoraProductLiveServiceTypes } from './bff/modules/pandora/productLive/types';
package/esm/index.mjs CHANGED
@@ -1,5 +1,7 @@
1
1
  import { HttpClient } from './bff/request/client.mjs';
2
2
  import { PandoraExampleService } from './bff/modules/pandora/example/service.mjs';
3
+ import { PandoraStoreService } from './bff/modules/pandora/store/service.mjs';
4
+ import { PandoraStoreSelectionService } from './bff/modules/pandora/storeSelection/service.mjs';
3
5
  import { MiniProgramDemoService } from './bff/modules/miniprogram/demo/service.mjs';
4
6
  import { PandoraProductService } from './bff/modules/pandora/product/service.mjs';
5
7
  import { PandoraProductExpService } from './bff/modules/pandora/productExp/service.mjs';
@@ -18,6 +20,8 @@ export class PandoraSDK {
18
20
  this.http = new HttpClient(options);
19
21
  // 使用 HttpClient 实例化所有 Pandora 服务模块
20
22
  this.example = new PandoraExampleService(this.http);
23
+ this.store = new PandoraStoreService(this.http);
24
+ this.storeSelection = new PandoraStoreSelectionService(this.http);
21
25
  this.product = new PandoraProductService(this.http);
22
26
  this.productExp = new PandoraProductExpService(this.http);
23
27
  this.productLive = new PandoraProductLiveService(this.http);
@@ -44,3 +48,5 @@ export class MiniProgramSDK {
44
48
  export { SdkError, BizError, SystemError } from './errors/index.mjs';
45
49
  // 枚举和常量
46
50
  export * from './enums.mjs';
51
+ export { Service as PandoraStoreTypes } from './bff/modules/pandora/store/types.mjs';
52
+ export { Service as PandoraStoreSelectionTypes } from './bff/modules/pandora/storeSelection/types.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/ecommerce-backend-bff-service-node-sdk",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "description": "EcommerceBackendBffService Node.js SDK",
5
5
  "type": "commonjs",
6
6
  "main": "./cjs/index.js",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "axios": "1.13.2",
28
- "@be-link/ecommerce-product-service-node-sdk": "^0.0.2"
28
+ "@be-link/ecommerce-product-service-node-sdk": "^0.0.4"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^20.0.0",