pipedrive 33.5.0 → 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 (45) hide show
  1. package/dist/esm/versions/v1/common.d.ts +1 -1
  2. package/dist/esm/versions/v1/common.js +2 -0
  3. package/dist/esm/versions/v2/api/persons-api.d.ts +15 -14
  4. package/dist/esm/versions/v2/api/persons-api.js +16 -16
  5. package/dist/esm/versions/v2/common.d.ts +1 -1
  6. package/dist/esm/versions/v2/common.js +2 -0
  7. package/dist/esm/versions/v2/models/add-organization-request.d.ts +26 -6
  8. package/dist/esm/versions/v2/models/add-person-request.d.ts +33 -11
  9. package/dist/esm/versions/v2/models/index.d.ts +5 -4
  10. package/dist/esm/versions/v2/models/index.js +5 -4
  11. package/dist/esm/versions/v2/models/{person-postal-address.d.ts → person-item-address.d.ts} +2 -2
  12. package/dist/esm/versions/v2/models/{add-person-request-emails-inner.d.ts → person-item-email.d.ts} +2 -2
  13. package/dist/{versions/v2/models/person-im-inner.d.ts → esm/versions/v2/models/person-item-im.d.ts} +2 -2
  14. package/dist/{versions/v2/models/add-person-request-phones-inner.d.ts → esm/versions/v2/models/person-item-phone.d.ts} +2 -2
  15. package/dist/esm/versions/v2/models/person.d.ts +12 -12
  16. package/dist/esm/versions/v2/models/update-organization-request.d.ts +25 -10
  17. package/dist/esm/versions/v2/models/update-person-request.d.ts +101 -0
  18. package/dist/esm/versions/v2/models/update-person-request.js +19 -0
  19. package/dist/versions/v1/common.d.ts +1 -1
  20. package/dist/versions/v1/common.js +2 -0
  21. package/dist/versions/v2/api/persons-api.d.ts +15 -14
  22. package/dist/versions/v2/api/persons-api.js +16 -16
  23. package/dist/versions/v2/common.d.ts +1 -1
  24. package/dist/versions/v2/common.js +2 -0
  25. package/dist/versions/v2/models/add-organization-request.d.ts +26 -6
  26. package/dist/versions/v2/models/add-person-request.d.ts +33 -11
  27. package/dist/versions/v2/models/index.d.ts +5 -4
  28. package/dist/versions/v2/models/index.js +5 -4
  29. package/dist/versions/v2/models/{person-postal-address.d.ts → person-item-address.d.ts} +2 -2
  30. package/dist/versions/v2/models/{add-person-request-emails-inner.d.ts → person-item-email.d.ts} +2 -2
  31. package/dist/{esm/versions/v2/models/person-im-inner.d.ts → versions/v2/models/person-item-im.d.ts} +2 -2
  32. package/dist/{esm/versions/v2/models/add-person-request-phones-inner.d.ts → versions/v2/models/person-item-phone.d.ts} +2 -2
  33. package/dist/versions/v2/models/person.d.ts +12 -12
  34. package/dist/versions/v2/models/update-organization-request.d.ts +25 -10
  35. package/dist/versions/v2/models/update-person-request.d.ts +101 -0
  36. package/dist/versions/v2/models/update-person-request.js +22 -0
  37. package/package.json +1 -1
  38. /package/dist/esm/versions/v2/models/{add-person-request-emails-inner.js → person-item-address.js} +0 -0
  39. /package/dist/esm/versions/v2/models/{add-person-request-phones-inner.js → person-item-email.js} +0 -0
  40. /package/dist/esm/versions/v2/models/{person-im-inner.js → person-item-im.js} +0 -0
  41. /package/dist/esm/versions/v2/models/{person-postal-address.js → person-item-phone.js} +0 -0
  42. /package/dist/versions/v2/models/{add-person-request-emails-inner.js → person-item-address.js} +0 -0
  43. /package/dist/versions/v2/models/{add-person-request-phones-inner.js → person-item-email.js} +0 -0
  44. /package/dist/versions/v2/models/{person-im-inner.js → person-item-im.js} +0 -0
  45. /package/dist/versions/v2/models/{person-postal-address.js → person-item-phone.js} +0 -0
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Pipedrive API v2
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 2.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
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
+ /**
17
+ *
18
+ * @export
19
+ * @interface UpdatePersonRequest
20
+ */
21
+ export interface UpdatePersonRequest {
22
+ /**
23
+ * The name of the person
24
+ * @type {string}
25
+ */
26
+ 'name'?: string;
27
+ /**
28
+ * The ID of the user who owns the person
29
+ * @type {number}
30
+ */
31
+ 'owner_id'?: number;
32
+ /**
33
+ * The ID of the organization linked to the person
34
+ * @type {number}
35
+ */
36
+ 'org_id'?: number;
37
+ /**
38
+ * The emails of the person
39
+ * @type {Array<PersonItemEmail>}
40
+ */
41
+ 'emails'?: Array<PersonItemEmail>;
42
+ /**
43
+ * The phones of the person
44
+ * @type {Array<PersonItemPhone>}
45
+ */
46
+ 'phones'?: Array<PersonItemPhone>;
47
+ /**
48
+ * The visibility of the person
49
+ * @type {number}
50
+ */
51
+ 'visible_to'?: number;
52
+ /**
53
+ * The IDs of labels assigned to the person
54
+ * @type {Array<number>}
55
+ */
56
+ 'label_ids'?: Array<number>;
57
+ /**
58
+ *
59
+ * @type {PersonItemAddress}
60
+ */
61
+ 'postal_address'?: PersonItemAddress;
62
+ /**
63
+ * Contact sync notes of the person, maximum 10 000 characters, included if contact sync is enabled for the company
64
+ * @type {string}
65
+ */
66
+ 'notes'?: string;
67
+ /**
68
+ * The instant messaging accounts of the person, included if contact sync is enabled for the company
69
+ * @type {Array<PersonItemIm>}
70
+ */
71
+ 'im'?: Array<PersonItemIm>;
72
+ /**
73
+ * The birthday of the person, included if contact sync is enabled for the company
74
+ * @type {string}
75
+ */
76
+ 'birthday'?: string;
77
+ /**
78
+ * The job title of the person, included if contact sync is enabled for the company
79
+ * @type {string}
80
+ */
81
+ 'job_title'?: string;
82
+ /**
83
+ * 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>
84
+ * @type {string}
85
+ */
86
+ 'marketing_status'?: UpdatePersonRequestMarketingStatusConst;
87
+ /**
88
+ * 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.
89
+ * @type {{ [key: string]: any | undefined; }}
90
+ */
91
+ 'custom_fields'?: {
92
+ [key: string]: any | undefined;
93
+ };
94
+ }
95
+ export declare const UpdatePersonRequestMarketingStatusConst: {
96
+ readonly no_consent: "no_consent";
97
+ readonly unsubscribed: "unsubscribed";
98
+ readonly subscribed: "subscribed";
99
+ readonly archived: "archived";
100
+ };
101
+ export type UpdatePersonRequestMarketingStatusConst = typeof UpdatePersonRequestMarketingStatusConst[keyof typeof UpdatePersonRequestMarketingStatusConst];
@@ -0,0 +1,19 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Pipedrive API v2
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 2.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ export const UpdatePersonRequestMarketingStatusConst = {
15
+ no_consent: 'no_consent',
16
+ unsubscribed: 'unsubscribed',
17
+ subscribed: 'subscribed',
18
+ archived: 'archived'
19
+ };
@@ -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);
@@ -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}