@trusted-solutions/sdit.models 0.18.0-alpha.20 → 0.18.0-alpha.22

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.
@@ -1,3 +1,2 @@
1
1
  export * from './industry';
2
2
  export * from './district-zip.taiwan';
3
- export * from './client-endpoints';
@@ -3,5 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./industry"), exports);
5
5
  tslib_1.__exportStar(require("./district-zip.taiwan"), exports);
6
- tslib_1.__exportStar(require("./client-endpoints"), exports);
7
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/constants/index.ts"],"names":[],"mappings":";;;AAAA,qDAA2B;AAC3B,gEAAsC;AACtC,6DAAmC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/constants/index.ts"],"names":[],"mappings":";;;AAAA,qDAA2B;AAC3B,gEAAsC"}
@@ -0,0 +1,76 @@
1
+ import { Contract, PlanLimits, Plan, ContractCore } from '../models/contract';
2
+ /**
3
+ * Get Store Contract use case
4
+ */
5
+ export interface GetStoreContractRequest {
6
+ storeId: string;
7
+ }
8
+ export interface GetStoreContractResponse {
9
+ currentContract: Contract;
10
+ originalContract: Contract;
11
+ upcomingContract: Contract;
12
+ }
13
+ /**
14
+ * Get Current Store Contract use case
15
+ */
16
+ export interface GetCurrentStoreContractLimitRequest {
17
+ contractId: string;
18
+ /**
19
+ * 沒給的話,回傳全部的limit
20
+ */
21
+ limitKeys?: string[];
22
+ }
23
+ export interface GetCurrentStoreContractLimitResponse {
24
+ storeId: string;
25
+ contractId: string;
26
+ eachLimits: PlanLimits;
27
+ }
28
+ /**
29
+ * Create Contract use case
30
+ */
31
+ export declare type CreateContractRequest = ContractCore;
32
+ export declare type CreateContractResponse = Contract;
33
+ /**
34
+ * Update Contract Duration use case
35
+ */
36
+ export interface UpdateContractDurationRequest {
37
+ contractId: string;
38
+ startedAt: number;
39
+ endedAt: number;
40
+ }
41
+ export declare type UpdateContractDurationResponse = null;
42
+ /**
43
+ * Update Contract Plan use case
44
+ */
45
+ export interface UpdateContractPlanRequest {
46
+ contractId: string;
47
+ planId: string;
48
+ }
49
+ export declare type UpdateContractPlanResponse = null;
50
+ /**
51
+ * Update Contract ForStore use case
52
+ */
53
+ export interface UpdateContractForStoreRequest {
54
+ contractId: string;
55
+ forStoreId: string;
56
+ }
57
+ export declare type UpdateContractForStoreResponse = null;
58
+ /**
59
+ * Update Contract Owner use case
60
+ */
61
+ export interface UpdateContractOwnerRequest {
62
+ contractId: string;
63
+ ownerCognitoUserId: string;
64
+ }
65
+ export declare type UpdateContractOwnerResponse = null;
66
+ export interface DeleteContractRequest {
67
+ contractId: string;
68
+ }
69
+ export declare type DeleteContractResponse = null;
70
+ /**
71
+ * Get Plan
72
+ */
73
+ export interface GetPlanRequest {
74
+ planId: string;
75
+ }
76
+ export declare type GetPlanResponse = Plan;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/lambda/contract.ts"],"names":[],"mappings":""}
@@ -112,7 +112,7 @@ export interface SOValidateMutationRequest {
112
112
  traceId: string;
113
113
  /**
114
114
  * 預計取餐時間 timestamp ms
115
- * 不給值 = 盡快
115
+ * 不給值 = 盡快
116
116
  */
117
117
  expectedPickupAt?: number;
118
118
  cart: SOValidateCart;
@@ -124,7 +124,7 @@ export interface SOValidateMutationResponse {
124
124
  storeId: string;
125
125
  traceId: string;
126
126
  /**
127
- * 小計
127
+ * 小計
128
128
  */
129
129
  subtotal: number;
130
130
  /**
@@ -147,10 +147,6 @@ export interface SOSendOrderRequest {
147
147
  serveType: ServeType;
148
148
  eater: SOEater;
149
149
  cart: SOValidateCart;
150
- /**
151
- * 是否為現場付款
152
- * 選擇現場付款的訂單,會馬上成立無法再改付款方式。
153
- */
154
150
  isOnSitePayment: boolean;
155
151
  /**
156
152
  * 包裝、免洗餐具
@@ -158,7 +154,7 @@ export interface SOSendOrderRequest {
158
154
  includeDisposableItems: boolean;
159
155
  /**
160
156
  * 預計取餐時間 timestamp ms
161
- * 不給值 = 盡快
157
+ * 不給值 = 盡快
162
158
  */
163
159
  expectedPickupAt?: number;
164
160
  }
@@ -0,0 +1,19 @@
1
+ import { Store } from '../models';
2
+ import { OverwriteMenuResponse } from './response';
3
+ export interface GetPoskyStoreConfigRequest {
4
+ /** Posky storeId */
5
+ storeId: string;
6
+ }
7
+ export interface GetPoskyStoreConfigResponse {
8
+ owner: {
9
+ email: string;
10
+ name: string;
11
+ phone: string;
12
+ };
13
+ store: Store;
14
+ }
15
+ export interface OverwriteMenuFromIntegrationPosRequest {
16
+ /** Kiosky storeId */
17
+ storeId: string;
18
+ }
19
+ export declare type OverwriteMenuFromIntegrationPosResponse = OverwriteMenuResponse;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=pos-integration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pos-integration.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/lambda/pos-integration.ts"],"names":[],"mappings":""}
@@ -34,6 +34,7 @@ export interface QueryLoveCodeRequest {
34
34
  apiKey?: string;
35
35
  }
36
36
  export interface UploadInvoiceRequest {
37
+ storeId: string;
37
38
  orderId: string;
38
39
  receiptIssuedAt: number;
39
40
  totalAmount: number;
@@ -48,6 +49,7 @@ export interface UploadInvoiceRequest {
48
49
  taxAmount: number;
49
50
  }
50
51
  export interface UploadVoidInvoiceRequest {
52
+ storeId: string;
51
53
  officeId: string;
52
54
  invoice: Partial<OrderInvoice>;
53
55
  receiptVoidedAt: number;
@@ -0,0 +1,29 @@
1
+ export declare type PlanValueType = boolean | number;
2
+ export interface PlanLimits {
3
+ [key: string]: PlanValueType;
4
+ }
5
+ export interface Plan {
6
+ id: string;
7
+ name: string;
8
+ description?: string;
9
+ planLimits?: PlanLimits;
10
+ /** 方案的生效天數 */
11
+ rangeDays?: number;
12
+ }
13
+ /** 用於createContract */
14
+ export declare type ContractCore = {
15
+ name: string;
16
+ note?: string;
17
+ startedAt: number;
18
+ /** 不給: 由後端參考plan給值; 給了: 後端直接用這個值 */
19
+ endedAt?: number;
20
+ planId: string;
21
+ storeId: string;
22
+ ownerCognitoUserId: string;
23
+ };
24
+ export declare type Contract = {
25
+ id: string;
26
+ createdAt: number;
27
+ endedAt: number;
28
+ plan: Plan;
29
+ } & ContractCore;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/models/contract.ts"],"names":[],"mappings":""}
package/models/order.d.ts CHANGED
@@ -111,6 +111,8 @@ export interface Order {
111
111
  expectedPickupAt?: number;
112
112
  /** 訂單取消方 */
113
113
  canceledByParty?: SOOperateParty;
114
+ /** 消費者是否選擇線上付款 */
115
+ isOnSitePayment?: boolean;
114
116
  /**
115
117
  * 線上點餐、UberEats等等外送平台,線上成功收款後的
116
118
  * Transaction會暫時存在這個Property,待POS接單後,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trusted-solutions/sdit.models",
3
- "version": "0.18.0-alpha.20",
3
+ "version": "0.18.0-alpha.22",
4
4
  "description": "TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project.",
5
5
  "main": "index.js",
6
6
  "scripts": {