@orq-ai/node 4.9.28 → 4.9.29

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 (158) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +3 -3
  3. package/lib/config.js +3 -3
  4. package/models/components/reasoningpart.js +1 -1
  5. package/models/operations/createagentresponserequest.d.ts.map +1 -1
  6. package/models/operations/createagentresponserequest.js +3 -1
  7. package/models/operations/createagentresponserequest.js.map +1 -1
  8. package/models/operations/createchatcompletion.d.ts.map +1 -1
  9. package/models/operations/createchatcompletion.js +3 -1
  10. package/models/operations/createchatcompletion.js.map +1 -1
  11. package/models/operations/createcompletion.d.ts.map +1 -1
  12. package/models/operations/createcompletion.js +3 -1
  13. package/models/operations/createcompletion.js.map +1 -1
  14. package/models/operations/createcontact.js +1 -1
  15. package/models/operations/createdataset.js +1 -1
  16. package/models/operations/createdatasetitem.js +4 -4
  17. package/models/operations/createdatasource.js +1 -1
  18. package/models/operations/createeval.js +16 -16
  19. package/models/operations/createidentity.js +1 -1
  20. package/models/operations/createrouterresponse.d.ts.map +1 -1
  21. package/models/operations/createrouterresponse.js +3 -1
  22. package/models/operations/createrouterresponse.js.map +1 -1
  23. package/models/operations/createtool.js +6 -6
  24. package/models/operations/deploymentstream.d.ts.map +1 -1
  25. package/models/operations/deploymentstream.js +3 -1
  26. package/models/operations/deploymentstream.js.map +1 -1
  27. package/models/operations/getalltools.js +6 -6
  28. package/models/operations/getevals.js +16 -16
  29. package/models/operations/getv2humanevalsets.js +2 -2
  30. package/models/operations/getv2humanevalsetsid.js +2 -2
  31. package/models/operations/listdatasetdatapoints.js +4 -4
  32. package/models/operations/listdatasets.js +1 -1
  33. package/models/operations/listdatasources.js +1 -1
  34. package/models/operations/listidentities.js +1 -1
  35. package/models/operations/patchv2humanevalsetsid.js +2 -2
  36. package/models/operations/postv2feedbackevaluation.js +3 -3
  37. package/models/operations/postv2humanevalsets.js +2 -2
  38. package/models/operations/retrievedatapoint.js +4 -4
  39. package/models/operations/retrievedataset.js +1 -1
  40. package/models/operations/retrievedatasource.js +1 -1
  41. package/models/operations/retrieveidentity.js +1 -1
  42. package/models/operations/retrievetool.js +6 -6
  43. package/models/operations/runagent.js +1 -1
  44. package/models/operations/streamagent.d.ts.map +1 -1
  45. package/models/operations/streamagent.js +3 -1
  46. package/models/operations/streamagent.js.map +1 -1
  47. package/models/operations/streamrunagent.d.ts.map +1 -1
  48. package/models/operations/streamrunagent.js +4 -2
  49. package/models/operations/streamrunagent.js.map +1 -1
  50. package/models/operations/updatedatapoint.js +4 -4
  51. package/models/operations/updatedataset.js +1 -1
  52. package/models/operations/updatedatasource.js +1 -1
  53. package/models/operations/updateeval.js +16 -16
  54. package/models/operations/updateidentity.js +1 -1
  55. package/models/operations/updatetool.js +7 -7
  56. package/package.json +3 -3
  57. package/packages/orq-rc/src/funcs/identitiesCreate.ts +1 -1
  58. package/packages/orq-rc/src/funcs/piiDetect.ts +162 -0
  59. package/packages/orq-rc/src/funcs/piiRedact.ts +162 -0
  60. package/packages/orq-rc/src/funcs/piiRestore.ts +162 -0
  61. package/packages/orq-rc/src/lib/config.ts +3 -3
  62. package/packages/orq-rc/src/models/components/apikey.ts +3 -12
  63. package/packages/orq-rc/src/models/components/detectrequest.ts +56 -0
  64. package/packages/orq-rc/src/models/components/detectresponse.ts +41 -0
  65. package/packages/orq-rc/src/models/components/embeddingcacheconfig.ts +59 -0
  66. package/packages/orq-rc/src/models/components/embeddingcontactparams.ts +48 -0
  67. package/packages/orq-rc/src/models/components/embeddingloadbalancerconfig.ts +66 -0
  68. package/packages/orq-rc/src/models/components/embeddingloadbalancermodelconfig.ts +42 -0
  69. package/packages/orq-rc/src/models/components/embeddingorqparams.ts +101 -0
  70. package/packages/orq-rc/src/models/components/embeddingretryconfig.ts +45 -0
  71. package/packages/orq-rc/src/models/components/embeddingtimeoutconfig.ts +39 -0
  72. package/packages/orq-rc/src/models/components/evaluatorref.ts +4 -0
  73. package/packages/orq-rc/src/models/components/guardrailref.ts +4 -0
  74. package/packages/orq-rc/src/models/components/index.ts +15 -0
  75. package/packages/orq-rc/src/models/components/publicembeddingdata.ts +60 -0
  76. package/packages/orq-rc/src/models/components/publicembeddingusage.ts +45 -0
  77. package/packages/orq-rc/src/models/components/publicmodelentry.ts +7 -6
  78. package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
  79. package/packages/orq-rc/src/models/components/redactrequest.ts +33 -0
  80. package/packages/orq-rc/src/models/components/redactresponse.ts +41 -0
  81. package/packages/orq-rc/src/models/components/restorerequest.ts +38 -0
  82. package/packages/orq-rc/src/models/components/restoreresponse.ts +36 -0
  83. package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +2 -1
  84. package/packages/orq-rc/src/models/operations/createchatcompletion.ts +2 -1
  85. package/packages/orq-rc/src/models/operations/createcompletion.ts +2 -1
  86. package/packages/orq-rc/src/models/operations/createdataset.ts +1 -1
  87. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +4 -4
  88. package/packages/orq-rc/src/models/operations/createdatasource.ts +1 -1
  89. package/packages/orq-rc/src/models/operations/createembedding.ts +82 -810
  90. package/packages/orq-rc/src/models/operations/createeval.ts +16 -91
  91. package/packages/orq-rc/src/models/operations/createrouterresponse.ts +33 -15
  92. package/packages/orq-rc/src/models/operations/createtool.ts +6 -6
  93. package/packages/orq-rc/src/models/operations/deploymentstream.ts +2 -1
  94. package/packages/orq-rc/src/models/operations/getalltools.ts +6 -6
  95. package/packages/orq-rc/src/models/operations/getevals.ts +16 -64
  96. package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +2 -2
  97. package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +2 -2
  98. package/packages/orq-rc/src/models/operations/listchunks.ts +35 -6
  99. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +4 -4
  100. package/packages/orq-rc/src/models/operations/listdatasets.ts +1 -1
  101. package/packages/orq-rc/src/models/operations/listdatasources.ts +1 -1
  102. package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  103. package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +3 -3
  104. package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +2 -2
  105. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +4 -4
  106. package/packages/orq-rc/src/models/operations/retrievedataset.ts +1 -1
  107. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +1 -1
  108. package/packages/orq-rc/src/models/operations/retrievetool.ts +6 -6
  109. package/packages/orq-rc/src/models/operations/runagent.ts +1 -1
  110. package/packages/orq-rc/src/models/operations/streamagent.ts +2 -1
  111. package/packages/orq-rc/src/models/operations/streamrunagent.ts +3 -2
  112. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +4 -4
  113. package/packages/orq-rc/src/models/operations/updatedataset.ts +1 -1
  114. package/packages/orq-rc/src/models/operations/updatedatasource.ts +1 -1
  115. package/packages/orq-rc/src/models/operations/updateeval.ts +16 -73
  116. package/packages/orq-rc/src/models/operations/updatetool.ts +7 -7
  117. package/packages/orq-rc/src/sdk/pii.ts +63 -0
  118. package/packages/orq-rc/src/sdk/router.ts +5 -5
  119. package/packages/orq-rc/src/sdk/sdk.ts +6 -0
  120. package/src/lib/config.ts +3 -3
  121. package/src/models/components/reasoningpart.ts +1 -1
  122. package/src/models/operations/createagentresponserequest.ts +2 -1
  123. package/src/models/operations/createchatcompletion.ts +2 -1
  124. package/src/models/operations/createcompletion.ts +2 -1
  125. package/src/models/operations/createcontact.ts +1 -1
  126. package/src/models/operations/createdataset.ts +1 -1
  127. package/src/models/operations/createdatasetitem.ts +4 -4
  128. package/src/models/operations/createdatasource.ts +1 -1
  129. package/src/models/operations/createeval.ts +16 -16
  130. package/src/models/operations/createidentity.ts +1 -1
  131. package/src/models/operations/createrouterresponse.ts +2 -1
  132. package/src/models/operations/createtool.ts +6 -6
  133. package/src/models/operations/deploymentstream.ts +2 -1
  134. package/src/models/operations/getalltools.ts +6 -6
  135. package/src/models/operations/getevals.ts +16 -16
  136. package/src/models/operations/getv2humanevalsets.ts +2 -2
  137. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  138. package/src/models/operations/listdatasetdatapoints.ts +4 -4
  139. package/src/models/operations/listdatasets.ts +1 -1
  140. package/src/models/operations/listdatasources.ts +1 -1
  141. package/src/models/operations/listidentities.ts +1 -1
  142. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  143. package/src/models/operations/postv2feedbackevaluation.ts +3 -3
  144. package/src/models/operations/postv2humanevalsets.ts +2 -2
  145. package/src/models/operations/retrievedatapoint.ts +4 -4
  146. package/src/models/operations/retrievedataset.ts +1 -1
  147. package/src/models/operations/retrievedatasource.ts +1 -1
  148. package/src/models/operations/retrieveidentity.ts +1 -1
  149. package/src/models/operations/retrievetool.ts +6 -6
  150. package/src/models/operations/runagent.ts +1 -1
  151. package/src/models/operations/streamagent.ts +2 -1
  152. package/src/models/operations/streamrunagent.ts +3 -2
  153. package/src/models/operations/updatedatapoint.ts +4 -4
  154. package/src/models/operations/updatedataset.ts +1 -1
  155. package/src/models/operations/updatedatasource.ts +1 -1
  156. package/src/models/operations/updateeval.ts +16 -16
  157. package/src/models/operations/updateidentity.ts +1 -1
  158. package/src/models/operations/updatetool.ts +7 -7
@@ -55,18 +55,9 @@ export type ApiKey = {
55
55
  * keys and the per-domain read / write semantics are exposed at
56
56
  * runtime via the `ListCapabilities` RPC.
57
57
  *
58
- * Valid keys (Domain.id) currently in the catalog:
59
- * Workspace-admin: "api-key", "member", "billing", "sso", "group",
60
- * "audit-log", "workspace"
61
- * Platform: "agent", "agent-schedule", "annotation",
62
- * "chunking", "dataset", "deployment", "eval",
63
- * "file", "guardrail-rule", "identity",
64
- * "knowledge", "memory-store", "policy",
65
- * "project", "prompt", "routing-rule", "skill",
66
- * "tool"
67
- * Gateway: "chat_completions", "embeddings", "responses",
68
- * "moderations", "images", "audio_speech",
69
- * "audio_transcription", "realtime", "model"
58
+ * Valid keys are the Domain.id values in the capability catalog
59
+ * see libs/catalog/orq/apikeys/v1/catalog.textpb for the canonical
60
+ * list. The ids are intentionally not duplicated here to avoid drift.
70
61
  *
71
62
  * Values are AccessLevel enum names on the JSON wire:
72
63
  * "ACCESS_LEVEL_NONE" — capability not granted
@@ -0,0 +1,56 @@
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
+ * The workspace is resolved from the API key, never sent in the body.
10
+ */
11
+ export type DetectRequest = {
12
+ /**
13
+ * Text to analyse.
14
+ */
15
+ text?: string | undefined;
16
+ /**
17
+ * BCP-47 language code. Unset means auto-detect.
18
+ */
19
+ language?: string | undefined;
20
+ /**
21
+ * Global minimum recognizer score (0.0-1.0). Unset uses the provider default.
22
+ */
23
+ threshold?: number | undefined;
24
+ /**
25
+ * When true, the response includes a per-type entity breakdown.
26
+ */
27
+ includeEntities?: boolean | undefined;
28
+ };
29
+
30
+ /** @internal */
31
+ export type DetectRequest$Outbound = {
32
+ text?: string | undefined;
33
+ language?: string | undefined;
34
+ threshold?: number | undefined;
35
+ include_entities?: boolean | undefined;
36
+ };
37
+
38
+ /** @internal */
39
+ export const DetectRequest$outboundSchema: z.ZodType<
40
+ DetectRequest$Outbound,
41
+ z.ZodTypeDef,
42
+ DetectRequest
43
+ > = z.object({
44
+ text: z.string().optional(),
45
+ language: z.string().optional(),
46
+ threshold: z.number().optional(),
47
+ includeEntities: z.boolean().optional(),
48
+ }).transform((v) => {
49
+ return remap$(v, {
50
+ includeEntities: "include_entities",
51
+ });
52
+ });
53
+
54
+ export function detectRequestToJSON(detectRequest: DetectRequest): string {
55
+ return JSON.stringify(DetectRequest$outboundSchema.parse(detectRequest));
56
+ }
@@ -0,0 +1,41 @@
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
+ export type DetectResponse = {
12
+ hasPii?: boolean | undefined;
13
+ /**
14
+ * Per-entity-type counts. Populated only when include_entities was set.
15
+ */
16
+ entities?: { [k: string]: number } | undefined;
17
+ };
18
+
19
+ /** @internal */
20
+ export const DetectResponse$inboundSchema: z.ZodType<
21
+ DetectResponse,
22
+ z.ZodTypeDef,
23
+ unknown
24
+ > = z.object({
25
+ has_pii: z.boolean().optional(),
26
+ entities: z.record(z.number().int()).optional(),
27
+ }).transform((v) => {
28
+ return remap$(v, {
29
+ "has_pii": "hasPii",
30
+ });
31
+ });
32
+
33
+ export function detectResponseFromJSON(
34
+ jsonString: string,
35
+ ): SafeParseResult<DetectResponse, SDKValidationError> {
36
+ return safeParse(
37
+ jsonString,
38
+ (x) => DetectResponse$inboundSchema.parse(JSON.parse(x)),
39
+ `Failed to parse 'DetectResponse' from JSON`,
40
+ );
41
+ }
@@ -0,0 +1,59 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ /**
9
+ * Cache type.
10
+ */
11
+ export const EmbeddingCacheConfigType = {
12
+ ExactMatch: "exact_match",
13
+ } as const;
14
+ /**
15
+ * Cache type.
16
+ */
17
+ export type EmbeddingCacheConfigType = ClosedEnum<
18
+ typeof EmbeddingCacheConfigType
19
+ >;
20
+
21
+ export type EmbeddingCacheConfig = {
22
+ /**
23
+ * Time to live for cached responses in seconds. Maximum 259200 seconds (3 days).
24
+ */
25
+ ttl?: number | undefined;
26
+ /**
27
+ * Cache type.
28
+ */
29
+ type: EmbeddingCacheConfigType;
30
+ };
31
+
32
+ /** @internal */
33
+ export const EmbeddingCacheConfigType$outboundSchema: z.ZodNativeEnum<
34
+ typeof EmbeddingCacheConfigType
35
+ > = z.nativeEnum(EmbeddingCacheConfigType);
36
+
37
+ /** @internal */
38
+ export type EmbeddingCacheConfig$Outbound = {
39
+ ttl?: number | undefined;
40
+ type: string;
41
+ };
42
+
43
+ /** @internal */
44
+ export const EmbeddingCacheConfig$outboundSchema: z.ZodType<
45
+ EmbeddingCacheConfig$Outbound,
46
+ z.ZodTypeDef,
47
+ EmbeddingCacheConfig
48
+ > = z.object({
49
+ ttl: z.number().int().optional(),
50
+ type: EmbeddingCacheConfigType$outboundSchema,
51
+ });
52
+
53
+ export function embeddingCacheConfigToJSON(
54
+ embeddingCacheConfig: EmbeddingCacheConfig,
55
+ ): string {
56
+ return JSON.stringify(
57
+ EmbeddingCacheConfig$outboundSchema.parse(embeddingCacheConfig),
58
+ );
59
+ }
@@ -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
+
8
+ export type EmbeddingContactParams = {
9
+ displayName?: string | undefined;
10
+ email?: string | undefined;
11
+ id: string;
12
+ metadata?: Array<{ [k: string]: any }> | null | undefined;
13
+ tags?: Array<string> | null | undefined;
14
+ };
15
+
16
+ /** @internal */
17
+ export type EmbeddingContactParams$Outbound = {
18
+ display_name?: string | undefined;
19
+ email?: string | undefined;
20
+ id: string;
21
+ metadata?: Array<{ [k: string]: any }> | null | undefined;
22
+ tags?: Array<string> | null | undefined;
23
+ };
24
+
25
+ /** @internal */
26
+ export const EmbeddingContactParams$outboundSchema: z.ZodType<
27
+ EmbeddingContactParams$Outbound,
28
+ z.ZodTypeDef,
29
+ EmbeddingContactParams
30
+ > = z.object({
31
+ displayName: z.string().optional(),
32
+ email: z.string().optional(),
33
+ id: z.string(),
34
+ metadata: z.nullable(z.array(z.record(z.any()))).optional(),
35
+ tags: z.nullable(z.array(z.string())).optional(),
36
+ }).transform((v) => {
37
+ return remap$(v, {
38
+ displayName: "display_name",
39
+ });
40
+ });
41
+
42
+ export function embeddingContactParamsToJSON(
43
+ embeddingContactParams: EmbeddingContactParams,
44
+ ): string {
45
+ return JSON.stringify(
46
+ EmbeddingContactParams$outboundSchema.parse(embeddingContactParams),
47
+ );
48
+ }
@@ -0,0 +1,66 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+ import {
8
+ EmbeddingLoadBalancerModelConfig,
9
+ EmbeddingLoadBalancerModelConfig$Outbound,
10
+ EmbeddingLoadBalancerModelConfig$outboundSchema,
11
+ } from "./embeddingloadbalancermodelconfig.js";
12
+
13
+ /**
14
+ * Load balancer type.
15
+ */
16
+ export const EmbeddingLoadBalancerConfigType = {
17
+ WeightBased: "weight_based",
18
+ } as const;
19
+ /**
20
+ * Load balancer type.
21
+ */
22
+ export type EmbeddingLoadBalancerConfigType = ClosedEnum<
23
+ typeof EmbeddingLoadBalancerConfigType
24
+ >;
25
+
26
+ export type EmbeddingLoadBalancerConfig = {
27
+ /**
28
+ * Array of models with weights for load balancing requests.
29
+ */
30
+ models: Array<EmbeddingLoadBalancerModelConfig> | null;
31
+ /**
32
+ * Load balancer type.
33
+ */
34
+ type: EmbeddingLoadBalancerConfigType;
35
+ };
36
+
37
+ /** @internal */
38
+ export const EmbeddingLoadBalancerConfigType$outboundSchema: z.ZodNativeEnum<
39
+ typeof EmbeddingLoadBalancerConfigType
40
+ > = z.nativeEnum(EmbeddingLoadBalancerConfigType);
41
+
42
+ /** @internal */
43
+ export type EmbeddingLoadBalancerConfig$Outbound = {
44
+ models: Array<EmbeddingLoadBalancerModelConfig$Outbound> | null;
45
+ type: string;
46
+ };
47
+
48
+ /** @internal */
49
+ export const EmbeddingLoadBalancerConfig$outboundSchema: z.ZodType<
50
+ EmbeddingLoadBalancerConfig$Outbound,
51
+ z.ZodTypeDef,
52
+ EmbeddingLoadBalancerConfig
53
+ > = z.object({
54
+ models: z.nullable(z.array(EmbeddingLoadBalancerModelConfig$outboundSchema)),
55
+ type: EmbeddingLoadBalancerConfigType$outboundSchema,
56
+ });
57
+
58
+ export function embeddingLoadBalancerConfigToJSON(
59
+ embeddingLoadBalancerConfig: EmbeddingLoadBalancerConfig,
60
+ ): string {
61
+ return JSON.stringify(
62
+ EmbeddingLoadBalancerConfig$outboundSchema.parse(
63
+ embeddingLoadBalancerConfig,
64
+ ),
65
+ );
66
+ }
@@ -0,0 +1,42 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+
7
+ export type EmbeddingLoadBalancerModelConfig = {
8
+ /**
9
+ * Model identifier for load balancing.
10
+ */
11
+ model: string;
12
+ /**
13
+ * Weight assigned to this model for load balancing.
14
+ */
15
+ weight: number;
16
+ };
17
+
18
+ /** @internal */
19
+ export type EmbeddingLoadBalancerModelConfig$Outbound = {
20
+ model: string;
21
+ weight: number;
22
+ };
23
+
24
+ /** @internal */
25
+ export const EmbeddingLoadBalancerModelConfig$outboundSchema: z.ZodType<
26
+ EmbeddingLoadBalancerModelConfig$Outbound,
27
+ z.ZodTypeDef,
28
+ EmbeddingLoadBalancerModelConfig
29
+ > = z.object({
30
+ model: z.string(),
31
+ weight: z.number(),
32
+ });
33
+
34
+ export function embeddingLoadBalancerModelConfigToJSON(
35
+ embeddingLoadBalancerModelConfig: EmbeddingLoadBalancerModelConfig,
36
+ ): string {
37
+ return JSON.stringify(
38
+ EmbeddingLoadBalancerModelConfig$outboundSchema.parse(
39
+ embeddingLoadBalancerModelConfig,
40
+ ),
41
+ );
42
+ }
@@ -0,0 +1,101 @@
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 {
8
+ EmbeddingCacheConfig,
9
+ EmbeddingCacheConfig$Outbound,
10
+ EmbeddingCacheConfig$outboundSchema,
11
+ } from "./embeddingcacheconfig.js";
12
+ import {
13
+ EmbeddingContactParams,
14
+ EmbeddingContactParams$Outbound,
15
+ EmbeddingContactParams$outboundSchema,
16
+ } from "./embeddingcontactparams.js";
17
+ import {
18
+ EmbeddingLoadBalancerConfig,
19
+ EmbeddingLoadBalancerConfig$Outbound,
20
+ EmbeddingLoadBalancerConfig$outboundSchema,
21
+ } from "./embeddingloadbalancerconfig.js";
22
+ import {
23
+ EmbeddingRetryConfig,
24
+ EmbeddingRetryConfig$Outbound,
25
+ EmbeddingRetryConfig$outboundSchema,
26
+ } from "./embeddingretryconfig.js";
27
+ import {
28
+ EmbeddingTimeoutConfig,
29
+ EmbeddingTimeoutConfig$Outbound,
30
+ EmbeddingTimeoutConfig$outboundSchema,
31
+ } from "./embeddingtimeoutconfig.js";
32
+ import {
33
+ FallbackConfig,
34
+ FallbackConfig$Outbound,
35
+ FallbackConfig$outboundSchema,
36
+ } from "./fallbackconfig.js";
37
+ import {
38
+ PublicIdentity,
39
+ PublicIdentity$Outbound,
40
+ PublicIdentity$outboundSchema,
41
+ } from "./publicidentity.js";
42
+
43
+ export type EmbeddingOrqParams = {
44
+ cache?: EmbeddingCacheConfig | undefined;
45
+ contact?: EmbeddingContactParams | undefined;
46
+ /**
47
+ * Deprecated: use top-level fallbacks instead.
48
+ */
49
+ fallbacks?: Array<FallbackConfig> | null | undefined;
50
+ /**
51
+ * Information about the identity making the request. If the identity does not exist, it will be created automatically.
52
+ */
53
+ identity?: PublicIdentity | undefined;
54
+ loadBalancer?: EmbeddingLoadBalancerConfig | undefined;
55
+ /**
56
+ * Deprecated: use top-level name instead.
57
+ */
58
+ name?: string | undefined;
59
+ retry?: EmbeddingRetryConfig | undefined;
60
+ timeout?: EmbeddingTimeoutConfig | undefined;
61
+ };
62
+
63
+ /** @internal */
64
+ export type EmbeddingOrqParams$Outbound = {
65
+ cache?: EmbeddingCacheConfig$Outbound | undefined;
66
+ contact?: EmbeddingContactParams$Outbound | undefined;
67
+ fallbacks?: Array<FallbackConfig$Outbound> | null | undefined;
68
+ identity?: PublicIdentity$Outbound | undefined;
69
+ load_balancer?: EmbeddingLoadBalancerConfig$Outbound | undefined;
70
+ name?: string | undefined;
71
+ retry?: EmbeddingRetryConfig$Outbound | undefined;
72
+ timeout?: EmbeddingTimeoutConfig$Outbound | undefined;
73
+ };
74
+
75
+ /** @internal */
76
+ export const EmbeddingOrqParams$outboundSchema: z.ZodType<
77
+ EmbeddingOrqParams$Outbound,
78
+ z.ZodTypeDef,
79
+ EmbeddingOrqParams
80
+ > = z.object({
81
+ cache: EmbeddingCacheConfig$outboundSchema.optional(),
82
+ contact: EmbeddingContactParams$outboundSchema.optional(),
83
+ fallbacks: z.nullable(z.array(FallbackConfig$outboundSchema)).optional(),
84
+ identity: PublicIdentity$outboundSchema.optional(),
85
+ loadBalancer: EmbeddingLoadBalancerConfig$outboundSchema.optional(),
86
+ name: z.string().optional(),
87
+ retry: EmbeddingRetryConfig$outboundSchema.optional(),
88
+ timeout: EmbeddingTimeoutConfig$outboundSchema.optional(),
89
+ }).transform((v) => {
90
+ return remap$(v, {
91
+ loadBalancer: "load_balancer",
92
+ });
93
+ });
94
+
95
+ export function embeddingOrqParamsToJSON(
96
+ embeddingOrqParams: EmbeddingOrqParams,
97
+ ): string {
98
+ return JSON.stringify(
99
+ EmbeddingOrqParams$outboundSchema.parse(embeddingOrqParams),
100
+ );
101
+ }
@@ -0,0 +1,45 @@
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 EmbeddingRetryConfig = {
9
+ /**
10
+ * Number of retry attempts (1-5).
11
+ */
12
+ count: number;
13
+ /**
14
+ * HTTP status codes that trigger retry logic.
15
+ */
16
+ onCodes: Array<number> | null;
17
+ };
18
+
19
+ /** @internal */
20
+ export type EmbeddingRetryConfig$Outbound = {
21
+ count: number;
22
+ on_codes: Array<number> | null;
23
+ };
24
+
25
+ /** @internal */
26
+ export const EmbeddingRetryConfig$outboundSchema: z.ZodType<
27
+ EmbeddingRetryConfig$Outbound,
28
+ z.ZodTypeDef,
29
+ EmbeddingRetryConfig
30
+ > = z.object({
31
+ count: z.number().int(),
32
+ onCodes: z.nullable(z.array(z.number().int())),
33
+ }).transform((v) => {
34
+ return remap$(v, {
35
+ onCodes: "on_codes",
36
+ });
37
+ });
38
+
39
+ export function embeddingRetryConfigToJSON(
40
+ embeddingRetryConfig: EmbeddingRetryConfig,
41
+ ): string {
42
+ return JSON.stringify(
43
+ EmbeddingRetryConfig$outboundSchema.parse(embeddingRetryConfig),
44
+ );
45
+ }
@@ -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 EmbeddingTimeoutConfig = {
9
+ /**
10
+ * Timeout value in milliseconds.
11
+ */
12
+ callTimeout: number;
13
+ };
14
+
15
+ /** @internal */
16
+ export type EmbeddingTimeoutConfig$Outbound = {
17
+ call_timeout: number;
18
+ };
19
+
20
+ /** @internal */
21
+ export const EmbeddingTimeoutConfig$outboundSchema: z.ZodType<
22
+ EmbeddingTimeoutConfig$Outbound,
23
+ z.ZodTypeDef,
24
+ EmbeddingTimeoutConfig
25
+ > = z.object({
26
+ callTimeout: z.number().int(),
27
+ }).transform((v) => {
28
+ return remap$(v, {
29
+ callTimeout: "call_timeout",
30
+ });
31
+ });
32
+
33
+ export function embeddingTimeoutConfigToJSON(
34
+ embeddingTimeoutConfig: EmbeddingTimeoutConfig,
35
+ ): string {
36
+ return JSON.stringify(
37
+ EmbeddingTimeoutConfig$outboundSchema.parse(embeddingTimeoutConfig),
38
+ );
39
+ }
@@ -20,6 +20,7 @@ export type EvaluatorRef = {
20
20
  executeOn: EvaluatorRefExecuteOn;
21
21
  id: string;
22
22
  isGuardrail?: boolean | undefined;
23
+ options?: { [k: string]: any } | undefined;
23
24
  sampleRate?: number | undefined;
24
25
  };
25
26
 
@@ -41,6 +42,7 @@ export const EvaluatorRef$inboundSchema: z.ZodType<
41
42
  execute_on: EvaluatorRefExecuteOn$inboundSchema,
42
43
  id: z.string(),
43
44
  is_guardrail: z.boolean().optional(),
45
+ options: z.record(z.any()).optional(),
44
46
  sample_rate: z.number().optional(),
45
47
  }).transform((v) => {
46
48
  return remap$(v, {
@@ -54,6 +56,7 @@ export type EvaluatorRef$Outbound = {
54
56
  execute_on: string;
55
57
  id: string;
56
58
  is_guardrail?: boolean | undefined;
59
+ options?: { [k: string]: any } | undefined;
57
60
  sample_rate?: number | undefined;
58
61
  };
59
62
 
@@ -66,6 +69,7 @@ export const EvaluatorRef$outboundSchema: z.ZodType<
66
69
  executeOn: EvaluatorRefExecuteOn$outboundSchema,
67
70
  id: z.string(),
68
71
  isGuardrail: z.boolean().optional(),
72
+ options: z.record(z.any()).optional(),
69
73
  sampleRate: z.number().optional(),
70
74
  }).transform((v) => {
71
75
  return remap$(v, {
@@ -20,6 +20,7 @@ export type GuardrailRef = {
20
20
  executeOn: ExecuteOn;
21
21
  id: string;
22
22
  isGuardrail?: boolean | undefined;
23
+ options?: { [k: string]: any } | undefined;
23
24
  sampleRate?: number | undefined;
24
25
  };
25
26
 
@@ -39,6 +40,7 @@ export const GuardrailRef$inboundSchema: z.ZodType<
39
40
  execute_on: ExecuteOn$inboundSchema,
40
41
  id: z.string(),
41
42
  is_guardrail: z.boolean().optional(),
43
+ options: z.record(z.any()).optional(),
42
44
  sample_rate: z.number().optional(),
43
45
  }).transform((v) => {
44
46
  return remap$(v, {
@@ -52,6 +54,7 @@ export type GuardrailRef$Outbound = {
52
54
  execute_on: string;
53
55
  id: string;
54
56
  is_guardrail?: boolean | undefined;
57
+ options?: { [k: string]: any } | undefined;
55
58
  sample_rate?: number | undefined;
56
59
  };
57
60
 
@@ -64,6 +67,7 @@ export const GuardrailRef$outboundSchema: z.ZodType<
64
67
  executeOn: ExecuteOn$outboundSchema,
65
68
  id: z.string(),
66
69
  isGuardrail: z.boolean().optional(),
70
+ options: z.record(z.any()).optional(),
67
71
  sampleRate: z.number().optional(),
68
72
  }).transform((v) => {
69
73
  return remap$(v, {
@@ -41,7 +41,16 @@ export * from "./deletefileresponse.js";
41
41
  export * from "./deleteidentityresponse.js";
42
42
  export * from "./deleteprojectresponse.js";
43
43
  export * from "./deleteskillresponse.js";
44
+ export * from "./detectrequest.js";
45
+ export * from "./detectresponse.js";
44
46
  export * from "./domain.js";
47
+ export * from "./embeddingcacheconfig.js";
48
+ export * from "./embeddingcontactparams.js";
49
+ export * from "./embeddingloadbalancerconfig.js";
50
+ export * from "./embeddingloadbalancermodelconfig.js";
51
+ export * from "./embeddingorqparams.js";
52
+ export * from "./embeddingretryconfig.js";
53
+ export * from "./embeddingtimeoutconfig.js";
45
54
  export * from "./errorpart.js";
46
55
  export * from "./errorstreamingevent.js";
47
56
  export * from "./evaluatorref.js";
@@ -102,6 +111,8 @@ export * from "./pricingvariant.js";
102
111
  export * from "./project.js";
103
112
  export * from "./projectscope.js";
104
113
  export * from "./publiccontact.js";
114
+ export * from "./publicembeddingdata.js";
115
+ export * from "./publicembeddingusage.js";
105
116
  export * from "./publicidentity.js";
106
117
  export * from "./publicmodelentry.js";
107
118
  export * from "./publicschedule.js";
@@ -115,6 +126,8 @@ export * from "./reasoningparam.js";
115
126
  export * from "./reasoningpart.js";
116
127
  export * from "./reasoningpartschema.js";
117
128
  export * from "./redactedreasoningpartschema.js";
129
+ export * from "./redactrequest.js";
130
+ export * from "./redactresponse.js";
118
131
  export * from "./refusalpartschema.js";
119
132
  export * from "./requestlimit.js";
120
133
  export * from "./responsedoneevent.js";
@@ -127,6 +140,8 @@ export * from "./responseretryconfig.js";
127
140
  export * from "./responsestartedevent.js";
128
141
  export * from "./responsestreamingevent.js";
129
142
  export * from "./responsethread.js";
143
+ export * from "./restorerequest.js";
144
+ export * from "./restoreresponse.js";
130
145
  export * from "./retrieveidentityresponse.js";
131
146
  export * from "./reviewoutcome.js";
132
147
  export * from "./routingrule.js";
@@ -0,0 +1,60 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * The object type, which is always "embedding".
13
+ */
14
+ export const ObjectT = {
15
+ Embedding: "embedding",
16
+ } as const;
17
+ /**
18
+ * The object type, which is always "embedding".
19
+ */
20
+ export type ObjectT = ClosedEnum<typeof ObjectT>;
21
+
22
+ export type PublicEmbeddingData = {
23
+ /**
24
+ * The embedding vector, which is a list of floats. The length of vector depends on the model. Can also be a base64-encoded string when encoding_format is base64.
25
+ */
26
+ embedding?: any | undefined;
27
+ /**
28
+ * The index of the embedding in the list of embeddings.
29
+ */
30
+ index: number;
31
+ /**
32
+ * The object type, which is always "embedding".
33
+ */
34
+ object: ObjectT;
35
+ };
36
+
37
+ /** @internal */
38
+ export const ObjectT$inboundSchema: z.ZodNativeEnum<typeof ObjectT> = z
39
+ .nativeEnum(ObjectT);
40
+
41
+ /** @internal */
42
+ export const PublicEmbeddingData$inboundSchema: z.ZodType<
43
+ PublicEmbeddingData,
44
+ z.ZodTypeDef,
45
+ unknown
46
+ > = z.object({
47
+ embedding: z.any().optional(),
48
+ index: z.number().int(),
49
+ object: ObjectT$inboundSchema,
50
+ });
51
+
52
+ export function publicEmbeddingDataFromJSON(
53
+ jsonString: string,
54
+ ): SafeParseResult<PublicEmbeddingData, SDKValidationError> {
55
+ return safeParse(
56
+ jsonString,
57
+ (x) => PublicEmbeddingData$inboundSchema.parse(JSON.parse(x)),
58
+ `Failed to parse 'PublicEmbeddingData' from JSON`,
59
+ );
60
+ }