@orq-ai/node 4.2.0-rc.29 → 4.2.0-rc.30

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 (233) hide show
  1. package/FUNCTIONS.md +7 -17
  2. package/README.md +82 -118
  3. package/bin/mcp-server.js +1687 -692
  4. package/bin/mcp-server.js.map +67 -49
  5. package/examples/feedbackCreate.example.ts +32 -0
  6. package/examples/package-lock.json +2 -2
  7. package/funcs/contactsCreate.d.ts +2 -0
  8. package/funcs/contactsCreate.d.ts.map +1 -1
  9. package/funcs/contactsCreate.js +2 -0
  10. package/funcs/contactsCreate.js.map +1 -1
  11. package/funcs/contactsDelete.d.ts +2 -0
  12. package/funcs/contactsDelete.d.ts.map +1 -1
  13. package/funcs/contactsDelete.js +2 -0
  14. package/funcs/contactsDelete.js.map +1 -1
  15. package/funcs/contactsList.d.ts +2 -0
  16. package/funcs/contactsList.d.ts.map +1 -1
  17. package/funcs/contactsList.js +2 -0
  18. package/funcs/contactsList.js.map +1 -1
  19. package/funcs/contactsRetrieve.d.ts +2 -0
  20. package/funcs/contactsRetrieve.d.ts.map +1 -1
  21. package/funcs/contactsRetrieve.js +2 -0
  22. package/funcs/contactsRetrieve.js.map +1 -1
  23. package/funcs/contactsUpdate.d.ts +2 -0
  24. package/funcs/contactsUpdate.d.ts.map +1 -1
  25. package/funcs/contactsUpdate.js +2 -0
  26. package/funcs/contactsUpdate.js.map +1 -1
  27. package/funcs/identitiesCreate.d.ts +17 -0
  28. package/funcs/identitiesCreate.d.ts.map +1 -0
  29. package/funcs/identitiesCreate.js +116 -0
  30. package/funcs/identitiesCreate.js.map +1 -0
  31. package/funcs/identitiesDelete.d.ts +18 -0
  32. package/funcs/identitiesDelete.d.ts.map +1 -0
  33. package/funcs/identitiesDelete.js +124 -0
  34. package/funcs/identitiesDelete.js.map +1 -0
  35. package/funcs/identitiesList.d.ts +17 -0
  36. package/funcs/identitiesList.d.ts.map +1 -0
  37. package/funcs/identitiesList.js +122 -0
  38. package/funcs/identitiesList.js.map +1 -0
  39. package/funcs/identitiesRetrieve.d.ts +18 -0
  40. package/funcs/identitiesRetrieve.d.ts.map +1 -0
  41. package/funcs/identitiesRetrieve.js +123 -0
  42. package/funcs/identitiesRetrieve.js.map +1 -0
  43. package/funcs/identitiesUpdate.d.ts +18 -0
  44. package/funcs/identitiesUpdate.d.ts.map +1 -0
  45. package/funcs/identitiesUpdate.js +124 -0
  46. package/funcs/identitiesUpdate.js.map +1 -0
  47. package/jsr.json +1 -1
  48. package/lib/config.d.ts +3 -3
  49. package/lib/config.js +3 -3
  50. package/mcp-server/mcp-server.js +1 -1
  51. package/mcp-server/server.d.ts.map +1 -1
  52. package/mcp-server/server.js +11 -1
  53. package/mcp-server/server.js.map +1 -1
  54. package/mcp-server/tools/identitiesCreate.d.ts +8 -0
  55. package/mcp-server/tools/identitiesCreate.d.ts.map +1 -0
  56. package/mcp-server/tools/identitiesCreate.js +64 -0
  57. package/mcp-server/tools/identitiesCreate.js.map +1 -0
  58. package/mcp-server/tools/identitiesDelete.d.ts +8 -0
  59. package/mcp-server/tools/identitiesDelete.d.ts.map +1 -0
  60. package/mcp-server/tools/identitiesDelete.js +63 -0
  61. package/mcp-server/tools/identitiesDelete.js.map +1 -0
  62. package/mcp-server/tools/identitiesList.d.ts +8 -0
  63. package/mcp-server/tools/identitiesList.d.ts.map +1 -0
  64. package/mcp-server/tools/identitiesList.js +64 -0
  65. package/mcp-server/tools/identitiesList.js.map +1 -0
  66. package/mcp-server/tools/identitiesRetrieve.d.ts +8 -0
  67. package/mcp-server/tools/identitiesRetrieve.d.ts.map +1 -0
  68. package/mcp-server/tools/identitiesRetrieve.js +64 -0
  69. package/mcp-server/tools/identitiesRetrieve.js.map +1 -0
  70. package/mcp-server/tools/identitiesUpdate.d.ts +8 -0
  71. package/mcp-server/tools/identitiesUpdate.d.ts.map +1 -0
  72. package/mcp-server/tools/identitiesUpdate.js +64 -0
  73. package/mcp-server/tools/identitiesUpdate.js.map +1 -0
  74. package/models/components/conversationresponse.js +2 -2
  75. package/models/components/conversationwithmessagesresponse.js +2 -2
  76. package/models/components/partdoneevent.js +2 -2
  77. package/models/components/reasoningpart.js +2 -2
  78. package/models/errors/deleteidentity.d.ts +36 -0
  79. package/models/errors/deleteidentity.d.ts.map +1 -0
  80. package/models/errors/deleteidentity.js +77 -0
  81. package/models/errors/deleteidentity.js.map +1 -0
  82. package/models/errors/index.d.ts +3 -0
  83. package/models/errors/index.d.ts.map +1 -1
  84. package/models/errors/index.js +3 -0
  85. package/models/errors/index.js.map +1 -1
  86. package/models/errors/retrieveidentity.d.ts +36 -0
  87. package/models/errors/retrieveidentity.d.ts.map +1 -0
  88. package/models/errors/retrieveidentity.js +77 -0
  89. package/models/errors/retrieveidentity.js.map +1 -0
  90. package/models/errors/updateidentity.d.ts +32 -0
  91. package/models/errors/updateidentity.d.ts.map +1 -0
  92. package/models/errors/updateidentity.js +74 -0
  93. package/models/errors/updateidentity.js.map +1 -0
  94. package/models/operations/createcontact.js +2 -2
  95. package/models/operations/createconversation.js +2 -2
  96. package/models/operations/createconversationresponse.js +4 -4
  97. package/models/operations/createdataset.js +2 -2
  98. package/models/operations/createdatasetitem.js +8 -8
  99. package/models/operations/createdatasource.js +2 -2
  100. package/models/operations/createeval.js +28 -28
  101. package/models/operations/createidentity.d.ts +120 -0
  102. package/models/operations/createidentity.d.ts.map +1 -0
  103. package/models/operations/createidentity.js +133 -0
  104. package/models/operations/createidentity.js.map +1 -0
  105. package/models/operations/createtool.js +12 -12
  106. package/models/operations/deleteidentity.d.ts +20 -0
  107. package/models/operations/deleteidentity.d.ts.map +1 -0
  108. package/models/operations/deleteidentity.js +58 -0
  109. package/models/operations/deleteidentity.js.map +1 -0
  110. package/models/operations/fileget.js +2 -2
  111. package/models/operations/filelist.js +2 -2
  112. package/models/operations/fileupload.js +2 -2
  113. package/models/operations/generateconversationname.js +2 -2
  114. package/models/operations/getalltools.js +12 -12
  115. package/models/operations/getevals.js +28 -28
  116. package/models/operations/index.d.ts +5 -0
  117. package/models/operations/index.d.ts.map +1 -1
  118. package/models/operations/index.js +5 -0
  119. package/models/operations/index.js.map +1 -1
  120. package/models/operations/listcontacts.d.ts +8 -8
  121. package/models/operations/listcontacts.d.ts.map +1 -1
  122. package/models/operations/listcontacts.js +15 -13
  123. package/models/operations/listcontacts.js.map +1 -1
  124. package/models/operations/listdatasetdatapoints.js +8 -8
  125. package/models/operations/listdatasets.js +2 -2
  126. package/models/operations/listdatasources.js +2 -2
  127. package/models/operations/listidentities.d.ts +183 -0
  128. package/models/operations/listidentities.d.ts.map +1 -0
  129. package/models/operations/listidentities.js +220 -0
  130. package/models/operations/listidentities.js.map +1 -0
  131. package/models/operations/retrievecontact.js +2 -2
  132. package/models/operations/retrievedatapoint.js +8 -8
  133. package/models/operations/retrievedataset.js +2 -2
  134. package/models/operations/retrievedatasource.js +2 -2
  135. package/models/operations/retrieveidentity.d.ts +83 -0
  136. package/models/operations/retrieveidentity.d.ts.map +1 -0
  137. package/models/operations/retrieveidentity.js +107 -0
  138. package/models/operations/retrieveidentity.js.map +1 -0
  139. package/models/operations/retrievetool.js +12 -12
  140. package/models/operations/runagent.js +2 -2
  141. package/models/operations/streamrunagent.js +2 -2
  142. package/models/operations/updatecontact.js +2 -2
  143. package/models/operations/updateconversation.js +2 -2
  144. package/models/operations/updatedatapoint.js +8 -8
  145. package/models/operations/updatedataset.js +2 -2
  146. package/models/operations/updatedatasource.js +2 -2
  147. package/models/operations/updateeval.js +28 -28
  148. package/models/operations/updateidentity.d.ts +131 -0
  149. package/models/operations/updateidentity.d.ts.map +1 -0
  150. package/models/operations/updateidentity.js +152 -0
  151. package/models/operations/updateidentity.js.map +1 -0
  152. package/models/operations/updatetool.js +14 -14
  153. package/package.json +2 -2
  154. package/sdk/contacts.d.ts +10 -0
  155. package/sdk/contacts.d.ts.map +1 -1
  156. package/sdk/contacts.js +10 -0
  157. package/sdk/contacts.js.map +1 -1
  158. package/sdk/identities.d.ts +40 -0
  159. package/sdk/identities.d.ts.map +1 -0
  160. package/sdk/identities.js +62 -0
  161. package/sdk/identities.js.map +1 -0
  162. package/sdk/sdk.d.ts +3 -0
  163. package/sdk/sdk.d.ts.map +1 -1
  164. package/sdk/sdk.js +4 -0
  165. package/sdk/sdk.js.map +1 -1
  166. package/src/funcs/contactsCreate.ts +2 -0
  167. package/src/funcs/contactsDelete.ts +2 -0
  168. package/src/funcs/contactsList.ts +2 -0
  169. package/src/funcs/contactsRetrieve.ts +2 -0
  170. package/src/funcs/contactsUpdate.ts +2 -0
  171. package/src/funcs/identitiesCreate.ts +165 -0
  172. package/src/funcs/identitiesDelete.ts +176 -0
  173. package/src/funcs/identitiesList.ts +170 -0
  174. package/src/funcs/identitiesRetrieve.ts +175 -0
  175. package/src/funcs/identitiesUpdate.ts +176 -0
  176. package/src/lib/config.ts +3 -3
  177. package/src/mcp-server/mcp-server.ts +1 -1
  178. package/src/mcp-server/server.ts +11 -1
  179. package/src/mcp-server/tools/identitiesCreate.ts +37 -0
  180. package/src/mcp-server/tools/identitiesDelete.ts +35 -0
  181. package/src/mcp-server/tools/identitiesList.ts +37 -0
  182. package/src/mcp-server/tools/identitiesRetrieve.ts +37 -0
  183. package/src/mcp-server/tools/identitiesUpdate.ts +37 -0
  184. package/src/models/components/conversationresponse.ts +2 -2
  185. package/src/models/components/conversationwithmessagesresponse.ts +2 -2
  186. package/src/models/components/partdoneevent.ts +2 -2
  187. package/src/models/components/reasoningpart.ts +2 -2
  188. package/src/models/errors/deleteidentity.ts +78 -0
  189. package/src/models/errors/index.ts +3 -0
  190. package/src/models/errors/retrieveidentity.ts +78 -0
  191. package/src/models/errors/updateidentity.ts +70 -0
  192. package/src/models/operations/createcontact.ts +2 -2
  193. package/src/models/operations/createconversation.ts +2 -2
  194. package/src/models/operations/createconversationresponse.ts +4 -4
  195. package/src/models/operations/createdataset.ts +2 -2
  196. package/src/models/operations/createdatasetitem.ts +8 -8
  197. package/src/models/operations/createdatasource.ts +2 -2
  198. package/src/models/operations/createeval.ts +28 -28
  199. package/src/models/operations/createidentity.ts +237 -0
  200. package/src/models/operations/createtool.ts +12 -12
  201. package/src/models/operations/deleteidentity.ts +54 -0
  202. package/src/models/operations/fileget.ts +2 -2
  203. package/src/models/operations/filelist.ts +2 -2
  204. package/src/models/operations/fileupload.ts +2 -2
  205. package/src/models/operations/generateconversationname.ts +2 -2
  206. package/src/models/operations/getalltools.ts +12 -12
  207. package/src/models/operations/getevals.ts +28 -28
  208. package/src/models/operations/index.ts +5 -0
  209. package/src/models/operations/listcontacts.ts +24 -20
  210. package/src/models/operations/listdatasetdatapoints.ts +8 -8
  211. package/src/models/operations/listdatasets.ts +2 -2
  212. package/src/models/operations/listdatasources.ts +2 -2
  213. package/src/models/operations/listidentities.ts +432 -0
  214. package/src/models/operations/retrievecontact.ts +2 -2
  215. package/src/models/operations/retrievedatapoint.ts +8 -8
  216. package/src/models/operations/retrievedataset.ts +2 -2
  217. package/src/models/operations/retrievedatasource.ts +2 -2
  218. package/src/models/operations/retrieveidentity.ts +180 -0
  219. package/src/models/operations/retrievetool.ts +12 -12
  220. package/src/models/operations/runagent.ts +2 -2
  221. package/src/models/operations/streamrunagent.ts +2 -2
  222. package/src/models/operations/updatecontact.ts +2 -2
  223. package/src/models/operations/updateconversation.ts +2 -2
  224. package/src/models/operations/updatedatapoint.ts +8 -8
  225. package/src/models/operations/updatedataset.ts +2 -2
  226. package/src/models/operations/updatedatasource.ts +2 -2
  227. package/src/models/operations/updateeval.ts +28 -28
  228. package/src/models/operations/updateidentity.ts +281 -0
  229. package/src/models/operations/updatetool.ts +14 -14
  230. package/src/sdk/contacts.ts +10 -0
  231. package/src/sdk/identities.ts +99 -0
  232. package/src/sdk/sdk.ts +6 -0
  233. package/examples/contactsCreate.example.ts +0 -42
@@ -0,0 +1,432 @@
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 { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ /**
13
+ * Filter identities by tags. Can be provided as JSON object {"tags": ["premium", "beta-user"]} or as query format "tags=premium,beta-user"
14
+ */
15
+ export type QueryParamFilterBy = {
16
+ tags?: Array<string> | undefined;
17
+ };
18
+
19
+ export type ListIdentitiesRequest = {
20
+ /**
21
+ * A limit on the number of objects to be returned. Limit can range between 1 and 50, and the default is 10
22
+ */
23
+ limit?: number | undefined;
24
+ /**
25
+ * A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, ending with `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include `after=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the next page of the list.
26
+ */
27
+ startingAfter?: string | undefined;
28
+ /**
29
+ * A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, starting with `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include `before=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the previous page of the list.
30
+ */
31
+ endingBefore?: string | undefined;
32
+ /**
33
+ * Search identities by display name or email address. Minimum 2 characters required.
34
+ */
35
+ search?: string | undefined;
36
+ /**
37
+ * Filter identities by tags. Can be provided as JSON object {"tags": ["premium", "beta-user"]} or as query format "tags=premium,beta-user"
38
+ */
39
+ filterBy?: QueryParamFilterBy | undefined;
40
+ /**
41
+ * Include usage metrics of the last 30 days for each identity.
42
+ */
43
+ includeMetrics?: boolean | null | undefined;
44
+ };
45
+
46
+ export const ListIdentitiesObject = {
47
+ List: "list",
48
+ } as const;
49
+ export type ListIdentitiesObject = ClosedEnum<typeof ListIdentitiesObject>;
50
+
51
+ export type ListIdentitiesMetrics = {
52
+ /**
53
+ * Total cost in dollars of the last 30 days
54
+ */
55
+ totalCost: number;
56
+ /**
57
+ * Total tokens of the last 30 days
58
+ */
59
+ totalTokens: number;
60
+ /**
61
+ * Total requests of the last 30 days
62
+ */
63
+ totalRequests: number;
64
+ /**
65
+ * P50 error rate of the last 30 days
66
+ */
67
+ errorRate: number;
68
+ };
69
+
70
+ export type ListIdentitiesData = {
71
+ /**
72
+ * Unique ULID (Universally Unique Lexicographically Sortable Identifier) for the contact
73
+ */
74
+ id: string;
75
+ /**
76
+ * Unique string value to identify the contact user in the customer's system. This should be the same ID you use in your system to reference this user.
77
+ */
78
+ externalId: string;
79
+ /**
80
+ * Display name or nickname of the contact user. This is typically shown in user interfaces.
81
+ */
82
+ displayName?: string | null | undefined;
83
+ /**
84
+ * Email address of the contact user
85
+ */
86
+ email?: string | null | undefined;
87
+ /**
88
+ * URL linking to the contact user's avatar image
89
+ */
90
+ avatarUrl?: string | null | undefined;
91
+ /**
92
+ * Array of tags associated with the contact. Useful for organizing and filtering contacts by categories, departments, or custom classifications.
93
+ */
94
+ tags?: Array<string> | undefined;
95
+ /**
96
+ * Additional custom metadata associated with the contact as key-value pairs. Use this to store any extra information specific to your application.
97
+ */
98
+ metadata?: { [k: string]: any } | undefined;
99
+ /**
100
+ * The date and time the resource was created
101
+ */
102
+ created?: Date | undefined;
103
+ /**
104
+ * The date and time the resource was last updated
105
+ */
106
+ updated?: Date | undefined;
107
+ metrics: ListIdentitiesMetrics;
108
+ };
109
+
110
+ /**
111
+ * List of identities
112
+ */
113
+ export type ListIdentitiesResponseBody = {
114
+ object: ListIdentitiesObject;
115
+ data: Array<ListIdentitiesData>;
116
+ hasMore: boolean;
117
+ };
118
+
119
+ /** @internal */
120
+ export const QueryParamFilterBy$inboundSchema: z.ZodType<
121
+ QueryParamFilterBy,
122
+ z.ZodTypeDef,
123
+ unknown
124
+ > = z.object({
125
+ tags: z.array(z.string()).optional(),
126
+ });
127
+ /** @internal */
128
+ export type QueryParamFilterBy$Outbound = {
129
+ tags?: Array<string> | undefined;
130
+ };
131
+
132
+ /** @internal */
133
+ export const QueryParamFilterBy$outboundSchema: z.ZodType<
134
+ QueryParamFilterBy$Outbound,
135
+ z.ZodTypeDef,
136
+ QueryParamFilterBy
137
+ > = z.object({
138
+ tags: z.array(z.string()).optional(),
139
+ });
140
+
141
+ export function queryParamFilterByToJSON(
142
+ queryParamFilterBy: QueryParamFilterBy,
143
+ ): string {
144
+ return JSON.stringify(
145
+ QueryParamFilterBy$outboundSchema.parse(queryParamFilterBy),
146
+ );
147
+ }
148
+ export function queryParamFilterByFromJSON(
149
+ jsonString: string,
150
+ ): SafeParseResult<QueryParamFilterBy, SDKValidationError> {
151
+ return safeParse(
152
+ jsonString,
153
+ (x) => QueryParamFilterBy$inboundSchema.parse(JSON.parse(x)),
154
+ `Failed to parse 'QueryParamFilterBy' from JSON`,
155
+ );
156
+ }
157
+
158
+ /** @internal */
159
+ export const ListIdentitiesRequest$inboundSchema: z.ZodType<
160
+ ListIdentitiesRequest,
161
+ z.ZodTypeDef,
162
+ unknown
163
+ > = z.object({
164
+ limit: z.number().default(10),
165
+ starting_after: z.string().optional(),
166
+ ending_before: z.string().optional(),
167
+ search: z.string().optional(),
168
+ filter_by: z.lazy(() => QueryParamFilterBy$inboundSchema).optional(),
169
+ include_metrics: z.nullable(z.boolean().default(false)),
170
+ }).transform((v) => {
171
+ return remap$(v, {
172
+ "starting_after": "startingAfter",
173
+ "ending_before": "endingBefore",
174
+ "filter_by": "filterBy",
175
+ "include_metrics": "includeMetrics",
176
+ });
177
+ });
178
+ /** @internal */
179
+ export type ListIdentitiesRequest$Outbound = {
180
+ limit: number;
181
+ starting_after?: string | undefined;
182
+ ending_before?: string | undefined;
183
+ search?: string | undefined;
184
+ filter_by?: QueryParamFilterBy$Outbound | undefined;
185
+ include_metrics: boolean | null;
186
+ };
187
+
188
+ /** @internal */
189
+ export const ListIdentitiesRequest$outboundSchema: z.ZodType<
190
+ ListIdentitiesRequest$Outbound,
191
+ z.ZodTypeDef,
192
+ ListIdentitiesRequest
193
+ > = z.object({
194
+ limit: z.number().default(10),
195
+ startingAfter: z.string().optional(),
196
+ endingBefore: z.string().optional(),
197
+ search: z.string().optional(),
198
+ filterBy: z.lazy(() => QueryParamFilterBy$outboundSchema).optional(),
199
+ includeMetrics: z.nullable(z.boolean().default(false)),
200
+ }).transform((v) => {
201
+ return remap$(v, {
202
+ startingAfter: "starting_after",
203
+ endingBefore: "ending_before",
204
+ filterBy: "filter_by",
205
+ includeMetrics: "include_metrics",
206
+ });
207
+ });
208
+
209
+ export function listIdentitiesRequestToJSON(
210
+ listIdentitiesRequest: ListIdentitiesRequest,
211
+ ): string {
212
+ return JSON.stringify(
213
+ ListIdentitiesRequest$outboundSchema.parse(listIdentitiesRequest),
214
+ );
215
+ }
216
+ export function listIdentitiesRequestFromJSON(
217
+ jsonString: string,
218
+ ): SafeParseResult<ListIdentitiesRequest, SDKValidationError> {
219
+ return safeParse(
220
+ jsonString,
221
+ (x) => ListIdentitiesRequest$inboundSchema.parse(JSON.parse(x)),
222
+ `Failed to parse 'ListIdentitiesRequest' from JSON`,
223
+ );
224
+ }
225
+
226
+ /** @internal */
227
+ export const ListIdentitiesObject$inboundSchema: z.ZodNativeEnum<
228
+ typeof ListIdentitiesObject
229
+ > = z.nativeEnum(ListIdentitiesObject);
230
+ /** @internal */
231
+ export const ListIdentitiesObject$outboundSchema: z.ZodNativeEnum<
232
+ typeof ListIdentitiesObject
233
+ > = ListIdentitiesObject$inboundSchema;
234
+
235
+ /** @internal */
236
+ export const ListIdentitiesMetrics$inboundSchema: z.ZodType<
237
+ ListIdentitiesMetrics,
238
+ z.ZodTypeDef,
239
+ unknown
240
+ > = z.object({
241
+ total_cost: z.number(),
242
+ total_tokens: z.number(),
243
+ total_requests: z.number(),
244
+ error_rate: z.number(),
245
+ }).transform((v) => {
246
+ return remap$(v, {
247
+ "total_cost": "totalCost",
248
+ "total_tokens": "totalTokens",
249
+ "total_requests": "totalRequests",
250
+ "error_rate": "errorRate",
251
+ });
252
+ });
253
+ /** @internal */
254
+ export type ListIdentitiesMetrics$Outbound = {
255
+ total_cost: number;
256
+ total_tokens: number;
257
+ total_requests: number;
258
+ error_rate: number;
259
+ };
260
+
261
+ /** @internal */
262
+ export const ListIdentitiesMetrics$outboundSchema: z.ZodType<
263
+ ListIdentitiesMetrics$Outbound,
264
+ z.ZodTypeDef,
265
+ ListIdentitiesMetrics
266
+ > = z.object({
267
+ totalCost: z.number(),
268
+ totalTokens: z.number(),
269
+ totalRequests: z.number(),
270
+ errorRate: z.number(),
271
+ }).transform((v) => {
272
+ return remap$(v, {
273
+ totalCost: "total_cost",
274
+ totalTokens: "total_tokens",
275
+ totalRequests: "total_requests",
276
+ errorRate: "error_rate",
277
+ });
278
+ });
279
+
280
+ export function listIdentitiesMetricsToJSON(
281
+ listIdentitiesMetrics: ListIdentitiesMetrics,
282
+ ): string {
283
+ return JSON.stringify(
284
+ ListIdentitiesMetrics$outboundSchema.parse(listIdentitiesMetrics),
285
+ );
286
+ }
287
+ export function listIdentitiesMetricsFromJSON(
288
+ jsonString: string,
289
+ ): SafeParseResult<ListIdentitiesMetrics, SDKValidationError> {
290
+ return safeParse(
291
+ jsonString,
292
+ (x) => ListIdentitiesMetrics$inboundSchema.parse(JSON.parse(x)),
293
+ `Failed to parse 'ListIdentitiesMetrics' from JSON`,
294
+ );
295
+ }
296
+
297
+ /** @internal */
298
+ export const ListIdentitiesData$inboundSchema: z.ZodType<
299
+ ListIdentitiesData,
300
+ z.ZodTypeDef,
301
+ unknown
302
+ > = z.object({
303
+ _id: z.string(),
304
+ external_id: z.string(),
305
+ display_name: z.nullable(z.string()).optional(),
306
+ email: z.nullable(z.string()).optional(),
307
+ avatar_url: z.nullable(z.string()).optional(),
308
+ tags: z.array(z.string()).optional(),
309
+ metadata: z.record(z.any()).optional(),
310
+ created: z.string().datetime({ offset: true }).transform(v => new Date(v))
311
+ .optional(),
312
+ updated: z.string().datetime({ offset: true }).default(
313
+ "2026-01-15T04:13:15.987Z",
314
+ ).transform(v => new Date(v)),
315
+ metrics: z.lazy(() => ListIdentitiesMetrics$inboundSchema),
316
+ }).transform((v) => {
317
+ return remap$(v, {
318
+ "_id": "id",
319
+ "external_id": "externalId",
320
+ "display_name": "displayName",
321
+ "avatar_url": "avatarUrl",
322
+ });
323
+ });
324
+ /** @internal */
325
+ export type ListIdentitiesData$Outbound = {
326
+ _id: string;
327
+ external_id: string;
328
+ display_name?: string | null | undefined;
329
+ email?: string | null | undefined;
330
+ avatar_url?: string | null | undefined;
331
+ tags?: Array<string> | undefined;
332
+ metadata?: { [k: string]: any } | undefined;
333
+ created?: string | undefined;
334
+ updated: string;
335
+ metrics: ListIdentitiesMetrics$Outbound;
336
+ };
337
+
338
+ /** @internal */
339
+ export const ListIdentitiesData$outboundSchema: z.ZodType<
340
+ ListIdentitiesData$Outbound,
341
+ z.ZodTypeDef,
342
+ ListIdentitiesData
343
+ > = z.object({
344
+ id: z.string(),
345
+ externalId: z.string(),
346
+ displayName: z.nullable(z.string()).optional(),
347
+ email: z.nullable(z.string()).optional(),
348
+ avatarUrl: z.nullable(z.string()).optional(),
349
+ tags: z.array(z.string()).optional(),
350
+ metadata: z.record(z.any()).optional(),
351
+ created: z.date().transform(v => v.toISOString()).optional(),
352
+ updated: z.date().default(() => new Date("2026-01-15T04:13:15.987Z"))
353
+ .transform(v => v.toISOString()),
354
+ metrics: z.lazy(() => ListIdentitiesMetrics$outboundSchema),
355
+ }).transform((v) => {
356
+ return remap$(v, {
357
+ id: "_id",
358
+ externalId: "external_id",
359
+ displayName: "display_name",
360
+ avatarUrl: "avatar_url",
361
+ });
362
+ });
363
+
364
+ export function listIdentitiesDataToJSON(
365
+ listIdentitiesData: ListIdentitiesData,
366
+ ): string {
367
+ return JSON.stringify(
368
+ ListIdentitiesData$outboundSchema.parse(listIdentitiesData),
369
+ );
370
+ }
371
+ export function listIdentitiesDataFromJSON(
372
+ jsonString: string,
373
+ ): SafeParseResult<ListIdentitiesData, SDKValidationError> {
374
+ return safeParse(
375
+ jsonString,
376
+ (x) => ListIdentitiesData$inboundSchema.parse(JSON.parse(x)),
377
+ `Failed to parse 'ListIdentitiesData' from JSON`,
378
+ );
379
+ }
380
+
381
+ /** @internal */
382
+ export const ListIdentitiesResponseBody$inboundSchema: z.ZodType<
383
+ ListIdentitiesResponseBody,
384
+ z.ZodTypeDef,
385
+ unknown
386
+ > = z.object({
387
+ object: ListIdentitiesObject$inboundSchema,
388
+ data: z.array(z.lazy(() => ListIdentitiesData$inboundSchema)),
389
+ has_more: z.boolean(),
390
+ }).transform((v) => {
391
+ return remap$(v, {
392
+ "has_more": "hasMore",
393
+ });
394
+ });
395
+ /** @internal */
396
+ export type ListIdentitiesResponseBody$Outbound = {
397
+ object: string;
398
+ data: Array<ListIdentitiesData$Outbound>;
399
+ has_more: boolean;
400
+ };
401
+
402
+ /** @internal */
403
+ export const ListIdentitiesResponseBody$outboundSchema: z.ZodType<
404
+ ListIdentitiesResponseBody$Outbound,
405
+ z.ZodTypeDef,
406
+ ListIdentitiesResponseBody
407
+ > = z.object({
408
+ object: ListIdentitiesObject$outboundSchema,
409
+ data: z.array(z.lazy(() => ListIdentitiesData$outboundSchema)),
410
+ hasMore: z.boolean(),
411
+ }).transform((v) => {
412
+ return remap$(v, {
413
+ hasMore: "has_more",
414
+ });
415
+ });
416
+
417
+ export function listIdentitiesResponseBodyToJSON(
418
+ listIdentitiesResponseBody: ListIdentitiesResponseBody,
419
+ ): string {
420
+ return JSON.stringify(
421
+ ListIdentitiesResponseBody$outboundSchema.parse(listIdentitiesResponseBody),
422
+ );
423
+ }
424
+ export function listIdentitiesResponseBodyFromJSON(
425
+ jsonString: string,
426
+ ): SafeParseResult<ListIdentitiesResponseBody, SDKValidationError> {
427
+ return safeParse(
428
+ jsonString,
429
+ (x) => ListIdentitiesResponseBody$inboundSchema.parse(JSON.parse(x)),
430
+ `Failed to parse 'ListIdentitiesResponseBody' from JSON`,
431
+ );
432
+ }
@@ -112,7 +112,7 @@ export const RetrieveContactResponseBody$inboundSchema: z.ZodType<
112
112
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
113
113
  .optional(),
114
114
  updated: z.string().datetime({ offset: true }).default(
115
- "2026-01-14T13:30:08.520Z",
115
+ "2026-01-15T04:13:15.987Z",
116
116
  ).transform(v => new Date(v)),
117
117
  }).transform((v) => {
118
118
  return remap$(v, {
@@ -149,7 +149,7 @@ export const RetrieveContactResponseBody$outboundSchema: z.ZodType<
149
149
  tags: z.array(z.string()).optional(),
150
150
  metadata: z.record(z.any()).optional(),
151
151
  created: z.date().transform(v => v.toISOString()).optional(),
152
- updated: z.date().default(() => new Date("2026-01-14T13:30:08.520Z"))
152
+ updated: z.date().default(() => new Date("2026-01-15T04:13:15.987Z"))
153
153
  .transform(v => v.toISOString()),
154
154
  }).transform((v) => {
155
155
  return remap$(v, {
@@ -1878,7 +1878,7 @@ export const RetrieveDatapointEvaluations3$inboundSchema: z.ZodType<
1878
1878
  .default("orq"),
1879
1879
  reviewed_by_id: z.string(),
1880
1880
  reviewed_at: z.string().datetime({ offset: true }).default(
1881
- "2026-01-14T13:30:22.662Z",
1881
+ "2026-01-15T04:13:29.364Z",
1882
1882
  ).transform(v => new Date(v)),
1883
1883
  type: z.literal("string_array"),
1884
1884
  values: z.array(z.string()),
@@ -1915,7 +1915,7 @@ export const RetrieveDatapointEvaluations3$outboundSchema: z.ZodType<
1915
1915
  source: RetrieveDatapointEvaluationsDatasetsResponseSource$outboundSchema
1916
1916
  .default("orq"),
1917
1917
  reviewedById: z.string(),
1918
- reviewedAt: z.date().default(() => new Date("2026-01-14T13:30:22.662Z"))
1918
+ reviewedAt: z.date().default(() => new Date("2026-01-15T04:13:29.364Z"))
1919
1919
  .transform(v => v.toISOString()),
1920
1920
  type: z.literal("string_array"),
1921
1921
  values: z.array(z.string()),
@@ -1980,7 +1980,7 @@ export const RetrieveDatapointEvaluations2$inboundSchema: z.ZodType<
1980
1980
  ),
1981
1981
  reviewed_by_id: z.string(),
1982
1982
  reviewed_at: z.string().datetime({ offset: true }).default(
1983
- "2026-01-14T13:30:22.660Z",
1983
+ "2026-01-15T04:13:29.364Z",
1984
1984
  ).transform(v => new Date(v)),
1985
1985
  type: z.literal("number"),
1986
1986
  value: z.number(),
@@ -2018,7 +2018,7 @@ export const RetrieveDatapointEvaluations2$outboundSchema: z.ZodType<
2018
2018
  "orq",
2019
2019
  ),
2020
2020
  reviewedById: z.string(),
2021
- reviewedAt: z.date().default(() => new Date("2026-01-14T13:30:22.660Z"))
2021
+ reviewedAt: z.date().default(() => new Date("2026-01-15T04:13:29.364Z"))
2022
2022
  .transform(v => v.toISOString()),
2023
2023
  type: z.literal("number"),
2024
2024
  value: z.number(),
@@ -2080,7 +2080,7 @@ export const RetrieveDatapointEvaluations1$inboundSchema: z.ZodType<
2080
2080
  source: RetrieveDatapointEvaluationsSource$inboundSchema.default("orq"),
2081
2081
  reviewed_by_id: z.string(),
2082
2082
  reviewed_at: z.string().datetime({ offset: true }).default(
2083
- "2026-01-14T13:30:22.655Z",
2083
+ "2026-01-15T04:13:29.363Z",
2084
2084
  ).transform(v => new Date(v)),
2085
2085
  type: z.literal("string"),
2086
2086
  value: z.string(),
@@ -2115,7 +2115,7 @@ export const RetrieveDatapointEvaluations1$outboundSchema: z.ZodType<
2115
2115
  humanReviewId: z.string(),
2116
2116
  source: RetrieveDatapointEvaluationsSource$outboundSchema.default("orq"),
2117
2117
  reviewedById: z.string(),
2118
- reviewedAt: z.date().default(() => new Date("2026-01-14T13:30:22.655Z"))
2118
+ reviewedAt: z.date().default(() => new Date("2026-01-15T04:13:29.363Z"))
2119
2119
  .transform(v => v.toISOString()),
2120
2120
  type: z.literal("string"),
2121
2121
  value: z.string(),
@@ -2226,7 +2226,7 @@ export const RetrieveDatapointResponseBody$inboundSchema: z.ZodType<
2226
2226
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
2227
2227
  .optional(),
2228
2228
  updated: z.string().datetime({ offset: true }).default(
2229
- "2026-01-14T13:30:08.520Z",
2229
+ "2026-01-15T04:13:15.987Z",
2230
2230
  ).transform(v => new Date(v)),
2231
2231
  }).transform((v) => {
2232
2232
  return remap$(v, {
@@ -2300,7 +2300,7 @@ export const RetrieveDatapointResponseBody$outboundSchema: z.ZodType<
2300
2300
  createdById: z.string().optional(),
2301
2301
  updatedById: z.string().optional(),
2302
2302
  created: z.date().transform(v => v.toISOString()).optional(),
2303
- updated: z.date().default(() => new Date("2026-01-14T13:30:08.520Z"))
2303
+ updated: z.date().default(() => new Date("2026-01-15T04:13:15.987Z"))
2304
2304
  .transform(v => v.toISOString()),
2305
2305
  }).transform((v) => {
2306
2306
  return remap$(v, {
@@ -174,7 +174,7 @@ export const RetrieveDatasetResponseBody$inboundSchema: z.ZodType<
174
174
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
175
175
  .optional(),
176
176
  updated: z.string().datetime({ offset: true }).default(
177
- "2026-01-14T13:30:08.520Z",
177
+ "2026-01-15T04:13:15.987Z",
178
178
  ).transform(v => new Date(v)),
179
179
  }).transform((v) => {
180
180
  return remap$(v, {
@@ -213,7 +213,7 @@ export const RetrieveDatasetResponseBody$outboundSchema: z.ZodType<
213
213
  createdById: z.string().optional(),
214
214
  updatedById: z.string().optional(),
215
215
  created: z.date().transform(v => v.toISOString()).optional(),
216
- updated: z.date().default(() => new Date("2026-01-14T13:30:08.520Z"))
216
+ updated: z.date().default(() => new Date("2026-01-15T04:13:15.987Z"))
217
217
  .transform(v => v.toISOString()),
218
218
  }).transform((v) => {
219
219
  return remap$(v, {
@@ -145,7 +145,7 @@ export const RetrieveDatasourceResponseBody$inboundSchema: z.ZodType<
145
145
  z.ZodTypeDef,
146
146
  unknown
147
147
  > = z.object({
148
- _id: z.string().default("01KEYB6FPEFR0VY2NTH5C1QNJS"),
148
+ _id: z.string().default("01KEZXQGSDHSCWAD54YAKKKJTM"),
149
149
  display_name: z.string(),
150
150
  description: z.string().optional(),
151
151
  status: RetrieveDatasourceStatus$inboundSchema,
@@ -188,7 +188,7 @@ export const RetrieveDatasourceResponseBody$outboundSchema: z.ZodType<
188
188
  z.ZodTypeDef,
189
189
  RetrieveDatasourceResponseBody
190
190
  > = z.object({
191
- id: z.string().default("01KEYB6FPEFR0VY2NTH5C1QNJS"),
191
+ id: z.string().default("01KEZXQGSDHSCWAD54YAKKKJTM"),
192
192
  displayName: z.string(),
193
193
  description: z.string().optional(),
194
194
  status: RetrieveDatasourceStatus$outboundSchema,