@open-tender/types 0.0.4 → 0.0.6

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.
@@ -9,3 +9,15 @@ export interface CreditCard {
9
9
  masked?: string;
10
10
  }
11
11
  export declare type CreditCards = Array<CreditCard>;
12
+ export interface CreditCardData {
13
+ acct: string;
14
+ exp: string;
15
+ cvv: string;
16
+ zip: string;
17
+ save?: boolean;
18
+ is_default?: boolean;
19
+ }
20
+ export interface ValidatedCreditCard {
21
+ card: CreditCardData;
22
+ errors: Partial<CreditCardData> | null;
23
+ }
@@ -31,3 +31,14 @@ export interface GroupOrder {
31
31
  token: string;
32
32
  }
33
33
  export declare type GroupOrders = Array<GroupOrder>;
34
+ export interface GroupOrderTime {
35
+ isAdjusted: boolean;
36
+ firstIso: ISOString;
37
+ iso: ISOString;
38
+ date: Date;
39
+ dateStr: string;
40
+ cutoffIso: ISOString;
41
+ cutoffDate: Date | string;
42
+ cutoffDateStr: string;
43
+ prepTime?: string;
44
+ }
@@ -57,6 +57,7 @@ export declare type ExcludedTimes = {
57
57
  export interface OrderBy {
58
58
  time: Time24;
59
59
  weekday: Weekday;
60
+ date: Date | string;
60
61
  }
61
62
  export interface OrderTime {
62
63
  date: DateString;
@@ -64,10 +65,43 @@ export interface OrderTime {
64
65
  order_by: OrderBy;
65
66
  start_time: Time24;
66
67
  weekday: Weekday;
68
+ iso?: ISOString;
67
69
  }
68
70
  export declare type RevenueCenterOrderTimes = {
69
71
  [key in ServiceType]: Array<OrderTime> | null;
70
72
  };
73
+ export interface CustomerRevenueCenterSettings {
74
+ cutoff_time: string;
75
+ days_ahead: {
76
+ [key in ServiceType]?: number;
77
+ };
78
+ first_times: {
79
+ [key in ServiceType]?: FirstTime | null;
80
+ };
81
+ group_ordering: RevenueCenterGroupOrdering;
82
+ holidays: {
83
+ [key: DateString]: {
84
+ [key in ServiceType]?: HolidayItem | null;
85
+ };
86
+ };
87
+ lead_time_in_hours: number;
88
+ order_maximum: {
89
+ [key in ServiceType]: Money;
90
+ };
91
+ order_minimum: {
92
+ [key in ServiceType]: Money;
93
+ };
94
+ order_times: RevenueCenterOrderTimes;
95
+ tax_exempt_is_allowed: boolean;
96
+ time_ranges: {
97
+ [key in ServiceType]: number | null;
98
+ };
99
+ valid_times: {
100
+ [key in ServiceType]?: {
101
+ [key in Weekday]?: ValidTimes;
102
+ };
103
+ };
104
+ }
71
105
  export interface CustomerRevenueCenter {
72
106
  address: RevenueCenterAddress;
73
107
  cutoff_time: TimeHuman | null;
@@ -112,7 +146,7 @@ export interface CustomerRevenueCenter {
112
146
  time_ranges: {
113
147
  [key in ServiceType]: number | null;
114
148
  };
115
- timezone: TimezonePython;
149
+ timezone?: TimezonePython;
116
150
  user: any;
117
151
  wait_times: {
118
152
  [key in ServiceType]?: number;
@@ -122,5 +156,6 @@ export interface CustomerRevenueCenter {
122
156
  [key in Weekday]?: ValidTimes;
123
157
  };
124
158
  };
159
+ settings?: CustomerRevenueCenterSettings;
125
160
  }
126
161
  export declare type CustomerRevenueCenters = Array<CustomerRevenueCenter>;
@@ -2,3 +2,10 @@ export interface Brand {
2
2
  name: string;
3
3
  }
4
4
  export declare type Brands = Array<Brand>;
5
+ export interface GuestData {
6
+ first_name: string;
7
+ email: string;
8
+ last_name: string;
9
+ phone: string;
10
+ password: string;
11
+ }
@@ -9,3 +9,15 @@ export interface CreditCard {
9
9
  masked?: string;
10
10
  }
11
11
  export declare type CreditCards = Array<CreditCard>;
12
+ export interface CreditCardData {
13
+ acct: string;
14
+ exp: string;
15
+ cvv: string;
16
+ zip: string;
17
+ save?: boolean;
18
+ is_default?: boolean;
19
+ }
20
+ export interface ValidatedCreditCard {
21
+ card: CreditCardData;
22
+ errors: Partial<CreditCardData> | null;
23
+ }
@@ -31,3 +31,14 @@ export interface GroupOrder {
31
31
  token: string;
32
32
  }
33
33
  export declare type GroupOrders = Array<GroupOrder>;
34
+ export interface GroupOrderTime {
35
+ isAdjusted: boolean;
36
+ firstIso: ISOString;
37
+ iso: ISOString;
38
+ date: Date;
39
+ dateStr: string;
40
+ cutoffIso: ISOString;
41
+ cutoffDate: Date | string;
42
+ cutoffDateStr: string;
43
+ prepTime?: string;
44
+ }
@@ -57,6 +57,7 @@ export declare type ExcludedTimes = {
57
57
  export interface OrderBy {
58
58
  time: Time24;
59
59
  weekday: Weekday;
60
+ date: Date | string;
60
61
  }
61
62
  export interface OrderTime {
62
63
  date: DateString;
@@ -64,10 +65,43 @@ export interface OrderTime {
64
65
  order_by: OrderBy;
65
66
  start_time: Time24;
66
67
  weekday: Weekday;
68
+ iso?: ISOString;
67
69
  }
68
70
  export declare type RevenueCenterOrderTimes = {
69
71
  [key in ServiceType]: Array<OrderTime> | null;
70
72
  };
73
+ export interface CustomerRevenueCenterSettings {
74
+ cutoff_time: string;
75
+ days_ahead: {
76
+ [key in ServiceType]?: number;
77
+ };
78
+ first_times: {
79
+ [key in ServiceType]?: FirstTime | null;
80
+ };
81
+ group_ordering: RevenueCenterGroupOrdering;
82
+ holidays: {
83
+ [key: DateString]: {
84
+ [key in ServiceType]?: HolidayItem | null;
85
+ };
86
+ };
87
+ lead_time_in_hours: number;
88
+ order_maximum: {
89
+ [key in ServiceType]: Money;
90
+ };
91
+ order_minimum: {
92
+ [key in ServiceType]: Money;
93
+ };
94
+ order_times: RevenueCenterOrderTimes;
95
+ tax_exempt_is_allowed: boolean;
96
+ time_ranges: {
97
+ [key in ServiceType]: number | null;
98
+ };
99
+ valid_times: {
100
+ [key in ServiceType]?: {
101
+ [key in Weekday]?: ValidTimes;
102
+ };
103
+ };
104
+ }
71
105
  export interface CustomerRevenueCenter {
72
106
  address: RevenueCenterAddress;
73
107
  cutoff_time: TimeHuman | null;
@@ -112,7 +146,7 @@ export interface CustomerRevenueCenter {
112
146
  time_ranges: {
113
147
  [key in ServiceType]: number | null;
114
148
  };
115
- timezone: TimezonePython;
149
+ timezone?: TimezonePython;
116
150
  user: any;
117
151
  wait_times: {
118
152
  [key in ServiceType]?: number;
@@ -122,5 +156,6 @@ export interface CustomerRevenueCenter {
122
156
  [key in Weekday]?: ValidTimes;
123
157
  };
124
158
  };
159
+ settings?: CustomerRevenueCenterSettings;
125
160
  }
126
161
  export declare type CustomerRevenueCenters = Array<CustomerRevenueCenter>;
@@ -2,3 +2,10 @@ export interface Brand {
2
2
  name: string;
3
3
  }
4
4
  export declare type Brands = Array<Brand>;
5
+ export interface GuestData {
6
+ first_name: string;
7
+ email: string;
8
+ last_name: string;
9
+ phone: string;
10
+ password: string;
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/types",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
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",
package/dist/.DS_Store DELETED
Binary file