@orq-ai/node 3.13.3 → 3.13.5

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/bin/mcp-server.js +216 -246
  2. package/bin/mcp-server.js.map +42 -42
  3. package/docs/sdks/agents/README.md +3 -3
  4. package/examples/package-lock.json +1 -1
  5. package/funcs/agentsRetrieveTask.js +2 -2
  6. package/funcs/agentsRetrieveTask.js.map +1 -1
  7. package/jsr.json +1 -1
  8. package/lib/config.d.ts +3 -3
  9. package/lib/config.js +3 -3
  10. package/mcp-server/mcp-server.js +1 -1
  11. package/mcp-server/server.js +1 -1
  12. package/models/operations/createbudget.js +2 -2
  13. package/models/operations/createcontact.js +2 -2
  14. package/models/operations/createdataset.js +2 -2
  15. package/models/operations/createdatasetitem.js +2 -2
  16. package/models/operations/createdatasource.js +2 -2
  17. package/models/operations/createeval.js +28 -28
  18. package/models/operations/createtool.js +14 -14
  19. package/models/operations/duplicatetool.js +10 -10
  20. package/models/operations/fileget.js +2 -2
  21. package/models/operations/filelist.js +2 -2
  22. package/models/operations/fileupload.js +2 -2
  23. package/models/operations/getagent.d.ts +5 -2
  24. package/models/operations/getagent.d.ts.map +1 -1
  25. package/models/operations/getagent.js +4 -12
  26. package/models/operations/getagent.js.map +1 -1
  27. package/models/operations/getagenttask.d.ts +2 -2
  28. package/models/operations/getagenttask.d.ts.map +1 -1
  29. package/models/operations/getagenttask.js +4 -2
  30. package/models/operations/getagenttask.js.map +1 -1
  31. package/models/operations/getalltools.js +10 -10
  32. package/models/operations/getbudget.js +2 -2
  33. package/models/operations/getevals.js +28 -28
  34. package/models/operations/listagents.d.ts +5 -2
  35. package/models/operations/listagents.d.ts.map +1 -1
  36. package/models/operations/listagents.js +4 -12
  37. package/models/operations/listagents.js.map +1 -1
  38. package/models/operations/listbudgets.js +2 -2
  39. package/models/operations/listcontacts.js +2 -2
  40. package/models/operations/listdatasetdatapoints.js +2 -2
  41. package/models/operations/listdatasets.js +2 -2
  42. package/models/operations/listdatasources.js +2 -2
  43. package/models/operations/retrievecontact.js +2 -2
  44. package/models/operations/retrievedatapoint.js +2 -2
  45. package/models/operations/retrievedataset.js +2 -2
  46. package/models/operations/retrievedatasource.js +2 -2
  47. package/models/operations/retrievetool.js +10 -10
  48. package/models/operations/runagent.d.ts +5 -2
  49. package/models/operations/runagent.d.ts.map +1 -1
  50. package/models/operations/runagent.js +4 -12
  51. package/models/operations/runagent.js.map +1 -1
  52. package/models/operations/streamrunagent.d.ts +5 -2
  53. package/models/operations/streamrunagent.d.ts.map +1 -1
  54. package/models/operations/streamrunagent.js +4 -12
  55. package/models/operations/streamrunagent.js.map +1 -1
  56. package/models/operations/updatebudget.js +2 -2
  57. package/models/operations/updatecontact.js +2 -2
  58. package/models/operations/updatedatapoint.js +2 -2
  59. package/models/operations/updatedataset.js +2 -2
  60. package/models/operations/updatedatasource.js +2 -2
  61. package/models/operations/updateeval.js +28 -28
  62. package/models/operations/updatetool.js +14 -14
  63. package/package.json +1 -1
  64. package/packages/orq-rc/README.md +102 -93
  65. package/packages/orq-rc/docs/sdks/agents/README.md +97 -22
  66. package/packages/orq-rc/docs/sdks/knowledge/README.md +228 -0
  67. package/packages/orq-rc/docs/sdks/tools/README.md +14 -16
  68. package/packages/orq-rc/examples/package-lock.json +1 -1
  69. package/packages/orq-rc/jsr.json +1 -1
  70. package/packages/orq-rc/package-lock.json +2 -2
  71. package/packages/orq-rc/package.json +1 -1
  72. package/packages/orq-rc/src/funcs/agentsListTasks.ts +183 -0
  73. package/packages/orq-rc/src/funcs/agentsRetrieve.ts +3 -3
  74. package/packages/orq-rc/src/funcs/agentsRetrieveTask.ts +2 -2
  75. package/packages/orq-rc/src/funcs/knowledgeDeleteChunks.ts +170 -0
  76. package/packages/orq-rc/src/funcs/knowledgeGetChunksCount.ts +170 -0
  77. package/packages/orq-rc/src/funcs/knowledgeListChunksPaginated.ts +171 -0
  78. package/packages/orq-rc/src/funcs/toolsDelete.ts +2 -2
  79. package/packages/orq-rc/src/funcs/toolsDuplicate.ts +3 -3
  80. package/packages/orq-rc/src/funcs/toolsRetrieve.ts +3 -3
  81. package/packages/orq-rc/src/funcs/toolsUpdate.ts +2 -2
  82. package/packages/orq-rc/src/lib/config.ts +3 -3
  83. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  84. package/packages/orq-rc/src/mcp-server/server.ts +10 -2
  85. package/packages/orq-rc/src/mcp-server/tools/agentsListTasks.ts +37 -0
  86. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieve.ts +1 -1
  87. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteChunks.ts +35 -0
  88. package/packages/orq-rc/src/mcp-server/tools/knowledgeGetChunksCount.ts +35 -0
  89. package/packages/orq-rc/src/mcp-server/tools/knowledgeListChunksPaginated.ts +35 -0
  90. package/packages/orq-rc/src/mcp-server/tools/toolsDuplicate.ts +1 -1
  91. package/packages/orq-rc/src/mcp-server/tools/toolsRetrieve.ts +1 -1
  92. package/packages/orq-rc/src/models/errors/index.ts +1 -0
  93. package/packages/orq-rc/src/models/errors/listagenttasks.ts +80 -0
  94. package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
  95. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  96. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  97. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
  98. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  99. package/packages/orq-rc/src/models/operations/createeval.ts +28 -28
  100. package/packages/orq-rc/src/models/operations/createprompt.ts +8 -0
  101. package/packages/orq-rc/src/models/operations/createtool.ts +10 -22
  102. package/packages/orq-rc/src/models/operations/deletechunks.ts +243 -0
  103. package/packages/orq-rc/src/models/operations/deletetool.ts +6 -6
  104. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +4 -0
  105. package/packages/orq-rc/src/models/operations/deployments.ts +4 -0
  106. package/packages/orq-rc/src/models/operations/duplicatetool.ts +23 -15
  107. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  108. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  109. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  110. package/packages/orq-rc/src/models/operations/getagent.ts +30 -27
  111. package/packages/orq-rc/src/models/operations/getagenttask.ts +6 -4
  112. package/packages/orq-rc/src/models/operations/getallprompts.ts +4 -0
  113. package/packages/orq-rc/src/models/operations/getalltools.ts +10 -10
  114. package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
  115. package/packages/orq-rc/src/models/operations/getchunkscount.ts +230 -0
  116. package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
  117. package/packages/orq-rc/src/models/operations/getoneprompt.ts +4 -0
  118. package/packages/orq-rc/src/models/operations/getpromptversion.ts +4 -0
  119. package/packages/orq-rc/src/models/operations/index.ts +4 -0
  120. package/packages/orq-rc/src/models/operations/listagents.ts +17 -22
  121. package/packages/orq-rc/src/models/operations/listagenttasks.ts +1099 -0
  122. package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
  123. package/packages/orq-rc/src/models/operations/listchunks.ts +21 -21
  124. package/packages/orq-rc/src/models/operations/listchunkspaginated.ts +507 -0
  125. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  126. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
  127. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  128. package/packages/orq-rc/src/models/operations/listdatasources.ts +29 -22
  129. package/packages/orq-rc/src/models/operations/listpromptversions.ts +4 -0
  130. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  131. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
  132. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  133. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  134. package/packages/orq-rc/src/models/operations/retrievetool.ts +16 -16
  135. package/packages/orq-rc/src/models/operations/runagent.ts +7 -18
  136. package/packages/orq-rc/src/models/operations/streamrunagent.ts +7 -18
  137. package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
  138. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  139. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
  140. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  141. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  142. package/packages/orq-rc/src/models/operations/updateeval.ts +28 -28
  143. package/packages/orq-rc/src/models/operations/updateprompt.ts +8 -0
  144. package/packages/orq-rc/src/models/operations/updatetool.ts +44 -28
  145. package/packages/orq-rc/src/sdk/agents.ts +25 -7
  146. package/packages/orq-rc/src/sdk/knowledge.ts +45 -0
  147. package/packages/orq-rc/src/sdk/tools.ts +2 -2
  148. package/src/funcs/agentsRetrieveTask.ts +2 -2
  149. package/src/lib/config.ts +3 -3
  150. package/src/mcp-server/mcp-server.ts +1 -1
  151. package/src/mcp-server/server.ts +1 -1
  152. package/src/models/operations/createbudget.ts +2 -2
  153. package/src/models/operations/createcontact.ts +2 -2
  154. package/src/models/operations/createdataset.ts +2 -2
  155. package/src/models/operations/createdatasetitem.ts +2 -2
  156. package/src/models/operations/createdatasource.ts +2 -2
  157. package/src/models/operations/createeval.ts +28 -28
  158. package/src/models/operations/createtool.ts +14 -14
  159. package/src/models/operations/duplicatetool.ts +10 -10
  160. package/src/models/operations/fileget.ts +2 -2
  161. package/src/models/operations/filelist.ts +2 -2
  162. package/src/models/operations/fileupload.ts +2 -2
  163. package/src/models/operations/getagent.ts +9 -14
  164. package/src/models/operations/getagenttask.ts +6 -4
  165. package/src/models/operations/getalltools.ts +10 -10
  166. package/src/models/operations/getbudget.ts +2 -2
  167. package/src/models/operations/getevals.ts +28 -28
  168. package/src/models/operations/listagents.ts +9 -14
  169. package/src/models/operations/listbudgets.ts +2 -2
  170. package/src/models/operations/listcontacts.ts +2 -2
  171. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  172. package/src/models/operations/listdatasets.ts +2 -2
  173. package/src/models/operations/listdatasources.ts +2 -2
  174. package/src/models/operations/retrievecontact.ts +2 -2
  175. package/src/models/operations/retrievedatapoint.ts +2 -2
  176. package/src/models/operations/retrievedataset.ts +2 -2
  177. package/src/models/operations/retrievedatasource.ts +2 -2
  178. package/src/models/operations/retrievetool.ts +10 -10
  179. package/src/models/operations/runagent.ts +9 -14
  180. package/src/models/operations/streamrunagent.ts +9 -14
  181. package/src/models/operations/updatebudget.ts +2 -2
  182. package/src/models/operations/updatecontact.ts +2 -2
  183. package/src/models/operations/updatedatapoint.ts +2 -2
  184. package/src/models/operations/updatedataset.ts +2 -2
  185. package/src/models/operations/updatedatasource.ts +2 -2
  186. package/src/models/operations/updateeval.ts +28 -28
  187. package/src/models/operations/updatetool.ts +14 -14
@@ -5,14 +5,91 @@
5
5
 
6
6
  ### Available Operations
7
7
 
8
+ * [retrieveTask](#retrievetask) - Retrieve a specific agent task
8
9
  * [list](#list) - List all agents
9
10
  * [retrieve](#retrieve) - Get an agent
10
- * [retrieveTask](#retrievetask) - Retrieve a specific agent task
11
+ * [listTasks](#listtasks) - List all tasks for an agent
11
12
  * [run](#run) - Run an agent
12
13
  * [streamRun](#streamrun) - Run and stream agent execution
13
14
  * [listActions](#listactions) - List all actions
14
15
  * [retrieveAction](#retrieveaction) - Retrieve an action executed by an agent task.
15
16
 
17
+ ## retrieveTask
18
+
19
+ Retrieves detailed information about a specific task for a given agent, including execution status and results.
20
+
21
+ ### Example Usage
22
+
23
+ <!-- UsageSnippet language="typescript" operationID="GetAgentTask" method="get" path="/v2/agents/{agent_key}/tasks/{task_id}" -->
24
+ ```typescript
25
+ import { Orq } from "@orq-ai/node";
26
+
27
+ const orq = new Orq({
28
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
29
+ });
30
+
31
+ async function run() {
32
+ const result = await orq.agents.retrieveTask({
33
+ agentKey: "<value>",
34
+ taskId: "<id>",
35
+ });
36
+
37
+ console.log(result);
38
+ }
39
+
40
+ run();
41
+ ```
42
+
43
+ ### Standalone function
44
+
45
+ The standalone function version of this method:
46
+
47
+ ```typescript
48
+ import { OrqCore } from "@orq-ai/node/core.js";
49
+ import { agentsRetrieveTask } from "@orq-ai/node/funcs/agentsRetrieveTask.js";
50
+
51
+ // Use `OrqCore` for best tree-shaking performance.
52
+ // You can create one instance of it to use across an application.
53
+ const orq = new OrqCore({
54
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
55
+ });
56
+
57
+ async function run() {
58
+ const res = await agentsRetrieveTask(orq, {
59
+ agentKey: "<value>",
60
+ taskId: "<id>",
61
+ });
62
+ if (res.ok) {
63
+ const { value: result } = res;
64
+ console.log(result);
65
+ } else {
66
+ console.log("agentsRetrieveTask failed:", res.error);
67
+ }
68
+ }
69
+
70
+ run();
71
+ ```
72
+
73
+ ### Parameters
74
+
75
+ | Parameter | Type | Required | Description |
76
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
77
+ | `request` | [operations.GetAgentTaskRequest](../../models/operations/getagenttaskrequest.md) | :heavy_check_mark: | The request object to use for the request. |
78
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
79
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
80
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
81
+
82
+ ### Response
83
+
84
+ **Promise\<[operations.GetAgentTaskResponseBody](../../models/operations/getagenttaskresponsebody.md)\>**
85
+
86
+ ### Errors
87
+
88
+ | Error Type | Status Code | Content Type |
89
+ | ------------------------------- | ------------------------------- | ------------------------------- |
90
+ | errors.GetAgentTaskResponseBody | 404 | application/json |
91
+ | errors.APIError | 4XX, 5XX | \*/\* |
92
+
16
93
  ## list
17
94
 
18
95
  Retrieves a paginated list of all agents in your workspace. Each agent includes its configuration, primary model, and optional fallback model settings.
@@ -84,11 +161,11 @@ run();
84
161
 
85
162
  ## retrieve
86
163
 
87
- Retrieves a single agent by ID, including its full configuration with primary and fallback model settings.
164
+ Retrieves a single agent by its unique key, including its full configuration with primary and fallback model settings.
88
165
 
89
166
  ### Example Usage
90
167
 
91
- <!-- UsageSnippet language="typescript" operationID="GetAgent" method="get" path="/v2/agents/{id}" -->
168
+ <!-- UsageSnippet language="typescript" operationID="GetAgent" method="get" path="/v2/agents/{agent_key}" -->
92
169
  ```typescript
93
170
  import { Orq } from "@orq-ai/node";
94
171
 
@@ -98,7 +175,7 @@ const orq = new Orq({
98
175
 
99
176
  async function run() {
100
177
  const result = await orq.agents.retrieve({
101
- id: "<id>",
178
+ agentKey: "<value>",
102
179
  });
103
180
 
104
181
  console.log(result);
@@ -123,7 +200,7 @@ const orq = new OrqCore({
123
200
 
124
201
  async function run() {
125
202
  const res = await agentsRetrieve(orq, {
126
- id: "<id>",
203
+ agentKey: "<value>",
127
204
  });
128
205
  if (res.ok) {
129
206
  const { value: result } = res;
@@ -156,13 +233,13 @@ run();
156
233
  | errors.GetAgentResponseBody | 404 | application/json |
157
234
  | errors.APIError | 4XX, 5XX | \*/\* |
158
235
 
159
- ## retrieveTask
236
+ ## listTasks
160
237
 
161
- Retrieves detailed information about a specific task for a given agent, including execution status and results.
238
+ Retrieves a paginated list of all tasks associated with a specific agent, optionally filtered by status.
162
239
 
163
240
  ### Example Usage
164
241
 
165
- <!-- UsageSnippet language="typescript" operationID="GetAgentTask" method="get" path="/v2/agents/{id}/tasks/{task_id}" -->
242
+ <!-- UsageSnippet language="typescript" operationID="ListAgentTasks" method="get" path="/v2/agents/{agent_key}/tasks" -->
166
243
  ```typescript
167
244
  import { Orq } from "@orq-ai/node";
168
245
 
@@ -171,9 +248,8 @@ const orq = new Orq({
171
248
  });
172
249
 
173
250
  async function run() {
174
- const result = await orq.agents.retrieveTask({
175
- id: "<id>",
176
- taskId: "<id>",
251
+ const result = await orq.agents.listTasks({
252
+ agentKey: "<value>",
177
253
  });
178
254
 
179
255
  console.log(result);
@@ -188,7 +264,7 @@ The standalone function version of this method:
188
264
 
189
265
  ```typescript
190
266
  import { OrqCore } from "@orq-ai/node/core.js";
191
- import { agentsRetrieveTask } from "@orq-ai/node/funcs/agentsRetrieveTask.js";
267
+ import { agentsListTasks } from "@orq-ai/node/funcs/agentsListTasks.js";
192
268
 
193
269
  // Use `OrqCore` for best tree-shaking performance.
194
270
  // You can create one instance of it to use across an application.
@@ -197,15 +273,14 @@ const orq = new OrqCore({
197
273
  });
198
274
 
199
275
  async function run() {
200
- const res = await agentsRetrieveTask(orq, {
201
- id: "<id>",
202
- taskId: "<id>",
276
+ const res = await agentsListTasks(orq, {
277
+ agentKey: "<value>",
203
278
  });
204
279
  if (res.ok) {
205
280
  const { value: result } = res;
206
281
  console.log(result);
207
282
  } else {
208
- console.log("agentsRetrieveTask failed:", res.error);
283
+ console.log("agentsListTasks failed:", res.error);
209
284
  }
210
285
  }
211
286
 
@@ -216,21 +291,21 @@ run();
216
291
 
217
292
  | Parameter | Type | Required | Description |
218
293
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
219
- | `request` | [operations.GetAgentTaskRequest](../../models/operations/getagenttaskrequest.md) | :heavy_check_mark: | The request object to use for the request. |
294
+ | `request` | [operations.ListAgentTasksRequest](../../models/operations/listagenttasksrequest.md) | :heavy_check_mark: | The request object to use for the request. |
220
295
  | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
221
296
  | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
222
297
  | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
223
298
 
224
299
  ### Response
225
300
 
226
- **Promise\<[operations.GetAgentTaskResponseBody](../../models/operations/getagenttaskresponsebody.md)\>**
301
+ **Promise\<[operations.ListAgentTasksResponseBody](../../models/operations/listagenttasksresponsebody.md)\>**
227
302
 
228
303
  ### Errors
229
304
 
230
- | Error Type | Status Code | Content Type |
231
- | ------------------------------- | ------------------------------- | ------------------------------- |
232
- | errors.GetAgentTaskResponseBody | 404 | application/json |
233
- | errors.APIError | 4XX, 5XX | \*/\* |
305
+ | Error Type | Status Code | Content Type |
306
+ | --------------------------------- | --------------------------------- | --------------------------------- |
307
+ | errors.ListAgentTasksResponseBody | 404 | application/json |
308
+ | errors.APIError | 4XX, 5XX | \*/\* |
234
309
 
235
310
  ## run
236
311
 
@@ -18,6 +18,9 @@
18
18
  * [updateDatasource](#updatedatasource) - Update a datasource
19
19
  * [createChunks](#createchunks) - Create chunks for a datasource
20
20
  * [listChunks](#listchunks) - List all chunks for a datasource
21
+ * [deleteChunks](#deletechunks) - Delete multiple chunks
22
+ * [listChunksPaginated](#listchunkspaginated) - List chunks with offset-based pagination
23
+ * [getChunksCount](#getchunkscount) - Get chunks total count
21
24
  * [updateChunk](#updatechunk) - Update a chunk
22
25
  * [deleteChunk](#deletechunk) - Delete a chunk
23
26
  * [retrieveChunk](#retrievechunk) - Retrieve a chunk
@@ -1023,6 +1026,231 @@ run();
1023
1026
  | --------------- | --------------- | --------------- |
1024
1027
  | errors.APIError | 4XX, 5XX | \*/\* |
1025
1028
 
1029
+ ## deleteChunks
1030
+
1031
+ Delete multiple chunks
1032
+
1033
+ ### Example Usage
1034
+
1035
+ <!-- UsageSnippet language="typescript" operationID="DeleteChunks" method="delete" path="/v2/knowledge/{knowledge_id}/datasources/{datasource_id}/chunks" -->
1036
+ ```typescript
1037
+ import { Orq } from "@orq-ai/node";
1038
+
1039
+ const orq = new Orq({
1040
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
1041
+ });
1042
+
1043
+ async function run() {
1044
+ const result = await orq.knowledge.deleteChunks({
1045
+ knowledgeId: "<id>",
1046
+ datasourceId: "<id>",
1047
+ });
1048
+
1049
+ console.log(result);
1050
+ }
1051
+
1052
+ run();
1053
+ ```
1054
+
1055
+ ### Standalone function
1056
+
1057
+ The standalone function version of this method:
1058
+
1059
+ ```typescript
1060
+ import { OrqCore } from "@orq-ai/node/core.js";
1061
+ import { knowledgeDeleteChunks } from "@orq-ai/node/funcs/knowledgeDeleteChunks.js";
1062
+
1063
+ // Use `OrqCore` for best tree-shaking performance.
1064
+ // You can create one instance of it to use across an application.
1065
+ const orq = new OrqCore({
1066
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
1067
+ });
1068
+
1069
+ async function run() {
1070
+ const res = await knowledgeDeleteChunks(orq, {
1071
+ knowledgeId: "<id>",
1072
+ datasourceId: "<id>",
1073
+ });
1074
+ if (res.ok) {
1075
+ const { value: result } = res;
1076
+ console.log(result);
1077
+ } else {
1078
+ console.log("knowledgeDeleteChunks failed:", res.error);
1079
+ }
1080
+ }
1081
+
1082
+ run();
1083
+ ```
1084
+
1085
+ ### Parameters
1086
+
1087
+ | Parameter | Type | Required | Description |
1088
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1089
+ | `request` | [operations.DeleteChunksRequest](../../models/operations/deletechunksrequest.md) | :heavy_check_mark: | The request object to use for the request. |
1090
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
1091
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
1092
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
1093
+
1094
+ ### Response
1095
+
1096
+ **Promise\<[operations.DeleteChunksResponseBody](../../models/operations/deletechunksresponsebody.md)\>**
1097
+
1098
+ ### Errors
1099
+
1100
+ | Error Type | Status Code | Content Type |
1101
+ | --------------- | --------------- | --------------- |
1102
+ | errors.APIError | 4XX, 5XX | \*/\* |
1103
+
1104
+ ## listChunksPaginated
1105
+
1106
+ List chunks with offset-based pagination
1107
+
1108
+ ### Example Usage
1109
+
1110
+ <!-- UsageSnippet language="typescript" operationID="ListChunksPaginated" method="post" path="/v2/knowledge/{knowledge_id}/datasources/{datasource_id}/chunks/list" -->
1111
+ ```typescript
1112
+ import { Orq } from "@orq-ai/node";
1113
+
1114
+ const orq = new Orq({
1115
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
1116
+ });
1117
+
1118
+ async function run() {
1119
+ const result = await orq.knowledge.listChunksPaginated({
1120
+ knowledgeId: "<id>",
1121
+ datasourceId: "<id>",
1122
+ });
1123
+
1124
+ console.log(result);
1125
+ }
1126
+
1127
+ run();
1128
+ ```
1129
+
1130
+ ### Standalone function
1131
+
1132
+ The standalone function version of this method:
1133
+
1134
+ ```typescript
1135
+ import { OrqCore } from "@orq-ai/node/core.js";
1136
+ import { knowledgeListChunksPaginated } from "@orq-ai/node/funcs/knowledgeListChunksPaginated.js";
1137
+
1138
+ // Use `OrqCore` for best tree-shaking performance.
1139
+ // You can create one instance of it to use across an application.
1140
+ const orq = new OrqCore({
1141
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
1142
+ });
1143
+
1144
+ async function run() {
1145
+ const res = await knowledgeListChunksPaginated(orq, {
1146
+ knowledgeId: "<id>",
1147
+ datasourceId: "<id>",
1148
+ });
1149
+ if (res.ok) {
1150
+ const { value: result } = res;
1151
+ console.log(result);
1152
+ } else {
1153
+ console.log("knowledgeListChunksPaginated failed:", res.error);
1154
+ }
1155
+ }
1156
+
1157
+ run();
1158
+ ```
1159
+
1160
+ ### Parameters
1161
+
1162
+ | Parameter | Type | Required | Description |
1163
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1164
+ | `request` | [operations.ListChunksPaginatedRequest](../../models/operations/listchunkspaginatedrequest.md) | :heavy_check_mark: | The request object to use for the request. |
1165
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
1166
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
1167
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
1168
+
1169
+ ### Response
1170
+
1171
+ **Promise\<[operations.ListChunksPaginatedResponseBody](../../models/operations/listchunkspaginatedresponsebody.md)\>**
1172
+
1173
+ ### Errors
1174
+
1175
+ | Error Type | Status Code | Content Type |
1176
+ | --------------- | --------------- | --------------- |
1177
+ | errors.APIError | 4XX, 5XX | \*/\* |
1178
+
1179
+ ## getChunksCount
1180
+
1181
+ Get chunks total count
1182
+
1183
+ ### Example Usage
1184
+
1185
+ <!-- UsageSnippet language="typescript" operationID="GetChunksCount" method="post" path="/v2/knowledge/{knowledge_id}/datasources/{datasource_id}/chunks/count" -->
1186
+ ```typescript
1187
+ import { Orq } from "@orq-ai/node";
1188
+
1189
+ const orq = new Orq({
1190
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
1191
+ });
1192
+
1193
+ async function run() {
1194
+ const result = await orq.knowledge.getChunksCount({
1195
+ knowledgeId: "<id>",
1196
+ datasourceId: "<id>",
1197
+ });
1198
+
1199
+ console.log(result);
1200
+ }
1201
+
1202
+ run();
1203
+ ```
1204
+
1205
+ ### Standalone function
1206
+
1207
+ The standalone function version of this method:
1208
+
1209
+ ```typescript
1210
+ import { OrqCore } from "@orq-ai/node/core.js";
1211
+ import { knowledgeGetChunksCount } from "@orq-ai/node/funcs/knowledgeGetChunksCount.js";
1212
+
1213
+ // Use `OrqCore` for best tree-shaking performance.
1214
+ // You can create one instance of it to use across an application.
1215
+ const orq = new OrqCore({
1216
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
1217
+ });
1218
+
1219
+ async function run() {
1220
+ const res = await knowledgeGetChunksCount(orq, {
1221
+ knowledgeId: "<id>",
1222
+ datasourceId: "<id>",
1223
+ });
1224
+ if (res.ok) {
1225
+ const { value: result } = res;
1226
+ console.log(result);
1227
+ } else {
1228
+ console.log("knowledgeGetChunksCount failed:", res.error);
1229
+ }
1230
+ }
1231
+
1232
+ run();
1233
+ ```
1234
+
1235
+ ### Parameters
1236
+
1237
+ | Parameter | Type | Required | Description |
1238
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1239
+ | `request` | [operations.GetChunksCountRequest](../../models/operations/getchunkscountrequest.md) | :heavy_check_mark: | The request object to use for the request. |
1240
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
1241
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
1242
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
1243
+
1244
+ ### Response
1245
+
1246
+ **Promise\<[operations.GetChunksCountResponseBody](../../models/operations/getchunkscountresponsebody.md)\>**
1247
+
1248
+ ### Errors
1249
+
1250
+ | Error Type | Status Code | Content Type |
1251
+ | --------------- | --------------- | --------------- |
1252
+ | errors.APIError | 4XX, 5XX | \*/\* |
1253
+
1026
1254
  ## updateChunk
1027
1255
 
1028
1256
  Update a chunk
@@ -98,7 +98,6 @@ const orq = new Orq({
98
98
 
99
99
  async function run() {
100
100
  const result = await orq.tools.create({
101
- id: "01K5ZT3CYBDREF06WS7W7BX3Y2",
102
101
  path: "Default",
103
102
  key: "<key>",
104
103
  displayName: "Ellie78",
@@ -137,7 +136,6 @@ const orq = new OrqCore({
137
136
 
138
137
  async function run() {
139
138
  const res = await toolsCreate(orq, {
140
- id: "01K5ZT3CYBDREF06WS7W7BX3Y2",
141
139
  path: "Default",
142
140
  key: "<key>",
143
141
  displayName: "Ellie78",
@@ -189,7 +187,7 @@ Updates a tool in the workspace.
189
187
 
190
188
  ### Example Usage
191
189
 
192
- <!-- UsageSnippet language="typescript" operationID="UpdateTool" method="patch" path="/v2/tools/{tool_key}" -->
190
+ <!-- UsageSnippet language="typescript" operationID="UpdateTool" method="patch" path="/v2/tools/{tool_id}" -->
193
191
  ```typescript
194
192
  import { Orq } from "@orq-ai/node";
195
193
 
@@ -199,7 +197,7 @@ const orq = new Orq({
199
197
 
200
198
  async function run() {
201
199
  const result = await orq.tools.update({
202
- toolKey: "<value>",
200
+ toolId: "<id>",
203
201
  requestBody: {
204
202
  path: "Default",
205
203
  status: "live",
@@ -229,7 +227,7 @@ const orq = new OrqCore({
229
227
 
230
228
  async function run() {
231
229
  const res = await toolsUpdate(orq, {
232
- toolKey: "<value>",
230
+ toolId: "<id>",
233
231
  requestBody: {
234
232
  path: "Default",
235
233
  status: "live",
@@ -273,7 +271,7 @@ Deletes a tool by key.
273
271
 
274
272
  ### Example Usage
275
273
 
276
- <!-- UsageSnippet language="typescript" operationID="DeleteTool" method="delete" path="/v2/tools/{tool_key}" -->
274
+ <!-- UsageSnippet language="typescript" operationID="DeleteTool" method="delete" path="/v2/tools/{tool_id}" -->
277
275
  ```typescript
278
276
  import { Orq } from "@orq-ai/node";
279
277
 
@@ -283,7 +281,7 @@ const orq = new Orq({
283
281
 
284
282
  async function run() {
285
283
  await orq.tools.delete({
286
- toolKey: "<value>",
284
+ toolId: "<id>",
287
285
  });
288
286
 
289
287
 
@@ -308,7 +306,7 @@ const orq = new OrqCore({
308
306
 
309
307
  async function run() {
310
308
  const res = await toolsDelete(orq, {
311
- toolKey: "<value>",
309
+ toolId: "<id>",
312
310
  });
313
311
  if (res.ok) {
314
312
  const { value: result } = res;
@@ -342,11 +340,11 @@ run();
342
340
 
343
341
  ## retrieve
344
342
 
345
- Retrieves a tool by key.
343
+ Retrieves a tool by id.
346
344
 
347
345
  ### Example Usage
348
346
 
349
- <!-- UsageSnippet language="typescript" operationID="RetrieveTool" method="get" path="/v2/tools/{tool_key}" -->
347
+ <!-- UsageSnippet language="typescript" operationID="RetrieveTool" method="get" path="/v2/tools/{tool_id}" -->
350
348
  ```typescript
351
349
  import { Orq } from "@orq-ai/node";
352
350
 
@@ -356,7 +354,7 @@ const orq = new Orq({
356
354
 
357
355
  async function run() {
358
356
  const result = await orq.tools.retrieve({
359
- toolKey: "<value>",
357
+ toolId: "<id>",
360
358
  });
361
359
 
362
360
  console.log(result);
@@ -381,7 +379,7 @@ const orq = new OrqCore({
381
379
 
382
380
  async function run() {
383
381
  const res = await toolsRetrieve(orq, {
384
- toolKey: "<value>",
382
+ toolId: "<id>",
385
383
  });
386
384
  if (res.ok) {
387
385
  const { value: result } = res;
@@ -415,11 +413,11 @@ run();
415
413
 
416
414
  ## duplicate
417
415
 
418
- Creates a copy of an existing tool with a new key and ID.
416
+ Creates a copy of an existing tool with a new id and ID.
419
417
 
420
418
  ### Example Usage
421
419
 
422
- <!-- UsageSnippet language="typescript" operationID="DuplicateTool" method="post" path="/v2/tools/{key}/duplicate" -->
420
+ <!-- UsageSnippet language="typescript" operationID="DuplicateTool" method="post" path="/v2/tools/{tool_id}/duplicate" -->
423
421
  ```typescript
424
422
  import { Orq } from "@orq-ai/node";
425
423
 
@@ -429,7 +427,7 @@ const orq = new Orq({
429
427
 
430
428
  async function run() {
431
429
  const result = await orq.tools.duplicate({
432
- key: "<key>",
430
+ toolId: "<id>",
433
431
  });
434
432
 
435
433
  console.log(result);
@@ -454,7 +452,7 @@ const orq = new OrqCore({
454
452
 
455
453
  async function run() {
456
454
  const res = await toolsDuplicate(orq, {
457
- key: "<key>",
455
+ toolId: "<id>",
458
456
  });
459
457
  if (res.ok) {
460
458
  const { value: result } = res;
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "..": {
20
20
  "name": "@orq-ai/node",
21
- "version": "3.14.0-rc.1",
21
+ "version": "3.14.0-rc.7",
22
22
  "dependencies": {
23
23
  "zod": "^3.20.0"
24
24
  },
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@orq-ai/node",
5
- "version": "3.14.0-rc.1",
5
+ "version": "3.14.0-rc.7",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@orq-ai/node",
3
- "version": "3.14.0-rc.1",
3
+ "version": "3.14.0-rc.7",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@orq-ai/node",
9
- "version": "3.14.0-rc.1",
9
+ "version": "3.14.0-rc.7",
10
10
  "dependencies": {
11
11
  "zod": "^3.20.0"
12
12
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orq-ai/node",
3
- "version": "3.14.0-rc.1",
3
+ "version": "3.14.0-rc.7",
4
4
  "author": "Orq",
5
5
  "bin": {
6
6
  "mcp": "bin/mcp-server.js"