@keystrokehq/optimoroute 0.1.5 → 0.1.6
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/action.cjs.map +1 -1
- package/dist/action.mjs.map +1 -1
- package/dist/actions/create-or-update-orders.cjs +1 -0
- package/dist/actions/create-or-update-orders.cjs.map +1 -1
- package/dist/actions/create-or-update-orders.d.cts +3 -65
- package/dist/actions/create-or-update-orders.d.cts.map +1 -1
- package/dist/actions/create-or-update-orders.d.mts +3 -65
- package/dist/actions/create-or-update-orders.d.mts.map +1 -1
- package/dist/actions/create-or-update-orders.mjs +1 -0
- package/dist/actions/create-or-update-orders.mjs.map +1 -1
- package/dist/actions/create-order.cjs +1 -0
- package/dist/actions/create-order.cjs.map +1 -1
- package/dist/actions/create-order.d.cts +3 -52
- package/dist/actions/create-order.d.cts.map +1 -1
- package/dist/actions/create-order.d.mts +3 -52
- package/dist/actions/create-order.d.mts.map +1 -1
- package/dist/actions/create-order.mjs +1 -0
- package/dist/actions/create-order.mjs.map +1 -1
- package/dist/actions/delete-all-orders.cjs +1 -0
- package/dist/actions/delete-all-orders.cjs.map +1 -1
- package/dist/actions/delete-all-orders.d.cts +3 -15
- package/dist/actions/delete-all-orders.d.cts.map +1 -1
- package/dist/actions/delete-all-orders.d.mts +3 -15
- package/dist/actions/delete-all-orders.d.mts.map +1 -1
- package/dist/actions/delete-all-orders.mjs +1 -0
- package/dist/actions/delete-all-orders.mjs.map +1 -1
- package/dist/actions/delete-order.cjs +1 -0
- package/dist/actions/delete-order.cjs.map +1 -1
- package/dist/actions/delete-order.d.cts +3 -16
- package/dist/actions/delete-order.d.cts.map +1 -1
- package/dist/actions/delete-order.d.mts +3 -16
- package/dist/actions/delete-order.d.mts.map +1 -1
- package/dist/actions/delete-order.mjs +1 -0
- package/dist/actions/delete-order.mjs.map +1 -1
- package/dist/actions/delete-orders.cjs +1 -0
- package/dist/actions/delete-orders.cjs.map +1 -1
- package/dist/actions/delete-orders.d.cts +3 -21
- package/dist/actions/delete-orders.d.cts.map +1 -1
- package/dist/actions/delete-orders.d.mts +3 -21
- package/dist/actions/delete-orders.d.mts.map +1 -1
- package/dist/actions/delete-orders.mjs +1 -0
- package/dist/actions/delete-orders.mjs.map +1 -1
- package/dist/actions/get-completion-details.cjs +1 -0
- package/dist/actions/get-completion-details.cjs.map +1 -1
- package/dist/actions/get-completion-details.d.cts +3 -19
- package/dist/actions/get-completion-details.d.cts.map +1 -1
- package/dist/actions/get-completion-details.d.mts +3 -19
- package/dist/actions/get-completion-details.d.mts.map +1 -1
- package/dist/actions/get-completion-details.mjs +1 -0
- package/dist/actions/get-completion-details.mjs.map +1 -1
- package/dist/actions/get-drivers.cjs +1 -0
- package/dist/actions/get-drivers.cjs.map +1 -1
- package/dist/actions/get-drivers.d.cts +3 -13
- package/dist/actions/get-drivers.d.cts.map +1 -1
- package/dist/actions/get-drivers.d.mts +3 -13
- package/dist/actions/get-drivers.d.mts.map +1 -1
- package/dist/actions/get-drivers.mjs +1 -0
- package/dist/actions/get-drivers.mjs.map +1 -1
- package/dist/actions/get-events.cjs +1 -0
- package/dist/actions/get-events.cjs.map +1 -1
- package/dist/actions/get-events.d.cts +3 -15
- package/dist/actions/get-events.d.cts.map +1 -1
- package/dist/actions/get-events.d.mts +3 -15
- package/dist/actions/get-events.d.mts.map +1 -1
- package/dist/actions/get-events.mjs +1 -0
- package/dist/actions/get-events.mjs.map +1 -1
- package/dist/actions/get-orders.cjs +1 -0
- package/dist/actions/get-orders.cjs.map +1 -1
- package/dist/actions/get-orders.d.cts +3 -19
- package/dist/actions/get-orders.d.cts.map +1 -1
- package/dist/actions/get-orders.d.mts +3 -19
- package/dist/actions/get-orders.d.mts.map +1 -1
- package/dist/actions/get-orders.mjs +1 -0
- package/dist/actions/get-orders.mjs.map +1 -1
- package/dist/actions/get-planning-status.cjs +1 -0
- package/dist/actions/get-planning-status.cjs.map +1 -1
- package/dist/actions/get-planning-status.d.cts +3 -15
- package/dist/actions/get-planning-status.d.cts.map +1 -1
- package/dist/actions/get-planning-status.d.mts +3 -15
- package/dist/actions/get-planning-status.d.mts.map +1 -1
- package/dist/actions/get-planning-status.mjs +1 -0
- package/dist/actions/get-planning-status.mjs.map +1 -1
- package/dist/actions/get-routes.cjs +1 -0
- package/dist/actions/get-routes.cjs.map +1 -1
- package/dist/actions/get-routes.d.cts +3 -20
- package/dist/actions/get-routes.d.cts.map +1 -1
- package/dist/actions/get-routes.d.mts +3 -20
- package/dist/actions/get-routes.d.mts.map +1 -1
- package/dist/actions/get-routes.mjs +1 -0
- package/dist/actions/get-routes.mjs.map +1 -1
- package/dist/actions/get-scheduling-info.cjs +1 -0
- package/dist/actions/get-scheduling-info.cjs.map +1 -1
- package/dist/actions/get-scheduling-info.d.cts +3 -16
- package/dist/actions/get-scheduling-info.d.cts.map +1 -1
- package/dist/actions/get-scheduling-info.d.mts +3 -16
- package/dist/actions/get-scheduling-info.d.mts.map +1 -1
- package/dist/actions/get-scheduling-info.mjs +1 -0
- package/dist/actions/get-scheduling-info.mjs.map +1 -1
- package/dist/actions/search-orders.cjs +1 -0
- package/dist/actions/search-orders.cjs.map +1 -1
- package/dist/actions/search-orders.d.cts +3 -28
- package/dist/actions/search-orders.d.cts.map +1 -1
- package/dist/actions/search-orders.d.mts +3 -28
- package/dist/actions/search-orders.d.mts.map +1 -1
- package/dist/actions/search-orders.mjs +1 -0
- package/dist/actions/search-orders.mjs.map +1 -1
- package/dist/actions/start-planning.cjs +1 -0
- package/dist/actions/start-planning.cjs.map +1 -1
- package/dist/actions/start-planning.d.cts +3 -39
- package/dist/actions/start-planning.d.cts.map +1 -1
- package/dist/actions/start-planning.d.mts +3 -39
- package/dist/actions/start-planning.d.mts.map +1 -1
- package/dist/actions/start-planning.mjs +1 -0
- package/dist/actions/start-planning.mjs.map +1 -1
- package/dist/actions/stop-planning.cjs +1 -0
- package/dist/actions/stop-planning.cjs.map +1 -1
- package/dist/actions/stop-planning.d.cts +3 -15
- package/dist/actions/stop-planning.d.cts.map +1 -1
- package/dist/actions/stop-planning.d.mts +3 -15
- package/dist/actions/stop-planning.d.mts.map +1 -1
- package/dist/actions/stop-planning.mjs +1 -0
- package/dist/actions/stop-planning.mjs.map +1 -1
- package/dist/actions/update-driver-parameters.cjs +1 -0
- package/dist/actions/update-driver-parameters.cjs.map +1 -1
- package/dist/actions/update-driver-parameters.d.cts +3 -30
- package/dist/actions/update-driver-parameters.d.cts.map +1 -1
- package/dist/actions/update-driver-parameters.d.mts +3 -30
- package/dist/actions/update-driver-parameters.d.mts.map +1 -1
- package/dist/actions/update-driver-parameters.mjs +1 -0
- package/dist/actions/update-driver-parameters.mjs.map +1 -1
- package/dist/actions/update-drivers-parameters.cjs +1 -0
- package/dist/actions/update-drivers-parameters.cjs.map +1 -1
- package/dist/actions/update-drivers-parameters.d.cts +3 -47
- package/dist/actions/update-drivers-parameters.d.cts.map +1 -1
- package/dist/actions/update-drivers-parameters.d.mts +3 -47
- package/dist/actions/update-drivers-parameters.d.mts.map +1 -1
- package/dist/actions/update-drivers-parameters.mjs +1 -0
- package/dist/actions/update-drivers-parameters.mjs.map +1 -1
- package/dist/app.cjs +2 -2
- package/dist/app.cjs.map +1 -1
- package/dist/app.d.cts +4 -6
- package/dist/app.d.cts.map +1 -1
- package/dist/app.d.mts +4 -6
- package/dist/app.d.mts.map +1 -1
- package/dist/app.mjs +0 -1
- package/dist/app.mjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/package.json +2 -2
package/dist/action.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.cjs","names":["optimoroute","executeOptimorouteTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { optimoroute } from \"./app\";\nimport { executeOptimorouteTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action<TInput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output:
|
|
1
|
+
{"version":3,"file":"action.cjs","names":["optimoroute","executeOptimorouteTool"],"sources":["../src/action.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { optimoroute } from \"./app\";\nimport { executeOptimorouteTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action<TInput extends z.ZodType, TOutput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output: TOutput;\n },\n): AppAction<TInput, TOutput, typeof optimoroute.credential> {\n return optimoroute.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeOptimorouteTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAOA,SAAgB,OACd,MACA,KAO2D;CAC3D,OAAOA,YAAAA,YAAY,OAAO;EACxB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAMC,gBAAAA,uBAAuB,MAAM,KAAgC,CAAC;EAC9F;CACF,CAAC;AACH"}
|
package/dist/action.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { optimoroute } from \"./app\";\nimport { executeOptimorouteTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action<TInput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output:
|
|
1
|
+
{"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { optimoroute } from \"./app\";\nimport { executeOptimorouteTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action<TInput extends z.ZodType, TOutput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output: TOutput;\n },\n): AppAction<TInput, TOutput, typeof optimoroute.credential> {\n return optimoroute.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeOptimorouteTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAOA,SAAgB,OACd,MACA,KAO2D;CAC3D,OAAO,YAAY,OAAO;EACxB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,uBAAuB,MAAM,KAAgC,CAAC;EAC9F;CACF,CAAC;AACH"}
|
|
@@ -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}).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,SAAS,0CAA0C,CAAC,CAAC,SAAS;CAChF,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,SAAS;CAChG,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;CACzE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;CACzE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;CACzE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;CAC9E,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;CAC/E,QAAQA,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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"}
|
|
1
|
+
{"version":3,"file":"create-or-update-orders.cjs","names":["z","action"],"sources":["../../src/actions/create-or-update-orders.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { optimoroute } from \"../app\";\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: AppAction<\n typeof OptimorouteCreateOrUpdateOrdersInput,\n typeof OptimorouteCreateOrUpdateOrdersOutput,\n typeof optimoroute.credential\n> = 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":";;;;AAMA,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,SAAS,0CAA0C,CAAC,CAAC,SAAS;CAChF,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,SAAS;CAChG,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;CACzE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;CACzE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;CACzE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;CAC9E,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;CAC/E,QAAQA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,6BA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AAS,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,kCAITC,eAAAA,OAAO,uCAAuC;CAChD,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { optimoroute } from "../app.cjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/create-or-update-orders.d.ts
|
|
@@ -90,71 +92,7 @@ declare const OptimorouteCreateOrUpdateOrdersOutput: z.ZodObject<{
|
|
|
90
92
|
}, z.core.$loose>>;
|
|
91
93
|
success: z.ZodNullable<z.ZodBoolean>;
|
|
92
94
|
}, z.core.$loose>;
|
|
93
|
-
declare const optimorouteCreateOrUpdateOrders:
|
|
94
|
-
orders: {
|
|
95
|
-
[x: string]: unknown;
|
|
96
|
-
id?: string | undefined;
|
|
97
|
-
date?: string | undefined;
|
|
98
|
-
type?: "D" | "P" | "T" | undefined;
|
|
99
|
-
email?: string | undefined;
|
|
100
|
-
load1?: number | undefined;
|
|
101
|
-
load2?: number | undefined;
|
|
102
|
-
load3?: number | undefined;
|
|
103
|
-
load4?: number | undefined;
|
|
104
|
-
notes?: string | undefined;
|
|
105
|
-
phone?: string | undefined;
|
|
106
|
-
skills?: string[] | undefined;
|
|
107
|
-
orderNo?: string | undefined;
|
|
108
|
-
duration?: number | undefined;
|
|
109
|
-
location?: {
|
|
110
|
-
notes?: string | undefined;
|
|
111
|
-
address?: string | undefined;
|
|
112
|
-
latitude?: number | undefined;
|
|
113
|
-
longitude?: number | undefined;
|
|
114
|
-
locationNo?: string | undefined;
|
|
115
|
-
checkInTime?: number | undefined;
|
|
116
|
-
locationName?: string | undefined;
|
|
117
|
-
} | undefined;
|
|
118
|
-
priority?: "L" | "M" | "H" | "C" | undefined;
|
|
119
|
-
operation?: "CREATE" | "UPDATE" | "SYNC" | "MERGE" | undefined;
|
|
120
|
-
assignedTo?: {
|
|
121
|
-
serial?: string | undefined;
|
|
122
|
-
externalId?: string | undefined;
|
|
123
|
-
} | undefined;
|
|
124
|
-
timeWindows?: {
|
|
125
|
-
[x: string]: unknown;
|
|
126
|
-
twTo: string;
|
|
127
|
-
twFrom: string;
|
|
128
|
-
}[] | undefined;
|
|
129
|
-
allowedDates?: {
|
|
130
|
-
to: string;
|
|
131
|
-
from: string;
|
|
132
|
-
} | undefined;
|
|
133
|
-
customField1?: string | undefined;
|
|
134
|
-
customField2?: string | undefined;
|
|
135
|
-
customField3?: string | undefined;
|
|
136
|
-
customField4?: string | undefined;
|
|
137
|
-
customField5?: string | undefined;
|
|
138
|
-
customFields?: Record<string, unknown> | undefined;
|
|
139
|
-
allowedWeekdays?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[] | undefined;
|
|
140
|
-
vehicleFeatures?: string[] | undefined;
|
|
141
|
-
allowedDateTimes?: Record<string, unknown>[] | undefined;
|
|
142
|
-
acceptDuplicateOrderNo?: boolean | undefined;
|
|
143
|
-
notificationPreference?: "email" | "dont_notify" | "sms" | "both" | undefined;
|
|
144
|
-
}[];
|
|
145
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential<"optimoroute", z.ZodObject<{
|
|
146
|
-
connectionId: z.ZodString;
|
|
147
|
-
entityId: z.ZodString;
|
|
148
|
-
instanceId: z.ZodString;
|
|
149
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
150
|
-
generic_api_key: z.ZodString;
|
|
151
|
-
}, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"optimoroute", z.ZodObject<{
|
|
152
|
-
connectionId: z.ZodString;
|
|
153
|
-
entityId: z.ZodString;
|
|
154
|
-
instanceId: z.ZodString;
|
|
155
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
156
|
-
generic_api_key: z.ZodString;
|
|
157
|
-
}, z.core.$strip>>]>;
|
|
95
|
+
declare const optimorouteCreateOrUpdateOrders: AppAction<typeof OptimorouteCreateOrUpdateOrdersInput, typeof OptimorouteCreateOrUpdateOrdersOutput, typeof optimoroute.credential>;
|
|
158
96
|
//#endregion
|
|
159
97
|
export { optimorouteCreateOrUpdateOrders };
|
|
160
98
|
//# sourceMappingURL=create-or-update-orders.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-or-update-orders.d.cts","names":[],"sources":["../../src/actions/create-or-update-orders.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-or-update-orders.d.cts","names":[],"sources":["../../src/actions/create-or-update-orders.ts"],"mappings":";;;;;cAMa,oCAAA,EAAoC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA2DpC,qCAAA,EAAqC,CAAA,CAAA,SAAA;;;;;;;;;;;cAKrC,+BAAA,EAAiC,SAAA,QACrC,oCAAA,SACA,qCAAA,SACA,WAAA,CAAY,UAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { optimoroute } from "../app.mjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/create-or-update-orders.d.ts
|
|
@@ -90,71 +92,7 @@ declare const OptimorouteCreateOrUpdateOrdersOutput: z.ZodObject<{
|
|
|
90
92
|
}, z.core.$loose>>;
|
|
91
93
|
success: z.ZodNullable<z.ZodBoolean>;
|
|
92
94
|
}, z.core.$loose>;
|
|
93
|
-
declare const optimorouteCreateOrUpdateOrders:
|
|
94
|
-
orders: {
|
|
95
|
-
[x: string]: unknown;
|
|
96
|
-
id?: string | undefined;
|
|
97
|
-
date?: string | undefined;
|
|
98
|
-
type?: "D" | "P" | "T" | undefined;
|
|
99
|
-
email?: string | undefined;
|
|
100
|
-
load1?: number | undefined;
|
|
101
|
-
load2?: number | undefined;
|
|
102
|
-
load3?: number | undefined;
|
|
103
|
-
load4?: number | undefined;
|
|
104
|
-
notes?: string | undefined;
|
|
105
|
-
phone?: string | undefined;
|
|
106
|
-
skills?: string[] | undefined;
|
|
107
|
-
orderNo?: string | undefined;
|
|
108
|
-
duration?: number | undefined;
|
|
109
|
-
location?: {
|
|
110
|
-
notes?: string | undefined;
|
|
111
|
-
address?: string | undefined;
|
|
112
|
-
latitude?: number | undefined;
|
|
113
|
-
longitude?: number | undefined;
|
|
114
|
-
locationNo?: string | undefined;
|
|
115
|
-
checkInTime?: number | undefined;
|
|
116
|
-
locationName?: string | undefined;
|
|
117
|
-
} | undefined;
|
|
118
|
-
priority?: "L" | "M" | "H" | "C" | undefined;
|
|
119
|
-
operation?: "CREATE" | "UPDATE" | "SYNC" | "MERGE" | undefined;
|
|
120
|
-
assignedTo?: {
|
|
121
|
-
serial?: string | undefined;
|
|
122
|
-
externalId?: string | undefined;
|
|
123
|
-
} | undefined;
|
|
124
|
-
timeWindows?: {
|
|
125
|
-
[x: string]: unknown;
|
|
126
|
-
twTo: string;
|
|
127
|
-
twFrom: string;
|
|
128
|
-
}[] | undefined;
|
|
129
|
-
allowedDates?: {
|
|
130
|
-
to: string;
|
|
131
|
-
from: string;
|
|
132
|
-
} | undefined;
|
|
133
|
-
customField1?: string | undefined;
|
|
134
|
-
customField2?: string | undefined;
|
|
135
|
-
customField3?: string | undefined;
|
|
136
|
-
customField4?: string | undefined;
|
|
137
|
-
customField5?: string | undefined;
|
|
138
|
-
customFields?: Record<string, unknown> | undefined;
|
|
139
|
-
allowedWeekdays?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[] | undefined;
|
|
140
|
-
vehicleFeatures?: string[] | undefined;
|
|
141
|
-
allowedDateTimes?: Record<string, unknown>[] | undefined;
|
|
142
|
-
acceptDuplicateOrderNo?: boolean | undefined;
|
|
143
|
-
notificationPreference?: "email" | "dont_notify" | "sms" | "both" | undefined;
|
|
144
|
-
}[];
|
|
145
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential<"optimoroute", z.ZodObject<{
|
|
146
|
-
connectionId: z.ZodString;
|
|
147
|
-
entityId: z.ZodString;
|
|
148
|
-
instanceId: z.ZodString;
|
|
149
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
150
|
-
generic_api_key: z.ZodString;
|
|
151
|
-
}, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"optimoroute", z.ZodObject<{
|
|
152
|
-
connectionId: z.ZodString;
|
|
153
|
-
entityId: z.ZodString;
|
|
154
|
-
instanceId: z.ZodString;
|
|
155
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
156
|
-
generic_api_key: z.ZodString;
|
|
157
|
-
}, z.core.$strip>>]>;
|
|
95
|
+
declare const optimorouteCreateOrUpdateOrders: AppAction<typeof OptimorouteCreateOrUpdateOrdersInput, typeof OptimorouteCreateOrUpdateOrdersOutput, typeof optimoroute.credential>;
|
|
158
96
|
//#endregion
|
|
159
97
|
export { optimorouteCreateOrUpdateOrders };
|
|
160
98
|
//# sourceMappingURL=create-or-update-orders.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-or-update-orders.d.mts","names":[],"sources":["../../src/actions/create-or-update-orders.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-or-update-orders.d.mts","names":[],"sources":["../../src/actions/create-or-update-orders.ts"],"mappings":";;;;;cAMa,oCAAA,EAAoC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA2DpC,qCAAA,EAAqC,CAAA,CAAA,SAAA;;;;;;;;;;;cAKrC,+BAAA,EAAiC,SAAA,QACrC,oCAAA,SACA,qCAAA,SACA,WAAA,CAAY,UAAA"}
|
|
@@ -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}).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,M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C,CAAC,SAAS,CAAC,CAAC,SAAS;CAChG,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpF,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS;CAC3F,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D,CAAC,CAAC,SAAS,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"}
|
|
1
|
+
{"version":3,"file":"create-or-update-orders.mjs","names":[],"sources":["../../src/actions/create-or-update-orders.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { optimoroute } from \"../app\";\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: AppAction<\n typeof OptimorouteCreateOrUpdateOrdersInput,\n typeof OptimorouteCreateOrUpdateOrdersOutput,\n typeof optimoroute.credential\n> = 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":";;;;AAMA,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,CAAC,CAAC,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"}
|
|
@@ -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}).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":"
|
|
1
|
+
{"version":3,"file":"create-order.cjs","names":["z","action"],"sources":["../../src/actions/create-order.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { optimoroute } from \"../app\";\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: AppAction<\n typeof OptimorouteCreateOrderInput,\n typeof OptimorouteCreateOrderOutput,\n typeof optimoroute.credential\n> = 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":";;;;AAMA,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,CAAC,SAAS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aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { optimoroute } from "../app.cjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/create-order.d.ts
|
|
@@ -57,58 +59,7 @@ declare const OptimorouteCreateOrderOutput: z.ZodObject<{
|
|
|
57
59
|
}, z.core.$loose>>>;
|
|
58
60
|
geocodingResults: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodArray<z.ZodUnknown>>>>;
|
|
59
61
|
}, z.core.$loose>;
|
|
60
|
-
declare const optimorouteCreateOrder:
|
|
61
|
-
date: string;
|
|
62
|
-
location: {
|
|
63
|
-
notes?: string | undefined;
|
|
64
|
-
address?: string | undefined;
|
|
65
|
-
latitude?: number | undefined;
|
|
66
|
-
longitude?: number | undefined;
|
|
67
|
-
locationNo?: string | undefined;
|
|
68
|
-
checkInTime?: number | undefined;
|
|
69
|
-
locationName?: string | undefined;
|
|
70
|
-
storeInvalid?: boolean | undefined;
|
|
71
|
-
acceptPartialMatch?: boolean | undefined;
|
|
72
|
-
acceptMultipleResults?: boolean | undefined;
|
|
73
|
-
};
|
|
74
|
-
operation: string;
|
|
75
|
-
orderType: string;
|
|
76
|
-
id?: string | undefined;
|
|
77
|
-
load1?: number | undefined;
|
|
78
|
-
load2?: number | undefined;
|
|
79
|
-
load3?: number | undefined;
|
|
80
|
-
load4?: number | undefined;
|
|
81
|
-
notes?: string | undefined;
|
|
82
|
-
skills?: string[] | undefined;
|
|
83
|
-
orderNo?: string | undefined;
|
|
84
|
-
duration?: number | undefined;
|
|
85
|
-
priority?: string | undefined;
|
|
86
|
-
timeWindows?: {
|
|
87
|
-
[x: string]: unknown;
|
|
88
|
-
twTo: string;
|
|
89
|
-
twFrom: string;
|
|
90
|
-
}[] | undefined;
|
|
91
|
-
customField1?: string | undefined;
|
|
92
|
-
customField2?: string | undefined;
|
|
93
|
-
customField3?: string | undefined;
|
|
94
|
-
customField4?: string | undefined;
|
|
95
|
-
customField5?: string | undefined;
|
|
96
|
-
customFields?: Record<string, unknown> | undefined;
|
|
97
|
-
vehicleFeatures?: string[] | undefined;
|
|
98
|
-
acceptDuplicateOrderNo?: boolean | undefined;
|
|
99
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential<"optimoroute", z.ZodObject<{
|
|
100
|
-
connectionId: z.ZodString;
|
|
101
|
-
entityId: z.ZodString;
|
|
102
|
-
instanceId: z.ZodString;
|
|
103
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
104
|
-
generic_api_key: z.ZodString;
|
|
105
|
-
}, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"optimoroute", z.ZodObject<{
|
|
106
|
-
connectionId: z.ZodString;
|
|
107
|
-
entityId: z.ZodString;
|
|
108
|
-
instanceId: z.ZodString;
|
|
109
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
110
|
-
generic_api_key: z.ZodString;
|
|
111
|
-
}, z.core.$strip>>]>;
|
|
62
|
+
declare const optimorouteCreateOrder: AppAction<typeof OptimorouteCreateOrderInput, typeof OptimorouteCreateOrderOutput, typeof optimoroute.credential>;
|
|
112
63
|
//#endregion
|
|
113
64
|
export { optimorouteCreateOrder };
|
|
114
65
|
//# sourceMappingURL=create-order.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-order.d.cts","names":[],"sources":["../../src/actions/create-order.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-order.d.cts","names":[],"sources":["../../src/actions/create-order.ts"],"mappings":";;;;;cAMa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiD3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;cAS5B,sBAAA,EAAwB,SAAA,QAC5B,2BAAA,SACA,4BAAA,SACA,WAAA,CAAY,UAAA"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { optimoroute } from "../app.mjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/create-order.d.ts
|
|
@@ -57,58 +59,7 @@ declare const OptimorouteCreateOrderOutput: z.ZodObject<{
|
|
|
57
59
|
}, z.core.$loose>>>;
|
|
58
60
|
geocodingResults: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodArray<z.ZodUnknown>>>>;
|
|
59
61
|
}, z.core.$loose>;
|
|
60
|
-
declare const optimorouteCreateOrder:
|
|
61
|
-
date: string;
|
|
62
|
-
location: {
|
|
63
|
-
notes?: string | undefined;
|
|
64
|
-
address?: string | undefined;
|
|
65
|
-
latitude?: number | undefined;
|
|
66
|
-
longitude?: number | undefined;
|
|
67
|
-
locationNo?: string | undefined;
|
|
68
|
-
checkInTime?: number | undefined;
|
|
69
|
-
locationName?: string | undefined;
|
|
70
|
-
storeInvalid?: boolean | undefined;
|
|
71
|
-
acceptPartialMatch?: boolean | undefined;
|
|
72
|
-
acceptMultipleResults?: boolean | undefined;
|
|
73
|
-
};
|
|
74
|
-
operation: string;
|
|
75
|
-
orderType: string;
|
|
76
|
-
id?: string | undefined;
|
|
77
|
-
load1?: number | undefined;
|
|
78
|
-
load2?: number | undefined;
|
|
79
|
-
load3?: number | undefined;
|
|
80
|
-
load4?: number | undefined;
|
|
81
|
-
notes?: string | undefined;
|
|
82
|
-
skills?: string[] | undefined;
|
|
83
|
-
orderNo?: string | undefined;
|
|
84
|
-
duration?: number | undefined;
|
|
85
|
-
priority?: string | undefined;
|
|
86
|
-
timeWindows?: {
|
|
87
|
-
[x: string]: unknown;
|
|
88
|
-
twTo: string;
|
|
89
|
-
twFrom: string;
|
|
90
|
-
}[] | undefined;
|
|
91
|
-
customField1?: string | undefined;
|
|
92
|
-
customField2?: string | undefined;
|
|
93
|
-
customField3?: string | undefined;
|
|
94
|
-
customField4?: string | undefined;
|
|
95
|
-
customField5?: string | undefined;
|
|
96
|
-
customFields?: Record<string, unknown> | undefined;
|
|
97
|
-
vehicleFeatures?: string[] | undefined;
|
|
98
|
-
acceptDuplicateOrderNo?: boolean | undefined;
|
|
99
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential<"optimoroute", z.ZodObject<{
|
|
100
|
-
connectionId: z.ZodString;
|
|
101
|
-
entityId: z.ZodString;
|
|
102
|
-
instanceId: z.ZodString;
|
|
103
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
104
|
-
generic_api_key: z.ZodString;
|
|
105
|
-
}, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"optimoroute", z.ZodObject<{
|
|
106
|
-
connectionId: z.ZodString;
|
|
107
|
-
entityId: z.ZodString;
|
|
108
|
-
instanceId: z.ZodString;
|
|
109
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
110
|
-
generic_api_key: z.ZodString;
|
|
111
|
-
}, z.core.$strip>>]>;
|
|
62
|
+
declare const optimorouteCreateOrder: AppAction<typeof OptimorouteCreateOrderInput, typeof OptimorouteCreateOrderOutput, typeof optimoroute.credential>;
|
|
112
63
|
//#endregion
|
|
113
64
|
export { optimorouteCreateOrder };
|
|
114
65
|
//# sourceMappingURL=create-order.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-order.d.mts","names":[],"sources":["../../src/actions/create-order.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-order.d.mts","names":[],"sources":["../../src/actions/create-order.ts"],"mappings":";;;;;cAMa,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiD3B,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;cAS5B,sBAAA,EAAwB,SAAA,QAC5B,2BAAA,SACA,4BAAA,SACA,WAAA,CAAY,UAAA"}
|
|
@@ -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}).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":"
|
|
1
|
+
{"version":3,"file":"create-order.mjs","names":[],"sources":["../../src/actions/create-order.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { optimoroute } from \"../app\";\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: AppAction<\n typeof OptimorouteCreateOrderInput,\n typeof OptimorouteCreateOrderOutput,\n typeof optimoroute.credential\n> = 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":";;;;AAMA,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,UAAU,EAAE,OAAO;EACnB,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS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O,CAAC,CAAC,SAAS,eAAe,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACzE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,gCAAgC;AAU1D,MAAa,yBAIT,OAAO,4BAA4B;CACrC,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAlB0C,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,oDAWhB;AACV,CAAC"}
|
|
@@ -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}).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":"
|
|
1
|
+
{"version":3,"file":"delete-all-orders.cjs","names":["z","action"],"sources":["../../src/actions/delete-all-orders.ts"],"sourcesContent":["import type { AppAction } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\nimport { action } from \"../action\";\nimport { optimoroute } from \"../app\";\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: AppAction<\n typeof OptimorouteDeleteAllOrdersInput,\n typeof OptimorouteDeleteAllOrdersOutput,\n typeof optimoroute.credential\n> = 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":";;;;AAMA,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,6BAITC,eAAAA,OAAO,iCAAiC;CAC1C,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { optimoroute } from "../app.cjs";
|
|
2
|
+
import { AppAction } from "@keystrokehq/keystroke/app";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
//#region src/actions/delete-all-orders.d.ts
|
|
@@ -10,21 +12,7 @@ declare const OptimorouteDeleteAllOrdersOutput: z.ZodObject<{
|
|
|
10
12
|
success: z.ZodNullable<z.ZodBoolean>;
|
|
11
13
|
planningId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
12
14
|
}, z.core.$loose>;
|
|
13
|
-
declare const optimorouteDeleteAllOrders:
|
|
14
|
-
date?: string | undefined;
|
|
15
|
-
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential<"optimoroute", z.ZodObject<{
|
|
16
|
-
connectionId: z.ZodString;
|
|
17
|
-
entityId: z.ZodString;
|
|
18
|
-
instanceId: z.ZodString;
|
|
19
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
20
|
-
generic_api_key: z.ZodString;
|
|
21
|
-
}, z.core.$strip>>]>, readonly [import("@keystrokehq/shared").Credential<"optimoroute", z.ZodObject<{
|
|
22
|
-
connectionId: z.ZodString;
|
|
23
|
-
entityId: z.ZodString;
|
|
24
|
-
instanceId: z.ZodString;
|
|
25
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
26
|
-
generic_api_key: z.ZodString;
|
|
27
|
-
}, z.core.$strip>>]>;
|
|
15
|
+
declare const optimorouteDeleteAllOrders: AppAction<typeof OptimorouteDeleteAllOrdersInput, typeof OptimorouteDeleteAllOrdersOutput, typeof optimoroute.credential>;
|
|
28
16
|
//#endregion
|
|
29
17
|
export { optimorouteDeleteAllOrders };
|
|
30
18
|
//# sourceMappingURL=delete-all-orders.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-all-orders.d.cts","names":[],"sources":["../../src/actions/delete-all-orders.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"delete-all-orders.d.cts","names":[],"sources":["../../src/actions/delete-all-orders.ts"],"mappings":";;;;;cAMa,+BAAA,EAA+B,CAAA,CAAA,SAAA;;;cAG/B,gCAAA,EAAgC,CAAA,CAAA,SAAA;;;;;;cAOhC,0BAAA,EAA4B,SAAA,QAChC,+BAAA,SACA,gCAAA,SACA,WAAA,CAAY,UAAA"}
|