@be-link/ecommerce-backend-bff-service-node-sdk 0.0.94 → 0.0.95

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 (41) 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/auth/types.js +2 -0
  5. package/cjs/bff/modules/miniprogram/franchisee/service.d.ts +12 -0
  6. package/cjs/bff/modules/miniprogram/franchisee/service.js +22 -0
  7. package/cjs/bff/modules/miniprogram/franchisee/types.d.ts +25 -0
  8. package/cjs/bff/modules/miniprogram/franchisee/types.js +2 -0
  9. package/cjs/bff/modules/pandora/auth/service.d.ts +6 -0
  10. package/cjs/bff/modules/pandora/auth/service.js +8 -0
  11. package/cjs/bff/modules/pandora/auth/types.d.ts +30 -0
  12. package/cjs/bff/modules/pandora/franchisee/service.d.ts +19 -0
  13. package/cjs/bff/modules/pandora/franchisee/service.js +43 -0
  14. package/cjs/bff/modules/pandora/franchisee/types.d.ts +204 -0
  15. package/cjs/bff/modules/pandora/franchisee/types.js +2 -0
  16. package/cjs/bff/modules/pandora/user/service.d.ts +0 -1
  17. package/cjs/bff/modules/pandora/user/service.js +0 -3
  18. package/cjs/bff/modules/pandora/user/types.d.ts +0 -27
  19. package/cjs/index.d.ts +18 -0
  20. package/cjs/index.js +42 -36
  21. package/esm/bff/modules/miniprogram/auth/service.d.ts +46 -0
  22. package/esm/bff/modules/miniprogram/auth/service.mjs +59 -0
  23. package/esm/bff/modules/miniprogram/auth/types.d.ts +133 -0
  24. package/esm/bff/modules/miniprogram/auth/types.mjs +1 -0
  25. package/esm/bff/modules/miniprogram/franchisee/service.d.ts +12 -0
  26. package/esm/bff/modules/miniprogram/franchisee/service.mjs +15 -0
  27. package/esm/bff/modules/miniprogram/franchisee/types.d.ts +25 -0
  28. package/esm/bff/modules/miniprogram/franchisee/types.mjs +1 -0
  29. package/esm/bff/modules/pandora/auth/service.d.ts +6 -0
  30. package/esm/bff/modules/pandora/auth/service.mjs +8 -0
  31. package/esm/bff/modules/pandora/auth/types.d.ts +30 -0
  32. package/esm/bff/modules/pandora/franchisee/service.d.ts +19 -0
  33. package/esm/bff/modules/pandora/franchisee/service.mjs +36 -0
  34. package/esm/bff/modules/pandora/franchisee/types.d.ts +204 -0
  35. package/esm/bff/modules/pandora/franchisee/types.mjs +1 -0
  36. package/esm/bff/modules/pandora/user/service.d.ts +0 -1
  37. package/esm/bff/modules/pandora/user/service.mjs +0 -3
  38. package/esm/bff/modules/pandora/user/types.d.ts +0 -27
  39. package/esm/index.d.ts +18 -0
  40. package/esm/index.mjs +6 -0
  41. package/package.json +3 -3
@@ -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 {};
@@ -13,7 +13,6 @@ export declare class PandoraUserService extends BaseService implements Service.U
13
13
  deleteAccount(request: Service.Request.deleteAccount): Promise<StandardResponse<Service.Response.deleteAccount>>;
14
14
  listAccounts(request: Service.Request.accountList): Promise<StandardResponse<Service.Response.accountList>>;
15
15
  getUserInfo(request: Service.Request.getUserInfo): Promise<StandardResponse<Service.Response.getUserInfo>>;
16
- getUserMenuPermissions(request: Service.Request.getUserMenuPermissions): Promise<StandardResponse<Service.Response.getUserMenuPermissions>>;
17
16
  getUserInfoByRole(): Promise<StandardResponse<Service.Response.getUserInfoByRole>>;
18
17
  getUserRolePermissions(request: Service.Request.getUserRolePermissions): Promise<StandardResponse<Service.Response.getUserRolePermissions>>;
19
18
  getStoreOptions(request: Service.Request.getStoreOptions): Promise<StandardResponse<Service.Response.getStoreOptions>>;
@@ -24,9 +24,6 @@ export class PandoraUserService extends BaseService {
24
24
  getUserInfo(request) {
25
25
  return this.request(this.getUserInfo, request);
26
26
  }
27
- getUserMenuPermissions(request) {
28
- return this.request(this.getUserMenuPermissions, request);
29
- }
30
27
  getUserInfoByRole() {
31
28
  return this.request(this.getUserInfoByRole, {});
32
29
  }
@@ -46,13 +46,6 @@ export declare namespace PandoraUserService {
46
46
  interface getUserInfo {
47
47
  id: string;
48
48
  }
49
- /**
50
- * 获取用户菜单权限
51
- */
52
- interface getUserMenuPermissions {
53
- id: string;
54
- roleId: string;
55
- }
56
49
  /**
57
50
  * 获取用户角色权限(用于用户管理页面编辑权限回显)
58
51
  */
@@ -129,25 +122,6 @@ export declare namespace PandoraUserService {
129
122
  createdAt: number;
130
123
  updatedAt: number;
131
124
  }
132
- /**
133
- * 获取用户菜单权限响应
134
- */
135
- interface getUserMenuPermissions {
136
- rules: Array<{
137
- id: string;
138
- name: string;
139
- path: string;
140
- isShow: number;
141
- sort: number;
142
- pid: string;
143
- type: string;
144
- icon: string;
145
- status: string;
146
- platform: string;
147
- background: string;
148
- ruleKey: string;
149
- }>;
150
- }
151
125
  /**
152
126
  * 根据角色获取用户信息响应(从请求上下文获取 userId 和 roleId)
153
127
  */
@@ -197,7 +171,6 @@ export declare namespace PandoraUserService {
197
171
  deleteAccount(request: Request.deleteAccount): Promise<StandardResponse<Response.deleteAccount>>;
198
172
  listAccounts(request: Request.accountList): Promise<StandardResponse<Response.accountList>>;
199
173
  getUserInfo(request: Request.getUserInfo): Promise<StandardResponse<Response.getUserInfo>>;
200
- getUserMenuPermissions(request: Request.getUserMenuPermissions): Promise<StandardResponse<Response.getUserMenuPermissions>>;
201
174
  getUserInfoByRole(): Promise<StandardResponse<Response.getUserInfoByRole>>;
202
175
  getUserRolePermissions(request: Request.getUserRolePermissions): Promise<StandardResponse<Response.getUserRolePermissions>>;
203
176
  getStoreOptions(request: Request.getStoreOptions): Promise<StandardResponse<Response.getStoreOptions>>;
package/esm/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import { PandoraExampleService } from './bff/modules/pandora/example/service';
2
2
  import { PandoraStoreService } from './bff/modules/pandora/store/service';
3
3
  import { PandoraStoreUserRelationService } from './bff/modules/pandora/storeUserRelation/service';
4
4
  import { MiniProgramDemoService } from './bff/modules/miniprogram/demo/service';
5
+ import { MiniprogramAuthServiceClass } from './bff/modules/miniprogram/auth/service';
5
6
  import { PandoraAuthService } from './bff/modules/pandora/auth/service';
6
7
  import { PandoraBDService } from './bff/modules/pandora/bd/service';
7
8
  import { PandoraBDMService } from './bff/modules/pandora/bdm/service';
@@ -20,6 +21,8 @@ import { PandoraOrderQueryService } from './bff/modules/pandora/orderQuery/servi
20
21
  import { PandoraOrderCoreService } from './bff/modules/pandora/orderCore/service';
21
22
  import { PandoraTaskService } from './bff/modules/pandora/task/service';
22
23
  import { PandoraPointRuleService } from './bff/modules/pandora/pointRule/service';
24
+ import { PandoraFranchiseeService } from './bff/modules/pandora/franchisee/service';
25
+ import { MiniprogramFranchiseeService } from './bff/modules/miniprogram/franchisee/service';
23
26
  import { SdkOptions } from './types';
24
27
  /**
25
28
  * Pandora 平台 SDK(管理后台)
@@ -63,6 +66,10 @@ export declare class PandoraSDK {
63
66
  orderCore: PandoraOrderCoreService;
64
67
  task: PandoraTaskService;
65
68
  pointRule: PandoraPointRuleService;
69
+ /**
70
+ * 加盟商模块
71
+ */
72
+ franchisee: PandoraFranchiseeService;
66
73
  /**
67
74
  * 使用配置选项初始化 Pandora SDK
68
75
  * @param options - SDK 配置,包含凭证回调函数
@@ -82,6 +89,14 @@ export declare class MiniProgramSDK {
82
89
  * 小程序 Demo 服务模块
83
90
  */
84
91
  demo: MiniProgramDemoService;
92
+ /**
93
+ * 小程序认证服务模块
94
+ */
95
+ auth: MiniprogramAuthServiceClass;
96
+ /**
97
+ * 加盟商模块
98
+ */
99
+ franchisee: MiniprogramFranchiseeService;
85
100
  /**
86
101
  * 使用配置选项初始化小程序 SDK
87
102
  * @param options - SDK 配置,包含凭证回调函数
@@ -92,6 +107,7 @@ export { SdkError, BizError, SystemError } from './errors';
92
107
  export { SdkOptions, IRequestStrategy, StandardResponse } from './types';
93
108
  export * from './enums';
94
109
  export { Service as MiniProgramDemoTypes } from './bff/modules/miniprogram/demo/types';
110
+ export { MiniprogramAuthService as MiniprogramAuthServiceTypes } from './bff/modules/miniprogram/auth/types';
95
111
  export { Service as PandoraExampleTypes } from './bff/modules/pandora/example/types';
96
112
  export { StoreService as PandoraStoreServiceTypes } from './bff/modules/pandora/store/types';
97
113
  export { StoreUserRelationService as PandoraStoreUserRelationServiceTypes } from './bff/modules/pandora/storeUserRelation/types';
@@ -113,3 +129,5 @@ export { PandoraPointRuleService as PandoraPointRuleServiceTypes } from './bff/m
113
129
  export { RoomService as PandoraRoomServiceTypes } from './bff/modules/pandora/room/types';
114
130
  export { CouponService as PandoraCouponServiceTypes } from './bff/modules/pandora/coupon/types';
115
131
  export { PointMallService as PointMallServiceTypes } from './bff/modules/pandora/pointsMall/types';
132
+ export { PandoraFranchiseeService as PandoraFranchiseeServiceTypes } from './bff/modules/pandora/franchisee/types';
133
+ export { MiniprogramFranchiseeService as MiniprogramFranchiseeServiceTypes } from './bff/modules/miniprogram/franchisee/types';
package/esm/index.mjs CHANGED
@@ -3,6 +3,7 @@ import { PandoraExampleService } from './bff/modules/pandora/example/service.mjs
3
3
  import { PandoraStoreService } from './bff/modules/pandora/store/service.mjs';
4
4
  import { PandoraStoreUserRelationService } from './bff/modules/pandora/storeUserRelation/service.mjs';
5
5
  import { MiniProgramDemoService } from './bff/modules/miniprogram/demo/service.mjs';
6
+ import { MiniprogramAuthServiceClass } from './bff/modules/miniprogram/auth/service.mjs';
6
7
  import { PandoraAuthService } from './bff/modules/pandora/auth/service.mjs';
7
8
  import { PandoraBDService } from './bff/modules/pandora/bd/service.mjs';
8
9
  import { PandoraBDMService } from './bff/modules/pandora/bdm/service.mjs';
@@ -21,6 +22,8 @@ import { PandoraOrderQueryService } from './bff/modules/pandora/orderQuery/servi
21
22
  import { PandoraOrderCoreService } from './bff/modules/pandora/orderCore/service.mjs';
22
23
  import { PandoraTaskService } from './bff/modules/pandora/task/service.mjs';
23
24
  import { PandoraPointRuleService } from './bff/modules/pandora/pointRule/service.mjs';
25
+ import { PandoraFranchiseeService } from './bff/modules/pandora/franchisee/service.mjs';
26
+ import { MiniprogramFranchiseeService } from './bff/modules/miniprogram/franchisee/service.mjs';
24
27
  /**
25
28
  * Pandora 平台 SDK(管理后台)
26
29
  * 包含所有 Pandora 平台相关的服务
@@ -55,6 +58,7 @@ export class PandoraSDK {
55
58
  this.orderCore = new PandoraOrderCoreService(this.http);
56
59
  this.task = new PandoraTaskService(this.http);
57
60
  this.pointRule = new PandoraPointRuleService(this.http);
61
+ this.franchisee = new PandoraFranchiseeService(this.http);
58
62
  }
59
63
  }
60
64
  /**
@@ -71,6 +75,8 @@ export class MiniProgramSDK {
71
75
  this.http = new HttpClient(options);
72
76
  // 使用 HttpClient 实例化所有小程序服务模块
73
77
  this.demo = new MiniProgramDemoService(this.http);
78
+ this.auth = new MiniprogramAuthServiceClass(this.http);
79
+ this.franchisee = new MiniprogramFranchiseeService(this.http);
74
80
  }
75
81
  }
76
82
  // ==================== 导出 ====================
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.94",
3
+ "version": "0.0.95",
4
4
  "description": "EcommerceBackendBffService Node.js SDK",
5
5
  "type": "commonjs",
6
6
  "main": "./cjs/index.js",
@@ -28,11 +28,11 @@
28
28
  "@be-link/ecommerce-client-backend-service-node-sdk": "^0.0.11",
29
29
  "@be-link/ecommerce-tag-service-node-sdk": "^0.0.11",
30
30
  "@be-link/ecommerce-store-service-node-sdk": "^0.0.25",
31
- "@be-link/ecommerce-trade-service-node-sdk": "^0.0.53",
31
+ "@be-link/ecommerce-trade-service-node-sdk": "^0.0.54",
32
32
  "@be-link/ecommerce-task-center-service-node-sdk": "^0.0.34",
33
33
  "@be-link/ecommerce-promotion-service-node-sdk": "^0.0.28",
34
34
  "axios": "1.13.2",
35
- "@be-link/ecommerce-backend-user-service-node-sdk": "^0.0.3",
35
+ "@be-link/ecommerce-backend-user-service-node-sdk": "^0.0.7",
36
36
  "@be-link/ecommerce-product-service-node-sdk": "0.0.30"
37
37
  },
38
38
  "devDependencies": {