@rymi/node 2.7.1 → 2.8.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/dist/index.d.mts +50 -2
- package/dist/index.d.ts +50 -2
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -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().
|
|
@@ -455,6 +500,9 @@ interface CreateCallParams {
|
|
|
455
500
|
metadata?: Record<string, any>;
|
|
456
501
|
variables?: Record<string, any>;
|
|
457
502
|
post_call?: Record<string, any>;
|
|
503
|
+
/** Test call (not for publishable keys): marks metadata.source as mcp_test and uses the shared test number when no from_number is set. */
|
|
504
|
+
test?: boolean;
|
|
505
|
+
use_test_pool?: boolean;
|
|
458
506
|
}
|
|
459
507
|
interface BatchCallParams {
|
|
460
508
|
agent_id: string;
|
|
@@ -1647,4 +1695,4 @@ declare class Rymi {
|
|
|
1647
1695
|
withWorkspace(workspace: string): Rymi;
|
|
1648
1696
|
}
|
|
1649
1697
|
|
|
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 };
|
|
1698
|
+
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
|
@@ -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().
|
|
@@ -455,6 +500,9 @@ interface CreateCallParams {
|
|
|
455
500
|
metadata?: Record<string, any>;
|
|
456
501
|
variables?: Record<string, any>;
|
|
457
502
|
post_call?: Record<string, any>;
|
|
503
|
+
/** Test call (not for publishable keys): marks metadata.source as mcp_test and uses the shared test number when no from_number is set. */
|
|
504
|
+
test?: boolean;
|
|
505
|
+
use_test_pool?: boolean;
|
|
458
506
|
}
|
|
459
507
|
interface BatchCallParams {
|
|
460
508
|
agent_id: string;
|
|
@@ -1647,4 +1695,4 @@ declare class Rymi {
|
|
|
1647
1695
|
withWorkspace(workspace: string): Rymi;
|
|
1648
1696
|
}
|
|
1649
1697
|
|
|
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 };
|
|
1698
|
+
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.
|