@trusted-solutions/sdit.models 0.28.0-alpha.0 → 0.28.0-alpha.2

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.
@@ -196,11 +196,7 @@ export interface SOSendOrderRequest {
196
196
  */
197
197
  expectedPickupAt?: number;
198
198
  /** 外送地址 serveType === deliveryByStore 時有效 */
199
- deliveryAddress?: {
200
- city: string;
201
- district: string;
202
- address: string;
203
- };
199
+ deliveryAddress?: Address;
204
200
  /** 內用桌ID serveType === dineIn 時有效 */
205
201
  tableId?: string;
206
202
  }
@@ -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
  /**
@@ -125,6 +125,8 @@ export interface SOOrder {
125
125
  paidAt?: number;
126
126
  /** 訂單被取消或拒絕後,已付款的退款時間 undefined 為未退款 */
127
127
  refundedAt?: number;
128
+ /** 外送地址 */
129
+ deliveryAddress?: Address;
128
130
  }
129
131
  export interface SOUnavailableCartItem {
130
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;AAmDD,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,iCAAe,CAAA;IACf,mCAAiB,CAAA;AACnB,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB;AAoFD,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.28.0-alpha.0",
3
+ "version": "0.28.0-alpha.2",
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": {
@@ -15,8 +15,7 @@
15
15
  "license": "ISC",
16
16
  "peerDependencies": {
17
17
  "moment": "^2.29.1",
18
- "tslib": "^2.0.0",
19
- "uuid": "^8.3.1"
18
+ "tslib": "^2.0.0"
20
19
  },
21
20
  "devDependencies": {
22
21
  "@rollup/plugin-node-resolve": "^11.2.1",