import { WorkspaceScopedResource, extractData } from './base.js';
export class PersonasResource extends WorkspaceScopedResource {
    async list(params) {
        return extractData(await this.client.GET('/v1/{workspace_id}/personas', {
            params: { path: { workspace_id: this.workspaceId }, query: params },
        }));
    }
    listAutoPaging(params) {
        return this.iteratePaginatedList((pageParams) => this.list(pageParams), params);
    }
    async create(body) {
        return extractData(await this.client.POST('/v1/{workspace_id}/personas', {
            params: { path: { workspace_id: this.workspaceId } },
            body,
        }));
    }
    async get(personaId) {
        return extractData(await this.client.GET('/v1/{workspace_id}/personas/{persona_id}', {
            params: { path: { workspace_id: this.workspaceId, persona_id: personaId } },
        }));
    }
    async update(personaId, body) {
        return extractData(await this.client.PATCH('/v1/{workspace_id}/personas/{persona_id}', {
            params: { path: { workspace_id: this.workspaceId, persona_id: personaId } },
            body,
        }));
    }
    async delete(personaId) {
        await this.client.DELETE('/v1/{workspace_id}/personas/{persona_id}', {
            params: { path: { workspace_id: this.workspaceId, persona_id: personaId } },
        });
    }
}
//# sourceMappingURL=personas.js.map