@anthropic-ai/sdk 0.121.0 → 0.123.0
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/CHANGELOG.md +63 -0
- package/README.md +1 -1
- package/core/credentials.d.mts.map +1 -1
- package/core/credentials.d.ts.map +1 -1
- package/core/credentials.js +5 -7
- package/core/credentials.js.map +1 -1
- package/core/credentials.mjs +5 -7
- package/core/credentials.mjs.map +1 -1
- package/core/middleware.d.mts.map +1 -1
- package/core/middleware.d.ts.map +1 -1
- package/core/middleware.js +4 -4
- package/core/middleware.js.map +1 -1
- package/core/middleware.mjs +4 -4
- package/core/middleware.mjs.map +1 -1
- package/internal/errors.d.mts.map +1 -1
- package/internal/errors.d.ts.map +1 -1
- package/internal/errors.js +3 -1
- package/internal/errors.js.map +1 -1
- package/internal/errors.mjs +3 -1
- package/internal/errors.mjs.map +1 -1
- package/internal/file-store.d.mts.map +1 -1
- package/internal/file-store.d.ts.map +1 -1
- package/internal/file-store.js +23 -25
- package/internal/file-store.js.map +1 -1
- package/internal/file-store.mjs +5 -6
- package/internal/file-store.mjs.map +1 -1
- package/internal/node.browser.d.mts +9 -0
- package/internal/node.browser.d.mts.map +1 -0
- package/internal/node.browser.d.ts +9 -0
- package/internal/node.browser.d.ts.map +1 -0
- package/internal/node.browser.js +22 -0
- package/internal/node.browser.js.map +1 -0
- package/internal/node.browser.mjs +19 -0
- package/internal/node.browser.mjs.map +1 -0
- package/internal/node.d.mts +14 -0
- package/internal/node.d.mts.map +1 -0
- package/internal/node.d.ts +14 -0
- package/internal/node.d.ts.map +1 -0
- package/internal/node.js +24 -0
- package/internal/node.js.map +1 -0
- package/internal/node.mjs +14 -0
- package/internal/node.mjs.map +1 -0
- package/internal/parse.js +1 -1
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/uploads.js +10 -6
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +10 -6
- package/internal/uploads.mjs.map +1 -1
- package/lib/BetaMessageStream.d.mts.map +1 -1
- package/lib/BetaMessageStream.d.ts.map +1 -1
- package/lib/BetaMessageStream.js +3 -0
- package/lib/BetaMessageStream.js.map +1 -1
- package/lib/BetaMessageStream.mjs +3 -0
- package/lib/BetaMessageStream.mjs.map +1 -1
- package/lib/credentials/credential-chain.js +1 -1
- package/lib/credentials/credential-chain.js.map +1 -1
- package/lib/credentials/credential-chain.mjs +1 -1
- package/lib/credentials/credential-chain.mjs.map +1 -1
- package/lib/credentials/identity-token.js +1 -1
- package/lib/credentials/identity-token.js.map +1 -1
- package/lib/credentials/identity-token.mjs +1 -1
- package/lib/credentials/identity-token.mjs.map +1 -1
- package/lib/credentials/types.d.mts.map +1 -1
- package/lib/credentials/types.d.ts.map +1 -1
- package/lib/credentials/types.js +2 -3
- package/lib/credentials/types.js.map +1 -1
- package/lib/credentials/types.mjs +2 -3
- package/lib/credentials/types.mjs.map +1 -1
- package/lib/credentials/user-oauth.js +1 -1
- package/lib/credentials/user-oauth.js.map +1 -1
- package/lib/credentials/user-oauth.mjs +1 -1
- package/lib/credentials/user-oauth.mjs.map +1 -1
- package/lib/middleware.d.mts.map +1 -1
- package/lib/middleware.d.ts.map +1 -1
- package/lib/middleware.js +30 -7
- package/lib/middleware.js.map +1 -1
- package/lib/middleware.mjs +30 -7
- package/lib/middleware.mjs.map +1 -1
- package/lib/sessions/accumulate.d.mts +3 -2
- package/lib/sessions/accumulate.d.mts.map +1 -1
- package/lib/sessions/accumulate.d.ts +3 -2
- package/lib/sessions/accumulate.d.ts.map +1 -1
- package/lib/sessions/accumulate.js +3 -45
- package/lib/sessions/accumulate.js.map +1 -1
- package/lib/sessions/accumulate.mjs +3 -45
- package/lib/sessions/accumulate.mjs.map +1 -1
- package/package.json +3 -1
- package/resources/beta/agents/agents.d.mts +1 -1
- package/resources/beta/agents/agents.d.mts.map +1 -1
- package/resources/beta/agents/agents.d.ts +1 -1
- package/resources/beta/agents/agents.d.ts.map +1 -1
- package/resources/beta/agents/agents.js.map +1 -1
- package/resources/beta/agents/agents.mjs.map +1 -1
- package/resources/beta/beta.d.mts +9 -9
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +9 -9
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/deployment-runs.d.mts +6 -6
- package/resources/beta/deployment-runs.d.ts +6 -6
- package/resources/beta/deployments.d.mts +3 -2
- package/resources/beta/deployments.d.mts.map +1 -1
- package/resources/beta/deployments.d.ts +3 -2
- package/resources/beta/deployments.d.ts.map +1 -1
- package/resources/beta/dreams.d.mts +28 -1
- package/resources/beta/dreams.d.mts.map +1 -1
- package/resources/beta/dreams.d.ts +28 -1
- package/resources/beta/dreams.d.ts.map +1 -1
- package/resources/beta/files.d.mts +25 -5
- package/resources/beta/files.d.mts.map +1 -1
- package/resources/beta/files.d.ts +25 -5
- package/resources/beta/files.d.ts.map +1 -1
- package/resources/beta/files.js +6 -6
- package/resources/beta/files.js.map +1 -1
- package/resources/beta/files.mjs +7 -7
- package/resources/beta/files.mjs.map +1 -1
- package/resources/beta/index.d.mts +4 -4
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +4 -4
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/memory-stores/memories.d.mts +6 -4
- package/resources/beta/memory-stores/memories.d.mts.map +1 -1
- package/resources/beta/memory-stores/memories.d.ts +6 -4
- package/resources/beta/memory-stores/memories.d.ts.map +1 -1
- package/resources/beta/messages/index.d.mts +1 -1
- package/resources/beta/messages/index.d.mts.map +1 -1
- package/resources/beta/messages/index.d.ts +1 -1
- package/resources/beta/messages/index.d.ts.map +1 -1
- package/resources/beta/messages/index.js.map +1 -1
- package/resources/beta/messages/index.mjs.map +1 -1
- package/resources/beta/messages/messages.d.mts +148 -21
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +148 -21
- package/resources/beta/messages/messages.d.ts.map +1 -1
- package/resources/beta/messages/messages.js.map +1 -1
- package/resources/beta/messages/messages.mjs.map +1 -1
- package/resources/beta/organization/compliance-settings.d.mts +74 -0
- package/resources/beta/organization/compliance-settings.d.mts.map +1 -0
- package/resources/beta/organization/compliance-settings.d.ts +74 -0
- package/resources/beta/organization/compliance-settings.d.ts.map +1 -0
- package/resources/beta/organization/compliance-settings.js +52 -0
- package/resources/beta/organization/compliance-settings.js.map +1 -0
- package/resources/beta/organization/compliance-settings.mjs +48 -0
- package/resources/beta/organization/compliance-settings.mjs.map +1 -0
- package/resources/beta/organization/external-keys.d.mts +6 -3
- package/resources/beta/organization/external-keys.d.mts.map +1 -1
- package/resources/beta/organization/external-keys.d.ts +6 -3
- package/resources/beta/organization/external-keys.d.ts.map +1 -1
- package/resources/beta/organization/index.d.mts +1 -0
- package/resources/beta/organization/index.d.mts.map +1 -1
- package/resources/beta/organization/index.d.ts +1 -0
- package/resources/beta/organization/index.d.ts.map +1 -1
- package/resources/beta/organization/index.js +3 -1
- package/resources/beta/organization/index.js.map +1 -1
- package/resources/beta/organization/index.mjs +1 -0
- package/resources/beta/organization/index.mjs.map +1 -1
- package/resources/beta/organization/organization.d.mts +4 -0
- package/resources/beta/organization/organization.d.mts.map +1 -1
- package/resources/beta/organization/organization.d.ts +4 -0
- package/resources/beta/organization/organization.d.ts.map +1 -1
- package/resources/beta/organization/organization.js +4 -0
- package/resources/beta/organization/organization.js.map +1 -1
- package/resources/beta/organization/organization.mjs +4 -0
- package/resources/beta/organization/organization.mjs.map +1 -1
- package/resources/beta/organization/rate-limits.d.mts +2 -3
- package/resources/beta/organization/rate-limits.d.mts.map +1 -1
- package/resources/beta/organization/rate-limits.d.ts +2 -3
- package/resources/beta/organization/rate-limits.d.ts.map +1 -1
- package/resources/beta/organization/rate-limits.js +2 -3
- package/resources/beta/organization/rate-limits.js.map +1 -1
- package/resources/beta/organization/rate-limits.mjs +2 -3
- package/resources/beta/organization/rate-limits.mjs.map +1 -1
- package/resources/beta/organization/workspaces/rate-limits.d.mts +2 -3
- package/resources/beta/organization/workspaces/rate-limits.d.mts.map +1 -1
- package/resources/beta/organization/workspaces/rate-limits.d.ts +2 -3
- package/resources/beta/organization/workspaces/rate-limits.d.ts.map +1 -1
- package/resources/beta/organization/workspaces/rate-limits.js +2 -3
- package/resources/beta/organization/workspaces/rate-limits.js.map +1 -1
- package/resources/beta/organization/workspaces/rate-limits.mjs +2 -3
- package/resources/beta/organization/workspaces/rate-limits.mjs.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.d.mts +28 -12
- package/resources/beta/organization/workspaces/workspaces.d.mts.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.d.ts +28 -12
- package/resources/beta/organization/workspaces/workspaces.d.ts.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.js.map +1 -1
- package/resources/beta/organization/workspaces/workspaces.mjs.map +1 -1
- package/resources/beta/sessions/events.d.mts +1 -1
- package/resources/beta/sessions/events.d.ts +1 -1
- package/resources/beta/sessions/sessions.d.mts +10 -10
- package/resources/beta/sessions/sessions.d.ts +10 -10
- package/resources/beta/skills/index.d.mts +2 -2
- package/resources/beta/skills/index.d.mts.map +1 -1
- package/resources/beta/skills/index.d.ts +2 -2
- package/resources/beta/skills/index.d.ts.map +1 -1
- package/resources/beta/skills/index.js.map +1 -1
- package/resources/beta/skills/index.mjs.map +1 -1
- package/resources/beta/skills/skills.d.mts +48 -120
- package/resources/beta/skills/skills.d.mts.map +1 -1
- package/resources/beta/skills/skills.d.ts +48 -120
- package/resources/beta/skills/skills.d.ts.map +1 -1
- package/resources/beta/skills/skills.js +12 -8
- package/resources/beta/skills/skills.js.map +1 -1
- package/resources/beta/skills/skills.mjs +12 -8
- package/resources/beta/skills/skills.mjs.map +1 -1
- package/resources/beta/skills/versions.d.mts +35 -138
- package/resources/beta/skills/versions.d.mts.map +1 -1
- package/resources/beta/skills/versions.d.ts +35 -138
- package/resources/beta/skills/versions.d.ts.map +1 -1
- package/resources/beta/skills/versions.js +18 -18
- package/resources/beta/skills/versions.js.map +1 -1
- package/resources/beta/skills/versions.mjs +18 -18
- package/resources/beta/skills/versions.mjs.map +1 -1
- package/resources/beta/user-profiles.d.mts +21 -25
- package/resources/beta/user-profiles.d.mts.map +1 -1
- package/resources/beta/user-profiles.d.ts +21 -25
- package/resources/beta/user-profiles.d.ts.map +1 -1
- package/resources/beta/webhooks.d.mts +16 -17
- package/resources/beta/webhooks.d.mts.map +1 -1
- package/resources/beta/webhooks.d.ts +16 -17
- package/resources/beta/webhooks.d.ts.map +1 -1
- package/resources/beta/webhooks.js +21 -8
- package/resources/beta/webhooks.js.map +1 -1
- package/resources/beta/webhooks.mjs +21 -8
- package/resources/beta/webhooks.mjs.map +1 -1
- package/resources/messages/messages.d.mts +1 -3
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +1 -3
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs.map +1 -1
- package/src/core/credentials.ts +5 -7
- package/src/core/middleware.ts +4 -3
- package/src/internal/errors.ts +3 -1
- package/src/internal/file-store.ts +11 -10
- package/src/internal/node.browser.ts +22 -0
- package/src/internal/node.ts +14 -0
- package/src/internal/parse.ts +1 -1
- package/src/internal/uploads.ts +10 -7
- package/src/lib/BetaMessageStream.ts +4 -0
- package/src/lib/credentials/credential-chain.ts +1 -1
- package/src/lib/credentials/identity-token.ts +1 -1
- package/src/lib/credentials/types.ts +2 -3
- package/src/lib/credentials/user-oauth.ts +1 -1
- package/src/lib/middleware.ts +33 -9
- package/src/lib/sessions/accumulate.ts +7 -47
- package/src/resources/beta/agents/agents.ts +1 -0
- package/src/resources/beta/beta.ts +28 -15
- package/src/resources/beta/deployment-runs.ts +6 -6
- package/src/resources/beta/deployments.ts +3 -2
- package/src/resources/beta/dreams.ts +42 -0
- package/src/resources/beta/files.ts +34 -11
- package/src/resources/beta/index.ts +12 -7
- package/src/resources/beta/memory-stores/memories.ts +6 -4
- package/src/resources/beta/messages/index.ts +5 -1
- package/src/resources/beta/messages/messages.ts +171 -30
- package/src/resources/beta/organization/compliance-settings.ts +96 -0
- package/src/resources/beta/organization/external-keys.ts +6 -3
- package/src/resources/beta/organization/index.ts +9 -0
- package/src/resources/beta/organization/organization.ts +24 -0
- package/src/resources/beta/organization/rate-limits.ts +2 -3
- package/src/resources/beta/organization/workspaces/rate-limits.ts +2 -3
- package/src/resources/beta/organization/workspaces/workspaces.ts +28 -12
- package/src/resources/beta/sessions/events.ts +1 -1
- package/src/resources/beta/sessions/sessions.ts +10 -10
- package/src/resources/beta/skills/index.ts +7 -10
- package/src/resources/beta/skills/skills.ts +60 -150
- package/src/resources/beta/skills/versions.ts +43 -166
- package/src/resources/beta/user-profiles.ts +24 -27
- package/src/resources/beta/webhooks.ts +25 -29
- package/src/resources/messages/messages.ts +2 -8
- package/src/tools/agent-toolset/fs-util.ts +6 -5
- package/src/tools/agent-toolset/memories.ts +5 -3
- package/src/tools/agent-toolset/node.browser.ts +0 -4
- package/src/tools/agent-toolset/node.ts +118 -13
- package/src/tools/agent-toolset/skills.ts +10 -43
- package/src/version.ts +1 -1
- package/tools/agent-toolset/fs-util.d.mts.map +1 -1
- package/tools/agent-toolset/fs-util.d.ts.map +1 -1
- package/tools/agent-toolset/fs-util.js +13 -15
- package/tools/agent-toolset/fs-util.js.map +1 -1
- package/tools/agent-toolset/fs-util.mjs +3 -4
- package/tools/agent-toolset/fs-util.mjs.map +1 -1
- package/tools/agent-toolset/memories.d.mts.map +1 -1
- package/tools/agent-toolset/memories.d.ts.map +1 -1
- package/tools/agent-toolset/memories.js +6 -4
- package/tools/agent-toolset/memories.js.map +1 -1
- package/tools/agent-toolset/memories.mjs +5 -3
- package/tools/agent-toolset/memories.mjs.map +1 -1
- package/tools/agent-toolset/node.browser.d.mts +0 -1
- package/tools/agent-toolset/node.browser.d.mts.map +1 -1
- package/tools/agent-toolset/node.browser.d.ts +0 -1
- package/tools/agent-toolset/node.browser.d.ts.map +1 -1
- package/tools/agent-toolset/node.browser.js +0 -4
- package/tools/agent-toolset/node.browser.js.map +1 -1
- package/tools/agent-toolset/node.browser.mjs +0 -3
- package/tools/agent-toolset/node.browser.mjs.map +1 -1
- package/tools/agent-toolset/node.d.mts +9 -7
- package/tools/agent-toolset/node.d.mts.map +1 -1
- package/tools/agent-toolset/node.d.ts +9 -7
- package/tools/agent-toolset/node.d.ts.map +1 -1
- package/tools/agent-toolset/node.js +96 -8
- package/tools/agent-toolset/node.js.map +1 -1
- package/tools/agent-toolset/node.mjs +96 -7
- package/tools/agent-toolset/node.mjs.map +1 -1
- package/tools/agent-toolset/skills.d.mts +0 -8
- package/tools/agent-toolset/skills.d.mts.map +1 -1
- package/tools/agent-toolset/skills.d.ts +0 -8
- package/tools/agent-toolset/skills.d.ts.map +1 -1
- package/tools/agent-toolset/skills.js +20 -46
- package/tools/agent-toolset/skills.js.map +1 -1
- package/tools/agent-toolset/skills.mjs +9 -33
- package/tools/agent-toolset/skills.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.mjs";
|
|
2
2
|
import * as BetaAPI from "../beta.mjs";
|
|
3
3
|
import * as VersionsAPI from "./versions.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { BetaDeletedSkillVersion, BetaSkillVersion, BetaSkillVersionsPageCursor, VersionCreateParams, VersionDeleteParams, VersionDownloadParams, VersionListParams, VersionRetrieveParams, Versions } from "./versions.mjs";
|
|
5
5
|
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
6
6
|
import { PageCursor, type PageCursorParams, PagePromise } from "../../../core/pagination.mjs";
|
|
7
7
|
import { type Uploadable } from "../../../core/uploads.mjs";
|
|
@@ -13,45 +13,49 @@ export declare class Skills extends APIResource {
|
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
15
|
* ```ts
|
|
16
|
-
* const
|
|
16
|
+
* const betaSkill = await client.beta.skills.create({
|
|
17
17
|
* files: [fs.createReadStream('path/to/file')],
|
|
18
18
|
* });
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
create(params: SkillCreateParams, options?: RequestOptions): APIPromise<
|
|
21
|
+
create(params: SkillCreateParams, options?: RequestOptions): APIPromise<BetaSkill>;
|
|
22
22
|
/**
|
|
23
23
|
* Get Skill
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
26
|
* ```ts
|
|
27
|
-
* const
|
|
27
|
+
* const betaSkill = await client.beta.skills.retrieve(
|
|
28
|
+
* 'skill_id',
|
|
29
|
+
* );
|
|
28
30
|
* ```
|
|
29
31
|
*/
|
|
30
|
-
retrieve(skillID: string, params?: SkillRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<
|
|
32
|
+
retrieve(skillID: string, params?: SkillRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<BetaSkill>;
|
|
31
33
|
/**
|
|
32
34
|
* List Skills
|
|
33
35
|
*
|
|
34
36
|
* @example
|
|
35
37
|
* ```ts
|
|
36
38
|
* // Automatically fetches more pages as needed.
|
|
37
|
-
* for await (const
|
|
39
|
+
* for await (const betaSkill of client.beta.skills.list()) {
|
|
38
40
|
* // ...
|
|
39
41
|
* }
|
|
40
42
|
* ```
|
|
41
43
|
*/
|
|
42
|
-
list(params?: SkillListParams | null | undefined, options?: RequestOptions): PagePromise<
|
|
44
|
+
list(params?: SkillListParams | null | undefined, options?: RequestOptions): PagePromise<BetaSkillsPageCursor, BetaSkill>;
|
|
43
45
|
/**
|
|
44
46
|
* Delete Skill
|
|
45
47
|
*
|
|
46
48
|
* @example
|
|
47
49
|
* ```ts
|
|
48
|
-
* const
|
|
50
|
+
* const betaDeletedSkill = await client.beta.skills.delete(
|
|
51
|
+
* 'skill_id',
|
|
52
|
+
* );
|
|
49
53
|
* ```
|
|
50
54
|
*/
|
|
51
|
-
delete(skillID: string, params?: SkillDeleteParams | null | undefined, options?: RequestOptions): APIPromise<
|
|
55
|
+
delete(skillID: string, params?: SkillDeleteParams | null | undefined, options?: RequestOptions): APIPromise<BetaDeletedSkill>;
|
|
52
56
|
}
|
|
53
|
-
export type
|
|
54
|
-
export interface
|
|
57
|
+
export type BetaSkillsPageCursor = PageCursor<BetaSkill>;
|
|
58
|
+
export interface BetaDeletedSkill {
|
|
55
59
|
/**
|
|
56
60
|
* Unique identifier for the skill.
|
|
57
61
|
*
|
|
@@ -59,87 +63,13 @@ export interface SkillCreateResponse {
|
|
|
59
63
|
*/
|
|
60
64
|
id: string;
|
|
61
65
|
/**
|
|
62
|
-
*
|
|
63
|
-
*/
|
|
64
|
-
created_at: string;
|
|
65
|
-
/**
|
|
66
|
-
* Display title for the skill.
|
|
67
|
-
*
|
|
68
|
-
* This is a human-readable label that is not included in the prompt sent to the
|
|
69
|
-
* model.
|
|
70
|
-
*/
|
|
71
|
-
display_title: string | null;
|
|
72
|
-
/**
|
|
73
|
-
* The latest version identifier for the skill.
|
|
74
|
-
*
|
|
75
|
-
* This represents the most recent version of the skill that has been created.
|
|
76
|
-
*/
|
|
77
|
-
latest_version: string | null;
|
|
78
|
-
/**
|
|
79
|
-
* Source of the skill.
|
|
80
|
-
*
|
|
81
|
-
* This may be one of the following values:
|
|
82
|
-
*
|
|
83
|
-
* - `"custom"`: the skill was created by a user
|
|
84
|
-
* - `"anthropic"`: the skill was created by Anthropic
|
|
85
|
-
*/
|
|
86
|
-
source: string;
|
|
87
|
-
/**
|
|
88
|
-
* Object type.
|
|
89
|
-
*
|
|
90
|
-
* For Skills, this is always `"skill"`.
|
|
91
|
-
*/
|
|
92
|
-
type: string;
|
|
93
|
-
/**
|
|
94
|
-
* ISO 8601 timestamp of when the skill was last updated.
|
|
95
|
-
*/
|
|
96
|
-
updated_at: string;
|
|
97
|
-
}
|
|
98
|
-
export interface SkillRetrieveResponse {
|
|
99
|
-
/**
|
|
100
|
-
* Unique identifier for the skill.
|
|
101
|
-
*
|
|
102
|
-
* The format and length of IDs may change over time.
|
|
103
|
-
*/
|
|
104
|
-
id: string;
|
|
105
|
-
/**
|
|
106
|
-
* ISO 8601 timestamp of when the skill was created.
|
|
107
|
-
*/
|
|
108
|
-
created_at: string;
|
|
109
|
-
/**
|
|
110
|
-
* Display title for the skill.
|
|
111
|
-
*
|
|
112
|
-
* This is a human-readable label that is not included in the prompt sent to the
|
|
113
|
-
* model.
|
|
114
|
-
*/
|
|
115
|
-
display_title: string | null;
|
|
116
|
-
/**
|
|
117
|
-
* The latest version identifier for the skill.
|
|
118
|
-
*
|
|
119
|
-
* This represents the most recent version of the skill that has been created.
|
|
120
|
-
*/
|
|
121
|
-
latest_version: string | null;
|
|
122
|
-
/**
|
|
123
|
-
* Source of the skill.
|
|
124
|
-
*
|
|
125
|
-
* This may be one of the following values:
|
|
126
|
-
*
|
|
127
|
-
* - `"custom"`: the skill was created by a user
|
|
128
|
-
* - `"anthropic"`: the skill was created by Anthropic
|
|
129
|
-
*/
|
|
130
|
-
source: string;
|
|
131
|
-
/**
|
|
132
|
-
* Object type.
|
|
66
|
+
* Deleted object type.
|
|
133
67
|
*
|
|
134
|
-
* For Skills, this is always `"
|
|
135
|
-
*/
|
|
136
|
-
type: string;
|
|
137
|
-
/**
|
|
138
|
-
* ISO 8601 timestamp of when the skill was last updated.
|
|
68
|
+
* For Skills, this is always `"skill_deleted"`.
|
|
139
69
|
*/
|
|
140
|
-
|
|
70
|
+
type: 'skill_deleted';
|
|
141
71
|
}
|
|
142
|
-
export interface
|
|
72
|
+
export interface BetaSkill {
|
|
143
73
|
/**
|
|
144
74
|
* Unique identifier for the skill.
|
|
145
75
|
*
|
|
@@ -151,51 +81,50 @@ export interface SkillListResponse {
|
|
|
151
81
|
*/
|
|
152
82
|
created_at: string;
|
|
153
83
|
/**
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
* model.
|
|
84
|
+
* Human-readable, single-line label for the Skill. Maximum 255 characters. Always
|
|
85
|
+
* set: derived from the SKILL.md frontmatter `name` when omitted at creation. Not
|
|
86
|
+
* unique.
|
|
158
87
|
*/
|
|
159
|
-
|
|
88
|
+
display_name: string;
|
|
160
89
|
/**
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
* This represents the most recent version of the skill that has been created.
|
|
90
|
+
* ID of the newest Skill Version — what `latest` references resolve to. Always
|
|
91
|
+
* set: a Skill holds at least one version.
|
|
164
92
|
*/
|
|
165
|
-
|
|
93
|
+
latest_version_id: string;
|
|
166
94
|
/**
|
|
167
|
-
*
|
|
95
|
+
* Where the Skill comes from.
|
|
168
96
|
*
|
|
169
|
-
*
|
|
97
|
+
* Possible values:
|
|
170
98
|
*
|
|
171
|
-
* - `"custom"`: the
|
|
172
|
-
* - `"anthropic"`:
|
|
99
|
+
* - `"custom"`: authored by the platform user; private to their workspace
|
|
100
|
+
* - `"anthropic"`: published by Anthropic; shared and read-only
|
|
101
|
+
* - `"anthropic_example"`: Anthropic-published sample Skill
|
|
102
|
+
* - `"plugin"`: resolved from an installed plugin
|
|
173
103
|
*/
|
|
174
|
-
source:
|
|
104
|
+
source: BetaSkillSource;
|
|
175
105
|
/**
|
|
176
106
|
* Object type.
|
|
177
107
|
*
|
|
178
108
|
* For Skills, this is always `"skill"`.
|
|
179
109
|
*/
|
|
180
|
-
type:
|
|
110
|
+
type: 'skill';
|
|
181
111
|
/**
|
|
182
112
|
* ISO 8601 timestamp of when the skill was last updated.
|
|
183
113
|
*/
|
|
184
114
|
updated_at: string;
|
|
185
115
|
}
|
|
186
|
-
export interface
|
|
116
|
+
export interface BetaSkillSource {
|
|
187
117
|
/**
|
|
188
|
-
*
|
|
118
|
+
* Where the Skill comes from.
|
|
189
119
|
*
|
|
190
|
-
*
|
|
191
|
-
*/
|
|
192
|
-
id: string;
|
|
193
|
-
/**
|
|
194
|
-
* Deleted object type.
|
|
120
|
+
* Possible values:
|
|
195
121
|
*
|
|
196
|
-
*
|
|
122
|
+
* - `"custom"`: authored by the platform user; private to their workspace
|
|
123
|
+
* - `"anthropic"`: published by Anthropic; shared and read-only
|
|
124
|
+
* - `"anthropic_example"`: Anthropic-published sample Skill
|
|
125
|
+
* - `"plugin"`: resolved from an installed plugin
|
|
197
126
|
*/
|
|
198
|
-
type:
|
|
127
|
+
type: 'custom' | 'anthropic' | 'anthropic_example' | 'plugin';
|
|
199
128
|
}
|
|
200
129
|
export interface SkillCreateParams {
|
|
201
130
|
/**
|
|
@@ -206,12 +135,11 @@ export interface SkillCreateParams {
|
|
|
206
135
|
*/
|
|
207
136
|
files: Array<Uploadable>;
|
|
208
137
|
/**
|
|
209
|
-
* Body param:
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
* model.
|
|
138
|
+
* Body param: Human-readable, single-line label for the Skill. Maximum 255
|
|
139
|
+
* characters. Always set: derived from the SKILL.md frontmatter `name` when
|
|
140
|
+
* omitted at creation. Not unique.
|
|
213
141
|
*/
|
|
214
|
-
|
|
142
|
+
display_name?: string | null;
|
|
215
143
|
/**
|
|
216
144
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
217
145
|
*/
|
|
@@ -245,7 +173,7 @@ export interface SkillDeleteParams {
|
|
|
245
173
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
246
174
|
}
|
|
247
175
|
export declare namespace Skills {
|
|
248
|
-
export { type
|
|
249
|
-
export { Versions as Versions, type
|
|
176
|
+
export { type BetaDeletedSkill as BetaDeletedSkill, type BetaSkill as BetaSkill, type BetaSkillSource as BetaSkillSource, type BetaSkillsPageCursor as BetaSkillsPageCursor, type SkillCreateParams as SkillCreateParams, type SkillRetrieveParams as SkillRetrieveParams, type SkillListParams as SkillListParams, type SkillDeleteParams as SkillDeleteParams, };
|
|
177
|
+
export { Versions as Versions, type BetaDeletedSkillVersion as BetaDeletedSkillVersion, type BetaSkillVersion as BetaSkillVersion, type BetaSkillVersionsPageCursor as BetaSkillVersionsPageCursor, type VersionCreateParams as VersionCreateParams, type VersionRetrieveParams as VersionRetrieveParams, type VersionListParams as VersionListParams, type VersionDeleteParams as VersionDeleteParams, type VersionDownloadParams as VersionDownloadParams, };
|
|
250
178
|
}
|
|
251
179
|
//# sourceMappingURL=skills.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/skills/skills.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,OAAO,oBAAgB;AACnC,OAAO,KAAK,WAAW,uBAAmB;AAC1C,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"skills.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/skills/skills.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,OAAO,oBAAgB;AACnC,OAAO,KAAK,WAAW,uBAAmB;AAC1C,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,QAAQ,EACT,uBAAmB;AACpB,OAAO,EAAE,UAAU,EAAE,sCAAkC;AACvD,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,qCAAiC;AAC1F,OAAO,EAAE,KAAK,UAAU,EAAE,kCAA8B;AAExD,OAAO,EAAE,cAAc,EAAE,8CAA0C;AAInE,qBAAa,MAAO,SAAQ,WAAW;IACrC,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAA0C;IAExE;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAmBlF;;;;;;;;;OASG;IACH,QAAQ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@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.js";
|
|
2
2
|
import * as BetaAPI from "../beta.js";
|
|
3
3
|
import * as VersionsAPI from "./versions.js";
|
|
4
|
-
import {
|
|
4
|
+
import { BetaDeletedSkillVersion, BetaSkillVersion, BetaSkillVersionsPageCursor, VersionCreateParams, VersionDeleteParams, VersionDownloadParams, VersionListParams, VersionRetrieveParams, Versions } from "./versions.js";
|
|
5
5
|
import { APIPromise } from "../../../core/api-promise.js";
|
|
6
6
|
import { PageCursor, type PageCursorParams, PagePromise } from "../../../core/pagination.js";
|
|
7
7
|
import { type Uploadable } from "../../../core/uploads.js";
|
|
@@ -13,45 +13,49 @@ export declare class Skills extends APIResource {
|
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
15
|
* ```ts
|
|
16
|
-
* const
|
|
16
|
+
* const betaSkill = await client.beta.skills.create({
|
|
17
17
|
* files: [fs.createReadStream('path/to/file')],
|
|
18
18
|
* });
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
create(params: SkillCreateParams, options?: RequestOptions): APIPromise<
|
|
21
|
+
create(params: SkillCreateParams, options?: RequestOptions): APIPromise<BetaSkill>;
|
|
22
22
|
/**
|
|
23
23
|
* Get Skill
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
26
|
* ```ts
|
|
27
|
-
* const
|
|
27
|
+
* const betaSkill = await client.beta.skills.retrieve(
|
|
28
|
+
* 'skill_id',
|
|
29
|
+
* );
|
|
28
30
|
* ```
|
|
29
31
|
*/
|
|
30
|
-
retrieve(skillID: string, params?: SkillRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<
|
|
32
|
+
retrieve(skillID: string, params?: SkillRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<BetaSkill>;
|
|
31
33
|
/**
|
|
32
34
|
* List Skills
|
|
33
35
|
*
|
|
34
36
|
* @example
|
|
35
37
|
* ```ts
|
|
36
38
|
* // Automatically fetches more pages as needed.
|
|
37
|
-
* for await (const
|
|
39
|
+
* for await (const betaSkill of client.beta.skills.list()) {
|
|
38
40
|
* // ...
|
|
39
41
|
* }
|
|
40
42
|
* ```
|
|
41
43
|
*/
|
|
42
|
-
list(params?: SkillListParams | null | undefined, options?: RequestOptions): PagePromise<
|
|
44
|
+
list(params?: SkillListParams | null | undefined, options?: RequestOptions): PagePromise<BetaSkillsPageCursor, BetaSkill>;
|
|
43
45
|
/**
|
|
44
46
|
* Delete Skill
|
|
45
47
|
*
|
|
46
48
|
* @example
|
|
47
49
|
* ```ts
|
|
48
|
-
* const
|
|
50
|
+
* const betaDeletedSkill = await client.beta.skills.delete(
|
|
51
|
+
* 'skill_id',
|
|
52
|
+
* );
|
|
49
53
|
* ```
|
|
50
54
|
*/
|
|
51
|
-
delete(skillID: string, params?: SkillDeleteParams | null | undefined, options?: RequestOptions): APIPromise<
|
|
55
|
+
delete(skillID: string, params?: SkillDeleteParams | null | undefined, options?: RequestOptions): APIPromise<BetaDeletedSkill>;
|
|
52
56
|
}
|
|
53
|
-
export type
|
|
54
|
-
export interface
|
|
57
|
+
export type BetaSkillsPageCursor = PageCursor<BetaSkill>;
|
|
58
|
+
export interface BetaDeletedSkill {
|
|
55
59
|
/**
|
|
56
60
|
* Unique identifier for the skill.
|
|
57
61
|
*
|
|
@@ -59,87 +63,13 @@ export interface SkillCreateResponse {
|
|
|
59
63
|
*/
|
|
60
64
|
id: string;
|
|
61
65
|
/**
|
|
62
|
-
*
|
|
63
|
-
*/
|
|
64
|
-
created_at: string;
|
|
65
|
-
/**
|
|
66
|
-
* Display title for the skill.
|
|
67
|
-
*
|
|
68
|
-
* This is a human-readable label that is not included in the prompt sent to the
|
|
69
|
-
* model.
|
|
70
|
-
*/
|
|
71
|
-
display_title: string | null;
|
|
72
|
-
/**
|
|
73
|
-
* The latest version identifier for the skill.
|
|
74
|
-
*
|
|
75
|
-
* This represents the most recent version of the skill that has been created.
|
|
76
|
-
*/
|
|
77
|
-
latest_version: string | null;
|
|
78
|
-
/**
|
|
79
|
-
* Source of the skill.
|
|
80
|
-
*
|
|
81
|
-
* This may be one of the following values:
|
|
82
|
-
*
|
|
83
|
-
* - `"custom"`: the skill was created by a user
|
|
84
|
-
* - `"anthropic"`: the skill was created by Anthropic
|
|
85
|
-
*/
|
|
86
|
-
source: string;
|
|
87
|
-
/**
|
|
88
|
-
* Object type.
|
|
89
|
-
*
|
|
90
|
-
* For Skills, this is always `"skill"`.
|
|
91
|
-
*/
|
|
92
|
-
type: string;
|
|
93
|
-
/**
|
|
94
|
-
* ISO 8601 timestamp of when the skill was last updated.
|
|
95
|
-
*/
|
|
96
|
-
updated_at: string;
|
|
97
|
-
}
|
|
98
|
-
export interface SkillRetrieveResponse {
|
|
99
|
-
/**
|
|
100
|
-
* Unique identifier for the skill.
|
|
101
|
-
*
|
|
102
|
-
* The format and length of IDs may change over time.
|
|
103
|
-
*/
|
|
104
|
-
id: string;
|
|
105
|
-
/**
|
|
106
|
-
* ISO 8601 timestamp of when the skill was created.
|
|
107
|
-
*/
|
|
108
|
-
created_at: string;
|
|
109
|
-
/**
|
|
110
|
-
* Display title for the skill.
|
|
111
|
-
*
|
|
112
|
-
* This is a human-readable label that is not included in the prompt sent to the
|
|
113
|
-
* model.
|
|
114
|
-
*/
|
|
115
|
-
display_title: string | null;
|
|
116
|
-
/**
|
|
117
|
-
* The latest version identifier for the skill.
|
|
118
|
-
*
|
|
119
|
-
* This represents the most recent version of the skill that has been created.
|
|
120
|
-
*/
|
|
121
|
-
latest_version: string | null;
|
|
122
|
-
/**
|
|
123
|
-
* Source of the skill.
|
|
124
|
-
*
|
|
125
|
-
* This may be one of the following values:
|
|
126
|
-
*
|
|
127
|
-
* - `"custom"`: the skill was created by a user
|
|
128
|
-
* - `"anthropic"`: the skill was created by Anthropic
|
|
129
|
-
*/
|
|
130
|
-
source: string;
|
|
131
|
-
/**
|
|
132
|
-
* Object type.
|
|
66
|
+
* Deleted object type.
|
|
133
67
|
*
|
|
134
|
-
* For Skills, this is always `"
|
|
135
|
-
*/
|
|
136
|
-
type: string;
|
|
137
|
-
/**
|
|
138
|
-
* ISO 8601 timestamp of when the skill was last updated.
|
|
68
|
+
* For Skills, this is always `"skill_deleted"`.
|
|
139
69
|
*/
|
|
140
|
-
|
|
70
|
+
type: 'skill_deleted';
|
|
141
71
|
}
|
|
142
|
-
export interface
|
|
72
|
+
export interface BetaSkill {
|
|
143
73
|
/**
|
|
144
74
|
* Unique identifier for the skill.
|
|
145
75
|
*
|
|
@@ -151,51 +81,50 @@ export interface SkillListResponse {
|
|
|
151
81
|
*/
|
|
152
82
|
created_at: string;
|
|
153
83
|
/**
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
* model.
|
|
84
|
+
* Human-readable, single-line label for the Skill. Maximum 255 characters. Always
|
|
85
|
+
* set: derived from the SKILL.md frontmatter `name` when omitted at creation. Not
|
|
86
|
+
* unique.
|
|
158
87
|
*/
|
|
159
|
-
|
|
88
|
+
display_name: string;
|
|
160
89
|
/**
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
* This represents the most recent version of the skill that has been created.
|
|
90
|
+
* ID of the newest Skill Version — what `latest` references resolve to. Always
|
|
91
|
+
* set: a Skill holds at least one version.
|
|
164
92
|
*/
|
|
165
|
-
|
|
93
|
+
latest_version_id: string;
|
|
166
94
|
/**
|
|
167
|
-
*
|
|
95
|
+
* Where the Skill comes from.
|
|
168
96
|
*
|
|
169
|
-
*
|
|
97
|
+
* Possible values:
|
|
170
98
|
*
|
|
171
|
-
* - `"custom"`: the
|
|
172
|
-
* - `"anthropic"`:
|
|
99
|
+
* - `"custom"`: authored by the platform user; private to their workspace
|
|
100
|
+
* - `"anthropic"`: published by Anthropic; shared and read-only
|
|
101
|
+
* - `"anthropic_example"`: Anthropic-published sample Skill
|
|
102
|
+
* - `"plugin"`: resolved from an installed plugin
|
|
173
103
|
*/
|
|
174
|
-
source:
|
|
104
|
+
source: BetaSkillSource;
|
|
175
105
|
/**
|
|
176
106
|
* Object type.
|
|
177
107
|
*
|
|
178
108
|
* For Skills, this is always `"skill"`.
|
|
179
109
|
*/
|
|
180
|
-
type:
|
|
110
|
+
type: 'skill';
|
|
181
111
|
/**
|
|
182
112
|
* ISO 8601 timestamp of when the skill was last updated.
|
|
183
113
|
*/
|
|
184
114
|
updated_at: string;
|
|
185
115
|
}
|
|
186
|
-
export interface
|
|
116
|
+
export interface BetaSkillSource {
|
|
187
117
|
/**
|
|
188
|
-
*
|
|
118
|
+
* Where the Skill comes from.
|
|
189
119
|
*
|
|
190
|
-
*
|
|
191
|
-
*/
|
|
192
|
-
id: string;
|
|
193
|
-
/**
|
|
194
|
-
* Deleted object type.
|
|
120
|
+
* Possible values:
|
|
195
121
|
*
|
|
196
|
-
*
|
|
122
|
+
* - `"custom"`: authored by the platform user; private to their workspace
|
|
123
|
+
* - `"anthropic"`: published by Anthropic; shared and read-only
|
|
124
|
+
* - `"anthropic_example"`: Anthropic-published sample Skill
|
|
125
|
+
* - `"plugin"`: resolved from an installed plugin
|
|
197
126
|
*/
|
|
198
|
-
type:
|
|
127
|
+
type: 'custom' | 'anthropic' | 'anthropic_example' | 'plugin';
|
|
199
128
|
}
|
|
200
129
|
export interface SkillCreateParams {
|
|
201
130
|
/**
|
|
@@ -206,12 +135,11 @@ export interface SkillCreateParams {
|
|
|
206
135
|
*/
|
|
207
136
|
files: Array<Uploadable>;
|
|
208
137
|
/**
|
|
209
|
-
* Body param:
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
* model.
|
|
138
|
+
* Body param: Human-readable, single-line label for the Skill. Maximum 255
|
|
139
|
+
* characters. Always set: derived from the SKILL.md frontmatter `name` when
|
|
140
|
+
* omitted at creation. Not unique.
|
|
213
141
|
*/
|
|
214
|
-
|
|
142
|
+
display_name?: string | null;
|
|
215
143
|
/**
|
|
216
144
|
* Header param: Optional header to specify the beta version(s) you want to use.
|
|
217
145
|
*/
|
|
@@ -245,7 +173,7 @@ export interface SkillDeleteParams {
|
|
|
245
173
|
betas?: Array<BetaAPI.AnthropicBeta>;
|
|
246
174
|
}
|
|
247
175
|
export declare namespace Skills {
|
|
248
|
-
export { type
|
|
249
|
-
export { Versions as Versions, type
|
|
176
|
+
export { type BetaDeletedSkill as BetaDeletedSkill, type BetaSkill as BetaSkill, type BetaSkillSource as BetaSkillSource, type BetaSkillsPageCursor as BetaSkillsPageCursor, type SkillCreateParams as SkillCreateParams, type SkillRetrieveParams as SkillRetrieveParams, type SkillListParams as SkillListParams, type SkillDeleteParams as SkillDeleteParams, };
|
|
177
|
+
export { Versions as Versions, type BetaDeletedSkillVersion as BetaDeletedSkillVersion, type BetaSkillVersion as BetaSkillVersion, type BetaSkillVersionsPageCursor as BetaSkillVersionsPageCursor, type VersionCreateParams as VersionCreateParams, type VersionRetrieveParams as VersionRetrieveParams, type VersionListParams as VersionListParams, type VersionDeleteParams as VersionDeleteParams, type VersionDownloadParams as VersionDownloadParams, };
|
|
250
178
|
}
|
|
251
179
|
//# sourceMappingURL=skills.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/skills/skills.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,KAAK,OAAO,mBAAgB;AACnC,OAAO,KAAK,WAAW,sBAAmB;AAC1C,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/skills/skills.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,KAAK,OAAO,mBAAgB;AACnC,OAAO,KAAK,WAAW,sBAAmB;AAC1C,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,QAAQ,EACT,sBAAmB;AACpB,OAAO,EAAE,UAA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K,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;IAEF,OAAO,EACL,QAAQ,IAAI,QAAQ,EACpB,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -20,7 +20,7 @@ class Skills extends resource_1.APIResource {
|
|
|
20
20
|
*
|
|
21
21
|
* @example
|
|
22
22
|
* ```ts
|
|
23
|
-
* const
|
|
23
|
+
* const betaSkill = await client.beta.skills.create({
|
|
24
24
|
* files: [fs.createReadStream('path/to/file')],
|
|
25
25
|
* });
|
|
26
26
|
* ```
|
|
@@ -31,7 +31,7 @@ class Skills extends resource_1.APIResource {
|
|
|
31
31
|
body,
|
|
32
32
|
...options,
|
|
33
33
|
headers: (0, headers_1.buildHeaders)([
|
|
34
|
-
{
|
|
34
|
+
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
35
35
|
options?.headers,
|
|
36
36
|
]),
|
|
37
37
|
}, this._client, false));
|
|
@@ -41,7 +41,9 @@ class Skills extends resource_1.APIResource {
|
|
|
41
41
|
*
|
|
42
42
|
* @example
|
|
43
43
|
* ```ts
|
|
44
|
-
* const
|
|
44
|
+
* const betaSkill = await client.beta.skills.retrieve(
|
|
45
|
+
* 'skill_id',
|
|
46
|
+
* );
|
|
45
47
|
* ```
|
|
46
48
|
*/
|
|
47
49
|
retrieve(skillID, params = {}, options) {
|
|
@@ -49,7 +51,7 @@ class Skills extends resource_1.APIResource {
|
|
|
49
51
|
return this._client.get((0, path_1.path) `/v1/skills/${skillID}?beta=true`, {
|
|
50
52
|
...options,
|
|
51
53
|
headers: (0, headers_1.buildHeaders)([
|
|
52
|
-
{
|
|
54
|
+
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
53
55
|
options?.headers,
|
|
54
56
|
]),
|
|
55
57
|
});
|
|
@@ -60,7 +62,7 @@ class Skills extends resource_1.APIResource {
|
|
|
60
62
|
* @example
|
|
61
63
|
* ```ts
|
|
62
64
|
* // Automatically fetches more pages as needed.
|
|
63
|
-
* for await (const
|
|
65
|
+
* for await (const betaSkill of client.beta.skills.list()) {
|
|
64
66
|
* // ...
|
|
65
67
|
* }
|
|
66
68
|
* ```
|
|
@@ -71,7 +73,7 @@ class Skills extends resource_1.APIResource {
|
|
|
71
73
|
query,
|
|
72
74
|
...options,
|
|
73
75
|
headers: (0, headers_1.buildHeaders)([
|
|
74
|
-
{
|
|
76
|
+
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
75
77
|
options?.headers,
|
|
76
78
|
]),
|
|
77
79
|
});
|
|
@@ -81,7 +83,9 @@ class Skills extends resource_1.APIResource {
|
|
|
81
83
|
*
|
|
82
84
|
* @example
|
|
83
85
|
* ```ts
|
|
84
|
-
* const
|
|
86
|
+
* const betaDeletedSkill = await client.beta.skills.delete(
|
|
87
|
+
* 'skill_id',
|
|
88
|
+
* );
|
|
85
89
|
* ```
|
|
86
90
|
*/
|
|
87
91
|
delete(skillID, params = {}, options) {
|
|
@@ -89,7 +93,7 @@ class Skills extends resource_1.APIResource {
|
|
|
89
93
|
return this._client.delete((0, path_1.path) `/v1/skills/${skillID}?beta=true`, {
|
|
90
94
|
...options,
|
|
91
95
|
headers: (0, headers_1.buildHeaders)([
|
|
92
|
-
{
|
|
96
|
+
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
93
97
|
options?.headers,
|
|
94
98
|
]),
|
|
95
99
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../../src/resources/beta/skills/skills.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AAErD,mEAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../../src/resources/beta/skills/skills.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AAErD,mEAA0C;AAC1C,4CAUoB;AAEpB,4DAA0F;AAE1F,0DAAyD;AAEzD,0DAAwE;AACxE,0DAAoD;AAEpD,MAAa,MAAO,SAAQ,sBAAW;IAAvC;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA0G1E,CAAC;IAxGC;;;;;;;;;OASG;IACH,MAAM,CAAC,MAAyB,EAAE,OAAwB;QACxD,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,sBAAsB,EACtB,IAAA,qCAA2B,EACzB;YACE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,EACD,IAAI,CAAC,OAAO,EACZ,KAAK,CACN,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CACN,OAAe,EACf,SAAiD,EAAE,EACnD,OAAwB;QAExB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,cAAc,OAAO,YAAY,EAAE;YAC7D,GAAG,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