@final-commerce/command-frame 0.1.17 → 0.1.18
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/index.d.ts +3 -3
- package/dist/index.js +6 -5
- package/dist/pubsub/topics/cart/index.js +8 -8
- package/dist/pubsub/topics/customers/index.js +6 -6
- package/dist/pubsub/topics/orders/index.js +2 -2
- package/dist/pubsub/topics/payments/index.js +2 -2
- package/dist/pubsub/topics/products/index.js +2 -2
- package/dist/pubsub/topics/refunds/index.js +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -18,11 +18,11 @@ export declare const command: {
|
|
|
18
18
|
readonly adjustInventory: import("./actions/adjust-inventory/types").AdjustInventory;
|
|
19
19
|
readonly addOrderNote: import("./actions/add-order-note/types").AddOrderNote;
|
|
20
20
|
readonly addCartFee: import("./actions/add-cart-fee/types").AddCartFee;
|
|
21
|
+
readonly getCurrentCart: import("./actions/get-current-cart/types").GetCurrentCart;
|
|
21
22
|
readonly clearCart: import("./actions/clear-cart/types").ClearCart;
|
|
22
23
|
readonly parkOrder: import("./actions/park-order/types").ParkOrder;
|
|
23
24
|
readonly resumeParkedOrder: import("./actions/resume-parked-order/types").ResumeParkedOrder;
|
|
24
25
|
readonly deleteParkedOrder: import("./actions/delete-parked-order/types").DeleteParkedOrder;
|
|
25
|
-
readonly initiateRefund: import("./actions/initiate-refund/types").InitiateRefund;
|
|
26
26
|
readonly cashPayment: import("./actions/cash-payment/types").CashPayment;
|
|
27
27
|
readonly tapToPayPayment: import("./actions/tap-to-pay-payment/types").TapToPayPayment;
|
|
28
28
|
readonly terminalPayment: import("./actions/terminal-payment/types").TerminalPayment;
|
|
@@ -38,13 +38,13 @@ export declare const command: {
|
|
|
38
38
|
readonly switchUser: import("./actions/switch-user/types").SwitchUser;
|
|
39
39
|
readonly triggerWebhook: import("./actions/trigger-webhook/types").TriggerWebhook;
|
|
40
40
|
readonly triggerZapierWebhook: import("./actions/trigger-zapier-webhook/types").TriggerZapierWebhook;
|
|
41
|
+
readonly initiateRefund: import("./actions/initiate-refund/types").InitiateRefund;
|
|
41
42
|
readonly setRefundStockAction: import("./actions/set-refund-stock-action/types").SetRefundStockAction;
|
|
42
43
|
readonly selectAllRefundItems: import("./actions/select-all-refund-items/types").SelectAllRefundItems;
|
|
43
44
|
readonly resetRefundDetails: import("./actions/reset-refund-details/types").ResetRefundDetails;
|
|
44
45
|
readonly calculateRefundTotal: import("./actions/calculate-refund-total/types").CalculateRefundTotal;
|
|
45
46
|
readonly getRemainingRefundableQuantities: import("./actions/get-remaining-refundable-quantities/types").GetRemainingRefundableQuantities;
|
|
46
47
|
readonly processPartialRefund: import("./actions/process-partial-refund/types").ProcessPartialRefund;
|
|
47
|
-
readonly getCurrentCart: import("./actions/get-current-cart/types").GetCurrentCart;
|
|
48
48
|
};
|
|
49
49
|
export type { ExampleFunction, ExampleFunctionParams, ExampleFunctionResponse } from "./actions/example-function/types";
|
|
50
50
|
export type { GetProducts, GetProductsParams, GetProductsResponse } from "./actions/get-products/types";
|
|
@@ -61,6 +61,7 @@ export type { ResetRefundDetails, ResetRefundDetailsResponse } from "./actions/r
|
|
|
61
61
|
export type { CalculateRefundTotal, CalculateRefundTotalParams, CalculateRefundTotalResponse } from "./actions/calculate-refund-total/types";
|
|
62
62
|
export type { GetRemainingRefundableQuantities, GetRemainingRefundableQuantitiesParams, GetRemainingRefundableQuantitiesResponse } from "./actions/get-remaining-refundable-quantities/types";
|
|
63
63
|
export type { ProcessPartialRefund, ProcessPartialRefundParams, ProcessPartialRefundResponse } from "./actions/process-partial-refund/types";
|
|
64
|
+
export type { InitiateRefund, InitiateRefundParams, InitiateRefundResponse } from "./actions/initiate-refund/types";
|
|
64
65
|
export type { GetCurrentCart, GetCurrentCartResponse } from "./actions/get-current-cart/types";
|
|
65
66
|
export type { AddProductDiscount, AddProductDiscountParams, AddProductDiscountResponse } from "./actions/add-product-discount/types";
|
|
66
67
|
export type { AddProductToCart, AddProductToCartParams, AddProductToCartResponse } from "./actions/add-product-to-cart/types";
|
|
@@ -76,7 +77,6 @@ export type { ClearCart, ClearCartResponse } from "./actions/clear-cart/types";
|
|
|
76
77
|
export type { ParkOrder, ParkOrderResponse } from "./actions/park-order/types";
|
|
77
78
|
export type { ResumeParkedOrder, ResumeParkedOrderParams, ResumeParkedOrderResponse } from "./actions/resume-parked-order/types";
|
|
78
79
|
export type { DeleteParkedOrder, DeleteParkedOrderParams, DeleteParkedOrderResponse } from "./actions/delete-parked-order/types";
|
|
79
|
-
export type { InitiateRefund, InitiateRefundParams, InitiateRefundResponse } from "./actions/initiate-refund/types";
|
|
80
80
|
export type { CashPayment, CashPaymentParams, CashPaymentResponse } from "./actions/cash-payment/types";
|
|
81
81
|
export type { TapToPayPayment, TapToPayPaymentParams, TapToPayPaymentResponse } from "./actions/tap-to-pay-payment/types";
|
|
82
82
|
export type { TerminalPayment, TerminalPaymentParams, TerminalPaymentResponse } from "./actions/terminal-payment/types";
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,6 @@ import { assignCustomer } from "./actions/assign-customer/action";
|
|
|
7
7
|
import { addCustomer } from "./actions/add-customer/action";
|
|
8
8
|
import { getCategories } from "./actions/get-categories/action";
|
|
9
9
|
import { getOrders } from "./actions/get-orders/action";
|
|
10
|
-
import { getRefunds } from "./actions/get-refunds/action";
|
|
11
10
|
import { addCartDiscount } from "./actions/add-cart-discount/action";
|
|
12
11
|
import { getContext } from "./actions/get-context/action";
|
|
13
12
|
import { getFinalContext } from "./actions/get-final-context/action";
|
|
@@ -20,11 +19,11 @@ import { adjustInventory } from "./actions/adjust-inventory/action";
|
|
|
20
19
|
// Order Actions
|
|
21
20
|
import { addOrderNote } from "./actions/add-order-note/action";
|
|
22
21
|
import { addCartFee } from "./actions/add-cart-fee/action";
|
|
22
|
+
import { getCurrentCart } from "./actions/get-current-cart/action";
|
|
23
23
|
import { clearCart } from "./actions/clear-cart/action";
|
|
24
24
|
import { parkOrder } from "./actions/park-order/action";
|
|
25
25
|
import { resumeParkedOrder } from "./actions/resume-parked-order/action";
|
|
26
26
|
import { deleteParkedOrder } from "./actions/delete-parked-order/action";
|
|
27
|
-
import { initiateRefund } from "./actions/initiate-refund/action";
|
|
28
27
|
import { cashPayment } from "./actions/cash-payment/action";
|
|
29
28
|
import { tapToPayPayment } from "./actions/tap-to-pay-payment/action";
|
|
30
29
|
import { terminalPayment } from "./actions/terminal-payment/action";
|
|
@@ -43,13 +42,15 @@ import { switchUser } from "./actions/switch-user/action";
|
|
|
43
42
|
// Integration Actions
|
|
44
43
|
import { triggerWebhook } from "./actions/trigger-webhook/action";
|
|
45
44
|
import { triggerZapierWebhook } from "./actions/trigger-zapier-webhook/action";
|
|
45
|
+
// Refund Actions
|
|
46
|
+
import { getRefunds } from "./actions/get-refunds/action";
|
|
47
|
+
import { initiateRefund } from "./actions/initiate-refund/action";
|
|
46
48
|
import { setRefundStockAction } from "./actions/set-refund-stock-action/action";
|
|
47
49
|
import { selectAllRefundItems } from "./actions/select-all-refund-items/action";
|
|
48
50
|
import { resetRefundDetails } from "./actions/reset-refund-details/action";
|
|
49
51
|
import { calculateRefundTotal } from "./actions/calculate-refund-total/action";
|
|
50
52
|
import { getRemainingRefundableQuantities } from "./actions/get-remaining-refundable-quantities/action";
|
|
51
53
|
import { processPartialRefund } from "./actions/process-partial-refund/action";
|
|
52
|
-
import { getCurrentCart } from "./actions/get-current-cart/action";
|
|
53
54
|
// Export actions as command object
|
|
54
55
|
export const command = {
|
|
55
56
|
exampleFunction,
|
|
@@ -73,11 +74,11 @@ export const command = {
|
|
|
73
74
|
// Order Actions
|
|
74
75
|
addOrderNote,
|
|
75
76
|
addCartFee,
|
|
77
|
+
getCurrentCart,
|
|
76
78
|
clearCart,
|
|
77
79
|
parkOrder,
|
|
78
80
|
resumeParkedOrder,
|
|
79
81
|
deleteParkedOrder,
|
|
80
|
-
initiateRefund,
|
|
81
82
|
cashPayment,
|
|
82
83
|
tapToPayPayment,
|
|
83
84
|
terminalPayment,
|
|
@@ -97,13 +98,13 @@ export const command = {
|
|
|
97
98
|
triggerWebhook,
|
|
98
99
|
triggerZapierWebhook,
|
|
99
100
|
// Refund Actions
|
|
101
|
+
initiateRefund,
|
|
100
102
|
setRefundStockAction,
|
|
101
103
|
selectAllRefundItems,
|
|
102
104
|
resetRefundDetails,
|
|
103
105
|
calculateRefundTotal,
|
|
104
106
|
getRemainingRefundableQuantities,
|
|
105
107
|
processPartialRefund,
|
|
106
|
-
getCurrentCart
|
|
107
108
|
};
|
|
108
109
|
// Export Common Types
|
|
109
110
|
export * from "./CommonTypes";
|
|
@@ -10,42 +10,42 @@ export const cartTopic = {
|
|
|
10
10
|
{
|
|
11
11
|
id: "cart-created",
|
|
12
12
|
name: "Cart Created",
|
|
13
|
-
description: "
|
|
13
|
+
description: "Published when a new cart is created"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
id: "customer-assigned",
|
|
17
17
|
name: "Customer Assigned",
|
|
18
|
-
description: "
|
|
18
|
+
description: "Published when a customer is assigned to the cart"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
id: "product-added",
|
|
22
22
|
name: "Product Added",
|
|
23
|
-
description: "
|
|
23
|
+
description: "Published when a product is added to the cart"
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
id: "product-deleted",
|
|
27
27
|
name: "Product Deleted",
|
|
28
|
-
description: "
|
|
28
|
+
description: "Published when a product is removed from the cart"
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
id: "cart-discount-added",
|
|
32
32
|
name: "Cart Discount Added",
|
|
33
|
-
description: "
|
|
33
|
+
description: "Published when a discount is added to the cart"
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
id: "cart-discount-removed",
|
|
37
37
|
name: "Cart Discount Removed",
|
|
38
|
-
description: "
|
|
38
|
+
description: "Published when a discount is removed from the cart"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
id: "cart-fee-added",
|
|
42
42
|
name: "Cart Fee Added",
|
|
43
|
-
description: "
|
|
43
|
+
description: "Published when a fee is added to the cart"
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
id: "cart-fee-removed",
|
|
47
47
|
name: "Cart Fee Removed",
|
|
48
|
-
description: "
|
|
48
|
+
description: "Published when a fee is removed from the cart"
|
|
49
49
|
}
|
|
50
50
|
]
|
|
51
51
|
};
|
|
@@ -10,32 +10,32 @@ export const customersTopic = {
|
|
|
10
10
|
{
|
|
11
11
|
id: "customer-created",
|
|
12
12
|
name: "Customer Created",
|
|
13
|
-
description: "
|
|
13
|
+
description: "Published when a new customer is created"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
id: "customer-updated",
|
|
17
17
|
name: "Customer Updated",
|
|
18
|
-
description: "
|
|
18
|
+
description: "Published when a customer is updated"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
id: "customer-note-added",
|
|
22
22
|
name: "Customer Note Added",
|
|
23
|
-
description: "
|
|
23
|
+
description: "Published when a note is added to a customer"
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
id: "customer-note-deleted",
|
|
27
27
|
name: "Customer Note Deleted",
|
|
28
|
-
description: "
|
|
28
|
+
description: "Published when a note is deleted from a customer"
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
id: "customer-assigned",
|
|
32
32
|
name: "Customer Assigned",
|
|
33
|
-
description: "
|
|
33
|
+
description: "Published when a customer is assigned to the cart"
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
id: "customer-unassigned",
|
|
37
37
|
name: "Customer Unassigned",
|
|
38
|
-
description: "
|
|
38
|
+
description: "Published when a customer is unassigned from the cart"
|
|
39
39
|
}
|
|
40
40
|
]
|
|
41
41
|
};
|
|
@@ -10,12 +10,12 @@ export const ordersTopic = {
|
|
|
10
10
|
{
|
|
11
11
|
id: "order-created",
|
|
12
12
|
name: "Order Created",
|
|
13
|
-
description: "
|
|
13
|
+
description: "Published when a new order is created"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
id: "order-updated",
|
|
17
17
|
name: "Order Updated",
|
|
18
|
-
description: "
|
|
18
|
+
description: "Published when an order is updated"
|
|
19
19
|
}
|
|
20
20
|
]
|
|
21
21
|
};
|
|
@@ -10,12 +10,12 @@ export const paymentsTopic = {
|
|
|
10
10
|
{
|
|
11
11
|
id: "payment-done",
|
|
12
12
|
name: "Payment Done",
|
|
13
|
-
description: "
|
|
13
|
+
description: "Published when a payment is successfully completed"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
id: "payment-err",
|
|
17
17
|
name: "Payment Error",
|
|
18
|
-
description: "
|
|
18
|
+
description: "Published when a payment error occurs"
|
|
19
19
|
}
|
|
20
20
|
]
|
|
21
21
|
};
|
|
@@ -10,12 +10,12 @@ export const productsTopic = {
|
|
|
10
10
|
{
|
|
11
11
|
id: "product-created",
|
|
12
12
|
name: "Product Created",
|
|
13
|
-
description: "
|
|
13
|
+
description: "Published when a new product is synced/created"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
id: "product-updated",
|
|
17
17
|
name: "Product Updated",
|
|
18
|
-
description: "
|
|
18
|
+
description: "Published when a product is synced/updated"
|
|
19
19
|
}
|
|
20
20
|
]
|
|
21
21
|
};
|
|
@@ -10,12 +10,12 @@ export const refundsTopic = {
|
|
|
10
10
|
{
|
|
11
11
|
id: "refund-created",
|
|
12
12
|
name: "Refund Created",
|
|
13
|
-
description: "
|
|
13
|
+
description: "Published when a new refund is created"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
id: "refund-updated",
|
|
17
17
|
name: "Refund Updated",
|
|
18
|
-
description: "
|
|
18
|
+
description: "Published when a refund is updated"
|
|
19
19
|
}
|
|
20
20
|
]
|
|
21
21
|
};
|