domani 1.0.1 → 1.0.3
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 +1115 -65
- package/dist/index.js +256 -4
- package/package.json +19 -6
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
// AUTO-GENERATED from the domani OpenAPI spec by scripts/generate-sdk.ts.
|
|
4
|
-
// Do not edit by hand - re-run `
|
|
3
|
+
// AUTO-GENERATED from the domani OpenAPI spec by apps/web/scripts/generate-sdk.ts.
|
|
4
|
+
// Do not edit by hand - re-run `pnpm --filter @domani/web exec tsx scripts/generate-sdk.ts`.
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Domani = exports.DomaniError = void 0;
|
|
7
7
|
/** Structured API error - mirrors the `apiError()` shape returned by the API. */
|
|
@@ -31,7 +31,7 @@ class Domani {
|
|
|
31
31
|
throw new Error("Domani: apiKey is required");
|
|
32
32
|
this.apiKey = opts.apiKey;
|
|
33
33
|
this.baseUrl = (opts.baseUrl || "https://domani.run").replace(/\/$/, "");
|
|
34
|
-
this.fetchImpl = opts.fetch || globalThis.fetch;
|
|
34
|
+
this.fetchImpl = opts.fetch || globalThis.fetch?.bind(globalThis);
|
|
35
35
|
if (!this.fetchImpl)
|
|
36
36
|
throw new Error("Domani: no fetch implementation available (pass opts.fetch on older runtimes)");
|
|
37
37
|
}
|
|
@@ -72,14 +72,46 @@ class Domani {
|
|
|
72
72
|
throw new DomaniError(res.status, data);
|
|
73
73
|
return data;
|
|
74
74
|
}
|
|
75
|
+
/** Accept an access or ownership offer (POST /api/workspaces/access/offers/accept) */
|
|
76
|
+
acceptWorkspaceAccessOffer(body) {
|
|
77
|
+
return this.request("POST", `/api/workspaces/access/offers/accept`, { body });
|
|
78
|
+
}
|
|
79
|
+
/** Accept a workspace invitation (POST /api/workspaces/invitations/accept) */
|
|
80
|
+
acceptWorkspaceInvitation(body) {
|
|
81
|
+
return this.request("POST", `/api/workspaces/invitations/accept`, { body });
|
|
82
|
+
}
|
|
83
|
+
/** Accept workspace ownership (POST /api/workspaces/ownership-transfers/accept) */
|
|
84
|
+
acceptWorkspaceOwnershipTransfer(body) {
|
|
85
|
+
return this.request("POST", `/api/workspaces/ownership-transfers/accept`, { body });
|
|
86
|
+
}
|
|
87
|
+
/** Add a private conversation note (POST /api/email/collaboration/{id}/notes) */
|
|
88
|
+
addConversationNote(id, body) {
|
|
89
|
+
return this.request("POST", `/api/email/collaboration/${enc(id)}/notes`, { body });
|
|
90
|
+
}
|
|
91
|
+
/** Publish a DNSSEC DS record (enable DNSSEC) (POST /api/domains/{domain}/dnssec) */
|
|
92
|
+
addDnssecRecord(domain, body) {
|
|
93
|
+
return this.request("POST", `/api/domains/${enc(domain)}/dnssec`, { body });
|
|
94
|
+
}
|
|
75
95
|
/** Add a mailbox alias (POST /api/emails/{address}/aliases) */
|
|
76
96
|
addMailboxAlias(address, body) {
|
|
77
97
|
return this.request("POST", `/api/emails/${enc(address)}/aliases`, { body });
|
|
78
98
|
}
|
|
99
|
+
/** Add an inbound mail rule (POST /api/emails/{address}/rules) */
|
|
100
|
+
addMailRule(address, body) {
|
|
101
|
+
return this.request("POST", `/api/emails/${enc(address)}/rules`, { body });
|
|
102
|
+
}
|
|
79
103
|
/** Add a suppression (POST /api/suppressions) */
|
|
80
104
|
addSuppression(body) {
|
|
81
105
|
return this.request("POST", `/api/suppressions`, { body });
|
|
82
106
|
}
|
|
107
|
+
/** Adopt an owned mailbox into a workspace (POST /api/workspaces/{id}/mailboxes) */
|
|
108
|
+
attachWorkspaceMailbox(id, body) {
|
|
109
|
+
return this.request("POST", `/api/workspaces/${enc(id)}/mailboxes`, { body });
|
|
110
|
+
}
|
|
111
|
+
/** Buy an aftermarket domain (POST /api/domains/{domain}/buy-aftermarket) */
|
|
112
|
+
buyAftermarket(domain, body) {
|
|
113
|
+
return this.request("POST", `/api/domains/${enc(domain)}/buy-aftermarket`, { body });
|
|
114
|
+
}
|
|
83
115
|
/** Purchase one or more domains (POST /api/domains/buy) */
|
|
84
116
|
buyDomain(body) {
|
|
85
117
|
return this.request("POST", `/api/domains/buy`, { body });
|
|
@@ -100,10 +132,18 @@ class Domani {
|
|
|
100
132
|
cancelNegotiation(id) {
|
|
101
133
|
return this.request("DELETE", `/api/negotiations/${enc(id)}`, undefined);
|
|
102
134
|
}
|
|
135
|
+
/** Cancel a Mailzero workspace subscription (POST /api/workspaces/{id}/billing/cancel) */
|
|
136
|
+
cancelWorkspaceSubscription(id) {
|
|
137
|
+
return this.request("POST", `/api/workspaces/${enc(id)}/billing/cancel`, undefined);
|
|
138
|
+
}
|
|
103
139
|
/** Check email DNS health (MX, SPF, DMARC, DKIM) (GET /api/domains/{domain}/email/check) */
|
|
104
140
|
checkEmail(domain) {
|
|
105
141
|
return this.request("GET", `/api/domains/${enc(domain)}/email/check`, undefined);
|
|
106
142
|
}
|
|
143
|
+
/** Preflight an outbound email (POST /api/emails/{address}/deliverability-check) */
|
|
144
|
+
checkEmailDeliverabilityByAddress(address, body) {
|
|
145
|
+
return this.request("POST", `/api/emails/${enc(address)}/deliverability-check`, { body });
|
|
146
|
+
}
|
|
107
147
|
/** Pre-check transfer eligibility (GET /api/domains/transfer-check) */
|
|
108
148
|
checkTransferEligibility(query) {
|
|
109
149
|
return this.request("GET", `/api/domains/transfer-check`, { query });
|
|
@@ -112,6 +152,10 @@ class Domani {
|
|
|
112
152
|
checkTransferStatus(domain) {
|
|
113
153
|
return this.request("GET", `/api/domains/${enc(domain)}/transfer-status`, undefined);
|
|
114
154
|
}
|
|
155
|
+
/** Claim a free agent identity (<handle>.domani.run) (POST /api/agents/identity) */
|
|
156
|
+
claimIdentity(body) {
|
|
157
|
+
return this.request("POST", `/api/agents/identity`, { body });
|
|
158
|
+
}
|
|
115
159
|
/** Clear domain catch-all (DELETE /api/domains/{domain}/email/catch-all) */
|
|
116
160
|
clearCatchAll(domain) {
|
|
117
161
|
return this.request("DELETE", `/api/domains/${enc(domain)}/email/catch-all`, undefined);
|
|
@@ -120,6 +164,10 @@ class Domani {
|
|
|
120
164
|
clearDomainRedirect(domain) {
|
|
121
165
|
return this.request("DELETE", `/api/domains/${enc(domain)}/redirect`, undefined);
|
|
122
166
|
}
|
|
167
|
+
/** Clone another domain's DNS onto this one (POST /api/domains/{domain}/dns/clone) */
|
|
168
|
+
cloneDns(domain, body) {
|
|
169
|
+
return this.request("POST", `/api/domains/${enc(domain)}/dns/clone`, { body });
|
|
170
|
+
}
|
|
123
171
|
/** Connect a domain to a hosting or email provider (POST /api/domains/{domain}/connect) */
|
|
124
172
|
connectDomain(domain, body) {
|
|
125
173
|
return this.request("POST", `/api/domains/${enc(domain)}/connect`, { body });
|
|
@@ -136,6 +184,10 @@ class Domani {
|
|
|
136
184
|
createDeal(body) {
|
|
137
185
|
return this.request("POST", `/api/deals`, { body });
|
|
138
186
|
}
|
|
187
|
+
/** Analyze a domain and persist an evidence-backed brief (POST /api/domain-briefs) */
|
|
188
|
+
createDomainBrief(body) {
|
|
189
|
+
return this.request("POST", `/api/domain-briefs`, { body });
|
|
190
|
+
}
|
|
139
191
|
/** List a domain for sale (PUT /api/domains/{domain}/for-sale) */
|
|
140
192
|
createListing(domain, body) {
|
|
141
193
|
return this.request("PUT", `/api/domains/${enc(domain)}/for-sale`, { body });
|
|
@@ -148,6 +200,10 @@ class Domani {
|
|
|
148
200
|
createMailboxByAddress(body) {
|
|
149
201
|
return this.request("POST", `/api/emails`, { body });
|
|
150
202
|
}
|
|
203
|
+
/** Create an app password (hosted) (POST /api/emails/{address}/credentials) */
|
|
204
|
+
createMailboxCredential(address, body) {
|
|
205
|
+
return this.request("POST", `/api/emails/${enc(address)}/credentials`, { body });
|
|
206
|
+
}
|
|
151
207
|
/** Create a new API token (POST /api/tokens) */
|
|
152
208
|
createToken(body) {
|
|
153
209
|
return this.request("POST", `/api/tokens`, { body });
|
|
@@ -156,10 +212,26 @@ class Domani {
|
|
|
156
212
|
createWebhook(body) {
|
|
157
213
|
return this.request("POST", `/api/webhooks`, { body });
|
|
158
214
|
}
|
|
159
|
-
/**
|
|
215
|
+
/** Create a workspace (POST /api/workspaces) */
|
|
216
|
+
createWorkspace(body) {
|
|
217
|
+
return this.request("POST", `/api/workspaces`, { body });
|
|
218
|
+
}
|
|
219
|
+
/** Offer mailbox access or workspace ownership (POST /api/workspaces/{id}/access/offers) */
|
|
220
|
+
createWorkspaceAccessOffer(id, body) {
|
|
221
|
+
return this.request("POST", `/api/workspaces/${enc(id)}/access/offers`, { body });
|
|
222
|
+
}
|
|
223
|
+
/** Start Mailzero workspace checkout (POST /api/workspaces/{id}/billing/checkout) */
|
|
224
|
+
createWorkspaceCheckout(id, body) {
|
|
225
|
+
return this.request("POST", `/api/workspaces/${enc(id)}/billing/checkout`, { body });
|
|
226
|
+
}
|
|
227
|
+
/** Delete account (blocked while domains are held) (DELETE /api/me) */
|
|
160
228
|
deleteAccount() {
|
|
161
229
|
return this.request("DELETE", `/api/me`, undefined);
|
|
162
230
|
}
|
|
231
|
+
/** Remove a DNSSEC DS record (disable DNSSEC) (DELETE /api/domains/{domain}/dnssec) */
|
|
232
|
+
deleteDnssecRecord(domain, query) {
|
|
233
|
+
return this.request("DELETE", `/api/domains/${enc(domain)}/dnssec`, { query });
|
|
234
|
+
}
|
|
163
235
|
/** Delete a mailbox (DELETE /api/emails/{address}) */
|
|
164
236
|
deleteMailboxByAddress(address, body) {
|
|
165
237
|
return this.request("DELETE", `/api/emails/${enc(address)}`, { body });
|
|
@@ -192,6 +264,10 @@ class Domani {
|
|
|
192
264
|
getAccount() {
|
|
193
265
|
return this.request("GET", `/api/me`, undefined);
|
|
194
266
|
}
|
|
267
|
+
/** Get truthful activation state and recommended next actions (GET /api/me/activation) */
|
|
268
|
+
getActivation() {
|
|
269
|
+
return this.request("GET", `/api/me/activation`, undefined);
|
|
270
|
+
}
|
|
195
271
|
/** Get EPP auth code (GET /api/domains/{domain}/auth-code) */
|
|
196
272
|
getAuthCode(domain) {
|
|
197
273
|
return this.request("GET", `/api/domains/${enc(domain)}/auth-code`, undefined);
|
|
@@ -212,6 +288,10 @@ class Domani {
|
|
|
212
288
|
getContact() {
|
|
213
289
|
return this.request("GET", `/api/me/contact`, undefined);
|
|
214
290
|
}
|
|
291
|
+
/** Get active viewers, composers, and the compose lease (GET /api/email/collaboration/coordination) */
|
|
292
|
+
getConversationCoordination(query) {
|
|
293
|
+
return this.request("GET", `/api/email/collaboration/coordination`, { query });
|
|
294
|
+
}
|
|
215
295
|
/** Get deal detail with timeline (GET /api/deals/{id}) */
|
|
216
296
|
getDeal(id) {
|
|
217
297
|
return this.request("GET", `/api/deals/${enc(id)}`, undefined);
|
|
@@ -224,6 +304,14 @@ class Domani {
|
|
|
224
304
|
getDnsRecords(domain) {
|
|
225
305
|
return this.request("GET", `/api/domains/${enc(domain)}/dns`, undefined);
|
|
226
306
|
}
|
|
307
|
+
/** List DNSSEC DS records for a domain you own (GET /api/domains/{domain}/dnssec) */
|
|
308
|
+
getDnssecRecords(domain) {
|
|
309
|
+
return this.request("GET", `/api/domains/${enc(domain)}/dnssec`, undefined);
|
|
310
|
+
}
|
|
311
|
+
/** Get a previously generated domain brief (GET /api/domain-briefs/{id}) */
|
|
312
|
+
getDomainBrief(id) {
|
|
313
|
+
return this.request("GET", `/api/domain-briefs/${enc(id)}`, undefined);
|
|
314
|
+
}
|
|
227
315
|
/** Check email DNS status (GET /api/domains/{domain}/email/status) */
|
|
228
316
|
getDomainEmailStatus(domain) {
|
|
229
317
|
return this.request("GET", `/api/domains/${enc(domain)}/email/status`, undefined);
|
|
@@ -240,6 +328,10 @@ class Domani {
|
|
|
240
328
|
getDomainStatus(domain) {
|
|
241
329
|
return this.request("GET", `/api/domains/${enc(domain)}/status`, undefined);
|
|
242
330
|
}
|
|
331
|
+
/** Get owner-scoped email deliverability health (GET /api/domains/{domain}/email/deliverability) */
|
|
332
|
+
getEmailDeliverability(domain) {
|
|
333
|
+
return this.request("GET", `/api/domains/${enc(domain)}/email/deliverability`, undefined);
|
|
334
|
+
}
|
|
243
335
|
/** Get mailbox avatar info (GET /api/emails/{address}/avatar) */
|
|
244
336
|
getMailboxAvatarByAddress(address) {
|
|
245
337
|
return this.request("GET", `/api/emails/${enc(address)}/avatar`, undefined);
|
|
@@ -248,6 +340,10 @@ class Domani {
|
|
|
248
340
|
getMailboxByAddress(address) {
|
|
249
341
|
return this.request("GET", `/api/emails/${enc(address)}`, undefined);
|
|
250
342
|
}
|
|
343
|
+
/** Get mail client settings (hosted) (GET /api/emails/{address}/client-settings) */
|
|
344
|
+
getMailboxClientSettings(address) {
|
|
345
|
+
return this.request("GET", `/api/emails/${enc(address)}/client-settings`, undefined);
|
|
346
|
+
}
|
|
251
347
|
/** Get mailbox webhook config (GET /api/emails/{address}/webhook) */
|
|
252
348
|
getMailboxWebhook(address) {
|
|
253
349
|
return this.request("GET", `/api/emails/${enc(address)}/webhook`, undefined);
|
|
@@ -296,10 +392,34 @@ class Domani {
|
|
|
296
392
|
getWebhookDeliveries(id, query) {
|
|
297
393
|
return this.request("GET", `/api/webhooks/${enc(id)}/deliveries`, { query });
|
|
298
394
|
}
|
|
395
|
+
/** Get workspace members and mailboxes (GET /api/workspaces/{id}) */
|
|
396
|
+
getWorkspace(id) {
|
|
397
|
+
return this.request("GET", `/api/workspaces/${enc(id)}`, undefined);
|
|
398
|
+
}
|
|
399
|
+
/** Get the canonical workspace access graph (GET /api/workspaces/{id}/access) */
|
|
400
|
+
getWorkspaceAccess(id) {
|
|
401
|
+
return this.request("GET", `/api/workspaces/${enc(id)}/access`, undefined);
|
|
402
|
+
}
|
|
403
|
+
/** Heartbeat viewing or composing presence (PUT /api/email/collaboration/coordination) */
|
|
404
|
+
heartbeatConversationPresence(body) {
|
|
405
|
+
return this.request("PUT", `/api/email/collaboration/coordination`, { body });
|
|
406
|
+
}
|
|
299
407
|
/** Import an external domain (POST /api/domains/import) */
|
|
300
408
|
importDomain(body) {
|
|
301
409
|
return this.request("POST", `/api/domains/import`, { body });
|
|
302
410
|
}
|
|
411
|
+
/** Invite a workspace member (POST /api/workspaces/{id}/invitations) */
|
|
412
|
+
inviteWorkspaceMember(id, body) {
|
|
413
|
+
return this.request("POST", `/api/workspaces/${enc(id)}/invitations`, { body });
|
|
414
|
+
}
|
|
415
|
+
/** Leave a workspace (DELETE /api/workspaces/{id}/members/me) */
|
|
416
|
+
leaveWorkspace(id) {
|
|
417
|
+
return this.request("DELETE", `/api/workspaces/${enc(id)}/members/me`, undefined);
|
|
418
|
+
}
|
|
419
|
+
/** List security audit events (GET /api/audit) */
|
|
420
|
+
listAuditEvents(query) {
|
|
421
|
+
return this.request("GET", `/api/audit`, { query });
|
|
422
|
+
}
|
|
303
423
|
/** List your backorders (GET /api/backorders) */
|
|
304
424
|
listBackorders(query) {
|
|
305
425
|
return this.request("GET", `/api/backorders`, { query });
|
|
@@ -312,6 +432,18 @@ class Domani {
|
|
|
312
432
|
listConnectProviders(domain) {
|
|
313
433
|
return this.request("GET", `/api/domains/${enc(domain)}/connect`, undefined);
|
|
314
434
|
}
|
|
435
|
+
/** List attributed conversation activity (GET /api/email/collaboration/{id}/activity) */
|
|
436
|
+
listConversationActivity(id) {
|
|
437
|
+
return this.request("GET", `/api/email/collaboration/${enc(id)}/activity`, undefined);
|
|
438
|
+
}
|
|
439
|
+
/** List private conversation notes (GET /api/email/collaboration/{id}/notes) */
|
|
440
|
+
listConversationNotes(id) {
|
|
441
|
+
return this.request("GET", `/api/email/collaboration/${enc(id)}/notes`, undefined);
|
|
442
|
+
}
|
|
443
|
+
/** List persisted shared inbox state (GET /api/email/collaboration) */
|
|
444
|
+
listConversationStates(query) {
|
|
445
|
+
return this.request("GET", `/api/email/collaboration`, { query });
|
|
446
|
+
}
|
|
315
447
|
/** List your deals (GET /api/deals) */
|
|
316
448
|
listDeals(query) {
|
|
317
449
|
return this.request("GET", `/api/deals`, { query });
|
|
@@ -320,10 +452,18 @@ class Domani {
|
|
|
320
452
|
listDomains() {
|
|
321
453
|
return this.request("GET", `/api/domains`, undefined);
|
|
322
454
|
}
|
|
455
|
+
/** List email folders and counts (GET /api/emails/{address}/folders) */
|
|
456
|
+
listEmailFoldersByAddress(address) {
|
|
457
|
+
return this.request("GET", `/api/emails/${enc(address)}/folders`, undefined);
|
|
458
|
+
}
|
|
323
459
|
/** List emails (GET /api/emails/{address}/messages) */
|
|
324
460
|
listEmailMessagesByAddress(address, query) {
|
|
325
461
|
return this.request("GET", `/api/emails/${enc(address)}/messages`, { query });
|
|
326
462
|
}
|
|
463
|
+
/** List your agent identities (GET /api/agents/identity) */
|
|
464
|
+
listIdentities() {
|
|
465
|
+
return this.request("GET", `/api/agents/identity`, undefined);
|
|
466
|
+
}
|
|
327
467
|
/** List payment invoices (GET /api/billing/invoices) */
|
|
328
468
|
listInvoices(query) {
|
|
329
469
|
return this.request("GET", `/api/billing/invoices`, { query });
|
|
@@ -332,6 +472,14 @@ class Domani {
|
|
|
332
472
|
listMailboxAliases(address) {
|
|
333
473
|
return this.request("GET", `/api/emails/${enc(address)}/aliases`, undefined);
|
|
334
474
|
}
|
|
475
|
+
/** Incrementally synchronize one mailbox (GET /api/email/changes) */
|
|
476
|
+
listMailboxChanges(query) {
|
|
477
|
+
return this.request("GET", `/api/email/changes`, { query });
|
|
478
|
+
}
|
|
479
|
+
/** List app passwords (hosted) (GET /api/emails/{address}/credentials) */
|
|
480
|
+
listMailboxCredentials(address) {
|
|
481
|
+
return this.request("GET", `/api/emails/${enc(address)}/credentials`, undefined);
|
|
482
|
+
}
|
|
335
483
|
/** List all mailboxes (GET /api/email) */
|
|
336
484
|
listMailboxes(query) {
|
|
337
485
|
return this.request("GET", `/api/email`, { query });
|
|
@@ -340,6 +488,14 @@ class Domani {
|
|
|
340
488
|
listMailboxesByAddress(query) {
|
|
341
489
|
return this.request("GET", `/api/emails`, { query });
|
|
342
490
|
}
|
|
491
|
+
/** List inbound mail rules (GET /api/emails/{address}/rules) */
|
|
492
|
+
listMailRules(address) {
|
|
493
|
+
return this.request("GET", `/api/emails/${enc(address)}/rules`, undefined);
|
|
494
|
+
}
|
|
495
|
+
/** List actionable mailbox conversations (GET /api/email/work-queue) */
|
|
496
|
+
listMailWorkQueue(query) {
|
|
497
|
+
return this.request("GET", `/api/email/work-queue`, { query });
|
|
498
|
+
}
|
|
343
499
|
/** List your negotiations (GET /api/negotiations) */
|
|
344
500
|
listNegotiations(query) {
|
|
345
501
|
return this.request("GET", `/api/negotiations`, { query });
|
|
@@ -372,6 +528,10 @@ class Domani {
|
|
|
372
528
|
listWebhooks() {
|
|
373
529
|
return this.request("GET", `/api/webhooks`, undefined);
|
|
374
530
|
}
|
|
531
|
+
/** List accessible workspaces (GET /api/workspaces) */
|
|
532
|
+
listWorkspaces() {
|
|
533
|
+
return this.request("GET", `/api/workspaces`, undefined);
|
|
534
|
+
}
|
|
375
535
|
/** Send a magic link sign-in email (POST /api/auth/login) */
|
|
376
536
|
loginUser(body) {
|
|
377
537
|
return this.request("POST", `/api/auth/login`, { body });
|
|
@@ -392,6 +552,10 @@ class Domani {
|
|
|
392
552
|
markNotificationRead(id, body) {
|
|
393
553
|
return this.request("PATCH", `/api/notifications/${enc(id)}`, { body });
|
|
394
554
|
}
|
|
555
|
+
/** Plan how to adopt an existing domain (GET /api/domains/adoption-plan) */
|
|
556
|
+
planDomainAdoption(query) {
|
|
557
|
+
return this.request("GET", `/api/domains/adoption-plan`, { query });
|
|
558
|
+
}
|
|
395
559
|
/** Provide EPP/auth code (seller) (PATCH /api/deals/{id}) */
|
|
396
560
|
provideEppCode(id, body) {
|
|
397
561
|
return this.request("PATCH", `/api/deals/${enc(id)}`, { body });
|
|
@@ -400,10 +564,22 @@ class Domani {
|
|
|
400
564
|
provisionAgent(body) {
|
|
401
565
|
return this.request("POST", `/api/agents/provision`, { body });
|
|
402
566
|
}
|
|
567
|
+
/** Refresh a domain brief from live sources (POST /api/domain-briefs/{id}/refresh) */
|
|
568
|
+
refreshDomainBrief(id) {
|
|
569
|
+
return this.request("POST", `/api/domain-briefs/${enc(id)}/refresh`, undefined);
|
|
570
|
+
}
|
|
403
571
|
/** Create a new account (POST /api/auth/register) */
|
|
404
572
|
registerUser(body) {
|
|
405
573
|
return this.request("POST", `/api/auth/register`, { body });
|
|
406
574
|
}
|
|
575
|
+
/** Release this client's presence and compose lease (DELETE /api/email/collaboration/coordination) */
|
|
576
|
+
releaseConversationPresence(body) {
|
|
577
|
+
return this.request("DELETE", `/api/email/collaboration/coordination`, { body });
|
|
578
|
+
}
|
|
579
|
+
/** Release an agent identity (DELETE /api/agents/identity/{slug}) */
|
|
580
|
+
releaseIdentity(slug) {
|
|
581
|
+
return this.request("DELETE", `/api/agents/identity/${enc(slug)}`, undefined);
|
|
582
|
+
}
|
|
407
583
|
/** Remove saved payment method (DELETE /api/billing/card) */
|
|
408
584
|
removeCard() {
|
|
409
585
|
return this.request("DELETE", `/api/billing/card`, undefined);
|
|
@@ -416,22 +592,42 @@ class Domani {
|
|
|
416
592
|
removeMailboxAlias(address, alias) {
|
|
417
593
|
return this.request("DELETE", `/api/emails/${enc(address)}/aliases/${enc(alias)}`, undefined);
|
|
418
594
|
}
|
|
595
|
+
/** Remove a member mailbox permission (DELETE /api/workspaces/{id}/mailboxes/{mailboxId}/grants) */
|
|
596
|
+
removeMailboxGrant(id, mailboxId, body) {
|
|
597
|
+
return this.request("DELETE", `/api/workspaces/${enc(id)}/mailboxes/${enc(mailboxId)}/grants`, { body });
|
|
598
|
+
}
|
|
419
599
|
/** Remove mailbox webhook (DELETE /api/emails/{address}/webhook) */
|
|
420
600
|
removeMailboxWebhook(address) {
|
|
421
601
|
return this.request("DELETE", `/api/emails/${enc(address)}/webhook`, undefined);
|
|
422
602
|
}
|
|
603
|
+
/** Remove an inbound mail rule (DELETE /api/emails/{address}/rules/{ruleId}) */
|
|
604
|
+
removeMailRule(address, ruleId) {
|
|
605
|
+
return this.request("DELETE", `/api/emails/${enc(address)}/rules/${enc(ruleId)}`, undefined);
|
|
606
|
+
}
|
|
423
607
|
/** Remove a suppression (DELETE /api/suppressions/{address}) */
|
|
424
608
|
removeSuppression(address) {
|
|
425
609
|
return this.request("DELETE", `/api/suppressions/${enc(address)}`, undefined);
|
|
426
610
|
}
|
|
611
|
+
/** Remove a workspace member (DELETE /api/workspaces/{id}/members/{membershipId}) */
|
|
612
|
+
removeWorkspaceMember(id, membershipId) {
|
|
613
|
+
return this.request("DELETE", `/api/workspaces/${enc(id)}/members/${enc(membershipId)}`, undefined);
|
|
614
|
+
}
|
|
427
615
|
/** Renew a domain (POST /api/domains/{domain}/renew) */
|
|
428
616
|
renewDomain(domain, body) {
|
|
429
617
|
return this.request("POST", `/api/domains/${enc(domain)}/renew`, { body });
|
|
430
618
|
}
|
|
619
|
+
/** Replay a webhook delivery (POST /api/webhooks/{id}/deliveries/{deliveryId}/replay) */
|
|
620
|
+
replayWebhookDelivery(id, deliveryId, body) {
|
|
621
|
+
return this.request("POST", `/api/webhooks/${enc(id)}/deliveries/${enc(deliveryId)}/replay`, { body });
|
|
622
|
+
}
|
|
431
623
|
/** Reply to a message (POST /api/emails/{address}/messages/{id}/reply) */
|
|
432
624
|
replyToMessageByAddress(address, id, body) {
|
|
433
625
|
return this.request("POST", `/api/emails/${enc(address)}/messages/${enc(id)}/reply`, { body });
|
|
434
626
|
}
|
|
627
|
+
/** Request a workspace ownership transfer (POST /api/workspaces/{id}/ownership-transfer) */
|
|
628
|
+
requestWorkspaceOwnershipTransfer(id, body) {
|
|
629
|
+
return this.request("POST", `/api/workspaces/${enc(id)}/ownership-transfer`, { body });
|
|
630
|
+
}
|
|
435
631
|
/** Resend contact email verification (POST /api/me/resend-verification) */
|
|
436
632
|
resendEmailVerification(body) {
|
|
437
633
|
return this.request("POST", `/api/me/resend-verification`, { body });
|
|
@@ -448,10 +644,26 @@ class Domani {
|
|
|
448
644
|
restoreDns(domain, body) {
|
|
449
645
|
return this.request("POST", `/api/domains/${enc(domain)}/dns/restore`, { body });
|
|
450
646
|
}
|
|
647
|
+
/** Revoke an app password (hosted) (DELETE /api/emails/{address}/credentials/{id}) */
|
|
648
|
+
revokeMailboxCredential(address, id) {
|
|
649
|
+
return this.request("DELETE", `/api/emails/${enc(address)}/credentials/${enc(id)}`, undefined);
|
|
650
|
+
}
|
|
451
651
|
/** Revoke an API token (DELETE /api/tokens/{id}) */
|
|
452
652
|
revokeToken(id) {
|
|
453
653
|
return this.request("DELETE", `/api/tokens/${enc(id)}`, undefined);
|
|
454
654
|
}
|
|
655
|
+
/** Revoke an access grant and its credentials (DELETE /api/workspaces/{id}/access/grants/{grantId}) */
|
|
656
|
+
revokeWorkspaceAccess(id, grantId, body) {
|
|
657
|
+
return this.request("DELETE", `/api/workspaces/${enc(id)}/access/grants/${enc(grantId)}`, { body });
|
|
658
|
+
}
|
|
659
|
+
/** Revoke a pending invitation (DELETE /api/workspaces/{id}/invitations/{invitationId}) */
|
|
660
|
+
revokeWorkspaceInvitation(id, invitationId) {
|
|
661
|
+
return this.request("DELETE", `/api/workspaces/${enc(id)}/invitations/${enc(invitationId)}`, undefined);
|
|
662
|
+
}
|
|
663
|
+
/** Revoke a pending ownership transfer (DELETE /api/workspaces/{id}/ownership-transfer/{transferId}) */
|
|
664
|
+
revokeWorkspaceOwnershipTransfer(id, transferId) {
|
|
665
|
+
return this.request("DELETE", `/api/workspaces/${enc(id)}/ownership-transfer/${enc(transferId)}`, undefined);
|
|
666
|
+
}
|
|
455
667
|
/** Rotate webhook signing secret (POST /api/emails/{address}/webhook/rotate) */
|
|
456
668
|
rotateMailboxWebhookSecret(address) {
|
|
457
669
|
return this.request("POST", `/api/emails/${enc(address)}/webhook/rotate`, undefined);
|
|
@@ -484,6 +696,10 @@ class Domani {
|
|
|
484
696
|
setDomainRedirect(domain, body) {
|
|
485
697
|
return this.request("PUT", `/api/domains/${enc(domain)}/redirect`, { body });
|
|
486
698
|
}
|
|
699
|
+
/** Set a member mailbox permission (PUT /api/workspaces/{id}/mailboxes/{mailboxId}/grants) */
|
|
700
|
+
setMailboxGrant(id, mailboxId, body) {
|
|
701
|
+
return this.request("PUT", `/api/workspaces/${enc(id)}/mailboxes/${enc(mailboxId)}/grants`, { body });
|
|
702
|
+
}
|
|
487
703
|
/** Set mailbox webhook (PUT /api/emails/{address}/webhook) */
|
|
488
704
|
setMailboxWebhook(address, body) {
|
|
489
705
|
return this.request("PUT", `/api/emails/${enc(address)}/webhook`, { body });
|
|
@@ -500,6 +716,10 @@ class Domani {
|
|
|
500
716
|
setupDomainEmail(domain, body) {
|
|
501
717
|
return this.request("POST", `/api/domains/${enc(domain)}/email/setup`, { body });
|
|
502
718
|
}
|
|
719
|
+
/** Plan or apply one access grant (PUT /api/workspaces/{id}/access) */
|
|
720
|
+
setWorkspaceAccess(id, body) {
|
|
721
|
+
return this.request("PUT", `/api/workspaces/${enc(id)}/access`, { body });
|
|
722
|
+
}
|
|
503
723
|
/** Capture a DNS snapshot (POST /api/domains/{domain}/dns/snapshot) */
|
|
504
724
|
snapshotDns(domain, body) {
|
|
505
725
|
return this.request("POST", `/api/domains/${enc(domain)}/dns/snapshot`, { body });
|
|
@@ -512,6 +732,14 @@ class Domani {
|
|
|
512
732
|
suggestDomains(query) {
|
|
513
733
|
return this.request("GET", `/api/domains/suggest`, { query });
|
|
514
734
|
}
|
|
735
|
+
/** Create or replace a flat access group (PUT /api/workspaces/{id}/access/groups) */
|
|
736
|
+
syncAccessGroup(id, body) {
|
|
737
|
+
return this.request("PUT", `/api/workspaces/${enc(id)}/access/groups`, { body });
|
|
738
|
+
}
|
|
739
|
+
/** Create or replace an explicit mailbox collection (PUT /api/workspaces/{id}/access/collections) */
|
|
740
|
+
syncMailboxCollection(id, body) {
|
|
741
|
+
return this.request("PUT", `/api/workspaces/${enc(id)}/access/collections`, { body });
|
|
742
|
+
}
|
|
515
743
|
/** Test mailbox webhook (POST /api/emails/{address}/webhook/test) */
|
|
516
744
|
testMailboxWebhook(address) {
|
|
517
745
|
return this.request("POST", `/api/emails/${enc(address)}/webhook/test`, undefined);
|
|
@@ -524,10 +752,26 @@ class Domani {
|
|
|
524
752
|
updateAccount(body) {
|
|
525
753
|
return this.request("PUT", `/api/me`, { body });
|
|
526
754
|
}
|
|
755
|
+
/** Dismiss or restore first-run guidance (PUT /api/me/activation) */
|
|
756
|
+
updateActivationPreference(body) {
|
|
757
|
+
return this.request("PUT", `/api/me/activation`, { body });
|
|
758
|
+
}
|
|
759
|
+
/** Assign or update a shared inbox conversation (PATCH /api/email/collaboration) */
|
|
760
|
+
updateConversationState(body) {
|
|
761
|
+
return this.request("PATCH", `/api/email/collaboration`, { body });
|
|
762
|
+
}
|
|
527
763
|
/** Update domain settings (PUT /api/domains/{domain}/settings) */
|
|
528
764
|
updateDomainSettings(domain, body) {
|
|
529
765
|
return this.request("PUT", `/api/domains/${enc(domain)}/settings`, { body });
|
|
530
766
|
}
|
|
767
|
+
/** Apply a lifecycle action to messages (POST /api/emails/{address}/messages/actions) */
|
|
768
|
+
updateEmailMessagesByAddress(address, body) {
|
|
769
|
+
return this.request("POST", `/api/emails/${enc(address)}/messages/actions`, { body });
|
|
770
|
+
}
|
|
771
|
+
/** Update an agent identity (PATCH /api/agents/identity/{slug}) */
|
|
772
|
+
updateIdentity(slug, body) {
|
|
773
|
+
return this.request("PATCH", `/api/agents/identity/${enc(slug)}`, { body });
|
|
774
|
+
}
|
|
531
775
|
/** Update a domain listing (PATCH /api/domains/{domain}/for-sale) */
|
|
532
776
|
updateListing(domain, body) {
|
|
533
777
|
return this.request("PATCH", `/api/domains/${enc(domain)}/for-sale`, { body });
|
|
@@ -548,6 +792,14 @@ class Domani {
|
|
|
548
792
|
updateWebhook(id, body) {
|
|
549
793
|
return this.request("PATCH", `/api/webhooks/${enc(id)}`, { body });
|
|
550
794
|
}
|
|
795
|
+
/** Rename a workspace (PATCH /api/workspaces/{id}) */
|
|
796
|
+
updateWorkspace(id, body) {
|
|
797
|
+
return this.request("PATCH", `/api/workspaces/${enc(id)}`, { body });
|
|
798
|
+
}
|
|
799
|
+
/** Change a member role (PATCH /api/workspaces/{id}/members/{membershipId}) */
|
|
800
|
+
updateWorkspaceMember(id, membershipId, body) {
|
|
801
|
+
return this.request("PATCH", `/api/workspaces/${enc(id)}/members/${enc(membershipId)}`, { body });
|
|
802
|
+
}
|
|
551
803
|
/** Verify that a provider connection is working (POST /api/domains/{domain}/verify) */
|
|
552
804
|
verifyConnection(domain, body) {
|
|
553
805
|
return this.request("POST", `/api/domains/${enc(domain)}/verify`, { body });
|
package/package.json
CHANGED
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "domani",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Official TypeScript SDK for the domani API - domains, email, and identity for AI agents.",
|
|
5
|
-
"main": "./
|
|
6
|
-
"types": "./
|
|
5
|
+
"main": "./src/index.ts",
|
|
6
|
+
"types": "./src/index.ts",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
|
-
"types": "./
|
|
10
|
-
"default": "./
|
|
9
|
+
"types": "./src/index.ts",
|
|
10
|
+
"default": "./src/index.ts"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"main": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"default": "./dist/index.js"
|
|
20
|
+
}
|
|
11
21
|
}
|
|
12
22
|
},
|
|
13
23
|
"files": [
|
|
@@ -15,10 +25,13 @@
|
|
|
15
25
|
],
|
|
16
26
|
"scripts": {
|
|
17
27
|
"build": "tsc -p tsconfig.json",
|
|
28
|
+
"check": "tsc --noEmit",
|
|
29
|
+
"test": "vitest run",
|
|
18
30
|
"prepublishOnly": "npm run build"
|
|
19
31
|
},
|
|
20
32
|
"devDependencies": {
|
|
21
|
-
"typescript": "^5.9.0"
|
|
33
|
+
"typescript": "^5.9.0",
|
|
34
|
+
"vitest": "^4.0.18"
|
|
22
35
|
},
|
|
23
36
|
"keywords": [
|
|
24
37
|
"domani",
|