@orq-ai/node 3.2.8 → 3.3.0-rc.1

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 (215) hide show
  1. package/bin/mcp-server.js +32 -35
  2. package/bin/mcp-server.js.map +20 -20
  3. package/jsr.json +1 -1
  4. package/lib/config.d.ts +2 -2
  5. package/lib/config.js +2 -2
  6. package/lib/config.js.map +1 -1
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/mcp-server.js.map +1 -1
  9. package/mcp-server/server.js +1 -1
  10. package/mcp-server/server.js.map +1 -1
  11. package/models/operations/bulkcreatedatapoints.js +2 -2
  12. package/models/operations/createcontact.js +2 -2
  13. package/models/operations/createdataset.js +2 -2
  14. package/models/operations/createdatasetitem.js +2 -2
  15. package/models/operations/fileget.js +2 -2
  16. package/models/operations/filelist.js +2 -2
  17. package/models/operations/fileupload.js +2 -2
  18. package/models/operations/listdatasetdatapoints.js +2 -2
  19. package/models/operations/listdatasets.js +2 -2
  20. package/models/operations/retrievedatapoint.js +2 -2
  21. package/models/operations/retrievedataset.js +2 -2
  22. package/models/operations/updatedatapoint.js +2 -2
  23. package/models/operations/updatedataset.js +2 -2
  24. package/package.json +3 -2
  25. package/src/lib/config.ts +2 -2
  26. package/src/mcp-server/mcp-server.ts +1 -1
  27. package/src/mcp-server/server.ts +1 -1
  28. package/src/models/operations/bulkcreatedatapoints.ts +2 -2
  29. package/src/models/operations/createcontact.ts +2 -2
  30. package/src/models/operations/createdataset.ts +2 -2
  31. package/src/models/operations/createdatasetitem.ts +2 -2
  32. package/src/models/operations/fileget.ts +2 -2
  33. package/src/models/operations/filelist.ts +2 -2
  34. package/src/models/operations/fileupload.ts +2 -2
  35. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  36. package/src/models/operations/listdatasets.ts +2 -2
  37. package/src/models/operations/retrievedatapoint.ts +2 -2
  38. package/src/models/operations/retrievedataset.ts +2 -2
  39. package/src/models/operations/updatedatapoint.ts +2 -2
  40. package/src/models/operations/updatedataset.ts +2 -2
  41. package/packages/orq-rc/FUNCTIONS.md +0 -106
  42. package/packages/orq-rc/README.md +0 -660
  43. package/packages/orq-rc/RUNTIMES.md +0 -48
  44. package/packages/orq-rc/docs/sdks/contacts/README.md +0 -84
  45. package/packages/orq-rc/docs/sdks/datasets/README.md +0 -934
  46. package/packages/orq-rc/docs/sdks/deployments/README.md +0 -316
  47. package/packages/orq-rc/docs/sdks/feedback/README.md +0 -92
  48. package/packages/orq-rc/docs/sdks/files/README.md +0 -305
  49. package/packages/orq-rc/docs/sdks/metrics/README.md +0 -86
  50. package/packages/orq-rc/docs/sdks/orq/README.md +0 -10
  51. package/packages/orq-rc/docs/sdks/prompts/README.md +0 -608
  52. package/packages/orq-rc/docs/sdks/remoteconfigs/README.md +0 -80
  53. package/packages/orq-rc/jsr.json +0 -28
  54. package/packages/orq-rc/package-lock.json +0 -3217
  55. package/packages/orq-rc/package.json +0 -45
  56. package/packages/orq-rc/src/core.ts +0 -13
  57. package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -154
  58. package/packages/orq-rc/src/funcs/datasetsClear.ts +0 -161
  59. package/packages/orq-rc/src/funcs/datasetsCreate.ts +0 -159
  60. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +0 -161
  61. package/packages/orq-rc/src/funcs/datasetsCreateDatapoints.ts +0 -165
  62. package/packages/orq-rc/src/funcs/datasetsDelete.ts +0 -161
  63. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +0 -176
  64. package/packages/orq-rc/src/funcs/datasetsList.ts +0 -162
  65. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +0 -169
  66. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +0 -169
  67. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +0 -175
  68. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +0 -170
  69. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +0 -173
  70. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -162
  71. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -170
  72. package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -171
  73. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -162
  74. package/packages/orq-rc/src/funcs/deploymentsStream.ts +0 -178
  75. package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -154
  76. package/packages/orq-rc/src/funcs/filesCreate.ts +0 -177
  77. package/packages/orq-rc/src/funcs/filesDelete.ts +0 -158
  78. package/packages/orq-rc/src/funcs/filesGet.ts +0 -160
  79. package/packages/orq-rc/src/funcs/filesList.ts +0 -162
  80. package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -154
  81. package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -158
  82. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -175
  83. package/packages/orq-rc/src/funcs/promptsList.ts +0 -162
  84. package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -168
  85. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -160
  86. package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -167
  87. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +0 -155
  88. package/packages/orq-rc/src/hooks/global.ts +0 -44
  89. package/packages/orq-rc/src/hooks/hooks.ts +0 -132
  90. package/packages/orq-rc/src/hooks/index.ts +0 -6
  91. package/packages/orq-rc/src/hooks/registration.ts +0 -15
  92. package/packages/orq-rc/src/hooks/types.ts +0 -110
  93. package/packages/orq-rc/src/index.ts +0 -7
  94. package/packages/orq-rc/src/lib/base64.ts +0 -37
  95. package/packages/orq-rc/src/lib/config.ts +0 -70
  96. package/packages/orq-rc/src/lib/dlv.ts +0 -53
  97. package/packages/orq-rc/src/lib/encodings.ts +0 -483
  98. package/packages/orq-rc/src/lib/env.ts +0 -73
  99. package/packages/orq-rc/src/lib/event-streams.ts +0 -264
  100. package/packages/orq-rc/src/lib/files.ts +0 -40
  101. package/packages/orq-rc/src/lib/http.ts +0 -323
  102. package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
  103. package/packages/orq-rc/src/lib/logger.ts +0 -9
  104. package/packages/orq-rc/src/lib/matchers.ts +0 -325
  105. package/packages/orq-rc/src/lib/primitives.ts +0 -150
  106. package/packages/orq-rc/src/lib/retries.ts +0 -218
  107. package/packages/orq-rc/src/lib/schemas.ts +0 -91
  108. package/packages/orq-rc/src/lib/sdks.ts +0 -395
  109. package/packages/orq-rc/src/lib/security.ts +0 -261
  110. package/packages/orq-rc/src/lib/url.ts +0 -33
  111. package/packages/orq-rc/src/mcp-server/cli/start/command.ts +0 -125
  112. package/packages/orq-rc/src/mcp-server/cli/start/impl.ts +0 -140
  113. package/packages/orq-rc/src/mcp-server/cli.ts +0 -13
  114. package/packages/orq-rc/src/mcp-server/console-logger.ts +0 -71
  115. package/packages/orq-rc/src/mcp-server/extensions.ts +0 -17
  116. package/packages/orq-rc/src/mcp-server/mcp-server.ts +0 -26
  117. package/packages/orq-rc/src/mcp-server/prompts.ts +0 -110
  118. package/packages/orq-rc/src/mcp-server/resources.ts +0 -158
  119. package/packages/orq-rc/src/mcp-server/scopes.ts +0 -7
  120. package/packages/orq-rc/src/mcp-server/server.ts +0 -125
  121. package/packages/orq-rc/src/mcp-server/shared.ts +0 -75
  122. package/packages/orq-rc/src/mcp-server/tools/contactsCreate.ts +0 -37
  123. package/packages/orq-rc/src/mcp-server/tools/datasetsClear.ts +0 -35
  124. package/packages/orq-rc/src/mcp-server/tools/datasetsCreate.ts +0 -37
  125. package/packages/orq-rc/src/mcp-server/tools/datasetsCreateDatapoint.ts +0 -37
  126. package/packages/orq-rc/src/mcp-server/tools/datasetsCreateDatapoints.ts +0 -37
  127. package/packages/orq-rc/src/mcp-server/tools/datasetsDelete.ts +0 -35
  128. package/packages/orq-rc/src/mcp-server/tools/datasetsDeleteDatapoint.ts +0 -35
  129. package/packages/orq-rc/src/mcp-server/tools/datasetsList.ts +0 -37
  130. package/packages/orq-rc/src/mcp-server/tools/datasetsListDatapoints.ts +0 -37
  131. package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieve.ts +0 -37
  132. package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieveDatapoint.ts +0 -37
  133. package/packages/orq-rc/src/mcp-server/tools/datasetsUpdate.ts +0 -37
  134. package/packages/orq-rc/src/mcp-server/tools/datasetsUpdateDatapoint.ts +0 -35
  135. package/packages/orq-rc/src/mcp-server/tools/deploymentsGetConfig.ts +0 -37
  136. package/packages/orq-rc/src/mcp-server/tools/deploymentsInvoke.ts +0 -37
  137. package/packages/orq-rc/src/mcp-server/tools/deploymentsList.ts +0 -37
  138. package/packages/orq-rc/src/mcp-server/tools/deploymentsMetricsCreate.ts +0 -37
  139. package/packages/orq-rc/src/mcp-server/tools/deploymentsStream.ts +0 -37
  140. package/packages/orq-rc/src/mcp-server/tools/feedbackCreate.ts +0 -37
  141. package/packages/orq-rc/src/mcp-server/tools/filesCreate.ts +0 -37
  142. package/packages/orq-rc/src/mcp-server/tools/filesDelete.ts +0 -33
  143. package/packages/orq-rc/src/mcp-server/tools/filesGet.ts +0 -37
  144. package/packages/orq-rc/src/mcp-server/tools/filesList.ts +0 -37
  145. package/packages/orq-rc/src/mcp-server/tools/promptsCreate.ts +0 -35
  146. package/packages/orq-rc/src/mcp-server/tools/promptsDelete.ts +0 -33
  147. package/packages/orq-rc/src/mcp-server/tools/promptsGetVersion.ts +0 -37
  148. package/packages/orq-rc/src/mcp-server/tools/promptsList.ts +0 -37
  149. package/packages/orq-rc/src/mcp-server/tools/promptsListVersions.ts +0 -37
  150. package/packages/orq-rc/src/mcp-server/tools/promptsRetrieve.ts +0 -37
  151. package/packages/orq-rc/src/mcp-server/tools/promptsUpdate.ts +0 -35
  152. package/packages/orq-rc/src/mcp-server/tools/remoteconfigsRetrieve.ts +0 -36
  153. package/packages/orq-rc/src/mcp-server/tools.ts +0 -126
  154. package/packages/orq-rc/src/models/components/deployments.ts +0 -4164
  155. package/packages/orq-rc/src/models/components/index.ts +0 -6
  156. package/packages/orq-rc/src/models/components/security.ts +0 -71
  157. package/packages/orq-rc/src/models/errors/apierror.ts +0 -27
  158. package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -71
  159. package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -82
  160. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
  161. package/packages/orq-rc/src/models/errors/index.ts +0 -10
  162. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -97
  163. package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -71
  164. package/packages/orq-rc/src/models/operations/bulkcreatedatapoints.ts +0 -1816
  165. package/packages/orq-rc/src/models/operations/cleardataset.ts +0 -75
  166. package/packages/orq-rc/src/models/operations/createcontact.ts +0 -256
  167. package/packages/orq-rc/src/models/operations/createdataset.ts +0 -296
  168. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +0 -1740
  169. package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -286
  170. package/packages/orq-rc/src/models/operations/createprompt.ts +0 -3735
  171. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +0 -81
  172. package/packages/orq-rc/src/models/operations/deletedataset.ts +0 -75
  173. package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -69
  174. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -4936
  175. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -6090
  176. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -1199
  177. package/packages/orq-rc/src/models/operations/deployments.ts +0 -2194
  178. package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -5960
  179. package/packages/orq-rc/src/models/operations/filedelete.ts +0 -78
  180. package/packages/orq-rc/src/models/operations/fileget.ts +0 -223
  181. package/packages/orq-rc/src/models/operations/filelist.ts +0 -377
  182. package/packages/orq-rc/src/models/operations/fileupload.ts +0 -324
  183. package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -2165
  184. package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -1989
  185. package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -1987
  186. package/packages/orq-rc/src/models/operations/index.ts +0 -35
  187. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +0 -1115
  188. package/packages/orq-rc/src/models/operations/listdatasets.ts +0 -448
  189. package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -2163
  190. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -190
  191. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +0 -924
  192. package/packages/orq-rc/src/models/operations/retrievedataset.ts +0 -288
  193. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +0 -1729
  194. package/packages/orq-rc/src/models/operations/updatedataset.ts +0 -374
  195. package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -3914
  196. package/packages/orq-rc/src/sdk/contacts.ts +0 -27
  197. package/packages/orq-rc/src/sdk/datasets.ts +0 -222
  198. package/packages/orq-rc/src/sdk/deployments.ts +0 -89
  199. package/packages/orq-rc/src/sdk/feedback.ts +0 -27
  200. package/packages/orq-rc/src/sdk/files.ts +0 -78
  201. package/packages/orq-rc/src/sdk/index.ts +0 -5
  202. package/packages/orq-rc/src/sdk/metrics.ts +0 -27
  203. package/packages/orq-rc/src/sdk/prompts.ts +0 -126
  204. package/packages/orq-rc/src/sdk/remoteconfigs.ts +0 -24
  205. package/packages/orq-rc/src/sdk/sdk.ts +0 -49
  206. package/packages/orq-rc/src/types/async.ts +0 -68
  207. package/packages/orq-rc/src/types/blobs.ts +0 -31
  208. package/packages/orq-rc/src/types/constdatetime.ts +0 -15
  209. package/packages/orq-rc/src/types/enums.ts +0 -16
  210. package/packages/orq-rc/src/types/fp.ts +0 -50
  211. package/packages/orq-rc/src/types/index.ts +0 -11
  212. package/packages/orq-rc/src/types/operations.ts +0 -105
  213. package/packages/orq-rc/src/types/rfcdate.ts +0 -54
  214. package/packages/orq-rc/src/types/streams.ts +0 -21
  215. package/packages/orq-rc/tsconfig.json +0 -41
@@ -1,934 +0,0 @@
1
- # Datasets
2
- (*datasets*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [list](#list) - List datasets
9
- * [create](#create) - Create a dataset
10
- * [retrieve](#retrieve) - Retrieve a dataset
11
- * [update](#update) - Update a dataset
12
- * [delete](#delete) - Delete a dataset
13
- * [listDatapoints](#listdatapoints) - List datapoints
14
- * [createDatapoint](#createdatapoint) - Create a datapoint
15
- * [retrieveDatapoint](#retrievedatapoint) - Retrieve a datapoint
16
- * [updateDatapoint](#updatedatapoint) - Update a datapoint
17
- * [deleteDatapoint](#deletedatapoint) - Delete a datapoint
18
- * [createDatapoints](#createdatapoints) - Create multiple datapoints
19
- * [clear](#clear) - Delete all datapoints
20
-
21
- ## list
22
-
23
- Retrieves a paginated list of datasets for the current workspace. Results can be paginated using cursor-based pagination.
24
-
25
- ### Example Usage
26
-
27
- ```typescript
28
- import { Orq } from "@orq-ai/node";
29
-
30
- const orq = new Orq({
31
- apiKey: process.env["ORQ_API_KEY"] ?? "",
32
- });
33
-
34
- async function run() {
35
- const result = await orq.datasets.list({});
36
-
37
- // Handle the result
38
- console.log(result);
39
- }
40
-
41
- run();
42
- ```
43
-
44
- ### Standalone function
45
-
46
- The standalone function version of this method:
47
-
48
- ```typescript
49
- import { OrqCore } from "@orq-ai/node/core.js";
50
- import { datasetsList } from "@orq-ai/node/funcs/datasetsList.js";
51
-
52
- // Use `OrqCore` for best tree-shaking performance.
53
- // You can create one instance of it to use across an application.
54
- const orq = new OrqCore({
55
- apiKey: process.env["ORQ_API_KEY"] ?? "",
56
- });
57
-
58
- async function run() {
59
- const res = await datasetsList(orq, {});
60
-
61
- if (!res.ok) {
62
- throw res.error;
63
- }
64
-
65
- const { value: result } = res;
66
-
67
- // Handle the result
68
- console.log(result);
69
- }
70
-
71
- run();
72
- ```
73
-
74
- ### Parameters
75
-
76
- | Parameter | Type | Required | Description |
77
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
78
- | `request` | [operations.ListDatasetsRequest](../../models/operations/listdatasetsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
79
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
80
- | `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. |
81
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
82
-
83
- ### Response
84
-
85
- **Promise\<[operations.ListDatasetsResponseBody](../../models/operations/listdatasetsresponsebody.md)\>**
86
-
87
- ### Errors
88
-
89
- | Error Type | Status Code | Content Type |
90
- | --------------- | --------------- | --------------- |
91
- | errors.APIError | 4XX, 5XX | \*/\* |
92
-
93
- ## create
94
-
95
- Creates a new dataset in the specified project.
96
-
97
- ### Example Usage
98
-
99
- ```typescript
100
- import { Orq } from "@orq-ai/node";
101
-
102
- const orq = new Orq({
103
- apiKey: process.env["ORQ_API_KEY"] ?? "",
104
- });
105
-
106
- async function run() {
107
- const result = await orq.datasets.create({
108
- displayName: "Jed6",
109
- path: "Customer Service/Billing/Refund",
110
- });
111
-
112
- // Handle the result
113
- console.log(result);
114
- }
115
-
116
- run();
117
- ```
118
-
119
- ### Standalone function
120
-
121
- The standalone function version of this method:
122
-
123
- ```typescript
124
- import { OrqCore } from "@orq-ai/node/core.js";
125
- import { datasetsCreate } from "@orq-ai/node/funcs/datasetsCreate.js";
126
-
127
- // Use `OrqCore` for best tree-shaking performance.
128
- // You can create one instance of it to use across an application.
129
- const orq = new OrqCore({
130
- apiKey: process.env["ORQ_API_KEY"] ?? "",
131
- });
132
-
133
- async function run() {
134
- const res = await datasetsCreate(orq, {
135
- displayName: "Jed6",
136
- path: "Customer Service/Billing/Refund",
137
- });
138
-
139
- if (!res.ok) {
140
- throw res.error;
141
- }
142
-
143
- const { value: result } = res;
144
-
145
- // Handle the result
146
- console.log(result);
147
- }
148
-
149
- run();
150
- ```
151
-
152
- ### Parameters
153
-
154
- | Parameter | Type | Required | Description |
155
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
156
- | `request` | [operations.CreateDatasetRequestBody](../../models/operations/createdatasetrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
157
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
158
- | `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. |
159
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
160
-
161
- ### Response
162
-
163
- **Promise\<[operations.CreateDatasetResponseBody](../../models/operations/createdatasetresponsebody.md)\>**
164
-
165
- ### Errors
166
-
167
- | Error Type | Status Code | Content Type |
168
- | --------------- | --------------- | --------------- |
169
- | errors.APIError | 4XX, 5XX | \*/\* |
170
-
171
- ## retrieve
172
-
173
- Retrieves a specific dataset by its unique identifier
174
-
175
- ### Example Usage
176
-
177
- ```typescript
178
- import { Orq } from "@orq-ai/node";
179
-
180
- const orq = new Orq({
181
- apiKey: process.env["ORQ_API_KEY"] ?? "",
182
- });
183
-
184
- async function run() {
185
- const result = await orq.datasets.retrieve({
186
- datasetId: "<id>",
187
- });
188
-
189
- // Handle the result
190
- console.log(result);
191
- }
192
-
193
- run();
194
- ```
195
-
196
- ### Standalone function
197
-
198
- The standalone function version of this method:
199
-
200
- ```typescript
201
- import { OrqCore } from "@orq-ai/node/core.js";
202
- import { datasetsRetrieve } from "@orq-ai/node/funcs/datasetsRetrieve.js";
203
-
204
- // Use `OrqCore` for best tree-shaking performance.
205
- // You can create one instance of it to use across an application.
206
- const orq = new OrqCore({
207
- apiKey: process.env["ORQ_API_KEY"] ?? "",
208
- });
209
-
210
- async function run() {
211
- const res = await datasetsRetrieve(orq, {
212
- datasetId: "<id>",
213
- });
214
-
215
- if (!res.ok) {
216
- throw res.error;
217
- }
218
-
219
- const { value: result } = res;
220
-
221
- // Handle the result
222
- console.log(result);
223
- }
224
-
225
- run();
226
- ```
227
-
228
- ### Parameters
229
-
230
- | Parameter | Type | Required | Description |
231
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
232
- | `request` | [operations.RetrieveDatasetRequest](../../models/operations/retrievedatasetrequest.md) | :heavy_check_mark: | The request object to use for the request. |
233
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
234
- | `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. |
235
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
236
-
237
- ### Response
238
-
239
- **Promise\<[operations.RetrieveDatasetResponseBody](../../models/operations/retrievedatasetresponsebody.md)\>**
240
-
241
- ### Errors
242
-
243
- | Error Type | Status Code | Content Type |
244
- | ------------------- | ------------------- | ------------------- |
245
- | errors.HonoApiError | 404 | application/json |
246
- | errors.APIError | 4XX, 5XX | \*/\* |
247
-
248
- ## update
249
-
250
- Update a dataset
251
-
252
- ### Example Usage
253
-
254
- ```typescript
255
- import { Orq } from "@orq-ai/node";
256
-
257
- const orq = new Orq({
258
- apiKey: process.env["ORQ_API_KEY"] ?? "",
259
- });
260
-
261
- async function run() {
262
- const result = await orq.datasets.update({
263
- datasetId: "<id>",
264
- });
265
-
266
- // Handle the result
267
- console.log(result);
268
- }
269
-
270
- run();
271
- ```
272
-
273
- ### Standalone function
274
-
275
- The standalone function version of this method:
276
-
277
- ```typescript
278
- import { OrqCore } from "@orq-ai/node/core.js";
279
- import { datasetsUpdate } from "@orq-ai/node/funcs/datasetsUpdate.js";
280
-
281
- // Use `OrqCore` for best tree-shaking performance.
282
- // You can create one instance of it to use across an application.
283
- const orq = new OrqCore({
284
- apiKey: process.env["ORQ_API_KEY"] ?? "",
285
- });
286
-
287
- async function run() {
288
- const res = await datasetsUpdate(orq, {
289
- datasetId: "<id>",
290
- });
291
-
292
- if (!res.ok) {
293
- throw res.error;
294
- }
295
-
296
- const { value: result } = res;
297
-
298
- // Handle the result
299
- console.log(result);
300
- }
301
-
302
- run();
303
- ```
304
-
305
- ### Parameters
306
-
307
- | Parameter | Type | Required | Description |
308
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
309
- | `request` | [operations.UpdateDatasetRequest](../../models/operations/updatedatasetrequest.md) | :heavy_check_mark: | The request object to use for the request. |
310
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
311
- | `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. |
312
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
313
-
314
- ### Response
315
-
316
- **Promise\<[operations.UpdateDatasetResponseBody](../../models/operations/updatedatasetresponsebody.md)\>**
317
-
318
- ### Errors
319
-
320
- | Error Type | Status Code | Content Type |
321
- | ------------------- | ------------------- | ------------------- |
322
- | errors.HonoApiError | 404 | application/json |
323
- | errors.APIError | 4XX, 5XX | \*/\* |
324
-
325
- ## delete
326
-
327
- Permanently deletes a dataset and all its datapoints. This action is irreversible.
328
-
329
- ### Example Usage
330
-
331
- ```typescript
332
- import { Orq } from "@orq-ai/node";
333
-
334
- const orq = new Orq({
335
- apiKey: process.env["ORQ_API_KEY"] ?? "",
336
- });
337
-
338
- async function run() {
339
- await orq.datasets.delete({
340
- datasetId: "<id>",
341
- });
342
-
343
-
344
- }
345
-
346
- run();
347
- ```
348
-
349
- ### Standalone function
350
-
351
- The standalone function version of this method:
352
-
353
- ```typescript
354
- import { OrqCore } from "@orq-ai/node/core.js";
355
- import { datasetsDelete } from "@orq-ai/node/funcs/datasetsDelete.js";
356
-
357
- // Use `OrqCore` for best tree-shaking performance.
358
- // You can create one instance of it to use across an application.
359
- const orq = new OrqCore({
360
- apiKey: process.env["ORQ_API_KEY"] ?? "",
361
- });
362
-
363
- async function run() {
364
- const res = await datasetsDelete(orq, {
365
- datasetId: "<id>",
366
- });
367
-
368
- if (!res.ok) {
369
- throw res.error;
370
- }
371
-
372
- const { value: result } = res;
373
-
374
-
375
- }
376
-
377
- run();
378
- ```
379
-
380
- ### Parameters
381
-
382
- | Parameter | Type | Required | Description |
383
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
384
- | `request` | [operations.DeleteDatasetRequest](../../models/operations/deletedatasetrequest.md) | :heavy_check_mark: | The request object to use for the request. |
385
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
386
- | `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. |
387
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
388
-
389
- ### Response
390
-
391
- **Promise\<void\>**
392
-
393
- ### Errors
394
-
395
- | Error Type | Status Code | Content Type |
396
- | --------------- | --------------- | --------------- |
397
- | errors.APIError | 4XX, 5XX | \*/\* |
398
-
399
- ## listDatapoints
400
-
401
- Retrieves a paginated list of datapoints from a specific dataset.
402
-
403
- ### Example Usage
404
-
405
- ```typescript
406
- import { Orq } from "@orq-ai/node";
407
-
408
- const orq = new Orq({
409
- apiKey: process.env["ORQ_API_KEY"] ?? "",
410
- });
411
-
412
- async function run() {
413
- const result = await orq.datasets.listDatapoints({
414
- datasetId: "<id>",
415
- });
416
-
417
- // Handle the result
418
- console.log(result);
419
- }
420
-
421
- run();
422
- ```
423
-
424
- ### Standalone function
425
-
426
- The standalone function version of this method:
427
-
428
- ```typescript
429
- import { OrqCore } from "@orq-ai/node/core.js";
430
- import { datasetsListDatapoints } from "@orq-ai/node/funcs/datasetsListDatapoints.js";
431
-
432
- // Use `OrqCore` for best tree-shaking performance.
433
- // You can create one instance of it to use across an application.
434
- const orq = new OrqCore({
435
- apiKey: process.env["ORQ_API_KEY"] ?? "",
436
- });
437
-
438
- async function run() {
439
- const res = await datasetsListDatapoints(orq, {
440
- datasetId: "<id>",
441
- });
442
-
443
- if (!res.ok) {
444
- throw res.error;
445
- }
446
-
447
- const { value: result } = res;
448
-
449
- // Handle the result
450
- console.log(result);
451
- }
452
-
453
- run();
454
- ```
455
-
456
- ### Parameters
457
-
458
- | Parameter | Type | Required | Description |
459
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
460
- | `request` | [operations.ListDatasetDatapointsRequest](../../models/operations/listdatasetdatapointsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
461
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
462
- | `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. |
463
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
464
-
465
- ### Response
466
-
467
- **Promise\<[operations.ListDatasetDatapointsResponseBody](../../models/operations/listdatasetdatapointsresponsebody.md)\>**
468
-
469
- ### Errors
470
-
471
- | Error Type | Status Code | Content Type |
472
- | --------------- | --------------- | --------------- |
473
- | errors.APIError | 4XX, 5XX | \*/\* |
474
-
475
- ## createDatapoint
476
-
477
- Creates a new datapoint in the specified dataset.
478
-
479
- ### Example Usage
480
-
481
- ```typescript
482
- import { Orq } from "@orq-ai/node";
483
-
484
- const orq = new Orq({
485
- apiKey: process.env["ORQ_API_KEY"] ?? "",
486
- });
487
-
488
- async function run() {
489
- const result = await orq.datasets.createDatapoint({
490
- datasetId: "<id>",
491
- });
492
-
493
- // Handle the result
494
- console.log(result);
495
- }
496
-
497
- run();
498
- ```
499
-
500
- ### Standalone function
501
-
502
- The standalone function version of this method:
503
-
504
- ```typescript
505
- import { OrqCore } from "@orq-ai/node/core.js";
506
- import { datasetsCreateDatapoint } from "@orq-ai/node/funcs/datasetsCreateDatapoint.js";
507
-
508
- // Use `OrqCore` for best tree-shaking performance.
509
- // You can create one instance of it to use across an application.
510
- const orq = new OrqCore({
511
- apiKey: process.env["ORQ_API_KEY"] ?? "",
512
- });
513
-
514
- async function run() {
515
- const res = await datasetsCreateDatapoint(orq, {
516
- datasetId: "<id>",
517
- });
518
-
519
- if (!res.ok) {
520
- throw res.error;
521
- }
522
-
523
- const { value: result } = res;
524
-
525
- // Handle the result
526
- console.log(result);
527
- }
528
-
529
- run();
530
- ```
531
-
532
- ### Parameters
533
-
534
- | Parameter | Type | Required | Description |
535
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
536
- | `request` | [operations.CreateDatasetItemRequest](../../models/operations/createdatasetitemrequest.md) | :heavy_check_mark: | The request object to use for the request. |
537
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
538
- | `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. |
539
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
540
-
541
- ### Response
542
-
543
- **Promise\<[operations.CreateDatasetItemResponseBody](../../models/operations/createdatasetitemresponsebody.md)\>**
544
-
545
- ### Errors
546
-
547
- | Error Type | Status Code | Content Type |
548
- | --------------- | --------------- | --------------- |
549
- | errors.APIError | 4XX, 5XX | \*/\* |
550
-
551
- ## retrieveDatapoint
552
-
553
- Retrieves a datapoint object
554
-
555
- ### Example Usage
556
-
557
- ```typescript
558
- import { Orq } from "@orq-ai/node";
559
-
560
- const orq = new Orq({
561
- apiKey: process.env["ORQ_API_KEY"] ?? "",
562
- });
563
-
564
- async function run() {
565
- const result = await orq.datasets.retrieveDatapoint({
566
- datasetId: "<id>",
567
- datapointId: "<id>",
568
- });
569
-
570
- // Handle the result
571
- console.log(result);
572
- }
573
-
574
- run();
575
- ```
576
-
577
- ### Standalone function
578
-
579
- The standalone function version of this method:
580
-
581
- ```typescript
582
- import { OrqCore } from "@orq-ai/node/core.js";
583
- import { datasetsRetrieveDatapoint } from "@orq-ai/node/funcs/datasetsRetrieveDatapoint.js";
584
-
585
- // Use `OrqCore` for best tree-shaking performance.
586
- // You can create one instance of it to use across an application.
587
- const orq = new OrqCore({
588
- apiKey: process.env["ORQ_API_KEY"] ?? "",
589
- });
590
-
591
- async function run() {
592
- const res = await datasetsRetrieveDatapoint(orq, {
593
- datasetId: "<id>",
594
- datapointId: "<id>",
595
- });
596
-
597
- if (!res.ok) {
598
- throw res.error;
599
- }
600
-
601
- const { value: result } = res;
602
-
603
- // Handle the result
604
- console.log(result);
605
- }
606
-
607
- run();
608
- ```
609
-
610
- ### Parameters
611
-
612
- | Parameter | Type | Required | Description |
613
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
614
- | `request` | [operations.RetrieveDatapointRequest](../../models/operations/retrievedatapointrequest.md) | :heavy_check_mark: | The request object to use for the request. |
615
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
616
- | `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. |
617
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
618
-
619
- ### Response
620
-
621
- **Promise\<[operations.RetrieveDatapointResponseBody](../../models/operations/retrievedatapointresponsebody.md)\>**
622
-
623
- ### Errors
624
-
625
- | Error Type | Status Code | Content Type |
626
- | ------------------- | ------------------- | ------------------- |
627
- | errors.HonoApiError | 404 | application/json |
628
- | errors.APIError | 4XX, 5XX | \*/\* |
629
-
630
- ## updateDatapoint
631
-
632
- Update a datapoint
633
-
634
- ### Example Usage
635
-
636
- ```typescript
637
- import { Orq } from "@orq-ai/node";
638
-
639
- const orq = new Orq({
640
- apiKey: process.env["ORQ_API_KEY"] ?? "",
641
- });
642
-
643
- async function run() {
644
- const result = await orq.datasets.updateDatapoint({
645
- datasetId: "<id>",
646
- datapointId: "<id>",
647
- });
648
-
649
- // Handle the result
650
- console.log(result);
651
- }
652
-
653
- run();
654
- ```
655
-
656
- ### Standalone function
657
-
658
- The standalone function version of this method:
659
-
660
- ```typescript
661
- import { OrqCore } from "@orq-ai/node/core.js";
662
- import { datasetsUpdateDatapoint } from "@orq-ai/node/funcs/datasetsUpdateDatapoint.js";
663
-
664
- // Use `OrqCore` for best tree-shaking performance.
665
- // You can create one instance of it to use across an application.
666
- const orq = new OrqCore({
667
- apiKey: process.env["ORQ_API_KEY"] ?? "",
668
- });
669
-
670
- async function run() {
671
- const res = await datasetsUpdateDatapoint(orq, {
672
- datasetId: "<id>",
673
- datapointId: "<id>",
674
- });
675
-
676
- if (!res.ok) {
677
- throw res.error;
678
- }
679
-
680
- const { value: result } = res;
681
-
682
- // Handle the result
683
- console.log(result);
684
- }
685
-
686
- run();
687
- ```
688
-
689
- ### Parameters
690
-
691
- | Parameter | Type | Required | Description |
692
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
693
- | `request` | [operations.UpdateDatapointRequest](../../models/operations/updatedatapointrequest.md) | :heavy_check_mark: | The request object to use for the request. |
694
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
695
- | `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. |
696
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
697
-
698
- ### Response
699
-
700
- **Promise\<[operations.UpdateDatapointResponseBody](../../models/operations/updatedatapointresponsebody.md)\>**
701
-
702
- ### Errors
703
-
704
- | Error Type | Status Code | Content Type |
705
- | ------------------- | ------------------- | ------------------- |
706
- | errors.HonoApiError | 404 | application/json |
707
- | errors.APIError | 4XX, 5XX | \*/\* |
708
-
709
- ## deleteDatapoint
710
-
711
- Permanently deletes a specific datapoint from a dataset.
712
-
713
- ### Example Usage
714
-
715
- ```typescript
716
- import { Orq } from "@orq-ai/node";
717
-
718
- const orq = new Orq({
719
- apiKey: process.env["ORQ_API_KEY"] ?? "",
720
- });
721
-
722
- async function run() {
723
- await orq.datasets.deleteDatapoint({
724
- datasetId: "<id>",
725
- datapointId: "<id>",
726
- });
727
-
728
-
729
- }
730
-
731
- run();
732
- ```
733
-
734
- ### Standalone function
735
-
736
- The standalone function version of this method:
737
-
738
- ```typescript
739
- import { OrqCore } from "@orq-ai/node/core.js";
740
- import { datasetsDeleteDatapoint } from "@orq-ai/node/funcs/datasetsDeleteDatapoint.js";
741
-
742
- // Use `OrqCore` for best tree-shaking performance.
743
- // You can create one instance of it to use across an application.
744
- const orq = new OrqCore({
745
- apiKey: process.env["ORQ_API_KEY"] ?? "",
746
- });
747
-
748
- async function run() {
749
- const res = await datasetsDeleteDatapoint(orq, {
750
- datasetId: "<id>",
751
- datapointId: "<id>",
752
- });
753
-
754
- if (!res.ok) {
755
- throw res.error;
756
- }
757
-
758
- const { value: result } = res;
759
-
760
-
761
- }
762
-
763
- run();
764
- ```
765
-
766
- ### Parameters
767
-
768
- | Parameter | Type | Required | Description |
769
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
770
- | `request` | [operations.DeleteDatapointRequest](../../models/operations/deletedatapointrequest.md) | :heavy_check_mark: | The request object to use for the request. |
771
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
772
- | `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. |
773
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
774
-
775
- ### Response
776
-
777
- **Promise\<void\>**
778
-
779
- ### Errors
780
-
781
- | Error Type | Status Code | Content Type |
782
- | ------------------- | ------------------- | ------------------- |
783
- | errors.HonoApiError | 404 | application/json |
784
- | errors.APIError | 4XX, 5XX | \*/\* |
785
-
786
- ## createDatapoints
787
-
788
- Create multiple datapoints at once.
789
-
790
- ### Example Usage
791
-
792
- ```typescript
793
- import { Orq } from "@orq-ai/node";
794
-
795
- const orq = new Orq({
796
- apiKey: process.env["ORQ_API_KEY"] ?? "",
797
- });
798
-
799
- async function run() {
800
- const result = await orq.datasets.createDatapoints({
801
- datasetId: "<id>",
802
- });
803
-
804
- // Handle the result
805
- console.log(result);
806
- }
807
-
808
- run();
809
- ```
810
-
811
- ### Standalone function
812
-
813
- The standalone function version of this method:
814
-
815
- ```typescript
816
- import { OrqCore } from "@orq-ai/node/core.js";
817
- import { datasetsCreateDatapoints } from "@orq-ai/node/funcs/datasetsCreateDatapoints.js";
818
-
819
- // Use `OrqCore` for best tree-shaking performance.
820
- // You can create one instance of it to use across an application.
821
- const orq = new OrqCore({
822
- apiKey: process.env["ORQ_API_KEY"] ?? "",
823
- });
824
-
825
- async function run() {
826
- const res = await datasetsCreateDatapoints(orq, {
827
- datasetId: "<id>",
828
- });
829
-
830
- if (!res.ok) {
831
- throw res.error;
832
- }
833
-
834
- const { value: result } = res;
835
-
836
- // Handle the result
837
- console.log(result);
838
- }
839
-
840
- run();
841
- ```
842
-
843
- ### Parameters
844
-
845
- | Parameter | Type | Required | Description |
846
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
847
- | `request` | [operations.BulkCreateDatapointsRequest](../../models/operations/bulkcreatedatapointsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
848
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
849
- | `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. |
850
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
851
-
852
- ### Response
853
-
854
- **Promise\<[operations.ResponseBody[]](../../models/.md)\>**
855
-
856
- ### Errors
857
-
858
- | Error Type | Status Code | Content Type |
859
- | --------------- | --------------- | --------------- |
860
- | errors.APIError | 4XX, 5XX | \*/\* |
861
-
862
- ## clear
863
-
864
- Delete all datapoints from a dataset. This action is irreversible.
865
-
866
- ### Example Usage
867
-
868
- ```typescript
869
- import { Orq } from "@orq-ai/node";
870
-
871
- const orq = new Orq({
872
- apiKey: process.env["ORQ_API_KEY"] ?? "",
873
- });
874
-
875
- async function run() {
876
- await orq.datasets.clear({
877
- datasetId: "<id>",
878
- });
879
-
880
-
881
- }
882
-
883
- run();
884
- ```
885
-
886
- ### Standalone function
887
-
888
- The standalone function version of this method:
889
-
890
- ```typescript
891
- import { OrqCore } from "@orq-ai/node/core.js";
892
- import { datasetsClear } from "@orq-ai/node/funcs/datasetsClear.js";
893
-
894
- // Use `OrqCore` for best tree-shaking performance.
895
- // You can create one instance of it to use across an application.
896
- const orq = new OrqCore({
897
- apiKey: process.env["ORQ_API_KEY"] ?? "",
898
- });
899
-
900
- async function run() {
901
- const res = await datasetsClear(orq, {
902
- datasetId: "<id>",
903
- });
904
-
905
- if (!res.ok) {
906
- throw res.error;
907
- }
908
-
909
- const { value: result } = res;
910
-
911
-
912
- }
913
-
914
- run();
915
- ```
916
-
917
- ### Parameters
918
-
919
- | Parameter | Type | Required | Description |
920
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
921
- | `request` | [operations.ClearDatasetRequest](../../models/operations/cleardatasetrequest.md) | :heavy_check_mark: | The request object to use for the request. |
922
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
923
- | `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. |
924
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
925
-
926
- ### Response
927
-
928
- **Promise\<void\>**
929
-
930
- ### Errors
931
-
932
- | Error Type | Status Code | Content Type |
933
- | --------------- | --------------- | --------------- |
934
- | errors.APIError | 4XX, 5XX | \*/\* |