@rymi/node 2.5.0 → 2.7.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
@@ -73,7 +73,7 @@ The client exposes one namespace per resource group:
73
73
  | `calls` | Place, list, and observe calls; fetch transcripts and recordings |
74
74
  | `numbers` | Register and attach phone numbers |
75
75
  | `telephony` | Inspect carrier status and provisioned numbers |
76
- | `keys` | Manage publishable keys |
76
+ | `keys` | Create a secret key (`create({ kind, scopes, label })`, response field `key`) and read it (`self()`). Also manage publishable keys |
77
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 |
@@ -82,7 +82,8 @@ The client exposes one namespace per resource group:
82
82
  | `contacts` | Contacts and per-channel consent |
83
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 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. |
85
+ | `accounts` | List and rename accounts; `members.list`, `members.add`, `members.update`, `members.remove`; `workspaces(id)` for this month's calls, minutes, and credits |
86
+ | `workspaces` | List, create, update, and delete empty workspaces (`delete(id)`, account Owner; `cannot_delete_primary` for the primary). `usage(id, { month })`; `listMembers`, `addMember` (`admin`, `editor`, `client`, `viewer`), `removeMember`. Pass `workspace` (or `RYMI_WORKSPACE`), or call `withWorkspace(id)`. An account key may name any workspace in its account |
86
87
 
87
88
  ## 📖 Documentation
88
89
 
package/dist/index.d.mts CHANGED
@@ -779,9 +779,36 @@ interface CreatePublishableKeyParams {
779
779
  audience?: 'sdk' | 'landing_demo';
780
780
  default_from_number?: string | null;
781
781
  }
782
+ type SecretKeyKind = 'account' | 'workspace';
783
+ interface CreateSecretKeyParams {
784
+ kind: SecretKeyKind;
785
+ scopes: string[];
786
+ label?: string;
787
+ }
788
+ /** The raw `key` is returned only by `create`. */
789
+ interface CreatedSecretKey {
790
+ id: string;
791
+ key: string;
792
+ key_prefix: string;
793
+ kind: SecretKeyKind;
794
+ scopes: string[];
795
+ label: string | null;
796
+ created_at: string;
797
+ }
798
+ interface KeySelf {
799
+ kind: SecretKeyKind;
800
+ account_id: string | null;
801
+ workspace_id: string | null;
802
+ scopes: string[];
803
+ legacy: boolean;
804
+ }
782
805
  declare class KeysResource {
783
806
  private client;
784
807
  constructor(client: RymiClient);
808
+ /** Create a secret key. The raw `key` is returned only by this call. */
809
+ create(data: CreateSecretKeyParams): Promise<CreatedSecretKey>;
810
+ /** Kind, scopes, and legacy flag for the key authenticating this client. */
811
+ self(): Promise<KeySelf>;
785
812
  listPublishable(): Promise<{
786
813
  keys: PublishableKeyRecord[];
787
814
  }>;
@@ -1460,9 +1487,13 @@ declare class ToolSecretsResource {
1460
1487
  interface Workspace {
1461
1488
  id: string;
1462
1489
  name: string;
1463
- role: 'owner' | 'admin' | 'client';
1490
+ /** Effective workspace role. Null for a Billing member with no workspace role. */
1491
+ role: 'admin' | 'editor' | 'client' | 'viewer' | null;
1464
1492
  /** The agency, for a client workspace. */
1465
1493
  parent_id: string | null;
1494
+ account_id?: string | null;
1495
+ account_name?: string | null;
1496
+ account_role?: 'owner' | 'admin' | 'billing' | null;
1466
1497
  operating_country: string | null;
1467
1498
  /** Client workspaces only; absent for the client role. */
1468
1499
  spend_cap_cents_monthly?: number | null;
@@ -1472,6 +1503,8 @@ interface CreateWorkspaceParams {
1472
1503
  name: string;
1473
1504
  /** ISO-3166 alpha-2, e.g. "IN". */
1474
1505
  operating_country?: string | null;
1506
+ /** The account to create it in. Defaults to the current workspace's account. You must be its Owner or Admin. */
1507
+ account?: string;
1475
1508
  /** An agency workspace you run: makes this a client workspace that the agency pays for. */
1476
1509
  parent?: string;
1477
1510
  }
@@ -1493,7 +1526,7 @@ interface WorkspaceUsage {
1493
1526
  interface WorkspaceMember {
1494
1527
  user_id: string;
1495
1528
  email: string | null;
1496
- role: 'owner' | 'admin' | 'client';
1529
+ role: 'admin' | 'editor' | 'client' | 'viewer';
1497
1530
  }
1498
1531
  declare class WorkspacesResource {
1499
1532
  private client;
@@ -1508,16 +1541,20 @@ declare class WorkspacesResource {
1508
1541
  ok: true;
1509
1542
  }>;
1510
1543
  /** Calls, minutes and credits for one month (default: this month, UTC). */
1544
+ /** Deletes an empty workspace (no agents, numbers, calls, campaigns or client workspaces). Owner only; never your first workspace. */
1545
+ delete(id: string): Promise<{
1546
+ ok: true;
1547
+ }>;
1511
1548
  usage(id: string, params?: {
1512
1549
  month?: string;
1513
1550
  }): Promise<WorkspaceUsage>;
1514
1551
  listMembers(id: string): Promise<{
1515
1552
  members: WorkspaceMember[];
1516
1553
  }>;
1517
- /** Someone without a Rymi account gets an invite email. Client workspaces take the client role. */
1554
+ /** Someone without a Rymi account gets an invite email. Role is admin, editor, client, or viewer. */
1518
1555
  addMember(id: string, data: {
1519
1556
  email: string;
1520
- role?: 'admin' | 'client';
1557
+ role?: 'admin' | 'editor' | 'client' | 'viewer';
1521
1558
  }): Promise<{
1522
1559
  member: WorkspaceMember;
1523
1560
  }>;
@@ -1526,6 +1563,67 @@ declare class WorkspacesResource {
1526
1563
  }>;
1527
1564
  }
1528
1565
 
1566
+ type AccountRole = 'owner' | 'admin' | 'billing';
1567
+ interface Account {
1568
+ id: string;
1569
+ name: string;
1570
+ role: AccountRole | null;
1571
+ }
1572
+ interface AccountMember {
1573
+ user_id: string;
1574
+ email: string | null;
1575
+ role: AccountRole;
1576
+ }
1577
+ interface AccountWorkspace {
1578
+ id: string;
1579
+ name: string;
1580
+ calls: number;
1581
+ minutes: number;
1582
+ credits: number;
1583
+ spend_cap_cents_monthly: number | null;
1584
+ }
1585
+ declare class AccountMembersResource {
1586
+ private client;
1587
+ constructor(client: RymiClient);
1588
+ list(id: string): Promise<{
1589
+ members: AccountMember[];
1590
+ }>;
1591
+ add(id: string, data: {
1592
+ email: string;
1593
+ role: AccountRole;
1594
+ }): Promise<{
1595
+ member: AccountMember;
1596
+ }>;
1597
+ /** The answer carries no email. */
1598
+ update(id: string, userId: string, data: {
1599
+ role: AccountRole;
1600
+ }): Promise<{
1601
+ member: Pick<AccountMember, 'user_id' | 'role'>;
1602
+ }>;
1603
+ remove(id: string, userId: string): Promise<{
1604
+ ok: true;
1605
+ }>;
1606
+ }
1607
+ declare class AccountsResource {
1608
+ private client;
1609
+ members: AccountMembersResource;
1610
+ constructor(client: RymiClient);
1611
+ list(): Promise<{
1612
+ accounts: Account[];
1613
+ }>;
1614
+ get(id: string): Promise<{
1615
+ account: Account;
1616
+ }>;
1617
+ update(id: string, data: {
1618
+ name: string;
1619
+ }): Promise<{
1620
+ ok: true;
1621
+ }>;
1622
+ workspaces(id: string): Promise<{
1623
+ workspaces: AccountWorkspace[];
1624
+ }>;
1625
+ }
1626
+
1529
1627
  declare class Rymi {
1530
1628
  private client;
1531
1629
  private options?;
@@ -1543,9 +1641,10 @@ declare class Rymi {
1543
1641
  compliance: ComplianceResource;
1544
1642
  toolSecrets: ToolSecretsResource;
1545
1643
  workspaces: WorkspacesResource;
1644
+ accounts: AccountsResource;
1546
1645
  constructor(options?: ClientOptions);
1547
1646
  /** The same client acting in another workspace: `rymi.withWorkspace(id).calls.create(…)`. */
1548
1647
  withWorkspace(workspace: string): Rymi;
1549
1648
  }
1550
1649
 
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 };
1650
+ export { type Account, type AccountMember, type AccountRole, type AccountWorkspace, AccountsResource, type AddCampaignMembersParams, type AddKnowledgeSourceParams, type AgentCallListResponse, type AgentChange, type AgentKnowledgeSource, type AgentListResponse, type AgentShareLink, type AgentShareLinkSettings, type AgentTemplateSummary, AgentsResource, type ApplyChangesParams, type ApplyChangesResponse, type AttestParams, type AttestResponse, type Attestation, type BatchCallParams, BillingResource, type CallListResponse, type CallRecord, type CallingRules, CallsResource, type CampaignAttemptListResponse, type CampaignBatch, type CampaignBatchListResponse, type CampaignFollowupJob, type CampaignFollowupListResponse, type CampaignIntake, type CampaignIntakeSettings, type CampaignListResponse, type CampaignMemberListResponse, type CampaignReportResponse, type CampaignRoute, type CampaignRouteListResponse, type CampaignSuggestion, type CampaignSuggestionListResponse, CampaignsResource, type ChangeEntry, type ClientOptions, ComplianceResource, type ComplianceSettings, type ConnectTelephonyParams, type ContactListResponse, ContactsResource, type CreateAgentParams, type CreateCallParams, type CreateCallResponse, type CreateCampaignParams, type CreateCampaignRouteParams, type CreateContactParams, type CreateContactResponse, type CreatePublishableKeyParams, type CreateSecretKeyParams, type CreateWorkspaceParams, type CreatedSecretKey, type DncCheckResult, type DncEntry, type DncListResponse, DncResource, type EnrichCompanyParams, type EnrichCompanyResponse, type FanoutCallParams, type ImportCampaignMembersParams, type ImportCampaignMembersResponse, type ImportContactsParams, type ImportContactsResponse, type ImproveCampaignResponse, type KeySelf, KeysResource, type LaunchBlocker, type LaunchCampaignResponse, type ListAttestationsResponse, type ListCallsParams, type ListCampaignAttemptsParams, type ListCampaignBatchesParams, type ListCampaignFollowupsParams, type ListCampaignMembersParams, type ListCampaignRoutesParams, type ListCampaignSuggestionsParams, type ListCampaignsParams, type ListContactsParams, type NumberRecord, NumbersResource, type PreviewStackParams, type PublishAgentResponse, type PublishValidationIssue, type PublishableKeyRecord, Rymi, RymiClient, RymiError, type SecretKeyKind, type SetConsentParams, type SetConsentResponse, type TelephonyProvider, TelephonyResource, TemplatesResource, type ToolSecretRecord, ToolSecretsResource, type UpdateAgentParams, type UpdateCampaignMemberParams, type UpdateCampaignParams, type UpdateCampaignRouteParams, type UpdateContactParams, type UpdateWorkspaceParams, type UsageSummary, type ValidatePublishParams, type WebhookProvisionResult, type WebhookRecord, WebhooksResource, type Workspace, type WorkspaceMember, type WorkspaceUsage, WorkspacesResource, Rymi as default };
package/dist/index.d.ts CHANGED
@@ -779,9 +779,36 @@ interface CreatePublishableKeyParams {
779
779
  audience?: 'sdk' | 'landing_demo';
780
780
  default_from_number?: string | null;
781
781
  }
782
+ type SecretKeyKind = 'account' | 'workspace';
783
+ interface CreateSecretKeyParams {
784
+ kind: SecretKeyKind;
785
+ scopes: string[];
786
+ label?: string;
787
+ }
788
+ /** The raw `key` is returned only by `create`. */
789
+ interface CreatedSecretKey {
790
+ id: string;
791
+ key: string;
792
+ key_prefix: string;
793
+ kind: SecretKeyKind;
794
+ scopes: string[];
795
+ label: string | null;
796
+ created_at: string;
797
+ }
798
+ interface KeySelf {
799
+ kind: SecretKeyKind;
800
+ account_id: string | null;
801
+ workspace_id: string | null;
802
+ scopes: string[];
803
+ legacy: boolean;
804
+ }
782
805
  declare class KeysResource {
783
806
  private client;
784
807
  constructor(client: RymiClient);
808
+ /** Create a secret key. The raw `key` is returned only by this call. */
809
+ create(data: CreateSecretKeyParams): Promise<CreatedSecretKey>;
810
+ /** Kind, scopes, and legacy flag for the key authenticating this client. */
811
+ self(): Promise<KeySelf>;
785
812
  listPublishable(): Promise<{
786
813
  keys: PublishableKeyRecord[];
787
814
  }>;
@@ -1460,9 +1487,13 @@ declare class ToolSecretsResource {
1460
1487
  interface Workspace {
1461
1488
  id: string;
1462
1489
  name: string;
1463
- role: 'owner' | 'admin' | 'client';
1490
+ /** Effective workspace role. Null for a Billing member with no workspace role. */
1491
+ role: 'admin' | 'editor' | 'client' | 'viewer' | null;
1464
1492
  /** The agency, for a client workspace. */
1465
1493
  parent_id: string | null;
1494
+ account_id?: string | null;
1495
+ account_name?: string | null;
1496
+ account_role?: 'owner' | 'admin' | 'billing' | null;
1466
1497
  operating_country: string | null;
1467
1498
  /** Client workspaces only; absent for the client role. */
1468
1499
  spend_cap_cents_monthly?: number | null;
@@ -1472,6 +1503,8 @@ interface CreateWorkspaceParams {
1472
1503
  name: string;
1473
1504
  /** ISO-3166 alpha-2, e.g. "IN". */
1474
1505
  operating_country?: string | null;
1506
+ /** The account to create it in. Defaults to the current workspace's account. You must be its Owner or Admin. */
1507
+ account?: string;
1475
1508
  /** An agency workspace you run: makes this a client workspace that the agency pays for. */
1476
1509
  parent?: string;
1477
1510
  }
@@ -1493,7 +1526,7 @@ interface WorkspaceUsage {
1493
1526
  interface WorkspaceMember {
1494
1527
  user_id: string;
1495
1528
  email: string | null;
1496
- role: 'owner' | 'admin' | 'client';
1529
+ role: 'admin' | 'editor' | 'client' | 'viewer';
1497
1530
  }
1498
1531
  declare class WorkspacesResource {
1499
1532
  private client;
@@ -1508,16 +1541,20 @@ declare class WorkspacesResource {
1508
1541
  ok: true;
1509
1542
  }>;
1510
1543
  /** Calls, minutes and credits for one month (default: this month, UTC). */
1544
+ /** Deletes an empty workspace (no agents, numbers, calls, campaigns or client workspaces). Owner only; never your first workspace. */
1545
+ delete(id: string): Promise<{
1546
+ ok: true;
1547
+ }>;
1511
1548
  usage(id: string, params?: {
1512
1549
  month?: string;
1513
1550
  }): Promise<WorkspaceUsage>;
1514
1551
  listMembers(id: string): Promise<{
1515
1552
  members: WorkspaceMember[];
1516
1553
  }>;
1517
- /** Someone without a Rymi account gets an invite email. Client workspaces take the client role. */
1554
+ /** Someone without a Rymi account gets an invite email. Role is admin, editor, client, or viewer. */
1518
1555
  addMember(id: string, data: {
1519
1556
  email: string;
1520
- role?: 'admin' | 'client';
1557
+ role?: 'admin' | 'editor' | 'client' | 'viewer';
1521
1558
  }): Promise<{
1522
1559
  member: WorkspaceMember;
1523
1560
  }>;
@@ -1526,6 +1563,67 @@ declare class WorkspacesResource {
1526
1563
  }>;
1527
1564
  }
1528
1565
 
1566
+ type AccountRole = 'owner' | 'admin' | 'billing';
1567
+ interface Account {
1568
+ id: string;
1569
+ name: string;
1570
+ role: AccountRole | null;
1571
+ }
1572
+ interface AccountMember {
1573
+ user_id: string;
1574
+ email: string | null;
1575
+ role: AccountRole;
1576
+ }
1577
+ interface AccountWorkspace {
1578
+ id: string;
1579
+ name: string;
1580
+ calls: number;
1581
+ minutes: number;
1582
+ credits: number;
1583
+ spend_cap_cents_monthly: number | null;
1584
+ }
1585
+ declare class AccountMembersResource {
1586
+ private client;
1587
+ constructor(client: RymiClient);
1588
+ list(id: string): Promise<{
1589
+ members: AccountMember[];
1590
+ }>;
1591
+ add(id: string, data: {
1592
+ email: string;
1593
+ role: AccountRole;
1594
+ }): Promise<{
1595
+ member: AccountMember;
1596
+ }>;
1597
+ /** The answer carries no email. */
1598
+ update(id: string, userId: string, data: {
1599
+ role: AccountRole;
1600
+ }): Promise<{
1601
+ member: Pick<AccountMember, 'user_id' | 'role'>;
1602
+ }>;
1603
+ remove(id: string, userId: string): Promise<{
1604
+ ok: true;
1605
+ }>;
1606
+ }
1607
+ declare class AccountsResource {
1608
+ private client;
1609
+ members: AccountMembersResource;
1610
+ constructor(client: RymiClient);
1611
+ list(): Promise<{
1612
+ accounts: Account[];
1613
+ }>;
1614
+ get(id: string): Promise<{
1615
+ account: Account;
1616
+ }>;
1617
+ update(id: string, data: {
1618
+ name: string;
1619
+ }): Promise<{
1620
+ ok: true;
1621
+ }>;
1622
+ workspaces(id: string): Promise<{
1623
+ workspaces: AccountWorkspace[];
1624
+ }>;
1625
+ }
1626
+
1529
1627
  declare class Rymi {
1530
1628
  private client;
1531
1629
  private options?;
@@ -1543,9 +1641,10 @@ declare class Rymi {
1543
1641
  compliance: ComplianceResource;
1544
1642
  toolSecrets: ToolSecretsResource;
1545
1643
  workspaces: WorkspacesResource;
1644
+ accounts: AccountsResource;
1546
1645
  constructor(options?: ClientOptions);
1547
1646
  /** The same client acting in another workspace: `rymi.withWorkspace(id).calls.create(…)`. */
1548
1647
  withWorkspace(workspace: string): Rymi;
1549
1648
  }
1550
1649
 
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 };
1650
+ export { type Account, type AccountMember, type AccountRole, type AccountWorkspace, AccountsResource, type AddCampaignMembersParams, type AddKnowledgeSourceParams, type AgentCallListResponse, type AgentChange, type AgentKnowledgeSource, type AgentListResponse, type AgentShareLink, type AgentShareLinkSettings, type AgentTemplateSummary, AgentsResource, type ApplyChangesParams, type ApplyChangesResponse, type AttestParams, type AttestResponse, type Attestation, type BatchCallParams, BillingResource, type CallListResponse, type CallRecord, type CallingRules, CallsResource, type CampaignAttemptListResponse, type CampaignBatch, type CampaignBatchListResponse, type CampaignFollowupJob, type CampaignFollowupListResponse, type CampaignIntake, type CampaignIntakeSettings, type CampaignListResponse, type CampaignMemberListResponse, type CampaignReportResponse, type CampaignRoute, type CampaignRouteListResponse, type CampaignSuggestion, type CampaignSuggestionListResponse, CampaignsResource, type ChangeEntry, type ClientOptions, ComplianceResource, type ComplianceSettings, type ConnectTelephonyParams, type ContactListResponse, ContactsResource, type CreateAgentParams, type CreateCallParams, type CreateCallResponse, type CreateCampaignParams, type CreateCampaignRouteParams, type CreateContactParams, type CreateContactResponse, type CreatePublishableKeyParams, type CreateSecretKeyParams, type CreateWorkspaceParams, type CreatedSecretKey, type DncCheckResult, type DncEntry, type DncListResponse, DncResource, type EnrichCompanyParams, type EnrichCompanyResponse, type FanoutCallParams, type ImportCampaignMembersParams, type ImportCampaignMembersResponse, type ImportContactsParams, type ImportContactsResponse, type ImproveCampaignResponse, type KeySelf, KeysResource, type LaunchBlocker, type LaunchCampaignResponse, type ListAttestationsResponse, type ListCallsParams, type ListCampaignAttemptsParams, type ListCampaignBatchesParams, type ListCampaignFollowupsParams, type ListCampaignMembersParams, type ListCampaignRoutesParams, type ListCampaignSuggestionsParams, type ListCampaignsParams, type ListContactsParams, type NumberRecord, NumbersResource, type PreviewStackParams, type PublishAgentResponse, type PublishValidationIssue, type PublishableKeyRecord, Rymi, RymiClient, RymiError, type SecretKeyKind, type SetConsentParams, type SetConsentResponse, type TelephonyProvider, TelephonyResource, TemplatesResource, type ToolSecretRecord, ToolSecretsResource, type UpdateAgentParams, type UpdateCampaignMemberParams, type UpdateCampaignParams, type UpdateCampaignRouteParams, type UpdateContactParams, type UpdateWorkspaceParams, type UsageSummary, type ValidatePublishParams, type WebhookProvisionResult, type WebhookRecord, WebhooksResource, type Workspace, type WorkspaceMember, type WorkspaceUsage, WorkspacesResource, Rymi as default };
package/dist/index.js CHANGED
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  // src/index.ts
32
32
  var index_exports = {};
33
33
  __export(index_exports, {
34
+ AccountsResource: () => AccountsResource,
34
35
  AgentsResource: () => AgentsResource,
35
36
  BillingResource: () => BillingResource,
36
37
  CallsResource: () => CallsResource,
@@ -546,6 +547,14 @@ var KeysResource = class {
546
547
  constructor(client) {
547
548
  this.client = client;
548
549
  }
550
+ /** Create a secret key. The raw `key` is returned only by this call. */
551
+ async create(data) {
552
+ return this.client.post("/auth/api-keys", data);
553
+ }
554
+ /** Kind, scopes, and legacy flag for the key authenticating this client. */
555
+ async self() {
556
+ return this.client.get("/keys/self");
557
+ }
549
558
  async listPublishable() {
550
559
  return this.client.get("/keys/publishable");
551
560
  }
@@ -893,6 +902,10 @@ var WorkspacesResource = class {
893
902
  return this.client.patch(`/workspaces/${encodeURIComponent(id)}`, data);
894
903
  }
895
904
  /** Calls, minutes and credits for one month (default: this month, UTC). */
905
+ /** Deletes an empty workspace (no agents, numbers, calls, campaigns or client workspaces). Owner only; never your first workspace. */
906
+ async delete(id) {
907
+ return this.client.delete(`/workspaces/${encodeURIComponent(id)}`);
908
+ }
896
909
  async usage(id, params = {}) {
897
910
  const query = params.month ? `?month=${encodeURIComponent(params.month)}` : "";
898
911
  return this.client.get(`/workspaces/${encodeURIComponent(id)}/usage${query}`);
@@ -900,7 +913,7 @@ var WorkspacesResource = class {
900
913
  async listMembers(id) {
901
914
  return this.client.get(`/workspaces/${encodeURIComponent(id)}/members`);
902
915
  }
903
- /** Someone without a Rymi account gets an invite email. Client workspaces take the client role. */
916
+ /** Someone without a Rymi account gets an invite email. Role is admin, editor, client, or viewer. */
904
917
  async addMember(id, data) {
905
918
  return this.client.post(`/workspaces/${encodeURIComponent(id)}/members`, data);
906
919
  }
@@ -909,6 +922,45 @@ var WorkspacesResource = class {
909
922
  }
910
923
  };
911
924
 
925
+ // src/resources/accounts.ts
926
+ var AccountMembersResource = class {
927
+ constructor(client) {
928
+ this.client = client;
929
+ }
930
+ async list(id) {
931
+ return this.client.get(`/accounts/${encodeURIComponent(id)}/members`);
932
+ }
933
+ async add(id, data) {
934
+ return this.client.post(`/accounts/${encodeURIComponent(id)}/members`, data);
935
+ }
936
+ /** The answer carries no email. */
937
+ async update(id, userId, data) {
938
+ return this.client.patch(`/accounts/${encodeURIComponent(id)}/members/${encodeURIComponent(userId)}`, data);
939
+ }
940
+ async remove(id, userId) {
941
+ return this.client.delete(`/accounts/${encodeURIComponent(id)}/members/${encodeURIComponent(userId)}`);
942
+ }
943
+ };
944
+ var AccountsResource = class {
945
+ constructor(client) {
946
+ this.client = client;
947
+ this.members = new AccountMembersResource(client);
948
+ }
949
+ members;
950
+ async list() {
951
+ return this.client.get("/accounts");
952
+ }
953
+ async get(id) {
954
+ return this.client.get(`/accounts/${encodeURIComponent(id)}`);
955
+ }
956
+ async update(id, data) {
957
+ return this.client.patch(`/accounts/${encodeURIComponent(id)}`, data);
958
+ }
959
+ async workspaces(id) {
960
+ return this.client.get(`/accounts/${encodeURIComponent(id)}/workspaces`);
961
+ }
962
+ };
963
+
912
964
  // src/index.ts
913
965
  __reExport(index_exports, require("@rymi/sdk-types"), module.exports);
914
966
  var Rymi = class _Rymi {
@@ -928,6 +980,7 @@ var Rymi = class _Rymi {
928
980
  compliance;
929
981
  toolSecrets;
930
982
  workspaces;
983
+ accounts;
931
984
  constructor(options) {
932
985
  this.options = options;
933
986
  this.client = new RymiClient(options);
@@ -945,6 +998,7 @@ var Rymi = class _Rymi {
945
998
  this.compliance = new ComplianceResource(this.client);
946
999
  this.toolSecrets = new ToolSecretsResource(this.client);
947
1000
  this.workspaces = new WorkspacesResource(this.client);
1001
+ this.accounts = new AccountsResource(this.client);
948
1002
  }
949
1003
  /** The same client acting in another workspace: `rymi.withWorkspace(id).calls.create(…)`. */
950
1004
  withWorkspace(workspace) {
@@ -954,6 +1008,7 @@ var Rymi = class _Rymi {
954
1008
  var index_default = Rymi;
955
1009
  // Annotate the CommonJS export names for ESM import in node:
956
1010
  0 && (module.exports = {
1011
+ AccountsResource,
957
1012
  AgentsResource,
958
1013
  BillingResource,
959
1014
  CallsResource,