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.
- package/dist/esm/versions/v1/common.d.ts +1 -1
- package/dist/esm/versions/v1/common.js +2 -0
- package/dist/esm/versions/v2/api/persons-api.d.ts +15 -14
- package/dist/esm/versions/v2/api/persons-api.js +16 -16
- package/dist/esm/versions/v2/common.d.ts +1 -1
- package/dist/esm/versions/v2/common.js +2 -0
- package/dist/esm/versions/v2/models/add-organization-request.d.ts +26 -6
- package/dist/esm/versions/v2/models/add-person-request.d.ts +33 -11
- package/dist/esm/versions/v2/models/index.d.ts +5 -4
- package/dist/esm/versions/v2/models/index.js +5 -4
- package/dist/esm/versions/v2/models/{person-postal-address.d.ts → person-item-address.d.ts} +2 -2
- package/dist/esm/versions/v2/models/{add-person-request-emails-inner.d.ts → person-item-email.d.ts} +2 -2
- package/dist/{versions/v2/models/person-im-inner.d.ts → esm/versions/v2/models/person-item-im.d.ts} +2 -2
- package/dist/{versions/v2/models/add-person-request-phones-inner.d.ts → esm/versions/v2/models/person-item-phone.d.ts} +2 -2
- package/dist/esm/versions/v2/models/person.d.ts +12 -12
- package/dist/esm/versions/v2/models/update-organization-request.d.ts +25 -10
- package/dist/esm/versions/v2/models/update-person-request.d.ts +101 -0
- package/dist/esm/versions/v2/models/update-person-request.js +19 -0
- package/dist/versions/v1/common.d.ts +1 -1
- package/dist/versions/v1/common.js +2 -0
- package/dist/versions/v2/api/persons-api.d.ts +15 -14
- package/dist/versions/v2/api/persons-api.js +16 -16
- package/dist/versions/v2/common.d.ts +1 -1
- package/dist/versions/v2/common.js +2 -0
- package/dist/versions/v2/models/add-organization-request.d.ts +26 -6
- package/dist/versions/v2/models/add-person-request.d.ts +33 -11
- package/dist/versions/v2/models/index.d.ts +5 -4
- package/dist/versions/v2/models/index.js +5 -4
- package/dist/versions/v2/models/{person-postal-address.d.ts → person-item-address.d.ts} +2 -2
- package/dist/versions/v2/models/{add-person-request-emails-inner.d.ts → person-item-email.d.ts} +2 -2
- package/dist/{esm/versions/v2/models/person-im-inner.d.ts → versions/v2/models/person-item-im.d.ts} +2 -2
- package/dist/{esm/versions/v2/models/add-person-request-phones-inner.d.ts → versions/v2/models/person-item-phone.d.ts} +2 -2
- package/dist/versions/v2/models/person.d.ts +12 -12
- package/dist/versions/v2/models/update-organization-request.d.ts +25 -10
- package/dist/versions/v2/models/update-person-request.d.ts +101 -0
- package/dist/versions/v2/models/update-person-request.js +22 -0
- package/package.json +1 -1
- /package/dist/esm/versions/v2/models/{add-person-request-emails-inner.js → person-item-address.js} +0 -0
- /package/dist/esm/versions/v2/models/{add-person-request-phones-inner.js → person-item-email.js} +0 -0
- /package/dist/esm/versions/v2/models/{person-im-inner.js → person-item-im.js} +0 -0
- /package/dist/esm/versions/v2/models/{person-postal-address.js → person-item-phone.js} +0 -0
- /package/dist/versions/v2/models/{add-person-request-emails-inner.js → person-item-address.js} +0 -0
- /package/dist/versions/v2/models/{add-person-request-phones-inner.js → person-item-email.js} +0 -0
- /package/dist/versions/v2/models/{person-im-inner.js → person-item-im.js} +0 -0
- /package/dist/versions/v2/models/{person-postal-address.js → person-item-phone.js} +0 -0
|
@@ -139,6 +139,8 @@ export const toPathString = function (url) {
|
|
|
139
139
|
* @export
|
|
140
140
|
*/
|
|
141
141
|
export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
142
|
+
// Explicit return type + cast avoid inferring axios's internal AxiosResponseResult type,
|
|
143
|
+
// which references a module-private `unique symbol` and breaks `tsc --declaration` (TS2742).
|
|
142
144
|
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
143
145
|
const axiosRequestArgs = Object.assign(Object.assign({}, axiosArgs.options), { url: ((configuration === null || configuration === void 0 ? void 0 : configuration.basePath) || basePath) + axiosArgs.url });
|
|
144
146
|
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 {
|
|
146
|
+
* @param {UpdatePersonRequest} [UpdatePersonRequest]
|
|
146
147
|
|
|
147
148
|
* @throws {RequiredError}
|
|
148
149
|
*/
|
|
149
|
-
updatePerson: (id: number,
|
|
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 {
|
|
271
|
+
* @param {UpdatePersonRequest} [UpdatePersonRequest]
|
|
271
272
|
|
|
272
273
|
* @throws {RequiredError}
|
|
273
274
|
*/
|
|
274
|
-
updatePerson(id: number,
|
|
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 {
|
|
695
|
+
* @type {UpdatePersonRequest}
|
|
695
696
|
* @memberof PersonsApiUpdatePerson
|
|
696
697
|
*/
|
|
697
|
-
readonly
|
|
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
|
|
|
@@ -33,7 +33,7 @@ import { BASE_PATH, BaseAPI } from '../base';
|
|
|
33
33
|
export const PersonsApiAxiosParamCreator = function (configuration) {
|
|
34
34
|
return {
|
|
35
35
|
/**
|
|
36
|
-
* 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.
|
|
36
|
+
* 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.
|
|
37
37
|
* @summary Add a new person
|
|
38
38
|
* @param {AddPersonRequest} [AddPersonRequest]
|
|
39
39
|
|
|
@@ -493,14 +493,14 @@ export const PersonsApiAxiosParamCreator = function (configuration) {
|
|
|
493
493
|
};
|
|
494
494
|
}),
|
|
495
495
|
/**
|
|
496
|
-
* 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.
|
|
496
|
+
* 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.
|
|
497
497
|
* @summary Update a person
|
|
498
498
|
* @param {number} id The ID of the person
|
|
499
|
-
* @param {
|
|
499
|
+
* @param {UpdatePersonRequest} [UpdatePersonRequest]
|
|
500
500
|
|
|
501
501
|
* @throws {RequiredError}
|
|
502
502
|
*/
|
|
503
|
-
updatePerson: (id,
|
|
503
|
+
updatePerson: (id, UpdatePersonRequest) => __awaiter(this, void 0, void 0, function* () {
|
|
504
504
|
// verify required parameter 'id' is not null or undefined
|
|
505
505
|
assertParamExists('updatePerson', 'id', id);
|
|
506
506
|
const localVarPath = `/persons/{id}`
|
|
@@ -523,7 +523,7 @@ export const PersonsApiAxiosParamCreator = function (configuration) {
|
|
|
523
523
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
524
524
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
525
525
|
localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
|
|
526
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
526
|
+
localVarRequestOptions.data = serializeDataIfNeeded(UpdatePersonRequest, localVarRequestOptions, configuration);
|
|
527
527
|
return {
|
|
528
528
|
url: toPathString(localVarUrlObj),
|
|
529
529
|
options: localVarRequestOptions,
|
|
@@ -539,7 +539,7 @@ export const PersonsApiFp = function (configuration) {
|
|
|
539
539
|
const localVarAxiosParamCreator = PersonsApiAxiosParamCreator(configuration);
|
|
540
540
|
return {
|
|
541
541
|
/**
|
|
542
|
-
* 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.
|
|
542
|
+
* 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.
|
|
543
543
|
* @summary Add a new person
|
|
544
544
|
* @param {AddPersonRequest} [AddPersonRequest]
|
|
545
545
|
|
|
@@ -699,16 +699,16 @@ export const PersonsApiFp = function (configuration) {
|
|
|
699
699
|
});
|
|
700
700
|
},
|
|
701
701
|
/**
|
|
702
|
-
* 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.
|
|
702
|
+
* 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.
|
|
703
703
|
* @summary Update a person
|
|
704
704
|
* @param {number} id The ID of the person
|
|
705
|
-
* @param {
|
|
705
|
+
* @param {UpdatePersonRequest} [UpdatePersonRequest]
|
|
706
706
|
|
|
707
707
|
* @throws {RequiredError}
|
|
708
708
|
*/
|
|
709
|
-
updatePerson(id,
|
|
709
|
+
updatePerson(id, UpdatePersonRequest) {
|
|
710
710
|
return __awaiter(this, void 0, void 0, function* () {
|
|
711
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.updatePerson(id,
|
|
711
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updatePerson(id, UpdatePersonRequest);
|
|
712
712
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
713
713
|
});
|
|
714
714
|
},
|
|
@@ -722,7 +722,7 @@ export const PersonsApiFactory = function (configuration, basePath, axios) {
|
|
|
722
722
|
const localVarFp = PersonsApiFp(configuration);
|
|
723
723
|
return {
|
|
724
724
|
/**
|
|
725
|
-
* 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.
|
|
725
|
+
* 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.
|
|
726
726
|
* @summary Add a new person
|
|
727
727
|
* @param {PersonsApiAddPersonRequest} requestParameters Request parameters.
|
|
728
728
|
|
|
@@ -822,14 +822,14 @@ export const PersonsApiFactory = function (configuration, basePath, axios) {
|
|
|
822
822
|
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));
|
|
823
823
|
},
|
|
824
824
|
/**
|
|
825
|
-
* 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.
|
|
825
|
+
* 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.
|
|
826
826
|
* @summary Update a person
|
|
827
827
|
* @param {PersonsApiUpdatePersonRequest} requestParameters Request parameters.
|
|
828
828
|
|
|
829
829
|
* @throws {RequiredError}
|
|
830
830
|
*/
|
|
831
831
|
updatePerson(requestParameters) {
|
|
832
|
-
return localVarFp.updatePerson(requestParameters.id, requestParameters.
|
|
832
|
+
return localVarFp.updatePerson(requestParameters.id, requestParameters.UpdatePersonRequest).then((request) => request(axios, basePath));
|
|
833
833
|
},
|
|
834
834
|
};
|
|
835
835
|
};
|
|
@@ -841,7 +841,7 @@ export const PersonsApiFactory = function (configuration, basePath, axios) {
|
|
|
841
841
|
*/
|
|
842
842
|
export class PersonsApi extends BaseAPI {
|
|
843
843
|
/**
|
|
844
|
-
* 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.
|
|
844
|
+
* 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.
|
|
845
845
|
* @summary Add a new person
|
|
846
846
|
* @param {PersonsApiAddPersonRequest} requestParameters Request parameters.
|
|
847
847
|
|
|
@@ -951,7 +951,7 @@ export class PersonsApi extends BaseAPI {
|
|
|
951
951
|
return 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));
|
|
952
952
|
}
|
|
953
953
|
/**
|
|
954
|
-
* 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.
|
|
954
|
+
* 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.
|
|
955
955
|
* @summary Update a person
|
|
956
956
|
* @param {PersonsApiUpdatePersonRequest} requestParameters Request parameters.
|
|
957
957
|
|
|
@@ -959,6 +959,6 @@ export class PersonsApi extends BaseAPI {
|
|
|
959
959
|
* @memberof PersonsApi
|
|
960
960
|
*/
|
|
961
961
|
updatePerson(requestParameters) {
|
|
962
|
-
return PersonsApiFp(this.configuration).updatePerson(requestParameters.id, requestParameters.
|
|
962
|
+
return PersonsApiFp(this.configuration).updatePerson(requestParameters.id, requestParameters.UpdatePersonRequest).then((request) => request(this.axios, this.basePath));
|
|
963
963
|
}
|
|
964
964
|
}
|
|
@@ -139,6 +139,8 @@ export const toPathString = function (url) {
|
|
|
139
139
|
* @export
|
|
140
140
|
*/
|
|
141
141
|
export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
142
|
+
// Explicit return type + cast avoid inferring axios's internal AxiosResponseResult type,
|
|
143
|
+
// which references a module-private `unique symbol` and breaks `tsc --declaration` (TS2742).
|
|
142
144
|
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
143
145
|
const axiosRequestArgs = Object.assign(Object.assign({}, axiosArgs.options), { url: ((configuration === null || configuration === void 0 ? void 0 : configuration.basePath) || basePath) + axiosArgs.url });
|
|
144
146
|
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'
|
|
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 {
|
|
13
|
-
import {
|
|
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<
|
|
44
|
+
* @type {Array<PersonItemEmail>}
|
|
48
45
|
*/
|
|
49
|
-
'emails'?: Array<
|
|
46
|
+
'emails'?: Array<PersonItemEmail>;
|
|
50
47
|
/**
|
|
51
48
|
* The phones of the person
|
|
52
|
-
* @type {Array<
|
|
49
|
+
* @type {Array<PersonItemPhone>}
|
|
53
50
|
*/
|
|
54
|
-
'phones'?: Array<
|
|
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-
|
|
258
|
-
export * from './person-
|
|
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';
|
|
@@ -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-
|
|
258
|
-
export * from './person-
|
|
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';
|
|
@@ -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
|
|
15
|
+
* @interface PersonItemAddress
|
|
16
16
|
*/
|
|
17
|
-
export interface
|
|
17
|
+
export interface PersonItemAddress {
|
|
18
18
|
/**
|
|
19
19
|
* The full address of the person
|
|
20
20
|
* @type {string}
|
package/dist/esm/versions/v2/models/{add-person-request-emails-inner.d.ts → person-item-email.d.ts}
RENAMED
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
/**
|
|
13
13
|
*
|
|
14
14
|
* @export
|
|
15
|
-
* @interface
|
|
15
|
+
* @interface PersonItemEmail
|
|
16
16
|
*/
|
|
17
|
-
export interface
|
|
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
|
|
15
|
+
* @interface PersonItemPhone
|
|
16
16
|
*/
|
|
17
|
-
export interface
|
|
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 {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
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<
|
|
64
|
+
* @type {Array<PersonItemEmail>}
|
|
65
65
|
*/
|
|
66
|
-
'emails'?: Array<
|
|
66
|
+
'emails'?: Array<PersonItemEmail>;
|
|
67
67
|
/**
|
|
68
68
|
* The phones of the person
|
|
69
|
-
* @type {Array<
|
|
69
|
+
* @type {Array<PersonItemPhone>}
|
|
70
70
|
*/
|
|
71
|
-
'phones'?: Array<
|
|
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 {
|
|
94
|
+
* @type {PersonItemAddress}
|
|
95
95
|
*/
|
|
96
|
-
'postal_address'?:
|
|
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<
|
|
104
|
+
* @type {Array<PersonItemIm>}
|
|
105
105
|
*/
|
|
106
|
-
'im'?: Array<
|
|
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}
|
|
@@ -27,16 +27,6 @@ export interface UpdateOrganizationRequest {
|
|
|
27
27
|
*/
|
|
28
28
|
'owner_id'?: number;
|
|
29
29
|
/**
|
|
30
|
-
* The creation date and time of the organization
|
|
31
|
-
* @type {string}
|
|
32
|
-
*/
|
|
33
|
-
'add_time'?: string;
|
|
34
|
-
/**
|
|
35
|
-
* The last updated date and time of the organization
|
|
36
|
-
* @type {string}
|
|
37
|
-
*/
|
|
38
|
-
'update_time'?: string;
|
|
39
|
-
/**
|
|
40
30
|
* The visibility of the organization
|
|
41
31
|
* @type {number}
|
|
42
32
|
*/
|
|
@@ -52,6 +42,31 @@ export interface UpdateOrganizationRequest {
|
|
|
52
42
|
*/
|
|
53
43
|
'address'?: OrganizationItemAddress;
|
|
54
44
|
/**
|
|
45
|
+
* The website of the organization
|
|
46
|
+
* @type {string}
|
|
47
|
+
*/
|
|
48
|
+
'website'?: string | null;
|
|
49
|
+
/**
|
|
50
|
+
* The LinkedIn profile URL of the organization
|
|
51
|
+
* @type {string}
|
|
52
|
+
*/
|
|
53
|
+
'linkedin'?: string | null;
|
|
54
|
+
/**
|
|
55
|
+
* The industry the organization belongs to
|
|
56
|
+
* @type {number}
|
|
57
|
+
*/
|
|
58
|
+
'industry'?: number | null;
|
|
59
|
+
/**
|
|
60
|
+
* The annual revenue of the organization
|
|
61
|
+
* @type {number}
|
|
62
|
+
*/
|
|
63
|
+
'annual_revenue'?: number | null;
|
|
64
|
+
/**
|
|
65
|
+
* The number of employees in the organization
|
|
66
|
+
* @type {number}
|
|
67
|
+
*/
|
|
68
|
+
'employee_count'?: number | null;
|
|
69
|
+
/**
|
|
55
70
|
* 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
71
|
* @type {{ [key: string]: any | undefined; }}
|
|
57
72
|
*/
|