@orq-ai/node 4.11.0-rc.5 → 4.11.0-rc.7

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 (187) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +3 -3
  3. package/lib/config.js +3 -3
  4. package/models/components/index.d.ts +23 -0
  5. package/models/components/index.d.ts.map +1 -1
  6. package/models/components/index.js +23 -0
  7. package/models/components/index.js.map +1 -1
  8. package/models/components/publicresponseresource.d.ts +105 -0
  9. package/models/components/publicresponseresource.d.ts.map +1 -0
  10. package/models/components/publicresponseresource.js +138 -0
  11. package/models/components/publicresponseresource.js.map +1 -0
  12. package/models/components/reasoningpart.js +1 -1
  13. package/models/components/responsecodeinterpretercodedeltastreamevent.d.ts +61 -0
  14. package/models/components/responsecodeinterpretercodedeltastreamevent.d.ts.map +1 -0
  15. package/models/components/responsecodeinterpretercodedeltastreamevent.js +89 -0
  16. package/models/components/responsecodeinterpretercodedeltastreamevent.js.map +1 -0
  17. package/models/components/responsecodeinterpretercodedonestreamevent.d.ts +61 -0
  18. package/models/components/responsecodeinterpretercodedonestreamevent.d.ts.map +1 -0
  19. package/models/components/responsecodeinterpretercodedonestreamevent.js +89 -0
  20. package/models/components/responsecodeinterpretercodedonestreamevent.js.map +1 -0
  21. package/models/components/responsecontentpartstreamevent.d.ts +81 -0
  22. package/models/components/responsecontentpartstreamevent.d.ts.map +1 -0
  23. package/models/components/responsecontentpartstreamevent.js +100 -0
  24. package/models/components/responsecontentpartstreamevent.js.map +1 -0
  25. package/models/components/responseerrorstreamevent.d.ts +51 -0
  26. package/models/components/responseerrorstreamevent.d.ts.map +1 -0
  27. package/models/components/responseerrorstreamevent.js +85 -0
  28. package/models/components/responseerrorstreamevent.js.map +1 -0
  29. package/models/components/responsefunctioncallargumentsdeltastreamevent.d.ts +65 -0
  30. package/models/components/responsefunctioncallargumentsdeltastreamevent.d.ts.map +1 -0
  31. package/models/components/responsefunctioncallargumentsdeltastreamevent.js +90 -0
  32. package/models/components/responsefunctioncallargumentsdeltastreamevent.js.map +1 -0
  33. package/models/components/responsefunctioncallargumentsdonestreamevent.d.ts +61 -0
  34. package/models/components/responsefunctioncallargumentsdonestreamevent.d.ts.map +1 -0
  35. package/models/components/responsefunctioncallargumentsdonestreamevent.js +89 -0
  36. package/models/components/responsefunctioncallargumentsdonestreamevent.js.map +1 -0
  37. package/models/components/responsehostedtoolcallstreamevent.d.ts +97 -0
  38. package/models/components/responsehostedtoolcallstreamevent.d.ts.map +1 -0
  39. package/models/components/responsehostedtoolcallstreamevent.js +123 -0
  40. package/models/components/responsehostedtoolcallstreamevent.js.map +1 -0
  41. package/models/components/responseimagegenerationpartialimagestreamevent.d.ts +65 -0
  42. package/models/components/responseimagegenerationpartialimagestreamevent.d.ts.map +1 -0
  43. package/models/components/responseimagegenerationpartialimagestreamevent.js +92 -0
  44. package/models/components/responseimagegenerationpartialimagestreamevent.js.map +1 -0
  45. package/models/components/responselifecyclestreamevent.d.ts +73 -0
  46. package/models/components/responselifecyclestreamevent.d.ts.map +1 -0
  47. package/models/components/responselifecyclestreamevent.js +103 -0
  48. package/models/components/responselifecyclestreamevent.js.map +1 -0
  49. package/models/components/responsemcpcallargumentsdeltastreamevent.d.ts +61 -0
  50. package/models/components/responsemcpcallargumentsdeltastreamevent.d.ts.map +1 -0
  51. package/models/components/responsemcpcallargumentsdeltastreamevent.js +89 -0
  52. package/models/components/responsemcpcallargumentsdeltastreamevent.js.map +1 -0
  53. package/models/components/responsemcpcallargumentsdonestreamevent.d.ts +61 -0
  54. package/models/components/responsemcpcallargumentsdonestreamevent.d.ts.map +1 -0
  55. package/models/components/responsemcpcallargumentsdonestreamevent.js +89 -0
  56. package/models/components/responsemcpcallargumentsdonestreamevent.js.map +1 -0
  57. package/models/components/responseoutputitemstreamevent.d.ts +73 -0
  58. package/models/components/responseoutputitemstreamevent.d.ts.map +1 -0
  59. package/models/components/responseoutputitemstreamevent.js +96 -0
  60. package/models/components/responseoutputitemstreamevent.js.map +1 -0
  61. package/models/components/responseoutputtextannotationaddedstreamevent.d.ts +71 -0
  62. package/models/components/responseoutputtextannotationaddedstreamevent.d.ts.map +1 -0
  63. package/models/components/responseoutputtextannotationaddedstreamevent.js +93 -0
  64. package/models/components/responseoutputtextannotationaddedstreamevent.js.map +1 -0
  65. package/models/components/responseoutputtextdeltastreamevent.d.ts +75 -0
  66. package/models/components/responseoutputtextdeltastreamevent.d.ts.map +1 -0
  67. package/models/components/responseoutputtextdeltastreamevent.js +92 -0
  68. package/models/components/responseoutputtextdeltastreamevent.js.map +1 -0
  69. package/models/components/responseoutputtextdonestreamevent.d.ts +71 -0
  70. package/models/components/responseoutputtextdonestreamevent.d.ts.map +1 -0
  71. package/models/components/responseoutputtextdonestreamevent.js +91 -0
  72. package/models/components/responseoutputtextdonestreamevent.js.map +1 -0
  73. package/models/components/responsereasoningdeltastreamevent.d.ts +83 -0
  74. package/models/components/responsereasoningdeltastreamevent.d.ts.map +1 -0
  75. package/models/components/responsereasoningdeltastreamevent.js +101 -0
  76. package/models/components/responsereasoningdeltastreamevent.js.map +1 -0
  77. package/models/components/responsereasoningdonestreamevent.d.ts +79 -0
  78. package/models/components/responsereasoningdonestreamevent.d.ts.map +1 -0
  79. package/models/components/responsereasoningdonestreamevent.js +100 -0
  80. package/models/components/responsereasoningdonestreamevent.js.map +1 -0
  81. package/models/components/responsereasoningsummarypartstreamevent.d.ts +81 -0
  82. package/models/components/responsereasoningsummarypartstreamevent.d.ts.map +1 -0
  83. package/models/components/responsereasoningsummarypartstreamevent.js +102 -0
  84. package/models/components/responsereasoningsummarypartstreamevent.js.map +1 -0
  85. package/models/components/responsereasoningsummarytextdeltastreamevent.d.ts +69 -0
  86. package/models/components/responsereasoningsummarytextdeltastreamevent.d.ts.map +1 -0
  87. package/models/components/responsereasoningsummarytextdeltastreamevent.js +92 -0
  88. package/models/components/responsereasoningsummarytextdeltastreamevent.js.map +1 -0
  89. package/models/components/responsereasoningsummarytextdonestreamevent.d.ts +65 -0
  90. package/models/components/responsereasoningsummarytextdonestreamevent.d.ts.map +1 -0
  91. package/models/components/responsereasoningsummarytextdonestreamevent.js +91 -0
  92. package/models/components/responsereasoningsummarytextdonestreamevent.js.map +1 -0
  93. package/models/components/responserefusaldeltastreamevent.d.ts +65 -0
  94. package/models/components/responserefusaldeltastreamevent.d.ts.map +1 -0
  95. package/models/components/responserefusaldeltastreamevent.js +90 -0
  96. package/models/components/responserefusaldeltastreamevent.js.map +1 -0
  97. package/models/components/responserefusaldonestreamevent.d.ts +65 -0
  98. package/models/components/responserefusaldonestreamevent.d.ts.map +1 -0
  99. package/models/components/responserefusaldonestreamevent.js +90 -0
  100. package/models/components/responserefusaldonestreamevent.js.map +1 -0
  101. package/models/operations/createdataset.js +1 -1
  102. package/models/operations/createdatasetitem.js +4 -4
  103. package/models/operations/createdatasource.js +1 -1
  104. package/models/operations/createeval.js +16 -16
  105. package/models/operations/createrouterresponse.d.ts +127 -57
  106. package/models/operations/createrouterresponse.d.ts.map +1 -1
  107. package/models/operations/createrouterresponse.js +142 -61
  108. package/models/operations/createrouterresponse.js.map +1 -1
  109. package/models/operations/createtool.js +6 -6
  110. package/models/operations/getalltools.js +6 -6
  111. package/models/operations/getevals.js +16 -16
  112. package/models/operations/getv2humanevalsets.js +2 -2
  113. package/models/operations/getv2humanevalsetsid.js +2 -2
  114. package/models/operations/listdatasetdatapoints.js +4 -4
  115. package/models/operations/listdatasets.js +1 -1
  116. package/models/operations/listdatasources.js +1 -1
  117. package/models/operations/patchv2humanevalsetsid.js +2 -2
  118. package/models/operations/postv2feedbackevaluation.js +3 -3
  119. package/models/operations/postv2humanevalsets.js +2 -2
  120. package/models/operations/retrievedatapoint.js +4 -4
  121. package/models/operations/retrievedataset.js +1 -1
  122. package/models/operations/retrievedatasource.js +1 -1
  123. package/models/operations/retrievetool.js +6 -6
  124. package/models/operations/runagent.js +1 -1
  125. package/models/operations/streamrunagent.js +1 -1
  126. package/models/operations/updatedatapoint.js +4 -4
  127. package/models/operations/updatedataset.js +1 -1
  128. package/models/operations/updatedatasource.js +1 -1
  129. package/models/operations/updateeval.js +16 -16
  130. package/models/operations/updatetool.js +7 -7
  131. package/package.json +5 -5
  132. package/sdk/feedback.d.ts +1 -1
  133. package/sdk/feedback.js +1 -1
  134. package/src/lib/config.ts +3 -3
  135. package/src/models/components/index.ts +23 -0
  136. package/src/models/components/publicresponseresource.ts +196 -0
  137. package/src/models/components/reasoningpart.ts +1 -1
  138. package/src/models/components/responsecodeinterpretercodedeltastreamevent.ts +149 -0
  139. package/src/models/components/responsecodeinterpretercodedonestreamevent.ts +146 -0
  140. package/src/models/components/responsecontentpartstreamevent.ts +157 -0
  141. package/src/models/components/responseerrorstreamevent.ts +116 -0
  142. package/src/models/components/responsefunctioncallargumentsdeltastreamevent.ts +153 -0
  143. package/src/models/components/responsefunctioncallargumentsdonestreamevent.ts +148 -0
  144. package/src/models/components/responsehostedtoolcallstreamevent.ts +186 -0
  145. package/src/models/components/responseimagegenerationpartialimagestreamevent.ts +156 -0
  146. package/src/models/components/responselifecyclestreamevent.ts +145 -0
  147. package/src/models/components/responsemcpcallargumentsdeltastreamevent.ts +145 -0
  148. package/src/models/components/responsemcpcallargumentsdonestreamevent.ts +145 -0
  149. package/src/models/components/responseoutputitemstreamevent.ts +144 -0
  150. package/src/models/components/responseoutputtextannotationaddedstreamevent.ts +160 -0
  151. package/src/models/components/responseoutputtextdeltastreamevent.ts +149 -0
  152. package/src/models/components/responseoutputtextdonestreamevent.ts +143 -0
  153. package/src/models/components/responsereasoningdeltastreamevent.ts +164 -0
  154. package/src/models/components/responsereasoningdonestreamevent.ts +159 -0
  155. package/src/models/components/responsereasoningsummarypartstreamevent.ts +171 -0
  156. package/src/models/components/responsereasoningsummarytextdeltastreamevent.ts +159 -0
  157. package/src/models/components/responsereasoningsummarytextdonestreamevent.ts +154 -0
  158. package/src/models/components/responserefusaldeltastreamevent.ts +137 -0
  159. package/src/models/components/responserefusaldonestreamevent.ts +137 -0
  160. package/src/models/operations/createdataset.ts +1 -1
  161. package/src/models/operations/createdatasetitem.ts +4 -4
  162. package/src/models/operations/createdatasource.ts +1 -1
  163. package/src/models/operations/createeval.ts +16 -16
  164. package/src/models/operations/createrouterresponse.ts +468 -101
  165. package/src/models/operations/createtool.ts +6 -6
  166. package/src/models/operations/getalltools.ts +6 -6
  167. package/src/models/operations/getevals.ts +16 -16
  168. package/src/models/operations/getv2humanevalsets.ts +2 -2
  169. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  170. package/src/models/operations/listdatasetdatapoints.ts +4 -4
  171. package/src/models/operations/listdatasets.ts +1 -1
  172. package/src/models/operations/listdatasources.ts +1 -1
  173. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  174. package/src/models/operations/postv2feedbackevaluation.ts +3 -3
  175. package/src/models/operations/postv2humanevalsets.ts +2 -2
  176. package/src/models/operations/retrievedatapoint.ts +4 -4
  177. package/src/models/operations/retrievedataset.ts +1 -1
  178. package/src/models/operations/retrievedatasource.ts +1 -1
  179. package/src/models/operations/retrievetool.ts +6 -6
  180. package/src/models/operations/runagent.ts +1 -1
  181. package/src/models/operations/streamrunagent.ts +1 -1
  182. package/src/models/operations/updatedatapoint.ts +4 -4
  183. package/src/models/operations/updatedataset.ts +1 -1
  184. package/src/models/operations/updatedatasource.ts +1 -1
  185. package/src/models/operations/updateeval.ts +16 -16
  186. package/src/models/operations/updatetool.ts +7 -7
  187. package/src/sdk/feedback.ts +1 -1
@@ -0,0 +1,159 @@
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
+ collectExtraKeys as collectExtraKeys$,
9
+ safeParse,
10
+ } from "../../lib/schemas.js";
11
+ import { ClosedEnum } from "../../types/enums.js";
12
+ import { Result as SafeParseResult } from "../../types/fp.js";
13
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
14
+
15
+ /**
16
+ * The event type. Matches the SSE `event` field.
17
+ */
18
+ export const ResponseReasoningSummaryTextDeltaStreamEventType = {
19
+ ResponseReasoningSummaryTextDelta: "response.reasoning_summary_text.delta",
20
+ } as const;
21
+ /**
22
+ * The event type. Matches the SSE `event` field.
23
+ */
24
+ export type ResponseReasoningSummaryTextDeltaStreamEventType = ClosedEnum<
25
+ typeof ResponseReasoningSummaryTextDeltaStreamEventType
26
+ >;
27
+
28
+ /**
29
+ * The event payload.
30
+ */
31
+ export type ResponseReasoningSummaryTextDeltaStreamEventData = {
32
+ /**
33
+ * Incremental text or argument chunk.
34
+ */
35
+ delta: string;
36
+ /**
37
+ * ID of the output item this event refers to.
38
+ */
39
+ itemId: string;
40
+ /**
41
+ * Obfuscation padding accompanying the delta, when present.
42
+ */
43
+ obfuscation?: string | undefined;
44
+ /**
45
+ * Index of the output item in the response output array.
46
+ */
47
+ outputIndex: number;
48
+ /**
49
+ * Monotonically increasing sequence number for ordering events.
50
+ */
51
+ sequenceNumber: number;
52
+ /**
53
+ * Index of the reasoning summary part.
54
+ */
55
+ summaryIndex: number;
56
+ /**
57
+ * The event type. Matches the SSE `event` field.
58
+ */
59
+ type: ResponseReasoningSummaryTextDeltaStreamEventType;
60
+ additionalProperties?: { [k: string]: any } | undefined;
61
+ };
62
+
63
+ export type ResponseReasoningSummaryTextDeltaStreamEvent = {
64
+ /**
65
+ * The event payload.
66
+ */
67
+ data: ResponseReasoningSummaryTextDeltaStreamEventData;
68
+ /**
69
+ * The SSE event name, equal to the payload's `type`.
70
+ */
71
+ event: "response.reasoning_summary_text.delta";
72
+ };
73
+
74
+ /** @internal */
75
+ export const ResponseReasoningSummaryTextDeltaStreamEventType$inboundSchema:
76
+ z.ZodNativeEnum<typeof ResponseReasoningSummaryTextDeltaStreamEventType> = z
77
+ .nativeEnum(ResponseReasoningSummaryTextDeltaStreamEventType);
78
+
79
+ /** @internal */
80
+ export const ResponseReasoningSummaryTextDeltaStreamEventData$inboundSchema:
81
+ z.ZodType<
82
+ ResponseReasoningSummaryTextDeltaStreamEventData,
83
+ z.ZodTypeDef,
84
+ unknown
85
+ > = collectExtraKeys$(
86
+ z.object({
87
+ delta: z.string(),
88
+ item_id: z.string(),
89
+ obfuscation: z.string().optional(),
90
+ output_index: z.number().int(),
91
+ sequence_number: z.number().int(),
92
+ summary_index: z.number().int(),
93
+ type: ResponseReasoningSummaryTextDeltaStreamEventType$inboundSchema,
94
+ }).catchall(z.any()),
95
+ "additionalProperties",
96
+ true,
97
+ ).transform((v) => {
98
+ return remap$(v, {
99
+ "item_id": "itemId",
100
+ "output_index": "outputIndex",
101
+ "sequence_number": "sequenceNumber",
102
+ "summary_index": "summaryIndex",
103
+ });
104
+ });
105
+
106
+ export function responseReasoningSummaryTextDeltaStreamEventDataFromJSON(
107
+ jsonString: string,
108
+ ): SafeParseResult<
109
+ ResponseReasoningSummaryTextDeltaStreamEventData,
110
+ SDKValidationError
111
+ > {
112
+ return safeParse(
113
+ jsonString,
114
+ (x) =>
115
+ ResponseReasoningSummaryTextDeltaStreamEventData$inboundSchema.parse(
116
+ JSON.parse(x),
117
+ ),
118
+ `Failed to parse 'ResponseReasoningSummaryTextDeltaStreamEventData' from JSON`,
119
+ );
120
+ }
121
+
122
+ /** @internal */
123
+ export const ResponseReasoningSummaryTextDeltaStreamEvent$inboundSchema:
124
+ z.ZodType<
125
+ ResponseReasoningSummaryTextDeltaStreamEvent,
126
+ z.ZodTypeDef,
127
+ unknown
128
+ > = z.object({
129
+ data: z.unknown().transform((v, ctx) => {
130
+ if (typeof v !== "string") return v;
131
+ try {
132
+ return JSON.parse(v);
133
+ } catch (err) {
134
+ ctx.addIssue({ code: "custom", message: `malformed json: ${err}` });
135
+ return z.NEVER;
136
+ }
137
+ }).pipe(
138
+ z.lazy(() =>
139
+ ResponseReasoningSummaryTextDeltaStreamEventData$inboundSchema
140
+ ),
141
+ ),
142
+ event: z.literal("response.reasoning_summary_text.delta"),
143
+ });
144
+
145
+ export function responseReasoningSummaryTextDeltaStreamEventFromJSON(
146
+ jsonString: string,
147
+ ): SafeParseResult<
148
+ ResponseReasoningSummaryTextDeltaStreamEvent,
149
+ SDKValidationError
150
+ > {
151
+ return safeParse(
152
+ jsonString,
153
+ (x) =>
154
+ ResponseReasoningSummaryTextDeltaStreamEvent$inboundSchema.parse(
155
+ JSON.parse(x),
156
+ ),
157
+ `Failed to parse 'ResponseReasoningSummaryTextDeltaStreamEvent' from JSON`,
158
+ );
159
+ }
@@ -0,0 +1,154 @@
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
+ collectExtraKeys as collectExtraKeys$,
9
+ safeParse,
10
+ } from "../../lib/schemas.js";
11
+ import { ClosedEnum } from "../../types/enums.js";
12
+ import { Result as SafeParseResult } from "../../types/fp.js";
13
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
14
+
15
+ /**
16
+ * The event type. Matches the SSE `event` field.
17
+ */
18
+ export const ResponseReasoningSummaryTextDoneStreamEventType = {
19
+ ResponseReasoningSummaryTextDone: "response.reasoning_summary_text.done",
20
+ } as const;
21
+ /**
22
+ * The event type. Matches the SSE `event` field.
23
+ */
24
+ export type ResponseReasoningSummaryTextDoneStreamEventType = ClosedEnum<
25
+ typeof ResponseReasoningSummaryTextDoneStreamEventType
26
+ >;
27
+
28
+ /**
29
+ * The event payload.
30
+ */
31
+ export type ResponseReasoningSummaryTextDoneStreamEventData = {
32
+ /**
33
+ * ID of the output item this event refers to.
34
+ */
35
+ itemId: string;
36
+ /**
37
+ * Index of the output item in the response output array.
38
+ */
39
+ outputIndex: number;
40
+ /**
41
+ * Monotonically increasing sequence number for ordering events.
42
+ */
43
+ sequenceNumber: number;
44
+ /**
45
+ * Index of the reasoning summary part.
46
+ */
47
+ summaryIndex: number;
48
+ /**
49
+ * The completed reasoning summary text.
50
+ */
51
+ text: string;
52
+ /**
53
+ * The event type. Matches the SSE `event` field.
54
+ */
55
+ type: ResponseReasoningSummaryTextDoneStreamEventType;
56
+ additionalProperties?: { [k: string]: any } | undefined;
57
+ };
58
+
59
+ export type ResponseReasoningSummaryTextDoneStreamEvent = {
60
+ /**
61
+ * The event payload.
62
+ */
63
+ data: ResponseReasoningSummaryTextDoneStreamEventData;
64
+ /**
65
+ * The SSE event name, equal to the payload's `type`.
66
+ */
67
+ event: "response.reasoning_summary_text.done";
68
+ };
69
+
70
+ /** @internal */
71
+ export const ResponseReasoningSummaryTextDoneStreamEventType$inboundSchema:
72
+ z.ZodNativeEnum<typeof ResponseReasoningSummaryTextDoneStreamEventType> = z
73
+ .nativeEnum(ResponseReasoningSummaryTextDoneStreamEventType);
74
+
75
+ /** @internal */
76
+ export const ResponseReasoningSummaryTextDoneStreamEventData$inboundSchema:
77
+ z.ZodType<
78
+ ResponseReasoningSummaryTextDoneStreamEventData,
79
+ z.ZodTypeDef,
80
+ unknown
81
+ > = collectExtraKeys$(
82
+ z.object({
83
+ item_id: z.string(),
84
+ output_index: z.number().int(),
85
+ sequence_number: z.number().int(),
86
+ summary_index: z.number().int(),
87
+ text: z.string(),
88
+ type: ResponseReasoningSummaryTextDoneStreamEventType$inboundSchema,
89
+ }).catchall(z.any()),
90
+ "additionalProperties",
91
+ true,
92
+ ).transform((v) => {
93
+ return remap$(v, {
94
+ "item_id": "itemId",
95
+ "output_index": "outputIndex",
96
+ "sequence_number": "sequenceNumber",
97
+ "summary_index": "summaryIndex",
98
+ });
99
+ });
100
+
101
+ export function responseReasoningSummaryTextDoneStreamEventDataFromJSON(
102
+ jsonString: string,
103
+ ): SafeParseResult<
104
+ ResponseReasoningSummaryTextDoneStreamEventData,
105
+ SDKValidationError
106
+ > {
107
+ return safeParse(
108
+ jsonString,
109
+ (x) =>
110
+ ResponseReasoningSummaryTextDoneStreamEventData$inboundSchema.parse(
111
+ JSON.parse(x),
112
+ ),
113
+ `Failed to parse 'ResponseReasoningSummaryTextDoneStreamEventData' from JSON`,
114
+ );
115
+ }
116
+
117
+ /** @internal */
118
+ export const ResponseReasoningSummaryTextDoneStreamEvent$inboundSchema:
119
+ z.ZodType<
120
+ ResponseReasoningSummaryTextDoneStreamEvent,
121
+ z.ZodTypeDef,
122
+ unknown
123
+ > = z.object({
124
+ data: z.unknown().transform((v, ctx) => {
125
+ if (typeof v !== "string") return v;
126
+ try {
127
+ return JSON.parse(v);
128
+ } catch (err) {
129
+ ctx.addIssue({ code: "custom", message: `malformed json: ${err}` });
130
+ return z.NEVER;
131
+ }
132
+ }).pipe(
133
+ z.lazy(() =>
134
+ ResponseReasoningSummaryTextDoneStreamEventData$inboundSchema
135
+ ),
136
+ ),
137
+ event: z.literal("response.reasoning_summary_text.done"),
138
+ });
139
+
140
+ export function responseReasoningSummaryTextDoneStreamEventFromJSON(
141
+ jsonString: string,
142
+ ): SafeParseResult<
143
+ ResponseReasoningSummaryTextDoneStreamEvent,
144
+ SDKValidationError
145
+ > {
146
+ return safeParse(
147
+ jsonString,
148
+ (x) =>
149
+ ResponseReasoningSummaryTextDoneStreamEvent$inboundSchema.parse(
150
+ JSON.parse(x),
151
+ ),
152
+ `Failed to parse 'ResponseReasoningSummaryTextDoneStreamEvent' from JSON`,
153
+ );
154
+ }
@@ -0,0 +1,137 @@
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
+ collectExtraKeys as collectExtraKeys$,
9
+ safeParse,
10
+ } from "../../lib/schemas.js";
11
+ import { ClosedEnum } from "../../types/enums.js";
12
+ import { Result as SafeParseResult } from "../../types/fp.js";
13
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
14
+
15
+ /**
16
+ * The event type. Matches the SSE `event` field.
17
+ */
18
+ export const ResponseRefusalDeltaStreamEventType = {
19
+ ResponseRefusalDelta: "response.refusal.delta",
20
+ } as const;
21
+ /**
22
+ * The event type. Matches the SSE `event` field.
23
+ */
24
+ export type ResponseRefusalDeltaStreamEventType = ClosedEnum<
25
+ typeof ResponseRefusalDeltaStreamEventType
26
+ >;
27
+
28
+ /**
29
+ * The event payload.
30
+ */
31
+ export type ResponseRefusalDeltaStreamEventData = {
32
+ /**
33
+ * Index of the content part within the output item.
34
+ */
35
+ contentIndex: number;
36
+ /**
37
+ * Incremental text or argument chunk.
38
+ */
39
+ delta: string;
40
+ /**
41
+ * ID of the output item this event refers to.
42
+ */
43
+ itemId: string;
44
+ /**
45
+ * Index of the output item in the response output array.
46
+ */
47
+ outputIndex: number;
48
+ /**
49
+ * Monotonically increasing sequence number for ordering events.
50
+ */
51
+ sequenceNumber: number;
52
+ /**
53
+ * The event type. Matches the SSE `event` field.
54
+ */
55
+ type: ResponseRefusalDeltaStreamEventType;
56
+ additionalProperties?: { [k: string]: any } | undefined;
57
+ };
58
+
59
+ export type ResponseRefusalDeltaStreamEvent = {
60
+ /**
61
+ * The event payload.
62
+ */
63
+ data: ResponseRefusalDeltaStreamEventData;
64
+ /**
65
+ * The SSE event name, equal to the payload's `type`.
66
+ */
67
+ event: "response.refusal.delta";
68
+ };
69
+
70
+ /** @internal */
71
+ export const ResponseRefusalDeltaStreamEventType$inboundSchema: z.ZodNativeEnum<
72
+ typeof ResponseRefusalDeltaStreamEventType
73
+ > = z.nativeEnum(ResponseRefusalDeltaStreamEventType);
74
+
75
+ /** @internal */
76
+ export const ResponseRefusalDeltaStreamEventData$inboundSchema: z.ZodType<
77
+ ResponseRefusalDeltaStreamEventData,
78
+ z.ZodTypeDef,
79
+ unknown
80
+ > = collectExtraKeys$(
81
+ z.object({
82
+ content_index: z.number().int(),
83
+ delta: z.string(),
84
+ item_id: z.string(),
85
+ output_index: z.number().int(),
86
+ sequence_number: z.number().int(),
87
+ type: ResponseRefusalDeltaStreamEventType$inboundSchema,
88
+ }).catchall(z.any()),
89
+ "additionalProperties",
90
+ true,
91
+ ).transform((v) => {
92
+ return remap$(v, {
93
+ "content_index": "contentIndex",
94
+ "item_id": "itemId",
95
+ "output_index": "outputIndex",
96
+ "sequence_number": "sequenceNumber",
97
+ });
98
+ });
99
+
100
+ export function responseRefusalDeltaStreamEventDataFromJSON(
101
+ jsonString: string,
102
+ ): SafeParseResult<ResponseRefusalDeltaStreamEventData, SDKValidationError> {
103
+ return safeParse(
104
+ jsonString,
105
+ (x) =>
106
+ ResponseRefusalDeltaStreamEventData$inboundSchema.parse(JSON.parse(x)),
107
+ `Failed to parse 'ResponseRefusalDeltaStreamEventData' from JSON`,
108
+ );
109
+ }
110
+
111
+ /** @internal */
112
+ export const ResponseRefusalDeltaStreamEvent$inboundSchema: z.ZodType<
113
+ ResponseRefusalDeltaStreamEvent,
114
+ z.ZodTypeDef,
115
+ unknown
116
+ > = z.object({
117
+ data: z.unknown().transform((v, ctx) => {
118
+ if (typeof v !== "string") return v;
119
+ try {
120
+ return JSON.parse(v);
121
+ } catch (err) {
122
+ ctx.addIssue({ code: "custom", message: `malformed json: ${err}` });
123
+ return z.NEVER;
124
+ }
125
+ }).pipe(z.lazy(() => ResponseRefusalDeltaStreamEventData$inboundSchema)),
126
+ event: z.literal("response.refusal.delta"),
127
+ });
128
+
129
+ export function responseRefusalDeltaStreamEventFromJSON(
130
+ jsonString: string,
131
+ ): SafeParseResult<ResponseRefusalDeltaStreamEvent, SDKValidationError> {
132
+ return safeParse(
133
+ jsonString,
134
+ (x) => ResponseRefusalDeltaStreamEvent$inboundSchema.parse(JSON.parse(x)),
135
+ `Failed to parse 'ResponseRefusalDeltaStreamEvent' from JSON`,
136
+ );
137
+ }
@@ -0,0 +1,137 @@
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
+ collectExtraKeys as collectExtraKeys$,
9
+ safeParse,
10
+ } from "../../lib/schemas.js";
11
+ import { ClosedEnum } from "../../types/enums.js";
12
+ import { Result as SafeParseResult } from "../../types/fp.js";
13
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
14
+
15
+ /**
16
+ * The event type. Matches the SSE `event` field.
17
+ */
18
+ export const ResponseRefusalDoneStreamEventType = {
19
+ ResponseRefusalDone: "response.refusal.done",
20
+ } as const;
21
+ /**
22
+ * The event type. Matches the SSE `event` field.
23
+ */
24
+ export type ResponseRefusalDoneStreamEventType = ClosedEnum<
25
+ typeof ResponseRefusalDoneStreamEventType
26
+ >;
27
+
28
+ /**
29
+ * The event payload.
30
+ */
31
+ export type ResponseRefusalDoneStreamEventData = {
32
+ /**
33
+ * Index of the content part within the output item.
34
+ */
35
+ contentIndex: number;
36
+ /**
37
+ * ID of the output item this event refers to.
38
+ */
39
+ itemId: string;
40
+ /**
41
+ * Index of the output item in the response output array.
42
+ */
43
+ outputIndex: number;
44
+ /**
45
+ * The completed refusal text.
46
+ */
47
+ refusal: string;
48
+ /**
49
+ * Monotonically increasing sequence number for ordering events.
50
+ */
51
+ sequenceNumber: number;
52
+ /**
53
+ * The event type. Matches the SSE `event` field.
54
+ */
55
+ type: ResponseRefusalDoneStreamEventType;
56
+ additionalProperties?: { [k: string]: any } | undefined;
57
+ };
58
+
59
+ export type ResponseRefusalDoneStreamEvent = {
60
+ /**
61
+ * The event payload.
62
+ */
63
+ data: ResponseRefusalDoneStreamEventData;
64
+ /**
65
+ * The SSE event name, equal to the payload's `type`.
66
+ */
67
+ event: "response.refusal.done";
68
+ };
69
+
70
+ /** @internal */
71
+ export const ResponseRefusalDoneStreamEventType$inboundSchema: z.ZodNativeEnum<
72
+ typeof ResponseRefusalDoneStreamEventType
73
+ > = z.nativeEnum(ResponseRefusalDoneStreamEventType);
74
+
75
+ /** @internal */
76
+ export const ResponseRefusalDoneStreamEventData$inboundSchema: z.ZodType<
77
+ ResponseRefusalDoneStreamEventData,
78
+ z.ZodTypeDef,
79
+ unknown
80
+ > = collectExtraKeys$(
81
+ z.object({
82
+ content_index: z.number().int(),
83
+ item_id: z.string(),
84
+ output_index: z.number().int(),
85
+ refusal: z.string(),
86
+ sequence_number: z.number().int(),
87
+ type: ResponseRefusalDoneStreamEventType$inboundSchema,
88
+ }).catchall(z.any()),
89
+ "additionalProperties",
90
+ true,
91
+ ).transform((v) => {
92
+ return remap$(v, {
93
+ "content_index": "contentIndex",
94
+ "item_id": "itemId",
95
+ "output_index": "outputIndex",
96
+ "sequence_number": "sequenceNumber",
97
+ });
98
+ });
99
+
100
+ export function responseRefusalDoneStreamEventDataFromJSON(
101
+ jsonString: string,
102
+ ): SafeParseResult<ResponseRefusalDoneStreamEventData, SDKValidationError> {
103
+ return safeParse(
104
+ jsonString,
105
+ (x) =>
106
+ ResponseRefusalDoneStreamEventData$inboundSchema.parse(JSON.parse(x)),
107
+ `Failed to parse 'ResponseRefusalDoneStreamEventData' from JSON`,
108
+ );
109
+ }
110
+
111
+ /** @internal */
112
+ export const ResponseRefusalDoneStreamEvent$inboundSchema: z.ZodType<
113
+ ResponseRefusalDoneStreamEvent,
114
+ z.ZodTypeDef,
115
+ unknown
116
+ > = z.object({
117
+ data: z.unknown().transform((v, ctx) => {
118
+ if (typeof v !== "string") return v;
119
+ try {
120
+ return JSON.parse(v);
121
+ } catch (err) {
122
+ ctx.addIssue({ code: "custom", message: `malformed json: ${err}` });
123
+ return z.NEVER;
124
+ }
125
+ }).pipe(z.lazy(() => ResponseRefusalDoneStreamEventData$inboundSchema)),
126
+ event: z.literal("response.refusal.done"),
127
+ });
128
+
129
+ export function responseRefusalDoneStreamEventFromJSON(
130
+ jsonString: string,
131
+ ): SafeParseResult<ResponseRefusalDoneStreamEvent, SDKValidationError> {
132
+ return safeParse(
133
+ jsonString,
134
+ (x) => ResponseRefusalDoneStreamEvent$inboundSchema.parse(JSON.parse(x)),
135
+ `Failed to parse 'ResponseRefusalDoneStreamEvent' from JSON`,
136
+ );
137
+ }
@@ -138,7 +138,7 @@ export const CreateDatasetResponseBody$inboundSchema: z.ZodType<
138
138
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
139
139
  .optional(),
140
140
  updated: z.string().datetime({ offset: true }).default(
141
- "2026-06-09T13:49:27.367Z",
141
+ "2026-06-10T05:17:44.336Z",
142
142
  ).transform(v => new Date(v)),
143
143
  }).transform((v) => {
144
144
  return remap$(v, {
@@ -2355,7 +2355,7 @@ export const Evaluations3$inboundSchema: z.ZodType<
2355
2355
  ),
2356
2356
  reviewed_by_id: z.string(),
2357
2357
  reviewed_at: z.string().datetime({ offset: true }).default(
2358
- "2026-06-09T13:49:51.201Z",
2358
+ "2026-06-10T05:18:07.948Z",
2359
2359
  ).transform(v => new Date(v)),
2360
2360
  type: z.literal("string_array"),
2361
2361
  values: z.array(z.string()),
@@ -2400,7 +2400,7 @@ export const Evaluations2$inboundSchema: z.ZodType<
2400
2400
  source: CreateDatasetItemEvaluationsSource$inboundSchema.default("orq"),
2401
2401
  reviewed_by_id: z.string(),
2402
2402
  reviewed_at: z.string().datetime({ offset: true }).default(
2403
- "2026-06-09T13:49:51.200Z",
2403
+ "2026-06-10T05:18:07.948Z",
2404
2404
  ).transform(v => new Date(v)),
2405
2405
  type: z.literal("number"),
2406
2406
  value: z.number(),
@@ -2446,7 +2446,7 @@ export const Evaluations1$inboundSchema: z.ZodType<
2446
2446
  source: EvaluationsSource$inboundSchema.default("orq"),
2447
2447
  reviewed_by_id: z.string(),
2448
2448
  reviewed_at: z.string().datetime({ offset: true }).default(
2449
- "2026-06-09T13:49:51.199Z",
2449
+ "2026-06-10T05:18:07.947Z",
2450
2450
  ).transform(v => new Date(v)),
2451
2451
  type: z.literal("string"),
2452
2452
  value: z.string(),
@@ -2529,7 +2529,7 @@ export const CreateDatasetItemResponseBody$inboundSchema: z.ZodType<
2529
2529
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
2530
2530
  .optional(),
2531
2531
  updated: z.string().datetime({ offset: true }).default(
2532
- "2026-06-09T13:49:27.367Z",
2532
+ "2026-06-10T05:17:44.336Z",
2533
2533
  ).transform(v => new Date(v)),
2534
2534
  }).transform((v) => {
2535
2535
  return remap$(v, {
@@ -409,7 +409,7 @@ export const CreateDatasourceResponseBody$inboundSchema: z.ZodType<
409
409
  z.ZodTypeDef,
410
410
  unknown
411
411
  > = z.object({
412
- _id: z.string().default("01KTPAB34T3JK5F07FZKPNGBEF"),
412
+ _id: z.string().default("01KTQZETFKXMFCTDJ18FESQFRJ"),
413
413
  display_name: z.string(),
414
414
  description: z.nullable(z.string()).optional(),
415
415
  status: CreateDatasourceStatus$inboundSchema,