@be-link/pos-cli-nodejs 1.0.225 → 1.0.227

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/pos-cli-nodejs",
3
- "version": "1.0.225",
3
+ "version": "1.0.227",
4
4
  "description": "正向订单服务Nodejs客户端",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -8,10 +8,8 @@ declare class OrderRoomShareService extends BaseService implements Service.Order
8
8
  save(request: Service.Request.save): Promise<Service.Response.save>;
9
9
  queryT1Candidates(request?: Service.Request.queryT1Candidates): Promise<Service.Response.queryT1Candidates>;
10
10
  queryT2Candidates(request?: Service.Request.queryT2Candidates): Promise<Service.Response.queryT2Candidates>;
11
- getPendingFollowSnapshotMaxId(request?: Service.Request.getPendingFollowSnapshotMaxId): Promise<Service.Response.getPendingFollowSnapshotMaxId>;
12
11
  getLifecycleFollowSnapshotMaxId(request?: Service.Request.getLifecycleFollowSnapshotMaxId): Promise<Service.Response.getLifecycleFollowSnapshotMaxId>;
13
- pagePendingFollowsRaw(request: Service.Request.pageFollowsRaw): Promise<Service.Response.pageFollowsRaw>;
14
- pageLifecycleFollowsRaw(request: Service.Request.pageFollowsRaw): Promise<Service.Response.pageFollowsRaw>;
12
+ pageFollowsRaw(request: Service.Request.pageFollowsRaw): Promise<Service.Response.pageFollowsRaw>;
15
13
  batchQueryLifecycleEligibility(request: Service.Request.batchQueryLifecycleEligibility): Promise<Service.Response.batchQueryLifecycleEligibility>;
16
14
  reconcile(request: Service.Request.reconcile): Promise<Service.Response.reconcile>;
17
15
  cleanup(request: Service.Request.cleanup): Promise<Service.Response.cleanup>;
@@ -28,17 +28,11 @@ class OrderRoomShareService extends service_1.default {
28
28
  queryT2Candidates(request = {}) {
29
29
  return (0, http_1.callApi)(this.getApiUrl(this.queryT2Candidates), request);
30
30
  }
31
- getPendingFollowSnapshotMaxId(request = {}) {
32
- return (0, http_1.callApi)(this.getApiUrl(this.getPendingFollowSnapshotMaxId), request);
33
- }
34
31
  getLifecycleFollowSnapshotMaxId(request = {}) {
35
32
  return (0, http_1.callApi)(this.getApiUrl(this.getLifecycleFollowSnapshotMaxId), request);
36
33
  }
37
- pagePendingFollowsRaw(request) {
38
- return (0, http_1.callApi)(this.getApiUrl(this.pagePendingFollowsRaw), request);
39
- }
40
- pageLifecycleFollowsRaw(request) {
41
- return (0, http_1.callApi)(this.getApiUrl(this.pageLifecycleFollowsRaw), request);
34
+ pageFollowsRaw(request) {
35
+ return (0, http_1.callApi)(this.getApiUrl(this.pageFollowsRaw), request);
42
36
  }
43
37
  batchQueryLifecycleEligibility(request) {
44
38
  return (0, http_1.callApi)(this.getApiUrl(this.batchQueryLifecycleEligibility), request);
@@ -39,21 +39,21 @@ describe('OrderRoomShareService', () => {
39
39
  ],
40
40
  ['queryT1Candidates', {}, 'query-t1-candidates'],
41
41
  ['queryT2Candidates', {}, 'query-t2-candidates'],
42
- ['getPendingFollowSnapshotMaxId', {}, 'get-pending-follow-snapshot-max-id'],
43
42
  ['getLifecycleFollowSnapshotMaxId', {}, 'get-lifecycle-follow-snapshot-max-id'],
44
43
  [
45
- 'pagePendingFollowsRaw',
46
- { snapshotMaxId: 'ffffffffffffffffffffffff', cursor: null, limit: 100 },
47
- 'page-pending-follows-raw',
44
+ 'pageFollowsRaw',
45
+ { scope: 'PENDING', snapshotMaxId: 'ffffffffffffffffffffffff', cursor: null, limit: 100 },
46
+ 'page-follows-raw',
48
47
  ],
49
48
  [
50
- 'pageLifecycleFollowsRaw',
49
+ 'pageFollowsRaw',
51
50
  {
51
+ scope: 'LIFECYCLE',
52
52
  snapshotMaxId: 'ffffffffffffffffffffffff',
53
53
  cursor: '00000000000000000000000f',
54
54
  limit: 100,
55
55
  },
56
- 'page-lifecycle-follows-raw',
56
+ 'page-follows-raw',
57
57
  ],
58
58
  [
59
59
  'batchQueryLifecycleEligibility',
@@ -71,12 +71,13 @@ describe('OrderRoomShareService', () => {
71
71
  yield service_1.default.queryT1Candidates();
72
72
  expect(mockedCallApi).toHaveBeenLastCalledWith(expect.any(String), {});
73
73
  const cursor = '00000000000000000000000f';
74
- yield service_1.default.pagePendingFollowsRaw({
74
+ yield service_1.default.pageFollowsRaw({
75
+ scope: 'PENDING',
75
76
  snapshotMaxId: 'ffffffffffffffffffffffff',
76
77
  cursor,
77
78
  limit: 200,
78
79
  });
79
- expect(mockedCallApi.mock.calls[1][1]).toMatchObject({ cursor });
80
+ expect(mockedCallApi.mock.calls[1][1]).toMatchObject({ scope: 'PENDING', cursor });
80
81
  expect(typeof mockedCallApi.mock.calls[1][1].cursor).toBe('string');
81
82
  }));
82
83
  it('二态配置和 nullable cursor 响应不做三态包装', () => __awaiter(void 0, void 0, void 0, function* () {
@@ -92,7 +93,8 @@ describe('OrderRoomShareService', () => {
92
93
  roomShareRequired: false,
93
94
  remark: '',
94
95
  });
95
- yield expect(service_1.default.pageLifecycleFollowsRaw({
96
+ yield expect(service_1.default.pageFollowsRaw({
97
+ scope: 'LIFECYCLE',
96
98
  snapshotMaxId: 'ffffffffffffffffffffffff',
97
99
  cursor: null,
98
100
  limit: 10,
@@ -18,9 +18,9 @@ export declare namespace Service {
18
18
  }
19
19
  type queryT1Candidates = Record<string, never>;
20
20
  type queryT2Candidates = Record<string, never>;
21
- type getPendingFollowSnapshotMaxId = Record<string, never>;
22
21
  type getLifecycleFollowSnapshotMaxId = Record<string, never>;
23
22
  interface pageFollowsRaw {
23
+ scope: 'PENDING' | 'LIFECYCLE';
24
24
  snapshotMaxId: string;
25
25
  cursor: string | null;
26
26
  limit: number;
@@ -78,7 +78,6 @@ export declare namespace Service {
78
78
  interface followSnapshot {
79
79
  snapshotMaxId: string | null;
80
80
  }
81
- type getPendingFollowSnapshotMaxId = followSnapshot;
82
81
  type getLifecycleFollowSnapshotMaxId = followSnapshot;
83
82
  interface rawFollow {
84
83
  id: string;
@@ -128,10 +127,8 @@ export declare namespace Service {
128
127
  save(request: Request.save): Promise<Response.save>;
129
128
  queryT1Candidates(request: Request.queryT1Candidates): Promise<Response.queryT1Candidates>;
130
129
  queryT2Candidates(request: Request.queryT2Candidates): Promise<Response.queryT2Candidates>;
131
- getPendingFollowSnapshotMaxId(request: Request.getPendingFollowSnapshotMaxId): Promise<Response.getPendingFollowSnapshotMaxId>;
132
130
  getLifecycleFollowSnapshotMaxId(request: Request.getLifecycleFollowSnapshotMaxId): Promise<Response.getLifecycleFollowSnapshotMaxId>;
133
- pagePendingFollowsRaw(request: Request.pageFollowsRaw): Promise<Response.pageFollowsRaw>;
134
- pageLifecycleFollowsRaw(request: Request.pageFollowsRaw): Promise<Response.pageFollowsRaw>;
131
+ pageFollowsRaw(request: Request.pageFollowsRaw): Promise<Response.pageFollowsRaw>;
135
132
  batchQueryLifecycleEligibility(request: Request.batchQueryLifecycleEligibility): Promise<Response.batchQueryLifecycleEligibility>;
136
133
  reconcile(request: Request.reconcile): Promise<Response.reconcile>;
137
134
  cleanup(request: Request.cleanup): Promise<Response.cleanup>;
@@ -72,7 +72,6 @@ export declare namespace Service {
72
72
  bizType: number;
73
73
  exHotelCode: string;
74
74
  exRoomTypeCode: string;
75
- exProductCode: string;
76
75
  exRatePlanCode: string;
77
76
  checkin: string;
78
77
  checkout: string;