import { WorkspaceScopedResource, extractData } from './base.js';
/**
 * Manage skills — reusable AI capabilities that agents can call.
 * Skills define structured input/output schemas and execution settings.
 */
export class SkillsResource extends WorkspaceScopedResource {
    /** Create a new skill */
    async create(body) {
        return extractData(await this.client.POST('/v1/{workspace_id}/skills', {
            params: { path: { workspace_id: this.workspaceId } },
            body,
        }));
    }
    /** List skills in the workspace */
    async list(params) {
        return extractData(await this.client.GET('/v1/{workspace_id}/skills', {
            params: { path: { workspace_id: this.workspaceId }, query: params },
        }));
    }
    listAutoPaging(params) {
        return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
    }
    /** Get a single skill */
    async get(skillId) {
        return extractData(await this.client.GET('/v1/{workspace_id}/skills/{skill_id}', {
            params: { path: { workspace_id: this.workspaceId, skill_id: skillId } },
        }));
    }
    /** Update a skill */
    async update(skillId, body) {
        return extractData(await this.client.PUT('/v1/{workspace_id}/skills/{skill_id}', {
            params: { path: { workspace_id: this.workspaceId, skill_id: skillId } },
            body,
        }));
    }
    /** Delete a skill */
    async delete(skillId) {
        await this.client.DELETE('/v1/{workspace_id}/skills/{skill_id}', {
            params: { path: { workspace_id: this.workspaceId, skill_id: skillId } },
        });
    }
    /**
     * Test a skill with a sample input.
     * Executes the skill in a sandbox and returns the result.
     */
    async test(skillId, body) {
        return extractData(await this.client.POST('/v1/{workspace_id}/skills/{skill_id}/test', {
            params: { path: { workspace_id: this.workspaceId, skill_id: skillId } },
            body,
        }));
    }
}
//# sourceMappingURL=skills.js.map