@orq-ai/node 4.11.0 → 4.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +2 -2
  3. package/lib/config.js +2 -2
  4. package/models/components/evaluatorresponsefunction.js +2 -2
  5. package/models/components/evaluatorresponsehttp.js +2 -2
  6. package/models/components/evaluatorresponsejsonschema.js +2 -2
  7. package/models/components/evaluatorresponsellm.js +2 -2
  8. package/models/components/evaluatorresponsepython.js +2 -2
  9. package/models/components/evaluatorresponseragas.js +2 -2
  10. package/models/components/evaluatorresponsetypescript.js +2 -2
  11. package/models/components/reasoningpart.js +1 -1
  12. package/models/operations/createdataset.js +1 -1
  13. package/models/operations/createdatasetitem.js +4 -4
  14. package/models/operations/createdatasource.js +1 -1
  15. package/models/operations/createtool.js +6 -6
  16. package/models/operations/getalltools.js +6 -6
  17. package/models/operations/getv2humanevalsets.js +2 -2
  18. package/models/operations/getv2humanevalsetsid.js +2 -2
  19. package/models/operations/listdatasetdatapoints.js +4 -4
  20. package/models/operations/listdatasets.js +1 -1
  21. package/models/operations/listdatasources.js +1 -1
  22. package/models/operations/patchv2humanevalsetsid.js +2 -2
  23. package/models/operations/postv2feedbackevaluation.js +3 -3
  24. package/models/operations/postv2humanevalsets.js +2 -2
  25. package/models/operations/retrievedatapoint.js +4 -4
  26. package/models/operations/retrievedataset.js +1 -1
  27. package/models/operations/retrievedatasource.js +1 -1
  28. package/models/operations/retrievetool.js +6 -6
  29. package/models/operations/runagent.js +1 -1
  30. package/models/operations/streamrunagent.js +1 -1
  31. package/models/operations/updatedatapoint.js +4 -4
  32. package/models/operations/updatedataset.js +1 -1
  33. package/models/operations/updatedatasource.js +1 -1
  34. package/models/operations/updatetool.js +7 -7
  35. package/package.json +3 -3
  36. package/packages/orq-rc/src/funcs/notifiersCreate.ts +162 -0
  37. package/packages/orq-rc/src/funcs/notifiersDelete.ts +168 -0
  38. package/packages/orq-rc/src/funcs/notifiersGet.ts +168 -0
  39. package/packages/orq-rc/src/funcs/notifiersList.ts +171 -0
  40. package/packages/orq-rc/src/funcs/notifiersUpdate.ts +171 -0
  41. package/packages/orq-rc/src/funcs/tracesAggregate.ts +162 -0
  42. package/packages/orq-rc/src/funcs/tracesGet.ts +168 -0
  43. package/packages/orq-rc/src/funcs/tracesGetSpan.ts +172 -0
  44. package/packages/orq-rc/src/funcs/tracesListFacetValues.ts +177 -0
  45. package/packages/orq-rc/src/funcs/tracesListFacets.ts +144 -0
  46. package/packages/orq-rc/src/funcs/tracesListFields.ts +144 -0
  47. package/packages/orq-rc/src/funcs/tracesListSpans.ts +174 -0
  48. package/packages/orq-rc/src/funcs/tracesQuery.ts +162 -0
  49. package/packages/orq-rc/src/funcs/tracesSearch.ts +162 -0
  50. package/packages/orq-rc/src/lib/config.ts +3 -3
  51. package/packages/orq-rc/src/models/components/actionreviewrequestedstreamingevent.ts +5 -0
  52. package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +5 -0
  53. package/packages/orq-rc/src/models/components/aggregatetracesrequest.ts +65 -0
  54. package/packages/orq-rc/src/models/components/aggregatetracesresponse.ts +37 -0
  55. package/packages/orq-rc/src/models/components/createnotifierrequest.ts +433 -0
  56. package/packages/orq-rc/src/models/components/createnotifierresponse.ts +35 -0
  57. package/packages/orq-rc/src/models/components/deletenotifierresponse.ts +27 -0
  58. package/packages/orq-rc/src/models/components/evaluatorresponsefunction.ts +2 -2
  59. package/packages/orq-rc/src/models/components/evaluatorresponsehttp.ts +2 -2
  60. package/packages/orq-rc/src/models/components/evaluatorresponsejsonschema.ts +2 -2
  61. package/packages/orq-rc/src/models/components/evaluatorresponsellm.ts +2 -2
  62. package/packages/orq-rc/src/models/components/evaluatorresponsepython.ts +2 -2
  63. package/packages/orq-rc/src/models/components/evaluatorresponseragas.ts +2 -2
  64. package/packages/orq-rc/src/models/components/evaluatorresponsetypescript.ts +2 -2
  65. package/packages/orq-rc/src/models/components/getnotifierresponse.ts +35 -0
  66. package/packages/orq-rc/src/models/components/gettraceresponse.ts +32 -0
  67. package/packages/orq-rc/src/models/components/gettracespanresponse.ts +32 -0
  68. package/packages/orq-rc/src/models/components/index.ts +36 -0
  69. package/packages/orq-rc/src/models/components/listnotifiersresponse.ts +50 -0
  70. package/packages/orq-rc/src/models/components/listtracefacetsresponse.ts +32 -0
  71. package/packages/orq-rc/src/models/components/listtracefacetvaluesresponse.ts +44 -0
  72. package/packages/orq-rc/src/models/components/listtracefieldsresponse.ts +32 -0
  73. package/packages/orq-rc/src/models/components/listtracespansresponse.ts +44 -0
  74. package/packages/orq-rc/src/models/components/notifier.ts +465 -0
  75. package/packages/orq-rc/src/models/components/notifiertype.ts +21 -0
  76. package/packages/orq-rc/src/models/components/querytracesrequest.ts +48 -0
  77. package/packages/orq-rc/src/models/components/querytracesresponse.ts +37 -0
  78. package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
  79. package/packages/orq-rc/src/models/components/searchtracesrequest.ts +68 -0
  80. package/packages/orq-rc/src/models/components/searchtracesresponse.ts +72 -0
  81. package/packages/orq-rc/src/models/components/spandetail.ts +53 -0
  82. package/packages/orq-rc/src/models/components/spansummary.ts +76 -0
  83. package/packages/orq-rc/src/models/components/traceagent.ts +33 -0
  84. package/packages/orq-rc/src/models/components/traceaggregaterow.ts +33 -0
  85. package/packages/orq-rc/src/models/components/tracecompute.ts +30 -0
  86. package/packages/orq-rc/src/models/components/tracecontext.ts +39 -0
  87. package/packages/orq-rc/src/models/components/tracecost.ts +77 -0
  88. package/packages/orq-rc/src/models/components/tracefacet.ts +35 -0
  89. package/packages/orq-rc/src/models/components/tracefacetvalue.ts +33 -0
  90. package/packages/orq-rc/src/models/components/tracefield.ts +56 -0
  91. package/packages/orq-rc/src/models/components/tracefilter.ts +33 -0
  92. package/packages/orq-rc/src/models/components/tracesearchmeta.ts +45 -0
  93. package/packages/orq-rc/src/models/components/tracesort.ts +30 -0
  94. package/packages/orq-rc/src/models/components/tracesummary.ts +152 -0
  95. package/packages/orq-rc/src/models/components/traceusage.ts +62 -0
  96. package/packages/orq-rc/src/models/components/updatenotifierrequest.ts +130 -0
  97. package/packages/orq-rc/src/models/components/updatenotifierresponse.ts +35 -0
  98. package/packages/orq-rc/src/models/operations/createagentrequest.ts +77 -0
  99. package/packages/orq-rc/src/models/operations/createdataset.ts +1 -1
  100. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +4 -4
  101. package/packages/orq-rc/src/models/operations/createdatasource.ts +1 -1
  102. package/packages/orq-rc/src/models/operations/createprompt.ts +2 -0
  103. package/packages/orq-rc/src/models/operations/createtool.ts +6 -6
  104. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +2 -0
  105. package/packages/orq-rc/src/models/operations/deployments.ts +2 -0
  106. package/packages/orq-rc/src/models/operations/deploymentstream.ts +2 -0
  107. package/packages/orq-rc/src/models/operations/getallprompts.ts +2 -0
  108. package/packages/orq-rc/src/models/operations/getalltools.ts +6 -6
  109. package/packages/orq-rc/src/models/operations/getoneprompt.ts +2 -0
  110. package/packages/orq-rc/src/models/operations/getpromptversion.ts +2 -0
  111. package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +2 -2
  112. package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +2 -2
  113. package/packages/orq-rc/src/models/operations/index.ts +8 -0
  114. package/packages/orq-rc/src/models/operations/listagents.ts +5 -0
  115. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +4 -4
  116. package/packages/orq-rc/src/models/operations/listdatasets.ts +1 -1
  117. package/packages/orq-rc/src/models/operations/listdatasources.ts +1 -1
  118. package/packages/orq-rc/src/models/operations/listpromptversions.ts +2 -0
  119. package/packages/orq-rc/src/models/operations/notifierdelete.ts +36 -0
  120. package/packages/orq-rc/src/models/operations/notifierget.ts +36 -0
  121. package/packages/orq-rc/src/models/operations/notifierlist.ts +59 -0
  122. package/packages/orq-rc/src/models/operations/notifierupdate.ts +41 -0
  123. package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  124. package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +3 -3
  125. package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +2 -2
  126. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +5 -0
  127. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +4 -4
  128. package/packages/orq-rc/src/models/operations/retrievedataset.ts +1 -1
  129. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +1 -1
  130. package/packages/orq-rc/src/models/operations/retrievetool.ts +6 -6
  131. package/packages/orq-rc/src/models/operations/runagent.ts +67 -1
  132. package/packages/orq-rc/src/models/operations/streamrunagent.ts +67 -1
  133. package/packages/orq-rc/src/models/operations/tracesget.ts +36 -0
  134. package/packages/orq-rc/src/models/operations/tracesgetspan.ts +40 -0
  135. package/packages/orq-rc/src/models/operations/traceslistfacetvalues.ts +50 -0
  136. package/packages/orq-rc/src/models/operations/traceslistspans.ts +43 -0
  137. package/packages/orq-rc/src/models/operations/updateagent.ts +77 -0
  138. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +4 -4
  139. package/packages/orq-rc/src/models/operations/updatedataset.ts +1 -1
  140. package/packages/orq-rc/src/models/operations/updatedatasource.ts +1 -1
  141. package/packages/orq-rc/src/models/operations/updateprompt.ts +2 -0
  142. package/packages/orq-rc/src/models/operations/updatetool.ts +7 -7
  143. package/packages/orq-rc/src/sdk/feedback.ts +2 -2
  144. package/packages/orq-rc/src/sdk/notifiers.ts +100 -0
  145. package/packages/orq-rc/src/sdk/sdk.ts +12 -0
  146. package/packages/orq-rc/src/sdk/traces.ts +168 -0
  147. package/sdk/feedback.d.ts +2 -2
  148. package/sdk/feedback.js +2 -2
  149. package/src/lib/config.ts +2 -2
  150. package/src/models/components/evaluatorresponsefunction.ts +2 -2
  151. package/src/models/components/evaluatorresponsehttp.ts +2 -2
  152. package/src/models/components/evaluatorresponsejsonschema.ts +2 -2
  153. package/src/models/components/evaluatorresponsellm.ts +2 -2
  154. package/src/models/components/evaluatorresponsepython.ts +2 -2
  155. package/src/models/components/evaluatorresponseragas.ts +2 -2
  156. package/src/models/components/evaluatorresponsetypescript.ts +2 -2
  157. package/src/models/components/reasoningpart.ts +1 -1
  158. package/src/models/operations/createdataset.ts +1 -1
  159. package/src/models/operations/createdatasetitem.ts +4 -4
  160. package/src/models/operations/createdatasource.ts +1 -1
  161. package/src/models/operations/createtool.ts +6 -6
  162. package/src/models/operations/getalltools.ts +6 -6
  163. package/src/models/operations/getv2humanevalsets.ts +2 -2
  164. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  165. package/src/models/operations/listdatasetdatapoints.ts +4 -4
  166. package/src/models/operations/listdatasets.ts +1 -1
  167. package/src/models/operations/listdatasources.ts +1 -1
  168. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  169. package/src/models/operations/postv2feedbackevaluation.ts +3 -3
  170. package/src/models/operations/postv2humanevalsets.ts +2 -2
  171. package/src/models/operations/retrievedatapoint.ts +4 -4
  172. package/src/models/operations/retrievedataset.ts +1 -1
  173. package/src/models/operations/retrievedatasource.ts +1 -1
  174. package/src/models/operations/retrievetool.ts +6 -6
  175. package/src/models/operations/runagent.ts +1 -1
  176. package/src/models/operations/streamrunagent.ts +1 -1
  177. package/src/models/operations/updatedatapoint.ts +4 -4
  178. package/src/models/operations/updatedataset.ts +1 -1
  179. package/src/models/operations/updatedatasource.ts +1 -1
  180. package/src/models/operations/updatetool.ts +7 -7
  181. package/src/sdk/feedback.ts +2 -2
@@ -0,0 +1,465 @@
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
+ import { NotifierType, NotifierType$inboundSchema } from "./notifiertype.js";
11
+
12
+ /**
13
+ * Custom JSON metadata stored with the notifier.
14
+ */
15
+ export type Notifier3Metadata = {};
16
+
17
+ /**
18
+ * Optional HTTP headers for generic webhooks. Each entry may be a string value or an object with `secret` and `value`.
19
+ */
20
+ export type Notifier3Headers = {};
21
+
22
+ /**
23
+ * `webhook_url` is present for generic webhook notifiers; `headers` is optional.
24
+ */
25
+ export type GenericWebhookNotifier = {
26
+ type: NotifierType;
27
+ /**
28
+ * Generic webhook URL used when `type` is `NOTIFIER_TYPE_WEBHOOK`.
29
+ */
30
+ webhookUrl: string;
31
+ /**
32
+ * Unique notifier identifier assigned by ORQ.
33
+ */
34
+ id: string;
35
+ /**
36
+ * Project that contains the notifier. Empty for workspace-wide notifiers.
37
+ */
38
+ projectId?: string | undefined;
39
+ /**
40
+ * Human-readable notifier name.
41
+ */
42
+ displayName: string;
43
+ /**
44
+ * Time when the notifier was created.
45
+ */
46
+ createdAt: Date;
47
+ /**
48
+ * Time when the notifier was last updated.
49
+ */
50
+ updatedAt: Date;
51
+ /**
52
+ * User ID that created the notifier.
53
+ */
54
+ createdById?: string | undefined;
55
+ /**
56
+ * User ID that last updated the notifier.
57
+ */
58
+ updatedById?: string | undefined;
59
+ /**
60
+ * Custom JSON metadata stored with the notifier.
61
+ */
62
+ metadata?: Notifier3Metadata | undefined;
63
+ /**
64
+ * Email addresses notified when `type` is `NOTIFIER_TYPE_EMAIL`.
65
+ */
66
+ emails?: Array<string> | undefined;
67
+ /**
68
+ * Slack incoming webhook URL used when `type` is `NOTIFIER_TYPE_SLACK_WEBHOOK`.
69
+ */
70
+ incomingWebhookUrl?: string | undefined;
71
+ /**
72
+ * Optional HTTP headers for generic webhooks. Each entry may be a string value or an object with `secret` and `value`.
73
+ */
74
+ headers?: Notifier3Headers | undefined;
75
+ };
76
+
77
+ /**
78
+ * Custom JSON metadata stored with the notifier.
79
+ */
80
+ export type Notifier2Metadata = {};
81
+
82
+ /**
83
+ * Optional HTTP headers for generic webhooks. Each entry may be a string value or an object with `secret` and `value`.
84
+ */
85
+ export type NotifierHeaders = {};
86
+
87
+ /**
88
+ * `incoming_webhook_url` is present for Slack webhook notifiers.
89
+ */
90
+ export type SlackWebhookNotifier = {
91
+ type: NotifierType;
92
+ /**
93
+ * Slack incoming webhook URL used when `type` is `NOTIFIER_TYPE_SLACK_WEBHOOK`.
94
+ */
95
+ incomingWebhookUrl: string;
96
+ /**
97
+ * Unique notifier identifier assigned by ORQ.
98
+ */
99
+ id: string;
100
+ /**
101
+ * Project that contains the notifier. Empty for workspace-wide notifiers.
102
+ */
103
+ projectId?: string | undefined;
104
+ /**
105
+ * Human-readable notifier name.
106
+ */
107
+ displayName: string;
108
+ /**
109
+ * Time when the notifier was created.
110
+ */
111
+ createdAt: Date;
112
+ /**
113
+ * Time when the notifier was last updated.
114
+ */
115
+ updatedAt: Date;
116
+ /**
117
+ * User ID that created the notifier.
118
+ */
119
+ createdById?: string | undefined;
120
+ /**
121
+ * User ID that last updated the notifier.
122
+ */
123
+ updatedById?: string | undefined;
124
+ /**
125
+ * Custom JSON metadata stored with the notifier.
126
+ */
127
+ metadata?: Notifier2Metadata | undefined;
128
+ /**
129
+ * Email addresses notified when `type` is `NOTIFIER_TYPE_EMAIL`.
130
+ */
131
+ emails?: Array<string> | undefined;
132
+ /**
133
+ * Generic webhook URL used when `type` is `NOTIFIER_TYPE_WEBHOOK`.
134
+ */
135
+ webhookUrl?: string | undefined;
136
+ /**
137
+ * Optional HTTP headers for generic webhooks. Each entry may be a string value or an object with `secret` and `value`.
138
+ */
139
+ headers?: NotifierHeaders | undefined;
140
+ };
141
+
142
+ /**
143
+ * Custom JSON metadata stored with the notifier.
144
+ */
145
+ export type NotifierMetadata = {};
146
+
147
+ /**
148
+ * Optional HTTP headers for generic webhooks. Each entry may be a string value or an object with `secret` and `value`.
149
+ */
150
+ export type Notifier1Headers = {};
151
+
152
+ /**
153
+ * `emails` is present for email notifiers.
154
+ */
155
+ export type EmailNotifier = {
156
+ type: NotifierType;
157
+ /**
158
+ * Email addresses notified when `type` is `NOTIFIER_TYPE_EMAIL`.
159
+ */
160
+ emails: Array<string>;
161
+ /**
162
+ * Unique notifier identifier assigned by ORQ.
163
+ */
164
+ id: string;
165
+ /**
166
+ * Project that contains the notifier. Empty for workspace-wide notifiers.
167
+ */
168
+ projectId?: string | undefined;
169
+ /**
170
+ * Human-readable notifier name.
171
+ */
172
+ displayName: string;
173
+ /**
174
+ * Time when the notifier was created.
175
+ */
176
+ createdAt: Date;
177
+ /**
178
+ * Time when the notifier was last updated.
179
+ */
180
+ updatedAt: Date;
181
+ /**
182
+ * User ID that created the notifier.
183
+ */
184
+ createdById?: string | undefined;
185
+ /**
186
+ * User ID that last updated the notifier.
187
+ */
188
+ updatedById?: string | undefined;
189
+ /**
190
+ * Custom JSON metadata stored with the notifier.
191
+ */
192
+ metadata?: NotifierMetadata | undefined;
193
+ /**
194
+ * Slack incoming webhook URL used when `type` is `NOTIFIER_TYPE_SLACK_WEBHOOK`.
195
+ */
196
+ incomingWebhookUrl?: string | undefined;
197
+ /**
198
+ * Generic webhook URL used when `type` is `NOTIFIER_TYPE_WEBHOOK`.
199
+ */
200
+ webhookUrl?: string | undefined;
201
+ /**
202
+ * Optional HTTP headers for generic webhooks. Each entry may be a string value or an object with `secret` and `value`.
203
+ */
204
+ headers?: Notifier1Headers | undefined;
205
+ };
206
+
207
+ /**
208
+ * Notifier resource. The destination field present on the resource depends on `type` and is captured in `oneOf`.
209
+ */
210
+ export type Notifier =
211
+ | EmailNotifier
212
+ | SlackWebhookNotifier
213
+ | GenericWebhookNotifier;
214
+
215
+ /** @internal */
216
+ export const Notifier3Metadata$inboundSchema: z.ZodType<
217
+ Notifier3Metadata,
218
+ z.ZodTypeDef,
219
+ unknown
220
+ > = z.object({});
221
+
222
+ export function notifier3MetadataFromJSON(
223
+ jsonString: string,
224
+ ): SafeParseResult<Notifier3Metadata, SDKValidationError> {
225
+ return safeParse(
226
+ jsonString,
227
+ (x) => Notifier3Metadata$inboundSchema.parse(JSON.parse(x)),
228
+ `Failed to parse 'Notifier3Metadata' from JSON`,
229
+ );
230
+ }
231
+
232
+ /** @internal */
233
+ export const Notifier3Headers$inboundSchema: z.ZodType<
234
+ Notifier3Headers,
235
+ z.ZodTypeDef,
236
+ unknown
237
+ > = z.object({});
238
+
239
+ export function notifier3HeadersFromJSON(
240
+ jsonString: string,
241
+ ): SafeParseResult<Notifier3Headers, SDKValidationError> {
242
+ return safeParse(
243
+ jsonString,
244
+ (x) => Notifier3Headers$inboundSchema.parse(JSON.parse(x)),
245
+ `Failed to parse 'Notifier3Headers' from JSON`,
246
+ );
247
+ }
248
+
249
+ /** @internal */
250
+ export const GenericWebhookNotifier$inboundSchema: z.ZodType<
251
+ GenericWebhookNotifier,
252
+ z.ZodTypeDef,
253
+ unknown
254
+ > = z.object({
255
+ type: NotifierType$inboundSchema,
256
+ webhook_url: z.string(),
257
+ _id: z.string(),
258
+ project_id: z.string().optional(),
259
+ display_name: z.string(),
260
+ created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
261
+ updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
262
+ created_by_id: z.string().optional(),
263
+ updated_by_id: z.string().optional(),
264
+ metadata: z.lazy(() => Notifier3Metadata$inboundSchema).optional(),
265
+ emails: z.array(z.string()).optional(),
266
+ incoming_webhook_url: z.string().optional(),
267
+ headers: z.lazy(() => Notifier3Headers$inboundSchema).optional(),
268
+ }).transform((v) => {
269
+ return remap$(v, {
270
+ "webhook_url": "webhookUrl",
271
+ "_id": "id",
272
+ "project_id": "projectId",
273
+ "display_name": "displayName",
274
+ "created_at": "createdAt",
275
+ "updated_at": "updatedAt",
276
+ "created_by_id": "createdById",
277
+ "updated_by_id": "updatedById",
278
+ "incoming_webhook_url": "incomingWebhookUrl",
279
+ });
280
+ });
281
+
282
+ export function genericWebhookNotifierFromJSON(
283
+ jsonString: string,
284
+ ): SafeParseResult<GenericWebhookNotifier, SDKValidationError> {
285
+ return safeParse(
286
+ jsonString,
287
+ (x) => GenericWebhookNotifier$inboundSchema.parse(JSON.parse(x)),
288
+ `Failed to parse 'GenericWebhookNotifier' from JSON`,
289
+ );
290
+ }
291
+
292
+ /** @internal */
293
+ export const Notifier2Metadata$inboundSchema: z.ZodType<
294
+ Notifier2Metadata,
295
+ z.ZodTypeDef,
296
+ unknown
297
+ > = z.object({});
298
+
299
+ export function notifier2MetadataFromJSON(
300
+ jsonString: string,
301
+ ): SafeParseResult<Notifier2Metadata, SDKValidationError> {
302
+ return safeParse(
303
+ jsonString,
304
+ (x) => Notifier2Metadata$inboundSchema.parse(JSON.parse(x)),
305
+ `Failed to parse 'Notifier2Metadata' from JSON`,
306
+ );
307
+ }
308
+
309
+ /** @internal */
310
+ export const NotifierHeaders$inboundSchema: z.ZodType<
311
+ NotifierHeaders,
312
+ z.ZodTypeDef,
313
+ unknown
314
+ > = z.object({});
315
+
316
+ export function notifierHeadersFromJSON(
317
+ jsonString: string,
318
+ ): SafeParseResult<NotifierHeaders, SDKValidationError> {
319
+ return safeParse(
320
+ jsonString,
321
+ (x) => NotifierHeaders$inboundSchema.parse(JSON.parse(x)),
322
+ `Failed to parse 'NotifierHeaders' from JSON`,
323
+ );
324
+ }
325
+
326
+ /** @internal */
327
+ export const SlackWebhookNotifier$inboundSchema: z.ZodType<
328
+ SlackWebhookNotifier,
329
+ z.ZodTypeDef,
330
+ unknown
331
+ > = z.object({
332
+ type: NotifierType$inboundSchema,
333
+ incoming_webhook_url: z.string(),
334
+ _id: z.string(),
335
+ project_id: z.string().optional(),
336
+ display_name: z.string(),
337
+ created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
338
+ updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
339
+ created_by_id: z.string().optional(),
340
+ updated_by_id: z.string().optional(),
341
+ metadata: z.lazy(() => Notifier2Metadata$inboundSchema).optional(),
342
+ emails: z.array(z.string()).optional(),
343
+ webhook_url: z.string().optional(),
344
+ headers: z.lazy(() => NotifierHeaders$inboundSchema).optional(),
345
+ }).transform((v) => {
346
+ return remap$(v, {
347
+ "incoming_webhook_url": "incomingWebhookUrl",
348
+ "_id": "id",
349
+ "project_id": "projectId",
350
+ "display_name": "displayName",
351
+ "created_at": "createdAt",
352
+ "updated_at": "updatedAt",
353
+ "created_by_id": "createdById",
354
+ "updated_by_id": "updatedById",
355
+ "webhook_url": "webhookUrl",
356
+ });
357
+ });
358
+
359
+ export function slackWebhookNotifierFromJSON(
360
+ jsonString: string,
361
+ ): SafeParseResult<SlackWebhookNotifier, SDKValidationError> {
362
+ return safeParse(
363
+ jsonString,
364
+ (x) => SlackWebhookNotifier$inboundSchema.parse(JSON.parse(x)),
365
+ `Failed to parse 'SlackWebhookNotifier' from JSON`,
366
+ );
367
+ }
368
+
369
+ /** @internal */
370
+ export const NotifierMetadata$inboundSchema: z.ZodType<
371
+ NotifierMetadata,
372
+ z.ZodTypeDef,
373
+ unknown
374
+ > = z.object({});
375
+
376
+ export function notifierMetadataFromJSON(
377
+ jsonString: string,
378
+ ): SafeParseResult<NotifierMetadata, SDKValidationError> {
379
+ return safeParse(
380
+ jsonString,
381
+ (x) => NotifierMetadata$inboundSchema.parse(JSON.parse(x)),
382
+ `Failed to parse 'NotifierMetadata' from JSON`,
383
+ );
384
+ }
385
+
386
+ /** @internal */
387
+ export const Notifier1Headers$inboundSchema: z.ZodType<
388
+ Notifier1Headers,
389
+ z.ZodTypeDef,
390
+ unknown
391
+ > = z.object({});
392
+
393
+ export function notifier1HeadersFromJSON(
394
+ jsonString: string,
395
+ ): SafeParseResult<Notifier1Headers, SDKValidationError> {
396
+ return safeParse(
397
+ jsonString,
398
+ (x) => Notifier1Headers$inboundSchema.parse(JSON.parse(x)),
399
+ `Failed to parse 'Notifier1Headers' from JSON`,
400
+ );
401
+ }
402
+
403
+ /** @internal */
404
+ export const EmailNotifier$inboundSchema: z.ZodType<
405
+ EmailNotifier,
406
+ z.ZodTypeDef,
407
+ unknown
408
+ > = z.object({
409
+ type: NotifierType$inboundSchema,
410
+ emails: z.array(z.string()),
411
+ _id: z.string(),
412
+ project_id: z.string().optional(),
413
+ display_name: z.string(),
414
+ created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
415
+ updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
416
+ created_by_id: z.string().optional(),
417
+ updated_by_id: z.string().optional(),
418
+ metadata: z.lazy(() => NotifierMetadata$inboundSchema).optional(),
419
+ incoming_webhook_url: z.string().optional(),
420
+ webhook_url: z.string().optional(),
421
+ headers: z.lazy(() => Notifier1Headers$inboundSchema).optional(),
422
+ }).transform((v) => {
423
+ return remap$(v, {
424
+ "_id": "id",
425
+ "project_id": "projectId",
426
+ "display_name": "displayName",
427
+ "created_at": "createdAt",
428
+ "updated_at": "updatedAt",
429
+ "created_by_id": "createdById",
430
+ "updated_by_id": "updatedById",
431
+ "incoming_webhook_url": "incomingWebhookUrl",
432
+ "webhook_url": "webhookUrl",
433
+ });
434
+ });
435
+
436
+ export function emailNotifierFromJSON(
437
+ jsonString: string,
438
+ ): SafeParseResult<EmailNotifier, SDKValidationError> {
439
+ return safeParse(
440
+ jsonString,
441
+ (x) => EmailNotifier$inboundSchema.parse(JSON.parse(x)),
442
+ `Failed to parse 'EmailNotifier' from JSON`,
443
+ );
444
+ }
445
+
446
+ /** @internal */
447
+ export const Notifier$inboundSchema: z.ZodType<
448
+ Notifier,
449
+ z.ZodTypeDef,
450
+ unknown
451
+ > = z.union([
452
+ z.lazy(() => EmailNotifier$inboundSchema),
453
+ z.lazy(() => SlackWebhookNotifier$inboundSchema),
454
+ z.lazy(() => GenericWebhookNotifier$inboundSchema),
455
+ ]);
456
+
457
+ export function notifierFromJSON(
458
+ jsonString: string,
459
+ ): SafeParseResult<Notifier, SDKValidationError> {
460
+ return safeParse(
461
+ jsonString,
462
+ (x) => Notifier$inboundSchema.parse(JSON.parse(x)),
463
+ `Failed to parse 'Notifier' from JSON`,
464
+ );
465
+ }
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ export const NotifierType = {
9
+ NotifierTypeUnspecified: "NOTIFIER_TYPE_UNSPECIFIED",
10
+ NotifierTypeEmail: "NOTIFIER_TYPE_EMAIL",
11
+ NotifierTypeSlackWebhook: "NOTIFIER_TYPE_SLACK_WEBHOOK",
12
+ NotifierTypeWebhook: "NOTIFIER_TYPE_WEBHOOK",
13
+ } as const;
14
+ export type NotifierType = ClosedEnum<typeof NotifierType>;
15
+
16
+ /** @internal */
17
+ export const NotifierType$inboundSchema: z.ZodNativeEnum<typeof NotifierType> =
18
+ z.nativeEnum(NotifierType);
19
+ /** @internal */
20
+ export const NotifierType$outboundSchema: z.ZodNativeEnum<typeof NotifierType> =
21
+ NotifierType$inboundSchema;
@@ -0,0 +1,48 @@
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
+
8
+ export type QueryTracesRequest = {
9
+ from: Date;
10
+ to: Date;
11
+ oql: string;
12
+ limit?: number | undefined;
13
+ pageToken?: string | undefined;
14
+ };
15
+
16
+ /** @internal */
17
+ export type QueryTracesRequest$Outbound = {
18
+ from: string;
19
+ to: string;
20
+ oql: string;
21
+ limit?: number | undefined;
22
+ page_token?: string | undefined;
23
+ };
24
+
25
+ /** @internal */
26
+ export const QueryTracesRequest$outboundSchema: z.ZodType<
27
+ QueryTracesRequest$Outbound,
28
+ z.ZodTypeDef,
29
+ QueryTracesRequest
30
+ > = z.object({
31
+ from: z.date().transform(v => v.toISOString()),
32
+ to: z.date().transform(v => v.toISOString()),
33
+ oql: z.string(),
34
+ limit: z.number().int().optional(),
35
+ pageToken: z.string().optional(),
36
+ }).transform((v) => {
37
+ return remap$(v, {
38
+ pageToken: "page_token",
39
+ });
40
+ });
41
+
42
+ export function queryTracesRequestToJSON(
43
+ queryTracesRequest: QueryTracesRequest,
44
+ ): string {
45
+ return JSON.stringify(
46
+ QueryTracesRequest$outboundSchema.parse(queryTracesRequest),
47
+ );
48
+ }
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ SearchTracesResponse,
11
+ SearchTracesResponse$inboundSchema,
12
+ } from "./searchtracesresponse.js";
13
+
14
+ export type QueryTracesResponse = {
15
+ object?: string | undefined;
16
+ search?: SearchTracesResponse | undefined;
17
+ };
18
+
19
+ /** @internal */
20
+ export const QueryTracesResponse$inboundSchema: z.ZodType<
21
+ QueryTracesResponse,
22
+ z.ZodTypeDef,
23
+ unknown
24
+ > = z.object({
25
+ object: z.string().optional(),
26
+ search: SearchTracesResponse$inboundSchema.optional(),
27
+ });
28
+
29
+ export function queryTracesResponseFromJSON(
30
+ jsonString: string,
31
+ ): SafeParseResult<QueryTracesResponse, SDKValidationError> {
32
+ return safeParse(
33
+ jsonString,
34
+ (x) => QueryTracesResponse$inboundSchema.parse(JSON.parse(x)),
35
+ `Failed to parse 'QueryTracesResponse' from JSON`,
36
+ );
37
+ }
@@ -40,7 +40,7 @@ export const ReasoningPart$inboundSchema: z.ZodType<
40
40
  z.ZodTypeDef,
41
41
  unknown
42
42
  > = z.object({
43
- _id: z.string().default("reasoning_01kwmek3ehvrse5y23mctx5cgr"),
43
+ _id: z.string().default("reasoning_01kwv6526vff6mzc9nhjfqkt3x"),
44
44
  metadata: z.record(z.any()).optional(),
45
45
  kind: z.literal("reasoning"),
46
46
  reasoning: z.string(),
@@ -0,0 +1,68 @@
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 {
8
+ TraceFilter,
9
+ TraceFilter$Outbound,
10
+ TraceFilter$outboundSchema,
11
+ } from "./tracefilter.js";
12
+ import {
13
+ TraceSort,
14
+ TraceSort$Outbound,
15
+ TraceSort$outboundSchema,
16
+ } from "./tracesort.js";
17
+
18
+ export type SearchTracesRequest = {
19
+ from: Date;
20
+ to: Date;
21
+ filters?: Array<TraceFilter> | undefined;
22
+ filterOperator?: string | undefined;
23
+ query?: string | undefined;
24
+ sort?: Array<TraceSort> | undefined;
25
+ limit?: number | undefined;
26
+ pageToken?: string | undefined;
27
+ };
28
+
29
+ /** @internal */
30
+ export type SearchTracesRequest$Outbound = {
31
+ from: string;
32
+ to: string;
33
+ filters?: Array<TraceFilter$Outbound> | undefined;
34
+ filter_operator?: string | undefined;
35
+ query?: string | undefined;
36
+ sort?: Array<TraceSort$Outbound> | undefined;
37
+ limit?: number | undefined;
38
+ page_token?: string | undefined;
39
+ };
40
+
41
+ /** @internal */
42
+ export const SearchTracesRequest$outboundSchema: z.ZodType<
43
+ SearchTracesRequest$Outbound,
44
+ z.ZodTypeDef,
45
+ SearchTracesRequest
46
+ > = z.object({
47
+ from: z.date().transform(v => v.toISOString()),
48
+ to: z.date().transform(v => v.toISOString()),
49
+ filters: z.array(TraceFilter$outboundSchema).optional(),
50
+ filterOperator: z.string().optional(),
51
+ query: z.string().optional(),
52
+ sort: z.array(TraceSort$outboundSchema).optional(),
53
+ limit: z.number().int().optional(),
54
+ pageToken: z.string().optional(),
55
+ }).transform((v) => {
56
+ return remap$(v, {
57
+ filterOperator: "filter_operator",
58
+ pageToken: "page_token",
59
+ });
60
+ });
61
+
62
+ export function searchTracesRequestToJSON(
63
+ searchTracesRequest: SearchTracesRequest,
64
+ ): string {
65
+ return JSON.stringify(
66
+ SearchTracesRequest$outboundSchema.parse(searchTracesRequest),
67
+ );
68
+ }