@open-tender/types 0.2.3 → 0.2.5

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.
@@ -3,7 +3,7 @@ import { CardType, CardTypeName, DeviceType, DiscountType, Money, OrderType, Pre
3
3
  import { RequestErrorParams } from '../request';
4
4
  import { Cart } from './cart';
5
5
  import { Address, Customer } from './customer';
6
- import { Order, OrderDiscounts, OrderFulfillment, OrderSurcharge } from './order';
6
+ import { Order, OrderCustomer, OrderDiscounts, OrderFulfillment, OrderSurcharge } from './order';
7
7
  export interface SimpleCartOption {
8
8
  id: number;
9
9
  quantity: number;
@@ -82,8 +82,9 @@ export interface CheckoutConfig {
82
82
  surcharges: CheckoutConfigSurcharges;
83
83
  tender_types: TenderType[];
84
84
  }
85
- export interface CheckoutCheck extends Order {
85
+ export interface CheckoutCheck extends Omit<Order, 'customer'> {
86
86
  config: CheckoutConfig;
87
+ customer: OrderCustomer | null;
87
88
  errors: RequestErrorParams;
88
89
  }
89
90
  export interface OrderCreateDetails {
@@ -179,6 +180,10 @@ export interface CheckoutTenderHouseAccount {
179
180
  }
180
181
  export declare type CheckoutTender = CheckoutTenderCreditGuest | CheckoutTenderCreditCustomer | CheckoutTenderGiftCard | CheckoutTenderHouseAccount;
181
182
  export declare type CheckoutTenders = CheckoutTender[];
183
+ export declare const isCreditCustomerCheckoutTender: (tender: CheckoutTender) => tender is CheckoutTenderCreditGuest;
184
+ export declare const isCreditGuestCheckoutTender: (tender: CheckoutTender) => tender is CheckoutTenderCreditGuest;
185
+ export declare const isGiftCardCheckoutTender: (tender: CheckoutTender) => tender is CheckoutTenderGiftCard;
186
+ export declare const isHouseAccountCheckoutTender: (tender: CheckoutTender) => tender is CheckoutTenderHouseAccount;
182
187
  export declare type CheckoutPromoCodes = string[];
183
188
  export interface CheckoutForm {
184
189
  address: CheckoutFormAddress;
@@ -1,2 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isHouseAccountCheckoutTender = exports.isGiftCardCheckoutTender = exports.isCreditGuestCheckoutTender = exports.isCreditCustomerCheckoutTender = void 0;
4
+ const isCreditCustomerCheckoutTender = (tender) => {
5
+ return (tender.tender_type === 'CREDIT' &&
6
+ tender.customer_card_id !== undefined);
7
+ };
8
+ exports.isCreditCustomerCheckoutTender = isCreditCustomerCheckoutTender;
9
+ const isCreditGuestCheckoutTender = (tender) => {
10
+ return (tender.tender_type === 'CREDIT' &&
11
+ tender.acct !== undefined);
12
+ };
13
+ exports.isCreditGuestCheckoutTender = isCreditGuestCheckoutTender;
14
+ const isGiftCardCheckoutTender = (tender) => {
15
+ return tender.tender_type === 'GIFT_CARD';
16
+ };
17
+ exports.isGiftCardCheckoutTender = isGiftCardCheckoutTender;
18
+ const isHouseAccountCheckoutTender = (tender) => {
19
+ return tender.tender_type === 'HOUSE_ACCOUNT';
20
+ };
21
+ exports.isHouseAccountCheckoutTender = isHouseAccountCheckoutTender;
@@ -4,18 +4,6 @@ export interface Auth {
4
4
  refresh_token: string;
5
5
  token_type: string;
6
6
  }
7
- export interface Profile {
8
- birth_date: string | null;
9
- company: string;
10
- customer_id: number;
11
- email: string;
12
- first_name: string;
13
- gender: string | null;
14
- is_notification_set: boolean;
15
- is_verified: boolean;
16
- last_name: string;
17
- phone: string;
18
- }
19
7
  export interface LoginData {
20
8
  email: string;
21
9
  password: string;
@@ -1,2 +1,5 @@
1
1
  "use strict";
2
+ // import { DateString } from '../../datetimes'
3
+ // import { Gender, OrderNotifications } from '../../global'
4
+ // import { CustomerNotificationPrefs } from './communicationPreferences'
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,4 +7,4 @@ export interface CustomerNotificationPref {
7
7
  notification_area: NotificationArea;
8
8
  notification_channel: NotificationChannel;
9
9
  }
10
- export declare type CustomerNotificationPrefs = Array<Partial<CustomerNotificationPref>>;
10
+ export declare type CustomerNotificationPrefs = CustomerNotificationPref[];
@@ -1,34 +1,34 @@
1
1
  import { DateString } from '../../datetimes';
2
2
  import { Gender, OrderNotifications } from '../../global';
3
3
  import { Allergens } from '../allergens';
4
- import { CreditCards } from '../creditCards';
5
4
  import { Favorites } from '../favorite';
6
5
  import { CustomerNotificationPrefs } from './communicationPreferences';
7
- import { CustomerGiftCard, CustomerGiftCards } from './giftCards';
8
- import { HouseAccounts } from './houseAccounts';
9
- export interface Customer {
10
- accepts_marketing?: boolean;
6
+ import { GiftCards } from './giftCards';
7
+ export interface CustomerCreate {
11
8
  birth_date?: DateString | null;
12
- company?: boolean;
13
- customer_id?: number;
14
- email?: string;
15
- first_name?: string;
16
- gender?: Gender;
17
- is_guest?: boolean;
18
- is_notification_set?: boolean;
19
- is_verified?: boolean;
20
- last_name?: string;
21
- order_notifications?: OrderNotifications;
22
- phone?: string | null;
9
+ company?: string;
10
+ email: string;
11
+ first_name: string;
12
+ gender?: string | null;
13
+ last_name: string;
23
14
  password?: string;
24
- credit_cards?: CreditCards;
25
- gift_cards?: Array<Partial<CustomerGiftCard>>;
26
- house_accounts?: HouseAccounts;
15
+ phone: string;
27
16
  }
28
- export interface CustomerWithRelated extends Customer {
17
+ export interface Customer {
18
+ accepts_marketing: boolean;
29
19
  allergens?: Allergens;
30
- customer_notification_preferences?: CustomerNotificationPrefs;
20
+ birth_date: DateString | null;
21
+ company: string;
22
+ customer_id: number;
23
+ customer_notification_preferences: CustomerNotificationPrefs;
24
+ email: string;
31
25
  favorites?: Favorites;
32
- gift_cards?: CustomerGiftCards;
33
- levelup?: [] | null;
26
+ first_name: string;
27
+ gender: Gender | null;
28
+ gift_cards?: GiftCards;
29
+ is_notification_set: boolean;
30
+ is_verified: boolean;
31
+ last_name: string;
32
+ order_notifications: OrderNotifications;
33
+ phone: string;
34
34
  }
@@ -1,2 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ // export interface CustomerWithRelated extends Customer {
4
+ // allergens?: Allergens
5
+ // favorites?: Favorites
6
+ // gift_cards?: GiftCards
7
+ // }
@@ -1,7 +1,7 @@
1
1
  import { DateString, ISOStringOffset } from '../../datetimes';
2
2
  import { Money } from '../../global';
3
3
  import { CreditCardData, CreditCardSaved } from '../creditCards';
4
- export interface CustomerGiftCard {
4
+ export interface GiftCard {
5
5
  balance: Money;
6
6
  card_number: string;
7
7
  expiration: DateString | null;
@@ -9,10 +9,8 @@ export interface CustomerGiftCard {
9
9
  orders: number;
10
10
  qr_code_url: string;
11
11
  updated_at: ISOStringOffset;
12
- amount?: number;
13
- customer_card_id?: string | number;
14
12
  }
15
- export declare type CustomerGiftCards = CustomerGiftCard[];
13
+ export declare type GiftCards = GiftCard[];
16
14
  export interface GiftCardPurchased {
17
15
  email: string;
18
16
  balance: string;
@@ -31,3 +29,7 @@ export interface GiftCardsPurchase {
31
29
  url: string;
32
30
  token?: string;
33
31
  }
32
+ export interface GiftCardPurchase {
33
+ amount: string;
34
+ customer_card_id: number;
35
+ }
@@ -1,15 +1,19 @@
1
1
  import { OrderType, ServiceType } from '../../global';
2
- import { RevenueCenter, RevenueCenterType } from '../revenueCenter';
2
+ import { RevenueCenterType } from '../revenueCenter';
3
+ export interface HouseAccountRevenueCenter {
4
+ name: string;
5
+ revenue_center_id: number;
6
+ revenue_center_type: RevenueCenterType;
7
+ }
8
+ export declare type HouseAccountRevenueCenters = HouseAccountRevenueCenter[];
3
9
  export interface HouseAccount {
4
10
  approved_contact: boolean;
5
- domain: string;
11
+ domain: string | null;
6
12
  house_account_id: number;
7
13
  name: string;
8
- order_type: OrderType;
14
+ order_type: OrderType | null;
9
15
  pin: string;
10
- revenue_centers: Array<RevenueCenter>;
11
- service_type: ServiceType;
12
- revenue_center_type?: RevenueCenterType;
13
- qr_code_url?: string;
16
+ revenue_centers: HouseAccountRevenueCenters;
17
+ service_type: ServiceType | null;
14
18
  }
15
- export declare type HouseAccounts = Array<HouseAccount>;
19
+ export declare type HouseAccounts = HouseAccount[];
@@ -1,7 +1,7 @@
1
- import { ISOStringOffset, RequestedAt, TimeHuman, TimezonePython } from '../datetimes';
2
- import { CardType, CardTypeName, ChannelType, DiscountAuthType, DiscountType, Images, Money, NegativeMoney, OrderNotifications, OrderStatus, OrderType, ServiceType, TenderType } from '../global';
3
- import { CreditCard } from './creditCards';
4
- import { Address } from './customer';
1
+ import { DateString, ISOStringOffset, RequestedAt, TimeHuman, TimezonePython } from '../datetimes';
2
+ import { CardType, CardTypeName, ChannelType, DiscountAuthType, DiscountType, Gender, Images, Money, NegativeMoney, OrderStatus, OrderType, ServiceType, TenderType } from '../global';
3
+ import { CreditCard, CreditCards } from './creditCards';
4
+ import { Address, Customer, GiftCard, HouseAccounts } from './customer';
5
5
  import { PrepStatus } from './kds';
6
6
  import { NutritionalInfo } from './menu';
7
7
  export interface OrderItemPoints {
@@ -48,32 +48,21 @@ export interface OrderCustomerCreditCard {
48
48
  masked: string;
49
49
  }
50
50
  export declare type OrderCustomerCreditCards = OrderCustomerCreditCard[];
51
- export interface OrderCustomerGiftCard {
52
- balance: Money;
53
- card_number: string;
54
- expiration: ISOStringOffset | null;
55
- orders: number;
56
- updated_at: ISOStringOffset;
57
- }
51
+ export declare type OrderCustomerGiftCard = Omit<GiftCard, 'gift_card_id' | 'qr_code_url'>;
58
52
  export declare type OrderCustomerGiftCards = OrderCustomerGiftCard[];
59
53
  export interface OrderCustomerSso {
60
54
  connected: boolean;
61
55
  service: string;
62
56
  }
63
- export interface OrderCustomer {
64
- accepts_marketing: boolean;
65
- company: string | null;
66
- credit_cards?: OrderCustomerCreditCards;
67
- customer_id: number;
68
- email: string;
69
- first_name: string;
57
+ export interface OrderCustomer extends Omit<Customer, 'allergens' | 'birth_date' | 'customer_id' | 'customer_notification_preferences' | 'favorites' | 'gender' | 'gift_cards' | 'is_notification_set'> {
58
+ birth_date?: DateString | null;
59
+ credit_cards?: CreditCards;
60
+ customer_id?: number;
61
+ gender?: Gender | null;
70
62
  gift_cards?: OrderCustomerGiftCards;
63
+ house_accounts?: HouseAccounts;
71
64
  is_guest: boolean;
72
- is_verified: boolean;
73
- last_name: string;
74
- order_notifications: OrderNotifications;
75
- phone: string;
76
- sso?: OrderCustomerSso;
65
+ sso: OrderCustomerSso;
77
66
  }
78
67
  export interface OrderDineInGuest {
79
68
  company: string | null;
@@ -230,7 +219,7 @@ export interface Order {
230
219
  address: Address | null;
231
220
  cart: OrderCart;
232
221
  created_at: ISOStringOffset;
233
- customer: OrderCustomer | OrderDineInGuest;
222
+ customer: OrderCustomer;
234
223
  delivery: OrderDelivery | null;
235
224
  details: OrderDetails | null;
236
225
  discounts: OrderDiscounts;
@@ -78,3 +78,4 @@ export declare const isSelect: (field: FormFieldType) => field is Select;
78
78
  export declare const isSwitch: (field: FormFieldType) => field is Switch;
79
79
  export declare const isTextarea: (field: FormFieldType) => field is Textarea;
80
80
  export declare const isInput: (field: FormFieldType) => field is Input;
81
+ export declare type FormFields = FormFieldType[];
@@ -5,7 +5,7 @@ export interface IndexedError {
5
5
  export interface RequestErrorMessage {
6
6
  code: string;
7
7
  detail: string;
8
- message: string;
8
+ message?: string;
9
9
  title: string;
10
10
  }
11
11
  export declare type RequestErrorParams = Record<string, string>;
@@ -3,7 +3,7 @@ import { CardType, CardTypeName, DeviceType, DiscountType, Money, OrderType, Pre
3
3
  import { RequestErrorParams } from '../request';
4
4
  import { Cart } from './cart';
5
5
  import { Address, Customer } from './customer';
6
- import { Order, OrderDiscounts, OrderFulfillment, OrderSurcharge } from './order';
6
+ import { Order, OrderCustomer, OrderDiscounts, OrderFulfillment, OrderSurcharge } from './order';
7
7
  export interface SimpleCartOption {
8
8
  id: number;
9
9
  quantity: number;
@@ -82,8 +82,9 @@ export interface CheckoutConfig {
82
82
  surcharges: CheckoutConfigSurcharges;
83
83
  tender_types: TenderType[];
84
84
  }
85
- export interface CheckoutCheck extends Order {
85
+ export interface CheckoutCheck extends Omit<Order, 'customer'> {
86
86
  config: CheckoutConfig;
87
+ customer: OrderCustomer | null;
87
88
  errors: RequestErrorParams;
88
89
  }
89
90
  export interface OrderCreateDetails {
@@ -179,6 +180,10 @@ export interface CheckoutTenderHouseAccount {
179
180
  }
180
181
  export declare type CheckoutTender = CheckoutTenderCreditGuest | CheckoutTenderCreditCustomer | CheckoutTenderGiftCard | CheckoutTenderHouseAccount;
181
182
  export declare type CheckoutTenders = CheckoutTender[];
183
+ export declare const isCreditCustomerCheckoutTender: (tender: CheckoutTender) => tender is CheckoutTenderCreditGuest;
184
+ export declare const isCreditGuestCheckoutTender: (tender: CheckoutTender) => tender is CheckoutTenderCreditGuest;
185
+ export declare const isGiftCardCheckoutTender: (tender: CheckoutTender) => tender is CheckoutTenderGiftCard;
186
+ export declare const isHouseAccountCheckoutTender: (tender: CheckoutTender) => tender is CheckoutTenderHouseAccount;
182
187
  export declare type CheckoutPromoCodes = string[];
183
188
  export interface CheckoutForm {
184
189
  address: CheckoutFormAddress;
@@ -1 +1,14 @@
1
- export {};
1
+ export const isCreditCustomerCheckoutTender = (tender) => {
2
+ return (tender.tender_type === 'CREDIT' &&
3
+ tender.customer_card_id !== undefined);
4
+ };
5
+ export const isCreditGuestCheckoutTender = (tender) => {
6
+ return (tender.tender_type === 'CREDIT' &&
7
+ tender.acct !== undefined);
8
+ };
9
+ export const isGiftCardCheckoutTender = (tender) => {
10
+ return tender.tender_type === 'GIFT_CARD';
11
+ };
12
+ export const isHouseAccountCheckoutTender = (tender) => {
13
+ return tender.tender_type === 'HOUSE_ACCOUNT';
14
+ };
@@ -4,18 +4,6 @@ export interface Auth {
4
4
  refresh_token: string;
5
5
  token_type: string;
6
6
  }
7
- export interface Profile {
8
- birth_date: string | null;
9
- company: string;
10
- customer_id: number;
11
- email: string;
12
- first_name: string;
13
- gender: string | null;
14
- is_notification_set: boolean;
15
- is_verified: boolean;
16
- last_name: string;
17
- phone: string;
18
- }
19
7
  export interface LoginData {
20
8
  email: string;
21
9
  password: string;
@@ -1 +1,4 @@
1
+ // import { DateString } from '../../datetimes'
2
+ // import { Gender, OrderNotifications } from '../../global'
3
+ // import { CustomerNotificationPrefs } from './communicationPreferences'
1
4
  export {};
@@ -7,4 +7,4 @@ export interface CustomerNotificationPref {
7
7
  notification_area: NotificationArea;
8
8
  notification_channel: NotificationChannel;
9
9
  }
10
- export declare type CustomerNotificationPrefs = Array<Partial<CustomerNotificationPref>>;
10
+ export declare type CustomerNotificationPrefs = CustomerNotificationPref[];
@@ -1,34 +1,34 @@
1
1
  import { DateString } from '../../datetimes';
2
2
  import { Gender, OrderNotifications } from '../../global';
3
3
  import { Allergens } from '../allergens';
4
- import { CreditCards } from '../creditCards';
5
4
  import { Favorites } from '../favorite';
6
5
  import { CustomerNotificationPrefs } from './communicationPreferences';
7
- import { CustomerGiftCard, CustomerGiftCards } from './giftCards';
8
- import { HouseAccounts } from './houseAccounts';
9
- export interface Customer {
10
- accepts_marketing?: boolean;
6
+ import { GiftCards } from './giftCards';
7
+ export interface CustomerCreate {
11
8
  birth_date?: DateString | null;
12
- company?: boolean;
13
- customer_id?: number;
14
- email?: string;
15
- first_name?: string;
16
- gender?: Gender;
17
- is_guest?: boolean;
18
- is_notification_set?: boolean;
19
- is_verified?: boolean;
20
- last_name?: string;
21
- order_notifications?: OrderNotifications;
22
- phone?: string | null;
9
+ company?: string;
10
+ email: string;
11
+ first_name: string;
12
+ gender?: string | null;
13
+ last_name: string;
23
14
  password?: string;
24
- credit_cards?: CreditCards;
25
- gift_cards?: Array<Partial<CustomerGiftCard>>;
26
- house_accounts?: HouseAccounts;
15
+ phone: string;
27
16
  }
28
- export interface CustomerWithRelated extends Customer {
17
+ export interface Customer {
18
+ accepts_marketing: boolean;
29
19
  allergens?: Allergens;
30
- customer_notification_preferences?: CustomerNotificationPrefs;
20
+ birth_date: DateString | null;
21
+ company: string;
22
+ customer_id: number;
23
+ customer_notification_preferences: CustomerNotificationPrefs;
24
+ email: string;
31
25
  favorites?: Favorites;
32
- gift_cards?: CustomerGiftCards;
33
- levelup?: [] | null;
26
+ first_name: string;
27
+ gender: Gender | null;
28
+ gift_cards?: GiftCards;
29
+ is_notification_set: boolean;
30
+ is_verified: boolean;
31
+ last_name: string;
32
+ order_notifications: OrderNotifications;
33
+ phone: string;
34
34
  }
@@ -1 +1,6 @@
1
1
  export {};
2
+ // export interface CustomerWithRelated extends Customer {
3
+ // allergens?: Allergens
4
+ // favorites?: Favorites
5
+ // gift_cards?: GiftCards
6
+ // }
@@ -1,7 +1,7 @@
1
1
  import { DateString, ISOStringOffset } from '../../datetimes';
2
2
  import { Money } from '../../global';
3
3
  import { CreditCardData, CreditCardSaved } from '../creditCards';
4
- export interface CustomerGiftCard {
4
+ export interface GiftCard {
5
5
  balance: Money;
6
6
  card_number: string;
7
7
  expiration: DateString | null;
@@ -9,10 +9,8 @@ export interface CustomerGiftCard {
9
9
  orders: number;
10
10
  qr_code_url: string;
11
11
  updated_at: ISOStringOffset;
12
- amount?: number;
13
- customer_card_id?: string | number;
14
12
  }
15
- export declare type CustomerGiftCards = CustomerGiftCard[];
13
+ export declare type GiftCards = GiftCard[];
16
14
  export interface GiftCardPurchased {
17
15
  email: string;
18
16
  balance: string;
@@ -31,3 +29,7 @@ export interface GiftCardsPurchase {
31
29
  url: string;
32
30
  token?: string;
33
31
  }
32
+ export interface GiftCardPurchase {
33
+ amount: string;
34
+ customer_card_id: number;
35
+ }
@@ -1,15 +1,19 @@
1
1
  import { OrderType, ServiceType } from '../../global';
2
- import { RevenueCenter, RevenueCenterType } from '../revenueCenter';
2
+ import { RevenueCenterType } from '../revenueCenter';
3
+ export interface HouseAccountRevenueCenter {
4
+ name: string;
5
+ revenue_center_id: number;
6
+ revenue_center_type: RevenueCenterType;
7
+ }
8
+ export declare type HouseAccountRevenueCenters = HouseAccountRevenueCenter[];
3
9
  export interface HouseAccount {
4
10
  approved_contact: boolean;
5
- domain: string;
11
+ domain: string | null;
6
12
  house_account_id: number;
7
13
  name: string;
8
- order_type: OrderType;
14
+ order_type: OrderType | null;
9
15
  pin: string;
10
- revenue_centers: Array<RevenueCenter>;
11
- service_type: ServiceType;
12
- revenue_center_type?: RevenueCenterType;
13
- qr_code_url?: string;
16
+ revenue_centers: HouseAccountRevenueCenters;
17
+ service_type: ServiceType | null;
14
18
  }
15
- export declare type HouseAccounts = Array<HouseAccount>;
19
+ export declare type HouseAccounts = HouseAccount[];
@@ -1,7 +1,7 @@
1
- import { ISOStringOffset, RequestedAt, TimeHuman, TimezonePython } from '../datetimes';
2
- import { CardType, CardTypeName, ChannelType, DiscountAuthType, DiscountType, Images, Money, NegativeMoney, OrderNotifications, OrderStatus, OrderType, ServiceType, TenderType } from '../global';
3
- import { CreditCard } from './creditCards';
4
- import { Address } from './customer';
1
+ import { DateString, ISOStringOffset, RequestedAt, TimeHuman, TimezonePython } from '../datetimes';
2
+ import { CardType, CardTypeName, ChannelType, DiscountAuthType, DiscountType, Gender, Images, Money, NegativeMoney, OrderStatus, OrderType, ServiceType, TenderType } from '../global';
3
+ import { CreditCard, CreditCards } from './creditCards';
4
+ import { Address, Customer, GiftCard, HouseAccounts } from './customer';
5
5
  import { PrepStatus } from './kds';
6
6
  import { NutritionalInfo } from './menu';
7
7
  export interface OrderItemPoints {
@@ -48,32 +48,21 @@ export interface OrderCustomerCreditCard {
48
48
  masked: string;
49
49
  }
50
50
  export declare type OrderCustomerCreditCards = OrderCustomerCreditCard[];
51
- export interface OrderCustomerGiftCard {
52
- balance: Money;
53
- card_number: string;
54
- expiration: ISOStringOffset | null;
55
- orders: number;
56
- updated_at: ISOStringOffset;
57
- }
51
+ export declare type OrderCustomerGiftCard = Omit<GiftCard, 'gift_card_id' | 'qr_code_url'>;
58
52
  export declare type OrderCustomerGiftCards = OrderCustomerGiftCard[];
59
53
  export interface OrderCustomerSso {
60
54
  connected: boolean;
61
55
  service: string;
62
56
  }
63
- export interface OrderCustomer {
64
- accepts_marketing: boolean;
65
- company: string | null;
66
- credit_cards?: OrderCustomerCreditCards;
67
- customer_id: number;
68
- email: string;
69
- first_name: string;
57
+ export interface OrderCustomer extends Omit<Customer, 'allergens' | 'birth_date' | 'customer_id' | 'customer_notification_preferences' | 'favorites' | 'gender' | 'gift_cards' | 'is_notification_set'> {
58
+ birth_date?: DateString | null;
59
+ credit_cards?: CreditCards;
60
+ customer_id?: number;
61
+ gender?: Gender | null;
70
62
  gift_cards?: OrderCustomerGiftCards;
63
+ house_accounts?: HouseAccounts;
71
64
  is_guest: boolean;
72
- is_verified: boolean;
73
- last_name: string;
74
- order_notifications: OrderNotifications;
75
- phone: string;
76
- sso?: OrderCustomerSso;
65
+ sso: OrderCustomerSso;
77
66
  }
78
67
  export interface OrderDineInGuest {
79
68
  company: string | null;
@@ -230,7 +219,7 @@ export interface Order {
230
219
  address: Address | null;
231
220
  cart: OrderCart;
232
221
  created_at: ISOStringOffset;
233
- customer: OrderCustomer | OrderDineInGuest;
222
+ customer: OrderCustomer;
234
223
  delivery: OrderDelivery | null;
235
224
  details: OrderDetails | null;
236
225
  discounts: OrderDiscounts;
@@ -78,3 +78,4 @@ export declare const isSelect: (field: FormFieldType) => field is Select;
78
78
  export declare const isSwitch: (field: FormFieldType) => field is Switch;
79
79
  export declare const isTextarea: (field: FormFieldType) => field is Textarea;
80
80
  export declare const isInput: (field: FormFieldType) => field is Input;
81
+ export declare type FormFields = FormFieldType[];
@@ -5,7 +5,7 @@ export interface IndexedError {
5
5
  export interface RequestErrorMessage {
6
6
  code: string;
7
7
  detail: string;
8
- message: string;
8
+ message?: string;
9
9
  title: string;
10
10
  }
11
11
  export declare type RequestErrorParams = Record<string, string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/types",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
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",