@easybits.cloud/mailmask 0.4.8 → 0.4.10
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/README.md +9 -0
- package/dist/client.d.ts +427 -0
- package/dist/index.cjs +27 -2
- package/dist/index.d.ts +4 -1189
- package/dist/index.js +27 -2
- package/dist/types.d.ts +867 -0
- package/dist/verify.d.ts +12 -0
- package/package.json +6 -3
- package/dist/index.d.cts +0 -1189
package/dist/index.js
CHANGED
|
@@ -92,6 +92,22 @@ var DomainsResource = class {
|
|
|
92
92
|
removeLogo(id) {
|
|
93
93
|
return this.req(`/api/domains/${id}/logo`, { method: "DELETE" });
|
|
94
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* Publica un sitio de EasyBits en el dominio: lo da de alta en EasyBits, escribe sus
|
|
97
|
+
* registros (sin tocar el correo), verifica y, en la raíz, lo asigna. Requiere la cuenta
|
|
98
|
+
* de EasyBits conectada en el navegador; sin ella, 409 con la liga para conectarla.
|
|
99
|
+
*/
|
|
100
|
+
publishEasyBitsSite(id, input) {
|
|
101
|
+
return this.req(`/api/domains/${id}/website/easybits`, { method: "POST", body: JSON.stringify(input) });
|
|
102
|
+
}
|
|
103
|
+
/** Quita el sitio: el DNS vuelve a como estaba (lo que cambiaste después no se toca) y se limpia EasyBits. */
|
|
104
|
+
unpublishEasyBitsSite(id) {
|
|
105
|
+
return this.req(`/api/domains/${id}/website/easybits`, { method: "DELETE" });
|
|
106
|
+
}
|
|
107
|
+
/** Qué sitio de EasyBits está publicado en el dominio, si alguno, y si la cuenta está conectada. */
|
|
108
|
+
easyBitsSiteStatus(id) {
|
|
109
|
+
return this.req(`/api/domains/${id}/website/easybits`);
|
|
110
|
+
}
|
|
95
111
|
/** Imagen para incrustar en un correo saliente (PNG, JPG, GIF o WebP; máx. 2 MB). Efímera: se borra tras enviarse o por el barrido diario. */
|
|
96
112
|
uploadImage(id, file, filename = "imagen") {
|
|
97
113
|
const form = new FormData();
|
|
@@ -122,8 +138,17 @@ var DnsResource = class {
|
|
|
122
138
|
delete(domainId, name, type) {
|
|
123
139
|
return this.req(`/api/domains/${domainId}/dns/records`, { method: "DELETE", body: JSON.stringify({ name, type }) });
|
|
124
140
|
}
|
|
125
|
-
|
|
126
|
-
|
|
141
|
+
/** Con 'easybits' publica un sitio de la cuenta conectada (`opts.websiteId`), igual que `domains.publishEasyBitsSite`. */
|
|
142
|
+
preset(domainId, preset, target, subdomain, opts) {
|
|
143
|
+
return this.req(`/api/domains/${domainId}/dns/preset`, { method: "POST", body: JSON.stringify({ preset, target, subdomain, ...opts }) });
|
|
144
|
+
}
|
|
145
|
+
/** Vista previa de una plantilla: lo que escribiría y lo que hay hoy, sin tocar nada. */
|
|
146
|
+
presetPreview(domainId, preset, target, subdomain, opts) {
|
|
147
|
+
return this.req(`/api/domains/${domainId}/dns/preset`, { method: "POST", body: JSON.stringify({ preset, target, subdomain, ...opts, dryRun: true }) });
|
|
148
|
+
}
|
|
149
|
+
/** A dónde apunta el sitio (raíz, www y subdominios), qué plataforma es, qué está mal y si responde por HTTPS. */
|
|
150
|
+
website(domainId) {
|
|
151
|
+
return this.req(`/api/domains/${domainId}/website`);
|
|
127
152
|
}
|
|
128
153
|
};
|
|
129
154
|
var AliasesResource = class {
|