@open-tender/types 0.1.0 → 0.1.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.
package/dist/.DS_Store ADDED
Binary file
Binary file
@@ -1,4 +1,3 @@
1
- import { AuthType } from '../global';
2
1
  export interface ContentImage {
3
2
  type: 'SECONDARY_IMAGE' | 'FEATURED_IMAGE';
4
3
  url: string | null;
@@ -24,8 +23,9 @@ export interface Announcement {
24
23
  url: string | null;
25
24
  url_text: string | null;
26
25
  vertical: string;
27
- imageUri?: string;
26
+ imageUrl?: string | null;
28
27
  }
28
+ export declare type AnnouncementPageType = 'ABOUT' | 'ACCOUNT' | 'CATERING' | 'CHECKOUT' | 'GUEST' | 'HOME' | 'MENU' | 'ORDER_TYPE';
29
29
  export interface AnnouncementSettings {
30
30
  announcement_page_id: number;
31
31
  arrows_horizontal: string;
@@ -33,7 +33,7 @@ export interface AnnouncementSettings {
33
33
  autoplay: boolean;
34
34
  duration: number;
35
35
  duration_mobile: number;
36
- page: AuthType;
36
+ page: AnnouncementPageType;
37
37
  show_arrows: boolean;
38
38
  show_arrows_mobile: boolean;
39
39
  show_dots: boolean;
@@ -44,10 +44,10 @@ export interface AnnouncementSettings {
44
44
  transition_mobile: number;
45
45
  transition_type: string;
46
46
  }
47
- export declare type Announcements = Array<Announcement>;
47
+ export declare type Announcements = Announcement[];
48
48
  export interface AnnouncementPage {
49
49
  entities: Announcements;
50
- page: AuthType;
50
+ page: AnnouncementPageType;
51
51
  settings: AnnouncementSettings;
52
52
  }
53
- export declare type AnnouncementPages = Array<AnnouncementPage>;
53
+ export declare type AnnouncementPages = AnnouncementPage[];
@@ -56,6 +56,11 @@ export declare type CartItemGroups = CartItemGroup[];
56
56
  export declare type Cart = CartItem[];
57
57
  export declare type CartLevels = number[][];
58
58
  export declare type CartCounts = Record<string, number>;
59
+ export declare type CartItemOptionLookup = Record<string, CartItemOption>;
60
+ export declare type CartItemGroupLookupOptions = Omit<CartItemGroup, 'options'> & {
61
+ options: CartItemOptionLookup;
62
+ };
63
+ export declare type CartItemGroupLookup = Record<string, CartItemGroupLookupOptions>;
59
64
  export interface PosCartItem extends CartItem {
60
65
  item_no: number;
61
66
  line_no: number;
@@ -1,4 +1,4 @@
1
- import { CustomerLoyalty } from "./loyalty";
1
+ import { CustomerLoyalty } from './loyalty';
2
2
  export interface Auth {
3
3
  access_token: string;
4
4
  expires_in: number;
@@ -1,4 +1,4 @@
1
- import { DiscountType, AuthType, OrderType, ServiceType } from '../../global';
1
+ import { DiscountAuthType, DiscountType, OrderType, ServiceType } from '../../global';
2
2
  import { MenuItems } from '../menu';
3
3
  import { OrderItemImages } from '../order';
4
4
  export interface DayPart {
@@ -14,7 +14,7 @@ export interface RewardItems {
14
14
  }
15
15
  export interface Reward {
16
16
  amount: string;
17
- auth_type: AuthType;
17
+ auth_type: DiscountAuthType;
18
18
  dayparts: Array<DayPart>;
19
19
  description: string;
20
20
  discount_id: number;
@@ -1,4 +1,4 @@
1
- import { Reward } from "./rewards";
1
+ import { Reward } from './rewards';
2
2
  export interface ThanxProgress {
3
3
  percentage: string;
4
4
  towards: string;
@@ -1,11 +1,11 @@
1
- import { AuthType, DiscountType, Money, OrderType, ServiceType } from "../global";
2
- import { DayPart } from "./customer";
3
- import { DiscountedItems } from "./menu";
4
- import { OrderItemImage } from "./order";
5
- import { RevenueCenter } from "./revenueCenter";
1
+ import { DiscountAuthType, DiscountType, Money, OrderType, ServiceType } from '../global';
2
+ import { DayPart } from './customer';
3
+ import { DiscountedItems } from './menu';
4
+ import { OrderItemImage } from './order';
5
+ import { RevenueCenter } from './revenueCenter';
6
6
  export interface Deal {
7
7
  amount: Money;
8
- auth_type: AuthType;
8
+ auth_type: DiscountAuthType;
9
9
  dayparts: Array<DayPart>;
10
10
  description: string;
11
11
  discount_id: number;
@@ -21,6 +21,7 @@ export declare type TenderTypeMap = {
21
21
  };
22
22
  export declare type CardType = 'VISA' | 'MC' | 'DISC' | 'AMEX' | 'OTHER';
23
23
  export declare type DiscountType = 'DOLLAR' | 'PERCENTAGE';
24
+ export declare type DiscountAuthType = 'ACCOUNT' | 'VERIFIED' | null;
24
25
  export declare type SurchargeType = 'DOLLAR' | 'PERCENTAGE' | 'DISTANCE' | 'TRAVEL_TIME';
25
26
  export declare type TaxType = 'DOLLAR' | 'PERCENTAGE';
26
27
  export declare type TaxTypeInt = 1 | 2;
@@ -36,4 +37,3 @@ export interface PicklistOption {
36
37
  disabled?: boolean;
37
38
  }
38
39
  export declare type PicklistOptions = PicklistOption[];
39
- export declare type AuthType = 'GUEST' | 'ACCOUNT' | 'VERIFIED' | 'HOME' | 'MENU' | 'ORDER_TYPE' | 'CATERING';
@@ -1,4 +1,3 @@
1
- import { AuthType } from '../global';
2
1
  export interface ContentImage {
3
2
  type: 'SECONDARY_IMAGE' | 'FEATURED_IMAGE';
4
3
  url: string | null;
@@ -24,8 +23,9 @@ export interface Announcement {
24
23
  url: string | null;
25
24
  url_text: string | null;
26
25
  vertical: string;
27
- imageUri?: string;
26
+ imageUrl?: string | null;
28
27
  }
28
+ export declare type AnnouncementPageType = 'ABOUT' | 'ACCOUNT' | 'CATERING' | 'CHECKOUT' | 'GUEST' | 'HOME' | 'MENU' | 'ORDER_TYPE';
29
29
  export interface AnnouncementSettings {
30
30
  announcement_page_id: number;
31
31
  arrows_horizontal: string;
@@ -33,7 +33,7 @@ export interface AnnouncementSettings {
33
33
  autoplay: boolean;
34
34
  duration: number;
35
35
  duration_mobile: number;
36
- page: AuthType;
36
+ page: AnnouncementPageType;
37
37
  show_arrows: boolean;
38
38
  show_arrows_mobile: boolean;
39
39
  show_dots: boolean;
@@ -44,10 +44,10 @@ export interface AnnouncementSettings {
44
44
  transition_mobile: number;
45
45
  transition_type: string;
46
46
  }
47
- export declare type Announcements = Array<Announcement>;
47
+ export declare type Announcements = Announcement[];
48
48
  export interface AnnouncementPage {
49
49
  entities: Announcements;
50
- page: AuthType;
50
+ page: AnnouncementPageType;
51
51
  settings: AnnouncementSettings;
52
52
  }
53
- export declare type AnnouncementPages = Array<AnnouncementPage>;
53
+ export declare type AnnouncementPages = AnnouncementPage[];
@@ -56,6 +56,11 @@ export declare type CartItemGroups = CartItemGroup[];
56
56
  export declare type Cart = CartItem[];
57
57
  export declare type CartLevels = number[][];
58
58
  export declare type CartCounts = Record<string, number>;
59
+ export declare type CartItemOptionLookup = Record<string, CartItemOption>;
60
+ export declare type CartItemGroupLookupOptions = Omit<CartItemGroup, 'options'> & {
61
+ options: CartItemOptionLookup;
62
+ };
63
+ export declare type CartItemGroupLookup = Record<string, CartItemGroupLookupOptions>;
59
64
  export interface PosCartItem extends CartItem {
60
65
  item_no: number;
61
66
  line_no: number;
@@ -1,4 +1,4 @@
1
- import { CustomerLoyalty } from "./loyalty";
1
+ import { CustomerLoyalty } from './loyalty';
2
2
  export interface Auth {
3
3
  access_token: string;
4
4
  expires_in: number;
@@ -1,4 +1,4 @@
1
- import { DiscountType, AuthType, OrderType, ServiceType } from '../../global';
1
+ import { DiscountAuthType, DiscountType, OrderType, ServiceType } from '../../global';
2
2
  import { MenuItems } from '../menu';
3
3
  import { OrderItemImages } from '../order';
4
4
  export interface DayPart {
@@ -14,7 +14,7 @@ export interface RewardItems {
14
14
  }
15
15
  export interface Reward {
16
16
  amount: string;
17
- auth_type: AuthType;
17
+ auth_type: DiscountAuthType;
18
18
  dayparts: Array<DayPart>;
19
19
  description: string;
20
20
  discount_id: number;
@@ -1,4 +1,4 @@
1
- import { Reward } from "./rewards";
1
+ import { Reward } from './rewards';
2
2
  export interface ThanxProgress {
3
3
  percentage: string;
4
4
  towards: string;
@@ -1,11 +1,11 @@
1
- import { AuthType, DiscountType, Money, OrderType, ServiceType } from "../global";
2
- import { DayPart } from "./customer";
3
- import { DiscountedItems } from "./menu";
4
- import { OrderItemImage } from "./order";
5
- import { RevenueCenter } from "./revenueCenter";
1
+ import { DiscountAuthType, DiscountType, Money, OrderType, ServiceType } from '../global';
2
+ import { DayPart } from './customer';
3
+ import { DiscountedItems } from './menu';
4
+ import { OrderItemImage } from './order';
5
+ import { RevenueCenter } from './revenueCenter';
6
6
  export interface Deal {
7
7
  amount: Money;
8
- auth_type: AuthType;
8
+ auth_type: DiscountAuthType;
9
9
  dayparts: Array<DayPart>;
10
10
  description: string;
11
11
  discount_id: number;
@@ -21,6 +21,7 @@ export declare type TenderTypeMap = {
21
21
  };
22
22
  export declare type CardType = 'VISA' | 'MC' | 'DISC' | 'AMEX' | 'OTHER';
23
23
  export declare type DiscountType = 'DOLLAR' | 'PERCENTAGE';
24
+ export declare type DiscountAuthType = 'ACCOUNT' | 'VERIFIED' | null;
24
25
  export declare type SurchargeType = 'DOLLAR' | 'PERCENTAGE' | 'DISTANCE' | 'TRAVEL_TIME';
25
26
  export declare type TaxType = 'DOLLAR' | 'PERCENTAGE';
26
27
  export declare type TaxTypeInt = 1 | 2;
@@ -36,4 +37,3 @@ export interface PicklistOption {
36
37
  disabled?: boolean;
37
38
  }
38
39
  export declare type PicklistOptions = PicklistOption[];
39
- export declare type AuthType = 'GUEST' | 'ACCOUNT' | 'VERIFIED' | 'HOME' | 'MENU' | 'ORDER_TYPE' | 'CATERING';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/types",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "A library of types for use with Open Tender applications that utilize our cloud-based Order API.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",