@orq-ai/node 3.1.0-rc.54 → 3.1.0-rc.55

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 (240) hide show
  1. package/README.md +7 -3
  2. package/docs/sdks/prompts/README.md +182 -25
  3. package/funcs/contactsCreate.d.ts.map +1 -1
  4. package/funcs/contactsCreate.js +0 -4
  5. package/funcs/contactsCreate.js.map +1 -1
  6. package/funcs/deploymentsGetConfig.d.ts.map +1 -1
  7. package/funcs/deploymentsGetConfig.js +0 -4
  8. package/funcs/deploymentsGetConfig.js.map +1 -1
  9. package/funcs/deploymentsList.d.ts.map +1 -1
  10. package/funcs/deploymentsList.js +0 -4
  11. package/funcs/deploymentsList.js.map +1 -1
  12. package/funcs/deploymentsMetricsCreate.d.ts.map +1 -1
  13. package/funcs/deploymentsMetricsCreate.js +0 -4
  14. package/funcs/deploymentsMetricsCreate.js.map +1 -1
  15. package/funcs/feedbackCreate.d.ts.map +1 -1
  16. package/funcs/feedbackCreate.js +0 -4
  17. package/funcs/feedbackCreate.js.map +1 -1
  18. package/funcs/filesDelete.d.ts.map +1 -1
  19. package/funcs/filesDelete.js +0 -4
  20. package/funcs/filesDelete.js.map +1 -1
  21. package/funcs/filesGet.d.ts.map +1 -1
  22. package/funcs/filesGet.js +0 -4
  23. package/funcs/filesGet.js.map +1 -1
  24. package/funcs/filesList.d.ts.map +1 -1
  25. package/funcs/filesList.js +0 -4
  26. package/funcs/filesList.js.map +1 -1
  27. package/funcs/filesUpload.d.ts.map +1 -1
  28. package/funcs/filesUpload.js +0 -4
  29. package/funcs/filesUpload.js.map +1 -1
  30. package/funcs/promptSnippetsCreate.d.ts.map +1 -1
  31. package/funcs/promptSnippetsCreate.js +0 -4
  32. package/funcs/promptSnippetsCreate.js.map +1 -1
  33. package/funcs/promptSnippetsDelete.d.ts.map +1 -1
  34. package/funcs/promptSnippetsDelete.js +0 -4
  35. package/funcs/promptSnippetsDelete.js.map +1 -1
  36. package/funcs/promptSnippetsGet.d.ts.map +1 -1
  37. package/funcs/promptSnippetsGet.js +0 -4
  38. package/funcs/promptSnippetsGet.js.map +1 -1
  39. package/funcs/promptSnippetsGetByKey.d.ts.map +1 -1
  40. package/funcs/promptSnippetsGetByKey.js +0 -4
  41. package/funcs/promptSnippetsGetByKey.js.map +1 -1
  42. package/funcs/promptSnippetsList.d.ts.map +1 -1
  43. package/funcs/promptSnippetsList.js +0 -4
  44. package/funcs/promptSnippetsList.js.map +1 -1
  45. package/funcs/promptSnippetsUpdate.d.ts.map +1 -1
  46. package/funcs/promptSnippetsUpdate.js +0 -4
  47. package/funcs/promptSnippetsUpdate.js.map +1 -1
  48. package/funcs/promptsCreate.d.ts.map +1 -1
  49. package/funcs/promptsCreate.js +0 -4
  50. package/funcs/promptsCreate.js.map +1 -1
  51. package/funcs/promptsDelete.d.ts.map +1 -1
  52. package/funcs/promptsDelete.js +0 -4
  53. package/funcs/promptsDelete.js.map +1 -1
  54. package/funcs/promptsGetVersion.d.ts +16 -0
  55. package/funcs/promptsGetVersion.d.ts.map +1 -0
  56. package/funcs/promptsGetVersion.js +120 -0
  57. package/funcs/promptsGetVersion.js.map +1 -0
  58. package/funcs/promptsList.d.ts +3 -0
  59. package/funcs/promptsList.d.ts.map +1 -1
  60. package/funcs/promptsList.js +3 -4
  61. package/funcs/promptsList.js.map +1 -1
  62. package/funcs/promptsListVersions.d.ts +15 -0
  63. package/funcs/promptsListVersions.d.ts.map +1 -0
  64. package/funcs/promptsListVersions.js +118 -0
  65. package/funcs/promptsListVersions.js.map +1 -0
  66. package/funcs/{promptsGet.d.ts → promptsRetrieve.d.ts} +5 -2
  67. package/funcs/promptsRetrieve.d.ts.map +1 -0
  68. package/funcs/{promptsGet.js → promptsRetrieve.js} +6 -7
  69. package/funcs/promptsRetrieve.js.map +1 -0
  70. package/funcs/promptsUpdate.d.ts.map +1 -1
  71. package/funcs/promptsUpdate.js +0 -4
  72. package/funcs/promptsUpdate.js.map +1 -1
  73. package/funcs/remoteconfigGetConfig.d.ts.map +1 -1
  74. package/funcs/remoteconfigGetConfig.js +0 -4
  75. package/funcs/remoteconfigGetConfig.js.map +1 -1
  76. package/jsr.json +1 -1
  77. package/lib/config.d.ts +2 -2
  78. package/lib/config.js +2 -2
  79. package/models/errors/getpromptversion.d.ts +36 -0
  80. package/models/errors/getpromptversion.d.ts.map +1 -0
  81. package/models/errors/getpromptversion.js +79 -0
  82. package/models/errors/getpromptversion.js.map +1 -0
  83. package/models/errors/index.d.ts +1 -0
  84. package/models/errors/index.d.ts.map +1 -1
  85. package/models/errors/index.js +1 -0
  86. package/models/errors/index.js.map +1 -1
  87. package/models/operations/createcontact.d.ts +0 -25
  88. package/models/operations/createcontact.d.ts.map +1 -1
  89. package/models/operations/createcontact.js +3 -30
  90. package/models/operations/createcontact.js.map +1 -1
  91. package/models/operations/createfeedback.d.ts +0 -25
  92. package/models/operations/createfeedback.d.ts.map +1 -1
  93. package/models/operations/createfeedback.js +1 -28
  94. package/models/operations/createfeedback.js.map +1 -1
  95. package/models/operations/createprompt.d.ts +690 -1932
  96. package/models/operations/createprompt.d.ts.map +1 -1
  97. package/models/operations/createprompt.js +49 -1105
  98. package/models/operations/createprompt.js.map +1 -1
  99. package/models/operations/createpromptsnippet.d.ts +0 -25
  100. package/models/operations/createpromptsnippet.d.ts.map +1 -1
  101. package/models/operations/createpromptsnippet.js +9 -36
  102. package/models/operations/createpromptsnippet.js.map +1 -1
  103. package/models/operations/deleteprompt.d.ts +0 -25
  104. package/models/operations/deleteprompt.d.ts.map +1 -1
  105. package/models/operations/deleteprompt.js +1 -28
  106. package/models/operations/deleteprompt.js.map +1 -1
  107. package/models/operations/deletepromptsnippet.d.ts +0 -25
  108. package/models/operations/deletepromptsnippet.d.ts.map +1 -1
  109. package/models/operations/deletepromptsnippet.js +1 -28
  110. package/models/operations/deletepromptsnippet.js.map +1 -1
  111. package/models/operations/deploymentcreatemetric.d.ts +0 -25
  112. package/models/operations/deploymentcreatemetric.d.ts.map +1 -1
  113. package/models/operations/deploymentcreatemetric.js +2 -29
  114. package/models/operations/deploymentcreatemetric.js.map +1 -1
  115. package/models/operations/deploymentgetconfig.d.ts +0 -25
  116. package/models/operations/deploymentgetconfig.d.ts.map +1 -1
  117. package/models/operations/deploymentgetconfig.js +4 -31
  118. package/models/operations/deploymentgetconfig.js.map +1 -1
  119. package/models/operations/deployments.d.ts +0 -25
  120. package/models/operations/deployments.d.ts.map +1 -1
  121. package/models/operations/deployments.js +3 -30
  122. package/models/operations/deployments.js.map +1 -1
  123. package/models/operations/filedelete.d.ts +0 -25
  124. package/models/operations/filedelete.d.ts.map +1 -1
  125. package/models/operations/filedelete.js +1 -28
  126. package/models/operations/filedelete.js.map +1 -1
  127. package/models/operations/fileget.d.ts +0 -25
  128. package/models/operations/fileget.d.ts.map +1 -1
  129. package/models/operations/fileget.js +3 -30
  130. package/models/operations/fileget.js.map +1 -1
  131. package/models/operations/filelist.d.ts +0 -25
  132. package/models/operations/filelist.d.ts.map +1 -1
  133. package/models/operations/filelist.js +3 -30
  134. package/models/operations/filelist.js.map +1 -1
  135. package/models/operations/fileupload.d.ts +0 -25
  136. package/models/operations/fileupload.d.ts.map +1 -1
  137. package/models/operations/fileupload.js +3 -30
  138. package/models/operations/fileupload.js.map +1 -1
  139. package/models/operations/findonebykeypromptsnippet.d.ts +0 -25
  140. package/models/operations/findonebykeypromptsnippet.d.ts.map +1 -1
  141. package/models/operations/findonebykeypromptsnippet.js +7 -34
  142. package/models/operations/findonebykeypromptsnippet.js.map +1 -1
  143. package/models/operations/findonepromptsnippet.d.ts +0 -25
  144. package/models/operations/findonepromptsnippet.d.ts.map +1 -1
  145. package/models/operations/findonepromptsnippet.js +7 -34
  146. package/models/operations/findonepromptsnippet.js.map +1 -1
  147. package/models/operations/getallprompts.d.ts +426 -1671
  148. package/models/operations/getallprompts.d.ts.map +1 -1
  149. package/models/operations/getallprompts.js +47 -1099
  150. package/models/operations/getallprompts.js.map +1 -1
  151. package/models/operations/getallpromptsnippets.d.ts +0 -25
  152. package/models/operations/getallpromptsnippets.d.ts.map +1 -1
  153. package/models/operations/getallpromptsnippets.js +7 -34
  154. package/models/operations/getallpromptsnippets.js.map +1 -1
  155. package/models/operations/getoneprompt.d.ts +0 -25
  156. package/models/operations/getoneprompt.d.ts.map +1 -1
  157. package/models/operations/getoneprompt.js +1 -28
  158. package/models/operations/getoneprompt.js.map +1 -1
  159. package/models/operations/getpromptversion.d.ts +1228 -0
  160. package/models/operations/getpromptversion.d.ts.map +1 -0
  161. package/models/operations/getpromptversion.js +1080 -0
  162. package/models/operations/getpromptversion.js.map +1 -0
  163. package/models/operations/index.d.ts +2 -0
  164. package/models/operations/index.d.ts.map +1 -1
  165. package/models/operations/index.js +2 -0
  166. package/models/operations/index.js.map +1 -1
  167. package/models/operations/listpromptversions.d.ts +1286 -0
  168. package/models/operations/listpromptversions.d.ts.map +1 -0
  169. package/models/operations/listpromptversions.js +1142 -0
  170. package/models/operations/listpromptversions.js.map +1 -0
  171. package/models/operations/remoteconfigsgetconfig.d.ts +0 -25
  172. package/models/operations/remoteconfigsgetconfig.d.ts.map +1 -1
  173. package/models/operations/remoteconfigsgetconfig.js +1 -28
  174. package/models/operations/remoteconfigsgetconfig.js.map +1 -1
  175. package/models/operations/updateprompt.d.ts +728 -1958
  176. package/models/operations/updateprompt.d.ts.map +1 -1
  177. package/models/operations/updateprompt.js +67 -1105
  178. package/models/operations/updateprompt.js.map +1 -1
  179. package/models/operations/updatepromptsnippet.d.ts +0 -25
  180. package/models/operations/updatepromptsnippet.d.ts.map +1 -1
  181. package/models/operations/updatepromptsnippet.js +9 -36
  182. package/models/operations/updatepromptsnippet.js.map +1 -1
  183. package/package.json +1 -1
  184. package/sdk/prompts.d.ts +24 -4
  185. package/sdk/prompts.d.ts.map +1 -1
  186. package/sdk/prompts.js +33 -7
  187. package/sdk/prompts.js.map +1 -1
  188. package/src/funcs/contactsCreate.ts +1 -5
  189. package/src/funcs/deploymentsGetConfig.ts +1 -5
  190. package/src/funcs/deploymentsList.ts +1 -5
  191. package/src/funcs/deploymentsMetricsCreate.ts +0 -4
  192. package/src/funcs/feedbackCreate.ts +1 -5
  193. package/src/funcs/filesDelete.ts +0 -4
  194. package/src/funcs/filesGet.ts +0 -4
  195. package/src/funcs/filesList.ts +1 -5
  196. package/src/funcs/filesUpload.ts +1 -5
  197. package/src/funcs/promptSnippetsCreate.ts +1 -5
  198. package/src/funcs/promptSnippetsDelete.ts +0 -4
  199. package/src/funcs/promptSnippetsGet.ts +0 -4
  200. package/src/funcs/promptSnippetsGetByKey.ts +0 -4
  201. package/src/funcs/promptSnippetsList.ts +1 -5
  202. package/src/funcs/promptSnippetsUpdate.ts +0 -4
  203. package/src/funcs/promptsCreate.ts +1 -5
  204. package/src/funcs/promptsDelete.ts +0 -4
  205. package/src/funcs/promptsGetVersion.ts +146 -0
  206. package/src/funcs/promptsList.ts +4 -5
  207. package/src/funcs/promptsListVersions.ts +139 -0
  208. package/src/funcs/{promptsGet.ts → promptsRetrieve.ts} +4 -5
  209. package/src/funcs/promptsUpdate.ts +0 -4
  210. package/src/funcs/remoteconfigGetConfig.ts +1 -5
  211. package/src/lib/config.ts +2 -2
  212. package/src/models/errors/getpromptversion.ts +71 -0
  213. package/src/models/errors/index.ts +1 -0
  214. package/src/models/operations/createcontact.ts +2 -60
  215. package/src/models/operations/createfeedback.ts +0 -58
  216. package/src/models/operations/createprompt.ts +1375 -3592
  217. package/src/models/operations/createpromptsnippet.ts +2 -60
  218. package/src/models/operations/deleteprompt.ts +0 -58
  219. package/src/models/operations/deletepromptsnippet.ts +0 -58
  220. package/src/models/operations/deploymentcreatemetric.ts +0 -60
  221. package/src/models/operations/deploymentgetconfig.ts +0 -58
  222. package/src/models/operations/deployments.ts +0 -58
  223. package/src/models/operations/filedelete.ts +0 -58
  224. package/src/models/operations/fileget.ts +2 -56
  225. package/src/models/operations/filelist.ts +2 -58
  226. package/src/models/operations/fileupload.ts +2 -60
  227. package/src/models/operations/findonebykeypromptsnippet.ts +2 -62
  228. package/src/models/operations/findonepromptsnippet.ts +2 -62
  229. package/src/models/operations/getallprompts.ts +732 -2826
  230. package/src/models/operations/getallpromptsnippets.ts +2 -62
  231. package/src/models/operations/getoneprompt.ts +0 -58
  232. package/src/models/operations/getpromptversion.ts +2012 -0
  233. package/src/models/operations/index.ts +2 -0
  234. package/src/models/operations/listpromptversions.ts +2146 -0
  235. package/src/models/operations/remoteconfigsgetconfig.ts +0 -60
  236. package/src/models/operations/updateprompt.ts +1544 -3731
  237. package/src/models/operations/updatepromptsnippet.ts +2 -60
  238. package/src/sdk/prompts.ts +53 -11
  239. package/funcs/promptsGet.d.ts.map +0 -1
  240. package/funcs/promptsGet.js.map +0 -1
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { OrqCore } from "../core.js";
6
- import { encodeJSON, encodeSimple } from "../lib/encodings.js";
6
+ import { encodeJSON } from "../lib/encodings.js";
7
7
  import * as M from "../lib/matchers.js";
8
8
  import { compactMap } from "../lib/primitives.js";
9
9
  import { safeParse } from "../lib/schemas.js";
@@ -60,10 +60,6 @@ export async function feedbackCreate(
60
60
  const headers = new Headers(compactMap({
61
61
  "Content-Type": "application/json",
62
62
  Accept: "application/json",
63
- "contactId": encodeSimple("contactId", client._options.contactId, {
64
- explode: false,
65
- charEncoding: "none",
66
- }),
67
63
  }));
68
64
 
69
65
  const secConfig = await extractSecurity(client._options.apiKey);
@@ -64,10 +64,6 @@ export async function filesDelete(
64
64
 
65
65
  const headers = new Headers(compactMap({
66
66
  Accept: "*/*",
67
- "contactId": encodeSimple("contactId", client._options.contactId, {
68
- explode: false,
69
- charEncoding: "none",
70
- }),
71
67
  }));
72
68
 
73
69
  const secConfig = await extractSecurity(client._options.apiKey);
@@ -63,10 +63,6 @@ export async function filesGet(
63
63
 
64
64
  const headers = new Headers(compactMap({
65
65
  Accept: "application/json",
66
- "contactId": encodeSimple("contactId", client._options.contactId, {
67
- explode: false,
68
- charEncoding: "none",
69
- }),
70
66
  }));
71
67
 
72
68
  const secConfig = await extractSecurity(client._options.apiKey);
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { OrqCore } from "../core.js";
6
- import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
6
+ import { encodeFormQuery } from "../lib/encodings.js";
7
7
  import * as M from "../lib/matchers.js";
8
8
  import { compactMap } from "../lib/primitives.js";
9
9
  import { safeParse } from "../lib/schemas.js";
@@ -64,10 +64,6 @@ export async function filesList(
64
64
 
65
65
  const headers = new Headers(compactMap({
66
66
  Accept: "application/json",
67
- "contactId": encodeSimple("contactId", client._options.contactId, {
68
- explode: false,
69
- charEncoding: "none",
70
- }),
71
67
  }));
72
68
 
73
69
  const secConfig = await extractSecurity(client._options.apiKey);
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { OrqCore } from "../core.js";
6
- import { appendForm, encodeSimple } from "../lib/encodings.js";
6
+ import { appendForm } from "../lib/encodings.js";
7
7
  import { readableStreamToArrayBuffer } from "../lib/files.js";
8
8
  import * as M from "../lib/matchers.js";
9
9
  import { compactMap } from "../lib/primitives.js";
@@ -83,10 +83,6 @@ export async function filesUpload(
83
83
 
84
84
  const headers = new Headers(compactMap({
85
85
  Accept: "application/json",
86
- "contactId": encodeSimple("contactId", client._options.contactId, {
87
- explode: false,
88
- charEncoding: "none",
89
- }),
90
86
  }));
91
87
 
92
88
  const secConfig = await extractSecurity(client._options.apiKey);
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { OrqCore } from "../core.js";
6
- import { encodeJSON, encodeSimple } from "../lib/encodings.js";
6
+ import { encodeJSON } from "../lib/encodings.js";
7
7
  import * as M from "../lib/matchers.js";
8
8
  import { compactMap } from "../lib/primitives.js";
9
9
  import { safeParse } from "../lib/schemas.js";
@@ -62,10 +62,6 @@ export async function promptSnippetsCreate(
62
62
  const headers = new Headers(compactMap({
63
63
  "Content-Type": "application/json",
64
64
  Accept: "application/json",
65
- "contactId": encodeSimple("contactId", client._options.contactId, {
66
- explode: false,
67
- charEncoding: "none",
68
- }),
69
65
  }));
70
66
 
71
67
  const secConfig = await extractSecurity(client._options.apiKey);
@@ -65,10 +65,6 @@ export async function promptSnippetsDelete(
65
65
 
66
66
  const headers = new Headers(compactMap({
67
67
  Accept: "*/*",
68
- "contactId": encodeSimple("contactId", client._options.contactId, {
69
- explode: false,
70
- charEncoding: "none",
71
- }),
72
68
  }));
73
69
 
74
70
  const secConfig = await extractSecurity(client._options.apiKey);
@@ -64,10 +64,6 @@ export async function promptSnippetsGet(
64
64
 
65
65
  const headers = new Headers(compactMap({
66
66
  Accept: "application/json",
67
- "contactId": encodeSimple("contactId", client._options.contactId, {
68
- explode: false,
69
- charEncoding: "none",
70
- }),
71
67
  }));
72
68
 
73
69
  const secConfig = await extractSecurity(client._options.apiKey);
@@ -66,10 +66,6 @@ export async function promptSnippetsGetByKey(
66
66
 
67
67
  const headers = new Headers(compactMap({
68
68
  Accept: "application/json",
69
- "contactId": encodeSimple("contactId", client._options.contactId, {
70
- explode: false,
71
- charEncoding: "none",
72
- }),
73
69
  }));
74
70
 
75
71
  const secConfig = await extractSecurity(client._options.apiKey);
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { OrqCore } from "../core.js";
6
- import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
6
+ import { encodeFormQuery } from "../lib/encodings.js";
7
7
  import * as M from "../lib/matchers.js";
8
8
  import { compactMap } from "../lib/primitives.js";
9
9
  import { safeParse } from "../lib/schemas.js";
@@ -65,10 +65,6 @@ export async function promptSnippetsList(
65
65
 
66
66
  const headers = new Headers(compactMap({
67
67
  Accept: "application/json",
68
- "contactId": encodeSimple("contactId", client._options.contactId, {
69
- explode: false,
70
- charEncoding: "none",
71
- }),
72
68
  }));
73
69
 
74
70
  const secConfig = await extractSecurity(client._options.apiKey);
@@ -67,10 +67,6 @@ export async function promptSnippetsUpdate(
67
67
  const headers = new Headers(compactMap({
68
68
  "Content-Type": "application/json",
69
69
  Accept: "application/json",
70
- "contactId": encodeSimple("contactId", client._options.contactId, {
71
- explode: false,
72
- charEncoding: "none",
73
- }),
74
70
  }));
75
71
 
76
72
  const secConfig = await extractSecurity(client._options.apiKey);
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { OrqCore } from "../core.js";
6
- import { encodeJSON, encodeSimple } from "../lib/encodings.js";
6
+ import { encodeJSON } from "../lib/encodings.js";
7
7
  import * as M from "../lib/matchers.js";
8
8
  import { compactMap } from "../lib/primitives.js";
9
9
  import { safeParse } from "../lib/schemas.js";
@@ -60,10 +60,6 @@ export async function promptsCreate(
60
60
  const headers = new Headers(compactMap({
61
61
  "Content-Type": "application/json",
62
62
  Accept: "application/json",
63
- "contactId": encodeSimple("contactId", client._options.contactId, {
64
- explode: false,
65
- charEncoding: "none",
66
- }),
67
63
  }));
68
64
 
69
65
  const secConfig = await extractSecurity(client._options.apiKey);
@@ -64,10 +64,6 @@ export async function promptsDelete(
64
64
 
65
65
  const headers = new Headers(compactMap({
66
66
  Accept: "*/*",
67
- "contactId": encodeSimple("contactId", client._options.contactId, {
68
- explode: false,
69
- charEncoding: "none",
70
- }),
71
67
  }));
72
68
 
73
69
  const secConfig = await extractSecurity(client._options.apiKey);
@@ -0,0 +1,146 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { OrqCore } from "../core.js";
6
+ import { encodeSimple } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import { APIError } from "../models/errors/apierror.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import * as errors from "../models/errors/index.js";
22
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
23
+ import * as operations from "../models/operations/index.js";
24
+ import { Result } from "../types/fp.js";
25
+
26
+ /**
27
+ * Retrieve a prompt version
28
+ *
29
+ * @remarks
30
+ * Retrieves a specific version of a prompt by its ID and version ID.
31
+ */
32
+ export async function promptsGetVersion(
33
+ client: OrqCore,
34
+ request: operations.GetPromptVersionRequest,
35
+ options?: RequestOptions,
36
+ ): Promise<
37
+ Result<
38
+ operations.GetPromptVersionResponseBody,
39
+ | errors.GetPromptVersionResponseBody
40
+ | APIError
41
+ | SDKValidationError
42
+ | UnexpectedClientError
43
+ | InvalidRequestError
44
+ | RequestAbortedError
45
+ | RequestTimeoutError
46
+ | ConnectionError
47
+ >
48
+ > {
49
+ const parsed = safeParse(
50
+ request,
51
+ (value) => operations.GetPromptVersionRequest$outboundSchema.parse(value),
52
+ "Input validation failed",
53
+ );
54
+ if (!parsed.ok) {
55
+ return parsed;
56
+ }
57
+ const payload = parsed.value;
58
+ const body = null;
59
+
60
+ const pathParams = {
61
+ prompt_id: encodeSimple("prompt_id", payload.prompt_id, {
62
+ explode: false,
63
+ charEncoding: "percent",
64
+ }),
65
+ version_id: encodeSimple("version_id", payload.version_id, {
66
+ explode: false,
67
+ charEncoding: "percent",
68
+ }),
69
+ };
70
+
71
+ const path = pathToFunc("/v2/prompts/{prompt_id}/versions/{version_id}")(
72
+ pathParams,
73
+ );
74
+
75
+ const headers = new Headers(compactMap({
76
+ Accept: "application/json",
77
+ }));
78
+
79
+ const secConfig = await extractSecurity(client._options.apiKey);
80
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
81
+ const requestSecurity = resolveGlobalSecurity(securityInput);
82
+
83
+ const context = {
84
+ operationID: "GetPromptVersion",
85
+ oAuth2Scopes: [],
86
+
87
+ resolvedSecurity: requestSecurity,
88
+
89
+ securitySource: client._options.apiKey,
90
+ retryConfig: options?.retries
91
+ || client._options.retryConfig
92
+ || { strategy: "none" },
93
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
94
+ };
95
+
96
+ const requestRes = client._createRequest(context, {
97
+ security: requestSecurity,
98
+ method: "GET",
99
+ baseURL: options?.serverURL,
100
+ path: path,
101
+ headers: headers,
102
+ body: body,
103
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
104
+ }, options);
105
+ if (!requestRes.ok) {
106
+ return requestRes;
107
+ }
108
+ const req = requestRes.value;
109
+
110
+ const doResult = await client._do(req, {
111
+ context,
112
+ errorCodes: ["404", "4XX", "5XX"],
113
+ retryConfig: context.retryConfig,
114
+ retryCodes: context.retryCodes,
115
+ });
116
+ if (!doResult.ok) {
117
+ return doResult;
118
+ }
119
+ const response = doResult.value;
120
+
121
+ const responseFields = {
122
+ HttpMeta: { Response: response, Request: req },
123
+ };
124
+
125
+ const [result] = await M.match<
126
+ operations.GetPromptVersionResponseBody,
127
+ | errors.GetPromptVersionResponseBody
128
+ | APIError
129
+ | SDKValidationError
130
+ | UnexpectedClientError
131
+ | InvalidRequestError
132
+ | RequestAbortedError
133
+ | RequestTimeoutError
134
+ | ConnectionError
135
+ >(
136
+ M.json(200, operations.GetPromptVersionResponseBody$inboundSchema),
137
+ M.jsonErr(404, errors.GetPromptVersionResponseBody$inboundSchema),
138
+ M.fail("4XX"),
139
+ M.fail("5XX"),
140
+ )(response, { extraFields: responseFields });
141
+ if (!result.ok) {
142
+ return result;
143
+ }
144
+
145
+ return result;
146
+ }
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { OrqCore } from "../core.js";
6
- import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
6
+ import { encodeFormQuery } from "../lib/encodings.js";
7
7
  import * as M from "../lib/matchers.js";
8
8
  import { compactMap } from "../lib/primitives.js";
9
9
  import { safeParse } from "../lib/schemas.js";
@@ -24,6 +24,9 @@ import { Result } from "../types/fp.js";
24
24
 
25
25
  /**
26
26
  * List all prompts
27
+ *
28
+ * @remarks
29
+ * Returns a list of your prompts. The prompts are returned sorted by creation date, with the most recent prompts appearing first
27
30
  */
28
31
  export async function promptsList(
29
32
  client: OrqCore,
@@ -63,10 +66,6 @@ export async function promptsList(
63
66
 
64
67
  const headers = new Headers(compactMap({
65
68
  Accept: "application/json",
66
- "contactId": encodeSimple("contactId", client._options.contactId, {
67
- explode: false,
68
- charEncoding: "none",
69
- }),
70
69
  }));
71
70
 
72
71
  const secConfig = await extractSecurity(client._options.apiKey);
@@ -0,0 +1,139 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { OrqCore } from "../core.js";
6
+ import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import { APIError } from "../models/errors/apierror.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
22
+ import * as operations from "../models/operations/index.js";
23
+ import { Result } from "../types/fp.js";
24
+
25
+ /**
26
+ * List all prompt versions
27
+ *
28
+ * @remarks
29
+ * Returns a list of your prompt versions. The prompt versions are returned sorted by creation date, with the most recent prompt versions appearing first
30
+ */
31
+ export async function promptsListVersions(
32
+ client: OrqCore,
33
+ request: operations.ListPromptVersionsRequest,
34
+ options?: RequestOptions,
35
+ ): Promise<
36
+ Result<
37
+ operations.ListPromptVersionsResponseBody,
38
+ | APIError
39
+ | SDKValidationError
40
+ | UnexpectedClientError
41
+ | InvalidRequestError
42
+ | RequestAbortedError
43
+ | RequestTimeoutError
44
+ | ConnectionError
45
+ >
46
+ > {
47
+ const parsed = safeParse(
48
+ request,
49
+ (value) => operations.ListPromptVersionsRequest$outboundSchema.parse(value),
50
+ "Input validation failed",
51
+ );
52
+ if (!parsed.ok) {
53
+ return parsed;
54
+ }
55
+ const payload = parsed.value;
56
+ const body = null;
57
+
58
+ const pathParams = {
59
+ prompt_id: encodeSimple("prompt_id", payload.prompt_id, {
60
+ explode: false,
61
+ charEncoding: "percent",
62
+ }),
63
+ };
64
+
65
+ const path = pathToFunc("/v2/prompts/{prompt_id}/versions")(pathParams);
66
+
67
+ const query = encodeFormQuery({
68
+ "ending_before": payload.ending_before,
69
+ "limit": payload.limit,
70
+ "starting_after": payload.starting_after,
71
+ });
72
+
73
+ const headers = new Headers(compactMap({
74
+ Accept: "application/json",
75
+ }));
76
+
77
+ const secConfig = await extractSecurity(client._options.apiKey);
78
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
79
+ const requestSecurity = resolveGlobalSecurity(securityInput);
80
+
81
+ const context = {
82
+ operationID: "ListPromptVersions",
83
+ oAuth2Scopes: [],
84
+
85
+ resolvedSecurity: requestSecurity,
86
+
87
+ securitySource: client._options.apiKey,
88
+ retryConfig: options?.retries
89
+ || client._options.retryConfig
90
+ || { strategy: "none" },
91
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
92
+ };
93
+
94
+ const requestRes = client._createRequest(context, {
95
+ security: requestSecurity,
96
+ method: "GET",
97
+ baseURL: options?.serverURL,
98
+ path: path,
99
+ headers: headers,
100
+ query: query,
101
+ body: body,
102
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
103
+ }, options);
104
+ if (!requestRes.ok) {
105
+ return requestRes;
106
+ }
107
+ const req = requestRes.value;
108
+
109
+ const doResult = await client._do(req, {
110
+ context,
111
+ errorCodes: ["4XX", "5XX"],
112
+ retryConfig: context.retryConfig,
113
+ retryCodes: context.retryCodes,
114
+ });
115
+ if (!doResult.ok) {
116
+ return doResult;
117
+ }
118
+ const response = doResult.value;
119
+
120
+ const [result] = await M.match<
121
+ operations.ListPromptVersionsResponseBody,
122
+ | APIError
123
+ | SDKValidationError
124
+ | UnexpectedClientError
125
+ | InvalidRequestError
126
+ | RequestAbortedError
127
+ | RequestTimeoutError
128
+ | ConnectionError
129
+ >(
130
+ M.json(200, operations.ListPromptVersionsResponseBody$inboundSchema),
131
+ M.fail("4XX"),
132
+ M.fail("5XX"),
133
+ )(response);
134
+ if (!result.ok) {
135
+ return result;
136
+ }
137
+
138
+ return result;
139
+ }
@@ -25,8 +25,11 @@ import { Result } from "../types/fp.js";
25
25
 
26
26
  /**
27
27
  * Retrieve a prompt
28
+ *
29
+ * @remarks
30
+ * Retrieves a prompt object
28
31
  */
29
- export async function promptsGet(
32
+ export async function promptsRetrieve(
30
33
  client: OrqCore,
31
34
  request: operations.GetOnePromptRequest,
32
35
  options?: RequestOptions,
@@ -64,10 +67,6 @@ export async function promptsGet(
64
67
 
65
68
  const headers = new Headers(compactMap({
66
69
  Accept: "*/*",
67
- "contactId": encodeSimple("contactId", client._options.contactId, {
68
- explode: false,
69
- charEncoding: "none",
70
- }),
71
70
  }));
72
71
 
73
72
  const secConfig = await extractSecurity(client._options.apiKey);
@@ -66,10 +66,6 @@ export async function promptsUpdate(
66
66
  const headers = new Headers(compactMap({
67
67
  "Content-Type": "application/json",
68
68
  Accept: "application/json",
69
- "contactId": encodeSimple("contactId", client._options.contactId, {
70
- explode: false,
71
- charEncoding: "none",
72
- }),
73
69
  }));
74
70
 
75
71
  const secConfig = await extractSecurity(client._options.apiKey);
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { OrqCore } from "../core.js";
6
- import { encodeJSON, encodeSimple } from "../lib/encodings.js";
6
+ import { encodeJSON } from "../lib/encodings.js";
7
7
  import * as M from "../lib/matchers.js";
8
8
  import { compactMap } from "../lib/primitives.js";
9
9
  import { safeParse } from "../lib/schemas.js";
@@ -61,10 +61,6 @@ export async function remoteconfigGetConfig(
61
61
  const headers = new Headers(compactMap({
62
62
  "Content-Type": "application/json",
63
63
  Accept: "application/json",
64
- "contactId": encodeSimple("contactId", client._options.contactId, {
65
- explode: false,
66
- charEncoding: "none",
67
- }),
68
64
  }));
69
65
 
70
66
  const secConfig = await extractSecurity(client._options.apiKey);
package/src/lib/config.ts CHANGED
@@ -64,7 +64,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
64
64
  export const SDK_METADATA = {
65
65
  language: "typescript",
66
66
  openapiDocVersion: "2.0",
67
- sdkVersion: "3.1.0-rc.54",
67
+ sdkVersion: "3.1.0-rc.55",
68
68
  genVersion: "2.506.0",
69
- userAgent: "speakeasy-sdk/typescript 3.1.0-rc.54 2.506.0 2.0 @orq-ai/node",
69
+ userAgent: "speakeasy-sdk/typescript 3.1.0-rc.55 2.506.0 2.0 @orq-ai/node",
70
70
  } as const;
@@ -0,0 +1,71 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+
7
+ /**
8
+ * Not Found - The prompt or prompt version does not exist.
9
+ */
10
+ export type GetPromptVersionResponseBodyData = {
11
+ message: string;
12
+ };
13
+
14
+ /**
15
+ * Not Found - The prompt or prompt version does not exist.
16
+ */
17
+ export class GetPromptVersionResponseBody extends Error {
18
+ /** The original data that was passed to this error instance. */
19
+ data$: GetPromptVersionResponseBodyData;
20
+
21
+ constructor(err: GetPromptVersionResponseBodyData) {
22
+ const message = "message" in err && typeof err.message === "string"
23
+ ? err.message
24
+ : `API error occurred: ${JSON.stringify(err)}`;
25
+ super(message);
26
+ this.data$ = err;
27
+
28
+ this.name = "GetPromptVersionResponseBody";
29
+ }
30
+ }
31
+
32
+ /** @internal */
33
+ export const GetPromptVersionResponseBody$inboundSchema: z.ZodType<
34
+ GetPromptVersionResponseBody,
35
+ z.ZodTypeDef,
36
+ unknown
37
+ > = z.object({
38
+ message: z.string(),
39
+ })
40
+ .transform((v) => {
41
+ return new GetPromptVersionResponseBody(v);
42
+ });
43
+
44
+ /** @internal */
45
+ export type GetPromptVersionResponseBody$Outbound = {
46
+ message: string;
47
+ };
48
+
49
+ /** @internal */
50
+ export const GetPromptVersionResponseBody$outboundSchema: z.ZodType<
51
+ GetPromptVersionResponseBody$Outbound,
52
+ z.ZodTypeDef,
53
+ GetPromptVersionResponseBody
54
+ > = z.instanceof(GetPromptVersionResponseBody)
55
+ .transform(v => v.data$)
56
+ .pipe(z.object({
57
+ message: z.string(),
58
+ }));
59
+
60
+ /**
61
+ * @internal
62
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
63
+ */
64
+ export namespace GetPromptVersionResponseBody$ {
65
+ /** @deprecated use `GetPromptVersionResponseBody$inboundSchema` instead. */
66
+ export const inboundSchema = GetPromptVersionResponseBody$inboundSchema;
67
+ /** @deprecated use `GetPromptVersionResponseBody$outboundSchema` instead. */
68
+ export const outboundSchema = GetPromptVersionResponseBody$outboundSchema;
69
+ /** @deprecated use `GetPromptVersionResponseBody$Outbound` instead. */
70
+ export type Outbound = GetPromptVersionResponseBody$Outbound;
71
+ }
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  export * from "./apierror.js";
6
+ export * from "./getpromptversion.js";
6
7
  export * from "./honoapierror.js";
7
8
  export * from "./httpclienterrors.js";
8
9
  export * from "./sdkvalidationerror.js";