@orq-ai/node 4.15.8 → 4.15.11

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 (188) 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/lib/config.js.map +1 -1
  5. package/models/components/reasoningpart.js +1 -1
  6. package/models/operations/createdataset.js +1 -1
  7. package/models/operations/createdatasetitem.js +5 -5
  8. package/models/operations/createtool.js +4 -4
  9. package/models/operations/getalltools.js +4 -4
  10. package/models/operations/getv2humanevalsets.js +2 -2
  11. package/models/operations/getv2humanevalsetsid.js +2 -2
  12. package/models/operations/listdatasetdatapoints.js +5 -5
  13. package/models/operations/listdatasets.js +1 -1
  14. package/models/operations/patchv2humanevalsetsid.js +2 -2
  15. package/models/operations/postv2feedbackevaluation.js +4 -4
  16. package/models/operations/postv2humanevalsets.js +2 -2
  17. package/models/operations/retrievedatapoint.js +5 -5
  18. package/models/operations/retrievedataset.js +1 -1
  19. package/models/operations/retrievetool.js +4 -4
  20. package/models/operations/runagent.js +1 -1
  21. package/models/operations/streamrunagent.js +1 -1
  22. package/models/operations/updatedatapoint.js +5 -5
  23. package/models/operations/updatedataset.js +1 -1
  24. package/models/operations/updatetool.js +4 -4
  25. package/package.json +6 -6
  26. package/packages/orq-rc/src/funcs/apiKeysCreate.ts +6 -5
  27. package/packages/orq-rc/src/funcs/apiKeysDelete.ts +1 -1
  28. package/packages/orq-rc/src/funcs/apiKeysGet.ts +3 -8
  29. package/packages/orq-rc/src/funcs/apiKeysList.ts +4 -11
  30. package/packages/orq-rc/src/funcs/apiKeysListCapabilities.ts +6 -6
  31. package/packages/orq-rc/src/funcs/apiKeysUpdate.ts +3 -5
  32. package/packages/orq-rc/src/funcs/datasetsClear.ts +3 -12
  33. package/packages/orq-rc/src/funcs/datasetsCreate.ts +10 -15
  34. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +8 -16
  35. package/packages/orq-rc/src/funcs/datasetsCreateDatapoints.ts +175 -0
  36. package/packages/orq-rc/src/funcs/datasetsDelete.ts +2 -2
  37. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +2 -11
  38. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoints.ts +174 -0
  39. package/packages/orq-rc/src/funcs/datasetsList.ts +6 -5
  40. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +6 -14
  41. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +7 -15
  42. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +7 -15
  43. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +10 -16
  44. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +10 -16
  45. package/packages/orq-rc/src/funcs/humanReviewSetsList.ts +4 -7
  46. package/packages/orq-rc/src/funcs/projectsCreate.ts +1 -1
  47. package/packages/orq-rc/src/funcs/projectsDelete.ts +1 -1
  48. package/packages/orq-rc/src/funcs/projectsList.ts +1 -1
  49. package/packages/orq-rc/src/funcs/projectsUpdate.ts +1 -1
  50. package/packages/orq-rc/src/funcs/routerClassifyCreate.ts +1 -1
  51. package/packages/orq-rc/src/lib/config.ts +2 -2
  52. package/packages/orq-rc/src/models/components/apikeyrestresponse.ts +1 -1
  53. package/packages/orq-rc/src/models/components/bulkcreatedatapointsrequest.ts +38 -0
  54. package/packages/orq-rc/src/models/components/classifyanswer.ts +2 -2
  55. package/packages/orq-rc/src/models/components/constraints.ts +32 -0
  56. package/packages/orq-rc/src/models/components/createdatasetrequest.ts +39 -0
  57. package/packages/orq-rc/src/models/components/datapoint1.ts +122 -0
  58. package/packages/orq-rc/src/models/components/datapointinput.ts +73 -0
  59. package/packages/orq-rc/src/models/components/dataset.ts +88 -0
  60. package/packages/orq-rc/src/models/components/datasetmetadata.ts +48 -0
  61. package/packages/orq-rc/src/models/components/datasource.ts +2 -2
  62. package/packages/orq-rc/src/models/components/datasourcesservicecreaterequest.ts +2 -2
  63. package/packages/orq-rc/src/models/components/deletedatapointsrequest.ts +36 -0
  64. package/packages/orq-rc/src/models/components/domain.ts +42 -39
  65. package/packages/orq-rc/src/models/components/extendedmessage.ts +1 -1
  66. package/packages/orq-rc/src/models/components/filesystem.ts +6 -5
  67. package/packages/orq-rc/src/models/components/hubitem.ts +2 -2
  68. package/packages/orq-rc/src/models/components/hubitemsummary.ts +1 -1
  69. package/packages/orq-rc/src/models/components/index.ts +13 -14
  70. package/packages/orq-rc/src/models/components/knowledge.ts +2 -2
  71. package/packages/orq-rc/src/models/components/knowledgechunk.ts +1 -1
  72. package/packages/orq-rc/src/models/components/listdatapointsresponse.ts +41 -0
  73. package/packages/orq-rc/src/models/components/listdatasetsresponse.ts +41 -0
  74. package/packages/orq-rc/src/models/components/mcpauthconfig.ts +1 -1
  75. package/packages/orq-rc/src/models/components/mcpauthconfigoutput.ts +1 -1
  76. package/packages/orq-rc/src/models/components/memory.ts +2 -5
  77. package/packages/orq-rc/src/models/components/owner.ts +35 -0
  78. package/packages/orq-rc/src/models/components/projectscope.ts +11 -23
  79. package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
  80. package/packages/orq-rc/src/models/components/toolexecutionfailedstreamingevent.ts +3 -3
  81. package/packages/orq-rc/src/models/components/toolexecutionfinishedstreamingevent.ts +3 -3
  82. package/packages/orq-rc/src/models/components/toolexecutionstartedstreamingevent.ts +3 -3
  83. package/packages/orq-rc/src/models/components/updatedatapointrequest.ts +67 -0
  84. package/packages/orq-rc/src/models/components/updatedatasetrequest.ts +40 -0
  85. package/packages/orq-rc/src/models/components/wiki.ts +3 -3
  86. package/packages/orq-rc/src/models/operations/apikeycreate.ts +116 -0
  87. package/packages/orq-rc/src/models/operations/apikeydelete.ts +1 -1
  88. package/packages/orq-rc/src/models/operations/apikeyget.ts +1 -11
  89. package/packages/orq-rc/src/models/operations/apikeylist.ts +23 -78
  90. package/packages/orq-rc/src/models/operations/apikeylistcapabilities.ts +39 -0
  91. package/packages/orq-rc/src/models/operations/apikeyupdate.ts +107 -5
  92. package/packages/orq-rc/src/models/operations/bulkcreatedatapoints.ts +44 -0
  93. package/packages/orq-rc/src/models/operations/cleardataset.ts +0 -3
  94. package/packages/orq-rc/src/models/operations/createagentrequest.ts +7 -7
  95. package/packages/orq-rc/src/models/operations/createchatcompletion.ts +9 -15
  96. package/packages/orq-rc/src/models/operations/createclassify.ts +2 -2
  97. package/packages/orq-rc/src/models/operations/createcompletion.ts +3 -3
  98. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +13 -3238
  99. package/packages/orq-rc/src/models/operations/createimage.ts +2 -2
  100. package/packages/orq-rc/src/models/operations/createimageedit.ts +2 -2
  101. package/packages/orq-rc/src/models/operations/createimagevariation.ts +2 -2
  102. package/packages/orq-rc/src/models/operations/creatererank.ts +2 -2
  103. package/packages/orq-rc/src/models/operations/createrouterresponse.ts +6 -6
  104. package/packages/orq-rc/src/models/operations/createspeech.ts +2 -2
  105. package/packages/orq-rc/src/models/operations/createtool.ts +4 -4
  106. package/packages/orq-rc/src/models/operations/createtranscription.ts +2 -2
  107. package/packages/orq-rc/src/models/operations/createtranslation.ts +2 -2
  108. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +0 -6
  109. package/packages/orq-rc/src/models/operations/deletedataset.ts +0 -3
  110. package/packages/orq-rc/src/models/operations/deletedatasetdatapoints.ts +43 -0
  111. package/packages/orq-rc/src/models/operations/deployments.ts +2 -2
  112. package/packages/orq-rc/src/models/operations/filelist.ts +3 -3
  113. package/packages/orq-rc/src/models/operations/getallmemories.ts +3 -3
  114. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +3 -3
  115. package/packages/orq-rc/src/models/operations/getallmemorystores.ts +3 -3
  116. package/packages/orq-rc/src/models/operations/getallprompts.ts +2 -2
  117. package/packages/orq-rc/src/models/operations/getalltools.ts +6 -6
  118. package/packages/orq-rc/src/models/operations/getevals.ts +2 -2
  119. package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +9 -9
  120. package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +2 -2
  121. package/packages/orq-rc/src/models/operations/getv2toolstoolidversions.ts +2 -2
  122. package/packages/orq-rc/src/models/operations/index.ts +4 -1
  123. package/packages/orq-rc/src/models/operations/listagents.ts +7 -7
  124. package/packages/orq-rc/src/models/operations/listchunks.ts +3 -3
  125. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2117
  126. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -173
  127. package/packages/orq-rc/src/models/operations/listdatasources.ts +3 -3
  128. package/packages/orq-rc/src/models/operations/listidentities.ts +1 -1
  129. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +2 -2
  130. package/packages/orq-rc/src/models/operations/listpromptversions.ts +2 -2
  131. package/packages/orq-rc/src/models/operations/modelcataloglist.ts +2 -2
  132. package/packages/orq-rc/src/models/operations/modelcataloglistofferings.ts +2 -2
  133. package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  134. package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +4 -4
  135. package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +2 -2
  136. package/packages/orq-rc/src/models/operations/projectlist.ts +2 -2
  137. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +5 -5
  138. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +0 -2003
  139. package/packages/orq-rc/src/models/operations/retrievedataset.ts +0 -114
  140. package/packages/orq-rc/src/models/operations/retrievetool.ts +4 -4
  141. package/packages/orq-rc/src/models/operations/runagent.ts +3 -3
  142. package/packages/orq-rc/src/models/operations/streamrunagent.ts +3 -3
  143. package/packages/orq-rc/src/models/operations/updateagent.ts +7 -7
  144. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +17 -3275
  145. package/packages/orq-rc/src/models/operations/updatedataset.ts +5 -170
  146. package/packages/orq-rc/src/models/operations/updatetool.ts +4 -4
  147. package/packages/orq-rc/src/sdk/apikeys.ts +18 -18
  148. package/packages/orq-rc/src/sdk/classify.ts +1 -1
  149. package/packages/orq-rc/src/sdk/datasets.ts +73 -36
  150. package/packages/orq-rc/src/sdk/humanreviewsets.ts +1 -1
  151. package/packages/orq-rc/src/sdk/projects.ts +4 -4
  152. package/packages/orq-rc/src/sdk/sdk.ts +10 -10
  153. package/src/lib/config.ts +2 -2
  154. package/src/models/components/reasoningpart.ts +1 -1
  155. package/src/models/operations/createdataset.ts +1 -1
  156. package/src/models/operations/createdatasetitem.ts +5 -5
  157. package/src/models/operations/createtool.ts +4 -4
  158. package/src/models/operations/getalltools.ts +4 -4
  159. package/src/models/operations/getv2humanevalsets.ts +2 -2
  160. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  161. package/src/models/operations/listdatasetdatapoints.ts +5 -5
  162. package/src/models/operations/listdatasets.ts +1 -1
  163. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  164. package/src/models/operations/postv2feedbackevaluation.ts +4 -4
  165. package/src/models/operations/postv2humanevalsets.ts +2 -2
  166. package/src/models/operations/retrievedatapoint.ts +5 -5
  167. package/src/models/operations/retrievedataset.ts +1 -1
  168. package/src/models/operations/retrievetool.ts +4 -4
  169. package/src/models/operations/runagent.ts +1 -1
  170. package/src/models/operations/streamrunagent.ts +1 -1
  171. package/src/models/operations/updatedatapoint.ts +5 -5
  172. package/src/models/operations/updatedataset.ts +1 -1
  173. package/src/models/operations/updatetool.ts +4 -4
  174. package/packages/orq-rc/src/models/components/allprojects.ts +0 -21
  175. package/packages/orq-rc/src/models/components/apikeyowner.ts +0 -55
  176. package/packages/orq-rc/src/models/components/apikeystatus.ts +0 -18
  177. package/packages/orq-rc/src/models/components/createapikeyrequest.ts +0 -116
  178. package/packages/orq-rc/src/models/components/domaingroup.ts +0 -17
  179. package/packages/orq-rc/src/models/components/listcapabilitiesresponse.ts +0 -38
  180. package/packages/orq-rc/src/models/components/mcpaccess.ts +0 -93
  181. package/packages/orq-rc/src/models/components/ownertype.ts +0 -17
  182. package/packages/orq-rc/src/models/components/permissionmode.ts +0 -19
  183. package/packages/orq-rc/src/models/components/scopemode.ts +0 -16
  184. package/packages/orq-rc/src/models/components/serviceaccountowner.ts +0 -25
  185. package/packages/orq-rc/src/models/components/singleproject.ts +0 -35
  186. package/packages/orq-rc/src/models/components/updateapikeyrequest.ts +0 -110
  187. package/packages/orq-rc/src/models/components/userowner.ts +0 -35
  188. package/packages/orq-rc/src/models/operations/createdataset.ts +0 -162
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
30
30
  * Classify
31
31
  *
32
32
  * @remarks
33
- * **Beta.** Runs typed classification questions (`noul`, `choice`, `score`) against the native classify model `typesafe/jev-latest` or a chat model that supports classify, such as `anthropic/claude-haiku-4-5`, `google-ai/gemini-3.8-flash` or `zai/glm-5.3-flash`. Chat models answer through one structured-output call and their probabilities are model-reported rather than calibrated. The request and response follow the TypeSafe classification contract; `model` in the response echoes the request and `usage` carries the computed cost like the Responses API. This endpoint currently does not apply PII plugins or guardrails.
33
+ * **Beta.** Runs typed classification questions (`noul`, `choice`, `score`) against the native classify model `typesafe/jev-latest` or a chat model that supports classify. Chat models answer through one structured-output call and their probabilities are model-reported rather than calibrated. The request and response follow the TypeSafe classification contract; `model` in the response echoes the request and `usage` carries the computed cost like the Responses API. This endpoint currently does not apply PII plugins or guardrails.
34
34
  */
35
35
  export function routerClassifyCreate(
36
36
  client: OrqCore,
@@ -58,7 +58,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
58
58
  export const SDK_METADATA = {
59
59
  language: "typescript",
60
60
  openapiDocVersion: "2.0",
61
- sdkVersion: "4.16.0-rc.9",
61
+ sdkVersion: "4.16.0-rc.14",
62
62
  genVersion: "2.938.0",
63
- userAgent: "speakeasy-sdk/typescript 4.16.0-rc.9 2.938.0 2.0 @orq-ai/node",
63
+ userAgent: "speakeasy-sdk/typescript 4.16.0-rc.14 2.938.0 2.0 @orq-ai/node",
64
64
  } as const;
@@ -16,7 +16,7 @@ export type ApiKeyRestResponse = {
16
16
  name: string;
17
17
  workspaceId: string;
18
18
  /**
19
- * Raw on create/retrieve and masked in list responses.
19
+ * Raw on create; the key prefix on retrieve and update; masked in list responses.
20
20
  */
21
21
  token: string;
22
22
  active?: boolean | undefined;
@@ -0,0 +1,38 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import {
7
+ DatapointInput,
8
+ DatapointInput$Outbound,
9
+ DatapointInput$outboundSchema,
10
+ } from "./datapointinput.js";
11
+
12
+ export type BulkCreateDatapointsRequest = {
13
+ items: Array<DatapointInput>;
14
+ };
15
+
16
+ /** @internal */
17
+ export type BulkCreateDatapointsRequest$Outbound = {
18
+ items: Array<DatapointInput$Outbound>;
19
+ };
20
+
21
+ /** @internal */
22
+ export const BulkCreateDatapointsRequest$outboundSchema: z.ZodType<
23
+ BulkCreateDatapointsRequest$Outbound,
24
+ z.ZodTypeDef,
25
+ BulkCreateDatapointsRequest
26
+ > = z.object({
27
+ items: z.array(DatapointInput$outboundSchema),
28
+ });
29
+
30
+ export function bulkCreateDatapointsRequestToJSON(
31
+ bulkCreateDatapointsRequest: BulkCreateDatapointsRequest,
32
+ ): string {
33
+ return JSON.stringify(
34
+ BulkCreateDatapointsRequest$outboundSchema.parse(
35
+ bulkCreateDatapointsRequest,
36
+ ),
37
+ );
38
+ }
@@ -27,7 +27,7 @@ export type ClassifyAnswer = {
27
27
  */
28
28
  choice?: string | undefined;
29
29
  /**
30
- * Probability of the selected option or level. Present for choice and score answers.
30
+ * How sure the model is of the answer it selected: on chat models the largest value in probabilities, so it adds nothing the distribution does not; typesafe/jev-latest returns its own calibrated value, which can sit below the largest probability. Present for choice and score answers.
31
31
  */
32
32
  confidence?: number | undefined;
33
33
  /**
@@ -43,7 +43,7 @@ export type ClassifyAnswer = {
43
43
  */
44
44
  probabilities?: { [k: string]: number } | undefined;
45
45
  /**
46
- * The selected level index. Present for score answers.
46
+ * Position on the scale, not an index: on chat models the weighted index, each level index multiplied by that level probability and summed, so the value is usually fractional; typesafe/jev-latest returns its own score. Present for score answers.
47
47
  */
48
48
  score?: number | undefined;
49
49
  /**
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+
8
+ export type Constraints = {
9
+ expiresAt?: Date | undefined;
10
+ };
11
+
12
+ /** @internal */
13
+ export type Constraints$Outbound = {
14
+ expires_at?: string | undefined;
15
+ };
16
+
17
+ /** @internal */
18
+ export const Constraints$outboundSchema: z.ZodType<
19
+ Constraints$Outbound,
20
+ z.ZodTypeDef,
21
+ Constraints
22
+ > = z.object({
23
+ expiresAt: z.date().transform(v => v.toISOString()).optional(),
24
+ }).transform((v) => {
25
+ return remap$(v, {
26
+ expiresAt: "expires_at",
27
+ });
28
+ });
29
+
30
+ export function constraintsToJSON(constraints: Constraints): string {
31
+ return JSON.stringify(Constraints$outboundSchema.parse(constraints));
32
+ }
@@ -0,0 +1,39 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+
8
+ export type CreateDatasetRequest = {
9
+ /**
10
+ * Human-readable dataset name.
11
+ */
12
+ displayName: string;
13
+ };
14
+
15
+ /** @internal */
16
+ export type CreateDatasetRequest$Outbound = {
17
+ display_name: string;
18
+ };
19
+
20
+ /** @internal */
21
+ export const CreateDatasetRequest$outboundSchema: z.ZodType<
22
+ CreateDatasetRequest$Outbound,
23
+ z.ZodTypeDef,
24
+ CreateDatasetRequest
25
+ > = z.object({
26
+ displayName: z.string(),
27
+ }).transform((v) => {
28
+ return remap$(v, {
29
+ displayName: "display_name",
30
+ });
31
+ });
32
+
33
+ export function createDatasetRequestToJSON(
34
+ createDatasetRequest: CreateDatasetRequest,
35
+ ): string {
36
+ return JSON.stringify(
37
+ CreateDatasetRequest$outboundSchema.parse(createDatasetRequest),
38
+ );
39
+ }
@@ -0,0 +1,122 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * Structured variables passed to the prompt or workflow.
13
+ */
14
+ export type Inputs = {};
15
+
16
+ /**
17
+ * A datapoint stores the inputs, messages, and expected output used in dataset evaluations.
18
+ */
19
+ export type Datapoint1 = {
20
+ /**
21
+ * Structured variables passed to the prompt or workflow.
22
+ */
23
+ inputs?: Inputs | undefined;
24
+ /**
25
+ * A JSON array containing dynamically typed values.
26
+ */
27
+ messages?: Array<any> | undefined;
28
+ /**
29
+ * Reference output expected for this datapoint.
30
+ */
31
+ expectedOutput?: string | undefined;
32
+ /**
33
+ * A JSON array containing dynamically typed values.
34
+ */
35
+ evaluations?: Array<any> | undefined;
36
+ /**
37
+ * Dataset that owns the datapoint.
38
+ */
39
+ datasetId: string;
40
+ /**
41
+ * Dataset snapshot version that includes the datapoint.
42
+ */
43
+ snapshotVersion?: string | undefined;
44
+ /**
45
+ * Account that created the datapoint.
46
+ */
47
+ createdById: string;
48
+ /**
49
+ * Account that last updated the datapoint.
50
+ */
51
+ updatedById: string;
52
+ /**
53
+ * RFC3339 timestamp when the datapoint was created.
54
+ */
55
+ created?: string | undefined;
56
+ /**
57
+ * RFC3339 timestamp when the datapoint was last updated.
58
+ */
59
+ updated?: string | undefined;
60
+ /**
61
+ * Workspace that owns the datapoint, derived from the authentication context.
62
+ */
63
+ workspaceId?: string | undefined;
64
+ /**
65
+ * Unique datapoint identifier.
66
+ */
67
+ id: string;
68
+ };
69
+
70
+ /** @internal */
71
+ export const Inputs$inboundSchema: z.ZodType<Inputs, z.ZodTypeDef, unknown> = z
72
+ .object({});
73
+
74
+ export function inputsFromJSON(
75
+ jsonString: string,
76
+ ): SafeParseResult<Inputs, SDKValidationError> {
77
+ return safeParse(
78
+ jsonString,
79
+ (x) => Inputs$inboundSchema.parse(JSON.parse(x)),
80
+ `Failed to parse 'Inputs' from JSON`,
81
+ );
82
+ }
83
+
84
+ /** @internal */
85
+ export const Datapoint1$inboundSchema: z.ZodType<
86
+ Datapoint1,
87
+ z.ZodTypeDef,
88
+ unknown
89
+ > = z.object({
90
+ inputs: z.lazy(() => Inputs$inboundSchema).optional(),
91
+ messages: z.array(z.any()).optional(),
92
+ expected_output: z.string().optional(),
93
+ evaluations: z.array(z.any()).optional(),
94
+ dataset_id: z.string(),
95
+ snapshot_version: z.string().optional(),
96
+ created_by_id: z.string(),
97
+ updated_by_id: z.string(),
98
+ created: z.string().optional(),
99
+ updated: z.string().optional(),
100
+ workspace_id: z.string().optional(),
101
+ _id: z.string(),
102
+ }).transform((v) => {
103
+ return remap$(v, {
104
+ "expected_output": "expectedOutput",
105
+ "dataset_id": "datasetId",
106
+ "snapshot_version": "snapshotVersion",
107
+ "created_by_id": "createdById",
108
+ "updated_by_id": "updatedById",
109
+ "workspace_id": "workspaceId",
110
+ "_id": "id",
111
+ });
112
+ });
113
+
114
+ export function datapoint1FromJSON(
115
+ jsonString: string,
116
+ ): SafeParseResult<Datapoint1, SDKValidationError> {
117
+ return safeParse(
118
+ jsonString,
119
+ (x) => Datapoint1$inboundSchema.parse(JSON.parse(x)),
120
+ `Failed to parse 'Datapoint1' from JSON`,
121
+ );
122
+ }
@@ -0,0 +1,73 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+
8
+ /**
9
+ * Structured variables passed to the prompt or workflow.
10
+ */
11
+ export type DatapointInputInputs = {};
12
+
13
+ /**
14
+ * Datapoint content submitted by the caller.
15
+ */
16
+ export type DatapointInput = {
17
+ /**
18
+ * Structured variables passed to the prompt or workflow.
19
+ */
20
+ inputs?: DatapointInputInputs | undefined;
21
+ /**
22
+ * A JSON array containing dynamically typed values.
23
+ */
24
+ messages?: Array<any> | undefined;
25
+ /**
26
+ * Reference output expected for this datapoint.
27
+ */
28
+ expectedOutput?: string | undefined;
29
+ };
30
+
31
+ /** @internal */
32
+ export type DatapointInputInputs$Outbound = {};
33
+
34
+ /** @internal */
35
+ export const DatapointInputInputs$outboundSchema: z.ZodType<
36
+ DatapointInputInputs$Outbound,
37
+ z.ZodTypeDef,
38
+ DatapointInputInputs
39
+ > = z.object({});
40
+
41
+ export function datapointInputInputsToJSON(
42
+ datapointInputInputs: DatapointInputInputs,
43
+ ): string {
44
+ return JSON.stringify(
45
+ DatapointInputInputs$outboundSchema.parse(datapointInputInputs),
46
+ );
47
+ }
48
+
49
+ /** @internal */
50
+ export type DatapointInput$Outbound = {
51
+ inputs?: DatapointInputInputs$Outbound | undefined;
52
+ messages?: Array<any> | undefined;
53
+ expected_output?: string | undefined;
54
+ };
55
+
56
+ /** @internal */
57
+ export const DatapointInput$outboundSchema: z.ZodType<
58
+ DatapointInput$Outbound,
59
+ z.ZodTypeDef,
60
+ DatapointInput
61
+ > = z.object({
62
+ inputs: z.lazy(() => DatapointInputInputs$outboundSchema).optional(),
63
+ messages: z.array(z.any()).optional(),
64
+ expectedOutput: z.string().optional(),
65
+ }).transform((v) => {
66
+ return remap$(v, {
67
+ expectedOutput: "expected_output",
68
+ });
69
+ });
70
+
71
+ export function datapointInputToJSON(datapointInput: DatapointInput): string {
72
+ return JSON.stringify(DatapointInput$outboundSchema.parse(datapointInput));
73
+ }
@@ -0,0 +1,88 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ DatasetMetadata,
12
+ DatasetMetadata$inboundSchema,
13
+ } from "./datasetmetadata.js";
14
+
15
+ /**
16
+ * A dataset groups datapoints used for evaluation and optimization workflows.
17
+ */
18
+ export type Dataset = {
19
+ /**
20
+ * Human-readable dataset name.
21
+ */
22
+ displayName: string;
23
+ /**
24
+ * Project that owns the dataset.
25
+ */
26
+ projectId: string;
27
+ /**
28
+ * Dataset counters maintained by the API.
29
+ */
30
+ metadata: DatasetMetadata;
31
+ /**
32
+ * Account that created the dataset.
33
+ */
34
+ createdById: string;
35
+ /**
36
+ * Account that last updated the dataset.
37
+ */
38
+ updatedById: string;
39
+ /**
40
+ * RFC3339 timestamp when the dataset was created.
41
+ */
42
+ created: string;
43
+ /**
44
+ * RFC3339 timestamp when the dataset was last updated.
45
+ */
46
+ updated: string;
47
+ /**
48
+ * Workspace that owns the dataset, derived from the authentication context.
49
+ */
50
+ workspaceId: string;
51
+ /**
52
+ * Unique dataset identifier.
53
+ */
54
+ id: string;
55
+ };
56
+
57
+ /** @internal */
58
+ export const Dataset$inboundSchema: z.ZodType<Dataset, z.ZodTypeDef, unknown> =
59
+ z.object({
60
+ display_name: z.string(),
61
+ project_id: z.string(),
62
+ metadata: DatasetMetadata$inboundSchema,
63
+ created_by_id: z.string(),
64
+ updated_by_id: z.string(),
65
+ created: z.string(),
66
+ updated: z.string(),
67
+ workspace_id: z.string(),
68
+ _id: z.string(),
69
+ }).transform((v) => {
70
+ return remap$(v, {
71
+ "display_name": "displayName",
72
+ "project_id": "projectId",
73
+ "created_by_id": "createdById",
74
+ "updated_by_id": "updatedById",
75
+ "workspace_id": "workspaceId",
76
+ "_id": "id",
77
+ });
78
+ });
79
+
80
+ export function datasetFromJSON(
81
+ jsonString: string,
82
+ ): SafeParseResult<Dataset, SDKValidationError> {
83
+ return safeParse(
84
+ jsonString,
85
+ (x) => Dataset$inboundSchema.parse(JSON.parse(x)),
86
+ `Failed to parse 'Dataset' from JSON`,
87
+ );
88
+ }
@@ -0,0 +1,48 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * Dataset counters maintained by the API.
13
+ */
14
+ export type DatasetMetadata = {
15
+ /**
16
+ * Number of dataset versions.
17
+ */
18
+ totalVersions: number;
19
+ /**
20
+ * Number of datapoints currently in the dataset.
21
+ */
22
+ datapointsCount: number;
23
+ };
24
+
25
+ /** @internal */
26
+ export const DatasetMetadata$inboundSchema: z.ZodType<
27
+ DatasetMetadata,
28
+ z.ZodTypeDef,
29
+ unknown
30
+ > = z.object({
31
+ total_versions: z.number().int(),
32
+ datapoints_count: z.number().int(),
33
+ }).transform((v) => {
34
+ return remap$(v, {
35
+ "total_versions": "totalVersions",
36
+ "datapoints_count": "datapointsCount",
37
+ });
38
+ });
39
+
40
+ export function datasetMetadataFromJSON(
41
+ jsonString: string,
42
+ ): SafeParseResult<DatasetMetadata, SDKValidationError> {
43
+ return safeParse(
44
+ jsonString,
45
+ (x) => DatasetMetadata$inboundSchema.parse(JSON.parse(x)),
46
+ `Failed to parse 'DatasetMetadata' from JSON`,
47
+ );
48
+ }
@@ -30,7 +30,7 @@ export type DatasourceStatus = ClosedEnum<typeof DatasourceStatus>;
30
30
  export type Datasource = {
31
31
  displayName: string;
32
32
  /**
33
- * The description of the knowledge base
33
+ * The description of the datasource
34
34
  */
35
35
  description?: string | null | undefined;
36
36
  status: DatasourceStatus;
@@ -51,7 +51,7 @@ export type Datasource = {
51
51
  knowledgeId: string;
52
52
  chunksCount: number;
53
53
  /**
54
- * Additive compatibility fields formerly available only from database-shaped responses.
54
+ * Processing attempts recorded for the datasource.
55
55
  */
56
56
  processingAttempts?: Array<ProcessingAttempt> | undefined;
57
57
  metadata?: CountMetadata | undefined;
@@ -23,13 +23,13 @@ import {
23
23
  export type DatasourcesServiceCreateRequest = {
24
24
  displayName?: string | undefined;
25
25
  /**
26
- * The description of the knowledge base
26
+ * The description of the datasource
27
27
  */
28
28
  description?: string | null | undefined;
29
29
  fileId?: string | undefined;
30
30
  chunkingOptions?: DatasourceChunkingOptions | undefined;
31
31
  /**
32
- * Compatibility fields used by the former datasource shell/legacy route.
32
+ * Optional datasource ID. When omitted, the server generates one.
33
33
  */
34
34
  id?: string | undefined;
35
35
  attachment?: DatasourceAttachment | undefined;
@@ -0,0 +1,36 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+
8
+ export type DeleteDatapointsRequest = {
9
+ itemIds: Array<string>;
10
+ };
11
+
12
+ /** @internal */
13
+ export type DeleteDatapointsRequest$Outbound = {
14
+ item_ids: Array<string>;
15
+ };
16
+
17
+ /** @internal */
18
+ export const DeleteDatapointsRequest$outboundSchema: z.ZodType<
19
+ DeleteDatapointsRequest$Outbound,
20
+ z.ZodTypeDef,
21
+ DeleteDatapointsRequest
22
+ > = z.object({
23
+ itemIds: z.array(z.string()),
24
+ }).transform((v) => {
25
+ return remap$(v, {
26
+ itemIds: "item_ids",
27
+ });
28
+ });
29
+
30
+ export function deleteDatapointsRequestToJSON(
31
+ deleteDatapointsRequest: DeleteDatapointsRequest,
32
+ ): string {
33
+ return JSON.stringify(
34
+ DeleteDatapointsRequest$outboundSchema.parse(deleteDatapointsRequest),
35
+ );
36
+ }
@@ -5,71 +5,74 @@
5
5
  import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
8
9
  import { Result as SafeParseResult } from "../../types/fp.js";
9
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import { DomainGroup, DomainGroup$inboundSchema } from "./domaingroup.js";
11
- import { ScopeMode, ScopeMode$inboundSchema } from "./scopemode.js";
12
11
 
13
12
  /**
14
- * Domain describes a permission domain that can be granted to an
15
- *
16
- * @remarks
17
- * API key. Standard verbs are derived from id + group +
18
- * readable/writable; exceptional write verbs are explicit data.
13
+ * Logical group the entry belongs to.
19
14
  */
15
+ export const Group = {
16
+ DomainGroupUnspecified: "DOMAIN_GROUP_UNSPECIFIED",
17
+ DomainGroupWorkspaceAdmin: "DOMAIN_GROUP_WORKSPACE_ADMIN",
18
+ DomainGroupPlatform: "DOMAIN_GROUP_PLATFORM",
19
+ DomainGroupGateway: "DOMAIN_GROUP_GATEWAY",
20
+ } as const;
21
+ /**
22
+ * Logical group the entry belongs to.
23
+ */
24
+ export type Group = ClosedEnum<typeof Group>;
25
+
20
26
  export type Domain = {
21
27
  /**
22
- * Stable domain identifier (e.g. "agent", "chat_completions"). Used
23
- *
24
- * @remarks
25
- * as the key in ApiKey.access and as the verb prefix in resolved
26
- * permissions (e.g. agent.list, agent.view, agent.create).
28
+ * Project scopes this domain may be granted under.
29
+ */
30
+ allowedScopes: Array<string> | null;
31
+ /**
32
+ * Human-readable label.
27
33
  */
28
- id?: string | undefined;
34
+ displayName: string;
29
35
  /**
30
- * Human-readable label for the dashboard.
36
+ * Additional verbs granted only with write access.
31
37
  */
32
- displayName?: string | undefined;
33
- group?: DomainGroup | undefined;
38
+ extraWriteVerbs: Array<string> | null;
34
39
  /**
35
- * Project scopes this domain may be granted under. A workspace-
36
- *
37
- * @remarks
38
- * admin domain like `member` is typically SCOPE_MODE_ALL only.
40
+ * Logical group the entry belongs to.
39
41
  */
40
- allowedScopes?: Array<ScopeMode> | undefined;
42
+ group: Group;
41
43
  /**
42
- * Whether this domain can be granted read access.
44
+ * Stable domain identifier, used as the key in access and as the verb prefix in resolved permissions.
43
45
  */
44
- readable?: boolean | undefined;
46
+ id: string;
45
47
  /**
46
- * Whether this domain can be granted write access.
48
+ * Whether the domain can be granted read access.
47
49
  */
48
- writable?: boolean | undefined;
50
+ readable: boolean;
49
51
  /**
50
- * Additional full verb names granted only with write access. This is
51
- *
52
- * @remarks
53
- * additive to the standard group-derived verbs and intentionally does
54
- * not affect read access (e.g. "insights.run").
52
+ * Whether the domain can be granted write access.
55
53
  */
56
- extraWriteVerbs?: Array<string> | undefined;
54
+ writable: boolean;
57
55
  };
58
56
 
57
+ /** @internal */
58
+ export const Group$inboundSchema: z.ZodNativeEnum<typeof Group> = z.nativeEnum(
59
+ Group,
60
+ );
61
+
59
62
  /** @internal */
60
63
  export const Domain$inboundSchema: z.ZodType<Domain, z.ZodTypeDef, unknown> = z
61
64
  .object({
62
- id: z.string().optional(),
63
- display_name: z.string().optional(),
64
- group: DomainGroup$inboundSchema.optional(),
65
- allowed_scopes: z.array(ScopeMode$inboundSchema).optional(),
66
- readable: z.boolean().optional(),
67
- writable: z.boolean().optional(),
68
- extra_write_verbs: z.array(z.string()).optional(),
65
+ allowed_scopes: z.nullable(z.array(z.string())),
66
+ display_name: z.string(),
67
+ extra_write_verbs: z.nullable(z.array(z.string())),
68
+ group: Group$inboundSchema,
69
+ id: z.string(),
70
+ readable: z.boolean(),
71
+ writable: z.boolean(),
69
72
  }).transform((v) => {
70
73
  return remap$(v, {
71
- "display_name": "displayName",
72
74
  "allowed_scopes": "allowedScopes",
75
+ "display_name": "displayName",
73
76
  "extra_write_verbs": "extraWriteVerbs",
74
77
  });
75
78
  });