@vita-mojo/types 1.0.6 → 1.0.7-VMOS-9402-b9a471d-350-rc.0

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": "@vita-mojo/types",
3
- "version": "1.0.6",
3
+ "version": "1.0.7-VMOS-9402-b9a471d-350-rc.0",
4
4
  "peerDependencies": {
5
5
  "tslib": "2.4.1"
6
6
  },
@@ -0,0 +1,4 @@
1
+ export interface Fiscalization {
2
+ isFiscalized: boolean;
3
+ payload: Record<string, unknown>;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=fiscalization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fiscalization.js","sourceRoot":"","sources":["../../../../../packages/types/src/order/fiscalization.ts"],"names":[],"mappings":""}
@@ -1,6 +1,12 @@
1
1
  export * as Bundle from './bundle';
2
+ export * as Fiscalization from './fiscalization';
2
3
  export * as Item from './item';
3
4
  export { ItemType } from './item-type';
4
5
  export { Order } from './order';
6
+ export * from './order-meta';
7
+ export * from './order-number-settings';
5
8
  export * as Payment from './payment';
6
- export * as User from './user';
9
+ export * from './print-log';
10
+ export * from './settings';
11
+ export * as Subway from './subway';
12
+ export * from './tenant-settings';
@@ -1,8 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.User = exports.Payment = exports.Item = exports.Bundle = void 0;
3
+ exports.Subway = exports.Payment = exports.Item = exports.Fiscalization = exports.Bundle = void 0;
4
+ const tslib_1 = require("tslib");
4
5
  exports.Bundle = require("./bundle");
6
+ exports.Fiscalization = require("./fiscalization");
5
7
  exports.Item = require("./item");
8
+ tslib_1.__exportStar(require("./order-meta"), exports);
9
+ tslib_1.__exportStar(require("./order-number-settings"), exports);
6
10
  exports.Payment = require("./payment");
7
- exports.User = require("./user");
11
+ tslib_1.__exportStar(require("./print-log"), exports);
12
+ tslib_1.__exportStar(require("./settings"), exports);
13
+ exports.Subway = require("./subway");
14
+ tslib_1.__exportStar(require("./tenant-settings"), exports);
8
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/types/src/order/index.ts"],"names":[],"mappings":";;;AAAA,qCAAmC;AACnC,iCAA+B;AAG/B,uCAAqC;AACrC,iCAA+B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/types/src/order/index.ts"],"names":[],"mappings":";;;;AAAA,qCAAmC;AACnC,mDAAiD;AACjD,iCAA+B;AAG/B,uDAA6B;AAC7B,kEAAwC;AACxC,uCAAqC;AACrC,sDAA4B;AAC5B,qDAA2B;AAC3B,qCAAmC;AACnC,4DAAkC"}
@@ -0,0 +1,9 @@
1
+ export interface OrderMeta {
2
+ extEntityUUID?: string;
3
+ como?: {
4
+ transactionId: string;
5
+ openTime: string;
6
+ };
7
+ type?: string;
8
+ [index: string]: unknown;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=order-meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order-meta.js","sourceRoot":"","sources":["../../../../../packages/types/src/order/order-meta.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export interface OrderNumberSettings {
2
+ numberOfCharacters: number;
3
+ prefix?: string;
4
+ startingNumber?: number;
5
+ enableSequenceByPickuptime?: boolean;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=order-number-settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order-number-settings.js","sourceRoot":"","sources":["../../../../../packages/types/src/order/order-number-settings.ts"],"names":[],"mappings":""}
@@ -1,12 +1,16 @@
1
- import { Accessory } from './accessory';
2
1
  import { AuthUser } from './auth-user';
3
2
  import { Brand } from './brand';
4
3
  import { Bundle } from './bundle';
5
4
  import { Device } from './device';
5
+ import { Fiscalization } from './fiscalization';
6
+ import { OrderMeta } from './order-meta';
6
7
  import { OrderStoreSettings } from './order-store-settings';
7
8
  import { Payment } from './payment';
9
+ import { PrintLog } from './print-log';
8
10
  import { Promotion } from './promotion';
9
11
  import { OrderSettings } from './settings';
12
+ import * as Subway from './subway';
13
+ import { TenantSettings } from './tenant-settings';
10
14
  import { Timeslot } from './timeslot';
11
15
  import { User } from './user';
12
16
  export interface Order {
@@ -14,7 +18,9 @@ export interface Order {
14
18
  timezone: string;
15
19
  requestedFrom: string;
16
20
  pickupTime?: number;
17
- user: User;
21
+ user: User & {
22
+ isServiceAccount?: boolean;
23
+ };
18
24
  serialNumber: string;
19
25
  isAsap: boolean;
20
26
  sortOrder: number;
@@ -27,25 +33,43 @@ export interface Order {
27
33
  };
28
34
  table?: string | number;
29
35
  extTenantUUID: string;
30
- extStoreUUID?: string;
31
- storeUUID: string;
36
+ extStoreUUID: string;
32
37
  extUserUUID?: string;
33
38
  timeSlot?: Timeslot;
34
39
  payment: Payment;
35
40
  isPaidOrderStraightToProduction?: boolean;
36
41
  storeSettings?: OrderStoreSettings;
42
+ tenantSettings?: TenantSettings;
43
+ settings?: OrderSettings;
37
44
  takeaway?: boolean;
38
45
  transitionAlias?: string;
39
46
  basketUUIDs?: string[];
40
47
  source?: string;
48
+ locale?: string;
41
49
  isOpat: boolean;
42
50
  isDelivery: boolean;
43
51
  canceledBy?: AuthUser;
44
- accessories?: Accessory[];
52
+ accessories?: object[];
45
53
  bundlesBatchEvents?: string[];
46
54
  promotions?: Promotion[];
47
- note?: string | null;
48
55
  brand?: Brand;
49
56
  device: Device;
50
- settings: OrderSettings;
57
+ nandosCardNumber?: string;
58
+ deletedBasketUUIDs?: string[];
59
+ note?: string;
60
+ dateSlot?: number;
61
+ orderCancellationDeadline?: number;
62
+ meta?: OrderMeta;
63
+ deliveryService?: string | undefined;
64
+ allowEditing?: boolean;
65
+ isOpenOrderFlow?: boolean;
66
+ isScheduledPayment?: boolean;
67
+ isExternal: boolean;
68
+ printLogs?: PrintLog[];
69
+ allowEditingMetadata?: {
70
+ [key: string]: any;
71
+ };
72
+ externalValidationData?: Subway.Validation;
73
+ orderNumber?: string;
74
+ fiscalization?: Fiscalization;
51
75
  }
@@ -0,0 +1,11 @@
1
+ export interface PrintLog {
2
+ name: string;
3
+ /**
4
+ * basket bundle uuids
5
+ */
6
+ bundles: string[];
7
+ status: 'success' | 'error' | 'pending';
8
+ errorReason?: string;
9
+ createdAt: number;
10
+ updatedAt: number;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=print-log.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"print-log.js","sourceRoot":"","sources":["../../../../../packages/types/src/order/print-log.ts"],"names":[],"mappings":""}
@@ -19,7 +19,25 @@ export interface OrderSettings {
19
19
  optInOnly: boolean;
20
20
  };
21
21
  kdsEnableBaggingStep?: boolean;
22
- "preorder.delivery.fee"?: string;
22
+ 'preorder.delivery.fee'?: string;
23
23
  stockManagementLimitedQuantity?: StockManagementLimitedQuantity;
24
24
  }
25
+ export interface EposIntegrationSetting {
26
+ type: string;
27
+ locationId: string;
28
+ multipleOverride?: EposIntegrationSetting[];
29
+ subway?: {
30
+ auth: {
31
+ baseUrl: string;
32
+ clientId: string;
33
+ clientSecret: string;
34
+ grantType?: string;
35
+ scope?: string;
36
+ };
37
+ baseUrl: string;
38
+ };
39
+ }
40
+ export interface SubwayMenuSetting {
41
+ enabled: boolean;
42
+ }
25
43
  export {};
@@ -0,0 +1,66 @@
1
+ export interface Validation {
2
+ orderId: string;
3
+ externalRefId: string;
4
+ expectedReadyTime: string;
5
+ items: Item[];
6
+ deliveryCharges: DeliveryCharge[];
7
+ totals: Totals;
8
+ offers: Offer[];
9
+ certificates: Certificate[];
10
+ productIdIndex: ProductIdIndex;
11
+ }
12
+ export interface Tax {
13
+ name: string;
14
+ amount: number;
15
+ }
16
+ export interface Item {
17
+ /** this is the bundle basket uuid used only on vmos side */
18
+ basketUUID?: string;
19
+ itemId: number;
20
+ quantity?: number;
21
+ taxablePrice: number;
22
+ certificatePaidAmount: number;
23
+ modifiers: Item[];
24
+ discounts: Discount[];
25
+ taxes: Tax[];
26
+ }
27
+ export interface Discount {
28
+ promotionId: number;
29
+ amount: number;
30
+ }
31
+ export interface DeliveryCharge {
32
+ name: string;
33
+ amount: number;
34
+ itemId: string;
35
+ valueForCustomer: number;
36
+ taxes: Tax[];
37
+ discounts: Discount[];
38
+ }
39
+ export interface Totals {
40
+ subTotal: number;
41
+ taxes: Tax[];
42
+ totalTax: number;
43
+ discounts: Discounts;
44
+ tips: number;
45
+ otherFees: number;
46
+ total: number;
47
+ }
48
+ export interface Discounts {
49
+ promotionAmount: number;
50
+ certificateAmount: number;
51
+ dspDiscount: number;
52
+ }
53
+ export interface Offer {
54
+ applied: boolean;
55
+ offerPLU: string;
56
+ }
57
+ export interface Certificate {
58
+ applied: boolean;
59
+ certificateId: string;
60
+ certificateValue: number;
61
+ certificateRedeemedValue: number;
62
+ }
63
+ export type ProductIdIndex = Record<string, {
64
+ productId: string;
65
+ categories: string[];
66
+ }>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=subway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subway.js","sourceRoot":"","sources":["../../../../../packages/types/src/order/subway.ts"],"names":[],"mappings":""}
@@ -0,0 +1,42 @@
1
+ import { OrderNumberSettings } from './order-number-settings';
2
+ import { EposIntegrationSetting, SubwayMenuSetting } from './settings';
3
+ interface FeedbackEmailSettings {
4
+ enabled: boolean;
5
+ delay: number | string;
6
+ optInOnly: boolean;
7
+ }
8
+ export type StockManagementLimitedQuantity = {
9
+ enabled: boolean;
10
+ displayQuantityThreshold: number;
11
+ ignoreFutureDayOrdering: boolean;
12
+ };
13
+ export interface TenantSettings {
14
+ timezone?: string;
15
+ salesTaxRate?: string;
16
+ randomSerialNumber?: boolean;
17
+ deliveryFeeVatRate?: string;
18
+ feedbackExpiryMinutes?: string;
19
+ feedbackEmailSettings?: FeedbackEmailSettings;
20
+ orderCancellation?: string;
21
+ kdsEnableBaggingStep?: boolean;
22
+ skipValidation?: boolean;
23
+ orderNumberSettings?: OrderNumberSettings;
24
+ allowOrderEditing?: boolean;
25
+ stockManagementLimitedQuantity?: StockManagementLimitedQuantity;
26
+ crmIntegrations?: Array<Record<string, unknown>>;
27
+ deliveryServiceIntegrationSetting?: {
28
+ deliverooSignature?: {
29
+ brandId: string;
30
+ locations: {
31
+ [key: string]: string;
32
+ };
33
+ };
34
+ uberEats?: {};
35
+ };
36
+ 'feedback.email.settings'?: string;
37
+ orderResetTime?: string;
38
+ eposIntegration?: EposIntegrationSetting;
39
+ subwayMenu?: SubwayMenuSetting;
40
+ fireTimeRule?: object;
41
+ }
42
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=tenant-settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenant-settings.js","sourceRoot":"","sources":["../../../../../packages/types/src/order/tenant-settings.ts"],"names":[],"mappings":""}