@open-tender/types 0.2.14 → 0.2.16

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,7 +1,7 @@
1
1
  export interface Allergen {
2
2
  allergen_id: number;
3
- description?: string;
4
- images?: string[];
5
- name?: string;
3
+ description: string;
4
+ images: string[];
5
+ name: string;
6
6
  }
7
- export declare type Allergens = Array<Allergen>;
7
+ export declare type Allergens = Allergen[];
@@ -2,4 +2,4 @@ export interface CustomerAllergen {
2
2
  allergen_id: number;
3
3
  name?: string;
4
4
  }
5
- export declare type CustomerAllergens = Array<CustomerAllergen>;
5
+ export declare type CustomerAllergens = CustomerAllergen[];
@@ -40,7 +40,11 @@ export interface GroupOrderTime {
40
40
  date: Date;
41
41
  dateStr: string;
42
42
  cutoffIso: ISOString;
43
- cutoffDate: Date | string;
43
+ cutoffDate: Date;
44
44
  cutoffDateStr: string;
45
- prepTime?: string;
46
45
  }
46
+ export interface GroupOrderPrepTime {
47
+ prepTime: string;
48
+ }
49
+ export declare const isGroupOrderPrepTime: (orderTime: GroupOrderTime | GroupOrderPrepTime) => orderTime is GroupOrderPrepTime;
50
+ export declare const isGroupOrderTime: (orderTime: GroupOrderTime | GroupOrderPrepTime) => orderTime is GroupOrderTime;
@@ -1,2 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isGroupOrderTime = exports.isGroupOrderPrepTime = void 0;
4
+ const isGroupOrderPrepTime = (orderTime) => {
5
+ return orderTime.prepTime !== undefined;
6
+ };
7
+ exports.isGroupOrderPrepTime = isGroupOrderPrepTime;
8
+ const isGroupOrderTime = (orderTime) => {
9
+ return orderTime.isAdjusted !== undefined;
10
+ };
11
+ exports.isGroupOrderTime = isGroupOrderTime;
@@ -1,7 +1,7 @@
1
1
  export interface Allergen {
2
2
  allergen_id: number;
3
- description?: string;
4
- images?: string[];
5
- name?: string;
3
+ description: string;
4
+ images: string[];
5
+ name: string;
6
6
  }
7
- export declare type Allergens = Array<Allergen>;
7
+ export declare type Allergens = Allergen[];
@@ -2,4 +2,4 @@ export interface CustomerAllergen {
2
2
  allergen_id: number;
3
3
  name?: string;
4
4
  }
5
- export declare type CustomerAllergens = Array<CustomerAllergen>;
5
+ export declare type CustomerAllergens = CustomerAllergen[];
@@ -40,7 +40,11 @@ export interface GroupOrderTime {
40
40
  date: Date;
41
41
  dateStr: string;
42
42
  cutoffIso: ISOString;
43
- cutoffDate: Date | string;
43
+ cutoffDate: Date;
44
44
  cutoffDateStr: string;
45
- prepTime?: string;
46
45
  }
46
+ export interface GroupOrderPrepTime {
47
+ prepTime: string;
48
+ }
49
+ export declare const isGroupOrderPrepTime: (orderTime: GroupOrderTime | GroupOrderPrepTime) => orderTime is GroupOrderPrepTime;
50
+ export declare const isGroupOrderTime: (orderTime: GroupOrderTime | GroupOrderPrepTime) => orderTime is GroupOrderTime;
@@ -1 +1,6 @@
1
- export {};
1
+ export const isGroupOrderPrepTime = (orderTime) => {
2
+ return orderTime.prepTime !== undefined;
3
+ };
4
+ export const isGroupOrderTime = (orderTime) => {
5
+ return orderTime.isAdjusted !== undefined;
6
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/types",
3
- "version": "0.2.14",
3
+ "version": "0.2.16",
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",