@orq-ai/node 4.8.0-rc.31 → 4.8.0-rc.32

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.
Files changed (203) hide show
  1. package/README.md +58 -35
  2. package/funcs/policiesList.js +1 -2
  3. package/funcs/policiesList.js.map +1 -1
  4. package/funcs/schedulesCreate.d.ts +18 -0
  5. package/funcs/schedulesCreate.d.ts.map +1 -0
  6. package/funcs/schedulesCreate.js +125 -0
  7. package/funcs/schedulesCreate.js.map +1 -0
  8. package/funcs/schedulesDelete.d.ts +18 -0
  9. package/funcs/schedulesDelete.d.ts.map +1 -0
  10. package/funcs/schedulesDelete.js +129 -0
  11. package/funcs/schedulesDelete.js.map +1 -0
  12. package/funcs/schedulesList.d.ts +17 -0
  13. package/funcs/schedulesList.d.ts.map +1 -0
  14. package/funcs/schedulesList.js +120 -0
  15. package/funcs/schedulesList.js.map +1 -0
  16. package/funcs/schedulesRetrieve.d.ts +18 -0
  17. package/funcs/schedulesRetrieve.d.ts.map +1 -0
  18. package/funcs/schedulesRetrieve.js +128 -0
  19. package/funcs/schedulesRetrieve.js.map +1 -0
  20. package/funcs/schedulesTrigger.d.ts +18 -0
  21. package/funcs/schedulesTrigger.d.ts.map +1 -0
  22. package/funcs/schedulesTrigger.js +128 -0
  23. package/funcs/schedulesTrigger.js.map +1 -0
  24. package/funcs/schedulesUpdate.d.ts +18 -0
  25. package/funcs/schedulesUpdate.d.ts.map +1 -0
  26. package/funcs/schedulesUpdate.js +129 -0
  27. package/funcs/schedulesUpdate.js.map +1 -0
  28. package/jsr.json +1 -1
  29. package/lib/config.d.ts +2 -2
  30. package/lib/config.js +2 -2
  31. package/models/components/index.d.ts +3 -0
  32. package/models/components/index.d.ts.map +1 -1
  33. package/models/components/index.js +3 -0
  34. package/models/components/index.js.map +1 -1
  35. package/models/components/publicschedule.d.ts +66 -0
  36. package/models/components/publicschedule.d.ts.map +1 -0
  37. package/models/components/publicschedule.js +86 -0
  38. package/models/components/publicschedule.js.map +1 -0
  39. package/models/components/publicscheduleerrordetail.d.ts +17 -0
  40. package/models/components/publicscheduleerrordetail.d.ts.map +1 -0
  41. package/models/components/publicscheduleerrordetail.js +51 -0
  42. package/models/components/publicscheduleerrordetail.js.map +1 -0
  43. package/models/components/publicschedulepayload.d.ts +43 -0
  44. package/models/components/publicschedulepayload.d.ts.map +1 -0
  45. package/models/components/publicschedulepayload.js +73 -0
  46. package/models/components/publicschedulepayload.js.map +1 -0
  47. package/models/components/reasoningpart.js +1 -1
  48. package/models/errors/createagentschedule.d.ts +46 -0
  49. package/models/errors/createagentschedule.d.ts.map +1 -0
  50. package/models/errors/createagentschedule.js +99 -0
  51. package/models/errors/createagentschedule.js.map +1 -0
  52. package/models/errors/deleteagentschedule.d.ts +25 -0
  53. package/models/errors/deleteagentschedule.d.ts.map +1 -0
  54. package/models/errors/deleteagentschedule.js +71 -0
  55. package/models/errors/deleteagentschedule.js.map +1 -0
  56. package/models/errors/index.d.ts +5 -0
  57. package/models/errors/index.d.ts.map +1 -1
  58. package/models/errors/index.js +5 -0
  59. package/models/errors/index.js.map +1 -1
  60. package/models/errors/retrieveagentschedule.d.ts +25 -0
  61. package/models/errors/retrieveagentschedule.d.ts.map +1 -0
  62. package/models/errors/retrieveagentschedule.js +71 -0
  63. package/models/errors/retrieveagentschedule.js.map +1 -0
  64. package/models/errors/triggeragentschedule.d.ts +46 -0
  65. package/models/errors/triggeragentschedule.d.ts.map +1 -0
  66. package/models/errors/triggeragentschedule.js +99 -0
  67. package/models/errors/triggeragentschedule.js.map +1 -0
  68. package/models/errors/updateagentschedule.d.ts +46 -0
  69. package/models/errors/updateagentschedule.d.ts.map +1 -0
  70. package/models/errors/updateagentschedule.js +99 -0
  71. package/models/errors/updateagentschedule.js.map +1 -0
  72. package/models/operations/createagentschedule.d.ts +123 -0
  73. package/models/operations/createagentschedule.d.ts.map +1 -0
  74. package/models/operations/createagentschedule.js +125 -0
  75. package/models/operations/createagentschedule.js.map +1 -0
  76. package/models/operations/createcontact.js +1 -1
  77. package/models/operations/createdataset.js +1 -1
  78. package/models/operations/createdatasetitem.js +4 -4
  79. package/models/operations/createdatasource.js +1 -1
  80. package/models/operations/createeval.js +16 -16
  81. package/models/operations/createidentity.js +1 -1
  82. package/models/operations/createtool.js +6 -6
  83. package/models/operations/deleteagentschedule.d.ts +20 -0
  84. package/models/operations/deleteagentschedule.d.ts.map +1 -0
  85. package/models/operations/deleteagentschedule.js +56 -0
  86. package/models/operations/deleteagentschedule.js.map +1 -0
  87. package/models/operations/getalltools.js +6 -6
  88. package/models/operations/getevals.js +16 -16
  89. package/models/operations/getv2humanevalsets.js +2 -2
  90. package/models/operations/getv2humanevalsetsid.js +2 -2
  91. package/models/operations/index.d.ts +6 -0
  92. package/models/operations/index.d.ts.map +1 -1
  93. package/models/operations/index.js +6 -0
  94. package/models/operations/index.js.map +1 -1
  95. package/models/operations/listagentschedules.d.ts +27 -0
  96. package/models/operations/listagentschedules.d.ts.map +1 -0
  97. package/models/operations/listagentschedules.js +64 -0
  98. package/models/operations/listagentschedules.js.map +1 -0
  99. package/models/operations/listdatasetdatapoints.js +4 -4
  100. package/models/operations/listdatasets.js +1 -1
  101. package/models/operations/listdatasources.js +1 -1
  102. package/models/operations/listidentities.js +1 -1
  103. package/models/operations/patchv2humanevalsetsid.js +2 -2
  104. package/models/operations/policylist.d.ts +3 -8
  105. package/models/operations/policylist.d.ts.map +1 -1
  106. package/models/operations/policylist.js +2 -2
  107. package/models/operations/policylist.js.map +1 -1
  108. package/models/operations/postv2feedbackevaluation.js +3 -3
  109. package/models/operations/postv2humanevalsets.js +2 -2
  110. package/models/operations/retrieveagentschedule.d.ts +87 -0
  111. package/models/operations/retrieveagentschedule.d.ts.map +1 -0
  112. package/models/operations/retrieveagentschedule.js +100 -0
  113. package/models/operations/retrieveagentschedule.js.map +1 -0
  114. package/models/operations/retrievedatapoint.js +4 -4
  115. package/models/operations/retrievedataset.js +1 -1
  116. package/models/operations/retrievedatasource.js +1 -1
  117. package/models/operations/retrieveidentity.js +1 -1
  118. package/models/operations/retrievetool.js +6 -6
  119. package/models/operations/runagent.js +1 -1
  120. package/models/operations/streamrunagent.js +1 -1
  121. package/models/operations/triggeragentschedule.d.ts +35 -0
  122. package/models/operations/triggeragentschedule.d.ts.map +1 -0
  123. package/models/operations/triggeragentschedule.js +70 -0
  124. package/models/operations/triggeragentschedule.js.map +1 -0
  125. package/models/operations/updateagentschedule.d.ts +133 -0
  126. package/models/operations/updateagentschedule.d.ts.map +1 -0
  127. package/models/operations/updateagentschedule.js +129 -0
  128. package/models/operations/updateagentschedule.js.map +1 -0
  129. package/models/operations/updatedatapoint.js +4 -4
  130. package/models/operations/updatedataset.js +1 -1
  131. package/models/operations/updatedatasource.js +1 -1
  132. package/models/operations/updateeval.js +16 -16
  133. package/models/operations/updateidentity.js +1 -1
  134. package/models/operations/updatetool.js +7 -7
  135. package/package.json +9 -9
  136. package/sdk/schedules.d.ts +47 -0
  137. package/sdk/schedules.d.ts.map +1 -0
  138. package/sdk/schedules.js +72 -0
  139. package/sdk/schedules.js.map +1 -0
  140. package/sdk/sdk.d.ts +3 -0
  141. package/sdk/sdk.d.ts.map +1 -1
  142. package/sdk/sdk.js +4 -0
  143. package/sdk/sdk.js.map +1 -1
  144. package/src/funcs/policiesList.ts +1 -2
  145. package/src/funcs/schedulesCreate.ts +185 -0
  146. package/src/funcs/schedulesDelete.ts +184 -0
  147. package/src/funcs/schedulesList.ts +167 -0
  148. package/src/funcs/schedulesRetrieve.ts +183 -0
  149. package/src/funcs/schedulesTrigger.ts +190 -0
  150. package/src/funcs/schedulesUpdate.ts +191 -0
  151. package/src/lib/config.ts +2 -2
  152. package/src/models/components/index.ts +3 -0
  153. package/src/models/components/publicschedule.ts +121 -0
  154. package/src/models/components/publicscheduleerrordetail.ts +39 -0
  155. package/src/models/components/publicschedulepayload.ts +84 -0
  156. package/src/models/components/reasoningpart.ts +1 -1
  157. package/src/models/errors/createagentschedule.ts +105 -0
  158. package/src/models/errors/deleteagentschedule.ts +56 -0
  159. package/src/models/errors/index.ts +5 -0
  160. package/src/models/errors/retrieveagentschedule.ts +56 -0
  161. package/src/models/errors/triggeragentschedule.ts +105 -0
  162. package/src/models/errors/updateagentschedule.ts +105 -0
  163. package/src/models/operations/createagentschedule.ts +230 -0
  164. package/src/models/operations/createcontact.ts +1 -1
  165. package/src/models/operations/createdataset.ts +1 -1
  166. package/src/models/operations/createdatasetitem.ts +4 -4
  167. package/src/models/operations/createdatasource.ts +1 -1
  168. package/src/models/operations/createeval.ts +16 -16
  169. package/src/models/operations/createidentity.ts +1 -1
  170. package/src/models/operations/createtool.ts +6 -6
  171. package/src/models/operations/deleteagentschedule.ts +46 -0
  172. package/src/models/operations/getalltools.ts +6 -6
  173. package/src/models/operations/getevals.ts +16 -16
  174. package/src/models/operations/getv2humanevalsets.ts +2 -2
  175. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  176. package/src/models/operations/index.ts +6 -0
  177. package/src/models/operations/listagentschedules.ts +69 -0
  178. package/src/models/operations/listdatasetdatapoints.ts +4 -4
  179. package/src/models/operations/listdatasets.ts +1 -1
  180. package/src/models/operations/listdatasources.ts +1 -1
  181. package/src/models/operations/listidentities.ts +1 -1
  182. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  183. package/src/models/operations/policylist.ts +5 -10
  184. package/src/models/operations/postv2feedbackevaluation.ts +3 -3
  185. package/src/models/operations/postv2humanevalsets.ts +2 -2
  186. package/src/models/operations/retrieveagentschedule.ts +165 -0
  187. package/src/models/operations/retrievedatapoint.ts +4 -4
  188. package/src/models/operations/retrievedataset.ts +1 -1
  189. package/src/models/operations/retrievedatasource.ts +1 -1
  190. package/src/models/operations/retrieveidentity.ts +1 -1
  191. package/src/models/operations/retrievetool.ts +6 -6
  192. package/src/models/operations/runagent.ts +1 -1
  193. package/src/models/operations/streamrunagent.ts +1 -1
  194. package/src/models/operations/triggeragentschedule.ts +86 -0
  195. package/src/models/operations/updateagentschedule.ts +244 -0
  196. package/src/models/operations/updatedatapoint.ts +4 -4
  197. package/src/models/operations/updatedataset.ts +1 -1
  198. package/src/models/operations/updatedatasource.ts +1 -1
  199. package/src/models/operations/updateeval.ts +16 -16
  200. package/src/models/operations/updateidentity.ts +1 -1
  201. package/src/models/operations/updatetool.ts +7 -7
  202. package/src/sdk/schedules.ts +117 -0
  203. package/src/sdk/sdk.ts +6 -0
@@ -173,7 +173,7 @@ export const RequestBody3$outboundSchema: z.ZodType<
173
173
  humanReviewId: z.string(),
174
174
  source: PostV2FeedbackEvaluationRequestBodyRequestSource$outboundSchema
175
175
  .default("orq"),
176
- reviewedAt: z.date().default(() => new Date("2026-04-20T13:00:24.936Z"))
176
+ reviewedAt: z.date().default(() => new Date("2026-04-20T13:50:00.555Z"))
177
177
  .transform(v => v.toISOString()),
178
178
  type: z.literal("string_array"),
179
179
  values: z.array(z.string()),
@@ -225,7 +225,7 @@ export const RequestBody2$outboundSchema: z.ZodType<
225
225
  source: PostV2FeedbackEvaluationRequestBodySource$outboundSchema.default(
226
226
  "orq",
227
227
  ),
228
- reviewedAt: z.date().default(() => new Date("2026-04-20T13:00:24.936Z"))
228
+ reviewedAt: z.date().default(() => new Date("2026-04-20T13:50:00.555Z"))
229
229
  .transform(v => v.toISOString()),
230
230
  type: z.literal("number"),
231
231
  value: z.number(),
@@ -275,7 +275,7 @@ export const RequestBody1$outboundSchema: z.ZodType<
275
275
  evaluationType: EvaluationType$outboundSchema,
276
276
  humanReviewId: z.string(),
277
277
  source: RequestBodySource$outboundSchema.default("orq"),
278
- reviewedAt: z.date().default(() => new Date("2026-04-20T13:00:24.935Z"))
278
+ reviewedAt: z.date().default(() => new Date("2026-04-20T13:50:00.554Z"))
279
279
  .transform(v => v.toISOString()),
280
280
  type: z.literal("string"),
281
281
  value: z.string(),
@@ -271,7 +271,7 @@ export const PostV2HumanEvalSetsResponseBody2$inboundSchema: z.ZodType<
271
271
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
272
272
  .optional(),
273
273
  updated: z.string().datetime({ offset: true }).default(
274
- "2026-04-20T13:00:08.690Z",
274
+ "2026-04-20T13:49:43.154Z",
275
275
  ).transform(v => new Date(v)),
276
276
  filter_type: z.literal("name"),
277
277
  filter_value: z.string(),
@@ -316,7 +316,7 @@ export const PostV2HumanEvalSetsResponseBody1$inboundSchema: z.ZodType<
316
316
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
317
317
  .optional(),
318
318
  updated: z.string().datetime({ offset: true }).default(
319
- "2026-04-20T13:00:08.690Z",
319
+ "2026-04-20T13:49:43.154Z",
320
320
  ).transform(v => new Date(v)),
321
321
  filter_type: z.literal("span_type"),
322
322
  filter_values: z.array(z.string()),
@@ -0,0 +1,165 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import * as components from "../components/index.js";
11
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
+
13
+ export type RetrieveAgentScheduleRequest = {
14
+ /**
15
+ * The unique routing key of the agent the schedule belongs to.
16
+ */
17
+ agentKey: string;
18
+ /**
19
+ * The schedule's ULID, as returned from create.
20
+ */
21
+ scheduleId: string;
22
+ };
23
+
24
+ /**
25
+ * Schedule type.
26
+ */
27
+ export const RetrieveAgentScheduleType = {
28
+ Cron: "cron",
29
+ Once: "once",
30
+ Interval: "interval",
31
+ } as const;
32
+ /**
33
+ * Schedule type.
34
+ */
35
+ export type RetrieveAgentScheduleType = ClosedEnum<
36
+ typeof RetrieveAgentScheduleType
37
+ >;
38
+
39
+ /**
40
+ * Schedule retrieved.
41
+ */
42
+ export type RetrieveAgentScheduleResponseBody = {
43
+ /**
44
+ * ULID identifying this schedule.
45
+ */
46
+ id: string;
47
+ agentKey: string;
48
+ /**
49
+ * Pinned agent version. Omit to always run the agent's current active version.
50
+ */
51
+ agentTag?: string | undefined;
52
+ created: Date;
53
+ /**
54
+ * ID of the API key that created the schedule.
55
+ */
56
+ createdById: string;
57
+ /**
58
+ * Cron expression (6-field, seconds required), @every duration, @at RFC3339 timestamp, or a predefined descriptor like @hourly/@daily.
59
+ */
60
+ expression: string;
61
+ /**
62
+ * Monotonic counter bumped when the schedule's firing cadence changes. Used by the consumer to skip stale in-flight triggers.
63
+ */
64
+ generation: number;
65
+ /**
66
+ * Whether the schedule is currently firing. once schedules flip to false automatically after firing.
67
+ */
68
+ isActive: boolean;
69
+ /**
70
+ * Timestamp of the most recent firing, if any.
71
+ */
72
+ lastTriggeredAt?: Date | undefined;
73
+ payload: components.PublicSchedulePayload;
74
+ /**
75
+ * Total firings since creation or last expression/type change.
76
+ */
77
+ triggerCount: number;
78
+ /**
79
+ * Schedule type.
80
+ */
81
+ type: RetrieveAgentScheduleType;
82
+ updated: Date;
83
+ workspaceId: string;
84
+ };
85
+
86
+ /** @internal */
87
+ export type RetrieveAgentScheduleRequest$Outbound = {
88
+ agent_key: string;
89
+ schedule_id: string;
90
+ };
91
+
92
+ /** @internal */
93
+ export const RetrieveAgentScheduleRequest$outboundSchema: z.ZodType<
94
+ RetrieveAgentScheduleRequest$Outbound,
95
+ z.ZodTypeDef,
96
+ RetrieveAgentScheduleRequest
97
+ > = z.object({
98
+ agentKey: z.string(),
99
+ scheduleId: z.string(),
100
+ }).transform((v) => {
101
+ return remap$(v, {
102
+ agentKey: "agent_key",
103
+ scheduleId: "schedule_id",
104
+ });
105
+ });
106
+
107
+ export function retrieveAgentScheduleRequestToJSON(
108
+ retrieveAgentScheduleRequest: RetrieveAgentScheduleRequest,
109
+ ): string {
110
+ return JSON.stringify(
111
+ RetrieveAgentScheduleRequest$outboundSchema.parse(
112
+ retrieveAgentScheduleRequest,
113
+ ),
114
+ );
115
+ }
116
+
117
+ /** @internal */
118
+ export const RetrieveAgentScheduleType$inboundSchema: z.ZodNativeEnum<
119
+ typeof RetrieveAgentScheduleType
120
+ > = z.nativeEnum(RetrieveAgentScheduleType);
121
+
122
+ /** @internal */
123
+ export const RetrieveAgentScheduleResponseBody$inboundSchema: z.ZodType<
124
+ RetrieveAgentScheduleResponseBody,
125
+ z.ZodTypeDef,
126
+ unknown
127
+ > = z.object({
128
+ _id: z.string(),
129
+ agent_key: z.string(),
130
+ agent_tag: z.string().optional(),
131
+ created: z.string().datetime({ offset: true }).transform(v => new Date(v)),
132
+ created_by_id: z.string(),
133
+ expression: z.string(),
134
+ generation: z.number().int(),
135
+ is_active: z.boolean(),
136
+ last_triggered_at: z.string().datetime({ offset: true }).transform(v =>
137
+ new Date(v)
138
+ ).optional(),
139
+ payload: components.PublicSchedulePayload$inboundSchema,
140
+ trigger_count: z.number().int(),
141
+ type: RetrieveAgentScheduleType$inboundSchema,
142
+ updated: z.string().datetime({ offset: true }).transform(v => new Date(v)),
143
+ workspace_id: z.string(),
144
+ }).transform((v) => {
145
+ return remap$(v, {
146
+ "_id": "id",
147
+ "agent_key": "agentKey",
148
+ "agent_tag": "agentTag",
149
+ "created_by_id": "createdById",
150
+ "is_active": "isActive",
151
+ "last_triggered_at": "lastTriggeredAt",
152
+ "trigger_count": "triggerCount",
153
+ "workspace_id": "workspaceId",
154
+ });
155
+ });
156
+
157
+ export function retrieveAgentScheduleResponseBodyFromJSON(
158
+ jsonString: string,
159
+ ): SafeParseResult<RetrieveAgentScheduleResponseBody, SDKValidationError> {
160
+ return safeParse(
161
+ jsonString,
162
+ (x) => RetrieveAgentScheduleResponseBody$inboundSchema.parse(JSON.parse(x)),
163
+ `Failed to parse 'RetrieveAgentScheduleResponseBody' from JSON`,
164
+ );
165
+ }
@@ -1207,7 +1207,7 @@ export const RetrieveDatapointEvaluations3$inboundSchema: z.ZodType<
1207
1207
  .default("orq"),
1208
1208
  reviewed_by_id: z.string(),
1209
1209
  reviewed_at: z.string().datetime({ offset: true }).default(
1210
- "2026-04-20T13:00:24.776Z",
1210
+ "2026-04-20T13:50:00.390Z",
1211
1211
  ).transform(v => new Date(v)),
1212
1212
  type: z.literal("string_array"),
1213
1213
  values: z.array(z.string()),
@@ -1255,7 +1255,7 @@ export const RetrieveDatapointEvaluations2$inboundSchema: z.ZodType<
1255
1255
  ),
1256
1256
  reviewed_by_id: z.string(),
1257
1257
  reviewed_at: z.string().datetime({ offset: true }).default(
1258
- "2026-04-20T13:00:24.775Z",
1258
+ "2026-04-20T13:50:00.389Z",
1259
1259
  ).transform(v => new Date(v)),
1260
1260
  type: z.literal("number"),
1261
1261
  value: z.number(),
@@ -1300,7 +1300,7 @@ export const RetrieveDatapointEvaluations1$inboundSchema: z.ZodType<
1300
1300
  source: RetrieveDatapointEvaluationsSource$inboundSchema.default("orq"),
1301
1301
  reviewed_by_id: z.string(),
1302
1302
  reviewed_at: z.string().datetime({ offset: true }).default(
1303
- "2026-04-20T13:00:24.775Z",
1303
+ "2026-04-20T13:50:00.389Z",
1304
1304
  ).transform(v => new Date(v)),
1305
1305
  type: z.literal("string"),
1306
1306
  value: z.string(),
@@ -1377,7 +1377,7 @@ export const RetrieveDatapointResponseBody$inboundSchema: z.ZodType<
1377
1377
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
1378
1378
  .optional(),
1379
1379
  updated: z.string().datetime({ offset: true }).default(
1380
- "2026-04-20T13:00:08.690Z",
1380
+ "2026-04-20T13:49:43.154Z",
1381
1381
  ).transform(v => new Date(v)),
1382
1382
  }).transform((v) => {
1383
1383
  return remap$(v, {
@@ -126,7 +126,7 @@ export const RetrieveDatasetResponseBody$inboundSchema: z.ZodType<
126
126
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
127
127
  .optional(),
128
128
  updated: z.string().datetime({ offset: true }).default(
129
- "2026-04-20T13:00:08.690Z",
129
+ "2026-04-20T13:49:43.154Z",
130
130
  ).transform(v => new Date(v)),
131
131
  }).transform((v) => {
132
132
  return remap$(v, {
@@ -118,7 +118,7 @@ export const RetrieveDatasourceResponseBody$inboundSchema: z.ZodType<
118
118
  z.ZodTypeDef,
119
119
  unknown
120
120
  > = z.object({
121
- _id: z.string().default("01KPNFMM88HP0JTSBEZTTH1KWB"),
121
+ _id: z.string().default("01KPNJFE3V3AVJ9HQCC93EQH6N"),
122
122
  display_name: z.string(),
123
123
  description: z.string().optional(),
124
124
  status: RetrieveDatasourceStatus$inboundSchema,
@@ -151,7 +151,7 @@ export const RetrieveIdentityResponseBody$inboundSchema: z.ZodType<
151
151
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
152
152
  .optional(),
153
153
  updated: z.string().datetime({ offset: true }).default(
154
- "2026-04-20T13:00:08.690Z",
154
+ "2026-04-20T13:49:43.154Z",
155
155
  ).transform(v => new Date(v)),
156
156
  metrics: z.nullable(z.lazy(() => Metrics$inboundSchema)).optional(),
157
157
  }).transform((v) => {
@@ -753,7 +753,7 @@ export const RetrieveToolResponseBodyCodeExecutionTool$inboundSchema: z.ZodType<
753
753
  z.ZodTypeDef,
754
754
  unknown
755
755
  > = z.object({
756
- _id: z.string().default("tool_01KPNFMM52AC4ANGZB5J3JVZRV"),
756
+ _id: z.string().default("tool_01KPNJFE0R0MS9CKJ1BRE2CDGW"),
757
757
  path: z.string(),
758
758
  key: z.string(),
759
759
  display_name: z.string().optional(),
@@ -859,7 +859,7 @@ export const RetrieveToolResponseBodyTools$inboundSchema: z.ZodType<
859
859
  z.ZodTypeDef,
860
860
  unknown
861
861
  > = z.object({
862
- id: z.string().default("01KPNFMM515MDBTF9R6FMBCXX9"),
862
+ id: z.string().default("01KPNJFE0Q206GE0FHPWV3PGT4"),
863
863
  name: z.string(),
864
864
  description: z.string().optional(),
865
865
  schema: z.lazy(() => RetrieveToolResponseBodyToolsSchema$inboundSchema),
@@ -917,7 +917,7 @@ export const RetrieveToolResponseBodyMCPTool$inboundSchema: z.ZodType<
917
917
  z.ZodTypeDef,
918
918
  unknown
919
919
  > = z.object({
920
- _id: z.string().default("tool_01KPNFMM50M4YKX0M8BWCSFEBY"),
920
+ _id: z.string().default("tool_01KPNJFE0P4Q8GEZV47D1HK72X"),
921
921
  path: z.string(),
922
922
  key: z.string(),
923
923
  display_name: z.string().optional(),
@@ -1108,7 +1108,7 @@ export const RetrieveToolResponseBodyHTTPTool$inboundSchema: z.ZodType<
1108
1108
  z.ZodTypeDef,
1109
1109
  unknown
1110
1110
  > = z.object({
1111
- _id: z.string().default("tool_01KPNFMM4ZZXPB7J72YX68AEKZ"),
1111
+ _id: z.string().default("tool_01KPNJFE0M2VD4SWCBRED66NF9"),
1112
1112
  path: z.string(),
1113
1113
  key: z.string(),
1114
1114
  display_name: z.string().optional(),
@@ -1204,7 +1204,7 @@ export const RetrieveToolResponseBodyJSONSchemaTool$inboundSchema: z.ZodType<
1204
1204
  z.ZodTypeDef,
1205
1205
  unknown
1206
1206
  > = z.object({
1207
- _id: z.string().default("tool_01KPNFMM4X2EG4N1E1R8P1RQWT"),
1207
+ _id: z.string().default("tool_01KPNJFE0JCW330A7HCVX4NSV0"),
1208
1208
  path: z.string(),
1209
1209
  key: z.string(),
1210
1210
  display_name: z.string().optional(),
@@ -1310,7 +1310,7 @@ export const RetrieveToolResponseBodyFunctionTool$inboundSchema: z.ZodType<
1310
1310
  z.ZodTypeDef,
1311
1311
  unknown
1312
1312
  > = z.object({
1313
- _id: z.string().default("tool_01KPNFMM4WV8DEMCGNFAC1Q6Q8"),
1313
+ _id: z.string().default("tool_01KPNJFE0H3Q5VG6NZB9W81H3R"),
1314
1314
  path: z.string(),
1315
1315
  key: z.string(),
1316
1316
  display_name: z.string().optional(),
@@ -3628,7 +3628,7 @@ export const Tools$outboundSchema: z.ZodType<
3628
3628
  z.ZodTypeDef,
3629
3629
  Tools
3630
3630
  > = z.object({
3631
- id: z.string().default("01KPNFMKRB1TTS37V9NNXGMGD0"),
3631
+ id: z.string().default("01KPNJFDKABSZFXK86WK65XPTY"),
3632
3632
  name: z.string(),
3633
3633
  description: z.string().optional(),
3634
3634
  schema: z.lazy(() => AgentToolInputRunSchema$outboundSchema),
@@ -3675,7 +3675,7 @@ export const AgentToolInputRunTools$outboundSchema: z.ZodType<
3675
3675
  z.ZodTypeDef,
3676
3676
  AgentToolInputRunTools
3677
3677
  > = z.object({
3678
- id: z.string().default("01KPNFMKT1ZHQM74V91D8SS7BC"),
3678
+ id: z.string().default("01KPNJFDN0T0Z11KC96HVZWERQ"),
3679
3679
  name: z.string(),
3680
3680
  description: z.string().optional(),
3681
3681
  schema: z.lazy(() =>
@@ -0,0 +1,86 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type TriggerAgentScheduleRequest = {
12
+ /**
13
+ * The unique routing key of the agent the schedule belongs to.
14
+ */
15
+ agentKey: string;
16
+ /**
17
+ * The schedule's ULID, as returned from create.
18
+ */
19
+ scheduleId: string;
20
+ };
21
+
22
+ /**
23
+ * Execution scheduled for immediate delivery.
24
+ */
25
+ export type TriggerAgentScheduleResponseBody = {
26
+ scheduleId: string;
27
+ /**
28
+ * Always "triggered" on success.
29
+ */
30
+ status: string;
31
+ };
32
+
33
+ /** @internal */
34
+ export type TriggerAgentScheduleRequest$Outbound = {
35
+ agent_key: string;
36
+ schedule_id: string;
37
+ };
38
+
39
+ /** @internal */
40
+ export const TriggerAgentScheduleRequest$outboundSchema: z.ZodType<
41
+ TriggerAgentScheduleRequest$Outbound,
42
+ z.ZodTypeDef,
43
+ TriggerAgentScheduleRequest
44
+ > = z.object({
45
+ agentKey: z.string(),
46
+ scheduleId: z.string(),
47
+ }).transform((v) => {
48
+ return remap$(v, {
49
+ agentKey: "agent_key",
50
+ scheduleId: "schedule_id",
51
+ });
52
+ });
53
+
54
+ export function triggerAgentScheduleRequestToJSON(
55
+ triggerAgentScheduleRequest: TriggerAgentScheduleRequest,
56
+ ): string {
57
+ return JSON.stringify(
58
+ TriggerAgentScheduleRequest$outboundSchema.parse(
59
+ triggerAgentScheduleRequest,
60
+ ),
61
+ );
62
+ }
63
+
64
+ /** @internal */
65
+ export const TriggerAgentScheduleResponseBody$inboundSchema: z.ZodType<
66
+ TriggerAgentScheduleResponseBody,
67
+ z.ZodTypeDef,
68
+ unknown
69
+ > = z.object({
70
+ schedule_id: z.string(),
71
+ status: z.string(),
72
+ }).transform((v) => {
73
+ return remap$(v, {
74
+ "schedule_id": "scheduleId",
75
+ });
76
+ });
77
+
78
+ export function triggerAgentScheduleResponseBodyFromJSON(
79
+ jsonString: string,
80
+ ): SafeParseResult<TriggerAgentScheduleResponseBody, SDKValidationError> {
81
+ return safeParse(
82
+ jsonString,
83
+ (x) => TriggerAgentScheduleResponseBody$inboundSchema.parse(JSON.parse(x)),
84
+ `Failed to parse 'TriggerAgentScheduleResponseBody' from JSON`,
85
+ );
86
+ }
@@ -0,0 +1,244 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import * as components from "../components/index.js";
11
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
+
13
+ /**
14
+ * Change the schedule type. Changing type or expression resets the NATS schedule and bumps generation.
15
+ */
16
+ export const UpdateAgentScheduleType = {
17
+ Cron: "cron",
18
+ Once: "once",
19
+ Interval: "interval",
20
+ } as const;
21
+ /**
22
+ * Change the schedule type. Changing type or expression resets the NATS schedule and bumps generation.
23
+ */
24
+ export type UpdateAgentScheduleType = ClosedEnum<
25
+ typeof UpdateAgentScheduleType
26
+ >;
27
+
28
+ export type UpdateAgentScheduleRequestBody = {
29
+ /**
30
+ * Change the pinned agent version.
31
+ */
32
+ agentTag?: string | undefined;
33
+ /**
34
+ * Update the schedule expression. Minimum firing cadence is 1 hour for cron and interval.
35
+ */
36
+ expression?: string | undefined;
37
+ /**
38
+ * Activate or deactivate the schedule. Deactivating removes the NATS entry; activating re-publishes with current values.
39
+ */
40
+ isActive?: boolean | undefined;
41
+ payload?: components.PublicSchedulePayload | undefined;
42
+ /**
43
+ * Change the schedule type. Changing type or expression resets the NATS schedule and bumps generation.
44
+ */
45
+ type?: UpdateAgentScheduleType | undefined;
46
+ };
47
+
48
+ export type UpdateAgentScheduleRequest = {
49
+ /**
50
+ * The unique routing key of the agent the schedule belongs to.
51
+ */
52
+ agentKey: string;
53
+ /**
54
+ * The schedule's ULID, as returned from create.
55
+ */
56
+ scheduleId: string;
57
+ requestBody: UpdateAgentScheduleRequestBody;
58
+ };
59
+
60
+ /**
61
+ * Schedule type.
62
+ */
63
+ export const UpdateAgentScheduleSchedulesType = {
64
+ Cron: "cron",
65
+ Once: "once",
66
+ Interval: "interval",
67
+ } as const;
68
+ /**
69
+ * Schedule type.
70
+ */
71
+ export type UpdateAgentScheduleSchedulesType = ClosedEnum<
72
+ typeof UpdateAgentScheduleSchedulesType
73
+ >;
74
+
75
+ /**
76
+ * Schedule updated.
77
+ */
78
+ export type UpdateAgentScheduleResponseBody = {
79
+ /**
80
+ * ULID identifying this schedule.
81
+ */
82
+ id: string;
83
+ agentKey: string;
84
+ /**
85
+ * Pinned agent version. Omit to always run the agent's current active version.
86
+ */
87
+ agentTag?: string | undefined;
88
+ created: Date;
89
+ /**
90
+ * ID of the API key that created the schedule.
91
+ */
92
+ createdById: string;
93
+ /**
94
+ * Cron expression (6-field, seconds required), @every duration, @at RFC3339 timestamp, or a predefined descriptor like @hourly/@daily.
95
+ */
96
+ expression: string;
97
+ /**
98
+ * Monotonic counter bumped when the schedule's firing cadence changes. Used by the consumer to skip stale in-flight triggers.
99
+ */
100
+ generation: number;
101
+ /**
102
+ * Whether the schedule is currently firing. once schedules flip to false automatically after firing.
103
+ */
104
+ isActive: boolean;
105
+ /**
106
+ * Timestamp of the most recent firing, if any.
107
+ */
108
+ lastTriggeredAt?: Date | undefined;
109
+ payload: components.PublicSchedulePayload;
110
+ /**
111
+ * Total firings since creation or last expression/type change.
112
+ */
113
+ triggerCount: number;
114
+ /**
115
+ * Schedule type.
116
+ */
117
+ type: UpdateAgentScheduleSchedulesType;
118
+ updated: Date;
119
+ workspaceId: string;
120
+ };
121
+
122
+ /** @internal */
123
+ export const UpdateAgentScheduleType$outboundSchema: z.ZodNativeEnum<
124
+ typeof UpdateAgentScheduleType
125
+ > = z.nativeEnum(UpdateAgentScheduleType);
126
+
127
+ /** @internal */
128
+ export type UpdateAgentScheduleRequestBody$Outbound = {
129
+ agent_tag?: string | undefined;
130
+ expression?: string | undefined;
131
+ is_active?: boolean | undefined;
132
+ payload?: components.PublicSchedulePayload$Outbound | undefined;
133
+ type?: string | undefined;
134
+ };
135
+
136
+ /** @internal */
137
+ export const UpdateAgentScheduleRequestBody$outboundSchema: z.ZodType<
138
+ UpdateAgentScheduleRequestBody$Outbound,
139
+ z.ZodTypeDef,
140
+ UpdateAgentScheduleRequestBody
141
+ > = z.object({
142
+ agentTag: z.string().optional(),
143
+ expression: z.string().optional(),
144
+ isActive: z.boolean().optional(),
145
+ payload: components.PublicSchedulePayload$outboundSchema.optional(),
146
+ type: UpdateAgentScheduleType$outboundSchema.optional(),
147
+ }).transform((v) => {
148
+ return remap$(v, {
149
+ agentTag: "agent_tag",
150
+ isActive: "is_active",
151
+ });
152
+ });
153
+
154
+ export function updateAgentScheduleRequestBodyToJSON(
155
+ updateAgentScheduleRequestBody: UpdateAgentScheduleRequestBody,
156
+ ): string {
157
+ return JSON.stringify(
158
+ UpdateAgentScheduleRequestBody$outboundSchema.parse(
159
+ updateAgentScheduleRequestBody,
160
+ ),
161
+ );
162
+ }
163
+
164
+ /** @internal */
165
+ export type UpdateAgentScheduleRequest$Outbound = {
166
+ agent_key: string;
167
+ schedule_id: string;
168
+ RequestBody: UpdateAgentScheduleRequestBody$Outbound;
169
+ };
170
+
171
+ /** @internal */
172
+ export const UpdateAgentScheduleRequest$outboundSchema: z.ZodType<
173
+ UpdateAgentScheduleRequest$Outbound,
174
+ z.ZodTypeDef,
175
+ UpdateAgentScheduleRequest
176
+ > = z.object({
177
+ agentKey: z.string(),
178
+ scheduleId: z.string(),
179
+ requestBody: z.lazy(() => UpdateAgentScheduleRequestBody$outboundSchema),
180
+ }).transform((v) => {
181
+ return remap$(v, {
182
+ agentKey: "agent_key",
183
+ scheduleId: "schedule_id",
184
+ requestBody: "RequestBody",
185
+ });
186
+ });
187
+
188
+ export function updateAgentScheduleRequestToJSON(
189
+ updateAgentScheduleRequest: UpdateAgentScheduleRequest,
190
+ ): string {
191
+ return JSON.stringify(
192
+ UpdateAgentScheduleRequest$outboundSchema.parse(updateAgentScheduleRequest),
193
+ );
194
+ }
195
+
196
+ /** @internal */
197
+ export const UpdateAgentScheduleSchedulesType$inboundSchema: z.ZodNativeEnum<
198
+ typeof UpdateAgentScheduleSchedulesType
199
+ > = z.nativeEnum(UpdateAgentScheduleSchedulesType);
200
+
201
+ /** @internal */
202
+ export const UpdateAgentScheduleResponseBody$inboundSchema: z.ZodType<
203
+ UpdateAgentScheduleResponseBody,
204
+ z.ZodTypeDef,
205
+ unknown
206
+ > = z.object({
207
+ _id: z.string(),
208
+ agent_key: z.string(),
209
+ agent_tag: z.string().optional(),
210
+ created: z.string().datetime({ offset: true }).transform(v => new Date(v)),
211
+ created_by_id: z.string(),
212
+ expression: z.string(),
213
+ generation: z.number().int(),
214
+ is_active: z.boolean(),
215
+ last_triggered_at: z.string().datetime({ offset: true }).transform(v =>
216
+ new Date(v)
217
+ ).optional(),
218
+ payload: components.PublicSchedulePayload$inboundSchema,
219
+ trigger_count: z.number().int(),
220
+ type: UpdateAgentScheduleSchedulesType$inboundSchema,
221
+ updated: z.string().datetime({ offset: true }).transform(v => new Date(v)),
222
+ workspace_id: z.string(),
223
+ }).transform((v) => {
224
+ return remap$(v, {
225
+ "_id": "id",
226
+ "agent_key": "agentKey",
227
+ "agent_tag": "agentTag",
228
+ "created_by_id": "createdById",
229
+ "is_active": "isActive",
230
+ "last_triggered_at": "lastTriggeredAt",
231
+ "trigger_count": "triggerCount",
232
+ "workspace_id": "workspaceId",
233
+ });
234
+ });
235
+
236
+ export function updateAgentScheduleResponseBodyFromJSON(
237
+ jsonString: string,
238
+ ): SafeParseResult<UpdateAgentScheduleResponseBody, SDKValidationError> {
239
+ return safeParse(
240
+ jsonString,
241
+ (x) => UpdateAgentScheduleResponseBody$inboundSchema.parse(JSON.parse(x)),
242
+ `Failed to parse 'UpdateAgentScheduleResponseBody' from JSON`,
243
+ );
244
+ }