@open-tender/types 0.4.38 → 0.4.40

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.
package/dist/.DS_Store ADDED
Binary file
@@ -2,4 +2,4 @@ export interface Alert {
2
2
  message: string;
3
3
  id: string;
4
4
  }
5
- export declare type Alerts = Array<Alert>;
5
+ export declare type Alerts = Alert[];
@@ -268,12 +268,26 @@ export interface OrderCreate {
268
268
  tenders?: CheckoutTenders;
269
269
  tip?: Money;
270
270
  }
271
- export interface OrderCreatePos extends Omit<OrderCreate, 'customer'> {
272
- customer: CustomerIdentify | null;
273
- }
274
271
  export interface CheckoutPoints {
275
272
  points: CheckoutConfigLoyalty;
276
273
  applied: OrderCreatePoints;
277
274
  apply: (item: CartItemWithPoints) => void;
278
275
  remove: (item: CartItemWithPoints) => void;
279
276
  }
277
+ export interface CheckoutTenderPos {
278
+ acct?: string;
279
+ amount?: Money;
280
+ cash_back?: Money;
281
+ customer_card_id?: string;
282
+ cvv?: string;
283
+ exp?: string;
284
+ gift_card_code?: string | number;
285
+ house_account_pin?: string;
286
+ save?: boolean;
287
+ tender_type: TenderType;
288
+ track_data?: string;
289
+ zip?: string;
290
+ }
291
+ export interface OrderCreatePos extends Omit<OrderCreate, 'customer'> {
292
+ customer: CustomerIdentify | null;
293
+ }
@@ -1,3 +1,4 @@
1
+ import { DateString, ISOStringOffset } from '../datetimes';
1
2
  import { Money, NegativeMoney } from '../global';
2
3
  export declare type PunchAuthType = 'PIN' | 'CARD';
3
4
  export declare type PunchType = 'PUNCH_IN' | 'PUNCH_OUT' | 'BREAK_IN' | 'BREAK_OUT';
@@ -6,7 +7,7 @@ export interface Punch {
6
7
  department_id: number;
7
8
  punch_type: PunchType;
8
9
  tips: Money;
9
- created_at?: string;
10
+ created_at?: ISOStringOffset;
10
11
  created_dt?: string;
11
12
  }
12
13
  export interface Department {
@@ -18,7 +19,22 @@ export interface Department {
18
19
  overtime_pay_rate: string;
19
20
  pay_rate: string;
20
21
  }
21
- export declare type Role = 'Manager' | 'Cashier' | 'Employee';
22
+ export interface PunchProcessed extends Punch {
23
+ department?: Department;
24
+ date: Date;
25
+ }
26
+ export declare type PunchesProcessed = PunchProcessed[];
27
+ export interface Shift {
28
+ department: string;
29
+ punchIn?: PunchProcessed;
30
+ punchOut?: PunchProcessed;
31
+ breaks: PunchesProcessed;
32
+ breakOut: PunchProcessed | null;
33
+ breakSeconds: number;
34
+ netSeconds: number;
35
+ }
36
+ export declare type Shifts = Shift[];
37
+ export declare type Role = 'MANAGER' | 'CASHIER' | 'EMPLOYEE';
22
38
  export interface Employee {
23
39
  employee_id: number;
24
40
  timeclock_id: string;
@@ -30,6 +46,9 @@ export interface Employee {
30
46
  departments: Array<Department>;
31
47
  punches?: Array<Punch>;
32
48
  }
49
+ export interface Cashier extends Employee {
50
+ businessDate: DateString;
51
+ }
33
52
  export declare type Employees = Array<Employee>;
34
53
  export declare type CashEventType = 'FLOAT' | 'PAID_IN' | 'PAID_OUT' | 'DECLARED';
35
54
  export interface CashEvent {
@@ -6,4 +6,4 @@ export interface ErrorAlert {
6
6
  created_at: ISOStringOffset;
7
7
  silenced_until: ISOStringOffset | null;
8
8
  }
9
- export declare type ErrorAlerts = Array<ErrorAlert>;
9
+ export declare type ErrorAlerts = ErrorAlert[];
@@ -1,18 +1,19 @@
1
- import { OrderType } from '../global';
1
+ import { FullOrderType } from '../global';
2
2
  export interface MenuPageSection {
3
3
  name: string;
4
+ pos_page_id: number;
4
5
  pos_section_id: number;
5
6
  position: number;
6
7
  }
7
8
  export declare type MenuPageSections = MenuPageSection[];
8
9
  export interface MenuPage {
9
10
  name: string;
10
- order_type: OrderType;
11
+ order_type: FullOrderType;
11
12
  pos_page_id: number;
12
13
  position: number;
13
14
  sections: MenuPageSections;
14
15
  }
15
- export declare type MenuPages = MenuPage[];
16
+ export declare type MenuPages = Array<MenuPage>;
16
17
  export interface MenuColor {
17
18
  id: number;
18
19
  color: string;
@@ -2,4 +2,4 @@ export interface Notification {
2
2
  message: string;
3
3
  id: string;
4
4
  }
5
- export declare type Notifications = Array<Notification>;
5
+ export declare type Notifications = Notification[];
@@ -4,7 +4,7 @@ export interface OfflineAuth {
4
4
  amount: string;
5
5
  nmi_offline_id: number;
6
6
  }
7
- export declare type OfflineAuths = Array<OfflineAuth>;
7
+ export declare type OfflineAuths = OfflineAuth[];
8
8
  export interface OfflineAuthsResult {
9
9
  paid: number;
10
10
  void: number;
@@ -2,4 +2,4 @@ export interface Alert {
2
2
  message: string;
3
3
  id: string;
4
4
  }
5
- export declare type Alerts = Array<Alert>;
5
+ export declare type Alerts = Alert[];
@@ -268,12 +268,26 @@ export interface OrderCreate {
268
268
  tenders?: CheckoutTenders;
269
269
  tip?: Money;
270
270
  }
271
- export interface OrderCreatePos extends Omit<OrderCreate, 'customer'> {
272
- customer: CustomerIdentify | null;
273
- }
274
271
  export interface CheckoutPoints {
275
272
  points: CheckoutConfigLoyalty;
276
273
  applied: OrderCreatePoints;
277
274
  apply: (item: CartItemWithPoints) => void;
278
275
  remove: (item: CartItemWithPoints) => void;
279
276
  }
277
+ export interface CheckoutTenderPos {
278
+ acct?: string;
279
+ amount?: Money;
280
+ cash_back?: Money;
281
+ customer_card_id?: string;
282
+ cvv?: string;
283
+ exp?: string;
284
+ gift_card_code?: string | number;
285
+ house_account_pin?: string;
286
+ save?: boolean;
287
+ tender_type: TenderType;
288
+ track_data?: string;
289
+ zip?: string;
290
+ }
291
+ export interface OrderCreatePos extends Omit<OrderCreate, 'customer'> {
292
+ customer: CustomerIdentify | null;
293
+ }
@@ -1,3 +1,4 @@
1
+ import { DateString, ISOStringOffset } from '../datetimes';
1
2
  import { Money, NegativeMoney } from '../global';
2
3
  export declare type PunchAuthType = 'PIN' | 'CARD';
3
4
  export declare type PunchType = 'PUNCH_IN' | 'PUNCH_OUT' | 'BREAK_IN' | 'BREAK_OUT';
@@ -6,7 +7,7 @@ export interface Punch {
6
7
  department_id: number;
7
8
  punch_type: PunchType;
8
9
  tips: Money;
9
- created_at?: string;
10
+ created_at?: ISOStringOffset;
10
11
  created_dt?: string;
11
12
  }
12
13
  export interface Department {
@@ -18,7 +19,22 @@ export interface Department {
18
19
  overtime_pay_rate: string;
19
20
  pay_rate: string;
20
21
  }
21
- export declare type Role = 'Manager' | 'Cashier' | 'Employee';
22
+ export interface PunchProcessed extends Punch {
23
+ department?: Department;
24
+ date: Date;
25
+ }
26
+ export declare type PunchesProcessed = PunchProcessed[];
27
+ export interface Shift {
28
+ department: string;
29
+ punchIn?: PunchProcessed;
30
+ punchOut?: PunchProcessed;
31
+ breaks: PunchesProcessed;
32
+ breakOut: PunchProcessed | null;
33
+ breakSeconds: number;
34
+ netSeconds: number;
35
+ }
36
+ export declare type Shifts = Shift[];
37
+ export declare type Role = 'MANAGER' | 'CASHIER' | 'EMPLOYEE';
22
38
  export interface Employee {
23
39
  employee_id: number;
24
40
  timeclock_id: string;
@@ -30,6 +46,9 @@ export interface Employee {
30
46
  departments: Array<Department>;
31
47
  punches?: Array<Punch>;
32
48
  }
49
+ export interface Cashier extends Employee {
50
+ businessDate: DateString;
51
+ }
33
52
  export declare type Employees = Array<Employee>;
34
53
  export declare type CashEventType = 'FLOAT' | 'PAID_IN' | 'PAID_OUT' | 'DECLARED';
35
54
  export interface CashEvent {
@@ -6,4 +6,4 @@ export interface ErrorAlert {
6
6
  created_at: ISOStringOffset;
7
7
  silenced_until: ISOStringOffset | null;
8
8
  }
9
- export declare type ErrorAlerts = Array<ErrorAlert>;
9
+ export declare type ErrorAlerts = ErrorAlert[];
@@ -1,18 +1,19 @@
1
- import { OrderType } from '../global';
1
+ import { FullOrderType } from '../global';
2
2
  export interface MenuPageSection {
3
3
  name: string;
4
+ pos_page_id: number;
4
5
  pos_section_id: number;
5
6
  position: number;
6
7
  }
7
8
  export declare type MenuPageSections = MenuPageSection[];
8
9
  export interface MenuPage {
9
10
  name: string;
10
- order_type: OrderType;
11
+ order_type: FullOrderType;
11
12
  pos_page_id: number;
12
13
  position: number;
13
14
  sections: MenuPageSections;
14
15
  }
15
- export declare type MenuPages = MenuPage[];
16
+ export declare type MenuPages = Array<MenuPage>;
16
17
  export interface MenuColor {
17
18
  id: number;
18
19
  color: string;
@@ -2,4 +2,4 @@ export interface Notification {
2
2
  message: string;
3
3
  id: string;
4
4
  }
5
- export declare type Notifications = Array<Notification>;
5
+ export declare type Notifications = Notification[];
@@ -4,7 +4,7 @@ export interface OfflineAuth {
4
4
  amount: string;
5
5
  nmi_offline_id: number;
6
6
  }
7
- export declare type OfflineAuths = Array<OfflineAuth>;
7
+ export declare type OfflineAuths = OfflineAuth[];
8
8
  export interface OfflineAuthsResult {
9
9
  paid: number;
10
10
  void: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/types",
3
- "version": "0.4.38",
3
+ "version": "0.4.40",
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",