@rymi/node 2.4.0 → 2.6.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 +51 -1
- package/dist/index.d.ts +51 -1
- package/dist/index.js +27 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -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, update and delete (`delete(id)`, empty workspaces only) 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. */
|
|
@@ -1465,6 +1508,10 @@ declare class WorkspacesResource {
|
|
|
1465
1508
|
ok: true;
|
|
1466
1509
|
}>;
|
|
1467
1510
|
/** Calls, minutes and credits for one month (default: this month, UTC). */
|
|
1511
|
+
/** Deletes an empty workspace (no agents, numbers, calls, campaigns or client workspaces). Owner only; never your first workspace. */
|
|
1512
|
+
delete(id: string): Promise<{
|
|
1513
|
+
ok: true;
|
|
1514
|
+
}>;
|
|
1468
1515
|
usage(id: string, params?: {
|
|
1469
1516
|
month?: string;
|
|
1470
1517
|
}): Promise<WorkspaceUsage>;
|
|
@@ -1485,6 +1532,7 @@ declare class WorkspacesResource {
|
|
|
1485
1532
|
|
|
1486
1533
|
declare class Rymi {
|
|
1487
1534
|
private client;
|
|
1535
|
+
private options?;
|
|
1488
1536
|
agents: AgentsResource;
|
|
1489
1537
|
calls: CallsResource;
|
|
1490
1538
|
dnc: DncResource;
|
|
@@ -1500,6 +1548,8 @@ declare class Rymi {
|
|
|
1500
1548
|
toolSecrets: ToolSecretsResource;
|
|
1501
1549
|
workspaces: WorkspacesResource;
|
|
1502
1550
|
constructor(options?: ClientOptions);
|
|
1551
|
+
/** The same client acting in another workspace: `rymi.withWorkspace(id).calls.create(…)`. */
|
|
1552
|
+
withWorkspace(workspace: string): Rymi;
|
|
1503
1553
|
}
|
|
1504
1554
|
|
|
1505
|
-
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 UpdateWorkspaceParams, type UsageSummary, type ValidatePublishParams, type WebhookProvisionResult, type WebhookRecord, WebhooksResource, type Workspace, type WorkspaceMember, type WorkspaceUsage, WorkspacesResource, Rymi as default };
|
|
1555
|
+
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. */
|
|
@@ -1465,6 +1508,10 @@ declare class WorkspacesResource {
|
|
|
1465
1508
|
ok: true;
|
|
1466
1509
|
}>;
|
|
1467
1510
|
/** Calls, minutes and credits for one month (default: this month, UTC). */
|
|
1511
|
+
/** Deletes an empty workspace (no agents, numbers, calls, campaigns or client workspaces). Owner only; never your first workspace. */
|
|
1512
|
+
delete(id: string): Promise<{
|
|
1513
|
+
ok: true;
|
|
1514
|
+
}>;
|
|
1468
1515
|
usage(id: string, params?: {
|
|
1469
1516
|
month?: string;
|
|
1470
1517
|
}): Promise<WorkspaceUsage>;
|
|
@@ -1485,6 +1532,7 @@ declare class WorkspacesResource {
|
|
|
1485
1532
|
|
|
1486
1533
|
declare class Rymi {
|
|
1487
1534
|
private client;
|
|
1535
|
+
private options?;
|
|
1488
1536
|
agents: AgentsResource;
|
|
1489
1537
|
calls: CallsResource;
|
|
1490
1538
|
dnc: DncResource;
|
|
@@ -1500,6 +1548,8 @@ declare class Rymi {
|
|
|
1500
1548
|
toolSecrets: ToolSecretsResource;
|
|
1501
1549
|
workspaces: WorkspacesResource;
|
|
1502
1550
|
constructor(options?: ClientOptions);
|
|
1551
|
+
/** The same client acting in another workspace: `rymi.withWorkspace(id).calls.create(…)`. */
|
|
1552
|
+
withWorkspace(workspace: string): Rymi;
|
|
1503
1553
|
}
|
|
1504
1554
|
|
|
1505
|
-
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 UpdateWorkspaceParams, type UsageSummary, type ValidatePublishParams, type WebhookProvisionResult, type WebhookRecord, WebhooksResource, type Workspace, type WorkspaceMember, type WorkspaceUsage, WorkspacesResource, Rymi as default };
|
|
1555
|
+
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
|
|
@@ -877,6 +893,10 @@ var WorkspacesResource = class {
|
|
|
877
893
|
return this.client.patch(`/workspaces/${encodeURIComponent(id)}`, data);
|
|
878
894
|
}
|
|
879
895
|
/** Calls, minutes and credits for one month (default: this month, UTC). */
|
|
896
|
+
/** Deletes an empty workspace (no agents, numbers, calls, campaigns or client workspaces). Owner only; never your first workspace. */
|
|
897
|
+
async delete(id) {
|
|
898
|
+
return this.client.delete(`/workspaces/${encodeURIComponent(id)}`);
|
|
899
|
+
}
|
|
880
900
|
async usage(id, params = {}) {
|
|
881
901
|
const query = params.month ? `?month=${encodeURIComponent(params.month)}` : "";
|
|
882
902
|
return this.client.get(`/workspaces/${encodeURIComponent(id)}/usage${query}`);
|
|
@@ -895,8 +915,9 @@ var WorkspacesResource = class {
|
|
|
895
915
|
|
|
896
916
|
// src/index.ts
|
|
897
917
|
__reExport(index_exports, require("@rymi/sdk-types"), module.exports);
|
|
898
|
-
var Rymi = class {
|
|
918
|
+
var Rymi = class _Rymi {
|
|
899
919
|
client;
|
|
920
|
+
options;
|
|
900
921
|
agents;
|
|
901
922
|
calls;
|
|
902
923
|
dnc;
|
|
@@ -912,6 +933,7 @@ var Rymi = class {
|
|
|
912
933
|
toolSecrets;
|
|
913
934
|
workspaces;
|
|
914
935
|
constructor(options) {
|
|
936
|
+
this.options = options;
|
|
915
937
|
this.client = new RymiClient(options);
|
|
916
938
|
this.agents = new AgentsResource(this.client);
|
|
917
939
|
this.calls = new CallsResource(this.client);
|
|
@@ -928,6 +950,10 @@ var Rymi = class {
|
|
|
928
950
|
this.toolSecrets = new ToolSecretsResource(this.client);
|
|
929
951
|
this.workspaces = new WorkspacesResource(this.client);
|
|
930
952
|
}
|
|
953
|
+
/** The same client acting in another workspace: `rymi.withWorkspace(id).calls.create(…)`. */
|
|
954
|
+
withWorkspace(workspace) {
|
|
955
|
+
return new _Rymi({ ...this.options, workspace });
|
|
956
|
+
}
|
|
931
957
|
};
|
|
932
958
|
var index_default = Rymi;
|
|
933
959
|
// Annotate the CommonJS export names for ESM import in node:
|