@final-commerce/command-frame 0.0.1

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.
Files changed (217) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +418 -0
  3. package/dist/actions/add-cart-discount/action.d.ts +6 -0
  4. package/dist/actions/add-cart-discount/action.js +8 -0
  5. package/dist/actions/add-cart-discount/types.d.ts +13 -0
  6. package/dist/actions/add-cart-discount/types.js +1 -0
  7. package/dist/actions/add-cart-fee/action.d.ts +6 -0
  8. package/dist/actions/add-cart-fee/action.js +8 -0
  9. package/dist/actions/add-cart-fee/types.d.ts +16 -0
  10. package/dist/actions/add-cart-fee/types.js +1 -0
  11. package/dist/actions/add-custom-sale/action.d.ts +6 -0
  12. package/dist/actions/add-custom-sale/action.js +8 -0
  13. package/dist/actions/add-custom-sale/types.d.ts +13 -0
  14. package/dist/actions/add-custom-sale/types.js +1 -0
  15. package/dist/actions/add-customer/action.d.ts +6 -0
  16. package/dist/actions/add-customer/action.js +8 -0
  17. package/dist/actions/add-customer/types.d.ts +9 -0
  18. package/dist/actions/add-customer/types.js +1 -0
  19. package/dist/actions/add-customer-note/action.d.ts +6 -0
  20. package/dist/actions/add-customer-note/action.js +8 -0
  21. package/dist/actions/add-customer-note/types.d.ts +11 -0
  22. package/dist/actions/add-customer-note/types.js +1 -0
  23. package/dist/actions/add-order-note/action.d.ts +6 -0
  24. package/dist/actions/add-order-note/action.js +8 -0
  25. package/dist/actions/add-order-note/types.d.ts +9 -0
  26. package/dist/actions/add-order-note/types.js +1 -0
  27. package/dist/actions/add-product-discount/action.d.ts +6 -0
  28. package/dist/actions/add-product-discount/action.js +8 -0
  29. package/dist/actions/add-product-discount/types.d.ts +13 -0
  30. package/dist/actions/add-product-discount/types.js +1 -0
  31. package/dist/actions/add-product-fee/action.d.ts +6 -0
  32. package/dist/actions/add-product-fee/action.js +8 -0
  33. package/dist/actions/add-product-fee/types.d.ts +16 -0
  34. package/dist/actions/add-product-fee/types.js +1 -0
  35. package/dist/actions/add-product-note/action.d.ts +6 -0
  36. package/dist/actions/add-product-note/action.js +8 -0
  37. package/dist/actions/add-product-note/types.d.ts +9 -0
  38. package/dist/actions/add-product-note/types.js +1 -0
  39. package/dist/actions/add-product-to-cart/action.d.ts +6 -0
  40. package/dist/actions/add-product-to-cart/action.js +8 -0
  41. package/dist/actions/add-product-to-cart/types.d.ts +12 -0
  42. package/dist/actions/add-product-to-cart/types.js +1 -0
  43. package/dist/actions/adjust-inventory/action.d.ts +6 -0
  44. package/dist/actions/adjust-inventory/action.js +8 -0
  45. package/dist/actions/adjust-inventory/types.d.ts +12 -0
  46. package/dist/actions/adjust-inventory/types.js +1 -0
  47. package/dist/actions/assign-customer/action.d.ts +6 -0
  48. package/dist/actions/assign-customer/action.js +8 -0
  49. package/dist/actions/assign-customer/types.d.ts +9 -0
  50. package/dist/actions/assign-customer/types.js +1 -0
  51. package/dist/actions/authenticate-user/action.d.ts +6 -0
  52. package/dist/actions/authenticate-user/action.js +8 -0
  53. package/dist/actions/authenticate-user/types.d.ts +9 -0
  54. package/dist/actions/authenticate-user/types.js +1 -0
  55. package/dist/actions/calculate-refund-total/action.d.ts +6 -0
  56. package/dist/actions/calculate-refund-total/action.js +8 -0
  57. package/dist/actions/calculate-refund-total/types.d.ts +12 -0
  58. package/dist/actions/calculate-refund-total/types.js +1 -0
  59. package/dist/actions/cash-payment/action.d.ts +6 -0
  60. package/dist/actions/cash-payment/action.js +8 -0
  61. package/dist/actions/cash-payment/types.d.ts +13 -0
  62. package/dist/actions/cash-payment/types.js +1 -0
  63. package/dist/actions/clear-cart/action.d.ts +6 -0
  64. package/dist/actions/clear-cart/action.js +8 -0
  65. package/dist/actions/clear-cart/types.d.ts +5 -0
  66. package/dist/actions/clear-cart/types.js +1 -0
  67. package/dist/actions/delete-parked-order/action.d.ts +6 -0
  68. package/dist/actions/delete-parked-order/action.js +8 -0
  69. package/dist/actions/delete-parked-order/types.d.ts +9 -0
  70. package/dist/actions/delete-parked-order/types.js +1 -0
  71. package/dist/actions/example-function/action.d.ts +6 -0
  72. package/dist/actions/example-function/action.js +8 -0
  73. package/dist/actions/example-function/types.d.ts +16 -0
  74. package/dist/actions/example-function/types.js +1 -0
  75. package/dist/actions/get-categories/action.d.ts +6 -0
  76. package/dist/actions/get-categories/action.js +8 -0
  77. package/dist/actions/get-categories/types.d.ts +16 -0
  78. package/dist/actions/get-categories/types.js +1 -0
  79. package/dist/actions/get-context/action.d.ts +6 -0
  80. package/dist/actions/get-context/action.js +8 -0
  81. package/dist/actions/get-context/types.d.ts +17 -0
  82. package/dist/actions/get-context/types.js +1 -0
  83. package/dist/actions/get-current-cart/action.d.ts +6 -0
  84. package/dist/actions/get-current-cart/action.js +8 -0
  85. package/dist/actions/get-current-cart/types.d.ts +6 -0
  86. package/dist/actions/get-current-cart/types.js +1 -0
  87. package/dist/actions/get-customers/action.d.ts +6 -0
  88. package/dist/actions/get-customers/action.js +8 -0
  89. package/dist/actions/get-customers/types.d.ts +31 -0
  90. package/dist/actions/get-customers/types.js +1 -0
  91. package/dist/actions/get-line-items-by-order/action.d.ts +6 -0
  92. package/dist/actions/get-line-items-by-order/action.js +8 -0
  93. package/dist/actions/get-line-items-by-order/types.d.ts +13 -0
  94. package/dist/actions/get-line-items-by-order/types.js +1 -0
  95. package/dist/actions/get-orders/action.d.ts +6 -0
  96. package/dist/actions/get-orders/action.js +8 -0
  97. package/dist/actions/get-orders/types.d.ts +17 -0
  98. package/dist/actions/get-orders/types.js +1 -0
  99. package/dist/actions/get-product-variants/action.d.ts +6 -0
  100. package/dist/actions/get-product-variants/action.js +8 -0
  101. package/dist/actions/get-product-variants/types.d.ts +9 -0
  102. package/dist/actions/get-product-variants/types.js +1 -0
  103. package/dist/actions/get-products/action.d.ts +6 -0
  104. package/dist/actions/get-products/action.js +8 -0
  105. package/dist/actions/get-products/types.d.ts +28 -0
  106. package/dist/actions/get-products/types.js +1 -0
  107. package/dist/actions/get-refunds/action.d.ts +6 -0
  108. package/dist/actions/get-refunds/action.js +8 -0
  109. package/dist/actions/get-refunds/types.d.ts +16 -0
  110. package/dist/actions/get-refunds/types.js +1 -0
  111. package/dist/actions/get-remaining-refundable-quantities/action.d.ts +6 -0
  112. package/dist/actions/get-remaining-refundable-quantities/action.js +8 -0
  113. package/dist/actions/get-remaining-refundable-quantities/types.d.ts +7 -0
  114. package/dist/actions/get-remaining-refundable-quantities/types.js +1 -0
  115. package/dist/actions/go-to-page/action.d.ts +6 -0
  116. package/dist/actions/go-to-page/action.js +8 -0
  117. package/dist/actions/go-to-page/types.d.ts +9 -0
  118. package/dist/actions/go-to-page/types.js +1 -0
  119. package/dist/actions/go-to-station-home/action.d.ts +6 -0
  120. package/dist/actions/go-to-station-home/action.js +8 -0
  121. package/dist/actions/go-to-station-home/types.d.ts +5 -0
  122. package/dist/actions/go-to-station-home/types.js +1 -0
  123. package/dist/actions/initiate-refund/action.d.ts +6 -0
  124. package/dist/actions/initiate-refund/action.js +8 -0
  125. package/dist/actions/initiate-refund/types.d.ts +9 -0
  126. package/dist/actions/initiate-refund/types.js +1 -0
  127. package/dist/actions/open-cash-drawer/action.d.ts +6 -0
  128. package/dist/actions/open-cash-drawer/action.js +8 -0
  129. package/dist/actions/open-cash-drawer/types.d.ts +5 -0
  130. package/dist/actions/open-cash-drawer/types.js +1 -0
  131. package/dist/actions/open-popup/action.d.ts +6 -0
  132. package/dist/actions/open-popup/action.js +8 -0
  133. package/dist/actions/open-popup/types.d.ts +9 -0
  134. package/dist/actions/open-popup/types.js +1 -0
  135. package/dist/actions/park-order/action.d.ts +6 -0
  136. package/dist/actions/park-order/action.js +8 -0
  137. package/dist/actions/park-order/types.d.ts +6 -0
  138. package/dist/actions/park-order/types.js +1 -0
  139. package/dist/actions/partial-payment/action.d.ts +6 -0
  140. package/dist/actions/partial-payment/action.js +8 -0
  141. package/dist/actions/partial-payment/types.d.ts +14 -0
  142. package/dist/actions/partial-payment/types.js +1 -0
  143. package/dist/actions/process-partial-refund/action.d.ts +6 -0
  144. package/dist/actions/process-partial-refund/action.js +8 -0
  145. package/dist/actions/process-partial-refund/types.d.ts +9 -0
  146. package/dist/actions/process-partial-refund/types.js +1 -0
  147. package/dist/actions/remove-customer-from-cart/action.d.ts +6 -0
  148. package/dist/actions/remove-customer-from-cart/action.js +8 -0
  149. package/dist/actions/remove-customer-from-cart/types.d.ts +5 -0
  150. package/dist/actions/remove-customer-from-cart/types.js +1 -0
  151. package/dist/actions/reset-refund-details/action.d.ts +6 -0
  152. package/dist/actions/reset-refund-details/action.js +8 -0
  153. package/dist/actions/reset-refund-details/types.d.ts +5 -0
  154. package/dist/actions/reset-refund-details/types.js +1 -0
  155. package/dist/actions/resume-parked-order/action.d.ts +6 -0
  156. package/dist/actions/resume-parked-order/action.js +8 -0
  157. package/dist/actions/resume-parked-order/types.d.ts +9 -0
  158. package/dist/actions/resume-parked-order/types.js +1 -0
  159. package/dist/actions/select-all-refund-items/action.d.ts +6 -0
  160. package/dist/actions/select-all-refund-items/action.js +8 -0
  161. package/dist/actions/select-all-refund-items/types.d.ts +6 -0
  162. package/dist/actions/select-all-refund-items/types.js +1 -0
  163. package/dist/actions/set-product-active/action.d.ts +6 -0
  164. package/dist/actions/set-product-active/action.js +8 -0
  165. package/dist/actions/set-product-active/types.d.ts +9 -0
  166. package/dist/actions/set-product-active/types.js +1 -0
  167. package/dist/actions/set-refund-stock-action/action.d.ts +6 -0
  168. package/dist/actions/set-refund-stock-action/action.js +8 -0
  169. package/dist/actions/set-refund-stock-action/types.d.ts +11 -0
  170. package/dist/actions/set-refund-stock-action/types.js +1 -0
  171. package/dist/actions/show-confirmation/action.d.ts +6 -0
  172. package/dist/actions/show-confirmation/action.js +8 -0
  173. package/dist/actions/show-confirmation/types.d.ts +9 -0
  174. package/dist/actions/show-confirmation/types.js +1 -0
  175. package/dist/actions/show-notification/action.d.ts +6 -0
  176. package/dist/actions/show-notification/action.js +8 -0
  177. package/dist/actions/show-notification/types.d.ts +9 -0
  178. package/dist/actions/show-notification/types.js +1 -0
  179. package/dist/actions/switch-user/action.d.ts +6 -0
  180. package/dist/actions/switch-user/action.js +8 -0
  181. package/dist/actions/switch-user/types.d.ts +13 -0
  182. package/dist/actions/switch-user/types.js +1 -0
  183. package/dist/actions/tap-to-pay-payment/action.d.ts +6 -0
  184. package/dist/actions/tap-to-pay-payment/action.js +8 -0
  185. package/dist/actions/tap-to-pay-payment/types.d.ts +11 -0
  186. package/dist/actions/tap-to-pay-payment/types.js +1 -0
  187. package/dist/actions/terminal-payment/action.d.ts +6 -0
  188. package/dist/actions/terminal-payment/action.js +8 -0
  189. package/dist/actions/terminal-payment/types.d.ts +11 -0
  190. package/dist/actions/terminal-payment/types.js +1 -0
  191. package/dist/actions/toggle-slide-out/action.d.ts +6 -0
  192. package/dist/actions/toggle-slide-out/action.js +8 -0
  193. package/dist/actions/toggle-slide-out/types.d.ts +9 -0
  194. package/dist/actions/toggle-slide-out/types.js +1 -0
  195. package/dist/actions/trigger-webhook/action.d.ts +6 -0
  196. package/dist/actions/trigger-webhook/action.js +8 -0
  197. package/dist/actions/trigger-webhook/types.d.ts +16 -0
  198. package/dist/actions/trigger-webhook/types.js +1 -0
  199. package/dist/actions/trigger-zapier-webhook/action.d.ts +6 -0
  200. package/dist/actions/trigger-zapier-webhook/action.js +8 -0
  201. package/dist/actions/trigger-zapier-webhook/types.d.ts +9 -0
  202. package/dist/actions/trigger-zapier-webhook/types.js +1 -0
  203. package/dist/actions/update-customer-facing-display/action.d.ts +6 -0
  204. package/dist/actions/update-customer-facing-display/action.js +8 -0
  205. package/dist/actions/update-customer-facing-display/types.d.ts +9 -0
  206. package/dist/actions/update-customer-facing-display/types.js +1 -0
  207. package/dist/actions/vendara-payment/action.d.ts +6 -0
  208. package/dist/actions/vendara-payment/action.js +8 -0
  209. package/dist/actions/vendara-payment/types.d.ts +11 -0
  210. package/dist/actions/vendara-payment/types.js +1 -0
  211. package/dist/client.d.ts +33 -0
  212. package/dist/client.js +145 -0
  213. package/dist/index.d.ts +108 -0
  214. package/dist/index.js +121 -0
  215. package/dist/types.d.ts +64 -0
  216. package/dist/types.js +1 -0
  217. package/package.json +48 -0
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Add product discount action
3
+ * Calls the addProductDiscount action on the parent window
4
+ */
5
+ import type { AddProductDiscount } from "./types";
6
+ export declare const addProductDiscount: AddProductDiscount;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Add product discount action
3
+ * Calls the addProductDiscount action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const addProductDiscount = async (params) => {
7
+ return await commandFrameClient.call("addProductDiscount", params);
8
+ };
@@ -0,0 +1,13 @@
1
+ export interface AddProductDiscountParams {
2
+ amount: number;
3
+ isPercent?: boolean;
4
+ label?: string;
5
+ }
6
+ export interface AddProductDiscountResponse {
7
+ success: boolean;
8
+ amount: number;
9
+ isPercent: boolean;
10
+ label: string;
11
+ timestamp: string;
12
+ }
13
+ export type AddProductDiscount = (params?: AddProductDiscountParams) => Promise<AddProductDiscountResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Add product fee action
3
+ * Calls the addProductFee action on the parent window
4
+ */
5
+ import type { AddProductFee } from "./types";
6
+ export declare const addProductFee: AddProductFee;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Add product fee action
3
+ * Calls the addProductFee action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const addProductFee = async (params) => {
7
+ return await commandFrameClient.call("addProductFee", params);
8
+ };
@@ -0,0 +1,16 @@
1
+ export interface AddProductFeeParams {
2
+ amount: number;
3
+ isPercent?: boolean;
4
+ label?: string;
5
+ applyTaxes?: boolean;
6
+ taxTableId?: string;
7
+ }
8
+ export interface AddProductFeeResponse {
9
+ success: boolean;
10
+ amount: number;
11
+ isPercent: boolean;
12
+ label: string;
13
+ applyTaxes: boolean;
14
+ timestamp: string;
15
+ }
16
+ export type AddProductFee = (params?: AddProductFeeParams) => Promise<AddProductFeeResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Add product note action
3
+ * Calls the addProductNote action on the parent window
4
+ */
5
+ import type { AddProductNote } from "./types";
6
+ export declare const addProductNote: AddProductNote;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Add product note action
3
+ * Calls the addProductNote action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const addProductNote = async (params) => {
7
+ return await commandFrameClient.call("addProductNote", params);
8
+ };
@@ -0,0 +1,9 @@
1
+ export interface AddProductNoteParams {
2
+ note: string;
3
+ }
4
+ export interface AddProductNoteResponse {
5
+ success: boolean;
6
+ note: string;
7
+ timestamp: string;
8
+ }
9
+ export type AddProductNote = (params?: AddProductNoteParams) => Promise<AddProductNoteResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Add product to cart action
3
+ * Calls the addProductToCart action on the parent window
4
+ */
5
+ import type { AddProductToCart } from "./types";
6
+ export declare const addProductToCart: AddProductToCart;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Add product to cart action
3
+ * Calls the addProductToCart action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const addProductToCart = async (params) => {
7
+ return await commandFrameClient.call("addProductToCart", params);
8
+ };
@@ -0,0 +1,12 @@
1
+ export interface AddProductToCartParams {
2
+ quantity?: number;
3
+ }
4
+ export interface AddProductToCartResponse {
5
+ success: boolean;
6
+ productId: string;
7
+ variantId: string;
8
+ name: string;
9
+ quantity: number;
10
+ timestamp: string;
11
+ }
12
+ export type AddProductToCart = (params?: AddProductToCartParams) => Promise<AddProductToCartResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Adjust inventory action
3
+ * Calls the adjustInventory action on the parent window
4
+ */
5
+ import type { AdjustInventory } from "./types";
6
+ export declare const adjustInventory: AdjustInventory;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Adjust inventory action
3
+ * Calls the adjustInventory action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const adjustInventory = async (params) => {
7
+ return await commandFrameClient.call("adjustInventory", params);
8
+ };
@@ -0,0 +1,12 @@
1
+ export interface AdjustInventoryParams {
2
+ amount: string;
3
+ stockType: 'add' | 'subtract' | 'set';
4
+ }
5
+ export interface AdjustInventoryResponse {
6
+ success: boolean;
7
+ amount: string;
8
+ stockType: 'add' | 'subtract' | 'set';
9
+ newStock: number;
10
+ timestamp: string;
11
+ }
12
+ export type AdjustInventory = (params?: AdjustInventoryParams) => Promise<AdjustInventoryResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Assign customer action
3
+ * Calls the assignCustomer action on the parent window
4
+ */
5
+ import type { AssignCustomer } from "./types";
6
+ export declare const assignCustomer: AssignCustomer;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Assign customer action
3
+ * Calls the assignCustomer action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const assignCustomer = async (params) => {
7
+ return await commandFrameClient.call("assignCustomer", params);
8
+ };
@@ -0,0 +1,9 @@
1
+ export interface AssignCustomerParams {
2
+ customerId: string;
3
+ }
4
+ export interface AssignCustomerResponse {
5
+ success: boolean;
6
+ customer: any;
7
+ timestamp: string;
8
+ }
9
+ export type AssignCustomer = (params: AssignCustomerParams) => Promise<AssignCustomerResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Authenticate user action
3
+ * Calls the authenticateUser action on the parent window
4
+ */
5
+ import type { AuthenticateUser } from "./types";
6
+ export declare const authenticateUser: AuthenticateUser;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Authenticate user action
3
+ * Calls the authenticateUser action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const authenticateUser = async (params) => {
7
+ return await commandFrameClient.call("authenticateUser", params);
8
+ };
@@ -0,0 +1,9 @@
1
+ export interface AuthenticateUserParams {
2
+ roleIds: string[];
3
+ }
4
+ export interface AuthenticateUserResponse {
5
+ success: boolean;
6
+ roleIds: string[];
7
+ timestamp: string;
8
+ }
9
+ export type AuthenticateUser = (params?: AuthenticateUserParams) => Promise<AuthenticateUserResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Calculate refund total action
3
+ * Calls the calculateRefundTotal action on the parent window
4
+ */
5
+ import type { CalculateRefundTotal } from "./types";
6
+ export declare const calculateRefundTotal: CalculateRefundTotal;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Calculate refund total action
3
+ * Calls the calculateRefundTotal action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const calculateRefundTotal = async () => {
7
+ return await commandFrameClient.call("calculateRefundTotal");
8
+ };
@@ -0,0 +1,12 @@
1
+ export interface CalculateRefundTotalResponse {
2
+ success: boolean;
3
+ summary: {
4
+ subtotal: string;
5
+ tax: string;
6
+ total: string;
7
+ };
8
+ refundedLineItems: any[];
9
+ refundedCustomSales: any[];
10
+ timestamp: string;
11
+ }
12
+ export type CalculateRefundTotal = () => Promise<CalculateRefundTotalResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Cash payment action
3
+ * Calls the cashPayment action on the parent window
4
+ */
5
+ import type { CashPayment } from "./types";
6
+ export declare const cashPayment: CashPayment;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Cash payment action
3
+ * Calls the cashPayment action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const cashPayment = async (params) => {
7
+ return await commandFrameClient.call("cashPayment", params);
8
+ };
@@ -0,0 +1,13 @@
1
+ export interface CashPaymentParams {
2
+ amount?: number;
3
+ openChangeCalculator?: boolean;
4
+ }
5
+ export interface CashPaymentResponse {
6
+ success: boolean;
7
+ amount: number;
8
+ openChangeCalculator: boolean;
9
+ paymentType: string;
10
+ order: any | null;
11
+ timestamp: string;
12
+ }
13
+ export type CashPayment = (params?: CashPaymentParams) => Promise<CashPaymentResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Clear cart action
3
+ * Calls the clearCart action on the parent window
4
+ */
5
+ import type { ClearCart } from "./types";
6
+ export declare const clearCart: ClearCart;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Clear cart action
3
+ * Calls the clearCart action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const clearCart = async () => {
7
+ return await commandFrameClient.call("clearCart", undefined);
8
+ };
@@ -0,0 +1,5 @@
1
+ export interface ClearCartResponse {
2
+ success: boolean;
3
+ timestamp: string;
4
+ }
5
+ export type ClearCart = () => Promise<ClearCartResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Delete parked order action
3
+ * Calls the deleteParkedOrder action on the parent window
4
+ */
5
+ import type { DeleteParkedOrder } from "./types";
6
+ export declare const deleteParkedOrder: DeleteParkedOrder;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Delete parked order action
3
+ * Calls the deleteParkedOrder action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const deleteParkedOrder = async (params) => {
7
+ return await commandFrameClient.call("deleteParkedOrder", params);
8
+ };
@@ -0,0 +1,9 @@
1
+ export interface DeleteParkedOrderParams {
2
+ orderId: string;
3
+ }
4
+ export interface DeleteParkedOrderResponse {
5
+ success: boolean;
6
+ orderId: string;
7
+ timestamp: string;
8
+ }
9
+ export type DeleteParkedOrder = (params?: DeleteParkedOrderParams) => Promise<DeleteParkedOrderResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Example function action
3
+ * Calls the exampleFunction action on the parent window
4
+ */
5
+ import type { ExampleFunction } from "./types";
6
+ export declare const exampleFunction: ExampleFunction;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Example function action
3
+ * Calls the exampleFunction action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const exampleFunction = async (params) => {
7
+ return await commandFrameClient.call("exampleFunction", params);
8
+ };
@@ -0,0 +1,16 @@
1
+ export interface ExampleFunctionParams {
2
+ param1?: string;
3
+ param2?: string;
4
+ param3?: string;
5
+ }
6
+ export interface ExampleFunctionResponse {
7
+ receivedParams: ExampleFunctionParams;
8
+ responsePayload: {
9
+ field1: string;
10
+ field2: string;
11
+ field3: string;
12
+ };
13
+ timestamp: string;
14
+ processed: boolean;
15
+ }
16
+ export type ExampleFunction = (params?: ExampleFunctionParams) => Promise<ExampleFunctionResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Get categories action
3
+ * Calls the getCategories action on the parent window
4
+ */
5
+ import type { GetCategories } from "./types";
6
+ export declare const getCategories: GetCategories;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Get categories action
3
+ * Calls the getCategories action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const getCategories = async (params) => {
7
+ return await commandFrameClient.call("getCategories", params);
8
+ };
@@ -0,0 +1,16 @@
1
+ export interface GetCategoriesParams {
2
+ query?: {
3
+ name?: string | {
4
+ $regex?: string;
5
+ $options?: string;
6
+ };
7
+ parentId?: string | null;
8
+ externalId?: string;
9
+ [key: string]: any;
10
+ };
11
+ }
12
+ export interface GetCategoriesResponse {
13
+ categories: any[];
14
+ timestamp: string;
15
+ }
16
+ export type GetCategories = (params?: GetCategoriesParams) => Promise<GetCategoriesResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Get context action
3
+ * Calls the getContext action on the parent window
4
+ */
5
+ import type { GetContext } from "./types";
6
+ export declare const getContext: GetContext;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Get context action
3
+ * Calls the getContext action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const getContext = async () => {
7
+ return await commandFrameClient.call("getContext", undefined);
8
+ };
@@ -0,0 +1,17 @@
1
+ export interface GetContextResponse {
2
+ userId: string | null;
3
+ companyId: string | null;
4
+ companyName: string | null;
5
+ deviceId: string | null;
6
+ stationId: string | null;
7
+ stationName: string | null;
8
+ outletId: string | null;
9
+ outletName: string | null;
10
+ buildId: string | null;
11
+ buildName: string | null;
12
+ buildVersion: string | null;
13
+ buildSourceId: string | null;
14
+ buildIsPremium: boolean;
15
+ timestamp: string;
16
+ }
17
+ export type GetContext = () => Promise<GetContextResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Get current cart action
3
+ * Calls the getCurrentCart action on the parent window
4
+ */
5
+ import type { GetCurrentCart } from "./types";
6
+ export declare const getCurrentCart: GetCurrentCart;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Get current cart action
3
+ * Calls the getCurrentCart action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const getCurrentCart = async () => {
7
+ return await commandFrameClient.call("getCurrentCart");
8
+ };
@@ -0,0 +1,6 @@
1
+ export interface GetCurrentCartResponse {
2
+ success: boolean;
3
+ cart: any;
4
+ timestamp: string;
5
+ }
6
+ export type GetCurrentCart = () => Promise<GetCurrentCartResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Get customers action
3
+ * Calls the getCustomers action on the parent window
4
+ */
5
+ import type { GetCustomers } from "./types";
6
+ export declare const getCustomers: GetCustomers;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Get customers action
3
+ * Calls the getCustomers action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const getCustomers = async (params) => {
7
+ return await commandFrameClient.call("getCustomers", params);
8
+ };
@@ -0,0 +1,31 @@
1
+ export interface GetCustomersParams {
2
+ query?: {
3
+ email?: string | {
4
+ $regex?: string;
5
+ $options?: string;
6
+ };
7
+ firstName?: string | {
8
+ $regex?: string;
9
+ $options?: string;
10
+ };
11
+ lastName?: string | {
12
+ $regex?: string;
13
+ $options?: string;
14
+ };
15
+ phone?: string | {
16
+ $regex?: string;
17
+ $options?: string;
18
+ };
19
+ tags?: string | {
20
+ $in?: string[];
21
+ };
22
+ outletId?: string;
23
+ [key: string]: any;
24
+ };
25
+ }
26
+ export interface GetCustomersResponse {
27
+ customers: any[];
28
+ total?: number;
29
+ timestamp: string;
30
+ }
31
+ export type GetCustomers = (params?: GetCustomersParams) => Promise<GetCustomersResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Get line items by order action
3
+ * Calls the getLineItemsByOrder action on the parent window
4
+ */
5
+ import type { GetLineItemsByOrder } from "./types";
6
+ export declare const getLineItemsByOrder: GetLineItemsByOrder;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Get line items by order action
3
+ * Calls the getLineItemsByOrder action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const getLineItemsByOrder = async (params) => {
7
+ return await commandFrameClient.call("getLineItemsByOrder", params);
8
+ };
@@ -0,0 +1,13 @@
1
+ export interface GetLineItemsByOrderParams {
2
+ orderId?: string;
3
+ }
4
+ export interface GetLineItemsByOrderResponse {
5
+ success: boolean;
6
+ orderId: string;
7
+ lineItems: any[];
8
+ customSales: any[];
9
+ remainingQuantities: Record<string, number>;
10
+ remainingCustomSalesQuantities: Record<string, number>;
11
+ timestamp: string;
12
+ }
13
+ export type GetLineItemsByOrder = (params?: GetLineItemsByOrderParams) => Promise<GetLineItemsByOrderResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Get orders action
3
+ * Calls the getOrders action on the parent window
4
+ */
5
+ import type { GetOrders } from "./types";
6
+ export declare const getOrders: GetOrders;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Get orders action
3
+ * Calls the getOrders action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const getOrders = async (params) => {
7
+ return await commandFrameClient.call("getOrders", params);
8
+ };