@be-link/ecommerce-backend-bff-service-node-sdk 0.1.19 → 0.1.21
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/verification/service.d.ts +17 -0
- package/cjs/bff/modules/miniprogram/verification/service.js +46 -0
- package/cjs/bff/modules/miniprogram/verification/types.d.ts +72 -0
- package/cjs/bff/modules/miniprogram/verification/types.js +2 -0
- package/cjs/bff/modules/pandora/userManager/service/coupon.service.d.ts +1 -0
- package/cjs/bff/modules/pandora/userManager/service/coupon.service.js +3 -0
- package/cjs/bff/modules/pandora/userManager/service/user.service.d.ts +1 -0
- package/cjs/bff/modules/pandora/userManager/service/user.service.js +3 -0
- package/cjs/bff/modules/pandora/userManager/types/coupon.types.d.ts +1 -0
- package/cjs/bff/modules/pandora/userManager/types/user.types.d.ts +1 -0
- package/cjs/index.d.ts +4 -0
- package/cjs/index.js +2 -0
- package/cjs/utils/string.js +1 -1
- package/esm/bff/modules/miniprogram/verification/service.d.ts +17 -0
- package/esm/bff/modules/miniprogram/verification/service.mjs +39 -0
- package/esm/bff/modules/miniprogram/verification/types.d.ts +72 -0
- package/esm/bff/modules/miniprogram/verification/types.mjs +1 -0
- package/esm/bff/modules/pandora/userManager/service/coupon.service.d.ts +1 -0
- package/esm/bff/modules/pandora/userManager/service/coupon.service.mjs +3 -0
- package/esm/bff/modules/pandora/userManager/service/user.service.d.ts +1 -0
- package/esm/bff/modules/pandora/userManager/service/user.service.mjs +3 -0
- package/esm/bff/modules/pandora/userManager/types/coupon.types.d.ts +1 -0
- package/esm/bff/modules/pandora/userManager/types/user.types.d.ts +1 -0
- package/esm/index.d.ts +4 -0
- package/esm/index.mjs +2 -0
- package/esm/utils/string.mjs +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MiniprogramVerificationService as Service } from './types';
|
|
2
|
+
import BaseService from '../../BaseService';
|
|
3
|
+
import type { StandardResponse } from '../../../../types';
|
|
4
|
+
/**
|
|
5
|
+
* MiniprogramUserService - 小程序用户服务模块
|
|
6
|
+
* 提供小程序用户相关的 API 方法
|
|
7
|
+
* 平台: miniprogram
|
|
8
|
+
*/
|
|
9
|
+
export declare class MiniprogramVerificationService extends BaseService implements Service.VerificationController {
|
|
10
|
+
protected prefixUrl: string;
|
|
11
|
+
/** 根据手机尾号、门店,查询核销订单手机号列表 */
|
|
12
|
+
getPhonesByPhoneEndStoreId(request: Service.Request.getPhonesByPhoneEndStoreId): Promise<StandardResponse<Service.Response.getPhonesByPhoneEndStoreId>>;
|
|
13
|
+
/** 查询核销订单 */
|
|
14
|
+
queryOrders(request: Service.Request.queryOrders): Promise<StandardResponse<Service.Response.queryOrders>>;
|
|
15
|
+
/** 核销订单 */
|
|
16
|
+
verifyOrders(request: Service.Request.verifyOrders): Promise<StandardResponse<void>>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
9
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.MiniprogramVerificationService = void 0;
|
|
16
|
+
const BaseService_1 = __importDefault(require("../../BaseService"));
|
|
17
|
+
/**
|
|
18
|
+
* MiniprogramUserService - 小程序用户服务模块
|
|
19
|
+
* 提供小程序用户相关的 API 方法
|
|
20
|
+
* 平台: miniprogram
|
|
21
|
+
*/
|
|
22
|
+
class MiniprogramVerificationService extends BaseService_1.default {
|
|
23
|
+
constructor() {
|
|
24
|
+
super(...arguments);
|
|
25
|
+
this.prefixUrl = '/miniprogram/verification';
|
|
26
|
+
}
|
|
27
|
+
/** 根据手机尾号、门店,查询核销订单手机号列表 */
|
|
28
|
+
getPhonesByPhoneEndStoreId(request) {
|
|
29
|
+
return this.request(this.getPhonesByPhoneEndStoreId, request);
|
|
30
|
+
}
|
|
31
|
+
/** 查询核销订单 */
|
|
32
|
+
queryOrders(request) {
|
|
33
|
+
return this.request(this.queryOrders, request);
|
|
34
|
+
}
|
|
35
|
+
/** 核销订单 */
|
|
36
|
+
verifyOrders(request) {
|
|
37
|
+
return this.request(this.verifyOrders, request);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.MiniprogramVerificationService = MiniprogramVerificationService;
|
|
41
|
+
__decorate([
|
|
42
|
+
__param(0, body())
|
|
43
|
+
], MiniprogramVerificationService.prototype, "getPhonesByPhoneEndStoreId", null);
|
|
44
|
+
function body() {
|
|
45
|
+
throw new Error('Function not implemented.');
|
|
46
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { StandardResponse } from '../../../../types';
|
|
2
|
+
export declare namespace MiniprogramVerificationService {
|
|
3
|
+
interface ProductBase {
|
|
4
|
+
productId: string;
|
|
5
|
+
productName: string;
|
|
6
|
+
productImg: string;
|
|
7
|
+
skuId: string;
|
|
8
|
+
quantity: number;
|
|
9
|
+
skuValue: string;
|
|
10
|
+
}
|
|
11
|
+
export interface verifyCommonItem extends ProductBase {
|
|
12
|
+
orderId: string;
|
|
13
|
+
consignee?: string;
|
|
14
|
+
userId?: string;
|
|
15
|
+
memberLevel?: number;
|
|
16
|
+
addTime?: number;
|
|
17
|
+
isReadonly?: boolean;
|
|
18
|
+
tips?: string;
|
|
19
|
+
bindItems: ProductBase[];
|
|
20
|
+
}
|
|
21
|
+
export type orderItem = verifyCommonItem;
|
|
22
|
+
export interface couponItem extends verifyCommonItem {
|
|
23
|
+
couponName?: string;
|
|
24
|
+
}
|
|
25
|
+
export namespace Request {
|
|
26
|
+
interface getPhonesByPhoneEndStoreId {
|
|
27
|
+
/** 手机尾号 */
|
|
28
|
+
phoneEnd: string;
|
|
29
|
+
/** 门店Id */
|
|
30
|
+
storeId: string;
|
|
31
|
+
}
|
|
32
|
+
interface queryOrders {
|
|
33
|
+
/** 手机号 */
|
|
34
|
+
phone?: string;
|
|
35
|
+
/** 用户userId */
|
|
36
|
+
userId?: string;
|
|
37
|
+
/** 门店Id */
|
|
38
|
+
storeId: string;
|
|
39
|
+
}
|
|
40
|
+
interface verifyOrders {
|
|
41
|
+
/** 门店ID */
|
|
42
|
+
storeId: string;
|
|
43
|
+
/** 核销方式 */
|
|
44
|
+
verifyType: 'PHONE' | 'USER';
|
|
45
|
+
verifyOrderItem: {
|
|
46
|
+
/** 订单ID */
|
|
47
|
+
orderId: string;
|
|
48
|
+
/** 核销数量 */
|
|
49
|
+
quantity: number;
|
|
50
|
+
}[];
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
export namespace Response {
|
|
54
|
+
interface getPhonesByPhoneEndStoreId {
|
|
55
|
+
/** 手机号列表 */
|
|
56
|
+
phones: string[];
|
|
57
|
+
}
|
|
58
|
+
interface queryOrders {
|
|
59
|
+
order: orderItem[];
|
|
60
|
+
coupon: couponItem[];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
export interface VerificationController {
|
|
64
|
+
/** 根据手机尾号、门店,查询核销订单手机号列表 */
|
|
65
|
+
getPhonesByPhoneEndStoreId(request: Request.getPhonesByPhoneEndStoreId): Promise<StandardResponse<Response.getPhonesByPhoneEndStoreId>>;
|
|
66
|
+
/** 查询核销订单 */
|
|
67
|
+
queryOrders(request: Request.queryOrders): Promise<StandardResponse<Response.queryOrders>>;
|
|
68
|
+
/** 核销订单 */
|
|
69
|
+
verifyOrders(request: Request.verifyOrders): Promise<StandardResponse<void>>;
|
|
70
|
+
}
|
|
71
|
+
export {};
|
|
72
|
+
}
|
|
@@ -8,4 +8,5 @@ export declare class PandoraCouponManagementService extends BaseService implemen
|
|
|
8
8
|
batchInvalidateCoupons(request: PandoraCouponManagementTypes.Request.batchInvalidateCoupons): Promise<StandardResponse<PandoraCouponManagementTypes.Response.batchInvalidateCoupons>>;
|
|
9
9
|
getUserCouponList(request: PandoraCouponManagementTypes.Request.getUserCouponList): Promise<StandardResponse<PandoraCouponManagementTypes.Response.getUserCouponList>>;
|
|
10
10
|
getCouponDetail(request: PandoraCouponManagementTypes.Request.getCouponDetail): Promise<StandardResponse<PandoraCouponManagementTypes.Response.getCouponDetail>>;
|
|
11
|
+
batchVerifyCoupons(request: PandoraCouponManagementTypes.Request.batchVerifyCoupons): Promise<StandardResponse<PandoraCouponManagementTypes.Response.batchVerifyCoupons>>;
|
|
11
12
|
}
|
|
@@ -25,5 +25,8 @@ class PandoraCouponManagementService extends BaseService_1.default {
|
|
|
25
25
|
getCouponDetail(request) {
|
|
26
26
|
return this.request(this.getCouponDetail, request);
|
|
27
27
|
}
|
|
28
|
+
batchVerifyCoupons(request) {
|
|
29
|
+
return this.request(this.batchVerifyCoupons, request);
|
|
30
|
+
}
|
|
28
31
|
}
|
|
29
32
|
exports.PandoraCouponManagementService = PandoraCouponManagementService;
|
|
@@ -9,4 +9,5 @@ export declare class PandoraUserManagementService extends BaseService implements
|
|
|
9
9
|
batchUpdateUserStatus(request: PandoraUserManagementTypes.Request.batchUpdateUserStatus): Promise<StandardResponse<PandoraUserManagementTypes.Response.batchUpdateUserStatus>>;
|
|
10
10
|
bindUsersToStore(request: PandoraUserManagementTypes.Request.bindUsersToStore): Promise<StandardResponse<PandoraUserManagementTypes.Response.bindUsersToStore>>;
|
|
11
11
|
unbindUsersFromStore(request: PandoraUserManagementTypes.Request.unbindUsersFromStore): Promise<StandardResponse<PandoraUserManagementTypes.Response.unbindUsersFromStore>>;
|
|
12
|
+
getUserByUnionId(request: PandoraUserManagementTypes.Request.getUserByUnionId): Promise<StandardResponse<PandoraUserManagementTypes.Response.getUserByUnionId>>;
|
|
12
13
|
}
|
|
@@ -28,5 +28,8 @@ class PandoraUserManagementService extends BaseService_1.default {
|
|
|
28
28
|
unbindUsersFromStore(request) {
|
|
29
29
|
return this.request(this.unbindUsersFromStore, request);
|
|
30
30
|
}
|
|
31
|
+
getUserByUnionId(request) {
|
|
32
|
+
return this.request(this.getUserByUnionId, request);
|
|
33
|
+
}
|
|
31
34
|
}
|
|
32
35
|
exports.PandoraUserManagementService = PandoraUserManagementService;
|
|
@@ -13,5 +13,6 @@ export declare namespace PandoraCouponManagementTypes {
|
|
|
13
13
|
batchInvalidateCoupons(request: Request.batchInvalidateCoupons): Promise<StandardResponse<Response.batchInvalidateCoupons>>;
|
|
14
14
|
getUserCouponList(request: Request.getUserCouponList): Promise<StandardResponse<Response.getUserCouponList>>;
|
|
15
15
|
getCouponDetail(request: Request.getCouponDetail): Promise<StandardResponse<Response.getCouponDetail>>;
|
|
16
|
+
batchVerifyCoupons(request: Request.batchVerifyCoupons): Promise<StandardResponse<Response.batchVerifyCoupons>>;
|
|
16
17
|
}
|
|
17
18
|
}
|
|
@@ -14,5 +14,6 @@ export declare namespace PandoraUserManagementTypes {
|
|
|
14
14
|
batchUpdateUserStatus(request: Request.batchUpdateUserStatus): Promise<StandardResponse<Response.batchUpdateUserStatus>>;
|
|
15
15
|
bindUsersToStore(request: Request.bindUsersToStore): Promise<StandardResponse<Response.bindUsersToStore>>;
|
|
16
16
|
unbindUsersFromStore(request: Request.unbindUsersFromStore): Promise<StandardResponse<Response.unbindUsersFromStore>>;
|
|
17
|
+
getUserByUnionId(request: Request.getUserByUnionId): Promise<StandardResponse<Response.getUserByUnionId>>;
|
|
17
18
|
}
|
|
18
19
|
}
|
package/cjs/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ import { PandoraStoreManagerService } from './bff/modules/pandora/storeManager/s
|
|
|
32
32
|
import { PandoraAwardService } from './bff/modules/pandora/award/service';
|
|
33
33
|
import { PandoraFranchiseeService } from './bff/modules/pandora/franchisee/service';
|
|
34
34
|
import { MiniprogramFranchiseeService } from './bff/modules/miniprogram/franchisee/service';
|
|
35
|
+
import { MiniprogramVerificationService } from './bff/modules/miniprogram/verification/service';
|
|
35
36
|
import { SdkOptions } from './types';
|
|
36
37
|
/**
|
|
37
38
|
* Pandora 平台 SDK(管理后台)
|
|
@@ -118,6 +119,8 @@ export declare class MiniProgramSDK {
|
|
|
118
119
|
* 加盟商模块
|
|
119
120
|
*/
|
|
120
121
|
franchisee: MiniprogramFranchiseeService;
|
|
122
|
+
/** 核销 */
|
|
123
|
+
verification: MiniprogramVerificationService;
|
|
121
124
|
/**
|
|
122
125
|
* 使用配置选项初始化小程序 SDK
|
|
123
126
|
* @param options - SDK 配置,包含凭证回调函数
|
|
@@ -157,3 +160,4 @@ export { PointMallService as PointMallServiceTypes } from './bff/modules/pandora
|
|
|
157
160
|
export { AwardService as PandoraAwardServiceTypes } from './bff/modules/pandora/award/types';
|
|
158
161
|
export { PandoraFranchiseeService as PandoraFranchiseeServiceTypes } from './bff/modules/pandora/franchisee/types';
|
|
159
162
|
export { MiniprogramFranchiseeService as MiniprogramFranchiseeServiceTypes } from './bff/modules/miniprogram/franchisee/types';
|
|
163
|
+
export { MiniprogramVerificationService as MiniprogramVerificationServiceTypes } from './bff/modules/miniprogram/verification/types';
|
package/cjs/index.js
CHANGED
|
@@ -50,6 +50,7 @@ const service_26 = require("./bff/modules/pandora/storeManager/service");
|
|
|
50
50
|
const service_27 = require("./bff/modules/pandora/award/service");
|
|
51
51
|
const service_28 = require("./bff/modules/pandora/franchisee/service");
|
|
52
52
|
const service_29 = require("./bff/modules/miniprogram/franchisee/service");
|
|
53
|
+
const service_30 = require("./bff/modules/miniprogram/verification/service");
|
|
53
54
|
/**
|
|
54
55
|
* Pandora 平台 SDK(管理后台)
|
|
55
56
|
* 包含所有 Pandora 平台相关的服务
|
|
@@ -125,6 +126,7 @@ class MiniProgramSDK {
|
|
|
125
126
|
this.auth = new service_3.MiniprogramAuthServiceClass(this.http);
|
|
126
127
|
this.user = new service_4.MiniprogramUserServiceClass(this.http);
|
|
127
128
|
this.franchisee = new service_29.MiniprogramFranchiseeService(this.http);
|
|
129
|
+
this.verification = new service_30.MiniprogramVerificationService(this.http);
|
|
128
130
|
}
|
|
129
131
|
}
|
|
130
132
|
exports.MiniProgramSDK = MiniProgramSDK;
|
package/cjs/utils/string.js
CHANGED
|
@@ -12,7 +12,7 @@ exports.generateUUID = generateUUID;
|
|
|
12
12
|
* camelToKebabCase('getUserProfile') // 'get-user-profile'
|
|
13
13
|
*/
|
|
14
14
|
function camelToKebabCase(str) {
|
|
15
|
-
return str.replace(/
|
|
15
|
+
return str.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* 生成 UUID v4 格式的唯一标识符
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MiniprogramVerificationService as Service } from './types';
|
|
2
|
+
import BaseService from '../../BaseService';
|
|
3
|
+
import type { StandardResponse } from '../../../../types';
|
|
4
|
+
/**
|
|
5
|
+
* MiniprogramUserService - 小程序用户服务模块
|
|
6
|
+
* 提供小程序用户相关的 API 方法
|
|
7
|
+
* 平台: miniprogram
|
|
8
|
+
*/
|
|
9
|
+
export declare class MiniprogramVerificationService extends BaseService implements Service.VerificationController {
|
|
10
|
+
protected prefixUrl: string;
|
|
11
|
+
/** 根据手机尾号、门店,查询核销订单手机号列表 */
|
|
12
|
+
getPhonesByPhoneEndStoreId(request: Service.Request.getPhonesByPhoneEndStoreId): Promise<StandardResponse<Service.Response.getPhonesByPhoneEndStoreId>>;
|
|
13
|
+
/** 查询核销订单 */
|
|
14
|
+
queryOrders(request: Service.Request.queryOrders): Promise<StandardResponse<Service.Response.queryOrders>>;
|
|
15
|
+
/** 核销订单 */
|
|
16
|
+
verifyOrders(request: Service.Request.verifyOrders): Promise<StandardResponse<void>>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
8
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
9
|
+
};
|
|
10
|
+
import BaseService from '../../BaseService.mjs';
|
|
11
|
+
/**
|
|
12
|
+
* MiniprogramUserService - 小程序用户服务模块
|
|
13
|
+
* 提供小程序用户相关的 API 方法
|
|
14
|
+
* 平台: miniprogram
|
|
15
|
+
*/
|
|
16
|
+
export class MiniprogramVerificationService extends BaseService {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments);
|
|
19
|
+
this.prefixUrl = '/miniprogram/verification';
|
|
20
|
+
}
|
|
21
|
+
/** 根据手机尾号、门店,查询核销订单手机号列表 */
|
|
22
|
+
getPhonesByPhoneEndStoreId(request) {
|
|
23
|
+
return this.request(this.getPhonesByPhoneEndStoreId, request);
|
|
24
|
+
}
|
|
25
|
+
/** 查询核销订单 */
|
|
26
|
+
queryOrders(request) {
|
|
27
|
+
return this.request(this.queryOrders, request);
|
|
28
|
+
}
|
|
29
|
+
/** 核销订单 */
|
|
30
|
+
verifyOrders(request) {
|
|
31
|
+
return this.request(this.verifyOrders, request);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
__decorate([
|
|
35
|
+
__param(0, body())
|
|
36
|
+
], MiniprogramVerificationService.prototype, "getPhonesByPhoneEndStoreId", null);
|
|
37
|
+
function body() {
|
|
38
|
+
throw new Error('Function not implemented.');
|
|
39
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { StandardResponse } from '../../../../types';
|
|
2
|
+
export declare namespace MiniprogramVerificationService {
|
|
3
|
+
interface ProductBase {
|
|
4
|
+
productId: string;
|
|
5
|
+
productName: string;
|
|
6
|
+
productImg: string;
|
|
7
|
+
skuId: string;
|
|
8
|
+
quantity: number;
|
|
9
|
+
skuValue: string;
|
|
10
|
+
}
|
|
11
|
+
export interface verifyCommonItem extends ProductBase {
|
|
12
|
+
orderId: string;
|
|
13
|
+
consignee?: string;
|
|
14
|
+
userId?: string;
|
|
15
|
+
memberLevel?: number;
|
|
16
|
+
addTime?: number;
|
|
17
|
+
isReadonly?: boolean;
|
|
18
|
+
tips?: string;
|
|
19
|
+
bindItems: ProductBase[];
|
|
20
|
+
}
|
|
21
|
+
export type orderItem = verifyCommonItem;
|
|
22
|
+
export interface couponItem extends verifyCommonItem {
|
|
23
|
+
couponName?: string;
|
|
24
|
+
}
|
|
25
|
+
export namespace Request {
|
|
26
|
+
interface getPhonesByPhoneEndStoreId {
|
|
27
|
+
/** 手机尾号 */
|
|
28
|
+
phoneEnd: string;
|
|
29
|
+
/** 门店Id */
|
|
30
|
+
storeId: string;
|
|
31
|
+
}
|
|
32
|
+
interface queryOrders {
|
|
33
|
+
/** 手机号 */
|
|
34
|
+
phone?: string;
|
|
35
|
+
/** 用户userId */
|
|
36
|
+
userId?: string;
|
|
37
|
+
/** 门店Id */
|
|
38
|
+
storeId: string;
|
|
39
|
+
}
|
|
40
|
+
interface verifyOrders {
|
|
41
|
+
/** 门店ID */
|
|
42
|
+
storeId: string;
|
|
43
|
+
/** 核销方式 */
|
|
44
|
+
verifyType: 'PHONE' | 'USER';
|
|
45
|
+
verifyOrderItem: {
|
|
46
|
+
/** 订单ID */
|
|
47
|
+
orderId: string;
|
|
48
|
+
/** 核销数量 */
|
|
49
|
+
quantity: number;
|
|
50
|
+
}[];
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
export namespace Response {
|
|
54
|
+
interface getPhonesByPhoneEndStoreId {
|
|
55
|
+
/** 手机号列表 */
|
|
56
|
+
phones: string[];
|
|
57
|
+
}
|
|
58
|
+
interface queryOrders {
|
|
59
|
+
order: orderItem[];
|
|
60
|
+
coupon: couponItem[];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
export interface VerificationController {
|
|
64
|
+
/** 根据手机尾号、门店,查询核销订单手机号列表 */
|
|
65
|
+
getPhonesByPhoneEndStoreId(request: Request.getPhonesByPhoneEndStoreId): Promise<StandardResponse<Response.getPhonesByPhoneEndStoreId>>;
|
|
66
|
+
/** 查询核销订单 */
|
|
67
|
+
queryOrders(request: Request.queryOrders): Promise<StandardResponse<Response.queryOrders>>;
|
|
68
|
+
/** 核销订单 */
|
|
69
|
+
verifyOrders(request: Request.verifyOrders): Promise<StandardResponse<void>>;
|
|
70
|
+
}
|
|
71
|
+
export {};
|
|
72
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -8,4 +8,5 @@ export declare class PandoraCouponManagementService extends BaseService implemen
|
|
|
8
8
|
batchInvalidateCoupons(request: PandoraCouponManagementTypes.Request.batchInvalidateCoupons): Promise<StandardResponse<PandoraCouponManagementTypes.Response.batchInvalidateCoupons>>;
|
|
9
9
|
getUserCouponList(request: PandoraCouponManagementTypes.Request.getUserCouponList): Promise<StandardResponse<PandoraCouponManagementTypes.Response.getUserCouponList>>;
|
|
10
10
|
getCouponDetail(request: PandoraCouponManagementTypes.Request.getCouponDetail): Promise<StandardResponse<PandoraCouponManagementTypes.Response.getCouponDetail>>;
|
|
11
|
+
batchVerifyCoupons(request: PandoraCouponManagementTypes.Request.batchVerifyCoupons): Promise<StandardResponse<PandoraCouponManagementTypes.Response.batchVerifyCoupons>>;
|
|
11
12
|
}
|
|
@@ -9,4 +9,5 @@ export declare class PandoraUserManagementService extends BaseService implements
|
|
|
9
9
|
batchUpdateUserStatus(request: PandoraUserManagementTypes.Request.batchUpdateUserStatus): Promise<StandardResponse<PandoraUserManagementTypes.Response.batchUpdateUserStatus>>;
|
|
10
10
|
bindUsersToStore(request: PandoraUserManagementTypes.Request.bindUsersToStore): Promise<StandardResponse<PandoraUserManagementTypes.Response.bindUsersToStore>>;
|
|
11
11
|
unbindUsersFromStore(request: PandoraUserManagementTypes.Request.unbindUsersFromStore): Promise<StandardResponse<PandoraUserManagementTypes.Response.unbindUsersFromStore>>;
|
|
12
|
+
getUserByUnionId(request: PandoraUserManagementTypes.Request.getUserByUnionId): Promise<StandardResponse<PandoraUserManagementTypes.Response.getUserByUnionId>>;
|
|
12
13
|
}
|
|
@@ -13,5 +13,6 @@ export declare namespace PandoraCouponManagementTypes {
|
|
|
13
13
|
batchInvalidateCoupons(request: Request.batchInvalidateCoupons): Promise<StandardResponse<Response.batchInvalidateCoupons>>;
|
|
14
14
|
getUserCouponList(request: Request.getUserCouponList): Promise<StandardResponse<Response.getUserCouponList>>;
|
|
15
15
|
getCouponDetail(request: Request.getCouponDetail): Promise<StandardResponse<Response.getCouponDetail>>;
|
|
16
|
+
batchVerifyCoupons(request: Request.batchVerifyCoupons): Promise<StandardResponse<Response.batchVerifyCoupons>>;
|
|
16
17
|
}
|
|
17
18
|
}
|
|
@@ -14,5 +14,6 @@ export declare namespace PandoraUserManagementTypes {
|
|
|
14
14
|
batchUpdateUserStatus(request: Request.batchUpdateUserStatus): Promise<StandardResponse<Response.batchUpdateUserStatus>>;
|
|
15
15
|
bindUsersToStore(request: Request.bindUsersToStore): Promise<StandardResponse<Response.bindUsersToStore>>;
|
|
16
16
|
unbindUsersFromStore(request: Request.unbindUsersFromStore): Promise<StandardResponse<Response.unbindUsersFromStore>>;
|
|
17
|
+
getUserByUnionId(request: Request.getUserByUnionId): Promise<StandardResponse<Response.getUserByUnionId>>;
|
|
17
18
|
}
|
|
18
19
|
}
|
package/esm/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ import { PandoraStoreManagerService } from './bff/modules/pandora/storeManager/s
|
|
|
32
32
|
import { PandoraAwardService } from './bff/modules/pandora/award/service';
|
|
33
33
|
import { PandoraFranchiseeService } from './bff/modules/pandora/franchisee/service';
|
|
34
34
|
import { MiniprogramFranchiseeService } from './bff/modules/miniprogram/franchisee/service';
|
|
35
|
+
import { MiniprogramVerificationService } from './bff/modules/miniprogram/verification/service';
|
|
35
36
|
import { SdkOptions } from './types';
|
|
36
37
|
/**
|
|
37
38
|
* Pandora 平台 SDK(管理后台)
|
|
@@ -118,6 +119,8 @@ export declare class MiniProgramSDK {
|
|
|
118
119
|
* 加盟商模块
|
|
119
120
|
*/
|
|
120
121
|
franchisee: MiniprogramFranchiseeService;
|
|
122
|
+
/** 核销 */
|
|
123
|
+
verification: MiniprogramVerificationService;
|
|
121
124
|
/**
|
|
122
125
|
* 使用配置选项初始化小程序 SDK
|
|
123
126
|
* @param options - SDK 配置,包含凭证回调函数
|
|
@@ -157,3 +160,4 @@ export { PointMallService as PointMallServiceTypes } from './bff/modules/pandora
|
|
|
157
160
|
export { AwardService as PandoraAwardServiceTypes } from './bff/modules/pandora/award/types';
|
|
158
161
|
export { PandoraFranchiseeService as PandoraFranchiseeServiceTypes } from './bff/modules/pandora/franchisee/types';
|
|
159
162
|
export { MiniprogramFranchiseeService as MiniprogramFranchiseeServiceTypes } from './bff/modules/miniprogram/franchisee/types';
|
|
163
|
+
export { MiniprogramVerificationService as MiniprogramVerificationServiceTypes } from './bff/modules/miniprogram/verification/types';
|
package/esm/index.mjs
CHANGED
|
@@ -33,6 +33,7 @@ import { PandoraStoreManagerService } from './bff/modules/pandora/storeManager/s
|
|
|
33
33
|
import { PandoraAwardService } from './bff/modules/pandora/award/service.mjs';
|
|
34
34
|
import { PandoraFranchiseeService } from './bff/modules/pandora/franchisee/service.mjs';
|
|
35
35
|
import { MiniprogramFranchiseeService } from './bff/modules/miniprogram/franchisee/service.mjs';
|
|
36
|
+
import { MiniprogramVerificationService } from './bff/modules/miniprogram/verification/service.mjs';
|
|
36
37
|
/**
|
|
37
38
|
* Pandora 平台 SDK(管理后台)
|
|
38
39
|
* 包含所有 Pandora 平台相关的服务
|
|
@@ -107,6 +108,7 @@ export class MiniProgramSDK {
|
|
|
107
108
|
this.auth = new MiniprogramAuthServiceClass(this.http);
|
|
108
109
|
this.user = new MiniprogramUserServiceClass(this.http);
|
|
109
110
|
this.franchisee = new MiniprogramFranchiseeService(this.http);
|
|
111
|
+
this.verification = new MiniprogramVerificationService(this.http);
|
|
110
112
|
}
|
|
111
113
|
}
|
|
112
114
|
// ==================== 导出 ====================
|
package/esm/utils/string.mjs
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* camelToKebabCase('getUserProfile') // 'get-user-profile'
|
|
9
9
|
*/
|
|
10
10
|
export function camelToKebabCase(str) {
|
|
11
|
-
return str.replace(/
|
|
11
|
+
return str.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* 生成 UUID v4 格式的唯一标识符
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@be-link/ecommerce-backend-bff-service-node-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21",
|
|
4
4
|
"description": "EcommerceBackendBffService Node.js SDK",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./cjs/index.js",
|
|
@@ -24,17 +24,17 @@
|
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@be-link/ecommerce-trade-service-node-sdk": "^0.1.
|
|
27
|
+
"@be-link/ecommerce-trade-service-node-sdk": "^0.1.13",
|
|
28
28
|
"@be-link/ecommerce-backend-user-service-node-sdk": "^0.1.8",
|
|
29
29
|
"@be-link/ecommerce-volcengine-open-api-sdk": "^1.0.22",
|
|
30
|
-
"@be-link/ecommerce-client-backend-service-node-sdk": "^0.1.
|
|
30
|
+
"@be-link/ecommerce-client-backend-service-node-sdk": "^0.1.9",
|
|
31
31
|
"@be-link/ecommerce-tag-service-node-sdk": "^0.1.1",
|
|
32
32
|
"@be-link/ecommerce-store-service-node-sdk": "^0.1.3",
|
|
33
33
|
"@be-link/ecommerce-promotion-service-node-sdk": "^0.1.3",
|
|
34
34
|
"axios": "^1.13.2",
|
|
35
|
-
"@be-link/ecommerce-user-service-node-sdk": "^0.1.
|
|
35
|
+
"@be-link/ecommerce-user-service-node-sdk": "^0.1.13",
|
|
36
36
|
"@be-link/ecommerce-product-service-node-sdk": "^0.1.2",
|
|
37
|
-
"@be-link/ecommerce-task-center-service-node-sdk": "^0.1.
|
|
37
|
+
"@be-link/ecommerce-task-center-service-node-sdk": "^0.1.10"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"tsoa": "^6.4.0",
|