@trusted-solutions/sdit.models 0.26.0 → 0.28.0-alpha.1

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.
@@ -10,6 +10,10 @@ import { SOPublicMenu, SOPublicCategory, SOPublicProduct, SOPublicProductAttribu
10
10
  /*******************************/
11
11
  export interface SOGetStoreInfoRequest {
12
12
  storeId: string;
13
+ /**
14
+ * undefined: 非內用
15
+ */
16
+ tableId?: string;
13
17
  }
14
18
  export interface SOGetStoreInfoResponse {
15
19
  storeId: string;
@@ -63,7 +67,7 @@ export interface SOGetStoreInfoResponse {
63
67
  */
64
68
  orderItemNoteHidden: boolean;
65
69
  /**
66
- * 關閉統編輸入
70
+ * 關閉統編/載具輸入
67
71
  * 若沒啟用統一發票強制 false
68
72
  * @Default false
69
73
  */
@@ -89,6 +93,29 @@ export interface SOGetStoreInfoResponse {
89
93
  * @Default 30
90
94
  */
91
95
  onlineEstimatedReadyForPickupTime: number;
96
+ /**
97
+ * 開啟預訂功能
98
+ * @Default false
99
+ */
100
+ reserveEnabled: boolean;
101
+ /**
102
+ * 可預訂天數
103
+ * @Default 7
104
+ */
105
+ availableReservedDays?: number;
106
+ /**
107
+ * 是否開啟店家外送功能
108
+ * @Default false
109
+ */
110
+ storeDeliveryEnabled: boolean;
111
+ /**
112
+ * 內用桌ID
113
+ */
114
+ tableId?: string;
115
+ /**
116
+ * 內用桌名稱
117
+ */
118
+ tableName?: string;
92
119
  }
93
120
  /*******************************/
94
121
  /*******************************/
@@ -168,6 +195,10 @@ export interface SOSendOrderRequest {
168
195
  * 不給值 = 盡快
169
196
  */
170
197
  expectedPickupAt?: number;
198
+ /** 外送地址 serveType === deliveryByStore 時有效 */
199
+ deliveryAddress?: Address;
200
+ /** 內用桌ID serveType === dineIn 時有效 */
201
+ tableId?: string;
171
202
  }
172
203
  /**
173
204
  * @throw `SOOrderError`
@@ -119,6 +119,7 @@ export declare type CreateSubscriptionRequest = {
119
119
  subscriptionProductIds: string[];
120
120
  startedAt: number | null;
121
121
  endedAt?: number;
122
+ note?: string;
122
123
  };
123
124
  export declare type CreateSubscriptionResponse = Subscription;
124
125
  export declare type UpdateSubscriptionItemRequest = {
@@ -133,3 +134,8 @@ export declare type UpdateSubscriptionDurationRequest = {
133
134
  endedAt?: number;
134
135
  };
135
136
  export declare type UpdateSubscriptionDurationResponse = Subscription;
137
+ export declare type UpdateSubscriptionNoteRequest = {
138
+ subscriptionId: string;
139
+ note: string;
140
+ };
141
+ export declare type UpdateSubscriptionNoteResponse = Subscription;
@@ -1,6 +1,6 @@
1
1
  import { PaymentServiceProvider, PaymentType, ServeType } from '../enums';
2
2
  import { MultiLanguageText, OrderDiscount, Quantity, OOReasonCode } from '../models';
3
- import { DayOfWeekTimePeriod } from './store';
3
+ import { Address, DayOfWeekTimePeriod } from './store';
4
4
  export interface SOOrderError {
5
5
  type: SOOrderErrorType;
6
6
  /**
@@ -60,6 +60,8 @@ export interface SOEater {
60
60
  phone: string;
61
61
  email?: string;
62
62
  buyerId?: string;
63
+ mobileCarrierId?: string;
64
+ loveCode?: string;
63
65
  }
64
66
  export declare enum SOOperateParty {
65
67
  store = "store",
@@ -73,6 +75,7 @@ export interface SOCart {
73
75
  export interface SOOrder {
74
76
  id?: string;
75
77
  storeId: string;
78
+ tableId?: string;
76
79
  displayId: string;
77
80
  state: SOOrderState;
78
81
  serveType: ServeType;
@@ -122,6 +125,8 @@ export interface SOOrder {
122
125
  paidAt?: number;
123
126
  /** 訂單被取消或拒絕後,已付款的退款時間 undefined 為未退款 */
124
127
  refundedAt?: number;
128
+ /** 外送地址 */
129
+ deliveryAddress?: Address;
125
130
  }
126
131
  export interface SOUnavailableCartItem {
127
132
  menuItemType: 'product' | 'attribute';
@@ -1 +1 @@
1
- {"version":3,"file":"online-ordering.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/models/online-ordering.ts"],"names":[],"mappings":";;;AAeA,IAAY,gBAaX;AAbD,WAAY,gBAAgB;IAC1B,YAAY;IACZ,qDAAiC,CAAA;IACjC,eAAe;IACf,iEAA6C,CAAA;IAC7C,WAAW;IACX,+CAA2B,CAAA;IAC3B,aAAa;IACb,mDAA+B,CAAA;IAC/B,YAAY;IACZ,uDAAmC,CAAA;IACnC,gBAAgB;IAChB,uDAAmC,CAAA;AACrC,CAAC,EAbW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAa3B;AAiDD,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,iCAAe,CAAA;IACf,mCAAiB,CAAA;AACnB,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB;AAmFD,IAAY,+BAGX;AAHD,WAAY,+BAA+B;IACzC,sDAAmB,CAAA;IACnB,kEAA+B,CAAA;AACjC,CAAC,EAHW,+BAA+B,GAA/B,uCAA+B,KAA/B,uCAA+B,QAG1C;AA8BD,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,qCAAqB,CAAA;IACrB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,qCAAqB,CAAA;AACvB,CAAC,EANW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAMvB"}
1
+ {"version":3,"file":"online-ordering.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/models/online-ordering.ts"],"names":[],"mappings":";;;AAeA,IAAY,gBAaX;AAbD,WAAY,gBAAgB;IAC1B,YAAY;IACZ,qDAAiC,CAAA;IACjC,eAAe;IACf,iEAA6C,CAAA;IAC7C,WAAW;IACX,+CAA2B,CAAA;IAC3B,aAAa;IACb,mDAA+B,CAAA;IAC/B,YAAY;IACZ,uDAAmC,CAAA;IACnC,gBAAgB;IAChB,uDAAmC,CAAA;AACrC,CAAC,EAbW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAa3B;AAmDD,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,iCAAe,CAAA;IACf,mCAAiB,CAAA;AACnB,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB;AAuFD,IAAY,+BAGX;AAHD,WAAY,+BAA+B;IACzC,sDAAmB,CAAA;IACnB,kEAA+B,CAAA;AACjC,CAAC,EAHW,+BAA+B,GAA/B,uCAA+B,KAA/B,uCAA+B,QAG1C;AA8BD,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,qCAAqB,CAAA;IACrB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,qCAAqB,CAAA;AACvB,CAAC,EANW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAMvB"}
package/models/order.d.ts CHANGED
@@ -9,7 +9,7 @@ import { OrderStatus } from '../enums/order-status';
9
9
  import { DiscountModuleTypeEnum, OrderSourceType, CloseType, OrderItemPaidStatus, OrderItemStatus } from '../enums';
10
10
  import { Receipt, Transaction } from './receipt';
11
11
  import { Customer } from './customer';
12
- import { Operator } from './store';
12
+ import { Address, Operator } from './store';
13
13
  import { OnlinePlatformType, OOReasonCode, OnlineOrderMappingWarningCode } from './online-integration';
14
14
  import { SOEater, SOOperateParty } from './online-ordering';
15
15
  import { DiscountMethod } from './discount-module';
@@ -155,10 +155,17 @@ export interface Order extends BaseOrder {
155
155
  message: string;
156
156
  }[];
157
157
  /**
158
- * 線上訂單。
159
- * 若消費者要打統編,會記錄在這裡
158
+ * 線上訂單。若消費者要打統編,會記錄在這裡
160
159
  */
161
160
  buyerId?: string;
161
+ /**
162
+ * 線上訂單。若消費者要載具,會記錄在這裡
163
+ */
164
+ mobileCarrierId?: string;
165
+ /**
166
+ * 線上訂單。若消費者要捐贈,會記錄在這裡
167
+ */
168
+ loveCode?: string;
162
169
  /** 線上訂購人 */
163
170
  onlineBuyer?: SOEater;
164
171
  /** 線上團購所有人 */
@@ -169,6 +176,8 @@ export interface Order extends BaseOrder {
169
176
  expectedPickupAt?: number;
170
177
  /** 訂單取消方 */
171
178
  canceledByParty?: SOOperateParty;
179
+ /** 外送地址 */
180
+ deliveryAddress?: Address;
172
181
  /**
173
182
  * 線上點餐、UberEats等等外送平台,線上成功收款後的
174
183
  * Transaction會暫時存在這個Property,待POS接單後,
package/models/store.d.ts CHANGED
@@ -202,7 +202,7 @@ export interface OrderStatusAlert {
202
202
  export interface Address {
203
203
  city: string;
204
204
  district: string;
205
- zipCode: number;
205
+ zipCode?: number;
206
206
  address?: string;
207
207
  }
208
208
  export interface DayOfWeekTimePeriod {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trusted-solutions/sdit.models",
3
- "version": "0.26.0",
3
+ "version": "0.28.0-alpha.1",
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": {