@vita-mojo/types 1.0.8-VMOS-9849-af51550-375-rc.0 → 1.0.8

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.8-VMOS-9849-af51550-375-rc.0",
3
+ "version": "1.0.8",
4
4
  "peerDependencies": {
5
5
  "tslib": "2.4.1"
6
6
  },
package/src/index.d.ts CHANGED
@@ -5,3 +5,4 @@ export { Role } from './role.interface';
5
5
  export { Tenant } from './tenant.interface';
6
6
  export { TokenDecrypted } from './token-decrypted.interface';
7
7
  export { User } from './user.interface';
8
+ export { Store } from './store.interface';
@@ -29,27 +29,22 @@ export interface Deal {
29
29
  basketUUID: string;
30
30
  promotion: Promotion;
31
31
  }
32
- export interface BundlePromotion {
33
- uuid: string;
34
- discount: number;
35
- meta?: Record<string, unknown>;
36
- }
37
32
  export interface Bundle {
38
33
  uuid: string;
39
- menuUUID: string;
34
+ menuUUID?: string;
40
35
  upsellCategories?: string[];
41
- isReorder: boolean;
36
+ isReorder?: boolean;
42
37
  basketUUID: string;
43
38
  hasModifiers: boolean;
44
- extMediaUUID: string;
39
+ extMediaUUID?: string;
45
40
  name: string;
46
41
  kitchenTicketName: string;
47
- slug: string;
42
+ slug?: string;
48
43
  description: string | null;
49
- dealCategoryOrder: number;
44
+ dealCategoryOrder?: number;
50
45
  isGrouped: boolean;
51
46
  isPrintable: boolean;
52
- isAccessory: boolean;
47
+ isAccessory?: boolean;
53
48
  straightToPickup: boolean;
54
49
  appStraightToPickup: AppStraightToPickup;
55
50
  type: string;
@@ -77,22 +72,21 @@ export interface Bundle {
77
72
  taxExempt: number;
78
73
  vatRateEatIn: number;
79
74
  vatRateTakeaway: number;
80
- rootCategory: object;
81
- category: object;
82
- note: string;
83
- defaultItems: DefaultItem[];
84
- promotion?: Promotion;
85
- promotions?: BundlePromotion[]; /** this property is for multiple discount support, the bundle object
86
- * can't have both property (promotion and promotions) in the same time. For now we will support both
87
- * formats to avoid breaking changes while planning to remove the old format at a later time.
88
- * */
75
+ rootCategory?: {
76
+ name: string;
77
+ uuid: string;
78
+ };
79
+ category?: object;
80
+ note?: string;
81
+ defaultItems?: DefaultItem[];
82
+ promotion?: Promotion | null;
89
83
  meta: object;
90
- baseTotalAmount: number;
91
- baseVatAmount: number;
92
- deal: Deal;
84
+ baseTotalAmount?: number;
85
+ baseVatAmount?: number;
86
+ deal?: Deal;
93
87
  kitchenStation: KitchenStation | null;
94
88
  status?: string;
95
89
  allergens: string[];
96
- isRecommendation: boolean;
90
+ isRecommendation?: boolean;
97
91
  parentID?: string;
98
92
  }
@@ -6,11 +6,11 @@ export interface AppStraightToPickup {
6
6
  }
7
7
  export interface Unit {
8
8
  slug: string;
9
- name: any;
9
+ name?: any;
10
10
  value: any;
11
11
  }
12
12
  export interface Variation {
13
- name: string | null;
13
+ name: string;
14
14
  unit: Unit;
15
15
  price: number;
16
16
  priceEatIn: number;
@@ -18,7 +18,7 @@ export interface Variation {
18
18
  step: number;
19
19
  type: string;
20
20
  uuid: string;
21
- parentUUID: string | null;
21
+ parentUUID?: string;
22
22
  value: any;
23
23
  printText: string;
24
24
  standalonePrice: number;
@@ -27,7 +27,7 @@ export interface Variation {
27
27
  export interface Customization {
28
28
  uuid: string;
29
29
  current: number | number[];
30
- text: string;
30
+ text?: string;
31
31
  type: string;
32
32
  variations: Variation[];
33
33
  meta: any;
@@ -42,8 +42,8 @@ export interface KitchenZone {
42
42
  export interface Item {
43
43
  name: string;
44
44
  uuid: string;
45
- kitchenTicketName: string | null;
46
- kitchenZone: KitchenZone | null;
45
+ kitchenTicketName?: string | null;
46
+ kitchenZone?: KitchenZone | null;
47
47
  itemUUID: string;
48
48
  straightToPickup: boolean;
49
49
  price: number;
@@ -69,10 +69,10 @@ export interface Item {
69
69
  taxExempt: number;
70
70
  vatRateEatIn: number;
71
71
  vatRateTakeaway: number;
72
- promotion: Promotion;
72
+ promotion?: Promotion;
73
73
  type: string;
74
74
  dealPriceOverrideDiff?: {
75
- priceEatIn: number;
76
- price: number;
75
+ priceEatIn?: number;
76
+ price?: number;
77
77
  };
78
78
  }
@@ -33,7 +33,7 @@ export interface Order {
33
33
  };
34
34
  table?: string | number;
35
35
  extTenantUUID: string;
36
- extStoreUUID: string;
36
+ extStoreUUID?: string;
37
37
  extUserUUID?: string;
38
38
  timeSlot?: Timeslot;
39
39
  payment: Payment;
@@ -64,7 +64,7 @@ export interface Order {
64
64
  allowEditing?: boolean;
65
65
  isOpenOrderFlow?: boolean;
66
66
  isScheduledPayment?: boolean;
67
- isExternal: boolean;
67
+ isExternal?: boolean;
68
68
  printLogs?: PrintLog[];
69
69
  allowEditingMetadata?: {
70
70
  [key: string]: any;
@@ -11,16 +11,55 @@ export interface Promotion {
11
11
  value: number;
12
12
  name: string;
13
13
  appliesTo: string;
14
- promoCode: PromoCodeDto;
14
+ promoCode?: PromoCodeDto;
15
15
  loyaltyPoints?: boolean;
16
- maxAmount: number | null;
17
- minBasket?: number | null;
18
- providerPromotion: PromotionProviderDetails | null;
19
- provider: string;
16
+ maxAmount?: number;
17
+ minBasket?: number;
18
+ providerPromotion?: PromotionProviderDetails;
19
+ provider?: string;
20
20
  freeDelivery?: boolean;
21
21
  }
22
22
  export interface PromotionProviderDetails {
23
+ type?: string;
24
+ expirationDate?: string;
25
+ count?: number;
26
+ code: string;
27
+ name: string;
28
+ productKey: string;
29
+ vmosPromoUUID: string;
30
+ voucherID: number;
31
+ purchase: Purchase;
32
+ }
33
+ interface Purchase {
34
+ transactionId: string;
35
+ openTime: Date;
36
+ relatedTransactionId?: string;
37
+ totalAmount: number;
38
+ totalTaxAmount?: number;
39
+ totalGeneralDiscount?: number;
40
+ orderType?: string;
41
+ items?: Item[];
42
+ meansOfPayment?: MeansOfPayment;
43
+ tags?: string[];
44
+ employee?: string;
45
+ }
46
+ interface Item {
47
+ lineId: string;
48
+ code: string;
49
+ name: string;
50
+ departmentCode: string;
51
+ departmentName: string;
52
+ quantity: number;
53
+ weight?: number;
54
+ grossAmount: number;
55
+ netAmount: number;
56
+ action?: 'sale' | 'refund';
57
+ tags?: string[];
58
+ }
59
+ interface MeansOfPayment {
23
60
  type: string;
24
- expirationDate: string;
25
- count: number;
61
+ details?: string;
62
+ amount: number;
63
+ paymentCard?: string;
26
64
  }
65
+ export {};
@@ -0,0 +1,35 @@
1
+ import { Tenant } from "./tenant.interface";
2
+ interface AppStatus {
3
+ opat: string;
4
+ online: string;
5
+ delivery: string;
6
+ }
7
+ interface Theme {
8
+ email: any;
9
+ default: any;
10
+ }
11
+ interface Hours {
12
+ from: string;
13
+ to: string;
14
+ }
15
+ export interface Store {
16
+ tenant: Tenant;
17
+ uuid: string;
18
+ name: string;
19
+ slug: string;
20
+ status: boolean;
21
+ ordersPerSlot: number;
22
+ slotsInterval: number;
23
+ address: string;
24
+ url: string;
25
+ vatNumber: string;
26
+ email: string;
27
+ lat: string;
28
+ long: string;
29
+ sortOrder: number;
30
+ appStatus: AppStatus;
31
+ theme?: Theme;
32
+ settings: Record<string, string>;
33
+ hours: Hours;
34
+ }
35
+ export {};
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ ;
4
+ //# sourceMappingURL=store.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.interface.js","sourceRoot":"","sources":["../../../../packages/types/src/store.interface.ts"],"names":[],"mappings":";;AAgBC,CAAC"}