delivrie 0.2.0 → 0.2.1
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 +4 -4
- package/dist/cjs/client.cjs +2 -2
- package/dist/cjs/client.d.cts +2 -2
- package/dist/cjs/types.d.cts +2 -0
- package/dist/esm/client.d.ts +2 -2
- package/dist/esm/client.js +2 -2
- package/dist/esm/types.d.ts +2 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ import { Delivrie } from "delivrie";
|
|
|
14
14
|
const delivrie = new Delivrie(process.env.DELIVRIE_API_KEY);
|
|
15
15
|
|
|
16
16
|
const { data, error } = await delivrie.emails.send({
|
|
17
|
-
from: "
|
|
17
|
+
from: "Acme <orders@mail.acme.com>",
|
|
18
18
|
to: "ada@example.com",
|
|
19
19
|
subject: "Your order is on its way",
|
|
20
20
|
html: "<p>Thanks for your order!</p>",
|
|
@@ -72,7 +72,7 @@ Change the defaults with `new Delivrie(key, { maxRetries: 0, timeout: 10_000 })`
|
|
|
72
72
|
```ts
|
|
73
73
|
// Attachments: pass a base64 string, a Buffer or a Uint8Array
|
|
74
74
|
await delivrie.emails.send({
|
|
75
|
-
from: "billing@mail.
|
|
75
|
+
from: "billing@mail.acme.com",
|
|
76
76
|
to: ["ada@example.com"],
|
|
77
77
|
subject: "Invoice",
|
|
78
78
|
text: "Your invoice is attached.",
|
|
@@ -81,7 +81,7 @@ await delivrie.emails.send({
|
|
|
81
81
|
|
|
82
82
|
// A published template, scheduled for later
|
|
83
83
|
await delivrie.emails.send({
|
|
84
|
-
from: "hello@mail.
|
|
84
|
+
from: "hello@mail.acme.com",
|
|
85
85
|
to: "ada@example.com",
|
|
86
86
|
template: { id: "welcome", variables: { first_name: "Ada" } },
|
|
87
87
|
scheduledAt: "tomorrow at 9am",
|
|
@@ -91,7 +91,7 @@ await delivrie.emails.send({
|
|
|
91
91
|
await delivrie.emails.batch([{ ... }, { ... }]);
|
|
92
92
|
|
|
93
93
|
// Domains, contacts, broadcasts
|
|
94
|
-
await delivrie.domains.create({ name: "mail.
|
|
94
|
+
await delivrie.domains.create({ name: "mail.acme.com" });
|
|
95
95
|
await delivrie.contacts.create({ email: "ada@example.com", first_name: "Ada" });
|
|
96
96
|
await delivrie.broadcasts.send("bc_123", { scheduled_at: "in 1 hour" });
|
|
97
97
|
|
package/dist/cjs/client.cjs
CHANGED
|
@@ -35,7 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.Delivrie = exports.VERSION = void 0;
|
|
37
37
|
const webhooks_js_1 = require("./webhooks.cjs");
|
|
38
|
-
exports.VERSION = "0.2.
|
|
38
|
+
exports.VERSION = "0.2.1";
|
|
39
39
|
const DEFAULT_BASE_URL = "https://delivrie.io/api";
|
|
40
40
|
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
41
41
|
const enc = encodeURIComponent;
|
|
@@ -96,7 +96,7 @@ function normalizeEmail(e) {
|
|
|
96
96
|
* ```ts
|
|
97
97
|
* import { Delivrie } from "delivrie";
|
|
98
98
|
* const delivrie = new Delivrie(process.env.DELIVRIE_API_KEY);
|
|
99
|
-
* const { data, error } = await delivrie.emails.send({ from: "
|
|
99
|
+
* const { data, error } = await delivrie.emails.send({ from: "Acme <hi@acme.com>", to: "ada@example.com", subject: "Hi", html: "<p>Hello</p>" });
|
|
100
100
|
* ```
|
|
101
101
|
*/
|
|
102
102
|
class Delivrie {
|
package/dist/cjs/client.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ApiKey, Automation, Broadcast, Contact, CreateApiKeyRequest, CreateApiKeyResponse, CreateBroadcastRequest, CreateContactRequest, CreateDomainRequest, CreateEmailResponse, CreateTemplateRequest, CreateWebhookRequest, CreateWebhookResponse, Domain, Email, EmailSummary, ForwardEmailRequest, InboxThread, List, ListContactsParams, ListEmailsParams, Log, LogSummary, Metrics, Pagination, ReplyToThreadRequest, RequestOptions, Result, Segment, SendEmailRequest, SendEventRequest, Suppression, Template, Topic, UpdateContactRequest, UpdateDomainRequest, Usage, Webhook, WebhookDelivery, Deleted, BroadcastRecipientCount } from "./types.cjs";
|
|
2
2
|
import { type VerifyWebhookOptions } from "./webhooks.cjs";
|
|
3
|
-
export declare const VERSION = "0.2.
|
|
3
|
+
export declare const VERSION = "0.2.1";
|
|
4
4
|
export interface DelivrieOptions {
|
|
5
5
|
/** Defaults to `https://delivrie.io/api`. */
|
|
6
6
|
baseUrl?: string;
|
|
@@ -21,7 +21,7 @@ type Query = Record<string, string | number | boolean | undefined | null>;
|
|
|
21
21
|
* ```ts
|
|
22
22
|
* import { Delivrie } from "delivrie";
|
|
23
23
|
* const delivrie = new Delivrie(process.env.DELIVRIE_API_KEY);
|
|
24
|
-
* const { data, error } = await delivrie.emails.send({ from: "
|
|
24
|
+
* const { data, error } = await delivrie.emails.send({ from: "Acme <hi@acme.com>", to: "ada@example.com", subject: "Hi", html: "<p>Hello</p>" });
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
27
|
export declare class Delivrie {
|
package/dist/cjs/types.d.cts
CHANGED
|
@@ -153,6 +153,8 @@ export interface Domain {
|
|
|
153
153
|
receiving_subdomain: string | null;
|
|
154
154
|
receiving_mode: string | null;
|
|
155
155
|
receiving_addresses: string[] | null;
|
|
156
|
+
/** Addresses that get a copy of every email this domain receives. Empty when forwarding is off. */
|
|
157
|
+
receiving_forward_to: string[];
|
|
156
158
|
receiving_verified_at: string | null;
|
|
157
159
|
}
|
|
158
160
|
export interface CreateDomainRequest {
|
package/dist/esm/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ApiKey, Automation, Broadcast, Contact, CreateApiKeyRequest, CreateApiKeyResponse, CreateBroadcastRequest, CreateContactRequest, CreateDomainRequest, CreateEmailResponse, CreateTemplateRequest, CreateWebhookRequest, CreateWebhookResponse, Domain, Email, EmailSummary, ForwardEmailRequest, InboxThread, List, ListContactsParams, ListEmailsParams, Log, LogSummary, Metrics, Pagination, ReplyToThreadRequest, RequestOptions, Result, Segment, SendEmailRequest, SendEventRequest, Suppression, Template, Topic, UpdateContactRequest, UpdateDomainRequest, Usage, Webhook, WebhookDelivery, Deleted, BroadcastRecipientCount } from "./types.js";
|
|
2
2
|
import { type VerifyWebhookOptions } from "./webhooks.js";
|
|
3
|
-
export declare const VERSION = "0.2.
|
|
3
|
+
export declare const VERSION = "0.2.1";
|
|
4
4
|
export interface DelivrieOptions {
|
|
5
5
|
/** Defaults to `https://delivrie.io/api`. */
|
|
6
6
|
baseUrl?: string;
|
|
@@ -21,7 +21,7 @@ type Query = Record<string, string | number | boolean | undefined | null>;
|
|
|
21
21
|
* ```ts
|
|
22
22
|
* import { Delivrie } from "delivrie";
|
|
23
23
|
* const delivrie = new Delivrie(process.env.DELIVRIE_API_KEY);
|
|
24
|
-
* const { data, error } = await delivrie.emails.send({ from: "
|
|
24
|
+
* const { data, error } = await delivrie.emails.send({ from: "Acme <hi@acme.com>", to: "ada@example.com", subject: "Hi", html: "<p>Hello</p>" });
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
27
|
export declare class Delivrie {
|
package/dist/esm/client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { verifyWebhook } from "./webhooks.js";
|
|
2
|
-
export const VERSION = "0.2.
|
|
2
|
+
export const VERSION = "0.2.1";
|
|
3
3
|
const DEFAULT_BASE_URL = "https://delivrie.io/api";
|
|
4
4
|
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
5
5
|
const enc = encodeURIComponent;
|
|
@@ -60,7 +60,7 @@ function normalizeEmail(e) {
|
|
|
60
60
|
* ```ts
|
|
61
61
|
* import { Delivrie } from "delivrie";
|
|
62
62
|
* const delivrie = new Delivrie(process.env.DELIVRIE_API_KEY);
|
|
63
|
-
* const { data, error } = await delivrie.emails.send({ from: "
|
|
63
|
+
* const { data, error } = await delivrie.emails.send({ from: "Acme <hi@acme.com>", to: "ada@example.com", subject: "Hi", html: "<p>Hello</p>" });
|
|
64
64
|
* ```
|
|
65
65
|
*/
|
|
66
66
|
export class Delivrie {
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -153,6 +153,8 @@ export interface Domain {
|
|
|
153
153
|
receiving_subdomain: string | null;
|
|
154
154
|
receiving_mode: string | null;
|
|
155
155
|
receiving_addresses: string[] | null;
|
|
156
|
+
/** Addresses that get a copy of every email this domain receives. Empty when forwarding is off. */
|
|
157
|
+
receiving_forward_to: string[];
|
|
156
158
|
receiving_verified_at: string | null;
|
|
157
159
|
}
|
|
158
160
|
export interface CreateDomainRequest {
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "delivrie",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Official Node.js and TypeScript SDK for the Delivrie email API: send transactional email, manage domains, contacts, broadcasts and templates, and verify webhooks.",
|
|
5
|
-
"keywords": ["delivrie", "email", "email-api", "transactional-email", "smtp", "resend-alternative", "webhooks"
|
|
5
|
+
"keywords": ["delivrie", "email", "email-api", "transactional-email", "smtp", "resend-alternative", "webhooks"],
|
|
6
6
|
"homepage": "https://delivrie.io/docs/sdks",
|
|
7
7
|
"repository": { "type": "git", "url": "git+https://github.com/codeddesigner/delivrie.git", "directory": "sdk/node" },
|
|
8
8
|
"bugs": { "url": "https://delivrie.io/support" },
|
|
9
9
|
"license": "MIT",
|
|
10
|
-
"author": "
|
|
10
|
+
"author": "Surce Inc <support@delivrie.io>",
|
|
11
11
|
"type": "module",
|
|
12
12
|
"main": "./dist/cjs/index.cjs",
|
|
13
13
|
"module": "./dist/esm/index.js",
|