@vita-mojo/types 1.0.6-VMOS-8494-0cb1846-346-rc.0 → 1.0.7-VMOS-9402-aef5ce8-349-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 +1 -1
- package/src/order/fiscalization.d.ts +4 -0
- package/src/order/fiscalization.js +3 -0
- package/src/order/fiscalization.js.map +1 -0
- package/src/order/order-meta.d.ts +9 -0
- package/src/order/order-meta.js +3 -0
- package/src/order/order-meta.js.map +1 -0
- package/src/order/order-number-settings.d.ts +6 -0
- package/src/order/order-number-settings.js +3 -0
- package/src/order/order-number-settings.js.map +1 -0
- package/src/order/order.d.ts +31 -7
- package/src/order/print-log.d.ts +11 -0
- package/src/order/print-log.js +3 -0
- package/src/order/print-log.js.map +1 -0
- package/src/order/settings.d.ts +19 -1
- package/src/order/subway.d.ts +66 -0
- package/src/order/subway.js +3 -0
- package/src/order/subway.js.map +1 -0
- package/src/order/tenant-settings.d.ts +42 -0
- package/src/order/tenant-settings.js +3 -0
- package/src/order/tenant-settings.js.map +1 -0
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fiscalization.js","sourceRoot":"","sources":["../../../../../packages/types/src/order/fiscalization.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order-meta.js","sourceRoot":"","sources":["../../../../../packages/types/src/order/order-meta.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order-number-settings.js","sourceRoot":"","sources":["../../../../../packages/types/src/order/order-number-settings.ts"],"names":[],"mappings":""}
|
package/src/order/order.d.ts
CHANGED
|
@@ -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
|
|
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?:
|
|
52
|
+
accessories?: object[];
|
|
45
53
|
bundlesBatchEvents?: string[];
|
|
46
54
|
promotions?: Promotion[];
|
|
47
|
-
note?: string | null;
|
|
48
55
|
brand?: Brand;
|
|
49
56
|
device: Device;
|
|
50
|
-
|
|
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 @@
|
|
|
1
|
+
{"version":3,"file":"print-log.js","sourceRoot":"","sources":["../../../../../packages/types/src/order/print-log.ts"],"names":[],"mappings":""}
|
package/src/order/settings.d.ts
CHANGED
|
@@ -19,7 +19,25 @@ export interface OrderSettings {
|
|
|
19
19
|
optInOnly: boolean;
|
|
20
20
|
};
|
|
21
21
|
kdsEnableBaggingStep?: boolean;
|
|
22
|
-
|
|
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 @@
|
|
|
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 @@
|
|
|
1
|
+
{"version":3,"file":"tenant-settings.js","sourceRoot":"","sources":["../../../../../packages/types/src/order/tenant-settings.ts"],"names":[],"mappings":""}
|