@rymi/node 2.0.0 → 2.1.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 +85 -2
- package/dist/index.d.ts +85 -2
- package/dist/index.js +41 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +40 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Agent, CampaignAttempt, Campaign, CampaignMember, CampaignReport, CampaignStatus, CampaignType, CampaignGoal, CampaignCompliancePolicy, Contact } from '@rymi/sdk-types';
|
|
1
|
+
import { Agent, AgentToolBinding, CampaignAttempt, Campaign, CampaignMember, CampaignReport, CampaignStatus, CampaignType, CampaignGoal, CampaignCompliancePolicy, Contact } from '@rymi/sdk-types';
|
|
2
2
|
export * from '@rymi/sdk-types';
|
|
3
3
|
|
|
4
4
|
interface ClientOptions {
|
|
@@ -66,6 +66,7 @@ interface CreateAgentParams {
|
|
|
66
66
|
/** All BCP-47 languages the agent should handle, e.g. ["hi-IN","en-US"] for a bilingual agent. */
|
|
67
67
|
supported_languages?: string[];
|
|
68
68
|
provider_config?: any;
|
|
69
|
+
tools?: AgentToolBinding[];
|
|
69
70
|
}
|
|
70
71
|
interface UpdateAgentParams {
|
|
71
72
|
name?: string;
|
|
@@ -100,6 +101,8 @@ interface UpdateAgentParams {
|
|
|
100
101
|
supported_languages?: string[];
|
|
101
102
|
chat_summary?: string | null;
|
|
102
103
|
provider_config?: any;
|
|
104
|
+
/** Replaces the whole bindings array — build it from a fresh retrieve(). */
|
|
105
|
+
tools?: AgentToolBinding[];
|
|
103
106
|
}
|
|
104
107
|
interface AgentListResponse {
|
|
105
108
|
agents: Agent[];
|
|
@@ -194,6 +197,33 @@ type AddKnowledgeSourceParams = {
|
|
|
194
197
|
title: string;
|
|
195
198
|
url: string;
|
|
196
199
|
};
|
|
200
|
+
/** A public share link: anyone with the URL can talk to the agent, billed to your workspace. */
|
|
201
|
+
interface AgentShareLink {
|
|
202
|
+
id: string;
|
|
203
|
+
url: string;
|
|
204
|
+
enabled: boolean;
|
|
205
|
+
minutes_limit: number;
|
|
206
|
+
minutes_used: number;
|
|
207
|
+
minutes_reserved: number;
|
|
208
|
+
minutes_remaining: number;
|
|
209
|
+
live_calls: number;
|
|
210
|
+
max_call_seconds: number;
|
|
211
|
+
max_concurrent: number;
|
|
212
|
+
calls_per_ip_hour: number;
|
|
213
|
+
minutes_requested_at: string | null;
|
|
214
|
+
}
|
|
215
|
+
/** All optional; omitted fields keep their current value (or the default on create). */
|
|
216
|
+
interface AgentShareLinkSettings {
|
|
217
|
+
enabled?: boolean;
|
|
218
|
+
/** Total talk-time pool for the link, 0–6000 minutes. */
|
|
219
|
+
minutes_limit?: number;
|
|
220
|
+
/** Per-call cap, 60–1800 seconds. */
|
|
221
|
+
max_call_seconds?: number;
|
|
222
|
+
/** Simultaneous calls, 1–10. */
|
|
223
|
+
max_concurrent?: number;
|
|
224
|
+
/** Calls per caller IP per hour, 1–30. */
|
|
225
|
+
calls_per_ip_hour?: number;
|
|
226
|
+
}
|
|
197
227
|
interface AgentChange {
|
|
198
228
|
change_id: string;
|
|
199
229
|
field_path?: string;
|
|
@@ -302,6 +332,26 @@ declare class AgentsResource {
|
|
|
302
332
|
* Delete a knowledge source from an agent.
|
|
303
333
|
*/
|
|
304
334
|
deleteKnowledgeSource(agentId: string, sourceId: string): Promise<Record<string, any>>;
|
|
335
|
+
/**
|
|
336
|
+
* Get the agent's public share link, or `link: null` if none exists.
|
|
337
|
+
* `link_feature: false` means share links are disabled on this deployment.
|
|
338
|
+
*/
|
|
339
|
+
getShareLink(agentId: string): Promise<{
|
|
340
|
+
link_feature: boolean;
|
|
341
|
+
link: AgentShareLink | null;
|
|
342
|
+
}>;
|
|
343
|
+
/**
|
|
344
|
+
* Create the agent's public share link, or update its settings if one exists.
|
|
345
|
+
*/
|
|
346
|
+
setShareLink(agentId: string, settings?: AgentShareLinkSettings): Promise<{
|
|
347
|
+
link: AgentShareLink;
|
|
348
|
+
}>;
|
|
349
|
+
/**
|
|
350
|
+
* Issue a new URL for the share link. The old URL stops working immediately.
|
|
351
|
+
*/
|
|
352
|
+
regenerateShareLink(agentId: string): Promise<{
|
|
353
|
+
link: AgentShareLink;
|
|
354
|
+
}>;
|
|
305
355
|
/**
|
|
306
356
|
* List the recorded configuration changes for an agent (most recent first).
|
|
307
357
|
* Optionally pass an ISO timestamp to only return changes since then.
|
|
@@ -1290,6 +1340,38 @@ declare class ComplianceResource {
|
|
|
1290
1340
|
listAttestations(): Promise<ListAttestationsResponse>;
|
|
1291
1341
|
}
|
|
1292
1342
|
|
|
1343
|
+
/** A stored API-tool secret. Values are write-only — never returned. */
|
|
1344
|
+
interface ToolSecretRecord {
|
|
1345
|
+
name: string;
|
|
1346
|
+
/** The only host this secret is ever sent to. */
|
|
1347
|
+
host: string | null;
|
|
1348
|
+
}
|
|
1349
|
+
/**
|
|
1350
|
+
* Tenant secrets referenced from call_webhook headers as `{{secrets.NAME}}`.
|
|
1351
|
+
* Each secret is pinned to one host and only interpolated into requests to it.
|
|
1352
|
+
*/
|
|
1353
|
+
declare class ToolSecretsResource {
|
|
1354
|
+
private client;
|
|
1355
|
+
constructor(client: RymiClient);
|
|
1356
|
+
list(): Promise<{
|
|
1357
|
+
data: ToolSecretRecord[];
|
|
1358
|
+
}>;
|
|
1359
|
+
/** Create or replace. `name` is UPPER_SNAKE_CASE; `host` is a public hostname. */
|
|
1360
|
+
set(name: string, data: {
|
|
1361
|
+
value: string;
|
|
1362
|
+
host: string;
|
|
1363
|
+
}): Promise<{
|
|
1364
|
+
data: {
|
|
1365
|
+
name: string;
|
|
1366
|
+
};
|
|
1367
|
+
}>;
|
|
1368
|
+
delete(name: string): Promise<{
|
|
1369
|
+
data: {
|
|
1370
|
+
name: string;
|
|
1371
|
+
};
|
|
1372
|
+
}>;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1293
1375
|
declare class Rymi {
|
|
1294
1376
|
private client;
|
|
1295
1377
|
agents: AgentsResource;
|
|
@@ -1304,7 +1386,8 @@ declare class Rymi {
|
|
|
1304
1386
|
campaigns: CampaignsResource;
|
|
1305
1387
|
contacts: ContactsResource;
|
|
1306
1388
|
compliance: ComplianceResource;
|
|
1389
|
+
toolSecrets: ToolSecretsResource;
|
|
1307
1390
|
constructor(options?: ClientOptions);
|
|
1308
1391
|
}
|
|
1309
1392
|
|
|
1310
|
-
export { type AddCampaignMembersParams, type AddKnowledgeSourceParams, type AgentCallListResponse, type AgentChange, type AgentKnowledgeSource, type AgentListResponse, type AgentTemplateSummary, AgentsResource, type ApplyChangesParams, type ApplyChangesResponse, type AttestParams, type AttestResponse, type Attestation, type BatchCallParams, BillingResource, type CallListResponse, type CallRecord, CallsResource, type CampaignAttemptListResponse, type CampaignBatch, type CampaignBatchListResponse, type CampaignFollowupJob, type CampaignFollowupListResponse, type CampaignListResponse, type CampaignMemberListResponse, type CampaignReportResponse, type CampaignRoute, type CampaignRouteListResponse, type CampaignSuggestion, type CampaignSuggestionListResponse, CampaignsResource, type ChangeEntry, type ClientOptions, ComplianceResource, type ConnectTelephonyParams, type ContactListResponse, ContactsResource, type CreateAgentParams, type CreateCallParams, type CreateCallResponse, type CreateCampaignParams, type CreateCampaignRouteParams, type CreateContactParams, type CreateContactResponse, type CreatePublishableKeyParams, type DncCheckResult, type DncEntry, type DncListResponse, DncResource, type EnrichCompanyParams, type EnrichCompanyResponse, type FanoutCallParams, type ImportCampaignMembersParams, type ImportCampaignMembersResponse, type ImportContactsParams, type ImportContactsResponse, type ImproveCampaignResponse, 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 SetConsentParams, type SetConsentResponse, type TelephonyProvider, TelephonyResource, TemplatesResource, type UpdateAgentParams, type UpdateCampaignMemberParams, type UpdateCampaignParams, type UpdateCampaignRouteParams, type UpdateContactParams, type UsageSummary, type ValidatePublishParams, type WebhookProvisionResult, type WebhookRecord, WebhooksResource, Rymi as default };
|
|
1393
|
+
export { 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, CallsResource, type CampaignAttemptListResponse, type CampaignBatch, type CampaignBatchListResponse, type CampaignFollowupJob, type CampaignFollowupListResponse, type CampaignListResponse, type CampaignMemberListResponse, type CampaignReportResponse, type CampaignRoute, type CampaignRouteListResponse, type CampaignSuggestion, type CampaignSuggestionListResponse, CampaignsResource, type ChangeEntry, type ClientOptions, ComplianceResource, type ConnectTelephonyParams, type ContactListResponse, ContactsResource, type CreateAgentParams, type CreateCallParams, type CreateCallResponse, type CreateCampaignParams, type CreateCampaignRouteParams, type CreateContactParams, type CreateContactResponse, type CreatePublishableKeyParams, type DncCheckResult, type DncEntry, type DncListResponse, DncResource, type EnrichCompanyParams, type EnrichCompanyResponse, type FanoutCallParams, type ImportCampaignMembersParams, type ImportCampaignMembersResponse, type ImportContactsParams, type ImportContactsResponse, type ImproveCampaignResponse, 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 SetConsentParams, type SetConsentResponse, type TelephonyProvider, TelephonyResource, TemplatesResource, type ToolSecretRecord, ToolSecretsResource, type UpdateAgentParams, type UpdateCampaignMemberParams, type UpdateCampaignParams, type UpdateCampaignRouteParams, type UpdateContactParams, type UsageSummary, type ValidatePublishParams, type WebhookProvisionResult, type WebhookRecord, WebhooksResource, Rymi as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Agent, CampaignAttempt, Campaign, CampaignMember, CampaignReport, CampaignStatus, CampaignType, CampaignGoal, CampaignCompliancePolicy, Contact } from '@rymi/sdk-types';
|
|
1
|
+
import { Agent, AgentToolBinding, CampaignAttempt, Campaign, CampaignMember, CampaignReport, CampaignStatus, CampaignType, CampaignGoal, CampaignCompliancePolicy, Contact } from '@rymi/sdk-types';
|
|
2
2
|
export * from '@rymi/sdk-types';
|
|
3
3
|
|
|
4
4
|
interface ClientOptions {
|
|
@@ -66,6 +66,7 @@ interface CreateAgentParams {
|
|
|
66
66
|
/** All BCP-47 languages the agent should handle, e.g. ["hi-IN","en-US"] for a bilingual agent. */
|
|
67
67
|
supported_languages?: string[];
|
|
68
68
|
provider_config?: any;
|
|
69
|
+
tools?: AgentToolBinding[];
|
|
69
70
|
}
|
|
70
71
|
interface UpdateAgentParams {
|
|
71
72
|
name?: string;
|
|
@@ -100,6 +101,8 @@ interface UpdateAgentParams {
|
|
|
100
101
|
supported_languages?: string[];
|
|
101
102
|
chat_summary?: string | null;
|
|
102
103
|
provider_config?: any;
|
|
104
|
+
/** Replaces the whole bindings array — build it from a fresh retrieve(). */
|
|
105
|
+
tools?: AgentToolBinding[];
|
|
103
106
|
}
|
|
104
107
|
interface AgentListResponse {
|
|
105
108
|
agents: Agent[];
|
|
@@ -194,6 +197,33 @@ type AddKnowledgeSourceParams = {
|
|
|
194
197
|
title: string;
|
|
195
198
|
url: string;
|
|
196
199
|
};
|
|
200
|
+
/** A public share link: anyone with the URL can talk to the agent, billed to your workspace. */
|
|
201
|
+
interface AgentShareLink {
|
|
202
|
+
id: string;
|
|
203
|
+
url: string;
|
|
204
|
+
enabled: boolean;
|
|
205
|
+
minutes_limit: number;
|
|
206
|
+
minutes_used: number;
|
|
207
|
+
minutes_reserved: number;
|
|
208
|
+
minutes_remaining: number;
|
|
209
|
+
live_calls: number;
|
|
210
|
+
max_call_seconds: number;
|
|
211
|
+
max_concurrent: number;
|
|
212
|
+
calls_per_ip_hour: number;
|
|
213
|
+
minutes_requested_at: string | null;
|
|
214
|
+
}
|
|
215
|
+
/** All optional; omitted fields keep their current value (or the default on create). */
|
|
216
|
+
interface AgentShareLinkSettings {
|
|
217
|
+
enabled?: boolean;
|
|
218
|
+
/** Total talk-time pool for the link, 0–6000 minutes. */
|
|
219
|
+
minutes_limit?: number;
|
|
220
|
+
/** Per-call cap, 60–1800 seconds. */
|
|
221
|
+
max_call_seconds?: number;
|
|
222
|
+
/** Simultaneous calls, 1–10. */
|
|
223
|
+
max_concurrent?: number;
|
|
224
|
+
/** Calls per caller IP per hour, 1–30. */
|
|
225
|
+
calls_per_ip_hour?: number;
|
|
226
|
+
}
|
|
197
227
|
interface AgentChange {
|
|
198
228
|
change_id: string;
|
|
199
229
|
field_path?: string;
|
|
@@ -302,6 +332,26 @@ declare class AgentsResource {
|
|
|
302
332
|
* Delete a knowledge source from an agent.
|
|
303
333
|
*/
|
|
304
334
|
deleteKnowledgeSource(agentId: string, sourceId: string): Promise<Record<string, any>>;
|
|
335
|
+
/**
|
|
336
|
+
* Get the agent's public share link, or `link: null` if none exists.
|
|
337
|
+
* `link_feature: false` means share links are disabled on this deployment.
|
|
338
|
+
*/
|
|
339
|
+
getShareLink(agentId: string): Promise<{
|
|
340
|
+
link_feature: boolean;
|
|
341
|
+
link: AgentShareLink | null;
|
|
342
|
+
}>;
|
|
343
|
+
/**
|
|
344
|
+
* Create the agent's public share link, or update its settings if one exists.
|
|
345
|
+
*/
|
|
346
|
+
setShareLink(agentId: string, settings?: AgentShareLinkSettings): Promise<{
|
|
347
|
+
link: AgentShareLink;
|
|
348
|
+
}>;
|
|
349
|
+
/**
|
|
350
|
+
* Issue a new URL for the share link. The old URL stops working immediately.
|
|
351
|
+
*/
|
|
352
|
+
regenerateShareLink(agentId: string): Promise<{
|
|
353
|
+
link: AgentShareLink;
|
|
354
|
+
}>;
|
|
305
355
|
/**
|
|
306
356
|
* List the recorded configuration changes for an agent (most recent first).
|
|
307
357
|
* Optionally pass an ISO timestamp to only return changes since then.
|
|
@@ -1290,6 +1340,38 @@ declare class ComplianceResource {
|
|
|
1290
1340
|
listAttestations(): Promise<ListAttestationsResponse>;
|
|
1291
1341
|
}
|
|
1292
1342
|
|
|
1343
|
+
/** A stored API-tool secret. Values are write-only — never returned. */
|
|
1344
|
+
interface ToolSecretRecord {
|
|
1345
|
+
name: string;
|
|
1346
|
+
/** The only host this secret is ever sent to. */
|
|
1347
|
+
host: string | null;
|
|
1348
|
+
}
|
|
1349
|
+
/**
|
|
1350
|
+
* Tenant secrets referenced from call_webhook headers as `{{secrets.NAME}}`.
|
|
1351
|
+
* Each secret is pinned to one host and only interpolated into requests to it.
|
|
1352
|
+
*/
|
|
1353
|
+
declare class ToolSecretsResource {
|
|
1354
|
+
private client;
|
|
1355
|
+
constructor(client: RymiClient);
|
|
1356
|
+
list(): Promise<{
|
|
1357
|
+
data: ToolSecretRecord[];
|
|
1358
|
+
}>;
|
|
1359
|
+
/** Create or replace. `name` is UPPER_SNAKE_CASE; `host` is a public hostname. */
|
|
1360
|
+
set(name: string, data: {
|
|
1361
|
+
value: string;
|
|
1362
|
+
host: string;
|
|
1363
|
+
}): Promise<{
|
|
1364
|
+
data: {
|
|
1365
|
+
name: string;
|
|
1366
|
+
};
|
|
1367
|
+
}>;
|
|
1368
|
+
delete(name: string): Promise<{
|
|
1369
|
+
data: {
|
|
1370
|
+
name: string;
|
|
1371
|
+
};
|
|
1372
|
+
}>;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1293
1375
|
declare class Rymi {
|
|
1294
1376
|
private client;
|
|
1295
1377
|
agents: AgentsResource;
|
|
@@ -1304,7 +1386,8 @@ declare class Rymi {
|
|
|
1304
1386
|
campaigns: CampaignsResource;
|
|
1305
1387
|
contacts: ContactsResource;
|
|
1306
1388
|
compliance: ComplianceResource;
|
|
1389
|
+
toolSecrets: ToolSecretsResource;
|
|
1307
1390
|
constructor(options?: ClientOptions);
|
|
1308
1391
|
}
|
|
1309
1392
|
|
|
1310
|
-
export { type AddCampaignMembersParams, type AddKnowledgeSourceParams, type AgentCallListResponse, type AgentChange, type AgentKnowledgeSource, type AgentListResponse, type AgentTemplateSummary, AgentsResource, type ApplyChangesParams, type ApplyChangesResponse, type AttestParams, type AttestResponse, type Attestation, type BatchCallParams, BillingResource, type CallListResponse, type CallRecord, CallsResource, type CampaignAttemptListResponse, type CampaignBatch, type CampaignBatchListResponse, type CampaignFollowupJob, type CampaignFollowupListResponse, type CampaignListResponse, type CampaignMemberListResponse, type CampaignReportResponse, type CampaignRoute, type CampaignRouteListResponse, type CampaignSuggestion, type CampaignSuggestionListResponse, CampaignsResource, type ChangeEntry, type ClientOptions, ComplianceResource, type ConnectTelephonyParams, type ContactListResponse, ContactsResource, type CreateAgentParams, type CreateCallParams, type CreateCallResponse, type CreateCampaignParams, type CreateCampaignRouteParams, type CreateContactParams, type CreateContactResponse, type CreatePublishableKeyParams, type DncCheckResult, type DncEntry, type DncListResponse, DncResource, type EnrichCompanyParams, type EnrichCompanyResponse, type FanoutCallParams, type ImportCampaignMembersParams, type ImportCampaignMembersResponse, type ImportContactsParams, type ImportContactsResponse, type ImproveCampaignResponse, 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 SetConsentParams, type SetConsentResponse, type TelephonyProvider, TelephonyResource, TemplatesResource, type UpdateAgentParams, type UpdateCampaignMemberParams, type UpdateCampaignParams, type UpdateCampaignRouteParams, type UpdateContactParams, type UsageSummary, type ValidatePublishParams, type WebhookProvisionResult, type WebhookRecord, WebhooksResource, Rymi as default };
|
|
1393
|
+
export { 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, CallsResource, type CampaignAttemptListResponse, type CampaignBatch, type CampaignBatchListResponse, type CampaignFollowupJob, type CampaignFollowupListResponse, type CampaignListResponse, type CampaignMemberListResponse, type CampaignReportResponse, type CampaignRoute, type CampaignRouteListResponse, type CampaignSuggestion, type CampaignSuggestionListResponse, CampaignsResource, type ChangeEntry, type ClientOptions, ComplianceResource, type ConnectTelephonyParams, type ContactListResponse, ContactsResource, type CreateAgentParams, type CreateCallParams, type CreateCallResponse, type CreateCampaignParams, type CreateCampaignRouteParams, type CreateContactParams, type CreateContactResponse, type CreatePublishableKeyParams, type DncCheckResult, type DncEntry, type DncListResponse, DncResource, type EnrichCompanyParams, type EnrichCompanyResponse, type FanoutCallParams, type ImportCampaignMembersParams, type ImportCampaignMembersResponse, type ImportContactsParams, type ImportContactsResponse, type ImproveCampaignResponse, 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 SetConsentParams, type SetConsentResponse, type TelephonyProvider, TelephonyResource, TemplatesResource, type ToolSecretRecord, ToolSecretsResource, type UpdateAgentParams, type UpdateCampaignMemberParams, type UpdateCampaignParams, type UpdateCampaignRouteParams, type UpdateContactParams, type UsageSummary, type ValidatePublishParams, type WebhookProvisionResult, type WebhookRecord, WebhooksResource, Rymi as default };
|
package/dist/index.js
CHANGED
|
@@ -45,6 +45,7 @@ __export(index_exports, {
|
|
|
45
45
|
RymiError: () => RymiError,
|
|
46
46
|
TelephonyResource: () => TelephonyResource,
|
|
47
47
|
TemplatesResource: () => TemplatesResource,
|
|
48
|
+
ToolSecretsResource: () => ToolSecretsResource,
|
|
48
49
|
WebhooksResource: () => WebhooksResource,
|
|
49
50
|
default: () => index_default
|
|
50
51
|
});
|
|
@@ -249,6 +250,26 @@ var AgentsResource = class {
|
|
|
249
250
|
async deleteKnowledgeSource(agentId, sourceId) {
|
|
250
251
|
return this.client.delete(`/agents/${agentId}/knowledge-sources/${sourceId}`);
|
|
251
252
|
}
|
|
253
|
+
/**
|
|
254
|
+
* Get the agent's public share link, or `link: null` if none exists.
|
|
255
|
+
* `link_feature: false` means share links are disabled on this deployment.
|
|
256
|
+
*/
|
|
257
|
+
async getShareLink(agentId) {
|
|
258
|
+
const res = await this.client.get(`/agents/${agentId}/testers`);
|
|
259
|
+
return { link_feature: res.link_feature, link: res.link };
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Create the agent's public share link, or update its settings if one exists.
|
|
263
|
+
*/
|
|
264
|
+
async setShareLink(agentId, settings = {}) {
|
|
265
|
+
return this.client.put(`/agents/${agentId}/share-link`, settings);
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Issue a new URL for the share link. The old URL stops working immediately.
|
|
269
|
+
*/
|
|
270
|
+
async regenerateShareLink(agentId) {
|
|
271
|
+
return this.client.post(`/agents/${agentId}/share-link/regenerate`, {});
|
|
272
|
+
}
|
|
252
273
|
/**
|
|
253
274
|
* List the recorded configuration changes for an agent (most recent first).
|
|
254
275
|
* Optionally pass an ISO timestamp to only return changes since then.
|
|
@@ -797,6 +818,23 @@ var ComplianceResource = class {
|
|
|
797
818
|
}
|
|
798
819
|
};
|
|
799
820
|
|
|
821
|
+
// src/resources/toolSecrets.ts
|
|
822
|
+
var ToolSecretsResource = class {
|
|
823
|
+
constructor(client) {
|
|
824
|
+
this.client = client;
|
|
825
|
+
}
|
|
826
|
+
async list() {
|
|
827
|
+
return this.client.get("/tool-secrets");
|
|
828
|
+
}
|
|
829
|
+
/** Create or replace. `name` is UPPER_SNAKE_CASE; `host` is a public hostname. */
|
|
830
|
+
async set(name, data) {
|
|
831
|
+
return this.client.put(`/tool-secrets/${encodeURIComponent(name)}`, data);
|
|
832
|
+
}
|
|
833
|
+
async delete(name) {
|
|
834
|
+
return this.client.delete(`/tool-secrets/${encodeURIComponent(name)}`);
|
|
835
|
+
}
|
|
836
|
+
};
|
|
837
|
+
|
|
800
838
|
// src/index.ts
|
|
801
839
|
__reExport(index_exports, require("@rymi/sdk-types"), module.exports);
|
|
802
840
|
var Rymi = class {
|
|
@@ -813,6 +851,7 @@ var Rymi = class {
|
|
|
813
851
|
campaigns;
|
|
814
852
|
contacts;
|
|
815
853
|
compliance;
|
|
854
|
+
toolSecrets;
|
|
816
855
|
constructor(options) {
|
|
817
856
|
this.client = new RymiClient(options);
|
|
818
857
|
this.agents = new AgentsResource(this.client);
|
|
@@ -827,6 +866,7 @@ var Rymi = class {
|
|
|
827
866
|
this.campaigns = new CampaignsResource(this.client);
|
|
828
867
|
this.contacts = new ContactsResource(this.client);
|
|
829
868
|
this.compliance = new ComplianceResource(this.client);
|
|
869
|
+
this.toolSecrets = new ToolSecretsResource(this.client);
|
|
830
870
|
}
|
|
831
871
|
};
|
|
832
872
|
var index_default = Rymi;
|
|
@@ -846,6 +886,7 @@ var index_default = Rymi;
|
|
|
846
886
|
RymiError,
|
|
847
887
|
TelephonyResource,
|
|
848
888
|
TemplatesResource,
|
|
889
|
+
ToolSecretsResource,
|
|
849
890
|
WebhooksResource,
|
|
850
891
|
...require("@rymi/sdk-types")
|
|
851
892
|
});
|