@orq-ai/node 4.14.13 → 4.14.15

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 (163) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +2 -2
  3. package/lib/config.js +2 -2
  4. package/models/components/evaluatorresponsefunction.js +2 -2
  5. package/models/components/evaluatorresponsehttp.js +2 -2
  6. package/models/components/evaluatorresponsejsonschema.js +2 -2
  7. package/models/components/evaluatorresponsellm.js +2 -2
  8. package/models/components/evaluatorresponsepython.js +2 -2
  9. package/models/components/evaluatorresponseragas.js +2 -2
  10. package/models/components/evaluatorresponsetypescript.js +2 -2
  11. package/models/components/reasoningpart.js +1 -1
  12. package/models/operations/createannotationqueue.js +1 -1
  13. package/models/operations/createdataset.js +1 -1
  14. package/models/operations/createdatasetitem.js +5 -5
  15. package/models/operations/createtool.js +4 -4
  16. package/models/operations/getalltools.js +4 -4
  17. package/models/operations/geteval.js +16 -16
  18. package/models/operations/getv2humanevalsets.js +2 -2
  19. package/models/operations/getv2humanevalsetsid.js +2 -2
  20. package/models/operations/listannotationqueues.js +1 -1
  21. package/models/operations/listdatasetdatapoints.js +5 -5
  22. package/models/operations/listdatasets.js +1 -1
  23. package/models/operations/patchv2humanevalsetsid.js +2 -2
  24. package/models/operations/postv2feedbackevaluation.js +4 -4
  25. package/models/operations/postv2humanevalsets.js +2 -2
  26. package/models/operations/retrieveannotationqueue.js +1 -1
  27. package/models/operations/retrievedatapoint.js +5 -5
  28. package/models/operations/retrievedataset.js +1 -1
  29. package/models/operations/retrievetool.js +4 -4
  30. package/models/operations/runagent.js +1 -1
  31. package/models/operations/streamrunagent.js +1 -1
  32. package/models/operations/updateannotationqueue.js +1 -1
  33. package/models/operations/updatedatapoint.js +5 -5
  34. package/models/operations/updatedataset.js +1 -1
  35. package/models/operations/updatetool.js +4 -4
  36. package/package.json +3 -3
  37. package/packages/orq-rc/src/funcs/budgetsCreate.ts +1 -1
  38. package/packages/orq-rc/src/funcs/budgetsDelete.ts +1 -1
  39. package/packages/orq-rc/src/funcs/budgetsGet.ts +1 -1
  40. package/packages/orq-rc/src/funcs/budgetsList.ts +1 -1
  41. package/packages/orq-rc/src/funcs/budgetsResetConsumption.ts +1 -1
  42. package/packages/orq-rc/src/funcs/budgetsUpdate.ts +1 -1
  43. package/packages/orq-rc/src/funcs/evalsCreate.ts +4 -5
  44. package/packages/orq-rc/src/funcs/evalsGet.ts +4 -5
  45. package/packages/orq-rc/src/funcs/evalsGetVersion.ts +4 -5
  46. package/packages/orq-rc/src/funcs/evalsInvoke.ts +4 -4
  47. package/packages/orq-rc/src/funcs/evalsUpdate.ts +4 -5
  48. package/packages/orq-rc/src/funcs/hubGet.ts +168 -0
  49. package/packages/orq-rc/src/funcs/hubSearch.ts +169 -0
  50. package/packages/orq-rc/src/funcs/sessionsCreate.ts +162 -0
  51. package/packages/orq-rc/src/funcs/sessionsDelete.ts +168 -0
  52. package/packages/orq-rc/src/funcs/sessionsGet.ts +168 -0
  53. package/packages/orq-rc/src/funcs/sessionsGetCount.ts +162 -0
  54. package/packages/orq-rc/src/funcs/sessionsList.ts +162 -0
  55. package/packages/orq-rc/src/funcs/sessionsListTags.ts +144 -0
  56. package/packages/orq-rc/src/funcs/sessionsUpdate.ts +171 -0
  57. package/packages/orq-rc/src/lib/config.ts +2 -2
  58. package/packages/orq-rc/src/models/components/agentresponserequest.ts +14 -10
  59. package/packages/orq-rc/src/models/components/budgetlimit.ts +11 -9
  60. package/packages/orq-rc/src/models/components/createthreadrequest.ts +91 -0
  61. package/packages/orq-rc/src/models/components/filter.ts +7 -9
  62. package/packages/orq-rc/src/models/components/gethubitemresponse.ts +37 -0
  63. package/packages/orq-rc/src/models/components/getthreadcountrequest.ts +42 -0
  64. package/packages/orq-rc/src/models/components/getthreadcountresponse.ts +31 -0
  65. package/packages/orq-rc/src/models/components/hubitem.ts +136 -0
  66. package/packages/orq-rc/src/models/components/hubitemsummary.ts +60 -0
  67. package/packages/orq-rc/src/models/components/hubsearchhit.ts +35 -0
  68. package/packages/orq-rc/src/models/components/index.ts +18 -3
  69. package/packages/orq-rc/src/models/components/listthreadsrequest.ts +42 -0
  70. package/packages/orq-rc/src/models/components/listthreadsresponse.ts +41 -0
  71. package/packages/orq-rc/src/models/components/managementkey.ts +3 -4
  72. package/packages/orq-rc/src/models/components/modelmetadata.ts +6 -0
  73. package/packages/orq-rc/src/models/components/modelsconfig.ts +11 -10
  74. package/packages/orq-rc/src/models/components/monitorfilter.ts +11 -7
  75. package/packages/orq-rc/src/models/components/openaipromptcacheoptions.ts +84 -0
  76. package/packages/orq-rc/src/models/components/publicresponseresource.ts +7 -0
  77. package/packages/orq-rc/src/models/components/queryreportrequest.ts +10 -11
  78. package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
  79. package/packages/orq-rc/src/models/components/responsemeta.ts +6 -7
  80. package/packages/orq-rc/src/models/components/searchhubitemsresponse.ts +32 -0
  81. package/packages/orq-rc/src/models/components/sessioninterval.ts +26 -0
  82. package/packages/orq-rc/src/models/components/textcontentpartschema.ts +13 -8
  83. package/packages/orq-rc/src/models/components/thread.ts +101 -0
  84. package/packages/orq-rc/src/models/components/threadbilling.ts +68 -0
  85. package/packages/orq-rc/src/models/components/threadfilters.ts +66 -0
  86. package/packages/orq-rc/src/models/components/threadkind.ts +20 -0
  87. package/packages/orq-rc/src/models/components/threadusage.ts +68 -0
  88. package/packages/orq-rc/src/models/components/updatethreadrequest.ts +105 -0
  89. package/packages/orq-rc/src/models/operations/createdataset.ts +1 -1
  90. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +5 -5
  91. package/packages/orq-rc/src/models/operations/createeval.ts +25 -0
  92. package/packages/orq-rc/src/models/operations/createrouterresponse.ts +128 -9
  93. package/packages/orq-rc/src/models/operations/createtool.ts +4 -4
  94. package/packages/orq-rc/src/models/operations/deletesession.ts +36 -0
  95. package/packages/orq-rc/src/models/operations/getalltools.ts +4 -4
  96. package/packages/orq-rc/src/models/operations/geteval.ts +25 -0
  97. package/packages/orq-rc/src/models/operations/getevalversion.ts +25 -0
  98. package/packages/orq-rc/src/models/operations/getsession.ts +36 -0
  99. package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +2 -2
  100. package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +2 -2
  101. package/packages/orq-rc/src/models/operations/hubget.ts +27 -0
  102. package/packages/orq-rc/src/models/operations/hubsearch.ts +34 -0
  103. package/packages/orq-rc/src/models/operations/index.ts +5 -0
  104. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +5 -5
  105. package/packages/orq-rc/src/models/operations/listdatasets.ts +1 -1
  106. package/packages/orq-rc/src/models/operations/modelcreateopenailike.ts +8 -0
  107. package/packages/orq-rc/src/models/operations/modelupdateopenailike.ts +8 -0
  108. package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  109. package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +4 -4
  110. package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +2 -2
  111. package/packages/orq-rc/src/models/operations/postv2routerocr.ts +36 -0
  112. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +5 -5
  113. package/packages/orq-rc/src/models/operations/retrievedataset.ts +1 -1
  114. package/packages/orq-rc/src/models/operations/retrieveresponse.ts +5 -0
  115. package/packages/orq-rc/src/models/operations/retrievetool.ts +4 -4
  116. package/packages/orq-rc/src/models/operations/runagent.ts +1 -1
  117. package/packages/orq-rc/src/models/operations/streamrunagent.ts +1 -1
  118. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +5 -5
  119. package/packages/orq-rc/src/models/operations/updatedataset.ts +1 -1
  120. package/packages/orq-rc/src/models/operations/updateeval.ts +25 -0
  121. package/packages/orq-rc/src/models/operations/updatesession.ts +41 -0
  122. package/packages/orq-rc/src/models/operations/updatetool.ts +4 -4
  123. package/packages/orq-rc/src/sdk/budgets.ts +6 -6
  124. package/packages/orq-rc/src/sdk/evals.ts +5 -5
  125. package/packages/orq-rc/src/sdk/hub.ts +46 -0
  126. package/packages/orq-rc/src/sdk/sdk.ts +27 -15
  127. package/packages/orq-rc/src/sdk/sessions.ts +134 -0
  128. package/src/lib/config.ts +2 -2
  129. package/src/models/components/evaluatorresponsefunction.ts +2 -2
  130. package/src/models/components/evaluatorresponsehttp.ts +2 -2
  131. package/src/models/components/evaluatorresponsejsonschema.ts +2 -2
  132. package/src/models/components/evaluatorresponsellm.ts +2 -2
  133. package/src/models/components/evaluatorresponsepython.ts +2 -2
  134. package/src/models/components/evaluatorresponseragas.ts +2 -2
  135. package/src/models/components/evaluatorresponsetypescript.ts +2 -2
  136. package/src/models/components/reasoningpart.ts +1 -1
  137. package/src/models/operations/createannotationqueue.ts +1 -1
  138. package/src/models/operations/createdataset.ts +1 -1
  139. package/src/models/operations/createdatasetitem.ts +5 -5
  140. package/src/models/operations/createtool.ts +4 -4
  141. package/src/models/operations/getalltools.ts +4 -4
  142. package/src/models/operations/geteval.ts +16 -16
  143. package/src/models/operations/getv2humanevalsets.ts +2 -2
  144. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  145. package/src/models/operations/listannotationqueues.ts +1 -1
  146. package/src/models/operations/listdatasetdatapoints.ts +5 -5
  147. package/src/models/operations/listdatasets.ts +1 -1
  148. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  149. package/src/models/operations/postv2feedbackevaluation.ts +4 -4
  150. package/src/models/operations/postv2humanevalsets.ts +2 -2
  151. package/src/models/operations/retrieveannotationqueue.ts +1 -1
  152. package/src/models/operations/retrievedatapoint.ts +5 -5
  153. package/src/models/operations/retrievedataset.ts +1 -1
  154. package/src/models/operations/retrievetool.ts +4 -4
  155. package/src/models/operations/runagent.ts +1 -1
  156. package/src/models/operations/streamrunagent.ts +1 -1
  157. package/src/models/operations/updateannotationqueue.ts +1 -1
  158. package/src/models/operations/updatedatapoint.ts +5 -5
  159. package/src/models/operations/updatedataset.ts +1 -1
  160. package/src/models/operations/updatetool.ts +4 -4
  161. package/packages/orq-rc/src/models/components/evaluatordocumentresponse.ts +0 -50
  162. package/packages/orq-rc/src/models/components/getevaluatorversionresponse.ts +0 -58
  163. package/packages/orq-rc/src/models/components/invokeevaluatorresponse.ts +0 -47
@@ -164,7 +164,7 @@ function retrieveToolResponseBodyCodeToolFromJSON(jsonString) {
164
164
  }
165
165
  /** @internal */
166
166
  exports.RetrieveToolResponseBodyCodeExecutionTool$inboundSchema = z.object({
167
- _id: z.string().default("tool_01M1VC6PCPPVBEY2V347FNHBZB"),
167
+ _id: z.string().default("tool_01M21M7QVZHCMPS6H0M2CRPEX2"),
168
168
  path: z.string(),
169
169
  key: z.string(),
170
170
  display_name: z.string().optional(),
@@ -253,7 +253,7 @@ function retrieveToolResponseBodyHttpFromJSON(jsonString) {
253
253
  }
254
254
  /** @internal */
255
255
  exports.RetrieveToolResponseBodyHTTPTool$inboundSchema = z.object({
256
- _id: z.string().default("tool_01M1VC6PCMZVG0NYKERBKMFNH4"),
256
+ _id: z.string().default("tool_01M21M7QVX17PBZRXHBKKM8WYQ"),
257
257
  path: z.string(),
258
258
  key: z.string(),
259
259
  display_name: z.string().optional(),
@@ -303,7 +303,7 @@ function retrieveToolResponseBodyJsonSchemaFromJSON(jsonString) {
303
303
  }
304
304
  /** @internal */
305
305
  exports.RetrieveToolResponseBodyJSONSchemaTool$inboundSchema = z.object({
306
- _id: z.string().default("tool_01M1VC6PCK1424X503HCN6M03T"),
306
+ _id: z.string().default("tool_01M21M7QVW9697JCTRATS6NAEM"),
307
307
  path: z.string(),
308
308
  key: z.string(),
309
309
  display_name: z.string().optional(),
@@ -357,7 +357,7 @@ function retrieveToolResponseBodyFunctionFromJSON(jsonString) {
357
357
  }
358
358
  /** @internal */
359
359
  exports.RetrieveToolResponseBodyFunctionTool$inboundSchema = z.object({
360
- _id: z.string().default("tool_01M1VC6PCJDGGBV97J5J0JWSD7"),
360
+ _id: z.string().default("tool_01M21M7QVVTWDA3A43TKSHTHD6"),
361
361
  path: z.string(),
362
362
  key: z.string(),
363
363
  display_name: z.string().optional(),
@@ -1106,7 +1106,7 @@ function agentToolInputRunSchemaToJSON(agentToolInputRunSchema) {
1106
1106
  }
1107
1107
  /** @internal */
1108
1108
  exports.Tools$outboundSchema = z.object({
1109
- id: z.string().default("01M1VC6P71R54BWNYM0SSNCVYD"),
1109
+ id: z.string().default("01M21M7QP7Q9VQT7CCK5H7651B"),
1110
1110
  name: z.string(),
1111
1111
  description: z.string().optional(),
1112
1112
  schema: z.lazy(() => exports.AgentToolInputRunSchema$outboundSchema),
@@ -1072,7 +1072,7 @@ function streamRunAgentAgentToolInputRunAgentsSchemaToJSON(streamRunAgentAgentTo
1072
1072
  }
1073
1073
  /** @internal */
1074
1074
  exports.AgentToolInputRunTools$outboundSchema = z.object({
1075
- id: z.string().default("01M1VC6P8703DNF7NB2C2ET696"),
1075
+ id: z.string().default("01M21M7QQDMP71BPB3CXM7WK8Y"),
1076
1076
  name: z.string(),
1077
1077
  description: z.string().optional(),
1078
1078
  schema: z.lazy(() => exports.StreamRunAgentAgentToolInputRunAgentsSchema$outboundSchema),
@@ -98,7 +98,7 @@ exports.UpdateAnnotationQueueResponseBody$inboundSchema = z.object({
98
98
  updated_by_id: z.nullable(z.string()).optional(),
99
99
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
100
100
  .optional(),
101
- updated: z.string().datetime({ offset: true }).default("2026-09-06T12:48:18.752Z").transform(v => new Date(v)),
101
+ updated: z.string().datetime({ offset: true }).default("2026-09-08T23:04:08.153Z").transform(v => new Date(v)),
102
102
  }).transform((v) => {
103
103
  return (0, primitives_js_1.remap)(v, {
104
104
  "_id": "id",
@@ -866,7 +866,7 @@ exports.UpdateDatapointEvaluations4$inboundSchema = z.object({
866
866
  parent_annotation_id: z.string().optional(),
867
867
  explanation: z.string().optional(),
868
868
  reviewed_by_id: z.string(),
869
- reviewed_at: z.string().datetime({ offset: true }).default("2026-09-06T12:48:29.140Z").transform(v => new Date(v)),
869
+ reviewed_at: z.string().datetime({ offset: true }).default("2026-09-08T23:04:18.621Z").transform(v => new Date(v)),
870
870
  type: z.literal("string_array"),
871
871
  values: z.array(z.string()),
872
872
  }).transform((v) => {
@@ -917,7 +917,7 @@ exports.UpdateDatapointEvaluations3$inboundSchema = z.object({
917
917
  parent_annotation_id: z.string().optional(),
918
918
  explanation: z.string().optional(),
919
919
  reviewed_by_id: z.string(),
920
- reviewed_at: z.string().datetime({ offset: true }).default("2026-09-06T12:48:29.139Z").transform(v => new Date(v)),
920
+ reviewed_at: z.string().datetime({ offset: true }).default("2026-09-08T23:04:18.620Z").transform(v => new Date(v)),
921
921
  type: z.literal("boolean"),
922
922
  value: z.boolean(),
923
923
  }).transform((v) => {
@@ -968,7 +968,7 @@ exports.UpdateDatapointEvaluations2$inboundSchema = z.object({
968
968
  parent_annotation_id: z.string().optional(),
969
969
  explanation: z.string().optional(),
970
970
  reviewed_by_id: z.string(),
971
- reviewed_at: z.string().datetime({ offset: true }).default("2026-09-06T12:48:29.139Z").transform(v => new Date(v)),
971
+ reviewed_at: z.string().datetime({ offset: true }).default("2026-09-08T23:04:18.620Z").transform(v => new Date(v)),
972
972
  type: z.literal("number"),
973
973
  value: z.number(),
974
974
  }).transform((v) => {
@@ -1018,7 +1018,7 @@ exports.UpdateDatapointEvaluations1$inboundSchema = z.object({
1018
1018
  parent_annotation_id: z.string().optional(),
1019
1019
  explanation: z.string().optional(),
1020
1020
  reviewed_by_id: z.string(),
1021
- reviewed_at: z.string().datetime({ offset: true }).default("2026-09-06T12:48:29.138Z").transform(v => new Date(v)),
1021
+ reviewed_at: z.string().datetime({ offset: true }).default("2026-09-08T23:04:18.619Z").transform(v => new Date(v)),
1022
1022
  type: z.literal("string"),
1023
1023
  value: z.string(),
1024
1024
  }).transform((v) => {
@@ -1069,7 +1069,7 @@ exports.UpdateDatapointResponseBody$inboundSchema = z.object({
1069
1069
  updated_by_id: z.nullable(z.string()).optional(),
1070
1070
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
1071
1071
  .optional(),
1072
- updated: z.string().datetime({ offset: true }).default("2026-09-06T12:48:18.752Z").transform(v => new Date(v)),
1072
+ updated: z.string().datetime({ offset: true }).default("2026-09-08T23:04:08.153Z").transform(v => new Date(v)),
1073
1073
  }).transform((v) => {
1074
1074
  return (0, primitives_js_1.remap)(v, {
1075
1075
  "_id": "id",
@@ -95,7 +95,7 @@ exports.UpdateDatasetResponseBody$inboundSchema = z.object({
95
95
  updated_by_id: z.nullable(z.string()).optional(),
96
96
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
97
97
  .optional(),
98
- updated: z.string().datetime({ offset: true }).default("2026-09-06T12:48:18.752Z").transform(v => new Date(v)),
98
+ updated: z.string().datetime({ offset: true }).default("2026-09-08T23:04:08.153Z").transform(v => new Date(v)),
99
99
  }).transform((v) => {
100
100
  return (0, primitives_js_1.remap)(v, {
101
101
  "_id": "id",
@@ -536,7 +536,7 @@ function updateToolResponseBodyCodeToolFromJSON(jsonString) {
536
536
  }
537
537
  /** @internal */
538
538
  exports.UpdateToolResponseBodyCodeExecutionTool$inboundSchema = z.object({
539
- _id: z.string().default("tool_01M1VC6PC6DM9CK80BWC0478EQ"),
539
+ _id: z.string().default("tool_01M21M7QVAANEETVJ5VM41YVN0"),
540
540
  path: z.string(),
541
541
  key: z.string(),
542
542
  display_name: z.string().optional(),
@@ -625,7 +625,7 @@ function updateToolResponseBodyHttpFromJSON(jsonString) {
625
625
  }
626
626
  /** @internal */
627
627
  exports.UpdateToolResponseBodyHTTPTool$inboundSchema = z.object({
628
- _id: z.string().default("tool_01M1VC6PC4KG5SS8J0ETTYMVCC"),
628
+ _id: z.string().default("tool_01M21M7QV919ASN3NHENRN92RA"),
629
629
  path: z.string(),
630
630
  key: z.string(),
631
631
  display_name: z.string().optional(),
@@ -675,7 +675,7 @@ function updateToolResponseBodyJsonSchemaFromJSON(jsonString) {
675
675
  }
676
676
  /** @internal */
677
677
  exports.UpdateToolResponseBodyJSONSchemaTool$inboundSchema = z.object({
678
- _id: z.string().default("tool_01M1VC6PC3YYGRCFT3V7SJYB7B"),
678
+ _id: z.string().default("tool_01M21M7QV84SR0TYJ243K7V8RE"),
679
679
  path: z.string(),
680
680
  key: z.string(),
681
681
  display_name: z.string().optional(),
@@ -729,7 +729,7 @@ function updateToolResponseBodyFunctionFromJSON(jsonString) {
729
729
  }
730
730
  /** @internal */
731
731
  exports.UpdateToolResponseBodyFunctionTool$inboundSchema = z.object({
732
- _id: z.string().default("tool_01M1VC6PC1HZATPEQTBV4Q4P4G"),
732
+ _id: z.string().default("tool_01M21M7QV6VT3ZTC1R8QRSHXBF"),
733
733
  path: z.string(),
734
734
  key: z.string(),
735
735
  display_name: z.string().optional(),
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@orq-ai/node",
3
- "version": "4.14.13",
3
+ "version": "4.14.15",
4
4
  "author": "Orq",
5
5
  "exports": {
6
6
  ".": {
7
- "import": "./index.js",
8
7
  "require": "./index.js",
9
- "types": "./index.d.ts"
8
+ "types": "./index.d.ts",
9
+ "import": "./index.js"
10
10
  },
11
11
  "./*": "./*",
12
12
  "./langchain": {
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
29
29
  * Create a new budget
30
30
  *
31
31
  * @remarks
32
- * Creates a new budget in the workspace. Exactly one scope variant must be set (workspace / project / identity / api_key / provider / model). At least one of `limits.amount`, `limits.token_limit`, or `rate_limit.requests_per_minute` MUST be provided. Uniqueness is enforced across (workspace_id, scope_kind, scope_target_id).
32
+ * Creates a new budget in the workspace. Exactly one scope variant must be set (workspace / project / identity / api_key / provider / model). At least one of `limits.amount`, `limits.token_limit`, or `rate_limit.requests_per_minute` MUST be provided. Uniqueness is enforced across (workspace_id, scope_kind, scope_target_id). Requires a Management Key with the Budgets permission; project-scoped API keys cannot manage budgets.
33
33
  */
34
34
  export function budgetsCreate(
35
35
  client: OrqCore,
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
30
30
  * Delete a budget
31
31
  *
32
32
  * @remarks
33
- * Permanently deletes a budget. Its consumption counters are cleared immediately. The response body is empty on success.
33
+ * Permanently deletes a budget. Its consumption counters are cleared immediately. The response body is empty on success. Requires a Management Key with the Budgets permission; project-scoped API keys cannot manage budgets.
34
34
  */
35
35
  export function budgetsDelete(
36
36
  client: OrqCore,
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
30
30
  * Retrieve a budget
31
31
  *
32
32
  * @remarks
33
- * Retrieves the metadata for an existing budget by its unique identifier. Returns `NotFound` when the budget does not exist in the caller's workspace.
33
+ * Retrieves the metadata for an existing budget by its unique identifier. Returns `NotFound` when the budget does not exist in the caller's workspace. Requires a Management Key with the Budgets permission; project-scoped API keys cannot manage budgets.
34
34
  */
35
35
  export function budgetsGet(
36
36
  client: OrqCore,
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
30
30
  * List budgets
31
31
  *
32
32
  * @remarks
33
- * Returns budgets visible to the current workspace, ordered by creation time with the newest first. Supports filtering by scope kind, scope target id, period, and active state, plus an optional free-text query that searches across denormalized target names via Typesense.
33
+ * Returns budgets visible to the current workspace, ordered by creation time with the newest first. Supports filtering by scope kind, scope target id, period, and active state, plus an optional free-text query that searches across denormalized target names via Typesense. Requires a Management Key with the Budgets permission; project-scoped API keys cannot manage budgets.
34
34
  */
35
35
  export function budgetsList(
36
36
  client: OrqCore,
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
30
30
  * Reset budget consumption
31
31
  *
32
32
  * @remarks
33
- * Clears the current-period cost, token, and request counters for the budget. The budget record itself is preserved.
33
+ * Clears the current-period cost, token, and request counters for the budget. The budget record itself is preserved. Requires a Management Key with the Budgets permission; project-scoped API keys cannot manage budgets.
34
34
  */
35
35
  export function budgetsResetConsumption(
36
36
  client: OrqCore,
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
30
30
  * Update a budget
31
31
  *
32
32
  * @remarks
33
- * Updates mutable fields of a budget: limits, rate limit, activation, and expiration. The scope is immutable — to change a budget's target, delete and recreate it. Omitted fields keep their current values.
33
+ * Updates mutable fields of a budget: limits, rate limit, activation, and expiration. The scope is immutable — to change a budget's target, delete and recreate it. Omitted fields keep their current values. Requires a Management Key with the Budgets permission; project-scoped API keys cannot manage budgets.
34
34
  */
35
35
  export function budgetsUpdate(
36
36
  client: OrqCore,
@@ -9,7 +9,6 @@ import { compactMap } from "../lib/primitives.js";
9
9
  import { RequestOptions } from "../lib/sdks.js";
10
10
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
11
  import { pathToFunc } from "../lib/url.js";
12
- import * as components from "../models/components/index.js";
13
12
  import {
14
13
  ConnectionError,
15
14
  InvalidRequestError,
@@ -36,7 +35,7 @@ export function evalsCreate(
36
35
  options?: RequestOptions,
37
36
  ): APIPromise<
38
37
  Result<
39
- components.EvaluatorDocumentResponse,
38
+ operations.CreateEvalResponseBody,
40
39
  | OrqError
41
40
  | ResponseValidationError
42
41
  | ConnectionError
@@ -61,7 +60,7 @@ async function $do(
61
60
  ): Promise<
62
61
  [
63
62
  Result<
64
- components.EvaluatorDocumentResponse,
63
+ operations.CreateEvalResponseBody,
65
64
  | OrqError
66
65
  | ResponseValidationError
67
66
  | ConnectionError
@@ -127,7 +126,7 @@ async function $do(
127
126
  const response = doResult.value;
128
127
 
129
128
  const [result] = await M.match<
130
- components.EvaluatorDocumentResponse,
129
+ operations.CreateEvalResponseBody,
131
130
  | OrqError
132
131
  | ResponseValidationError
133
132
  | ConnectionError
@@ -137,7 +136,7 @@ async function $do(
137
136
  | UnexpectedClientError
138
137
  | SDKValidationError
139
138
  >(
140
- M.json(200, components.EvaluatorDocumentResponse$inboundSchema),
139
+ M.json(200, operations.CreateEvalResponseBody$inboundSchema),
141
140
  M.fail("4XX"),
142
141
  M.fail("5XX"),
143
142
  )(response, req);
@@ -11,7 +11,6 @@ import { safeParse } from "../lib/schemas.js";
11
11
  import { RequestOptions } from "../lib/sdks.js";
12
12
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
13
  import { pathToFunc } from "../lib/url.js";
14
- import * as components from "../models/components/index.js";
15
14
  import {
16
15
  ConnectionError,
17
16
  InvalidRequestError,
@@ -38,7 +37,7 @@ export function evalsGet(
38
37
  options?: RequestOptions,
39
38
  ): APIPromise<
40
39
  Result<
41
- components.EvaluatorDocumentResponse,
40
+ operations.GetEvalResponseBody,
42
41
  | OrqError
43
42
  | ResponseValidationError
44
43
  | ConnectionError
@@ -63,7 +62,7 @@ async function $do(
63
62
  ): Promise<
64
63
  [
65
64
  Result<
66
- components.EvaluatorDocumentResponse,
65
+ operations.GetEvalResponseBody,
67
66
  | OrqError
68
67
  | ResponseValidationError
69
68
  | ConnectionError
@@ -146,7 +145,7 @@ async function $do(
146
145
  const response = doResult.value;
147
146
 
148
147
  const [result] = await M.match<
149
- components.EvaluatorDocumentResponse,
148
+ operations.GetEvalResponseBody,
150
149
  | OrqError
151
150
  | ResponseValidationError
152
151
  | ConnectionError
@@ -156,7 +155,7 @@ async function $do(
156
155
  | UnexpectedClientError
157
156
  | SDKValidationError
158
157
  >(
159
- M.json(200, components.EvaluatorDocumentResponse$inboundSchema),
158
+ M.json(200, operations.GetEvalResponseBody$inboundSchema),
160
159
  M.fail("4XX"),
161
160
  M.fail("5XX"),
162
161
  )(response, req);
@@ -11,7 +11,6 @@ import { safeParse } from "../lib/schemas.js";
11
11
  import { RequestOptions } from "../lib/sdks.js";
12
12
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
13
  import { pathToFunc } from "../lib/url.js";
14
- import * as components from "../models/components/index.js";
15
14
  import {
16
15
  ConnectionError,
17
16
  InvalidRequestError,
@@ -38,7 +37,7 @@ export function evalsGetVersion(
38
37
  options?: RequestOptions,
39
38
  ): APIPromise<
40
39
  Result<
41
- components.GetEvaluatorVersionResponse,
40
+ operations.GetEvalVersionResponseBody,
42
41
  | OrqError
43
42
  | ResponseValidationError
44
43
  | ConnectionError
@@ -63,7 +62,7 @@ async function $do(
63
62
  ): Promise<
64
63
  [
65
64
  Result<
66
- components.GetEvaluatorVersionResponse,
65
+ operations.GetEvalVersionResponseBody,
67
66
  | OrqError
68
67
  | ResponseValidationError
69
68
  | ConnectionError
@@ -152,7 +151,7 @@ async function $do(
152
151
  const response = doResult.value;
153
152
 
154
153
  const [result] = await M.match<
155
- components.GetEvaluatorVersionResponse,
154
+ operations.GetEvalVersionResponseBody,
156
155
  | OrqError
157
156
  | ResponseValidationError
158
157
  | ConnectionError
@@ -162,7 +161,7 @@ async function $do(
162
161
  | UnexpectedClientError
163
162
  | SDKValidationError
164
163
  >(
165
- M.json(200, components.GetEvaluatorVersionResponse$inboundSchema),
164
+ M.json(200, operations.GetEvalVersionResponseBody$inboundSchema),
166
165
  M.fail("4XX"),
167
166
  M.fail("5XX"),
168
167
  )(response, req);
@@ -38,7 +38,7 @@ export function evalsInvoke(
38
38
  options?: RequestOptions,
39
39
  ): APIPromise<
40
40
  Result<
41
- components.InvokeEvaluatorResponse,
41
+ components.EvaluationResult,
42
42
  | OrqError
43
43
  | ResponseValidationError
44
44
  | ConnectionError
@@ -63,7 +63,7 @@ async function $do(
63
63
  ): Promise<
64
64
  [
65
65
  Result<
66
- components.InvokeEvaluatorResponse,
66
+ components.EvaluationResult,
67
67
  | OrqError
68
68
  | ResponseValidationError
69
69
  | ConnectionError
@@ -149,7 +149,7 @@ async function $do(
149
149
  const response = doResult.value;
150
150
 
151
151
  const [result] = await M.match<
152
- components.InvokeEvaluatorResponse,
152
+ components.EvaluationResult,
153
153
  | OrqError
154
154
  | ResponseValidationError
155
155
  | ConnectionError
@@ -159,7 +159,7 @@ async function $do(
159
159
  | UnexpectedClientError
160
160
  | SDKValidationError
161
161
  >(
162
- M.json(200, components.InvokeEvaluatorResponse$inboundSchema),
162
+ M.json(200, components.EvaluationResult$inboundSchema),
163
163
  M.fail("4XX"),
164
164
  M.fail("5XX"),
165
165
  )(response, req);
@@ -11,7 +11,6 @@ import { safeParse } from "../lib/schemas.js";
11
11
  import { RequestOptions } from "../lib/sdks.js";
12
12
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
13
  import { pathToFunc } from "../lib/url.js";
14
- import * as components from "../models/components/index.js";
15
14
  import {
16
15
  ConnectionError,
17
16
  InvalidRequestError,
@@ -38,7 +37,7 @@ export function evalsUpdate(
38
37
  options?: RequestOptions,
39
38
  ): APIPromise<
40
39
  Result<
41
- components.EvaluatorDocumentResponse,
40
+ operations.UpdateEvalResponseBody,
42
41
  | OrqError
43
42
  | ResponseValidationError
44
43
  | ConnectionError
@@ -63,7 +62,7 @@ async function $do(
63
62
  ): Promise<
64
63
  [
65
64
  Result<
66
- components.EvaluatorDocumentResponse,
65
+ operations.UpdateEvalResponseBody,
67
66
  | OrqError
68
67
  | ResponseValidationError
69
68
  | ConnectionError
@@ -147,7 +146,7 @@ async function $do(
147
146
  const response = doResult.value;
148
147
 
149
148
  const [result] = await M.match<
150
- components.EvaluatorDocumentResponse,
149
+ operations.UpdateEvalResponseBody,
151
150
  | OrqError
152
151
  | ResponseValidationError
153
152
  | ConnectionError
@@ -157,7 +156,7 @@ async function $do(
157
156
  | UnexpectedClientError
158
157
  | SDKValidationError
159
158
  >(
160
- M.json(200, components.EvaluatorDocumentResponse$inboundSchema),
159
+ M.json(200, operations.UpdateEvalResponseBody$inboundSchema),
161
160
  M.fail("4XX"),
162
161
  M.fail("5XX"),
163
162
  )(response, req);
@@ -0,0 +1,168 @@
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 { matchStatusCode } from "../lib/http.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { safeParse } from "../lib/schemas.js";
11
+ import { RequestOptions } from "../lib/sdks.js";
12
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
+ import { pathToFunc } from "../lib/url.js";
14
+ import * as components from "../models/components/index.js";
15
+ import {
16
+ ConnectionError,
17
+ InvalidRequestError,
18
+ RequestAbortedError,
19
+ RequestTimeoutError,
20
+ UnexpectedClientError,
21
+ } from "../models/errors/httpclienterrors.js";
22
+ import { OrqError } from "../models/errors/orqerror.js";
23
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
24
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
25
+ import * as operations from "../models/operations/index.js";
26
+ import { APICall, APIPromise } from "../types/async.js";
27
+ import { Result } from "../types/fp.js";
28
+
29
+ /**
30
+ * Get a hub item
31
+ *
32
+ * @remarks
33
+ * Retrieves a hub item available to the current workspace.
34
+ */
35
+ export function hubGet(
36
+ client: OrqCore,
37
+ request: operations.HubGetRequest,
38
+ options?: RequestOptions,
39
+ ): APIPromise<
40
+ Result<
41
+ components.GetHubItemResponse,
42
+ | OrqError
43
+ | ResponseValidationError
44
+ | ConnectionError
45
+ | RequestAbortedError
46
+ | RequestTimeoutError
47
+ | InvalidRequestError
48
+ | UnexpectedClientError
49
+ | SDKValidationError
50
+ >
51
+ > {
52
+ return new APIPromise($do(
53
+ client,
54
+ request,
55
+ options,
56
+ ));
57
+ }
58
+
59
+ async function $do(
60
+ client: OrqCore,
61
+ request: operations.HubGetRequest,
62
+ options?: RequestOptions,
63
+ ): Promise<
64
+ [
65
+ Result<
66
+ components.GetHubItemResponse,
67
+ | OrqError
68
+ | ResponseValidationError
69
+ | ConnectionError
70
+ | RequestAbortedError
71
+ | RequestTimeoutError
72
+ | InvalidRequestError
73
+ | UnexpectedClientError
74
+ | SDKValidationError
75
+ >,
76
+ APICall,
77
+ ]
78
+ > {
79
+ const parsed = safeParse(
80
+ request,
81
+ (value) => operations.HubGetRequest$outboundSchema.parse(value),
82
+ "Input validation failed",
83
+ );
84
+ if (!parsed.ok) {
85
+ return [parsed, { status: "invalid" }];
86
+ }
87
+ const payload = parsed.value;
88
+ const body = null;
89
+
90
+ const pathParams = {
91
+ id: encodeSimple("id", payload.id, {
92
+ explode: false,
93
+ charEncoding: "percent",
94
+ }),
95
+ };
96
+ const path = pathToFunc("/v2/hub/{id}")(pathParams);
97
+
98
+ const headers = new Headers(compactMap({
99
+ Accept: "application/json",
100
+ }));
101
+
102
+ const secConfig = await extractSecurity(client._options.apiKey);
103
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
104
+ const requestSecurity = resolveGlobalSecurity(securityInput);
105
+
106
+ const context = {
107
+ options: client._options,
108
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
109
+ operationID: "HubGet",
110
+ oAuth2Scopes: null,
111
+
112
+ resolvedSecurity: requestSecurity,
113
+
114
+ securitySource: client._options.apiKey,
115
+ retryConfig: options?.retries
116
+ || client._options.retryConfig
117
+ || { strategy: "none" },
118
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
119
+ };
120
+
121
+ const requestRes = client._createRequest(context, {
122
+ security: requestSecurity,
123
+ method: "GET",
124
+ baseURL: options?.serverURL,
125
+ path: path,
126
+ headers: headers,
127
+ body: body,
128
+ userAgent: client._options.userAgent,
129
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
130
+ }, options);
131
+ if (!requestRes.ok) {
132
+ return [requestRes, { status: "invalid" }];
133
+ }
134
+ const req = requestRes.value;
135
+
136
+ const doResult = await client._do(req, {
137
+ context,
138
+ isErrorStatusCode: (statusCode: number) =>
139
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
140
+ retryConfig: context.retryConfig,
141
+ retryCodes: context.retryCodes,
142
+ });
143
+ if (!doResult.ok) {
144
+ return [doResult, { status: "request-error", request: req }];
145
+ }
146
+ const response = doResult.value;
147
+
148
+ const [result] = await M.match<
149
+ components.GetHubItemResponse,
150
+ | OrqError
151
+ | ResponseValidationError
152
+ | ConnectionError
153
+ | RequestAbortedError
154
+ | RequestTimeoutError
155
+ | InvalidRequestError
156
+ | UnexpectedClientError
157
+ | SDKValidationError
158
+ >(
159
+ M.json(200, components.GetHubItemResponse$inboundSchema),
160
+ M.fail("4XX"),
161
+ M.fail("5XX"),
162
+ )(response, req);
163
+ if (!result.ok) {
164
+ return [result, { status: "complete", request: req, response }];
165
+ }
166
+
167
+ return [result, { status: "complete", request: req, response }];
168
+ }