@be-link/ecommerce-client-backend-service-node-sdk 0.1.44 → 0.1.47

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.
@@ -2,6 +2,7 @@ import { MiniProgramService } from './types';
2
2
  import BaseService from '../BaseService';
3
3
  declare class MiniProgramServiceClass extends BaseService implements MiniProgramService.BaseController {
4
4
  protected prefixUrl: string;
5
+ clientUsed(): Promise<MiniProgramService.Response.Used>;
5
6
  used(): Promise<MiniProgramService.Response.Used>;
6
7
  list(request: MiniProgramService.Request.List): Promise<MiniProgramService.Response.List>;
7
8
  create(request: MiniProgramService.Request.Create): Promise<void>;
@@ -21,6 +21,9 @@ let MiniProgramServiceClass = class MiniProgramServiceClass extends BaseService_
21
21
  super(...arguments);
22
22
  this.prefixUrl = '/mini-program';
23
23
  }
24
+ clientUsed() {
25
+ return (0, http_1.callApi)(this.getApiUrl(this.clientUsed), undefined);
26
+ }
24
27
  used() {
25
28
  return (0, http_1.callApi)(this.getApiUrl(this.used), undefined);
26
29
  }
@@ -50,7 +53,11 @@ let MiniProgramServiceClass = class MiniProgramServiceClass extends BaseService_
50
53
  }
51
54
  };
52
55
  __decorate([
53
- (0, tsoa_1.OperationId)('获取当前正在使用的小程序信息'),
56
+ (0, tsoa_1.OperationId)('客户端获取当前正在使用的小程序信息'),
57
+ (0, tsoa_1.Post)('used')
58
+ ], MiniProgramServiceClass.prototype, "clientUsed", null);
59
+ __decorate([
60
+ (0, tsoa_1.OperationId)('后台获取当前正在使用的小程序信息'),
54
61
  (0, tsoa_1.Post)('used')
55
62
  ], MiniProgramServiceClass.prototype, "used", null);
56
63
  __decorate([
@@ -85,7 +92,7 @@ __decorate([
85
92
  ], MiniProgramServiceClass.prototype, "getSecretByAppId", null);
86
93
  __decorate([
87
94
  (0, tsoa_1.OperationId)('检查AppId是否正在使用中'),
88
- (0, tsoa_1.Post)('check-appid-used'),
95
+ (0, tsoa_1.Post)('check-app-id-used'),
89
96
  __param(0, (0, tsoa_1.Body)())
90
97
  ], MiniProgramServiceClass.prototype, "checkAppIdUsed", null);
91
98
  __decorate([
@@ -9,10 +9,12 @@ export declare namespace MiniProgramService {
9
9
  * 小程序列表查询
10
10
  */
11
11
  interface List {
12
- /** 关键词搜索:小程序名称或 AppId */
12
+ /** 关键词搜索:小程序名称或公司主体 */
13
13
  keywords?: string;
14
14
  /** 状态:0-封禁、1-正常 */
15
15
  display?: ENUM.MINI_PROGRAM.DISPLAY;
16
+ /** 是否使用中:0-否、1-是 */
17
+ used?: ENUM.MINI_PROGRAM.USED;
16
18
  /** 页码,从0开始 */
17
19
  pageIndex: number;
18
20
  /** 每页数量,默认20,最大100 */
@@ -23,9 +25,9 @@ export declare namespace MiniProgramService {
23
25
  */
24
26
  interface Create {
25
27
  /** 公司主体 */
26
- corporate: string;
28
+ corporate?: string;
27
29
  /** 小程序名称 */
28
- name: string;
30
+ name?: string;
29
31
  /** 小程序 AppId */
30
32
  appId: string;
31
33
  /** 小程序 Secret */
@@ -93,6 +95,12 @@ export declare namespace MiniProgramService {
93
95
  interface Used {
94
96
  used: Info | null;
95
97
  }
98
+ /**
99
+ * 当前正在使用的小程序信息(客户端接口,不包含 secret)
100
+ */
101
+ interface ClientUsed {
102
+ used: ClientInfo | null;
103
+ }
96
104
  /**
97
105
  * 小程序列表
98
106
  */
@@ -116,6 +124,7 @@ export declare namespace MiniProgramService {
116
124
  }
117
125
  }
118
126
  interface BaseController {
127
+ clientUsed(): Promise<Response.ClientUsed>;
119
128
  used(req?: FastifyRequest): Promise<Response.Used>;
120
129
  list(request: Request.List, req?: FastifyRequest): Promise<Response.List>;
121
130
  create(request: Request.Create, req?: FastifyRequest): Promise<void>;
@@ -159,7 +168,24 @@ export interface Info {
159
168
  /** 小程序 AppId */
160
169
  appId: string;
161
170
  /** 小程序 Secret */
162
- secret: string;
171
+ secret?: string;
172
+ /** 状态:0-封禁、1-正常 */
173
+ display: ENUM.MINI_PROGRAM.DISPLAY;
174
+ /** 是否使用中:0-否、1-是 */
175
+ used: ENUM.MINI_PROGRAM.USED;
176
+ }
177
+ /**
178
+ * 客户端小程序信息(不包含 secret)
179
+ */
180
+ export interface ClientInfo {
181
+ /** 自增ID */
182
+ id: number;
183
+ /** 公司主体 */
184
+ corporate: string;
185
+ /** 小程序名称 */
186
+ name: string;
187
+ /** 小程序 AppId */
188
+ appId: string;
163
189
  /** 状态:0-封禁、1-正常 */
164
190
  display: ENUM.MINI_PROGRAM.DISPLAY;
165
191
  /** 是否使用中:0-否、1-是 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/ecommerce-client-backend-service-node-sdk",
3
- "version": "0.1.44",
3
+ "version": "0.1.47",
4
4
  "description": "EcommerceClientBackendService Node.js SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",