@rymi/node 2.0.0 → 2.2.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/README.md CHANGED
@@ -75,6 +75,10 @@ The client exposes one namespace per resource group:
75
75
  | `templates` | Prebuilt agent templates |
76
76
  | `webhooks` | Create webhooks and verify incoming signatures |
77
77
  | `dnc` | Do-not-call list management |
78
+ | `campaigns` | Outbound/inbound calling campaigns: members, launch/pause, reports, improvement suggestions, inbound routes, and the lead-intake URL (`campaigns.intake`) |
79
+ | `contacts` | Contacts and per-channel consent |
80
+ | `compliance` | Compliance attestations (e.g. an external DNC scrub) |
81
+ | `toolSecrets` | Secrets for API-tool headers, referenced as `{{secrets.NAME}}` |
78
82
 
79
83
  ## 📖 Documentation
80
84
 
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.
@@ -1099,10 +1149,46 @@ interface CampaignSuggestionListResponse {
1099
1149
  offset: number;
1100
1150
  limit: number;
1101
1151
  }
1152
+ /** A campaign's lead-intake URL settings. The URL itself is only returned on create/rotate. */
1153
+ interface CampaignIntake {
1154
+ enabled: true;
1155
+ assume_voice_consent: boolean;
1156
+ default_country: string | null;
1157
+ created_at: string;
1158
+ rotated_at: string;
1159
+ last_used_at: string | null;
1160
+ }
1161
+ interface CampaignIntakeSettings {
1162
+ /** Treat every lead posted to the URL as having voice consent (e.g. a subscribe form with a consent line). */
1163
+ assume_voice_consent?: boolean;
1164
+ /** ISO-3166 alpha-2 (e.g. "IN") used for numbers posted without a +country code. */
1165
+ default_country?: string | null;
1166
+ }
1167
+ declare class CampaignIntakeResource {
1168
+ private client;
1169
+ constructor(client: RymiClient);
1170
+ /** Get the campaign's lead-intake settings, or `intake: null` if it has none. */
1171
+ get(campaignId: string): Promise<{
1172
+ intake: CampaignIntake | null;
1173
+ }>;
1174
+ /** Create the lead-intake URL (returned once as `url`), or update its settings (`url: null`). */
1175
+ set(campaignId: string, settings?: CampaignIntakeSettings): Promise<{
1176
+ intake: CampaignIntake;
1177
+ url: string | null;
1178
+ }>;
1179
+ /** Issue a new URL. The old one stops accepting leads immediately. */
1180
+ rotate(campaignId: string): Promise<{
1181
+ intake: CampaignIntake;
1182
+ url: string;
1183
+ }>;
1184
+ /** Remove the lead-intake URL. */
1185
+ disable(campaignId: string): Promise<void>;
1186
+ }
1102
1187
  declare class CampaignsResource {
1103
1188
  private client;
1104
1189
  members: CampaignMembersResource;
1105
1190
  routes: CampaignRoutesResource;
1191
+ intake: CampaignIntakeResource;
1106
1192
  constructor(client: RymiClient);
1107
1193
  /** List campaigns for the authenticated tenant, paginated. */
1108
1194
  list(params?: ListCampaignsParams): Promise<CampaignListResponse>;
@@ -1290,6 +1376,38 @@ declare class ComplianceResource {
1290
1376
  listAttestations(): Promise<ListAttestationsResponse>;
1291
1377
  }
1292
1378
 
1379
+ /** A stored API-tool secret. Values are write-only — never returned. */
1380
+ interface ToolSecretRecord {
1381
+ name: string;
1382
+ /** The only host this secret is ever sent to. */
1383
+ host: string | null;
1384
+ }
1385
+ /**
1386
+ * Tenant secrets referenced from call_webhook headers as `{{secrets.NAME}}`.
1387
+ * Each secret is pinned to one host and only interpolated into requests to it.
1388
+ */
1389
+ declare class ToolSecretsResource {
1390
+ private client;
1391
+ constructor(client: RymiClient);
1392
+ list(): Promise<{
1393
+ data: ToolSecretRecord[];
1394
+ }>;
1395
+ /** Create or replace. `name` is UPPER_SNAKE_CASE; `host` is a public hostname. */
1396
+ set(name: string, data: {
1397
+ value: string;
1398
+ host: string;
1399
+ }): Promise<{
1400
+ data: {
1401
+ name: string;
1402
+ };
1403
+ }>;
1404
+ delete(name: string): Promise<{
1405
+ data: {
1406
+ name: string;
1407
+ };
1408
+ }>;
1409
+ }
1410
+
1293
1411
  declare class Rymi {
1294
1412
  private client;
1295
1413
  agents: AgentsResource;
@@ -1304,7 +1422,8 @@ declare class Rymi {
1304
1422
  campaigns: CampaignsResource;
1305
1423
  contacts: ContactsResource;
1306
1424
  compliance: ComplianceResource;
1425
+ toolSecrets: ToolSecretsResource;
1307
1426
  constructor(options?: ClientOptions);
1308
1427
  }
1309
1428
 
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 };
1429
+ 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 CampaignIntake, type CampaignIntakeSettings, 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.
@@ -1099,10 +1149,46 @@ interface CampaignSuggestionListResponse {
1099
1149
  offset: number;
1100
1150
  limit: number;
1101
1151
  }
1152
+ /** A campaign's lead-intake URL settings. The URL itself is only returned on create/rotate. */
1153
+ interface CampaignIntake {
1154
+ enabled: true;
1155
+ assume_voice_consent: boolean;
1156
+ default_country: string | null;
1157
+ created_at: string;
1158
+ rotated_at: string;
1159
+ last_used_at: string | null;
1160
+ }
1161
+ interface CampaignIntakeSettings {
1162
+ /** Treat every lead posted to the URL as having voice consent (e.g. a subscribe form with a consent line). */
1163
+ assume_voice_consent?: boolean;
1164
+ /** ISO-3166 alpha-2 (e.g. "IN") used for numbers posted without a +country code. */
1165
+ default_country?: string | null;
1166
+ }
1167
+ declare class CampaignIntakeResource {
1168
+ private client;
1169
+ constructor(client: RymiClient);
1170
+ /** Get the campaign's lead-intake settings, or `intake: null` if it has none. */
1171
+ get(campaignId: string): Promise<{
1172
+ intake: CampaignIntake | null;
1173
+ }>;
1174
+ /** Create the lead-intake URL (returned once as `url`), or update its settings (`url: null`). */
1175
+ set(campaignId: string, settings?: CampaignIntakeSettings): Promise<{
1176
+ intake: CampaignIntake;
1177
+ url: string | null;
1178
+ }>;
1179
+ /** Issue a new URL. The old one stops accepting leads immediately. */
1180
+ rotate(campaignId: string): Promise<{
1181
+ intake: CampaignIntake;
1182
+ url: string;
1183
+ }>;
1184
+ /** Remove the lead-intake URL. */
1185
+ disable(campaignId: string): Promise<void>;
1186
+ }
1102
1187
  declare class CampaignsResource {
1103
1188
  private client;
1104
1189
  members: CampaignMembersResource;
1105
1190
  routes: CampaignRoutesResource;
1191
+ intake: CampaignIntakeResource;
1106
1192
  constructor(client: RymiClient);
1107
1193
  /** List campaigns for the authenticated tenant, paginated. */
1108
1194
  list(params?: ListCampaignsParams): Promise<CampaignListResponse>;
@@ -1290,6 +1376,38 @@ declare class ComplianceResource {
1290
1376
  listAttestations(): Promise<ListAttestationsResponse>;
1291
1377
  }
1292
1378
 
1379
+ /** A stored API-tool secret. Values are write-only — never returned. */
1380
+ interface ToolSecretRecord {
1381
+ name: string;
1382
+ /** The only host this secret is ever sent to. */
1383
+ host: string | null;
1384
+ }
1385
+ /**
1386
+ * Tenant secrets referenced from call_webhook headers as `{{secrets.NAME}}`.
1387
+ * Each secret is pinned to one host and only interpolated into requests to it.
1388
+ */
1389
+ declare class ToolSecretsResource {
1390
+ private client;
1391
+ constructor(client: RymiClient);
1392
+ list(): Promise<{
1393
+ data: ToolSecretRecord[];
1394
+ }>;
1395
+ /** Create or replace. `name` is UPPER_SNAKE_CASE; `host` is a public hostname. */
1396
+ set(name: string, data: {
1397
+ value: string;
1398
+ host: string;
1399
+ }): Promise<{
1400
+ data: {
1401
+ name: string;
1402
+ };
1403
+ }>;
1404
+ delete(name: string): Promise<{
1405
+ data: {
1406
+ name: string;
1407
+ };
1408
+ }>;
1409
+ }
1410
+
1293
1411
  declare class Rymi {
1294
1412
  private client;
1295
1413
  agents: AgentsResource;
@@ -1304,7 +1422,8 @@ declare class Rymi {
1304
1422
  campaigns: CampaignsResource;
1305
1423
  contacts: ContactsResource;
1306
1424
  compliance: ComplianceResource;
1425
+ toolSecrets: ToolSecretsResource;
1307
1426
  constructor(options?: ClientOptions);
1308
1427
  }
1309
1428
 
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 };
1429
+ 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 CampaignIntake, type CampaignIntakeSettings, 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.
@@ -647,14 +668,37 @@ var CampaignRoutesResource = class {
647
668
  return this.client.delete(`/campaigns/${campaignId}/routes/${routeId}`);
648
669
  }
649
670
  };
671
+ var CampaignIntakeResource = class {
672
+ constructor(client) {
673
+ this.client = client;
674
+ }
675
+ /** Get the campaign's lead-intake settings, or `intake: null` if it has none. */
676
+ async get(campaignId) {
677
+ return this.client.get(`/campaigns/${campaignId}/intake`);
678
+ }
679
+ /** Create the lead-intake URL (returned once as `url`), or update its settings (`url: null`). */
680
+ async set(campaignId, settings = {}) {
681
+ return this.client.put(`/campaigns/${campaignId}/intake`, settings);
682
+ }
683
+ /** Issue a new URL. The old one stops accepting leads immediately. */
684
+ async rotate(campaignId) {
685
+ return this.client.post(`/campaigns/${campaignId}/intake/rotate`, {});
686
+ }
687
+ /** Remove the lead-intake URL. */
688
+ async disable(campaignId) {
689
+ return this.client.delete(`/campaigns/${campaignId}/intake`);
690
+ }
691
+ };
650
692
  var CampaignsResource = class {
651
693
  constructor(client) {
652
694
  this.client = client;
653
695
  this.members = new CampaignMembersResource(client);
654
696
  this.routes = new CampaignRoutesResource(client);
697
+ this.intake = new CampaignIntakeResource(client);
655
698
  }
656
699
  members;
657
700
  routes;
701
+ intake;
658
702
  /** List campaigns for the authenticated tenant, paginated. */
659
703
  async list(params = {}) {
660
704
  return this.client.get(`/campaigns${buildQuery4(params)}`);
@@ -797,6 +841,23 @@ var ComplianceResource = class {
797
841
  }
798
842
  };
799
843
 
844
+ // src/resources/toolSecrets.ts
845
+ var ToolSecretsResource = class {
846
+ constructor(client) {
847
+ this.client = client;
848
+ }
849
+ async list() {
850
+ return this.client.get("/tool-secrets");
851
+ }
852
+ /** Create or replace. `name` is UPPER_SNAKE_CASE; `host` is a public hostname. */
853
+ async set(name, data) {
854
+ return this.client.put(`/tool-secrets/${encodeURIComponent(name)}`, data);
855
+ }
856
+ async delete(name) {
857
+ return this.client.delete(`/tool-secrets/${encodeURIComponent(name)}`);
858
+ }
859
+ };
860
+
800
861
  // src/index.ts
801
862
  __reExport(index_exports, require("@rymi/sdk-types"), module.exports);
802
863
  var Rymi = class {
@@ -813,6 +874,7 @@ var Rymi = class {
813
874
  campaigns;
814
875
  contacts;
815
876
  compliance;
877
+ toolSecrets;
816
878
  constructor(options) {
817
879
  this.client = new RymiClient(options);
818
880
  this.agents = new AgentsResource(this.client);
@@ -827,6 +889,7 @@ var Rymi = class {
827
889
  this.campaigns = new CampaignsResource(this.client);
828
890
  this.contacts = new ContactsResource(this.client);
829
891
  this.compliance = new ComplianceResource(this.client);
892
+ this.toolSecrets = new ToolSecretsResource(this.client);
830
893
  }
831
894
  };
832
895
  var index_default = Rymi;
@@ -846,6 +909,7 @@ var index_default = Rymi;
846
909
  RymiError,
847
910
  TelephonyResource,
848
911
  TemplatesResource,
912
+ ToolSecretsResource,
849
913
  WebhooksResource,
850
914
  ...require("@rymi/sdk-types")
851
915
  });