resend 6.5.1 → 6.5.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  let svix = require("svix");
2
2
 
3
3
  //#region package.json
4
- var version = "6.5.1";
4
+ var version = "6.5.2";
5
5
 
6
6
  //#endregion
7
7
  //#region src/common/utils/build-pagination-query.ts
package/dist/index.d.cts CHANGED
@@ -66,26 +66,7 @@ interface DomainApiOptions {
66
66
  }
67
67
  //#endregion
68
68
  //#region src/interfaces.d.ts
69
- declare const RESEND_ERROR_CODES_BY_KEY: {
70
- readonly missing_required_field: 422;
71
- readonly invalid_idempotency_key: 400;
72
- readonly invalid_idempotent_request: 409;
73
- readonly concurrent_idempotent_requests: 409;
74
- readonly invalid_access: 422;
75
- readonly invalid_parameter: 422;
76
- readonly invalid_region: 422;
77
- readonly rate_limit_exceeded: 429;
78
- readonly missing_api_key: 401;
79
- readonly invalid_api_key: 403;
80
- readonly suspended_api_key: 403;
81
- readonly invalid_from_address: 403;
82
- readonly validation_error: 403;
83
- readonly not_found: 404;
84
- readonly method_not_allowed: 405;
85
- readonly application_error: 500;
86
- readonly internal_server_error: 500;
87
- };
88
- type RESEND_ERROR_CODE_KEY = keyof typeof RESEND_ERROR_CODES_BY_KEY;
69
+ type RESEND_ERROR_CODE_KEY = 'missing_required_field' | 'invalid_idempotency_key' | 'invalid_idempotent_request' | 'concurrent_idempotent_requests' | 'invalid_access' | 'invalid_parameter' | 'invalid_region' | 'rate_limit_exceeded' | 'missing_api_key' | 'invalid_api_key' | 'suspended_api_key' | 'invalid_from_address' | 'validation_error' | 'not_found' | 'method_not_allowed' | 'application_error' | 'internal_server_error';
89
70
  type Response<T> = ({
90
71
  data: T;
91
72
  error: null;
@@ -563,8 +544,8 @@ interface Contact {
563
544
  created_at: string;
564
545
  id: string;
565
546
  email: string;
566
- first_name?: string;
567
- last_name?: string;
547
+ first_name: string | null;
548
+ last_name: string | null;
568
549
  unsubscribed: boolean;
569
550
  }
570
551
  type SelectingField = {
@@ -666,8 +647,14 @@ interface UpdateContactPropertiesOptions {
666
647
  type UpdateContactOptions = {
667
648
  audienceId?: string;
668
649
  unsubscribed?: boolean;
669
- firstName?: string;
670
- lastName?: string;
650
+ /**
651
+ * Use `null` to clear the `firstName`
652
+ */
653
+ firstName?: string | null;
654
+ /**
655
+ * Use `null` to clear the `lastName`
656
+ */
657
+ lastName?: string | null;
671
658
  properties?: UpdateContactPropertiesOptions;
672
659
  } & SelectingField;
673
660
  type UpdateContactResponseSuccess = Pick<Contact, 'id'> & {
package/dist/index.d.mts CHANGED
@@ -66,26 +66,7 @@ interface DomainApiOptions {
66
66
  }
67
67
  //#endregion
68
68
  //#region src/interfaces.d.ts
69
- declare const RESEND_ERROR_CODES_BY_KEY: {
70
- readonly missing_required_field: 422;
71
- readonly invalid_idempotency_key: 400;
72
- readonly invalid_idempotent_request: 409;
73
- readonly concurrent_idempotent_requests: 409;
74
- readonly invalid_access: 422;
75
- readonly invalid_parameter: 422;
76
- readonly invalid_region: 422;
77
- readonly rate_limit_exceeded: 429;
78
- readonly missing_api_key: 401;
79
- readonly invalid_api_key: 403;
80
- readonly suspended_api_key: 403;
81
- readonly invalid_from_address: 403;
82
- readonly validation_error: 403;
83
- readonly not_found: 404;
84
- readonly method_not_allowed: 405;
85
- readonly application_error: 500;
86
- readonly internal_server_error: 500;
87
- };
88
- type RESEND_ERROR_CODE_KEY = keyof typeof RESEND_ERROR_CODES_BY_KEY;
69
+ type RESEND_ERROR_CODE_KEY = 'missing_required_field' | 'invalid_idempotency_key' | 'invalid_idempotent_request' | 'concurrent_idempotent_requests' | 'invalid_access' | 'invalid_parameter' | 'invalid_region' | 'rate_limit_exceeded' | 'missing_api_key' | 'invalid_api_key' | 'suspended_api_key' | 'invalid_from_address' | 'validation_error' | 'not_found' | 'method_not_allowed' | 'application_error' | 'internal_server_error';
89
70
  type Response<T> = ({
90
71
  data: T;
91
72
  error: null;
@@ -563,8 +544,8 @@ interface Contact {
563
544
  created_at: string;
564
545
  id: string;
565
546
  email: string;
566
- first_name?: string;
567
- last_name?: string;
547
+ first_name: string | null;
548
+ last_name: string | null;
568
549
  unsubscribed: boolean;
569
550
  }
570
551
  type SelectingField = {
@@ -666,8 +647,14 @@ interface UpdateContactPropertiesOptions {
666
647
  type UpdateContactOptions = {
667
648
  audienceId?: string;
668
649
  unsubscribed?: boolean;
669
- firstName?: string;
670
- lastName?: string;
650
+ /**
651
+ * Use `null` to clear the `firstName`
652
+ */
653
+ firstName?: string | null;
654
+ /**
655
+ * Use `null` to clear the `lastName`
656
+ */
657
+ lastName?: string | null;
671
658
  properties?: UpdateContactPropertiesOptions;
672
659
  } & SelectingField;
673
660
  type UpdateContactResponseSuccess = Pick<Contact, 'id'> & {
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Webhook } from "svix";
2
2
 
3
3
  //#region package.json
4
- var version = "6.5.1";
4
+ var version = "6.5.2";
5
5
 
6
6
  //#endregion
7
7
  //#region src/common/utils/build-pagination-query.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resend",
3
- "version": "6.5.1",
3
+ "version": "6.5.2",
4
4
  "description": "Node.js library for the Resend API",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",