@open-tender/utils 0.0.18 → 0.0.20

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,4 +1,4 @@
1
- import { AvailableDates, CustomerRevenueCenter, ISOString, Order, GroupOrderTime, CustomerRevenueCenterSettings, ServiceType, Timezone, TimezonePython, Weekday, FirstTime, OrderTime, TimeInterval, ValidTimes, HolidayItem, DateString, TimeObject, DatePickerTimes } from '@open-tender/types';
1
+ import { AvailableDates, CustomerRevenueCenter, ISOString, Order, GroupOrderTime, CustomerRevenueCenterSettings, ServiceType, Timezone, TimezonePython, Weekday, FirstTime, OrderTime, TimeInterval, ValidTimes, HolidayItem, DateString, TimeObject, DatePickerTimes, OrderRevenueCenter } from '@open-tender/types';
2
2
  export declare const timezoneMap: {
3
3
  'US/Eastern': string;
4
4
  'US/Central': string;
@@ -28,8 +28,8 @@ export declare const zonedTimeToDateStr: (str: string, timezone: TimezonePython,
28
28
  export declare const makeLocalDateStr: (date?: Date | null, days?: number, fmt?: string) => string;
29
29
  export declare const todayDate: () => string;
30
30
  export declare const tomorrowDate: () => string;
31
- export declare const isoToDate: (iso: ISOString, tz?: Timezone | TimezonePython) => Date;
32
- export declare const isoToDateStr: (iso: ISOString, tz: Timezone | TimezonePython, fmt?: string) => string;
31
+ export declare const isoToDate: (iso: ISOString, tz?: Timezone | TimezonePython | null) => Date;
32
+ export declare const isoToDateStr: (iso: ISOString, tz: Timezone | TimezonePython | null, fmt?: string) => string;
33
33
  export declare const cleanISOString: (date: Date) => ISOString;
34
34
  export declare const dateToIso: (date: Date, tz: Timezone | TimezonePython) => ISOString;
35
35
  export declare const adjustIso: (iso: ISOString, tz: Timezone | TimezonePython, adjustment: Duration) => ISOString;
@@ -174,7 +174,7 @@ export declare const makeFirstTimes: (revenueCenter: CustomerRevenueCenter, serv
174
174
  export declare const getNextInterval: (requestedAt: ISOString, tz: Timezone | TimezonePython, interval: number) => Date;
175
175
  export declare const adjustRequestedAt: (requestedAt: ISOString | string, tz: Timezone | TimezonePython, interval: number, leadTime: number) => ISOString;
176
176
  export declare const getFirstTime: (settings: CustomerRevenueCenterSettings, serviceType: ServiceType, tz: Timezone | TimezonePython) => OrderTime | FirstTime | null;
177
- export declare const makeGroupOrderTime: (revenueCenter: Partial<CustomerRevenueCenter>, serviceType: ServiceType, requestedAt: ISOString | string) => Partial<GroupOrderTime>;
177
+ export declare const makeGroupOrderTime: (revenueCenter: OrderRevenueCenter, serviceType: ServiceType, requestedAt: ISOString | string) => Partial<GroupOrderTime>;
178
178
  export declare const formatTime: (time: string) => string;
179
179
  export declare const makeGroupOrderTimeStr: (iso: ISOString, tz: Timezone | TimezonePython) => string | null;
180
180
  export declare const getLastInterval: (tz: Timezone | TimezonePython) => Date;
@@ -1,4 +1,4 @@
1
- import { AvailableDates, CustomerRevenueCenter, ISOString, Order, GroupOrderTime, CustomerRevenueCenterSettings, ServiceType, Timezone, TimezonePython, Weekday, FirstTime, OrderTime, TimeInterval, ValidTimes, HolidayItem, DateString, TimeObject, DatePickerTimes } from '@open-tender/types';
1
+ import { AvailableDates, CustomerRevenueCenter, ISOString, Order, GroupOrderTime, CustomerRevenueCenterSettings, ServiceType, Timezone, TimezonePython, Weekday, FirstTime, OrderTime, TimeInterval, ValidTimes, HolidayItem, DateString, TimeObject, DatePickerTimes, OrderRevenueCenter } from '@open-tender/types';
2
2
  export declare const timezoneMap: {
3
3
  'US/Eastern': string;
4
4
  'US/Central': string;
@@ -28,8 +28,8 @@ export declare const zonedTimeToDateStr: (str: string, timezone: TimezonePython,
28
28
  export declare const makeLocalDateStr: (date?: Date | null, days?: number, fmt?: string) => string;
29
29
  export declare const todayDate: () => string;
30
30
  export declare const tomorrowDate: () => string;
31
- export declare const isoToDate: (iso: ISOString, tz?: Timezone | TimezonePython) => Date;
32
- export declare const isoToDateStr: (iso: ISOString, tz: Timezone | TimezonePython, fmt?: string) => string;
31
+ export declare const isoToDate: (iso: ISOString, tz?: Timezone | TimezonePython | null) => Date;
32
+ export declare const isoToDateStr: (iso: ISOString, tz: Timezone | TimezonePython | null, fmt?: string) => string;
33
33
  export declare const cleanISOString: (date: Date) => ISOString;
34
34
  export declare const dateToIso: (date: Date, tz: Timezone | TimezonePython) => ISOString;
35
35
  export declare const adjustIso: (iso: ISOString, tz: Timezone | TimezonePython, adjustment: Duration) => ISOString;
@@ -174,7 +174,7 @@ export declare const makeFirstTimes: (revenueCenter: CustomerRevenueCenter, serv
174
174
  export declare const getNextInterval: (requestedAt: ISOString, tz: Timezone | TimezonePython, interval: number) => Date;
175
175
  export declare const adjustRequestedAt: (requestedAt: ISOString | string, tz: Timezone | TimezonePython, interval: number, leadTime: number) => ISOString;
176
176
  export declare const getFirstTime: (settings: CustomerRevenueCenterSettings, serviceType: ServiceType, tz: Timezone | TimezonePython) => OrderTime | FirstTime | null;
177
- export declare const makeGroupOrderTime: (revenueCenter: Partial<CustomerRevenueCenter>, serviceType: ServiceType, requestedAt: ISOString | string) => Partial<GroupOrderTime>;
177
+ export declare const makeGroupOrderTime: (revenueCenter: OrderRevenueCenter, serviceType: ServiceType, requestedAt: ISOString | string) => Partial<GroupOrderTime>;
178
178
  export declare const formatTime: (time: string) => string;
179
179
  export declare const makeGroupOrderTimeStr: (iso: ISOString, tz: Timezone | TimezonePython) => string | null;
180
180
  export declare const getLastInterval: (tz: Timezone | TimezonePython) => Date;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/utils",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "description": "A library of utils 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",
@@ -57,7 +57,7 @@
57
57
  "react": "^18.2.0"
58
58
  },
59
59
  "dependencies": {
60
- "@open-tender/types": "^0.0.70",
60
+ "@open-tender/types": "^0.0.71",
61
61
  "date-fns": "^2.29.3",
62
62
  "date-fns-tz": "^1.3.7",
63
63
  "react-native-responsive-screen": "^1.4.2",