@openrouter/sdk 0.12.15 → 0.12.17
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.
- package/esm/funcs/apiKeysCreate.d.ts +1 -1
- package/esm/funcs/apiKeysCreate.js +2 -2
- package/esm/funcs/generationsGetGeneration.d.ts +2 -1
- package/esm/funcs/generationsGetGeneration.js +2 -1
- package/esm/funcs/generationsListGenerationContent.d.ts +16 -0
- package/esm/funcs/generationsListGenerationContent.js +108 -0
- package/esm/funcs/guardrailsCreate.d.ts +1 -1
- package/esm/funcs/guardrailsCreate.js +2 -2
- package/esm/funcs/guardrailsList.js +1 -0
- package/esm/funcs/ttsCreateSpeech.d.ts +18 -0
- package/esm/funcs/ttsCreateSpeech.js +110 -0
- package/esm/funcs/workspacesBulkAddMembers.d.ts +19 -0
- package/esm/funcs/workspacesBulkAddMembers.js +105 -0
- package/esm/funcs/workspacesBulkRemoveMembers.d.ts +19 -0
- package/esm/funcs/workspacesBulkRemoveMembers.js +105 -0
- package/esm/funcs/workspacesCreate.d.ts +19 -0
- package/esm/funcs/workspacesCreate.js +99 -0
- package/esm/funcs/workspacesDelete.d.ts +19 -0
- package/esm/funcs/workspacesDelete.js +102 -0
- package/esm/funcs/workspacesGet.d.ts +19 -0
- package/esm/funcs/workspacesGet.js +102 -0
- package/esm/funcs/workspacesList.d.ts +21 -0
- package/esm/funcs/workspacesList.js +133 -0
- package/esm/funcs/workspacesUpdate.d.ts +19 -0
- package/esm/funcs/workspacesUpdate.js +105 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/bulkaddworkspacemembersrequest.d.ts +15 -0
- package/esm/models/bulkaddworkspacemembersrequest.js +18 -0
- package/esm/models/bulkaddworkspacemembersresponse.d.ts +18 -0
- package/esm/models/bulkaddworkspacemembersresponse.js +21 -0
- package/esm/models/bulkremoveworkspacemembersrequest.d.ts +15 -0
- package/esm/models/bulkremoveworkspacemembersrequest.js +18 -0
- package/esm/models/bulkremoveworkspacemembersresponse.d.ts +13 -0
- package/esm/models/bulkremoveworkspacemembersresponse.js +19 -0
- package/esm/models/createguardrailrequest.d.ts +5 -0
- package/esm/models/createguardrailrequest.js +2 -0
- package/esm/models/createworkspacerequest.d.ts +55 -0
- package/esm/models/createworkspacerequest.js +31 -0
- package/esm/models/createworkspaceresponse.d.ts +11 -0
- package/esm/models/createworkspaceresponse.js +15 -0
- package/esm/models/deleteworkspaceresponse.d.ts +13 -0
- package/esm/models/deleteworkspaceresponse.js +14 -0
- package/esm/models/generationcontentdata.d.ts +55 -0
- package/esm/models/generationcontentdata.js +45 -0
- package/esm/models/generationcontentresponse.d.ts +17 -0
- package/esm/models/generationcontentresponse.js +15 -0
- package/esm/models/generationresponse.d.ts +198 -0
- package/esm/models/generationresponse.js +109 -0
- package/esm/models/getworkspaceresponse.d.ts +11 -0
- package/esm/models/getworkspaceresponse.js +15 -0
- package/esm/models/guardrail.d.ts +4 -0
- package/esm/models/guardrail.js +2 -0
- package/esm/models/index.d.ts +16 -0
- package/esm/models/index.js +16 -0
- package/esm/models/listworkspacesresponse.d.ts +18 -0
- package/esm/models/listworkspacesresponse.js +21 -0
- package/esm/models/modelscountresponse.d.ts +4 -4
- package/esm/models/modelscountresponse.js +4 -4
- package/esm/models/operations/bulkaddworkspacemembers.d.ts +61 -0
- package/esm/models/operations/bulkaddworkspacemembers.js +24 -0
- package/esm/models/operations/bulkremoveworkspacemembers.d.ts +61 -0
- package/esm/models/operations/bulkremoveworkspacemembers.js +24 -0
- package/esm/models/operations/createkeys.d.ts +5 -0
- package/esm/models/operations/createkeys.js +2 -0
- package/esm/models/operations/createtts.d.ts +779 -0
- package/esm/models/operations/createtts.js +193 -0
- package/esm/models/operations/createworkspace.d.ts +56 -0
- package/esm/models/operations/createworkspace.js +23 -0
- package/esm/models/operations/deleteworkspace.d.ts +58 -0
- package/esm/models/operations/deleteworkspace.js +21 -0
- package/esm/models/operations/getgeneration.d.ts +0 -196
- package/esm/models/operations/getgeneration.js +0 -102
- package/esm/models/operations/getworkspace.d.ts +58 -0
- package/esm/models/operations/getworkspace.js +21 -0
- package/esm/models/operations/index.d.ts +9 -0
- package/esm/models/operations/index.js +9 -0
- package/esm/models/operations/listgenerationcontent.d.ts +58 -0
- package/esm/models/operations/listgenerationcontent.js +21 -0
- package/esm/models/operations/listguardrails.d.ts +5 -0
- package/esm/models/operations/listguardrails.js +2 -0
- package/esm/models/operations/listworkspaces.d.ts +72 -0
- package/esm/models/operations/listworkspaces.js +35 -0
- package/esm/models/operations/updateworkspace.d.ts +61 -0
- package/esm/models/operations/updateworkspace.js +24 -0
- package/esm/models/updateworkspacerequest.d.ts +55 -0
- package/esm/models/updateworkspacerequest.js +31 -0
- package/esm/models/updateworkspaceresponse.d.ts +11 -0
- package/esm/models/updateworkspaceresponse.js +15 -0
- package/esm/models/workspace.d.ts +61 -0
- package/esm/models/workspace.js +39 -0
- package/esm/models/workspacemember.d.ts +43 -0
- package/esm/models/workspacemember.js +35 -0
- package/esm/sdk/generations.d.ts +6 -1
- package/esm/sdk/generations.js +7 -0
- package/esm/sdk/sdk.d.ts +6 -0
- package/esm/sdk/sdk.js +8 -0
- package/esm/sdk/tts.d.ts +12 -0
- package/esm/sdk/tts.js +19 -0
- package/esm/sdk/workspaces.d.ts +58 -0
- package/esm/sdk/workspaces.js +80 -0
- package/jsr.json +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
export type BulkAddWorkspaceMembersRequest = {
|
|
3
|
+
/**
|
|
4
|
+
* List of user IDs to add to the workspace. Members are assigned the same role they hold in the organization.
|
|
5
|
+
*/
|
|
6
|
+
userIds: Array<string>;
|
|
7
|
+
};
|
|
8
|
+
/** @internal */
|
|
9
|
+
export type BulkAddWorkspaceMembersRequest$Outbound = {
|
|
10
|
+
user_ids: Array<string>;
|
|
11
|
+
};
|
|
12
|
+
/** @internal */
|
|
13
|
+
export declare const BulkAddWorkspaceMembersRequest$outboundSchema: z.ZodType<BulkAddWorkspaceMembersRequest$Outbound, BulkAddWorkspaceMembersRequest>;
|
|
14
|
+
export declare function bulkAddWorkspaceMembersRequestToJSON(bulkAddWorkspaceMembersRequest: BulkAddWorkspaceMembersRequest): string;
|
|
15
|
+
//# sourceMappingURL=bulkaddworkspacemembersrequest.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: dc2d569c8386
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const BulkAddWorkspaceMembersRequest$outboundSchema = z.object({
|
|
9
|
+
userIds: z.array(z.string()),
|
|
10
|
+
}).transform((v) => {
|
|
11
|
+
return remap$(v, {
|
|
12
|
+
userIds: "user_ids",
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
export function bulkAddWorkspaceMembersRequestToJSON(bulkAddWorkspaceMembersRequest) {
|
|
16
|
+
return JSON.stringify(BulkAddWorkspaceMembersRequest$outboundSchema.parse(bulkAddWorkspaceMembersRequest));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=bulkaddworkspacemembersrequest.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
import { WorkspaceMember } from "./workspacemember.js";
|
|
5
|
+
export type BulkAddWorkspaceMembersResponse = {
|
|
6
|
+
/**
|
|
7
|
+
* Number of workspace memberships created or updated
|
|
8
|
+
*/
|
|
9
|
+
addedCount: number;
|
|
10
|
+
/**
|
|
11
|
+
* List of added workspace memberships
|
|
12
|
+
*/
|
|
13
|
+
data: Array<WorkspaceMember>;
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export declare const BulkAddWorkspaceMembersResponse$inboundSchema: z.ZodType<BulkAddWorkspaceMembersResponse, unknown>;
|
|
17
|
+
export declare function bulkAddWorkspaceMembersResponseFromJSON(jsonString: string): SafeParseResult<BulkAddWorkspaceMembersResponse, SDKValidationError>;
|
|
18
|
+
//# sourceMappingURL=bulkaddworkspacemembersresponse.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 825ef4d0fd7a
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { WorkspaceMember$inboundSchema, } from "./workspacemember.js";
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const BulkAddWorkspaceMembersResponse$inboundSchema = z.object({
|
|
11
|
+
added_count: z.int(),
|
|
12
|
+
data: z.array(WorkspaceMember$inboundSchema),
|
|
13
|
+
}).transform((v) => {
|
|
14
|
+
return remap$(v, {
|
|
15
|
+
"added_count": "addedCount",
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
export function bulkAddWorkspaceMembersResponseFromJSON(jsonString) {
|
|
19
|
+
return safeParse(jsonString, (x) => BulkAddWorkspaceMembersResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BulkAddWorkspaceMembersResponse' from JSON`);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=bulkaddworkspacemembersresponse.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
export type BulkRemoveWorkspaceMembersRequest = {
|
|
3
|
+
/**
|
|
4
|
+
* List of user IDs to remove from the workspace
|
|
5
|
+
*/
|
|
6
|
+
userIds: Array<string>;
|
|
7
|
+
};
|
|
8
|
+
/** @internal */
|
|
9
|
+
export type BulkRemoveWorkspaceMembersRequest$Outbound = {
|
|
10
|
+
user_ids: Array<string>;
|
|
11
|
+
};
|
|
12
|
+
/** @internal */
|
|
13
|
+
export declare const BulkRemoveWorkspaceMembersRequest$outboundSchema: z.ZodType<BulkRemoveWorkspaceMembersRequest$Outbound, BulkRemoveWorkspaceMembersRequest>;
|
|
14
|
+
export declare function bulkRemoveWorkspaceMembersRequestToJSON(bulkRemoveWorkspaceMembersRequest: BulkRemoveWorkspaceMembersRequest): string;
|
|
15
|
+
//# sourceMappingURL=bulkremoveworkspacemembersrequest.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: df9bd1ae938d
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const BulkRemoveWorkspaceMembersRequest$outboundSchema = z.object({
|
|
9
|
+
userIds: z.array(z.string()),
|
|
10
|
+
}).transform((v) => {
|
|
11
|
+
return remap$(v, {
|
|
12
|
+
userIds: "user_ids",
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
export function bulkRemoveWorkspaceMembersRequestToJSON(bulkRemoveWorkspaceMembersRequest) {
|
|
16
|
+
return JSON.stringify(BulkRemoveWorkspaceMembersRequest$outboundSchema.parse(bulkRemoveWorkspaceMembersRequest));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=bulkremoveworkspacemembersrequest.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
export type BulkRemoveWorkspaceMembersResponse = {
|
|
5
|
+
/**
|
|
6
|
+
* Number of members removed
|
|
7
|
+
*/
|
|
8
|
+
removedCount: number;
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export declare const BulkRemoveWorkspaceMembersResponse$inboundSchema: z.ZodType<BulkRemoveWorkspaceMembersResponse, unknown>;
|
|
12
|
+
export declare function bulkRemoveWorkspaceMembersResponseFromJSON(jsonString: string): SafeParseResult<BulkRemoveWorkspaceMembersResponse, SDKValidationError>;
|
|
13
|
+
//# sourceMappingURL=bulkremoveworkspacemembersresponse.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 3786454b94f8
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const BulkRemoveWorkspaceMembersResponse$inboundSchema = z.object({
|
|
10
|
+
removed_count: z.int(),
|
|
11
|
+
}).transform((v) => {
|
|
12
|
+
return remap$(v, {
|
|
13
|
+
"removed_count": "removedCount",
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
export function bulkRemoveWorkspaceMembersResponseFromJSON(jsonString) {
|
|
17
|
+
return safeParse(jsonString, (x) => BulkRemoveWorkspaceMembersResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BulkRemoveWorkspaceMembersResponse' from JSON`);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=bulkremoveworkspacemembersresponse.js.map
|
|
@@ -37,6 +37,10 @@ export type CreateGuardrailRequest = {
|
|
|
37
37
|
* Interval at which the limit resets (daily, weekly, monthly)
|
|
38
38
|
*/
|
|
39
39
|
resetInterval?: GuardrailInterval | null | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* The workspace to create the guardrail in. Defaults to the default workspace if not provided.
|
|
42
|
+
*/
|
|
43
|
+
workspaceId?: string | undefined;
|
|
40
44
|
};
|
|
41
45
|
/** @internal */
|
|
42
46
|
export type CreateGuardrailRequest$Outbound = {
|
|
@@ -49,6 +53,7 @@ export type CreateGuardrailRequest$Outbound = {
|
|
|
49
53
|
limit_usd?: number | null | undefined;
|
|
50
54
|
name: string;
|
|
51
55
|
reset_interval?: string | null | undefined;
|
|
56
|
+
workspace_id?: string | undefined;
|
|
52
57
|
};
|
|
53
58
|
/** @internal */
|
|
54
59
|
export declare const CreateGuardrailRequest$outboundSchema: z.ZodType<CreateGuardrailRequest$Outbound, CreateGuardrailRequest>;
|
|
@@ -16,6 +16,7 @@ export const CreateGuardrailRequest$outboundSchema = z.object({
|
|
|
16
16
|
limitUsd: z.nullable(z.number()).optional(),
|
|
17
17
|
name: z.string(),
|
|
18
18
|
resetInterval: z.nullable(GuardrailInterval$outboundSchema).optional(),
|
|
19
|
+
workspaceId: z.string().optional(),
|
|
19
20
|
}).transform((v) => {
|
|
20
21
|
return remap$(v, {
|
|
21
22
|
allowedModels: "allowed_models",
|
|
@@ -25,6 +26,7 @@ export const CreateGuardrailRequest$outboundSchema = z.object({
|
|
|
25
26
|
ignoredProviders: "ignored_providers",
|
|
26
27
|
limitUsd: "limit_usd",
|
|
27
28
|
resetInterval: "reset_interval",
|
|
29
|
+
workspaceId: "workspace_id",
|
|
28
30
|
});
|
|
29
31
|
});
|
|
30
32
|
export function createGuardrailRequestToJSON(createGuardrailRequest) {
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
export type CreateWorkspaceRequest = {
|
|
3
|
+
/**
|
|
4
|
+
* Default image model for this workspace
|
|
5
|
+
*/
|
|
6
|
+
defaultImageModel?: string | null | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Default provider sort preference (price, throughput, latency, exacto)
|
|
9
|
+
*/
|
|
10
|
+
defaultProviderSort?: string | null | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Default text model for this workspace
|
|
13
|
+
*/
|
|
14
|
+
defaultTextModel?: string | null | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Description of the workspace
|
|
17
|
+
*/
|
|
18
|
+
description?: string | null | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Whether data discount logging is enabled
|
|
21
|
+
*/
|
|
22
|
+
isDataDiscountLoggingEnabled?: boolean | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Whether broadcast is enabled
|
|
25
|
+
*/
|
|
26
|
+
isObservabilityBroadcastEnabled?: boolean | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Whether private logging is enabled
|
|
29
|
+
*/
|
|
30
|
+
isObservabilityIoLoggingEnabled?: boolean | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Name for the new workspace
|
|
33
|
+
*/
|
|
34
|
+
name: string;
|
|
35
|
+
/**
|
|
36
|
+
* URL-friendly slug (lowercase alphanumeric and hyphens only)
|
|
37
|
+
*/
|
|
38
|
+
slug: string;
|
|
39
|
+
};
|
|
40
|
+
/** @internal */
|
|
41
|
+
export type CreateWorkspaceRequest$Outbound = {
|
|
42
|
+
default_image_model?: string | null | undefined;
|
|
43
|
+
default_provider_sort?: string | null | undefined;
|
|
44
|
+
default_text_model?: string | null | undefined;
|
|
45
|
+
description?: string | null | undefined;
|
|
46
|
+
is_data_discount_logging_enabled?: boolean | undefined;
|
|
47
|
+
is_observability_broadcast_enabled?: boolean | undefined;
|
|
48
|
+
is_observability_io_logging_enabled?: boolean | undefined;
|
|
49
|
+
name: string;
|
|
50
|
+
slug: string;
|
|
51
|
+
};
|
|
52
|
+
/** @internal */
|
|
53
|
+
export declare const CreateWorkspaceRequest$outboundSchema: z.ZodType<CreateWorkspaceRequest$Outbound, CreateWorkspaceRequest>;
|
|
54
|
+
export declare function createWorkspaceRequestToJSON(createWorkspaceRequest: CreateWorkspaceRequest): string;
|
|
55
|
+
//# sourceMappingURL=createworkspacerequest.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 729716a42b74
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const CreateWorkspaceRequest$outboundSchema = z.object({
|
|
9
|
+
defaultImageModel: z.nullable(z.string()).optional(),
|
|
10
|
+
defaultProviderSort: z.nullable(z.string()).optional(),
|
|
11
|
+
defaultTextModel: z.nullable(z.string()).optional(),
|
|
12
|
+
description: z.nullable(z.string()).optional(),
|
|
13
|
+
isDataDiscountLoggingEnabled: z.boolean().optional(),
|
|
14
|
+
isObservabilityBroadcastEnabled: z.boolean().optional(),
|
|
15
|
+
isObservabilityIoLoggingEnabled: z.boolean().optional(),
|
|
16
|
+
name: z.string(),
|
|
17
|
+
slug: z.string(),
|
|
18
|
+
}).transform((v) => {
|
|
19
|
+
return remap$(v, {
|
|
20
|
+
defaultImageModel: "default_image_model",
|
|
21
|
+
defaultProviderSort: "default_provider_sort",
|
|
22
|
+
defaultTextModel: "default_text_model",
|
|
23
|
+
isDataDiscountLoggingEnabled: "is_data_discount_logging_enabled",
|
|
24
|
+
isObservabilityBroadcastEnabled: "is_observability_broadcast_enabled",
|
|
25
|
+
isObservabilityIoLoggingEnabled: "is_observability_io_logging_enabled",
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
export function createWorkspaceRequestToJSON(createWorkspaceRequest) {
|
|
29
|
+
return JSON.stringify(CreateWorkspaceRequest$outboundSchema.parse(createWorkspaceRequest));
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=createworkspacerequest.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
import { Workspace } from "./workspace.js";
|
|
5
|
+
export type CreateWorkspaceResponse = {
|
|
6
|
+
data: Workspace;
|
|
7
|
+
};
|
|
8
|
+
/** @internal */
|
|
9
|
+
export declare const CreateWorkspaceResponse$inboundSchema: z.ZodType<CreateWorkspaceResponse, unknown>;
|
|
10
|
+
export declare function createWorkspaceResponseFromJSON(jsonString: string): SafeParseResult<CreateWorkspaceResponse, SDKValidationError>;
|
|
11
|
+
//# sourceMappingURL=createworkspaceresponse.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 8cdd42874330
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Workspace$inboundSchema } from "./workspace.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const CreateWorkspaceResponse$inboundSchema = z.object({
|
|
10
|
+
data: Workspace$inboundSchema,
|
|
11
|
+
});
|
|
12
|
+
export function createWorkspaceResponseFromJSON(jsonString) {
|
|
13
|
+
return safeParse(jsonString, (x) => CreateWorkspaceResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateWorkspaceResponse' from JSON`);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=createworkspaceresponse.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
export type DeleteWorkspaceResponse = {
|
|
5
|
+
/**
|
|
6
|
+
* Confirmation that the workspace was deleted
|
|
7
|
+
*/
|
|
8
|
+
deleted: true;
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export declare const DeleteWorkspaceResponse$inboundSchema: z.ZodType<DeleteWorkspaceResponse, unknown>;
|
|
12
|
+
export declare function deleteWorkspaceResponseFromJSON(jsonString: string): SafeParseResult<DeleteWorkspaceResponse, SDKValidationError>;
|
|
13
|
+
//# sourceMappingURL=deleteworkspaceresponse.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 5ff5aed380bc
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const DeleteWorkspaceResponse$inboundSchema = z.object({
|
|
9
|
+
deleted: z.literal(true),
|
|
10
|
+
});
|
|
11
|
+
export function deleteWorkspaceResponseFromJSON(jsonString) {
|
|
12
|
+
return safeParse(jsonString, (x) => DeleteWorkspaceResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteWorkspaceResponse' from JSON`);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=deleteworkspaceresponse.js.map
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
export type Input2 = {
|
|
5
|
+
messages: Array<any | null>;
|
|
6
|
+
};
|
|
7
|
+
export type Input1 = {
|
|
8
|
+
prompt: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* The input to the generation — either a prompt string or an array of messages
|
|
12
|
+
*/
|
|
13
|
+
export type InputUnion = Input1 | Input2;
|
|
14
|
+
/**
|
|
15
|
+
* The output from the generation
|
|
16
|
+
*/
|
|
17
|
+
export type GenerationContentDataOutput = {
|
|
18
|
+
/**
|
|
19
|
+
* The completion output
|
|
20
|
+
*/
|
|
21
|
+
completion: string | null;
|
|
22
|
+
/**
|
|
23
|
+
* Reasoning/thinking output, if any
|
|
24
|
+
*/
|
|
25
|
+
reasoning: string | null;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Stored prompt and completion content
|
|
29
|
+
*/
|
|
30
|
+
export type GenerationContentData = {
|
|
31
|
+
/**
|
|
32
|
+
* The input to the generation — either a prompt string or an array of messages
|
|
33
|
+
*/
|
|
34
|
+
input: Input1 | Input2;
|
|
35
|
+
/**
|
|
36
|
+
* The output from the generation
|
|
37
|
+
*/
|
|
38
|
+
output: GenerationContentDataOutput;
|
|
39
|
+
};
|
|
40
|
+
/** @internal */
|
|
41
|
+
export declare const Input2$inboundSchema: z.ZodType<Input2, unknown>;
|
|
42
|
+
export declare function input2FromJSON(jsonString: string): SafeParseResult<Input2, SDKValidationError>;
|
|
43
|
+
/** @internal */
|
|
44
|
+
export declare const Input1$inboundSchema: z.ZodType<Input1, unknown>;
|
|
45
|
+
export declare function input1FromJSON(jsonString: string): SafeParseResult<Input1, SDKValidationError>;
|
|
46
|
+
/** @internal */
|
|
47
|
+
export declare const InputUnion$inboundSchema: z.ZodType<InputUnion, unknown>;
|
|
48
|
+
export declare function inputUnionFromJSON(jsonString: string): SafeParseResult<InputUnion, SDKValidationError>;
|
|
49
|
+
/** @internal */
|
|
50
|
+
export declare const GenerationContentDataOutput$inboundSchema: z.ZodType<GenerationContentDataOutput, unknown>;
|
|
51
|
+
export declare function generationContentDataOutputFromJSON(jsonString: string): SafeParseResult<GenerationContentDataOutput, SDKValidationError>;
|
|
52
|
+
/** @internal */
|
|
53
|
+
export declare const GenerationContentData$inboundSchema: z.ZodType<GenerationContentData, unknown>;
|
|
54
|
+
export declare function generationContentDataFromJSON(jsonString: string): SafeParseResult<GenerationContentData, SDKValidationError>;
|
|
55
|
+
//# sourceMappingURL=generationcontentdata.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: f55aeaffdbd5
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const Input2$inboundSchema = z.object({
|
|
9
|
+
messages: z.array(z.nullable(z.any())),
|
|
10
|
+
});
|
|
11
|
+
export function input2FromJSON(jsonString) {
|
|
12
|
+
return safeParse(jsonString, (x) => Input2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Input2' from JSON`);
|
|
13
|
+
}
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const Input1$inboundSchema = z.object({
|
|
16
|
+
prompt: z.string(),
|
|
17
|
+
});
|
|
18
|
+
export function input1FromJSON(jsonString) {
|
|
19
|
+
return safeParse(jsonString, (x) => Input1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Input1' from JSON`);
|
|
20
|
+
}
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const InputUnion$inboundSchema = z.union([z.lazy(() => Input1$inboundSchema), z.lazy(() => Input2$inboundSchema)]);
|
|
23
|
+
export function inputUnionFromJSON(jsonString) {
|
|
24
|
+
return safeParse(jsonString, (x) => InputUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InputUnion' from JSON`);
|
|
25
|
+
}
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const GenerationContentDataOutput$inboundSchema = z.object({
|
|
28
|
+
completion: z.nullable(z.string()),
|
|
29
|
+
reasoning: z.nullable(z.string()),
|
|
30
|
+
});
|
|
31
|
+
export function generationContentDataOutputFromJSON(jsonString) {
|
|
32
|
+
return safeParse(jsonString, (x) => GenerationContentDataOutput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GenerationContentDataOutput' from JSON`);
|
|
33
|
+
}
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const GenerationContentData$inboundSchema = z.object({
|
|
36
|
+
input: z.union([
|
|
37
|
+
z.lazy(() => Input1$inboundSchema),
|
|
38
|
+
z.lazy(() => Input2$inboundSchema),
|
|
39
|
+
]),
|
|
40
|
+
output: z.lazy(() => GenerationContentDataOutput$inboundSchema),
|
|
41
|
+
});
|
|
42
|
+
export function generationContentDataFromJSON(jsonString) {
|
|
43
|
+
return safeParse(jsonString, (x) => GenerationContentData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GenerationContentData' from JSON`);
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=generationcontentdata.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
import { GenerationContentData } from "./generationcontentdata.js";
|
|
5
|
+
/**
|
|
6
|
+
* Stored prompt and completion content for a generation
|
|
7
|
+
*/
|
|
8
|
+
export type GenerationContentResponse = {
|
|
9
|
+
/**
|
|
10
|
+
* Stored prompt and completion content
|
|
11
|
+
*/
|
|
12
|
+
data: GenerationContentData;
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const GenerationContentResponse$inboundSchema: z.ZodType<GenerationContentResponse, unknown>;
|
|
16
|
+
export declare function generationContentResponseFromJSON(jsonString: string): SafeParseResult<GenerationContentResponse, SDKValidationError>;
|
|
17
|
+
//# sourceMappingURL=generationcontentresponse.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 88f85adb1a59
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { GenerationContentData$inboundSchema, } from "./generationcontentdata.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const GenerationContentResponse$inboundSchema = z.object({
|
|
10
|
+
data: GenerationContentData$inboundSchema,
|
|
11
|
+
});
|
|
12
|
+
export function generationContentResponseFromJSON(jsonString) {
|
|
13
|
+
return safeParse(jsonString, (x) => GenerationContentResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GenerationContentResponse' from JSON`);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=generationcontentresponse.js.map
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
import { ProviderResponse } from "./providerresponse.js";
|
|
6
|
+
/**
|
|
7
|
+
* Type of API used for the generation
|
|
8
|
+
*/
|
|
9
|
+
export declare const ApiType: {
|
|
10
|
+
readonly Completions: "completions";
|
|
11
|
+
readonly Embeddings: "embeddings";
|
|
12
|
+
readonly Rerank: "rerank";
|
|
13
|
+
readonly Tts: "tts";
|
|
14
|
+
readonly Video: "video";
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Type of API used for the generation
|
|
18
|
+
*/
|
|
19
|
+
export type ApiType = OpenEnum<typeof ApiType>;
|
|
20
|
+
/**
|
|
21
|
+
* Generation data
|
|
22
|
+
*/
|
|
23
|
+
export type GenerationResponseData = {
|
|
24
|
+
/**
|
|
25
|
+
* Type of API used for the generation
|
|
26
|
+
*/
|
|
27
|
+
apiType: ApiType | null;
|
|
28
|
+
/**
|
|
29
|
+
* ID of the app that made the request
|
|
30
|
+
*/
|
|
31
|
+
appId: number | null;
|
|
32
|
+
/**
|
|
33
|
+
* Discount applied due to caching
|
|
34
|
+
*/
|
|
35
|
+
cacheDiscount: number | null;
|
|
36
|
+
/**
|
|
37
|
+
* Whether the generation was cancelled
|
|
38
|
+
*/
|
|
39
|
+
cancelled: boolean | null;
|
|
40
|
+
/**
|
|
41
|
+
* ISO 8601 timestamp of when the generation was created
|
|
42
|
+
*/
|
|
43
|
+
createdAt: string;
|
|
44
|
+
/**
|
|
45
|
+
* External user identifier
|
|
46
|
+
*/
|
|
47
|
+
externalUser: string | null;
|
|
48
|
+
/**
|
|
49
|
+
* Reason the generation finished
|
|
50
|
+
*/
|
|
51
|
+
finishReason: string | null;
|
|
52
|
+
/**
|
|
53
|
+
* Time taken for generation in milliseconds
|
|
54
|
+
*/
|
|
55
|
+
generationTime: number | null;
|
|
56
|
+
/**
|
|
57
|
+
* Referer header from the request
|
|
58
|
+
*/
|
|
59
|
+
httpReferer: string | null;
|
|
60
|
+
/**
|
|
61
|
+
* Unique identifier for the generation
|
|
62
|
+
*/
|
|
63
|
+
id: string;
|
|
64
|
+
/**
|
|
65
|
+
* Whether this used bring-your-own-key
|
|
66
|
+
*/
|
|
67
|
+
isByok: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Total latency in milliseconds
|
|
70
|
+
*/
|
|
71
|
+
latency: number | null;
|
|
72
|
+
/**
|
|
73
|
+
* Model used for the generation
|
|
74
|
+
*/
|
|
75
|
+
model: string;
|
|
76
|
+
/**
|
|
77
|
+
* Moderation latency in milliseconds
|
|
78
|
+
*/
|
|
79
|
+
moderationLatency: number | null;
|
|
80
|
+
/**
|
|
81
|
+
* Native finish reason as reported by provider
|
|
82
|
+
*/
|
|
83
|
+
nativeFinishReason: string | null;
|
|
84
|
+
/**
|
|
85
|
+
* Native cached tokens as reported by provider
|
|
86
|
+
*/
|
|
87
|
+
nativeTokensCached: number | null;
|
|
88
|
+
/**
|
|
89
|
+
* Native completion tokens as reported by provider
|
|
90
|
+
*/
|
|
91
|
+
nativeTokensCompletion: number | null;
|
|
92
|
+
/**
|
|
93
|
+
* Native completion image tokens as reported by provider
|
|
94
|
+
*/
|
|
95
|
+
nativeTokensCompletionImages: number | null;
|
|
96
|
+
/**
|
|
97
|
+
* Native prompt tokens as reported by provider
|
|
98
|
+
*/
|
|
99
|
+
nativeTokensPrompt: number | null;
|
|
100
|
+
/**
|
|
101
|
+
* Native reasoning tokens as reported by provider
|
|
102
|
+
*/
|
|
103
|
+
nativeTokensReasoning: number | null;
|
|
104
|
+
/**
|
|
105
|
+
* Number of audio inputs in the prompt
|
|
106
|
+
*/
|
|
107
|
+
numInputAudioPrompt: number | null;
|
|
108
|
+
/**
|
|
109
|
+
* Number of media items in the completion
|
|
110
|
+
*/
|
|
111
|
+
numMediaCompletion: number | null;
|
|
112
|
+
/**
|
|
113
|
+
* Number of media items in the prompt
|
|
114
|
+
*/
|
|
115
|
+
numMediaPrompt: number | null;
|
|
116
|
+
/**
|
|
117
|
+
* Number of search results included
|
|
118
|
+
*/
|
|
119
|
+
numSearchResults: number | null;
|
|
120
|
+
/**
|
|
121
|
+
* Origin URL of the request
|
|
122
|
+
*/
|
|
123
|
+
origin: string;
|
|
124
|
+
/**
|
|
125
|
+
* Name of the provider that served the request
|
|
126
|
+
*/
|
|
127
|
+
providerName: string | null;
|
|
128
|
+
/**
|
|
129
|
+
* List of provider responses for this generation, including fallback attempts
|
|
130
|
+
*/
|
|
131
|
+
providerResponses: Array<ProviderResponse> | null;
|
|
132
|
+
/**
|
|
133
|
+
* Unique identifier grouping all generations from a single API request
|
|
134
|
+
*/
|
|
135
|
+
requestId?: string | null | undefined;
|
|
136
|
+
/**
|
|
137
|
+
* Router used for the request (e.g., openrouter/auto)
|
|
138
|
+
*/
|
|
139
|
+
router: string | null;
|
|
140
|
+
/**
|
|
141
|
+
* Session identifier grouping multiple generations in the same session
|
|
142
|
+
*/
|
|
143
|
+
sessionId?: string | null | undefined;
|
|
144
|
+
/**
|
|
145
|
+
* Whether the response was streamed
|
|
146
|
+
*/
|
|
147
|
+
streamed: boolean | null;
|
|
148
|
+
/**
|
|
149
|
+
* Number of tokens in the completion
|
|
150
|
+
*/
|
|
151
|
+
tokensCompletion: number | null;
|
|
152
|
+
/**
|
|
153
|
+
* Number of tokens in the prompt
|
|
154
|
+
*/
|
|
155
|
+
tokensPrompt: number | null;
|
|
156
|
+
/**
|
|
157
|
+
* Total cost of the generation in USD
|
|
158
|
+
*/
|
|
159
|
+
totalCost: number;
|
|
160
|
+
/**
|
|
161
|
+
* Upstream provider's identifier for this generation
|
|
162
|
+
*/
|
|
163
|
+
upstreamId: string | null;
|
|
164
|
+
/**
|
|
165
|
+
* Cost charged by the upstream provider
|
|
166
|
+
*/
|
|
167
|
+
upstreamInferenceCost: number | null;
|
|
168
|
+
/**
|
|
169
|
+
* Usage amount in USD
|
|
170
|
+
*/
|
|
171
|
+
usage: number;
|
|
172
|
+
/**
|
|
173
|
+
* User-Agent header from the request
|
|
174
|
+
*/
|
|
175
|
+
userAgent: string | null;
|
|
176
|
+
/**
|
|
177
|
+
* The resolved web search engine used for this generation (e.g. exa, firecrawl, parallel)
|
|
178
|
+
*/
|
|
179
|
+
webSearchEngine: string | null;
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* Generation response
|
|
183
|
+
*/
|
|
184
|
+
export type GenerationResponse = {
|
|
185
|
+
/**
|
|
186
|
+
* Generation data
|
|
187
|
+
*/
|
|
188
|
+
data: GenerationResponseData;
|
|
189
|
+
};
|
|
190
|
+
/** @internal */
|
|
191
|
+
export declare const ApiType$inboundSchema: z.ZodType<ApiType, unknown>;
|
|
192
|
+
/** @internal */
|
|
193
|
+
export declare const GenerationResponseData$inboundSchema: z.ZodType<GenerationResponseData, unknown>;
|
|
194
|
+
export declare function generationResponseDataFromJSON(jsonString: string): SafeParseResult<GenerationResponseData, SDKValidationError>;
|
|
195
|
+
/** @internal */
|
|
196
|
+
export declare const GenerationResponse$inboundSchema: z.ZodType<GenerationResponse, unknown>;
|
|
197
|
+
export declare function generationResponseFromJSON(jsonString: string): SafeParseResult<GenerationResponse, SDKValidationError>;
|
|
198
|
+
//# sourceMappingURL=generationresponse.d.ts.map
|