domani 1.0.1 → 1.0.2

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.
Files changed (3) hide show
  1. package/dist/index.d.ts +648 -19
  2. package/dist/index.js +184 -4
  3. package/package.json +19 -6
package/dist/index.d.ts CHANGED
@@ -18,7 +18,7 @@ export interface Error {
18
18
  /** Human-readable error message */
19
19
  error: string;
20
20
  /** Machine-readable error code */
21
- code: "MISSING_API_KEY" | "INVALID_API_KEY" | "EXPIRED_API_KEY" | "MISSING_PARAMETER" | "INVALID_DOMAIN" | "PAYMENT_REQUIRED" | "DOMAIN_UNAVAILABLE" | "RATE_LIMIT_EXCEEDED" | "USER_EXISTS" | "NOT_FOUND" | "UNKNOWN_PROVIDER" | "UNKNOWN_METHOD" | "TARGET_REQUIRED" | "INVALID_PARAMETER" | "CONTACT_REQUIRED" | "INVALID_CONTACT" | "INSUFFICIENT_SCOPE" | "SCOPE_ESCALATION" | "DOMAIN_EXISTS" | "DOMAIN_NOT_ACTIVE" | "UNSUPPORTED_TLD" | "NOT_AVAILABLE" | "ALREADY_REGISTERED" | "TRANSFER_NOT_ELIGIBLE" | "ALREADY_LISTED" | "LISTING_SOLD" | "SELF_PURCHASE" | "DESCRIPTION_TOO_LONG" | "DEAL_NOT_FOUND" | "INVALID_DEAL_STATE" | "EPP_ATTEMPTS_EXCEEDED" | "ACTIVE_DEAL_EXISTS";
21
+ code: "MISSING_API_KEY" | "INVALID_API_KEY" | "EXPIRED_API_KEY" | "MISSING_PARAMETER" | "INVALID_DOMAIN" | "PAYMENT_REQUIRED" | "DOMAIN_UNAVAILABLE" | "RATE_LIMIT_EXCEEDED" | "USER_EXISTS" | "NOT_FOUND" | "UNKNOWN_PROVIDER" | "UNKNOWN_METHOD" | "TARGET_REQUIRED" | "INVALID_PARAMETER" | "CONTACT_REQUIRED" | "INVALID_CONTACT" | "INSUFFICIENT_SCOPE" | "SCOPE_ESCALATION" | "DOMAIN_EXISTS" | "DOMAIN_NOT_ACTIVE" | "UNSUPPORTED_TLD" | "NOT_AVAILABLE" | "ALREADY_REGISTERED" | "TRANSFER_NOT_ELIGIBLE" | "ALREADY_LISTED" | "LISTING_SOLD" | "SELF_PURCHASE" | "DESCRIPTION_TOO_LONG" | "DEAL_NOT_FOUND" | "INVALID_DEAL_STATE" | "EPP_ATTEMPTS_EXCEEDED" | "ACTIVE_DEAL_EXISTS" | "AGENT_IDENTITY_NOT_FOUND" | "AGENT_IDENTITY_ESCALATION" | "CREDENTIAL_REVOKE_FAILED";
22
22
  /** Actionable recovery guidance for the caller */
23
23
  hint?: string;
24
24
  /** CLI command to resolve the error (e.g. 'domani login', 'domani billing'). Present in CLI --json output. */
@@ -64,23 +64,52 @@ export interface TldInfo {
64
64
  transfer: number;
65
65
  }
66
66
  export interface DnsRecord {
67
- /** DNS record type */
68
- type: "A" | "AAAA" | "CNAME" | "MX" | "TXT" | "NS" | "SRV" | "CAA";
69
- /** Record name (@ for root, or subdomain) */
67
+ /** DNS record type. TLSA publishes a DANE record; its value is the rdata 'usage selector matching-type hex-data'. */
68
+ type: "A" | "AAAA" | "CNAME" | "MX" | "TXT" | "NS" | "SRV" | "CAA" | "TLSA";
69
+ /** Record name (@ for root, or subdomain, e.g. _443._tcp for TLSA) */
70
70
  name: string;
71
- /** Record value (IP address, hostname, etc.) */
71
+ /** Record value (IP address, hostname, or TLSA rdata like '3 1 1 abc123...') */
72
72
  value: string;
73
73
  /** Time to live in seconds */
74
74
  ttl: number;
75
75
  /** Priority value (required for MX records) */
76
76
  priority?: number;
77
77
  }
78
+ export interface DsRecord {
79
+ /** Key Tag identifying the DNSKEY */
80
+ keyTag: string;
81
+ /** DNSSEC algorithm number (e.g. 13 = ECDSAP256SHA256, 8 = RSASHA256) */
82
+ algorithm: string;
83
+ /** Digest type number (e.g. 2 = SHA-256) */
84
+ digestType: string;
85
+ /** Hex digest of the DNSKEY */
86
+ digest: string;
87
+ }
88
+ export interface AgentIdentity {
89
+ /** Stable identity id used to bind scoped API tokens */
90
+ id: string;
91
+ slug: string;
92
+ /** The identity subdomain (canonical) */
93
+ url: string;
94
+ /** Path fallback that always works */
95
+ page_url: string;
96
+ name: string | null;
97
+ bio: string | null;
98
+ emoji: string | null;
99
+ email: string | null;
100
+ links: {
101
+ label?: string;
102
+ url?: string;
103
+ }[];
104
+ views: number;
105
+ created_at: string;
106
+ }
78
107
  export interface DomainRecord {
79
108
  domain: string;
80
109
  /** Current registration status */
81
110
  status: "active" | "expired" | "pending";
82
111
  /** Whether auto-renew is enabled */
83
- auto_renew: boolean;
112
+ autoRenew: boolean;
84
113
  purchasedAt: string;
85
114
  expiresAt: string;
86
115
  /** Whether email is set up for this domain */
@@ -92,6 +121,110 @@ export interface DomainRecord {
92
121
  /** Number of mailboxes configured for this domain */
93
122
  mailboxCount: number;
94
123
  }
124
+ export interface MailRule {
125
+ id?: string;
126
+ /** Lower runs first */
127
+ priority?: number;
128
+ match_field?: "from" | "to" | "subject" | "body";
129
+ match_op?: "contains" | "equals" | "regex";
130
+ match_value?: string;
131
+ action?: "drop" | "mark_read" | "forward" | "webhook_only" | "label";
132
+ action_arg?: string | null;
133
+ enabled?: boolean;
134
+ created_at?: string;
135
+ }
136
+ export interface WorkspaceSummary {
137
+ id: string;
138
+ name: string;
139
+ role: "owner" | "admin" | "member";
140
+ personal: boolean;
141
+ member_count: number;
142
+ mailbox_count: number;
143
+ plans: {
144
+ product: string;
145
+ plan: string;
146
+ status: string;
147
+ }[];
148
+ created_at: string;
149
+ }
150
+ export interface WorkspaceDetail {
151
+ id: string;
152
+ name: string;
153
+ role: "owner" | "admin" | "member";
154
+ personal: boolean;
155
+ members: {
156
+ id?: string;
157
+ email?: string;
158
+ role?: "owner" | "admin" | "member";
159
+ joined_at?: string;
160
+ mailbox_grants?: {
161
+ mailbox_id?: string;
162
+ address?: string;
163
+ role?: "viewer" | "responder" | "manager";
164
+ }[];
165
+ }[];
166
+ /** Visible only to workspace owners and admins. */
167
+ invitations: {
168
+ id?: string;
169
+ email?: string;
170
+ role?: "admin" | "member";
171
+ expires_at?: string;
172
+ }[];
173
+ mailboxes: {
174
+ id?: string;
175
+ address?: string;
176
+ name?: string | null;
177
+ }[];
178
+ ownership: {
179
+ owner_membership_id: string | null;
180
+ pending_transfer: {
181
+ id: string;
182
+ to_email: string;
183
+ expires_at: string;
184
+ } | null;
185
+ };
186
+ }
187
+ export interface ConversationState {
188
+ id: string;
189
+ mailbox_id: string;
190
+ thread_key: string;
191
+ subject?: string | null;
192
+ status: "open" | "waiting" | "closed";
193
+ assignee?: {
194
+ type?: "member" | "token" | "agent";
195
+ id?: string;
196
+ label?: string;
197
+ } | null;
198
+ version: number;
199
+ note_count: number;
200
+ assigned_to_me?: boolean;
201
+ last_activity_at: string;
202
+ created_at: string;
203
+ updated_at: string;
204
+ }
205
+ export interface ConversationNote {
206
+ id: string;
207
+ author: {
208
+ type: string;
209
+ id: string;
210
+ label: string;
211
+ };
212
+ body: string;
213
+ mentions: Record<string, unknown>[];
214
+ created_at: string;
215
+ updated_at: string;
216
+ }
217
+ export interface MailActivity {
218
+ id: string;
219
+ type: string;
220
+ actor: {
221
+ type: string;
222
+ id: string;
223
+ label: string;
224
+ };
225
+ metadata: Record<string, unknown>;
226
+ created_at: string;
227
+ }
95
228
  export interface Backorder {
96
229
  id?: string;
97
230
  domain?: string;
@@ -190,6 +323,10 @@ export interface DomainDetail {
190
323
  payment_method: "card" | "x402" | "crypto";
191
324
  /** On-chain tx hash (USDC payments) */
192
325
  payment_tx?: string | null;
326
+ /** Whether live registrar data was refreshed or is managed externally */
327
+ registrar_status: "connected" | "unavailable" | "external";
328
+ /** When the registrar refresh was attempted */
329
+ registrar_checked_at: string;
193
330
  /** Domain registration details (null if unavailable) */
194
331
  registrar?: {
195
332
  security_lock?: boolean;
@@ -215,6 +352,20 @@ export interface TokenInfo {
215
352
  /** Permission scopes granted to this token. ['*'] means full access. */
216
353
  scopes?: string[];
217
354
  createdAt: string;
355
+ /** Per-transaction spend cap in USD (null = uncapped) */
356
+ max_per_tx?: number | null;
357
+ /** Rolling monthly spend cap in USD (null = uncapped) */
358
+ max_per_month?: number | null;
359
+ /** USD spent against the monthly cap this calendar month */
360
+ spent_this_month?: number;
361
+ /** Id of the token that minted this one (null = created via dashboard/session) */
362
+ parent_token_id?: string | null;
363
+ /** Agent identity represented by this token. Its mail actions are attributed to this agent. */
364
+ agent_identity?: {
365
+ id?: string;
366
+ name?: string | null;
367
+ slug?: string;
368
+ } | null;
218
369
  }
219
370
  export interface Contact {
220
371
  /** Contact name */
@@ -292,6 +443,26 @@ export declare class Domani {
292
443
  query?: Record<string, unknown>;
293
444
  body?: unknown;
294
445
  }): Promise<T>;
446
+ /** Accept a workspace invitation (POST /api/workspaces/invitations/accept) */
447
+ acceptWorkspaceInvitation(body: {
448
+ token: string;
449
+ }): Promise<unknown>;
450
+ /** Accept workspace ownership (POST /api/workspaces/ownership-transfers/accept) */
451
+ acceptWorkspaceOwnershipTransfer(body: {
452
+ token: string;
453
+ }): Promise<unknown>;
454
+ /** Add a private conversation note (POST /api/email/collaboration/{id}/notes) */
455
+ addConversationNote(id: string, body: {
456
+ body: string;
457
+ mention_membership_ids?: string[];
458
+ }): Promise<ConversationNote>;
459
+ /** Publish a DNSSEC DS record (enable DNSSEC) (POST /api/domains/{domain}/dnssec) */
460
+ addDnssecRecord(domain: string, body: DsRecord): Promise<{
461
+ success?: boolean;
462
+ domain?: string;
463
+ enabled?: boolean;
464
+ records?: DsRecord[];
465
+ }>;
295
466
  /** Add a mailbox alias (POST /api/emails/{address}/aliases) */
296
467
  addMailboxAlias(address: string, body: {
297
468
  alias: string;
@@ -301,6 +472,16 @@ export declare class Domani {
301
472
  created_at?: string;
302
473
  hint?: string;
303
474
  }>;
475
+ /** Add an inbound mail rule (POST /api/emails/{address}/rules) */
476
+ addMailRule(address: string, body: {
477
+ match_field: "from" | "to" | "subject" | "body";
478
+ match_op: "contains" | "equals" | "regex";
479
+ match_value: string;
480
+ action: "drop" | "mark_read" | "forward" | "webhook_only" | "label";
481
+ action_arg?: string;
482
+ priority?: number;
483
+ enabled?: boolean;
484
+ }): Promise<MailRule>;
304
485
  /** Add a suppression (POST /api/suppressions) */
305
486
  addSuppression(body: {
306
487
  address: string;
@@ -312,6 +493,27 @@ export declare class Domani {
312
493
  created_at?: string;
313
494
  hint?: string;
314
495
  }>;
496
+ /** Adopt an owned mailbox into a workspace (POST /api/workspaces/{id}/mailboxes) */
497
+ attachWorkspaceMailbox(id: string, body: {
498
+ mailbox_id: string;
499
+ }): Promise<unknown>;
500
+ /** Buy an aftermarket domain (POST /api/domains/{domain}/buy-aftermarket) */
501
+ buyAftermarket(domain: string, body?: {
502
+ max_price?: number;
503
+ payment_method?: "card" | "usdc" | "balance";
504
+ payment_tx?: string;
505
+ payment_chain?: "base" | "ethereum";
506
+ }): Promise<{
507
+ domain: string;
508
+ status: string;
509
+ price: number;
510
+ currency: string;
511
+ payment_method: string;
512
+ payment_tx?: string;
513
+ marketplace: string;
514
+ hint?: string;
515
+ next_steps?: string[];
516
+ }>;
315
517
  /** Purchase one or more domains (POST /api/domains/buy) */
316
518
  buyDomain(body: {
317
519
  domain?: string;
@@ -320,6 +522,7 @@ export declare class Domani {
320
522
  payment_tx?: string;
321
523
  payment_chain?: "base" | "ethereum";
322
524
  years?: number;
525
+ max_price?: number;
323
526
  ref?: string;
324
527
  }): Promise<{
325
528
  domain?: string;
@@ -352,6 +555,11 @@ export declare class Domani {
352
555
  cancelNegotiation(id: string): Promise<{
353
556
  cancelled?: boolean;
354
557
  }>;
558
+ /** Cancel a Mailzero workspace subscription (POST /api/workspaces/{id}/billing/cancel) */
559
+ cancelWorkspaceSubscription(id: string): Promise<{
560
+ message: string;
561
+ cancel_at?: string | null;
562
+ }>;
355
563
  /** Check email DNS health (MX, SPF, DMARC, DKIM) (GET /api/domains/{domain}/email/check) */
356
564
  checkEmail(domain: string): Promise<{
357
565
  domain?: string;
@@ -373,6 +581,26 @@ export declare class Domani {
373
581
  selectors?: string[];
374
582
  };
375
583
  }>;
584
+ /** Preflight an outbound email (POST /api/emails/{address}/deliverability-check) */
585
+ checkEmailDeliverabilityByAddress(address: string, body: unknown | unknown): Promise<{
586
+ policy_version: string;
587
+ decision: "allow" | "allow_with_warnings" | "deny";
588
+ safe_to_send: boolean;
589
+ risk: "low" | "medium" | "high" | "blocked";
590
+ score: number;
591
+ authentication_message?: boolean;
592
+ checks: {
593
+ id: string;
594
+ category: "transport_safety" | "credential_safety" | "reputation" | "content_quality" | "reliability";
595
+ status: "pass" | "warning" | "blocked";
596
+ message: string;
597
+ fix?: string;
598
+ evidence?: string[];
599
+ }[];
600
+ blocked_reasons: string[];
601
+ warnings: string[];
602
+ override_used?: boolean;
603
+ }>;
376
604
  /** Pre-check transfer eligibility (GET /api/domains/transfer-check) */
377
605
  checkTransferEligibility(query?: {
378
606
  domain: string;
@@ -393,7 +621,32 @@ export declare class Domani {
393
621
  status: "pending_owner" | "pending_admin" | "pending_registry" | "completed" | "cancelled" | "unknown";
394
622
  timestamp?: string;
395
623
  hint: string;
624
+ continuity?: {
625
+ strategy?: "preserve_nameservers";
626
+ expected_nameservers?: string[];
627
+ dns_provider?: string;
628
+ dnssec_enabled?: boolean;
629
+ verification?: {
630
+ status?: "verified" | "repaired" | "degraded" | "unknown";
631
+ nameserversPreserved?: boolean | null;
632
+ dnssecPreserved?: boolean | null;
633
+ repairedNameservers?: boolean;
634
+ warnings?: string[];
635
+ };
636
+ };
396
637
  }>;
638
+ /** Claim a free agent identity (<handle>.domani.run) (POST /api/agents/identity) */
639
+ claimIdentity(body: {
640
+ slug: string;
641
+ name?: string;
642
+ bio?: string;
643
+ emoji?: string;
644
+ email?: string;
645
+ links?: {
646
+ label?: string;
647
+ url?: string;
648
+ }[];
649
+ }): Promise<AgentIdentity>;
397
650
  /** Clear domain catch-all (DELETE /api/domains/{domain}/email/catch-all) */
398
651
  clearCatchAll(domain: string): Promise<{
399
652
  domain?: string;
@@ -405,11 +658,23 @@ export declare class Domani {
405
658
  domain?: string;
406
659
  redirect_url?: string | null;
407
660
  }>;
661
+ /** Clone another domain's DNS onto this one (POST /api/domains/{domain}/dns/clone) */
662
+ cloneDns(domain: string, body: {
663
+ from: string;
664
+ replace?: boolean;
665
+ }): Promise<{
666
+ success?: boolean;
667
+ from_domain?: string;
668
+ to_domain?: string;
669
+ records?: DnsRecord[];
670
+ }>;
408
671
  /** Connect a domain to a hosting or email provider (POST /api/domains/{domain}/connect) */
409
672
  connectDomain(domain: string, body: {
410
673
  target?: string;
411
674
  provider?: string;
412
675
  method?: string;
676
+ dry_run?: boolean;
677
+ confirm_replace_mx?: boolean;
413
678
  }): Promise<{
414
679
  domain?: string;
415
680
  provider?: string;
@@ -417,9 +682,10 @@ export declare class Domani {
417
682
  method?: string;
418
683
  records?: DnsRecord[];
419
684
  docs?: string;
420
- status?: "dns_set" | "manual_setup_required";
685
+ status?: "dns_set" | "manual_setup_required" | "dry_run";
421
686
  hint?: string;
422
687
  next_steps?: string[];
688
+ diff?: Record<string, unknown>;
423
689
  }>;
424
690
  /** Place a backorder on a taken domain (POST /api/backorders) */
425
691
  createBackorder(body: {
@@ -473,26 +739,42 @@ export declare class Domani {
473
739
  domain?: string;
474
740
  }>;
475
741
  /** Create a mailbox (POST /api/emails) */
476
- createMailboxByAddress(body?: {
742
+ createMailboxByAddress(body: {
477
743
  address: string;
478
744
  name?: string;
479
745
  force?: boolean;
746
+ kind?: "api" | "hosted";
747
+ workspace_id?: string;
480
748
  }): Promise<{
481
749
  id?: string;
482
750
  address?: string;
483
751
  name?: string | null;
484
752
  domain?: string;
485
753
  slug?: string;
754
+ workspace_id?: string | null;
486
755
  webhook_url?: string | null;
487
756
  forward_to?: string | null;
488
757
  signing_secret?: string;
489
758
  }>;
759
+ /** Create an app password (hosted) (POST /api/emails/{address}/credentials) */
760
+ createMailboxCredential(address: string, body?: {
761
+ label?: string;
762
+ }): Promise<{
763
+ id?: string;
764
+ label?: string;
765
+ password?: string;
766
+ client_settings?: Record<string, unknown>;
767
+ hint?: string;
768
+ }>;
490
769
  /** Create a new API token (POST /api/tokens) */
491
770
  createToken(body: {
492
771
  name?: string;
493
772
  expires_in?: number;
494
773
  expires_at?: string;
495
774
  scopes?: string[];
775
+ max_per_tx?: number;
776
+ max_per_month?: number;
777
+ agent_identity_id?: string;
496
778
  }): Promise<{
497
779
  id?: string;
498
780
  name?: string;
@@ -500,6 +782,13 @@ export declare class Domani {
500
782
  expiresAt?: string | null;
501
783
  scopes?: string[];
502
784
  createdAt?: string;
785
+ max_per_tx?: number | null;
786
+ max_per_month?: number | null;
787
+ agent_identity?: {
788
+ id?: string;
789
+ name?: string | null;
790
+ slug?: string;
791
+ } | null;
503
792
  }>;
504
793
  /** Create webhook (POST /api/webhooks) */
505
794
  createWebhook(body: {
@@ -514,11 +803,32 @@ export declare class Domani {
514
803
  created_at?: string;
515
804
  hint?: string;
516
805
  }>;
517
- /** Delete account and all associated data (DELETE /api/me) */
806
+ /** Create a workspace (POST /api/workspaces) */
807
+ createWorkspace(body: {
808
+ name: string;
809
+ }): Promise<unknown>;
810
+ /** Start Mailzero workspace checkout (POST /api/workspaces/{id}/billing/checkout) */
811
+ createWorkspaceCheckout(id: string, body: {
812
+ plan: "mail_solo" | "mail_team" | "mail_business";
813
+ }): Promise<{
814
+ url?: string | null;
815
+ workspace_id: string;
816
+ plan: string;
817
+ }>;
818
+ /** Delete account (blocked while domains are held) (DELETE /api/me) */
518
819
  deleteAccount(): Promise<{
519
820
  deleted?: boolean;
520
821
  hint?: string;
521
822
  }>;
823
+ /** Remove a DNSSEC DS record (disable DNSSEC) (DELETE /api/domains/{domain}/dnssec) */
824
+ deleteDnssecRecord(domain: string, query?: {
825
+ keyTag: string;
826
+ }): Promise<{
827
+ success?: boolean;
828
+ domain?: string;
829
+ enabled?: boolean;
830
+ records?: DsRecord[];
831
+ }>;
522
832
  /** Delete a mailbox (DELETE /api/emails/{address}) */
523
833
  deleteMailboxByAddress(address: string, body?: {
524
834
  confirm?: boolean;
@@ -633,6 +943,13 @@ export declare class Domani {
633
943
  getDnsRecords(domain: string): Promise<{
634
944
  domain?: string;
635
945
  records?: DnsRecord[];
946
+ zone_version?: string;
947
+ }>;
948
+ /** List DNSSEC DS records for a domain you own (GET /api/domains/{domain}/dnssec) */
949
+ getDnssecRecords(domain: string): Promise<{
950
+ domain?: string;
951
+ enabled?: boolean;
952
+ records?: DsRecord[];
636
953
  }>;
637
954
  /** Check email DNS status (GET /api/domains/{domain}/email/status) */
638
955
  getDomainEmailStatus(domain: string): Promise<{
@@ -674,6 +991,51 @@ export declare class Domani {
674
991
  mx?: string[];
675
992
  };
676
993
  }>;
994
+ /** Get owner-scoped email deliverability health (GET /api/domains/{domain}/email/deliverability) */
995
+ getEmailDeliverability(domain: string): Promise<{
996
+ domain: string;
997
+ status: "healthy" | "limited_data" | "needs_attention" | "at_risk" | "paused";
998
+ confidence: "none" | "limited" | "sufficient";
999
+ checked_at: string;
1000
+ window_days?: number;
1001
+ readiness: {
1002
+ score?: number;
1003
+ configured?: number;
1004
+ total?: number;
1005
+ provider?: string | null;
1006
+ checks?: {
1007
+ id?: string;
1008
+ label?: string;
1009
+ configured?: boolean;
1010
+ }[];
1011
+ };
1012
+ sending_health: {
1013
+ recipients?: Record<string, unknown>;
1014
+ rates?: {
1015
+ bounce?: number;
1016
+ complaint?: number;
1017
+ };
1018
+ paused?: boolean;
1019
+ pause_reason?: string | null;
1020
+ account_suppressions?: number;
1021
+ };
1022
+ placement: {
1023
+ available?: boolean;
1024
+ last_checked_at?: string | null;
1025
+ providers?: {
1026
+ provider?: "gmail" | "outlook" | "yahoo";
1027
+ status?: "inbox" | "spam" | "missing" | "not_tested";
1028
+ }[];
1029
+ note?: string;
1030
+ };
1031
+ actions: {
1032
+ id?: string;
1033
+ severity?: "info" | "warning" | "critical";
1034
+ title?: string;
1035
+ detail?: string;
1036
+ }[];
1037
+ caveats?: string[];
1038
+ }>;
677
1039
  /** Get mailbox avatar info (GET /api/emails/{address}/avatar) */
678
1040
  getMailboxAvatarByAddress(address: string): Promise<{
679
1041
  address?: string;
@@ -688,12 +1050,34 @@ export declare class Domani {
688
1050
  address?: string;
689
1051
  slug?: string;
690
1052
  domain?: string;
1053
+ kind?: string;
1054
+ workspace_id?: string | null;
1055
+ access_role?: "viewer" | "responder" | "manager";
691
1056
  webhook_url?: string | null;
692
1057
  forward_to?: string | null;
693
- signing_secret?: string;
1058
+ signing_secret?: string | null;
694
1059
  message_count?: number;
1060
+ storage_quota_bytes?: number | null;
1061
+ storage_used_bytes?: number | null;
1062
+ storage_measured_at?: string | null;
695
1063
  created_at?: string;
696
1064
  }>;
1065
+ /** Get mail client settings (hosted) (GET /api/emails/{address}/client-settings) */
1066
+ getMailboxClientSettings(address: string): Promise<{
1067
+ mailbox?: string;
1068
+ username?: string;
1069
+ imap?: {
1070
+ host?: string;
1071
+ port?: number;
1072
+ security?: string;
1073
+ };
1074
+ smtp?: {
1075
+ host?: string;
1076
+ port?: number;
1077
+ security?: string;
1078
+ };
1079
+ hint?: string;
1080
+ }>;
697
1081
  /** Get mailbox webhook config (GET /api/emails/{address}/webhook) */
698
1082
  getMailboxWebhook(address: string): Promise<{
699
1083
  address?: string;
@@ -752,6 +1136,7 @@ export declare class Domani {
752
1136
  channel?: "in_app" | "email";
753
1137
  enabled?: boolean;
754
1138
  }[];
1139
+ expiry_alert_days?: number[];
755
1140
  }>;
756
1141
  /** Get parking analytics (GET /api/domains/{domain}/analytics) */
757
1142
  getParkingAnalytics(domain: string): Promise<{
@@ -828,6 +1213,8 @@ export declare class Domani {
828
1213
  }[];
829
1214
  hint?: string;
830
1215
  }>;
1216
+ /** Get workspace members and mailboxes (GET /api/workspaces/{id}) */
1217
+ getWorkspace(id: string): Promise<WorkspaceDetail>;
831
1218
  /** Import an external domain (POST /api/domains/import) */
832
1219
  importDomain(body: {
833
1220
  domain: string;
@@ -842,6 +1229,33 @@ export declare class Domani {
842
1229
  };
843
1230
  hint?: string;
844
1231
  }>;
1232
+ /** Invite a workspace member (POST /api/workspaces/{id}/invitations) */
1233
+ inviteWorkspaceMember(id: string, body: {
1234
+ email: string;
1235
+ role?: "admin" | "member";
1236
+ mailbox_ids?: string[];
1237
+ mailbox_role?: "viewer" | "responder" | "manager";
1238
+ }): Promise<unknown>;
1239
+ /** Leave a workspace (DELETE /api/workspaces/{id}/members/me) */
1240
+ leaveWorkspace(id: string): Promise<unknown>;
1241
+ /** List security audit events (GET /api/audit) */
1242
+ listAuditEvents(query?: {
1243
+ limit?: number;
1244
+ cursor?: string;
1245
+ type?: string;
1246
+ }): Promise<{
1247
+ events?: {
1248
+ id?: string;
1249
+ tokenId?: string | null;
1250
+ type?: string;
1251
+ targetType?: string | null;
1252
+ targetId?: string | null;
1253
+ metadata?: Record<string, unknown>;
1254
+ createdAt?: string;
1255
+ }[];
1256
+ next_cursor?: string | null;
1257
+ hint?: string;
1258
+ }>;
845
1259
  /** List your backorders (GET /api/backorders) */
846
1260
  listBackorders(query?: {
847
1261
  status?: "watching" | "caught" | "failed" | "cancelled" | "expired";
@@ -862,6 +1276,22 @@ export declare class Domani {
862
1276
  email?: Record<string, unknown>[];
863
1277
  };
864
1278
  }>;
1279
+ /** List attributed conversation activity (GET /api/email/collaboration/{id}/activity) */
1280
+ listConversationActivity(id: string): Promise<{
1281
+ activity: MailActivity[];
1282
+ }>;
1283
+ /** List private conversation notes (GET /api/email/collaboration/{id}/notes) */
1284
+ listConversationNotes(id: string): Promise<{
1285
+ notes: ConversationNote[];
1286
+ }>;
1287
+ /** List shared inbox conversation state (GET /api/email/collaboration) */
1288
+ listConversationStates(query?: {
1289
+ mailbox_ids: string;
1290
+ status?: "open" | "waiting" | "closed";
1291
+ assigned?: "mine" | "unassigned" | "all";
1292
+ }): Promise<{
1293
+ conversations?: ConversationState[];
1294
+ }>;
865
1295
  /** List your deals (GET /api/deals) */
866
1296
  listDeals(query?: {
867
1297
  role?: "buyer" | "seller";
@@ -889,20 +1319,47 @@ export declare class Domani {
889
1319
  listDomains(): Promise<{
890
1320
  domains?: DomainRecord[];
891
1321
  }>;
1322
+ /** List email folders and counts (GET /api/emails/{address}/folders) */
1323
+ listEmailFoldersByAddress(address: string): Promise<{
1324
+ folders?: {
1325
+ id?: "inbox" | "archive" | "sent" | "drafts" | "spam" | "trash";
1326
+ total?: number;
1327
+ unread?: number;
1328
+ }[];
1329
+ views?: {
1330
+ id?: "starred" | "all";
1331
+ total?: number;
1332
+ unread?: number;
1333
+ }[];
1334
+ capabilities?: Record<string, unknown>;
1335
+ }>;
892
1336
  /** List emails (GET /api/emails/{address}/messages) */
893
1337
  listEmailMessagesByAddress(address: string, query?: {
894
1338
  cursor?: string;
895
1339
  limit?: number;
896
1340
  direction?: "in" | "out" | "all";
1341
+ folder?: "inbox" | "archive" | "sent" | "spam" | "trash";
1342
+ view?: "starred" | "all";
897
1343
  since?: string;
898
1344
  from?: string;
899
1345
  to?: string;
900
1346
  subject?: string;
1347
+ q?: string;
1348
+ unread?: boolean;
1349
+ attachments?: boolean;
1350
+ spam?: boolean;
901
1351
  }): Promise<{
902
1352
  messages?: {
903
1353
  id?: string;
904
1354
  message_id?: string | null;
905
1355
  direction?: "in" | "out";
1356
+ folder?: "inbox" | "archive" | "sent" | "spam" | "trash";
1357
+ read?: boolean;
1358
+ starred?: boolean;
1359
+ answered?: boolean;
1360
+ forwarded?: boolean;
1361
+ spam_detected?: boolean;
1362
+ trashed_at?: string | null;
906
1363
  from?: string;
907
1364
  to?: string;
908
1365
  cc?: string | null;
@@ -911,16 +1368,15 @@ export declare class Domani {
911
1368
  text?: string;
912
1369
  in_reply_to?: string | null;
913
1370
  references?: string | null;
914
- status?: "queued" | "sent" | "delivered" | "delayed" | "bounced" | "failed" | "complained" | "suppressed";
915
- events?: {
916
- status?: string;
917
- detail?: Record<string, unknown> | null;
918
- created_at?: string;
919
- }[];
1371
+ status?: string;
1372
+ events?: Record<string, unknown>[];
920
1373
  created_at?: string;
921
1374
  }[];
922
1375
  next_cursor?: string | null;
923
- has_more?: boolean;
1376
+ }>;
1377
+ /** List your agent identities (GET /api/agents/identity) */
1378
+ listIdentities(): Promise<{
1379
+ identities?: AgentIdentity[];
924
1380
  }>;
925
1381
  /** List payment invoices (GET /api/billing/invoices) */
926
1382
  listInvoices(query?: {
@@ -950,6 +1406,22 @@ export declare class Domani {
950
1406
  }[];
951
1407
  hint?: string;
952
1408
  }>;
1409
+ /** List app passwords (hosted) (GET /api/emails/{address}/credentials) */
1410
+ listMailboxCredentials(address: string): Promise<{
1411
+ mailbox?: string;
1412
+ credentials?: {
1413
+ id?: string;
1414
+ label?: string;
1415
+ created_at?: string;
1416
+ last_used_at?: string | null;
1417
+ created_by?: {
1418
+ type?: "user" | "token" | "agent";
1419
+ id?: string;
1420
+ label?: string;
1421
+ } | null;
1422
+ }[];
1423
+ hint?: string;
1424
+ }>;
953
1425
  /** List all mailboxes (GET /api/email) */
954
1426
  listMailboxes(query?: {
955
1427
  domain?: string;
@@ -960,6 +1432,10 @@ export declare class Domani {
960
1432
  slug?: string;
961
1433
  domain?: string;
962
1434
  message_count?: number;
1435
+ access_role?: "viewer" | "responder" | "manager";
1436
+ storage_quota_bytes?: number | null;
1437
+ storage_used_bytes?: number | null;
1438
+ storage_measured_at?: string | null;
963
1439
  }[];
964
1440
  }>;
965
1441
  /** List all mailboxes (GET /api/emails) */
@@ -974,8 +1450,20 @@ export declare class Domani {
974
1450
  message_count?: number;
975
1451
  webhook_url?: string | null;
976
1452
  forward_to?: string | null;
1453
+ workspace_id?: string | null;
1454
+ access_role?: "viewer" | "responder" | "manager";
1455
+ collaboration_enabled?: boolean;
1456
+ storage_quota_bytes?: number | null;
1457
+ storage_used_bytes?: number | null;
1458
+ storage_measured_at?: string | null;
977
1459
  }[];
978
1460
  }>;
1461
+ /** List inbound mail rules (GET /api/emails/{address}/rules) */
1462
+ listMailRules(address: string): Promise<{
1463
+ mailbox?: string;
1464
+ rules?: MailRule[];
1465
+ hint?: string;
1466
+ }>;
979
1467
  /** List your negotiations (GET /api/negotiations) */
980
1468
  listNegotiations(query?: {
981
1469
  role?: "buyer" | "seller";
@@ -1062,6 +1550,10 @@ export declare class Domani {
1062
1550
  }[];
1063
1551
  hint?: string;
1064
1552
  }>;
1553
+ /** List accessible workspaces (GET /api/workspaces) */
1554
+ listWorkspaces(): Promise<{
1555
+ workspaces?: WorkspaceSummary[];
1556
+ }>;
1065
1557
  /** Send a magic link sign-in email (POST /api/auth/login) */
1066
1558
  loginUser(body: {
1067
1559
  email: string;
@@ -1095,6 +1587,56 @@ export declare class Domani {
1095
1587
  }): Promise<{
1096
1588
  ok?: boolean;
1097
1589
  }>;
1590
+ /** Plan how to adopt an existing domain (GET /api/domains/adoption-plan) */
1591
+ planDomainAdoption(query?: {
1592
+ domain: string;
1593
+ }): Promise<{
1594
+ version: 1;
1595
+ domain: string;
1596
+ registered: boolean;
1597
+ account_state: "untracked" | "connected" | "managed" | "owned_by_another";
1598
+ recommended_action: "acquire" | "connect" | "transfer_preserving_dns" | "none";
1599
+ current: {
1600
+ registrar: string | null;
1601
+ registrar_url: string | null;
1602
+ expires_at: string | null;
1603
+ status: string[];
1604
+ nameservers: string[];
1605
+ dns_provider: string;
1606
+ dnssec_enabled: boolean;
1607
+ };
1608
+ options: {
1609
+ connect?: {
1610
+ available?: boolean;
1611
+ price?: 0;
1612
+ currency?: string;
1613
+ changes_registrar?: false;
1614
+ changes_nameservers?: false;
1615
+ next_action?: {
1616
+ method?: string;
1617
+ path?: string;
1618
+ };
1619
+ };
1620
+ transfer?: {
1621
+ available?: boolean;
1622
+ eligible?: boolean;
1623
+ price?: number | null;
1624
+ currency?: string;
1625
+ includes_renewal?: true;
1626
+ preserves_nameservers?: true;
1627
+ migrates_dns?: false;
1628
+ reason?: string;
1629
+ code?: string;
1630
+ eligible_at?: string;
1631
+ next_action?: {
1632
+ method?: string;
1633
+ path?: string;
1634
+ };
1635
+ };
1636
+ };
1637
+ invariants: string[];
1638
+ warnings: string[];
1639
+ }>;
1098
1640
  /** Provide EPP/auth code (seller) (PATCH /api/deals/{id}) */
1099
1641
  provideEppCode(id: string, body: {
1100
1642
  auth_code: string;
@@ -1127,6 +1669,12 @@ export declare class Domani {
1127
1669
  email?: string;
1128
1670
  };
1129
1671
  }>;
1672
+ /** Release an agent identity (DELETE /api/agents/identity/{slug}) */
1673
+ releaseIdentity(slug: string): Promise<{
1674
+ success?: boolean;
1675
+ slug?: string;
1676
+ released?: boolean;
1677
+ }>;
1130
1678
  /** Remove saved payment method (DELETE /api/billing/card) */
1131
1679
  removeCard(): Promise<{
1132
1680
  removed?: boolean;
@@ -1139,6 +1687,10 @@ export declare class Domani {
1139
1687
  deleted?: boolean;
1140
1688
  hint?: string;
1141
1689
  }>;
1690
+ /** Remove a member mailbox permission (DELETE /api/workspaces/{id}/mailboxes/{mailboxId}/grants) */
1691
+ removeMailboxGrant(id: string, mailboxId: string, body: {
1692
+ membership_id: string;
1693
+ }): Promise<unknown>;
1142
1694
  /** Remove mailbox webhook (DELETE /api/emails/{address}/webhook) */
1143
1695
  removeMailboxWebhook(address: string): Promise<{
1144
1696
  address?: string;
@@ -1147,18 +1699,27 @@ export declare class Domani {
1147
1699
  has_webhook?: boolean;
1148
1700
  hint?: string;
1149
1701
  }>;
1702
+ /** Remove an inbound mail rule (DELETE /api/emails/{address}/rules/{ruleId}) */
1703
+ removeMailRule(address: string, ruleId: string): Promise<{
1704
+ id?: string;
1705
+ deleted?: boolean;
1706
+ hint?: string;
1707
+ }>;
1150
1708
  /** Remove a suppression (DELETE /api/suppressions/{address}) */
1151
1709
  removeSuppression(address: string): Promise<{
1152
1710
  address?: string;
1153
1711
  deleted?: boolean;
1154
1712
  hint?: string;
1155
1713
  }>;
1714
+ /** Remove a workspace member (DELETE /api/workspaces/{id}/members/{membershipId}) */
1715
+ removeWorkspaceMember(id: string, membershipId: string): Promise<unknown>;
1156
1716
  /** Renew a domain (POST /api/domains/{domain}/renew) */
1157
1717
  renewDomain(domain: string, body?: {
1158
1718
  years?: number;
1159
1719
  payment_method?: "card" | "usdc" | "balance";
1160
1720
  payment_tx?: string;
1161
1721
  payment_chain?: "base" | "ethereum";
1722
+ max_price?: number;
1162
1723
  }): Promise<{
1163
1724
  domain: string;
1164
1725
  renewed_years: number;
@@ -1181,6 +1742,10 @@ export declare class Domani {
1181
1742
  to?: string;
1182
1743
  status?: string;
1183
1744
  }>;
1745
+ /** Request a workspace ownership transfer (POST /api/workspaces/{id}/ownership-transfer) */
1746
+ requestWorkspaceOwnershipTransfer(id: string, body: {
1747
+ membership_id: string;
1748
+ }): Promise<unknown>;
1184
1749
  /** Resend contact email verification (POST /api/me/resend-verification) */
1185
1750
  resendEmailVerification(body?: {
1186
1751
  email?: string;
@@ -1218,17 +1783,30 @@ export declare class Domani {
1218
1783
  sources?: string[];
1219
1784
  capturedAt?: string;
1220
1785
  };
1786
+ dry_run?: boolean;
1221
1787
  }): Promise<{
1222
1788
  domain?: string;
1223
1789
  applied?: number;
1224
1790
  skipped?: number;
1225
1791
  recordCount?: number;
1226
1792
  errors?: string[];
1793
+ dry_run?: boolean;
1794
+ would_apply?: DnsRecord[];
1795
+ }>;
1796
+ /** Revoke an app password (hosted) (DELETE /api/emails/{address}/credentials/{id}) */
1797
+ revokeMailboxCredential(address: string, id: string): Promise<{
1798
+ id?: string;
1799
+ revoked?: boolean;
1800
+ hint?: string;
1227
1801
  }>;
1228
1802
  /** Revoke an API token (DELETE /api/tokens/{id}) */
1229
1803
  revokeToken(id: string): Promise<{
1230
1804
  success?: boolean;
1231
1805
  }>;
1806
+ /** Revoke a pending invitation (DELETE /api/workspaces/{id}/invitations/{invitationId}) */
1807
+ revokeWorkspaceInvitation(id: string, invitationId: string): Promise<unknown>;
1808
+ /** Revoke a pending ownership transfer (DELETE /api/workspaces/{id}/ownership-transfer/{transferId}) */
1809
+ revokeWorkspaceOwnershipTransfer(id: string, transferId: string): Promise<unknown>;
1232
1810
  /** Rotate webhook signing secret (POST /api/emails/{address}/webhook/rotate) */
1233
1811
  rotateMailboxWebhookSecret(address: string): Promise<{
1234
1812
  address?: string;
@@ -1270,7 +1848,7 @@ export declare class Domani {
1270
1848
  }>;
1271
1849
  /** Send an email (POST /api/emails/{address}/send) */
1272
1850
  sendEmailByAddress(address: string, body?: {
1273
- to: string;
1851
+ to: string | string[];
1274
1852
  cc?: string | string[];
1275
1853
  bcc?: string | string[];
1276
1854
  subject?: string;
@@ -1279,6 +1857,8 @@ export declare class Domani {
1279
1857
  reply_to?: string;
1280
1858
  in_reply_to?: string;
1281
1859
  references?: string;
1860
+ idempotency_key?: string;
1861
+ allow_risky_content?: boolean;
1282
1862
  attachments?: {
1283
1863
  content: string;
1284
1864
  filename: string;
@@ -1291,6 +1871,8 @@ export declare class Domani {
1291
1871
  to?: string;
1292
1872
  status?: string;
1293
1873
  attachments_count?: number;
1874
+ suppressed?: string[];
1875
+ deliverability?: Record<string, unknown>;
1294
1876
  }>;
1295
1877
  /** Set domain catch-all (PUT /api/domains/{domain}/email/catch-all) */
1296
1878
  setCatchAll(domain: string, body: {
@@ -1307,6 +1889,7 @@ export declare class Domani {
1307
1889
  /** Set DNS records for a domain you own (PUT /api/domains/{domain}/dns) */
1308
1890
  setDnsRecords(domain: string, body: {
1309
1891
  records: DnsRecord[];
1892
+ zone_version?: string;
1310
1893
  }): Promise<{
1311
1894
  success?: boolean;
1312
1895
  domain?: string;
@@ -1321,6 +1904,11 @@ export declare class Domani {
1321
1904
  redirect_url?: string | null;
1322
1905
  permanent?: boolean;
1323
1906
  }>;
1907
+ /** Set a member mailbox permission (PUT /api/workspaces/{id}/mailboxes/{mailboxId}/grants) */
1908
+ setMailboxGrant(id: string, mailboxId: string, body: {
1909
+ membership_id: string;
1910
+ role: "viewer" | "responder" | "manager";
1911
+ }): Promise<unknown>;
1324
1912
  /** Set mailbox webhook (PUT /api/emails/{address}/webhook) */
1325
1913
  setMailboxWebhook(address: string, body: {
1326
1914
  url: string;
@@ -1413,6 +2001,18 @@ export declare class Domani {
1413
2001
  preferred_payment_method?: string | null;
1414
2002
  hint?: string;
1415
2003
  }>;
2004
+ /** Assign or update a shared inbox conversation (PATCH /api/email/collaboration) */
2005
+ updateConversationState(body: {
2006
+ mailbox_id: string;
2007
+ thread_key: string;
2008
+ subject?: string | null;
2009
+ status?: "open" | "waiting" | "closed";
2010
+ assignee?: {
2011
+ type?: "member" | "token" | "agent";
2012
+ id?: string;
2013
+ } | null;
2014
+ version?: number;
2015
+ }): Promise<ConversationState>;
1416
2016
  /** Update domain settings (PUT /api/domains/{domain}/settings) */
1417
2017
  updateDomainSettings(domain: string, body: {
1418
2018
  auto_renew?: boolean;
@@ -1425,6 +2025,25 @@ export declare class Domani {
1425
2025
  security_lock?: boolean;
1426
2026
  hint: string;
1427
2027
  }>;
2028
+ /** Apply a lifecycle action to messages (POST /api/emails/{address}/messages/actions) */
2029
+ updateEmailMessagesByAddress(address: string, body: {
2030
+ message_ids: string[];
2031
+ action: "move" | "mark_read" | "star" | "restore" | "delete_permanently";
2032
+ destination?: "inbox" | "archive" | "sent" | "spam" | "trash";
2033
+ read?: boolean;
2034
+ starred?: boolean;
2035
+ }): Promise<unknown>;
2036
+ /** Update an agent identity (PATCH /api/agents/identity/{slug}) */
2037
+ updateIdentity(slug: string, body: {
2038
+ name?: string;
2039
+ bio?: string;
2040
+ emoji?: string;
2041
+ email?: string;
2042
+ links?: {
2043
+ label?: string;
2044
+ url?: string;
2045
+ }[];
2046
+ }): Promise<AgentIdentity>;
1428
2047
  /** Update a domain listing (PATCH /api/domains/{domain}/for-sale) */
1429
2048
  updateListing(domain: string, body: {
1430
2049
  price?: number;
@@ -1446,6 +2065,7 @@ export declare class Domani {
1446
2065
  name?: string | null;
1447
2066
  webhook_url?: string | null;
1448
2067
  forward_to?: string | null;
2068
+ drop_spam?: boolean;
1449
2069
  }): Promise<{
1450
2070
  id?: string;
1451
2071
  address?: string;
@@ -1458,11 +2078,12 @@ export declare class Domani {
1458
2078
  }>;
1459
2079
  /** Update notification preferences (PUT /api/notifications/preferences) */
1460
2080
  updateNotificationPreferences(body: {
1461
- preferences: {
2081
+ preferences?: {
1462
2082
  category: "domains" | "transfers" | "marketplace" | "email" | "inquiries";
1463
2083
  channel: "in_app" | "email";
1464
2084
  enabled: boolean;
1465
2085
  }[];
2086
+ expiry_alert_days?: number[];
1466
2087
  }): Promise<{
1467
2088
  ok?: boolean;
1468
2089
  }>;
@@ -1488,6 +2109,14 @@ export declare class Domani {
1488
2109
  active?: boolean;
1489
2110
  hint?: string;
1490
2111
  }>;
2112
+ /** Rename a workspace (PATCH /api/workspaces/{id}) */
2113
+ updateWorkspace(id: string, body: {
2114
+ name: string;
2115
+ }): Promise<unknown>;
2116
+ /** Change a member role (PATCH /api/workspaces/{id}/members/{membershipId}) */
2117
+ updateWorkspaceMember(id: string, membershipId: string, body: {
2118
+ role: "admin" | "member";
2119
+ }): Promise<unknown>;
1491
2120
  /** Verify that a provider connection is working (POST /api/domains/{domain}/verify) */
1492
2121
  verifyConnection(domain: string, body: {
1493
2122
  target?: string;