resend 6.28.1 → 6.30.0
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.cjs +12 -1
- package/dist/index.d.cts +61 -1
- package/dist/index.d.mts +61 -1
- package/dist/index.mjs +12 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -25,7 +25,7 @@ let postal_mime = require("postal-mime");
|
|
|
25
25
|
postal_mime = __toESM(postal_mime);
|
|
26
26
|
let standardwebhooks = require("standardwebhooks");
|
|
27
27
|
//#region package.json
|
|
28
|
-
var version = "6.
|
|
28
|
+
var version = "6.30.0";
|
|
29
29
|
//#endregion
|
|
30
30
|
//#region src/common/utils/build-pagination-query.ts
|
|
31
31
|
function buildPaginationUrl(base, options) {
|
|
@@ -1203,6 +1203,16 @@ var Topics = class {
|
|
|
1203
1203
|
}
|
|
1204
1204
|
};
|
|
1205
1205
|
//#endregion
|
|
1206
|
+
//#region src/usage/usage.ts
|
|
1207
|
+
var Usage = class {
|
|
1208
|
+
constructor(resend) {
|
|
1209
|
+
this.resend = resend;
|
|
1210
|
+
}
|
|
1211
|
+
async get() {
|
|
1212
|
+
return await this.resend.get("/usage");
|
|
1213
|
+
}
|
|
1214
|
+
};
|
|
1215
|
+
//#endregion
|
|
1206
1216
|
//#region src/webhooks/events/attempts/attempts.ts
|
|
1207
1217
|
var Attempts = class {
|
|
1208
1218
|
constructor(resend) {
|
|
@@ -1298,6 +1308,7 @@ var Resend = class {
|
|
|
1298
1308
|
this.suppressions = new Suppressions(this);
|
|
1299
1309
|
this.templates = new Templates(this);
|
|
1300
1310
|
this.topics = new Topics(this);
|
|
1311
|
+
this.usage = new Usage(this);
|
|
1301
1312
|
this.webhooks = new Webhooks(this);
|
|
1302
1313
|
if (!key) {
|
|
1303
1314
|
if (typeof process !== "undefined" && process.env) this.key = process.env.RESEND_API_KEY;
|
package/dist/index.d.cts
CHANGED
|
@@ -1228,7 +1228,7 @@ export type RemoveContactsResponse = Response<RemoveContactsResponseSuccess>;
|
|
|
1228
1228
|
//#endregion
|
|
1229
1229
|
//#region src/contacts/interfaces/update-contact.interface.d.ts
|
|
1230
1230
|
interface UpdateContactPropertiesOptions {
|
|
1231
|
-
[key: string]: string | number | null;
|
|
1231
|
+
[key: string]: string | number | boolean | null;
|
|
1232
1232
|
}
|
|
1233
1233
|
export type UpdateContactOptions = {
|
|
1234
1234
|
audienceId?: string;
|
|
@@ -2348,6 +2348,65 @@ declare class Topics {
|
|
|
2348
2348
|
remove(id: string): Promise<RemoveTopicResponse>;
|
|
2349
2349
|
}
|
|
2350
2350
|
//#endregion
|
|
2351
|
+
//#region src/usage/interfaces/get-usage.interface.d.ts
|
|
2352
|
+
export type GetUsageResponseSuccess = {
|
|
2353
|
+
object: 'usage';
|
|
2354
|
+
emails: {
|
|
2355
|
+
daily: {
|
|
2356
|
+
used: number;
|
|
2357
|
+
limit: number | null;
|
|
2358
|
+
sent: number;
|
|
2359
|
+
received: number;
|
|
2360
|
+
resets_at: string;
|
|
2361
|
+
};
|
|
2362
|
+
monthly: {
|
|
2363
|
+
used: number;
|
|
2364
|
+
limit: number;
|
|
2365
|
+
sent: number;
|
|
2366
|
+
received: number;
|
|
2367
|
+
resets_at: string;
|
|
2368
|
+
};
|
|
2369
|
+
};
|
|
2370
|
+
contacts: {
|
|
2371
|
+
used: number;
|
|
2372
|
+
limit: number;
|
|
2373
|
+
};
|
|
2374
|
+
segments: {
|
|
2375
|
+
used: number;
|
|
2376
|
+
limit: number | null;
|
|
2377
|
+
};
|
|
2378
|
+
broadcasts: {
|
|
2379
|
+
used: number;
|
|
2380
|
+
limit: null;
|
|
2381
|
+
};
|
|
2382
|
+
ai_credits: {
|
|
2383
|
+
used: number;
|
|
2384
|
+
limit: number | null;
|
|
2385
|
+
next_increase_at: string | null;
|
|
2386
|
+
};
|
|
2387
|
+
automation_runs: {
|
|
2388
|
+
used: number;
|
|
2389
|
+
limit: number;
|
|
2390
|
+
resets_at: string;
|
|
2391
|
+
};
|
|
2392
|
+
domains: {
|
|
2393
|
+
used: number;
|
|
2394
|
+
limit: number | null;
|
|
2395
|
+
};
|
|
2396
|
+
rate_limit: {
|
|
2397
|
+
limit: number;
|
|
2398
|
+
duration: string;
|
|
2399
|
+
};
|
|
2400
|
+
};
|
|
2401
|
+
export type GetUsageResponse = Response<GetUsageResponseSuccess>;
|
|
2402
|
+
//#endregion
|
|
2403
|
+
//#region src/usage/usage.d.ts
|
|
2404
|
+
declare class Usage {
|
|
2405
|
+
private readonly resend;
|
|
2406
|
+
constructor(resend: Resend);
|
|
2407
|
+
get(): Promise<GetUsageResponse>;
|
|
2408
|
+
}
|
|
2409
|
+
//#endregion
|
|
2351
2410
|
//#region src/webhooks/interfaces/webhook-event.interface.d.ts
|
|
2352
2411
|
type WebhookEvent = 'email.sent' | 'email.scheduled' | 'email.delivered' | 'email.delivery_delayed' | 'email.complained' | 'email.bounced' | 'email.opened' | 'email.clicked' | 'email.received' | 'email.failed' | 'email.suppressed' | 'contact.created' | 'contact.updated' | 'contact.deleted' | 'domain.created' | 'domain.updated' | 'domain.deleted' | 'suppression.added' | 'suppression.removed';
|
|
2353
2412
|
interface BaseEmailEventData {
|
|
@@ -2743,6 +2802,7 @@ export declare class Resend {
|
|
|
2743
2802
|
readonly suppressions: Suppressions;
|
|
2744
2803
|
readonly templates: Templates;
|
|
2745
2804
|
readonly topics: Topics;
|
|
2805
|
+
readonly usage: Usage;
|
|
2746
2806
|
readonly webhooks: Webhooks;
|
|
2747
2807
|
constructor(key?: string | undefined, options?: ResendOptions);
|
|
2748
2808
|
private logError;
|
package/dist/index.d.mts
CHANGED
|
@@ -1228,7 +1228,7 @@ export type RemoveContactsResponse = Response<RemoveContactsResponseSuccess>;
|
|
|
1228
1228
|
//#endregion
|
|
1229
1229
|
//#region src/contacts/interfaces/update-contact.interface.d.ts
|
|
1230
1230
|
interface UpdateContactPropertiesOptions {
|
|
1231
|
-
[key: string]: string | number | null;
|
|
1231
|
+
[key: string]: string | number | boolean | null;
|
|
1232
1232
|
}
|
|
1233
1233
|
export type UpdateContactOptions = {
|
|
1234
1234
|
audienceId?: string;
|
|
@@ -2348,6 +2348,65 @@ declare class Topics {
|
|
|
2348
2348
|
remove(id: string): Promise<RemoveTopicResponse>;
|
|
2349
2349
|
}
|
|
2350
2350
|
//#endregion
|
|
2351
|
+
//#region src/usage/interfaces/get-usage.interface.d.ts
|
|
2352
|
+
export type GetUsageResponseSuccess = {
|
|
2353
|
+
object: 'usage';
|
|
2354
|
+
emails: {
|
|
2355
|
+
daily: {
|
|
2356
|
+
used: number;
|
|
2357
|
+
limit: number | null;
|
|
2358
|
+
sent: number;
|
|
2359
|
+
received: number;
|
|
2360
|
+
resets_at: string;
|
|
2361
|
+
};
|
|
2362
|
+
monthly: {
|
|
2363
|
+
used: number;
|
|
2364
|
+
limit: number;
|
|
2365
|
+
sent: number;
|
|
2366
|
+
received: number;
|
|
2367
|
+
resets_at: string;
|
|
2368
|
+
};
|
|
2369
|
+
};
|
|
2370
|
+
contacts: {
|
|
2371
|
+
used: number;
|
|
2372
|
+
limit: number;
|
|
2373
|
+
};
|
|
2374
|
+
segments: {
|
|
2375
|
+
used: number;
|
|
2376
|
+
limit: number | null;
|
|
2377
|
+
};
|
|
2378
|
+
broadcasts: {
|
|
2379
|
+
used: number;
|
|
2380
|
+
limit: null;
|
|
2381
|
+
};
|
|
2382
|
+
ai_credits: {
|
|
2383
|
+
used: number;
|
|
2384
|
+
limit: number | null;
|
|
2385
|
+
next_increase_at: string | null;
|
|
2386
|
+
};
|
|
2387
|
+
automation_runs: {
|
|
2388
|
+
used: number;
|
|
2389
|
+
limit: number;
|
|
2390
|
+
resets_at: string;
|
|
2391
|
+
};
|
|
2392
|
+
domains: {
|
|
2393
|
+
used: number;
|
|
2394
|
+
limit: number | null;
|
|
2395
|
+
};
|
|
2396
|
+
rate_limit: {
|
|
2397
|
+
limit: number;
|
|
2398
|
+
duration: string;
|
|
2399
|
+
};
|
|
2400
|
+
};
|
|
2401
|
+
export type GetUsageResponse = Response<GetUsageResponseSuccess>;
|
|
2402
|
+
//#endregion
|
|
2403
|
+
//#region src/usage/usage.d.ts
|
|
2404
|
+
declare class Usage {
|
|
2405
|
+
private readonly resend;
|
|
2406
|
+
constructor(resend: Resend);
|
|
2407
|
+
get(): Promise<GetUsageResponse>;
|
|
2408
|
+
}
|
|
2409
|
+
//#endregion
|
|
2351
2410
|
//#region src/webhooks/interfaces/webhook-event.interface.d.ts
|
|
2352
2411
|
type WebhookEvent = 'email.sent' | 'email.scheduled' | 'email.delivered' | 'email.delivery_delayed' | 'email.complained' | 'email.bounced' | 'email.opened' | 'email.clicked' | 'email.received' | 'email.failed' | 'email.suppressed' | 'contact.created' | 'contact.updated' | 'contact.deleted' | 'domain.created' | 'domain.updated' | 'domain.deleted' | 'suppression.added' | 'suppression.removed';
|
|
2353
2412
|
interface BaseEmailEventData {
|
|
@@ -2743,6 +2802,7 @@ export declare class Resend {
|
|
|
2743
2802
|
readonly suppressions: Suppressions;
|
|
2744
2803
|
readonly templates: Templates;
|
|
2745
2804
|
readonly topics: Topics;
|
|
2805
|
+
readonly usage: Usage;
|
|
2746
2806
|
readonly webhooks: Webhooks;
|
|
2747
2807
|
constructor(key?: string | undefined, options?: ResendOptions);
|
|
2748
2808
|
private logError;
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import PostalMime from "postal-mime";
|
|
2
2
|
import { Webhook } from "standardwebhooks";
|
|
3
3
|
//#region package.json
|
|
4
|
-
var version = "6.
|
|
4
|
+
var version = "6.30.0";
|
|
5
5
|
//#endregion
|
|
6
6
|
//#region src/common/utils/build-pagination-query.ts
|
|
7
7
|
function buildPaginationUrl(base, options) {
|
|
@@ -1179,6 +1179,16 @@ var Topics = class {
|
|
|
1179
1179
|
}
|
|
1180
1180
|
};
|
|
1181
1181
|
//#endregion
|
|
1182
|
+
//#region src/usage/usage.ts
|
|
1183
|
+
var Usage = class {
|
|
1184
|
+
constructor(resend) {
|
|
1185
|
+
this.resend = resend;
|
|
1186
|
+
}
|
|
1187
|
+
async get() {
|
|
1188
|
+
return await this.resend.get("/usage");
|
|
1189
|
+
}
|
|
1190
|
+
};
|
|
1191
|
+
//#endregion
|
|
1182
1192
|
//#region src/webhooks/events/attempts/attempts.ts
|
|
1183
1193
|
var Attempts = class {
|
|
1184
1194
|
constructor(resend) {
|
|
@@ -1274,6 +1284,7 @@ var Resend = class {
|
|
|
1274
1284
|
this.suppressions = new Suppressions(this);
|
|
1275
1285
|
this.templates = new Templates(this);
|
|
1276
1286
|
this.topics = new Topics(this);
|
|
1287
|
+
this.usage = new Usage(this);
|
|
1277
1288
|
this.webhooks = new Webhooks(this);
|
|
1278
1289
|
if (!key) {
|
|
1279
1290
|
if (typeof process !== "undefined" && process.env) this.key = process.env.RESEND_API_KEY;
|