@easybits.cloud/mailmask 0.4.10 → 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 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, 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?: {
@@ -80,6 +84,10 @@ declare class DnsResource {
80
84
  createZone(domainId: string): Promise<DnsZoneCreated>;
81
85
  delegation(domainId: string): Promise<DnsDelegation>;
82
86
  import(domainId: string): Promise<DnsImportResult>;
87
+ /** Mide qué registros siguen vivos y los clasifica para podar (sólo lectura). */
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>;
83
91
  /** Reemplaza el conjunto: `values` sustituye por completo lo que hubiera en ese nombre y tipo. */
84
92
  upsert(domainId: string, record: {
85
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
  }
@@ -159,6 +167,14 @@ var DnsResource = class {
159
167
  import(domainId) {
160
168
  return this.req(`/api/domains/${domainId}/dns/import`, { method: "POST" });
161
169
  }
170
+ /** Mide qué registros siguen vivos y los clasifica para podar (sólo lectura). */
171
+ audit(domainId) {
172
+ return this.req(`/api/domains/${domainId}/dns/audit`);
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
+ }
162
178
  /** Reemplaza el conjunto: `values` sustituye por completo lo que hubiera en ese nombre y tipo. */
163
179
  upsert(domainId, record) {
164
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
  }
@@ -131,6 +139,14 @@ var DnsResource = class {
131
139
  import(domainId) {
132
140
  return this.req(`/api/domains/${domainId}/dns/import`, { method: "POST" });
133
141
  }
142
+ /** Mide qué registros siguen vivos y los clasifica para podar (sólo lectura). */
143
+ audit(domainId) {
144
+ return this.req(`/api/domains/${domainId}/dns/audit`);
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
+ }
134
150
  /** Reemplaza el conjunto: `values` sustituye por completo lo que hubiera en ese nombre y tipo. */
135
151
  upsert(domainId, record) {
136
152
  return this.req(`/api/domains/${domainId}/dns/records`, { method: "PUT", body: JSON.stringify(record) });
package/dist/types.d.ts CHANGED
@@ -350,6 +350,71 @@ export interface DnsListResponse {
350
350
  /** Presente cuando todavía no hay zona: dice qué hacer. */
351
351
  hint?: string;
352
352
  }
353
+ export type DnsAuditVerdict = "takeover_risk" | "duplicated_name" | "not_responding" | "previous_provider" | "cert_validation" | "in_use" | "keep";
354
+ export interface DnsAuditFinding {
355
+ name: string;
356
+ type: string;
357
+ values: string[];
358
+ verdict: DnsAuditVerdict;
359
+ /** Lo que se midió, en español. */
360
+ evidence: string;
361
+ /** Qué conviene hacer, en español. */
362
+ action: string;
363
+ }
364
+ /** Respuesta de `dns.audit`: hallazgos ordenados, los urgentes primero. */
365
+ export interface DnsAudit {
366
+ domain: string;
367
+ checkedAt: string;
368
+ summary: Partial<Record<DnsAuditVerdict, number>>;
369
+ findings: DnsAuditFinding[];
370
+ truncated: boolean;
371
+ note: string;
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
+ }
353
418
  export interface DnsZoneCreated {
354
419
  hostedZoneId: string;
355
420
  nameservers: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easybits.cloud/mailmask",
3
- "version": "0.4.10",
3
+ "version": "0.4.12",
4
4
  "description": "Official SDK for the MailMask email alias/forwarding API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",