@anthropic-ai/sdk 0.117.1 → 0.119.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 +36 -0
- package/client.d.mts +8 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -2
- package/client.d.ts.map +1 -1
- package/client.js +7 -1
- package/client.js.map +1 -1
- package/client.mjs +7 -1
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts +1 -0
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts +1 -0
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.js +7 -2
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs +8 -3
- package/core/api-promise.mjs.map +1 -1
- package/core/error.d.mts +1 -0
- package/core/error.d.mts.map +1 -1
- package/core/error.d.ts +1 -0
- package/core/error.d.ts.map +1 -1
- package/core/error.js +1 -0
- package/core/error.js.map +1 -1
- package/core/error.mjs +1 -0
- package/core/error.mjs.map +1 -1
- package/core/middleware.js +1 -1
- package/core/middleware.js.map +1 -1
- package/core/middleware.mjs +2 -2
- package/core/middleware.mjs.map +1 -1
- package/helpers/beta/zod.d.mts.map +1 -1
- package/helpers/beta/zod.d.ts.map +1 -1
- package/helpers/beta/zod.js +1 -2
- package/helpers/beta/zod.js.map +1 -1
- package/helpers/beta/zod.mjs +1 -2
- package/helpers/beta/zod.mjs.map +1 -1
- package/helpers/zod.d.mts.map +1 -1
- package/helpers/zod.d.ts.map +1 -1
- package/helpers/zod.js +1 -2
- package/helpers/zod.js.map +1 -1
- package/helpers/zod.mjs +1 -2
- package/helpers/zod.mjs.map +1 -1
- package/internal/parse.d.mts +2 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts +2 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +6 -6
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -5
- package/internal/parse.mjs.map +1 -1
- package/lib/BetaMessageStream.d.mts +2 -0
- package/lib/BetaMessageStream.d.mts.map +1 -1
- package/lib/BetaMessageStream.d.ts +2 -0
- package/lib/BetaMessageStream.d.ts.map +1 -1
- package/lib/BetaMessageStream.js +8 -2
- package/lib/BetaMessageStream.js.map +1 -1
- package/lib/BetaMessageStream.mjs +8 -2
- package/lib/BetaMessageStream.mjs.map +1 -1
- package/lib/MessageStream.d.mts +2 -0
- package/lib/MessageStream.d.mts.map +1 -1
- package/lib/MessageStream.d.ts +2 -0
- package/lib/MessageStream.d.ts.map +1 -1
- package/lib/MessageStream.js +8 -2
- package/lib/MessageStream.js.map +1 -1
- package/lib/MessageStream.mjs +8 -2
- package/lib/MessageStream.mjs.map +1 -1
- package/lib/environments/worker.d.mts +10 -6
- package/lib/environments/worker.d.mts.map +1 -1
- package/lib/environments/worker.d.ts +10 -6
- package/lib/environments/worker.d.ts.map +1 -1
- package/lib/environments/worker.js +22 -15
- package/lib/environments/worker.js.map +1 -1
- package/lib/environments/worker.mjs +22 -15
- package/lib/environments/worker.mjs.map +1 -1
- package/lib/tools/BetaRunnableTool.d.mts +21 -40
- package/lib/tools/BetaRunnableTool.d.mts.map +1 -1
- package/lib/tools/BetaRunnableTool.d.ts +21 -40
- package/lib/tools/BetaRunnableTool.d.ts.map +1 -1
- package/lib/tools/BetaRunnableTool.js +7 -16
- package/lib/tools/BetaRunnableTool.js.map +1 -1
- package/lib/tools/BetaRunnableTool.mjs +7 -16
- package/lib/tools/BetaRunnableTool.mjs.map +1 -1
- package/lib/tools/BetaToolRunner.d.mts.map +1 -1
- package/lib/tools/BetaToolRunner.d.ts.map +1 -1
- package/lib/tools/BetaToolRunner.js +3 -13
- package/lib/tools/BetaToolRunner.js.map +1 -1
- package/lib/tools/BetaToolRunner.mjs +3 -13
- package/lib/tools/BetaToolRunner.mjs.map +1 -1
- package/lib/tools/SessionToolRunner.d.mts +6 -0
- package/lib/tools/SessionToolRunner.d.mts.map +1 -1
- package/lib/tools/SessionToolRunner.d.ts +6 -0
- package/lib/tools/SessionToolRunner.d.ts.map +1 -1
- package/lib/tools/SessionToolRunner.js +37 -8
- package/lib/tools/SessionToolRunner.js.map +1 -1
- package/lib/tools/SessionToolRunner.mjs +38 -9
- package/lib/tools/SessionToolRunner.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/beta/agents/agents.d.mts +3 -3
- package/resources/beta/agents/agents.d.ts +3 -3
- package/resources/beta/agents/agents.js +1 -1
- package/resources/beta/agents/agents.mjs +1 -1
- package/resources/beta/beta.d.mts +5 -5
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +5 -5
- 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/dreams.d.mts +2 -2
- package/resources/beta/dreams.d.ts +2 -2
- package/resources/beta/environments/environments.d.mts +4 -3
- package/resources/beta/environments/environments.d.mts.map +1 -1
- package/resources/beta/environments/environments.d.ts +4 -3
- package/resources/beta/environments/environments.d.ts.map +1 -1
- package/resources/beta/environments/environments.js.map +1 -1
- package/resources/beta/environments/environments.mjs.map +1 -1
- package/resources/beta/files.d.mts +22 -22
- package/resources/beta/files.d.mts.map +1 -1
- package/resources/beta/files.d.ts +22 -22
- package/resources/beta/files.d.ts.map +1 -1
- package/resources/beta/files.js +4 -4
- package/resources/beta/files.js.map +1 -1
- package/resources/beta/files.mjs +4 -4
- package/resources/beta/files.mjs.map +1 -1
- package/resources/beta/index.d.mts +2 -2
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +2 -2
- 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/index.d.mts +1 -1
- package/resources/beta/memory-stores/index.d.mts.map +1 -1
- package/resources/beta/memory-stores/index.d.ts +1 -1
- package/resources/beta/memory-stores/index.d.ts.map +1 -1
- package/resources/beta/memory-stores/index.js.map +1 -1
- package/resources/beta/memory-stores/index.mjs.map +1 -1
- package/resources/beta/memory-stores/memory-stores.d.mts +2 -2
- package/resources/beta/memory-stores/memory-stores.d.mts.map +1 -1
- package/resources/beta/memory-stores/memory-stores.d.ts +2 -2
- package/resources/beta/memory-stores/memory-stores.d.ts.map +1 -1
- package/resources/beta/memory-stores/memory-stores.js.map +1 -1
- package/resources/beta/memory-stores/memory-stores.mjs.map +1 -1
- package/resources/beta/memory-stores/memory-versions.d.mts +17 -2
- package/resources/beta/memory-stores/memory-versions.d.mts.map +1 -1
- package/resources/beta/memory-stores/memory-versions.d.ts +17 -2
- package/resources/beta/memory-stores/memory-versions.d.ts.map +1 -1
- package/resources/beta/messages/batches.d.mts +1 -1
- package/resources/beta/messages/batches.d.ts +1 -1
- package/resources/beta/messages/batches.js +1 -1
- package/resources/beta/messages/batches.mjs +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 +1204 -25
- package/resources/beta/messages/messages.d.mts.map +1 -1
- package/resources/beta/messages/messages.d.ts +1204 -25
- package/resources/beta/messages/messages.d.ts.map +1 -1
- package/resources/beta/messages/messages.js +1 -1
- package/resources/beta/messages/messages.js.map +1 -1
- package/resources/beta/messages/messages.mjs +1 -1
- package/resources/beta/messages/messages.mjs.map +1 -1
- package/resources/beta/sessions/sessions.d.mts +1 -1
- package/resources/beta/sessions/sessions.d.ts +1 -1
- package/resources/beta/user-profiles.d.mts +35 -9
- package/resources/beta/user-profiles.d.mts.map +1 -1
- package/resources/beta/user-profiles.d.ts +35 -9
- package/resources/beta/user-profiles.d.ts.map +1 -1
- package/resources/beta/user-profiles.js +5 -5
- package/resources/beta/user-profiles.mjs +5 -5
- package/resources/files.d.mts +105 -0
- package/resources/files.d.mts.map +1 -0
- package/resources/files.d.ts +105 -0
- package/resources/files.d.ts.map +1 -0
- package/resources/files.js +52 -0
- package/resources/files.js.map +1 -0
- package/resources/files.mjs +48 -0
- package/resources/files.mjs.map +1 -0
- package/resources/index.d.mts +3 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/messages/batches.d.mts +1 -1
- package/resources/messages/batches.d.ts +1 -1
- package/resources/messages/batches.js +1 -1
- package/resources/messages/batches.mjs +1 -1
- package/resources/messages/index.d.mts +1 -1
- package/resources/messages/index.d.mts.map +1 -1
- package/resources/messages/index.d.ts +1 -1
- package/resources/messages/index.d.ts.map +1 -1
- package/resources/messages/index.js.map +1 -1
- package/resources/messages/index.mjs.map +1 -1
- package/resources/messages/messages.d.mts +1270 -28
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +1270 -28
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js +1 -1
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs +1 -1
- package/resources/messages/messages.mjs.map +1 -1
- package/resources/skills/index.d.mts +3 -0
- package/resources/skills/index.d.mts.map +1 -0
- package/resources/skills/index.d.ts +3 -0
- package/resources/skills/index.d.ts.map +1 -0
- package/resources/skills/index.js +9 -0
- package/resources/skills/index.js.map +1 -0
- package/resources/skills/index.mjs +4 -0
- package/resources/skills/index.mjs.map +1 -0
- package/resources/skills/skills.d.mts +129 -0
- package/resources/skills/skills.d.mts.map +1 -0
- package/resources/skills/skills.d.ts +129 -0
- package/resources/skills/skills.d.ts.map +1 -0
- package/resources/skills/skills.js +44 -0
- package/resources/skills/skills.js.map +1 -0
- package/resources/skills/skills.mjs +39 -0
- package/resources/skills/skills.mjs.map +1 -0
- package/resources/skills/versions.d.mts +104 -0
- package/resources/skills/versions.d.mts.map +1 -0
- package/resources/skills/versions.d.ts +104 -0
- package/resources/skills/versions.d.ts.map +1 -0
- package/resources/skills/versions.js +41 -0
- package/resources/skills/versions.js.map +1 -0
- package/resources/skills/versions.mjs +37 -0
- package/resources/skills/versions.mjs.map +1 -0
- package/resources/skills.d.mts +2 -0
- package/resources/skills.d.mts.map +1 -0
- package/resources/skills.d.ts +2 -0
- package/resources/skills.d.ts.map +1 -0
- package/resources/skills.js +6 -0
- package/resources/skills.js.map +1 -0
- package/resources/skills.mjs +3 -0
- package/resources/skills.mjs.map +1 -0
- package/src/client.ts +173 -3
- package/src/core/api-promise.ts +14 -4
- package/src/core/error.ts +2 -0
- package/src/core/middleware.ts +2 -2
- package/src/helpers/beta/zod.ts +1 -3
- package/src/helpers/zod.ts +1 -3
- package/src/internal/parse.ts +6 -6
- package/src/lib/BetaMessageStream.ts +8 -0
- package/src/lib/MessageStream.ts +8 -0
- package/src/lib/environments/worker.ts +28 -14
- package/src/lib/tools/BetaRunnableTool.ts +26 -43
- package/src/lib/tools/BetaToolRunner.ts +6 -13
- package/src/lib/tools/SessionToolRunner.ts +39 -6
- package/src/resources/beta/agents/agents.ts +3 -3
- package/src/resources/beta/beta.ts +127 -8
- package/src/resources/beta/dreams.ts +2 -2
- package/src/resources/beta/environments/environments.ts +4 -3
- package/src/resources/beta/files.ts +27 -27
- package/src/resources/beta/index.ts +63 -4
- package/src/resources/beta/memory-stores/index.ts +1 -0
- package/src/resources/beta/memory-stores/memory-stores.ts +2 -0
- package/src/resources/beta/memory-stores/memory-versions.ts +21 -1
- package/src/resources/beta/messages/batches.ts +1 -1
- package/src/resources/beta/messages/index.ts +60 -1
- package/src/resources/beta/messages/messages.ts +1862 -435
- package/src/resources/beta/sessions/sessions.ts +1 -1
- package/src/resources/beta/user-profiles.ts +44 -15
- package/src/resources/files.ts +163 -0
- package/src/resources/index.ts +83 -1
- package/src/resources/messages/batches.ts +1 -1
- package/src/resources/messages/index.ts +66 -1
- package/src/resources/messages/messages.ts +1830 -320
- package/src/resources/skills/index.ts +21 -0
- package/src/resources/skills/skills.ts +194 -0
- package/src/resources/skills/versions.ts +160 -0
- package/src/resources/skills.ts +3 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Skills,
|
|
5
|
+
type DeletedSkill,
|
|
6
|
+
type Skill,
|
|
7
|
+
type SkillSource,
|
|
8
|
+
type SkillCreateParams,
|
|
9
|
+
type SkillListParams,
|
|
10
|
+
type SkillsPageCursor,
|
|
11
|
+
} from './skills';
|
|
12
|
+
export {
|
|
13
|
+
Versions,
|
|
14
|
+
type DeletedSkillVersion,
|
|
15
|
+
type SkillVersion,
|
|
16
|
+
type VersionCreateParams,
|
|
17
|
+
type VersionRetrieveParams,
|
|
18
|
+
type VersionListParams,
|
|
19
|
+
type VersionDeleteParams,
|
|
20
|
+
type SkillVersionsPageCursor,
|
|
21
|
+
} from './versions';
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as VersionsAPI from './versions';
|
|
5
|
+
import {
|
|
6
|
+
DeletedSkillVersion,
|
|
7
|
+
SkillVersion,
|
|
8
|
+
SkillVersionsPageCursor,
|
|
9
|
+
VersionCreateParams,
|
|
10
|
+
VersionDeleteParams,
|
|
11
|
+
VersionListParams,
|
|
12
|
+
VersionRetrieveParams,
|
|
13
|
+
Versions,
|
|
14
|
+
} from './versions';
|
|
15
|
+
import { APIPromise } from '../../core/api-promise';
|
|
16
|
+
import { PageCursor, type PageCursorParams, PagePromise } from '../../core/pagination';
|
|
17
|
+
import { type Uploadable } from '../../core/uploads';
|
|
18
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
19
|
+
import { multipartFormRequestOptions } from '../../internal/uploads';
|
|
20
|
+
import { path } from '../../internal/utils/path';
|
|
21
|
+
|
|
22
|
+
export class Skills extends APIResource {
|
|
23
|
+
versions: VersionsAPI.Versions = new VersionsAPI.Versions(this._client);
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Create Skill
|
|
27
|
+
*/
|
|
28
|
+
create(body: SkillCreateParams, options?: RequestOptions): APIPromise<Skill> {
|
|
29
|
+
return this._client.post(
|
|
30
|
+
'/v1/skills',
|
|
31
|
+
multipartFormRequestOptions({ body, ...options }, this._client, false),
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Get Skill
|
|
37
|
+
*/
|
|
38
|
+
retrieve(skillID: string, options?: RequestOptions): APIPromise<Skill> {
|
|
39
|
+
return this._client.get(path`/v1/skills/${skillID}`, options);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* List Skills
|
|
44
|
+
*/
|
|
45
|
+
list(
|
|
46
|
+
query: SkillListParams | null | undefined = {},
|
|
47
|
+
options?: RequestOptions,
|
|
48
|
+
): PagePromise<SkillsPageCursor, Skill> {
|
|
49
|
+
return this._client.getAPIList('/v1/skills', PageCursor<Skill>, { query, ...options });
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Delete Skill
|
|
54
|
+
*/
|
|
55
|
+
delete(skillID: string, options?: RequestOptions): APIPromise<DeletedSkill> {
|
|
56
|
+
return this._client.delete(path`/v1/skills/${skillID}`, options);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type SkillsPageCursor = PageCursor<Skill>;
|
|
61
|
+
|
|
62
|
+
export interface DeletedSkill {
|
|
63
|
+
/**
|
|
64
|
+
* Unique identifier for the skill.
|
|
65
|
+
*
|
|
66
|
+
* The format and length of IDs may change over time.
|
|
67
|
+
*/
|
|
68
|
+
id: string;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Deleted object type.
|
|
72
|
+
*
|
|
73
|
+
* For Skills, this is always `"skill_deleted"`.
|
|
74
|
+
*/
|
|
75
|
+
type: 'skill_deleted';
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface Skill {
|
|
79
|
+
/**
|
|
80
|
+
* Unique identifier for the skill.
|
|
81
|
+
*
|
|
82
|
+
* The format and length of IDs may change over time.
|
|
83
|
+
*/
|
|
84
|
+
id: string;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* ISO 8601 timestamp of when the skill was created.
|
|
88
|
+
*/
|
|
89
|
+
created_at: string;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Human-readable, single-line label for the Skill. Maximum 255 characters. Always
|
|
93
|
+
* set: derived from the SKILL.md frontmatter `name` when omitted at creation. Not
|
|
94
|
+
* unique.
|
|
95
|
+
*/
|
|
96
|
+
display_name: string;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* ID of the newest Skill Version — what `latest` references resolve to. Always
|
|
100
|
+
* set: a Skill holds at least one version.
|
|
101
|
+
*/
|
|
102
|
+
latest_version_id: string;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Where the Skill comes from.
|
|
106
|
+
*
|
|
107
|
+
* Possible values:
|
|
108
|
+
*
|
|
109
|
+
* - `"custom"`: authored by the platform user; private to their workspace
|
|
110
|
+
* - `"anthropic"`: published by Anthropic; shared and read-only
|
|
111
|
+
* - `"anthropic_example"`: Anthropic-published sample Skill
|
|
112
|
+
* - `"plugin"`: resolved from an installed plugin
|
|
113
|
+
*/
|
|
114
|
+
source: SkillSource;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Object type.
|
|
118
|
+
*
|
|
119
|
+
* For Skills, this is always `"skill"`.
|
|
120
|
+
*/
|
|
121
|
+
type: 'skill';
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* ISO 8601 timestamp of when the skill was last updated.
|
|
125
|
+
*/
|
|
126
|
+
updated_at: string;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface SkillSource {
|
|
130
|
+
/**
|
|
131
|
+
* Where the Skill comes from.
|
|
132
|
+
*
|
|
133
|
+
* Possible values:
|
|
134
|
+
*
|
|
135
|
+
* - `"custom"`: authored by the platform user; private to their workspace
|
|
136
|
+
* - `"anthropic"`: published by Anthropic; shared and read-only
|
|
137
|
+
* - `"anthropic_example"`: Anthropic-published sample Skill
|
|
138
|
+
* - `"plugin"`: resolved from an installed plugin
|
|
139
|
+
*/
|
|
140
|
+
type: 'custom' | 'anthropic' | 'anthropic_example' | 'plugin';
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export interface SkillCreateParams {
|
|
144
|
+
/**
|
|
145
|
+
* Files to upload for the skill.
|
|
146
|
+
*
|
|
147
|
+
* All files must be in the same top-level directory and must include a SKILL.md
|
|
148
|
+
* file at the root of that directory.
|
|
149
|
+
*/
|
|
150
|
+
files: Array<Uploadable>;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Human-readable, single-line label for the Skill. Maximum 255 characters. Always
|
|
154
|
+
* set: derived from the SKILL.md frontmatter `name` when omitted at creation. Not
|
|
155
|
+
* unique.
|
|
156
|
+
*/
|
|
157
|
+
display_name?: string | null;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface SkillListParams extends PageCursorParams {
|
|
161
|
+
/**
|
|
162
|
+
* Filter skills by source.
|
|
163
|
+
*
|
|
164
|
+
* If provided, only skills from the specified source will be returned:
|
|
165
|
+
*
|
|
166
|
+
* - `"custom"`: only return user-created skills
|
|
167
|
+
* - `"anthropic"`: only return Anthropic-created skills
|
|
168
|
+
*/
|
|
169
|
+
source?: string | null;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
Skills.Versions = Versions;
|
|
173
|
+
|
|
174
|
+
export declare namespace Skills {
|
|
175
|
+
export {
|
|
176
|
+
type DeletedSkill as DeletedSkill,
|
|
177
|
+
type Skill as Skill,
|
|
178
|
+
type SkillSource as SkillSource,
|
|
179
|
+
type SkillsPageCursor as SkillsPageCursor,
|
|
180
|
+
type SkillCreateParams as SkillCreateParams,
|
|
181
|
+
type SkillListParams as SkillListParams,
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
export {
|
|
185
|
+
Versions as Versions,
|
|
186
|
+
type DeletedSkillVersion as DeletedSkillVersion,
|
|
187
|
+
type SkillVersion as SkillVersion,
|
|
188
|
+
type SkillVersionsPageCursor as SkillVersionsPageCursor,
|
|
189
|
+
type VersionCreateParams as VersionCreateParams,
|
|
190
|
+
type VersionRetrieveParams as VersionRetrieveParams,
|
|
191
|
+
type VersionListParams as VersionListParams,
|
|
192
|
+
type VersionDeleteParams as VersionDeleteParams,
|
|
193
|
+
};
|
|
194
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { PageCursor, type PageCursorParams, PagePromise } from '../../core/pagination';
|
|
6
|
+
import { type Uploadable } from '../../core/uploads';
|
|
7
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
8
|
+
import { multipartFormRequestOptions } from '../../internal/uploads';
|
|
9
|
+
import { path } from '../../internal/utils/path';
|
|
10
|
+
|
|
11
|
+
export class Versions extends APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* Create Skill Version
|
|
14
|
+
*/
|
|
15
|
+
create(skillID: string, body: VersionCreateParams, options?: RequestOptions): APIPromise<SkillVersion> {
|
|
16
|
+
return this._client.post(
|
|
17
|
+
path`/v1/skills/${skillID}/versions`,
|
|
18
|
+
multipartFormRequestOptions({ body, ...options }, this._client, false),
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Get Skill Version
|
|
24
|
+
*/
|
|
25
|
+
retrieve(
|
|
26
|
+
version: string,
|
|
27
|
+
params: VersionRetrieveParams,
|
|
28
|
+
options?: RequestOptions,
|
|
29
|
+
): APIPromise<SkillVersion> {
|
|
30
|
+
const { skill_id } = params;
|
|
31
|
+
return this._client.get(path`/v1/skills/${skill_id}/versions/${version}`, options);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* List Skill Versions
|
|
36
|
+
*/
|
|
37
|
+
list(
|
|
38
|
+
skillID: string,
|
|
39
|
+
query: VersionListParams | null | undefined = {},
|
|
40
|
+
options?: RequestOptions,
|
|
41
|
+
): PagePromise<SkillVersionsPageCursor, SkillVersion> {
|
|
42
|
+
return this._client.getAPIList(path`/v1/skills/${skillID}/versions`, PageCursor<SkillVersion>, {
|
|
43
|
+
query,
|
|
44
|
+
...options,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Delete Skill Version
|
|
50
|
+
*/
|
|
51
|
+
delete(
|
|
52
|
+
version: string,
|
|
53
|
+
params: VersionDeleteParams,
|
|
54
|
+
options?: RequestOptions,
|
|
55
|
+
): APIPromise<DeletedSkillVersion> {
|
|
56
|
+
const { skill_id } = params;
|
|
57
|
+
return this._client.delete(path`/v1/skills/${skill_id}/versions/${version}`, options);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export type SkillVersionsPageCursor = PageCursor<SkillVersion>;
|
|
62
|
+
|
|
63
|
+
export interface DeletedSkillVersion {
|
|
64
|
+
/**
|
|
65
|
+
* Unique identifier for this Skill Version. The id addresses the version in paths
|
|
66
|
+
* and pins it in references.
|
|
67
|
+
*/
|
|
68
|
+
id: string;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Deleted object type.
|
|
72
|
+
*
|
|
73
|
+
* For Skill Versions, this is always `"skill_version_deleted"`.
|
|
74
|
+
*/
|
|
75
|
+
type: 'skill_version_deleted';
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface SkillVersion {
|
|
79
|
+
/**
|
|
80
|
+
* Unique identifier for this Skill Version. The id addresses the version in paths
|
|
81
|
+
* and pins it in references.
|
|
82
|
+
*/
|
|
83
|
+
id: string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* ISO 8601 timestamp of when the skill was created.
|
|
87
|
+
*/
|
|
88
|
+
created_at: string;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Description of the skill version.
|
|
92
|
+
*
|
|
93
|
+
* This is extracted from the SKILL.md file in the skill upload.
|
|
94
|
+
*/
|
|
95
|
+
description: string;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The Skill's immutable kebab-case slug, set at creation from the first upload's
|
|
99
|
+
* SKILL.md frontmatter `name` (or its enclosing directory). Every later upload
|
|
100
|
+
* must resolve to the same value. Also the top-level directory of the Skill's
|
|
101
|
+
* mounted files and the base name of a downloaded archive.
|
|
102
|
+
*/
|
|
103
|
+
name: string;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Unique identifier for the skill.
|
|
107
|
+
*
|
|
108
|
+
* The format and length of IDs may change over time.
|
|
109
|
+
*/
|
|
110
|
+
skill_id: string;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Object type.
|
|
114
|
+
*
|
|
115
|
+
* For Skill Versions, this is always `"skill_version"`.
|
|
116
|
+
*/
|
|
117
|
+
type: 'skill_version';
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface VersionCreateParams {
|
|
121
|
+
/**
|
|
122
|
+
* Files to upload for the skill.
|
|
123
|
+
*
|
|
124
|
+
* All files must be in the same top-level directory and must include a SKILL.md
|
|
125
|
+
* file at the root of that directory.
|
|
126
|
+
*/
|
|
127
|
+
files: Array<Uploadable>;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface VersionRetrieveParams {
|
|
131
|
+
/**
|
|
132
|
+
* Unique identifier for the skill.
|
|
133
|
+
*
|
|
134
|
+
* The format and length of IDs may change over time.
|
|
135
|
+
*/
|
|
136
|
+
skill_id: string;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface VersionListParams extends PageCursorParams {}
|
|
140
|
+
|
|
141
|
+
export interface VersionDeleteParams {
|
|
142
|
+
/**
|
|
143
|
+
* Unique identifier for the skill.
|
|
144
|
+
*
|
|
145
|
+
* The format and length of IDs may change over time.
|
|
146
|
+
*/
|
|
147
|
+
skill_id: string;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export declare namespace Versions {
|
|
151
|
+
export {
|
|
152
|
+
type DeletedSkillVersion as DeletedSkillVersion,
|
|
153
|
+
type SkillVersion as SkillVersion,
|
|
154
|
+
type SkillVersionsPageCursor as SkillVersionsPageCursor,
|
|
155
|
+
type VersionCreateParams as VersionCreateParams,
|
|
156
|
+
type VersionRetrieveParams as VersionRetrieveParams,
|
|
157
|
+
type VersionListParams as VersionListParams,
|
|
158
|
+
type VersionDeleteParams as VersionDeleteParams,
|
|
159
|
+
};
|
|
160
|
+
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.119.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.119.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.119.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.119.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|