domani 1.0.6 → 1.1.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/dist/index.d.ts +796 -16
- package/dist/index.js +141 -0
- package/package.json +1 -1
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" | "AGENT_IDENTITY_NOT_FOUND" | "AGENT_IDENTITY_ESCALATION" | "CREDENTIAL_REVOKE_FAILED" | "INVALID_IDEMPOTENCY_KEY" | "IDEMPOTENCY_KEY_MISMATCH" | "IDEMPOTENCY_KEY_REUSED" | "OPERATION_IN_PROGRESS" | "OPERATION_SUPERSEDED" | "INVALID_OPERATION_RECEIPT" | "WORKSPACE_ADMIN_REQUIRED" | "WORKSPACE_OWNER_REQUIRED" | "PRINCIPAL_NOT_IN_WORKSPACE" | "MAILBOX_NOT_IN_WORKSPACE" | "GROUP_NOT_IN_WORKSPACE" | "COLLECTION_NOT_IN_WORKSPACE" | "ACCESS_VERSION_CONFLICT" | "ACCESS_OFFER_INVALID" | "ACCESS_OFFER_EMAIL_MISMATCH" | "MAIL_DOMAIN_CAPACITY_EXHAUSTED" | "MAIL_PROVIDER_ERROR" | "INVALID_HTTP_ROUTE_HOSTNAME" | "INVALID_HTTP_ROUTE_UPSTREAM" | "INVALID_HTTP_ROUTE_UPSTREAM_HEADERS" | "INVALID_HTTP_ROUTE_LEASE" | "INVALID_HTTP_ROUTE_POLICY" | "INVALID_HOSTNAME_BINDING" | "HTTP_ROUTE_HOSTNAME_NOT_ALLOWED" | "HTTP_ROUTE_HOSTNAME_REQUIRED" | "HTTP_ROUTE_HOSTNAME_RESERVED" | "HTTP_ROUTE_HOSTNAME_UNAVAILABLE" | "HTTP_ROUTE_CONCURRENCY_LIMIT" | "HTTP_ROUTE_WORKSPACE_LIMIT" | "HTTP_ROUTE_DOMAIN_NOT_OWNED" | "HTTP_ROUTE_TERMINAL" | "HTTP_ROUTE_VERIFICATION_NOT_ENABLED" | "HTTP_ROUTE_VERIFICATION_REQUIRES_HTTPS" | "HTTP_ROUTE_POLICY_WITHOUT_SCOPE" | "HTTP_ROUTE_POLICY_REQUIRED" | "HTTP_ROUTE_AGENT_IDENTITY_REQUIRED" | "HTTP_ROUTE_POLICY_ESCALATION" | "HOSTNAME_BINDING_NOT_ACTIVE" | "HOSTNAME_BINDING_DNS_CONFLICT" | "HOSTNAME_BINDING_ACK_REQUIRED" | "HOSTNAME_BINDING_BROWSER_MODE_MISMATCH" | "HOSTNAME_DNS_CONFLICT" | "ZONE_READ_FAILED" | "DNS_VERSION_CONFLICT" | "UNAUTHORIZED" | "APEX_WEB_MODE_CONFLICT" | "APEX_DELEGATION_ACK_REQUIRED";
|
|
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" | "INVALID_IDEMPOTENCY_KEY" | "IDEMPOTENCY_KEY_MISMATCH" | "IDEMPOTENCY_KEY_REUSED" | "OPERATION_IN_PROGRESS" | "OPERATION_SUPERSEDED" | "INVALID_OPERATION_RECEIPT" | "WORKSPACE_ADMIN_REQUIRED" | "WORKSPACE_OWNER_REQUIRED" | "PRINCIPAL_NOT_IN_WORKSPACE" | "MAILBOX_NOT_IN_WORKSPACE" | "GROUP_NOT_IN_WORKSPACE" | "COLLECTION_NOT_IN_WORKSPACE" | "ACCESS_VERSION_CONFLICT" | "ACCESS_OFFER_INVALID" | "ACCESS_OFFER_EMAIL_MISMATCH" | "MAIL_DOMAIN_CAPACITY_EXHAUSTED" | "MAIL_PROVIDER_ERROR" | "INVALID_HTTP_ROUTE_HOSTNAME" | "INVALID_HTTP_ROUTE_UPSTREAM" | "INVALID_HTTP_ROUTE_UPSTREAM_HEADERS" | "INVALID_HTTP_ROUTE_LEASE" | "INVALID_HTTP_ROUTE_POLICY" | "INVALID_HOSTNAME_BINDING" | "HTTP_ROUTE_HOSTNAME_NOT_ALLOWED" | "HTTP_ROUTE_HOSTNAME_REQUIRED" | "HTTP_ROUTE_HOSTNAME_RESERVED" | "HTTP_ROUTE_HOSTNAME_UNAVAILABLE" | "HTTP_ROUTE_CONCURRENCY_LIMIT" | "HTTP_ROUTE_WORKSPACE_LIMIT" | "HTTP_ROUTE_DOMAIN_NOT_OWNED" | "HTTP_ROUTE_TERMINAL" | "HTTP_ROUTE_VERIFICATION_NOT_ENABLED" | "HTTP_ROUTE_VERIFICATION_REQUIRES_HTTPS" | "HTTP_ROUTE_POLICY_WITHOUT_SCOPE" | "HTTP_ROUTE_POLICY_REQUIRED" | "HTTP_ROUTE_AGENT_IDENTITY_REQUIRED" | "HTTP_ROUTE_POLICY_ESCALATION" | "HOSTNAME_BINDING_NOT_ACTIVE" | "HOSTNAME_BINDING_DNS_CONFLICT" | "HOSTNAME_BINDING_ACK_REQUIRED" | "HOSTNAME_BINDING_BROWSER_MODE_MISMATCH" | "HOSTNAME_DNS_CONFLICT" | "ZONE_READ_FAILED" | "DNS_VERSION_CONFLICT" | "UNAUTHORIZED" | "APEX_WEB_MODE_CONFLICT" | "APEX_DELEGATION_ACK_REQUIRED" | "VERIFICATION_COOLDOWN" | "VERIFICATION_SEND_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. */
|
|
@@ -31,6 +31,8 @@ export interface Error {
|
|
|
31
31
|
fix_url?: string;
|
|
32
32
|
/** Seconds until retry is allowed (present on 429 responses) */
|
|
33
33
|
retry_after?: number;
|
|
34
|
+
/** Minutes until another verification email may be requested */
|
|
35
|
+
retry_after_minutes?: number;
|
|
34
36
|
/** Whether retrying after the external condition changes is safe */
|
|
35
37
|
retryable?: boolean;
|
|
36
38
|
}
|
|
@@ -240,7 +242,7 @@ export interface MailboxOperationReceipt {
|
|
|
240
242
|
idempotency_key: string;
|
|
241
243
|
/** True when this response reused the immutable completed receipt and performed no new mutation. */
|
|
242
244
|
idempotent_replay: boolean;
|
|
243
|
-
action: "move" | "mark_read" | "star" | "restore" | "delete_permanently";
|
|
245
|
+
action: "move" | "mark_read" | "star" | "restore" | "delete_permanently" | "label";
|
|
244
246
|
status: "succeeded" | "partial";
|
|
245
247
|
results: ({
|
|
246
248
|
message_id: string;
|
|
@@ -266,7 +268,7 @@ export interface LegacyMailboxOperationReceipt {
|
|
|
266
268
|
idempotency_key: string;
|
|
267
269
|
/** True when this response reused the immutable completed receipt and performed no new mutation. */
|
|
268
270
|
idempotent_replay: boolean;
|
|
269
|
-
action: "move" | "mark_read" | "star" | "restore" | "delete_permanently";
|
|
271
|
+
action: "move" | "mark_read" | "star" | "restore" | "delete_permanently" | "label";
|
|
270
272
|
status: "succeeded" | "partial";
|
|
271
273
|
results: ({
|
|
272
274
|
message_id: string;
|
|
@@ -302,6 +304,138 @@ export interface WorkspaceSummary {
|
|
|
302
304
|
}[];
|
|
303
305
|
created_at: string;
|
|
304
306
|
}
|
|
307
|
+
export interface AssistantSettings {
|
|
308
|
+
enabled?: boolean;
|
|
309
|
+
shadow_enabled?: boolean;
|
|
310
|
+
paused?: boolean;
|
|
311
|
+
mailbox_ids?: string[];
|
|
312
|
+
/** Mailboxes operated by your agents. Their items appear in the agents section of Today instead of Needs you. */
|
|
313
|
+
agent_mailbox_ids?: string[];
|
|
314
|
+
/** Your agent identities, for delegation. */
|
|
315
|
+
agents?: ({
|
|
316
|
+
slug?: string;
|
|
317
|
+
name?: string;
|
|
318
|
+
emoji?: string | null;
|
|
319
|
+
})[];
|
|
320
|
+
/** Mailboxes whose mail is searched by words only: their messages are never sent to the embedding model. */
|
|
321
|
+
search_opt_out_mailbox_ids?: string[];
|
|
322
|
+
history_window_days?: number;
|
|
323
|
+
privacy_route?: "private_cloud";
|
|
324
|
+
attachment_vision?: boolean;
|
|
325
|
+
pipeline_version?: string;
|
|
326
|
+
consent?: {
|
|
327
|
+
required_version?: string;
|
|
328
|
+
accepted_version?: string | null;
|
|
329
|
+
accepted_at?: string | null;
|
|
330
|
+
};
|
|
331
|
+
mailboxes?: ({
|
|
332
|
+
id?: string;
|
|
333
|
+
slug?: string;
|
|
334
|
+
domain?: string;
|
|
335
|
+
name?: string | null;
|
|
336
|
+
kind?: string;
|
|
337
|
+
address?: string;
|
|
338
|
+
})[];
|
|
339
|
+
}
|
|
340
|
+
export interface AssistantWorkItem {
|
|
341
|
+
id?: string;
|
|
342
|
+
version?: number;
|
|
343
|
+
status?: "open" | "needs_judgment" | "snoozed" | "waiting" | "handled" | "ignored";
|
|
344
|
+
title?: string;
|
|
345
|
+
summary?: string;
|
|
346
|
+
/** The single thing the owner must do or decide, or null. */
|
|
347
|
+
ask?: string | null;
|
|
348
|
+
sender?: {
|
|
349
|
+
address?: string;
|
|
350
|
+
name?: string | null;
|
|
351
|
+
kind?: "human" | "automated" | "self" | "harness";
|
|
352
|
+
} | null;
|
|
353
|
+
/** How often this same situation came back: one item, N messages. */
|
|
354
|
+
recurrence?: {
|
|
355
|
+
count?: number;
|
|
356
|
+
first_seen_at?: string | null;
|
|
357
|
+
last_seen_at?: string | null;
|
|
358
|
+
};
|
|
359
|
+
mailbox?: {
|
|
360
|
+
id?: string;
|
|
361
|
+
address?: string;
|
|
362
|
+
name?: string | null;
|
|
363
|
+
operator?: "human" | "agent";
|
|
364
|
+
agent?: {
|
|
365
|
+
name?: string;
|
|
366
|
+
emoji?: string | null;
|
|
367
|
+
} | null;
|
|
368
|
+
};
|
|
369
|
+
opened_at?: string | null;
|
|
370
|
+
/** The slug of the agent the owner handed this item to, or null. */
|
|
371
|
+
delegated_to?: string | null;
|
|
372
|
+
/** True until the owner opens the item after its latest change. */
|
|
373
|
+
unread?: boolean;
|
|
374
|
+
/** The source messages behind this item, newest first. */
|
|
375
|
+
messages?: ({
|
|
376
|
+
id?: string;
|
|
377
|
+
subject?: string | null;
|
|
378
|
+
from?: string;
|
|
379
|
+
received_at?: string;
|
|
380
|
+
conversation_id?: string | null;
|
|
381
|
+
})[];
|
|
382
|
+
/** What already happened in this matter, oldest first: one line per earlier message. */
|
|
383
|
+
history?: {
|
|
384
|
+
message_id?: string;
|
|
385
|
+
occurred_at?: string;
|
|
386
|
+
sender?: string;
|
|
387
|
+
title?: string;
|
|
388
|
+
}[];
|
|
389
|
+
source?: {
|
|
390
|
+
type?: string;
|
|
391
|
+
conversation_id?: string | null;
|
|
392
|
+
event_id?: string;
|
|
393
|
+
revision?: number;
|
|
394
|
+
};
|
|
395
|
+
attention?: {
|
|
396
|
+
level?: "now" | "needs_you" | "fyi" | "quiet";
|
|
397
|
+
reason?: string;
|
|
398
|
+
confidence?: string;
|
|
399
|
+
deadline?: string | null;
|
|
400
|
+
};
|
|
401
|
+
analysis?: {
|
|
402
|
+
coverage?: string;
|
|
403
|
+
warnings?: string[];
|
|
404
|
+
};
|
|
405
|
+
evidence_refs?: string[];
|
|
406
|
+
entity_refs?: string[];
|
|
407
|
+
snoozed_until?: string | null;
|
|
408
|
+
decision?: {
|
|
409
|
+
id?: string;
|
|
410
|
+
version?: number;
|
|
411
|
+
status?: string;
|
|
412
|
+
question?: string;
|
|
413
|
+
options?: {
|
|
414
|
+
id?: string;
|
|
415
|
+
label?: string;
|
|
416
|
+
recommended?: boolean;
|
|
417
|
+
outcome?: string;
|
|
418
|
+
}[];
|
|
419
|
+
} | null;
|
|
420
|
+
plan?: {
|
|
421
|
+
id?: string;
|
|
422
|
+
status?: string;
|
|
423
|
+
expires_at?: string;
|
|
424
|
+
} | null;
|
|
425
|
+
}
|
|
426
|
+
export interface AssistantTodayView {
|
|
427
|
+
type?: "today";
|
|
428
|
+
as_of?: string;
|
|
429
|
+
projection_lag_ms?: number;
|
|
430
|
+
sections?: {
|
|
431
|
+
now?: AssistantWorkItem[];
|
|
432
|
+
needs_you?: AssistantWorkItem[];
|
|
433
|
+
agents?: AssistantWorkItem[];
|
|
434
|
+
waiting?: AssistantWorkItem[];
|
|
435
|
+
upcoming?: AssistantWorkItem[];
|
|
436
|
+
handled?: AssistantWorkItem[];
|
|
437
|
+
};
|
|
438
|
+
}
|
|
305
439
|
export type MailboxEffectiveCapabilities = ("mail.read" | "mail.search" | "mail.auth.read" | "mail.seen.write" | "mail.lifecycle.write" | "mail.delete.permanent" | "draft.create" | "mail.submit" | "conversation.read" | "conversation.assign" | "conversation.note" | "conversation.close" | "mailbox.manage" | "routing.manage" | "delivery.manage" | "mail.client.connect" | "mail.credentials.create_self" | "mail.credentials.revoke_self" | "workspace.members.manage" | "workspace.billing.manage")[];
|
|
306
440
|
export interface WorkspaceDetail {
|
|
307
441
|
id: string;
|
|
@@ -461,6 +595,197 @@ export interface MailActivity {
|
|
|
461
595
|
metadata: Record<string, unknown>;
|
|
462
596
|
created_at: string;
|
|
463
597
|
}
|
|
598
|
+
export interface EmailThread {
|
|
599
|
+
/** Thread id, the id of its first message */
|
|
600
|
+
id: string;
|
|
601
|
+
/** Subject of the first message */
|
|
602
|
+
subject?: string | null;
|
|
603
|
+
/** Every address that wrote or received in the thread */
|
|
604
|
+
participants: string[];
|
|
605
|
+
message_count: number;
|
|
606
|
+
/** Unread inbound messages */
|
|
607
|
+
unread_count: number;
|
|
608
|
+
starred: boolean;
|
|
609
|
+
has_attachments: boolean;
|
|
610
|
+
first_message_at: string;
|
|
611
|
+
last_message_at: string;
|
|
612
|
+
last_message: {
|
|
613
|
+
id: string;
|
|
614
|
+
direction: "in" | "out";
|
|
615
|
+
from: string;
|
|
616
|
+
to: string;
|
|
617
|
+
subject?: string | null;
|
|
618
|
+
snippet: string;
|
|
619
|
+
folder: string;
|
|
620
|
+
is_read: boolean;
|
|
621
|
+
created_at: string;
|
|
622
|
+
};
|
|
623
|
+
}
|
|
624
|
+
export interface AssistantBrief {
|
|
625
|
+
id: string;
|
|
626
|
+
version: number;
|
|
627
|
+
generated_at: string;
|
|
628
|
+
title: string;
|
|
629
|
+
summary: string;
|
|
630
|
+
ask?: string | null;
|
|
631
|
+
mailbox?: {
|
|
632
|
+
id?: string;
|
|
633
|
+
address?: string;
|
|
634
|
+
name?: string | null;
|
|
635
|
+
operator?: "human" | "agent";
|
|
636
|
+
};
|
|
637
|
+
delegated_to?: string | null;
|
|
638
|
+
situation: {
|
|
639
|
+
key?: string;
|
|
640
|
+
status?: string;
|
|
641
|
+
attention?: {
|
|
642
|
+
level?: string;
|
|
643
|
+
reason?: string;
|
|
644
|
+
confidence?: string;
|
|
645
|
+
deadline?: string | null;
|
|
646
|
+
};
|
|
647
|
+
occurrences?: number;
|
|
648
|
+
first_seen_at?: string | null;
|
|
649
|
+
last_seen_at?: string | null;
|
|
650
|
+
sender?: {
|
|
651
|
+
address?: string;
|
|
652
|
+
name?: string | null;
|
|
653
|
+
kind?: string;
|
|
654
|
+
} | null;
|
|
655
|
+
};
|
|
656
|
+
/** Every mail of the situation, oldest first, with the one-line title the analysis gave it */
|
|
657
|
+
story: {
|
|
658
|
+
message_id?: string;
|
|
659
|
+
occurred_at?: string;
|
|
660
|
+
sender?: string;
|
|
661
|
+
title?: string;
|
|
662
|
+
analysed?: boolean;
|
|
663
|
+
}[];
|
|
664
|
+
facts: ({
|
|
665
|
+
key?: string | null;
|
|
666
|
+
subject?: string | null;
|
|
667
|
+
predicate?: string | null;
|
|
668
|
+
object?: string | null;
|
|
669
|
+
value?: {
|
|
670
|
+
type?: string;
|
|
671
|
+
value?: string | null;
|
|
672
|
+
currency?: string | null;
|
|
673
|
+
} | null;
|
|
674
|
+
basis?: string | null;
|
|
675
|
+
confidence?: number | null;
|
|
676
|
+
valid_from?: string | null;
|
|
677
|
+
valid_until?: string | null;
|
|
678
|
+
sensitivity?: string;
|
|
679
|
+
evidence_refs?: string[];
|
|
680
|
+
seen_at?: string;
|
|
681
|
+
})[];
|
|
682
|
+
entities: {
|
|
683
|
+
kind?: string;
|
|
684
|
+
name?: string;
|
|
685
|
+
aliases?: string[];
|
|
686
|
+
ref?: string;
|
|
687
|
+
}[];
|
|
688
|
+
/** Open promises made by the owner's side */
|
|
689
|
+
commitments: ({
|
|
690
|
+
id?: string;
|
|
691
|
+
who?: string;
|
|
692
|
+
owed_to?: string | null;
|
|
693
|
+
what?: string;
|
|
694
|
+
due_at?: string | null;
|
|
695
|
+
overdue?: boolean;
|
|
696
|
+
status?: string;
|
|
697
|
+
})[];
|
|
698
|
+
/** Open things awaited from others */
|
|
699
|
+
expectations: ({
|
|
700
|
+
id?: string;
|
|
701
|
+
who?: string;
|
|
702
|
+
what?: string;
|
|
703
|
+
due_at?: string | null;
|
|
704
|
+
overdue?: boolean;
|
|
705
|
+
status?: string;
|
|
706
|
+
})[];
|
|
707
|
+
/** Closed loops and receipts, newest first */
|
|
708
|
+
settled: ({
|
|
709
|
+
kind?: "commitment" | "expectation" | "receipt";
|
|
710
|
+
who?: string;
|
|
711
|
+
what?: string;
|
|
712
|
+
status?: string;
|
|
713
|
+
at?: string;
|
|
714
|
+
})[];
|
|
715
|
+
awaiting: ({
|
|
716
|
+
who?: string;
|
|
717
|
+
what?: string;
|
|
718
|
+
since?: string;
|
|
719
|
+
due_at?: string | null;
|
|
720
|
+
overdue?: boolean;
|
|
721
|
+
})[];
|
|
722
|
+
/** The current prepared Decision with its options */
|
|
723
|
+
decision?: Record<string, unknown> | null;
|
|
724
|
+
suggested_next: {
|
|
725
|
+
action?: string;
|
|
726
|
+
reason?: string;
|
|
727
|
+
source?: "decision" | "rule";
|
|
728
|
+
} | null;
|
|
729
|
+
evidence: ({
|
|
730
|
+
id?: string;
|
|
731
|
+
subject?: string | null;
|
|
732
|
+
from?: string;
|
|
733
|
+
received_at?: string;
|
|
734
|
+
conversation_id?: string | null;
|
|
735
|
+
})[];
|
|
736
|
+
evidence_refs?: string[];
|
|
737
|
+
}
|
|
738
|
+
export interface Fact {
|
|
739
|
+
key?: string | null;
|
|
740
|
+
subject?: string | null;
|
|
741
|
+
predicate?: string | null;
|
|
742
|
+
object?: string | null;
|
|
743
|
+
value?: {
|
|
744
|
+
type?: "string" | "date" | "money";
|
|
745
|
+
value?: string | null;
|
|
746
|
+
currency?: string | null;
|
|
747
|
+
} | null;
|
|
748
|
+
basis?: "source_explicit" | "source_implied" | "model_inference" | null | null;
|
|
749
|
+
confidence?: number | null;
|
|
750
|
+
valid_from?: string | null;
|
|
751
|
+
valid_until?: string | null;
|
|
752
|
+
sensitivity?: string;
|
|
753
|
+
evidence_refs?: string[];
|
|
754
|
+
seen_at?: string;
|
|
755
|
+
}
|
|
756
|
+
export interface MessageFacts {
|
|
757
|
+
message_id: string;
|
|
758
|
+
thread_id: string;
|
|
759
|
+
analysed: boolean;
|
|
760
|
+
/** Only when analysed is false */
|
|
761
|
+
reason?: "not_enabled" | "not_analysed";
|
|
762
|
+
analysis?: {
|
|
763
|
+
id?: string;
|
|
764
|
+
generated_at?: string;
|
|
765
|
+
coverage?: string;
|
|
766
|
+
warnings?: string[];
|
|
767
|
+
pipeline_version?: string;
|
|
768
|
+
};
|
|
769
|
+
facts: Fact[];
|
|
770
|
+
entities: {
|
|
771
|
+
kind?: string;
|
|
772
|
+
name?: string;
|
|
773
|
+
aliases?: string[];
|
|
774
|
+
ref?: string;
|
|
775
|
+
}[];
|
|
776
|
+
commitments: ({
|
|
777
|
+
who?: string;
|
|
778
|
+
what?: string;
|
|
779
|
+
due_at?: string | null;
|
|
780
|
+
evidence_refs?: string[];
|
|
781
|
+
})[];
|
|
782
|
+
expectations: ({
|
|
783
|
+
who?: string;
|
|
784
|
+
what?: string;
|
|
785
|
+
due_at?: string | null;
|
|
786
|
+
evidence_refs?: string[];
|
|
787
|
+
})[];
|
|
788
|
+
}
|
|
464
789
|
export interface MailboxChange {
|
|
465
790
|
/** Monotonic sequence serialized as a string */
|
|
466
791
|
sequence: string;
|
|
@@ -541,6 +866,7 @@ export interface DomainBrief {
|
|
|
541
866
|
detectedAt: string;
|
|
542
867
|
type: "identity" | "content" | "redirect" | "registration";
|
|
543
868
|
summary: string;
|
|
869
|
+
data?: Record<string, unknown>;
|
|
544
870
|
evidenceIds: string[];
|
|
545
871
|
})[];
|
|
546
872
|
};
|
|
@@ -606,6 +932,7 @@ export interface DomainBrief {
|
|
|
606
932
|
claimKey: string;
|
|
607
933
|
label: string;
|
|
608
934
|
value: string;
|
|
935
|
+
data?: Record<string, unknown>;
|
|
609
936
|
source: string;
|
|
610
937
|
sourceUrl?: string;
|
|
611
938
|
confidence: "high" | "medium" | "low";
|
|
@@ -642,11 +969,57 @@ export interface Backorder {
|
|
|
642
969
|
caught_at?: string | null;
|
|
643
970
|
/** ID of the Domain created when caught */
|
|
644
971
|
registered_domain_id?: string | null;
|
|
645
|
-
|
|
972
|
+
/** Stable, language-independent failure code. Internal registrar prose is never returned. */
|
|
973
|
+
failure_reason?: "price_cap" | "registration_race" | "marketplace_listing" | "payment" | "registrar" | "unavailable" | "unexpected" | "unspecified" | null;
|
|
646
974
|
/** When the watch window ends */
|
|
647
975
|
expires_at?: string;
|
|
648
976
|
created_at?: string;
|
|
649
977
|
}
|
|
978
|
+
export interface BuyDomainItem {
|
|
979
|
+
domain: string;
|
|
980
|
+
status: "active" | "provisioning";
|
|
981
|
+
expires?: string | null;
|
|
982
|
+
price: number;
|
|
983
|
+
currency: string;
|
|
984
|
+
years: number;
|
|
985
|
+
payment_method: "card" | "balance" | "x402" | "crypto";
|
|
986
|
+
payment_tx?: string;
|
|
987
|
+
auto_renew: boolean;
|
|
988
|
+
marketplace_purchase?: boolean;
|
|
989
|
+
}
|
|
990
|
+
export interface BuyDomainFailure {
|
|
991
|
+
domain: string;
|
|
992
|
+
error: string;
|
|
993
|
+
failure_code: "registration_race" | "payment" | "registrar" | "unexpected" | "marketplace_listing";
|
|
994
|
+
}
|
|
995
|
+
export interface BuyDomainRegistrationError {
|
|
996
|
+
error: string;
|
|
997
|
+
code: "REGISTRATION_FAILED";
|
|
998
|
+
failure_code: "payment" | "registrar" | "unexpected";
|
|
999
|
+
refunded?: boolean;
|
|
1000
|
+
hint?: string;
|
|
1001
|
+
documentation_url?: string;
|
|
1002
|
+
}
|
|
1003
|
+
export interface BuyDomainAvailabilityError {
|
|
1004
|
+
error: string;
|
|
1005
|
+
code: "DOMAIN_UNAVAILABLE";
|
|
1006
|
+
failure_code: "registration_race";
|
|
1007
|
+
hint?: string;
|
|
1008
|
+
documentation_url?: string;
|
|
1009
|
+
}
|
|
1010
|
+
export interface BuyDomainBulkResult {
|
|
1011
|
+
results: BuyDomainItem[];
|
|
1012
|
+
errors: BuyDomainFailure[];
|
|
1013
|
+
summary: {
|
|
1014
|
+
total: number;
|
|
1015
|
+
succeeded: number;
|
|
1016
|
+
failed: number;
|
|
1017
|
+
charged: number;
|
|
1018
|
+
refunded: number;
|
|
1019
|
+
};
|
|
1020
|
+
hint: string;
|
|
1021
|
+
next_steps: string[];
|
|
1022
|
+
}
|
|
650
1023
|
export interface DealInvoice {
|
|
651
1024
|
deal_id?: string;
|
|
652
1025
|
domain?: string;
|
|
@@ -856,6 +1229,9 @@ export interface AccountInfo {
|
|
|
856
1229
|
domain_count: number;
|
|
857
1230
|
/** Number of active API tokens */
|
|
858
1231
|
token_count: number;
|
|
1232
|
+
/** Feature flags enabled for this account (GA features plus the preview features granted to the user), e.g. mailzero_assistant */
|
|
1233
|
+
features?: string[];
|
|
1234
|
+
is_admin?: boolean;
|
|
859
1235
|
created_at: string;
|
|
860
1236
|
}
|
|
861
1237
|
export interface ActivationProjection {
|
|
@@ -899,6 +1275,12 @@ export declare class Domani {
|
|
|
899
1275
|
body?: unknown;
|
|
900
1276
|
headers?: Record<string, string | undefined>;
|
|
901
1277
|
}): Promise<T>;
|
|
1278
|
+
/** Open a server-sent event stream; read `response.body` with an SSE parser. */
|
|
1279
|
+
stream(method: string, path: string, opts?: {
|
|
1280
|
+
query?: Record<string, unknown>;
|
|
1281
|
+
headers?: Record<string, string | undefined>;
|
|
1282
|
+
signal?: AbortSignal;
|
|
1283
|
+
}): Promise<Response>;
|
|
902
1284
|
/** Accept an access or ownership offer (POST /api/workspaces/access/offers/accept) */
|
|
903
1285
|
acceptWorkspaceAccessOffer(body: {
|
|
904
1286
|
token: string;
|
|
@@ -984,17 +1366,7 @@ export declare class Domani {
|
|
|
984
1366
|
years?: number;
|
|
985
1367
|
max_price?: number;
|
|
986
1368
|
ref?: string;
|
|
987
|
-
}, paymentSignature?: string): Promise<
|
|
988
|
-
domain?: string;
|
|
989
|
-
status?: "active";
|
|
990
|
-
expires?: string;
|
|
991
|
-
price?: number;
|
|
992
|
-
currency?: string;
|
|
993
|
-
years?: number;
|
|
994
|
-
payment_method?: "card" | "x402" | "crypto";
|
|
995
|
-
payment_tx?: string;
|
|
996
|
-
marketplace_purchase?: boolean;
|
|
997
|
-
}>;
|
|
1369
|
+
}, paymentSignature?: string): Promise<BuyDomainItem | BuyDomainBulkResult>;
|
|
998
1370
|
/** Cancel a backorder (DELETE /api/backorders/{id}) */
|
|
999
1371
|
cancelBackorder(id: string): Promise<{
|
|
1000
1372
|
id?: string;
|
|
@@ -1147,6 +1519,33 @@ export declare class Domani {
|
|
|
1147
1519
|
next_steps?: string[];
|
|
1148
1520
|
diff?: Record<string, unknown>;
|
|
1149
1521
|
}>;
|
|
1522
|
+
/** Give an agent its own API key in one call (POST /api/agents/identity/{slug}/tokens) */
|
|
1523
|
+
createAgentToken(slug: string, body?: {
|
|
1524
|
+
name?: string;
|
|
1525
|
+
scopes?: string[];
|
|
1526
|
+
mailboxes?: string[];
|
|
1527
|
+
expires_in?: number;
|
|
1528
|
+
}): Promise<{
|
|
1529
|
+
success?: boolean;
|
|
1530
|
+
token?: {
|
|
1531
|
+
id?: string;
|
|
1532
|
+
name?: string;
|
|
1533
|
+
key?: string;
|
|
1534
|
+
scopes?: string[];
|
|
1535
|
+
mailbox_ids?: string[];
|
|
1536
|
+
expires_at?: string | null;
|
|
1537
|
+
agent_identity?: {
|
|
1538
|
+
id?: string;
|
|
1539
|
+
name?: string | null;
|
|
1540
|
+
slug?: string;
|
|
1541
|
+
} | null;
|
|
1542
|
+
};
|
|
1543
|
+
agent?: {
|
|
1544
|
+
slug?: string;
|
|
1545
|
+
name?: string | null;
|
|
1546
|
+
};
|
|
1547
|
+
hint?: string;
|
|
1548
|
+
}>;
|
|
1150
1549
|
/** Place a backorder on a taken domain (POST /api/backorders) */
|
|
1151
1550
|
createBackorder(body: {
|
|
1152
1551
|
domain: string;
|
|
@@ -1368,6 +1767,17 @@ export declare class Domani {
|
|
|
1368
1767
|
deleted?: boolean;
|
|
1369
1768
|
hint?: string;
|
|
1370
1769
|
}>;
|
|
1770
|
+
/** Delete assistant-derived data (DELETE /api/assistant/data) */
|
|
1771
|
+
deleteAssistantData(): Promise<{
|
|
1772
|
+
ok?: boolean;
|
|
1773
|
+
deleted?: {
|
|
1774
|
+
work_items?: number;
|
|
1775
|
+
claims?: number;
|
|
1776
|
+
entities?: number;
|
|
1777
|
+
jobs?: number;
|
|
1778
|
+
};
|
|
1779
|
+
source_mail_deleted?: false;
|
|
1780
|
+
}>;
|
|
1371
1781
|
/** Delete a contact (DELETE /api/contacts/{address}) */
|
|
1372
1782
|
deleteContact(address: string): Promise<void>;
|
|
1373
1783
|
/** Remove a DNSSEC DS record (disable DNSSEC) (DELETE /api/domains/{domain}/dnssec) */
|
|
@@ -1433,6 +1843,30 @@ export declare class Domani {
|
|
|
1433
1843
|
refresh_token?: string;
|
|
1434
1844
|
scope?: string;
|
|
1435
1845
|
}>;
|
|
1846
|
+
/** Export derived assistant data (GET /api/assistant/data) */
|
|
1847
|
+
exportAssistantData(): Promise<{
|
|
1848
|
+
format?: "mailzero-derived-export.v1";
|
|
1849
|
+
exported_at?: string;
|
|
1850
|
+
note?: string;
|
|
1851
|
+
}>;
|
|
1852
|
+
/** Extract the fields you need from a message with your own schema (POST /api/emails/{address}/messages/{id}/extract) */
|
|
1853
|
+
extractFromEmailMessage(address: string, id: string, body: {
|
|
1854
|
+
schema: Record<string, unknown>;
|
|
1855
|
+
instructions?: string;
|
|
1856
|
+
}): Promise<{
|
|
1857
|
+
message_id: string;
|
|
1858
|
+
data: Record<string, unknown>;
|
|
1859
|
+
confidence: number;
|
|
1860
|
+
evidence_quotes: string[];
|
|
1861
|
+
model: string;
|
|
1862
|
+
cached: boolean;
|
|
1863
|
+
generated_at: string;
|
|
1864
|
+
usage?: {
|
|
1865
|
+
input_tokens?: number;
|
|
1866
|
+
output_tokens?: number;
|
|
1867
|
+
latency_ms?: number;
|
|
1868
|
+
};
|
|
1869
|
+
}>;
|
|
1436
1870
|
/** Finalize an agreed negotiation (pay) (POST /api/negotiations/{id}/finalize) */
|
|
1437
1871
|
finalizeNegotiation(id: string, body?: {
|
|
1438
1872
|
payment_method?: "card" | "usdc" | "balance";
|
|
@@ -1456,6 +1890,127 @@ export declare class Domani {
|
|
|
1456
1890
|
getAccount(): Promise<AccountInfo>;
|
|
1457
1891
|
/** Get truthful activation state and recommended next actions (GET /api/me/activation) */
|
|
1458
1892
|
getActivation(): Promise<ActivationProjection>;
|
|
1893
|
+
/** Get the exact action preview by opaque ID (GET /api/assistant/action-plans/{id}) */
|
|
1894
|
+
getAssistantActionPlan(id: string): Promise<{
|
|
1895
|
+
id?: string;
|
|
1896
|
+
status?: "proposed" | "approved" | "executed" | "stale" | "expired";
|
|
1897
|
+
expires_at?: string;
|
|
1898
|
+
source_revision?: number;
|
|
1899
|
+
effects?: ({
|
|
1900
|
+
kind?: "reply";
|
|
1901
|
+
mailbox_id?: string;
|
|
1902
|
+
reply_to_message_id?: string;
|
|
1903
|
+
body?: string;
|
|
1904
|
+
commitments?: Record<string, unknown>[];
|
|
1905
|
+
expected_reply?: Record<string, unknown> | null;
|
|
1906
|
+
})[];
|
|
1907
|
+
}>;
|
|
1908
|
+
/** Get content-minimized assistant Activity (GET /api/assistant/activity) */
|
|
1909
|
+
getAssistantActivity(query?: {
|
|
1910
|
+
limit?: number;
|
|
1911
|
+
}): Promise<{
|
|
1912
|
+
type?: "activity";
|
|
1913
|
+
as_of?: string;
|
|
1914
|
+
events?: ({
|
|
1915
|
+
id?: string;
|
|
1916
|
+
kind?: "interaction" | "receipt";
|
|
1917
|
+
action?: string;
|
|
1918
|
+
status?: string;
|
|
1919
|
+
actor?: string;
|
|
1920
|
+
work_item?: {
|
|
1921
|
+
id?: string;
|
|
1922
|
+
title?: string;
|
|
1923
|
+
};
|
|
1924
|
+
occurred_at?: string;
|
|
1925
|
+
})[];
|
|
1926
|
+
}>;
|
|
1927
|
+
/** Get background history-import progress (GET /api/assistant/backfill) */
|
|
1928
|
+
getAssistantBackfill(): Promise<{
|
|
1929
|
+
backfill?: {
|
|
1930
|
+
id?: string;
|
|
1931
|
+
status?: "queued" | "scanning" | "processing" | "completed" | "cancelled";
|
|
1932
|
+
phase?: string;
|
|
1933
|
+
paused?: boolean;
|
|
1934
|
+
processed?: number;
|
|
1935
|
+
total?: number;
|
|
1936
|
+
failed?: number;
|
|
1937
|
+
percent?: number | null;
|
|
1938
|
+
estimated_seconds_remaining?: number | null;
|
|
1939
|
+
estimated_completion_at?: string | null;
|
|
1940
|
+
can_close_app?: boolean;
|
|
1941
|
+
started_at?: string;
|
|
1942
|
+
completed_at?: string | null;
|
|
1943
|
+
} | null;
|
|
1944
|
+
}>;
|
|
1945
|
+
/** Read the situation brief for a correspondent (GET /api/assistant/brief) */
|
|
1946
|
+
getAssistantCorrespondentBrief(query?: {
|
|
1947
|
+
correspondent: string;
|
|
1948
|
+
mailbox?: string;
|
|
1949
|
+
}): Promise<{
|
|
1950
|
+
correspondent: string;
|
|
1951
|
+
mailboxes: string[];
|
|
1952
|
+
brief: AssistantBrief | unknown;
|
|
1953
|
+
related: {
|
|
1954
|
+
id?: string;
|
|
1955
|
+
title?: string;
|
|
1956
|
+
status?: string;
|
|
1957
|
+
attention_level?: string;
|
|
1958
|
+
occurrences?: number;
|
|
1959
|
+
last_seen_at?: string;
|
|
1960
|
+
}[];
|
|
1961
|
+
recent_mail: ({
|
|
1962
|
+
id?: string;
|
|
1963
|
+
thread_id?: string;
|
|
1964
|
+
subject?: string | null;
|
|
1965
|
+
mailbox?: string;
|
|
1966
|
+
received_at?: string;
|
|
1967
|
+
})[];
|
|
1968
|
+
generated_at: string;
|
|
1969
|
+
}>;
|
|
1970
|
+
/** Get Mailzero assistant settings (GET /api/assistant/settings) */
|
|
1971
|
+
getAssistantSettings(): Promise<AssistantSettings>;
|
|
1972
|
+
/** Get the grounded Today decision queue (GET /api/assistant/today) */
|
|
1973
|
+
getAssistantToday(query?: {
|
|
1974
|
+
agent?: string;
|
|
1975
|
+
}): Promise<AssistantTodayView>;
|
|
1976
|
+
/** Get one assistant Work item and exact current plan (GET /api/assistant/work-items/{id}) */
|
|
1977
|
+
getAssistantWorkItem(id: string): Promise<AssistantWorkItem>;
|
|
1978
|
+
/** Read the situation brief of a Work item (GET /api/assistant/work-items/{id}/brief) */
|
|
1979
|
+
getAssistantWorkItemBrief(id: string): Promise<AssistantBrief>;
|
|
1980
|
+
/** Read the facts behind a Work item (GET /api/assistant/work-items/{id}/facts) */
|
|
1981
|
+
getAssistantWorkItemFacts(id: string): Promise<{
|
|
1982
|
+
work_item_id: string;
|
|
1983
|
+
version?: number;
|
|
1984
|
+
analysed: boolean;
|
|
1985
|
+
analyses?: {
|
|
1986
|
+
id?: string;
|
|
1987
|
+
generated_at?: string;
|
|
1988
|
+
coverage?: string;
|
|
1989
|
+
}[];
|
|
1990
|
+
facts: Fact[];
|
|
1991
|
+
entities: {
|
|
1992
|
+
kind?: string;
|
|
1993
|
+
name?: string;
|
|
1994
|
+
aliases?: string[];
|
|
1995
|
+
ref?: string;
|
|
1996
|
+
}[];
|
|
1997
|
+
commitments: ({
|
|
1998
|
+
id?: string;
|
|
1999
|
+
who?: string;
|
|
2000
|
+
owed_to?: string | null;
|
|
2001
|
+
what?: string;
|
|
2002
|
+
due_at?: string | null;
|
|
2003
|
+
status?: string;
|
|
2004
|
+
})[];
|
|
2005
|
+
expectations: ({
|
|
2006
|
+
id?: string;
|
|
2007
|
+
who?: string;
|
|
2008
|
+
what?: string;
|
|
2009
|
+
due_at?: string | null;
|
|
2010
|
+
status?: string;
|
|
2011
|
+
})[];
|
|
2012
|
+
evidence_refs?: string[];
|
|
2013
|
+
}>;
|
|
1459
2014
|
/** Get EPP auth code (GET /api/domains/{domain}/auth-code) */
|
|
1460
2015
|
getAuthCode(domain: string): Promise<{
|
|
1461
2016
|
domain: string;
|
|
@@ -1627,6 +2182,8 @@ export declare class Domani {
|
|
|
1627
2182
|
})[];
|
|
1628
2183
|
caveats?: string[];
|
|
1629
2184
|
}>;
|
|
2185
|
+
/** Read what the assistant established about a message (GET /api/emails/{address}/messages/{id}/facts) */
|
|
2186
|
+
getEmailMessageFacts(address: string, id: string): Promise<MessageFacts>;
|
|
1630
2187
|
/** Get an HTTP hostname binding (GET /api/domains/{domain}/hostname-bindings/{id}) */
|
|
1631
2188
|
getHostnameBinding(domain: string, id: string): Promise<{
|
|
1632
2189
|
hostname_binding: HostnameBinding;
|
|
@@ -1678,18 +2235,52 @@ export declare class Domani {
|
|
|
1678
2235
|
};
|
|
1679
2236
|
hint?: string;
|
|
1680
2237
|
}>;
|
|
2238
|
+
/** Read one conversation, oldest message first (GET /api/emails/{address}/threads/{id}) */
|
|
2239
|
+
getMailboxThread(address: string, id: string): Promise<{
|
|
2240
|
+
id: string;
|
|
2241
|
+
subject?: string | null;
|
|
2242
|
+
participants: string[];
|
|
2243
|
+
message_count: number;
|
|
2244
|
+
unread_count: number;
|
|
2245
|
+
first_message_at?: string;
|
|
2246
|
+
last_message_at?: string;
|
|
2247
|
+
messages: ({
|
|
2248
|
+
id?: string;
|
|
2249
|
+
thread_id?: string;
|
|
2250
|
+
labels?: string[];
|
|
2251
|
+
message_id?: string | null;
|
|
2252
|
+
direction?: "in" | "out";
|
|
2253
|
+
from?: string;
|
|
2254
|
+
to?: string;
|
|
2255
|
+
cc?: string | null;
|
|
2256
|
+
subject?: string | null;
|
|
2257
|
+
text?: string | null;
|
|
2258
|
+
html?: string | null;
|
|
2259
|
+
in_reply_to?: string | null;
|
|
2260
|
+
references?: string | null;
|
|
2261
|
+
folder?: string;
|
|
2262
|
+
is_read?: boolean;
|
|
2263
|
+
starred?: boolean;
|
|
2264
|
+
label?: string | null;
|
|
2265
|
+
status?: string;
|
|
2266
|
+
created_at?: string;
|
|
2267
|
+
})[];
|
|
2268
|
+
}>;
|
|
1681
2269
|
/** Get mailbox webhook config (GET /api/emails/{address}/webhook) */
|
|
1682
2270
|
getMailboxWebhook(address: string): Promise<{
|
|
1683
2271
|
address?: string;
|
|
1684
2272
|
webhook_url?: string | null;
|
|
1685
2273
|
signing_secret?: string | null;
|
|
1686
2274
|
has_webhook?: boolean;
|
|
2275
|
+
events?: string[];
|
|
1687
2276
|
header_names?: string[];
|
|
1688
2277
|
hint?: string;
|
|
1689
2278
|
}>;
|
|
1690
2279
|
/** Get a message (GET /api/emails/{address}/messages/{id}) */
|
|
1691
2280
|
getMessageByAddress(address: string, id: string): Promise<{
|
|
1692
2281
|
id?: string;
|
|
2282
|
+
thread_id?: string;
|
|
2283
|
+
labels?: string[];
|
|
1693
2284
|
thread_key?: string;
|
|
1694
2285
|
thread_aliases?: string[];
|
|
1695
2286
|
message_id?: string | null;
|
|
@@ -1849,6 +2440,26 @@ export declare class Domani {
|
|
|
1849
2440
|
};
|
|
1850
2441
|
hint?: string;
|
|
1851
2442
|
}>;
|
|
2443
|
+
/** Record a fenced human Decision (POST /api/assistant/work-items/{id}/interactions) */
|
|
2444
|
+
interactWithAssistantWorkItem(id: string, body: {
|
|
2445
|
+
scope?: "item" | "sender" | "sender_domain" | "situation";
|
|
2446
|
+
type: "choose" | "instruct" | "take_over" | "snooze" | "ignore" | "correct" | "delegate";
|
|
2447
|
+
agent_slug?: string | null;
|
|
2448
|
+
work_item_version: number;
|
|
2449
|
+
decision_id?: string;
|
|
2450
|
+
decision_version?: number;
|
|
2451
|
+
option_id?: string;
|
|
2452
|
+
instruction?: string;
|
|
2453
|
+
until?: string;
|
|
2454
|
+
remind_at?: string;
|
|
2455
|
+
field?: string;
|
|
2456
|
+
correction?: string;
|
|
2457
|
+
idempotency_key: string;
|
|
2458
|
+
}): Promise<{
|
|
2459
|
+
ok?: boolean;
|
|
2460
|
+
work_item?: AssistantWorkItem;
|
|
2461
|
+
plan_id?: string | null;
|
|
2462
|
+
}>;
|
|
1852
2463
|
/** Invite a workspace member (POST /api/workspaces/{id}/invitations) */
|
|
1853
2464
|
inviteWorkspaceMember(id: string, body: {
|
|
1854
2465
|
email: string;
|
|
@@ -1858,6 +2469,8 @@ export declare class Domani {
|
|
|
1858
2469
|
}): Promise<void>;
|
|
1859
2470
|
/** Leave a workspace (DELETE /api/workspaces/{id}/members/me) */
|
|
1860
2471
|
leaveWorkspace(id: string): Promise<void>;
|
|
2472
|
+
/** List the API tokens of an agent identity (GET /api/agents/identity/{slug}/tokens) */
|
|
2473
|
+
listAgentTokens(slug: string): Promise<unknown>;
|
|
1861
2474
|
/** List security audit events (GET /api/audit) */
|
|
1862
2475
|
listAuditEvents(query?: {
|
|
1863
2476
|
limit?: number;
|
|
@@ -1977,6 +2590,7 @@ export declare class Domani {
|
|
|
1977
2590
|
limit?: number;
|
|
1978
2591
|
direction?: "in" | "out" | "all";
|
|
1979
2592
|
folder?: "inbox" | "archive" | "sent" | "spam" | "trash";
|
|
2593
|
+
label?: string;
|
|
1980
2594
|
view?: "starred" | "all" | "needs_human";
|
|
1981
2595
|
since?: string;
|
|
1982
2596
|
from?: string;
|
|
@@ -1989,6 +2603,8 @@ export declare class Domani {
|
|
|
1989
2603
|
}): Promise<{
|
|
1990
2604
|
messages?: ({
|
|
1991
2605
|
id?: string;
|
|
2606
|
+
thread_id?: string;
|
|
2607
|
+
labels?: string[];
|
|
1992
2608
|
thread_key?: string;
|
|
1993
2609
|
thread_aliases?: string[];
|
|
1994
2610
|
message_id?: string | null;
|
|
@@ -2133,6 +2749,18 @@ export declare class Domani {
|
|
|
2133
2749
|
storage_measured_at?: string | null;
|
|
2134
2750
|
})[];
|
|
2135
2751
|
}>;
|
|
2752
|
+
/** List the conversations of a mailbox (GET /api/emails/{address}/threads) */
|
|
2753
|
+
listMailboxThreads(address: string, query?: {
|
|
2754
|
+
folder?: "all" | "inbox" | "archive" | "sent" | "spam" | "trash";
|
|
2755
|
+
since?: string;
|
|
2756
|
+
limit?: number;
|
|
2757
|
+
cursor?: string;
|
|
2758
|
+
label?: string;
|
|
2759
|
+
}): Promise<{
|
|
2760
|
+
threads: EmailThread[];
|
|
2761
|
+
next_cursor: string | null;
|
|
2762
|
+
has_more: boolean;
|
|
2763
|
+
}>;
|
|
2136
2764
|
/** List inbound mail rules (GET /api/emails/{address}/rules) */
|
|
2137
2765
|
listMailRules(address: string): Promise<{
|
|
2138
2766
|
mailbox?: string;
|
|
@@ -2276,6 +2904,12 @@ export declare class Domani {
|
|
|
2276
2904
|
}): Promise<{
|
|
2277
2905
|
ok?: boolean;
|
|
2278
2906
|
}>;
|
|
2907
|
+
/** Mark a Work item as opened (POST /api/assistant/work-items/{id}/open) */
|
|
2908
|
+
openAssistantWorkItem(id: string): Promise<{
|
|
2909
|
+
ok?: boolean;
|
|
2910
|
+
opened_at?: string;
|
|
2911
|
+
unread?: boolean;
|
|
2912
|
+
}>;
|
|
2279
2913
|
/** Plan how to adopt an existing domain (GET /api/domains/adoption-plan) */
|
|
2280
2914
|
planDomainAdoption(query?: {
|
|
2281
2915
|
domain: string;
|
|
@@ -2369,6 +3003,24 @@ export declare class Domani {
|
|
|
2369
3003
|
refreshHttpRoute(id: string, body: {
|
|
2370
3004
|
expires_in: number;
|
|
2371
3005
|
}, idempotencyKey: string): Promise<HttpRouteReceipt>;
|
|
3006
|
+
/** Register a device for redacted Now alerts (POST /api/assistant/devices) */
|
|
3007
|
+
registerAssistantDevice(body: {
|
|
3008
|
+
installation_id: string;
|
|
3009
|
+
platform: "ios" | "android";
|
|
3010
|
+
environment: "development" | "preview" | "production";
|
|
3011
|
+
push_token: string;
|
|
3012
|
+
locale: string;
|
|
3013
|
+
lock_screen_detail?: "redacted" | "sender_only";
|
|
3014
|
+
}): Promise<{
|
|
3015
|
+
ok?: boolean;
|
|
3016
|
+
device?: {
|
|
3017
|
+
id?: string;
|
|
3018
|
+
platform?: string;
|
|
3019
|
+
environment?: string;
|
|
3020
|
+
locale?: string;
|
|
3021
|
+
lockScreenDetail?: string;
|
|
3022
|
+
};
|
|
3023
|
+
}>;
|
|
2372
3024
|
/** Register an OAuth client (RFC 7591) (POST /api/oauth/register) */
|
|
2373
3025
|
registerOAuthClient(body: {
|
|
2374
3026
|
redirect_uris: string[];
|
|
@@ -2412,6 +3064,12 @@ export declare class Domani {
|
|
|
2412
3064
|
slug?: string;
|
|
2413
3065
|
released?: boolean;
|
|
2414
3066
|
}>;
|
|
3067
|
+
/** Revoke a device registration (DELETE /api/assistant/devices) */
|
|
3068
|
+
removeAssistantDevice(query?: {
|
|
3069
|
+
installation_id: string;
|
|
3070
|
+
}): Promise<{
|
|
3071
|
+
ok?: boolean;
|
|
3072
|
+
}>;
|
|
2415
3073
|
/** Remove saved payment method (DELETE /api/billing/card) */
|
|
2416
3074
|
removeCard(): Promise<{
|
|
2417
3075
|
removed?: boolean;
|
|
@@ -2434,6 +3092,7 @@ export declare class Domani {
|
|
|
2434
3092
|
webhook_url?: string | null;
|
|
2435
3093
|
signing_secret?: string | null;
|
|
2436
3094
|
has_webhook?: boolean;
|
|
3095
|
+
events?: string[];
|
|
2437
3096
|
header_names?: string[];
|
|
2438
3097
|
hint?: string;
|
|
2439
3098
|
}>;
|
|
@@ -2560,6 +3219,16 @@ export declare class Domani {
|
|
|
2560
3219
|
dry_run?: boolean;
|
|
2561
3220
|
would_apply?: DnsRecord[];
|
|
2562
3221
|
}>;
|
|
3222
|
+
/** Retry failed history-import messages (POST /api/assistant/backfill) */
|
|
3223
|
+
retryAssistantBackfillFailures(): Promise<{
|
|
3224
|
+
ok?: boolean;
|
|
3225
|
+
retried?: number;
|
|
3226
|
+
}>;
|
|
3227
|
+
/** Revoke an agent's API token (DELETE /api/agents/identity/{slug}/tokens/{id}) */
|
|
3228
|
+
revokeAgentToken(slug: string, id: string): Promise<{
|
|
3229
|
+
success?: boolean;
|
|
3230
|
+
hint?: string;
|
|
3231
|
+
}>;
|
|
2563
3232
|
/** Revoke an app password (hosted) (DELETE /api/emails/{address}/credentials/{id}) */
|
|
2564
3233
|
revokeMailboxCredential(address: string, id: string): Promise<{
|
|
2565
3234
|
id?: string;
|
|
@@ -2601,6 +3270,75 @@ export declare class Domani {
|
|
|
2601
3270
|
source?: "all" | "primary" | "secondary";
|
|
2602
3271
|
order?: "asc" | "desc";
|
|
2603
3272
|
}): Promise<SearchResult>;
|
|
3273
|
+
/** Search mail by meaning and by words (GET /api/emails/search) */
|
|
3274
|
+
searchEmailMessages(query?: {
|
|
3275
|
+
mailbox?: string;
|
|
3276
|
+
q: string;
|
|
3277
|
+
mode?: "hybrid" | "semantic" | "keyword";
|
|
3278
|
+
limit?: number;
|
|
3279
|
+
since?: string;
|
|
3280
|
+
until?: string;
|
|
3281
|
+
folder?: "inbox" | "archive" | "sent" | "spam" | "trash";
|
|
3282
|
+
from?: string;
|
|
3283
|
+
label?: string;
|
|
3284
|
+
}): Promise<{
|
|
3285
|
+
results?: ({
|
|
3286
|
+
message?: {
|
|
3287
|
+
id?: string;
|
|
3288
|
+
mailbox?: string;
|
|
3289
|
+
thread_key?: string;
|
|
3290
|
+
direction?: string;
|
|
3291
|
+
from?: string;
|
|
3292
|
+
to?: string;
|
|
3293
|
+
subject?: string | null;
|
|
3294
|
+
snippet?: string;
|
|
3295
|
+
created_at?: string;
|
|
3296
|
+
folder?: string;
|
|
3297
|
+
is_read?: boolean;
|
|
3298
|
+
};
|
|
3299
|
+
score?: number;
|
|
3300
|
+
why?: "words" | "meaning" | "both";
|
|
3301
|
+
highlight?: string | null;
|
|
3302
|
+
})[];
|
|
3303
|
+
mode?: "hybrid" | "semantic" | "keyword";
|
|
3304
|
+
query?: string;
|
|
3305
|
+
took_ms?: number;
|
|
3306
|
+
hint?: string;
|
|
3307
|
+
}>;
|
|
3308
|
+
/** Search one mailbox by meaning and by words (GET /api/emails/{address}/search) */
|
|
3309
|
+
searchEmailMessagesByAddress(address: string, query?: {
|
|
3310
|
+
q: string;
|
|
3311
|
+
mode?: "hybrid" | "semantic" | "keyword";
|
|
3312
|
+
limit?: number;
|
|
3313
|
+
since?: string;
|
|
3314
|
+
until?: string;
|
|
3315
|
+
folder?: "inbox" | "archive" | "sent" | "spam" | "trash";
|
|
3316
|
+
from?: string;
|
|
3317
|
+
label?: string;
|
|
3318
|
+
}): Promise<{
|
|
3319
|
+
results?: ({
|
|
3320
|
+
message?: {
|
|
3321
|
+
id?: string;
|
|
3322
|
+
mailbox?: string;
|
|
3323
|
+
thread_key?: string;
|
|
3324
|
+
direction?: string;
|
|
3325
|
+
from?: string;
|
|
3326
|
+
to?: string;
|
|
3327
|
+
subject?: string | null;
|
|
3328
|
+
snippet?: string;
|
|
3329
|
+
created_at?: string;
|
|
3330
|
+
folder?: string;
|
|
3331
|
+
is_read?: boolean;
|
|
3332
|
+
};
|
|
3333
|
+
score?: number;
|
|
3334
|
+
why?: "words" | "meaning" | "both";
|
|
3335
|
+
highlight?: string | null;
|
|
3336
|
+
})[];
|
|
3337
|
+
mode?: "hybrid" | "semantic" | "keyword";
|
|
3338
|
+
query?: string;
|
|
3339
|
+
took_ms?: number;
|
|
3340
|
+
hint?: string;
|
|
3341
|
+
}>;
|
|
2604
3342
|
/** List a domain for sale (open marketplace) (POST /api/domains/sell) */
|
|
2605
3343
|
sellDomain(body: {
|
|
2606
3344
|
domain: string;
|
|
@@ -2696,12 +3434,14 @@ export declare class Domani {
|
|
|
2696
3434
|
/** Set mailbox webhook (PUT /api/emails/{address}/webhook) */
|
|
2697
3435
|
setMailboxWebhook(address: string, body: {
|
|
2698
3436
|
url: string;
|
|
3437
|
+
events?: ("email.received" | "email.delivered" | "email.bounced" | "email.failed" | "email.suppressed" | "email.complained" | "email.delayed" | "assistant.item.delegated" | "assistant.item.recalled")[];
|
|
2699
3438
|
headers?: Record<string, string>;
|
|
2700
3439
|
}): Promise<{
|
|
2701
3440
|
address?: string;
|
|
2702
3441
|
webhook_url?: string;
|
|
2703
3442
|
signing_secret?: string;
|
|
2704
3443
|
has_webhook?: boolean;
|
|
3444
|
+
events?: string[];
|
|
2705
3445
|
header_names?: string[];
|
|
2706
3446
|
hint?: string;
|
|
2707
3447
|
}>;
|
|
@@ -2770,10 +3510,29 @@ export declare class Domani {
|
|
|
2770
3510
|
sources?: string[];
|
|
2771
3511
|
capturedAt?: string;
|
|
2772
3512
|
}>;
|
|
3513
|
+
/** Consent to and start a background history import (POST /api/assistant/preview) */
|
|
3514
|
+
startAssistantPreview(body: {
|
|
3515
|
+
mailbox_ids: string[];
|
|
3516
|
+
history_window_days?: number;
|
|
3517
|
+
consent: true;
|
|
3518
|
+
consent_version: "mailzero-personal-ai.v1";
|
|
3519
|
+
}): Promise<{
|
|
3520
|
+
ok?: boolean;
|
|
3521
|
+
preview?: {
|
|
3522
|
+
mailbox_ids?: string[];
|
|
3523
|
+
history_window_days?: number;
|
|
3524
|
+
background?: boolean;
|
|
3525
|
+
backfill_id?: string;
|
|
3526
|
+
};
|
|
3527
|
+
}>;
|
|
2773
3528
|
/** Start bank payout onboarding (POST /api/billing/connect) */
|
|
2774
3529
|
startPayoutOnboarding(): Promise<{
|
|
2775
3530
|
url?: string;
|
|
2776
3531
|
}>;
|
|
3532
|
+
/** Stream mailbox events (server-sent events) (GET /api/emails/{address}/events) */
|
|
3533
|
+
streamMailboxEvents(address: string, lastEventId?: string, query?: {
|
|
3534
|
+
since?: string;
|
|
3535
|
+
}): Promise<Response>;
|
|
2777
3536
|
/** AI-powered domain suggestions with availability (GET /api/domains/suggest) */
|
|
2778
3537
|
suggestDomains(query?: {
|
|
2779
3538
|
prompt: string;
|
|
@@ -2864,9 +3623,27 @@ export declare class Domani {
|
|
|
2864
3623
|
dismissed_version: number;
|
|
2865
3624
|
hint: string;
|
|
2866
3625
|
}>;
|
|
3626
|
+
/** Update Mailzero assistant settings (PUT /api/assistant/settings) */
|
|
3627
|
+
updateAssistantSettings(body: {
|
|
3628
|
+
enabled?: boolean;
|
|
3629
|
+
shadow_enabled?: boolean;
|
|
3630
|
+
paused?: boolean;
|
|
3631
|
+
mailbox_ids?: string[];
|
|
3632
|
+
agent_mailbox_ids?: string[];
|
|
3633
|
+
history_window_days?: number;
|
|
3634
|
+
attachment_vision?: boolean;
|
|
3635
|
+
}): Promise<{
|
|
3636
|
+
ok?: boolean;
|
|
3637
|
+
enabled?: boolean;
|
|
3638
|
+
shadow_enabled?: boolean;
|
|
3639
|
+
paused?: boolean;
|
|
3640
|
+
mailbox_ids?: string[];
|
|
3641
|
+
}>;
|
|
2867
3642
|
/** Assign or update a shared inbox conversation (PATCH /api/email/collaboration) */
|
|
2868
3643
|
updateConversationState(body: {
|
|
2869
3644
|
mailbox_id: string;
|
|
3645
|
+
thread_id?: string;
|
|
3646
|
+
labels?: string[];
|
|
2870
3647
|
thread_key: string;
|
|
2871
3648
|
thread_aliases?: string[];
|
|
2872
3649
|
subject?: string | null;
|
|
@@ -2892,10 +3669,13 @@ export declare class Domani {
|
|
|
2892
3669
|
/** Apply a lifecycle action to messages (POST /api/emails/{address}/messages/actions) */
|
|
2893
3670
|
updateEmailMessagesByAddress(address: string, body: {
|
|
2894
3671
|
message_ids: string[];
|
|
2895
|
-
action: "move" | "mark_read" | "star" | "restore" | "delete_permanently";
|
|
3672
|
+
action: "move" | "mark_read" | "star" | "restore" | "delete_permanently" | "label";
|
|
2896
3673
|
destination?: "inbox" | "archive" | "sent" | "spam" | "trash";
|
|
2897
3674
|
read?: boolean;
|
|
2898
3675
|
starred?: boolean;
|
|
3676
|
+
add?: string[];
|
|
3677
|
+
remove?: string[];
|
|
3678
|
+
set?: string[];
|
|
2899
3679
|
idempotency_key?: string;
|
|
2900
3680
|
}, idempotencyKey?: string): Promise<MailboxOperationReceipt>;
|
|
2901
3681
|
/** Update binding browser mode (PATCH /api/domains/{domain}/hostname-bindings/{id}) */
|
package/dist/index.js
CHANGED
|
@@ -76,6 +76,35 @@ class Domani {
|
|
|
76
76
|
throw new DomaniError(res.status, data);
|
|
77
77
|
return data;
|
|
78
78
|
}
|
|
79
|
+
/** Open a server-sent event stream; read `response.body` with an SSE parser. */
|
|
80
|
+
async stream(method, path, opts) {
|
|
81
|
+
let url = this.baseUrl + path;
|
|
82
|
+
if (opts?.query) {
|
|
83
|
+
const qs = new URLSearchParams();
|
|
84
|
+
for (const [k, v] of Object.entries(opts.query))
|
|
85
|
+
if (v !== undefined && v !== null)
|
|
86
|
+
qs.append(k, String(v));
|
|
87
|
+
const s = qs.toString();
|
|
88
|
+
if (s)
|
|
89
|
+
url += (url.includes("?") ? "&" : "?") + s;
|
|
90
|
+
}
|
|
91
|
+
const headers = { Authorization: `Bearer ${this.apiKey}`, Accept: "text/event-stream" };
|
|
92
|
+
if (opts?.headers)
|
|
93
|
+
for (const [name, value] of Object.entries(opts.headers))
|
|
94
|
+
if (value !== undefined)
|
|
95
|
+
headers[name] = value;
|
|
96
|
+
const res = await this.fetchImpl(url, { method, headers, signal: opts?.signal });
|
|
97
|
+
if (!res.ok) {
|
|
98
|
+
const text = await res.text();
|
|
99
|
+
let data = text;
|
|
100
|
+
try {
|
|
101
|
+
data = JSON.parse(text);
|
|
102
|
+
}
|
|
103
|
+
catch { /* not json */ }
|
|
104
|
+
throw new DomaniError(res.status, data);
|
|
105
|
+
}
|
|
106
|
+
return res;
|
|
107
|
+
}
|
|
79
108
|
/** Accept an access or ownership offer (POST /api/workspaces/access/offers/accept) */
|
|
80
109
|
acceptWorkspaceAccessOffer(body) {
|
|
81
110
|
return this.request("POST", `/api/workspaces/access/offers/accept`, { body });
|
|
@@ -176,6 +205,10 @@ class Domani {
|
|
|
176
205
|
connectDomain(domain, body) {
|
|
177
206
|
return this.request("POST", `/api/domains/${enc(domain)}/connect`, { body });
|
|
178
207
|
}
|
|
208
|
+
/** Give an agent its own API key in one call (POST /api/agents/identity/{slug}/tokens) */
|
|
209
|
+
createAgentToken(slug, body) {
|
|
210
|
+
return this.request("POST", `/api/agents/identity/${enc(slug)}/tokens`, { body });
|
|
211
|
+
}
|
|
179
212
|
/** Place a backorder on a taken domain (POST /api/backorders) */
|
|
180
213
|
createBackorder(body) {
|
|
181
214
|
return this.request("POST", `/api/backorders`, { body });
|
|
@@ -240,6 +273,10 @@ class Domani {
|
|
|
240
273
|
deleteAccount() {
|
|
241
274
|
return this.request("DELETE", `/api/me`, undefined);
|
|
242
275
|
}
|
|
276
|
+
/** Delete assistant-derived data (DELETE /api/assistant/data) */
|
|
277
|
+
deleteAssistantData() {
|
|
278
|
+
return this.request("DELETE", `/api/assistant/data`, undefined);
|
|
279
|
+
}
|
|
243
280
|
/** Delete a contact (DELETE /api/contacts/{address}) */
|
|
244
281
|
deleteContact(address) {
|
|
245
282
|
return this.request("DELETE", `/api/contacts/${enc(address)}`, undefined);
|
|
@@ -284,6 +321,14 @@ class Domani {
|
|
|
284
321
|
exchangeOAuthToken() {
|
|
285
322
|
return this.request("POST", `/api/oauth/token`, undefined);
|
|
286
323
|
}
|
|
324
|
+
/** Export derived assistant data (GET /api/assistant/data) */
|
|
325
|
+
exportAssistantData() {
|
|
326
|
+
return this.request("GET", `/api/assistant/data`, undefined);
|
|
327
|
+
}
|
|
328
|
+
/** Extract the fields you need from a message with your own schema (POST /api/emails/{address}/messages/{id}/extract) */
|
|
329
|
+
extractFromEmailMessage(address, id, body) {
|
|
330
|
+
return this.request("POST", `/api/emails/${enc(address)}/messages/${enc(id)}/extract`, { body });
|
|
331
|
+
}
|
|
287
332
|
/** Finalize an agreed negotiation (pay) (POST /api/negotiations/{id}/finalize) */
|
|
288
333
|
finalizeNegotiation(id, body) {
|
|
289
334
|
return this.request("POST", `/api/negotiations/${enc(id)}/finalize`, { body });
|
|
@@ -300,6 +345,42 @@ class Domani {
|
|
|
300
345
|
getActivation() {
|
|
301
346
|
return this.request("GET", `/api/me/activation`, undefined);
|
|
302
347
|
}
|
|
348
|
+
/** Get the exact action preview by opaque ID (GET /api/assistant/action-plans/{id}) */
|
|
349
|
+
getAssistantActionPlan(id) {
|
|
350
|
+
return this.request("GET", `/api/assistant/action-plans/${enc(id)}`, undefined);
|
|
351
|
+
}
|
|
352
|
+
/** Get content-minimized assistant Activity (GET /api/assistant/activity) */
|
|
353
|
+
getAssistantActivity(query) {
|
|
354
|
+
return this.request("GET", `/api/assistant/activity`, { query });
|
|
355
|
+
}
|
|
356
|
+
/** Get background history-import progress (GET /api/assistant/backfill) */
|
|
357
|
+
getAssistantBackfill() {
|
|
358
|
+
return this.request("GET", `/api/assistant/backfill`, undefined);
|
|
359
|
+
}
|
|
360
|
+
/** Read the situation brief for a correspondent (GET /api/assistant/brief) */
|
|
361
|
+
getAssistantCorrespondentBrief(query) {
|
|
362
|
+
return this.request("GET", `/api/assistant/brief`, { query });
|
|
363
|
+
}
|
|
364
|
+
/** Get Mailzero assistant settings (GET /api/assistant/settings) */
|
|
365
|
+
getAssistantSettings() {
|
|
366
|
+
return this.request("GET", `/api/assistant/settings`, undefined);
|
|
367
|
+
}
|
|
368
|
+
/** Get the grounded Today decision queue (GET /api/assistant/today) */
|
|
369
|
+
getAssistantToday(query) {
|
|
370
|
+
return this.request("GET", `/api/assistant/today`, { query });
|
|
371
|
+
}
|
|
372
|
+
/** Get one assistant Work item and exact current plan (GET /api/assistant/work-items/{id}) */
|
|
373
|
+
getAssistantWorkItem(id) {
|
|
374
|
+
return this.request("GET", `/api/assistant/work-items/${enc(id)}`, undefined);
|
|
375
|
+
}
|
|
376
|
+
/** Read the situation brief of a Work item (GET /api/assistant/work-items/{id}/brief) */
|
|
377
|
+
getAssistantWorkItemBrief(id) {
|
|
378
|
+
return this.request("GET", `/api/assistant/work-items/${enc(id)}/brief`, undefined);
|
|
379
|
+
}
|
|
380
|
+
/** Read the facts behind a Work item (GET /api/assistant/work-items/{id}/facts) */
|
|
381
|
+
getAssistantWorkItemFacts(id) {
|
|
382
|
+
return this.request("GET", `/api/assistant/work-items/${enc(id)}/facts`, undefined);
|
|
383
|
+
}
|
|
303
384
|
/** Get EPP auth code (GET /api/domains/{domain}/auth-code) */
|
|
304
385
|
getAuthCode(domain) {
|
|
305
386
|
return this.request("GET", `/api/domains/${enc(domain)}/auth-code`, undefined);
|
|
@@ -364,6 +445,10 @@ class Domani {
|
|
|
364
445
|
getEmailDeliverability(domain) {
|
|
365
446
|
return this.request("GET", `/api/domains/${enc(domain)}/email/deliverability`, undefined);
|
|
366
447
|
}
|
|
448
|
+
/** Read what the assistant established about a message (GET /api/emails/{address}/messages/{id}/facts) */
|
|
449
|
+
getEmailMessageFacts(address, id) {
|
|
450
|
+
return this.request("GET", `/api/emails/${enc(address)}/messages/${enc(id)}/facts`, undefined);
|
|
451
|
+
}
|
|
367
452
|
/** Get an HTTP hostname binding (GET /api/domains/{domain}/hostname-bindings/{id}) */
|
|
368
453
|
getHostnameBinding(domain, id) {
|
|
369
454
|
return this.request("GET", `/api/domains/${enc(domain)}/hostname-bindings/${enc(id)}`, undefined);
|
|
@@ -384,6 +469,10 @@ class Domani {
|
|
|
384
469
|
getMailboxClientSettings(address) {
|
|
385
470
|
return this.request("GET", `/api/emails/${enc(address)}/client-settings`, undefined);
|
|
386
471
|
}
|
|
472
|
+
/** Read one conversation, oldest message first (GET /api/emails/{address}/threads/{id}) */
|
|
473
|
+
getMailboxThread(address, id) {
|
|
474
|
+
return this.request("GET", `/api/emails/${enc(address)}/threads/${enc(id)}`, undefined);
|
|
475
|
+
}
|
|
387
476
|
/** Get mailbox webhook config (GET /api/emails/{address}/webhook) */
|
|
388
477
|
getMailboxWebhook(address) {
|
|
389
478
|
return this.request("GET", `/api/emails/${enc(address)}/webhook`, undefined);
|
|
@@ -452,6 +541,10 @@ class Domani {
|
|
|
452
541
|
importDomain(body) {
|
|
453
542
|
return this.request("POST", `/api/domains/import`, { body });
|
|
454
543
|
}
|
|
544
|
+
/** Record a fenced human Decision (POST /api/assistant/work-items/{id}/interactions) */
|
|
545
|
+
interactWithAssistantWorkItem(id, body) {
|
|
546
|
+
return this.request("POST", `/api/assistant/work-items/${enc(id)}/interactions`, { body });
|
|
547
|
+
}
|
|
455
548
|
/** Invite a workspace member (POST /api/workspaces/{id}/invitations) */
|
|
456
549
|
inviteWorkspaceMember(id, body) {
|
|
457
550
|
return this.request("POST", `/api/workspaces/${enc(id)}/invitations`, { body });
|
|
@@ -460,6 +553,10 @@ class Domani {
|
|
|
460
553
|
leaveWorkspace(id) {
|
|
461
554
|
return this.request("DELETE", `/api/workspaces/${enc(id)}/members/me`, undefined);
|
|
462
555
|
}
|
|
556
|
+
/** List the API tokens of an agent identity (GET /api/agents/identity/{slug}/tokens) */
|
|
557
|
+
listAgentTokens(slug) {
|
|
558
|
+
return this.request("GET", `/api/agents/identity/${enc(slug)}/tokens`, undefined);
|
|
559
|
+
}
|
|
463
560
|
/** List security audit events (GET /api/audit) */
|
|
464
561
|
listAuditEvents(query) {
|
|
465
562
|
return this.request("GET", `/api/audit`, { query });
|
|
@@ -544,6 +641,10 @@ class Domani {
|
|
|
544
641
|
listMailboxesByAddress(query) {
|
|
545
642
|
return this.request("GET", `/api/emails`, { query });
|
|
546
643
|
}
|
|
644
|
+
/** List the conversations of a mailbox (GET /api/emails/{address}/threads) */
|
|
645
|
+
listMailboxThreads(address, query) {
|
|
646
|
+
return this.request("GET", `/api/emails/${enc(address)}/threads`, { query });
|
|
647
|
+
}
|
|
547
648
|
/** List inbound mail rules (GET /api/emails/{address}/rules) */
|
|
548
649
|
listMailRules(address) {
|
|
549
650
|
return this.request("GET", `/api/emails/${enc(address)}/rules`, undefined);
|
|
@@ -608,6 +709,10 @@ class Domani {
|
|
|
608
709
|
markNotificationRead(id, body) {
|
|
609
710
|
return this.request("PATCH", `/api/notifications/${enc(id)}`, { body });
|
|
610
711
|
}
|
|
712
|
+
/** Mark a Work item as opened (POST /api/assistant/work-items/{id}/open) */
|
|
713
|
+
openAssistantWorkItem(id) {
|
|
714
|
+
return this.request("POST", `/api/assistant/work-items/${enc(id)}/open`, undefined);
|
|
715
|
+
}
|
|
611
716
|
/** Plan how to adopt an existing domain (GET /api/domains/adoption-plan) */
|
|
612
717
|
planDomainAdoption(query) {
|
|
613
718
|
return this.request("GET", `/api/domains/adoption-plan`, { query });
|
|
@@ -632,6 +737,10 @@ class Domani {
|
|
|
632
737
|
refreshHttpRoute(id, body, idempotencyKey) {
|
|
633
738
|
return this.request("PATCH", `/api/http-routes/${enc(id)}`, { body, headers: { "Idempotency-Key": idempotencyKey } });
|
|
634
739
|
}
|
|
740
|
+
/** Register a device for redacted Now alerts (POST /api/assistant/devices) */
|
|
741
|
+
registerAssistantDevice(body) {
|
|
742
|
+
return this.request("POST", `/api/assistant/devices`, { body });
|
|
743
|
+
}
|
|
635
744
|
/** Register an OAuth client (RFC 7591) (POST /api/oauth/register) */
|
|
636
745
|
registerOAuthClient(body) {
|
|
637
746
|
return this.request("POST", `/api/oauth/register`, { body });
|
|
@@ -648,6 +757,10 @@ class Domani {
|
|
|
648
757
|
releaseIdentity(slug) {
|
|
649
758
|
return this.request("DELETE", `/api/agents/identity/${enc(slug)}`, undefined);
|
|
650
759
|
}
|
|
760
|
+
/** Revoke a device registration (DELETE /api/assistant/devices) */
|
|
761
|
+
removeAssistantDevice(query) {
|
|
762
|
+
return this.request("DELETE", `/api/assistant/devices`, { query });
|
|
763
|
+
}
|
|
651
764
|
/** Remove saved payment method (DELETE /api/billing/card) */
|
|
652
765
|
removeCard() {
|
|
653
766
|
return this.request("DELETE", `/api/billing/card`, undefined);
|
|
@@ -716,6 +829,14 @@ class Domani {
|
|
|
716
829
|
restoreDns(domain, body) {
|
|
717
830
|
return this.request("POST", `/api/domains/${enc(domain)}/dns/restore`, { body });
|
|
718
831
|
}
|
|
832
|
+
/** Retry failed history-import messages (POST /api/assistant/backfill) */
|
|
833
|
+
retryAssistantBackfillFailures() {
|
|
834
|
+
return this.request("POST", `/api/assistant/backfill`, undefined);
|
|
835
|
+
}
|
|
836
|
+
/** Revoke an agent's API token (DELETE /api/agents/identity/{slug}/tokens/{id}) */
|
|
837
|
+
revokeAgentToken(slug, id) {
|
|
838
|
+
return this.request("DELETE", `/api/agents/identity/${enc(slug)}/tokens/${enc(id)}`, undefined);
|
|
839
|
+
}
|
|
719
840
|
/** Revoke an app password (hosted) (DELETE /api/emails/{address}/credentials/{id}) */
|
|
720
841
|
revokeMailboxCredential(address, id) {
|
|
721
842
|
return this.request("DELETE", `/api/emails/${enc(address)}/credentials/${enc(id)}`, undefined);
|
|
@@ -752,6 +873,14 @@ class Domani {
|
|
|
752
873
|
search(query) {
|
|
753
874
|
return this.request("GET", `/api/domains/search`, { query });
|
|
754
875
|
}
|
|
876
|
+
/** Search mail by meaning and by words (GET /api/emails/search) */
|
|
877
|
+
searchEmailMessages(query) {
|
|
878
|
+
return this.request("GET", `/api/emails/search`, { query });
|
|
879
|
+
}
|
|
880
|
+
/** Search one mailbox by meaning and by words (GET /api/emails/{address}/search) */
|
|
881
|
+
searchEmailMessagesByAddress(address, query) {
|
|
882
|
+
return this.request("GET", `/api/emails/${enc(address)}/search`, { query });
|
|
883
|
+
}
|
|
755
884
|
/** List a domain for sale (open marketplace) (POST /api/domains/sell) */
|
|
756
885
|
sellDomain(body) {
|
|
757
886
|
return this.request("POST", `/api/domains/sell`, { body });
|
|
@@ -808,10 +937,18 @@ class Domani {
|
|
|
808
937
|
snapshotDns(domain, body) {
|
|
809
938
|
return this.request("POST", `/api/domains/${enc(domain)}/dns/snapshot`, { body });
|
|
810
939
|
}
|
|
940
|
+
/** Consent to and start a background history import (POST /api/assistant/preview) */
|
|
941
|
+
startAssistantPreview(body) {
|
|
942
|
+
return this.request("POST", `/api/assistant/preview`, { body });
|
|
943
|
+
}
|
|
811
944
|
/** Start bank payout onboarding (POST /api/billing/connect) */
|
|
812
945
|
startPayoutOnboarding() {
|
|
813
946
|
return this.request("POST", `/api/billing/connect`, undefined);
|
|
814
947
|
}
|
|
948
|
+
/** Stream mailbox events (server-sent events) (GET /api/emails/{address}/events) */
|
|
949
|
+
streamMailboxEvents(address, lastEventId, query) {
|
|
950
|
+
return this.stream("GET", `/api/emails/${enc(address)}/events`, { query, headers: { "Last-Event-ID": lastEventId } });
|
|
951
|
+
}
|
|
815
952
|
/** AI-powered domain suggestions with availability (GET /api/domains/suggest) */
|
|
816
953
|
suggestDomains(query) {
|
|
817
954
|
return this.request("GET", `/api/domains/suggest`, { query });
|
|
@@ -840,6 +977,10 @@ class Domani {
|
|
|
840
977
|
updateActivationPreference(body) {
|
|
841
978
|
return this.request("PUT", `/api/me/activation`, { body });
|
|
842
979
|
}
|
|
980
|
+
/** Update Mailzero assistant settings (PUT /api/assistant/settings) */
|
|
981
|
+
updateAssistantSettings(body) {
|
|
982
|
+
return this.request("PUT", `/api/assistant/settings`, { body });
|
|
983
|
+
}
|
|
843
984
|
/** Assign or update a shared inbox conversation (PATCH /api/email/collaboration) */
|
|
844
985
|
updateConversationState(body) {
|
|
845
986
|
return this.request("PATCH", `/api/email/collaboration`, { body });
|