@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,17 @@
1
+ export interface GetOrdersParams {
2
+ status?: string;
3
+ customerId?: string;
4
+ sessionId?: string;
5
+ limit?: number;
6
+ offset?: number;
7
+ searchValue?: string;
8
+ sortBy?: string;
9
+ sortDirection?: 'ascending' | 'descending';
10
+ }
11
+ export interface GetOrdersResponse {
12
+ success: boolean;
13
+ orders: any[];
14
+ total: number;
15
+ timestamp: string;
16
+ }
17
+ export type GetOrders = (params?: GetOrdersParams) => Promise<GetOrdersResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Get product variants action
3
+ * Calls the getProductVariants action on the parent window
4
+ */
5
+ import type { GetProductVariants } from "./types";
6
+ export declare const getProductVariants: GetProductVariants;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Get product variants action
3
+ * Calls the getProductVariants action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const getProductVariants = async (params) => {
7
+ return await commandFrameClient.call("getProductVariants", params);
8
+ };
@@ -0,0 +1,9 @@
1
+ export interface GetProductVariantsParams {
2
+ productId: string;
3
+ }
4
+ export interface GetProductVariantsResponse {
5
+ variants: any[];
6
+ productId: string;
7
+ timestamp: string;
8
+ }
9
+ export type GetProductVariants = (params?: GetProductVariantsParams) => Promise<GetProductVariantsResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Get products action
3
+ * Calls the getProducts action on the parent window
4
+ */
5
+ import type { GetProducts } from "./types";
6
+ export declare const getProducts: GetProducts;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Get products action
3
+ * Calls the getProducts action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const getProducts = async (params) => {
7
+ return await commandFrameClient.call("getProducts", params);
8
+ };
@@ -0,0 +1,28 @@
1
+ export interface GetProductsParams {
2
+ query?: {
3
+ name?: string | {
4
+ $regex?: string;
5
+ $options?: string;
6
+ };
7
+ sku?: string | {
8
+ $regex?: string;
9
+ $options?: string;
10
+ };
11
+ status?: string;
12
+ productType?: string;
13
+ categories?: string | {
14
+ $in?: string[];
15
+ };
16
+ tags?: string | {
17
+ $in?: string[];
18
+ };
19
+ supplier?: string;
20
+ externalId?: string;
21
+ [key: string]: any;
22
+ };
23
+ }
24
+ export interface GetProductsResponse {
25
+ products: any[];
26
+ timestamp: string;
27
+ }
28
+ export type GetProducts = (params?: GetProductsParams) => Promise<GetProductsResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Get refunds action
3
+ * Calls the getRefunds action on the parent window
4
+ */
5
+ import type { GetRefunds } from "./types";
6
+ export declare const getRefunds: GetRefunds;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Get refunds action
3
+ * Calls the getRefunds action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const getRefunds = async (params) => {
7
+ return await commandFrameClient.call("getRefunds", params);
8
+ };
@@ -0,0 +1,16 @@
1
+ export interface GetRefundsParams {
2
+ orderId?: string;
3
+ sessionId?: string;
4
+ outletId?: string;
5
+ limit?: number;
6
+ offset?: number;
7
+ sortBy?: string;
8
+ sortDirection?: 'asc' | 'desc';
9
+ }
10
+ export interface GetRefundsResponse {
11
+ success: boolean;
12
+ refunds: any[];
13
+ total: number;
14
+ timestamp: string;
15
+ }
16
+ export type GetRefunds = (params?: GetRefundsParams) => Promise<GetRefundsResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Get remaining refundable quantities action
3
+ * Calls the getRemainingRefundableQuantities action on the parent window
4
+ */
5
+ import type { GetRemainingRefundableQuantities } from "./types";
6
+ export declare const getRemainingRefundableQuantities: GetRemainingRefundableQuantities;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Get remaining refundable quantities action
3
+ * Calls the getRemainingRefundableQuantities action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const getRemainingRefundableQuantities = async () => {
7
+ return await commandFrameClient.call("getRemainingRefundableQuantities");
8
+ };
@@ -0,0 +1,7 @@
1
+ export interface GetRemainingRefundableQuantitiesResponse {
2
+ success: boolean;
3
+ lineItems: Record<string, number>;
4
+ customSales: Record<string, number>;
5
+ timestamp: string;
6
+ }
7
+ export type GetRemainingRefundableQuantities = () => Promise<GetRemainingRefundableQuantitiesResponse>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Go to page action
3
+ * Calls the goToPage action on the parent window
4
+ */
5
+ import type { GoToPage } from "./types";
6
+ export declare const goToPage: GoToPage;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Go to page action
3
+ * Calls the goToPage action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const goToPage = async (params) => {
7
+ return await commandFrameClient.call("goToPage", params);
8
+ };
@@ -0,0 +1,9 @@
1
+ export interface GoToPageParams {
2
+ pageId: string;
3
+ }
4
+ export interface GoToPageResponse {
5
+ success: boolean;
6
+ pageId: string;
7
+ timestamp: string;
8
+ }
9
+ export type GoToPage = (params?: GoToPageParams) => Promise<GoToPageResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Go to station home action
3
+ * Calls the goToStationHome action on the parent window
4
+ */
5
+ import type { GoToStationHome } from "./types";
6
+ export declare const goToStationHome: GoToStationHome;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Go to station home action
3
+ * Calls the goToStationHome action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const goToStationHome = async () => {
7
+ return await commandFrameClient.call("goToStationHome", undefined);
8
+ };
@@ -0,0 +1,5 @@
1
+ export interface GoToStationHomeResponse {
2
+ success: boolean;
3
+ timestamp: string;
4
+ }
5
+ export type GoToStationHome = () => Promise<GoToStationHomeResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Initiate refund action
3
+ * Calls the initiateRefund action on the parent window
4
+ */
5
+ import type { InitiateRefund } from "./types";
6
+ export declare const initiateRefund: InitiateRefund;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Initiate refund action
3
+ * Calls the initiateRefund action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const initiateRefund = async (params) => {
7
+ return await commandFrameClient.call("initiateRefund", params);
8
+ };
@@ -0,0 +1,9 @@
1
+ export interface InitiateRefundParams {
2
+ orderId?: string;
3
+ }
4
+ export interface InitiateRefundResponse {
5
+ success: boolean;
6
+ orderId: string;
7
+ timestamp: string;
8
+ }
9
+ export type InitiateRefund = (params?: InitiateRefundParams) => Promise<InitiateRefundResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Open cash drawer action
3
+ * Calls the openCashDrawer action on the parent window
4
+ */
5
+ import type { OpenCashDrawer } from "./types";
6
+ export declare const openCashDrawer: OpenCashDrawer;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Open cash drawer action
3
+ * Calls the openCashDrawer action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const openCashDrawer = async () => {
7
+ return await commandFrameClient.call("openCashDrawer", undefined);
8
+ };
@@ -0,0 +1,5 @@
1
+ export interface OpenCashDrawerResponse {
2
+ success: boolean;
3
+ timestamp: string;
4
+ }
5
+ export type OpenCashDrawer = () => Promise<OpenCashDrawerResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Open popup action
3
+ * Calls the openPopup action on the parent window
4
+ */
5
+ import type { OpenPopup } from "./types";
6
+ export declare const openPopup: OpenPopup;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Open popup action
3
+ * Calls the openPopup action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const openPopup = async (params) => {
7
+ return await commandFrameClient.call("openPopup", params);
8
+ };
@@ -0,0 +1,9 @@
1
+ export interface OpenPopupParams {
2
+ popupId: string;
3
+ }
4
+ export interface OpenPopupResponse {
5
+ success: boolean;
6
+ popupId: string;
7
+ timestamp: string;
8
+ }
9
+ export type OpenPopup = (params?: OpenPopupParams) => Promise<OpenPopupResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Park order action
3
+ * Calls the parkOrder action on the parent window
4
+ */
5
+ import type { ParkOrder } from "./types";
6
+ export declare const parkOrder: ParkOrder;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Park order action
3
+ * Calls the parkOrder action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const parkOrder = async () => {
7
+ return await commandFrameClient.call("parkOrder", undefined);
8
+ };
@@ -0,0 +1,6 @@
1
+ export interface ParkOrderResponse {
2
+ success: boolean;
3
+ order: any;
4
+ timestamp: string;
5
+ }
6
+ export type ParkOrder = () => Promise<ParkOrderResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Partial payment action
3
+ * Calls the partialPayment action on the parent window
4
+ */
5
+ import type { PartialPayment } from "./types";
6
+ export declare const partialPayment: PartialPayment;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Partial payment action
3
+ * Calls the partialPayment action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const partialPayment = async (params) => {
7
+ return await commandFrameClient.call("partialPayment", params);
8
+ };
@@ -0,0 +1,14 @@
1
+ export interface PartialPaymentParams {
2
+ amount?: number;
3
+ isPercent?: boolean;
4
+ openUI?: boolean;
5
+ }
6
+ export interface PartialPaymentResponse {
7
+ success: boolean;
8
+ amount?: number;
9
+ isPercent?: boolean;
10
+ openUI: boolean;
11
+ order: any | null;
12
+ timestamp: string;
13
+ }
14
+ export type PartialPayment = (params?: PartialPaymentParams) => Promise<PartialPaymentResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Process partial refund action
3
+ * Calls the processPartialRefund action on the parent window
4
+ */
5
+ import type { ProcessPartialRefund } from "./types";
6
+ export declare const processPartialRefund: ProcessPartialRefund;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Process partial refund action
3
+ * Calls the processPartialRefund action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const processPartialRefund = async (params) => {
7
+ return await commandFrameClient.call("processPartialRefund", params);
8
+ };
@@ -0,0 +1,9 @@
1
+ export interface ProcessPartialRefundParams {
2
+ reason?: string;
3
+ }
4
+ export interface ProcessPartialRefundResponse {
5
+ success: boolean;
6
+ refundId: string;
7
+ timestamp: string;
8
+ }
9
+ export type ProcessPartialRefund = (params?: ProcessPartialRefundParams) => Promise<ProcessPartialRefundResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Remove customer from cart action
3
+ * Calls the removeCustomerFromCart action on the parent window
4
+ */
5
+ import type { RemoveCustomerFromCart } from "./types";
6
+ export declare const removeCustomerFromCart: RemoveCustomerFromCart;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Remove customer from cart action
3
+ * Calls the removeCustomerFromCart action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const removeCustomerFromCart = async () => {
7
+ return await commandFrameClient.call("removeCustomerFromCart", undefined);
8
+ };
@@ -0,0 +1,5 @@
1
+ export interface RemoveCustomerFromCartResponse {
2
+ success: boolean;
3
+ timestamp: string;
4
+ }
5
+ export type RemoveCustomerFromCart = () => Promise<RemoveCustomerFromCartResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Reset refund details action
3
+ * Calls the resetRefundDetails action on the parent window
4
+ */
5
+ import type { ResetRefundDetails } from "./types";
6
+ export declare const resetRefundDetails: ResetRefundDetails;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Reset refund details action
3
+ * Calls the resetRefundDetails action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const resetRefundDetails = async () => {
7
+ return await commandFrameClient.call("resetRefundDetails");
8
+ };
@@ -0,0 +1,5 @@
1
+ export interface ResetRefundDetailsResponse {
2
+ success: boolean;
3
+ timestamp: string;
4
+ }
5
+ export type ResetRefundDetails = () => Promise<ResetRefundDetailsResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Resume parked order action
3
+ * Calls the resumeParkedOrder action on the parent window
4
+ */
5
+ import type { ResumeParkedOrder } from "./types";
6
+ export declare const resumeParkedOrder: ResumeParkedOrder;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Resume parked order action
3
+ * Calls the resumeParkedOrder action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const resumeParkedOrder = async (params) => {
7
+ return await commandFrameClient.call("resumeParkedOrder", params);
8
+ };
@@ -0,0 +1,9 @@
1
+ export interface ResumeParkedOrderParams {
2
+ orderId: string;
3
+ }
4
+ export interface ResumeParkedOrderResponse {
5
+ success: boolean;
6
+ order: any;
7
+ timestamp: string;
8
+ }
9
+ export type ResumeParkedOrder = (params?: ResumeParkedOrderParams) => Promise<ResumeParkedOrderResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Select all refund items action
3
+ * Calls the selectAllRefundItems action on the parent window
4
+ */
5
+ import type { SelectAllRefundItems } from "./types";
6
+ export declare const selectAllRefundItems: SelectAllRefundItems;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Select all refund items action
3
+ * Calls the selectAllRefundItems action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const selectAllRefundItems = async () => {
7
+ return await commandFrameClient.call("selectAllRefundItems");
8
+ };
@@ -0,0 +1,6 @@
1
+ export interface SelectAllRefundItemsResponse {
2
+ success: boolean;
3
+ selectedItemsCount: number;
4
+ timestamp: string;
5
+ }
6
+ export type SelectAllRefundItems = () => Promise<SelectAllRefundItemsResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Set product active action
3
+ * Calls the setProductActive action on the parent window
4
+ */
5
+ import type { SetProductActive } from "./types";
6
+ export declare const setProductActive: SetProductActive;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Set product active action
3
+ * Calls the setProductActive action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const setProductActive = async (params) => {
7
+ return await commandFrameClient.call("setProductActive", params);
8
+ };
@@ -0,0 +1,9 @@
1
+ export interface SetProductActiveParams {
2
+ variantId: string;
3
+ }
4
+ export interface SetProductActiveResponse {
5
+ success: boolean;
6
+ variantId: string;
7
+ timestamp: string;
8
+ }
9
+ export type SetProductActive = (params?: SetProductActiveParams) => Promise<SetProductActiveResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Set refund stock action
3
+ * Calls the setRefundStockAction action on the parent window
4
+ */
5
+ import type { SetRefundStockAction } from "./types";
6
+ export declare const setRefundStockAction: SetRefundStockAction;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Set refund stock action
3
+ * Calls the setRefundStockAction action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const setRefundStockAction = async (params) => {
7
+ return await commandFrameClient.call("setRefundStockAction", params);
8
+ };
@@ -0,0 +1,11 @@
1
+ export interface SetRefundStockActionParams {
2
+ itemKey: string;
3
+ action: 'RESTOCK' | 'REFUND_DAMAGE';
4
+ }
5
+ export interface SetRefundStockActionResponse {
6
+ success: boolean;
7
+ itemKey: string;
8
+ action: string;
9
+ timestamp: string;
10
+ }
11
+ export type SetRefundStockAction = (params?: SetRefundStockActionParams) => Promise<SetRefundStockActionResponse>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Show confirmation action
3
+ * Calls the showConfirmation action on the parent window
4
+ */
5
+ import type { ShowConfirmation } from "./types";
6
+ export declare const showConfirmation: ShowConfirmation;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Show confirmation action
3
+ * Calls the showConfirmation action on the parent window
4
+ */
5
+ import { commandFrameClient } from "../../client";
6
+ export const showConfirmation = async (params) => {
7
+ return await commandFrameClient.call("showConfirmation", params);
8
+ };