@rymi/node 2.3.0 → 2.5.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 +3 -3
- package/dist/index.d.mts +89 -4
- package/dist/index.d.ts +89 -4
- package/dist/index.js +38 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -74,15 +74,15 @@ The client exposes one namespace per resource group:
|
|
|
74
74
|
| `numbers` | Register and attach phone numbers |
|
|
75
75
|
| `telephony` | Inspect carrier status and provisioned numbers |
|
|
76
76
|
| `keys` | Manage publishable keys |
|
|
77
|
-
| `billing` | Usage summaries and
|
|
77
|
+
| `billing` | Usage summaries, balance, and `setCountry` (billing country, locked after the first paid invoice) |
|
|
78
78
|
| `templates` | Prebuilt agent templates |
|
|
79
79
|
| `webhooks` | Create webhooks and verify incoming signatures |
|
|
80
80
|
| `dnc` | Do-not-call list management |
|
|
81
81
|
| `campaigns` | Outbound/inbound calling campaigns: members, launch/pause, reports, improvement suggestions, inbound routes, and the lead-intake URL (`campaigns.intake`) |
|
|
82
82
|
| `contacts` | Contacts and per-channel consent |
|
|
83
|
-
| `compliance` |
|
|
83
|
+
| `compliance` | Attestations, plus workspace settings: `getSettings`, `updateSettings`, `previewSettings` |
|
|
84
84
|
| `toolSecrets` | Secrets for API-tool headers, referenced as `{{secrets.NAME}}` |
|
|
85
|
-
| `workspaces` | List, create and
|
|
85
|
+
| `workspaces` | List, create and update workspaces, including client workspaces (`create({ name, parent })`) that your agency pays for, with a monthly `spend_cap_cents_monthly`. `usage(id, { month })` for invoicing; `listMembers`, `addMember`, `removeMember`. Pass `workspace` (or `RYMI_WORKSPACE`), or call `withWorkspace(id)`, to act in one of them. |
|
|
86
86
|
|
|
87
87
|
## 📖 Documentation
|
|
88
88
|
|
package/dist/index.d.mts
CHANGED
|
@@ -877,6 +877,11 @@ declare class BillingResource {
|
|
|
877
877
|
}): Promise<{
|
|
878
878
|
ok: true;
|
|
879
879
|
}>;
|
|
880
|
+
/** Set the billing country. Locked after the first paid invoice (409 billing_country_locked). */
|
|
881
|
+
setCountry(billingCountry: string): Promise<{
|
|
882
|
+
ok: true;
|
|
883
|
+
billing_country: string;
|
|
884
|
+
}>;
|
|
880
885
|
}
|
|
881
886
|
|
|
882
887
|
interface AgentTemplateSummary {
|
|
@@ -1372,6 +1377,28 @@ interface AttestResponse {
|
|
|
1372
1377
|
interface ListAttestationsResponse {
|
|
1373
1378
|
attestations: Attestation[];
|
|
1374
1379
|
}
|
|
1380
|
+
interface CallingRules {
|
|
1381
|
+
/** Callee-local hours; null = any hour. */
|
|
1382
|
+
calling_hours: {
|
|
1383
|
+
start_hour: number;
|
|
1384
|
+
end_hour: number;
|
|
1385
|
+
} | null;
|
|
1386
|
+
dnc_check: boolean;
|
|
1387
|
+
require_voice_consent: boolean;
|
|
1388
|
+
/** Recording notice default for new agents. */
|
|
1389
|
+
recording_notice: boolean;
|
|
1390
|
+
/** null = every supported country. */
|
|
1391
|
+
destination_countries: string[] | null;
|
|
1392
|
+
apply_to_single_calls: boolean;
|
|
1393
|
+
}
|
|
1394
|
+
interface ComplianceSettings {
|
|
1395
|
+
operating_country: string | null;
|
|
1396
|
+
configured: boolean;
|
|
1397
|
+
inherited_from: string | null;
|
|
1398
|
+
rules: CallingRules;
|
|
1399
|
+
edited: Array<keyof CallingRules>;
|
|
1400
|
+
presets: Record<string, CallingRules>;
|
|
1401
|
+
}
|
|
1375
1402
|
declare class ComplianceResource {
|
|
1376
1403
|
private client;
|
|
1377
1404
|
constructor(client: RymiClient);
|
|
@@ -1380,6 +1407,22 @@ declare class ComplianceResource {
|
|
|
1380
1407
|
attest(data: AttestParams): Promise<AttestResponse>;
|
|
1381
1408
|
/** List the tenant's 50 most recent compliance attestations, newest first. */
|
|
1382
1409
|
listAttestations(): Promise<ListAttestationsResponse>;
|
|
1410
|
+
/** The workspace's compliance settings, with every country preset. */
|
|
1411
|
+
getSettings(): Promise<ComplianceSettings>;
|
|
1412
|
+
/** Choosing operating_country fills every setting you haven't edited from its preset. */
|
|
1413
|
+
updateSettings(data: {
|
|
1414
|
+
operating_country?: string | null;
|
|
1415
|
+
rules?: Partial<CallingRules>;
|
|
1416
|
+
}): Promise<ComplianceSettings>;
|
|
1417
|
+
/** What choosing a country would change, before saving. */
|
|
1418
|
+
previewSettings(country: string): Promise<{
|
|
1419
|
+
country: string;
|
|
1420
|
+
changes: Array<{
|
|
1421
|
+
key: keyof CallingRules;
|
|
1422
|
+
from: unknown;
|
|
1423
|
+
to: unknown;
|
|
1424
|
+
}>;
|
|
1425
|
+
}>;
|
|
1383
1426
|
}
|
|
1384
1427
|
|
|
1385
1428
|
/** A stored API-tool secret. Values are write-only — never returned. */
|
|
@@ -1418,14 +1461,39 @@ interface Workspace {
|
|
|
1418
1461
|
id: string;
|
|
1419
1462
|
name: string;
|
|
1420
1463
|
role: 'owner' | 'admin' | 'client';
|
|
1464
|
+
/** The agency, for a client workspace. */
|
|
1421
1465
|
parent_id: string | null;
|
|
1422
1466
|
operating_country: string | null;
|
|
1467
|
+
/** Client workspaces only; absent for the client role. */
|
|
1468
|
+
spend_cap_cents_monthly?: number | null;
|
|
1423
1469
|
current?: boolean;
|
|
1424
1470
|
}
|
|
1425
1471
|
interface CreateWorkspaceParams {
|
|
1426
1472
|
name: string;
|
|
1427
1473
|
/** ISO-3166 alpha-2, e.g. "IN". */
|
|
1428
1474
|
operating_country?: string | null;
|
|
1475
|
+
/** An agency workspace you run: makes this a client workspace that the agency pays for. */
|
|
1476
|
+
parent?: string;
|
|
1477
|
+
}
|
|
1478
|
+
interface UpdateWorkspaceParams {
|
|
1479
|
+
name?: string;
|
|
1480
|
+
operating_country?: string | null;
|
|
1481
|
+
/** Client workspaces only. Credits per calendar month (1 credit = $0.01); null removes the cap. */
|
|
1482
|
+
spend_cap_cents_monthly?: number | null;
|
|
1483
|
+
}
|
|
1484
|
+
interface WorkspaceUsage {
|
|
1485
|
+
workspace_id: string;
|
|
1486
|
+
/** YYYY-MM, UTC. */
|
|
1487
|
+
month: string;
|
|
1488
|
+
calls: number;
|
|
1489
|
+
minutes: number;
|
|
1490
|
+
/** Left out for the client role. */
|
|
1491
|
+
credits?: number;
|
|
1492
|
+
}
|
|
1493
|
+
interface WorkspaceMember {
|
|
1494
|
+
user_id: string;
|
|
1495
|
+
email: string | null;
|
|
1496
|
+
role: 'owner' | 'admin' | 'client';
|
|
1429
1497
|
}
|
|
1430
1498
|
declare class WorkspacesResource {
|
|
1431
1499
|
private client;
|
|
@@ -1436,16 +1504,31 @@ declare class WorkspacesResource {
|
|
|
1436
1504
|
create(data: CreateWorkspaceParams): Promise<{
|
|
1437
1505
|
workspace: Workspace;
|
|
1438
1506
|
}>;
|
|
1439
|
-
update(id: string, data: {
|
|
1440
|
-
|
|
1441
|
-
|
|
1507
|
+
update(id: string, data: UpdateWorkspaceParams): Promise<{
|
|
1508
|
+
ok: true;
|
|
1509
|
+
}>;
|
|
1510
|
+
/** Calls, minutes and credits for one month (default: this month, UTC). */
|
|
1511
|
+
usage(id: string, params?: {
|
|
1512
|
+
month?: string;
|
|
1513
|
+
}): Promise<WorkspaceUsage>;
|
|
1514
|
+
listMembers(id: string): Promise<{
|
|
1515
|
+
members: WorkspaceMember[];
|
|
1516
|
+
}>;
|
|
1517
|
+
/** Someone without a Rymi account gets an invite email. Client workspaces take the client role. */
|
|
1518
|
+
addMember(id: string, data: {
|
|
1519
|
+
email: string;
|
|
1520
|
+
role?: 'admin' | 'client';
|
|
1442
1521
|
}): Promise<{
|
|
1522
|
+
member: WorkspaceMember;
|
|
1523
|
+
}>;
|
|
1524
|
+
removeMember(id: string, userId: string): Promise<{
|
|
1443
1525
|
ok: true;
|
|
1444
1526
|
}>;
|
|
1445
1527
|
}
|
|
1446
1528
|
|
|
1447
1529
|
declare class Rymi {
|
|
1448
1530
|
private client;
|
|
1531
|
+
private options?;
|
|
1449
1532
|
agents: AgentsResource;
|
|
1450
1533
|
calls: CallsResource;
|
|
1451
1534
|
dnc: DncResource;
|
|
@@ -1461,6 +1544,8 @@ declare class Rymi {
|
|
|
1461
1544
|
toolSecrets: ToolSecretsResource;
|
|
1462
1545
|
workspaces: WorkspacesResource;
|
|
1463
1546
|
constructor(options?: ClientOptions);
|
|
1547
|
+
/** The same client acting in another workspace: `rymi.withWorkspace(id).calls.create(…)`. */
|
|
1548
|
+
withWorkspace(workspace: string): Rymi;
|
|
1464
1549
|
}
|
|
1465
1550
|
|
|
1466
|
-
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 CreateWorkspaceParams, 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, type Workspace, WorkspacesResource, Rymi as default };
|
|
1551
|
+
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, 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 CreateWorkspaceParams, 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 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
|
@@ -877,6 +877,11 @@ declare class BillingResource {
|
|
|
877
877
|
}): Promise<{
|
|
878
878
|
ok: true;
|
|
879
879
|
}>;
|
|
880
|
+
/** Set the billing country. Locked after the first paid invoice (409 billing_country_locked). */
|
|
881
|
+
setCountry(billingCountry: string): Promise<{
|
|
882
|
+
ok: true;
|
|
883
|
+
billing_country: string;
|
|
884
|
+
}>;
|
|
880
885
|
}
|
|
881
886
|
|
|
882
887
|
interface AgentTemplateSummary {
|
|
@@ -1372,6 +1377,28 @@ interface AttestResponse {
|
|
|
1372
1377
|
interface ListAttestationsResponse {
|
|
1373
1378
|
attestations: Attestation[];
|
|
1374
1379
|
}
|
|
1380
|
+
interface CallingRules {
|
|
1381
|
+
/** Callee-local hours; null = any hour. */
|
|
1382
|
+
calling_hours: {
|
|
1383
|
+
start_hour: number;
|
|
1384
|
+
end_hour: number;
|
|
1385
|
+
} | null;
|
|
1386
|
+
dnc_check: boolean;
|
|
1387
|
+
require_voice_consent: boolean;
|
|
1388
|
+
/** Recording notice default for new agents. */
|
|
1389
|
+
recording_notice: boolean;
|
|
1390
|
+
/** null = every supported country. */
|
|
1391
|
+
destination_countries: string[] | null;
|
|
1392
|
+
apply_to_single_calls: boolean;
|
|
1393
|
+
}
|
|
1394
|
+
interface ComplianceSettings {
|
|
1395
|
+
operating_country: string | null;
|
|
1396
|
+
configured: boolean;
|
|
1397
|
+
inherited_from: string | null;
|
|
1398
|
+
rules: CallingRules;
|
|
1399
|
+
edited: Array<keyof CallingRules>;
|
|
1400
|
+
presets: Record<string, CallingRules>;
|
|
1401
|
+
}
|
|
1375
1402
|
declare class ComplianceResource {
|
|
1376
1403
|
private client;
|
|
1377
1404
|
constructor(client: RymiClient);
|
|
@@ -1380,6 +1407,22 @@ declare class ComplianceResource {
|
|
|
1380
1407
|
attest(data: AttestParams): Promise<AttestResponse>;
|
|
1381
1408
|
/** List the tenant's 50 most recent compliance attestations, newest first. */
|
|
1382
1409
|
listAttestations(): Promise<ListAttestationsResponse>;
|
|
1410
|
+
/** The workspace's compliance settings, with every country preset. */
|
|
1411
|
+
getSettings(): Promise<ComplianceSettings>;
|
|
1412
|
+
/** Choosing operating_country fills every setting you haven't edited from its preset. */
|
|
1413
|
+
updateSettings(data: {
|
|
1414
|
+
operating_country?: string | null;
|
|
1415
|
+
rules?: Partial<CallingRules>;
|
|
1416
|
+
}): Promise<ComplianceSettings>;
|
|
1417
|
+
/** What choosing a country would change, before saving. */
|
|
1418
|
+
previewSettings(country: string): Promise<{
|
|
1419
|
+
country: string;
|
|
1420
|
+
changes: Array<{
|
|
1421
|
+
key: keyof CallingRules;
|
|
1422
|
+
from: unknown;
|
|
1423
|
+
to: unknown;
|
|
1424
|
+
}>;
|
|
1425
|
+
}>;
|
|
1383
1426
|
}
|
|
1384
1427
|
|
|
1385
1428
|
/** A stored API-tool secret. Values are write-only — never returned. */
|
|
@@ -1418,14 +1461,39 @@ interface Workspace {
|
|
|
1418
1461
|
id: string;
|
|
1419
1462
|
name: string;
|
|
1420
1463
|
role: 'owner' | 'admin' | 'client';
|
|
1464
|
+
/** The agency, for a client workspace. */
|
|
1421
1465
|
parent_id: string | null;
|
|
1422
1466
|
operating_country: string | null;
|
|
1467
|
+
/** Client workspaces only; absent for the client role. */
|
|
1468
|
+
spend_cap_cents_monthly?: number | null;
|
|
1423
1469
|
current?: boolean;
|
|
1424
1470
|
}
|
|
1425
1471
|
interface CreateWorkspaceParams {
|
|
1426
1472
|
name: string;
|
|
1427
1473
|
/** ISO-3166 alpha-2, e.g. "IN". */
|
|
1428
1474
|
operating_country?: string | null;
|
|
1475
|
+
/** An agency workspace you run: makes this a client workspace that the agency pays for. */
|
|
1476
|
+
parent?: string;
|
|
1477
|
+
}
|
|
1478
|
+
interface UpdateWorkspaceParams {
|
|
1479
|
+
name?: string;
|
|
1480
|
+
operating_country?: string | null;
|
|
1481
|
+
/** Client workspaces only. Credits per calendar month (1 credit = $0.01); null removes the cap. */
|
|
1482
|
+
spend_cap_cents_monthly?: number | null;
|
|
1483
|
+
}
|
|
1484
|
+
interface WorkspaceUsage {
|
|
1485
|
+
workspace_id: string;
|
|
1486
|
+
/** YYYY-MM, UTC. */
|
|
1487
|
+
month: string;
|
|
1488
|
+
calls: number;
|
|
1489
|
+
minutes: number;
|
|
1490
|
+
/** Left out for the client role. */
|
|
1491
|
+
credits?: number;
|
|
1492
|
+
}
|
|
1493
|
+
interface WorkspaceMember {
|
|
1494
|
+
user_id: string;
|
|
1495
|
+
email: string | null;
|
|
1496
|
+
role: 'owner' | 'admin' | 'client';
|
|
1429
1497
|
}
|
|
1430
1498
|
declare class WorkspacesResource {
|
|
1431
1499
|
private client;
|
|
@@ -1436,16 +1504,31 @@ declare class WorkspacesResource {
|
|
|
1436
1504
|
create(data: CreateWorkspaceParams): Promise<{
|
|
1437
1505
|
workspace: Workspace;
|
|
1438
1506
|
}>;
|
|
1439
|
-
update(id: string, data: {
|
|
1440
|
-
|
|
1441
|
-
|
|
1507
|
+
update(id: string, data: UpdateWorkspaceParams): Promise<{
|
|
1508
|
+
ok: true;
|
|
1509
|
+
}>;
|
|
1510
|
+
/** Calls, minutes and credits for one month (default: this month, UTC). */
|
|
1511
|
+
usage(id: string, params?: {
|
|
1512
|
+
month?: string;
|
|
1513
|
+
}): Promise<WorkspaceUsage>;
|
|
1514
|
+
listMembers(id: string): Promise<{
|
|
1515
|
+
members: WorkspaceMember[];
|
|
1516
|
+
}>;
|
|
1517
|
+
/** Someone without a Rymi account gets an invite email. Client workspaces take the client role. */
|
|
1518
|
+
addMember(id: string, data: {
|
|
1519
|
+
email: string;
|
|
1520
|
+
role?: 'admin' | 'client';
|
|
1442
1521
|
}): Promise<{
|
|
1522
|
+
member: WorkspaceMember;
|
|
1523
|
+
}>;
|
|
1524
|
+
removeMember(id: string, userId: string): Promise<{
|
|
1443
1525
|
ok: true;
|
|
1444
1526
|
}>;
|
|
1445
1527
|
}
|
|
1446
1528
|
|
|
1447
1529
|
declare class Rymi {
|
|
1448
1530
|
private client;
|
|
1531
|
+
private options?;
|
|
1449
1532
|
agents: AgentsResource;
|
|
1450
1533
|
calls: CallsResource;
|
|
1451
1534
|
dnc: DncResource;
|
|
@@ -1461,6 +1544,8 @@ declare class Rymi {
|
|
|
1461
1544
|
toolSecrets: ToolSecretsResource;
|
|
1462
1545
|
workspaces: WorkspacesResource;
|
|
1463
1546
|
constructor(options?: ClientOptions);
|
|
1547
|
+
/** The same client acting in another workspace: `rymi.withWorkspace(id).calls.create(…)`. */
|
|
1548
|
+
withWorkspace(workspace: string): Rymi;
|
|
1464
1549
|
}
|
|
1465
1550
|
|
|
1466
|
-
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 CreateWorkspaceParams, 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, type Workspace, WorkspacesResource, Rymi as default };
|
|
1551
|
+
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, 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 CreateWorkspaceParams, 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 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
|
@@ -601,6 +601,10 @@ var BillingResource = class {
|
|
|
601
601
|
async setAlerts(data) {
|
|
602
602
|
return this.client.put("/billing/alerts", data);
|
|
603
603
|
}
|
|
604
|
+
/** Set the billing country. Locked after the first paid invoice (409 billing_country_locked). */
|
|
605
|
+
async setCountry(billingCountry) {
|
|
606
|
+
return this.client.put("/billing/country", { billing_country: billingCountry });
|
|
607
|
+
}
|
|
604
608
|
};
|
|
605
609
|
|
|
606
610
|
// src/resources/templates.ts
|
|
@@ -843,6 +847,18 @@ var ComplianceResource = class {
|
|
|
843
847
|
async listAttestations() {
|
|
844
848
|
return this.client.get("/compliance/attestations");
|
|
845
849
|
}
|
|
850
|
+
/** The workspace's compliance settings, with every country preset. */
|
|
851
|
+
async getSettings() {
|
|
852
|
+
return this.client.get("/compliance/settings");
|
|
853
|
+
}
|
|
854
|
+
/** Choosing operating_country fills every setting you haven't edited from its preset. */
|
|
855
|
+
async updateSettings(data) {
|
|
856
|
+
return this.client.put("/compliance/settings", data);
|
|
857
|
+
}
|
|
858
|
+
/** What choosing a country would change, before saving. */
|
|
859
|
+
async previewSettings(country) {
|
|
860
|
+
return this.client.get(`/compliance/settings/preview?country=${encodeURIComponent(country)}`);
|
|
861
|
+
}
|
|
846
862
|
};
|
|
847
863
|
|
|
848
864
|
// src/resources/toolSecrets.ts
|
|
@@ -876,12 +892,28 @@ var WorkspacesResource = class {
|
|
|
876
892
|
async update(id, data) {
|
|
877
893
|
return this.client.patch(`/workspaces/${encodeURIComponent(id)}`, data);
|
|
878
894
|
}
|
|
895
|
+
/** Calls, minutes and credits for one month (default: this month, UTC). */
|
|
896
|
+
async usage(id, params = {}) {
|
|
897
|
+
const query = params.month ? `?month=${encodeURIComponent(params.month)}` : "";
|
|
898
|
+
return this.client.get(`/workspaces/${encodeURIComponent(id)}/usage${query}`);
|
|
899
|
+
}
|
|
900
|
+
async listMembers(id) {
|
|
901
|
+
return this.client.get(`/workspaces/${encodeURIComponent(id)}/members`);
|
|
902
|
+
}
|
|
903
|
+
/** Someone without a Rymi account gets an invite email. Client workspaces take the client role. */
|
|
904
|
+
async addMember(id, data) {
|
|
905
|
+
return this.client.post(`/workspaces/${encodeURIComponent(id)}/members`, data);
|
|
906
|
+
}
|
|
907
|
+
async removeMember(id, userId) {
|
|
908
|
+
return this.client.delete(`/workspaces/${encodeURIComponent(id)}/members/${encodeURIComponent(userId)}`);
|
|
909
|
+
}
|
|
879
910
|
};
|
|
880
911
|
|
|
881
912
|
// src/index.ts
|
|
882
913
|
__reExport(index_exports, require("@rymi/sdk-types"), module.exports);
|
|
883
|
-
var Rymi = class {
|
|
914
|
+
var Rymi = class _Rymi {
|
|
884
915
|
client;
|
|
916
|
+
options;
|
|
885
917
|
agents;
|
|
886
918
|
calls;
|
|
887
919
|
dnc;
|
|
@@ -897,6 +929,7 @@ var Rymi = class {
|
|
|
897
929
|
toolSecrets;
|
|
898
930
|
workspaces;
|
|
899
931
|
constructor(options) {
|
|
932
|
+
this.options = options;
|
|
900
933
|
this.client = new RymiClient(options);
|
|
901
934
|
this.agents = new AgentsResource(this.client);
|
|
902
935
|
this.calls = new CallsResource(this.client);
|
|
@@ -913,6 +946,10 @@ var Rymi = class {
|
|
|
913
946
|
this.toolSecrets = new ToolSecretsResource(this.client);
|
|
914
947
|
this.workspaces = new WorkspacesResource(this.client);
|
|
915
948
|
}
|
|
949
|
+
/** The same client acting in another workspace: `rymi.withWorkspace(id).calls.create(…)`. */
|
|
950
|
+
withWorkspace(workspace) {
|
|
951
|
+
return new _Rymi({ ...this.options, workspace });
|
|
952
|
+
}
|
|
916
953
|
};
|
|
917
954
|
var index_default = Rymi;
|
|
918
955
|
// Annotate the CommonJS export names for ESM import in node:
|