@keystrokehq/optimoroute 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/create-or-update-orders.cjs +4 -4
- package/dist/actions/create-or-update-orders.cjs.map +1 -1
- package/dist/actions/create-or-update-orders.d.cts +6 -4
- package/dist/actions/create-or-update-orders.d.cts.map +1 -1
- package/dist/actions/create-or-update-orders.d.mts +6 -4
- package/dist/actions/create-or-update-orders.d.mts.map +1 -1
- package/dist/actions/create-or-update-orders.mjs +4 -4
- package/dist/actions/create-or-update-orders.mjs.map +1 -1
- package/dist/actions/create-order.cjs +3 -3
- package/dist/actions/create-order.cjs.map +1 -1
- package/dist/actions/create-order.d.cts +4 -3
- package/dist/actions/create-order.d.cts.map +1 -1
- package/dist/actions/create-order.d.mts +4 -3
- package/dist/actions/create-order.d.mts.map +1 -1
- package/dist/actions/create-order.mjs +3 -3
- package/dist/actions/create-order.mjs.map +1 -1
- package/dist/actions/delete-all-orders.cjs +1 -1
- package/dist/actions/delete-all-orders.cjs.map +1 -1
- package/dist/actions/delete-all-orders.d.cts +1 -1
- package/dist/actions/delete-all-orders.d.mts +1 -1
- package/dist/actions/delete-all-orders.mjs +1 -1
- package/dist/actions/delete-all-orders.mjs.map +1 -1
- package/dist/actions/delete-order.cjs +1 -1
- package/dist/actions/delete-order.cjs.map +1 -1
- package/dist/actions/delete-order.d.cts +1 -1
- package/dist/actions/delete-order.d.mts +1 -1
- package/dist/actions/delete-order.mjs +1 -1
- package/dist/actions/delete-order.mjs.map +1 -1
- package/dist/actions/delete-orders.cjs +3 -3
- package/dist/actions/delete-orders.cjs.map +1 -1
- package/dist/actions/delete-orders.d.cts +4 -3
- package/dist/actions/delete-orders.d.mts +4 -3
- package/dist/actions/delete-orders.mjs +3 -3
- package/dist/actions/delete-orders.mjs.map +1 -1
- package/dist/actions/get-completion-details.cjs +6 -6
- package/dist/actions/get-completion-details.cjs.map +1 -1
- package/dist/actions/get-completion-details.d.cts +8 -7
- package/dist/actions/get-completion-details.d.mts +8 -7
- package/dist/actions/get-completion-details.mjs +6 -6
- package/dist/actions/get-completion-details.mjs.map +1 -1
- package/dist/actions/get-drivers.cjs +2 -2
- package/dist/actions/get-drivers.cjs.map +1 -1
- package/dist/actions/get-drivers.d.cts +2 -2
- package/dist/actions/get-drivers.d.mts +2 -2
- package/dist/actions/get-drivers.mjs +2 -2
- package/dist/actions/get-drivers.mjs.map +1 -1
- package/dist/actions/get-events.cjs +3 -3
- package/dist/actions/get-events.cjs.map +1 -1
- package/dist/actions/get-events.d.cts +3 -3
- package/dist/actions/get-events.d.mts +3 -3
- package/dist/actions/get-events.mjs +3 -3
- package/dist/actions/get-events.mjs.map +1 -1
- package/dist/actions/get-orders.cjs +9 -9
- package/dist/actions/get-orders.cjs.map +1 -1
- package/dist/actions/get-orders.d.cts +10 -9
- package/dist/actions/get-orders.d.mts +10 -9
- package/dist/actions/get-orders.mjs +9 -9
- package/dist/actions/get-orders.mjs.map +1 -1
- package/dist/actions/get-planning-status.cjs +1 -1
- package/dist/actions/get-planning-status.cjs.map +1 -1
- package/dist/actions/get-planning-status.d.cts +1 -1
- package/dist/actions/get-planning-status.d.mts +1 -1
- package/dist/actions/get-planning-status.mjs +1 -1
- package/dist/actions/get-planning-status.mjs.map +1 -1
- package/dist/actions/get-routes.cjs +4 -4
- package/dist/actions/get-routes.cjs.map +1 -1
- package/dist/actions/get-routes.d.cts +5 -5
- package/dist/actions/get-routes.d.mts +5 -5
- package/dist/actions/get-routes.mjs +4 -4
- package/dist/actions/get-routes.mjs.map +1 -1
- package/dist/actions/get-scheduling-info.cjs +2 -2
- package/dist/actions/get-scheduling-info.cjs.map +1 -1
- package/dist/actions/get-scheduling-info.d.cts +2 -2
- package/dist/actions/get-scheduling-info.d.mts +2 -2
- package/dist/actions/get-scheduling-info.mjs +2 -2
- package/dist/actions/get-scheduling-info.mjs.map +1 -1
- package/dist/actions/search-orders.cjs +6 -6
- package/dist/actions/search-orders.cjs.map +1 -1
- package/dist/actions/search-orders.d.cts +7 -6
- package/dist/actions/search-orders.d.mts +7 -6
- package/dist/actions/search-orders.mjs +6 -6
- package/dist/actions/search-orders.mjs.map +1 -1
- package/dist/actions/start-planning.cjs +3 -3
- package/dist/actions/start-planning.cjs.map +1 -1
- package/dist/actions/start-planning.d.cts +5 -3
- package/dist/actions/start-planning.d.mts +5 -3
- package/dist/actions/start-planning.mjs +3 -3
- package/dist/actions/start-planning.mjs.map +1 -1
- package/dist/actions/stop-planning.cjs +1 -1
- package/dist/actions/stop-planning.cjs.map +1 -1
- package/dist/actions/stop-planning.d.cts +1 -1
- package/dist/actions/stop-planning.d.mts +1 -1
- package/dist/actions/stop-planning.mjs +1 -1
- package/dist/actions/stop-planning.mjs.map +1 -1
- package/dist/actions/update-driver-parameters.cjs +1 -1
- package/dist/actions/update-driver-parameters.cjs.map +1 -1
- package/dist/actions/update-driver-parameters.d.cts +1 -1
- package/dist/actions/update-driver-parameters.d.mts +1 -1
- package/dist/actions/update-driver-parameters.mjs +1 -1
- package/dist/actions/update-driver-parameters.mjs.map +1 -1
- package/dist/actions/update-drivers-parameters.cjs +4 -4
- package/dist/actions/update-drivers-parameters.cjs.map +1 -1
- package/dist/actions/update-drivers-parameters.d.cts +5 -4
- package/dist/actions/update-drivers-parameters.d.mts +5 -4
- package/dist/actions/update-drivers-parameters.mjs +4 -4
- package/dist/actions/update-drivers-parameters.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -47,7 +47,7 @@ const OptimorouteCreateOrUpdateOrdersInput = zod.z.object({ orders: zod.z.array(
|
|
|
47
47
|
timeWindows: zod.z.array(zod.z.object({
|
|
48
48
|
twTo: zod.z.string().describe("Time window end in HH:MM format (24-hour)"),
|
|
49
49
|
twFrom: zod.z.string().describe("Time window start in HH:MM format (24-hour)")
|
|
50
|
-
}).describe("Time window constraint for order scheduling.")).describe("List of time window constraints for delivery/pickup").optional(),
|
|
50
|
+
}).passthrough().describe("Time window constraint for order scheduling.")).describe("List of time window constraints for delivery/pickup").optional(),
|
|
51
51
|
allowedDates: zod.z.object({
|
|
52
52
|
to: zod.z.string().describe("Date range end in YYYY-MM-DD format"),
|
|
53
53
|
from: zod.z.string().describe("Date range start in YYYY-MM-DD format")
|
|
@@ -76,7 +76,7 @@ const OptimorouteCreateOrUpdateOrdersInput = zod.z.object({ orders: zod.z.array(
|
|
|
76
76
|
"sms",
|
|
77
77
|
"both"
|
|
78
78
|
]).describe("Notification method preference").optional()
|
|
79
|
-
}).describe("Input parameters for creating or updating an order.")).describe("Array of orders to create or update. Maximum 500 orders per request.") }).describe("Request parameters for bulk creating or updating orders.");
|
|
79
|
+
}).passthrough().describe("Input parameters for creating or updating an order.")).describe("Array of orders to create or update. Maximum 500 orders per request.") }).describe("Request parameters for bulk creating or updating orders.");
|
|
80
80
|
const OptimorouteCreateOrUpdateOrders_OrderResultSchema = zod.z.object({
|
|
81
81
|
id: zod.z.string().describe("OptimoRoute-assigned unique order identifier").nullable().optional(),
|
|
82
82
|
code: zod.z.string().describe("Error code if operation failed (e.g., 'ERR_ORD_EXISTS', 'ERR_LOC_NOT_VALID', 'ERR_DRV_NOT_EXISTS')").nullable().optional(),
|
|
@@ -84,11 +84,11 @@ const OptimorouteCreateOrUpdateOrders_OrderResultSchema = zod.z.object({
|
|
|
84
84
|
orderNo: zod.z.string().describe("User-specified order identifier").nullable().optional(),
|
|
85
85
|
success: zod.z.boolean().describe("Operation success status for this specific order").nullable(),
|
|
86
86
|
locationNo: zod.z.string().describe("Location reference number if location was created or updated").nullable().optional()
|
|
87
|
-
}).describe("Result for a single order operation.");
|
|
87
|
+
}).passthrough().describe("Result for a single order operation.");
|
|
88
88
|
const OptimorouteCreateOrUpdateOrdersOutput = zod.z.object({
|
|
89
89
|
orders: zod.z.array(OptimorouteCreateOrUpdateOrders_OrderResultSchema).describe("Results for each order operation, in the same order as the request"),
|
|
90
90
|
success: zod.z.boolean().describe("True if at least one order operation succeeded, false if all failed").nullable()
|
|
91
|
-
}).describe("Response schema for bulk order operations.");
|
|
91
|
+
}).passthrough().describe("Response schema for bulk order operations.");
|
|
92
92
|
const optimorouteCreateOrUpdateOrders = require_action.action("OPTIMOROUTE_CREATE_OR_UPDATE_ORDERS", {
|
|
93
93
|
slug: "optimoroute-create-or-update-orders",
|
|
94
94
|
name: "Create or Update Orders",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-or-update-orders.cjs","names":["z","action"],"sources":["../../src/actions/create-or-update-orders.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OptimorouteCreateOrUpdateOrdersInput = z.object({\n orders: z.array(z.object({\n id: z.string().describe(\"OptimoRoute-assigned unique identifier. Required if 'orderNo' not provided. Use this to update existing orders.\").optional(),\n date: z.string().describe(\"Order date in YYYY-MM-DD format. Required for new orders.\").optional(),\n type: z.enum([\"D\", \"P\", \"T\"]).describe(\"Order type. Required for new orders. 'D' for delivery, 'P' for pickup, 'T' for task.\").optional(),\n email: z.string().describe(\"Customer email address for notifications\").optional(),\n load1: z.number().describe(\"Load requirement 1 (e.g., weight, volume). Default is 0.\").optional(),\n load2: z.number().describe(\"Load requirement 2. Default is 0.\").optional(),\n load3: z.number().describe(\"Load requirement 3. Default is 0.\").optional(),\n load4: z.number().describe(\"Load requirement 4. Default is 0.\").optional(),\n notes: z.string().describe(\"Free-form order instructions and notes\").optional(),\n phone: z.string().describe(\"Customer phone number for notifications\").optional(),\n skills: z.array(z.string()).describe(\"Required driver skill codes\").optional(),\n orderNo: z.string().describe(\"User-specified order identifier. Required if 'id' not provided. Must be unique unless acceptDuplicateOrderNo is true.\").optional(),\n duration: z.number().describe(\"Service time in minutes\").optional(),\n location: z.object({\n notes: z.string().describe(\"Location-specific notes or instructions\").optional(),\n address: z.string().describe(\"Street address of the location\").optional(),\n latitude: z.number().describe(\"GPS latitude coordinate. Required for new locations without locationNo.\").optional(),\n longitude: z.number().describe(\"GPS longitude coordinate. Required for new locations without locationNo.\").optional(),\n locationNo: z.string().describe(\"Reference to existing location identifier\").optional(),\n checkInTime: z.number().int().describe(\"Check-in time in seconds\").optional(),\n locationName: z.string().describe(\"Name of the location\").optional(),\n}).describe(\"Location details for an order.\").optional(),\n priority: z.enum([\"L\", \"M\", \"H\", \"C\"]).describe(\"Priority level: 'L' (low), 'M' (medium), 'H' (high), 'C' (critical). Default is 'M'.\").optional(),\n operation: z.enum([\"CREATE\", \"UPDATE\", \"SYNC\", \"MERGE\"]).describe(\"Operation mode: 'CREATE' (only new), 'UPDATE' (only existing), 'SYNC' (replace), 'MERGE' (create or update)\").optional(),\n assignedTo: z.object({\n serial: z.string().describe(\"Driver's serial number\").optional(),\n externalId: z.string().describe(\"Driver's external identifier\").optional(),\n}).describe(\"Driver assignment details.\").optional(),\n timeWindows: z.array(z.object({\n twTo: z.string().describe(\"Time window end in HH:MM format (24-hour)\"),\n twFrom: z.string().describe(\"Time window start in HH:MM format (24-hour)\"),\n}).describe(\"Time window constraint for order scheduling.\")).describe(\"List of time window constraints for delivery/pickup\").optional(),\n allowedDates: z.object({\n to: z.string().describe(\"Date range end in YYYY-MM-DD format\"),\n from: z.string().describe(\"Date range start in YYYY-MM-DD format\"),\n}).describe(\"Date range for allowed scheduling.\").optional(),\n customField1: z.string().describe(\"Legacy custom field 1\").optional(),\n customField2: z.string().describe(\"Legacy custom field 2\").optional(),\n customField3: z.string().describe(\"Legacy custom field 3\").optional(),\n customField4: z.string().describe(\"Legacy custom field 4\").optional(),\n customField5: z.string().describe(\"Legacy custom field 5\").optional(),\n customFields: z.record(z.string(), z.unknown()).describe(\"Key-value pairs for configured custom fields\").optional(),\n allowedWeekdays: z.array(z.enum([\"mon\", \"tue\", \"wed\", \"thu\", \"fri\", \"sat\", \"sun\"])).describe(\"Days of week when order can be scheduled\").optional(),\n vehicleFeatures: z.array(z.string()).describe(\"Required vehicle feature codes\").optional(),\n allowedDateTimes: z.array(z.record(z.string(), z.unknown())).describe(\"Array of allowed datetime window objects for more granular scheduling constraints\").optional(),\n acceptDuplicateOrderNo: z.boolean().describe(\"Allow duplicate order numbers\").optional(),\n notificationPreference: z.enum([\"dont_notify\", \"email\", \"sms\", \"both\"]).describe(\"Notification method preference\").optional(),\n}).describe(\"Input parameters for creating or updating an order.\")).describe(\"Array of orders to create or update. Maximum 500 orders per request.\"),\n}).describe(\"Request parameters for bulk creating or updating orders.\");\nconst OptimorouteCreateOrUpdateOrders_OrderResultSchema = z.object({\n id: z.string().describe(\"OptimoRoute-assigned unique order identifier\").nullable().optional(),\n code: z.string().describe(\"Error code if operation failed (e.g., 'ERR_ORD_EXISTS', 'ERR_LOC_NOT_VALID', 'ERR_DRV_NOT_EXISTS')\").nullable().optional(),\n message: z.string().describe(\"Human-readable error or warning description\").nullable().optional(),\n orderNo: z.string().describe(\"User-specified order identifier\").nullable().optional(),\n success: z.boolean().describe(\"Operation success status for this specific order\").nullable(),\n locationNo: z.string().describe(\"Location reference number if location was created or updated\").nullable().optional(),\n}).describe(\"Result for a single order operation.\");\nexport const OptimorouteCreateOrUpdateOrdersOutput = z.object({\n orders: z.array(OptimorouteCreateOrUpdateOrders_OrderResultSchema).describe(\"Results for each order operation, in the same order as the request\"),\n success: z.boolean().describe(\"True if at least one order operation succeeded, false if all failed\").nullable(),\n}).describe(\"Response schema for bulk order operations.\");\n\nexport const optimorouteCreateOrUpdateOrders = action(\"OPTIMOROUTE_CREATE_OR_UPDATE_ORDERS\", {\n slug: \"optimoroute-create-or-update-orders\",\n name: \"Create or Update Orders\",\n description: \"Tool to bulk create, update, or replace multiple orders at once without geocoding. Use when you need to add new orders or modify existing ones efficiently. Supports up to 500 orders per request.\",\n input: OptimorouteCreateOrUpdateOrdersInput,\n output: OptimorouteCreateOrUpdateOrdersOutput,\n});\n"],"mappings":";;;AAIA,MAAa,uCAAuCA,IAAAA,EAAE,OAAO,EAC3D,QAAQA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;CACzB,IAAIA,IAAA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or-update-orders.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OptimorouteCreateOrUpdateOrdersInput = z.object({\n orders: z.array(z.object({\n id: z.string().describe(\"OptimoRoute-assigned unique identifier. Required if 'orderNo' not provided. Use this to update existing orders.\").optional(),\n date: z.string().describe(\"Order date in YYYY-MM-DD format. Required for new orders.\").optional(),\n type: z.enum([\"D\", \"P\", \"T\"]).describe(\"Order type. Required for new orders. 'D' for delivery, 'P' for pickup, 'T' for task.\").optional(),\n email: z.string().describe(\"Customer email address for notifications\").optional(),\n load1: z.number().describe(\"Load requirement 1 (e.g., weight, volume). Default is 0.\").optional(),\n load2: z.number().describe(\"Load requirement 2. Default is 0.\").optional(),\n load3: z.number().describe(\"Load requirement 3. Default is 0.\").optional(),\n load4: z.number().describe(\"Load requirement 4. Default is 0.\").optional(),\n notes: z.string().describe(\"Free-form order instructions and notes\").optional(),\n phone: z.string().describe(\"Customer phone number for notifications\").optional(),\n skills: z.array(z.string()).describe(\"Required driver skill codes\").optional(),\n orderNo: z.string().describe(\"User-specified order identifier. Required if 'id' not provided. Must be unique unless acceptDuplicateOrderNo is true.\").optional(),\n duration: z.number().describe(\"Service time in minutes\").optional(),\n location: z.object({\n notes: z.string().describe(\"Location-specific notes or instructions\").optional(),\n address: z.string().describe(\"Street address of the location\").optional(),\n latitude: z.number().describe(\"GPS latitude coordinate. Required for new locations without locationNo.\").optional(),\n longitude: z.number().describe(\"GPS longitude coordinate. Required for new locations without locationNo.\").optional(),\n locationNo: z.string().describe(\"Reference to existing location identifier\").optional(),\n checkInTime: z.number().int().describe(\"Check-in time in seconds\").optional(),\n locationName: z.string().describe(\"Name of the location\").optional(),\n}).describe(\"Location details for an order.\").optional(),\n priority: z.enum([\"L\", \"M\", \"H\", \"C\"]).describe(\"Priority level: 'L' (low), 'M' (medium), 'H' (high), 'C' (critical). Default is 'M'.\").optional(),\n operation: z.enum([\"CREATE\", \"UPDATE\", \"SYNC\", \"MERGE\"]).describe(\"Operation mode: 'CREATE' (only new), 'UPDATE' (only existing), 'SYNC' (replace), 'MERGE' (create or update)\").optional(),\n assignedTo: z.object({\n serial: z.string().describe(\"Driver's serial number\").optional(),\n externalId: z.string().describe(\"Driver's external identifier\").optional(),\n}).describe(\"Driver assignment details.\").optional(),\n timeWindows: z.array(z.object({\n twTo: z.string().describe(\"Time window end in HH:MM format (24-hour)\"),\n twFrom: z.string().describe(\"Time window start in HH:MM format (24-hour)\"),\n}).passthrough().describe(\"Time window constraint for order scheduling.\")).describe(\"List of time window constraints for delivery/pickup\").optional(),\n allowedDates: z.object({\n to: z.string().describe(\"Date range end in YYYY-MM-DD format\"),\n from: z.string().describe(\"Date range start in YYYY-MM-DD format\"),\n}).describe(\"Date range for allowed scheduling.\").optional(),\n customField1: z.string().describe(\"Legacy custom field 1\").optional(),\n customField2: z.string().describe(\"Legacy custom field 2\").optional(),\n customField3: z.string().describe(\"Legacy custom field 3\").optional(),\n customField4: z.string().describe(\"Legacy custom field 4\").optional(),\n customField5: z.string().describe(\"Legacy custom field 5\").optional(),\n customFields: z.record(z.string(), z.unknown()).describe(\"Key-value pairs for configured custom fields\").optional(),\n allowedWeekdays: z.array(z.enum([\"mon\", \"tue\", \"wed\", \"thu\", \"fri\", \"sat\", \"sun\"])).describe(\"Days of week when order can be scheduled\").optional(),\n vehicleFeatures: z.array(z.string()).describe(\"Required vehicle feature codes\").optional(),\n allowedDateTimes: z.array(z.record(z.string(), z.unknown())).describe(\"Array of allowed datetime window objects for more granular scheduling constraints\").optional(),\n acceptDuplicateOrderNo: z.boolean().describe(\"Allow duplicate order numbers\").optional(),\n notificationPreference: z.enum([\"dont_notify\", \"email\", \"sms\", \"both\"]).describe(\"Notification method preference\").optional(),\n}).passthrough().describe(\"Input parameters for creating or updating an order.\")).describe(\"Array of orders to create or update. Maximum 500 orders per request.\"),\n}).describe(\"Request parameters for bulk creating or updating orders.\");\nconst OptimorouteCreateOrUpdateOrders_OrderResultSchema = z.object({\n id: z.string().describe(\"OptimoRoute-assigned unique order identifier\").nullable().optional(),\n code: z.string().describe(\"Error code if operation failed (e.g., 'ERR_ORD_EXISTS', 'ERR_LOC_NOT_VALID', 'ERR_DRV_NOT_EXISTS')\").nullable().optional(),\n message: z.string().describe(\"Human-readable error or warning description\").nullable().optional(),\n orderNo: z.string().describe(\"User-specified order identifier\").nullable().optional(),\n success: z.boolean().describe(\"Operation success status for this specific order\").nullable(),\n locationNo: z.string().describe(\"Location reference number if location was created or updated\").nullable().optional(),\n}).passthrough().describe(\"Result for a single order operation.\");\nexport const OptimorouteCreateOrUpdateOrdersOutput = z.object({\n orders: z.array(OptimorouteCreateOrUpdateOrders_OrderResultSchema).describe(\"Results for each order operation, in the same order as the request\"),\n success: z.boolean().describe(\"True if at least one order operation succeeded, false if all failed\").nullable(),\n}).passthrough().describe(\"Response schema for bulk order operations.\");\n\nexport const optimorouteCreateOrUpdateOrders = action(\"OPTIMOROUTE_CREATE_OR_UPDATE_ORDERS\", {\n slug: \"optimoroute-create-or-update-orders\",\n name: \"Create or Update Orders\",\n description: \"Tool to bulk create, update, or replace multiple orders at once without geocoding. Use when you need to add new orders or modify existing ones efficiently. Supports up to 500 orders per request.\",\n input: OptimorouteCreateOrUpdateOrdersInput,\n output: OptimorouteCreateOrUpdateOrdersOutput,\n});\n"],"mappings":";;;AAIA,MAAa,uCAAuCA,IAAAA,EAAE,OAAO,EAC3D,QAAQA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;CACzB,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iHAAiH,CAAC,CAAC,SAAS;CACpJ,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2DAA2D,CAAC,CAAC,SAAS;CAChG,MAAMA,IAAAA,EAAE,KAAK;EAAC;EAAK;EAAK;CAAG,CAAC,CAAC,CAAC,SAAS,sFAAsF,CAAC,CAAC,SAAS;CACxI,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAA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AE,OAAO,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC5F,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oGAAoG,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpJ,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChG,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpF,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS;CAC3F,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACtH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,sCAAsC;AAChE,MAAa,wCAAwCA,IAAAA,EAAE,OAAO;CAC5D,QAAQA,IAAAA,EAAE,MAAM,iDAAiD,CAAC,CAAC,SAAS,oEAAoE;CAChJ,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,qEAAqE,CAAC,CAAC,SAAS;AAChH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,4CAA4C;AAEtE,MAAa,kCAAkCC,eAAAA,OAAO,uCAAuC;CAC3F,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -48,7 +48,7 @@ declare const OptimorouteCreateOrUpdateOrdersInput: z.ZodObject<{
|
|
|
48
48
|
timeWindows: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
49
49
|
twTo: z.ZodString;
|
|
50
50
|
twFrom: z.ZodString;
|
|
51
|
-
}, z.core.$
|
|
51
|
+
}, z.core.$loose>>>;
|
|
52
52
|
allowedDates: z.ZodOptional<z.ZodObject<{
|
|
53
53
|
to: z.ZodString;
|
|
54
54
|
from: z.ZodString;
|
|
@@ -77,7 +77,7 @@ declare const OptimorouteCreateOrUpdateOrdersInput: z.ZodObject<{
|
|
|
77
77
|
sms: "sms";
|
|
78
78
|
both: "both";
|
|
79
79
|
}>>;
|
|
80
|
-
}, z.core.$
|
|
80
|
+
}, z.core.$loose>>;
|
|
81
81
|
}, z.core.$strip>;
|
|
82
82
|
declare const OptimorouteCreateOrUpdateOrdersOutput: z.ZodObject<{
|
|
83
83
|
orders: z.ZodArray<z.ZodObject<{
|
|
@@ -87,11 +87,12 @@ declare const OptimorouteCreateOrUpdateOrdersOutput: z.ZodObject<{
|
|
|
87
87
|
orderNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
88
88
|
success: z.ZodNullable<z.ZodBoolean>;
|
|
89
89
|
locationNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
90
|
-
}, z.core.$
|
|
90
|
+
}, z.core.$loose>>;
|
|
91
91
|
success: z.ZodNullable<z.ZodBoolean>;
|
|
92
|
-
}, z.core.$
|
|
92
|
+
}, z.core.$loose>;
|
|
93
93
|
declare const optimorouteCreateOrUpdateOrders: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
94
94
|
orders: {
|
|
95
|
+
[x: string]: unknown;
|
|
95
96
|
id?: string | undefined;
|
|
96
97
|
date?: string | undefined;
|
|
97
98
|
type?: "D" | "P" | "T" | undefined;
|
|
@@ -121,6 +122,7 @@ declare const optimorouteCreateOrUpdateOrders: import("@keystrokehq/action").Wor
|
|
|
121
122
|
externalId?: string | undefined;
|
|
122
123
|
} | undefined;
|
|
123
124
|
timeWindows?: {
|
|
125
|
+
[x: string]: unknown;
|
|
124
126
|
twTo: string;
|
|
125
127
|
twFrom: string;
|
|
126
128
|
}[] | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-or-update-orders.d.cts","names":[],"sources":["../../src/actions/create-or-update-orders.ts"],"mappings":";;;cAIa,oCAAA,EAAoC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA2DpC,qCAAA,EAAqC,CAAA,CAAA,SAAA;;;;;;;;;;;cAKrC,+BAAA,gCAA+B,wBAAA
|
|
1
|
+
{"version":3,"file":"create-or-update-orders.d.cts","names":[],"sources":["../../src/actions/create-or-update-orders.ts"],"mappings":";;;cAIa,oCAAA,EAAoC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA2DpC,qCAAA,EAAqC,CAAA,CAAA,SAAA;;;;;;;;;;;cAKrC,+BAAA,gCAA+B,wBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAM1C,MAAA;;;uBAAA,MAAA"}
|
|
@@ -48,7 +48,7 @@ declare const OptimorouteCreateOrUpdateOrdersInput: z.ZodObject<{
|
|
|
48
48
|
timeWindows: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
49
49
|
twTo: z.ZodString;
|
|
50
50
|
twFrom: z.ZodString;
|
|
51
|
-
}, z.core.$
|
|
51
|
+
}, z.core.$loose>>>;
|
|
52
52
|
allowedDates: z.ZodOptional<z.ZodObject<{
|
|
53
53
|
to: z.ZodString;
|
|
54
54
|
from: z.ZodString;
|
|
@@ -77,7 +77,7 @@ declare const OptimorouteCreateOrUpdateOrdersInput: z.ZodObject<{
|
|
|
77
77
|
sms: "sms";
|
|
78
78
|
both: "both";
|
|
79
79
|
}>>;
|
|
80
|
-
}, z.core.$
|
|
80
|
+
}, z.core.$loose>>;
|
|
81
81
|
}, z.core.$strip>;
|
|
82
82
|
declare const OptimorouteCreateOrUpdateOrdersOutput: z.ZodObject<{
|
|
83
83
|
orders: z.ZodArray<z.ZodObject<{
|
|
@@ -87,11 +87,12 @@ declare const OptimorouteCreateOrUpdateOrdersOutput: z.ZodObject<{
|
|
|
87
87
|
orderNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
88
88
|
success: z.ZodNullable<z.ZodBoolean>;
|
|
89
89
|
locationNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
90
|
-
}, z.core.$
|
|
90
|
+
}, z.core.$loose>>;
|
|
91
91
|
success: z.ZodNullable<z.ZodBoolean>;
|
|
92
|
-
}, z.core.$
|
|
92
|
+
}, z.core.$loose>;
|
|
93
93
|
declare const optimorouteCreateOrUpdateOrders: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
94
94
|
orders: {
|
|
95
|
+
[x: string]: unknown;
|
|
95
96
|
id?: string | undefined;
|
|
96
97
|
date?: string | undefined;
|
|
97
98
|
type?: "D" | "P" | "T" | undefined;
|
|
@@ -121,6 +122,7 @@ declare const optimorouteCreateOrUpdateOrders: import("@keystrokehq/action").Wor
|
|
|
121
122
|
externalId?: string | undefined;
|
|
122
123
|
} | undefined;
|
|
123
124
|
timeWindows?: {
|
|
125
|
+
[x: string]: unknown;
|
|
124
126
|
twTo: string;
|
|
125
127
|
twFrom: string;
|
|
126
128
|
}[] | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-or-update-orders.d.mts","names":[],"sources":["../../src/actions/create-or-update-orders.ts"],"mappings":";;;cAIa,oCAAA,EAAoC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA2DpC,qCAAA,EAAqC,CAAA,CAAA,SAAA;;;;;;;;;;;cAKrC,+BAAA,gCAA+B,wBAAA
|
|
1
|
+
{"version":3,"file":"create-or-update-orders.d.mts","names":[],"sources":["../../src/actions/create-or-update-orders.ts"],"mappings":";;;cAIa,oCAAA,EAAoC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA2DpC,qCAAA,EAAqC,CAAA,CAAA,SAAA;;;;;;;;;;;cAKrC,+BAAA,gCAA+B,wBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAM1C,MAAA;;;uBAAA,MAAA"}
|
|
@@ -47,7 +47,7 @@ const OptimorouteCreateOrUpdateOrdersInput = z.object({ orders: z.array(z.object
|
|
|
47
47
|
timeWindows: z.array(z.object({
|
|
48
48
|
twTo: z.string().describe("Time window end in HH:MM format (24-hour)"),
|
|
49
49
|
twFrom: z.string().describe("Time window start in HH:MM format (24-hour)")
|
|
50
|
-
}).describe("Time window constraint for order scheduling.")).describe("List of time window constraints for delivery/pickup").optional(),
|
|
50
|
+
}).passthrough().describe("Time window constraint for order scheduling.")).describe("List of time window constraints for delivery/pickup").optional(),
|
|
51
51
|
allowedDates: z.object({
|
|
52
52
|
to: z.string().describe("Date range end in YYYY-MM-DD format"),
|
|
53
53
|
from: z.string().describe("Date range start in YYYY-MM-DD format")
|
|
@@ -76,7 +76,7 @@ const OptimorouteCreateOrUpdateOrdersInput = z.object({ orders: z.array(z.object
|
|
|
76
76
|
"sms",
|
|
77
77
|
"both"
|
|
78
78
|
]).describe("Notification method preference").optional()
|
|
79
|
-
}).describe("Input parameters for creating or updating an order.")).describe("Array of orders to create or update. Maximum 500 orders per request.") }).describe("Request parameters for bulk creating or updating orders.");
|
|
79
|
+
}).passthrough().describe("Input parameters for creating or updating an order.")).describe("Array of orders to create or update. Maximum 500 orders per request.") }).describe("Request parameters for bulk creating or updating orders.");
|
|
80
80
|
const OptimorouteCreateOrUpdateOrders_OrderResultSchema = z.object({
|
|
81
81
|
id: z.string().describe("OptimoRoute-assigned unique order identifier").nullable().optional(),
|
|
82
82
|
code: z.string().describe("Error code if operation failed (e.g., 'ERR_ORD_EXISTS', 'ERR_LOC_NOT_VALID', 'ERR_DRV_NOT_EXISTS')").nullable().optional(),
|
|
@@ -84,7 +84,7 @@ const OptimorouteCreateOrUpdateOrders_OrderResultSchema = z.object({
|
|
|
84
84
|
orderNo: z.string().describe("User-specified order identifier").nullable().optional(),
|
|
85
85
|
success: z.boolean().describe("Operation success status for this specific order").nullable(),
|
|
86
86
|
locationNo: z.string().describe("Location reference number if location was created or updated").nullable().optional()
|
|
87
|
-
}).describe("Result for a single order operation.");
|
|
87
|
+
}).passthrough().describe("Result for a single order operation.");
|
|
88
88
|
const optimorouteCreateOrUpdateOrders = action("OPTIMOROUTE_CREATE_OR_UPDATE_ORDERS", {
|
|
89
89
|
slug: "optimoroute-create-or-update-orders",
|
|
90
90
|
name: "Create or Update Orders",
|
|
@@ -93,7 +93,7 @@ const optimorouteCreateOrUpdateOrders = action("OPTIMOROUTE_CREATE_OR_UPDATE_ORD
|
|
|
93
93
|
output: z.object({
|
|
94
94
|
orders: z.array(OptimorouteCreateOrUpdateOrders_OrderResultSchema).describe("Results for each order operation, in the same order as the request"),
|
|
95
95
|
success: z.boolean().describe("True if at least one order operation succeeded, false if all failed").nullable()
|
|
96
|
-
}).describe("Response schema for bulk order operations.")
|
|
96
|
+
}).passthrough().describe("Response schema for bulk order operations.")
|
|
97
97
|
});
|
|
98
98
|
//#endregion
|
|
99
99
|
export { optimorouteCreateOrUpdateOrders };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-or-update-orders.mjs","names":[],"sources":["../../src/actions/create-or-update-orders.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OptimorouteCreateOrUpdateOrdersInput = z.object({\n orders: z.array(z.object({\n id: z.string().describe(\"OptimoRoute-assigned unique identifier. Required if 'orderNo' not provided. Use this to update existing orders.\").optional(),\n date: z.string().describe(\"Order date in YYYY-MM-DD format. Required for new orders.\").optional(),\n type: z.enum([\"D\", \"P\", \"T\"]).describe(\"Order type. Required for new orders. 'D' for delivery, 'P' for pickup, 'T' for task.\").optional(),\n email: z.string().describe(\"Customer email address for notifications\").optional(),\n load1: z.number().describe(\"Load requirement 1 (e.g., weight, volume). Default is 0.\").optional(),\n load2: z.number().describe(\"Load requirement 2. Default is 0.\").optional(),\n load3: z.number().describe(\"Load requirement 3. Default is 0.\").optional(),\n load4: z.number().describe(\"Load requirement 4. Default is 0.\").optional(),\n notes: z.string().describe(\"Free-form order instructions and notes\").optional(),\n phone: z.string().describe(\"Customer phone number for notifications\").optional(),\n skills: z.array(z.string()).describe(\"Required driver skill codes\").optional(),\n orderNo: z.string().describe(\"User-specified order identifier. Required if 'id' not provided. Must be unique unless acceptDuplicateOrderNo is true.\").optional(),\n duration: z.number().describe(\"Service time in minutes\").optional(),\n location: z.object({\n notes: z.string().describe(\"Location-specific notes or instructions\").optional(),\n address: z.string().describe(\"Street address of the location\").optional(),\n latitude: z.number().describe(\"GPS latitude coordinate. Required for new locations without locationNo.\").optional(),\n longitude: z.number().describe(\"GPS longitude coordinate. Required for new locations without locationNo.\").optional(),\n locationNo: z.string().describe(\"Reference to existing location identifier\").optional(),\n checkInTime: z.number().int().describe(\"Check-in time in seconds\").optional(),\n locationName: z.string().describe(\"Name of the location\").optional(),\n}).describe(\"Location details for an order.\").optional(),\n priority: z.enum([\"L\", \"M\", \"H\", \"C\"]).describe(\"Priority level: 'L' (low), 'M' (medium), 'H' (high), 'C' (critical). Default is 'M'.\").optional(),\n operation: z.enum([\"CREATE\", \"UPDATE\", \"SYNC\", \"MERGE\"]).describe(\"Operation mode: 'CREATE' (only new), 'UPDATE' (only existing), 'SYNC' (replace), 'MERGE' (create or update)\").optional(),\n assignedTo: z.object({\n serial: z.string().describe(\"Driver's serial number\").optional(),\n externalId: z.string().describe(\"Driver's external identifier\").optional(),\n}).describe(\"Driver assignment details.\").optional(),\n timeWindows: z.array(z.object({\n twTo: z.string().describe(\"Time window end in HH:MM format (24-hour)\"),\n twFrom: z.string().describe(\"Time window start in HH:MM format (24-hour)\"),\n}).describe(\"Time window constraint for order scheduling.\")).describe(\"List of time window constraints for delivery/pickup\").optional(),\n allowedDates: z.object({\n to: z.string().describe(\"Date range end in YYYY-MM-DD format\"),\n from: z.string().describe(\"Date range start in YYYY-MM-DD format\"),\n}).describe(\"Date range for allowed scheduling.\").optional(),\n customField1: z.string().describe(\"Legacy custom field 1\").optional(),\n customField2: z.string().describe(\"Legacy custom field 2\").optional(),\n customField3: z.string().describe(\"Legacy custom field 3\").optional(),\n customField4: z.string().describe(\"Legacy custom field 4\").optional(),\n customField5: z.string().describe(\"Legacy custom field 5\").optional(),\n customFields: z.record(z.string(), z.unknown()).describe(\"Key-value pairs for configured custom fields\").optional(),\n allowedWeekdays: z.array(z.enum([\"mon\", \"tue\", \"wed\", \"thu\", \"fri\", \"sat\", \"sun\"])).describe(\"Days of week when order can be scheduled\").optional(),\n vehicleFeatures: z.array(z.string()).describe(\"Required vehicle feature codes\").optional(),\n allowedDateTimes: z.array(z.record(z.string(), z.unknown())).describe(\"Array of allowed datetime window objects for more granular scheduling constraints\").optional(),\n acceptDuplicateOrderNo: z.boolean().describe(\"Allow duplicate order numbers\").optional(),\n notificationPreference: z.enum([\"dont_notify\", \"email\", \"sms\", \"both\"]).describe(\"Notification method preference\").optional(),\n}).describe(\"Input parameters for creating or updating an order.\")).describe(\"Array of orders to create or update. Maximum 500 orders per request.\"),\n}).describe(\"Request parameters for bulk creating or updating orders.\");\nconst OptimorouteCreateOrUpdateOrders_OrderResultSchema = z.object({\n id: z.string().describe(\"OptimoRoute-assigned unique order identifier\").nullable().optional(),\n code: z.string().describe(\"Error code if operation failed (e.g., 'ERR_ORD_EXISTS', 'ERR_LOC_NOT_VALID', 'ERR_DRV_NOT_EXISTS')\").nullable().optional(),\n message: z.string().describe(\"Human-readable error or warning description\").nullable().optional(),\n orderNo: z.string().describe(\"User-specified order identifier\").nullable().optional(),\n success: z.boolean().describe(\"Operation success status for this specific order\").nullable(),\n locationNo: z.string().describe(\"Location reference number if location was created or updated\").nullable().optional(),\n}).describe(\"Result for a single order operation.\");\nexport const OptimorouteCreateOrUpdateOrdersOutput = z.object({\n orders: z.array(OptimorouteCreateOrUpdateOrders_OrderResultSchema).describe(\"Results for each order operation, in the same order as the request\"),\n success: z.boolean().describe(\"True if at least one order operation succeeded, false if all failed\").nullable(),\n}).describe(\"Response schema for bulk order operations.\");\n\nexport const optimorouteCreateOrUpdateOrders = action(\"OPTIMOROUTE_CREATE_OR_UPDATE_ORDERS\", {\n slug: \"optimoroute-create-or-update-orders\",\n name: \"Create or Update Orders\",\n description: \"Tool to bulk create, update, or replace multiple orders at once without geocoding. Use when you need to add new orders or modify existing ones efficiently. Supports up to 500 orders per request.\",\n input: OptimorouteCreateOrUpdateOrdersInput,\n output: OptimorouteCreateOrUpdateOrdersOutput,\n});\n"],"mappings":";;;AAIA,MAAa,uCAAuC,EAAE,OAAO,EAC3D,QAAQ,EAAE,MAAM,EAAE,OAAO;CACzB,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,iHAAiH,CAAC,CAAC,SAAS;CACpJ,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,2DAA2D,CAAC,CAAC,SAAS;CAChG,MAAM,EAAE,KAAK;EAAC;EAAK;EAAK;CAAG,CAAC,CAAC,CAAC,SAAS,sFAAsF,CAAC,CAAC,SAAS;CACxI,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS;CAChF,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,SAAS;CAChG,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;CACzE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;CACzE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;CACzE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;CAC9E,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAA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create-or-update-orders.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OptimorouteCreateOrUpdateOrdersInput = z.object({\n orders: z.array(z.object({\n id: z.string().describe(\"OptimoRoute-assigned unique identifier. Required if 'orderNo' not provided. Use this to update existing orders.\").optional(),\n date: z.string().describe(\"Order date in YYYY-MM-DD format. Required for new orders.\").optional(),\n type: z.enum([\"D\", \"P\", \"T\"]).describe(\"Order type. Required for new orders. 'D' for delivery, 'P' for pickup, 'T' for task.\").optional(),\n email: z.string().describe(\"Customer email address for notifications\").optional(),\n load1: z.number().describe(\"Load requirement 1 (e.g., weight, volume). Default is 0.\").optional(),\n load2: z.number().describe(\"Load requirement 2. Default is 0.\").optional(),\n load3: z.number().describe(\"Load requirement 3. Default is 0.\").optional(),\n load4: z.number().describe(\"Load requirement 4. Default is 0.\").optional(),\n notes: z.string().describe(\"Free-form order instructions and notes\").optional(),\n phone: z.string().describe(\"Customer phone number for notifications\").optional(),\n skills: z.array(z.string()).describe(\"Required driver skill codes\").optional(),\n orderNo: z.string().describe(\"User-specified order identifier. Required if 'id' not provided. Must be unique unless acceptDuplicateOrderNo is true.\").optional(),\n duration: z.number().describe(\"Service time in minutes\").optional(),\n location: z.object({\n notes: z.string().describe(\"Location-specific notes or instructions\").optional(),\n address: z.string().describe(\"Street address of the location\").optional(),\n latitude: z.number().describe(\"GPS latitude coordinate. Required for new locations without locationNo.\").optional(),\n longitude: z.number().describe(\"GPS longitude coordinate. Required for new locations without locationNo.\").optional(),\n locationNo: z.string().describe(\"Reference to existing location identifier\").optional(),\n checkInTime: z.number().int().describe(\"Check-in time in seconds\").optional(),\n locationName: z.string().describe(\"Name of the location\").optional(),\n}).describe(\"Location details for an order.\").optional(),\n priority: z.enum([\"L\", \"M\", \"H\", \"C\"]).describe(\"Priority level: 'L' (low), 'M' (medium), 'H' (high), 'C' (critical). Default is 'M'.\").optional(),\n operation: z.enum([\"CREATE\", \"UPDATE\", \"SYNC\", \"MERGE\"]).describe(\"Operation mode: 'CREATE' (only new), 'UPDATE' (only existing), 'SYNC' (replace), 'MERGE' (create or update)\").optional(),\n assignedTo: z.object({\n serial: z.string().describe(\"Driver's serial number\").optional(),\n externalId: z.string().describe(\"Driver's external identifier\").optional(),\n}).describe(\"Driver assignment details.\").optional(),\n timeWindows: z.array(z.object({\n twTo: z.string().describe(\"Time window end in HH:MM format (24-hour)\"),\n twFrom: z.string().describe(\"Time window start in HH:MM format (24-hour)\"),\n}).passthrough().describe(\"Time window constraint for order scheduling.\")).describe(\"List of time window constraints for delivery/pickup\").optional(),\n allowedDates: z.object({\n to: z.string().describe(\"Date range end in YYYY-MM-DD format\"),\n from: z.string().describe(\"Date range start in YYYY-MM-DD format\"),\n}).describe(\"Date range for allowed scheduling.\").optional(),\n customField1: z.string().describe(\"Legacy custom field 1\").optional(),\n customField2: z.string().describe(\"Legacy custom field 2\").optional(),\n customField3: z.string().describe(\"Legacy custom field 3\").optional(),\n customField4: z.string().describe(\"Legacy custom field 4\").optional(),\n customField5: z.string().describe(\"Legacy custom field 5\").optional(),\n customFields: z.record(z.string(), z.unknown()).describe(\"Key-value pairs for configured custom fields\").optional(),\n allowedWeekdays: z.array(z.enum([\"mon\", \"tue\", \"wed\", \"thu\", \"fri\", \"sat\", \"sun\"])).describe(\"Days of week when order can be scheduled\").optional(),\n vehicleFeatures: z.array(z.string()).describe(\"Required vehicle feature codes\").optional(),\n allowedDateTimes: z.array(z.record(z.string(), z.unknown())).describe(\"Array of allowed datetime window objects for more granular scheduling constraints\").optional(),\n acceptDuplicateOrderNo: z.boolean().describe(\"Allow duplicate order numbers\").optional(),\n notificationPreference: z.enum([\"dont_notify\", \"email\", \"sms\", \"both\"]).describe(\"Notification method preference\").optional(),\n}).passthrough().describe(\"Input parameters for creating or updating an order.\")).describe(\"Array of orders to create or update. Maximum 500 orders per request.\"),\n}).describe(\"Request parameters for bulk creating or updating orders.\");\nconst OptimorouteCreateOrUpdateOrders_OrderResultSchema = z.object({\n id: z.string().describe(\"OptimoRoute-assigned unique order identifier\").nullable().optional(),\n code: z.string().describe(\"Error code if operation failed (e.g., 'ERR_ORD_EXISTS', 'ERR_LOC_NOT_VALID', 'ERR_DRV_NOT_EXISTS')\").nullable().optional(),\n message: z.string().describe(\"Human-readable error or warning description\").nullable().optional(),\n orderNo: z.string().describe(\"User-specified order identifier\").nullable().optional(),\n success: z.boolean().describe(\"Operation success status for this specific order\").nullable(),\n locationNo: z.string().describe(\"Location reference number if location was created or updated\").nullable().optional(),\n}).passthrough().describe(\"Result for a single order operation.\");\nexport const OptimorouteCreateOrUpdateOrdersOutput = z.object({\n orders: z.array(OptimorouteCreateOrUpdateOrders_OrderResultSchema).describe(\"Results for each order operation, in the same order as the request\"),\n success: z.boolean().describe(\"True if at least one order operation succeeded, false if all failed\").nullable(),\n}).passthrough().describe(\"Response schema for bulk order operations.\");\n\nexport const optimorouteCreateOrUpdateOrders = action(\"OPTIMOROUTE_CREATE_OR_UPDATE_ORDERS\", {\n slug: \"optimoroute-create-or-update-orders\",\n name: \"Create or Update Orders\",\n description: \"Tool to bulk create, update, or replace multiple orders at once without geocoding. Use when you need to add new orders or modify existing ones efficiently. Supports up to 500 orders per request.\",\n input: OptimorouteCreateOrUpdateOrdersInput,\n output: OptimorouteCreateOrUpdateOrdersOutput,\n});\n"],"mappings":";;;AAIA,MAAa,uCAAuC,EAAE,OAAO,EAC3D,QAAQ,EAAE,MAAM,EAAE,OAAO;CACzB,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,iHAAiH,CAAC,CAAC,SAAS;CACpJ,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,2DAA2D,CAAC,CAAC,SAAS;CAChG,MAAM,EAAE,KAAK;EAAC;EAAK;EAAK;CAAG,CAAC,CAAC,CAAC,SAAS,sFAAsF,CAAC,CAAC,SAAS;CACxI,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS;CAChF,OAAO,EAAE,OAAO,CA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AS,CAAC,CAAC,SAAS;AACtH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,sCAAsC;AAMhE,MAAa,kCAAkC,OAAO,uCAAuC;CAC3F,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAVmD,EAAE,OAAO;EAC5D,QAAQ,EAAE,MAAM,iDAAiD,CAAC,CAAC,SAAS,oEAAoE;EAChJ,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,qEAAqE,CAAC,CAAC,SAAS;CAChH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,4CAOhB;AACV,CAAC"}
|
|
@@ -30,7 +30,7 @@ const OptimorouteCreateOrderInput = zod.z.object({
|
|
|
30
30
|
timeWindows: zod.z.array(zod.z.object({
|
|
31
31
|
twTo: zod.z.string().describe("End time in 24-hour format (HH:MM)"),
|
|
32
32
|
twFrom: zod.z.string().describe("Start time in 24-hour format (HH:MM)")
|
|
33
|
-
}).describe("Time window specification for the order.")).describe("Array of time window objects").optional(),
|
|
33
|
+
}).passthrough().describe("Time window specification for the order.")).describe("Array of time window objects").optional(),
|
|
34
34
|
customField1: zod.z.string().describe("Legacy custom field value 1").optional(),
|
|
35
35
|
customField2: zod.z.string().describe("Legacy custom field value 2").optional(),
|
|
36
36
|
customField3: zod.z.string().describe("Legacy custom field value 3").optional(),
|
|
@@ -49,7 +49,7 @@ const OptimorouteCreateOrder_LocationResponseSchema = zod.z.object({
|
|
|
49
49
|
locationNo: zod.z.string().describe("Location identifier").nullable().optional(),
|
|
50
50
|
checkInTime: zod.z.number().int().describe("Check-in time in minutes").nullable().optional(),
|
|
51
51
|
locationName: zod.z.string().describe("Location name").nullable().optional()
|
|
52
|
-
}).describe("Location data in the response.");
|
|
52
|
+
}).passthrough().describe("Location data in the response.");
|
|
53
53
|
const OptimorouteCreateOrderOutput = zod.z.object({
|
|
54
54
|
id: zod.z.string().describe("OptimoRoute-assigned unique order identifier").nullable().optional(),
|
|
55
55
|
code: zod.z.string().describe("Error or warning code if operation was unsuccessful").nullable().optional(),
|
|
@@ -57,7 +57,7 @@ const OptimorouteCreateOrderOutput = zod.z.object({
|
|
|
57
57
|
success: zod.z.boolean().describe("Indicates whether the operation was successful").nullable(),
|
|
58
58
|
location: OptimorouteCreateOrder_LocationResponseSchema.nullable().optional(),
|
|
59
59
|
geocodingResults: zod.z.array(zod.z.array(zod.z.unknown())).describe("Geocoding results if address was converted to coordinates").nullable().optional()
|
|
60
|
-
}).describe("Response schema for creating or updating an order.");
|
|
60
|
+
}).passthrough().describe("Response schema for creating or updating an order.");
|
|
61
61
|
const optimorouteCreateOrder = require_action.action("OPTIMOROUTE_CREATE_ORDER", {
|
|
62
62
|
slug: "optimoroute-create-order",
|
|
63
63
|
name: "Create Order",
|
|
@@ -1 +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 OptimorouteCreateOrderInput = z.object({\n id: z.string().describe(\"Unique OptimoRoute-assigned order identifier. Used for UPDATE operations\").optional(),\n date: z.string().describe(\"Order date in YYYY-MM-DD format\"),\n load1: z.number().describe(\"Load requirement 1\").optional(),\n load2: z.number().describe(\"Load requirement 2\").optional(),\n load3: z.number().describe(\"Load requirement 3\").optional(),\n load4: z.number().describe(\"Load requirement 4\").optional(),\n notes: z.string().describe(\"Service notes\").optional(),\n skills: z.array(z.string()).describe(\"Required driver skills\").optional(),\n orderNo: z.string().describe(\"User-specified order identifier. Required unless using 'id' parameter\").optional(),\n duration: z.number().describe(\"Service completion time in minutes\").optional(),\n location: z.object({\n notes: z.string().describe(\"Location-related notes\").optional(),\n address: z.string().describe(\"Full address including country for geocoding\").optional(),\n latitude: z.number().describe(\"GPS latitude coordinate\").optional(),\n longitude: z.number().describe(\"GPS longitude coordinate\").optional(),\n locationNo: z.string().describe(\"Unique location identifier\").optional(),\n checkInTime: z.number().int().describe(\"Minimum waiting time at location in minutes\").optional(),\n locationName: z.string().describe(\"Display name for the location\").optional(),\n storeInvalid: z.boolean().describe(\"Enables storage of incomplete addresses\").optional(),\n acceptPartialMatch: z.boolean().describe(\"Allows lower confidence geocoding\").optional(),\n acceptMultipleResults: z.boolean().describe(\"Permits multiple geocoding matches\").optional(),\n}).describe(\"Delivery/service location information\"),\n priority: z.string().describe(\"Priority level: L (low), M (medium), H (high), or C (critical). Default: M\").optional(),\n operation: z.string().describe(\"Specifies action - CREATE, UPDATE, SYNC, or MERGE\"),\n orderType: z.string().describe(\"Order type - D (delivery), P (pickup), or T (task)\"),\n timeWindows: z.array(z.object({\n twTo: z.string().describe(\"End time in 24-hour format (HH:MM)\"),\n twFrom: z.string().describe(\"Start time in 24-hour format (HH:MM)\"),\n}).describe(\"Time window specification for the order.\")).describe(\"Array of time window objects\").optional(),\n customField1: z.string().describe(\"Legacy custom field value 1\").optional(),\n customField2: z.string().describe(\"Legacy custom field value 2\").optional(),\n customField3: z.string().describe(\"Legacy custom field value 3\").optional(),\n customField4: z.string().describe(\"Legacy custom field value 4\").optional(),\n customField5: z.string().describe(\"Legacy custom field value 5\").optional(),\n customFields: z.record(z.string(), z.unknown()).describe(\"Custom fields object with flexible data types\").optional(),\n vehicleFeatures: z.array(z.string()).describe(\"Required vehicle features\").optional(),\n acceptDuplicateOrderNo: z.boolean().describe(\"Allow duplicate orderNo if true\").optional(),\n}).describe(\"Request parameters for creating or updating an order.\");\nconst OptimorouteCreateOrder_LocationResponseSchema = z.object({\n notes: z.string().describe(\"Location notes\").nullable().optional(),\n valid: z.boolean().describe(\"Whether location is valid\").nullable().optional(),\n address: z.string().describe(\"Full address\").nullable().optional(),\n latitude: z.number().describe(\"GPS latitude\").nullable().optional(),\n longitude: z.number().describe(\"GPS longitude\").nullable().optional(),\n locationNo: z.string().describe(\"Location identifier\").nullable().optional(),\n checkInTime: z.number().int().describe(\"Check-in time in minutes\").nullable().optional(),\n locationName: z.string().describe(\"Location name\").nullable().optional(),\n}).describe(\"Location data in the response.\");\nexport const OptimorouteCreateOrderOutput = z.object({\n id: z.string().describe(\"OptimoRoute-assigned unique order identifier\").nullable().optional(),\n code: z.string().describe(\"Error or warning code if operation was unsuccessful\").nullable().optional(),\n message: z.string().describe(\"Error or warning description providing details about the issue\").nullable().optional(),\n success: z.boolean().describe(\"Indicates whether the operation was successful\").nullable(),\n location: OptimorouteCreateOrder_LocationResponseSchema.nullable().optional(),\n geocodingResults: z.array(z.array(z.unknown())).describe(\"Geocoding results if address was converted to coordinates\").nullable().optional(),\n}).describe(\"Response schema for creating or updating an order.\");\n\nexport const optimorouteCreateOrder = action(\"OPTIMOROUTE_CREATE_ORDER\", {\n slug: \"optimoroute-create-order\",\n name: \"Create Order\",\n description: \"Tool to create a new order or update an existing order in OptimoRoute. Use when you need to add delivery, pickup, or task orders to the system with location, time windows, and other constraints.\",\n input: OptimorouteCreateOrderInput,\n output: OptimorouteCreateOrderOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA8BA,IAAAA,EAAE,OAAO;CAClD,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0EAA0E,CAAC,CAAC,SAAS;CAC7G,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC;CAC3D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,SAAS;CAC1D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,SAAS;CAC1D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,SAAS;CAC1D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,SAAS;CAC1D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,eAAe,CAAC,CAAC,SAAS;CACrD,QAAQA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,C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OAAO,CAAC,CAAC,SAAS,oDAAoD;CACnF,aAAaA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EAC9B,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC;EAC9D,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC;CACpE,CAAC,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS;
|
|
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 OptimorouteCreateOrderInput = z.object({\n id: z.string().describe(\"Unique OptimoRoute-assigned order identifier. Used for UPDATE operations\").optional(),\n date: z.string().describe(\"Order date in YYYY-MM-DD format\"),\n load1: z.number().describe(\"Load requirement 1\").optional(),\n load2: z.number().describe(\"Load requirement 2\").optional(),\n load3: z.number().describe(\"Load requirement 3\").optional(),\n load4: z.number().describe(\"Load requirement 4\").optional(),\n notes: z.string().describe(\"Service notes\").optional(),\n skills: z.array(z.string()).describe(\"Required driver skills\").optional(),\n orderNo: z.string().describe(\"User-specified order identifier. Required unless using 'id' parameter\").optional(),\n duration: z.number().describe(\"Service completion time in minutes\").optional(),\n location: z.object({\n notes: z.string().describe(\"Location-related notes\").optional(),\n address: z.string().describe(\"Full address including country for geocoding\").optional(),\n latitude: z.number().describe(\"GPS latitude coordinate\").optional(),\n longitude: z.number().describe(\"GPS longitude coordinate\").optional(),\n locationNo: z.string().describe(\"Unique location identifier\").optional(),\n checkInTime: z.number().int().describe(\"Minimum waiting time at location in minutes\").optional(),\n locationName: z.string().describe(\"Display name for the location\").optional(),\n storeInvalid: z.boolean().describe(\"Enables storage of incomplete addresses\").optional(),\n acceptPartialMatch: z.boolean().describe(\"Allows lower confidence geocoding\").optional(),\n acceptMultipleResults: z.boolean().describe(\"Permits multiple geocoding matches\").optional(),\n}).describe(\"Delivery/service location information\"),\n priority: z.string().describe(\"Priority level: L (low), M (medium), H (high), or C (critical). Default: M\").optional(),\n operation: z.string().describe(\"Specifies action - CREATE, UPDATE, SYNC, or MERGE\"),\n orderType: z.string().describe(\"Order type - D (delivery), P (pickup), or T (task)\"),\n timeWindows: z.array(z.object({\n twTo: z.string().describe(\"End time in 24-hour format (HH:MM)\"),\n twFrom: z.string().describe(\"Start time in 24-hour format (HH:MM)\"),\n}).passthrough().describe(\"Time window specification for the order.\")).describe(\"Array of time window objects\").optional(),\n customField1: z.string().describe(\"Legacy custom field value 1\").optional(),\n customField2: z.string().describe(\"Legacy custom field value 2\").optional(),\n customField3: z.string().describe(\"Legacy custom field value 3\").optional(),\n customField4: z.string().describe(\"Legacy custom field value 4\").optional(),\n customField5: z.string().describe(\"Legacy custom field value 5\").optional(),\n customFields: z.record(z.string(), z.unknown()).describe(\"Custom fields object with flexible data types\").optional(),\n vehicleFeatures: z.array(z.string()).describe(\"Required vehicle features\").optional(),\n acceptDuplicateOrderNo: z.boolean().describe(\"Allow duplicate orderNo if true\").optional(),\n}).describe(\"Request parameters for creating or updating an order.\");\nconst OptimorouteCreateOrder_LocationResponseSchema = z.object({\n notes: z.string().describe(\"Location notes\").nullable().optional(),\n valid: z.boolean().describe(\"Whether location is valid\").nullable().optional(),\n address: z.string().describe(\"Full address\").nullable().optional(),\n latitude: z.number().describe(\"GPS latitude\").nullable().optional(),\n longitude: z.number().describe(\"GPS longitude\").nullable().optional(),\n locationNo: z.string().describe(\"Location identifier\").nullable().optional(),\n checkInTime: z.number().int().describe(\"Check-in time in minutes\").nullable().optional(),\n locationName: z.string().describe(\"Location name\").nullable().optional(),\n}).passthrough().describe(\"Location data in the response.\");\nexport const OptimorouteCreateOrderOutput = z.object({\n id: z.string().describe(\"OptimoRoute-assigned unique order identifier\").nullable().optional(),\n code: z.string().describe(\"Error or warning code if operation was unsuccessful\").nullable().optional(),\n message: z.string().describe(\"Error or warning description providing details about the issue\").nullable().optional(),\n success: z.boolean().describe(\"Indicates whether the operation was successful\").nullable(),\n location: OptimorouteCreateOrder_LocationResponseSchema.nullable().optional(),\n geocodingResults: z.array(z.array(z.unknown())).describe(\"Geocoding results if address was converted to coordinates\").nullable().optional(),\n}).passthrough().describe(\"Response schema for creating or updating an order.\");\n\nexport const optimorouteCreateOrder = action(\"OPTIMOROUTE_CREATE_ORDER\", {\n slug: \"optimoroute-create-order\",\n name: \"Create Order\",\n description: \"Tool to create a new order or update an existing order in OptimoRoute. Use when you need to add delivery, pickup, or task orders to the system with location, time windows, and other constraints.\",\n input: OptimorouteCreateOrderInput,\n output: OptimorouteCreateOrderOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA8BA,IAAAA,EAAE,OAAO;CAClD,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0EAA0E,CAAC,CAAC,SAAS;CAC7G,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC;CAC3D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,SAAS;CAC1D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,SAAS;CAC1D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,SAAS;CAC1D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,SAAS;CAC1D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,eAAe,CAAC,CAAC,SAAS;CACrD,QAAQA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS;CACxE,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,SAAS;CAC/G,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,CAAC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ACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -30,7 +30,7 @@ declare const OptimorouteCreateOrderInput: z.ZodObject<{
|
|
|
30
30
|
timeWindows: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
31
31
|
twTo: z.ZodString;
|
|
32
32
|
twFrom: z.ZodString;
|
|
33
|
-
}, z.core.$
|
|
33
|
+
}, z.core.$loose>>>;
|
|
34
34
|
customField1: z.ZodOptional<z.ZodString>;
|
|
35
35
|
customField2: z.ZodOptional<z.ZodString>;
|
|
36
36
|
customField3: z.ZodOptional<z.ZodString>;
|
|
@@ -54,9 +54,9 @@ declare const OptimorouteCreateOrderOutput: z.ZodObject<{
|
|
|
54
54
|
locationNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
55
55
|
checkInTime: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
56
56
|
locationName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
57
|
-
}, z.core.$
|
|
57
|
+
}, z.core.$loose>>>;
|
|
58
58
|
geocodingResults: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodArray<z.ZodUnknown>>>>;
|
|
59
|
-
}, z.core.$
|
|
59
|
+
}, z.core.$loose>;
|
|
60
60
|
declare const optimorouteCreateOrder: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
61
61
|
date: string;
|
|
62
62
|
location: {
|
|
@@ -84,6 +84,7 @@ declare const optimorouteCreateOrder: import("@keystrokehq/action").WorkflowActi
|
|
|
84
84
|
duration?: number | undefined;
|
|
85
85
|
priority?: string | undefined;
|
|
86
86
|
timeWindows?: {
|
|
87
|
+
[x: string]: unknown;
|
|
87
88
|
twTo: string;
|
|
88
89
|
twFrom: string;
|
|
89
90
|
}[] | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-order.d.cts","names":[],"sources":["../../src/actions/create-order.ts"],"mappings":";;;cAIa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiD3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;cAS5B,sBAAA,gCAAsB,wBAAA
|
|
1
|
+
{"version":3,"file":"create-order.d.cts","names":[],"sources":["../../src/actions/create-order.ts"],"mappings":";;;cAIa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiD3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;cAS5B,sBAAA,gCAAsB,wBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMjC,MAAA"}
|
|
@@ -30,7 +30,7 @@ declare const OptimorouteCreateOrderInput: z.ZodObject<{
|
|
|
30
30
|
timeWindows: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
31
31
|
twTo: z.ZodString;
|
|
32
32
|
twFrom: z.ZodString;
|
|
33
|
-
}, z.core.$
|
|
33
|
+
}, z.core.$loose>>>;
|
|
34
34
|
customField1: z.ZodOptional<z.ZodString>;
|
|
35
35
|
customField2: z.ZodOptional<z.ZodString>;
|
|
36
36
|
customField3: z.ZodOptional<z.ZodString>;
|
|
@@ -54,9 +54,9 @@ declare const OptimorouteCreateOrderOutput: z.ZodObject<{
|
|
|
54
54
|
locationNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
55
55
|
checkInTime: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
56
56
|
locationName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
57
|
-
}, z.core.$
|
|
57
|
+
}, z.core.$loose>>>;
|
|
58
58
|
geocodingResults: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodArray<z.ZodUnknown>>>>;
|
|
59
|
-
}, z.core.$
|
|
59
|
+
}, z.core.$loose>;
|
|
60
60
|
declare const optimorouteCreateOrder: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
61
61
|
date: string;
|
|
62
62
|
location: {
|
|
@@ -84,6 +84,7 @@ declare const optimorouteCreateOrder: import("@keystrokehq/action").WorkflowActi
|
|
|
84
84
|
duration?: number | undefined;
|
|
85
85
|
priority?: string | undefined;
|
|
86
86
|
timeWindows?: {
|
|
87
|
+
[x: string]: unknown;
|
|
87
88
|
twTo: string;
|
|
88
89
|
twFrom: string;
|
|
89
90
|
}[] | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-order.d.mts","names":[],"sources":["../../src/actions/create-order.ts"],"mappings":";;;cAIa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiD3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;cAS5B,sBAAA,gCAAsB,wBAAA
|
|
1
|
+
{"version":3,"file":"create-order.d.mts","names":[],"sources":["../../src/actions/create-order.ts"],"mappings":";;;cAIa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiD3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;cAS5B,sBAAA,gCAAsB,wBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMjC,MAAA"}
|
|
@@ -30,7 +30,7 @@ const OptimorouteCreateOrderInput = z.object({
|
|
|
30
30
|
timeWindows: z.array(z.object({
|
|
31
31
|
twTo: z.string().describe("End time in 24-hour format (HH:MM)"),
|
|
32
32
|
twFrom: z.string().describe("Start time in 24-hour format (HH:MM)")
|
|
33
|
-
}).describe("Time window specification for the order.")).describe("Array of time window objects").optional(),
|
|
33
|
+
}).passthrough().describe("Time window specification for the order.")).describe("Array of time window objects").optional(),
|
|
34
34
|
customField1: z.string().describe("Legacy custom field value 1").optional(),
|
|
35
35
|
customField2: z.string().describe("Legacy custom field value 2").optional(),
|
|
36
36
|
customField3: z.string().describe("Legacy custom field value 3").optional(),
|
|
@@ -49,7 +49,7 @@ const OptimorouteCreateOrder_LocationResponseSchema = z.object({
|
|
|
49
49
|
locationNo: z.string().describe("Location identifier").nullable().optional(),
|
|
50
50
|
checkInTime: z.number().int().describe("Check-in time in minutes").nullable().optional(),
|
|
51
51
|
locationName: z.string().describe("Location name").nullable().optional()
|
|
52
|
-
}).describe("Location data in the response.");
|
|
52
|
+
}).passthrough().describe("Location data in the response.");
|
|
53
53
|
const optimorouteCreateOrder = action("OPTIMOROUTE_CREATE_ORDER", {
|
|
54
54
|
slug: "optimoroute-create-order",
|
|
55
55
|
name: "Create Order",
|
|
@@ -62,7 +62,7 @@ const optimorouteCreateOrder = action("OPTIMOROUTE_CREATE_ORDER", {
|
|
|
62
62
|
success: z.boolean().describe("Indicates whether the operation was successful").nullable(),
|
|
63
63
|
location: OptimorouteCreateOrder_LocationResponseSchema.nullable().optional(),
|
|
64
64
|
geocodingResults: z.array(z.array(z.unknown())).describe("Geocoding results if address was converted to coordinates").nullable().optional()
|
|
65
|
-
}).describe("Response schema for creating or updating an order.")
|
|
65
|
+
}).passthrough().describe("Response schema for creating or updating an order.")
|
|
66
66
|
});
|
|
67
67
|
//#endregion
|
|
68
68
|
export { optimorouteCreateOrder };
|
|
@@ -1 +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 OptimorouteCreateOrderInput = z.object({\n id: z.string().describe(\"Unique OptimoRoute-assigned order identifier. Used for UPDATE operations\").optional(),\n date: z.string().describe(\"Order date in YYYY-MM-DD format\"),\n load1: z.number().describe(\"Load requirement 1\").optional(),\n load2: z.number().describe(\"Load requirement 2\").optional(),\n load3: z.number().describe(\"Load requirement 3\").optional(),\n load4: z.number().describe(\"Load requirement 4\").optional(),\n notes: z.string().describe(\"Service notes\").optional(),\n skills: z.array(z.string()).describe(\"Required driver skills\").optional(),\n orderNo: z.string().describe(\"User-specified order identifier. Required unless using 'id' parameter\").optional(),\n duration: z.number().describe(\"Service completion time in minutes\").optional(),\n location: z.object({\n notes: z.string().describe(\"Location-related notes\").optional(),\n address: z.string().describe(\"Full address including country for geocoding\").optional(),\n latitude: z.number().describe(\"GPS latitude coordinate\").optional(),\n longitude: z.number().describe(\"GPS longitude coordinate\").optional(),\n locationNo: z.string().describe(\"Unique location identifier\").optional(),\n checkInTime: z.number().int().describe(\"Minimum waiting time at location in minutes\").optional(),\n locationName: z.string().describe(\"Display name for the location\").optional(),\n storeInvalid: z.boolean().describe(\"Enables storage of incomplete addresses\").optional(),\n acceptPartialMatch: z.boolean().describe(\"Allows lower confidence geocoding\").optional(),\n acceptMultipleResults: z.boolean().describe(\"Permits multiple geocoding matches\").optional(),\n}).describe(\"Delivery/service location information\"),\n priority: z.string().describe(\"Priority level: L (low), M (medium), H (high), or C (critical). Default: M\").optional(),\n operation: z.string().describe(\"Specifies action - CREATE, UPDATE, SYNC, or MERGE\"),\n orderType: z.string().describe(\"Order type - D (delivery), P (pickup), or T (task)\"),\n timeWindows: z.array(z.object({\n twTo: z.string().describe(\"End time in 24-hour format (HH:MM)\"),\n twFrom: z.string().describe(\"Start time in 24-hour format (HH:MM)\"),\n}).describe(\"Time window specification for the order.\")).describe(\"Array of time window objects\").optional(),\n customField1: z.string().describe(\"Legacy custom field value 1\").optional(),\n customField2: z.string().describe(\"Legacy custom field value 2\").optional(),\n customField3: z.string().describe(\"Legacy custom field value 3\").optional(),\n customField4: z.string().describe(\"Legacy custom field value 4\").optional(),\n customField5: z.string().describe(\"Legacy custom field value 5\").optional(),\n customFields: z.record(z.string(), z.unknown()).describe(\"Custom fields object with flexible data types\").optional(),\n vehicleFeatures: z.array(z.string()).describe(\"Required vehicle features\").optional(),\n acceptDuplicateOrderNo: z.boolean().describe(\"Allow duplicate orderNo if true\").optional(),\n}).describe(\"Request parameters for creating or updating an order.\");\nconst OptimorouteCreateOrder_LocationResponseSchema = z.object({\n notes: z.string().describe(\"Location notes\").nullable().optional(),\n valid: z.boolean().describe(\"Whether location is valid\").nullable().optional(),\n address: z.string().describe(\"Full address\").nullable().optional(),\n latitude: z.number().describe(\"GPS latitude\").nullable().optional(),\n longitude: z.number().describe(\"GPS longitude\").nullable().optional(),\n locationNo: z.string().describe(\"Location identifier\").nullable().optional(),\n checkInTime: z.number().int().describe(\"Check-in time in minutes\").nullable().optional(),\n locationName: z.string().describe(\"Location name\").nullable().optional(),\n}).describe(\"Location data in the response.\");\nexport const OptimorouteCreateOrderOutput = z.object({\n id: z.string().describe(\"OptimoRoute-assigned unique order identifier\").nullable().optional(),\n code: z.string().describe(\"Error or warning code if operation was unsuccessful\").nullable().optional(),\n message: z.string().describe(\"Error or warning description providing details about the issue\").nullable().optional(),\n success: z.boolean().describe(\"Indicates whether the operation was successful\").nullable(),\n location: OptimorouteCreateOrder_LocationResponseSchema.nullable().optional(),\n geocodingResults: z.array(z.array(z.unknown())).describe(\"Geocoding results if address was converted to coordinates\").nullable().optional(),\n}).describe(\"Response schema for creating or updating an order.\");\n\nexport const optimorouteCreateOrder = action(\"OPTIMOROUTE_CREATE_ORDER\", {\n slug: \"optimoroute-create-order\",\n name: \"Create Order\",\n description: \"Tool to create a new order or update an existing order in OptimoRoute. Use when you need to add delivery, pickup, or task orders to the system with location, time windows, and other constraints.\",\n input: OptimorouteCreateOrderInput,\n output: OptimorouteCreateOrderOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA8B,EAAE,OAAO;CAClD,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,0EAA0E,CAAC,CAAC,SAAS;CAC7G,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC;CAC3D,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,SAAS;CAC1D,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,SAAS;CAC1D,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AAC,CAAC,SAAS,4EAA4E,CAAC,CAAC,SAAS;CACrH,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,mDAAmD;CAClF,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD;CACnF,aAAa,EAAE,MAAM,EAAE,OAAO;EAC9B,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC;EAC9D,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC;CACpE,CAAC,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS;
|
|
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 OptimorouteCreateOrderInput = z.object({\n id: z.string().describe(\"Unique OptimoRoute-assigned order identifier. Used for UPDATE operations\").optional(),\n date: z.string().describe(\"Order date in YYYY-MM-DD format\"),\n load1: z.number().describe(\"Load requirement 1\").optional(),\n load2: z.number().describe(\"Load requirement 2\").optional(),\n load3: z.number().describe(\"Load requirement 3\").optional(),\n load4: z.number().describe(\"Load requirement 4\").optional(),\n notes: z.string().describe(\"Service notes\").optional(),\n skills: z.array(z.string()).describe(\"Required driver skills\").optional(),\n orderNo: z.string().describe(\"User-specified order identifier. Required unless using 'id' parameter\").optional(),\n duration: z.number().describe(\"Service completion time in minutes\").optional(),\n location: z.object({\n notes: z.string().describe(\"Location-related notes\").optional(),\n address: z.string().describe(\"Full address including country for geocoding\").optional(),\n latitude: z.number().describe(\"GPS latitude coordinate\").optional(),\n longitude: z.number().describe(\"GPS longitude coordinate\").optional(),\n locationNo: z.string().describe(\"Unique location identifier\").optional(),\n checkInTime: z.number().int().describe(\"Minimum waiting time at location in minutes\").optional(),\n locationName: z.string().describe(\"Display name for the location\").optional(),\n storeInvalid: z.boolean().describe(\"Enables storage of incomplete addresses\").optional(),\n acceptPartialMatch: z.boolean().describe(\"Allows lower confidence geocoding\").optional(),\n acceptMultipleResults: z.boolean().describe(\"Permits multiple geocoding matches\").optional(),\n}).describe(\"Delivery/service location information\"),\n priority: z.string().describe(\"Priority level: L (low), M (medium), H (high), or C (critical). Default: M\").optional(),\n operation: z.string().describe(\"Specifies action - CREATE, UPDATE, SYNC, or MERGE\"),\n orderType: z.string().describe(\"Order type - D (delivery), P (pickup), or T (task)\"),\n timeWindows: z.array(z.object({\n twTo: z.string().describe(\"End time in 24-hour format (HH:MM)\"),\n twFrom: z.string().describe(\"Start time in 24-hour format (HH:MM)\"),\n}).passthrough().describe(\"Time window specification for the order.\")).describe(\"Array of time window objects\").optional(),\n customField1: z.string().describe(\"Legacy custom field value 1\").optional(),\n customField2: z.string().describe(\"Legacy custom field value 2\").optional(),\n customField3: z.string().describe(\"Legacy custom field value 3\").optional(),\n customField4: z.string().describe(\"Legacy custom field value 4\").optional(),\n customField5: z.string().describe(\"Legacy custom field value 5\").optional(),\n customFields: z.record(z.string(), z.unknown()).describe(\"Custom fields object with flexible data types\").optional(),\n vehicleFeatures: z.array(z.string()).describe(\"Required vehicle features\").optional(),\n acceptDuplicateOrderNo: z.boolean().describe(\"Allow duplicate orderNo if true\").optional(),\n}).describe(\"Request parameters for creating or updating an order.\");\nconst OptimorouteCreateOrder_LocationResponseSchema = z.object({\n notes: z.string().describe(\"Location notes\").nullable().optional(),\n valid: z.boolean().describe(\"Whether location is valid\").nullable().optional(),\n address: z.string().describe(\"Full address\").nullable().optional(),\n latitude: z.number().describe(\"GPS latitude\").nullable().optional(),\n longitude: z.number().describe(\"GPS longitude\").nullable().optional(),\n locationNo: z.string().describe(\"Location identifier\").nullable().optional(),\n checkInTime: z.number().int().describe(\"Check-in time in minutes\").nullable().optional(),\n locationName: z.string().describe(\"Location name\").nullable().optional(),\n}).passthrough().describe(\"Location data in the response.\");\nexport const OptimorouteCreateOrderOutput = z.object({\n id: z.string().describe(\"OptimoRoute-assigned unique order identifier\").nullable().optional(),\n code: z.string().describe(\"Error or warning code if operation was unsuccessful\").nullable().optional(),\n message: z.string().describe(\"Error or warning description providing details about the issue\").nullable().optional(),\n success: z.boolean().describe(\"Indicates whether the operation was successful\").nullable(),\n location: OptimorouteCreateOrder_LocationResponseSchema.nullable().optional(),\n geocodingResults: z.array(z.array(z.unknown())).describe(\"Geocoding results if address was converted to coordinates\").nullable().optional(),\n}).passthrough().describe(\"Response schema for creating or updating an order.\");\n\nexport const optimorouteCreateOrder = action(\"OPTIMOROUTE_CREATE_ORDER\", {\n slug: \"optimoroute-create-order\",\n name: \"Create Order\",\n description: \"Tool to create a new order or update an existing order in OptimoRoute. Use when you need to add delivery, pickup, or task orders to the system with location, time windows, and other constraints.\",\n input: OptimorouteCreateOrderInput,\n output: OptimorouteCreateOrderOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA8B,EAAE,OAAO;CAClD,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,0EAA0E,CAAC,CAAC,SAAS;CAC7G,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC;CAC3D,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,SAAS;CAC1D,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,SAAS;CAC1D,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,SAAS;CAC1D,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,SAAS;CAC1D,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,eAAe,CAAC,CAAC,SAAS;CACrD,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS;CACxE,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,SAAS;CAC/G,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS;CAC7E,UAA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AC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvF,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,eAAe,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACzE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,gCAAgC;AAU1D,MAAa,yBAAyB,OAAO,4BAA4B;CACvE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAd0C,EAAE,OAAO;EACnD,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC5F,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACrG,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACnH,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;EACzF,UAAU,8CAA8C,SAAS,CAAC,CAAC,SAAS;EAC5E,kBAAkB,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,2DAA2D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC5I,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,oDAOhB;AACV,CAAC"}
|
|
@@ -7,7 +7,7 @@ const OptimorouteDeleteAllOrdersOutput = zod.z.object({
|
|
|
7
7
|
message: zod.z.string().describe("Human-readable error or warning description").nullable().optional(),
|
|
8
8
|
success: zod.z.boolean().describe("Indicates successful deletion (true) or error occurrence (false)").nullable(),
|
|
9
9
|
planningId: zod.z.number().int().describe("ID of ongoing optimization process if conflict exists").nullable().optional()
|
|
10
|
-
}).describe("Response schema for delete all orders operation.");
|
|
10
|
+
}).passthrough().describe("Response schema for delete all orders operation.");
|
|
11
11
|
const optimorouteDeleteAllOrders = require_action.action("OPTIMOROUTE_DELETE_ALL_ORDERS", {
|
|
12
12
|
slug: "optimoroute-delete-all-orders",
|
|
13
13
|
name: "Delete All Orders",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-all-orders.cjs","names":["z","action"],"sources":["../../src/actions/delete-all-orders.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OptimorouteDeleteAllOrdersInput = z.object({\n date: z.string().describe(\"Optional date for which to remove orders and routes in YYYY-MM-DD format. If not provided, all orders system-wide will be deleted.\").optional(),\n}).describe(\"Request parameters for deleting all orders and planned routes.\");\nexport const OptimorouteDeleteAllOrdersOutput = z.object({\n code: z.string().describe(\"Error or warning code if operation unsuccessful\").nullable().optional(),\n message: z.string().describe(\"Human-readable error or warning description\").nullable().optional(),\n success: z.boolean().describe(\"Indicates successful deletion (true) or error occurrence (false)\").nullable(),\n planningId: z.number().int().describe(\"ID of ongoing optimization process if conflict exists\").nullable().optional(),\n}).describe(\"Response schema for delete all orders operation.\");\n\nexport const optimorouteDeleteAllOrders = action(\"OPTIMOROUTE_DELETE_ALL_ORDERS\", {\n slug: \"optimoroute-delete-all-orders\",\n name: \"Delete All Orders\",\n description: \"Tool to remove all orders and planned routes for a specified date. Use when you need to clear orders for a specific date or delete all orders system-wide if no date is provided.\",\n input: OptimorouteDeleteAllOrdersInput,\n output: OptimorouteDeleteAllOrdersOutput,\n});\n"],"mappings":";;;AAIA,MAAa,kCAAkCA,IAAAA,EAAE,OAAO,EACtD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oIAAoI,CAAC,CAAC,SAAS,EAC3K,CAAC,CAAC,CAAC,SAAS,gEAAgE;AAC5E,MAAa,mCAAmCA,IAAAA,EAAE,OAAO;CACvD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjG,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChG,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,kEAAkE,CAAC,CAAC,SAAS;CAC3G,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACrH,CAAC,CAAC,CAAC,SAAS,kDAAkD;
|
|
1
|
+
{"version":3,"file":"delete-all-orders.cjs","names":["z","action"],"sources":["../../src/actions/delete-all-orders.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OptimorouteDeleteAllOrdersInput = z.object({\n date: z.string().describe(\"Optional date for which to remove orders and routes in YYYY-MM-DD format. If not provided, all orders system-wide will be deleted.\").optional(),\n}).describe(\"Request parameters for deleting all orders and planned routes.\");\nexport const OptimorouteDeleteAllOrdersOutput = z.object({\n code: z.string().describe(\"Error or warning code if operation unsuccessful\").nullable().optional(),\n message: z.string().describe(\"Human-readable error or warning description\").nullable().optional(),\n success: z.boolean().describe(\"Indicates successful deletion (true) or error occurrence (false)\").nullable(),\n planningId: z.number().int().describe(\"ID of ongoing optimization process if conflict exists\").nullable().optional(),\n}).passthrough().describe(\"Response schema for delete all orders operation.\");\n\nexport const optimorouteDeleteAllOrders = action(\"OPTIMOROUTE_DELETE_ALL_ORDERS\", {\n slug: \"optimoroute-delete-all-orders\",\n name: \"Delete All Orders\",\n description: \"Tool to remove all orders and planned routes for a specified date. Use when you need to clear orders for a specific date or delete all orders system-wide if no date is provided.\",\n input: OptimorouteDeleteAllOrdersInput,\n output: OptimorouteDeleteAllOrdersOutput,\n});\n"],"mappings":";;;AAIA,MAAa,kCAAkCA,IAAAA,EAAE,OAAO,EACtD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oIAAoI,CAAC,CAAC,SAAS,EAC3K,CAAC,CAAC,CAAC,SAAS,gEAAgE;AAC5E,MAAa,mCAAmCA,IAAAA,EAAE,OAAO;CACvD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjG,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChG,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,kEAAkE,CAAC,CAAC,SAAS;CAC3G,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACrH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,kDAAkD;AAE5E,MAAa,6BAA6BC,eAAAA,OAAO,iCAAiC;CAChF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -9,7 +9,7 @@ declare const OptimorouteDeleteAllOrdersOutput: z.ZodObject<{
|
|
|
9
9
|
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10
10
|
success: z.ZodNullable<z.ZodBoolean>;
|
|
11
11
|
planningId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
12
|
-
}, z.core.$
|
|
12
|
+
}, z.core.$loose>;
|
|
13
13
|
declare const optimorouteDeleteAllOrders: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
14
14
|
date?: string | undefined;
|
|
15
15
|
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
@@ -9,7 +9,7 @@ declare const OptimorouteDeleteAllOrdersOutput: z.ZodObject<{
|
|
|
9
9
|
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10
10
|
success: z.ZodNullable<z.ZodBoolean>;
|
|
11
11
|
planningId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
12
|
-
}, z.core.$
|
|
12
|
+
}, z.core.$loose>;
|
|
13
13
|
declare const optimorouteDeleteAllOrders: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
14
14
|
date?: string | undefined;
|
|
15
15
|
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
@@ -10,7 +10,7 @@ const optimorouteDeleteAllOrders = action("OPTIMOROUTE_DELETE_ALL_ORDERS", {
|
|
|
10
10
|
message: z.string().describe("Human-readable error or warning description").nullable().optional(),
|
|
11
11
|
success: z.boolean().describe("Indicates successful deletion (true) or error occurrence (false)").nullable(),
|
|
12
12
|
planningId: z.number().int().describe("ID of ongoing optimization process if conflict exists").nullable().optional()
|
|
13
|
-
}).describe("Response schema for delete all orders operation.")
|
|
13
|
+
}).passthrough().describe("Response schema for delete all orders operation.")
|
|
14
14
|
});
|
|
15
15
|
//#endregion
|
|
16
16
|
export { optimorouteDeleteAllOrders };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-all-orders.mjs","names":[],"sources":["../../src/actions/delete-all-orders.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OptimorouteDeleteAllOrdersInput = z.object({\n date: z.string().describe(\"Optional date for which to remove orders and routes in YYYY-MM-DD format. If not provided, all orders system-wide will be deleted.\").optional(),\n}).describe(\"Request parameters for deleting all orders and planned routes.\");\nexport const OptimorouteDeleteAllOrdersOutput = z.object({\n code: z.string().describe(\"Error or warning code if operation unsuccessful\").nullable().optional(),\n message: z.string().describe(\"Human-readable error or warning description\").nullable().optional(),\n success: z.boolean().describe(\"Indicates successful deletion (true) or error occurrence (false)\").nullable(),\n planningId: z.number().int().describe(\"ID of ongoing optimization process if conflict exists\").nullable().optional(),\n}).describe(\"Response schema for delete all orders operation.\");\n\nexport const optimorouteDeleteAllOrders = action(\"OPTIMOROUTE_DELETE_ALL_ORDERS\", {\n slug: \"optimoroute-delete-all-orders\",\n name: \"Delete All Orders\",\n description: \"Tool to remove all orders and planned routes for a specified date. Use when you need to clear orders for a specific date or delete all orders system-wide if no date is provided.\",\n input: OptimorouteDeleteAllOrdersInput,\n output: OptimorouteDeleteAllOrdersOutput,\n});\n"],"mappings":";;AAcA,MAAa,6BAA6B,OAAO,iCAAiC;CAChF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAd6C,EAAE,OAAO,EACtD,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,oIAAoI,CAAC,CAAC,SAAS,EAC3K,CAAC,CAAC,CAAC,SAAS,gEAYH;CACP,QAZ8C,EAAE,OAAO;EACvD,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACjG,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAChG,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,kEAAkE,CAAC,CAAC,SAAS;EAC3G,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACrH,CAAC,CAAC,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"delete-all-orders.mjs","names":[],"sources":["../../src/actions/delete-all-orders.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OptimorouteDeleteAllOrdersInput = z.object({\n date: z.string().describe(\"Optional date for which to remove orders and routes in YYYY-MM-DD format. If not provided, all orders system-wide will be deleted.\").optional(),\n}).describe(\"Request parameters for deleting all orders and planned routes.\");\nexport const OptimorouteDeleteAllOrdersOutput = z.object({\n code: z.string().describe(\"Error or warning code if operation unsuccessful\").nullable().optional(),\n message: z.string().describe(\"Human-readable error or warning description\").nullable().optional(),\n success: z.boolean().describe(\"Indicates successful deletion (true) or error occurrence (false)\").nullable(),\n planningId: z.number().int().describe(\"ID of ongoing optimization process if conflict exists\").nullable().optional(),\n}).passthrough().describe(\"Response schema for delete all orders operation.\");\n\nexport const optimorouteDeleteAllOrders = action(\"OPTIMOROUTE_DELETE_ALL_ORDERS\", {\n slug: \"optimoroute-delete-all-orders\",\n name: \"Delete All Orders\",\n description: \"Tool to remove all orders and planned routes for a specified date. Use when you need to clear orders for a specific date or delete all orders system-wide if no date is provided.\",\n input: OptimorouteDeleteAllOrdersInput,\n output: OptimorouteDeleteAllOrdersOutput,\n});\n"],"mappings":";;AAcA,MAAa,6BAA6B,OAAO,iCAAiC;CAChF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAd6C,EAAE,OAAO,EACtD,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,oIAAoI,CAAC,CAAC,SAAS,EAC3K,CAAC,CAAC,CAAC,SAAS,gEAYH;CACP,QAZ8C,EAAE,OAAO;EACvD,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACjG,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAChG,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,kEAAkE,CAAC,CAAC,SAAS;EAC3G,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACrH,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,kDAOhB;AACV,CAAC"}
|
|
@@ -10,7 +10,7 @@ const OptimorouteDeleteOrderOutput = zod.z.object({
|
|
|
10
10
|
message: zod.z.string().describe("Error or warning description; omitted if operation succeeds").nullable().optional(),
|
|
11
11
|
success: zod.z.boolean().describe("Indicates whether the deletion succeeded (true) or encountered an error (false)").nullable(),
|
|
12
12
|
planningId: zod.z.number().int().describe("The optimization process ID if one is running for this order").nullable().optional()
|
|
13
|
-
}).describe("Response schema for delete order operation.");
|
|
13
|
+
}).passthrough().describe("Response schema for delete order operation.");
|
|
14
14
|
const optimorouteDeleteOrder = require_action.action("OPTIMOROUTE_DELETE_ORDER", {
|
|
15
15
|
slug: "optimoroute-delete-order",
|
|
16
16
|
name: "Delete Order",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-order.cjs","names":["z","action"],"sources":["../../src/actions/delete-order.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OptimorouteDeleteOrderInput = z.object({\n orderNo: z.string().describe(\"The user-specified identifier of the order to be deleted\"),\n forceDelete: z.boolean().describe(\"If true, typical restrictions on removing orders from active plans are bypassed. Defaults to false\").optional(),\n}).describe(\"Request parameters for deleting a single order.\");\nexport const OptimorouteDeleteOrderOutput = z.object({\n code: z.string().describe(\"Error or warning code; omitted if operation succeeds. Common codes: ERR_ORD_NOT_FOUND (order not found), ERR_MULTIPLE_ORD_FOUND (multiple orders with same orderNo), ERR_OPT_RUNNING (active optimization prevents deletion)\").nullable().optional(),\n message: z.string().describe(\"Error or warning description; omitted if operation succeeds\").nullable().optional(),\n success: z.boolean().describe(\"Indicates whether the deletion succeeded (true) or encountered an error (false)\").nullable(),\n planningId: z.number().int().describe(\"The optimization process ID if one is running for this order\").nullable().optional(),\n}).describe(\"Response schema for delete order operation.\");\n\nexport const optimorouteDeleteOrder = action(\"OPTIMOROUTE_DELETE_ORDER\", {\n slug: \"optimoroute-delete-order\",\n name: \"Delete Order\",\n description: \"Tool to remove a single order from the OptimoRoute system. Use when you need to delete a specific order by its orderNo.\",\n input: OptimorouteDeleteOrderInput,\n output: OptimorouteDeleteOrderOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA8BA,IAAAA,EAAE,OAAO;CAClD,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D;CACvF,aAAaA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,oGAAoG,CAAC,CAAC,SAAS;AACnJ,CAAC,CAAC,CAAC,SAAS,iDAAiD;AAC7D,MAAa,+BAA+BA,IAAAA,EAAE,OAAO;CACnD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8NAA8N,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC9Q,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChH,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS;CAC1H,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC5H,CAAC,CAAC,CAAC,SAAS,6CAA6C;
|
|
1
|
+
{"version":3,"file":"delete-order.cjs","names":["z","action"],"sources":["../../src/actions/delete-order.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OptimorouteDeleteOrderInput = z.object({\n orderNo: z.string().describe(\"The user-specified identifier of the order to be deleted\"),\n forceDelete: z.boolean().describe(\"If true, typical restrictions on removing orders from active plans are bypassed. Defaults to false\").optional(),\n}).describe(\"Request parameters for deleting a single order.\");\nexport const OptimorouteDeleteOrderOutput = z.object({\n code: z.string().describe(\"Error or warning code; omitted if operation succeeds. Common codes: ERR_ORD_NOT_FOUND (order not found), ERR_MULTIPLE_ORD_FOUND (multiple orders with same orderNo), ERR_OPT_RUNNING (active optimization prevents deletion)\").nullable().optional(),\n message: z.string().describe(\"Error or warning description; omitted if operation succeeds\").nullable().optional(),\n success: z.boolean().describe(\"Indicates whether the deletion succeeded (true) or encountered an error (false)\").nullable(),\n planningId: z.number().int().describe(\"The optimization process ID if one is running for this order\").nullable().optional(),\n}).passthrough().describe(\"Response schema for delete order operation.\");\n\nexport const optimorouteDeleteOrder = action(\"OPTIMOROUTE_DELETE_ORDER\", {\n slug: \"optimoroute-delete-order\",\n name: \"Delete Order\",\n description: \"Tool to remove a single order from the OptimoRoute system. Use when you need to delete a specific order by its orderNo.\",\n input: OptimorouteDeleteOrderInput,\n output: OptimorouteDeleteOrderOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA8BA,IAAAA,EAAE,OAAO;CAClD,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D;CACvF,aAAaA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,oGAAoG,CAAC,CAAC,SAAS;AACnJ,CAAC,CAAC,CAAC,SAAS,iDAAiD;AAC7D,MAAa,+BAA+BA,IAAAA,EAAE,OAAO;CACnD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8NAA8N,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC9Q,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChH,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS;CAC1H,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC5H,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,6CAA6C;AAEvE,MAAa,yBAAyBC,eAAAA,OAAO,4BAA4B;CACvE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|