@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.
- package/LICENSE +22 -0
- package/README.md +418 -0
- package/dist/actions/add-cart-discount/action.d.ts +6 -0
- package/dist/actions/add-cart-discount/action.js +8 -0
- package/dist/actions/add-cart-discount/types.d.ts +13 -0
- package/dist/actions/add-cart-discount/types.js +1 -0
- package/dist/actions/add-cart-fee/action.d.ts +6 -0
- package/dist/actions/add-cart-fee/action.js +8 -0
- package/dist/actions/add-cart-fee/types.d.ts +16 -0
- package/dist/actions/add-cart-fee/types.js +1 -0
- package/dist/actions/add-custom-sale/action.d.ts +6 -0
- package/dist/actions/add-custom-sale/action.js +8 -0
- package/dist/actions/add-custom-sale/types.d.ts +13 -0
- package/dist/actions/add-custom-sale/types.js +1 -0
- package/dist/actions/add-customer/action.d.ts +6 -0
- package/dist/actions/add-customer/action.js +8 -0
- package/dist/actions/add-customer/types.d.ts +9 -0
- package/dist/actions/add-customer/types.js +1 -0
- package/dist/actions/add-customer-note/action.d.ts +6 -0
- package/dist/actions/add-customer-note/action.js +8 -0
- package/dist/actions/add-customer-note/types.d.ts +11 -0
- package/dist/actions/add-customer-note/types.js +1 -0
- package/dist/actions/add-order-note/action.d.ts +6 -0
- package/dist/actions/add-order-note/action.js +8 -0
- package/dist/actions/add-order-note/types.d.ts +9 -0
- package/dist/actions/add-order-note/types.js +1 -0
- package/dist/actions/add-product-discount/action.d.ts +6 -0
- package/dist/actions/add-product-discount/action.js +8 -0
- package/dist/actions/add-product-discount/types.d.ts +13 -0
- package/dist/actions/add-product-discount/types.js +1 -0
- package/dist/actions/add-product-fee/action.d.ts +6 -0
- package/dist/actions/add-product-fee/action.js +8 -0
- package/dist/actions/add-product-fee/types.d.ts +16 -0
- package/dist/actions/add-product-fee/types.js +1 -0
- package/dist/actions/add-product-note/action.d.ts +6 -0
- package/dist/actions/add-product-note/action.js +8 -0
- package/dist/actions/add-product-note/types.d.ts +9 -0
- package/dist/actions/add-product-note/types.js +1 -0
- package/dist/actions/add-product-to-cart/action.d.ts +6 -0
- package/dist/actions/add-product-to-cart/action.js +8 -0
- package/dist/actions/add-product-to-cart/types.d.ts +12 -0
- package/dist/actions/add-product-to-cart/types.js +1 -0
- package/dist/actions/adjust-inventory/action.d.ts +6 -0
- package/dist/actions/adjust-inventory/action.js +8 -0
- package/dist/actions/adjust-inventory/types.d.ts +12 -0
- package/dist/actions/adjust-inventory/types.js +1 -0
- package/dist/actions/assign-customer/action.d.ts +6 -0
- package/dist/actions/assign-customer/action.js +8 -0
- package/dist/actions/assign-customer/types.d.ts +9 -0
- package/dist/actions/assign-customer/types.js +1 -0
- package/dist/actions/authenticate-user/action.d.ts +6 -0
- package/dist/actions/authenticate-user/action.js +8 -0
- package/dist/actions/authenticate-user/types.d.ts +9 -0
- package/dist/actions/authenticate-user/types.js +1 -0
- package/dist/actions/calculate-refund-total/action.d.ts +6 -0
- package/dist/actions/calculate-refund-total/action.js +8 -0
- package/dist/actions/calculate-refund-total/types.d.ts +12 -0
- package/dist/actions/calculate-refund-total/types.js +1 -0
- package/dist/actions/cash-payment/action.d.ts +6 -0
- package/dist/actions/cash-payment/action.js +8 -0
- package/dist/actions/cash-payment/types.d.ts +13 -0
- package/dist/actions/cash-payment/types.js +1 -0
- package/dist/actions/clear-cart/action.d.ts +6 -0
- package/dist/actions/clear-cart/action.js +8 -0
- package/dist/actions/clear-cart/types.d.ts +5 -0
- package/dist/actions/clear-cart/types.js +1 -0
- package/dist/actions/delete-parked-order/action.d.ts +6 -0
- package/dist/actions/delete-parked-order/action.js +8 -0
- package/dist/actions/delete-parked-order/types.d.ts +9 -0
- package/dist/actions/delete-parked-order/types.js +1 -0
- package/dist/actions/example-function/action.d.ts +6 -0
- package/dist/actions/example-function/action.js +8 -0
- package/dist/actions/example-function/types.d.ts +16 -0
- package/dist/actions/example-function/types.js +1 -0
- package/dist/actions/get-categories/action.d.ts +6 -0
- package/dist/actions/get-categories/action.js +8 -0
- package/dist/actions/get-categories/types.d.ts +16 -0
- package/dist/actions/get-categories/types.js +1 -0
- package/dist/actions/get-context/action.d.ts +6 -0
- package/dist/actions/get-context/action.js +8 -0
- package/dist/actions/get-context/types.d.ts +17 -0
- package/dist/actions/get-context/types.js +1 -0
- package/dist/actions/get-current-cart/action.d.ts +6 -0
- package/dist/actions/get-current-cart/action.js +8 -0
- package/dist/actions/get-current-cart/types.d.ts +6 -0
- package/dist/actions/get-current-cart/types.js +1 -0
- package/dist/actions/get-customers/action.d.ts +6 -0
- package/dist/actions/get-customers/action.js +8 -0
- package/dist/actions/get-customers/types.d.ts +31 -0
- package/dist/actions/get-customers/types.js +1 -0
- package/dist/actions/get-line-items-by-order/action.d.ts +6 -0
- package/dist/actions/get-line-items-by-order/action.js +8 -0
- package/dist/actions/get-line-items-by-order/types.d.ts +13 -0
- package/dist/actions/get-line-items-by-order/types.js +1 -0
- package/dist/actions/get-orders/action.d.ts +6 -0
- package/dist/actions/get-orders/action.js +8 -0
- package/dist/actions/get-orders/types.d.ts +17 -0
- package/dist/actions/get-orders/types.js +1 -0
- package/dist/actions/get-product-variants/action.d.ts +6 -0
- package/dist/actions/get-product-variants/action.js +8 -0
- package/dist/actions/get-product-variants/types.d.ts +9 -0
- package/dist/actions/get-product-variants/types.js +1 -0
- package/dist/actions/get-products/action.d.ts +6 -0
- package/dist/actions/get-products/action.js +8 -0
- package/dist/actions/get-products/types.d.ts +28 -0
- package/dist/actions/get-products/types.js +1 -0
- package/dist/actions/get-refunds/action.d.ts +6 -0
- package/dist/actions/get-refunds/action.js +8 -0
- package/dist/actions/get-refunds/types.d.ts +16 -0
- package/dist/actions/get-refunds/types.js +1 -0
- package/dist/actions/get-remaining-refundable-quantities/action.d.ts +6 -0
- package/dist/actions/get-remaining-refundable-quantities/action.js +8 -0
- package/dist/actions/get-remaining-refundable-quantities/types.d.ts +7 -0
- package/dist/actions/get-remaining-refundable-quantities/types.js +1 -0
- package/dist/actions/go-to-page/action.d.ts +6 -0
- package/dist/actions/go-to-page/action.js +8 -0
- package/dist/actions/go-to-page/types.d.ts +9 -0
- package/dist/actions/go-to-page/types.js +1 -0
- package/dist/actions/go-to-station-home/action.d.ts +6 -0
- package/dist/actions/go-to-station-home/action.js +8 -0
- package/dist/actions/go-to-station-home/types.d.ts +5 -0
- package/dist/actions/go-to-station-home/types.js +1 -0
- package/dist/actions/initiate-refund/action.d.ts +6 -0
- package/dist/actions/initiate-refund/action.js +8 -0
- package/dist/actions/initiate-refund/types.d.ts +9 -0
- package/dist/actions/initiate-refund/types.js +1 -0
- package/dist/actions/open-cash-drawer/action.d.ts +6 -0
- package/dist/actions/open-cash-drawer/action.js +8 -0
- package/dist/actions/open-cash-drawer/types.d.ts +5 -0
- package/dist/actions/open-cash-drawer/types.js +1 -0
- package/dist/actions/open-popup/action.d.ts +6 -0
- package/dist/actions/open-popup/action.js +8 -0
- package/dist/actions/open-popup/types.d.ts +9 -0
- package/dist/actions/open-popup/types.js +1 -0
- package/dist/actions/park-order/action.d.ts +6 -0
- package/dist/actions/park-order/action.js +8 -0
- package/dist/actions/park-order/types.d.ts +6 -0
- package/dist/actions/park-order/types.js +1 -0
- package/dist/actions/partial-payment/action.d.ts +6 -0
- package/dist/actions/partial-payment/action.js +8 -0
- package/dist/actions/partial-payment/types.d.ts +14 -0
- package/dist/actions/partial-payment/types.js +1 -0
- package/dist/actions/process-partial-refund/action.d.ts +6 -0
- package/dist/actions/process-partial-refund/action.js +8 -0
- package/dist/actions/process-partial-refund/types.d.ts +9 -0
- package/dist/actions/process-partial-refund/types.js +1 -0
- package/dist/actions/remove-customer-from-cart/action.d.ts +6 -0
- package/dist/actions/remove-customer-from-cart/action.js +8 -0
- package/dist/actions/remove-customer-from-cart/types.d.ts +5 -0
- package/dist/actions/remove-customer-from-cart/types.js +1 -0
- package/dist/actions/reset-refund-details/action.d.ts +6 -0
- package/dist/actions/reset-refund-details/action.js +8 -0
- package/dist/actions/reset-refund-details/types.d.ts +5 -0
- package/dist/actions/reset-refund-details/types.js +1 -0
- package/dist/actions/resume-parked-order/action.d.ts +6 -0
- package/dist/actions/resume-parked-order/action.js +8 -0
- package/dist/actions/resume-parked-order/types.d.ts +9 -0
- package/dist/actions/resume-parked-order/types.js +1 -0
- package/dist/actions/select-all-refund-items/action.d.ts +6 -0
- package/dist/actions/select-all-refund-items/action.js +8 -0
- package/dist/actions/select-all-refund-items/types.d.ts +6 -0
- package/dist/actions/select-all-refund-items/types.js +1 -0
- package/dist/actions/set-product-active/action.d.ts +6 -0
- package/dist/actions/set-product-active/action.js +8 -0
- package/dist/actions/set-product-active/types.d.ts +9 -0
- package/dist/actions/set-product-active/types.js +1 -0
- package/dist/actions/set-refund-stock-action/action.d.ts +6 -0
- package/dist/actions/set-refund-stock-action/action.js +8 -0
- package/dist/actions/set-refund-stock-action/types.d.ts +11 -0
- package/dist/actions/set-refund-stock-action/types.js +1 -0
- package/dist/actions/show-confirmation/action.d.ts +6 -0
- package/dist/actions/show-confirmation/action.js +8 -0
- package/dist/actions/show-confirmation/types.d.ts +9 -0
- package/dist/actions/show-confirmation/types.js +1 -0
- package/dist/actions/show-notification/action.d.ts +6 -0
- package/dist/actions/show-notification/action.js +8 -0
- package/dist/actions/show-notification/types.d.ts +9 -0
- package/dist/actions/show-notification/types.js +1 -0
- package/dist/actions/switch-user/action.d.ts +6 -0
- package/dist/actions/switch-user/action.js +8 -0
- package/dist/actions/switch-user/types.d.ts +13 -0
- package/dist/actions/switch-user/types.js +1 -0
- package/dist/actions/tap-to-pay-payment/action.d.ts +6 -0
- package/dist/actions/tap-to-pay-payment/action.js +8 -0
- package/dist/actions/tap-to-pay-payment/types.d.ts +11 -0
- package/dist/actions/tap-to-pay-payment/types.js +1 -0
- package/dist/actions/terminal-payment/action.d.ts +6 -0
- package/dist/actions/terminal-payment/action.js +8 -0
- package/dist/actions/terminal-payment/types.d.ts +11 -0
- package/dist/actions/terminal-payment/types.js +1 -0
- package/dist/actions/toggle-slide-out/action.d.ts +6 -0
- package/dist/actions/toggle-slide-out/action.js +8 -0
- package/dist/actions/toggle-slide-out/types.d.ts +9 -0
- package/dist/actions/toggle-slide-out/types.js +1 -0
- package/dist/actions/trigger-webhook/action.d.ts +6 -0
- package/dist/actions/trigger-webhook/action.js +8 -0
- package/dist/actions/trigger-webhook/types.d.ts +16 -0
- package/dist/actions/trigger-webhook/types.js +1 -0
- package/dist/actions/trigger-zapier-webhook/action.d.ts +6 -0
- package/dist/actions/trigger-zapier-webhook/action.js +8 -0
- package/dist/actions/trigger-zapier-webhook/types.d.ts +9 -0
- package/dist/actions/trigger-zapier-webhook/types.js +1 -0
- package/dist/actions/update-customer-facing-display/action.d.ts +6 -0
- package/dist/actions/update-customer-facing-display/action.js +8 -0
- package/dist/actions/update-customer-facing-display/types.d.ts +9 -0
- package/dist/actions/update-customer-facing-display/types.js +1 -0
- package/dist/actions/vendara-payment/action.d.ts +6 -0
- package/dist/actions/vendara-payment/action.js +8 -0
- package/dist/actions/vendara-payment/types.d.ts +11 -0
- package/dist/actions/vendara-payment/types.js +1 -0
- package/dist/client.d.ts +33 -0
- package/dist/client.js +145 -0
- package/dist/index.d.ts +108 -0
- package/dist/index.js +121 -0
- package/dist/types.d.ts +64 -0
- package/dist/types.js +1 -0
- 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,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,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,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 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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,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 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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,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,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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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,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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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,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,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
|
+
};
|