@orq-ai/node 3.1.0 → 3.1.2

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 (304) hide show
  1. package/README.md +34 -34
  2. package/docs/sdks/deployments/README.md +9 -86
  3. package/docs/sdks/files/README.md +174 -2
  4. package/docs/sdks/orq/README.md +1 -1
  5. package/docs/sdks/prompt/README.md +6 -0
  6. package/docs/sdks/prompts/README.md +128 -135
  7. package/docs/sdks/snippets/README.md +84 -0
  8. package/docs/sdks/templates/README.md +80 -0
  9. package/funcs/{deploymentsList.d.ts → deploymentsAll.d.ts} +2 -2
  10. package/funcs/deploymentsAll.d.ts.map +1 -0
  11. package/funcs/{deploymentsList.js → deploymentsAll.js} +4 -5
  12. package/funcs/deploymentsAll.js.map +1 -0
  13. package/funcs/deploymentsInvoke.d.ts +7 -1
  14. package/funcs/deploymentsInvoke.d.ts.map +1 -1
  15. package/funcs/deploymentsInvoke.js +11 -10
  16. package/funcs/deploymentsInvoke.js.map +1 -1
  17. package/funcs/filesBulkUpload.d.ts +15 -0
  18. package/funcs/filesBulkUpload.d.ts.map +1 -0
  19. package/funcs/{promptsList.js → filesBulkUpload.js} +15 -18
  20. package/funcs/filesBulkUpload.js.map +1 -0
  21. package/funcs/{promptSnippetsDelete.d.ts → filesUpdate.d.ts} +3 -3
  22. package/funcs/filesUpdate.d.ts.map +1 -0
  23. package/funcs/{promptSnippetsGetByKey.js → filesUpdate.js} +13 -12
  24. package/funcs/filesUpdate.js.map +1 -0
  25. package/funcs/{promptSnippetsList.d.ts → promptSnippetsFindOne.d.ts} +3 -3
  26. package/funcs/promptSnippetsFindOne.d.ts.map +1 -0
  27. package/funcs/{promptSnippetsGet.js → promptSnippetsFindOne.js} +6 -6
  28. package/funcs/promptSnippetsFindOne.js.map +1 -0
  29. package/funcs/{promptSnippetsCreate.d.ts → promptTemplatesGetAll.d.ts} +3 -3
  30. package/funcs/promptTemplatesGetAll.d.ts.map +1 -0
  31. package/funcs/{promptSnippetsList.js → promptTemplatesGetAll.js} +13 -13
  32. package/funcs/promptTemplatesGetAll.js.map +1 -0
  33. package/funcs/promptsCreate.d.ts +1 -1
  34. package/funcs/promptsCreate.js +2 -2
  35. package/funcs/promptsCreate.js.map +1 -1
  36. package/funcs/{promptsRetrieve.d.ts → promptsCreateVersion.d.ts} +3 -6
  37. package/funcs/{promptSnippetsDelete.d.ts.map → promptsCreateVersion.d.ts.map} +1 -1
  38. package/funcs/promptsCreateVersion.js +110 -0
  39. package/funcs/promptsCreateVersion.js.map +1 -0
  40. package/funcs/promptsDelete.js +1 -1
  41. package/funcs/promptsDelete.js.map +1 -1
  42. package/funcs/{promptSnippetsGet.d.ts → promptsDuplicate.d.ts} +3 -3
  43. package/funcs/promptsDuplicate.d.ts.map +1 -0
  44. package/funcs/{promptSnippetsDelete.js → promptsDuplicate.js} +8 -8
  45. package/funcs/promptsDuplicate.js.map +1 -0
  46. package/funcs/promptsGetAll.d.ts +12 -0
  47. package/funcs/promptsGetAll.d.ts.map +1 -0
  48. package/funcs/{promptSnippetsCreate.js → promptsGetAll.js} +8 -8
  49. package/funcs/promptsGetAll.js.map +1 -0
  50. package/funcs/promptsGetOne.d.ts +12 -0
  51. package/funcs/promptsGetOne.d.ts.map +1 -0
  52. package/funcs/{promptsRetrieve.js → promptsGetOne.js} +8 -10
  53. package/funcs/promptsGetOne.js.map +1 -0
  54. package/funcs/promptsUpdate.js +1 -1
  55. package/funcs/promptsUpdate.js.map +1 -1
  56. package/jsr.json +1 -1
  57. package/lib/config.d.ts +2 -10
  58. package/lib/config.d.ts.map +1 -1
  59. package/lib/config.js +2 -2
  60. package/lib/config.js.map +1 -1
  61. package/lib/env.d.ts +0 -13
  62. package/lib/env.d.ts.map +1 -1
  63. package/lib/env.js +0 -17
  64. package/lib/env.js.map +1 -1
  65. package/lib/sdks.js +1 -1
  66. package/lib/sdks.js.map +1 -1
  67. package/models/components/deployments.d.ts +5 -0
  68. package/models/components/deployments.d.ts.map +1 -1
  69. package/models/components/deployments.js +2 -0
  70. package/models/components/deployments.js.map +1 -1
  71. package/models/errors/index.d.ts +0 -2
  72. package/models/errors/index.d.ts.map +1 -1
  73. package/models/errors/index.js +0 -2
  74. package/models/errors/index.js.map +1 -1
  75. package/models/operations/bulkfileupload.d.ts +173 -0
  76. package/models/operations/bulkfileupload.d.ts.map +1 -0
  77. package/models/operations/bulkfileupload.js +210 -0
  78. package/models/operations/bulkfileupload.js.map +1 -0
  79. package/models/operations/createcontact.js +2 -2
  80. package/models/operations/createprompt.d.ts +381 -702
  81. package/models/operations/createprompt.d.ts.map +1 -1
  82. package/models/operations/createprompt.js +481 -641
  83. package/models/operations/createprompt.js.map +1 -1
  84. package/models/operations/createpromptversion.d.ts +2003 -0
  85. package/models/operations/createpromptversion.d.ts.map +1 -0
  86. package/models/operations/createpromptversion.js +1852 -0
  87. package/models/operations/createpromptversion.js.map +1 -0
  88. package/models/operations/deleteprompt.d.ts +1 -1
  89. package/models/operations/deploymentgetconfig.d.ts +0 -39
  90. package/models/operations/deploymentgetconfig.d.ts.map +1 -1
  91. package/models/operations/deploymentgetconfig.js +4 -29
  92. package/models/operations/deploymentgetconfig.js.map +1 -1
  93. package/models/operations/deploymentinvoke.d.ts +683 -23
  94. package/models/operations/deploymentinvoke.d.ts.map +1 -1
  95. package/models/operations/deploymentinvoke.js +614 -23
  96. package/models/operations/deploymentinvoke.js.map +1 -1
  97. package/models/operations/deployments.d.ts +8 -54
  98. package/models/operations/deployments.d.ts.map +1 -1
  99. package/models/operations/deployments.js +13 -44
  100. package/models/operations/deployments.js.map +1 -1
  101. package/models/operations/duplicateprompt.d.ts +32 -0
  102. package/models/operations/duplicateprompt.d.ts.map +1 -0
  103. package/models/operations/{deletepromptsnippet.js → duplicateprompt.js} +17 -17
  104. package/models/operations/duplicateprompt.js.map +1 -0
  105. package/models/operations/fileget.js +2 -2
  106. package/models/operations/filelist.d.ts +5 -1
  107. package/models/operations/filelist.d.ts.map +1 -1
  108. package/models/operations/filelist.js +12 -4
  109. package/models/operations/filelist.js.map +1 -1
  110. package/models/operations/fileupdate.d.ts +143 -0
  111. package/models/operations/fileupdate.d.ts.map +1 -0
  112. package/models/operations/fileupdate.js +193 -0
  113. package/models/operations/fileupdate.js.map +1 -0
  114. package/models/operations/fileupload.js +2 -2
  115. package/models/operations/findonepromptsnippet.d.ts +4768 -938
  116. package/models/operations/findonepromptsnippet.d.ts.map +1 -1
  117. package/models/operations/findonepromptsnippet.js +4751 -984
  118. package/models/operations/findonepromptsnippet.js.map +1 -1
  119. package/models/operations/getallprompts.d.ts +9926 -546
  120. package/models/operations/getallprompts.d.ts.map +1 -1
  121. package/models/operations/getallprompts.js +8805 -557
  122. package/models/operations/getallprompts.js.map +1 -1
  123. package/models/operations/getallprompttemplates.d.ts +6607 -0
  124. package/models/operations/getallprompttemplates.d.ts.map +1 -0
  125. package/models/operations/getallprompttemplates.js +6225 -0
  126. package/models/operations/getallprompttemplates.js.map +1 -0
  127. package/models/operations/getoneprompt.d.ts +1 -1203
  128. package/models/operations/getoneprompt.d.ts.map +1 -1
  129. package/models/operations/getoneprompt.js +1 -1011
  130. package/models/operations/getoneprompt.js.map +1 -1
  131. package/models/operations/index.d.ts +5 -8
  132. package/models/operations/index.d.ts.map +1 -1
  133. package/models/operations/index.js +5 -8
  134. package/models/operations/index.js.map +1 -1
  135. package/models/operations/updateprompt.d.ts +5979 -1121
  136. package/models/operations/updateprompt.d.ts.map +1 -1
  137. package/models/operations/updateprompt.js +5729 -1119
  138. package/models/operations/updateprompt.js.map +1 -1
  139. package/package.json +1 -1
  140. package/sdk/deployments.d.ts +6 -10
  141. package/sdk/deployments.d.ts.map +1 -1
  142. package/sdk/deployments.js +6 -14
  143. package/sdk/deployments.js.map +1 -1
  144. package/sdk/files.d.ts +11 -0
  145. package/sdk/files.d.ts.map +1 -1
  146. package/sdk/files.js +17 -0
  147. package/sdk/files.js.map +1 -1
  148. package/sdk/prompt.d.ts +10 -0
  149. package/sdk/prompt.d.ts.map +1 -0
  150. package/sdk/prompt.js +19 -0
  151. package/sdk/prompt.js.map +1 -0
  152. package/sdk/prompts.d.ts +14 -26
  153. package/sdk/prompts.d.ts.map +1 -1
  154. package/sdk/prompts.js +25 -37
  155. package/sdk/prompts.js.map +1 -1
  156. package/sdk/sdk.d.ts +3 -3
  157. package/sdk/sdk.d.ts.map +1 -1
  158. package/sdk/sdk.js +3 -3
  159. package/sdk/sdk.js.map +1 -1
  160. package/sdk/snippets.d.ts +9 -0
  161. package/sdk/snippets.d.ts.map +1 -0
  162. package/sdk/snippets.js +19 -0
  163. package/sdk/snippets.js.map +1 -0
  164. package/sdk/templates.d.ts +9 -0
  165. package/sdk/templates.d.ts.map +1 -0
  166. package/sdk/templates.js +19 -0
  167. package/sdk/templates.js.map +1 -0
  168. package/src/funcs/{deploymentsList.ts → deploymentsAll.ts} +2 -3
  169. package/src/funcs/deploymentsInvoke.ts +16 -21
  170. package/src/funcs/filesBulkUpload.ts +129 -0
  171. package/src/funcs/{promptSnippetsGetByKey.ts → filesUpdate.ts} +16 -18
  172. package/src/funcs/{promptSnippetsGet.ts → promptSnippetsFindOne.ts} +4 -4
  173. package/src/funcs/{promptSnippetsList.ts → promptTemplatesGetAll.ts} +16 -16
  174. package/src/funcs/promptsCreate.ts +2 -2
  175. package/src/funcs/promptsCreateVersion.ts +131 -0
  176. package/src/funcs/promptsDelete.ts +1 -1
  177. package/src/funcs/{promptSnippetsDelete.ts → promptsDuplicate.ts} +7 -8
  178. package/src/funcs/{promptSnippetsCreate.ts → promptsGetAll.ts} +9 -9
  179. package/src/funcs/{promptsRetrieve.ts → promptsGetOne.ts} +8 -10
  180. package/src/funcs/promptsUpdate.ts +1 -1
  181. package/src/lib/config.ts +2 -12
  182. package/src/lib/env.ts +0 -32
  183. package/src/lib/sdks.ts +2 -2
  184. package/src/models/components/deployments.ts +7 -0
  185. package/src/models/errors/index.ts +0 -2
  186. package/src/models/operations/bulkfileupload.ts +315 -0
  187. package/src/models/operations/createcontact.ts +2 -2
  188. package/src/models/operations/createprompt.ts +690 -1048
  189. package/src/models/operations/createpromptversion.ts +3703 -0
  190. package/src/models/operations/deleteprompt.ts +1 -1
  191. package/src/models/operations/deploymentgetconfig.ts +0 -44
  192. package/src/models/operations/deploymentinvoke.ts +1415 -174
  193. package/src/models/operations/deployments.ts +18 -68
  194. package/src/models/operations/duplicateprompt.ts +69 -0
  195. package/src/models/operations/fileget.ts +2 -2
  196. package/src/models/operations/filelist.ts +17 -5
  197. package/src/models/operations/fileupdate.ts +298 -0
  198. package/src/models/operations/fileupload.ts +2 -2
  199. package/src/models/operations/findonepromptsnippet.ts +11104 -1818
  200. package/src/models/operations/getallprompts.ts +17860 -1336
  201. package/src/models/operations/getallprompttemplates.ts +13690 -0
  202. package/src/models/operations/getoneprompt.ts +1 -1914
  203. package/src/models/operations/index.ts +5 -8
  204. package/src/models/operations/updateprompt.ts +12561 -2071
  205. package/src/sdk/deployments.ts +11 -25
  206. package/src/sdk/files.ts +33 -0
  207. package/src/sdk/prompt.ts +19 -0
  208. package/src/sdk/prompts.ts +39 -51
  209. package/src/sdk/sdk.ts +4 -4
  210. package/src/sdk/snippets.ts +24 -0
  211. package/src/sdk/templates.ts +24 -0
  212. package/docs/sdks/promptsnippets/README.md +0 -488
  213. package/funcs/deploymentsList.d.ts.map +0 -1
  214. package/funcs/deploymentsList.js.map +0 -1
  215. package/funcs/deploymentsStream.d.ts +0 -16
  216. package/funcs/deploymentsStream.d.ts.map +0 -1
  217. package/funcs/deploymentsStream.js +0 -125
  218. package/funcs/deploymentsStream.js.map +0 -1
  219. package/funcs/promptSnippetsCreate.d.ts.map +0 -1
  220. package/funcs/promptSnippetsCreate.js.map +0 -1
  221. package/funcs/promptSnippetsDelete.js.map +0 -1
  222. package/funcs/promptSnippetsGet.d.ts.map +0 -1
  223. package/funcs/promptSnippetsGet.js.map +0 -1
  224. package/funcs/promptSnippetsGetByKey.d.ts +0 -12
  225. package/funcs/promptSnippetsGetByKey.d.ts.map +0 -1
  226. package/funcs/promptSnippetsGetByKey.js.map +0 -1
  227. package/funcs/promptSnippetsList.d.ts.map +0 -1
  228. package/funcs/promptSnippetsList.js.map +0 -1
  229. package/funcs/promptSnippetsUpdate.d.ts +0 -13
  230. package/funcs/promptSnippetsUpdate.d.ts.map +0 -1
  231. package/funcs/promptSnippetsUpdate.js +0 -114
  232. package/funcs/promptSnippetsUpdate.js.map +0 -1
  233. package/funcs/promptsGetVersion.d.ts +0 -16
  234. package/funcs/promptsGetVersion.d.ts.map +0 -1
  235. package/funcs/promptsGetVersion.js +0 -120
  236. package/funcs/promptsGetVersion.js.map +0 -1
  237. package/funcs/promptsList.d.ts +0 -15
  238. package/funcs/promptsList.d.ts.map +0 -1
  239. package/funcs/promptsList.js.map +0 -1
  240. package/funcs/promptsListVersions.d.ts +0 -15
  241. package/funcs/promptsListVersions.d.ts.map +0 -1
  242. package/funcs/promptsListVersions.js +0 -118
  243. package/funcs/promptsListVersions.js.map +0 -1
  244. package/funcs/promptsRetrieve.d.ts.map +0 -1
  245. package/funcs/promptsRetrieve.js.map +0 -1
  246. package/models/errors/getpromptversion.d.ts +0 -36
  247. package/models/errors/getpromptversion.d.ts.map +0 -1
  248. package/models/errors/getpromptversion.js +0 -79
  249. package/models/errors/getpromptversion.js.map +0 -1
  250. package/models/errors/updatepromptsnippet.d.ts +0 -36
  251. package/models/errors/updatepromptsnippet.d.ts.map +0 -1
  252. package/models/errors/updatepromptsnippet.js +0 -79
  253. package/models/errors/updatepromptsnippet.js.map +0 -1
  254. package/models/operations/createpromptsnippet.d.ts +0 -3567
  255. package/models/operations/createpromptsnippet.d.ts.map +0 -1
  256. package/models/operations/createpromptsnippet.js +0 -3056
  257. package/models/operations/createpromptsnippet.js.map +0 -1
  258. package/models/operations/deletepromptsnippet.d.ts +0 -32
  259. package/models/operations/deletepromptsnippet.d.ts.map +0 -1
  260. package/models/operations/deletepromptsnippet.js.map +0 -1
  261. package/models/operations/deploymentstream.d.ts +0 -1622
  262. package/models/operations/deploymentstream.d.ts.map +0 -1
  263. package/models/operations/deploymentstream.js +0 -1571
  264. package/models/operations/deploymentstream.js.map +0 -1
  265. package/models/operations/findonebykeypromptsnippet.d.ts +0 -2448
  266. package/models/operations/findonebykeypromptsnippet.d.ts.map +0 -1
  267. package/models/operations/findonebykeypromptsnippet.js +0 -2133
  268. package/models/operations/findonebykeypromptsnippet.js.map +0 -1
  269. package/models/operations/getallpromptsnippets.d.ts +0 -2512
  270. package/models/operations/getallpromptsnippets.d.ts.map +0 -1
  271. package/models/operations/getallpromptsnippets.js +0 -2195
  272. package/models/operations/getallpromptsnippets.js.map +0 -1
  273. package/models/operations/getpromptversion.d.ts +0 -1228
  274. package/models/operations/getpromptversion.d.ts.map +0 -1
  275. package/models/operations/getpromptversion.js +0 -1080
  276. package/models/operations/getpromptversion.js.map +0 -1
  277. package/models/operations/listpromptversions.d.ts +0 -1286
  278. package/models/operations/listpromptversions.d.ts.map +0 -1
  279. package/models/operations/listpromptversions.js +0 -1142
  280. package/models/operations/listpromptversions.js.map +0 -1
  281. package/models/operations/updatepromptsnippet.d.ts +0 -3595
  282. package/models/operations/updatepromptsnippet.d.ts.map +0 -1
  283. package/models/operations/updatepromptsnippet.js +0 -3116
  284. package/models/operations/updatepromptsnippet.js.map +0 -1
  285. package/sdk/promptsnippets.d.ts +0 -29
  286. package/sdk/promptsnippets.d.ts.map +0 -1
  287. package/sdk/promptsnippets.js +0 -54
  288. package/sdk/promptsnippets.js.map +0 -1
  289. package/src/funcs/deploymentsStream.ts +0 -150
  290. package/src/funcs/promptSnippetsUpdate.ts +0 -139
  291. package/src/funcs/promptsGetVersion.ts +0 -146
  292. package/src/funcs/promptsList.ts +0 -133
  293. package/src/funcs/promptsListVersions.ts +0 -139
  294. package/src/models/errors/getpromptversion.ts +0 -71
  295. package/src/models/errors/updatepromptsnippet.ts +0 -71
  296. package/src/models/operations/createpromptsnippet.ts +0 -6239
  297. package/src/models/operations/deletepromptsnippet.ts +0 -69
  298. package/src/models/operations/deploymentstream.ts +0 -3062
  299. package/src/models/operations/findonebykeypromptsnippet.ts +0 -4483
  300. package/src/models/operations/getallpromptsnippets.ts +0 -4472
  301. package/src/models/operations/getpromptversion.ts +0 -2012
  302. package/src/models/operations/listpromptversions.ts +0 -2146
  303. package/src/models/operations/updatepromptsnippet.ts +0 -6544
  304. package/src/sdk/promptsnippets.ts +0 -99
@@ -5,89 +5,17 @@
5
5
 
6
6
  ### Available Operations
7
7
 
8
- * [list](#list) - List all prompts
9
- * [create](#create) - Create a prompt
10
- * [retrieve](#retrieve) - Retrieve a prompt
11
- * [update](#update) - Update a prompt
8
+ * [create](#create) - Create a new prompt
9
+ * [createVersion](#createversion) - Create a new prompt version
12
10
  * [delete](#delete) - Delete a prompt
13
- * [listVersions](#listversions) - List all prompt versions
14
- * [getVersion](#getversion) - Retrieve a prompt version
15
-
16
- ## list
17
-
18
- Returns a list of your prompts. The prompts are returned sorted by creation date, with the most recent prompts appearing first
19
-
20
- ### Example Usage
21
-
22
- ```typescript
23
- import { Orq } from "@orq-ai/node";
24
-
25
- const orq = new Orq({
26
- apiKey: process.env["ORQ_API_KEY"] ?? "",
27
- });
28
-
29
- async function run() {
30
- const result = await orq.prompts.list({});
31
-
32
- // Handle the result
33
- console.log(result);
34
- }
35
-
36
- run();
37
- ```
38
-
39
- ### Standalone function
40
-
41
- The standalone function version of this method:
42
-
43
- ```typescript
44
- import { OrqCore } from "@orq-ai/node/core.js";
45
- import { promptsList } from "@orq-ai/node/funcs/promptsList.js";
46
-
47
- // Use `OrqCore` for best tree-shaking performance.
48
- // You can create one instance of it to use across an application.
49
- const orq = new OrqCore({
50
- apiKey: process.env["ORQ_API_KEY"] ?? "",
51
- });
52
-
53
- async function run() {
54
- const res = await promptsList(orq, {});
55
-
56
- if (!res.ok) {
57
- throw res.error;
58
- }
59
-
60
- const { value: result } = res;
61
-
62
- // Handle the result
63
- console.log(result);
64
- }
65
-
66
- run();
67
- ```
68
-
69
- ### Parameters
70
-
71
- | Parameter | Type | Required | Description |
72
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
73
- | `request` | [operations.GetAllPromptsRequest](../../models/operations/getallpromptsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
74
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
75
- | `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. |
76
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
77
-
78
- ### Response
79
-
80
- **Promise\<[operations.GetAllPromptsResponseBody](../../models/operations/getallpromptsresponsebody.md)\>**
81
-
82
- ### Errors
83
-
84
- | Error Type | Status Code | Content Type |
85
- | --------------- | --------------- | --------------- |
86
- | errors.APIError | 4XX, 5XX | \*/\* |
11
+ * [getOne](#getone) - Get one prompt
12
+ * [update](#update) - Update a prompt
13
+ * [duplicate](#duplicate) - Duplicate a prompt
14
+ * [getAll](#getall) - Get all prompts
87
15
 
88
16
  ## create
89
17
 
90
- Create a prompt
18
+ Create a new prompt
91
19
 
92
20
  ### Example Usage
93
21
 
@@ -132,7 +60,7 @@ async function run() {
132
60
  },
133
61
  ],
134
62
  },
135
- path: "Customer Service/Billing/Refund",
63
+ type: "snippet",
136
64
  });
137
65
 
138
66
  // Handle the result
@@ -190,7 +118,7 @@ async function run() {
190
118
  },
191
119
  ],
192
120
  },
193
- path: "Customer Service/Billing/Refund",
121
+ type: "snippet",
194
122
  });
195
123
 
196
124
  if (!res.ok) {
@@ -225,9 +153,9 @@ run();
225
153
  | --------------- | --------------- | --------------- |
226
154
  | errors.APIError | 4XX, 5XX | \*/\* |
227
155
 
228
- ## retrieve
156
+ ## createVersion
229
157
 
230
- Retrieves a prompt object
158
+ Create a new prompt version
231
159
 
232
160
  ### Example Usage
233
161
 
@@ -239,7 +167,7 @@ const orq = new Orq({
239
167
  });
240
168
 
241
169
  async function run() {
242
- const result = await orq.prompts.retrieve({
170
+ const result = await orq.prompts.createVersion({
243
171
  id: "<id>",
244
172
  });
245
173
 
@@ -256,7 +184,7 @@ The standalone function version of this method:
256
184
 
257
185
  ```typescript
258
186
  import { OrqCore } from "@orq-ai/node/core.js";
259
- import { promptsRetrieve } from "@orq-ai/node/funcs/promptsRetrieve.js";
187
+ import { promptsCreateVersion } from "@orq-ai/node/funcs/promptsCreateVersion.js";
260
188
 
261
189
  // Use `OrqCore` for best tree-shaking performance.
262
190
  // You can create one instance of it to use across an application.
@@ -265,7 +193,7 @@ const orq = new OrqCore({
265
193
  });
266
194
 
267
195
  async function run() {
268
- const res = await promptsRetrieve(orq, {
196
+ const res = await promptsCreateVersion(orq, {
269
197
  id: "<id>",
270
198
  });
271
199
 
@@ -286,14 +214,14 @@ run();
286
214
 
287
215
  | Parameter | Type | Required | Description |
288
216
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
289
- | `request` | [operations.GetOnePromptRequest](../../models/operations/getonepromptrequest.md) | :heavy_check_mark: | The request object to use for the request. |
217
+ | `request` | [operations.CreatePromptVersionRequest](../../models/operations/createpromptversionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
290
218
  | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
291
219
  | `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. |
292
220
  | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
293
221
 
294
222
  ### Response
295
223
 
296
- **Promise\<[operations.GetOnePromptResponseBody](../../models/operations/getonepromptresponsebody.md)\>**
224
+ **Promise\<[operations.CreatePromptVersionResponseBody](../../models/operations/createpromptversionresponsebody.md)\>**
297
225
 
298
226
  ### Errors
299
227
 
@@ -301,9 +229,9 @@ run();
301
229
  | --------------- | --------------- | --------------- |
302
230
  | errors.APIError | 4XX, 5XX | \*/\* |
303
231
 
304
- ## update
232
+ ## delete
305
233
 
306
- Update a prompt
234
+ Delete a prompt
307
235
 
308
236
  ### Example Usage
309
237
 
@@ -315,12 +243,11 @@ const orq = new Orq({
315
243
  });
316
244
 
317
245
  async function run() {
318
- const result = await orq.prompts.update({
246
+ await orq.prompts.delete({
319
247
  id: "<id>",
320
248
  });
321
249
 
322
- // Handle the result
323
- console.log(result);
250
+
324
251
  }
325
252
 
326
253
  run();
@@ -332,7 +259,7 @@ The standalone function version of this method:
332
259
 
333
260
  ```typescript
334
261
  import { OrqCore } from "@orq-ai/node/core.js";
335
- import { promptsUpdate } from "@orq-ai/node/funcs/promptsUpdate.js";
262
+ import { promptsDelete } from "@orq-ai/node/funcs/promptsDelete.js";
336
263
 
337
264
  // Use `OrqCore` for best tree-shaking performance.
338
265
  // You can create one instance of it to use across an application.
@@ -341,7 +268,7 @@ const orq = new OrqCore({
341
268
  });
342
269
 
343
270
  async function run() {
344
- const res = await promptsUpdate(orq, {
271
+ const res = await promptsDelete(orq, {
345
272
  id: "<id>",
346
273
  });
347
274
 
@@ -351,8 +278,7 @@ async function run() {
351
278
 
352
279
  const { value: result } = res;
353
280
 
354
- // Handle the result
355
- console.log(result);
281
+
356
282
  }
357
283
 
358
284
  run();
@@ -362,25 +288,24 @@ run();
362
288
 
363
289
  | Parameter | Type | Required | Description |
364
290
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
365
- | `request` | [operations.UpdatePromptRequest](../../models/operations/updatepromptrequest.md) | :heavy_check_mark: | The request object to use for the request. |
291
+ | `request` | [operations.DeletePromptRequest](../../models/operations/deletepromptrequest.md) | :heavy_check_mark: | The request object to use for the request. |
366
292
  | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
367
293
  | `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. |
368
294
  | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
369
295
 
370
296
  ### Response
371
297
 
372
- **Promise\<[operations.UpdatePromptResponseBody](../../models/operations/updatepromptresponsebody.md)\>**
298
+ **Promise\<void\>**
373
299
 
374
300
  ### Errors
375
301
 
376
- | Error Type | Status Code | Content Type |
377
- | ------------------------------- | ------------------------------- | ------------------------------- |
378
- | errors.UpdatePromptResponseBody | 404 | application/json |
379
- | errors.APIError | 4XX, 5XX | \*/\* |
302
+ | Error Type | Status Code | Content Type |
303
+ | --------------- | --------------- | --------------- |
304
+ | errors.APIError | 4XX, 5XX | \*/\* |
380
305
 
381
- ## delete
306
+ ## getOne
382
307
 
383
- Delete a prompt
308
+ Get one prompt
384
309
 
385
310
  ### Example Usage
386
311
 
@@ -392,7 +317,7 @@ const orq = new Orq({
392
317
  });
393
318
 
394
319
  async function run() {
395
- await orq.prompts.delete({
320
+ await orq.prompts.getOne({
396
321
  id: "<id>",
397
322
  });
398
323
 
@@ -408,7 +333,7 @@ The standalone function version of this method:
408
333
 
409
334
  ```typescript
410
335
  import { OrqCore } from "@orq-ai/node/core.js";
411
- import { promptsDelete } from "@orq-ai/node/funcs/promptsDelete.js";
336
+ import { promptsGetOne } from "@orq-ai/node/funcs/promptsGetOne.js";
412
337
 
413
338
  // Use `OrqCore` for best tree-shaking performance.
414
339
  // You can create one instance of it to use across an application.
@@ -417,7 +342,7 @@ const orq = new OrqCore({
417
342
  });
418
343
 
419
344
  async function run() {
420
- const res = await promptsDelete(orq, {
345
+ const res = await promptsGetOne(orq, {
421
346
  id: "<id>",
422
347
  });
423
348
 
@@ -437,7 +362,7 @@ run();
437
362
 
438
363
  | Parameter | Type | Required | Description |
439
364
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
440
- | `request` | [operations.DeletePromptRequest](../../models/operations/deletepromptrequest.md) | :heavy_check_mark: | The request object to use for the request. |
365
+ | `request` | [operations.GetOnePromptRequest](../../models/operations/getonepromptrequest.md) | :heavy_check_mark: | The request object to use for the request. |
441
366
  | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
442
367
  | `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. |
443
368
  | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
@@ -452,9 +377,9 @@ run();
452
377
  | --------------- | --------------- | --------------- |
453
378
  | errors.APIError | 4XX, 5XX | \*/\* |
454
379
 
455
- ## listVersions
380
+ ## update
456
381
 
457
- Returns a list of your prompt versions. The prompt versions are returned sorted by creation date, with the most recent prompt versions appearing first
382
+ Update a prompt
458
383
 
459
384
  ### Example Usage
460
385
 
@@ -466,8 +391,8 @@ const orq = new Orq({
466
391
  });
467
392
 
468
393
  async function run() {
469
- const result = await orq.prompts.listVersions({
470
- promptId: "<id>",
394
+ const result = await orq.prompts.update({
395
+ id: "<id>",
471
396
  });
472
397
 
473
398
  // Handle the result
@@ -483,7 +408,7 @@ The standalone function version of this method:
483
408
 
484
409
  ```typescript
485
410
  import { OrqCore } from "@orq-ai/node/core.js";
486
- import { promptsListVersions } from "@orq-ai/node/funcs/promptsListVersions.js";
411
+ import { promptsUpdate } from "@orq-ai/node/funcs/promptsUpdate.js";
487
412
 
488
413
  // Use `OrqCore` for best tree-shaking performance.
489
414
  // You can create one instance of it to use across an application.
@@ -492,8 +417,8 @@ const orq = new OrqCore({
492
417
  });
493
418
 
494
419
  async function run() {
495
- const res = await promptsListVersions(orq, {
496
- promptId: "<id>",
420
+ const res = await promptsUpdate(orq, {
421
+ id: "<id>",
497
422
  });
498
423
 
499
424
  if (!res.ok) {
@@ -513,14 +438,89 @@ run();
513
438
 
514
439
  | Parameter | Type | Required | Description |
515
440
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
516
- | `request` | [operations.ListPromptVersionsRequest](../../models/operations/listpromptversionsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
441
+ | `request` | [operations.UpdatePromptRequest](../../models/operations/updatepromptrequest.md) | :heavy_check_mark: | The request object to use for the request. |
517
442
  | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
518
443
  | `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. |
519
444
  | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
520
445
 
521
446
  ### Response
522
447
 
523
- **Promise\<[operations.ListPromptVersionsResponseBody](../../models/operations/listpromptversionsresponsebody.md)\>**
448
+ **Promise\<[operations.UpdatePromptResponseBody](../../models/operations/updatepromptresponsebody.md)\>**
449
+
450
+ ### Errors
451
+
452
+ | Error Type | Status Code | Content Type |
453
+ | ------------------------------- | ------------------------------- | ------------------------------- |
454
+ | errors.UpdatePromptResponseBody | 404 | application/json |
455
+ | errors.APIError | 4XX, 5XX | \*/\* |
456
+
457
+ ## duplicate
458
+
459
+ Duplicate a prompt
460
+
461
+ ### Example Usage
462
+
463
+ ```typescript
464
+ import { Orq } from "@orq-ai/node";
465
+
466
+ const orq = new Orq({
467
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
468
+ });
469
+
470
+ async function run() {
471
+ await orq.prompts.duplicate({
472
+ id: "<id>",
473
+ });
474
+
475
+
476
+ }
477
+
478
+ run();
479
+ ```
480
+
481
+ ### Standalone function
482
+
483
+ The standalone function version of this method:
484
+
485
+ ```typescript
486
+ import { OrqCore } from "@orq-ai/node/core.js";
487
+ import { promptsDuplicate } from "@orq-ai/node/funcs/promptsDuplicate.js";
488
+
489
+ // Use `OrqCore` for best tree-shaking performance.
490
+ // You can create one instance of it to use across an application.
491
+ const orq = new OrqCore({
492
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
493
+ });
494
+
495
+ async function run() {
496
+ const res = await promptsDuplicate(orq, {
497
+ id: "<id>",
498
+ });
499
+
500
+ if (!res.ok) {
501
+ throw res.error;
502
+ }
503
+
504
+ const { value: result } = res;
505
+
506
+
507
+ }
508
+
509
+ run();
510
+ ```
511
+
512
+ ### Parameters
513
+
514
+ | Parameter | Type | Required | Description |
515
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
516
+ | `request` | [operations.DuplicatePromptRequest](../../models/operations/duplicatepromptrequest.md) | :heavy_check_mark: | The request object to use for the request. |
517
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
518
+ | `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. |
519
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
520
+
521
+ ### Response
522
+
523
+ **Promise\<void\>**
524
524
 
525
525
  ### Errors
526
526
 
@@ -528,9 +528,9 @@ run();
528
528
  | --------------- | --------------- | --------------- |
529
529
  | errors.APIError | 4XX, 5XX | \*/\* |
530
530
 
531
- ## getVersion
531
+ ## getAll
532
532
 
533
- Retrieves a specific version of a prompt by its ID and version ID.
533
+ Get all prompts
534
534
 
535
535
  ### Example Usage
536
536
 
@@ -542,10 +542,7 @@ const orq = new Orq({
542
542
  });
543
543
 
544
544
  async function run() {
545
- const result = await orq.prompts.getVersion({
546
- promptId: "<id>",
547
- versionId: "<id>",
548
- });
545
+ const result = await orq.prompts.getAll();
549
546
 
550
547
  // Handle the result
551
548
  console.log(result);
@@ -560,7 +557,7 @@ The standalone function version of this method:
560
557
 
561
558
  ```typescript
562
559
  import { OrqCore } from "@orq-ai/node/core.js";
563
- import { promptsGetVersion } from "@orq-ai/node/funcs/promptsGetVersion.js";
560
+ import { promptsGetAll } from "@orq-ai/node/funcs/promptsGetAll.js";
564
561
 
565
562
  // Use `OrqCore` for best tree-shaking performance.
566
563
  // You can create one instance of it to use across an application.
@@ -569,10 +566,7 @@ const orq = new OrqCore({
569
566
  });
570
567
 
571
568
  async function run() {
572
- const res = await promptsGetVersion(orq, {
573
- promptId: "<id>",
574
- versionId: "<id>",
575
- });
569
+ const res = await promptsGetAll(orq);
576
570
 
577
571
  if (!res.ok) {
578
572
  throw res.error;
@@ -591,18 +585,17 @@ run();
591
585
 
592
586
  | Parameter | Type | Required | Description |
593
587
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
594
- | `request` | [operations.GetPromptVersionRequest](../../models/operations/getpromptversionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
588
+ | `request` | [operations.GetAllPromptsRequestBody](../../models/operations/getallpromptsrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
595
589
  | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
596
590
  | `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. |
597
591
  | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
598
592
 
599
593
  ### Response
600
594
 
601
- **Promise\<[operations.GetPromptVersionResponseBody](../../models/operations/getpromptversionresponsebody.md)\>**
595
+ **Promise\<[operations.GetAllPromptsResponseBody](../../models/operations/getallpromptsresponsebody.md)\>**
602
596
 
603
597
  ### Errors
604
598
 
605
- | Error Type | Status Code | Content Type |
606
- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
607
- | errors.GetPromptVersionResponseBody | 404 | application/json |
608
- | errors.APIError | 4XX, 5XX | \*/\* |
599
+ | Error Type | Status Code | Content Type |
600
+ | --------------- | --------------- | --------------- |
601
+ | errors.APIError | 4XX, 5XX | \*/\* |
@@ -0,0 +1,84 @@
1
+ # Snippets
2
+ (*prompt.snippets*)
3
+
4
+ ## Overview
5
+
6
+ ### Available Operations
7
+
8
+ * [findOne](#findone) - Get one prompt snippet
9
+
10
+ ## findOne
11
+
12
+ Get one prompt snippet
13
+
14
+ ### Example Usage
15
+
16
+ ```typescript
17
+ import { Orq } from "@orq-ai/node";
18
+
19
+ const orq = new Orq({
20
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
21
+ });
22
+
23
+ async function run() {
24
+ const result = await orq.prompt.snippets.findOne({
25
+ key: "<key>",
26
+ });
27
+
28
+ // Handle the result
29
+ console.log(result);
30
+ }
31
+
32
+ run();
33
+ ```
34
+
35
+ ### Standalone function
36
+
37
+ The standalone function version of this method:
38
+
39
+ ```typescript
40
+ import { OrqCore } from "@orq-ai/node/core.js";
41
+ import { promptSnippetsFindOne } from "@orq-ai/node/funcs/promptSnippetsFindOne.js";
42
+
43
+ // Use `OrqCore` for best tree-shaking performance.
44
+ // You can create one instance of it to use across an application.
45
+ const orq = new OrqCore({
46
+ apiKey: process.env["ORQ_API_KEY"] ?? "",
47
+ });
48
+
49
+ async function run() {
50
+ const res = await promptSnippetsFindOne(orq, {
51
+ key: "<key>",
52
+ });
53
+
54
+ if (!res.ok) {
55
+ throw res.error;
56
+ }
57
+
58
+ const { value: result } = res;
59
+
60
+ // Handle the result
61
+ console.log(result);
62
+ }
63
+
64
+ run();
65
+ ```
66
+
67
+ ### Parameters
68
+
69
+ | Parameter | Type | Required | Description |
70
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
71
+ | `request` | [operations.FindOnePromptSnippetRequest](../../models/operations/findonepromptsnippetrequest.md) | :heavy_check_mark: | The request object to use for the request. |
72
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
73
+ | `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. |
74
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
75
+
76
+ ### Response
77
+
78
+ **Promise\<[operations.FindOnePromptSnippetResponseBody](../../models/operations/findonepromptsnippetresponsebody.md)\>**
79
+
80
+ ### Errors
81
+
82
+ | Error Type | Status Code | Content Type |
83
+ | --------------- | --------------- | --------------- |
84
+ | errors.APIError | 4XX, 5XX | \*/\* |