resend 6.4.0-canary.1 → 6.4.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.d.mts +21 -5
- package/dist/index.d.ts +21 -5
- package/dist/index.js +5 -4
- package/dist/index.mjs +5 -4
- package/package.json +16 -14
package/dist/index.d.mts
CHANGED
|
@@ -10,7 +10,6 @@ interface DomainApiOptions {
|
|
|
10
10
|
name: string;
|
|
11
11
|
region?: string;
|
|
12
12
|
custom_return_path?: string;
|
|
13
|
-
capability?: 'send' | 'receive' | 'send-and-receive';
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
declare const RESEND_ERROR_CODES_BY_KEY: {
|
|
@@ -527,12 +526,16 @@ type SelectingField = {
|
|
|
527
526
|
email: string;
|
|
528
527
|
};
|
|
529
528
|
|
|
529
|
+
interface CreateContactPropertiesOptions {
|
|
530
|
+
[key: string]: string | number | null;
|
|
531
|
+
}
|
|
530
532
|
interface CreateContactOptions {
|
|
531
533
|
audienceId?: string;
|
|
532
534
|
email: string;
|
|
533
535
|
unsubscribed?: boolean;
|
|
534
536
|
firstName?: string;
|
|
535
537
|
lastName?: string;
|
|
538
|
+
properties?: CreateContactPropertiesOptions;
|
|
536
539
|
}
|
|
537
540
|
interface CreateContactRequestOptions extends PostOptions {
|
|
538
541
|
}
|
|
@@ -544,8 +547,19 @@ type CreateContactResponse = Response<CreateContactResponseSuccess>;
|
|
|
544
547
|
type GetContactOptions = string | ({
|
|
545
548
|
audienceId?: string;
|
|
546
549
|
} & SelectingField);
|
|
550
|
+
type ContactPropertyValue = {
|
|
551
|
+
type: 'string';
|
|
552
|
+
value: string;
|
|
553
|
+
} | {
|
|
554
|
+
type: 'number';
|
|
555
|
+
value: number;
|
|
556
|
+
};
|
|
557
|
+
interface ContactProperties$1 {
|
|
558
|
+
[key: string]: ContactPropertyValue;
|
|
559
|
+
}
|
|
547
560
|
interface GetContactResponseSuccess extends Pick<Contact, 'id' | 'email' | 'created_at' | 'first_name' | 'last_name' | 'unsubscribed'> {
|
|
548
561
|
object: 'contact';
|
|
562
|
+
properties: ContactProperties$1;
|
|
549
563
|
}
|
|
550
564
|
type GetContactResponse = Response<GetContactResponseSuccess>;
|
|
551
565
|
|
|
@@ -572,11 +586,15 @@ type RemoveContactOptions = string | (SelectingField & {
|
|
|
572
586
|
});
|
|
573
587
|
type RemoveContactsResponse = Response<RemoveContactsResponseSuccess>;
|
|
574
588
|
|
|
589
|
+
interface UpdateContactPropertiesOptions {
|
|
590
|
+
[key: string]: string | number | null;
|
|
591
|
+
}
|
|
575
592
|
type UpdateContactOptions = {
|
|
576
593
|
audienceId?: string;
|
|
577
594
|
unsubscribed?: boolean;
|
|
578
595
|
firstName?: string;
|
|
579
596
|
lastName?: string;
|
|
597
|
+
properties?: UpdateContactPropertiesOptions;
|
|
580
598
|
} & SelectingField;
|
|
581
599
|
type UpdateContactResponseSuccess = Pick<Contact, 'id'> & {
|
|
582
600
|
object: 'contact';
|
|
@@ -624,23 +642,21 @@ interface Domain {
|
|
|
624
642
|
status: DomainStatus;
|
|
625
643
|
created_at: string;
|
|
626
644
|
region: DomainRegion;
|
|
627
|
-
capability: 'send' | 'receive' | 'send-and-receive';
|
|
628
645
|
}
|
|
629
646
|
|
|
630
647
|
interface CreateDomainOptions {
|
|
631
648
|
name: string;
|
|
632
649
|
region?: DomainRegion;
|
|
633
650
|
customReturnPath?: string;
|
|
634
|
-
capability?: 'send' | 'receive' | 'send-and-receive';
|
|
635
651
|
}
|
|
636
652
|
interface CreateDomainRequestOptions extends PostOptions {
|
|
637
653
|
}
|
|
638
|
-
interface CreateDomainResponseSuccess extends Pick<Domain, 'name' | 'id' | 'status' | 'created_at' | 'region'
|
|
654
|
+
interface CreateDomainResponseSuccess extends Pick<Domain, 'name' | 'id' | 'status' | 'created_at' | 'region'> {
|
|
639
655
|
records: DomainRecords[];
|
|
640
656
|
}
|
|
641
657
|
type CreateDomainResponse = Response<CreateDomainResponseSuccess>;
|
|
642
658
|
|
|
643
|
-
interface GetDomainResponseSuccess extends Pick<Domain, 'id' | 'name' | 'created_at' | 'region' | 'status'
|
|
659
|
+
interface GetDomainResponseSuccess extends Pick<Domain, 'id' | 'name' | 'created_at' | 'region' | 'status'> {
|
|
644
660
|
object: 'domain';
|
|
645
661
|
records: DomainRecords[];
|
|
646
662
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ interface DomainApiOptions {
|
|
|
10
10
|
name: string;
|
|
11
11
|
region?: string;
|
|
12
12
|
custom_return_path?: string;
|
|
13
|
-
capability?: 'send' | 'receive' | 'send-and-receive';
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
declare const RESEND_ERROR_CODES_BY_KEY: {
|
|
@@ -527,12 +526,16 @@ type SelectingField = {
|
|
|
527
526
|
email: string;
|
|
528
527
|
};
|
|
529
528
|
|
|
529
|
+
interface CreateContactPropertiesOptions {
|
|
530
|
+
[key: string]: string | number | null;
|
|
531
|
+
}
|
|
530
532
|
interface CreateContactOptions {
|
|
531
533
|
audienceId?: string;
|
|
532
534
|
email: string;
|
|
533
535
|
unsubscribed?: boolean;
|
|
534
536
|
firstName?: string;
|
|
535
537
|
lastName?: string;
|
|
538
|
+
properties?: CreateContactPropertiesOptions;
|
|
536
539
|
}
|
|
537
540
|
interface CreateContactRequestOptions extends PostOptions {
|
|
538
541
|
}
|
|
@@ -544,8 +547,19 @@ type CreateContactResponse = Response<CreateContactResponseSuccess>;
|
|
|
544
547
|
type GetContactOptions = string | ({
|
|
545
548
|
audienceId?: string;
|
|
546
549
|
} & SelectingField);
|
|
550
|
+
type ContactPropertyValue = {
|
|
551
|
+
type: 'string';
|
|
552
|
+
value: string;
|
|
553
|
+
} | {
|
|
554
|
+
type: 'number';
|
|
555
|
+
value: number;
|
|
556
|
+
};
|
|
557
|
+
interface ContactProperties$1 {
|
|
558
|
+
[key: string]: ContactPropertyValue;
|
|
559
|
+
}
|
|
547
560
|
interface GetContactResponseSuccess extends Pick<Contact, 'id' | 'email' | 'created_at' | 'first_name' | 'last_name' | 'unsubscribed'> {
|
|
548
561
|
object: 'contact';
|
|
562
|
+
properties: ContactProperties$1;
|
|
549
563
|
}
|
|
550
564
|
type GetContactResponse = Response<GetContactResponseSuccess>;
|
|
551
565
|
|
|
@@ -572,11 +586,15 @@ type RemoveContactOptions = string | (SelectingField & {
|
|
|
572
586
|
});
|
|
573
587
|
type RemoveContactsResponse = Response<RemoveContactsResponseSuccess>;
|
|
574
588
|
|
|
589
|
+
interface UpdateContactPropertiesOptions {
|
|
590
|
+
[key: string]: string | number | null;
|
|
591
|
+
}
|
|
575
592
|
type UpdateContactOptions = {
|
|
576
593
|
audienceId?: string;
|
|
577
594
|
unsubscribed?: boolean;
|
|
578
595
|
firstName?: string;
|
|
579
596
|
lastName?: string;
|
|
597
|
+
properties?: UpdateContactPropertiesOptions;
|
|
580
598
|
} & SelectingField;
|
|
581
599
|
type UpdateContactResponseSuccess = Pick<Contact, 'id'> & {
|
|
582
600
|
object: 'contact';
|
|
@@ -624,23 +642,21 @@ interface Domain {
|
|
|
624
642
|
status: DomainStatus;
|
|
625
643
|
created_at: string;
|
|
626
644
|
region: DomainRegion;
|
|
627
|
-
capability: 'send' | 'receive' | 'send-and-receive';
|
|
628
645
|
}
|
|
629
646
|
|
|
630
647
|
interface CreateDomainOptions {
|
|
631
648
|
name: string;
|
|
632
649
|
region?: DomainRegion;
|
|
633
650
|
customReturnPath?: string;
|
|
634
|
-
capability?: 'send' | 'receive' | 'send-and-receive';
|
|
635
651
|
}
|
|
636
652
|
interface CreateDomainRequestOptions extends PostOptions {
|
|
637
653
|
}
|
|
638
|
-
interface CreateDomainResponseSuccess extends Pick<Domain, 'name' | 'id' | 'status' | 'created_at' | 'region'
|
|
654
|
+
interface CreateDomainResponseSuccess extends Pick<Domain, 'name' | 'id' | 'status' | 'created_at' | 'region'> {
|
|
639
655
|
records: DomainRecords[];
|
|
640
656
|
}
|
|
641
657
|
type CreateDomainResponse = Response<CreateDomainResponseSuccess>;
|
|
642
658
|
|
|
643
|
-
interface GetDomainResponseSuccess extends Pick<Domain, 'id' | 'name' | 'created_at' | 'region' | 'status'
|
|
659
|
+
interface GetDomainResponseSuccess extends Pick<Domain, 'id' | 'name' | 'created_at' | 'region' | 'status'> {
|
|
644
660
|
object: 'domain';
|
|
645
661
|
records: DomainRecords[];
|
|
646
662
|
}
|
package/dist/index.js
CHANGED
|
@@ -64,7 +64,7 @@ __export(index_exports, {
|
|
|
64
64
|
module.exports = __toCommonJS(index_exports);
|
|
65
65
|
|
|
66
66
|
// package.json
|
|
67
|
-
var version = "6.4.0
|
|
67
|
+
var version = "6.4.0";
|
|
68
68
|
|
|
69
69
|
// src/common/utils/build-pagination-query.ts
|
|
70
70
|
function buildPaginationQuery(options) {
|
|
@@ -491,7 +491,8 @@ var Contacts = class {
|
|
|
491
491
|
unsubscribed: payload.unsubscribed,
|
|
492
492
|
email: payload.email,
|
|
493
493
|
first_name: payload.firstName,
|
|
494
|
-
last_name: payload.lastName
|
|
494
|
+
last_name: payload.lastName,
|
|
495
|
+
properties: payload.properties
|
|
495
496
|
},
|
|
496
497
|
options
|
|
497
498
|
);
|
|
@@ -564,7 +565,8 @@ var Contacts = class {
|
|
|
564
565
|
{
|
|
565
566
|
unsubscribed: options.unsubscribed,
|
|
566
567
|
first_name: options.firstName,
|
|
567
|
-
last_name: options.lastName
|
|
568
|
+
last_name: options.lastName,
|
|
569
|
+
properties: options.properties
|
|
568
570
|
}
|
|
569
571
|
);
|
|
570
572
|
return data2;
|
|
@@ -612,7 +614,6 @@ function parseDomainToApiOptions(domain) {
|
|
|
612
614
|
return {
|
|
613
615
|
name: domain.name,
|
|
614
616
|
region: domain.region,
|
|
615
|
-
capability: domain.capability,
|
|
616
617
|
custom_return_path: domain.customReturnPath
|
|
617
618
|
};
|
|
618
619
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -31,7 +31,7 @@ var __objRest = (source, exclude) => {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
// package.json
|
|
34
|
-
var version = "6.4.0
|
|
34
|
+
var version = "6.4.0";
|
|
35
35
|
|
|
36
36
|
// src/common/utils/build-pagination-query.ts
|
|
37
37
|
function buildPaginationQuery(options) {
|
|
@@ -458,7 +458,8 @@ var Contacts = class {
|
|
|
458
458
|
unsubscribed: payload.unsubscribed,
|
|
459
459
|
email: payload.email,
|
|
460
460
|
first_name: payload.firstName,
|
|
461
|
-
last_name: payload.lastName
|
|
461
|
+
last_name: payload.lastName,
|
|
462
|
+
properties: payload.properties
|
|
462
463
|
},
|
|
463
464
|
options
|
|
464
465
|
);
|
|
@@ -531,7 +532,8 @@ var Contacts = class {
|
|
|
531
532
|
{
|
|
532
533
|
unsubscribed: options.unsubscribed,
|
|
533
534
|
first_name: options.firstName,
|
|
534
|
-
last_name: options.lastName
|
|
535
|
+
last_name: options.lastName,
|
|
536
|
+
properties: options.properties
|
|
535
537
|
}
|
|
536
538
|
);
|
|
537
539
|
return data2;
|
|
@@ -579,7 +581,6 @@ function parseDomainToApiOptions(domain) {
|
|
|
579
581
|
return {
|
|
580
582
|
name: domain.name,
|
|
581
583
|
region: domain.region,
|
|
582
|
-
capability: domain.capability,
|
|
583
584
|
custom_return_path: domain.customReturnPath
|
|
584
585
|
};
|
|
585
586
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "resend",
|
|
3
|
-
"version": "6.4.0
|
|
3
|
+
"version": "6.4.0",
|
|
4
4
|
"description": "Node.js library for the Resend API",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -23,6 +23,19 @@
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "tsup src/index.ts --format esm,cjs --dts",
|
|
28
|
+
"format": "biome format --write .",
|
|
29
|
+
"format:apply": "biome check --write .",
|
|
30
|
+
"format:check": "biome format .",
|
|
31
|
+
"lint": "biome check .",
|
|
32
|
+
"prepublishOnly": "pnpm run build",
|
|
33
|
+
"test": "vitest run",
|
|
34
|
+
"test:watch": "vitest",
|
|
35
|
+
"typecheck": "tsc --noEmit",
|
|
36
|
+
"test:record": "rimraf --glob \"**/__recordings__\" && cross-env TEST_MODE=record vitest run",
|
|
37
|
+
"test:dev": "cross-env TEST_MODE=dev vitest run"
|
|
38
|
+
},
|
|
26
39
|
"repository": {
|
|
27
40
|
"type": "git",
|
|
28
41
|
"url": "git+https://github.com/resend/resend-node.git"
|
|
@@ -60,16 +73,5 @@
|
|
|
60
73
|
"vitest": "3.2.4",
|
|
61
74
|
"vitest-fetch-mock": "0.4.5"
|
|
62
75
|
},
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
"format": "biome format --write .",
|
|
66
|
-
"format:apply": "biome check --write .",
|
|
67
|
-
"format:check": "biome format .",
|
|
68
|
-
"lint": "biome check .",
|
|
69
|
-
"test": "vitest run",
|
|
70
|
-
"test:watch": "vitest",
|
|
71
|
-
"typecheck": "tsc --noEmit",
|
|
72
|
-
"test:record": "rimraf --glob \"**/__recordings__\" && cross-env TEST_MODE=record vitest run",
|
|
73
|
-
"test:dev": "cross-env TEST_MODE=dev vitest run"
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
+
"packageManager": "pnpm@10.18.2"
|
|
77
|
+
}
|