pipedrive 33.4.3 → 33.6.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.
Files changed (59) hide show
  1. package/dist/esm/versions/v1/api/deals-api.d.ts +10 -2
  2. package/dist/esm/versions/v1/api/deals-api.js +10 -5
  3. package/dist/esm/versions/v1/api/organizations-api.d.ts +10 -2
  4. package/dist/esm/versions/v1/api/organizations-api.js +10 -5
  5. package/dist/esm/versions/v1/api/persons-api.d.ts +10 -2
  6. package/dist/esm/versions/v1/api/persons-api.js +10 -5
  7. package/dist/esm/versions/v1/common.d.ts +1 -1
  8. package/dist/esm/versions/v1/common.js +2 -0
  9. package/dist/esm/versions/v1/models/mail-message-data.d.ts +5 -0
  10. package/dist/esm/versions/v2/api/persons-api.d.ts +15 -14
  11. package/dist/esm/versions/v2/api/persons-api.js +16 -16
  12. package/dist/esm/versions/v2/common.d.ts +1 -1
  13. package/dist/esm/versions/v2/common.js +2 -0
  14. package/dist/esm/versions/v2/models/add-organization-request.d.ts +26 -6
  15. package/dist/esm/versions/v2/models/add-person-request.d.ts +33 -11
  16. package/dist/esm/versions/v2/models/index.d.ts +5 -4
  17. package/dist/esm/versions/v2/models/index.js +5 -4
  18. package/dist/esm/versions/v2/models/{person-postal-address.d.ts → person-item-address.d.ts} +2 -2
  19. package/dist/esm/versions/v2/models/{add-person-request-emails-inner.d.ts → person-item-email.d.ts} +2 -2
  20. package/dist/{versions/v2/models/person-im-inner.d.ts → esm/versions/v2/models/person-item-im.d.ts} +2 -2
  21. package/dist/{versions/v2/models/add-person-request-phones-inner.d.ts → esm/versions/v2/models/person-item-phone.d.ts} +2 -2
  22. package/dist/esm/versions/v2/models/person.d.ts +12 -12
  23. package/dist/esm/versions/v2/models/update-organization-request.d.ts +25 -10
  24. package/dist/esm/versions/v2/models/update-person-request.d.ts +101 -0
  25. package/dist/esm/versions/v2/models/update-person-request.js +19 -0
  26. package/dist/versions/v1/api/deals-api.d.ts +10 -2
  27. package/dist/versions/v1/api/deals-api.js +10 -5
  28. package/dist/versions/v1/api/organizations-api.d.ts +10 -2
  29. package/dist/versions/v1/api/organizations-api.js +10 -5
  30. package/dist/versions/v1/api/persons-api.d.ts +10 -2
  31. package/dist/versions/v1/api/persons-api.js +10 -5
  32. package/dist/versions/v1/common.d.ts +1 -1
  33. package/dist/versions/v1/common.js +2 -0
  34. package/dist/versions/v1/models/mail-message-data.d.ts +5 -0
  35. package/dist/versions/v2/api/persons-api.d.ts +15 -14
  36. package/dist/versions/v2/api/persons-api.js +16 -16
  37. package/dist/versions/v2/common.d.ts +1 -1
  38. package/dist/versions/v2/common.js +2 -0
  39. package/dist/versions/v2/models/add-organization-request.d.ts +26 -6
  40. package/dist/versions/v2/models/add-person-request.d.ts +33 -11
  41. package/dist/versions/v2/models/index.d.ts +5 -4
  42. package/dist/versions/v2/models/index.js +5 -4
  43. package/dist/versions/v2/models/{person-postal-address.d.ts → person-item-address.d.ts} +2 -2
  44. package/dist/versions/v2/models/{add-person-request-emails-inner.d.ts → person-item-email.d.ts} +2 -2
  45. package/dist/{esm/versions/v2/models/person-im-inner.d.ts → versions/v2/models/person-item-im.d.ts} +2 -2
  46. package/dist/{esm/versions/v2/models/add-person-request-phones-inner.d.ts → versions/v2/models/person-item-phone.d.ts} +2 -2
  47. package/dist/versions/v2/models/person.d.ts +12 -12
  48. package/dist/versions/v2/models/update-organization-request.d.ts +25 -10
  49. package/dist/versions/v2/models/update-person-request.d.ts +101 -0
  50. package/dist/versions/v2/models/update-person-request.js +22 -0
  51. package/package.json +1 -1
  52. /package/dist/esm/versions/v2/models/{add-person-request-emails-inner.js → person-item-address.js} +0 -0
  53. /package/dist/esm/versions/v2/models/{add-person-request-phones-inner.js → person-item-email.js} +0 -0
  54. /package/dist/esm/versions/v2/models/{person-im-inner.js → person-item-im.js} +0 -0
  55. /package/dist/esm/versions/v2/models/{person-postal-address.js → person-item-phone.js} +0 -0
  56. /package/dist/versions/v2/models/{add-person-request-emails-inner.js → person-item-address.js} +0 -0
  57. /package/dist/versions/v2/models/{add-person-request-phones-inner.js → person-item-email.js} +0 -0
  58. /package/dist/versions/v2/models/{person-im-inner.js → person-item-im.js} +0 -0
  59. /package/dist/versions/v2/models/{person-postal-address.js → person-item-phone.js} +0 -0
@@ -334,10 +334,11 @@ const PersonsApiAxiosParamCreator = function (configuration) {
334
334
  * @param {number} id The ID of the person
335
335
  * @param {number} [start] Pagination start
336
336
  * @param {number} [limit] Items shown per page
337
+ * @param {0 | 1} [include_body] Whether to include the mail message body content in the response. `0` = Don\'t include, `1` = Include.
337
338
 
338
339
  * @throws {RequiredError}
339
340
  */
340
- getPersonMailMessages: (id, start, limit) => __awaiter(this, void 0, void 0, function* () {
341
+ getPersonMailMessages: (id, start, limit, include_body) => __awaiter(this, void 0, void 0, function* () {
341
342
  // verify required parameter 'id' is not null or undefined
342
343
  (0, common_1.assertParamExists)('getPersonMailMessages', 'id', id);
343
344
  const localVarPath = `/persons/{id}/mailMessages`
@@ -362,6 +363,9 @@ const PersonsApiAxiosParamCreator = function (configuration) {
362
363
  if (limit !== undefined) {
363
364
  localVarQueryParameter['limit'] = limit;
364
365
  }
366
+ if (include_body !== undefined) {
367
+ localVarQueryParameter['include_body'] = include_body;
368
+ }
365
369
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
366
370
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
367
371
  localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
@@ -652,12 +656,13 @@ const PersonsApiFp = function (configuration) {
652
656
  * @param {number} id The ID of the person
653
657
  * @param {number} [start] Pagination start
654
658
  * @param {number} [limit] Items shown per page
659
+ * @param {0 | 1} [include_body] Whether to include the mail message body content in the response. `0` = Don\'t include, `1` = Include.
655
660
 
656
661
  * @throws {RequiredError}
657
662
  */
658
- getPersonMailMessages(id, start, limit) {
663
+ getPersonMailMessages(id, start, limit, include_body) {
659
664
  return __awaiter(this, void 0, void 0, function* () {
660
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getPersonMailMessages(id, start, limit);
665
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getPersonMailMessages(id, start, limit, include_body);
661
666
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
662
667
  });
663
668
  },
@@ -808,7 +813,7 @@ const PersonsApiFactory = function (configuration, basePath, axios) {
808
813
  * @throws {RequiredError}
809
814
  */
810
815
  getPersonMailMessages(requestParameters) {
811
- return localVarFp.getPersonMailMessages(requestParameters.id, requestParameters.start, requestParameters.limit).then((request) => request(axios, basePath));
816
+ return localVarFp.getPersonMailMessages(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.include_body).then((request) => request(axios, basePath));
812
817
  },
813
818
  /**
814
819
  * Lists products associated with a person.
@@ -946,7 +951,7 @@ class PersonsApi extends base_1.BaseAPI {
946
951
  * @memberof PersonsApi
947
952
  */
948
953
  getPersonMailMessages(requestParameters) {
949
- return (0, exports.PersonsApiFp)(this.configuration).getPersonMailMessages(requestParameters.id, requestParameters.start, requestParameters.limit).then((request) => request(this.axios, this.basePath));
954
+ return (0, exports.PersonsApiFp)(this.configuration).getPersonMailMessages(requestParameters.id, requestParameters.start, requestParameters.limit, requestParameters.include_body).then((request) => request(this.axios, this.basePath));
950
955
  }
951
956
  /**
952
957
  * Lists products associated with a person.
@@ -11,7 +11,7 @@
11
11
  */
12
12
  import { Configuration } from "./configuration";
13
13
  import { RequestArgs } from "./base";
14
- import { AxiosInstance, AxiosResponse } from 'axios';
14
+ import type { AxiosInstance, AxiosResponse } from 'axios';
15
15
  /**
16
16
  *
17
17
  * @export
@@ -150,6 +150,8 @@ exports.toPathString = toPathString;
150
150
  * @export
151
151
  */
152
152
  const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
153
+ // Explicit return type + cast avoid inferring axios's internal AxiosResponseResult type,
154
+ // which references a module-private `unique symbol` and breaks `tsc --declaration` (TS2742).
153
155
  return (axios = globalAxios, basePath = BASE_PATH) => {
154
156
  const axiosRequestArgs = Object.assign(Object.assign({}, axiosArgs.options), { url: ((configuration === null || configuration === void 0 ? void 0 : configuration.basePath) || basePath) + axiosArgs.url });
155
157
  return axios.request(axiosRequestArgs);
@@ -47,6 +47,11 @@ export interface MailMessageData {
47
47
  */
48
48
  'body_url'?: string;
49
49
  /**
50
+ * The mail message body content. Only present when `include_body=1` is passed.
51
+ * @type {string}
52
+ */
53
+ 'body'?: string;
54
+ /**
50
55
  * The connection account ID
51
56
  * @type {string}
52
57
  */
@@ -22,6 +22,7 @@ import { GetFollowersResponse } from '../models';
22
22
  import { GetPersonPictureResponse } from '../models';
23
23
  import { GetPersonSearchResponse } from '../models';
24
24
  import { GetPersonsResponse } from '../models';
25
+ import { UpdatePersonRequest } from '../models';
25
26
  import { UpsertPersonResponse } from '../models';
26
27
  /**
27
28
  * PersonsApi - axios parameter creator
@@ -29,7 +30,7 @@ import { UpsertPersonResponse } from '../models';
29
30
  */
30
31
  export declare const PersonsApiAxiosParamCreator: (configuration?: Configuration) => {
31
32
  /**
32
- * Adds a new person. If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
33
+ * Adds a new person. <br>If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. <br>The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync.
33
34
  * @summary Add a new person
34
35
  * @param {AddPersonRequest} [AddPersonRequest]
35
36
 
@@ -139,14 +140,14 @@ export declare const PersonsApiAxiosParamCreator: (configuration?: Configuration
139
140
  */
140
141
  searchPersons: (term: string, fields?: 'custom_fields' | 'email' | 'notes' | 'phone' | 'name', exact_match?: boolean, organization_id?: number, include_fields?: 'person.picture', limit?: number, cursor?: string) => Promise<RequestArgs>;
141
142
  /**
142
- * Updates the properties of a person. <br>If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
143
+ * Updates the properties of a person. <br>If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. <br>The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync.
143
144
  * @summary Update a person
144
145
  * @param {number} id The ID of the person
145
- * @param {AddPersonRequest} [AddPersonRequest]
146
+ * @param {UpdatePersonRequest} [UpdatePersonRequest]
146
147
 
147
148
  * @throws {RequiredError}
148
149
  */
149
- updatePerson: (id: number, AddPersonRequest?: AddPersonRequest) => Promise<RequestArgs>;
150
+ updatePerson: (id: number, UpdatePersonRequest?: UpdatePersonRequest) => Promise<RequestArgs>;
150
151
  };
151
152
  /**
152
153
  * PersonsApi - functional programming interface
@@ -154,7 +155,7 @@ export declare const PersonsApiAxiosParamCreator: (configuration?: Configuration
154
155
  */
155
156
  export declare const PersonsApiFp: (configuration?: Configuration) => {
156
157
  /**
157
- * Adds a new person. If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
158
+ * Adds a new person. <br>If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. <br>The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync.
158
159
  * @summary Add a new person
159
160
  * @param {AddPersonRequest} [AddPersonRequest]
160
161
 
@@ -264,14 +265,14 @@ export declare const PersonsApiFp: (configuration?: Configuration) => {
264
265
  */
265
266
  searchPersons(term: string, fields?: 'custom_fields' | 'email' | 'notes' | 'phone' | 'name', exact_match?: boolean, organization_id?: number, include_fields?: 'person.picture', limit?: number, cursor?: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetPersonSearchResponse>>;
266
267
  /**
267
- * Updates the properties of a person. <br>If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
268
+ * Updates the properties of a person. <br>If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. <br>The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync.
268
269
  * @summary Update a person
269
270
  * @param {number} id The ID of the person
270
- * @param {AddPersonRequest} [AddPersonRequest]
271
+ * @param {UpdatePersonRequest} [UpdatePersonRequest]
271
272
 
272
273
  * @throws {RequiredError}
273
274
  */
274
- updatePerson(id: number, AddPersonRequest?: AddPersonRequest): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<UpsertPersonResponse>>;
275
+ updatePerson(id: number, UpdatePersonRequest?: UpdatePersonRequest): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<UpsertPersonResponse>>;
275
276
  };
276
277
  /**
277
278
  * PersonsApi - factory interface
@@ -279,7 +280,7 @@ export declare const PersonsApiFp: (configuration?: Configuration) => {
279
280
  */
280
281
  export declare const PersonsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
281
282
  /**
282
- * Adds a new person. If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
283
+ * Adds a new person. <br>If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. <br>The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync.
283
284
  * @summary Add a new person
284
285
  * @param {PersonsApiAddPersonRequest} requestParameters Request parameters.
285
286
 
@@ -359,7 +360,7 @@ export declare const PersonsApiFactory: (configuration?: Configuration, basePath
359
360
  */
360
361
  searchPersons(requestParameters: PersonsApiSearchPersonsRequest): Promise<GetPersonSearchResponse>;
361
362
  /**
362
- * Updates the properties of a person. <br>If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
363
+ * Updates the properties of a person. <br>If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. <br>The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync.
363
364
  * @summary Update a person
364
365
  * @param {PersonsApiUpdatePersonRequest} requestParameters Request parameters.
365
366
 
@@ -691,10 +692,10 @@ export interface PersonsApiUpdatePersonRequest {
691
692
  readonly id: number;
692
693
  /**
693
694
  *
694
- * @type {AddPersonRequest}
695
+ * @type {UpdatePersonRequest}
695
696
  * @memberof PersonsApiUpdatePerson
696
697
  */
697
- readonly AddPersonRequest?: AddPersonRequest;
698
+ readonly UpdatePersonRequest?: UpdatePersonRequest;
698
699
  }
699
700
  /**
700
701
  * PersonsApi - object-oriented interface
@@ -704,7 +705,7 @@ export interface PersonsApiUpdatePersonRequest {
704
705
  */
705
706
  export declare class PersonsApi extends BaseAPI {
706
707
  /**
707
- * Adds a new person. If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
708
+ * Adds a new person. <br>If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. <br>The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync.
708
709
  * @summary Add a new person
709
710
  * @param {PersonsApiAddPersonRequest} requestParameters Request parameters.
710
711
 
@@ -794,7 +795,7 @@ export declare class PersonsApi extends BaseAPI {
794
795
  */
795
796
  searchPersons(requestParameters: PersonsApiSearchPersonsRequest): Promise<GetPersonSearchResponse>;
796
797
  /**
797
- * Updates the properties of a person. <br>If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
798
+ * Updates the properties of a person. <br>If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. <br>The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync.
798
799
  * @summary Update a person
799
800
  * @param {PersonsApiUpdatePersonRequest} requestParameters Request parameters.
800
801
 
@@ -39,7 +39,7 @@ const base_1 = require("../base");
39
39
  const PersonsApiAxiosParamCreator = function (configuration) {
40
40
  return {
41
41
  /**
42
- * Adds a new person. If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
42
+ * Adds a new person. <br>If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. <br>The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync.
43
43
  * @summary Add a new person
44
44
  * @param {AddPersonRequest} [AddPersonRequest]
45
45
 
@@ -499,14 +499,14 @@ const PersonsApiAxiosParamCreator = function (configuration) {
499
499
  };
500
500
  }),
501
501
  /**
502
- * Updates the properties of a person. <br>If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
502
+ * Updates the properties of a person. <br>If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. <br>The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync.
503
503
  * @summary Update a person
504
504
  * @param {number} id The ID of the person
505
- * @param {AddPersonRequest} [AddPersonRequest]
505
+ * @param {UpdatePersonRequest} [UpdatePersonRequest]
506
506
 
507
507
  * @throws {RequiredError}
508
508
  */
509
- updatePerson: (id, AddPersonRequest) => __awaiter(this, void 0, void 0, function* () {
509
+ updatePerson: (id, UpdatePersonRequest) => __awaiter(this, void 0, void 0, function* () {
510
510
  // verify required parameter 'id' is not null or undefined
511
511
  (0, common_1.assertParamExists)('updatePerson', 'id', id);
512
512
  const localVarPath = `/persons/{id}`
@@ -529,7 +529,7 @@ const PersonsApiAxiosParamCreator = function (configuration) {
529
529
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
530
530
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
531
531
  localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
532
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(AddPersonRequest, localVarRequestOptions, configuration);
532
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(UpdatePersonRequest, localVarRequestOptions, configuration);
533
533
  return {
534
534
  url: (0, common_1.toPathString)(localVarUrlObj),
535
535
  options: localVarRequestOptions,
@@ -546,7 +546,7 @@ const PersonsApiFp = function (configuration) {
546
546
  const localVarAxiosParamCreator = (0, exports.PersonsApiAxiosParamCreator)(configuration);
547
547
  return {
548
548
  /**
549
- * Adds a new person. If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
549
+ * Adds a new person. <br>If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. <br>The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync.
550
550
  * @summary Add a new person
551
551
  * @param {AddPersonRequest} [AddPersonRequest]
552
552
 
@@ -706,16 +706,16 @@ const PersonsApiFp = function (configuration) {
706
706
  });
707
707
  },
708
708
  /**
709
- * Updates the properties of a person. <br>If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
709
+ * Updates the properties of a person. <br>If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. <br>The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync.
710
710
  * @summary Update a person
711
711
  * @param {number} id The ID of the person
712
- * @param {AddPersonRequest} [AddPersonRequest]
712
+ * @param {UpdatePersonRequest} [UpdatePersonRequest]
713
713
 
714
714
  * @throws {RequiredError}
715
715
  */
716
- updatePerson(id, AddPersonRequest) {
716
+ updatePerson(id, UpdatePersonRequest) {
717
717
  return __awaiter(this, void 0, void 0, function* () {
718
- const localVarAxiosArgs = yield localVarAxiosParamCreator.updatePerson(id, AddPersonRequest);
718
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updatePerson(id, UpdatePersonRequest);
719
719
  return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
720
720
  });
721
721
  },
@@ -730,7 +730,7 @@ const PersonsApiFactory = function (configuration, basePath, axios) {
730
730
  const localVarFp = (0, exports.PersonsApiFp)(configuration);
731
731
  return {
732
732
  /**
733
- * Adds a new person. If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
733
+ * Adds a new person. <br>If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. <br>The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync.
734
734
  * @summary Add a new person
735
735
  * @param {PersonsApiAddPersonRequest} requestParameters Request parameters.
736
736
 
@@ -830,14 +830,14 @@ const PersonsApiFactory = function (configuration, basePath, axios) {
830
830
  return localVarFp.searchPersons(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.organization_id, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(axios, basePath));
831
831
  },
832
832
  /**
833
- * Updates the properties of a person. <br>If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
833
+ * Updates the properties of a person. <br>If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. <br>The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync.
834
834
  * @summary Update a person
835
835
  * @param {PersonsApiUpdatePersonRequest} requestParameters Request parameters.
836
836
 
837
837
  * @throws {RequiredError}
838
838
  */
839
839
  updatePerson(requestParameters) {
840
- return localVarFp.updatePerson(requestParameters.id, requestParameters.AddPersonRequest).then((request) => request(axios, basePath));
840
+ return localVarFp.updatePerson(requestParameters.id, requestParameters.UpdatePersonRequest).then((request) => request(axios, basePath));
841
841
  },
842
842
  };
843
843
  };
@@ -850,7 +850,7 @@ exports.PersonsApiFactory = PersonsApiFactory;
850
850
  */
851
851
  class PersonsApi extends base_1.BaseAPI {
852
852
  /**
853
- * Adds a new person. If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
853
+ * Adds a new person. <br>If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. <br>The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync.
854
854
  * @summary Add a new person
855
855
  * @param {PersonsApiAddPersonRequest} requestParameters Request parameters.
856
856
 
@@ -960,7 +960,7 @@ class PersonsApi extends base_1.BaseAPI {
960
960
  return (0, exports.PersonsApiFp)(this.configuration).searchPersons(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.organization_id, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor).then((request) => request(this.axios, this.basePath));
961
961
  }
962
962
  /**
963
- * Updates the properties of a person. <br>If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field.
963
+ * Updates the properties of a person. <br>If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. <br>The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync.
964
964
  * @summary Update a person
965
965
  * @param {PersonsApiUpdatePersonRequest} requestParameters Request parameters.
966
966
 
@@ -968,7 +968,7 @@ class PersonsApi extends base_1.BaseAPI {
968
968
  * @memberof PersonsApi
969
969
  */
970
970
  updatePerson(requestParameters) {
971
- return (0, exports.PersonsApiFp)(this.configuration).updatePerson(requestParameters.id, requestParameters.AddPersonRequest).then((request) => request(this.axios, this.basePath));
971
+ return (0, exports.PersonsApiFp)(this.configuration).updatePerson(requestParameters.id, requestParameters.UpdatePersonRequest).then((request) => request(this.axios, this.basePath));
972
972
  }
973
973
  }
974
974
  exports.PersonsApi = PersonsApi;
@@ -11,7 +11,7 @@
11
11
  */
12
12
  import { Configuration } from "./configuration";
13
13
  import { RequestArgs } from "./base";
14
- import { AxiosInstance, AxiosResponse } from 'axios';
14
+ import type { AxiosInstance, AxiosResponse } from 'axios';
15
15
  /**
16
16
  *
17
17
  * @export
@@ -150,6 +150,8 @@ exports.toPathString = toPathString;
150
150
  * @export
151
151
  */
152
152
  const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
153
+ // Explicit return type + cast avoid inferring axios's internal AxiosResponseResult type,
154
+ // which references a module-private `unique symbol` and breaks `tsc --declaration` (TS2742).
153
155
  return (axios = globalAxios, basePath = BASE_PATH) => {
154
156
  const axiosRequestArgs = Object.assign(Object.assign({}, axiosArgs.options), { url: ((configuration === null || configuration === void 0 ? void 0 : configuration.basePath) || basePath) + axiosArgs.url });
155
157
  return axios.request(axiosRequestArgs);
@@ -20,7 +20,7 @@ export interface AddOrganizationRequest {
20
20
  * The name of the organization
21
21
  * @type {string}
22
22
  */
23
- 'name'?: string;
23
+ 'name': string;
24
24
  /**
25
25
  * The ID of the user who owns the organization
26
26
  * @type {number}
@@ -32,11 +32,6 @@ export interface AddOrganizationRequest {
32
32
  */
33
33
  'add_time'?: string;
34
34
  /**
35
- * The last updated date and time of the organization
36
- * @type {string}
37
- */
38
- 'update_time'?: string;
39
- /**
40
35
  * The visibility of the organization
41
36
  * @type {number}
42
37
  */
@@ -52,6 +47,31 @@ export interface AddOrganizationRequest {
52
47
  */
53
48
  'address'?: OrganizationItemAddress;
54
49
  /**
50
+ * The website of the organization
51
+ * @type {string}
52
+ */
53
+ 'website'?: string | null;
54
+ /**
55
+ * The LinkedIn profile URL of the organization
56
+ * @type {string}
57
+ */
58
+ 'linkedin'?: string | null;
59
+ /**
60
+ * The industry the organization belongs to
61
+ * @type {number}
62
+ */
63
+ 'industry'?: number | null;
64
+ /**
65
+ * The annual revenue of the organization
66
+ * @type {number}
67
+ */
68
+ 'annual_revenue'?: number | null;
69
+ /**
70
+ * The number of employees in the organization
71
+ * @type {number}
72
+ */
73
+ 'employee_count'?: number | null;
74
+ /**
55
75
  * An object where each key represents a custom field. All custom fields are referenced as randomly generated 40-character hashes. To clear a custom field value, set it to `null`. For multi-option fields (field type `set`), use `null` to clear the selection — sending an empty array `[]` is not supported and will result in a validation error.
56
76
  * @type {{ [key: string]: any | undefined; }}
57
77
  */
@@ -9,8 +9,10 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { AddPersonRequestEmailsInner } from './add-person-request-emails-inner';
13
- import { AddPersonRequestPhonesInner } from './add-person-request-phones-inner';
12
+ import { PersonItemAddress } from './person-item-address';
13
+ import { PersonItemEmail } from './person-item-email';
14
+ import { PersonItemIm } from './person-item-im';
15
+ import { PersonItemPhone } from './person-item-phone';
14
16
  /**
15
17
  *
16
18
  * @export
@@ -38,20 +40,15 @@ export interface AddPersonRequest {
38
40
  */
39
41
  'add_time'?: string;
40
42
  /**
41
- * The last updated date and time of the person
42
- * @type {string}
43
- */
44
- 'update_time'?: string;
45
- /**
46
43
  * The emails of the person
47
- * @type {Array<AddPersonRequestEmailsInner>}
44
+ * @type {Array<PersonItemEmail>}
48
45
  */
49
- 'emails'?: Array<AddPersonRequestEmailsInner>;
46
+ 'emails'?: Array<PersonItemEmail>;
50
47
  /**
51
48
  * The phones of the person
52
- * @type {Array<AddPersonRequestPhonesInner>}
49
+ * @type {Array<PersonItemPhone>}
53
50
  */
54
- 'phones'?: Array<AddPersonRequestPhonesInner>;
51
+ 'phones'?: Array<PersonItemPhone>;
55
52
  /**
56
53
  * The visibility of the person
57
54
  * @type {number}
@@ -63,6 +60,31 @@ export interface AddPersonRequest {
63
60
  */
64
61
  'label_ids'?: Array<number>;
65
62
  /**
63
+ *
64
+ * @type {PersonItemAddress}
65
+ */
66
+ 'postal_address'?: PersonItemAddress;
67
+ /**
68
+ * Contact sync notes of the person, maximum 10 000 characters, included if contact sync is enabled for the company
69
+ * @type {string}
70
+ */
71
+ 'notes'?: string;
72
+ /**
73
+ * The instant messaging accounts of the person, included if contact sync is enabled for the company
74
+ * @type {Array<PersonItemIm>}
75
+ */
76
+ 'im'?: Array<PersonItemIm>;
77
+ /**
78
+ * The birthday of the person, included if contact sync is enabled for the company
79
+ * @type {string}
80
+ */
81
+ 'birthday'?: string;
82
+ /**
83
+ * The job title of the person, included if contact sync is enabled for the company
84
+ * @type {string}
85
+ */
86
+ 'job_title'?: string;
87
+ /**
66
88
  * If the person does not have a valid email address, then the marketing status is **not set** and `no_consent` is returned for the `marketing_status` value when the new person is created. If the change is forbidden, the status will remain unchanged for every call that tries to modify the marketing status. Please be aware that it is only allowed **once** to change the marketing status from an old status to a new one.<table><tr><th>Value</th><th>Description</th></tr><tr><td>`no_consent`</td><td>The customer has not given consent to receive any marketing communications</td></tr><tr><td>`unsubscribed`</td><td>The customers have unsubscribed from ALL marketing communications</td></tr><tr><td>`subscribed`</td><td>The customers are subscribed and are counted towards marketing caps</td></tr><tr><td>`archived`</td><td>The customers with `subscribed` status can be moved to `archived` to save consent, but they are not paid for</td></tr></table>
67
89
  * @type {string}
68
90
  */
@@ -42,8 +42,6 @@ export * from './add-person-field-request-required-fields';
42
42
  export * from './add-person-field-request-ui-visibility';
43
43
  export * from './add-person-field-request-ui-visibility-show-in-add-deal-dialog';
44
44
  export * from './add-person-request';
45
- export * from './add-person-request-emails-inner';
46
- export * from './add-person-request-phones-inner';
47
45
  export * from './add-pipeline-request';
48
46
  export * from './add-product-field-request';
49
47
  export * from './add-product-field-request-ui-visibility';
@@ -254,8 +252,10 @@ export * from './lead-search-item-item-person';
254
252
  export * from './organization-item';
255
253
  export * from './organization-item-address';
256
254
  export * from './person';
257
- export * from './person-im-inner';
258
- export * from './person-postal-address';
255
+ export * from './person-item-address';
256
+ export * from './person-item-email';
257
+ export * from './person-item-im';
258
+ export * from './person-item-phone';
259
259
  export * from './prices-array';
260
260
  export * from './prices-array-prices-inner';
261
261
  export * from './product-request';
@@ -275,6 +275,7 @@ export * from './update-installment-response';
275
275
  export * from './update-organization-field-request';
276
276
  export * from './update-organization-request';
277
277
  export * from './update-person-field-request';
278
+ export * from './update-person-request';
278
279
  export * from './update-pipeline-request';
279
280
  export * from './update-product-field-request';
280
281
  export * from './update-product-image-response';
@@ -58,8 +58,6 @@ __exportStar(require("./add-person-field-request-required-fields"), exports);
58
58
  __exportStar(require("./add-person-field-request-ui-visibility"), exports);
59
59
  __exportStar(require("./add-person-field-request-ui-visibility-show-in-add-deal-dialog"), exports);
60
60
  __exportStar(require("./add-person-request"), exports);
61
- __exportStar(require("./add-person-request-emails-inner"), exports);
62
- __exportStar(require("./add-person-request-phones-inner"), exports);
63
61
  __exportStar(require("./add-pipeline-request"), exports);
64
62
  __exportStar(require("./add-product-field-request"), exports);
65
63
  __exportStar(require("./add-product-field-request-ui-visibility"), exports);
@@ -270,8 +268,10 @@ __exportStar(require("./lead-search-item-item-person"), exports);
270
268
  __exportStar(require("./organization-item"), exports);
271
269
  __exportStar(require("./organization-item-address"), exports);
272
270
  __exportStar(require("./person"), exports);
273
- __exportStar(require("./person-im-inner"), exports);
274
- __exportStar(require("./person-postal-address"), exports);
271
+ __exportStar(require("./person-item-address"), exports);
272
+ __exportStar(require("./person-item-email"), exports);
273
+ __exportStar(require("./person-item-im"), exports);
274
+ __exportStar(require("./person-item-phone"), exports);
275
275
  __exportStar(require("./prices-array"), exports);
276
276
  __exportStar(require("./prices-array-prices-inner"), exports);
277
277
  __exportStar(require("./product-request"), exports);
@@ -291,6 +291,7 @@ __exportStar(require("./update-installment-response"), exports);
291
291
  __exportStar(require("./update-organization-field-request"), exports);
292
292
  __exportStar(require("./update-organization-request"), exports);
293
293
  __exportStar(require("./update-person-field-request"), exports);
294
+ __exportStar(require("./update-person-request"), exports);
294
295
  __exportStar(require("./update-pipeline-request"), exports);
295
296
  __exportStar(require("./update-product-field-request"), exports);
296
297
  __exportStar(require("./update-product-image-response"), exports);
@@ -12,9 +12,9 @@
12
12
  /**
13
13
  * Postal address of the person, included if contact sync is enabled for the company
14
14
  * @export
15
- * @interface PersonPostalAddress
15
+ * @interface PersonItemAddress
16
16
  */
17
- export interface PersonPostalAddress {
17
+ export interface PersonItemAddress {
18
18
  /**
19
19
  * The full address of the person
20
20
  * @type {string}
@@ -12,9 +12,9 @@
12
12
  /**
13
13
  *
14
14
  * @export
15
- * @interface AddPersonRequestEmailsInner
15
+ * @interface PersonItemEmail
16
16
  */
17
- export interface AddPersonRequestEmailsInner {
17
+ export interface PersonItemEmail {
18
18
  /**
19
19
  * The email address of the person
20
20
  * @type {string}
@@ -12,9 +12,9 @@
12
12
  /**
13
13
  *
14
14
  * @export
15
- * @interface PersonImInner
15
+ * @interface PersonItemIm
16
16
  */
17
- export interface PersonImInner {
17
+ export interface PersonItemIm {
18
18
  /**
19
19
  * The instant messaging account of the person
20
20
  * @type {string}
@@ -12,9 +12,9 @@
12
12
  /**
13
13
  *
14
14
  * @export
15
- * @interface AddPersonRequestPhonesInner
15
+ * @interface PersonItemPhone
16
16
  */
17
- export interface AddPersonRequestPhonesInner {
17
+ export interface PersonItemPhone {
18
18
  /**
19
19
  * The phone number of the person
20
20
  * @type {string}
@@ -9,10 +9,10 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { AddPersonRequestEmailsInner } from './add-person-request-emails-inner';
13
- import { AddPersonRequestPhonesInner } from './add-person-request-phones-inner';
14
- import { PersonImInner } from './person-im-inner';
15
- import { PersonPostalAddress } from './person-postal-address';
12
+ import { PersonItemAddress } from './person-item-address';
13
+ import { PersonItemEmail } from './person-item-email';
14
+ import { PersonItemIm } from './person-item-im';
15
+ import { PersonItemPhone } from './person-item-phone';
16
16
  /**
17
17
  *
18
18
  * @export
@@ -61,14 +61,14 @@ export interface Person {
61
61
  'update_time'?: string;
62
62
  /**
63
63
  * The emails of the person
64
- * @type {Array<AddPersonRequestEmailsInner>}
64
+ * @type {Array<PersonItemEmail>}
65
65
  */
66
- 'emails'?: Array<AddPersonRequestEmailsInner>;
66
+ 'emails'?: Array<PersonItemEmail>;
67
67
  /**
68
68
  * The phones of the person
69
- * @type {Array<AddPersonRequestPhonesInner>}
69
+ * @type {Array<PersonItemPhone>}
70
70
  */
71
- 'phones'?: Array<AddPersonRequestPhonesInner>;
71
+ 'phones'?: Array<PersonItemPhone>;
72
72
  /**
73
73
  * Whether the person is deleted or not
74
74
  * @type {boolean}
@@ -91,9 +91,9 @@ export interface Person {
91
91
  'picture_id'?: number;
92
92
  /**
93
93
  *
94
- * @type {PersonPostalAddress}
94
+ * @type {PersonItemAddress}
95
95
  */
96
- 'postal_address'?: PersonPostalAddress;
96
+ 'postal_address'?: PersonItemAddress;
97
97
  /**
98
98
  * Contact sync notes of the person, maximum 10 000 characters, included if contact sync is enabled for the company
99
99
  * @type {string}
@@ -101,9 +101,9 @@ export interface Person {
101
101
  'notes'?: string;
102
102
  /**
103
103
  * The instant messaging accounts of the person, included if contact sync is enabled for the company
104
- * @type {Array<PersonImInner>}
104
+ * @type {Array<PersonItemIm>}
105
105
  */
106
- 'im'?: Array<PersonImInner>;
106
+ 'im'?: Array<PersonItemIm>;
107
107
  /**
108
108
  * The birthday of the person, included if contact sync is enabled for the company
109
109
  * @type {string}