@rymi/node 2.7.0 → 2.7.2
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/dist/index.d.mts +50 -5
- package/dist/index.d.ts +50 -5
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -51,7 +51,7 @@ interface CreateAgentParams {
|
|
|
51
51
|
advanced?: any;
|
|
52
52
|
features?: any;
|
|
53
53
|
post_call?: any;
|
|
54
|
-
llm_provider?: 'gemini' | 'openai' | 'anthropic' | 'sarvam';
|
|
54
|
+
llm_provider?: 'gemini' | 'openai' | 'anthropic' | 'sarvam' | 'groq' | 'xai' | 'ultravox';
|
|
55
55
|
llm_model?: string;
|
|
56
56
|
llm_fallback_provider?: string | null;
|
|
57
57
|
llm_fallback_model?: string | null;
|
|
@@ -85,7 +85,7 @@ interface UpdateAgentParams {
|
|
|
85
85
|
advanced?: any;
|
|
86
86
|
features?: any;
|
|
87
87
|
post_call?: any;
|
|
88
|
-
llm_provider?: 'gemini' | 'openai' | 'anthropic' | 'sarvam';
|
|
88
|
+
llm_provider?: 'gemini' | 'openai' | 'anthropic' | 'sarvam' | 'groq' | 'xai' | 'ultravox';
|
|
89
89
|
llm_model?: string;
|
|
90
90
|
llm_fallback_provider?: string | null;
|
|
91
91
|
llm_fallback_model?: string | null;
|
|
@@ -147,6 +147,9 @@ interface PublishAgentResponse {
|
|
|
147
147
|
/** Present when published — the frozen snapshot id and timestamp. */
|
|
148
148
|
snapshot_id?: string | null;
|
|
149
149
|
published_at?: string | null;
|
|
150
|
+
version_id?: string | null;
|
|
151
|
+
version?: number | null;
|
|
152
|
+
environment?: 'production' | 'staging';
|
|
150
153
|
/** Present when published: false because of unresolved blockers. */
|
|
151
154
|
reason?: string;
|
|
152
155
|
blockers?: PublishValidationIssue[];
|
|
@@ -240,6 +243,24 @@ interface AgentChange {
|
|
|
240
243
|
undone_at?: string | null;
|
|
241
244
|
[key: string]: any;
|
|
242
245
|
}
|
|
246
|
+
interface AgentTaskCallReturnField {
|
|
247
|
+
name: string;
|
|
248
|
+
description: string;
|
|
249
|
+
type?: 'string' | 'number' | 'boolean';
|
|
250
|
+
}
|
|
251
|
+
interface AgentTaskCallParams {
|
|
252
|
+
to: string;
|
|
253
|
+
on_behalf_of: string;
|
|
254
|
+
instructions: string;
|
|
255
|
+
return_fields: AgentTaskCallReturnField[];
|
|
256
|
+
opening_line?: string;
|
|
257
|
+
from_number?: string;
|
|
258
|
+
}
|
|
259
|
+
interface AgentTaskCallResponse {
|
|
260
|
+
call_id: string;
|
|
261
|
+
agent_id: string;
|
|
262
|
+
status: string;
|
|
263
|
+
}
|
|
243
264
|
declare class AgentsResource {
|
|
244
265
|
private client;
|
|
245
266
|
constructor(client: RymiClient);
|
|
@@ -254,6 +275,10 @@ declare class AgentsResource {
|
|
|
254
275
|
* Retrieve a single AI Agent by its unique ID.
|
|
255
276
|
*/
|
|
256
277
|
retrieve(agentId: string): Promise<Agent>;
|
|
278
|
+
/**
|
|
279
|
+
* Place a one-shot task call through an opted-in agent.
|
|
280
|
+
*/
|
|
281
|
+
placeTaskCall(agentId: string, body: AgentTaskCallParams): Promise<AgentTaskCallResponse>;
|
|
257
282
|
/**
|
|
258
283
|
* Create a new AI Agent with a complete system prompt and voice settings.
|
|
259
284
|
*/
|
|
@@ -308,7 +333,27 @@ declare class AgentsResource {
|
|
|
308
333
|
* Returns `{ published: false, blockers }` (HTTP 200) when blockers remain —
|
|
309
334
|
* inspect `blockers` rather than relying on a thrown error.
|
|
310
335
|
*/
|
|
311
|
-
publish(agentId: string
|
|
336
|
+
publish(agentId: string, body?: {
|
|
337
|
+
environment?: 'production' | 'staging';
|
|
338
|
+
label?: string | null;
|
|
339
|
+
}): Promise<PublishAgentResponse>;
|
|
340
|
+
listVersions(agentId: string): Promise<{
|
|
341
|
+
versions: Array<{
|
|
342
|
+
id: string;
|
|
343
|
+
version: number;
|
|
344
|
+
label: string | null;
|
|
345
|
+
content_hash: string;
|
|
346
|
+
created_at: string;
|
|
347
|
+
environments: Array<'production' | 'staging'>;
|
|
348
|
+
}>;
|
|
349
|
+
production_version_id: string | null;
|
|
350
|
+
staging_version_id: string | null;
|
|
351
|
+
}>;
|
|
352
|
+
pointEnvironment(agentId: string, environment: 'production' | 'staging', versionId: string): Promise<{
|
|
353
|
+
environment: 'production' | 'staging';
|
|
354
|
+
version_id: string;
|
|
355
|
+
version: number;
|
|
356
|
+
}>;
|
|
312
357
|
/**
|
|
313
358
|
* Validate and apply a flat-diff change-set against the AgentConfig field registry.
|
|
314
359
|
* Does NOT persist — callers must follow up with update().
|
|
@@ -561,7 +606,7 @@ declare class CallsResource {
|
|
|
561
606
|
id: string;
|
|
562
607
|
message: string;
|
|
563
608
|
}>;
|
|
564
|
-
/** Add one or more participants to
|
|
609
|
+
/** Add one or more participants to a live call. */
|
|
565
610
|
addParticipants(callId: string, data: {
|
|
566
611
|
participants: CreateCallParams['participants'];
|
|
567
612
|
}): Promise<CreateCallResponse>;
|
|
@@ -1647,4 +1692,4 @@ declare class Rymi {
|
|
|
1647
1692
|
withWorkspace(workspace: string): Rymi;
|
|
1648
1693
|
}
|
|
1649
1694
|
|
|
1650
|
-
export { type Account, type AccountMember, type AccountRole, type AccountWorkspace, AccountsResource, type AddCampaignMembersParams, type AddKnowledgeSourceParams, type AgentCallListResponse, type AgentChange, type AgentKnowledgeSource, type AgentListResponse, type AgentShareLink, type AgentShareLinkSettings, type AgentTemplateSummary, AgentsResource, type ApplyChangesParams, type ApplyChangesResponse, type AttestParams, type AttestResponse, type Attestation, type BatchCallParams, BillingResource, type CallListResponse, type CallRecord, type CallingRules, CallsResource, type CampaignAttemptListResponse, type CampaignBatch, type CampaignBatchListResponse, type CampaignFollowupJob, type CampaignFollowupListResponse, type CampaignIntake, type CampaignIntakeSettings, type CampaignListResponse, type CampaignMemberListResponse, type CampaignReportResponse, type CampaignRoute, type CampaignRouteListResponse, type CampaignSuggestion, type CampaignSuggestionListResponse, CampaignsResource, type ChangeEntry, type ClientOptions, ComplianceResource, type ComplianceSettings, type ConnectTelephonyParams, type ContactListResponse, ContactsResource, type CreateAgentParams, type CreateCallParams, type CreateCallResponse, type CreateCampaignParams, type CreateCampaignRouteParams, type CreateContactParams, type CreateContactResponse, type CreatePublishableKeyParams, type CreateSecretKeyParams, type CreateWorkspaceParams, type CreatedSecretKey, type DncCheckResult, type DncEntry, type DncListResponse, DncResource, type EnrichCompanyParams, type EnrichCompanyResponse, type FanoutCallParams, type ImportCampaignMembersParams, type ImportCampaignMembersResponse, type ImportContactsParams, type ImportContactsResponse, type ImproveCampaignResponse, type KeySelf, KeysResource, type LaunchBlocker, type LaunchCampaignResponse, type ListAttestationsResponse, type ListCallsParams, type ListCampaignAttemptsParams, type ListCampaignBatchesParams, type ListCampaignFollowupsParams, type ListCampaignMembersParams, type ListCampaignRoutesParams, type ListCampaignSuggestionsParams, type ListCampaignsParams, type ListContactsParams, type NumberRecord, NumbersResource, type PreviewStackParams, type PublishAgentResponse, type PublishValidationIssue, type PublishableKeyRecord, Rymi, RymiClient, RymiError, type SecretKeyKind, type SetConsentParams, type SetConsentResponse, type TelephonyProvider, TelephonyResource, TemplatesResource, type ToolSecretRecord, ToolSecretsResource, type UpdateAgentParams, type UpdateCampaignMemberParams, type UpdateCampaignParams, type UpdateCampaignRouteParams, type UpdateContactParams, type UpdateWorkspaceParams, type UsageSummary, type ValidatePublishParams, type WebhookProvisionResult, type WebhookRecord, WebhooksResource, type Workspace, type WorkspaceMember, type WorkspaceUsage, WorkspacesResource, Rymi as default };
|
|
1695
|
+
export { type Account, type AccountMember, type AccountRole, type AccountWorkspace, AccountsResource, type AddCampaignMembersParams, type AddKnowledgeSourceParams, type AgentCallListResponse, type AgentChange, type AgentKnowledgeSource, type AgentListResponse, type AgentShareLink, type AgentShareLinkSettings, type AgentTaskCallParams, type AgentTaskCallResponse, type AgentTaskCallReturnField, type AgentTemplateSummary, AgentsResource, type ApplyChangesParams, type ApplyChangesResponse, type AttestParams, type AttestResponse, type Attestation, type BatchCallParams, BillingResource, type CallListResponse, type CallRecord, type CallingRules, CallsResource, type CampaignAttemptListResponse, type CampaignBatch, type CampaignBatchListResponse, type CampaignFollowupJob, type CampaignFollowupListResponse, type CampaignIntake, type CampaignIntakeSettings, type CampaignListResponse, type CampaignMemberListResponse, type CampaignReportResponse, type CampaignRoute, type CampaignRouteListResponse, type CampaignSuggestion, type CampaignSuggestionListResponse, CampaignsResource, type ChangeEntry, type ClientOptions, ComplianceResource, type ComplianceSettings, type ConnectTelephonyParams, type ContactListResponse, ContactsResource, type CreateAgentParams, type CreateCallParams, type CreateCallResponse, type CreateCampaignParams, type CreateCampaignRouteParams, type CreateContactParams, type CreateContactResponse, type CreatePublishableKeyParams, type CreateSecretKeyParams, type CreateWorkspaceParams, type CreatedSecretKey, type DncCheckResult, type DncEntry, type DncListResponse, DncResource, type EnrichCompanyParams, type EnrichCompanyResponse, type FanoutCallParams, type ImportCampaignMembersParams, type ImportCampaignMembersResponse, type ImportContactsParams, type ImportContactsResponse, type ImproveCampaignResponse, type KeySelf, KeysResource, type LaunchBlocker, type LaunchCampaignResponse, type ListAttestationsResponse, type ListCallsParams, type ListCampaignAttemptsParams, type ListCampaignBatchesParams, type ListCampaignFollowupsParams, type ListCampaignMembersParams, type ListCampaignRoutesParams, type ListCampaignSuggestionsParams, type ListCampaignsParams, type ListContactsParams, type NumberRecord, NumbersResource, type PreviewStackParams, type PublishAgentResponse, type PublishValidationIssue, type PublishableKeyRecord, Rymi, RymiClient, RymiError, type SecretKeyKind, type SetConsentParams, type SetConsentResponse, type TelephonyProvider, TelephonyResource, TemplatesResource, type ToolSecretRecord, ToolSecretsResource, type UpdateAgentParams, type UpdateCampaignMemberParams, type UpdateCampaignParams, type UpdateCampaignRouteParams, type UpdateContactParams, type UpdateWorkspaceParams, type UsageSummary, type ValidatePublishParams, type WebhookProvisionResult, type WebhookRecord, WebhooksResource, type Workspace, type WorkspaceMember, type WorkspaceUsage, WorkspacesResource, Rymi as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ interface CreateAgentParams {
|
|
|
51
51
|
advanced?: any;
|
|
52
52
|
features?: any;
|
|
53
53
|
post_call?: any;
|
|
54
|
-
llm_provider?: 'gemini' | 'openai' | 'anthropic' | 'sarvam';
|
|
54
|
+
llm_provider?: 'gemini' | 'openai' | 'anthropic' | 'sarvam' | 'groq' | 'xai' | 'ultravox';
|
|
55
55
|
llm_model?: string;
|
|
56
56
|
llm_fallback_provider?: string | null;
|
|
57
57
|
llm_fallback_model?: string | null;
|
|
@@ -85,7 +85,7 @@ interface UpdateAgentParams {
|
|
|
85
85
|
advanced?: any;
|
|
86
86
|
features?: any;
|
|
87
87
|
post_call?: any;
|
|
88
|
-
llm_provider?: 'gemini' | 'openai' | 'anthropic' | 'sarvam';
|
|
88
|
+
llm_provider?: 'gemini' | 'openai' | 'anthropic' | 'sarvam' | 'groq' | 'xai' | 'ultravox';
|
|
89
89
|
llm_model?: string;
|
|
90
90
|
llm_fallback_provider?: string | null;
|
|
91
91
|
llm_fallback_model?: string | null;
|
|
@@ -147,6 +147,9 @@ interface PublishAgentResponse {
|
|
|
147
147
|
/** Present when published — the frozen snapshot id and timestamp. */
|
|
148
148
|
snapshot_id?: string | null;
|
|
149
149
|
published_at?: string | null;
|
|
150
|
+
version_id?: string | null;
|
|
151
|
+
version?: number | null;
|
|
152
|
+
environment?: 'production' | 'staging';
|
|
150
153
|
/** Present when published: false because of unresolved blockers. */
|
|
151
154
|
reason?: string;
|
|
152
155
|
blockers?: PublishValidationIssue[];
|
|
@@ -240,6 +243,24 @@ interface AgentChange {
|
|
|
240
243
|
undone_at?: string | null;
|
|
241
244
|
[key: string]: any;
|
|
242
245
|
}
|
|
246
|
+
interface AgentTaskCallReturnField {
|
|
247
|
+
name: string;
|
|
248
|
+
description: string;
|
|
249
|
+
type?: 'string' | 'number' | 'boolean';
|
|
250
|
+
}
|
|
251
|
+
interface AgentTaskCallParams {
|
|
252
|
+
to: string;
|
|
253
|
+
on_behalf_of: string;
|
|
254
|
+
instructions: string;
|
|
255
|
+
return_fields: AgentTaskCallReturnField[];
|
|
256
|
+
opening_line?: string;
|
|
257
|
+
from_number?: string;
|
|
258
|
+
}
|
|
259
|
+
interface AgentTaskCallResponse {
|
|
260
|
+
call_id: string;
|
|
261
|
+
agent_id: string;
|
|
262
|
+
status: string;
|
|
263
|
+
}
|
|
243
264
|
declare class AgentsResource {
|
|
244
265
|
private client;
|
|
245
266
|
constructor(client: RymiClient);
|
|
@@ -254,6 +275,10 @@ declare class AgentsResource {
|
|
|
254
275
|
* Retrieve a single AI Agent by its unique ID.
|
|
255
276
|
*/
|
|
256
277
|
retrieve(agentId: string): Promise<Agent>;
|
|
278
|
+
/**
|
|
279
|
+
* Place a one-shot task call through an opted-in agent.
|
|
280
|
+
*/
|
|
281
|
+
placeTaskCall(agentId: string, body: AgentTaskCallParams): Promise<AgentTaskCallResponse>;
|
|
257
282
|
/**
|
|
258
283
|
* Create a new AI Agent with a complete system prompt and voice settings.
|
|
259
284
|
*/
|
|
@@ -308,7 +333,27 @@ declare class AgentsResource {
|
|
|
308
333
|
* Returns `{ published: false, blockers }` (HTTP 200) when blockers remain —
|
|
309
334
|
* inspect `blockers` rather than relying on a thrown error.
|
|
310
335
|
*/
|
|
311
|
-
publish(agentId: string
|
|
336
|
+
publish(agentId: string, body?: {
|
|
337
|
+
environment?: 'production' | 'staging';
|
|
338
|
+
label?: string | null;
|
|
339
|
+
}): Promise<PublishAgentResponse>;
|
|
340
|
+
listVersions(agentId: string): Promise<{
|
|
341
|
+
versions: Array<{
|
|
342
|
+
id: string;
|
|
343
|
+
version: number;
|
|
344
|
+
label: string | null;
|
|
345
|
+
content_hash: string;
|
|
346
|
+
created_at: string;
|
|
347
|
+
environments: Array<'production' | 'staging'>;
|
|
348
|
+
}>;
|
|
349
|
+
production_version_id: string | null;
|
|
350
|
+
staging_version_id: string | null;
|
|
351
|
+
}>;
|
|
352
|
+
pointEnvironment(agentId: string, environment: 'production' | 'staging', versionId: string): Promise<{
|
|
353
|
+
environment: 'production' | 'staging';
|
|
354
|
+
version_id: string;
|
|
355
|
+
version: number;
|
|
356
|
+
}>;
|
|
312
357
|
/**
|
|
313
358
|
* Validate and apply a flat-diff change-set against the AgentConfig field registry.
|
|
314
359
|
* Does NOT persist — callers must follow up with update().
|
|
@@ -561,7 +606,7 @@ declare class CallsResource {
|
|
|
561
606
|
id: string;
|
|
562
607
|
message: string;
|
|
563
608
|
}>;
|
|
564
|
-
/** Add one or more participants to
|
|
609
|
+
/** Add one or more participants to a live call. */
|
|
565
610
|
addParticipants(callId: string, data: {
|
|
566
611
|
participants: CreateCallParams['participants'];
|
|
567
612
|
}): Promise<CreateCallResponse>;
|
|
@@ -1647,4 +1692,4 @@ declare class Rymi {
|
|
|
1647
1692
|
withWorkspace(workspace: string): Rymi;
|
|
1648
1693
|
}
|
|
1649
1694
|
|
|
1650
|
-
export { type Account, type AccountMember, type AccountRole, type AccountWorkspace, AccountsResource, type AddCampaignMembersParams, type AddKnowledgeSourceParams, type AgentCallListResponse, type AgentChange, type AgentKnowledgeSource, type AgentListResponse, type AgentShareLink, type AgentShareLinkSettings, type AgentTemplateSummary, AgentsResource, type ApplyChangesParams, type ApplyChangesResponse, type AttestParams, type AttestResponse, type Attestation, type BatchCallParams, BillingResource, type CallListResponse, type CallRecord, type CallingRules, CallsResource, type CampaignAttemptListResponse, type CampaignBatch, type CampaignBatchListResponse, type CampaignFollowupJob, type CampaignFollowupListResponse, type CampaignIntake, type CampaignIntakeSettings, type CampaignListResponse, type CampaignMemberListResponse, type CampaignReportResponse, type CampaignRoute, type CampaignRouteListResponse, type CampaignSuggestion, type CampaignSuggestionListResponse, CampaignsResource, type ChangeEntry, type ClientOptions, ComplianceResource, type ComplianceSettings, type ConnectTelephonyParams, type ContactListResponse, ContactsResource, type CreateAgentParams, type CreateCallParams, type CreateCallResponse, type CreateCampaignParams, type CreateCampaignRouteParams, type CreateContactParams, type CreateContactResponse, type CreatePublishableKeyParams, type CreateSecretKeyParams, type CreateWorkspaceParams, type CreatedSecretKey, type DncCheckResult, type DncEntry, type DncListResponse, DncResource, type EnrichCompanyParams, type EnrichCompanyResponse, type FanoutCallParams, type ImportCampaignMembersParams, type ImportCampaignMembersResponse, type ImportContactsParams, type ImportContactsResponse, type ImproveCampaignResponse, type KeySelf, KeysResource, type LaunchBlocker, type LaunchCampaignResponse, type ListAttestationsResponse, type ListCallsParams, type ListCampaignAttemptsParams, type ListCampaignBatchesParams, type ListCampaignFollowupsParams, type ListCampaignMembersParams, type ListCampaignRoutesParams, type ListCampaignSuggestionsParams, type ListCampaignsParams, type ListContactsParams, type NumberRecord, NumbersResource, type PreviewStackParams, type PublishAgentResponse, type PublishValidationIssue, type PublishableKeyRecord, Rymi, RymiClient, RymiError, type SecretKeyKind, type SetConsentParams, type SetConsentResponse, type TelephonyProvider, TelephonyResource, TemplatesResource, type ToolSecretRecord, ToolSecretsResource, type UpdateAgentParams, type UpdateCampaignMemberParams, type UpdateCampaignParams, type UpdateCampaignRouteParams, type UpdateContactParams, type UpdateWorkspaceParams, type UsageSummary, type ValidatePublishParams, type WebhookProvisionResult, type WebhookRecord, WebhooksResource, type Workspace, type WorkspaceMember, type WorkspaceUsage, WorkspacesResource, Rymi as default };
|
|
1695
|
+
export { type Account, type AccountMember, type AccountRole, type AccountWorkspace, AccountsResource, type AddCampaignMembersParams, type AddKnowledgeSourceParams, type AgentCallListResponse, type AgentChange, type AgentKnowledgeSource, type AgentListResponse, type AgentShareLink, type AgentShareLinkSettings, type AgentTaskCallParams, type AgentTaskCallResponse, type AgentTaskCallReturnField, type AgentTemplateSummary, AgentsResource, type ApplyChangesParams, type ApplyChangesResponse, type AttestParams, type AttestResponse, type Attestation, type BatchCallParams, BillingResource, type CallListResponse, type CallRecord, type CallingRules, CallsResource, type CampaignAttemptListResponse, type CampaignBatch, type CampaignBatchListResponse, type CampaignFollowupJob, type CampaignFollowupListResponse, type CampaignIntake, type CampaignIntakeSettings, type CampaignListResponse, type CampaignMemberListResponse, type CampaignReportResponse, type CampaignRoute, type CampaignRouteListResponse, type CampaignSuggestion, type CampaignSuggestionListResponse, CampaignsResource, type ChangeEntry, type ClientOptions, ComplianceResource, type ComplianceSettings, type ConnectTelephonyParams, type ContactListResponse, ContactsResource, type CreateAgentParams, type CreateCallParams, type CreateCallResponse, type CreateCampaignParams, type CreateCampaignRouteParams, type CreateContactParams, type CreateContactResponse, type CreatePublishableKeyParams, type CreateSecretKeyParams, type CreateWorkspaceParams, type CreatedSecretKey, type DncCheckResult, type DncEntry, type DncListResponse, DncResource, type EnrichCompanyParams, type EnrichCompanyResponse, type FanoutCallParams, type ImportCampaignMembersParams, type ImportCampaignMembersResponse, type ImportContactsParams, type ImportContactsResponse, type ImproveCampaignResponse, type KeySelf, KeysResource, type LaunchBlocker, type LaunchCampaignResponse, type ListAttestationsResponse, type ListCallsParams, type ListCampaignAttemptsParams, type ListCampaignBatchesParams, type ListCampaignFollowupsParams, type ListCampaignMembersParams, type ListCampaignRoutesParams, type ListCampaignSuggestionsParams, type ListCampaignsParams, type ListContactsParams, type NumberRecord, NumbersResource, type PreviewStackParams, type PublishAgentResponse, type PublishValidationIssue, type PublishableKeyRecord, Rymi, RymiClient, RymiError, type SecretKeyKind, type SetConsentParams, type SetConsentResponse, type TelephonyProvider, TelephonyResource, TemplatesResource, type ToolSecretRecord, ToolSecretsResource, type UpdateAgentParams, type UpdateCampaignMemberParams, type UpdateCampaignParams, type UpdateCampaignRouteParams, type UpdateContactParams, type UpdateWorkspaceParams, type UsageSummary, type ValidatePublishParams, type WebhookProvisionResult, type WebhookRecord, WebhooksResource, type Workspace, type WorkspaceMember, type WorkspaceUsage, WorkspacesResource, Rymi as default };
|
package/dist/index.js
CHANGED
|
@@ -159,6 +159,12 @@ var AgentsResource = class {
|
|
|
159
159
|
async retrieve(agentId) {
|
|
160
160
|
return this.client.get(`/agents/${agentId}`);
|
|
161
161
|
}
|
|
162
|
+
/**
|
|
163
|
+
* Place a one-shot task call through an opted-in agent.
|
|
164
|
+
*/
|
|
165
|
+
async placeTaskCall(agentId, body) {
|
|
166
|
+
return this.client.post(`/agents/${agentId}/task-calls`, body);
|
|
167
|
+
}
|
|
162
168
|
/**
|
|
163
169
|
* Create a new AI Agent with a complete system prompt and voice settings.
|
|
164
170
|
*/
|
|
@@ -213,8 +219,14 @@ var AgentsResource = class {
|
|
|
213
219
|
* Returns `{ published: false, blockers }` (HTTP 200) when blockers remain —
|
|
214
220
|
* inspect `blockers` rather than relying on a thrown error.
|
|
215
221
|
*/
|
|
216
|
-
async publish(agentId) {
|
|
217
|
-
return this.client.post(`/agents/${agentId}/publish`,
|
|
222
|
+
async publish(agentId, body = {}) {
|
|
223
|
+
return this.client.post(`/agents/${agentId}/publish`, body);
|
|
224
|
+
}
|
|
225
|
+
async listVersions(agentId) {
|
|
226
|
+
return this.client.get(`/agents/${agentId}/versions`);
|
|
227
|
+
}
|
|
228
|
+
async pointEnvironment(agentId, environment, versionId) {
|
|
229
|
+
return this.client.post(`/agents/${agentId}/environments/${environment}`, { version_id: versionId });
|
|
218
230
|
}
|
|
219
231
|
/**
|
|
220
232
|
* Validate and apply a flat-diff change-set against the AgentConfig field registry.
|
|
@@ -394,7 +406,7 @@ var CallsResource = class {
|
|
|
394
406
|
async end(callId) {
|
|
395
407
|
return this.client.post(`/calls/${callId}/end`);
|
|
396
408
|
}
|
|
397
|
-
/** Add one or more participants to
|
|
409
|
+
/** Add one or more participants to a live call. */
|
|
398
410
|
async addParticipants(callId, data) {
|
|
399
411
|
return this.client.post(`/calls/${callId}/participants`, data);
|
|
400
412
|
}
|