@be-link/ecommerce-backend-bff-service-node-sdk 0.0.83 → 0.0.85

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 (75) hide show
  1. package/cjs/bff/modules/pandora/auth/service.d.ts +22 -0
  2. package/cjs/bff/modules/pandora/auth/service.js +34 -0
  3. package/cjs/bff/modules/pandora/auth/types.d.ts +64 -0
  4. package/cjs/bff/modules/pandora/auth/types.js +2 -0
  5. package/cjs/bff/modules/pandora/bd/service.d.ts +41 -0
  6. package/cjs/bff/modules/pandora/bd/service.js +59 -0
  7. package/cjs/bff/modules/pandora/bd/types.d.ts +133 -0
  8. package/cjs/bff/modules/pandora/bd/types.js +2 -0
  9. package/cjs/bff/modules/pandora/bdm/service.d.ts +35 -0
  10. package/cjs/bff/modules/pandora/bdm/service.js +51 -0
  11. package/cjs/bff/modules/pandora/bdm/types.d.ts +103 -0
  12. package/cjs/bff/modules/pandora/bdm/types.js +2 -0
  13. package/cjs/bff/modules/pandora/common/service.d.ts +34 -0
  14. package/cjs/bff/modules/pandora/common/service.js +50 -0
  15. package/cjs/bff/modules/pandora/common/types.d.ts +125 -0
  16. package/cjs/bff/modules/pandora/common/types.js +2 -0
  17. package/cjs/bff/modules/pandora/role/service.d.ts +47 -0
  18. package/cjs/bff/modules/pandora/role/service.js +67 -0
  19. package/cjs/bff/modules/pandora/role/types.d.ts +134 -0
  20. package/cjs/bff/modules/pandora/role/types.js +2 -0
  21. package/cjs/bff/modules/pandora/storeClerk/service.d.ts +41 -0
  22. package/cjs/bff/modules/pandora/storeClerk/service.js +59 -0
  23. package/cjs/bff/modules/pandora/storeClerk/types.d.ts +129 -0
  24. package/cjs/bff/modules/pandora/storeClerk/types.js +2 -0
  25. package/cjs/bff/modules/pandora/storeManager/service.d.ts +47 -0
  26. package/cjs/bff/modules/pandora/storeManager/service.js +67 -0
  27. package/cjs/bff/modules/pandora/storeManager/types.d.ts +147 -0
  28. package/cjs/bff/modules/pandora/storeManager/types.js +2 -0
  29. package/cjs/bff/modules/pandora/user/service.d.ts +20 -0
  30. package/cjs/bff/modules/pandora/user/service.js +46 -0
  31. package/cjs/bff/modules/pandora/user/types.d.ts +205 -0
  32. package/cjs/bff/modules/pandora/user/types.js +2 -0
  33. package/cjs/bff/request/strategy.js +1 -0
  34. package/cjs/index.d.ts +24 -0
  35. package/cjs/index.js +36 -20
  36. package/cjs/utils/env.js +1 -0
  37. package/cjs/utils/string.js +1 -0
  38. package/esm/bff/modules/pandora/auth/service.d.ts +22 -0
  39. package/esm/bff/modules/pandora/auth/service.mjs +27 -0
  40. package/esm/bff/modules/pandora/auth/types.d.ts +64 -0
  41. package/esm/bff/modules/pandora/auth/types.mjs +1 -0
  42. package/esm/bff/modules/pandora/bd/service.d.ts +41 -0
  43. package/esm/bff/modules/pandora/bd/service.mjs +52 -0
  44. package/esm/bff/modules/pandora/bd/types.d.ts +133 -0
  45. package/esm/bff/modules/pandora/bd/types.mjs +1 -0
  46. package/esm/bff/modules/pandora/bdm/service.d.ts +35 -0
  47. package/esm/bff/modules/pandora/bdm/service.mjs +44 -0
  48. package/esm/bff/modules/pandora/bdm/types.d.ts +103 -0
  49. package/esm/bff/modules/pandora/bdm/types.mjs +1 -0
  50. package/esm/bff/modules/pandora/common/service.d.ts +34 -0
  51. package/esm/bff/modules/pandora/common/service.mjs +43 -0
  52. package/esm/bff/modules/pandora/common/types.d.ts +125 -0
  53. package/esm/bff/modules/pandora/common/types.mjs +1 -0
  54. package/esm/bff/modules/pandora/role/service.d.ts +47 -0
  55. package/esm/bff/modules/pandora/role/service.mjs +60 -0
  56. package/esm/bff/modules/pandora/role/types.d.ts +134 -0
  57. package/esm/bff/modules/pandora/role/types.mjs +1 -0
  58. package/esm/bff/modules/pandora/storeClerk/service.d.ts +41 -0
  59. package/esm/bff/modules/pandora/storeClerk/service.mjs +52 -0
  60. package/esm/bff/modules/pandora/storeClerk/types.d.ts +129 -0
  61. package/esm/bff/modules/pandora/storeClerk/types.mjs +1 -0
  62. package/esm/bff/modules/pandora/storeManager/service.d.ts +47 -0
  63. package/esm/bff/modules/pandora/storeManager/service.mjs +60 -0
  64. package/esm/bff/modules/pandora/storeManager/types.d.ts +147 -0
  65. package/esm/bff/modules/pandora/storeManager/types.mjs +1 -0
  66. package/esm/bff/modules/pandora/user/service.d.ts +20 -0
  67. package/esm/bff/modules/pandora/user/service.mjs +39 -0
  68. package/esm/bff/modules/pandora/user/types.d.ts +205 -0
  69. package/esm/bff/modules/pandora/user/types.mjs +1 -0
  70. package/esm/bff/request/strategy.mjs +1 -0
  71. package/esm/index.d.ts +24 -0
  72. package/esm/index.mjs +16 -0
  73. package/esm/utils/env.mjs +1 -0
  74. package/esm/utils/string.mjs +1 -0
  75. package/package.json +5 -4
@@ -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.PandoraStoreManagerService = void 0;
7
+ const BaseService_1 = __importDefault(require("../../BaseService"));
8
+ /**
9
+ * PandoraStoreManagerService - Pandora StoreManager 服务模块
10
+ * 提供 Pandora StoreManager 相关的 API 方法
11
+ * 平台: pandora
12
+ */
13
+ class PandoraStoreManagerService extends BaseService_1.default {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.prefixUrl = '/pandora/store-manager';
17
+ }
18
+ /**
19
+ * 创建店长
20
+ * @param request - 请求参数
21
+ * @returns Promise,解析为标准响应格式
22
+ */
23
+ createStoreManager(request) {
24
+ return this.request(this.createStoreManager, request);
25
+ }
26
+ /**
27
+ * 更新店长
28
+ * @param request - 请求参数
29
+ * @returns Promise,解析为标准响应格式
30
+ */
31
+ updateStoreManager(request) {
32
+ return this.request(this.updateStoreManager, request);
33
+ }
34
+ /**
35
+ * 删除店长
36
+ * @param request - 请求参数
37
+ * @returns Promise,解析为标准响应格式
38
+ */
39
+ deleteStoreManager(request) {
40
+ return this.request(this.deleteStoreManager, request);
41
+ }
42
+ /**
43
+ * 查询店长列表
44
+ * @param request - 请求参数
45
+ * @returns Promise,解析为标准响应格式
46
+ */
47
+ listStoreManagers(request) {
48
+ return this.request(this.listStoreManagers, request);
49
+ }
50
+ /**
51
+ * 查询店长门店下拉框列表
52
+ * @param request - 请求参数
53
+ * @returns Promise,解析为标准响应格式
54
+ */
55
+ listStoreManagerStoreOptions(request) {
56
+ return this.request(this.listStoreManagerStoreOptions, request);
57
+ }
58
+ /**
59
+ * 检查用户是否为店长角色
60
+ * @param request - 请求参数
61
+ * @returns Promise,解析为标准响应格式
62
+ */
63
+ checkIsStoreManager(request) {
64
+ return this.request(this.checkIsStoreManager, request);
65
+ }
66
+ }
67
+ exports.PandoraStoreManagerService = PandoraStoreManagerService;
@@ -0,0 +1,147 @@
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
+ storeId?: string;
20
+ }
21
+ /**
22
+ * 删除店长
23
+ */
24
+ interface deleteStoreManager {
25
+ bindId: string;
26
+ }
27
+ /**
28
+ * 店长列表查询
29
+ */
30
+ interface storeManagerList {
31
+ name?: string;
32
+ phone?: string;
33
+ bindId?: string;
34
+ pageIndex: number;
35
+ pageSize: number;
36
+ }
37
+ /**
38
+ * 店长门店下拉框列表查询
39
+ */
40
+ interface storeManagerStoreOptions {
41
+ storeName?: string;
42
+ pageIndex: number;
43
+ pageSize: number;
44
+ }
45
+ /**
46
+ * 检查用户是否为店长角色
47
+ */
48
+ interface checkIsStoreManager {
49
+ unionId: string;
50
+ }
51
+ }
52
+ namespace Response {
53
+ /**
54
+ * 创建店长响应
55
+ */
56
+ interface createStoreManager {
57
+ userId: string;
58
+ bindId: string;
59
+ }
60
+ /**
61
+ * 更新店长响应
62
+ */
63
+ interface updateStoreManager {
64
+ success: boolean;
65
+ }
66
+ /**
67
+ * 删除店长响应
68
+ */
69
+ interface deleteStoreManager {
70
+ success: boolean;
71
+ }
72
+ /**
73
+ * 店长列表项
74
+ */
75
+ interface storeManagerListItem {
76
+ userId: string;
77
+ bindId: string;
78
+ name: string;
79
+ phone: string;
80
+ displayId: string;
81
+ store: {
82
+ id: string;
83
+ name: string;
84
+ };
85
+ createdAt: number;
86
+ }
87
+ /**
88
+ * 店长列表响应
89
+ */
90
+ interface storeManagerList {
91
+ list: storeManagerListItem[];
92
+ total: number;
93
+ }
94
+ /**
95
+ * 店长门店下拉框选项
96
+ */
97
+ interface storeManagerStoreOption {
98
+ bindId: string;
99
+ storeName: string;
100
+ storeId: string;
101
+ }
102
+ /**
103
+ * 店长门店下拉框列表响应
104
+ */
105
+ interface storeManagerStoreOptions {
106
+ list: storeManagerStoreOption[];
107
+ total: number;
108
+ }
109
+ /**
110
+ * 检查用户是否为店长角色响应
111
+ */
112
+ interface checkIsStoreManager {
113
+ isStoreManager: boolean;
114
+ storeId?: string;
115
+ storeName?: string;
116
+ }
117
+ }
118
+ /**
119
+ * StoreManager Controller 接口定义
120
+ */
121
+ interface StoreManagerController {
122
+ /**
123
+ * 创建店长
124
+ */
125
+ createStoreManager(request: Request.createStoreManager): Promise<StandardResponse<Response.createStoreManager>>;
126
+ /**
127
+ * 更新店长
128
+ */
129
+ updateStoreManager(request: Request.updateStoreManager): Promise<StandardResponse<Response.updateStoreManager>>;
130
+ /**
131
+ * 删除店长
132
+ */
133
+ deleteStoreManager(request: Request.deleteStoreManager): Promise<StandardResponse<Response.deleteStoreManager>>;
134
+ /**
135
+ * 查询店长列表
136
+ */
137
+ listStoreManagers(request: Request.storeManagerList): Promise<StandardResponse<Response.storeManagerList>>;
138
+ /**
139
+ * 查询店长门店下拉框列表
140
+ */
141
+ listStoreManagerStoreOptions(request: Request.storeManagerStoreOptions): Promise<StandardResponse<Response.storeManagerStoreOptions>>;
142
+ /**
143
+ * 检查用户是否为店长角色
144
+ */
145
+ checkIsStoreManager(request: Request.checkIsStoreManager): Promise<StandardResponse<Response.checkIsStoreManager>>;
146
+ }
147
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,20 @@
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
+ getUserMenuPermissions(request: Service.Request.getUserMenuPermissions): Promise<StandardResponse<Service.Response.getUserMenuPermissions>>;
17
+ getUserInfoByRole(): Promise<StandardResponse<Service.Response.getUserInfoByRole>>;
18
+ getUserRolePermissions(request: Service.Request.getUserRolePermissions): Promise<StandardResponse<Service.Response.getUserRolePermissions>>;
19
+ getStoreOptions(request: Service.Request.getStoreOptions): Promise<StandardResponse<Service.Response.getStoreOptions>>;
20
+ }
@@ -0,0 +1,46 @@
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.PandoraUserService = void 0;
7
+ const BaseService_1 = __importDefault(require("../../BaseService"));
8
+ /**
9
+ * PandoraUserService - Pandora User 服务模块
10
+ * 提供 Pandora User 相关的 API 方法
11
+ * 平台: pandora
12
+ */
13
+ class PandoraUserService extends BaseService_1.default {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.prefixUrl = '/pandora/user';
17
+ }
18
+ createAccount(request) {
19
+ return this.request(this.createAccount, request);
20
+ }
21
+ updateAccount(request) {
22
+ return this.request(this.updateAccount, request);
23
+ }
24
+ deleteAccount(request) {
25
+ return this.request(this.deleteAccount, request);
26
+ }
27
+ listAccounts(request) {
28
+ return this.request(this.listAccounts, request);
29
+ }
30
+ getUserInfo(request) {
31
+ return this.request(this.getUserInfo, request);
32
+ }
33
+ getUserMenuPermissions(request) {
34
+ return this.request(this.getUserMenuPermissions, request);
35
+ }
36
+ getUserInfoByRole() {
37
+ return this.request(this.getUserInfoByRole, {});
38
+ }
39
+ getUserRolePermissions(request) {
40
+ return this.request(this.getUserRolePermissions, request);
41
+ }
42
+ getStoreOptions(request) {
43
+ return this.request(this.getStoreOptions, request);
44
+ }
45
+ }
46
+ exports.PandoraUserService = PandoraUserService;
@@ -0,0 +1,205 @@
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 getUserMenuPermissions {
53
+ id: string;
54
+ roleId: string;
55
+ }
56
+ /**
57
+ * 获取用户角色权限(用于用户管理页面编辑权限回显)
58
+ */
59
+ interface getUserRolePermissions {
60
+ userId: string;
61
+ roleId: string;
62
+ }
63
+ /**
64
+ * 获取用户角色下的门店下拉框选项
65
+ */
66
+ interface getStoreOptions {
67
+ name?: string;
68
+ }
69
+ }
70
+ namespace Response {
71
+ /**
72
+ * 创建账号响应
73
+ */
74
+ interface createAccount {
75
+ userId: string;
76
+ bindId: string;
77
+ }
78
+ /**
79
+ * 更新账号响应
80
+ */
81
+ interface updateAccount {
82
+ success: boolean;
83
+ }
84
+ /**
85
+ * 删除账号响应
86
+ */
87
+ interface deleteAccount {
88
+ success: boolean;
89
+ }
90
+ /**
91
+ * 账号列表项
92
+ */
93
+ interface accountListItem {
94
+ userId: string;
95
+ bindId: string;
96
+ name: string;
97
+ phone: string;
98
+ role: {
99
+ id: string;
100
+ name: string;
101
+ };
102
+ stores: Array<{
103
+ id: string;
104
+ name: string;
105
+ }>;
106
+ warehouses: Array<{
107
+ id: string;
108
+ name: string;
109
+ }>;
110
+ createdAt: number;
111
+ }
112
+ /**
113
+ * 账号列表响应
114
+ */
115
+ interface accountList {
116
+ list: accountListItem[];
117
+ total: number;
118
+ }
119
+ /**
120
+ * 获取用户信息响应
121
+ */
122
+ interface getUserInfo {
123
+ id: string;
124
+ username: string;
125
+ phone: string;
126
+ status: string;
127
+ unionId: string;
128
+ openId: string;
129
+ createdAt: number;
130
+ updatedAt: number;
131
+ }
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
+ /**
152
+ * 根据角色获取用户信息响应(从请求上下文获取 userId 和 roleId)
153
+ */
154
+ interface getUserInfoByRole {
155
+ id: string;
156
+ username: string;
157
+ phone: string;
158
+ status: string;
159
+ hasAllStore: boolean;
160
+ hasAllWarehouse: boolean;
161
+ stores?: Array<{
162
+ id: string;
163
+ name: string;
164
+ }>;
165
+ roles?: Array<{
166
+ id: string;
167
+ name: string;
168
+ }>;
169
+ warehouses?: Array<{
170
+ id: string;
171
+ name: string;
172
+ }>;
173
+ }
174
+ /**
175
+ * 获取用户角色权限响应(用于用户管理页面编辑权限回显)
176
+ * operatorUserId 和 operatorRoleId 从请求上下文获取
177
+ */
178
+ interface getUserRolePermissions {
179
+ rules: PandoraCommonService.Response.RuleNode[];
180
+ }
181
+ /**
182
+ * 获取用户角色下的门店下拉框选项响应
183
+ */
184
+ interface getStoreOptions {
185
+ stores: Array<{
186
+ id: string;
187
+ name: string;
188
+ }>;
189
+ }
190
+ }
191
+ /**
192
+ * User Controller 接口定义
193
+ */
194
+ interface UserController {
195
+ createAccount(request: Request.createAccount): Promise<StandardResponse<Response.createAccount>>;
196
+ updateAccount(request: Request.updateAccount): Promise<StandardResponse<Response.updateAccount>>;
197
+ deleteAccount(request: Request.deleteAccount): Promise<StandardResponse<Response.deleteAccount>>;
198
+ listAccounts(request: Request.accountList): Promise<StandardResponse<Response.accountList>>;
199
+ getUserInfo(request: Request.getUserInfo): Promise<StandardResponse<Response.getUserInfo>>;
200
+ getUserMenuPermissions(request: Request.getUserMenuPermissions): Promise<StandardResponse<Response.getUserMenuPermissions>>;
201
+ getUserInfoByRole(): Promise<StandardResponse<Response.getUserInfoByRole>>;
202
+ getUserRolePermissions(request: Request.getUserRolePermissions): Promise<StandardResponse<Response.getUserRolePermissions>>;
203
+ getStoreOptions(request: Request.getStoreOptions): Promise<StandardResponse<Response.getStoreOptions>>;
204
+ }
205
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -117,6 +117,7 @@ class MiniProgramRequestStrategy extends BaseRequestStrategy {
117
117
  const requestId = headers['x-request-id'] || 'unknown';
118
118
  try {
119
119
  // 类型守卫,确保 wx 可用
120
+ // @ts-ignore
120
121
  const wxGlobal = typeof wx !== 'undefined' ? wx : null;
121
122
  if (!wxGlobal || !wxGlobal.request) {
122
123
  if (console?.error) {
package/cjs/index.d.ts CHANGED
@@ -2,6 +2,14 @@ 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 { PandoraAuthService } from './bff/modules/pandora/auth/service';
6
+ import { PandoraBDService } from './bff/modules/pandora/bd/service';
7
+ import { PandoraBDMService } from './bff/modules/pandora/bdm/service';
8
+ import { PandoraCommonService } from './bff/modules/pandora/common/service';
9
+ import { PandoraRoleService } from './bff/modules/pandora/role/service';
10
+ import { PandoraStoreClerkService } from './bff/modules/pandora/storeClerk/service';
11
+ import { PandoraStoreManagerService } from './bff/modules/pandora/storeManager/service';
12
+ import { PandoraUserService } from './bff/modules/pandora/user/service';
5
13
  import { PandoraProductService } from './bff/modules/pandora/product/service';
6
14
  import { PandoraProductExpService } from './bff/modules/pandora/productExp/service';
7
15
  import { PandoraProductLiveService } from './bff/modules/pandora/productLive/service';
@@ -26,6 +34,14 @@ export declare class PandoraSDK {
26
34
  * Pandora 示例服务模块
27
35
  */
28
36
  example: PandoraExampleService;
37
+ auth: PandoraAuthService;
38
+ bd: PandoraBDService;
39
+ bdm: PandoraBDMService;
40
+ common: PandoraCommonService;
41
+ role: PandoraRoleService;
42
+ storeClerk: PandoraStoreClerkService;
43
+ storeManager: PandoraStoreManagerService;
44
+ user: PandoraUserService;
29
45
  product: PandoraProductService;
30
46
  productExp: PandoraProductExpService;
31
47
  productLive: PandoraProductLiveService;
@@ -79,6 +95,14 @@ export { Service as MiniProgramDemoTypes } from './bff/modules/miniprogram/demo/
79
95
  export { Service as PandoraExampleTypes } from './bff/modules/pandora/example/types';
80
96
  export { StoreService as PandoraStoreServiceTypes } from './bff/modules/pandora/store/types';
81
97
  export { StoreUserRelationService as PandoraStoreUserRelationServiceTypes } from './bff/modules/pandora/storeUserRelation/types';
98
+ export { PandoraAuthService as PandoraAuthServiceTypes } from './bff/modules/pandora/auth/types';
99
+ export { PandoraBDService as PandoraBDServiceTypes } from './bff/modules/pandora/bd/types';
100
+ export { PandoraBDMService as PandoraBDMServiceTypes } from './bff/modules/pandora/bdm/types';
101
+ export { PandoraCommonService as PandoraCommonServiceTypes } from './bff/modules/pandora/common/types';
102
+ export { PandoraRoleService as PandoraRoleServiceTypes } from './bff/modules/pandora/role/types';
103
+ export { PandoraStoreClerkService as PandoraStoreClerkServiceTypes } from './bff/modules/pandora/storeClerk/types';
104
+ export { PandoraStoreManagerService as PandoraStoreManagerServiceTypes } from './bff/modules/pandora/storeManager/types';
105
+ export { PandoraUserService as PandoraUserServiceTypes } from './bff/modules/pandora/user/types';
82
106
  export { PandoraProductService as PandoraProductServiceTypes } from './bff/modules/pandora/product/types';
83
107
  export { PandoraProductExpService as PandoraProductExpServiceTypes } from './bff/modules/pandora/productExp/types';
84
108
  export { PandoraProductLiveService as PandoraProductLiveServiceTypes } from './bff/modules/pandora/productLive/types';
package/cjs/index.js CHANGED
@@ -20,16 +20,24 @@ const service_1 = require("./bff/modules/pandora/example/service");
20
20
  const service_2 = require("./bff/modules/pandora/store/service");
21
21
  const service_3 = require("./bff/modules/pandora/storeUserRelation/service");
22
22
  const service_4 = require("./bff/modules/miniprogram/demo/service");
23
- const service_5 = require("./bff/modules/pandora/product/service");
24
- const service_6 = require("./bff/modules/pandora/productExp/service");
25
- const service_7 = require("./bff/modules/pandora/productLive/service");
26
- const service_8 = require("./bff/modules/pandora/coupon/service");
27
- const service_9 = require("./bff/modules/pandora/room/service");
28
- const service_10 = require("./bff/modules/pandora/pointsMall/service");
29
- const service_11 = require("./bff/modules/pandora/orderQuery/service");
30
- const service_12 = require("./bff/modules/pandora/orderCore/service");
31
- const service_13 = require("./bff/modules/pandora/task/service");
32
- const service_14 = require("./bff/modules/pandora/pointRule/service");
23
+ const service_5 = require("./bff/modules/pandora/auth/service");
24
+ const service_6 = require("./bff/modules/pandora/bd/service");
25
+ const service_7 = require("./bff/modules/pandora/bdm/service");
26
+ const service_8 = require("./bff/modules/pandora/common/service");
27
+ const service_9 = require("./bff/modules/pandora/role/service");
28
+ const service_10 = require("./bff/modules/pandora/storeClerk/service");
29
+ const service_11 = require("./bff/modules/pandora/storeManager/service");
30
+ const service_12 = require("./bff/modules/pandora/user/service");
31
+ const service_13 = require("./bff/modules/pandora/product/service");
32
+ const service_14 = require("./bff/modules/pandora/productExp/service");
33
+ const service_15 = require("./bff/modules/pandora/productLive/service");
34
+ const service_16 = require("./bff/modules/pandora/coupon/service");
35
+ const service_17 = require("./bff/modules/pandora/room/service");
36
+ const service_18 = require("./bff/modules/pandora/pointsMall/service");
37
+ const service_19 = require("./bff/modules/pandora/orderQuery/service");
38
+ const service_20 = require("./bff/modules/pandora/orderCore/service");
39
+ const service_21 = require("./bff/modules/pandora/task/service");
40
+ const service_22 = require("./bff/modules/pandora/pointRule/service");
33
41
  /**
34
42
  * Pandora 平台 SDK(管理后台)
35
43
  * 包含所有 Pandora 平台相关的服务
@@ -44,18 +52,26 @@ class PandoraSDK {
44
52
  this.http = new client_1.HttpClient(options);
45
53
  // 使用 HttpClient 实例化所有 Pandora 服务模块
46
54
  this.example = new service_1.PandoraExampleService(this.http);
47
- this.product = new service_5.PandoraProductService(this.http);
48
- this.productExp = new service_6.PandoraProductExpService(this.http);
49
- this.productLive = new service_7.PandoraProductLiveService(this.http);
55
+ this.auth = new service_5.PandoraAuthService(this.http);
56
+ this.bd = new service_6.PandoraBDService(this.http);
57
+ this.bdm = new service_7.PandoraBDMService(this.http);
58
+ this.common = new service_8.PandoraCommonService(this.http);
59
+ this.role = new service_9.PandoraRoleService(this.http);
60
+ this.storeClerk = new service_10.PandoraStoreClerkService(this.http);
61
+ this.storeManager = new service_11.PandoraStoreManagerService(this.http);
62
+ this.user = new service_12.PandoraUserService(this.http);
63
+ this.product = new service_13.PandoraProductService(this.http);
64
+ this.productExp = new service_14.PandoraProductExpService(this.http);
65
+ this.productLive = new service_15.PandoraProductLiveService(this.http);
50
66
  this.store = new service_2.PandoraStoreService(this.http);
51
67
  this.storeUserRelation = new service_3.PandoraStoreUserRelationService(this.http);
52
- this.room = new service_9.PandoraRoomService(this.http);
53
- this.coupon = new service_8.PandoraCouponService(this.http);
54
- this.pointMall = new service_10.PandoraPointsMallService(this.http);
55
- this.orderQuery = new service_11.PandoraOrderQueryService(this.http);
56
- this.orderCore = new service_12.PandoraOrderCoreService(this.http);
57
- this.task = new service_13.PandoraTaskService(this.http);
58
- this.pointRule = new service_14.PandoraPointRuleService(this.http);
68
+ this.room = new service_17.PandoraRoomService(this.http);
69
+ this.coupon = new service_16.PandoraCouponService(this.http);
70
+ this.pointMall = new service_18.PandoraPointsMallService(this.http);
71
+ this.orderQuery = new service_19.PandoraOrderQueryService(this.http);
72
+ this.orderCore = new service_20.PandoraOrderCoreService(this.http);
73
+ this.task = new service_21.PandoraTaskService(this.http);
74
+ this.pointRule = new service_22.PandoraPointRuleService(this.http);
59
75
  }
60
76
  }
61
77
  exports.PandoraSDK = PandoraSDK;
package/cjs/utils/env.js CHANGED
@@ -9,6 +9,7 @@ exports.getContainerService = getContainerService;
9
9
  * @returns 如果在微信小程序环境中运行则返回 true
10
10
  */
11
11
  function isMiniProgram() {
12
+ // @ts-ignore
12
13
  return typeof wx !== 'undefined' && !!wx.cloud;
13
14
  }
14
15
  /**
@@ -43,6 +43,7 @@ function generateUUID() {
43
43
  return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20, 32)}`;
44
44
  }
45
45
  // 降级方案 2:微信小程序环境(尝试使用 wx.getRandomValues)
46
+ // @ts-ignore
46
47
  if (typeof wx !== 'undefined' && typeof wx.getRandomValues === 'function') {
47
48
  try {
48
49
  const bytes = new Uint8Array(16);
@@ -0,0 +1,22 @@
1
+ import { PandoraAuthService as Service } from './types';
2
+ import BaseService from '../../BaseService';
3
+ import type { StandardResponse } from '../../../../types';
4
+ /**
5
+ * PandoraAuthService - Pandora Auth 服务模块
6
+ * 提供 Pandora Auth 相关的 API 方法
7
+ * 平台: pandora
8
+ */
9
+ export declare class PandoraAuthService extends BaseService implements Service.AuthController {
10
+ protected prefixUrl: string;
11
+ /**
12
+ * 登录(支持账号密码和飞书登录)
13
+ * @param request - 请求参数
14
+ * @returns Promise,解析为标准响应格式
15
+ */
16
+ login(request: Service.Request.login): Promise<StandardResponse<Service.Response.login>>;
17
+ /**
18
+ * 获取权限树(从请求上下文获取 userId 和 roleId)
19
+ * @returns Promise,解析为标准响应格式
20
+ */
21
+ getPermissionTree(): Promise<StandardResponse<Service.Response.permissionTree>>;
22
+ }