@keystrokehq/optimoroute 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/dist/action.cjs +21 -0
- package/dist/action.cjs.map +1 -0
- package/dist/action.mjs +21 -0
- package/dist/action.mjs.map +1 -0
- package/dist/actions/create-or-update-orders.cjs +102 -0
- package/dist/actions/create-or-update-orders.cjs.map +1 -0
- package/dist/actions/create-or-update-orders.d.cts +9 -0
- package/dist/actions/create-or-update-orders.d.cts.map +1 -0
- package/dist/actions/create-or-update-orders.d.mts +9 -0
- package/dist/actions/create-or-update-orders.d.mts.map +1 -0
- package/dist/actions/create-or-update-orders.mjs +101 -0
- package/dist/actions/create-or-update-orders.mjs.map +1 -0
- package/dist/actions/create-order.cjs +71 -0
- package/dist/actions/create-order.cjs.map +1 -0
- package/dist/actions/create-order.d.cts +9 -0
- package/dist/actions/create-order.d.cts.map +1 -0
- package/dist/actions/create-order.d.mts +9 -0
- package/dist/actions/create-order.d.mts.map +1 -0
- package/dist/actions/create-order.mjs +70 -0
- package/dist/actions/create-order.mjs.map +1 -0
- package/dist/actions/delete-all-orders.cjs +21 -0
- package/dist/actions/delete-all-orders.cjs.map +1 -0
- package/dist/actions/delete-all-orders.d.cts +9 -0
- package/dist/actions/delete-all-orders.d.cts.map +1 -0
- package/dist/actions/delete-all-orders.d.mts +9 -0
- package/dist/actions/delete-all-orders.d.mts.map +1 -0
- package/dist/actions/delete-all-orders.mjs +18 -0
- package/dist/actions/delete-all-orders.mjs.map +1 -0
- package/dist/actions/delete-order.cjs +24 -0
- package/dist/actions/delete-order.cjs.map +1 -0
- package/dist/actions/delete-order.d.cts +9 -0
- package/dist/actions/delete-order.d.cts.map +1 -0
- package/dist/actions/delete-order.d.mts +9 -0
- package/dist/actions/delete-order.d.mts.map +1 -0
- package/dist/actions/delete-order.mjs +21 -0
- package/dist/actions/delete-order.mjs.map +1 -0
- package/dist/actions/delete-orders.cjs +34 -0
- package/dist/actions/delete-orders.cjs.map +1 -0
- package/dist/actions/delete-orders.d.cts +9 -0
- package/dist/actions/delete-orders.d.cts.map +1 -0
- package/dist/actions/delete-orders.d.mts +9 -0
- package/dist/actions/delete-orders.d.mts.map +1 -0
- package/dist/actions/delete-orders.mjs +33 -0
- package/dist/actions/delete-orders.mjs.map +1 -0
- package/dist/actions/get-completion-details.cjs +43 -0
- package/dist/actions/get-completion-details.cjs.map +1 -0
- package/dist/actions/get-completion-details.d.cts +9 -0
- package/dist/actions/get-completion-details.d.cts.map +1 -0
- package/dist/actions/get-completion-details.d.mts +9 -0
- package/dist/actions/get-completion-details.d.mts.map +1 -0
- package/dist/actions/get-completion-details.mjs +42 -0
- package/dist/actions/get-completion-details.mjs.map +1 -0
- package/dist/actions/get-drivers.cjs +34 -0
- package/dist/actions/get-drivers.cjs.map +1 -0
- package/dist/actions/get-drivers.d.cts +9 -0
- package/dist/actions/get-drivers.d.cts.map +1 -0
- package/dist/actions/get-drivers.d.mts +9 -0
- package/dist/actions/get-drivers.d.mts.map +1 -0
- package/dist/actions/get-drivers.mjs +33 -0
- package/dist/actions/get-drivers.mjs.map +1 -0
- package/dist/actions/get-events.cjs +40 -0
- package/dist/actions/get-events.cjs.map +1 -0
- package/dist/actions/get-events.d.cts +9 -0
- package/dist/actions/get-events.d.cts.map +1 -0
- package/dist/actions/get-events.d.mts +9 -0
- package/dist/actions/get-events.d.mts.map +1 -0
- package/dist/actions/get-events.mjs +39 -0
- package/dist/actions/get-events.mjs.map +1 -0
- package/dist/actions/get-orders.cjs +88 -0
- package/dist/actions/get-orders.cjs.map +1 -0
- package/dist/actions/get-orders.d.cts +9 -0
- package/dist/actions/get-orders.d.cts.map +1 -0
- package/dist/actions/get-orders.d.mts +9 -0
- package/dist/actions/get-orders.d.mts.map +1 -0
- package/dist/actions/get-orders.mjs +87 -0
- package/dist/actions/get-orders.mjs.map +1 -0
- package/dist/actions/get-planning-status.cjs +22 -0
- package/dist/actions/get-planning-status.cjs.map +1 -0
- package/dist/actions/get-planning-status.d.cts +9 -0
- package/dist/actions/get-planning-status.d.cts.map +1 -0
- package/dist/actions/get-planning-status.d.mts +9 -0
- package/dist/actions/get-planning-status.d.mts.map +1 -0
- package/dist/actions/get-planning-status.mjs +19 -0
- package/dist/actions/get-planning-status.mjs.map +1 -0
- package/dist/actions/get-routes.cjs +66 -0
- package/dist/actions/get-routes.cjs.map +1 -0
- package/dist/actions/get-routes.d.cts +9 -0
- package/dist/actions/get-routes.d.cts.map +1 -0
- package/dist/actions/get-routes.d.mts +9 -0
- package/dist/actions/get-routes.d.mts.map +1 -0
- package/dist/actions/get-routes.mjs +65 -0
- package/dist/actions/get-routes.mjs.map +1 -0
- package/dist/actions/get-scheduling-info.cjs +38 -0
- package/dist/actions/get-scheduling-info.cjs.map +1 -0
- package/dist/actions/get-scheduling-info.d.cts +9 -0
- package/dist/actions/get-scheduling-info.d.cts.map +1 -0
- package/dist/actions/get-scheduling-info.d.mts +9 -0
- package/dist/actions/get-scheduling-info.d.mts.map +1 -0
- package/dist/actions/get-scheduling-info.mjs +37 -0
- package/dist/actions/get-scheduling-info.mjs.map +1 -0
- package/dist/actions/index.cjs +35 -0
- package/dist/actions/index.d.cts +18 -0
- package/dist/actions/index.d.mts +18 -0
- package/dist/actions/index.mjs +18 -0
- package/dist/actions/search-orders.cjs +86 -0
- package/dist/actions/search-orders.cjs.map +1 -0
- package/dist/actions/search-orders.d.cts +9 -0
- package/dist/actions/search-orders.d.cts.map +1 -0
- package/dist/actions/search-orders.d.mts +9 -0
- package/dist/actions/search-orders.d.mts.map +1 -0
- package/dist/actions/search-orders.mjs +85 -0
- package/dist/actions/search-orders.mjs.map +1 -0
- package/dist/actions/start-planning.cjs +55 -0
- package/dist/actions/start-planning.cjs.map +1 -0
- package/dist/actions/start-planning.d.cts +9 -0
- package/dist/actions/start-planning.d.cts.map +1 -0
- package/dist/actions/start-planning.d.mts +9 -0
- package/dist/actions/start-planning.d.mts.map +1 -0
- package/dist/actions/start-planning.mjs +52 -0
- package/dist/actions/start-planning.mjs.map +1 -0
- package/dist/actions/stop-planning.cjs +20 -0
- package/dist/actions/stop-planning.cjs.map +1 -0
- package/dist/actions/stop-planning.d.cts +9 -0
- package/dist/actions/stop-planning.d.cts.map +1 -0
- package/dist/actions/stop-planning.d.mts +9 -0
- package/dist/actions/stop-planning.d.mts.map +1 -0
- package/dist/actions/stop-planning.mjs +17 -0
- package/dist/actions/stop-planning.mjs.map +1 -0
- package/dist/actions/update-driver-parameters.cjs +37 -0
- package/dist/actions/update-driver-parameters.cjs.map +1 -0
- package/dist/actions/update-driver-parameters.d.cts +9 -0
- package/dist/actions/update-driver-parameters.d.cts.map +1 -0
- package/dist/actions/update-driver-parameters.d.mts +9 -0
- package/dist/actions/update-driver-parameters.d.mts.map +1 -0
- package/dist/actions/update-driver-parameters.mjs +34 -0
- package/dist/actions/update-driver-parameters.mjs.map +1 -0
- package/dist/actions/update-drivers-parameters.cjs +61 -0
- package/dist/actions/update-drivers-parameters.cjs.map +1 -0
- package/dist/actions/update-drivers-parameters.d.cts +9 -0
- package/dist/actions/update-drivers-parameters.d.cts.map +1 -0
- package/dist/actions/update-drivers-parameters.d.mts +9 -0
- package/dist/actions/update-drivers-parameters.d.mts.map +1 -0
- package/dist/actions/update-drivers-parameters.mjs +60 -0
- package/dist/actions/update-drivers-parameters.mjs.map +1 -0
- package/dist/app.cjs +9 -0
- package/dist/app.cjs.map +1 -0
- package/dist/app.d.cts +5 -0
- package/dist/app.d.cts.map +1 -0
- package/dist/app.d.mts +5 -0
- package/dist/app.d.mts.map +1 -0
- package/dist/app.mjs +10 -0
- package/dist/app.mjs.map +1 -0
- package/dist/catalog.cjs +15 -0
- package/dist/catalog.cjs.map +1 -0
- package/dist/catalog.d.cts +14 -0
- package/dist/catalog.d.cts.map +1 -0
- package/dist/catalog.d.mts +14 -0
- package/dist/catalog.d.mts.map +1 -0
- package/dist/catalog.mjs +15 -0
- package/dist/catalog.mjs.map +1 -0
- package/dist/execute.cjs +18 -0
- package/dist/execute.cjs.map +1 -0
- package/dist/execute.mjs +18 -0
- package/dist/execute.mjs.map +1 -0
- package/dist/index.cjs +40 -0
- package/dist/index.d.cts +20 -0
- package/dist/index.d.mts +20 -0
- package/dist/index.mjs +21 -0
- package/package.json +49 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/get-routes.d.ts
|
|
4
|
+
declare const OptimorouteGetRoutesInput: z.ZodTypeAny;
|
|
5
|
+
declare const OptimorouteGetRoutesOutput: z.ZodTypeAny;
|
|
6
|
+
declare const optimorouteGetRoutes: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { optimorouteGetRoutes };
|
|
9
|
+
//# sourceMappingURL=get-routes.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-routes.d.cts","names":[],"sources":["../../src/actions/get-routes.ts"],"mappings":";;;cAIa,yBAAA,EAA2B,CAAA,CAAE,UAOkC;AAAA,cAuC/D,0BAAA,EAA4B,CAAA,CAAE,UAKU;AAAA,cAExC,oBAAA,gCAAoB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/get-routes.d.ts
|
|
4
|
+
declare const OptimorouteGetRoutesInput: z.ZodTypeAny;
|
|
5
|
+
declare const OptimorouteGetRoutesOutput: z.ZodTypeAny;
|
|
6
|
+
declare const optimorouteGetRoutes: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { optimorouteGetRoutes };
|
|
9
|
+
//# sourceMappingURL=get-routes.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-routes.d.mts","names":[],"sources":["../../src/actions/get-routes.ts"],"mappings":";;;cAIa,yBAAA,EAA2B,CAAA,CAAE,UAOkC;AAAA,cAuC/D,0BAAA,EAA4B,CAAA,CAAE,UAKU;AAAA,cAExC,oBAAA,gCAAoB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/actions/get-routes.ts
|
|
4
|
+
const OptimorouteGetRoutesInput = z.object({
|
|
5
|
+
route_date: z.string().describe("Date for which to retrieve routes in YYYY-MM-DD format"),
|
|
6
|
+
driver_serial: z.string().describe("Filter results by driver's serial number").optional(),
|
|
7
|
+
driver_external_id: z.string().describe("Filter results by driver's external identifier").optional(),
|
|
8
|
+
vehicle_registration: z.string().describe("Filter results by vehicle registration").optional(),
|
|
9
|
+
include_route_polyline: z.boolean().default(false).describe("Include encoded route polyline for map display").optional(),
|
|
10
|
+
include_route_start_end: z.boolean().default(false).describe("Include route's start and end locations").optional()
|
|
11
|
+
}).describe("Request parameters for retrieving routes for a specific date.");
|
|
12
|
+
const OptimorouteGetRoutes_StopSchema = z.object({
|
|
13
|
+
id: z.string().describe("OptimoRoute unique stop identifier").nullable().optional(),
|
|
14
|
+
type: z.string().describe("Stop type (D=delivery, P=pickup, T=task, etc.)").nullable().optional(),
|
|
15
|
+
address: z.string().describe("Full address for the stop").nullable().optional(),
|
|
16
|
+
orderNo: z.string().describe("Order number associated with this stop").nullable().optional(),
|
|
17
|
+
distance: z.number().describe("Distance to this stop in kilometers").nullable().optional(),
|
|
18
|
+
latitude: z.number().describe("GPS latitude coordinate").nullable().optional(),
|
|
19
|
+
longitude: z.number().describe("GPS longitude coordinate").nullable().optional(),
|
|
20
|
+
locationNo: z.string().describe("Location identifier").nullable().optional(),
|
|
21
|
+
stopNumber: z.number().int().describe("Stop sequence number in the route").nullable().optional(),
|
|
22
|
+
travelTime: z.number().int().describe("Travel time to this stop in minutes").nullable().optional(),
|
|
23
|
+
scheduledAt: z.string().describe("Scheduled time in HH:MM format").nullable().optional(),
|
|
24
|
+
locationName: z.string().describe("Display name for the location").nullable().optional(),
|
|
25
|
+
arrivalTimeDt: z.string().describe("Actual arrival datetime in YYYY-MM-DD HH:MM:SS format").nullable().optional(),
|
|
26
|
+
scheduledAtDt: z.string().describe("Scheduled datetime in YYYY-MM-DD HH:MM:SS format").nullable().optional()
|
|
27
|
+
}).describe("Details of a single stop in a route.");
|
|
28
|
+
const OptimorouteGetRoutes_RouteStartEndSchema = z.object({
|
|
29
|
+
address: z.string().describe("Address of the location").nullable().optional(),
|
|
30
|
+
latitude: z.number().describe("GPS latitude coordinate").nullable().optional(),
|
|
31
|
+
longitude: z.number().describe("GPS longitude coordinate").nullable().optional()
|
|
32
|
+
}).describe("Route start or end location details.");
|
|
33
|
+
const OptimorouteGetRoutes_RouteSchema = z.object({
|
|
34
|
+
load1: z.number().describe("Load metric 1").nullable().optional(),
|
|
35
|
+
load2: z.number().describe("Load metric 2").nullable().optional(),
|
|
36
|
+
load3: z.number().describe("Load metric 3").nullable().optional(),
|
|
37
|
+
load4: z.number().describe("Load metric 4").nullable().optional(),
|
|
38
|
+
stops: z.array(OptimorouteGetRoutes_StopSchema).describe("List of stops in the route").nullable().optional(),
|
|
39
|
+
distance: z.number().describe("Route distance in kilometers").nullable().optional(),
|
|
40
|
+
duration: z.number().int().describe("Route duration in minutes").nullable().optional(),
|
|
41
|
+
routeEnd: OptimorouteGetRoutes_RouteStartEndSchema.nullable().optional(),
|
|
42
|
+
driverName: z.string().describe("Driver's display name").nullable().optional(),
|
|
43
|
+
routeStart: OptimorouteGetRoutes_RouteStartEndSchema.nullable().optional(),
|
|
44
|
+
driverSerial: z.string().describe("Driver's serial number").nullable().optional(),
|
|
45
|
+
vehicleLabel: z.string().describe("Vehicle display label").nullable().optional(),
|
|
46
|
+
routePolyline: z.string().describe("Encoded route polyline for map display").nullable().optional(),
|
|
47
|
+
driverExternalId: z.string().describe("Driver's external identifier").nullable().optional(),
|
|
48
|
+
vehicleRegistration: z.string().describe("Vehicle registration number").nullable().optional()
|
|
49
|
+
}).describe("Represents a planned route for a given date.");
|
|
50
|
+
const optimorouteGetRoutes = action("OPTIMOROUTE_GET_ROUTES", {
|
|
51
|
+
slug: "optimoroute-get-routes",
|
|
52
|
+
name: "Get Planned Routes",
|
|
53
|
+
description: "Tool to retrieve all planned routes for a given date. Use when you need a detailed view of routes including optional stops, route parameters, and unassigned orders.",
|
|
54
|
+
input: OptimorouteGetRoutesInput,
|
|
55
|
+
output: z.object({
|
|
56
|
+
code: z.string().describe("Error code if the request was unsuccessful").nullable().optional(),
|
|
57
|
+
routes: z.array(OptimorouteGetRoutes_RouteSchema).describe("List of route objects for the specified date").nullable().optional(),
|
|
58
|
+
message: z.string().describe("Error message providing details about the issue").nullable().optional(),
|
|
59
|
+
success: z.boolean().describe("Indicates if the request was successful")
|
|
60
|
+
}).describe("Response schema for retrieving routes.")
|
|
61
|
+
});
|
|
62
|
+
//#endregion
|
|
63
|
+
export { optimorouteGetRoutes };
|
|
64
|
+
|
|
65
|
+
//# sourceMappingURL=get-routes.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-routes.mjs","names":[],"sources":["../../src/actions/get-routes.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OptimorouteGetRoutesInput: z.ZodTypeAny = z.object({\n route_date: z.string().describe(\"Date for which to retrieve routes in YYYY-MM-DD format\"),\n driver_serial: z.string().describe(\"Filter results by driver's serial number\").optional(),\n driver_external_id: z.string().describe(\"Filter results by driver's external identifier\").optional(),\n vehicle_registration: z.string().describe(\"Filter results by vehicle registration\").optional(),\n include_route_polyline: z.boolean().default(false).describe(\"Include encoded route polyline for map display\").optional(),\n include_route_start_end: z.boolean().default(false).describe(\"Include route's start and end locations\").optional(),\n}).describe(\"Request parameters for retrieving routes for a specific date.\");\nconst OptimorouteGetRoutes_StopSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"OptimoRoute unique stop identifier\").nullable().optional(),\n type: z.string().describe(\"Stop type (D=delivery, P=pickup, T=task, etc.)\").nullable().optional(),\n address: z.string().describe(\"Full address for the stop\").nullable().optional(),\n orderNo: z.string().describe(\"Order number associated with this stop\").nullable().optional(),\n distance: z.number().describe(\"Distance to this stop in kilometers\").nullable().optional(),\n latitude: z.number().describe(\"GPS latitude coordinate\").nullable().optional(),\n longitude: z.number().describe(\"GPS longitude coordinate\").nullable().optional(),\n locationNo: z.string().describe(\"Location identifier\").nullable().optional(),\n stopNumber: z.number().int().describe(\"Stop sequence number in the route\").nullable().optional(),\n travelTime: z.number().int().describe(\"Travel time to this stop in minutes\").nullable().optional(),\n scheduledAt: z.string().describe(\"Scheduled time in HH:MM format\").nullable().optional(),\n locationName: z.string().describe(\"Display name for the location\").nullable().optional(),\n arrivalTimeDt: z.string().describe(\"Actual arrival datetime in YYYY-MM-DD HH:MM:SS format\").nullable().optional(),\n scheduledAtDt: z.string().describe(\"Scheduled datetime in YYYY-MM-DD HH:MM:SS format\").nullable().optional(),\n}).describe(\"Details of a single stop in a route.\");\nconst OptimorouteGetRoutes_RouteStartEndSchema: z.ZodTypeAny = z.object({\n address: z.string().describe(\"Address of the location\").nullable().optional(),\n latitude: z.number().describe(\"GPS latitude coordinate\").nullable().optional(),\n longitude: z.number().describe(\"GPS longitude coordinate\").nullable().optional(),\n}).describe(\"Route start or end location details.\");\nconst OptimorouteGetRoutes_RouteSchema: z.ZodTypeAny = z.object({\n load1: z.number().describe(\"Load metric 1\").nullable().optional(),\n load2: z.number().describe(\"Load metric 2\").nullable().optional(),\n load3: z.number().describe(\"Load metric 3\").nullable().optional(),\n load4: z.number().describe(\"Load metric 4\").nullable().optional(),\n stops: z.array(OptimorouteGetRoutes_StopSchema).describe(\"List of stops in the route\").nullable().optional(),\n distance: z.number().describe(\"Route distance in kilometers\").nullable().optional(),\n duration: z.number().int().describe(\"Route duration in minutes\").nullable().optional(),\n routeEnd: OptimorouteGetRoutes_RouteStartEndSchema.nullable().optional(),\n driverName: z.string().describe(\"Driver's display name\").nullable().optional(),\n routeStart: OptimorouteGetRoutes_RouteStartEndSchema.nullable().optional(),\n driverSerial: z.string().describe(\"Driver's serial number\").nullable().optional(),\n vehicleLabel: z.string().describe(\"Vehicle display label\").nullable().optional(),\n routePolyline: z.string().describe(\"Encoded route polyline for map display\").nullable().optional(),\n driverExternalId: z.string().describe(\"Driver's external identifier\").nullable().optional(),\n vehicleRegistration: z.string().describe(\"Vehicle registration number\").nullable().optional(),\n}).describe(\"Represents a planned route for a given date.\");\nexport const OptimorouteGetRoutesOutput: z.ZodTypeAny = z.object({\n code: z.string().describe(\"Error code if the request was unsuccessful\").nullable().optional(),\n routes: z.array(OptimorouteGetRoutes_RouteSchema).describe(\"List of route objects for the specified date\").nullable().optional(),\n message: z.string().describe(\"Error message providing details about the issue\").nullable().optional(),\n success: z.boolean().describe(\"Indicates if the request was successful\"),\n}).describe(\"Response schema for retrieving routes.\");\n\nexport const optimorouteGetRoutes = action(\"OPTIMOROUTE_GET_ROUTES\", {\n slug: \"optimoroute-get-routes\",\n name: \"Get Planned Routes\",\n description: \"Tool to retrieve all planned routes for a given date. Use when you need a detailed view of routes including optional stops, route parameters, and unassigned orders.\",\n input: OptimorouteGetRoutesInput,\n output: OptimorouteGetRoutesOutput,\n});\n"],"mappings":";;;AAIA,MAAa,4BAA0C,EAAE,OAAO;CAC9D,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,wDAAwD;CACxF,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS;CACxF,oBAAoB,EAAE,OAAO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,CAAC,SAAS;EACpG,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,yCAAyC;CACzE,CAAC,CAAC,CAAC,SAAS,wCAOF;AACV,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/get-scheduling-info.ts
|
|
4
|
+
const OptimorouteGetSchedulingInfoInput = zod.z.object({
|
|
5
|
+
id: zod.z.string().describe("The unique OptimoRoute-assigned order identifier. Either orderNo or id must be provided.").optional(),
|
|
6
|
+
orderNo: zod.z.string().describe("The user-specified order identifier. Either orderNo or id must be provided.").optional()
|
|
7
|
+
}).describe("Request parameters for retrieving scheduling information for an order.\nEither orderNo or id must be provided.");
|
|
8
|
+
const OptimorouteGetSchedulingInfo_ScheduleInformationSchema = zod.z.object({
|
|
9
|
+
distance: zod.z.number().int().describe("Distance in meters from previous stop").nullable().optional(),
|
|
10
|
+
driverName: zod.z.string().describe("Driver's name").nullable().optional(),
|
|
11
|
+
stopNumber: zod.z.number().int().describe("Position in route (starts at 1)").nullable().optional(),
|
|
12
|
+
travelTime: zod.z.number().int().describe("Travel time in seconds from previous stop").nullable().optional(),
|
|
13
|
+
scheduledAt: zod.z.string().describe("Planned service start time (HH:MM format)").nullable().optional(),
|
|
14
|
+
driverSerial: zod.z.string().describe("Driver's serial number").nullable().optional(),
|
|
15
|
+
vehicleLabel: zod.z.string().describe("Vehicle identifier").nullable().optional(),
|
|
16
|
+
arrivalTimeDt: zod.z.string().describe("Actual/expected arrival time (YYYY-MM-DD HH:MM:SS format)").nullable().optional(),
|
|
17
|
+
scheduledAtDt: zod.z.string().describe("Planned service start (YYYY-MM-DD HH:MM:SS format)").nullable().optional(),
|
|
18
|
+
driverExternalId: zod.z.string().describe("Driver's external identifier").nullable().optional(),
|
|
19
|
+
vehicleRegistration: zod.z.string().describe("Vehicle registration").nullable().optional()
|
|
20
|
+
}).describe("Detailed scheduling information when an order is scheduled in a route.");
|
|
21
|
+
const OptimorouteGetSchedulingInfoOutput = zod.z.object({
|
|
22
|
+
code: zod.z.string().describe("Error code if applicable").nullable().optional(),
|
|
23
|
+
message: zod.z.string().describe("Error description if applicable").nullable().optional(),
|
|
24
|
+
success: zod.z.boolean().describe("Indicates successful query execution"),
|
|
25
|
+
orderScheduled: zod.z.boolean().describe("Whether the order appears in a route"),
|
|
26
|
+
scheduleInformation: OptimorouteGetSchedulingInfo_ScheduleInformationSchema.nullable().optional()
|
|
27
|
+
}).describe("Response schema for retrieving order scheduling information.");
|
|
28
|
+
const optimorouteGetSchedulingInfo = require_action.action("OPTIMOROUTE_GET_SCHEDULING_INFO", {
|
|
29
|
+
slug: "optimoroute-get-scheduling-info",
|
|
30
|
+
name: "Get Order Scheduling Info",
|
|
31
|
+
description: "Tool to retrieve scheduling information for a specific order. Use when you need to check if an order is scheduled and get details like driver assignment, timing, and position.",
|
|
32
|
+
input: OptimorouteGetSchedulingInfoInput,
|
|
33
|
+
output: OptimorouteGetSchedulingInfoOutput
|
|
34
|
+
});
|
|
35
|
+
//#endregion
|
|
36
|
+
exports.optimorouteGetSchedulingInfo = optimorouteGetSchedulingInfo;
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=get-scheduling-info.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-scheduling-info.cjs","names":["z","action"],"sources":["../../src/actions/get-scheduling-info.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OptimorouteGetSchedulingInfoInput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"The unique OptimoRoute-assigned order identifier. Either orderNo or id must be provided.\").optional(),\n orderNo: z.string().describe(\"The user-specified order identifier. Either orderNo or id must be provided.\").optional(),\n}).describe(\"Request parameters for retrieving scheduling information for an order.\\nEither orderNo or id must be provided.\");\nconst OptimorouteGetSchedulingInfo_ScheduleInformationSchema: z.ZodTypeAny = z.object({\n distance: z.number().int().describe(\"Distance in meters from previous stop\").nullable().optional(),\n driverName: z.string().describe(\"Driver's name\").nullable().optional(),\n stopNumber: z.number().int().describe(\"Position in route (starts at 1)\").nullable().optional(),\n travelTime: z.number().int().describe(\"Travel time in seconds from previous stop\").nullable().optional(),\n scheduledAt: z.string().describe(\"Planned service start time (HH:MM format)\").nullable().optional(),\n driverSerial: z.string().describe(\"Driver's serial number\").nullable().optional(),\n vehicleLabel: z.string().describe(\"Vehicle identifier\").nullable().optional(),\n arrivalTimeDt: z.string().describe(\"Actual/expected arrival time (YYYY-MM-DD HH:MM:SS format)\").nullable().optional(),\n scheduledAtDt: z.string().describe(\"Planned service start (YYYY-MM-DD HH:MM:SS format)\").nullable().optional(),\n driverExternalId: z.string().describe(\"Driver's external identifier\").nullable().optional(),\n vehicleRegistration: z.string().describe(\"Vehicle registration\").nullable().optional(),\n}).describe(\"Detailed scheduling information when an order is scheduled in a route.\");\nexport const OptimorouteGetSchedulingInfoOutput: z.ZodTypeAny = z.object({\n code: z.string().describe(\"Error code if applicable\").nullable().optional(),\n message: z.string().describe(\"Error description if applicable\").nullable().optional(),\n success: z.boolean().describe(\"Indicates successful query execution\"),\n orderScheduled: z.boolean().describe(\"Whether the order appears in a route\"),\n scheduleInformation: OptimorouteGetSchedulingInfo_ScheduleInformationSchema.nullable().optional(),\n}).describe(\"Response schema for retrieving order scheduling information.\");\n\nexport const optimorouteGetSchedulingInfo = action(\"OPTIMOROUTE_GET_SCHEDULING_INFO\", {\n slug: \"optimoroute-get-scheduling-info\",\n name: \"Get Order Scheduling Info\",\n description: \"Tool to retrieve scheduling information for a specific order. Use when you need to check if an order is scheduled and get details like driver assignment, timing, and position.\",\n input: OptimorouteGetSchedulingInfoInput,\n output: OptimorouteGetSchedulingInfoOutput,\n});\n"],"mappings":";;;AAIA,MAAa,oCAAkDA,IAAAA,EAAE,OAAO;CACtE,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0FAA0F,CAAC,CAAC,SAAS;CAC7H,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,SAAS,CAAC,CAAC,SAAS;AACvF,CAAC,CAAC,CAAC,SAAS,wEAAwE;AACpF,MAAa,qCAAmDA,IAAAA,EAAE,OAAO;CACvE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1E,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpF,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,sCAAsC;CACpE,gBAAgBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,sCAAsC;CAC3E,qBAAqB,uDAAuD,SAAS,CAAC,CAAC,SAAS;AAClG,CAAC,CAAC,CAAC,SAAS,8DAA8D;AAE1E,MAAa,+BAA+BC,eAAAA,OAAO,mCAAmC;CACpF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/get-scheduling-info.d.ts
|
|
4
|
+
declare const OptimorouteGetSchedulingInfoInput: z.ZodTypeAny;
|
|
5
|
+
declare const OptimorouteGetSchedulingInfoOutput: z.ZodTypeAny;
|
|
6
|
+
declare const optimorouteGetSchedulingInfo: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { optimorouteGetSchedulingInfo };
|
|
9
|
+
//# sourceMappingURL=get-scheduling-info.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-scheduling-info.d.cts","names":[],"sources":["../../src/actions/get-scheduling-info.ts"],"mappings":";;;cAIa,iCAAA,EAAmC,CAAA,CAAE,UAG2E;AAAA,cAchH,kCAAA,EAAoC,CAAA,CAAE,UAMwB;AAAA,cAE9D,4BAAA,gCAA4B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/get-scheduling-info.d.ts
|
|
4
|
+
declare const OptimorouteGetSchedulingInfoInput: z.ZodTypeAny;
|
|
5
|
+
declare const OptimorouteGetSchedulingInfoOutput: z.ZodTypeAny;
|
|
6
|
+
declare const optimorouteGetSchedulingInfo: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { optimorouteGetSchedulingInfo };
|
|
9
|
+
//# sourceMappingURL=get-scheduling-info.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-scheduling-info.d.mts","names":[],"sources":["../../src/actions/get-scheduling-info.ts"],"mappings":";;;cAIa,iCAAA,EAAmC,CAAA,CAAE,UAG2E;AAAA,cAchH,kCAAA,EAAoC,CAAA,CAAE,UAMwB;AAAA,cAE9D,4BAAA,gCAA4B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/actions/get-scheduling-info.ts
|
|
4
|
+
const OptimorouteGetSchedulingInfoInput = z.object({
|
|
5
|
+
id: z.string().describe("The unique OptimoRoute-assigned order identifier. Either orderNo or id must be provided.").optional(),
|
|
6
|
+
orderNo: z.string().describe("The user-specified order identifier. Either orderNo or id must be provided.").optional()
|
|
7
|
+
}).describe("Request parameters for retrieving scheduling information for an order.\nEither orderNo or id must be provided.");
|
|
8
|
+
const OptimorouteGetSchedulingInfo_ScheduleInformationSchema = z.object({
|
|
9
|
+
distance: z.number().int().describe("Distance in meters from previous stop").nullable().optional(),
|
|
10
|
+
driverName: z.string().describe("Driver's name").nullable().optional(),
|
|
11
|
+
stopNumber: z.number().int().describe("Position in route (starts at 1)").nullable().optional(),
|
|
12
|
+
travelTime: z.number().int().describe("Travel time in seconds from previous stop").nullable().optional(),
|
|
13
|
+
scheduledAt: z.string().describe("Planned service start time (HH:MM format)").nullable().optional(),
|
|
14
|
+
driverSerial: z.string().describe("Driver's serial number").nullable().optional(),
|
|
15
|
+
vehicleLabel: z.string().describe("Vehicle identifier").nullable().optional(),
|
|
16
|
+
arrivalTimeDt: z.string().describe("Actual/expected arrival time (YYYY-MM-DD HH:MM:SS format)").nullable().optional(),
|
|
17
|
+
scheduledAtDt: z.string().describe("Planned service start (YYYY-MM-DD HH:MM:SS format)").nullable().optional(),
|
|
18
|
+
driverExternalId: z.string().describe("Driver's external identifier").nullable().optional(),
|
|
19
|
+
vehicleRegistration: z.string().describe("Vehicle registration").nullable().optional()
|
|
20
|
+
}).describe("Detailed scheduling information when an order is scheduled in a route.");
|
|
21
|
+
const optimorouteGetSchedulingInfo = action("OPTIMOROUTE_GET_SCHEDULING_INFO", {
|
|
22
|
+
slug: "optimoroute-get-scheduling-info",
|
|
23
|
+
name: "Get Order Scheduling Info",
|
|
24
|
+
description: "Tool to retrieve scheduling information for a specific order. Use when you need to check if an order is scheduled and get details like driver assignment, timing, and position.",
|
|
25
|
+
input: OptimorouteGetSchedulingInfoInput,
|
|
26
|
+
output: z.object({
|
|
27
|
+
code: z.string().describe("Error code if applicable").nullable().optional(),
|
|
28
|
+
message: z.string().describe("Error description if applicable").nullable().optional(),
|
|
29
|
+
success: z.boolean().describe("Indicates successful query execution"),
|
|
30
|
+
orderScheduled: z.boolean().describe("Whether the order appears in a route"),
|
|
31
|
+
scheduleInformation: OptimorouteGetSchedulingInfo_ScheduleInformationSchema.nullable().optional()
|
|
32
|
+
}).describe("Response schema for retrieving order scheduling information.")
|
|
33
|
+
});
|
|
34
|
+
//#endregion
|
|
35
|
+
export { optimorouteGetSchedulingInfo };
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=get-scheduling-info.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-scheduling-info.mjs","names":[],"sources":["../../src/actions/get-scheduling-info.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OptimorouteGetSchedulingInfoInput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"The unique OptimoRoute-assigned order identifier. Either orderNo or id must be provided.\").optional(),\n orderNo: z.string().describe(\"The user-specified order identifier. Either orderNo or id must be provided.\").optional(),\n}).describe(\"Request parameters for retrieving scheduling information for an order.\\nEither orderNo or id must be provided.\");\nconst OptimorouteGetSchedulingInfo_ScheduleInformationSchema: z.ZodTypeAny = z.object({\n distance: z.number().int().describe(\"Distance in meters from previous stop\").nullable().optional(),\n driverName: z.string().describe(\"Driver's name\").nullable().optional(),\n stopNumber: z.number().int().describe(\"Position in route (starts at 1)\").nullable().optional(),\n travelTime: z.number().int().describe(\"Travel time in seconds from previous stop\").nullable().optional(),\n scheduledAt: z.string().describe(\"Planned service start time (HH:MM format)\").nullable().optional(),\n driverSerial: z.string().describe(\"Driver's serial number\").nullable().optional(),\n vehicleLabel: z.string().describe(\"Vehicle identifier\").nullable().optional(),\n arrivalTimeDt: z.string().describe(\"Actual/expected arrival time (YYYY-MM-DD HH:MM:SS format)\").nullable().optional(),\n scheduledAtDt: z.string().describe(\"Planned service start (YYYY-MM-DD HH:MM:SS format)\").nullable().optional(),\n driverExternalId: z.string().describe(\"Driver's external identifier\").nullable().optional(),\n vehicleRegistration: z.string().describe(\"Vehicle registration\").nullable().optional(),\n}).describe(\"Detailed scheduling information when an order is scheduled in a route.\");\nexport const OptimorouteGetSchedulingInfoOutput: z.ZodTypeAny = z.object({\n code: z.string().describe(\"Error code if applicable\").nullable().optional(),\n message: z.string().describe(\"Error description if applicable\").nullable().optional(),\n success: z.boolean().describe(\"Indicates successful query execution\"),\n orderScheduled: z.boolean().describe(\"Whether the order appears in a route\"),\n scheduleInformation: OptimorouteGetSchedulingInfo_ScheduleInformationSchema.nullable().optional(),\n}).describe(\"Response schema for retrieving order scheduling information.\");\n\nexport const optimorouteGetSchedulingInfo = action(\"OPTIMOROUTE_GET_SCHEDULING_INFO\", {\n slug: \"optimoroute-get-scheduling-info\",\n name: \"Get Order Scheduling Info\",\n description: \"Tool to retrieve scheduling information for a specific order. Use when you need to check if an order is scheduled and get details like driver assignment, timing, and position.\",\n input: OptimorouteGetSchedulingInfoInput,\n output: OptimorouteGetSchedulingInfoOutput,\n});\n"],"mappings":";;;AAIA,MAAa,oCAAkD,EAAE,OAAO;CACtE,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,0FAA0F,CAAC,CAAC,SAAS;CAC7H,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,6EAA6E,CAAC,CAAC,SAAS;AACvH,CAAC,CAAC,CAAC,SAAS,gHAAgH;AAC5H,MAAM,yDAAuE,EAAE,OAAO;CACpF,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjG,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,eAAe,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACrE,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7F,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvG,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClG,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChF,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC5E,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,2DAA2D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpH,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7G,kBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1F,qBAAqB,EAAE,OAAO,CAAC,CAAC,SAAS,sBAAsB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACvF,CAAC,CAAC,CAAC,SAAS,wEAAwE;AASpF,MAAa,+BAA+B,OAAO,mCAAmC;CACpF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAb8D,EAAE,OAAO;EACvE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC1E,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACpF,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,sCAAsC;EACpE,gBAAgB,EAAE,QAAQ,CAAC,CAAC,SAAS,sCAAsC;EAC3E,qBAAqB,uDAAuD,SAAS,CAAC,CAAC,SAAS;CAClG,CAAC,CAAC,CAAC,SAAS,8DAOF;AACV,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_create_or_update_orders = require("./create-or-update-orders.cjs");
|
|
3
|
+
const require_create_order = require("./create-order.cjs");
|
|
4
|
+
const require_delete_all_orders = require("./delete-all-orders.cjs");
|
|
5
|
+
const require_delete_order = require("./delete-order.cjs");
|
|
6
|
+
const require_delete_orders = require("./delete-orders.cjs");
|
|
7
|
+
const require_get_completion_details = require("./get-completion-details.cjs");
|
|
8
|
+
const require_get_drivers = require("./get-drivers.cjs");
|
|
9
|
+
const require_get_events = require("./get-events.cjs");
|
|
10
|
+
const require_get_orders = require("./get-orders.cjs");
|
|
11
|
+
const require_get_planning_status = require("./get-planning-status.cjs");
|
|
12
|
+
const require_get_routes = require("./get-routes.cjs");
|
|
13
|
+
const require_get_scheduling_info = require("./get-scheduling-info.cjs");
|
|
14
|
+
const require_search_orders = require("./search-orders.cjs");
|
|
15
|
+
const require_start_planning = require("./start-planning.cjs");
|
|
16
|
+
const require_stop_planning = require("./stop-planning.cjs");
|
|
17
|
+
const require_update_driver_parameters = require("./update-driver-parameters.cjs");
|
|
18
|
+
const require_update_drivers_parameters = require("./update-drivers-parameters.cjs");
|
|
19
|
+
exports.optimorouteCreateOrUpdateOrders = require_create_or_update_orders.optimorouteCreateOrUpdateOrders;
|
|
20
|
+
exports.optimorouteCreateOrder = require_create_order.optimorouteCreateOrder;
|
|
21
|
+
exports.optimorouteDeleteAllOrders = require_delete_all_orders.optimorouteDeleteAllOrders;
|
|
22
|
+
exports.optimorouteDeleteOrder = require_delete_order.optimorouteDeleteOrder;
|
|
23
|
+
exports.optimorouteDeleteOrders = require_delete_orders.optimorouteDeleteOrders;
|
|
24
|
+
exports.optimorouteGetCompletionDetails = require_get_completion_details.optimorouteGetCompletionDetails;
|
|
25
|
+
exports.optimorouteGetDrivers = require_get_drivers.optimorouteGetDrivers;
|
|
26
|
+
exports.optimorouteGetEvents = require_get_events.optimorouteGetEvents;
|
|
27
|
+
exports.optimorouteGetOrders = require_get_orders.optimorouteGetOrders;
|
|
28
|
+
exports.optimorouteGetPlanningStatus = require_get_planning_status.optimorouteGetPlanningStatus;
|
|
29
|
+
exports.optimorouteGetRoutes = require_get_routes.optimorouteGetRoutes;
|
|
30
|
+
exports.optimorouteGetSchedulingInfo = require_get_scheduling_info.optimorouteGetSchedulingInfo;
|
|
31
|
+
exports.optimorouteSearchOrders = require_search_orders.optimorouteSearchOrders;
|
|
32
|
+
exports.optimorouteStartPlanning = require_start_planning.optimorouteStartPlanning;
|
|
33
|
+
exports.optimorouteStopPlanning = require_stop_planning.optimorouteStopPlanning;
|
|
34
|
+
exports.optimorouteUpdateDriverParameters = require_update_driver_parameters.optimorouteUpdateDriverParameters;
|
|
35
|
+
exports.optimorouteUpdateDriversParameters = require_update_drivers_parameters.optimorouteUpdateDriversParameters;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { optimorouteCreateOrUpdateOrders } from "./create-or-update-orders.cjs";
|
|
2
|
+
import { optimorouteCreateOrder } from "./create-order.cjs";
|
|
3
|
+
import { optimorouteDeleteAllOrders } from "./delete-all-orders.cjs";
|
|
4
|
+
import { optimorouteDeleteOrder } from "./delete-order.cjs";
|
|
5
|
+
import { optimorouteDeleteOrders } from "./delete-orders.cjs";
|
|
6
|
+
import { optimorouteGetCompletionDetails } from "./get-completion-details.cjs";
|
|
7
|
+
import { optimorouteGetDrivers } from "./get-drivers.cjs";
|
|
8
|
+
import { optimorouteGetEvents } from "./get-events.cjs";
|
|
9
|
+
import { optimorouteGetOrders } from "./get-orders.cjs";
|
|
10
|
+
import { optimorouteGetPlanningStatus } from "./get-planning-status.cjs";
|
|
11
|
+
import { optimorouteGetRoutes } from "./get-routes.cjs";
|
|
12
|
+
import { optimorouteGetSchedulingInfo } from "./get-scheduling-info.cjs";
|
|
13
|
+
import { optimorouteSearchOrders } from "./search-orders.cjs";
|
|
14
|
+
import { optimorouteStartPlanning } from "./start-planning.cjs";
|
|
15
|
+
import { optimorouteStopPlanning } from "./stop-planning.cjs";
|
|
16
|
+
import { optimorouteUpdateDriverParameters } from "./update-driver-parameters.cjs";
|
|
17
|
+
import { optimorouteUpdateDriversParameters } from "./update-drivers-parameters.cjs";
|
|
18
|
+
export { optimorouteCreateOrUpdateOrders, optimorouteCreateOrder, optimorouteDeleteAllOrders, optimorouteDeleteOrder, optimorouteDeleteOrders, optimorouteGetCompletionDetails, optimorouteGetDrivers, optimorouteGetEvents, optimorouteGetOrders, optimorouteGetPlanningStatus, optimorouteGetRoutes, optimorouteGetSchedulingInfo, optimorouteSearchOrders, optimorouteStartPlanning, optimorouteStopPlanning, optimorouteUpdateDriverParameters, optimorouteUpdateDriversParameters };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { optimorouteCreateOrUpdateOrders } from "./create-or-update-orders.mjs";
|
|
2
|
+
import { optimorouteCreateOrder } from "./create-order.mjs";
|
|
3
|
+
import { optimorouteDeleteAllOrders } from "./delete-all-orders.mjs";
|
|
4
|
+
import { optimorouteDeleteOrder } from "./delete-order.mjs";
|
|
5
|
+
import { optimorouteDeleteOrders } from "./delete-orders.mjs";
|
|
6
|
+
import { optimorouteGetCompletionDetails } from "./get-completion-details.mjs";
|
|
7
|
+
import { optimorouteGetDrivers } from "./get-drivers.mjs";
|
|
8
|
+
import { optimorouteGetEvents } from "./get-events.mjs";
|
|
9
|
+
import { optimorouteGetOrders } from "./get-orders.mjs";
|
|
10
|
+
import { optimorouteGetPlanningStatus } from "./get-planning-status.mjs";
|
|
11
|
+
import { optimorouteGetRoutes } from "./get-routes.mjs";
|
|
12
|
+
import { optimorouteGetSchedulingInfo } from "./get-scheduling-info.mjs";
|
|
13
|
+
import { optimorouteSearchOrders } from "./search-orders.mjs";
|
|
14
|
+
import { optimorouteStartPlanning } from "./start-planning.mjs";
|
|
15
|
+
import { optimorouteStopPlanning } from "./stop-planning.mjs";
|
|
16
|
+
import { optimorouteUpdateDriverParameters } from "./update-driver-parameters.mjs";
|
|
17
|
+
import { optimorouteUpdateDriversParameters } from "./update-drivers-parameters.mjs";
|
|
18
|
+
export { optimorouteCreateOrUpdateOrders, optimorouteCreateOrder, optimorouteDeleteAllOrders, optimorouteDeleteOrder, optimorouteDeleteOrders, optimorouteGetCompletionDetails, optimorouteGetDrivers, optimorouteGetEvents, optimorouteGetOrders, optimorouteGetPlanningStatus, optimorouteGetRoutes, optimorouteGetSchedulingInfo, optimorouteSearchOrders, optimorouteStartPlanning, optimorouteStopPlanning, optimorouteUpdateDriverParameters, optimorouteUpdateDriversParameters };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { optimorouteCreateOrUpdateOrders } from "./create-or-update-orders.mjs";
|
|
2
|
+
import { optimorouteCreateOrder } from "./create-order.mjs";
|
|
3
|
+
import { optimorouteDeleteAllOrders } from "./delete-all-orders.mjs";
|
|
4
|
+
import { optimorouteDeleteOrder } from "./delete-order.mjs";
|
|
5
|
+
import { optimorouteDeleteOrders } from "./delete-orders.mjs";
|
|
6
|
+
import { optimorouteGetCompletionDetails } from "./get-completion-details.mjs";
|
|
7
|
+
import { optimorouteGetDrivers } from "./get-drivers.mjs";
|
|
8
|
+
import { optimorouteGetEvents } from "./get-events.mjs";
|
|
9
|
+
import { optimorouteGetOrders } from "./get-orders.mjs";
|
|
10
|
+
import { optimorouteGetPlanningStatus } from "./get-planning-status.mjs";
|
|
11
|
+
import { optimorouteGetRoutes } from "./get-routes.mjs";
|
|
12
|
+
import { optimorouteGetSchedulingInfo } from "./get-scheduling-info.mjs";
|
|
13
|
+
import { optimorouteSearchOrders } from "./search-orders.mjs";
|
|
14
|
+
import { optimorouteStartPlanning } from "./start-planning.mjs";
|
|
15
|
+
import { optimorouteStopPlanning } from "./stop-planning.mjs";
|
|
16
|
+
import { optimorouteUpdateDriverParameters } from "./update-driver-parameters.mjs";
|
|
17
|
+
import { optimorouteUpdateDriversParameters } from "./update-drivers-parameters.mjs";
|
|
18
|
+
export { optimorouteCreateOrUpdateOrders, optimorouteCreateOrder, optimorouteDeleteAllOrders, optimorouteDeleteOrder, optimorouteDeleteOrders, optimorouteGetCompletionDetails, optimorouteGetDrivers, optimorouteGetEvents, optimorouteGetOrders, optimorouteGetPlanningStatus, optimorouteGetRoutes, optimorouteGetSchedulingInfo, optimorouteSearchOrders, optimorouteStartPlanning, optimorouteStopPlanning, optimorouteUpdateDriverParameters, optimorouteUpdateDriversParameters };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/search-orders.ts
|
|
4
|
+
const OptimorouteSearchOrdersInput = zod.z.object({
|
|
5
|
+
limit: zod.z.number().int().describe("Maximum number of orders to return per request. Use with after_tag for paginated retrieval.").optional(),
|
|
6
|
+
orders: zod.z.array(zod.z.object({
|
|
7
|
+
id: zod.z.string().describe("OptimoRoute-assigned unique identifier to search for").optional(),
|
|
8
|
+
orderNo: zod.z.string().describe("User-specified order identifier to search for").optional()
|
|
9
|
+
}).describe("Order identifier object for search criteria.")).describe("List of order identifier objects to search for. Each object can contain either 'orderNo' or 'id' field.").optional(),
|
|
10
|
+
afterTag: zod.z.string().describe("Cursor for pagination. Pass the 'afterTag' value from a previous response to retrieve the next page of results.").optional(),
|
|
11
|
+
dateRange: zod.z.object({
|
|
12
|
+
to: zod.z.string().describe("End date in YYYY-MM-DD format"),
|
|
13
|
+
from: zod.z.string().describe("Start date in YYYY-MM-DD format")
|
|
14
|
+
}).describe("Date range criteria for searching orders.").optional(),
|
|
15
|
+
orderStatus: zod.z.array(zod.z.string()).describe("Filter by order status values (e.g., 'failed', 'rejected')").optional(),
|
|
16
|
+
includeOrderData: zod.z.boolean().describe("When true, includes full order data in the response. Default: false.").optional(),
|
|
17
|
+
includeScheduleInformation: zod.z.boolean().describe("When true, includes scheduling information in the response. Default: false.").optional()
|
|
18
|
+
}).describe("Request parameters for searching orders in the system. At least one of 'orders' or 'date_range' must be provided.");
|
|
19
|
+
const OptimorouteSearchOrders_LocationSchema = zod.z.object({
|
|
20
|
+
lat: zod.z.number().describe("Latitude coordinate").nullable().optional(),
|
|
21
|
+
lng: zod.z.number().describe("Longitude coordinate").nullable().optional(),
|
|
22
|
+
zip: zod.z.string().describe("Postal code").nullable().optional(),
|
|
23
|
+
city: zod.z.string().describe("City name").nullable().optional(),
|
|
24
|
+
state: zod.z.string().describe("State or province").nullable().optional(),
|
|
25
|
+
address: zod.z.string().describe("Street address").nullable().optional(),
|
|
26
|
+
country: zod.z.string().describe("Country code").nullable().optional(),
|
|
27
|
+
locationNo: zod.z.string().describe("Location identifier").nullable().optional(),
|
|
28
|
+
locationName: zod.z.string().describe("Location name").nullable().optional()
|
|
29
|
+
}).describe("Location details for an order.");
|
|
30
|
+
const OptimorouteSearchOrders_AssignedToSchema = zod.z.object({
|
|
31
|
+
serial: zod.z.string().describe("Driver serial identifier").nullable().optional(),
|
|
32
|
+
externalId: zod.z.string().describe("Driver external identifier").nullable().optional()
|
|
33
|
+
}).describe("Driver assignment details.");
|
|
34
|
+
const OptimorouteSearchOrders_TimeWindowSchema = zod.z.object({
|
|
35
|
+
twTo: zod.z.string().describe("End time").nullable().optional(),
|
|
36
|
+
twFrom: zod.z.string().describe("Start time").nullable().optional()
|
|
37
|
+
}).describe("Time window for order service.");
|
|
38
|
+
const OptimorouteSearchOrders_OrderDataSchema = zod.z.object({
|
|
39
|
+
id: zod.z.string().describe("OptimoRoute's unique order identifier").nullable().optional(),
|
|
40
|
+
date: zod.z.string().describe("Order date in YYYY-MM-DD format").nullable().optional(),
|
|
41
|
+
type: zod.z.string().describe("Order type: 'D' (delivery), 'P' (pickup), 'T' (task), 'break', 'depot'").nullable().optional(),
|
|
42
|
+
email: zod.z.string().describe("Customer email").nullable().optional(),
|
|
43
|
+
load1: zod.z.number().describe("Load requirement type 1").nullable().optional(),
|
|
44
|
+
load2: zod.z.number().describe("Load requirement type 2").nullable().optional(),
|
|
45
|
+
load3: zod.z.number().describe("Load requirement type 3").nullable().optional(),
|
|
46
|
+
load4: zod.z.number().describe("Load requirement type 4").nullable().optional(),
|
|
47
|
+
notes: zod.z.string().describe("Delivery instructions").nullable().optional(),
|
|
48
|
+
phone: zod.z.string().describe("Customer phone").nullable().optional(),
|
|
49
|
+
skills: zod.z.array(zod.z.string()).describe("Required driver skills").nullable().optional(),
|
|
50
|
+
status: zod.z.string().describe("Order status").nullable().optional(),
|
|
51
|
+
orderNo: zod.z.string().describe("User-specified order identifier").nullable().optional(),
|
|
52
|
+
duration: zod.z.number().describe("Service time in minutes").nullable().optional(),
|
|
53
|
+
location: OptimorouteSearchOrders_LocationSchema.nullable().optional(),
|
|
54
|
+
priority: zod.z.string().describe("Priority level: 'L' (low), 'M' (medium), 'H' (high), 'C' (critical)").nullable().optional(),
|
|
55
|
+
relatedId: zod.z.string().describe("ID-based related order reference").nullable().optional(),
|
|
56
|
+
assignedTo: OptimorouteSearchOrders_AssignedToSchema.nullable().optional(),
|
|
57
|
+
timeWindows: zod.z.array(OptimorouteSearchOrders_TimeWindowSchema).describe("Time windows for service").nullable().optional(),
|
|
58
|
+
customField1: zod.z.string().describe("Legacy custom field 1").nullable().optional(),
|
|
59
|
+
customField2: zod.z.string().describe("Legacy custom field 2").nullable().optional(),
|
|
60
|
+
customField3: zod.z.string().describe("Legacy custom field 3").nullable().optional(),
|
|
61
|
+
customField4: zod.z.string().describe("Legacy custom field 4").nullable().optional(),
|
|
62
|
+
customField5: zod.z.string().describe("Legacy custom field 5").nullable().optional(),
|
|
63
|
+
customFields: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Modern custom fields").nullable().optional(),
|
|
64
|
+
relatedOrderNo: zod.z.string().describe("Links pickup/delivery pairs").nullable().optional(),
|
|
65
|
+
allowedWeekdays: zod.z.array(zod.z.string()).describe("Restricted days: ['mon', 'tue', 'wed', etc.]").nullable().optional(),
|
|
66
|
+
vehicleFeatures: zod.z.array(zod.z.string()).describe("Required vehicle features").nullable().optional(),
|
|
67
|
+
notificationPreference: zod.z.string().describe("Notification preference: 'dont_notify', 'email', 'sms', 'both'").nullable().optional()
|
|
68
|
+
}).describe("Complete order details returned in search results.");
|
|
69
|
+
const OptimorouteSearchOrdersOutput = zod.z.object({
|
|
70
|
+
code: zod.z.string().describe("Error code if search failed").nullable().optional(),
|
|
71
|
+
orders: zod.z.array(OptimorouteSearchOrders_OrderDataSchema).describe("Array of order objects matching the search criteria"),
|
|
72
|
+
message: zod.z.string().describe("Error description if search failed").nullable().optional(),
|
|
73
|
+
success: zod.z.boolean().describe("Indicates if the search was successful"),
|
|
74
|
+
afterTag: zod.z.string().describe("Pagination cursor. If present, pass this value as 'after_tag' in the next request to retrieve additional results.").nullable().optional()
|
|
75
|
+
}).describe("Response schema for searching orders.");
|
|
76
|
+
const optimorouteSearchOrders = require_action.action("OPTIMOROUTE_SEARCH_ORDERS", {
|
|
77
|
+
slug: "optimoroute-search-orders",
|
|
78
|
+
name: "Search Orders",
|
|
79
|
+
description: "Tool to search for orders in OptimoRoute based on criteria. Use when you need to find orders by date range, order identifiers, or order status. At least one of 'orders' or 'date_range' must be provided.",
|
|
80
|
+
input: OptimorouteSearchOrdersInput,
|
|
81
|
+
output: OptimorouteSearchOrdersOutput
|
|
82
|
+
});
|
|
83
|
+
//#endregion
|
|
84
|
+
exports.optimorouteSearchOrders = optimorouteSearchOrders;
|
|
85
|
+
|
|
86
|
+
//# sourceMappingURL=search-orders.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-orders.cjs","names":["z","action"],"sources":["../../src/actions/search-orders.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const OptimorouteSearchOrdersInput: z.ZodTypeAny = z.object({\n limit: z.number().int().describe(\"Maximum number of orders to return per request. Use with after_tag for paginated retrieval.\").optional(),\n orders: z.array(z.object({\n id: z.string().describe(\"OptimoRoute-assigned unique identifier to search for\").optional(),\n orderNo: z.string().describe(\"User-specified order identifier to search for\").optional(),\n}).describe(\"Order identifier object for search criteria.\")).describe(\"List of order identifier objects to search for. Each object can contain either 'orderNo' or 'id' field.\").optional(),\n afterTag: z.string().describe(\"Cursor for pagination. Pass the 'afterTag' value from a previous response to retrieve the next page of results.\").optional(),\n dateRange: z.object({\n to: z.string().describe(\"End date in YYYY-MM-DD format\"),\n from: z.string().describe(\"Start date in YYYY-MM-DD format\"),\n}).describe(\"Date range criteria for searching orders.\").optional(),\n orderStatus: z.array(z.string()).describe(\"Filter by order status values (e.g., 'failed', 'rejected')\").optional(),\n includeOrderData: z.boolean().describe(\"When true, includes full order data in the response. Default: false.\").optional(),\n includeScheduleInformation: z.boolean().describe(\"When true, includes scheduling information in the response. Default: false.\").optional(),\n}).describe(\"Request parameters for searching orders in the system. At least one of 'orders' or 'date_range' must be provided.\");\nconst OptimorouteSearchOrders_LocationSchema: z.ZodTypeAny = z.object({\n lat: z.number().describe(\"Latitude coordinate\").nullable().optional(),\n lng: z.number().describe(\"Longitude coordinate\").nullable().optional(),\n zip: z.string().describe(\"Postal code\").nullable().optional(),\n city: z.string().describe(\"City name\").nullable().optional(),\n state: z.string().describe(\"State or province\").nullable().optional(),\n address: z.string().describe(\"Street address\").nullable().optional(),\n country: z.string().describe(\"Country code\").nullable().optional(),\n locationNo: z.string().describe(\"Location identifier\").nullable().optional(),\n locationName: z.string().describe(\"Location name\").nullable().optional(),\n}).describe(\"Location details for an order.\");\nconst OptimorouteSearchOrders_AssignedToSchema: z.ZodTypeAny = z.object({\n serial: z.string().describe(\"Driver serial identifier\").nullable().optional(),\n externalId: z.string().describe(\"Driver external identifier\").nullable().optional(),\n}).describe(\"Driver assignment details.\");\nconst OptimorouteSearchOrders_TimeWindowSchema: z.ZodTypeAny = z.object({\n twTo: z.string().describe(\"End time\").nullable().optional(),\n twFrom: z.string().describe(\"Start time\").nullable().optional(),\n}).describe(\"Time window for order service.\");\nconst OptimorouteSearchOrders_OrderDataSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"OptimoRoute's unique order identifier\").nullable().optional(),\n date: z.string().describe(\"Order date in YYYY-MM-DD format\").nullable().optional(),\n type: z.string().describe(\"Order type: 'D' (delivery), 'P' (pickup), 'T' (task), 'break', 'depot'\").nullable().optional(),\n email: z.string().describe(\"Customer email\").nullable().optional(),\n load1: z.number().describe(\"Load requirement type 1\").nullable().optional(),\n load2: z.number().describe(\"Load requirement type 2\").nullable().optional(),\n load3: z.number().describe(\"Load requirement type 3\").nullable().optional(),\n load4: z.number().describe(\"Load requirement type 4\").nullable().optional(),\n notes: z.string().describe(\"Delivery instructions\").nullable().optional(),\n phone: z.string().describe(\"Customer phone\").nullable().optional(),\n skills: z.array(z.string()).describe(\"Required driver skills\").nullable().optional(),\n status: z.string().describe(\"Order status\").nullable().optional(),\n orderNo: z.string().describe(\"User-specified order identifier\").nullable().optional(),\n duration: z.number().describe(\"Service time in minutes\").nullable().optional(),\n location: OptimorouteSearchOrders_LocationSchema.nullable().optional(),\n priority: z.string().describe(\"Priority level: 'L' (low), 'M' (medium), 'H' (high), 'C' (critical)\").nullable().optional(),\n relatedId: z.string().describe(\"ID-based related order reference\").nullable().optional(),\n assignedTo: OptimorouteSearchOrders_AssignedToSchema.nullable().optional(),\n timeWindows: z.array(OptimorouteSearchOrders_TimeWindowSchema).describe(\"Time windows for service\").nullable().optional(),\n customField1: z.string().describe(\"Legacy custom field 1\").nullable().optional(),\n customField2: z.string().describe(\"Legacy custom field 2\").nullable().optional(),\n customField3: z.string().describe(\"Legacy custom field 3\").nullable().optional(),\n customField4: z.string().describe(\"Legacy custom field 4\").nullable().optional(),\n customField5: z.string().describe(\"Legacy custom field 5\").nullable().optional(),\n customFields: z.record(z.string(), z.unknown()).describe(\"Modern custom fields\").nullable().optional(),\n relatedOrderNo: z.string().describe(\"Links pickup/delivery pairs\").nullable().optional(),\n allowedWeekdays: z.array(z.string()).describe(\"Restricted days: ['mon', 'tue', 'wed', etc.]\").nullable().optional(),\n vehicleFeatures: z.array(z.string()).describe(\"Required vehicle features\").nullable().optional(),\n notificationPreference: z.string().describe(\"Notification preference: 'dont_notify', 'email', 'sms', 'both'\").nullable().optional(),\n}).describe(\"Complete order details returned in search results.\");\nexport const OptimorouteSearchOrdersOutput: z.ZodTypeAny = z.object({\n code: z.string().describe(\"Error code if search failed\").nullable().optional(),\n orders: z.array(OptimorouteSearchOrders_OrderDataSchema).describe(\"Array of order objects matching the search criteria\"),\n message: z.string().describe(\"Error description if search failed\").nullable().optional(),\n success: z.boolean().describe(\"Indicates if the search was successful\"),\n afterTag: z.string().describe(\"Pagination cursor. If present, pass this value as 'after_tag' in the next request to retrieve additional results.\").nullable().optional(),\n}).describe(\"Response schema for searching orders.\");\n\nexport const optimorouteSearchOrders = action(\"OPTIMOROUTE_SEARCH_ORDERS\", {\n slug: \"optimoroute-search-orders\",\n name: \"Search Orders\",\n description: \"Tool to search for orders in OptimoRoute based on criteria. Use when you need to find orders by date range, order identifiers, or order status. At least one of 'orders' or 'date_range' must be provided.\",\n input: OptimorouteSearchOrdersInput,\n output: OptimorouteSearchOrdersOutput,\n});\n"],"mappings":";;;AAIA,MAAa,+BAA6CA,IAAAA,EAAE,OAAO;CACjE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,6FAA6F,CAAC,CAAC,SAAS;CACzI,QAAQA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EACzB,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sDAAsD,CAAC,CAAC,SAAS;EACzF,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS;CACzF,CAAC,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,CAAC,SAAS,yGAAyG,CAAC,CAAC,SAAS;CACxL,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iHAAiH,CAAC,CAAC,SAAS;CAC1J,WAAWA,IAAAA,EAAE,OAAO;EACpB,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B;EACvD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC;CAC7D,CAAC,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;CAChE,aAAaA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CA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,EAAE,QAAQ,CAAC,CAAC,SAAS,wCAAwC;CACtE,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mHAAmH,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACzK,CAAC,CAAC,CAAC,SAAS,uCAAuC;AAEnD,MAAa,0BAA0BC,eAAAA,OAAO,6BAA6B;CACzE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/search-orders.d.ts
|
|
4
|
+
declare const OptimorouteSearchOrdersInput: z.ZodTypeAny;
|
|
5
|
+
declare const OptimorouteSearchOrdersOutput: z.ZodTypeAny;
|
|
6
|
+
declare const optimorouteSearchOrders: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { optimorouteSearchOrders };
|
|
9
|
+
//# sourceMappingURL=search-orders.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-orders.d.cts","names":[],"sources":["../../src/actions/search-orders.ts"],"mappings":";;;cAIa,4BAAA,EAA8B,CAAA,CAAE,UAcmF;AAAA,cAmDnH,6BAAA,EAA+B,CAAA,CAAE,UAMM;AAAA,cAEvC,uBAAA,gCAAuB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/search-orders.d.ts
|
|
4
|
+
declare const OptimorouteSearchOrdersInput: z.ZodTypeAny;
|
|
5
|
+
declare const OptimorouteSearchOrdersOutput: z.ZodTypeAny;
|
|
6
|
+
declare const optimorouteSearchOrders: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { optimorouteSearchOrders };
|
|
9
|
+
//# sourceMappingURL=search-orders.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-orders.d.mts","names":[],"sources":["../../src/actions/search-orders.ts"],"mappings":";;;cAIa,4BAAA,EAA8B,CAAA,CAAE,UAcmF;AAAA,cAmDnH,6BAAA,EAA+B,CAAA,CAAE,UAMM;AAAA,cAEvC,uBAAA,gCAAuB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/actions/search-orders.ts
|
|
4
|
+
const OptimorouteSearchOrdersInput = z.object({
|
|
5
|
+
limit: z.number().int().describe("Maximum number of orders to return per request. Use with after_tag for paginated retrieval.").optional(),
|
|
6
|
+
orders: z.array(z.object({
|
|
7
|
+
id: z.string().describe("OptimoRoute-assigned unique identifier to search for").optional(),
|
|
8
|
+
orderNo: z.string().describe("User-specified order identifier to search for").optional()
|
|
9
|
+
}).describe("Order identifier object for search criteria.")).describe("List of order identifier objects to search for. Each object can contain either 'orderNo' or 'id' field.").optional(),
|
|
10
|
+
afterTag: z.string().describe("Cursor for pagination. Pass the 'afterTag' value from a previous response to retrieve the next page of results.").optional(),
|
|
11
|
+
dateRange: z.object({
|
|
12
|
+
to: z.string().describe("End date in YYYY-MM-DD format"),
|
|
13
|
+
from: z.string().describe("Start date in YYYY-MM-DD format")
|
|
14
|
+
}).describe("Date range criteria for searching orders.").optional(),
|
|
15
|
+
orderStatus: z.array(z.string()).describe("Filter by order status values (e.g., 'failed', 'rejected')").optional(),
|
|
16
|
+
includeOrderData: z.boolean().describe("When true, includes full order data in the response. Default: false.").optional(),
|
|
17
|
+
includeScheduleInformation: z.boolean().describe("When true, includes scheduling information in the response. Default: false.").optional()
|
|
18
|
+
}).describe("Request parameters for searching orders in the system. At least one of 'orders' or 'date_range' must be provided.");
|
|
19
|
+
const OptimorouteSearchOrders_LocationSchema = z.object({
|
|
20
|
+
lat: z.number().describe("Latitude coordinate").nullable().optional(),
|
|
21
|
+
lng: z.number().describe("Longitude coordinate").nullable().optional(),
|
|
22
|
+
zip: z.string().describe("Postal code").nullable().optional(),
|
|
23
|
+
city: z.string().describe("City name").nullable().optional(),
|
|
24
|
+
state: z.string().describe("State or province").nullable().optional(),
|
|
25
|
+
address: z.string().describe("Street address").nullable().optional(),
|
|
26
|
+
country: z.string().describe("Country code").nullable().optional(),
|
|
27
|
+
locationNo: z.string().describe("Location identifier").nullable().optional(),
|
|
28
|
+
locationName: z.string().describe("Location name").nullable().optional()
|
|
29
|
+
}).describe("Location details for an order.");
|
|
30
|
+
const OptimorouteSearchOrders_AssignedToSchema = z.object({
|
|
31
|
+
serial: z.string().describe("Driver serial identifier").nullable().optional(),
|
|
32
|
+
externalId: z.string().describe("Driver external identifier").nullable().optional()
|
|
33
|
+
}).describe("Driver assignment details.");
|
|
34
|
+
const OptimorouteSearchOrders_TimeWindowSchema = z.object({
|
|
35
|
+
twTo: z.string().describe("End time").nullable().optional(),
|
|
36
|
+
twFrom: z.string().describe("Start time").nullable().optional()
|
|
37
|
+
}).describe("Time window for order service.");
|
|
38
|
+
const OptimorouteSearchOrders_OrderDataSchema = z.object({
|
|
39
|
+
id: z.string().describe("OptimoRoute's unique order identifier").nullable().optional(),
|
|
40
|
+
date: z.string().describe("Order date in YYYY-MM-DD format").nullable().optional(),
|
|
41
|
+
type: z.string().describe("Order type: 'D' (delivery), 'P' (pickup), 'T' (task), 'break', 'depot'").nullable().optional(),
|
|
42
|
+
email: z.string().describe("Customer email").nullable().optional(),
|
|
43
|
+
load1: z.number().describe("Load requirement type 1").nullable().optional(),
|
|
44
|
+
load2: z.number().describe("Load requirement type 2").nullable().optional(),
|
|
45
|
+
load3: z.number().describe("Load requirement type 3").nullable().optional(),
|
|
46
|
+
load4: z.number().describe("Load requirement type 4").nullable().optional(),
|
|
47
|
+
notes: z.string().describe("Delivery instructions").nullable().optional(),
|
|
48
|
+
phone: z.string().describe("Customer phone").nullable().optional(),
|
|
49
|
+
skills: z.array(z.string()).describe("Required driver skills").nullable().optional(),
|
|
50
|
+
status: z.string().describe("Order status").nullable().optional(),
|
|
51
|
+
orderNo: z.string().describe("User-specified order identifier").nullable().optional(),
|
|
52
|
+
duration: z.number().describe("Service time in minutes").nullable().optional(),
|
|
53
|
+
location: OptimorouteSearchOrders_LocationSchema.nullable().optional(),
|
|
54
|
+
priority: z.string().describe("Priority level: 'L' (low), 'M' (medium), 'H' (high), 'C' (critical)").nullable().optional(),
|
|
55
|
+
relatedId: z.string().describe("ID-based related order reference").nullable().optional(),
|
|
56
|
+
assignedTo: OptimorouteSearchOrders_AssignedToSchema.nullable().optional(),
|
|
57
|
+
timeWindows: z.array(OptimorouteSearchOrders_TimeWindowSchema).describe("Time windows for service").nullable().optional(),
|
|
58
|
+
customField1: z.string().describe("Legacy custom field 1").nullable().optional(),
|
|
59
|
+
customField2: z.string().describe("Legacy custom field 2").nullable().optional(),
|
|
60
|
+
customField3: z.string().describe("Legacy custom field 3").nullable().optional(),
|
|
61
|
+
customField4: z.string().describe("Legacy custom field 4").nullable().optional(),
|
|
62
|
+
customField5: z.string().describe("Legacy custom field 5").nullable().optional(),
|
|
63
|
+
customFields: z.record(z.string(), z.unknown()).describe("Modern custom fields").nullable().optional(),
|
|
64
|
+
relatedOrderNo: z.string().describe("Links pickup/delivery pairs").nullable().optional(),
|
|
65
|
+
allowedWeekdays: z.array(z.string()).describe("Restricted days: ['mon', 'tue', 'wed', etc.]").nullable().optional(),
|
|
66
|
+
vehicleFeatures: z.array(z.string()).describe("Required vehicle features").nullable().optional(),
|
|
67
|
+
notificationPreference: z.string().describe("Notification preference: 'dont_notify', 'email', 'sms', 'both'").nullable().optional()
|
|
68
|
+
}).describe("Complete order details returned in search results.");
|
|
69
|
+
const optimorouteSearchOrders = action("OPTIMOROUTE_SEARCH_ORDERS", {
|
|
70
|
+
slug: "optimoroute-search-orders",
|
|
71
|
+
name: "Search Orders",
|
|
72
|
+
description: "Tool to search for orders in OptimoRoute based on criteria. Use when you need to find orders by date range, order identifiers, or order status. At least one of 'orders' or 'date_range' must be provided.",
|
|
73
|
+
input: OptimorouteSearchOrdersInput,
|
|
74
|
+
output: z.object({
|
|
75
|
+
code: z.string().describe("Error code if search failed").nullable().optional(),
|
|
76
|
+
orders: z.array(OptimorouteSearchOrders_OrderDataSchema).describe("Array of order objects matching the search criteria"),
|
|
77
|
+
message: z.string().describe("Error description if search failed").nullable().optional(),
|
|
78
|
+
success: z.boolean().describe("Indicates if the search was successful"),
|
|
79
|
+
afterTag: z.string().describe("Pagination cursor. If present, pass this value as 'after_tag' in the next request to retrieve additional results.").nullable().optional()
|
|
80
|
+
}).describe("Response schema for searching orders.")
|
|
81
|
+
});
|
|
82
|
+
//#endregion
|
|
83
|
+
export { optimorouteSearchOrders };
|
|
84
|
+
|
|
85
|
+
//# sourceMappingURL=search-orders.mjs.map
|