@open-tender/types 0.0.6 → 0.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.
@@ -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;
@@ -39,6 +40,8 @@ export interface ValidTime {
39
40
  is_orderable: boolean;
40
41
  minutes: number;
41
42
  time: string;
43
+ interval: number;
44
+ times: ValidTimes | null;
42
45
  }
43
46
  export declare type ValidTimes = Array<ValidTime>;
44
47
  export interface HolidayItem extends Hours {
@@ -60,7 +63,7 @@ export interface OrderBy {
60
63
  date: Date | string;
61
64
  }
62
65
  export interface OrderTime {
63
- date: DateString;
66
+ date: DateString | Date;
64
67
  end_time: Time24;
65
68
  order_by: OrderBy;
66
69
  start_time: Time24;
@@ -101,6 +104,10 @@ export interface CustomerRevenueCenterSettings {
101
104
  [key in Weekday]?: ValidTimes;
102
105
  };
103
106
  };
107
+ wait_times: {
108
+ [key in ServiceType]?: number;
109
+ };
110
+ excluded_times: ExcludedTimes | null;
104
111
  }
105
112
  export interface CustomerRevenueCenter {
106
113
  address: RevenueCenterAddress;
@@ -138,7 +145,7 @@ export interface CustomerRevenueCenter {
138
145
  };
139
146
  order_times: RevenueCenterOrderTimes;
140
147
  revenue_center_id: number;
141
- revenue_center_type: OrderType;
148
+ revenue_center_type: ChannelType;
142
149
  service_types: Array<ServiceType>;
143
150
  slug: string;
144
151
  status: string;
@@ -159,3 +166,9 @@ export interface CustomerRevenueCenter {
159
166
  settings?: CustomerRevenueCenterSettings;
160
167
  }
161
168
  export declare type CustomerRevenueCenters = Array<CustomerRevenueCenter>;
169
+ export interface AvailableDates {
170
+ minDate: Date | null;
171
+ maxDate: Date | null;
172
+ excludeDates: Array<Date>;
173
+ filterDate: (date: Date) => boolean;
174
+ }
@@ -36,4 +36,13 @@ export declare type TimezoneMap = {
36
36
  [Property in TimezonePython]: Timezone;
37
37
  };
38
38
  export declare type RequestedAt = ISOString | 'asap';
39
+ export interface TimeInterval {
40
+ label: string;
41
+ value: Date;
42
+ }
43
+ export interface TimeObject {
44
+ name: string;
45
+ value: number;
46
+ disabled: boolean;
47
+ }
39
48
  export {};
@@ -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;
@@ -39,6 +40,8 @@ export interface ValidTime {
39
40
  is_orderable: boolean;
40
41
  minutes: number;
41
42
  time: string;
43
+ interval: number;
44
+ times: ValidTimes | null;
42
45
  }
43
46
  export declare type ValidTimes = Array<ValidTime>;
44
47
  export interface HolidayItem extends Hours {
@@ -60,7 +63,7 @@ export interface OrderBy {
60
63
  date: Date | string;
61
64
  }
62
65
  export interface OrderTime {
63
- date: DateString;
66
+ date: DateString | Date;
64
67
  end_time: Time24;
65
68
  order_by: OrderBy;
66
69
  start_time: Time24;
@@ -101,6 +104,10 @@ export interface CustomerRevenueCenterSettings {
101
104
  [key in Weekday]?: ValidTimes;
102
105
  };
103
106
  };
107
+ wait_times: {
108
+ [key in ServiceType]?: number;
109
+ };
110
+ excluded_times: ExcludedTimes | null;
104
111
  }
105
112
  export interface CustomerRevenueCenter {
106
113
  address: RevenueCenterAddress;
@@ -138,7 +145,7 @@ export interface CustomerRevenueCenter {
138
145
  };
139
146
  order_times: RevenueCenterOrderTimes;
140
147
  revenue_center_id: number;
141
- revenue_center_type: OrderType;
148
+ revenue_center_type: ChannelType;
142
149
  service_types: Array<ServiceType>;
143
150
  slug: string;
144
151
  status: string;
@@ -159,3 +166,9 @@ export interface CustomerRevenueCenter {
159
166
  settings?: CustomerRevenueCenterSettings;
160
167
  }
161
168
  export declare type CustomerRevenueCenters = Array<CustomerRevenueCenter>;
169
+ export interface AvailableDates {
170
+ minDate: Date | null;
171
+ maxDate: Date | null;
172
+ excludeDates: Array<Date>;
173
+ filterDate: (date: Date) => boolean;
174
+ }
@@ -36,4 +36,13 @@ export declare type TimezoneMap = {
36
36
  [Property in TimezonePython]: Timezone;
37
37
  };
38
38
  export declare type RequestedAt = ISOString | 'asap';
39
+ export interface TimeInterval {
40
+ label: string;
41
+ value: Date;
42
+ }
43
+ export interface TimeObject {
44
+ name: string;
45
+ value: number;
46
+ disabled: boolean;
47
+ }
39
48
  export {};
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.8",
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",