resend 6.4.0 → 6.4.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/dist/index.d.mts CHANGED
@@ -841,7 +841,6 @@ type NumberBaseContactProperty = {
841
841
  };
842
842
  type ContactProperty = {
843
843
  id: string;
844
- object: 'contact_property';
845
844
  createdAt: string;
846
845
  key: string;
847
846
  } & (StringBaseContactProperty | NumberBaseContactProperty);
@@ -857,15 +856,20 @@ type NumberBaseContactPropertyOptions = {
857
856
  type CreateContactPropertyOptions = {
858
857
  key: string;
859
858
  } & (StringBaseContactPropertyOptions | NumberBaseContactPropertyOptions);
860
- type CreateContactPropertyResponseSuccess = Pick<ContactProperty, 'id' | 'object'>;
859
+ type CreateContactPropertyResponseSuccess = Pick<ContactProperty, 'id'> & {
860
+ object: 'contact_property';
861
+ };
861
862
  type CreateContactPropertyResponse = Response<CreateContactPropertyResponseSuccess>;
862
863
 
863
- type RemoveContactPropertyResponseSuccess = Pick<ContactProperty, 'id' | 'object'> & {
864
+ type RemoveContactPropertyResponseSuccess = Pick<ContactProperty, 'id'> & {
865
+ object: 'contact_property';
864
866
  deleted: boolean;
865
867
  };
866
868
  type RemoveContactPropertyResponse = Response<RemoveContactPropertyResponseSuccess>;
867
869
 
868
- type GetContactPropertyResponse = Response<ContactProperty>;
870
+ type GetContactPropertyResponse = Response<ContactProperty & {
871
+ object: 'contact_property';
872
+ }>;
869
873
 
870
874
  type ListContactPropertiesOptions = PaginationOptions;
871
875
  type ListContactPropertiesResponse = Response<{
@@ -878,7 +882,9 @@ type UpdateContactPropertyOptions = {
878
882
  id: string;
879
883
  fallbackValue?: string | number | null;
880
884
  };
881
- type UpdateContactPropertyResponseSuccess = Pick<ContactProperty, 'id' | 'object'>;
885
+ type UpdateContactPropertyResponseSuccess = Pick<ContactProperty, 'id'> & {
886
+ object: 'contact_property';
887
+ };
882
888
  type UpdateContactPropertyResponse = Response<UpdateContactPropertyResponseSuccess>;
883
889
 
884
890
  declare class ContactProperties {
package/dist/index.d.ts CHANGED
@@ -841,7 +841,6 @@ type NumberBaseContactProperty = {
841
841
  };
842
842
  type ContactProperty = {
843
843
  id: string;
844
- object: 'contact_property';
845
844
  createdAt: string;
846
845
  key: string;
847
846
  } & (StringBaseContactProperty | NumberBaseContactProperty);
@@ -857,15 +856,20 @@ type NumberBaseContactPropertyOptions = {
857
856
  type CreateContactPropertyOptions = {
858
857
  key: string;
859
858
  } & (StringBaseContactPropertyOptions | NumberBaseContactPropertyOptions);
860
- type CreateContactPropertyResponseSuccess = Pick<ContactProperty, 'id' | 'object'>;
859
+ type CreateContactPropertyResponseSuccess = Pick<ContactProperty, 'id'> & {
860
+ object: 'contact_property';
861
+ };
861
862
  type CreateContactPropertyResponse = Response<CreateContactPropertyResponseSuccess>;
862
863
 
863
- type RemoveContactPropertyResponseSuccess = Pick<ContactProperty, 'id' | 'object'> & {
864
+ type RemoveContactPropertyResponseSuccess = Pick<ContactProperty, 'id'> & {
865
+ object: 'contact_property';
864
866
  deleted: boolean;
865
867
  };
866
868
  type RemoveContactPropertyResponse = Response<RemoveContactPropertyResponseSuccess>;
867
869
 
868
- type GetContactPropertyResponse = Response<ContactProperty>;
870
+ type GetContactPropertyResponse = Response<ContactProperty & {
871
+ object: 'contact_property';
872
+ }>;
869
873
 
870
874
  type ListContactPropertiesOptions = PaginationOptions;
871
875
  type ListContactPropertiesResponse = Response<{
@@ -878,7 +882,9 @@ type UpdateContactPropertyOptions = {
878
882
  id: string;
879
883
  fallbackValue?: string | number | null;
880
884
  };
881
- type UpdateContactPropertyResponseSuccess = Pick<ContactProperty, 'id' | 'object'>;
885
+ type UpdateContactPropertyResponseSuccess = Pick<ContactProperty, 'id'> & {
886
+ object: 'contact_property';
887
+ };
882
888
  type UpdateContactPropertyResponse = Response<UpdateContactPropertyResponseSuccess>;
883
889
 
884
890
  declare class ContactProperties {
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.1";
68
68
 
69
69
  // src/common/utils/build-pagination-query.ts
70
70
  function buildPaginationQuery(options) {
@@ -264,7 +264,6 @@ function parseContactPropertyFromApi(contactProperty) {
264
264
  return {
265
265
  id: contactProperty.id,
266
266
  key: contactProperty.key,
267
- object: contactProperty.object,
268
267
  createdAt: contactProperty.created_at,
269
268
  type: contactProperty.type,
270
269
  fallbackValue: contactProperty.fallback_value
@@ -330,7 +329,9 @@ var ContactProperties = class {
330
329
  );
331
330
  if (response.data) {
332
331
  return {
333
- data: parseContactPropertyFromApi(response.data),
332
+ data: __spreadValues({
333
+ object: "contact_property"
334
+ }, parseContactPropertyFromApi(response.data)),
334
335
  headers: response.headers,
335
336
  error: null
336
337
  };
@@ -504,7 +505,8 @@ var Contacts = class {
504
505
  unsubscribed: payload.unsubscribed,
505
506
  email: payload.email,
506
507
  first_name: payload.firstName,
507
- last_name: payload.lastName
508
+ last_name: payload.lastName,
509
+ properties: payload.properties
508
510
  },
509
511
  options
510
512
  );
@@ -576,7 +578,8 @@ var Contacts = class {
576
578
  {
577
579
  unsubscribed: options.unsubscribed,
578
580
  first_name: options.firstName,
579
- last_name: options.lastName
581
+ last_name: options.lastName,
582
+ properties: options.properties
580
583
  }
581
584
  );
582
585
  return data;
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.1";
35
35
 
36
36
  // src/common/utils/build-pagination-query.ts
37
37
  function buildPaginationQuery(options) {
@@ -231,7 +231,6 @@ function parseContactPropertyFromApi(contactProperty) {
231
231
  return {
232
232
  id: contactProperty.id,
233
233
  key: contactProperty.key,
234
- object: contactProperty.object,
235
234
  createdAt: contactProperty.created_at,
236
235
  type: contactProperty.type,
237
236
  fallbackValue: contactProperty.fallback_value
@@ -297,7 +296,9 @@ var ContactProperties = class {
297
296
  );
298
297
  if (response.data) {
299
298
  return {
300
- data: parseContactPropertyFromApi(response.data),
299
+ data: __spreadValues({
300
+ object: "contact_property"
301
+ }, parseContactPropertyFromApi(response.data)),
301
302
  headers: response.headers,
302
303
  error: null
303
304
  };
@@ -471,7 +472,8 @@ var Contacts = class {
471
472
  unsubscribed: payload.unsubscribed,
472
473
  email: payload.email,
473
474
  first_name: payload.firstName,
474
- last_name: payload.lastName
475
+ last_name: payload.lastName,
476
+ properties: payload.properties
475
477
  },
476
478
  options
477
479
  );
@@ -543,7 +545,8 @@ var Contacts = class {
543
545
  {
544
546
  unsubscribed: options.unsubscribed,
545
547
  first_name: options.firstName,
546
- last_name: options.lastName
548
+ last_name: options.lastName,
549
+ properties: options.properties
547
550
  }
548
551
  );
549
552
  return data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resend",
3
- "version": "6.4.0",
3
+ "version": "6.4.1",
4
4
  "description": "Node.js library for the Resend API",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",