@keystrokehq/omnisend 0.1.0
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/README.md +17 -0
- package/dist/action.cjs +21 -0
- package/dist/action.cjs.map +1 -0
- package/dist/action.mjs +21 -0
- package/dist/action.mjs.map +1 -0
- package/dist/actions/add-cart-product.cjs +36 -0
- package/dist/actions/add-cart-product.cjs.map +1 -0
- package/dist/actions/add-cart-product.d.cts +9 -0
- package/dist/actions/add-cart-product.d.cts.map +1 -0
- package/dist/actions/add-cart-product.d.mts +9 -0
- package/dist/actions/add-cart-product.d.mts.map +1 -0
- package/dist/actions/add-cart-product.mjs +33 -0
- package/dist/actions/add-cart-product.mjs.map +1 -0
- package/dist/actions/create-batch.cjs +53 -0
- package/dist/actions/create-batch.cjs.map +1 -0
- package/dist/actions/create-batch.d.cts +9 -0
- package/dist/actions/create-batch.d.cts.map +1 -0
- package/dist/actions/create-batch.d.mts +9 -0
- package/dist/actions/create-batch.d.mts.map +1 -0
- package/dist/actions/create-batch.mjs +52 -0
- package/dist/actions/create-batch.mjs.map +1 -0
- package/dist/actions/create-cart.cjs +38 -0
- package/dist/actions/create-cart.cjs.map +1 -0
- package/dist/actions/create-cart.d.cts +9 -0
- package/dist/actions/create-cart.d.cts.map +1 -0
- package/dist/actions/create-cart.d.mts +9 -0
- package/dist/actions/create-cart.d.mts.map +1 -0
- package/dist/actions/create-cart.mjs +35 -0
- package/dist/actions/create-cart.mjs.map +1 -0
- package/dist/actions/create-category.cjs +19 -0
- package/dist/actions/create-category.cjs.map +1 -0
- package/dist/actions/create-category.d.cts +9 -0
- package/dist/actions/create-category.d.cts.map +1 -0
- package/dist/actions/create-category.d.mts +9 -0
- package/dist/actions/create-category.d.mts.map +1 -0
- package/dist/actions/create-category.mjs +16 -0
- package/dist/actions/create-category.mjs.map +1 -0
- package/dist/actions/create-or-update-contact.cjs +45 -0
- package/dist/actions/create-or-update-contact.cjs.map +1 -0
- package/dist/actions/create-or-update-contact.d.cts +9 -0
- package/dist/actions/create-or-update-contact.d.cts.map +1 -0
- package/dist/actions/create-or-update-contact.d.mts +9 -0
- package/dist/actions/create-or-update-contact.d.mts.map +1 -0
- package/dist/actions/create-or-update-contact.mjs +42 -0
- package/dist/actions/create-or-update-contact.mjs.map +1 -0
- package/dist/actions/create-order.cjs +105 -0
- package/dist/actions/create-order.cjs.map +1 -0
- package/dist/actions/create-order.d.cts +9 -0
- package/dist/actions/create-order.d.cts.map +1 -0
- package/dist/actions/create-order.d.mts +9 -0
- package/dist/actions/create-order.d.mts.map +1 -0
- package/dist/actions/create-order.mjs +102 -0
- package/dist/actions/create-order.mjs.map +1 -0
- package/dist/actions/create-product-category.cjs +19 -0
- package/dist/actions/create-product-category.cjs.map +1 -0
- package/dist/actions/create-product-category.d.cts +9 -0
- package/dist/actions/create-product-category.d.cts.map +1 -0
- package/dist/actions/create-product-category.d.mts +9 -0
- package/dist/actions/create-product-category.d.mts.map +1 -0
- package/dist/actions/create-product-category.mjs +16 -0
- package/dist/actions/create-product-category.mjs.map +1 -0
- package/dist/actions/create-product.cjs +51 -0
- package/dist/actions/create-product.cjs.map +1 -0
- package/dist/actions/create-product.d.cts +9 -0
- package/dist/actions/create-product.d.cts.map +1 -0
- package/dist/actions/create-product.d.mts +9 -0
- package/dist/actions/create-product.d.mts.map +1 -0
- package/dist/actions/create-product.mjs +48 -0
- package/dist/actions/create-product.mjs.map +1 -0
- package/dist/actions/delete-cart.cjs +16 -0
- package/dist/actions/delete-cart.cjs.map +1 -0
- package/dist/actions/delete-cart.d.cts +9 -0
- package/dist/actions/delete-cart.d.cts.map +1 -0
- package/dist/actions/delete-cart.d.mts +9 -0
- package/dist/actions/delete-cart.d.mts.map +1 -0
- package/dist/actions/delete-cart.mjs +13 -0
- package/dist/actions/delete-cart.mjs.map +1 -0
- package/dist/actions/delete-category.cjs +16 -0
- package/dist/actions/delete-category.cjs.map +1 -0
- package/dist/actions/delete-category.d.cts +9 -0
- package/dist/actions/delete-category.d.cts.map +1 -0
- package/dist/actions/delete-category.d.mts +9 -0
- package/dist/actions/delete-category.d.mts.map +1 -0
- package/dist/actions/delete-category.mjs +13 -0
- package/dist/actions/delete-category.mjs.map +1 -0
- package/dist/actions/delete-order.cjs +16 -0
- package/dist/actions/delete-order.cjs.map +1 -0
- package/dist/actions/delete-order.d.cts +9 -0
- package/dist/actions/delete-order.d.cts.map +1 -0
- package/dist/actions/delete-order.d.mts +9 -0
- package/dist/actions/delete-order.d.mts.map +1 -0
- package/dist/actions/delete-order.mjs +13 -0
- package/dist/actions/delete-order.mjs.map +1 -0
- package/dist/actions/delete-product-category.cjs +16 -0
- package/dist/actions/delete-product-category.cjs.map +1 -0
- package/dist/actions/delete-product-category.d.cts +9 -0
- package/dist/actions/delete-product-category.d.cts.map +1 -0
- package/dist/actions/delete-product-category.d.mts +9 -0
- package/dist/actions/delete-product-category.d.mts.map +1 -0
- package/dist/actions/delete-product-category.mjs +13 -0
- package/dist/actions/delete-product-category.mjs.map +1 -0
- package/dist/actions/delete-product.cjs +16 -0
- package/dist/actions/delete-product.cjs.map +1 -0
- package/dist/actions/delete-product.d.cts +9 -0
- package/dist/actions/delete-product.d.cts.map +1 -0
- package/dist/actions/delete-product.d.mts +9 -0
- package/dist/actions/delete-product.d.mts.map +1 -0
- package/dist/actions/delete-product.mjs +13 -0
- package/dist/actions/delete-product.mjs.map +1 -0
- package/dist/actions/get-batch-information.cjs +25 -0
- package/dist/actions/get-batch-information.cjs.map +1 -0
- package/dist/actions/get-batch-information.d.cts +9 -0
- package/dist/actions/get-batch-information.d.cts.map +1 -0
- package/dist/actions/get-batch-information.d.mts +9 -0
- package/dist/actions/get-batch-information.d.mts.map +1 -0
- package/dist/actions/get-batch-information.mjs +22 -0
- package/dist/actions/get-batch-information.mjs.map +1 -0
- package/dist/actions/get-batch-item.cjs +29 -0
- package/dist/actions/get-batch-item.cjs.map +1 -0
- package/dist/actions/get-batch-item.d.cts +9 -0
- package/dist/actions/get-batch-item.d.cts.map +1 -0
- package/dist/actions/get-batch-item.d.mts +9 -0
- package/dist/actions/get-batch-item.d.mts.map +1 -0
- package/dist/actions/get-batch-item.mjs +26 -0
- package/dist/actions/get-batch-item.mjs.map +1 -0
- package/dist/actions/get-batch-items.cjs +23 -0
- package/dist/actions/get-batch-items.cjs.map +1 -0
- package/dist/actions/get-batch-items.d.cts +9 -0
- package/dist/actions/get-batch-items.d.cts.map +1 -0
- package/dist/actions/get-batch-items.d.mts +9 -0
- package/dist/actions/get-batch-items.d.mts.map +1 -0
- package/dist/actions/get-batch-items.mjs +22 -0
- package/dist/actions/get-batch-items.mjs.map +1 -0
- package/dist/actions/get-batches.cjs +44 -0
- package/dist/actions/get-batches.cjs.map +1 -0
- package/dist/actions/get-batches.d.cts +9 -0
- package/dist/actions/get-batches.d.cts.map +1 -0
- package/dist/actions/get-batches.d.mts +9 -0
- package/dist/actions/get-batches.d.mts.map +1 -0
- package/dist/actions/get-batches.mjs +43 -0
- package/dist/actions/get-batches.mjs.map +1 -0
- package/dist/actions/get-brand.cjs +24 -0
- package/dist/actions/get-brand.cjs.map +1 -0
- package/dist/actions/get-brand.d.cts +9 -0
- package/dist/actions/get-brand.d.cts.map +1 -0
- package/dist/actions/get-brand.d.mts +9 -0
- package/dist/actions/get-brand.d.mts.map +1 -0
- package/dist/actions/get-brand.mjs +21 -0
- package/dist/actions/get-brand.mjs.map +1 -0
- package/dist/actions/get-cart.cjs +41 -0
- package/dist/actions/get-cart.cjs.map +1 -0
- package/dist/actions/get-cart.d.cts +9 -0
- package/dist/actions/get-cart.d.cts.map +1 -0
- package/dist/actions/get-cart.d.mts +9 -0
- package/dist/actions/get-cart.d.mts.map +1 -0
- package/dist/actions/get-cart.mjs +40 -0
- package/dist/actions/get-cart.mjs.map +1 -0
- package/dist/actions/get-category.cjs +21 -0
- package/dist/actions/get-category.cjs.map +1 -0
- package/dist/actions/get-category.d.cts +9 -0
- package/dist/actions/get-category.d.cts.map +1 -0
- package/dist/actions/get-category.d.mts +9 -0
- package/dist/actions/get-category.d.mts.map +1 -0
- package/dist/actions/get-category.mjs +18 -0
- package/dist/actions/get-category.mjs.map +1 -0
- package/dist/actions/get-contact.cjs +60 -0
- package/dist/actions/get-contact.cjs.map +1 -0
- package/dist/actions/get-contact.d.cts +9 -0
- package/dist/actions/get-contact.d.cts.map +1 -0
- package/dist/actions/get-contact.d.mts +9 -0
- package/dist/actions/get-contact.d.mts.map +1 -0
- package/dist/actions/get-contact.mjs +59 -0
- package/dist/actions/get-contact.mjs.map +1 -0
- package/dist/actions/get-order.cjs +86 -0
- package/dist/actions/get-order.cjs.map +1 -0
- package/dist/actions/get-order.d.cts +9 -0
- package/dist/actions/get-order.d.cts.map +1 -0
- package/dist/actions/get-order.d.mts +9 -0
- package/dist/actions/get-order.d.mts.map +1 -0
- package/dist/actions/get-order.mjs +85 -0
- package/dist/actions/get-order.mjs.map +1 -0
- package/dist/actions/get-product-category.cjs +21 -0
- package/dist/actions/get-product-category.cjs.map +1 -0
- package/dist/actions/get-product-category.d.cts +9 -0
- package/dist/actions/get-product-category.d.cts.map +1 -0
- package/dist/actions/get-product-category.d.mts +9 -0
- package/dist/actions/get-product-category.d.mts.map +1 -0
- package/dist/actions/get-product-category.mjs +18 -0
- package/dist/actions/get-product-category.mjs.map +1 -0
- package/dist/actions/get-product.cjs +52 -0
- package/dist/actions/get-product.cjs.map +1 -0
- package/dist/actions/get-product.d.cts +9 -0
- package/dist/actions/get-product.d.cts.map +1 -0
- package/dist/actions/get-product.d.mts +9 -0
- package/dist/actions/get-product.d.mts.map +1 -0
- package/dist/actions/get-product.mjs +51 -0
- package/dist/actions/get-product.mjs.map +1 -0
- package/dist/actions/index.cjs +87 -0
- package/dist/actions/index.d.cts +44 -0
- package/dist/actions/index.d.mts +44 -0
- package/dist/actions/index.mjs +44 -0
- package/dist/actions/list-campaigns.cjs +69 -0
- package/dist/actions/list-campaigns.cjs.map +1 -0
- package/dist/actions/list-campaigns.d.cts +9 -0
- package/dist/actions/list-campaigns.d.cts.map +1 -0
- package/dist/actions/list-campaigns.d.mts +9 -0
- package/dist/actions/list-campaigns.d.mts.map +1 -0
- package/dist/actions/list-campaigns.mjs +68 -0
- package/dist/actions/list-campaigns.mjs.map +1 -0
- package/dist/actions/list-carts.cjs +49 -0
- package/dist/actions/list-carts.cjs.map +1 -0
- package/dist/actions/list-carts.d.cts +9 -0
- package/dist/actions/list-carts.d.cts.map +1 -0
- package/dist/actions/list-carts.d.mts +9 -0
- package/dist/actions/list-carts.d.mts.map +1 -0
- package/dist/actions/list-carts.mjs +48 -0
- package/dist/actions/list-carts.mjs.map +1 -0
- package/dist/actions/list-categories.cjs +35 -0
- package/dist/actions/list-categories.cjs.map +1 -0
- package/dist/actions/list-categories.d.cts +9 -0
- package/dist/actions/list-categories.d.cts.map +1 -0
- package/dist/actions/list-categories.d.mts +9 -0
- package/dist/actions/list-categories.d.mts.map +1 -0
- package/dist/actions/list-categories.mjs +34 -0
- package/dist/actions/list-categories.mjs.map +1 -0
- package/dist/actions/list-contacts.cjs +82 -0
- package/dist/actions/list-contacts.cjs.map +1 -0
- package/dist/actions/list-contacts.d.cts +9 -0
- package/dist/actions/list-contacts.d.cts.map +1 -0
- package/dist/actions/list-contacts.d.mts +9 -0
- package/dist/actions/list-contacts.d.mts.map +1 -0
- package/dist/actions/list-contacts.mjs +81 -0
- package/dist/actions/list-contacts.mjs.map +1 -0
- package/dist/actions/list-events.cjs +31 -0
- package/dist/actions/list-events.cjs.map +1 -0
- package/dist/actions/list-events.d.cts +9 -0
- package/dist/actions/list-events.d.cts.map +1 -0
- package/dist/actions/list-events.d.mts +9 -0
- package/dist/actions/list-events.d.mts.map +1 -0
- package/dist/actions/list-events.mjs +30 -0
- package/dist/actions/list-events.mjs.map +1 -0
- package/dist/actions/list-product-categories.cjs +39 -0
- package/dist/actions/list-product-categories.cjs.map +1 -0
- package/dist/actions/list-product-categories.d.cts +9 -0
- package/dist/actions/list-product-categories.d.cts.map +1 -0
- package/dist/actions/list-product-categories.d.mts +9 -0
- package/dist/actions/list-product-categories.d.mts.map +1 -0
- package/dist/actions/list-product-categories.mjs +38 -0
- package/dist/actions/list-product-categories.mjs.map +1 -0
- package/dist/actions/list-products.cjs +70 -0
- package/dist/actions/list-products.cjs.map +1 -0
- package/dist/actions/list-products.d.cts +9 -0
- package/dist/actions/list-products.d.cts.map +1 -0
- package/dist/actions/list-products.d.mts +9 -0
- package/dist/actions/list-products.d.mts.map +1 -0
- package/dist/actions/list-products.mjs +69 -0
- package/dist/actions/list-products.mjs.map +1 -0
- package/dist/actions/remove-cart-product.cjs +19 -0
- package/dist/actions/remove-cart-product.cjs.map +1 -0
- package/dist/actions/remove-cart-product.d.cts +9 -0
- package/dist/actions/remove-cart-product.d.cts.map +1 -0
- package/dist/actions/remove-cart-product.d.mts +9 -0
- package/dist/actions/remove-cart-product.d.mts.map +1 -0
- package/dist/actions/remove-cart-product.mjs +16 -0
- package/dist/actions/remove-cart-product.mjs.map +1 -0
- package/dist/actions/replace-cart-product.cjs +36 -0
- package/dist/actions/replace-cart-product.cjs.map +1 -0
- package/dist/actions/replace-cart-product.d.cts +9 -0
- package/dist/actions/replace-cart-product.d.cts.map +1 -0
- package/dist/actions/replace-cart-product.d.mts +9 -0
- package/dist/actions/replace-cart-product.d.mts.map +1 -0
- package/dist/actions/replace-cart-product.mjs +33 -0
- package/dist/actions/replace-cart-product.mjs.map +1 -0
- package/dist/actions/replace-cart.cjs +36 -0
- package/dist/actions/replace-cart.cjs.map +1 -0
- package/dist/actions/replace-cart.d.cts +9 -0
- package/dist/actions/replace-cart.d.cts.map +1 -0
- package/dist/actions/replace-cart.d.mts +9 -0
- package/dist/actions/replace-cart.d.mts.map +1 -0
- package/dist/actions/replace-cart.mjs +33 -0
- package/dist/actions/replace-cart.mjs.map +1 -0
- package/dist/actions/replace-category.cjs +19 -0
- package/dist/actions/replace-category.cjs.map +1 -0
- package/dist/actions/replace-category.d.cts +9 -0
- package/dist/actions/replace-category.d.cts.map +1 -0
- package/dist/actions/replace-category.d.mts +9 -0
- package/dist/actions/replace-category.d.mts.map +1 -0
- package/dist/actions/replace-category.mjs +16 -0
- package/dist/actions/replace-category.mjs.map +1 -0
- package/dist/actions/replace-order.cjs +84 -0
- package/dist/actions/replace-order.cjs.map +1 -0
- package/dist/actions/replace-order.d.cts +9 -0
- package/dist/actions/replace-order.d.cts.map +1 -0
- package/dist/actions/replace-order.d.mts +9 -0
- package/dist/actions/replace-order.d.mts.map +1 -0
- package/dist/actions/replace-order.mjs +81 -0
- package/dist/actions/replace-order.mjs.map +1 -0
- package/dist/actions/replace-product.cjs +52 -0
- package/dist/actions/replace-product.cjs.map +1 -0
- package/dist/actions/replace-product.d.cts +9 -0
- package/dist/actions/replace-product.d.cts.map +1 -0
- package/dist/actions/replace-product.d.mts +9 -0
- package/dist/actions/replace-product.d.mts.map +1 -0
- package/dist/actions/replace-product.mjs +49 -0
- package/dist/actions/replace-product.mjs.map +1 -0
- package/dist/actions/send-event.cjs +43 -0
- package/dist/actions/send-event.cjs.map +1 -0
- package/dist/actions/send-event.d.cts +9 -0
- package/dist/actions/send-event.d.cts.map +1 -0
- package/dist/actions/send-event.d.mts +9 -0
- package/dist/actions/send-event.d.mts.map +1 -0
- package/dist/actions/send-event.mjs +40 -0
- package/dist/actions/send-event.mjs.map +1 -0
- package/dist/actions/update-cart-product.cjs +36 -0
- package/dist/actions/update-cart-product.cjs.map +1 -0
- package/dist/actions/update-cart-product.d.cts +9 -0
- package/dist/actions/update-cart-product.d.cts.map +1 -0
- package/dist/actions/update-cart-product.d.mts +9 -0
- package/dist/actions/update-cart-product.d.mts.map +1 -0
- package/dist/actions/update-cart-product.mjs +33 -0
- package/dist/actions/update-cart-product.mjs.map +1 -0
- package/dist/actions/update-cart.cjs +35 -0
- package/dist/actions/update-cart.cjs.map +1 -0
- package/dist/actions/update-cart.d.cts +9 -0
- package/dist/actions/update-cart.d.cts.map +1 -0
- package/dist/actions/update-cart.d.mts +9 -0
- package/dist/actions/update-cart.d.mts.map +1 -0
- package/dist/actions/update-cart.mjs +32 -0
- package/dist/actions/update-cart.mjs.map +1 -0
- package/dist/actions/update-contact.cjs +60 -0
- package/dist/actions/update-contact.cjs.map +1 -0
- package/dist/actions/update-contact.d.cts +9 -0
- package/dist/actions/update-contact.d.cts.map +1 -0
- package/dist/actions/update-contact.d.mts +9 -0
- package/dist/actions/update-contact.d.mts.map +1 -0
- package/dist/actions/update-contact.mjs +57 -0
- package/dist/actions/update-contact.mjs.map +1 -0
- package/dist/actions/update-order-status.cjs +30 -0
- package/dist/actions/update-order-status.cjs.map +1 -0
- package/dist/actions/update-order-status.d.cts +9 -0
- package/dist/actions/update-order-status.d.cts.map +1 -0
- package/dist/actions/update-order-status.d.mts +9 -0
- package/dist/actions/update-order-status.d.mts.map +1 -0
- package/dist/actions/update-order-status.mjs +27 -0
- package/dist/actions/update-order-status.mjs.map +1 -0
- package/dist/actions/update-product-category.cjs +19 -0
- package/dist/actions/update-product-category.cjs.map +1 -0
- package/dist/actions/update-product-category.d.cts +9 -0
- package/dist/actions/update-product-category.d.cts.map +1 -0
- package/dist/actions/update-product-category.d.mts +9 -0
- package/dist/actions/update-product-category.d.mts.map +1 -0
- package/dist/actions/update-product-category.mjs +16 -0
- package/dist/actions/update-product-category.mjs.map +1 -0
- package/dist/app.cjs +9 -0
- package/dist/app.cjs.map +1 -0
- package/dist/app.d.cts +5 -0
- package/dist/app.d.cts.map +1 -0
- package/dist/app.d.mts +5 -0
- package/dist/app.d.mts.map +1 -0
- package/dist/app.mjs +10 -0
- package/dist/app.mjs.map +1 -0
- package/dist/catalog.cjs +15 -0
- package/dist/catalog.cjs.map +1 -0
- package/dist/catalog.d.cts +14 -0
- package/dist/catalog.d.cts.map +1 -0
- package/dist/catalog.d.mts +14 -0
- package/dist/catalog.d.mts.map +1 -0
- package/dist/catalog.mjs +15 -0
- package/dist/catalog.mjs.map +1 -0
- package/dist/execute.cjs +18 -0
- package/dist/execute.cjs.map +1 -0
- package/dist/execute.mjs +18 -0
- package/dist/execute.mjs.map +1 -0
- package/dist/index.cjs +92 -0
- package/dist/index.d.cts +46 -0
- package/dist/index.d.mts +46 -0
- package/dist/index.mjs +47 -0
- package/package.json +49 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/create-or-update-contact.ts
|
|
4
|
+
const OmnisendCreateOrUpdateContactInput = zod.z.object({
|
|
5
|
+
city: zod.z.string().describe("City name").optional(),
|
|
6
|
+
gender: zod.z.enum(["m", "f"]).describe("Contact's gender ('m' or 'f')").optional(),
|
|
7
|
+
address: zod.z.string().describe("Street address").optional(),
|
|
8
|
+
country: zod.z.string().describe("Full country name").optional(),
|
|
9
|
+
lastName: zod.z.string().describe("Contact's last name").optional(),
|
|
10
|
+
birthdate: zod.z.string().describe("Birthdate in YYYY-MM-DD format").optional(),
|
|
11
|
+
firstName: zod.z.string().describe("Contact's first name").optional(),
|
|
12
|
+
postalCode: zod.z.string().describe("Postal or ZIP code").optional(),
|
|
13
|
+
countryCode: zod.z.string().describe("ISO 3166-1 alpha-2 country code").optional(),
|
|
14
|
+
identifiers: zod.z.array(zod.z.object({
|
|
15
|
+
id: zod.z.string().describe("Identifier value (e.g. email address)"),
|
|
16
|
+
type: zod.z.string().describe("Type of identifier; only 'email' supported"),
|
|
17
|
+
channels: zod.z.object({ email: zod.z.object({
|
|
18
|
+
status: zod.z.enum([
|
|
19
|
+
"subscribed",
|
|
20
|
+
"nonSubscribed",
|
|
21
|
+
"unsubscribed"
|
|
22
|
+
]).describe("Subscription status for email channel"),
|
|
23
|
+
statusDate: zod.z.string().describe("ISO 8601 timestamp when the status last changed").optional()
|
|
24
|
+
}).describe("Email channel subscription details").optional() }).describe("Channel-specific subscription settings").optional(),
|
|
25
|
+
sendWelcomeMessage: zod.z.boolean().describe("If true, Omnisend will send its default welcome email upon creation").optional()
|
|
26
|
+
})).describe("One or more ways to identify the contact; at least one required")
|
|
27
|
+
});
|
|
28
|
+
const OmnisendCreateOrUpdateContactOutput = zod.z.object({
|
|
29
|
+
email: zod.z.string().describe("Primary email address on record"),
|
|
30
|
+
phone: zod.z.string().describe("Phone number, if provided").nullable().optional(),
|
|
31
|
+
lastName: zod.z.string().describe("Last name").nullable().optional(),
|
|
32
|
+
contactID: zod.z.string().describe("Omnisend-assigned unique contact ID"),
|
|
33
|
+
firstName: zod.z.string().describe("First name").nullable().optional()
|
|
34
|
+
});
|
|
35
|
+
const omnisendCreateOrUpdateContact = require_action.action("OMNISEND_CREATE_OR_UPDATE_CONTACT", {
|
|
36
|
+
slug: "omnisend-create-or-update-contact",
|
|
37
|
+
name: "Create or Update Contact",
|
|
38
|
+
description: "Tool to create or update a contact in Omnisend. Use after collecting subscriber details.",
|
|
39
|
+
input: OmnisendCreateOrUpdateContactInput,
|
|
40
|
+
output: OmnisendCreateOrUpdateContactOutput
|
|
41
|
+
});
|
|
42
|
+
//#endregion
|
|
43
|
+
exports.omnisendCreateOrUpdateContact = omnisendCreateOrUpdateContact;
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=create-or-update-contact.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-or-update-contact.cjs","names":["z","action"],"sources":["../../src/actions/create-or-update-contact.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OmnisendCreateOrUpdateContactInput: z.ZodTypeAny = z.object({\n city: z.string().describe(\"City name\").optional(),\n gender: z.enum([\"m\", \"f\"]).describe(\"Contact's gender ('m' or 'f')\").optional(),\n address: z.string().describe(\"Street address\").optional(),\n country: z.string().describe(\"Full country name\").optional(),\n lastName: z.string().describe(\"Contact's last name\").optional(),\n birthdate: z.string().describe(\"Birthdate in YYYY-MM-DD format\").optional(),\n firstName: z.string().describe(\"Contact's first name\").optional(),\n postalCode: z.string().describe(\"Postal or ZIP code\").optional(),\n countryCode: z.string().describe(\"ISO 3166-1 alpha-2 country code\").optional(),\n identifiers: z.array(z.object({\n id: z.string().describe(\"Identifier value (e.g. email address)\"),\n type: z.string().describe(\"Type of identifier; only 'email' supported\"),\n channels: z.object({\n email: z.object({\n status: z.enum([\"subscribed\", \"nonSubscribed\", \"unsubscribed\"]).describe(\"Subscription status for email channel\"),\n statusDate: z.string().describe(\"ISO 8601 timestamp when the status last changed\").optional(),\n}).describe(\"Email channel subscription details\").optional(),\n}).describe(\"Channel-specific subscription settings\").optional(),\n sendWelcomeMessage: z.boolean().describe(\"If true, Omnisend will send its default welcome email upon creation\").optional(),\n})).describe(\"One or more ways to identify the contact; at least one required\"),\n});\nexport const OmnisendCreateOrUpdateContactOutput: z.ZodTypeAny = z.object({\n email: z.string().describe(\"Primary email address on record\"),\n phone: z.string().describe(\"Phone number, if provided\").nullable().optional(),\n lastName: z.string().describe(\"Last name\").nullable().optional(),\n contactID: z.string().describe(\"Omnisend-assigned unique contact ID\"),\n firstName: z.string().describe(\"First name\").nullable().optional(),\n});\n\nexport const omnisendCreateOrUpdateContact = action(\"OMNISEND_CREATE_OR_UPDATE_CONTACT\", {\n slug: \"omnisend-create-or-update-contact\",\n name: \"Create or Update Contact\",\n description: \"Tool to create or update a contact in Omnisend. Use after collecting subscriber details.\",\n input: OmnisendCreateOrUpdateContactInput,\n output: OmnisendCreateOrUpdateContactOutput,\n});\n"],"mappings":";;;AAIA,MAAa,qCAAmDA,IAAAA,EAAE,OAAO;CACvE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,WAAW,CAAC,CAAC,SAAS;CAChD,QAAQA,IAAAA,EAAE,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS;CAC9E,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gBAAgB,CAAC,CAAC,SAAS;CACxD,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mBAAmB,CAAC,CAA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SAAS,CAAC,CAAC,SAAS;CAC5E,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,WAAW,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/D,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC;CACpE,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACnE,CAAC;AAED,MAAa,gCAAgCC,eAAAA,OAAO,qCAAqC;CACvF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-or-update-contact.d.ts
|
|
4
|
+
declare const OmnisendCreateOrUpdateContactInput: z.ZodTypeAny;
|
|
5
|
+
declare const OmnisendCreateOrUpdateContactOutput: z.ZodTypeAny;
|
|
6
|
+
declare const omnisendCreateOrUpdateContact: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { omnisendCreateOrUpdateContact };
|
|
9
|
+
//# sourceMappingURL=create-or-update-contact.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-or-update-contact.d.cts","names":[],"sources":["../../src/actions/create-or-update-contact.ts"],"mappings":";;;cAIa,kCAAA,EAAoC,CAAA,CAAE,UAqBjD;AAAA,cACW,mCAAA,EAAqC,CAAA,CAAE,UAMlD;AAAA,cAEW,6BAAA,gCAA6B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-or-update-contact.d.ts
|
|
4
|
+
declare const OmnisendCreateOrUpdateContactInput: z.ZodTypeAny;
|
|
5
|
+
declare const OmnisendCreateOrUpdateContactOutput: z.ZodTypeAny;
|
|
6
|
+
declare const omnisendCreateOrUpdateContact: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { omnisendCreateOrUpdateContact };
|
|
9
|
+
//# sourceMappingURL=create-or-update-contact.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-or-update-contact.d.mts","names":[],"sources":["../../src/actions/create-or-update-contact.ts"],"mappings":";;;cAIa,kCAAA,EAAoC,CAAA,CAAE,UAqBjD;AAAA,cACW,mCAAA,EAAqC,CAAA,CAAE,UAMlD;AAAA,cAEW,6BAAA,gCAA6B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
const omnisendCreateOrUpdateContact = action("OMNISEND_CREATE_OR_UPDATE_CONTACT", {
|
|
4
|
+
slug: "omnisend-create-or-update-contact",
|
|
5
|
+
name: "Create or Update Contact",
|
|
6
|
+
description: "Tool to create or update a contact in Omnisend. Use after collecting subscriber details.",
|
|
7
|
+
input: z.object({
|
|
8
|
+
city: z.string().describe("City name").optional(),
|
|
9
|
+
gender: z.enum(["m", "f"]).describe("Contact's gender ('m' or 'f')").optional(),
|
|
10
|
+
address: z.string().describe("Street address").optional(),
|
|
11
|
+
country: z.string().describe("Full country name").optional(),
|
|
12
|
+
lastName: z.string().describe("Contact's last name").optional(),
|
|
13
|
+
birthdate: z.string().describe("Birthdate in YYYY-MM-DD format").optional(),
|
|
14
|
+
firstName: z.string().describe("Contact's first name").optional(),
|
|
15
|
+
postalCode: z.string().describe("Postal or ZIP code").optional(),
|
|
16
|
+
countryCode: z.string().describe("ISO 3166-1 alpha-2 country code").optional(),
|
|
17
|
+
identifiers: z.array(z.object({
|
|
18
|
+
id: z.string().describe("Identifier value (e.g. email address)"),
|
|
19
|
+
type: z.string().describe("Type of identifier; only 'email' supported"),
|
|
20
|
+
channels: z.object({ email: z.object({
|
|
21
|
+
status: z.enum([
|
|
22
|
+
"subscribed",
|
|
23
|
+
"nonSubscribed",
|
|
24
|
+
"unsubscribed"
|
|
25
|
+
]).describe("Subscription status for email channel"),
|
|
26
|
+
statusDate: z.string().describe("ISO 8601 timestamp when the status last changed").optional()
|
|
27
|
+
}).describe("Email channel subscription details").optional() }).describe("Channel-specific subscription settings").optional(),
|
|
28
|
+
sendWelcomeMessage: z.boolean().describe("If true, Omnisend will send its default welcome email upon creation").optional()
|
|
29
|
+
})).describe("One or more ways to identify the contact; at least one required")
|
|
30
|
+
}),
|
|
31
|
+
output: z.object({
|
|
32
|
+
email: z.string().describe("Primary email address on record"),
|
|
33
|
+
phone: z.string().describe("Phone number, if provided").nullable().optional(),
|
|
34
|
+
lastName: z.string().describe("Last name").nullable().optional(),
|
|
35
|
+
contactID: z.string().describe("Omnisend-assigned unique contact ID"),
|
|
36
|
+
firstName: z.string().describe("First name").nullable().optional()
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
//#endregion
|
|
40
|
+
export { omnisendCreateOrUpdateContact };
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=create-or-update-contact.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-or-update-contact.mjs","names":[],"sources":["../../src/actions/create-or-update-contact.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OmnisendCreateOrUpdateContactInput: z.ZodTypeAny = z.object({\n city: z.string().describe(\"City name\").optional(),\n gender: z.enum([\"m\", \"f\"]).describe(\"Contact's gender ('m' or 'f')\").optional(),\n address: z.string().describe(\"Street address\").optional(),\n country: z.string().describe(\"Full country name\").optional(),\n lastName: z.string().describe(\"Contact's last name\").optional(),\n birthdate: z.string().describe(\"Birthdate in YYYY-MM-DD format\").optional(),\n firstName: z.string().describe(\"Contact's first name\").optional(),\n postalCode: z.string().describe(\"Postal or ZIP code\").optional(),\n countryCode: z.string().describe(\"ISO 3166-1 alpha-2 country code\").optional(),\n identifiers: z.array(z.object({\n id: z.string().describe(\"Identifier value (e.g. email address)\"),\n type: z.string().describe(\"Type of identifier; only 'email' supported\"),\n channels: z.object({\n email: z.object({\n status: z.enum([\"subscribed\", \"nonSubscribed\", \"unsubscribed\"]).describe(\"Subscription status for email channel\"),\n statusDate: z.string().describe(\"ISO 8601 timestamp when the status last changed\").optional(),\n}).describe(\"Email channel subscription details\").optional(),\n}).describe(\"Channel-specific subscription settings\").optional(),\n sendWelcomeMessage: z.boolean().describe(\"If true, Omnisend will send its default welcome email upon creation\").optional(),\n})).describe(\"One or more ways to identify the contact; at least one required\"),\n});\nexport const OmnisendCreateOrUpdateContactOutput: z.ZodTypeAny = z.object({\n email: z.string().describe(\"Primary email address on record\"),\n phone: z.string().describe(\"Phone number, if provided\").nullable().optional(),\n lastName: z.string().describe(\"Last name\").nullable().optional(),\n contactID: z.string().describe(\"Omnisend-assigned unique contact ID\"),\n firstName: z.string().describe(\"First name\").nullable().optional(),\n});\n\nexport const omnisendCreateOrUpdateContact = action(\"OMNISEND_CREATE_OR_UPDATE_CONTACT\", {\n slug: \"omnisend-create-or-update-contact\",\n name: \"Create or Update Contact\",\n description: \"Tool to create or update a contact in Omnisend. Use after collecting subscriber details.\",\n input: OmnisendCreateOrUpdateContactInput,\n output: OmnisendCreateOrUpdateContactOutput,\n});\n"],"mappings":";;AAkCA,MAAa,gCAAgC,OAAO,qCAAqC;CACvF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAlC8D,EAAE,OAAO;EACvE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,WAAW,CAAC,CAAC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AC,SAAS,iCAAiC;EAC5D,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC5E,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,WAAW,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC/D,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC;EACpE,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACnE,CAOU;AACV,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/create-order.ts
|
|
4
|
+
const OmnisendCreateOrderInput = zod.z.object({
|
|
5
|
+
tags: zod.z.array(zod.z.string()).describe("Order tags").optional(),
|
|
6
|
+
email: zod.z.string().describe("Customer email address (email or phone or contactID required)").optional(),
|
|
7
|
+
phone: zod.z.string().describe("Customer phone number (email or phone or contactID required)").optional(),
|
|
8
|
+
cartID: zod.z.string().describe("Cart identifier").optional(),
|
|
9
|
+
source: zod.z.string().describe("Order source").optional(),
|
|
10
|
+
taxSum: zod.z.number().int().describe("Tax amount in cents").optional(),
|
|
11
|
+
orderID: zod.z.string().describe("Unique order identifier from your store"),
|
|
12
|
+
currency: zod.z.string().describe("Order currency code (e.g., USD, EUR)"),
|
|
13
|
+
lastName: zod.z.string().describe("Customer last name").optional(),
|
|
14
|
+
orderSum: zod.z.number().int().describe("Total order amount in cents (must be integer, not float)"),
|
|
15
|
+
orderUrl: zod.z.string().describe("URL to view the order").optional(),
|
|
16
|
+
products: zod.z.array(zod.z.object({
|
|
17
|
+
tags: zod.z.array(zod.z.string()).describe("Product tags").optional(),
|
|
18
|
+
price: zod.z.number().int().describe("Product price in cents (must be integer)"),
|
|
19
|
+
title: zod.z.string().describe("Product title"),
|
|
20
|
+
weight: zod.z.number().int().describe("Product weight in grams").optional(),
|
|
21
|
+
discount: zod.z.number().int().describe("Discount amount in cents").optional(),
|
|
22
|
+
imageUrl: zod.z.string().describe("URL to product image").optional(),
|
|
23
|
+
quantity: zod.z.number().int().describe("Quantity ordered"),
|
|
24
|
+
productID: zod.z.string().describe("Unique product identifier"),
|
|
25
|
+
variantID: zod.z.string().describe("Product variant identifier (required by API)"),
|
|
26
|
+
productUrl: zod.z.string().describe("URL to product page").optional(),
|
|
27
|
+
categoryIDs: zod.z.array(zod.z.string()).describe("List of category IDs").optional(),
|
|
28
|
+
variantTitle: zod.z.string().describe("Variant title").optional(),
|
|
29
|
+
cartProductID: zod.z.string().describe("Unique identifier for this product in the cart").optional()
|
|
30
|
+
}).describe("Product item in the order.")).describe("Array of ordered products").optional(),
|
|
31
|
+
contactID: zod.z.string().describe("Omnisend contact ID (email or phone or contactID required)").optional(),
|
|
32
|
+
createdAt: zod.z.string().describe("Order creation timestamp in ISO 8601 format (cannot be future date, required by API)"),
|
|
33
|
+
firstName: zod.z.string().describe("Customer first name").optional(),
|
|
34
|
+
updatedAt: zod.z.string().describe("Order last update timestamp in ISO 8601 format").optional(),
|
|
35
|
+
courierUrl: zod.z.string().describe("Tracking URL").optional(),
|
|
36
|
+
contactNote: zod.z.string().describe("Note about the customer or order").optional(),
|
|
37
|
+
discountSum: zod.z.number().int().describe("Total discount amount in cents").optional(),
|
|
38
|
+
orderNumber: zod.z.number().int().describe("Order number for display").optional(),
|
|
39
|
+
shippingSum: zod.z.number().int().describe("Shipping cost in cents").optional(),
|
|
40
|
+
subTotalSum: zod.z.number().int().describe("Subtotal amount in cents").optional(),
|
|
41
|
+
courierTitle: zod.z.string().describe("Courier service name").optional(),
|
|
42
|
+
customFields: zod.z.object({}).describe("Custom fields as key-value pairs").optional(),
|
|
43
|
+
discountCode: zod.z.string().describe("Discount code applied").optional(),
|
|
44
|
+
discountType: zod.z.string().describe("Type of discount (e.g., fixedAmount, percentage)").optional(),
|
|
45
|
+
trackingCode: zod.z.string().describe("Shipping tracking code").optional(),
|
|
46
|
+
discountValue: zod.z.number().int().describe("Discount value in cents").optional(),
|
|
47
|
+
paymentMethod: zod.z.string().describe("Payment method description").optional(),
|
|
48
|
+
paymentStatus: zod.z.enum([
|
|
49
|
+
"awaitingPayment",
|
|
50
|
+
"partiallyPaid",
|
|
51
|
+
"paid",
|
|
52
|
+
"partiallyRefunded",
|
|
53
|
+
"refunded",
|
|
54
|
+
"voided"
|
|
55
|
+
]).describe("Payment status enum values.").optional(),
|
|
56
|
+
billingAddress: zod.z.object({
|
|
57
|
+
city: zod.z.string().describe("City").optional(),
|
|
58
|
+
phone: zod.z.string().describe("Phone number").optional(),
|
|
59
|
+
state: zod.z.string().describe("State or province").optional(),
|
|
60
|
+
address: zod.z.string().describe("Street address").optional(),
|
|
61
|
+
company: zod.z.string().describe("Company name").optional(),
|
|
62
|
+
country: zod.z.string().describe("Country name").optional(),
|
|
63
|
+
lastName: zod.z.string().describe("Last name").optional(),
|
|
64
|
+
firstName: zod.z.string().describe("First name").optional(),
|
|
65
|
+
postalCode: zod.z.string().describe("Postal or ZIP code").optional(),
|
|
66
|
+
countryCode: zod.z.string().describe("ISO country code").optional()
|
|
67
|
+
}).describe("Address information for billing or shipping.").optional(),
|
|
68
|
+
shippingMethod: zod.z.string().describe("Shipping method description").optional(),
|
|
69
|
+
shippingAddress: zod.z.object({
|
|
70
|
+
city: zod.z.string().describe("City").optional(),
|
|
71
|
+
phone: zod.z.string().describe("Phone number").optional(),
|
|
72
|
+
state: zod.z.string().describe("State or province").optional(),
|
|
73
|
+
address: zod.z.string().describe("Street address").optional(),
|
|
74
|
+
company: zod.z.string().describe("Company name").optional(),
|
|
75
|
+
country: zod.z.string().describe("Country name").optional(),
|
|
76
|
+
lastName: zod.z.string().describe("Last name").optional(),
|
|
77
|
+
firstName: zod.z.string().describe("First name").optional(),
|
|
78
|
+
postalCode: zod.z.string().describe("Postal or ZIP code").optional(),
|
|
79
|
+
countryCode: zod.z.string().describe("ISO country code").optional()
|
|
80
|
+
}).describe("Address information for billing or shipping.").optional(),
|
|
81
|
+
fulfillmentStatus: zod.z.enum([
|
|
82
|
+
"unfulfilled",
|
|
83
|
+
"inProgress",
|
|
84
|
+
"fulfilled",
|
|
85
|
+
"delivered",
|
|
86
|
+
"restocked"
|
|
87
|
+
]).describe("Fulfillment status enum values.").optional(),
|
|
88
|
+
subTotalTaxIncluded: zod.z.boolean().describe("Whether tax is included in subtotal").optional()
|
|
89
|
+
});
|
|
90
|
+
const OmnisendCreateOrderOutput = zod.z.object({
|
|
91
|
+
email: zod.z.string().describe("Customer email address").nullable().optional(),
|
|
92
|
+
phone: zod.z.string().describe("Customer phone number").nullable().optional(),
|
|
93
|
+
orderID: zod.z.string().describe("Unique order identifier")
|
|
94
|
+
});
|
|
95
|
+
const omnisendCreateOrder = require_action.action("OMNISEND_CREATE_ORDER", {
|
|
96
|
+
slug: "omnisend-create-order",
|
|
97
|
+
name: "Create Order",
|
|
98
|
+
description: "Tool to create a new order in Omnisend v3 API. Use when recording a customer purchase or order transaction.",
|
|
99
|
+
input: OmnisendCreateOrderInput,
|
|
100
|
+
output: OmnisendCreateOrderOutput
|
|
101
|
+
});
|
|
102
|
+
//#endregion
|
|
103
|
+
exports.omnisendCreateOrder = omnisendCreateOrder;
|
|
104
|
+
|
|
105
|
+
//# sourceMappingURL=create-order.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-order.cjs","names":["z","action"],"sources":["../../src/actions/create-order.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OmnisendCreateOrderInput: z.ZodTypeAny = z.object({\n tags: z.array(z.string()).describe(\"Order tags\").optional(),\n email: z.string().describe(\"Customer email address (email or phone or contactID required)\").optional(),\n phone: z.string().describe(\"Customer phone number (email or phone or contactID required)\").optional(),\n cartID: z.string().describe(\"Cart identifier\").optional(),\n source: z.string().describe(\"Order source\").optional(),\n taxSum: z.number().int().describe(\"Tax amount in cents\").optional(),\n orderID: z.string().describe(\"Unique order identifier from your store\"),\n currency: z.string().describe(\"Order currency code (e.g., USD, EUR)\"),\n lastName: z.string().describe(\"Customer last name\").optional(),\n orderSum: z.number().int().describe(\"Total order amount in cents (must be integer, not float)\"),\n orderUrl: z.string().describe(\"URL to view the order\").optional(),\n products: z.array(z.object({\n tags: z.array(z.string()).describe(\"Product tags\").optional(),\n price: z.number().int().describe(\"Product price in cents (must be integer)\"),\n title: z.string().describe(\"Product title\"),\n weight: z.number().int().describe(\"Product weight in grams\").optional(),\n discount: z.number().int().describe(\"Discount amount in cents\").optional(),\n imageUrl: z.string().describe(\"URL to product image\").optional(),\n quantity: z.number().int().describe(\"Quantity ordered\"),\n productID: z.string().describe(\"Unique product identifier\"),\n variantID: z.string().describe(\"Product variant identifier (required by API)\"),\n productUrl: z.string().describe(\"URL to product page\").optional(),\n categoryIDs: z.array(z.string()).describe(\"List of category IDs\").optional(),\n variantTitle: z.string().describe(\"Variant title\").optional(),\n cartProductID: z.string().describe(\"Unique identifier for this product in the cart\").optional(),\n}).describe(\"Product item in the order.\")).describe(\"Array of ordered products\").optional(),\n contactID: z.string().describe(\"Omnisend contact ID (email or phone or contactID required)\").optional(),\n createdAt: z.string().describe(\"Order creation timestamp in ISO 8601 format (cannot be future date, required by API)\"),\n firstName: z.string().describe(\"Customer first name\").optional(),\n updatedAt: z.string().describe(\"Order last update timestamp in ISO 8601 format\").optional(),\n courierUrl: z.string().describe(\"Tracking URL\").optional(),\n contactNote: z.string().describe(\"Note about the customer or order\").optional(),\n discountSum: z.number().int().describe(\"Total discount amount in cents\").optional(),\n orderNumber: z.number().int().describe(\"Order number for display\").optional(),\n shippingSum: z.number().int().describe(\"Shipping cost in cents\").optional(),\n subTotalSum: z.number().int().describe(\"Subtotal amount in cents\").optional(),\n courierTitle: z.string().describe(\"Courier service name\").optional(),\n customFields: z.object({}).describe(\"Custom fields as key-value pairs\").optional(),\n discountCode: z.string().describe(\"Discount code applied\").optional(),\n discountType: z.string().describe(\"Type of discount (e.g., fixedAmount, percentage)\").optional(),\n trackingCode: z.string().describe(\"Shipping tracking code\").optional(),\n discountValue: z.number().int().describe(\"Discount value in cents\").optional(),\n paymentMethod: z.string().describe(\"Payment method description\").optional(),\n paymentStatus: z.enum([\"awaitingPayment\", \"partiallyPaid\", \"paid\", \"partiallyRefunded\", \"refunded\", \"voided\"]).describe(\"Payment status enum values.\").optional(),\n billingAddress: z.object({\n city: z.string().describe(\"City\").optional(),\n phone: z.string().describe(\"Phone number\").optional(),\n state: z.string().describe(\"State or province\").optional(),\n address: z.string().describe(\"Street address\").optional(),\n company: z.string().describe(\"Company name\").optional(),\n country: z.string().describe(\"Country name\").optional(),\n lastName: z.string().describe(\"Last name\").optional(),\n firstName: z.string().describe(\"First name\").optional(),\n postalCode: z.string().describe(\"Postal or ZIP code\").optional(),\n countryCode: z.string().describe(\"ISO country code\").optional(),\n}).describe(\"Address information for billing or shipping.\").optional(),\n shippingMethod: z.string().describe(\"Shipping method description\").optional(),\n shippingAddress: z.object({\n city: z.string().describe(\"City\").optional(),\n phone: z.string().describe(\"Phone number\").optional(),\n state: z.string().describe(\"State or province\").optional(),\n address: z.string().describe(\"Street address\").optional(),\n company: z.string().describe(\"Company name\").optional(),\n country: z.string().describe(\"Country name\").optional(),\n lastName: z.string().describe(\"Last name\").optional(),\n firstName: z.string().describe(\"First name\").optional(),\n postalCode: z.string().describe(\"Postal or ZIP code\").optional(),\n countryCode: z.string().describe(\"ISO country code\").optional(),\n}).describe(\"Address information for billing or shipping.\").optional(),\n fulfillmentStatus: z.enum([\"unfulfilled\", \"inProgress\", \"fulfilled\", \"delivered\", \"restocked\"]).describe(\"Fulfillment status enum values.\").optional(),\n subTotalTaxIncluded: z.boolean().describe(\"Whether tax is included in subtotal\").optional(),\n});\nexport const OmnisendCreateOrderOutput: z.ZodTypeAny = z.object({\n email: z.string().describe(\"Customer email address\").nullable().optional(),\n phone: z.string().describe(\"Customer phone number\").nullable().optional(),\n orderID: z.string().describe(\"Unique order identifier\"),\n});\n\nexport const omnisendCreateOrder = action(\"OMNISEND_CREATE_ORDER\", {\n slug: \"omnisend-create-order\",\n name: \"Create Order\",\n description: \"Tool to create a new order in Omnisend v3 API. Use when recording a customer purchase or order transaction.\",\n input: OmnisendCreateOrderInput,\n output: OmnisendCreateOrderOutput,\n});\n"],"mappings":";;;AAIA,MAAa,2BAAyCA,IAAAA,EAAE,OAAO;CAC7D,MAAMA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,YAAY,CAAC,CAAC,SAAS;CAC1D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS;CACrG,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS;CACpG,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iBAAiB,CAAC,CAAC,SAAS;CACxD,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,cAAc,CAAC,CAAC,SAAS;CACrD,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qBAAqB,CAAC,CAAC,SAAS;CAClE,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC;CACtE,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC;CACpE,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,SAAS;CAC7D,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0DAA0D;CAC9F,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uBAAuB,CAAC,CAAC,SAAS;CAChE,UAAUA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EAC3B,MAAMA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAA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yBAAyB;CACjE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-order.d.ts
|
|
4
|
+
declare const OmnisendCreateOrderInput: z.ZodTypeAny;
|
|
5
|
+
declare const OmnisendCreateOrderOutput: z.ZodTypeAny;
|
|
6
|
+
declare const omnisendCreateOrder: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { omnisendCreateOrder };
|
|
9
|
+
//# sourceMappingURL=create-order.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-order.d.cts","names":[],"sources":["../../src/actions/create-order.ts"],"mappings":";;;cAIa,wBAAA,EAA0B,CAAA,CAAE,UAwEvC;AAAA,cACW,yBAAA,EAA2B,CAAA,CAAE,UAIxC;AAAA,cAEW,mBAAA,gCAAmB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-order.d.ts
|
|
4
|
+
declare const OmnisendCreateOrderInput: z.ZodTypeAny;
|
|
5
|
+
declare const OmnisendCreateOrderOutput: z.ZodTypeAny;
|
|
6
|
+
declare const omnisendCreateOrder: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { omnisendCreateOrder };
|
|
9
|
+
//# sourceMappingURL=create-order.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-order.d.mts","names":[],"sources":["../../src/actions/create-order.ts"],"mappings":";;;cAIa,wBAAA,EAA0B,CAAA,CAAE,UAwEvC;AAAA,cACW,yBAAA,EAA2B,CAAA,CAAE,UAIxC;AAAA,cAEW,mBAAA,gCAAmB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
const omnisendCreateOrder = action("OMNISEND_CREATE_ORDER", {
|
|
4
|
+
slug: "omnisend-create-order",
|
|
5
|
+
name: "Create Order",
|
|
6
|
+
description: "Tool to create a new order in Omnisend v3 API. Use when recording a customer purchase or order transaction.",
|
|
7
|
+
input: z.object({
|
|
8
|
+
tags: z.array(z.string()).describe("Order tags").optional(),
|
|
9
|
+
email: z.string().describe("Customer email address (email or phone or contactID required)").optional(),
|
|
10
|
+
phone: z.string().describe("Customer phone number (email or phone or contactID required)").optional(),
|
|
11
|
+
cartID: z.string().describe("Cart identifier").optional(),
|
|
12
|
+
source: z.string().describe("Order source").optional(),
|
|
13
|
+
taxSum: z.number().int().describe("Tax amount in cents").optional(),
|
|
14
|
+
orderID: z.string().describe("Unique order identifier from your store"),
|
|
15
|
+
currency: z.string().describe("Order currency code (e.g., USD, EUR)"),
|
|
16
|
+
lastName: z.string().describe("Customer last name").optional(),
|
|
17
|
+
orderSum: z.number().int().describe("Total order amount in cents (must be integer, not float)"),
|
|
18
|
+
orderUrl: z.string().describe("URL to view the order").optional(),
|
|
19
|
+
products: z.array(z.object({
|
|
20
|
+
tags: z.array(z.string()).describe("Product tags").optional(),
|
|
21
|
+
price: z.number().int().describe("Product price in cents (must be integer)"),
|
|
22
|
+
title: z.string().describe("Product title"),
|
|
23
|
+
weight: z.number().int().describe("Product weight in grams").optional(),
|
|
24
|
+
discount: z.number().int().describe("Discount amount in cents").optional(),
|
|
25
|
+
imageUrl: z.string().describe("URL to product image").optional(),
|
|
26
|
+
quantity: z.number().int().describe("Quantity ordered"),
|
|
27
|
+
productID: z.string().describe("Unique product identifier"),
|
|
28
|
+
variantID: z.string().describe("Product variant identifier (required by API)"),
|
|
29
|
+
productUrl: z.string().describe("URL to product page").optional(),
|
|
30
|
+
categoryIDs: z.array(z.string()).describe("List of category IDs").optional(),
|
|
31
|
+
variantTitle: z.string().describe("Variant title").optional(),
|
|
32
|
+
cartProductID: z.string().describe("Unique identifier for this product in the cart").optional()
|
|
33
|
+
}).describe("Product item in the order.")).describe("Array of ordered products").optional(),
|
|
34
|
+
contactID: z.string().describe("Omnisend contact ID (email or phone or contactID required)").optional(),
|
|
35
|
+
createdAt: z.string().describe("Order creation timestamp in ISO 8601 format (cannot be future date, required by API)"),
|
|
36
|
+
firstName: z.string().describe("Customer first name").optional(),
|
|
37
|
+
updatedAt: z.string().describe("Order last update timestamp in ISO 8601 format").optional(),
|
|
38
|
+
courierUrl: z.string().describe("Tracking URL").optional(),
|
|
39
|
+
contactNote: z.string().describe("Note about the customer or order").optional(),
|
|
40
|
+
discountSum: z.number().int().describe("Total discount amount in cents").optional(),
|
|
41
|
+
orderNumber: z.number().int().describe("Order number for display").optional(),
|
|
42
|
+
shippingSum: z.number().int().describe("Shipping cost in cents").optional(),
|
|
43
|
+
subTotalSum: z.number().int().describe("Subtotal amount in cents").optional(),
|
|
44
|
+
courierTitle: z.string().describe("Courier service name").optional(),
|
|
45
|
+
customFields: z.object({}).describe("Custom fields as key-value pairs").optional(),
|
|
46
|
+
discountCode: z.string().describe("Discount code applied").optional(),
|
|
47
|
+
discountType: z.string().describe("Type of discount (e.g., fixedAmount, percentage)").optional(),
|
|
48
|
+
trackingCode: z.string().describe("Shipping tracking code").optional(),
|
|
49
|
+
discountValue: z.number().int().describe("Discount value in cents").optional(),
|
|
50
|
+
paymentMethod: z.string().describe("Payment method description").optional(),
|
|
51
|
+
paymentStatus: z.enum([
|
|
52
|
+
"awaitingPayment",
|
|
53
|
+
"partiallyPaid",
|
|
54
|
+
"paid",
|
|
55
|
+
"partiallyRefunded",
|
|
56
|
+
"refunded",
|
|
57
|
+
"voided"
|
|
58
|
+
]).describe("Payment status enum values.").optional(),
|
|
59
|
+
billingAddress: z.object({
|
|
60
|
+
city: z.string().describe("City").optional(),
|
|
61
|
+
phone: z.string().describe("Phone number").optional(),
|
|
62
|
+
state: z.string().describe("State or province").optional(),
|
|
63
|
+
address: z.string().describe("Street address").optional(),
|
|
64
|
+
company: z.string().describe("Company name").optional(),
|
|
65
|
+
country: z.string().describe("Country name").optional(),
|
|
66
|
+
lastName: z.string().describe("Last name").optional(),
|
|
67
|
+
firstName: z.string().describe("First name").optional(),
|
|
68
|
+
postalCode: z.string().describe("Postal or ZIP code").optional(),
|
|
69
|
+
countryCode: z.string().describe("ISO country code").optional()
|
|
70
|
+
}).describe("Address information for billing or shipping.").optional(),
|
|
71
|
+
shippingMethod: z.string().describe("Shipping method description").optional(),
|
|
72
|
+
shippingAddress: z.object({
|
|
73
|
+
city: z.string().describe("City").optional(),
|
|
74
|
+
phone: z.string().describe("Phone number").optional(),
|
|
75
|
+
state: z.string().describe("State or province").optional(),
|
|
76
|
+
address: z.string().describe("Street address").optional(),
|
|
77
|
+
company: z.string().describe("Company name").optional(),
|
|
78
|
+
country: z.string().describe("Country name").optional(),
|
|
79
|
+
lastName: z.string().describe("Last name").optional(),
|
|
80
|
+
firstName: z.string().describe("First name").optional(),
|
|
81
|
+
postalCode: z.string().describe("Postal or ZIP code").optional(),
|
|
82
|
+
countryCode: z.string().describe("ISO country code").optional()
|
|
83
|
+
}).describe("Address information for billing or shipping.").optional(),
|
|
84
|
+
fulfillmentStatus: z.enum([
|
|
85
|
+
"unfulfilled",
|
|
86
|
+
"inProgress",
|
|
87
|
+
"fulfilled",
|
|
88
|
+
"delivered",
|
|
89
|
+
"restocked"
|
|
90
|
+
]).describe("Fulfillment status enum values.").optional(),
|
|
91
|
+
subTotalTaxIncluded: z.boolean().describe("Whether tax is included in subtotal").optional()
|
|
92
|
+
}),
|
|
93
|
+
output: z.object({
|
|
94
|
+
email: z.string().describe("Customer email address").nullable().optional(),
|
|
95
|
+
phone: z.string().describe("Customer phone number").nullable().optional(),
|
|
96
|
+
orderID: z.string().describe("Unique order identifier")
|
|
97
|
+
})
|
|
98
|
+
});
|
|
99
|
+
//#endregion
|
|
100
|
+
export { omnisendCreateOrder };
|
|
101
|
+
|
|
102
|
+
//# sourceMappingURL=create-order.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-order.mjs","names":[],"sources":["../../src/actions/create-order.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OmnisendCreateOrderInput: z.ZodTypeAny = z.object({\n tags: z.array(z.string()).describe(\"Order tags\").optional(),\n email: z.string().describe(\"Customer email address (email or phone or contactID required)\").optional(),\n phone: z.string().describe(\"Customer phone number (email or phone or contactID required)\").optional(),\n cartID: z.string().describe(\"Cart identifier\").optional(),\n source: z.string().describe(\"Order source\").optional(),\n taxSum: z.number().int().describe(\"Tax amount in cents\").optional(),\n orderID: z.string().describe(\"Unique order identifier from your store\"),\n currency: z.string().describe(\"Order currency code (e.g., USD, EUR)\"),\n lastName: z.string().describe(\"Customer last name\").optional(),\n orderSum: z.number().int().describe(\"Total order amount in cents (must be integer, not float)\"),\n orderUrl: z.string().describe(\"URL to view the order\").optional(),\n products: z.array(z.object({\n tags: z.array(z.string()).describe(\"Product tags\").optional(),\n price: z.number().int().describe(\"Product price in cents (must be integer)\"),\n title: z.string().describe(\"Product title\"),\n weight: z.number().int().describe(\"Product weight in grams\").optional(),\n discount: z.number().int().describe(\"Discount amount in cents\").optional(),\n imageUrl: z.string().describe(\"URL to product image\").optional(),\n quantity: z.number().int().describe(\"Quantity ordered\"),\n productID: z.string().describe(\"Unique product identifier\"),\n variantID: z.string().describe(\"Product variant identifier (required by API)\"),\n productUrl: z.string().describe(\"URL to product page\").optional(),\n categoryIDs: z.array(z.string()).describe(\"List of category IDs\").optional(),\n variantTitle: z.string().describe(\"Variant title\").optional(),\n cartProductID: z.string().describe(\"Unique identifier for this product in the cart\").optional(),\n}).describe(\"Product item in the order.\")).describe(\"Array of ordered products\").optional(),\n contactID: z.string().describe(\"Omnisend contact ID (email or phone or contactID required)\").optional(),\n createdAt: z.string().describe(\"Order creation timestamp in ISO 8601 format (cannot be future date, required by API)\"),\n firstName: z.string().describe(\"Customer first name\").optional(),\n updatedAt: z.string().describe(\"Order last update timestamp in ISO 8601 format\").optional(),\n courierUrl: z.string().describe(\"Tracking URL\").optional(),\n contactNote: z.string().describe(\"Note about the customer or order\").optional(),\n discountSum: z.number().int().describe(\"Total discount amount in cents\").optional(),\n orderNumber: z.number().int().describe(\"Order number for display\").optional(),\n shippingSum: z.number().int().describe(\"Shipping cost in cents\").optional(),\n subTotalSum: z.number().int().describe(\"Subtotal amount in cents\").optional(),\n courierTitle: z.string().describe(\"Courier service name\").optional(),\n customFields: z.object({}).describe(\"Custom fields as key-value pairs\").optional(),\n discountCode: z.string().describe(\"Discount code applied\").optional(),\n discountType: z.string().describe(\"Type of discount (e.g., fixedAmount, percentage)\").optional(),\n trackingCode: z.string().describe(\"Shipping tracking code\").optional(),\n discountValue: z.number().int().describe(\"Discount value in cents\").optional(),\n paymentMethod: z.string().describe(\"Payment method description\").optional(),\n paymentStatus: z.enum([\"awaitingPayment\", \"partiallyPaid\", \"paid\", \"partiallyRefunded\", \"refunded\", \"voided\"]).describe(\"Payment status enum values.\").optional(),\n billingAddress: z.object({\n city: z.string().describe(\"City\").optional(),\n phone: z.string().describe(\"Phone number\").optional(),\n state: z.string().describe(\"State or province\").optional(),\n address: z.string().describe(\"Street address\").optional(),\n company: z.string().describe(\"Company name\").optional(),\n country: z.string().describe(\"Country name\").optional(),\n lastName: z.string().describe(\"Last name\").optional(),\n firstName: z.string().describe(\"First name\").optional(),\n postalCode: z.string().describe(\"Postal or ZIP code\").optional(),\n countryCode: z.string().describe(\"ISO country code\").optional(),\n}).describe(\"Address information for billing or shipping.\").optional(),\n shippingMethod: z.string().describe(\"Shipping method description\").optional(),\n shippingAddress: z.object({\n city: z.string().describe(\"City\").optional(),\n phone: z.string().describe(\"Phone number\").optional(),\n state: z.string().describe(\"State or province\").optional(),\n address: z.string().describe(\"Street address\").optional(),\n company: z.string().describe(\"Company name\").optional(),\n country: z.string().describe(\"Country name\").optional(),\n lastName: z.string().describe(\"Last name\").optional(),\n firstName: z.string().describe(\"First name\").optional(),\n postalCode: z.string().describe(\"Postal or ZIP code\").optional(),\n countryCode: z.string().describe(\"ISO country code\").optional(),\n}).describe(\"Address information for billing or shipping.\").optional(),\n fulfillmentStatus: z.enum([\"unfulfilled\", \"inProgress\", \"fulfilled\", \"delivered\", \"restocked\"]).describe(\"Fulfillment status enum values.\").optional(),\n subTotalTaxIncluded: z.boolean().describe(\"Whether tax is included in subtotal\").optional(),\n});\nexport const OmnisendCreateOrderOutput: z.ZodTypeAny = z.object({\n email: z.string().describe(\"Customer email address\").nullable().optional(),\n phone: z.string().describe(\"Customer phone number\").nullable().optional(),\n orderID: z.string().describe(\"Unique order identifier\"),\n});\n\nexport const omnisendCreateOrder = action(\"OMNISEND_CREATE_ORDER\", {\n slug: \"omnisend-create-order\",\n name: \"Create Order\",\n description: \"Tool to create a new order in Omnisend v3 API. Use when recording a customer purchase or order transaction.\",\n input: OmnisendCreateOrderInput,\n output: OmnisendCreateOrderOutput,\n});\n"],"mappings":";;AAmFA,MAAa,sBAAsB,OAAO,yBAAyB;CACjE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAnFoD,EAAE,OAAO;EAC7D,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,YAAY,CAAC,CAAC,SAAS;EAC1D,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS;EACrG,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS;EACpG,QAAQ,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ACxE,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,yBAAyB;CACxD,CAOU;AACV,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/create-product-category.ts
|
|
4
|
+
const OmnisendCreateProductCategoryInput = zod.z.object({
|
|
5
|
+
title: zod.z.string().describe("Title/name of the product category. Maximum 100 characters."),
|
|
6
|
+
categoryID: zod.z.string().describe("Unique identifier for the product category. Must be between 1 and 100 characters.")
|
|
7
|
+
});
|
|
8
|
+
const OmnisendCreateProductCategoryOutput = zod.z.object({ categoryID: zod.z.string().describe("The unique identifier of the created product category.") });
|
|
9
|
+
const omnisendCreateProductCategory = require_action.action("OMNISEND_CREATE_PRODUCT_CATEGORY", {
|
|
10
|
+
slug: "omnisend-create-product-category",
|
|
11
|
+
name: "Create Product Category",
|
|
12
|
+
description: "Tool to create a new product category in the Omnisend catalog. Use when organizing products into categories.",
|
|
13
|
+
input: OmnisendCreateProductCategoryInput,
|
|
14
|
+
output: OmnisendCreateProductCategoryOutput
|
|
15
|
+
});
|
|
16
|
+
//#endregion
|
|
17
|
+
exports.omnisendCreateProductCategory = omnisendCreateProductCategory;
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=create-product-category.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-product-category.cjs","names":["z","action"],"sources":["../../src/actions/create-product-category.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OmnisendCreateProductCategoryInput: z.ZodTypeAny = z.object({\n title: z.string().describe(\"Title/name of the product category. Maximum 100 characters.\"),\n categoryID: z.string().describe(\"Unique identifier for the product category. Must be between 1 and 100 characters.\"),\n});\nexport const OmnisendCreateProductCategoryOutput: z.ZodTypeAny = z.object({\n categoryID: z.string().describe(\"The unique identifier of the created product category.\"),\n});\n\nexport const omnisendCreateProductCategory = action(\"OMNISEND_CREATE_PRODUCT_CATEGORY\", {\n slug: \"omnisend-create-product-category\",\n name: \"Create Product Category\",\n description: \"Tool to create a new product category in the Omnisend catalog. Use when organizing products into categories.\",\n input: OmnisendCreateProductCategoryInput,\n output: OmnisendCreateProductCategoryOutput,\n});\n"],"mappings":";;;AAIA,MAAa,qCAAmDA,IAAAA,EAAE,OAAO;CACvE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D;CACxF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF;AACrH,CAAC;AACD,MAAa,sCAAoDA,IAAAA,EAAE,OAAO,EACxE,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wDAAwD,EAC1F,CAAC;AAED,MAAa,gCAAgCC,eAAAA,OAAO,oCAAoC;CACtF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-product-category.d.ts
|
|
4
|
+
declare const OmnisendCreateProductCategoryInput: z.ZodTypeAny;
|
|
5
|
+
declare const OmnisendCreateProductCategoryOutput: z.ZodTypeAny;
|
|
6
|
+
declare const omnisendCreateProductCategory: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { omnisendCreateProductCategory };
|
|
9
|
+
//# sourceMappingURL=create-product-category.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-product-category.d.cts","names":[],"sources":["../../src/actions/create-product-category.ts"],"mappings":";;;cAIa,kCAAA,EAAoC,CAAA,CAAE,UAGjD;AAAA,cACW,mCAAA,EAAqC,CAAA,CAAE,UAElD;AAAA,cAEW,6BAAA,gCAA6B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-product-category.d.ts
|
|
4
|
+
declare const OmnisendCreateProductCategoryInput: z.ZodTypeAny;
|
|
5
|
+
declare const OmnisendCreateProductCategoryOutput: z.ZodTypeAny;
|
|
6
|
+
declare const omnisendCreateProductCategory: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { omnisendCreateProductCategory };
|
|
9
|
+
//# sourceMappingURL=create-product-category.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-product-category.d.mts","names":[],"sources":["../../src/actions/create-product-category.ts"],"mappings":";;;cAIa,kCAAA,EAAoC,CAAA,CAAE,UAGjD;AAAA,cACW,mCAAA,EAAqC,CAAA,CAAE,UAElD;AAAA,cAEW,6BAAA,gCAA6B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
const omnisendCreateProductCategory = action("OMNISEND_CREATE_PRODUCT_CATEGORY", {
|
|
4
|
+
slug: "omnisend-create-product-category",
|
|
5
|
+
name: "Create Product Category",
|
|
6
|
+
description: "Tool to create a new product category in the Omnisend catalog. Use when organizing products into categories.",
|
|
7
|
+
input: z.object({
|
|
8
|
+
title: z.string().describe("Title/name of the product category. Maximum 100 characters."),
|
|
9
|
+
categoryID: z.string().describe("Unique identifier for the product category. Must be between 1 and 100 characters.")
|
|
10
|
+
}),
|
|
11
|
+
output: z.object({ categoryID: z.string().describe("The unique identifier of the created product category.") })
|
|
12
|
+
});
|
|
13
|
+
//#endregion
|
|
14
|
+
export { omnisendCreateProductCategory };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=create-product-category.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-product-category.mjs","names":[],"sources":["../../src/actions/create-product-category.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OmnisendCreateProductCategoryInput: z.ZodTypeAny = z.object({\n title: z.string().describe(\"Title/name of the product category. Maximum 100 characters.\"),\n categoryID: z.string().describe(\"Unique identifier for the product category. Must be between 1 and 100 characters.\"),\n});\nexport const OmnisendCreateProductCategoryOutput: z.ZodTypeAny = z.object({\n categoryID: z.string().describe(\"The unique identifier of the created product category.\"),\n});\n\nexport const omnisendCreateProductCategory = action(\"OMNISEND_CREATE_PRODUCT_CATEGORY\", {\n slug: \"omnisend-create-product-category\",\n name: \"Create Product Category\",\n description: \"Tool to create a new product category in the Omnisend catalog. Use when organizing products into categories.\",\n input: OmnisendCreateProductCategoryInput,\n output: OmnisendCreateProductCategoryOutput,\n});\n"],"mappings":";;AAYA,MAAa,gCAAgC,OAAO,oCAAoC;CACtF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAZ8D,EAAE,OAAO;EACvE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D;EACxF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,mFAAmF;CACrH,CASS;CACP,QAT+D,EAAE,OAAO,EACxE,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,wDAAwD,EAC1F,CAOU;AACV,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/create-product.ts
|
|
4
|
+
const OmnisendCreateProductInput = zod.z.object({
|
|
5
|
+
id: zod.z.string().describe("Unique product identifier from your store. Must be unique across all products."),
|
|
6
|
+
url: zod.z.string().describe("URL to the product page on your website."),
|
|
7
|
+
tags: zod.z.array(zod.z.string()).describe("Tags to categorize the product for filtering and organization (max 100 items).").optional(),
|
|
8
|
+
type: zod.z.string().describe("Product type to categorize products (e.g., 'Electronics', 'Clothing').").optional(),
|
|
9
|
+
title: zod.z.string().describe("Product title displayed to customers."),
|
|
10
|
+
images: zod.z.array(zod.z.string()).describe("Additional product image URLs beyond the default image (max 300 items).").optional(),
|
|
11
|
+
status: zod.z.enum([
|
|
12
|
+
"inStock",
|
|
13
|
+
"outOfStock",
|
|
14
|
+
"notAvailable"
|
|
15
|
+
]).describe("Overall product availability status. Keep in sync with your shop to avoid sending out-of-stock products."),
|
|
16
|
+
vendor: zod.z.string().describe("Manufacturer or brand of the product.").optional(),
|
|
17
|
+
currency: zod.z.string().describe("ISO 4217 currency code (e.g., USD, EUR, GBP)."),
|
|
18
|
+
variants: zod.z.array(zod.z.object({
|
|
19
|
+
id: zod.z.string().describe("Unique variant identifier from your store."),
|
|
20
|
+
sku: zod.z.string().describe("Stock keeping unit (SKU) for inventory tracking.").optional(),
|
|
21
|
+
url: zod.z.string().describe("Product page URL for this variant."),
|
|
22
|
+
price: zod.z.number().describe("Variant price as a decimal number."),
|
|
23
|
+
title: zod.z.string().describe("Variant title."),
|
|
24
|
+
images: zod.z.array(zod.z.string()).describe("Additional image URLs for this variant (max 300 items).").optional(),
|
|
25
|
+
status: zod.z.enum([
|
|
26
|
+
"inStock",
|
|
27
|
+
"outOfStock",
|
|
28
|
+
"notAvailable"
|
|
29
|
+
]).describe("Stock status for this variant."),
|
|
30
|
+
description: zod.z.string().describe("Variant description.").optional(),
|
|
31
|
+
defaultImageUrl: zod.z.string().describe("Primary image URL for this variant.").optional(),
|
|
32
|
+
strikeThroughPrice: zod.z.number().describe("Original price before discount for displaying strike-through pricing.").optional()
|
|
33
|
+
}).describe("Product variant details for creation.")).describe("Product variants with their own prices and SKUs. At least one variant is required (min 1, max 500 items)."),
|
|
34
|
+
createdAt: zod.z.string().describe("Product creation timestamp in ISO 8601 format (e.g., 2021-01-01T00:00:00Z).").optional(),
|
|
35
|
+
updatedAt: zod.z.string().describe("Last update timestamp in ISO 8601 format.").optional(),
|
|
36
|
+
categoryIDs: zod.z.array(zod.z.string()).describe("List of category IDs this product belongs to (max 100 items).").optional(),
|
|
37
|
+
description: zod.z.string().describe("Short description of the product. Can be used in the email body.").optional(),
|
|
38
|
+
defaultImageUrl: zod.z.string().describe("Primary image URL for the product. Recommended if more than one image is needed.").optional()
|
|
39
|
+
}).describe("Request schema for creating a product in Omnisend.");
|
|
40
|
+
const OmnisendCreateProductOutput = zod.z.object({ id: zod.z.string().describe("The unique identifier of the created product.") }).describe("Response schema after creating a product.");
|
|
41
|
+
const omnisendCreateProduct = require_action.action("OMNISEND_CREATE_PRODUCT", {
|
|
42
|
+
slug: "omnisend-create-product",
|
|
43
|
+
name: "Create Product",
|
|
44
|
+
description: "Tool to create a new product in the Omnisend product catalog. Use when adding products for email campaigns or syncing inventory.",
|
|
45
|
+
input: OmnisendCreateProductInput,
|
|
46
|
+
output: OmnisendCreateProductOutput
|
|
47
|
+
});
|
|
48
|
+
//#endregion
|
|
49
|
+
exports.omnisendCreateProduct = omnisendCreateProduct;
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=create-product.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-product.cjs","names":["z","action"],"sources":["../../src/actions/create-product.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OmnisendCreateProductInput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique product identifier from your store. Must be unique across all products.\"),\n url: z.string().describe(\"URL to the product page on your website.\"),\n tags: z.array(z.string()).describe(\"Tags to categorize the product for filtering and organization (max 100 items).\").optional(),\n type: z.string().describe(\"Product type to categorize products (e.g., 'Electronics', 'Clothing').\").optional(),\n title: z.string().describe(\"Product title displayed to customers.\"),\n images: z.array(z.string()).describe(\"Additional product image URLs beyond the default image (max 300 items).\").optional(),\n status: z.enum([\"inStock\", \"outOfStock\", \"notAvailable\"]).describe(\"Overall product availability status. Keep in sync with your shop to avoid sending out-of-stock products.\"),\n vendor: z.string().describe(\"Manufacturer or brand of the product.\").optional(),\n currency: z.string().describe(\"ISO 4217 currency code (e.g., USD, EUR, GBP).\"),\n variants: z.array(z.object({\n id: z.string().describe(\"Unique variant identifier from your store.\"),\n sku: z.string().describe(\"Stock keeping unit (SKU) for inventory tracking.\").optional(),\n url: z.string().describe(\"Product page URL for this variant.\"),\n price: z.number().describe(\"Variant price as a decimal number.\"),\n title: z.string().describe(\"Variant title.\"),\n images: z.array(z.string()).describe(\"Additional image URLs for this variant (max 300 items).\").optional(),\n status: z.enum([\"inStock\", \"outOfStock\", \"notAvailable\"]).describe(\"Stock status for this variant.\"),\n description: z.string().describe(\"Variant description.\").optional(),\n defaultImageUrl: z.string().describe(\"Primary image URL for this variant.\").optional(),\n strikeThroughPrice: z.number().describe(\"Original price before discount for displaying strike-through pricing.\").optional(),\n}).describe(\"Product variant details for creation.\")).describe(\"Product variants with their own prices and SKUs. At least one variant is required (min 1, max 500 items).\"),\n createdAt: z.string().describe(\"Product creation timestamp in ISO 8601 format (e.g., 2021-01-01T00:00:00Z).\").optional(),\n updatedAt: z.string().describe(\"Last update timestamp in ISO 8601 format.\").optional(),\n categoryIDs: z.array(z.string()).describe(\"List of category IDs this product belongs to (max 100 items).\").optional(),\n description: z.string().describe(\"Short description of the product. Can be used in the email body.\").optional(),\n defaultImageUrl: z.string().describe(\"Primary image URL for the product. Recommended if more than one image is needed.\").optional(),\n}).describe(\"Request schema for creating a product in Omnisend.\");\nexport const OmnisendCreateProductOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"The unique identifier of the created product.\"),\n}).describe(\"Response schema after creating a product.\");\n\nexport const omnisendCreateProduct = action(\"OMNISEND_CREATE_PRODUCT\", {\n slug: \"omnisend-create-product\",\n name: \"Create Product\",\n description: \"Tool to create a new product in the Omnisend product catalog. Use when adding products for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//#region src/actions/create-product.d.ts
|
|
4
|
+
declare const OmnisendCreateProductInput: z.ZodTypeAny;
|
|
5
|
+
declare const OmnisendCreateProductOutput: z.ZodTypeAny;
|
|
6
|
+
declare const omnisendCreateProduct: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { omnisendCreateProduct };
|
|
9
|
+
//# sourceMappingURL=create-product.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-product.d.cts","names":[],"sources":["../../src/actions/create-product.ts"],"mappings":";;;cAIa,0BAAA,EAA4B,CAAA,CAAE,UA2BsB;AAAA,cACpD,2BAAA,EAA6B,CAAA,CAAE,UAEY;AAAA,cAE3C,qBAAA,gCAAqB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|