@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,281 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * Identity fields to update
13
+ */
14
+ export type UpdateIdentityRequestBody = {
15
+ /**
16
+ * Display name or nickname of the contact user. This is typically shown in user interfaces.
17
+ */
18
+ displayName?: string | null | undefined;
19
+ /**
20
+ * Email address of the contact user
21
+ */
22
+ email?: string | null | undefined;
23
+ /**
24
+ * URL linking to the contact user's avatar image
25
+ */
26
+ avatarUrl?: string | null | undefined;
27
+ /**
28
+ * Array of tags associated with the contact. Useful for organizing and filtering contacts by categories, departments, or custom classifications.
29
+ */
30
+ tags?: Array<string> | undefined;
31
+ /**
32
+ * Additional custom metadata associated with the contact as key-value pairs. Use this to store any extra information specific to your application.
33
+ */
34
+ metadata?: { [k: string]: any } | undefined;
35
+ };
36
+
37
+ export type UpdateIdentityRequest = {
38
+ /**
39
+ * Unique identity id or external id
40
+ */
41
+ id: string;
42
+ /**
43
+ * Identity fields to update
44
+ */
45
+ requestBody?: UpdateIdentityRequestBody | undefined;
46
+ };
47
+
48
+ /**
49
+ * Updated identity
50
+ */
51
+ export type UpdateIdentityResponseBody = {
52
+ /**
53
+ * Unique ULID (Universally Unique Lexicographically Sortable Identifier) for the contact
54
+ */
55
+ id: string;
56
+ /**
57
+ * 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.
58
+ */
59
+ externalId: string;
60
+ /**
61
+ * Display name or nickname of the contact user. This is typically shown in user interfaces.
62
+ */
63
+ displayName?: string | null | undefined;
64
+ /**
65
+ * Email address of the contact user
66
+ */
67
+ email?: string | null | undefined;
68
+ /**
69
+ * URL linking to the contact user's avatar image
70
+ */
71
+ avatarUrl?: string | null | undefined;
72
+ /**
73
+ * Array of tags associated with the contact. Useful for organizing and filtering contacts by categories, departments, or custom classifications.
74
+ */
75
+ tags?: Array<string> | undefined;
76
+ /**
77
+ * Additional custom metadata associated with the contact as key-value pairs. Use this to store any extra information specific to your application.
78
+ */
79
+ metadata?: { [k: string]: any } | undefined;
80
+ /**
81
+ * The date and time the resource was created
82
+ */
83
+ created?: Date | undefined;
84
+ /**
85
+ * The date and time the resource was last updated
86
+ */
87
+ updated?: Date | undefined;
88
+ };
89
+
90
+ /** @internal */
91
+ export const UpdateIdentityRequestBody$inboundSchema: z.ZodType<
92
+ UpdateIdentityRequestBody,
93
+ z.ZodTypeDef,
94
+ unknown
95
+ > = z.object({
96
+ display_name: z.nullable(z.string()).optional(),
97
+ email: z.nullable(z.string()).optional(),
98
+ avatar_url: z.nullable(z.string()).optional(),
99
+ tags: z.array(z.string()).optional(),
100
+ metadata: z.record(z.any()).optional(),
101
+ }).transform((v) => {
102
+ return remap$(v, {
103
+ "display_name": "displayName",
104
+ "avatar_url": "avatarUrl",
105
+ });
106
+ });
107
+ /** @internal */
108
+ export type UpdateIdentityRequestBody$Outbound = {
109
+ display_name?: string | null | undefined;
110
+ email?: string | null | undefined;
111
+ avatar_url?: string | null | undefined;
112
+ tags?: Array<string> | undefined;
113
+ metadata?: { [k: string]: any } | undefined;
114
+ };
115
+
116
+ /** @internal */
117
+ export const UpdateIdentityRequestBody$outboundSchema: z.ZodType<
118
+ UpdateIdentityRequestBody$Outbound,
119
+ z.ZodTypeDef,
120
+ UpdateIdentityRequestBody
121
+ > = z.object({
122
+ displayName: z.nullable(z.string()).optional(),
123
+ email: z.nullable(z.string()).optional(),
124
+ avatarUrl: z.nullable(z.string()).optional(),
125
+ tags: z.array(z.string()).optional(),
126
+ metadata: z.record(z.any()).optional(),
127
+ }).transform((v) => {
128
+ return remap$(v, {
129
+ displayName: "display_name",
130
+ avatarUrl: "avatar_url",
131
+ });
132
+ });
133
+
134
+ export function updateIdentityRequestBodyToJSON(
135
+ updateIdentityRequestBody: UpdateIdentityRequestBody,
136
+ ): string {
137
+ return JSON.stringify(
138
+ UpdateIdentityRequestBody$outboundSchema.parse(updateIdentityRequestBody),
139
+ );
140
+ }
141
+ export function updateIdentityRequestBodyFromJSON(
142
+ jsonString: string,
143
+ ): SafeParseResult<UpdateIdentityRequestBody, SDKValidationError> {
144
+ return safeParse(
145
+ jsonString,
146
+ (x) => UpdateIdentityRequestBody$inboundSchema.parse(JSON.parse(x)),
147
+ `Failed to parse 'UpdateIdentityRequestBody' from JSON`,
148
+ );
149
+ }
150
+
151
+ /** @internal */
152
+ export const UpdateIdentityRequest$inboundSchema: z.ZodType<
153
+ UpdateIdentityRequest,
154
+ z.ZodTypeDef,
155
+ unknown
156
+ > = z.object({
157
+ id: z.string(),
158
+ RequestBody: z.lazy(() => UpdateIdentityRequestBody$inboundSchema).optional(),
159
+ }).transform((v) => {
160
+ return remap$(v, {
161
+ "RequestBody": "requestBody",
162
+ });
163
+ });
164
+ /** @internal */
165
+ export type UpdateIdentityRequest$Outbound = {
166
+ id: string;
167
+ RequestBody?: UpdateIdentityRequestBody$Outbound | undefined;
168
+ };
169
+
170
+ /** @internal */
171
+ export const UpdateIdentityRequest$outboundSchema: z.ZodType<
172
+ UpdateIdentityRequest$Outbound,
173
+ z.ZodTypeDef,
174
+ UpdateIdentityRequest
175
+ > = z.object({
176
+ id: z.string(),
177
+ requestBody: z.lazy(() => UpdateIdentityRequestBody$outboundSchema)
178
+ .optional(),
179
+ }).transform((v) => {
180
+ return remap$(v, {
181
+ requestBody: "RequestBody",
182
+ });
183
+ });
184
+
185
+ export function updateIdentityRequestToJSON(
186
+ updateIdentityRequest: UpdateIdentityRequest,
187
+ ): string {
188
+ return JSON.stringify(
189
+ UpdateIdentityRequest$outboundSchema.parse(updateIdentityRequest),
190
+ );
191
+ }
192
+ export function updateIdentityRequestFromJSON(
193
+ jsonString: string,
194
+ ): SafeParseResult<UpdateIdentityRequest, SDKValidationError> {
195
+ return safeParse(
196
+ jsonString,
197
+ (x) => UpdateIdentityRequest$inboundSchema.parse(JSON.parse(x)),
198
+ `Failed to parse 'UpdateIdentityRequest' from JSON`,
199
+ );
200
+ }
201
+
202
+ /** @internal */
203
+ export const UpdateIdentityResponseBody$inboundSchema: z.ZodType<
204
+ UpdateIdentityResponseBody,
205
+ z.ZodTypeDef,
206
+ unknown
207
+ > = z.object({
208
+ _id: z.string(),
209
+ external_id: z.string(),
210
+ display_name: z.nullable(z.string()).optional(),
211
+ email: z.nullable(z.string()).optional(),
212
+ avatar_url: z.nullable(z.string()).optional(),
213
+ tags: z.array(z.string()).optional(),
214
+ metadata: z.record(z.any()).optional(),
215
+ created: z.string().datetime({ offset: true }).transform(v => new Date(v))
216
+ .optional(),
217
+ updated: z.string().datetime({ offset: true }).default(
218
+ "2026-01-15T04:13:15.987Z",
219
+ ).transform(v => new Date(v)),
220
+ }).transform((v) => {
221
+ return remap$(v, {
222
+ "_id": "id",
223
+ "external_id": "externalId",
224
+ "display_name": "displayName",
225
+ "avatar_url": "avatarUrl",
226
+ });
227
+ });
228
+ /** @internal */
229
+ export type UpdateIdentityResponseBody$Outbound = {
230
+ _id: string;
231
+ external_id: string;
232
+ display_name?: string | null | undefined;
233
+ email?: string | null | undefined;
234
+ avatar_url?: string | null | undefined;
235
+ tags?: Array<string> | undefined;
236
+ metadata?: { [k: string]: any } | undefined;
237
+ created?: string | undefined;
238
+ updated: string;
239
+ };
240
+
241
+ /** @internal */
242
+ export const UpdateIdentityResponseBody$outboundSchema: z.ZodType<
243
+ UpdateIdentityResponseBody$Outbound,
244
+ z.ZodTypeDef,
245
+ UpdateIdentityResponseBody
246
+ > = z.object({
247
+ id: z.string(),
248
+ externalId: z.string(),
249
+ displayName: z.nullable(z.string()).optional(),
250
+ email: z.nullable(z.string()).optional(),
251
+ avatarUrl: z.nullable(z.string()).optional(),
252
+ tags: z.array(z.string()).optional(),
253
+ metadata: z.record(z.any()).optional(),
254
+ created: z.date().transform(v => v.toISOString()).optional(),
255
+ updated: z.date().default(() => new Date("2026-01-15T04:13:15.987Z"))
256
+ .transform(v => v.toISOString()),
257
+ }).transform((v) => {
258
+ return remap$(v, {
259
+ id: "_id",
260
+ externalId: "external_id",
261
+ displayName: "display_name",
262
+ avatarUrl: "avatar_url",
263
+ });
264
+ });
265
+
266
+ export function updateIdentityResponseBodyToJSON(
267
+ updateIdentityResponseBody: UpdateIdentityResponseBody,
268
+ ): string {
269
+ return JSON.stringify(
270
+ UpdateIdentityResponseBody$outboundSchema.parse(updateIdentityResponseBody),
271
+ );
272
+ }
273
+ export function updateIdentityResponseBodyFromJSON(
274
+ jsonString: string,
275
+ ): SafeParseResult<UpdateIdentityResponseBody, SDKValidationError> {
276
+ return safeParse(
277
+ jsonString,
278
+ (x) => UpdateIdentityResponseBody$inboundSchema.parse(JSON.parse(x)),
279
+ `Failed to parse 'UpdateIdentityResponseBody' from JSON`,
280
+ );
281
+ }
@@ -1528,7 +1528,7 @@ export const RequestBodyTools$inboundSchema: z.ZodType<
1528
1528
  z.ZodTypeDef,
1529
1529
  unknown
1530
1530
  > = z.object({
1531
- id: z.string().default("01KEYB6FHF5AV3H5TVBQY1WNGF"),
1531
+ id: z.string().default("01KEZXQGN5ZB4E7JF3VDGCPZC4"),
1532
1532
  name: z.string(),
1533
1533
  description: z.string().optional(),
1534
1534
  schema: z.lazy(() => UpdateToolRequestBodyToolsSchema$inboundSchema),
@@ -1547,7 +1547,7 @@ export const RequestBodyTools$outboundSchema: z.ZodType<
1547
1547
  z.ZodTypeDef,
1548
1548
  RequestBodyTools
1549
1549
  > = z.object({
1550
- id: z.string().default("01KEYB6FHF5AV3H5TVBQY1WNGF"),
1550
+ id: z.string().default("01KEZXQGN5ZB4E7JF3VDGCPZC4"),
1551
1551
  name: z.string(),
1552
1552
  description: z.string().optional(),
1553
1553
  schema: z.lazy(() => UpdateToolRequestBodyToolsSchema$outboundSchema),
@@ -2729,7 +2729,7 @@ export const UpdateToolResponseBodyCodeExecutionTool$inboundSchema: z.ZodType<
2729
2729
  z.ZodTypeDef,
2730
2730
  unknown
2731
2731
  > = z.object({
2732
- _id: z.string().default("tool_01KEYB6FH8S84W6S0K0Q78RYDX"),
2732
+ _id: z.string().default("tool_01KEZXQGMM0WE0X9V2M4J0SJEW"),
2733
2733
  path: z.string(),
2734
2734
  key: z.string(),
2735
2735
  display_name: z.string().optional(),
@@ -2783,7 +2783,7 @@ export const UpdateToolResponseBodyCodeExecutionTool$outboundSchema: z.ZodType<
2783
2783
  z.ZodTypeDef,
2784
2784
  UpdateToolResponseBodyCodeExecutionTool
2785
2785
  > = z.object({
2786
- id: z.string().default("tool_01KEYB6FH8S84W6S0K0Q78RYDX"),
2786
+ id: z.string().default("tool_01KEZXQGMM0WE0X9V2M4J0SJEW"),
2787
2787
  path: z.string(),
2788
2788
  key: z.string(),
2789
2789
  displayName: z.string().optional(),
@@ -2958,7 +2958,7 @@ export const UpdateToolResponseBodyTools$inboundSchema: z.ZodType<
2958
2958
  z.ZodTypeDef,
2959
2959
  unknown
2960
2960
  > = z.object({
2961
- id: z.string().default("01KEYB6FH6M9PJR0CM7X1JZZ80"),
2961
+ id: z.string().default("01KEZXQGMJ8VQKB48SB8SKNJES"),
2962
2962
  name: z.string(),
2963
2963
  description: z.string().optional(),
2964
2964
  schema: z.lazy(() => UpdateToolResponseBodyToolsSchema$inboundSchema),
@@ -2977,7 +2977,7 @@ export const UpdateToolResponseBodyTools$outboundSchema: z.ZodType<
2977
2977
  z.ZodTypeDef,
2978
2978
  UpdateToolResponseBodyTools
2979
2979
  > = z.object({
2980
- id: z.string().default("01KEYB6FH6M9PJR0CM7X1JZZ80"),
2980
+ id: z.string().default("01KEZXQGMJ8VQKB48SB8SKNJES"),
2981
2981
  name: z.string(),
2982
2982
  description: z.string().optional(),
2983
2983
  schema: z.lazy(() => UpdateToolResponseBodyToolsSchema$outboundSchema),
@@ -3078,7 +3078,7 @@ export const UpdateToolResponseBodyMCPTool$inboundSchema: z.ZodType<
3078
3078
  z.ZodTypeDef,
3079
3079
  unknown
3080
3080
  > = z.object({
3081
- _id: z.string().default("tool_01KEYB6FH5F3937BEE89E45KFA"),
3081
+ _id: z.string().default("tool_01KEZXQGMGJME5E5RCS1743AHG"),
3082
3082
  path: z.string(),
3083
3083
  key: z.string(),
3084
3084
  display_name: z.string().optional(),
@@ -3131,7 +3131,7 @@ export const UpdateToolResponseBodyMCPTool$outboundSchema: z.ZodType<
3131
3131
  z.ZodTypeDef,
3132
3132
  UpdateToolResponseBodyMCPTool
3133
3133
  > = z.object({
3134
- id: z.string().default("tool_01KEYB6FH5F3937BEE89E45KFA"),
3134
+ id: z.string().default("tool_01KEZXQGMGJME5E5RCS1743AHG"),
3135
3135
  path: z.string(),
3136
3136
  key: z.string(),
3137
3137
  displayName: z.string().optional(),
@@ -3499,7 +3499,7 @@ export const UpdateToolResponseBodyHTTPTool$inboundSchema: z.ZodType<
3499
3499
  z.ZodTypeDef,
3500
3500
  unknown
3501
3501
  > = z.object({
3502
- _id: z.string().default("tool_01KEYB6FH206WN3KACR7WYSE1H"),
3502
+ _id: z.string().default("tool_01KEZXQGMDGM3AVKFJV9J5JZSX"),
3503
3503
  path: z.string(),
3504
3504
  key: z.string(),
3505
3505
  display_name: z.string().optional(),
@@ -3552,7 +3552,7 @@ export const UpdateToolResponseBodyHTTPTool$outboundSchema: z.ZodType<
3552
3552
  z.ZodTypeDef,
3553
3553
  UpdateToolResponseBodyHTTPTool
3554
3554
  > = z.object({
3555
- id: z.string().default("tool_01KEYB6FH206WN3KACR7WYSE1H"),
3555
+ id: z.string().default("tool_01KEZXQGMDGM3AVKFJV9J5JZSX"),
3556
3556
  path: z.string(),
3557
3557
  key: z.string(),
3558
3558
  displayName: z.string().optional(),
@@ -3725,7 +3725,7 @@ export const UpdateToolResponseBodyJSONSchemaTool$inboundSchema: z.ZodType<
3725
3725
  z.ZodTypeDef,
3726
3726
  unknown
3727
3727
  > = z.object({
3728
- _id: z.string().default("tool_01KEYB6FGZWR6G4ATD1WYBNKHK"),
3728
+ _id: z.string().default("tool_01KEZXQGMB1KB3PXTGX8CYCXXF"),
3729
3729
  path: z.string(),
3730
3730
  key: z.string(),
3731
3731
  display_name: z.string().optional(),
@@ -3777,7 +3777,7 @@ export const UpdateToolResponseBodyJSONSchemaTool$outboundSchema: z.ZodType<
3777
3777
  z.ZodTypeDef,
3778
3778
  UpdateToolResponseBodyJSONSchemaTool
3779
3779
  > = z.object({
3780
- id: z.string().default("tool_01KEYB6FGZWR6G4ATD1WYBNKHK"),
3780
+ id: z.string().default("tool_01KEZXQGMB1KB3PXTGX8CYCXXF"),
3781
3781
  path: z.string(),
3782
3782
  key: z.string(),
3783
3783
  displayName: z.string().optional(),
@@ -3965,7 +3965,7 @@ export const UpdateToolResponseBodyFunctionTool$inboundSchema: z.ZodType<
3965
3965
  z.ZodTypeDef,
3966
3966
  unknown
3967
3967
  > = z.object({
3968
- _id: z.string().default("tool_01KEYB6FGX6VPS34V45PH4RH9G"),
3968
+ _id: z.string().default("tool_01KEZXQGM9YE7NJR1VMDKPTWS2"),
3969
3969
  path: z.string(),
3970
3970
  key: z.string(),
3971
3971
  display_name: z.string().optional(),
@@ -4016,7 +4016,7 @@ export const UpdateToolResponseBodyFunctionTool$outboundSchema: z.ZodType<
4016
4016
  z.ZodTypeDef,
4017
4017
  UpdateToolResponseBodyFunctionTool
4018
4018
  > = z.object({
4019
- id: z.string().default("tool_01KEYB6FGX6VPS34V45PH4RH9G"),
4019
+ id: z.string().default("tool_01KEZXQGM9YE7NJR1VMDKPTWS2"),
4020
4020
  path: z.string(),
4021
4021
  key: z.string(),
4022
4022
  displayName: z.string().optional(),
@@ -17,6 +17,8 @@ export class Contacts extends ClientSDK {
17
17
  *
18
18
  * @remarks
19
19
  * Creates a new contact with a unique external_id. If a contact with the same external_id already exists, the operation will fail. Use this endpoint to add users from your system to orq.ai for tracking their usage and engagement.
20
+ *
21
+ * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
20
22
  */
21
23
  async create(
22
24
  request?: operations.CreateContactRequestBody | undefined,
@@ -34,6 +36,8 @@ export class Contacts extends ClientSDK {
34
36
  *
35
37
  * @remarks
36
38
  * Retrieves a paginated list of contacts in your workspace. Use pagination parameters to navigate through large contact lists efficiently.
39
+ *
40
+ * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
37
41
  */
38
42
  async list(
39
43
  request?: operations.ListContactsRequest | undefined,
@@ -51,6 +55,8 @@ export class Contacts extends ClientSDK {
51
55
  *
52
56
  * @remarks
53
57
  * Retrieves detailed information about a specific contact using their contact ID or external ID from your system.
58
+ *
59
+ * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
54
60
  */
55
61
  async retrieve(
56
62
  request: operations.RetrieveContactRequest,
@@ -68,6 +74,8 @@ export class Contacts extends ClientSDK {
68
74
  *
69
75
  * @remarks
70
76
  * Updates specific fields of an existing contact. Only the fields provided in the request body will be updated.
77
+ *
78
+ * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
71
79
  */
72
80
  async update(
73
81
  request: operations.UpdateContactRequest,
@@ -85,6 +93,8 @@ export class Contacts extends ClientSDK {
85
93
  *
86
94
  * @remarks
87
95
  * Permanently deletes a contact from your workspace and cleans up associated budget configurations. This action cannot be undone.
96
+ *
97
+ * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
88
98
  */
89
99
  async delete(
90
100
  request: operations.DeleteContactRequest,
@@ -0,0 +1,99 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { identitiesCreate } from "../funcs/identitiesCreate.js";
6
+ import { identitiesDelete } from "../funcs/identitiesDelete.js";
7
+ import { identitiesList } from "../funcs/identitiesList.js";
8
+ import { identitiesRetrieve } from "../funcs/identitiesRetrieve.js";
9
+ import { identitiesUpdate } from "../funcs/identitiesUpdate.js";
10
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
11
+ import * as operations from "../models/operations/index.js";
12
+ import { unwrapAsync } from "../types/fp.js";
13
+
14
+ export class Identities extends ClientSDK {
15
+ /**
16
+ * List identities
17
+ *
18
+ * @remarks
19
+ * Retrieves a paginated list of identities in your workspace. Use pagination parameters to navigate through large identity lists efficiently.
20
+ */
21
+ async list(
22
+ request?: operations.ListIdentitiesRequest | undefined,
23
+ options?: RequestOptions,
24
+ ): Promise<operations.ListIdentitiesResponseBody> {
25
+ return unwrapAsync(identitiesList(
26
+ this,
27
+ request,
28
+ options,
29
+ ));
30
+ }
31
+
32
+ /**
33
+ * Create an identity
34
+ *
35
+ * @remarks
36
+ * Creates a new identity with a unique external_id. If an identity with the same external_id already exists, the operation will fail. Use this endpoint to add users from your system to orq.ai for tracking their usage and engagement.
37
+ */
38
+ async create(
39
+ request?: operations.CreateIdentityRequestBody | undefined,
40
+ options?: RequestOptions,
41
+ ): Promise<operations.CreateIdentityResponseBody> {
42
+ return unwrapAsync(identitiesCreate(
43
+ this,
44
+ request,
45
+ options,
46
+ ));
47
+ }
48
+
49
+ /**
50
+ * Retrieve an identity
51
+ *
52
+ * @remarks
53
+ * Retrieves detailed information about a specific identity using their identity ID or external ID from your system.
54
+ */
55
+ async retrieve(
56
+ request: operations.RetrieveIdentityRequest,
57
+ options?: RequestOptions,
58
+ ): Promise<operations.RetrieveIdentityResponseBody> {
59
+ return unwrapAsync(identitiesRetrieve(
60
+ this,
61
+ request,
62
+ options,
63
+ ));
64
+ }
65
+
66
+ /**
67
+ * Update an identity
68
+ *
69
+ * @remarks
70
+ * Updates specific fields of an existing identity. Only the fields provided in the request body will be updated.
71
+ */
72
+ async update(
73
+ request: operations.UpdateIdentityRequest,
74
+ options?: RequestOptions,
75
+ ): Promise<operations.UpdateIdentityResponseBody> {
76
+ return unwrapAsync(identitiesUpdate(
77
+ this,
78
+ request,
79
+ options,
80
+ ));
81
+ }
82
+
83
+ /**
84
+ * Delete an identity
85
+ *
86
+ * @remarks
87
+ * Permanently deletes an identity from your workspace and cleans up associated budget configurations. This action cannot be undone.
88
+ */
89
+ async delete(
90
+ request: operations.DeleteIdentityRequest,
91
+ options?: RequestOptions,
92
+ ): Promise<void> {
93
+ return unwrapAsync(identitiesDelete(
94
+ this,
95
+ request,
96
+ options,
97
+ ));
98
+ }
99
+ }
package/src/sdk/sdk.ts CHANGED
@@ -13,6 +13,7 @@ import { Evals } from "./evals.js";
13
13
  import { Evaluators } from "./evaluators.js";
14
14
  import { Feedback } from "./feedback.js";
15
15
  import { Files } from "./files.js";
16
+ import { Identities } from "./identities.js";
16
17
  import { Internal } from "./internal.js";
17
18
  import { Knowledge } from "./knowledge.js";
18
19
  import { MemoryStores } from "./memorystores.js";
@@ -43,6 +44,11 @@ export class Orq extends ClientSDK {
43
44
  return (this._evaluators ??= new Evaluators(this._options));
44
45
  }
45
46
 
47
+ private _identities?: Identities;
48
+ get identities(): Identities {
49
+ return (this._identities ??= new Identities(this._options));
50
+ }
51
+
46
52
  private _deployments?: Deployments;
47
53
  get deployments(): Deployments {
48
54
  return (this._deployments ??= new Deployments(this._options));
@@ -1,42 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import dotenv from "dotenv";
6
- dotenv.config();
7
- /**
8
- * Example usage of the @orq-ai/node SDK
9
- *
10
- * To run this example from the examples directory:
11
- * npm run build && npx tsx contactsCreate.example.ts
12
- */
13
-
14
- import { Orq } from "@orq-ai/node";
15
-
16
- const orq = new Orq({
17
- apiKey: process.env["ORQ_API_KEY"] ?? "",
18
- });
19
-
20
- async function main() {
21
- const result = await orq.contacts.create({
22
- externalId: "user_12345",
23
- displayName: "Jane Smith",
24
- email: "jane.smith@example.com",
25
- avatarUrl: "https://example.com/avatars/jane-smith.jpg",
26
- tags: [
27
- "premium",
28
- "beta-user",
29
- "enterprise",
30
- ],
31
- metadata: {
32
- "department": "Engineering",
33
- "role": "Senior Developer",
34
- "subscription_tier": "premium",
35
- "last_login": "2024-01-15T10:30:00Z",
36
- },
37
- });
38
-
39
- console.log(result);
40
- }
41
-
42
- main().catch(console.error);