@open-tender/types 0.0.6 → 0.0.7

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.
@@ -1,5 +1,5 @@
1
1
  import { DateString, ISOString, Time24, TimeHuman, TimezonePython } from '../../datetimes';
2
- import { Money, OrderType, ServiceType, Weekday } from '../../global';
2
+ import { ChannelType, Money, ServiceType, Weekday } from '../../global';
3
3
  export interface RevenueCenterAddress {
4
4
  city: string;
5
5
  cross_streets: string;
@@ -23,6 +23,7 @@ export interface FirstTime {
23
23
  utc: ISOString;
24
24
  wait_minutes: number | null;
25
25
  weekday: Weekday;
26
+ interval?: number;
26
27
  }
27
28
  export interface RevenueCenterGroupOrdering {
28
29
  guest_limit: number;
@@ -60,7 +61,7 @@ export interface OrderBy {
60
61
  date: Date | string;
61
62
  }
62
63
  export interface OrderTime {
63
- date: DateString;
64
+ date: DateString | Date;
64
65
  end_time: Time24;
65
66
  order_by: OrderBy;
66
67
  start_time: Time24;
@@ -80,9 +81,7 @@ export interface CustomerRevenueCenterSettings {
80
81
  };
81
82
  group_ordering: RevenueCenterGroupOrdering;
82
83
  holidays: {
83
- [key: DateString]: {
84
- [key in ServiceType]?: HolidayItem | null;
85
- };
84
+ [key in ServiceType]?: HolidayItem | null;
86
85
  };
87
86
  lead_time_in_hours: number;
88
87
  order_maximum: {
@@ -101,6 +100,10 @@ export interface CustomerRevenueCenterSettings {
101
100
  [key in Weekday]?: ValidTimes;
102
101
  };
103
102
  };
103
+ wait_times: {
104
+ [key in ServiceType]?: number;
105
+ };
106
+ excluded_times: ExcludedTimes | null;
104
107
  }
105
108
  export interface CustomerRevenueCenter {
106
109
  address: RevenueCenterAddress;
@@ -138,7 +141,7 @@ export interface CustomerRevenueCenter {
138
141
  };
139
142
  order_times: RevenueCenterOrderTimes;
140
143
  revenue_center_id: number;
141
- revenue_center_type: OrderType;
144
+ revenue_center_type: ChannelType;
142
145
  service_types: Array<ServiceType>;
143
146
  slug: string;
144
147
  status: string;
@@ -159,3 +162,9 @@ export interface CustomerRevenueCenter {
159
162
  settings?: CustomerRevenueCenterSettings;
160
163
  }
161
164
  export declare type CustomerRevenueCenters = Array<CustomerRevenueCenter>;
165
+ export interface AvailableDates {
166
+ minDate: Date | null;
167
+ maxDate: Date | null;
168
+ excludeDates: Array<Date>;
169
+ filterDate: (date: Date) => boolean;
170
+ }
@@ -1,5 +1,5 @@
1
1
  import { DateString, ISOString, Time24, TimeHuman, TimezonePython } from '../../datetimes';
2
- import { Money, OrderType, ServiceType, Weekday } from '../../global';
2
+ import { ChannelType, Money, ServiceType, Weekday } from '../../global';
3
3
  export interface RevenueCenterAddress {
4
4
  city: string;
5
5
  cross_streets: string;
@@ -23,6 +23,7 @@ export interface FirstTime {
23
23
  utc: ISOString;
24
24
  wait_minutes: number | null;
25
25
  weekday: Weekday;
26
+ interval?: number;
26
27
  }
27
28
  export interface RevenueCenterGroupOrdering {
28
29
  guest_limit: number;
@@ -60,7 +61,7 @@ export interface OrderBy {
60
61
  date: Date | string;
61
62
  }
62
63
  export interface OrderTime {
63
- date: DateString;
64
+ date: DateString | Date;
64
65
  end_time: Time24;
65
66
  order_by: OrderBy;
66
67
  start_time: Time24;
@@ -80,9 +81,7 @@ export interface CustomerRevenueCenterSettings {
80
81
  };
81
82
  group_ordering: RevenueCenterGroupOrdering;
82
83
  holidays: {
83
- [key: DateString]: {
84
- [key in ServiceType]?: HolidayItem | null;
85
- };
84
+ [key in ServiceType]?: HolidayItem | null;
86
85
  };
87
86
  lead_time_in_hours: number;
88
87
  order_maximum: {
@@ -101,6 +100,10 @@ export interface CustomerRevenueCenterSettings {
101
100
  [key in Weekday]?: ValidTimes;
102
101
  };
103
102
  };
103
+ wait_times: {
104
+ [key in ServiceType]?: number;
105
+ };
106
+ excluded_times: ExcludedTimes | null;
104
107
  }
105
108
  export interface CustomerRevenueCenter {
106
109
  address: RevenueCenterAddress;
@@ -138,7 +141,7 @@ export interface CustomerRevenueCenter {
138
141
  };
139
142
  order_times: RevenueCenterOrderTimes;
140
143
  revenue_center_id: number;
141
- revenue_center_type: OrderType;
144
+ revenue_center_type: ChannelType;
142
145
  service_types: Array<ServiceType>;
143
146
  slug: string;
144
147
  status: string;
@@ -159,3 +162,9 @@ export interface CustomerRevenueCenter {
159
162
  settings?: CustomerRevenueCenterSettings;
160
163
  }
161
164
  export declare type CustomerRevenueCenters = Array<CustomerRevenueCenter>;
165
+ export interface AvailableDates {
166
+ minDate: Date | null;
167
+ maxDate: Date | null;
168
+ excludeDates: Array<Date>;
169
+ filterDate: (date: Date) => boolean;
170
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/types",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
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",