@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,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,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,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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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,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,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,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,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,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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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,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,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,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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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,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 {};
|