@easybits.cloud/mailmask 0.4.11 → 0.4.12
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/client.d.ts +7 -1
- package/dist/index.cjs +12 -0
- package/dist/index.js +12 -0
- package/dist/types.d.ts +45 -0
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MailMaskConfig, Domain, DomainCreated, DomainVerification, Alias, AliasCreated, MailboxCreated, CreateAliasInput, UpdateAliasInput, Rule, CreateRuleInput, UpdateRuleInput, EmailLog, SendEmailInput, BulkSendInput, BulkJob, BulkJobCreated, SmtpCredential, SmtpCredentialCreated, ApiKey, SendOptions, UploadAttachmentInput, UploadedAttachment, Suppression, Webhook, WebhookCreated, CreateWebhookInput, UpdateWebhookInput, WebhookDelivery, DnsRecordType, DnsListResponse, DnsZoneCreated, DnsDelegation, DnsImportResult, DnsAudit, DnsChangeResult, DnsPreset, DnsPresetPreview, DnsSetup, WebsiteStatus, PublishEasyBitsSiteInput, EasyBitsPublishResult, EasyBitsSiteStatus, EasyBitsUnpublishResult, BillingStatus, AddonsResponse, CheckoutLink, DomainSearchResult, TldPrice, DomainRegistrationCreated, DomainRegistration, TransferCheck, TransferDnsInventory, RenewalLink, DomainMember, DomainInvite, CannedReply, AccountProfile, AccountMe, AccountExport, InboxPage, InboxListOptions, InboxConversation, InboxConversationDetail, InboxComposeInput, InboxReplyInput, InboxUpdateInput, InboxNote, OrdersPage, ReferralStats, UploadedEmailImage } from "./types.js";
|
|
1
|
+
import type { MailMaskConfig, Domain, DomainCreated, DomainVerification, Alias, AliasCreated, MailboxCreated, CreateAliasInput, UpdateAliasInput, Rule, CreateRuleInput, UpdateRuleInput, EmailLog, SendEmailInput, BulkSendInput, BulkJob, BulkJobCreated, SmtpCredential, SmtpCredentialCreated, ApiKey, SendOptions, UploadAttachmentInput, UploadedAttachment, Suppression, Webhook, WebhookCreated, CreateWebhookInput, UpdateWebhookInput, WebhookDelivery, DnsRecordType, DnsListResponse, DnsZoneCreated, DnsDelegation, DnsImportResult, DnsAudit, DnsLookup, DnsLookupType, HttpsCheck, RegistrationInfo, DnsChangeResult, DnsPreset, DnsPresetPreview, DnsSetup, WebsiteStatus, PublishEasyBitsSiteInput, EasyBitsPublishResult, EasyBitsSiteStatus, EasyBitsUnpublishResult, BillingStatus, AddonsResponse, CheckoutLink, DomainSearchResult, TldPrice, DomainRegistrationCreated, DomainRegistration, TransferCheck, TransferDnsInventory, RenewalLink, DomainMember, DomainInvite, CannedReply, AccountProfile, AccountMe, AccountExport, InboxPage, InboxListOptions, InboxConversation, InboxConversationDetail, InboxComposeInput, InboxReplyInput, InboxUpdateInput, InboxNote, OrdersPage, ReferralStats, UploadedEmailImage } from "./types.js";
|
|
2
2
|
declare class MailMaskError extends Error {
|
|
3
3
|
status: number;
|
|
4
4
|
constructor(status: number, message: string);
|
|
@@ -42,6 +42,10 @@ declare class DomainsResource {
|
|
|
42
42
|
ok: boolean;
|
|
43
43
|
}>;
|
|
44
44
|
health(id: string): Promise<Record<string, unknown>>;
|
|
45
|
+
/** Certificado, vencimiento y redirecciones de la web del dominio o un subdominio ('@', 'www'). */
|
|
46
|
+
httpsCheck(id: string, host?: string): Promise<HttpsCheck>;
|
|
47
|
+
/** Datos públicos del registro (RDAP): registrador, vencimiento, candados y nameservers. */
|
|
48
|
+
registrationInfo(id: string): Promise<RegistrationInfo>;
|
|
45
49
|
verify(id: string): Promise<DomainVerification>;
|
|
46
50
|
/** Registros a pegar en el registrador. Con `live` los compara con el DNS público y deduce el panel. */
|
|
47
51
|
dnsSetup(id: string, opts?: {
|
|
@@ -82,6 +86,8 @@ declare class DnsResource {
|
|
|
82
86
|
import(domainId: string): Promise<DnsImportResult>;
|
|
83
87
|
/** Mide qué registros siguen vivos y los clasifica para podar (sólo lectura). */
|
|
84
88
|
audit(domainId: string): Promise<DnsAudit>;
|
|
89
|
+
/** Lo que contestan los resolvers públicos y los nameservers del dominio para un nombre (propagación). */
|
|
90
|
+
lookup(domainId: string, name: string, type?: DnsLookupType): Promise<DnsLookup>;
|
|
85
91
|
/** Reemplaza el conjunto: `values` sustituye por completo lo que hubiera en ese nombre y tipo. */
|
|
86
92
|
upsert(domainId: string, record: {
|
|
87
93
|
name: string;
|
package/dist/index.cjs
CHANGED
|
@@ -100,6 +100,14 @@ var DomainsResource = class {
|
|
|
100
100
|
health(id) {
|
|
101
101
|
return this.req(`/api/domains/${id}/health`);
|
|
102
102
|
}
|
|
103
|
+
/** Certificado, vencimiento y redirecciones de la web del dominio o un subdominio ('@', 'www'). */
|
|
104
|
+
httpsCheck(id, host = "@") {
|
|
105
|
+
return this.req(`/api/domains/${id}/https-check?host=${encodeURIComponent(host)}`);
|
|
106
|
+
}
|
|
107
|
+
/** Datos públicos del registro (RDAP): registrador, vencimiento, candados y nameservers. */
|
|
108
|
+
registrationInfo(id) {
|
|
109
|
+
return this.req(`/api/domains/${id}/registration-info`);
|
|
110
|
+
}
|
|
103
111
|
verify(id) {
|
|
104
112
|
return this.req(`/api/domains/${id}/verify`, { method: "POST" });
|
|
105
113
|
}
|
|
@@ -163,6 +171,10 @@ var DnsResource = class {
|
|
|
163
171
|
audit(domainId) {
|
|
164
172
|
return this.req(`/api/domains/${domainId}/dns/audit`);
|
|
165
173
|
}
|
|
174
|
+
/** Lo que contestan los resolvers públicos y los nameservers del dominio para un nombre (propagación). */
|
|
175
|
+
lookup(domainId, name, type = "A") {
|
|
176
|
+
return this.req(`/api/domains/${domainId}/dns/lookup?name=${encodeURIComponent(name)}&type=${type}`);
|
|
177
|
+
}
|
|
166
178
|
/** Reemplaza el conjunto: `values` sustituye por completo lo que hubiera en ese nombre y tipo. */
|
|
167
179
|
upsert(domainId, record) {
|
|
168
180
|
return this.req(`/api/domains/${domainId}/dns/records`, { method: "PUT", body: JSON.stringify(record) });
|
package/dist/index.js
CHANGED
|
@@ -72,6 +72,14 @@ var DomainsResource = class {
|
|
|
72
72
|
health(id) {
|
|
73
73
|
return this.req(`/api/domains/${id}/health`);
|
|
74
74
|
}
|
|
75
|
+
/** Certificado, vencimiento y redirecciones de la web del dominio o un subdominio ('@', 'www'). */
|
|
76
|
+
httpsCheck(id, host = "@") {
|
|
77
|
+
return this.req(`/api/domains/${id}/https-check?host=${encodeURIComponent(host)}`);
|
|
78
|
+
}
|
|
79
|
+
/** Datos públicos del registro (RDAP): registrador, vencimiento, candados y nameservers. */
|
|
80
|
+
registrationInfo(id) {
|
|
81
|
+
return this.req(`/api/domains/${id}/registration-info`);
|
|
82
|
+
}
|
|
75
83
|
verify(id) {
|
|
76
84
|
return this.req(`/api/domains/${id}/verify`, { method: "POST" });
|
|
77
85
|
}
|
|
@@ -135,6 +143,10 @@ var DnsResource = class {
|
|
|
135
143
|
audit(domainId) {
|
|
136
144
|
return this.req(`/api/domains/${domainId}/dns/audit`);
|
|
137
145
|
}
|
|
146
|
+
/** Lo que contestan los resolvers públicos y los nameservers del dominio para un nombre (propagación). */
|
|
147
|
+
lookup(domainId, name, type = "A") {
|
|
148
|
+
return this.req(`/api/domains/${domainId}/dns/lookup?name=${encodeURIComponent(name)}&type=${type}`);
|
|
149
|
+
}
|
|
138
150
|
/** Reemplaza el conjunto: `values` sustituye por completo lo que hubiera en ese nombre y tipo. */
|
|
139
151
|
upsert(domainId, record) {
|
|
140
152
|
return this.req(`/api/domains/${domainId}/dns/records`, { method: "PUT", body: JSON.stringify(record) });
|
package/dist/types.d.ts
CHANGED
|
@@ -370,6 +370,51 @@ export interface DnsAudit {
|
|
|
370
370
|
truncated: boolean;
|
|
371
371
|
note: string;
|
|
372
372
|
}
|
|
373
|
+
export type DnsLookupType = "A" | "AAAA" | "CNAME" | "MX" | "TXT" | "NS" | "CAA";
|
|
374
|
+
/** Respuesta de `dns.lookup`. */
|
|
375
|
+
export interface DnsLookup {
|
|
376
|
+
name: string;
|
|
377
|
+
type: DnsLookupType;
|
|
378
|
+
answers: {
|
|
379
|
+
server: string;
|
|
380
|
+
values: string[] | null;
|
|
381
|
+
error?: string;
|
|
382
|
+
}[];
|
|
383
|
+
propagated: boolean;
|
|
384
|
+
/** null si la zona no es de MailMask. */
|
|
385
|
+
matchesZone: boolean | null;
|
|
386
|
+
summary: string;
|
|
387
|
+
}
|
|
388
|
+
/** Respuesta de `domains.httpsCheck`. */
|
|
389
|
+
export interface HttpsCheck {
|
|
390
|
+
host: string;
|
|
391
|
+
ip: string | null;
|
|
392
|
+
certificate: {
|
|
393
|
+
issuer: string;
|
|
394
|
+
validTo: string;
|
|
395
|
+
daysLeft: number;
|
|
396
|
+
coversHost: boolean;
|
|
397
|
+
} | null;
|
|
398
|
+
redirects: {
|
|
399
|
+
url: string;
|
|
400
|
+
status: number;
|
|
401
|
+
}[];
|
|
402
|
+
finalStatus: number | null;
|
|
403
|
+
ok: boolean;
|
|
404
|
+
summary: string;
|
|
405
|
+
}
|
|
406
|
+
/** Respuesta de `domains.registrationInfo`. */
|
|
407
|
+
export interface RegistrationInfo {
|
|
408
|
+
domain: string;
|
|
409
|
+
registrar: string | null;
|
|
410
|
+
createdAt: string | null;
|
|
411
|
+
expiresAt: string | null;
|
|
412
|
+
statuses: string[];
|
|
413
|
+
nameservers: string[];
|
|
414
|
+
daysToExpire: number | null;
|
|
415
|
+
transferLocked: boolean | null;
|
|
416
|
+
summary: string;
|
|
417
|
+
}
|
|
373
418
|
export interface DnsZoneCreated {
|
|
374
419
|
hostedZoneId: string;
|
|
375
420
|
nameservers: string[];
|