@open-tender/store 0.2.2 → 0.2.4

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.
@@ -59,7 +59,7 @@ declare class PosAPI {
59
59
  getOrders(args: FetchOrdersAPIArgs): Promise<Orders | null | undefined>;
60
60
  patchOrder(orderId: string, data: OrderUpdate): Promise<Order | null | undefined>;
61
61
  postReceipt(orderId: string): Promise<Order | null | undefined>;
62
- postTicketsPrint(orderId: string, data: OrderUpdate): Promise<Order | null | undefined>;
62
+ postTicketsPrint(orderId: string, data?: OrderUpdate): Promise<Order | null | undefined>;
63
63
  postTicketsReset(orderId: string): Promise<Order | null | undefined>;
64
64
  postTicketPrint(orderId: string, ticketNo: number, data?: TicketUpdate): Promise<Order | null | undefined>;
65
65
  postTicketStatus(orderId: string, ticketNo: number, status: TicketStatusUpdate): Promise<Order | null | undefined>;
@@ -291,6 +291,7 @@ var PosAPI = /** @class */ (function () {
291
291
  return this.request("/orders/".concat(orderId, "/print"), 'POST', {});
292
292
  };
293
293
  PosAPI.prototype.postTicketsPrint = function (orderId, data) {
294
+ if (data === void 0) { data = {}; }
294
295
  var endpoint = "/orders/".concat(orderId, "/tickets/print");
295
296
  return this.request(endpoint, 'POST', data);
296
297
  };
@@ -36,7 +36,7 @@ export declare const selectVersion: (state: AppState) => string | null;
36
36
  export declare const selectPinpad: (state: AppState) => boolean;
37
37
  export declare const selectCashDrawer: (state: AppState) => boolean;
38
38
  export declare const selectRevenueCenterId: (state: AppState) => number | null;
39
- export declare const selectStore: (state: AppState) => Store | null;
39
+ export declare const selectStore: (state: AppState) => {};
40
40
  export declare const selectSelectOptions: (state: AppState) => SelectOptions;
41
41
  export declare const selectTimezone: (state: AppState) => Timezone;
42
42
  export declare const selectLoyalty: (state: AppState) => boolean;
@@ -152,7 +152,7 @@ var selectRevenueCenterId = function (state) {
152
152
  return state.config.revenueCenterId;
153
153
  };
154
154
  exports.selectRevenueCenterId = selectRevenueCenterId;
155
- var selectStore = function (state) { return state.config.store; };
155
+ var selectStore = function (state) { return state.config.store || {}; };
156
156
  exports.selectStore = selectStore;
157
157
  var selectSelectOptions = function (state) {
158
158
  return state.config.selectOptions || [];
@@ -34,7 +34,7 @@ export declare const printReceipt: import("@reduxjs/toolkit").AsyncThunk<void, s
34
34
  }>;
35
35
  export declare const printTickets: import("@reduxjs/toolkit").AsyncThunk<void, {
36
36
  orderId: string;
37
- data: OrderUpdate;
37
+ data?: OrderUpdate | undefined;
38
38
  }, {
39
39
  state: AppState;
40
40
  }>;
@@ -59,7 +59,7 @@ declare class PosAPI {
59
59
  getOrders(args: FetchOrdersAPIArgs): Promise<Orders | null | undefined>;
60
60
  patchOrder(orderId: string, data: OrderUpdate): Promise<Order | null | undefined>;
61
61
  postReceipt(orderId: string): Promise<Order | null | undefined>;
62
- postTicketsPrint(orderId: string, data: OrderUpdate): Promise<Order | null | undefined>;
62
+ postTicketsPrint(orderId: string, data?: OrderUpdate): Promise<Order | null | undefined>;
63
63
  postTicketsReset(orderId: string): Promise<Order | null | undefined>;
64
64
  postTicketPrint(orderId: string, ticketNo: number, data?: TicketUpdate): Promise<Order | null | undefined>;
65
65
  postTicketStatus(orderId: string, ticketNo: number, status: TicketStatusUpdate): Promise<Order | null | undefined>;
@@ -289,6 +289,7 @@ var PosAPI = /** @class */ (function () {
289
289
  return this.request("/orders/".concat(orderId, "/print"), 'POST', {});
290
290
  };
291
291
  PosAPI.prototype.postTicketsPrint = function (orderId, data) {
292
+ if (data === void 0) { data = {}; }
292
293
  var endpoint = "/orders/".concat(orderId, "/tickets/print");
293
294
  return this.request(endpoint, 'POST', data);
294
295
  };
@@ -36,7 +36,7 @@ export declare const selectVersion: (state: AppState) => string | null;
36
36
  export declare const selectPinpad: (state: AppState) => boolean;
37
37
  export declare const selectCashDrawer: (state: AppState) => boolean;
38
38
  export declare const selectRevenueCenterId: (state: AppState) => number | null;
39
- export declare const selectStore: (state: AppState) => Store | null;
39
+ export declare const selectStore: (state: AppState) => {};
40
40
  export declare const selectSelectOptions: (state: AppState) => SelectOptions;
41
41
  export declare const selectTimezone: (state: AppState) => Timezone;
42
42
  export declare const selectLoyalty: (state: AppState) => boolean;
@@ -143,7 +143,7 @@ export var selectCashDrawer = function (state) { return state.config.hasCashDraw
143
143
  export var selectRevenueCenterId = function (state) {
144
144
  return state.config.revenueCenterId;
145
145
  };
146
- export var selectStore = function (state) { return state.config.store; };
146
+ export var selectStore = function (state) { return state.config.store || {}; };
147
147
  export var selectSelectOptions = function (state) {
148
148
  return state.config.selectOptions || [];
149
149
  };
@@ -34,7 +34,7 @@ export declare const printReceipt: import("@reduxjs/toolkit").AsyncThunk<void, s
34
34
  }>;
35
35
  export declare const printTickets: import("@reduxjs/toolkit").AsyncThunk<void, {
36
36
  orderId: string;
37
- data: OrderUpdate;
37
+ data?: OrderUpdate | undefined;
38
38
  }, {
39
39
  state: AppState;
40
40
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/store",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our in-store POS API",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",