@be-link/ecommerce-client-backend-service-node-sdk 0.1.46 → 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-
|
|
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([
|
|
@@ -95,6 +95,12 @@ export declare namespace MiniProgramService {
|
|
|
95
95
|
interface Used {
|
|
96
96
|
used: Info | null;
|
|
97
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* 当前正在使用的小程序信息(客户端接口,不包含 secret)
|
|
100
|
+
*/
|
|
101
|
+
interface ClientUsed {
|
|
102
|
+
used: ClientInfo | null;
|
|
103
|
+
}
|
|
98
104
|
/**
|
|
99
105
|
* 小程序列表
|
|
100
106
|
*/
|
|
@@ -118,6 +124,7 @@ export declare namespace MiniProgramService {
|
|
|
118
124
|
}
|
|
119
125
|
}
|
|
120
126
|
interface BaseController {
|
|
127
|
+
clientUsed(): Promise<Response.ClientUsed>;
|
|
121
128
|
used(req?: FastifyRequest): Promise<Response.Used>;
|
|
122
129
|
list(request: Request.List, req?: FastifyRequest): Promise<Response.List>;
|
|
123
130
|
create(request: Request.Create, req?: FastifyRequest): Promise<void>;
|
|
@@ -161,7 +168,24 @@ export interface Info {
|
|
|
161
168
|
/** 小程序 AppId */
|
|
162
169
|
appId: string;
|
|
163
170
|
/** 小程序 Secret */
|
|
164
|
-
secret
|
|
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;
|
|
165
189
|
/** 状态:0-封禁、1-正常 */
|
|
166
190
|
display: ENUM.MINI_PROGRAM.DISPLAY;
|
|
167
191
|
/** 是否使用中:0-否、1-是 */
|