@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,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: f3a6e662c47b
|
|
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 Workspace$inboundSchema = z.object({
|
|
10
|
+
created_at: z.string(),
|
|
11
|
+
created_by: z.nullable(z.string()),
|
|
12
|
+
default_image_model: z.nullable(z.string()),
|
|
13
|
+
default_provider_sort: z.nullable(z.string()),
|
|
14
|
+
default_text_model: z.nullable(z.string()),
|
|
15
|
+
description: z.nullable(z.string()),
|
|
16
|
+
id: z.string(),
|
|
17
|
+
is_data_discount_logging_enabled: z.boolean(),
|
|
18
|
+
is_observability_broadcast_enabled: z.boolean(),
|
|
19
|
+
is_observability_io_logging_enabled: z.boolean(),
|
|
20
|
+
name: z.string(),
|
|
21
|
+
slug: z.string(),
|
|
22
|
+
updated_at: z.nullable(z.string()),
|
|
23
|
+
}).transform((v) => {
|
|
24
|
+
return remap$(v, {
|
|
25
|
+
"created_at": "createdAt",
|
|
26
|
+
"created_by": "createdBy",
|
|
27
|
+
"default_image_model": "defaultImageModel",
|
|
28
|
+
"default_provider_sort": "defaultProviderSort",
|
|
29
|
+
"default_text_model": "defaultTextModel",
|
|
30
|
+
"is_data_discount_logging_enabled": "isDataDiscountLoggingEnabled",
|
|
31
|
+
"is_observability_broadcast_enabled": "isObservabilityBroadcastEnabled",
|
|
32
|
+
"is_observability_io_logging_enabled": "isObservabilityIoLoggingEnabled",
|
|
33
|
+
"updated_at": "updatedAt",
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
export function workspaceFromJSON(jsonString) {
|
|
37
|
+
return safeParse(jsonString, (x) => Workspace$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Workspace' from JSON`);
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=workspace.js.map
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* Role of the member in the workspace
|
|
7
|
+
*/
|
|
8
|
+
export declare const WorkspaceMemberRole: {
|
|
9
|
+
readonly Admin: "admin";
|
|
10
|
+
readonly Member: "member";
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Role of the member in the workspace
|
|
14
|
+
*/
|
|
15
|
+
export type WorkspaceMemberRole = OpenEnum<typeof WorkspaceMemberRole>;
|
|
16
|
+
export type WorkspaceMember = {
|
|
17
|
+
/**
|
|
18
|
+
* ISO 8601 timestamp of when the membership was created
|
|
19
|
+
*/
|
|
20
|
+
createdAt: string;
|
|
21
|
+
/**
|
|
22
|
+
* Unique identifier for the workspace membership
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
/**
|
|
26
|
+
* Role of the member in the workspace
|
|
27
|
+
*/
|
|
28
|
+
role: WorkspaceMemberRole;
|
|
29
|
+
/**
|
|
30
|
+
* Clerk user ID of the member
|
|
31
|
+
*/
|
|
32
|
+
userId: string;
|
|
33
|
+
/**
|
|
34
|
+
* ID of the workspace
|
|
35
|
+
*/
|
|
36
|
+
workspaceId: string;
|
|
37
|
+
};
|
|
38
|
+
/** @internal */
|
|
39
|
+
export declare const WorkspaceMemberRole$inboundSchema: z.ZodType<WorkspaceMemberRole, unknown>;
|
|
40
|
+
/** @internal */
|
|
41
|
+
export declare const WorkspaceMember$inboundSchema: z.ZodType<WorkspaceMember, unknown>;
|
|
42
|
+
export declare function workspaceMemberFromJSON(jsonString: string): SafeParseResult<WorkspaceMember, SDKValidationError>;
|
|
43
|
+
//# sourceMappingURL=workspacemember.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 42cb4568aa7e
|
|
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 * as openEnums from "../types/enums.js";
|
|
9
|
+
/**
|
|
10
|
+
* Role of the member in the workspace
|
|
11
|
+
*/
|
|
12
|
+
export const WorkspaceMemberRole = {
|
|
13
|
+
Admin: "admin",
|
|
14
|
+
Member: "member",
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const WorkspaceMemberRole$inboundSchema = openEnums.inboundSchema(WorkspaceMemberRole);
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const WorkspaceMember$inboundSchema = z.object({
|
|
20
|
+
created_at: z.string(),
|
|
21
|
+
id: z.string(),
|
|
22
|
+
role: WorkspaceMemberRole$inboundSchema,
|
|
23
|
+
user_id: z.string(),
|
|
24
|
+
workspace_id: z.string(),
|
|
25
|
+
}).transform((v) => {
|
|
26
|
+
return remap$(v, {
|
|
27
|
+
"created_at": "createdAt",
|
|
28
|
+
"user_id": "userId",
|
|
29
|
+
"workspace_id": "workspaceId",
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
export function workspaceMemberFromJSON(jsonString) {
|
|
33
|
+
return safeParse(jsonString, (x) => WorkspaceMember$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WorkspaceMember' from JSON`);
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=workspacemember.js.map
|
package/esm/sdk/generations.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
2
|
+
import * as models from "../models/index.js";
|
|
2
3
|
import * as operations from "../models/operations/index.js";
|
|
3
4
|
export declare class Generations extends ClientSDK {
|
|
4
5
|
/**
|
|
5
6
|
* Get request & usage metadata for a generation
|
|
6
7
|
*/
|
|
7
|
-
getGeneration(request: operations.GetGenerationRequest, options?: RequestOptions): Promise<
|
|
8
|
+
getGeneration(request: operations.GetGenerationRequest, options?: RequestOptions): Promise<models.GenerationResponse>;
|
|
9
|
+
/**
|
|
10
|
+
* Get stored prompt and completion content for a generation
|
|
11
|
+
*/
|
|
12
|
+
listGenerationContent(request: operations.ListGenerationContentRequest, options?: RequestOptions): Promise<models.GenerationContentResponse>;
|
|
8
13
|
}
|
|
9
14
|
//# sourceMappingURL=generations.d.ts.map
|
package/esm/sdk/generations.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* @generated-id: e28b205da063
|
|
4
4
|
*/
|
|
5
5
|
import { generationsGetGeneration } from "../funcs/generationsGetGeneration.js";
|
|
6
|
+
import { generationsListGenerationContent } from "../funcs/generationsListGenerationContent.js";
|
|
6
7
|
import { ClientSDK } from "../lib/sdks.js";
|
|
7
8
|
import { unwrapAsync } from "../types/fp.js";
|
|
8
9
|
export class Generations extends ClientSDK {
|
|
@@ -12,5 +13,11 @@ export class Generations extends ClientSDK {
|
|
|
12
13
|
async getGeneration(request, options) {
|
|
13
14
|
return unwrapAsync(generationsGetGeneration(this, request, options));
|
|
14
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Get stored prompt and completion content for a generation
|
|
18
|
+
*/
|
|
19
|
+
async listGenerationContent(request, options) {
|
|
20
|
+
return unwrapAsync(generationsListGenerationContent(this, request, options));
|
|
21
|
+
}
|
|
15
22
|
}
|
|
16
23
|
//# sourceMappingURL=generations.js.map
|
package/esm/sdk/sdk.d.ts
CHANGED
|
@@ -13,7 +13,9 @@ import { OAuth } from "./oauth.js";
|
|
|
13
13
|
import { Organization } from "./organization.js";
|
|
14
14
|
import { Providers } from "./providers.js";
|
|
15
15
|
import { Rerank } from "./rerank.js";
|
|
16
|
+
import { Tts } from "./tts.js";
|
|
16
17
|
import { VideoGeneration } from "./videogeneration.js";
|
|
18
|
+
import { Workspaces } from "./workspaces.js";
|
|
17
19
|
import type { $ZodObject, $ZodShape, infer as zodInfer } from "zod/v4/core";
|
|
18
20
|
import { type CallModelInput } from "../funcs/call-model.js";
|
|
19
21
|
import type { ModelResult } from "../lib/model-result.js";
|
|
@@ -49,8 +51,12 @@ export declare class OpenRouter extends ClientSDK {
|
|
|
49
51
|
get rerank(): Rerank;
|
|
50
52
|
private _beta?;
|
|
51
53
|
get beta(): Beta;
|
|
54
|
+
private _tts?;
|
|
55
|
+
get tts(): Tts;
|
|
52
56
|
private _videoGeneration?;
|
|
53
57
|
get videoGeneration(): VideoGeneration;
|
|
58
|
+
private _workspaces?;
|
|
59
|
+
get workspaces(): Workspaces;
|
|
54
60
|
callModel<TTools extends readonly Tool[], TSharedSchema extends $ZodObject<$ZodShape> | undefined = undefined, TShared extends Record<string, unknown> = TSharedSchema extends $ZodObject<$ZodShape> ? zodInfer<TSharedSchema> : Record<string, never>>(request: CallModelInput<TTools, TShared> & {
|
|
55
61
|
sharedContextSchema?: TSharedSchema;
|
|
56
62
|
}, options?: RequestOptions): ModelResult<TTools, TShared>;
|
package/esm/sdk/sdk.js
CHANGED
|
@@ -17,7 +17,9 @@ import { OAuth } from "./oauth.js";
|
|
|
17
17
|
import { Organization } from "./organization.js";
|
|
18
18
|
import { Providers } from "./providers.js";
|
|
19
19
|
import { Rerank } from "./rerank.js";
|
|
20
|
+
import { Tts } from "./tts.js";
|
|
20
21
|
import { VideoGeneration } from "./videogeneration.js";
|
|
22
|
+
import { Workspaces } from "./workspaces.js";
|
|
21
23
|
import { callModel as callModelFunc, } from "../funcs/call-model.js";
|
|
22
24
|
import { ToolType } from "../lib/tool-types.js";
|
|
23
25
|
export { ToolType };
|
|
@@ -65,9 +67,15 @@ export class OpenRouter extends ClientSDK {
|
|
|
65
67
|
get beta() {
|
|
66
68
|
return (this._beta ?? (this._beta = new Beta(this._options)));
|
|
67
69
|
}
|
|
70
|
+
get tts() {
|
|
71
|
+
return (this._tts ?? (this._tts = new Tts(this._options)));
|
|
72
|
+
}
|
|
68
73
|
get videoGeneration() {
|
|
69
74
|
return (this._videoGeneration ?? (this._videoGeneration = new VideoGeneration(this._options)));
|
|
70
75
|
}
|
|
76
|
+
get workspaces() {
|
|
77
|
+
return (this._workspaces ?? (this._workspaces = new Workspaces(this._options)));
|
|
78
|
+
}
|
|
71
79
|
// #region sdk-class-body
|
|
72
80
|
callModel(request, options) {
|
|
73
81
|
return callModelFunc(this, request, options);
|
package/esm/sdk/tts.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
2
|
+
import * as operations from "../models/operations/index.js";
|
|
3
|
+
export declare class Tts extends ClientSDK {
|
|
4
|
+
/**
|
|
5
|
+
* Create speech
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* Synthesizes audio from the input text
|
|
9
|
+
*/
|
|
10
|
+
createSpeech(request: operations.CreateTtsRequest, options?: RequestOptions): Promise<ReadableStream<Uint8Array>>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=tts.d.ts.map
|
package/esm/sdk/tts.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: b3236e8fa217
|
|
4
|
+
*/
|
|
5
|
+
import { ttsCreateSpeech } from "../funcs/ttsCreateSpeech.js";
|
|
6
|
+
import { ClientSDK } from "../lib/sdks.js";
|
|
7
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
8
|
+
export class Tts extends ClientSDK {
|
|
9
|
+
/**
|
|
10
|
+
* Create speech
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* Synthesizes audio from the input text
|
|
14
|
+
*/
|
|
15
|
+
async createSpeech(request, options) {
|
|
16
|
+
return unwrapAsync(ttsCreateSpeech(this, request, options));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=tts.js.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
2
|
+
import * as models from "../models/index.js";
|
|
3
|
+
import * as operations from "../models/operations/index.js";
|
|
4
|
+
import { PageIterator } from "../types/operations.js";
|
|
5
|
+
export declare class Workspaces extends ClientSDK {
|
|
6
|
+
/**
|
|
7
|
+
* List workspaces
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* List all workspaces for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
11
|
+
*/
|
|
12
|
+
list(request?: operations.ListWorkspacesRequest | undefined, options?: RequestOptions): Promise<PageIterator<operations.ListWorkspacesResponse, {
|
|
13
|
+
offset: number;
|
|
14
|
+
}>>;
|
|
15
|
+
/**
|
|
16
|
+
* Create a workspace
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* Create a new workspace for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
20
|
+
*/
|
|
21
|
+
create(request: operations.CreateWorkspaceRequest, options?: RequestOptions): Promise<models.CreateWorkspaceResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Delete a workspace
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
* Delete an existing workspace. The default workspace cannot be deleted. Workspaces with active API keys cannot be deleted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
27
|
+
*/
|
|
28
|
+
delete(request: operations.DeleteWorkspaceRequest, options?: RequestOptions): Promise<models.DeleteWorkspaceResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* Get a workspace
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Get a single workspace by ID or slug. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
34
|
+
*/
|
|
35
|
+
get(request: operations.GetWorkspaceRequest, options?: RequestOptions): Promise<models.GetWorkspaceResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* Update a workspace
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
* Update an existing workspace by ID or slug. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
41
|
+
*/
|
|
42
|
+
update(request: operations.UpdateWorkspaceRequest, options?: RequestOptions): Promise<models.UpdateWorkspaceResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* Bulk add members to a workspace
|
|
45
|
+
*
|
|
46
|
+
* @remarks
|
|
47
|
+
* Add multiple organization members to a workspace. Members are assigned the same role they hold in the organization. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
48
|
+
*/
|
|
49
|
+
bulkAddMembers(request: operations.BulkAddWorkspaceMembersRequest, options?: RequestOptions): Promise<models.BulkAddWorkspaceMembersResponse>;
|
|
50
|
+
/**
|
|
51
|
+
* Bulk remove members from a workspace
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* Remove multiple members from a workspace. Members with active API keys in the workspace cannot be removed. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
55
|
+
*/
|
|
56
|
+
bulkRemoveMembers(request: operations.BulkRemoveWorkspaceMembersRequest, options?: RequestOptions): Promise<models.BulkRemoveWorkspaceMembersResponse>;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=workspaces.d.ts.map
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 72b45379c8d9
|
|
4
|
+
*/
|
|
5
|
+
import { workspacesBulkAddMembers } from "../funcs/workspacesBulkAddMembers.js";
|
|
6
|
+
import { workspacesBulkRemoveMembers } from "../funcs/workspacesBulkRemoveMembers.js";
|
|
7
|
+
import { workspacesCreate } from "../funcs/workspacesCreate.js";
|
|
8
|
+
import { workspacesDelete } from "../funcs/workspacesDelete.js";
|
|
9
|
+
import { workspacesGet } from "../funcs/workspacesGet.js";
|
|
10
|
+
import { workspacesList } from "../funcs/workspacesList.js";
|
|
11
|
+
import { workspacesUpdate } from "../funcs/workspacesUpdate.js";
|
|
12
|
+
import { ClientSDK } from "../lib/sdks.js";
|
|
13
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
14
|
+
import { unwrapResultIterator } from "../types/operations.js";
|
|
15
|
+
export class Workspaces extends ClientSDK {
|
|
16
|
+
/**
|
|
17
|
+
* List workspaces
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* List all workspaces for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
21
|
+
*/
|
|
22
|
+
async list(request, options) {
|
|
23
|
+
return unwrapResultIterator(workspacesList(this, request, options));
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Create a workspace
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* Create a new workspace for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
30
|
+
*/
|
|
31
|
+
async create(request, options) {
|
|
32
|
+
return unwrapAsync(workspacesCreate(this, request, options));
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Delete a workspace
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* Delete an existing workspace. The default workspace cannot be deleted. Workspaces with active API keys cannot be deleted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
39
|
+
*/
|
|
40
|
+
async delete(request, options) {
|
|
41
|
+
return unwrapAsync(workspacesDelete(this, request, options));
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Get a workspace
|
|
45
|
+
*
|
|
46
|
+
* @remarks
|
|
47
|
+
* Get a single workspace by ID or slug. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
48
|
+
*/
|
|
49
|
+
async get(request, options) {
|
|
50
|
+
return unwrapAsync(workspacesGet(this, request, options));
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Update a workspace
|
|
54
|
+
*
|
|
55
|
+
* @remarks
|
|
56
|
+
* Update an existing workspace by ID or slug. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
57
|
+
*/
|
|
58
|
+
async update(request, options) {
|
|
59
|
+
return unwrapAsync(workspacesUpdate(this, request, options));
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Bulk add members to a workspace
|
|
63
|
+
*
|
|
64
|
+
* @remarks
|
|
65
|
+
* Add multiple organization members to a workspace. Members are assigned the same role they hold in the organization. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
66
|
+
*/
|
|
67
|
+
async bulkAddMembers(request, options) {
|
|
68
|
+
return unwrapAsync(workspacesBulkAddMembers(this, request, options));
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Bulk remove members from a workspace
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
* Remove multiple members from a workspace. Members with active API keys in the workspace cannot be removed. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
75
|
+
*/
|
|
76
|
+
async bulkRemoveMembers(request, options) {
|
|
77
|
+
return unwrapAsync(workspacesBulkRemoveMembers(this, request, options));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=workspaces.js.map
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.17",
|
|
4
4
|
"author": "OpenRouter",
|
|
5
5
|
"description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 300+ language models through a unified API.",
|
|
6
6
|
"keywords": [
|
|
@@ -71,13 +71,13 @@
|
|
|
71
71
|
"prepublishOnly": "npm run build",
|
|
72
72
|
"compile": "tsc",
|
|
73
73
|
"postinstall": "node scripts/check-types.js || true",
|
|
74
|
-
"prepare": "npm run build",
|
|
75
|
-
"test:watch": "vitest --watch --project unit",
|
|
76
|
-
"typecheck": "tsc --noEmit",
|
|
77
|
-
"typecheck:transit": "exit 0",
|
|
78
74
|
"test": "vitest --run --project unit",
|
|
79
75
|
"test:e2e": "vitest --run --project e2e",
|
|
80
|
-
"test:
|
|
76
|
+
"test:watch": "vitest --watch --project unit",
|
|
77
|
+
"typecheck:transit": "exit 0",
|
|
78
|
+
"prepare": "npm run build",
|
|
79
|
+
"test:transit": "exit 0",
|
|
80
|
+
"typecheck": "tsc --noEmit"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {},
|
|
83
83
|
"devDependencies": {
|