@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.
- package/cjs/bff/modules/miniprogram/auth/service.d.ts +46 -0
- package/cjs/bff/modules/miniprogram/auth/service.js +66 -0
- package/cjs/bff/modules/miniprogram/auth/types.d.ts +133 -0
- package/cjs/bff/modules/miniprogram/franchisee/service.d.ts +12 -0
- package/cjs/bff/modules/miniprogram/franchisee/service.js +22 -0
- package/cjs/bff/modules/miniprogram/franchisee/types.d.ts +25 -0
- package/cjs/bff/modules/pandora/auth/service.d.ts +28 -0
- package/cjs/bff/modules/pandora/auth/service.js +42 -0
- package/cjs/bff/modules/pandora/auth/types.d.ts +94 -0
- package/cjs/bff/modules/pandora/auth/types.js +2 -0
- package/cjs/bff/modules/pandora/bd/service.d.ts +47 -0
- package/cjs/bff/modules/pandora/bd/service.js +67 -0
- package/cjs/bff/modules/pandora/bd/types.d.ts +157 -0
- package/cjs/bff/modules/pandora/bd/types.js +2 -0
- package/cjs/bff/modules/pandora/bdm/service.d.ts +35 -0
- package/cjs/bff/modules/pandora/{orderQuery → bdm}/service.js +18 -18
- package/cjs/bff/modules/pandora/bdm/types.d.ts +104 -0
- package/cjs/bff/modules/pandora/bdm/types.js +2 -0
- package/cjs/bff/modules/pandora/common/service.d.ts +34 -0
- package/cjs/bff/modules/pandora/common/service.js +50 -0
- package/cjs/bff/modules/pandora/common/types.d.ts +125 -0
- package/cjs/bff/modules/pandora/common/types.js +2 -0
- package/cjs/bff/modules/pandora/coupon/service.d.ts +59 -0
- package/cjs/bff/modules/pandora/coupon/service.js +83 -0
- package/cjs/bff/modules/pandora/coupon/types.d.ts +403 -0
- package/cjs/bff/modules/pandora/coupon/types.js +2 -0
- package/cjs/bff/modules/pandora/franchisee/service.d.ts +19 -0
- package/cjs/bff/modules/pandora/franchisee/service.js +43 -0
- package/cjs/bff/modules/pandora/franchisee/types.d.ts +204 -0
- package/cjs/bff/modules/pandora/franchisee/types.js +2 -0
- package/cjs/bff/modules/pandora/product/types.d.ts +6 -2
- package/cjs/bff/modules/pandora/productExp/service.d.ts +4 -4
- package/cjs/bff/modules/pandora/productExp/service.js +7 -7
- package/cjs/bff/modules/pandora/productExp/types.d.ts +31 -16
- package/cjs/bff/modules/pandora/productLive/service.d.ts +1 -1
- package/cjs/bff/modules/pandora/productLive/types.d.ts +1 -1
- package/cjs/bff/modules/pandora/role/service.d.ts +47 -0
- package/cjs/bff/modules/pandora/role/service.js +67 -0
- package/cjs/bff/modules/pandora/role/types.d.ts +135 -0
- package/cjs/bff/modules/pandora/role/types.js +2 -0
- package/cjs/bff/modules/pandora/storeClerk/service.d.ts +41 -0
- package/cjs/bff/modules/pandora/storeClerk/service.js +59 -0
- package/cjs/bff/modules/pandora/storeClerk/types.d.ts +130 -0
- package/cjs/bff/modules/pandora/storeClerk/types.js +2 -0
- package/cjs/bff/modules/pandora/storeManager/service.d.ts +47 -0
- package/cjs/bff/modules/pandora/storeManager/service.js +67 -0
- package/cjs/bff/modules/pandora/storeManager/types.d.ts +148 -0
- package/cjs/bff/modules/pandora/storeManager/types.js +2 -0
- package/cjs/bff/modules/pandora/user/service.d.ts +19 -0
- package/cjs/bff/modules/pandora/user/service.js +43 -0
- package/cjs/bff/modules/pandora/user/types.d.ts +178 -0
- package/cjs/bff/modules/pandora/user/types.js +2 -0
- package/cjs/bff/request/strategy.js +1 -0
- package/cjs/enums.d.ts +1 -0
- package/cjs/enums.js +4 -1
- package/cjs/index.d.ts +50 -6
- package/cjs/index.js +32 -10
- package/cjs/utils/env.js +3 -2
- package/cjs/utils/http.js +1 -1
- package/cjs/utils/string.js +1 -0
- package/esm/bff/modules/miniprogram/auth/service.d.ts +46 -0
- package/esm/bff/modules/miniprogram/auth/service.mjs +59 -0
- package/esm/bff/modules/miniprogram/auth/types.d.ts +133 -0
- package/esm/bff/modules/miniprogram/franchisee/service.d.ts +12 -0
- package/esm/bff/modules/miniprogram/franchisee/service.mjs +15 -0
- package/esm/bff/modules/miniprogram/franchisee/types.d.ts +25 -0
- package/esm/bff/modules/pandora/auth/service.d.ts +28 -0
- package/esm/bff/modules/pandora/auth/service.mjs +35 -0
- package/esm/bff/modules/pandora/auth/types.d.ts +94 -0
- package/esm/bff/modules/pandora/auth/types.mjs +1 -0
- package/esm/bff/modules/pandora/bd/service.d.ts +47 -0
- package/esm/bff/modules/pandora/bd/service.mjs +60 -0
- package/esm/bff/modules/pandora/bd/types.d.ts +157 -0
- package/esm/bff/modules/pandora/bd/types.mjs +1 -0
- package/esm/bff/modules/pandora/bdm/service.d.ts +35 -0
- package/esm/bff/modules/pandora/bdm/service.mjs +44 -0
- package/esm/bff/modules/pandora/bdm/types.d.ts +104 -0
- package/esm/bff/modules/pandora/bdm/types.mjs +1 -0
- package/esm/bff/modules/pandora/common/service.d.ts +34 -0
- package/esm/bff/modules/pandora/common/service.mjs +43 -0
- package/esm/bff/modules/pandora/common/types.d.ts +125 -0
- package/esm/bff/modules/pandora/common/types.mjs +1 -0
- package/esm/bff/modules/pandora/coupon/service.d.ts +59 -0
- package/esm/bff/modules/pandora/coupon/service.mjs +76 -0
- package/esm/bff/modules/pandora/coupon/types.d.ts +403 -0
- package/esm/bff/modules/pandora/coupon/types.mjs +1 -0
- package/esm/bff/modules/pandora/franchisee/service.d.ts +19 -0
- package/esm/bff/modules/pandora/franchisee/service.mjs +36 -0
- package/esm/bff/modules/pandora/franchisee/types.d.ts +204 -0
- package/esm/bff/modules/pandora/franchisee/types.mjs +1 -0
- package/esm/bff/modules/pandora/product/types.d.ts +6 -2
- package/esm/bff/modules/pandora/productExp/service.d.ts +4 -4
- package/esm/bff/modules/pandora/productExp/service.mjs +7 -7
- package/esm/bff/modules/pandora/productExp/types.d.ts +31 -16
- package/esm/bff/modules/pandora/productLive/service.d.ts +1 -1
- package/esm/bff/modules/pandora/productLive/types.d.ts +1 -1
- package/esm/bff/modules/pandora/role/service.d.ts +47 -0
- package/esm/bff/modules/pandora/role/service.mjs +60 -0
- package/esm/bff/modules/pandora/role/types.d.ts +135 -0
- package/esm/bff/modules/pandora/role/types.mjs +1 -0
- package/esm/bff/modules/pandora/storeClerk/service.d.ts +41 -0
- package/esm/bff/modules/pandora/storeClerk/service.mjs +52 -0
- package/esm/bff/modules/pandora/storeClerk/types.d.ts +130 -0
- package/esm/bff/modules/pandora/storeClerk/types.mjs +1 -0
- package/esm/bff/modules/pandora/storeManager/service.d.ts +47 -0
- package/esm/bff/modules/pandora/storeManager/service.mjs +60 -0
- package/esm/bff/modules/pandora/storeManager/types.d.ts +148 -0
- package/esm/bff/modules/pandora/storeManager/types.mjs +1 -0
- package/esm/bff/modules/pandora/user/service.d.ts +19 -0
- package/esm/bff/modules/pandora/user/service.mjs +36 -0
- package/esm/bff/modules/pandora/user/types.d.ts +178 -0
- package/esm/bff/modules/pandora/user/types.mjs +1 -0
- package/esm/bff/request/strategy.mjs +1 -0
- package/esm/enums.d.ts +1 -0
- package/esm/enums.mjs +2 -0
- package/esm/index.d.ts +50 -6
- package/esm/index.mjs +26 -4
- package/esm/utils/env.mjs +3 -2
- package/esm/utils/http.mjs +1 -1
- package/esm/utils/string.mjs +1 -0
- package/package.json +9 -5
- package/cjs/bff/modules/pandora/orderCore/service.d.ts +0 -23
- package/cjs/bff/modules/pandora/orderCore/service.js +0 -35
- package/cjs/bff/modules/pandora/orderCore/types.d.ts +0 -15
- package/cjs/bff/modules/pandora/orderQuery/service.d.ts +0 -35
- package/cjs/bff/modules/pandora/orderQuery/types.d.ts +0 -21
- package/esm/bff/modules/pandora/orderCore/service.d.ts +0 -23
- package/esm/bff/modules/pandora/orderCore/service.mjs +0 -28
- package/esm/bff/modules/pandora/orderCore/types.d.ts +0 -15
- package/esm/bff/modules/pandora/orderQuery/service.d.ts +0 -35
- package/esm/bff/modules/pandora/orderQuery/service.mjs +0 -44
- package/esm/bff/modules/pandora/orderQuery/types.d.ts +0 -21
- /package/cjs/bff/modules/{pandora/orderCore → miniprogram/auth}/types.js +0 -0
- /package/cjs/bff/modules/{pandora/orderQuery → miniprogram/franchisee}/types.js +0 -0
- /package/esm/bff/modules/{pandora/orderCore → miniprogram/auth}/types.mjs +0 -0
- /package/esm/bff/modules/{pandora/orderQuery → miniprogram/franchisee}/types.mjs +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { PandoraStoreManagerService as Service } from './types';
|
|
2
|
+
import BaseService from '../../BaseService';
|
|
3
|
+
import type { StandardResponse } from '../../../../types';
|
|
4
|
+
/**
|
|
5
|
+
* PandoraStoreManagerService - Pandora StoreManager 服务模块
|
|
6
|
+
* 提供 Pandora StoreManager 相关的 API 方法
|
|
7
|
+
* 平台: pandora
|
|
8
|
+
*/
|
|
9
|
+
export declare class PandoraStoreManagerService extends BaseService implements Service.StoreManagerController {
|
|
10
|
+
protected prefixUrl: string;
|
|
11
|
+
/**
|
|
12
|
+
* 创建店长
|
|
13
|
+
* @param request - 请求参数
|
|
14
|
+
* @returns Promise,解析为标准响应格式
|
|
15
|
+
*/
|
|
16
|
+
createStoreManager(request: Service.Request.createStoreManager): Promise<StandardResponse<Service.Response.createStoreManager>>;
|
|
17
|
+
/**
|
|
18
|
+
* 更新店长
|
|
19
|
+
* @param request - 请求参数
|
|
20
|
+
* @returns Promise,解析为标准响应格式
|
|
21
|
+
*/
|
|
22
|
+
updateStoreManager(request: Service.Request.updateStoreManager): Promise<StandardResponse<Service.Response.updateStoreManager>>;
|
|
23
|
+
/**
|
|
24
|
+
* 删除店长
|
|
25
|
+
* @param request - 请求参数
|
|
26
|
+
* @returns Promise,解析为标准响应格式
|
|
27
|
+
*/
|
|
28
|
+
deleteStoreManager(request: Service.Request.deleteStoreManager): Promise<StandardResponse<Service.Response.deleteStoreManager>>;
|
|
29
|
+
/**
|
|
30
|
+
* 查询店长列表
|
|
31
|
+
* @param request - 请求参数
|
|
32
|
+
* @returns Promise,解析为标准响应格式
|
|
33
|
+
*/
|
|
34
|
+
listStoreManagers(request: Service.Request.storeManagerList): Promise<StandardResponse<Service.Response.storeManagerList>>;
|
|
35
|
+
/**
|
|
36
|
+
* 查询店长门店下拉框列表
|
|
37
|
+
* @param request - 请求参数
|
|
38
|
+
* @returns Promise,解析为标准响应格式
|
|
39
|
+
*/
|
|
40
|
+
listStoreManagerStoreOptions(request: Service.Request.storeManagerStoreOptions): Promise<StandardResponse<Service.Response.storeManagerStoreOptions>>;
|
|
41
|
+
/**
|
|
42
|
+
* 检查用户是否为店长角色
|
|
43
|
+
* @param request - 请求参数
|
|
44
|
+
* @returns Promise,解析为标准响应格式
|
|
45
|
+
*/
|
|
46
|
+
checkIsStoreManager(request: Service.Request.checkIsStoreManager): Promise<StandardResponse<Service.Response.checkIsStoreManager>>;
|
|
47
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import BaseService from '../../BaseService.mjs';
|
|
2
|
+
/**
|
|
3
|
+
* PandoraStoreManagerService - Pandora StoreManager 服务模块
|
|
4
|
+
* 提供 Pandora StoreManager 相关的 API 方法
|
|
5
|
+
* 平台: pandora
|
|
6
|
+
*/
|
|
7
|
+
export class PandoraStoreManagerService extends BaseService {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.prefixUrl = '/pandora/store-manager';
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 创建店长
|
|
14
|
+
* @param request - 请求参数
|
|
15
|
+
* @returns Promise,解析为标准响应格式
|
|
16
|
+
*/
|
|
17
|
+
createStoreManager(request) {
|
|
18
|
+
return this.request(this.createStoreManager, request);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 更新店长
|
|
22
|
+
* @param request - 请求参数
|
|
23
|
+
* @returns Promise,解析为标准响应格式
|
|
24
|
+
*/
|
|
25
|
+
updateStoreManager(request) {
|
|
26
|
+
return this.request(this.updateStoreManager, request);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 删除店长
|
|
30
|
+
* @param request - 请求参数
|
|
31
|
+
* @returns Promise,解析为标准响应格式
|
|
32
|
+
*/
|
|
33
|
+
deleteStoreManager(request) {
|
|
34
|
+
return this.request(this.deleteStoreManager, request);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 查询店长列表
|
|
38
|
+
* @param request - 请求参数
|
|
39
|
+
* @returns Promise,解析为标准响应格式
|
|
40
|
+
*/
|
|
41
|
+
listStoreManagers(request) {
|
|
42
|
+
return this.request(this.listStoreManagers, request);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* 查询店长门店下拉框列表
|
|
46
|
+
* @param request - 请求参数
|
|
47
|
+
* @returns Promise,解析为标准响应格式
|
|
48
|
+
*/
|
|
49
|
+
listStoreManagerStoreOptions(request) {
|
|
50
|
+
return this.request(this.listStoreManagerStoreOptions, request);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* 检查用户是否为店长角色
|
|
54
|
+
* @param request - 请求参数
|
|
55
|
+
* @returns Promise,解析为标准响应格式
|
|
56
|
+
*/
|
|
57
|
+
checkIsStoreManager(request) {
|
|
58
|
+
return this.request(this.checkIsStoreManager, request);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { StandardResponse } from '../../../../types';
|
|
2
|
+
export declare namespace PandoraStoreManagerService {
|
|
3
|
+
namespace Request {
|
|
4
|
+
/**
|
|
5
|
+
* 创建店长
|
|
6
|
+
*/
|
|
7
|
+
interface createStoreManager {
|
|
8
|
+
phone: string;
|
|
9
|
+
name: string;
|
|
10
|
+
password: string;
|
|
11
|
+
storeId: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 更新店长
|
|
15
|
+
*/
|
|
16
|
+
interface updateStoreManager {
|
|
17
|
+
bindId: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
phone?: string;
|
|
20
|
+
storeId?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 删除店长
|
|
24
|
+
*/
|
|
25
|
+
interface deleteStoreManager {
|
|
26
|
+
bindId: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 店长列表查询
|
|
30
|
+
*/
|
|
31
|
+
interface storeManagerList {
|
|
32
|
+
name?: string;
|
|
33
|
+
phone?: string;
|
|
34
|
+
bindId?: string;
|
|
35
|
+
pageIndex: number;
|
|
36
|
+
pageSize: number;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* 店长门店下拉框列表查询
|
|
40
|
+
*/
|
|
41
|
+
interface storeManagerStoreOptions {
|
|
42
|
+
storeName?: string;
|
|
43
|
+
pageIndex: number;
|
|
44
|
+
pageSize: number;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* 检查用户是否为店长角色
|
|
48
|
+
*/
|
|
49
|
+
interface checkIsStoreManager {
|
|
50
|
+
unionId: string;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
namespace Response {
|
|
54
|
+
/**
|
|
55
|
+
* 创建店长响应
|
|
56
|
+
*/
|
|
57
|
+
interface createStoreManager {
|
|
58
|
+
userId: string;
|
|
59
|
+
bindId: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* 更新店长响应
|
|
63
|
+
*/
|
|
64
|
+
interface updateStoreManager {
|
|
65
|
+
success: boolean;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* 删除店长响应
|
|
69
|
+
*/
|
|
70
|
+
interface deleteStoreManager {
|
|
71
|
+
success: boolean;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* 店长列表项
|
|
75
|
+
*/
|
|
76
|
+
interface storeManagerListItem {
|
|
77
|
+
userId: string;
|
|
78
|
+
bindId: string;
|
|
79
|
+
name: string;
|
|
80
|
+
phone: string;
|
|
81
|
+
displayId: string;
|
|
82
|
+
store: {
|
|
83
|
+
id: string;
|
|
84
|
+
name: string;
|
|
85
|
+
};
|
|
86
|
+
createdAt: number;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* 店长列表响应
|
|
90
|
+
*/
|
|
91
|
+
interface storeManagerList {
|
|
92
|
+
list: storeManagerListItem[];
|
|
93
|
+
total: number;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* 店长门店下拉框选项
|
|
97
|
+
*/
|
|
98
|
+
interface storeManagerStoreOption {
|
|
99
|
+
bindId: string;
|
|
100
|
+
storeName: string;
|
|
101
|
+
storeId: string;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* 店长门店下拉框列表响应
|
|
105
|
+
*/
|
|
106
|
+
interface storeManagerStoreOptions {
|
|
107
|
+
list: storeManagerStoreOption[];
|
|
108
|
+
total: number;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* 检查用户是否为店长角色响应
|
|
112
|
+
*/
|
|
113
|
+
interface checkIsStoreManager {
|
|
114
|
+
isStoreManager: boolean;
|
|
115
|
+
storeId?: string;
|
|
116
|
+
storeName?: string;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* StoreManager Controller 接口定义
|
|
121
|
+
*/
|
|
122
|
+
interface StoreManagerController {
|
|
123
|
+
/**
|
|
124
|
+
* 创建店长
|
|
125
|
+
*/
|
|
126
|
+
createStoreManager(request: Request.createStoreManager): Promise<StandardResponse<Response.createStoreManager>>;
|
|
127
|
+
/**
|
|
128
|
+
* 更新店长
|
|
129
|
+
*/
|
|
130
|
+
updateStoreManager(request: Request.updateStoreManager): Promise<StandardResponse<Response.updateStoreManager>>;
|
|
131
|
+
/**
|
|
132
|
+
* 删除店长
|
|
133
|
+
*/
|
|
134
|
+
deleteStoreManager(request: Request.deleteStoreManager): Promise<StandardResponse<Response.deleteStoreManager>>;
|
|
135
|
+
/**
|
|
136
|
+
* 查询店长列表
|
|
137
|
+
*/
|
|
138
|
+
listStoreManagers(request: Request.storeManagerList): Promise<StandardResponse<Response.storeManagerList>>;
|
|
139
|
+
/**
|
|
140
|
+
* 查询店长门店下拉框列表
|
|
141
|
+
*/
|
|
142
|
+
listStoreManagerStoreOptions(request: Request.storeManagerStoreOptions): Promise<StandardResponse<Response.storeManagerStoreOptions>>;
|
|
143
|
+
/**
|
|
144
|
+
* 检查用户是否为店长角色
|
|
145
|
+
*/
|
|
146
|
+
checkIsStoreManager(request: Request.checkIsStoreManager): Promise<StandardResponse<Response.checkIsStoreManager>>;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PandoraUserService as Service } from './types';
|
|
2
|
+
import BaseService from '../../BaseService';
|
|
3
|
+
import type { StandardResponse } from '../../../../types';
|
|
4
|
+
/**
|
|
5
|
+
* PandoraUserService - Pandora User 服务模块
|
|
6
|
+
* 提供 Pandora User 相关的 API 方法
|
|
7
|
+
* 平台: pandora
|
|
8
|
+
*/
|
|
9
|
+
export declare class PandoraUserService extends BaseService implements Service.UserController {
|
|
10
|
+
protected prefixUrl: string;
|
|
11
|
+
createAccount(request: Service.Request.createAccount): Promise<StandardResponse<Service.Response.createAccount>>;
|
|
12
|
+
updateAccount(request: Service.Request.updateAccount): Promise<StandardResponse<Service.Response.updateAccount>>;
|
|
13
|
+
deleteAccount(request: Service.Request.deleteAccount): Promise<StandardResponse<Service.Response.deleteAccount>>;
|
|
14
|
+
listAccounts(request: Service.Request.accountList): Promise<StandardResponse<Service.Response.accountList>>;
|
|
15
|
+
getUserInfo(request: Service.Request.getUserInfo): Promise<StandardResponse<Service.Response.getUserInfo>>;
|
|
16
|
+
getUserInfoByRole(): Promise<StandardResponse<Service.Response.getUserInfoByRole>>;
|
|
17
|
+
getUserRolePermissions(request: Service.Request.getUserRolePermissions): Promise<StandardResponse<Service.Response.getUserRolePermissions>>;
|
|
18
|
+
getStoreOptions(request: Service.Request.getStoreOptions): Promise<StandardResponse<Service.Response.getStoreOptions>>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import BaseService from '../../BaseService.mjs';
|
|
2
|
+
/**
|
|
3
|
+
* PandoraUserService - Pandora User 服务模块
|
|
4
|
+
* 提供 Pandora User 相关的 API 方法
|
|
5
|
+
* 平台: pandora
|
|
6
|
+
*/
|
|
7
|
+
export class PandoraUserService extends BaseService {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.prefixUrl = '/pandora/user';
|
|
11
|
+
}
|
|
12
|
+
createAccount(request) {
|
|
13
|
+
return this.request(this.createAccount, request);
|
|
14
|
+
}
|
|
15
|
+
updateAccount(request) {
|
|
16
|
+
return this.request(this.updateAccount, request);
|
|
17
|
+
}
|
|
18
|
+
deleteAccount(request) {
|
|
19
|
+
return this.request(this.deleteAccount, request);
|
|
20
|
+
}
|
|
21
|
+
listAccounts(request) {
|
|
22
|
+
return this.request(this.listAccounts, request);
|
|
23
|
+
}
|
|
24
|
+
getUserInfo(request) {
|
|
25
|
+
return this.request(this.getUserInfo, request);
|
|
26
|
+
}
|
|
27
|
+
getUserInfoByRole() {
|
|
28
|
+
return this.request(this.getUserInfoByRole, {});
|
|
29
|
+
}
|
|
30
|
+
getUserRolePermissions(request) {
|
|
31
|
+
return this.request(this.getUserRolePermissions, request);
|
|
32
|
+
}
|
|
33
|
+
getStoreOptions(request) {
|
|
34
|
+
return this.request(this.getStoreOptions, request);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { StandardResponse } from '../../../../types';
|
|
2
|
+
import { PandoraCommonService } from '../common/types';
|
|
3
|
+
export declare namespace PandoraUserService {
|
|
4
|
+
namespace Request {
|
|
5
|
+
/**
|
|
6
|
+
* 创建账号
|
|
7
|
+
*/
|
|
8
|
+
interface createAccount {
|
|
9
|
+
phone: string;
|
|
10
|
+
name: string;
|
|
11
|
+
password: string;
|
|
12
|
+
roleId: string;
|
|
13
|
+
storeIds: string[];
|
|
14
|
+
warehouseIds: string[];
|
|
15
|
+
extraRules?: string[];
|
|
16
|
+
operatorRoleId: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 更新账号
|
|
20
|
+
*/
|
|
21
|
+
interface updateAccount {
|
|
22
|
+
bindId: string;
|
|
23
|
+
name?: string;
|
|
24
|
+
storeIds?: string[];
|
|
25
|
+
warehouseIds?: string[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* 删除账号
|
|
29
|
+
*/
|
|
30
|
+
interface deleteAccount {
|
|
31
|
+
bindId: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* 账号列表查询
|
|
35
|
+
*/
|
|
36
|
+
interface accountList {
|
|
37
|
+
name?: string;
|
|
38
|
+
phone?: string;
|
|
39
|
+
roleId?: string;
|
|
40
|
+
pageIndex: number;
|
|
41
|
+
pageSize: number;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* 获取用户信息
|
|
45
|
+
*/
|
|
46
|
+
interface getUserInfo {
|
|
47
|
+
id: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* 获取用户角色权限(用于用户管理页面编辑权限回显)
|
|
51
|
+
*/
|
|
52
|
+
interface getUserRolePermissions {
|
|
53
|
+
userId: string;
|
|
54
|
+
roleId: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* 获取用户角色下的门店下拉框选项
|
|
58
|
+
*/
|
|
59
|
+
interface getStoreOptions {
|
|
60
|
+
name?: string;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
namespace Response {
|
|
64
|
+
/**
|
|
65
|
+
* 创建账号响应
|
|
66
|
+
*/
|
|
67
|
+
interface createAccount {
|
|
68
|
+
userId: string;
|
|
69
|
+
bindId: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* 更新账号响应
|
|
73
|
+
*/
|
|
74
|
+
interface updateAccount {
|
|
75
|
+
success: boolean;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* 删除账号响应
|
|
79
|
+
*/
|
|
80
|
+
interface deleteAccount {
|
|
81
|
+
success: boolean;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* 账号列表项
|
|
85
|
+
*/
|
|
86
|
+
interface accountListItem {
|
|
87
|
+
userId: string;
|
|
88
|
+
bindId: string;
|
|
89
|
+
name: string;
|
|
90
|
+
phone: string;
|
|
91
|
+
role: {
|
|
92
|
+
id: string;
|
|
93
|
+
name: string;
|
|
94
|
+
};
|
|
95
|
+
stores: Array<{
|
|
96
|
+
id: string;
|
|
97
|
+
name: string;
|
|
98
|
+
}>;
|
|
99
|
+
warehouses: Array<{
|
|
100
|
+
id: string;
|
|
101
|
+
name: string;
|
|
102
|
+
}>;
|
|
103
|
+
createdAt: number;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* 账号列表响应
|
|
107
|
+
*/
|
|
108
|
+
interface accountList {
|
|
109
|
+
list: accountListItem[];
|
|
110
|
+
total: number;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* 获取用户信息响应
|
|
114
|
+
*/
|
|
115
|
+
interface getUserInfo {
|
|
116
|
+
id: string;
|
|
117
|
+
username: string;
|
|
118
|
+
phone: string;
|
|
119
|
+
status: string;
|
|
120
|
+
unionId: string;
|
|
121
|
+
openId: string;
|
|
122
|
+
createdAt: number;
|
|
123
|
+
updatedAt: number;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* 根据角色获取用户信息响应(从请求上下文获取 userId 和 roleId)
|
|
127
|
+
*/
|
|
128
|
+
interface getUserInfoByRole {
|
|
129
|
+
id: string;
|
|
130
|
+
username: string;
|
|
131
|
+
phone: string;
|
|
132
|
+
status: string;
|
|
133
|
+
hasAllStore: boolean;
|
|
134
|
+
hasAllWarehouse: boolean;
|
|
135
|
+
stores?: Array<{
|
|
136
|
+
id: string;
|
|
137
|
+
name: string;
|
|
138
|
+
}>;
|
|
139
|
+
roles?: Array<{
|
|
140
|
+
id: string;
|
|
141
|
+
name: string;
|
|
142
|
+
}>;
|
|
143
|
+
warehouses?: Array<{
|
|
144
|
+
id: string;
|
|
145
|
+
name: string;
|
|
146
|
+
}>;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* 获取用户角色权限响应(用于用户管理页面编辑权限回显)
|
|
150
|
+
* operatorUserId 和 operatorRoleId 从请求上下文获取
|
|
151
|
+
*/
|
|
152
|
+
interface getUserRolePermissions {
|
|
153
|
+
rules: PandoraCommonService.Response.RuleNode[];
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* 获取用户角色下的门店下拉框选项响应
|
|
157
|
+
*/
|
|
158
|
+
interface getStoreOptions {
|
|
159
|
+
stores: Array<{
|
|
160
|
+
id: string;
|
|
161
|
+
name: string;
|
|
162
|
+
}>;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* User Controller 接口定义
|
|
167
|
+
*/
|
|
168
|
+
interface UserController {
|
|
169
|
+
createAccount(request: Request.createAccount): Promise<StandardResponse<Response.createAccount>>;
|
|
170
|
+
updateAccount(request: Request.updateAccount): Promise<StandardResponse<Response.updateAccount>>;
|
|
171
|
+
deleteAccount(request: Request.deleteAccount): Promise<StandardResponse<Response.deleteAccount>>;
|
|
172
|
+
listAccounts(request: Request.accountList): Promise<StandardResponse<Response.accountList>>;
|
|
173
|
+
getUserInfo(request: Request.getUserInfo): Promise<StandardResponse<Response.getUserInfo>>;
|
|
174
|
+
getUserInfoByRole(): Promise<StandardResponse<Response.getUserInfoByRole>>;
|
|
175
|
+
getUserRolePermissions(request: Request.getUserRolePermissions): Promise<StandardResponse<Response.getUserRolePermissions>>;
|
|
176
|
+
getStoreOptions(request: Request.getStoreOptions): Promise<StandardResponse<Response.getStoreOptions>>;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -109,6 +109,7 @@ export class MiniProgramRequestStrategy extends BaseRequestStrategy {
|
|
|
109
109
|
const requestId = headers['x-request-id'] || 'unknown';
|
|
110
110
|
try {
|
|
111
111
|
// 类型守卫,确保 wx 可用
|
|
112
|
+
// @ts-ignore
|
|
112
113
|
const wxGlobal = typeof wx !== 'undefined' ? wx : null;
|
|
113
114
|
if (!wxGlobal || !wxGlobal.request) {
|
|
114
115
|
if (console?.error) {
|
package/esm/enums.d.ts
CHANGED
|
@@ -4,3 +4,4 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export { ENUM as PRODUCT_SERVICE_ENUM } from '@be-link/ecommerce-product-service-node-sdk/enum';
|
|
6
6
|
export { ENUM as ROOM_SERVICE_ENUM } from '@be-link/ecommerce-client-backend-service-node-sdk/enum';
|
|
7
|
+
export { ENUM as PROMOTION_SERVICE_ENUM } from '@be-link/ecommerce-promotion-service-node-sdk/enum';
|
package/esm/enums.mjs
CHANGED
|
@@ -6,3 +6,5 @@
|
|
|
6
6
|
export { ENUM as PRODUCT_SERVICE_ENUM } from '@be-link/ecommerce-product-service-node-sdk/enum';
|
|
7
7
|
// 直播间枚举
|
|
8
8
|
export { ENUM as ROOM_SERVICE_ENUM } from '@be-link/ecommerce-client-backend-service-node-sdk/enum';
|
|
9
|
+
// 优惠券服务枚举
|
|
10
|
+
export { ENUM as PROMOTION_SERVICE_ENUM } from '@be-link/ecommerce-promotion-service-node-sdk/enum';
|
package/esm/index.d.ts
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
import { PandoraExampleService } from './bff/modules/pandora/example/service';
|
|
2
2
|
import { MiniProgramDemoService } from './bff/modules/miniprogram/demo/service';
|
|
3
|
+
import { MiniprogramAuthServiceClass } from './bff/modules/miniprogram/auth/service';
|
|
4
|
+
import { PandoraAuthService } from './bff/modules/pandora/auth/service';
|
|
5
|
+
import { PandoraBDService } from './bff/modules/pandora/bd/service';
|
|
6
|
+
import { PandoraBDMService } from './bff/modules/pandora/bdm/service';
|
|
7
|
+
import { PandoraCommonService } from './bff/modules/pandora/common/service';
|
|
8
|
+
import { PandoraRoleService } from './bff/modules/pandora/role/service';
|
|
9
|
+
import { PandoraStoreClerkService } from './bff/modules/pandora/storeClerk/service';
|
|
10
|
+
import { PandoraStoreManagerService } from './bff/modules/pandora/storeManager/service';
|
|
11
|
+
import { PandoraUserService } from './bff/modules/pandora/user/service';
|
|
3
12
|
import { PandoraProductService } from './bff/modules/pandora/product/service';
|
|
4
13
|
import { PandoraProductExpService } from './bff/modules/pandora/productExp/service';
|
|
5
14
|
import { PandoraProductLiveService } from './bff/modules/pandora/productLive/service';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
15
|
+
import { PandoraCouponService } from './bff/modules/pandora/coupon/service';
|
|
16
|
+
import { PandoraRoomService } from './bff/modules/pandora/room/service';
|
|
17
|
+
import { PandoraFranchiseeService } from './bff/modules/pandora/franchisee/service';
|
|
18
|
+
import { MiniprogramFranchiseeService } from './bff/modules/miniprogram/franchisee/service';
|
|
8
19
|
import { SdkOptions } from './types';
|
|
9
20
|
/**
|
|
10
21
|
* Pandora 平台 SDK(管理后台)
|
|
@@ -19,11 +30,26 @@ export declare class PandoraSDK {
|
|
|
19
30
|
* Pandora 示例服务模块
|
|
20
31
|
*/
|
|
21
32
|
example: PandoraExampleService;
|
|
33
|
+
auth: PandoraAuthService;
|
|
34
|
+
bd: PandoraBDService;
|
|
35
|
+
bdm: PandoraBDMService;
|
|
36
|
+
common: PandoraCommonService;
|
|
37
|
+
role: PandoraRoleService;
|
|
38
|
+
storeClerk: PandoraStoreClerkService;
|
|
39
|
+
storeManager: PandoraStoreManagerService;
|
|
40
|
+
user: PandoraUserService;
|
|
22
41
|
product: PandoraProductService;
|
|
23
42
|
productExp: PandoraProductExpService;
|
|
24
43
|
productLive: PandoraProductLiveService;
|
|
25
|
-
|
|
26
|
-
|
|
44
|
+
coupon: PandoraCouponService;
|
|
45
|
+
/**
|
|
46
|
+
* 直播间模块
|
|
47
|
+
*/
|
|
48
|
+
room: PandoraRoomService;
|
|
49
|
+
/**
|
|
50
|
+
* 加盟商模块
|
|
51
|
+
*/
|
|
52
|
+
franchisee: PandoraFranchiseeService;
|
|
27
53
|
/**
|
|
28
54
|
* 使用配置选项初始化 Pandora SDK
|
|
29
55
|
* @param options - SDK 配置,包含凭证回调函数
|
|
@@ -43,6 +69,14 @@ export declare class MiniProgramSDK {
|
|
|
43
69
|
* 小程序 Demo 服务模块
|
|
44
70
|
*/
|
|
45
71
|
demo: MiniProgramDemoService;
|
|
72
|
+
/**
|
|
73
|
+
* 小程序认证服务模块
|
|
74
|
+
*/
|
|
75
|
+
auth: MiniprogramAuthServiceClass;
|
|
76
|
+
/**
|
|
77
|
+
* 加盟商模块
|
|
78
|
+
*/
|
|
79
|
+
franchisee: MiniprogramFranchiseeService;
|
|
46
80
|
/**
|
|
47
81
|
* 使用配置选项初始化小程序 SDK
|
|
48
82
|
* @param options - SDK 配置,包含凭证回调函数
|
|
@@ -53,10 +87,20 @@ export { SdkError, BizError, SystemError } from './errors';
|
|
|
53
87
|
export { SdkOptions, IRequestStrategy, StandardResponse } from './types';
|
|
54
88
|
export * from './enums';
|
|
55
89
|
export { Service as MiniProgramDemoTypes } from './bff/modules/miniprogram/demo/types';
|
|
90
|
+
export { MiniprogramAuthService as MiniprogramAuthServiceTypes } from './bff/modules/miniprogram/auth/types';
|
|
56
91
|
export { Service as PandoraExampleTypes } from './bff/modules/pandora/example/types';
|
|
92
|
+
export { PandoraAuthService as PandoraAuthServiceTypes } from './bff/modules/pandora/auth/types';
|
|
93
|
+
export { PandoraBDService as PandoraBDServiceTypes } from './bff/modules/pandora/bd/types';
|
|
94
|
+
export { PandoraBDMService as PandoraBDMServiceTypes } from './bff/modules/pandora/bdm/types';
|
|
95
|
+
export { PandoraCommonService as PandoraCommonServiceTypes } from './bff/modules/pandora/common/types';
|
|
96
|
+
export { PandoraRoleService as PandoraRoleServiceTypes } from './bff/modules/pandora/role/types';
|
|
97
|
+
export { PandoraStoreClerkService as PandoraStoreClerkServiceTypes } from './bff/modules/pandora/storeClerk/types';
|
|
98
|
+
export { PandoraStoreManagerService as PandoraStoreManagerServiceTypes } from './bff/modules/pandora/storeManager/types';
|
|
99
|
+
export { PandoraUserService as PandoraUserServiceTypes } from './bff/modules/pandora/user/types';
|
|
57
100
|
export { PandoraProductService as PandoraProductServiceTypes } from './bff/modules/pandora/product/types';
|
|
58
101
|
export { PandoraProductExpService as PandoraProductExpServiceTypes } from './bff/modules/pandora/productExp/types';
|
|
59
102
|
export { PandoraProductLiveService as PandoraProductLiveServiceTypes } from './bff/modules/pandora/productLive/types';
|
|
60
|
-
export { PandoraOrderQueryService as PandoraOrderQueryServiceTypes } from './bff/modules/pandora/orderQuery/types';
|
|
61
|
-
export { PandoraOrderCoreService as PandoraOrderCoreServiceTypes } from './bff/modules/pandora/orderCore/types';
|
|
62
103
|
export { RoomService as PandoraRoomServiceTypes } from './bff/modules/pandora/room/types';
|
|
104
|
+
export { CouponService as PandoraCouponServiceTypes } from './bff/modules/pandora/coupon/types';
|
|
105
|
+
export { PandoraFranchiseeService as PandoraFranchiseeServiceTypes } from './bff/modules/pandora/franchisee/types';
|
|
106
|
+
export { MiniprogramFranchiseeService as MiniprogramFranchiseeServiceTypes } from './bff/modules/miniprogram/franchisee/types';
|
package/esm/index.mjs
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
import { HttpClient } from './bff/request/client.mjs';
|
|
2
2
|
import { PandoraExampleService } from './bff/modules/pandora/example/service.mjs';
|
|
3
3
|
import { MiniProgramDemoService } from './bff/modules/miniprogram/demo/service.mjs';
|
|
4
|
+
import { MiniprogramAuthServiceClass } from './bff/modules/miniprogram/auth/service.mjs';
|
|
5
|
+
import { PandoraAuthService } from './bff/modules/pandora/auth/service.mjs';
|
|
6
|
+
import { PandoraBDService } from './bff/modules/pandora/bd/service.mjs';
|
|
7
|
+
import { PandoraBDMService } from './bff/modules/pandora/bdm/service.mjs';
|
|
8
|
+
import { PandoraCommonService } from './bff/modules/pandora/common/service.mjs';
|
|
9
|
+
import { PandoraRoleService } from './bff/modules/pandora/role/service.mjs';
|
|
10
|
+
import { PandoraStoreClerkService } from './bff/modules/pandora/storeClerk/service.mjs';
|
|
11
|
+
import { PandoraStoreManagerService } from './bff/modules/pandora/storeManager/service.mjs';
|
|
12
|
+
import { PandoraUserService } from './bff/modules/pandora/user/service.mjs';
|
|
4
13
|
import { PandoraProductService } from './bff/modules/pandora/product/service.mjs';
|
|
5
14
|
import { PandoraProductExpService } from './bff/modules/pandora/productExp/service.mjs';
|
|
6
15
|
import { PandoraProductLiveService } from './bff/modules/pandora/productLive/service.mjs';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
16
|
+
import { PandoraCouponService } from './bff/modules/pandora/coupon/service.mjs';
|
|
17
|
+
import { PandoraRoomService } from './bff/modules/pandora/room/service.mjs';
|
|
18
|
+
import { PandoraFranchiseeService } from './bff/modules/pandora/franchisee/service.mjs';
|
|
19
|
+
import { MiniprogramFranchiseeService } from './bff/modules/miniprogram/franchisee/service.mjs';
|
|
9
20
|
/**
|
|
10
21
|
* Pandora 平台 SDK(管理后台)
|
|
11
22
|
* 包含所有 Pandora 平台相关的服务
|
|
@@ -20,11 +31,20 @@ export class PandoraSDK {
|
|
|
20
31
|
this.http = new HttpClient(options);
|
|
21
32
|
// 使用 HttpClient 实例化所有 Pandora 服务模块
|
|
22
33
|
this.example = new PandoraExampleService(this.http);
|
|
34
|
+
this.auth = new PandoraAuthService(this.http);
|
|
35
|
+
this.bd = new PandoraBDService(this.http);
|
|
36
|
+
this.bdm = new PandoraBDMService(this.http);
|
|
37
|
+
this.common = new PandoraCommonService(this.http);
|
|
38
|
+
this.role = new PandoraRoleService(this.http);
|
|
39
|
+
this.storeClerk = new PandoraStoreClerkService(this.http);
|
|
40
|
+
this.storeManager = new PandoraStoreManagerService(this.http);
|
|
41
|
+
this.user = new PandoraUserService(this.http);
|
|
23
42
|
this.product = new PandoraProductService(this.http);
|
|
24
43
|
this.productExp = new PandoraProductExpService(this.http);
|
|
25
44
|
this.productLive = new PandoraProductLiveService(this.http);
|
|
26
|
-
this.
|
|
27
|
-
this.
|
|
45
|
+
this.room = new PandoraRoomService(this.http);
|
|
46
|
+
this.coupon = new PandoraCouponService(this.http);
|
|
47
|
+
this.franchisee = new PandoraFranchiseeService(this.http);
|
|
28
48
|
}
|
|
29
49
|
}
|
|
30
50
|
/**
|
|
@@ -41,6 +61,8 @@ export class MiniProgramSDK {
|
|
|
41
61
|
this.http = new HttpClient(options);
|
|
42
62
|
// 使用 HttpClient 实例化所有小程序服务模块
|
|
43
63
|
this.demo = new MiniProgramDemoService(this.http);
|
|
64
|
+
this.auth = new MiniprogramAuthServiceClass(this.http);
|
|
65
|
+
this.franchisee = new MiniprogramFranchiseeService(this.http);
|
|
44
66
|
}
|
|
45
67
|
}
|
|
46
68
|
// ==================== 导出 ====================
|