@final-commerce/command-frame 0.1.20 → 0.1.22
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/dist/actions/delete-custom-table-data/action.d.ts +2 -2
- package/dist/actions/delete-custom-table-data/action.js +2 -2
- package/dist/actions/delete-custom-table-data/mock.d.ts +2 -0
- package/dist/actions/delete-custom-table-data/mock.js +7 -0
- package/dist/actions/get-custom-extension-custom-tables/action.d.ts +6 -0
- package/dist/actions/get-custom-extension-custom-tables/action.js +8 -0
- package/dist/actions/get-custom-extension-custom-tables/mock.d.ts +2 -0
- package/dist/actions/get-custom-extension-custom-tables/mock.js +8 -0
- package/dist/actions/get-custom-extension-custom-tables/types.d.ts +10 -0
- package/dist/actions/get-custom-extension-custom-tables/types.js +1 -0
- package/dist/actions/get-custom-extensions/action.d.ts +6 -0
- package/dist/actions/get-custom-extensions/action.js +8 -0
- package/dist/actions/get-custom-extensions/mock.d.ts +2 -0
- package/dist/actions/get-custom-extensions/mock.js +8 -0
- package/dist/actions/get-custom-extensions/types.d.ts +7 -0
- package/dist/actions/get-custom-extensions/types.js +1 -0
- package/dist/actions/get-custom-table-data/action.d.ts +2 -2
- package/dist/actions/get-custom-table-data/action.js +2 -2
- package/dist/actions/get-custom-table-data/mock.d.ts +2 -0
- package/dist/actions/get-custom-table-data/mock.js +8 -0
- package/dist/actions/get-custom-tables/mock.d.ts +2 -0
- package/dist/actions/get-custom-tables/mock.js +8 -0
- package/dist/actions/print/action.d.ts +6 -0
- package/dist/actions/print/action.js +8 -0
- package/dist/actions/print/mock.d.ts +2 -0
- package/dist/actions/print/mock.js +26 -0
- package/dist/actions/print/types.d.ts +44 -0
- package/dist/actions/print/types.js +1 -0
- package/dist/actions/set-active-order/action.d.ts +6 -0
- package/dist/actions/set-active-order/action.js +8 -0
- package/dist/actions/set-active-order/mock.d.ts +2 -0
- package/dist/actions/set-active-order/mock.js +19 -0
- package/dist/actions/set-active-order/types.d.ts +10 -0
- package/dist/actions/set-active-order/types.js +1 -0
- package/dist/actions/upsert-custom-table-data/mock.d.ts +2 -0
- package/dist/actions/upsert-custom-table-data/mock.js +8 -0
- package/dist/common-types/base-entity.d.ts +5 -0
- package/dist/common-types/base-entity.js +1 -0
- package/dist/common-types/custom-extensions.d.ts +18 -0
- package/dist/common-types/custom-extensions.js +1 -0
- package/dist/common-types/custom-tables.d.ts +3 -4
- package/dist/common-types/index.d.ts +1 -0
- package/dist/common-types/index.js +1 -0
- package/dist/demo/mocks/custom-tables.js +15 -5
- package/dist/index.d.ts +11 -0
- package/dist/index.js +16 -0
- package/dist/projects/render/mocks.js +16 -0
- package/dist/projects/render/types.d.ts +9 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* Calls the
|
|
2
|
+
* Delete custom table data action
|
|
3
|
+
* Calls the deleteCustomTableData action on the parent window
|
|
4
4
|
*/
|
|
5
5
|
import type { DeleteCustomTableData } from "./types";
|
|
6
6
|
export declare const deleteCustomTableData: DeleteCustomTableData;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* Calls the
|
|
2
|
+
* Delete custom table data action
|
|
3
|
+
* Calls the deleteCustomTableData action on the parent window
|
|
4
4
|
*/
|
|
5
5
|
import { commandFrameClient } from "../../client";
|
|
6
6
|
export const deleteCustomTableData = async (params) => {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get custom extensions action
|
|
3
|
+
* Calls the getCustomExtensions action on the parent window
|
|
4
|
+
*/
|
|
5
|
+
import { commandFrameClient } from "../../client";
|
|
6
|
+
export const getCustomExtensionCustomTables = async (params) => {
|
|
7
|
+
return await commandFrameClient.call("getCustomExtensionCustomTables", params);
|
|
8
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CFCustomTable } from "../../common-types/custom-tables";
|
|
2
|
+
export interface GetCustomExtensionCustomTablesParams {
|
|
3
|
+
extensionId: string;
|
|
4
|
+
}
|
|
5
|
+
export interface GetCustomExtensionCustomTablesResponse {
|
|
6
|
+
success: boolean;
|
|
7
|
+
customTables: CFCustomTable[];
|
|
8
|
+
timestamp: string;
|
|
9
|
+
}
|
|
10
|
+
export type GetCustomExtensionCustomTables = (params: GetCustomExtensionCustomTablesParams) => Promise<GetCustomExtensionCustomTablesResponse>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get custom extensions action
|
|
3
|
+
* Calls the getCustomExtensions action on the parent window
|
|
4
|
+
*/
|
|
5
|
+
import { commandFrameClient } from "../../client";
|
|
6
|
+
export const getCustomExtensions = async () => {
|
|
7
|
+
return await commandFrameClient.call("getCustomExtensions");
|
|
8
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CustomExtension } from "../../common-types/custom-extensions";
|
|
2
|
+
export interface GetCustomExtensionsResponse {
|
|
3
|
+
success: boolean;
|
|
4
|
+
customExtensions: CustomExtension[];
|
|
5
|
+
timestamp: string;
|
|
6
|
+
}
|
|
7
|
+
export type GetCustomExtensions = () => Promise<GetCustomExtensionsResponse>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Get custom
|
|
3
|
-
* Calls the
|
|
2
|
+
* Get custom table data action
|
|
3
|
+
* Calls the getCustomTableData action on the parent window
|
|
4
4
|
*/
|
|
5
5
|
import type { GetCustomTableData } from "./types";
|
|
6
6
|
export declare const getCustomTableData: GetCustomTableData;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Get custom
|
|
3
|
-
* Calls the
|
|
2
|
+
* Get custom table data action
|
|
3
|
+
* Calls the getCustomTableData action on the parent window
|
|
4
4
|
*/
|
|
5
5
|
import { commandFrameClient } from "../../client";
|
|
6
6
|
export const getCustomTableData = async (params) => {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export const mockPrint = async (params) => {
|
|
2
|
+
console.log("[Mock] print called", params);
|
|
3
|
+
if (!params) {
|
|
4
|
+
throw new Error("Print parameters are required");
|
|
5
|
+
}
|
|
6
|
+
// Mock implementation - just log what would be printed
|
|
7
|
+
switch (params.type) {
|
|
8
|
+
case "image":
|
|
9
|
+
console.log("[Mock] Would print image:", params.data.image?.substring(0, 50) + "...");
|
|
10
|
+
break;
|
|
11
|
+
case "html":
|
|
12
|
+
console.log("[Mock] Would print HTML:", params.data.html?.substring(0, 100) + "...");
|
|
13
|
+
break;
|
|
14
|
+
case "selector":
|
|
15
|
+
console.log("[Mock] Would print element with selector:", params.data.selector);
|
|
16
|
+
break;
|
|
17
|
+
case "receipt":
|
|
18
|
+
console.log("[Mock] Would print receipt for order:", params.data.order);
|
|
19
|
+
break;
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
success: true,
|
|
23
|
+
timestamp: new Date().toISOString(),
|
|
24
|
+
type: params.type
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { CFActiveOrder } from "../../CommonTypes";
|
|
2
|
+
export type PrintType = "image" | "html" | "selector" | "receipt";
|
|
3
|
+
export type PrintParams = {
|
|
4
|
+
type: "image";
|
|
5
|
+
data: {
|
|
6
|
+
image: string;
|
|
7
|
+
};
|
|
8
|
+
options?: PrintOptions;
|
|
9
|
+
} | {
|
|
10
|
+
type: "html";
|
|
11
|
+
data: {
|
|
12
|
+
html: string;
|
|
13
|
+
};
|
|
14
|
+
options?: PrintOptions;
|
|
15
|
+
} | {
|
|
16
|
+
type: "selector";
|
|
17
|
+
data: {
|
|
18
|
+
selector: string;
|
|
19
|
+
};
|
|
20
|
+
options?: PrintOptions;
|
|
21
|
+
} | {
|
|
22
|
+
type: "receipt";
|
|
23
|
+
data: {
|
|
24
|
+
order?: Omit<CFActiveOrder, "_id">;
|
|
25
|
+
globalBlockId?: string;
|
|
26
|
+
};
|
|
27
|
+
options?: PrintOptions;
|
|
28
|
+
};
|
|
29
|
+
export interface PrintOptions {
|
|
30
|
+
margins?: {
|
|
31
|
+
top?: number;
|
|
32
|
+
right?: number;
|
|
33
|
+
bottom?: number;
|
|
34
|
+
left?: number;
|
|
35
|
+
};
|
|
36
|
+
paperSize?: string;
|
|
37
|
+
width?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface PrintResponse {
|
|
40
|
+
success: boolean;
|
|
41
|
+
timestamp: string;
|
|
42
|
+
type: PrintType;
|
|
43
|
+
}
|
|
44
|
+
export type Print = (params?: PrintParams) => Promise<PrintResponse>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Set active order action
|
|
3
|
+
* Calls the setActiveOrder action on the parent window
|
|
4
|
+
*/
|
|
5
|
+
import { commandFrameClient } from "../../client";
|
|
6
|
+
export const setActiveOrder = async (params) => {
|
|
7
|
+
return await commandFrameClient.call("setActiveOrder", params);
|
|
8
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const mockSetActiveOrder = async (params) => {
|
|
2
|
+
console.log("[Mock] setActiveOrder called", params);
|
|
3
|
+
if (!params?.orderId) {
|
|
4
|
+
throw new Error("Order ID is required");
|
|
5
|
+
}
|
|
6
|
+
// Mock order response
|
|
7
|
+
return {
|
|
8
|
+
success: true,
|
|
9
|
+
order: {
|
|
10
|
+
_id: params.orderId,
|
|
11
|
+
id: params.orderId,
|
|
12
|
+
status: "completed",
|
|
13
|
+
companyId: "mock-company",
|
|
14
|
+
createdAt: new Date().toISOString(),
|
|
15
|
+
updatedAt: new Date().toISOString()
|
|
16
|
+
},
|
|
17
|
+
timestamp: new Date().toISOString()
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CFOrder } from "../../CommonTypes";
|
|
2
|
+
export interface SetActiveOrderParams {
|
|
3
|
+
orderId: string;
|
|
4
|
+
}
|
|
5
|
+
export interface SetActiveOrderResponse {
|
|
6
|
+
success: boolean;
|
|
7
|
+
order: CFOrder;
|
|
8
|
+
timestamp: string;
|
|
9
|
+
}
|
|
10
|
+
export type SetActiveOrder = (params?: SetActiveOrderParams) => Promise<SetActiveOrderResponse>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseEntity } from "./base-entity";
|
|
2
|
+
export type CustomExtension = BaseEntity & {
|
|
3
|
+
_id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
backgroundUrl?: string;
|
|
7
|
+
gallery?: string[];
|
|
8
|
+
category: string;
|
|
9
|
+
short_description?: string;
|
|
10
|
+
long_description?: string;
|
|
11
|
+
main_image?: string;
|
|
12
|
+
price: string;
|
|
13
|
+
isDeleted: boolean;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
updatedAt: string;
|
|
16
|
+
__v: number;
|
|
17
|
+
website?: string;
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { BaseEntity } from "./base-entity";
|
|
2
|
+
export type CFCustomTable = BaseEntity & {
|
|
3
3
|
name: string;
|
|
4
4
|
description?: string;
|
|
5
5
|
metadata?: Array<{
|
|
@@ -14,8 +14,7 @@ export declare enum AttributeType {
|
|
|
14
14
|
DATE = "date",
|
|
15
15
|
JSON_STRING = "json-string"
|
|
16
16
|
}
|
|
17
|
-
export type CFCustomTableField = {
|
|
18
|
-
_id: string;
|
|
17
|
+
export type CFCustomTableField = BaseEntity & {
|
|
19
18
|
tableId: string;
|
|
20
19
|
name: string;
|
|
21
20
|
type: AttributeType;
|
|
@@ -9,7 +9,9 @@ export const MOCK_CUSTOM_TABLES = [
|
|
|
9
9
|
key: "value",
|
|
10
10
|
value: "value"
|
|
11
11
|
}
|
|
12
|
-
]
|
|
12
|
+
],
|
|
13
|
+
createdAt: new Date().toISOString(),
|
|
14
|
+
updatedAt: new Date().toISOString()
|
|
13
15
|
}
|
|
14
16
|
];
|
|
15
17
|
export const MOCK_CUSTOM_TABLE_FIELDS = [
|
|
@@ -18,7 +20,9 @@ export const MOCK_CUSTOM_TABLE_FIELDS = [
|
|
|
18
20
|
tableId: "custom_table_1",
|
|
19
21
|
name: "customerId",
|
|
20
22
|
type: AttributeType.STRING,
|
|
21
|
-
required: true
|
|
23
|
+
required: true,
|
|
24
|
+
createdAt: new Date().toISOString(),
|
|
25
|
+
updatedAt: new Date().toISOString()
|
|
22
26
|
},
|
|
23
27
|
{
|
|
24
28
|
_id: "field_2",
|
|
@@ -26,7 +30,9 @@ export const MOCK_CUSTOM_TABLE_FIELDS = [
|
|
|
26
30
|
name: "points",
|
|
27
31
|
type: AttributeType.NUMBER,
|
|
28
32
|
required: true,
|
|
29
|
-
defaultValue: 0
|
|
33
|
+
defaultValue: 0,
|
|
34
|
+
createdAt: new Date().toISOString(),
|
|
35
|
+
updatedAt: new Date().toISOString()
|
|
30
36
|
},
|
|
31
37
|
{
|
|
32
38
|
_id: "field_3",
|
|
@@ -34,13 +40,17 @@ export const MOCK_CUSTOM_TABLE_FIELDS = [
|
|
|
34
40
|
name: "isActive",
|
|
35
41
|
type: AttributeType.BOOLEAN,
|
|
36
42
|
required: false,
|
|
37
|
-
defaultValue: true
|
|
43
|
+
defaultValue: true,
|
|
44
|
+
createdAt: new Date().toISOString(),
|
|
45
|
+
updatedAt: new Date().toISOString()
|
|
38
46
|
},
|
|
39
47
|
{
|
|
40
48
|
_id: "field_4",
|
|
41
49
|
tableId: "custom_table_1",
|
|
42
50
|
name: "lastUpdated",
|
|
43
51
|
type: AttributeType.DATE,
|
|
44
|
-
required: false
|
|
52
|
+
required: false,
|
|
53
|
+
createdAt: new Date().toISOString(),
|
|
54
|
+
updatedAt: new Date().toISOString()
|
|
45
55
|
}
|
|
46
56
|
];
|
package/dist/index.d.ts
CHANGED
|
@@ -38,6 +38,8 @@ export declare const command: {
|
|
|
38
38
|
readonly authenticateUser: import("./actions/authenticate-user/types").AuthenticateUser;
|
|
39
39
|
readonly partialPayment: import("./actions/partial-payment/types").PartialPayment;
|
|
40
40
|
readonly switchUser: import("./actions/switch-user/types").SwitchUser;
|
|
41
|
+
readonly print: import("./actions/print/types").Print;
|
|
42
|
+
readonly setActiveOrder: import("./actions/set-active-order/types").SetActiveOrder;
|
|
41
43
|
readonly triggerWebhook: import("./actions/trigger-webhook/types").TriggerWebhook;
|
|
42
44
|
readonly triggerZapierWebhook: import("./actions/trigger-zapier-webhook/types").TriggerZapierWebhook;
|
|
43
45
|
readonly initiateRefund: import("./actions/initiate-refund/types").InitiateRefund;
|
|
@@ -49,6 +51,11 @@ export declare const command: {
|
|
|
49
51
|
readonly processPartialRefund: import("./actions/process-partial-refund/types").ProcessPartialRefund;
|
|
50
52
|
readonly getCustomTables: import("./actions/get-custom-tables/types").GetCustomTables;
|
|
51
53
|
readonly getCustomTableFields: import("./actions/get-custom-table-fields/types").GetCustomTableFields;
|
|
54
|
+
readonly getCustomTableData: import("./actions/get-custom-table-data/types").GetCustomTableData;
|
|
55
|
+
readonly upsertCustomTableData: import("./actions/upsert-custom-table-data/types").UpsertCustomTableData;
|
|
56
|
+
readonly deleteCustomTableData: import("./actions/delete-custom-table-data/types").DeleteCustomTableData;
|
|
57
|
+
readonly getCustomExtensions: import("./actions/get-custom-extensions/types").GetCustomExtensions;
|
|
58
|
+
readonly getCustomExtensionCustomTables: import("./actions/get-custom-extension-custom-tables/types").GetCustomExtensionCustomTables;
|
|
52
59
|
};
|
|
53
60
|
export type { ExampleFunction, ExampleFunctionParams, ExampleFunctionResponse } from "./actions/example-function/types";
|
|
54
61
|
export type { GetProducts, GetProductsParams, GetProductsResponse } from "./actions/get-products/types";
|
|
@@ -96,6 +103,8 @@ export type { ShowConfirmation, ShowConfirmationParams, ShowConfirmationResponse
|
|
|
96
103
|
export type { AuthenticateUser, AuthenticateUserParams, AuthenticateUserResponse } from "./actions/authenticate-user/types";
|
|
97
104
|
export type { PartialPayment, PartialPaymentParams, PartialPaymentResponse } from "./actions/partial-payment/types";
|
|
98
105
|
export type { SwitchUser, SwitchUserParams, SwitchUserResponse } from "./actions/switch-user/types";
|
|
106
|
+
export type { Print, PrintParams, PrintResponse } from "./actions/print/types";
|
|
107
|
+
export type { SetActiveOrder, SetActiveOrderParams, SetActiveOrderResponse } from "./actions/set-active-order/types";
|
|
99
108
|
export type { TriggerWebhook, TriggerWebhookPresetType, TriggerWebhookParams, TriggerWebhookResponse } from "./actions/trigger-webhook/types";
|
|
100
109
|
export type { TriggerZapierWebhook, TriggerZapierWebhookParams, TriggerZapierWebhookResponse } from "./actions/trigger-zapier-webhook/types";
|
|
101
110
|
export * from "./CommonTypes";
|
|
@@ -126,3 +135,5 @@ export type { GetCustomTableFields, GetCustomTableFieldsParams, GetCustomTableFi
|
|
|
126
135
|
export type { GetCustomTableData, GetCustomTableDataParams, GetCustomTableDataResponse } from "./actions/get-custom-table-data/types";
|
|
127
136
|
export type { UpsertCustomTableData, UpsertCustomTableDataParams, UpsertCustomTableDataResponse } from "./actions/upsert-custom-table-data/types";
|
|
128
137
|
export type { DeleteCustomTableData, DeleteCustomTableDataParams, DeleteCustomTableDataResponse } from "./actions/delete-custom-table-data/types";
|
|
138
|
+
export type { GetCustomExtensions, GetCustomExtensionsResponse } from "./actions/get-custom-extensions/types";
|
|
139
|
+
export type { GetCustomExtensionCustomTables, GetCustomExtensionCustomTablesParams, GetCustomExtensionCustomTablesResponse } from "./actions/get-custom-extension-custom-tables/types";
|
package/dist/index.js
CHANGED
|
@@ -41,6 +41,8 @@ import { showConfirmation } from "./actions/show-confirmation/action";
|
|
|
41
41
|
import { authenticateUser } from "./actions/authenticate-user/action";
|
|
42
42
|
import { partialPayment } from "./actions/partial-payment/action";
|
|
43
43
|
import { switchUser } from "./actions/switch-user/action";
|
|
44
|
+
import { print } from "./actions/print/action";
|
|
45
|
+
import { setActiveOrder } from "./actions/set-active-order/action";
|
|
44
46
|
// Integration Actions
|
|
45
47
|
import { triggerWebhook } from "./actions/trigger-webhook/action";
|
|
46
48
|
import { triggerZapierWebhook } from "./actions/trigger-zapier-webhook/action";
|
|
@@ -56,6 +58,12 @@ import { processPartialRefund } from "./actions/process-partial-refund/action";
|
|
|
56
58
|
// Custom Tables Actions
|
|
57
59
|
import { getCustomTables } from "./actions/get-custom-tables/action";
|
|
58
60
|
import { getCustomTableFields } from "./actions/get-custom-table-fields/action";
|
|
61
|
+
import { getCustomTableData } from "./actions/get-custom-table-data/action";
|
|
62
|
+
import { upsertCustomTableData } from "./actions/upsert-custom-table-data/action";
|
|
63
|
+
import { deleteCustomTableData } from "./actions/delete-custom-table-data/action";
|
|
64
|
+
// Custom Extensions Actions
|
|
65
|
+
import { getCustomExtensions } from "./actions/get-custom-extensions/action";
|
|
66
|
+
import { getCustomExtensionCustomTables } from "./actions/get-custom-extension-custom-tables/action";
|
|
59
67
|
// Export actions as command object
|
|
60
68
|
export const command = {
|
|
61
69
|
exampleFunction,
|
|
@@ -101,6 +109,8 @@ export const command = {
|
|
|
101
109
|
authenticateUser,
|
|
102
110
|
partialPayment,
|
|
103
111
|
switchUser,
|
|
112
|
+
print,
|
|
113
|
+
setActiveOrder,
|
|
104
114
|
// Integration Actions
|
|
105
115
|
triggerWebhook,
|
|
106
116
|
triggerZapierWebhook,
|
|
@@ -115,6 +125,12 @@ export const command = {
|
|
|
115
125
|
// Custom Tables Actions
|
|
116
126
|
getCustomTables,
|
|
117
127
|
getCustomTableFields,
|
|
128
|
+
getCustomTableData,
|
|
129
|
+
upsertCustomTableData,
|
|
130
|
+
deleteCustomTableData,
|
|
131
|
+
// Custom Extensions Actions
|
|
132
|
+
getCustomExtensions,
|
|
133
|
+
getCustomExtensionCustomTables,
|
|
118
134
|
};
|
|
119
135
|
// Export Common Types
|
|
120
136
|
export * from "./CommonTypes";
|
|
@@ -46,6 +46,14 @@ import { mockTriggerWebhook } from "../../actions/trigger-webhook/mock";
|
|
|
46
46
|
import { mockTriggerZapierWebhook } from "../../actions/trigger-zapier-webhook/mock";
|
|
47
47
|
import { mockVendaraPayment } from "../../actions/vendara-payment/mock";
|
|
48
48
|
import { mockGetFinalContext } from "../../actions/get-final-context/mock";
|
|
49
|
+
import { mockPrint } from "../../actions/print/mock";
|
|
50
|
+
import { mockSetActiveOrder } from "../../actions/set-active-order/mock";
|
|
51
|
+
import { mockGetCustomTables } from "../../actions/get-custom-tables/mock";
|
|
52
|
+
import { mockGetCustomTableData } from "../../actions/get-custom-table-data/mock";
|
|
53
|
+
import { mockUpsertCustomTableData } from "../../actions/upsert-custom-table-data/mock";
|
|
54
|
+
import { mockDeleteCustomTableData } from "../../actions/delete-custom-table-data/mock";
|
|
55
|
+
import { mockGetCustomExtensions } from "../../actions/get-custom-extensions/mock";
|
|
56
|
+
import { mockGetCustomExtensionCustomTables } from "../../actions/get-custom-extension-custom-tables/mock";
|
|
49
57
|
export const RENDER_MOCKS = {
|
|
50
58
|
addCartDiscount: mockAddCartDiscount,
|
|
51
59
|
addCartFee: mockAddCartFee,
|
|
@@ -95,4 +103,12 @@ export const RENDER_MOCKS = {
|
|
|
95
103
|
triggerZapierWebhook: mockTriggerZapierWebhook,
|
|
96
104
|
vendaraPayment: mockVendaraPayment,
|
|
97
105
|
getFinalContext: mockGetFinalContext,
|
|
106
|
+
print: mockPrint,
|
|
107
|
+
setActiveOrder: mockSetActiveOrder,
|
|
108
|
+
getCustomTables: mockGetCustomTables,
|
|
109
|
+
getCustomTableData: mockGetCustomTableData,
|
|
110
|
+
upsertCustomTableData: mockUpsertCustomTableData,
|
|
111
|
+
deleteCustomTableData: mockDeleteCustomTableData,
|
|
112
|
+
getCustomExtensions: mockGetCustomExtensions,
|
|
113
|
+
getCustomExtensionCustomTables: mockGetCustomExtensionCustomTables,
|
|
98
114
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ExampleFunction, GetProducts, AddCustomSale, GetCustomers, AssignCustomer, AddCustomer, GetCategories, GetOrders, GetRefunds, AddProductDiscount, AddProductToCart, RemoveProductFromCart, UpdateCartItemQuantity, AddCartDiscount, GetContext, GetFinalContext, AddProductNote, AddProductFee, AdjustInventory, AddOrderNote, AddCartFee, ClearCart, ParkOrder, ResumeParkedOrder, DeleteParkedOrder, InitiateRefund, CashPayment, TapToPayPayment, TerminalPayment, VendaraPayment, AddCustomerNote, RemoveCustomerFromCart, GoToStationHome, OpenCashDrawer, ShowNotification, ShowConfirmation, AuthenticateUser, PartialPayment, SwitchUser, TriggerWebhook, TriggerZapierWebhook, SetRefundStockAction, SelectAllRefundItems, ResetRefundDetails, CalculateRefundTotal, GetRemainingRefundableQuantities, ProcessPartialRefund, GetCurrentCart } from "../../index";
|
|
1
|
+
import type { ExampleFunction, GetProducts, AddCustomSale, GetCustomers, AssignCustomer, AddCustomer, GetCategories, GetOrders, GetRefunds, AddProductDiscount, AddProductToCart, RemoveProductFromCart, UpdateCartItemQuantity, AddCartDiscount, GetContext, GetFinalContext, AddProductNote, AddProductFee, AdjustInventory, AddOrderNote, AddCartFee, ClearCart, ParkOrder, ResumeParkedOrder, DeleteParkedOrder, InitiateRefund, CashPayment, TapToPayPayment, TerminalPayment, VendaraPayment, AddCustomerNote, RemoveCustomerFromCart, GoToStationHome, OpenCashDrawer, ShowNotification, ShowConfirmation, AuthenticateUser, PartialPayment, SwitchUser, TriggerWebhook, TriggerZapierWebhook, SetRefundStockAction, SelectAllRefundItems, ResetRefundDetails, CalculateRefundTotal, GetRemainingRefundableQuantities, ProcessPartialRefund, GetCurrentCart, Print, SetActiveOrder, GetCustomTables, GetCustomTableData, UpsertCustomTableData, DeleteCustomTableData, GetCustomExtensions, GetCustomExtensionCustomTables } from "../../index";
|
|
2
2
|
export interface RenderProviderActions {
|
|
3
3
|
exampleFunction: ExampleFunction;
|
|
4
4
|
getProducts: GetProducts;
|
|
@@ -48,4 +48,12 @@ export interface RenderProviderActions {
|
|
|
48
48
|
getRemainingRefundableQuantities: GetRemainingRefundableQuantities;
|
|
49
49
|
processPartialRefund: ProcessPartialRefund;
|
|
50
50
|
getCurrentCart: GetCurrentCart;
|
|
51
|
+
print: Print;
|
|
52
|
+
setActiveOrder: SetActiveOrder;
|
|
53
|
+
getCustomTables: GetCustomTables;
|
|
54
|
+
getCustomTableData: GetCustomTableData;
|
|
55
|
+
upsertCustomTableData: UpsertCustomTableData;
|
|
56
|
+
deleteCustomTableData: DeleteCustomTableData;
|
|
57
|
+
getCustomExtensions: GetCustomExtensions;
|
|
58
|
+
getCustomExtensionCustomTables: GetCustomExtensionCustomTables;
|
|
51
59
|
}
|