pipedrive 25.0.0 → 26.0.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 (141) hide show
  1. package/dist/esm/versions/v1/api/activities-api.d.ts +40 -40
  2. package/dist/esm/versions/v1/api/activities-api.js +40 -40
  3. package/dist/esm/versions/v1/api/deals-api.d.ts +410 -88
  4. package/dist/esm/versions/v1/api/deals-api.js +417 -88
  5. package/dist/esm/versions/v1/api/item-search-api.d.ts +8 -8
  6. package/dist/esm/versions/v1/api/item-search-api.js +8 -8
  7. package/dist/esm/versions/v1/api/leads-api.d.ts +100 -14
  8. package/dist/esm/versions/v1/api/leads-api.js +107 -14
  9. package/dist/esm/versions/v1/api/notes-api.d.ts +18 -2
  10. package/dist/esm/versions/v1/api/notes-api.js +15 -5
  11. package/dist/esm/versions/v1/api/organizations-api.d.ts +68 -68
  12. package/dist/esm/versions/v1/api/organizations-api.js +68 -68
  13. package/dist/esm/versions/v1/api/persons-api.d.ts +56 -56
  14. package/dist/esm/versions/v1/api/persons-api.js +56 -56
  15. package/dist/esm/versions/v1/api/pipelines-api.d.ts +28 -28
  16. package/dist/esm/versions/v1/api/pipelines-api.js +28 -28
  17. package/dist/esm/versions/v1/api/products-api.d.ts +24 -24
  18. package/dist/esm/versions/v1/api/products-api.js +24 -24
  19. package/dist/esm/versions/v1/api/stages-api.d.ts +36 -36
  20. package/dist/esm/versions/v1/api/stages-api.js +36 -36
  21. package/dist/esm/versions/v1/base.d.ts +2 -3
  22. package/dist/esm/versions/v1/configuration.d.ts +2 -2
  23. package/dist/esm/versions/v1/models/add-note-request-all-of.d.ts +9 -4
  24. package/dist/esm/versions/v1/models/add-note-request-all-of1.d.ts +10 -0
  25. package/dist/esm/versions/v1/models/add-note-request-all-of1.js +4 -0
  26. package/dist/esm/versions/v1/models/get-deal-search-response-all-of-data-items-inner-item.d.ts +5 -0
  27. package/dist/esm/versions/v1/models/index.d.ts +1 -0
  28. package/dist/esm/versions/v1/models/index.js +1 -0
  29. package/dist/esm/versions/v1/models/note-project.d.ts +23 -0
  30. package/dist/esm/versions/v1/models/note-project.js +14 -0
  31. package/dist/esm/versions/v1/models/note-request-all-of1.d.ts +5 -0
  32. package/dist/esm/versions/v1/models/note.d.ts +16 -0
  33. package/dist/esm/versions/v2/api/activities-api.d.ts +15 -7
  34. package/dist/esm/versions/v2/api/activities-api.js +12 -7
  35. package/dist/esm/versions/v2/api/beta-api.d.ts +212 -0
  36. package/dist/esm/versions/v2/api/beta-api.js +286 -0
  37. package/dist/esm/versions/v2/api/deals-api.d.ts +272 -4
  38. package/dist/esm/versions/v2/api/deals-api.js +288 -4
  39. package/dist/esm/versions/v2/api/leads-api.d.ts +111 -0
  40. package/dist/esm/versions/v2/api/leads-api.js +146 -1
  41. package/dist/esm/versions/v2/api/persons-api.d.ts +8 -8
  42. package/dist/esm/versions/v2/api/persons-api.js +8 -8
  43. package/dist/esm/versions/v2/api/products-api.js +1 -1
  44. package/dist/esm/versions/v2/base.d.ts +2 -3
  45. package/dist/esm/versions/v2/configuration.d.ts +2 -2
  46. package/dist/esm/versions/v2/models/activity-item.d.ts +5 -0
  47. package/dist/esm/versions/v2/models/activity-item1.d.ts +5 -0
  48. package/dist/esm/versions/v2/models/add-convert-deal-to-lead-response-data.d.ts +23 -0
  49. package/dist/esm/versions/v2/models/add-convert-deal-to-lead-response-data.js +14 -0
  50. package/dist/esm/versions/v2/models/add-convert-deal-to-lead-response.d.ts +34 -0
  51. package/dist/esm/versions/v2/models/add-convert-deal-to-lead-response.js +14 -0
  52. package/dist/esm/versions/v2/models/add-convert-lead-to-deal-response.d.ts +34 -0
  53. package/dist/esm/versions/v2/models/add-convert-lead-to-deal-response.js +14 -0
  54. package/dist/esm/versions/v2/models/add-person-request.d.ts +12 -0
  55. package/dist/esm/versions/v2/models/add-person-request.js +6 -1
  56. package/dist/esm/versions/v2/models/convert-lead-to-deal-request.d.ts +28 -0
  57. package/dist/esm/versions/v2/models/convert-lead-to-deal-request.js +14 -0
  58. package/dist/esm/versions/v2/models/deal-item.d.ts +5 -0
  59. package/dist/esm/versions/v2/models/deal-item1.d.ts +5 -0
  60. package/dist/esm/versions/v2/models/get-convert-response.d.ts +43 -0
  61. package/dist/esm/versions/v2/models/get-convert-response.js +14 -0
  62. package/dist/esm/versions/v2/models/get-convert-response1-data.d.ts +46 -0
  63. package/dist/esm/versions/v2/models/get-convert-response1-data.js +20 -0
  64. package/dist/esm/versions/v2/models/get-convert-response1.d.ts +34 -0
  65. package/dist/esm/versions/v2/models/get-convert-response1.js +14 -0
  66. package/dist/esm/versions/v2/models/get-deal-search-response-all-of-data-items-inner-item.d.ts +5 -0
  67. package/dist/esm/versions/v2/models/index.d.ts +7 -0
  68. package/dist/esm/versions/v2/models/index.js +7 -0
  69. package/dist/esm/versions/v2/models/update-person-request.d.ts +12 -0
  70. package/dist/esm/versions/v2/models/update-person-request.js +6 -1
  71. package/dist/versions/v1/api/activities-api.d.ts +40 -40
  72. package/dist/versions/v1/api/activities-api.js +40 -40
  73. package/dist/versions/v1/api/deals-api.d.ts +410 -88
  74. package/dist/versions/v1/api/deals-api.js +417 -88
  75. package/dist/versions/v1/api/item-search-api.d.ts +8 -8
  76. package/dist/versions/v1/api/item-search-api.js +8 -8
  77. package/dist/versions/v1/api/leads-api.d.ts +100 -14
  78. package/dist/versions/v1/api/leads-api.js +107 -14
  79. package/dist/versions/v1/api/notes-api.d.ts +18 -2
  80. package/dist/versions/v1/api/notes-api.js +15 -5
  81. package/dist/versions/v1/api/organizations-api.d.ts +68 -68
  82. package/dist/versions/v1/api/organizations-api.js +68 -68
  83. package/dist/versions/v1/api/persons-api.d.ts +56 -56
  84. package/dist/versions/v1/api/persons-api.js +56 -56
  85. package/dist/versions/v1/api/pipelines-api.d.ts +28 -28
  86. package/dist/versions/v1/api/pipelines-api.js +28 -28
  87. package/dist/versions/v1/api/products-api.d.ts +24 -24
  88. package/dist/versions/v1/api/products-api.js +24 -24
  89. package/dist/versions/v1/api/stages-api.d.ts +36 -36
  90. package/dist/versions/v1/api/stages-api.js +36 -36
  91. package/dist/versions/v1/base.d.ts +2 -3
  92. package/dist/versions/v1/configuration.d.ts +2 -2
  93. package/dist/versions/v1/models/add-note-request-all-of.d.ts +9 -4
  94. package/dist/versions/v1/models/add-note-request-all-of1.d.ts +10 -0
  95. package/dist/versions/v1/models/add-note-request-all-of1.js +5 -1
  96. package/dist/versions/v1/models/get-deal-search-response-all-of-data-items-inner-item.d.ts +5 -0
  97. package/dist/versions/v1/models/index.d.ts +1 -0
  98. package/dist/versions/v1/models/index.js +1 -0
  99. package/dist/versions/v1/models/note-project.d.ts +23 -0
  100. package/dist/versions/v1/models/note-project.js +15 -0
  101. package/dist/versions/v1/models/note-request-all-of1.d.ts +5 -0
  102. package/dist/versions/v1/models/note.d.ts +16 -0
  103. package/dist/versions/v2/api/activities-api.d.ts +15 -7
  104. package/dist/versions/v2/api/activities-api.js +12 -7
  105. package/dist/versions/v2/api/beta-api.d.ts +212 -0
  106. package/dist/versions/v2/api/beta-api.js +286 -0
  107. package/dist/versions/v2/api/deals-api.d.ts +272 -4
  108. package/dist/versions/v2/api/deals-api.js +288 -4
  109. package/dist/versions/v2/api/leads-api.d.ts +111 -0
  110. package/dist/versions/v2/api/leads-api.js +145 -0
  111. package/dist/versions/v2/api/persons-api.d.ts +8 -8
  112. package/dist/versions/v2/api/persons-api.js +8 -8
  113. package/dist/versions/v2/api/products-api.js +1 -1
  114. package/dist/versions/v2/base.d.ts +2 -3
  115. package/dist/versions/v2/configuration.d.ts +2 -2
  116. package/dist/versions/v2/models/activity-item.d.ts +5 -0
  117. package/dist/versions/v2/models/activity-item1.d.ts +5 -0
  118. package/dist/versions/v2/models/add-convert-deal-to-lead-response-data.d.ts +23 -0
  119. package/dist/versions/v2/models/add-convert-deal-to-lead-response-data.js +15 -0
  120. package/dist/versions/v2/models/add-convert-deal-to-lead-response.d.ts +34 -0
  121. package/dist/versions/v2/models/add-convert-deal-to-lead-response.js +15 -0
  122. package/dist/versions/v2/models/add-convert-lead-to-deal-response.d.ts +34 -0
  123. package/dist/versions/v2/models/add-convert-lead-to-deal-response.js +15 -0
  124. package/dist/versions/v2/models/add-person-request.d.ts +12 -0
  125. package/dist/versions/v2/models/add-person-request.js +7 -0
  126. package/dist/versions/v2/models/convert-lead-to-deal-request.d.ts +28 -0
  127. package/dist/versions/v2/models/convert-lead-to-deal-request.js +15 -0
  128. package/dist/versions/v2/models/deal-item.d.ts +5 -0
  129. package/dist/versions/v2/models/deal-item1.d.ts +5 -0
  130. package/dist/versions/v2/models/get-convert-response.d.ts +43 -0
  131. package/dist/versions/v2/models/get-convert-response.js +15 -0
  132. package/dist/versions/v2/models/get-convert-response1-data.d.ts +46 -0
  133. package/dist/versions/v2/models/get-convert-response1-data.js +23 -0
  134. package/dist/versions/v2/models/get-convert-response1.d.ts +34 -0
  135. package/dist/versions/v2/models/get-convert-response1.js +15 -0
  136. package/dist/versions/v2/models/get-deal-search-response-all-of-data-items-inner-item.d.ts +5 -0
  137. package/dist/versions/v2/models/index.d.ts +7 -0
  138. package/dist/versions/v2/models/index.js +7 -0
  139. package/dist/versions/v2/models/update-person-request.d.ts +12 -0
  140. package/dist/versions/v2/models/update-person-request.js +7 -0
  141. package/package.json +1 -1
@@ -23,7 +23,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
23
23
  import globalAxios from 'axios';
24
24
  // Some imports not used depending on template conditions
25
25
  // @ts-ignore
26
- import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setOAuthToObject, setSearchParams, toPathString, createRequestFunction } from '../common';
26
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
27
27
  // @ts-ignore
28
28
  import { BASE_PATH, BaseAPI } from '../base';
29
29
  /**
@@ -32,6 +32,81 @@ import { BASE_PATH, BaseAPI } from '../base';
32
32
  */
33
33
  export const LeadsApiAxiosParamCreator = function (configuration) {
34
34
  return {
35
+ /**
36
+ * Initiates a conversion of a lead to a deal. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. If the conversion is successful, the lead is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the <a href=\"https://developers.pipedrive.com/docs/api/v1/Leads#getLeadConversionStatus\">/api/v2/leads/{lead_id}/convert/status/{conversion_id}</a> endpoint.
37
+ * @summary Convert a lead to a deal (BETA)
38
+ * @param {string} id The ID of the lead to convert
39
+ * @param {ConvertLeadToDealRequest} [ConvertLeadToDealRequest]
40
+
41
+ * @throws {RequiredError}
42
+ */
43
+ convertLeadToDeal: (id, ConvertLeadToDealRequest) => __awaiter(this, void 0, void 0, function* () {
44
+ // verify required parameter 'id' is not null or undefined
45
+ assertParamExists('convertLeadToDeal', 'id', id);
46
+ const localVarPath = `/leads/{id}/convert/deal`
47
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
48
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
49
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
50
+ let baseOptions;
51
+ if (configuration) {
52
+ baseOptions = configuration.baseOptions;
53
+ }
54
+ const localVarRequestOptions = Object.assign({ method: 'POST' }, baseOptions);
55
+ const localVarHeaderParameter = {};
56
+ const localVarQueryParameter = {};
57
+ // authentication api_key required
58
+ yield setApiKeyToObject(localVarQueryParameter, "api_token", configuration);
59
+ // authentication oauth2 required
60
+ // oauth required
61
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["deals:full", "leads:full"], configuration);
62
+ localVarHeaderParameter['Content-Type'] = 'application/json';
63
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
64
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
65
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
66
+ localVarRequestOptions.data = serializeDataIfNeeded(ConvertLeadToDealRequest, localVarRequestOptions, configuration);
67
+ return {
68
+ url: toPathString(localVarUrlObj),
69
+ options: localVarRequestOptions,
70
+ };
71
+ }),
72
+ /**
73
+ * Returns data about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Deal ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days.
74
+ * @summary Get Lead conversion status (BETA)
75
+ * @param {string} id The ID of a lead
76
+ * @param {string} conversion_id The ID of the conversion
77
+
78
+ * @throws {RequiredError}
79
+ */
80
+ getLeadConversionStatus: (id, conversion_id) => __awaiter(this, void 0, void 0, function* () {
81
+ // verify required parameter 'id' is not null or undefined
82
+ assertParamExists('getLeadConversionStatus', 'id', id);
83
+ // verify required parameter 'conversion_id' is not null or undefined
84
+ assertParamExists('getLeadConversionStatus', 'conversion_id', conversion_id);
85
+ const localVarPath = `/leads/{id}/convert/status/{conversion_id}`
86
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
87
+ .replace(`{${"conversion_id"}}`, encodeURIComponent(String(conversion_id)));
88
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
89
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
90
+ let baseOptions;
91
+ if (configuration) {
92
+ baseOptions = configuration.baseOptions;
93
+ }
94
+ const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
95
+ const localVarHeaderParameter = {};
96
+ const localVarQueryParameter = {};
97
+ // authentication api_key required
98
+ yield setApiKeyToObject(localVarQueryParameter, "api_token", configuration);
99
+ // authentication oauth2 required
100
+ // oauth required
101
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["leads:read"], configuration);
102
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
103
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
104
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
105
+ return {
106
+ url: toPathString(localVarUrlObj),
107
+ options: localVarRequestOptions,
108
+ };
109
+ }),
35
110
  /**
36
111
  * Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID.
37
112
  * @summary Search leads
@@ -105,6 +180,34 @@ export const LeadsApiAxiosParamCreator = function (configuration) {
105
180
  export const LeadsApiFp = function (configuration) {
106
181
  const localVarAxiosParamCreator = LeadsApiAxiosParamCreator(configuration);
107
182
  return {
183
+ /**
184
+ * Initiates a conversion of a lead to a deal. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. If the conversion is successful, the lead is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the <a href=\"https://developers.pipedrive.com/docs/api/v1/Leads#getLeadConversionStatus\">/api/v2/leads/{lead_id}/convert/status/{conversion_id}</a> endpoint.
185
+ * @summary Convert a lead to a deal (BETA)
186
+ * @param {string} id The ID of the lead to convert
187
+ * @param {ConvertLeadToDealRequest} [ConvertLeadToDealRequest]
188
+
189
+ * @throws {RequiredError}
190
+ */
191
+ convertLeadToDeal(id, ConvertLeadToDealRequest) {
192
+ return __awaiter(this, void 0, void 0, function* () {
193
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.convertLeadToDeal(id, ConvertLeadToDealRequest);
194
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
195
+ });
196
+ },
197
+ /**
198
+ * Returns data about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Deal ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days.
199
+ * @summary Get Lead conversion status (BETA)
200
+ * @param {string} id The ID of a lead
201
+ * @param {string} conversion_id The ID of the conversion
202
+
203
+ * @throws {RequiredError}
204
+ */
205
+ getLeadConversionStatus(id, conversion_id) {
206
+ return __awaiter(this, void 0, void 0, function* () {
207
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getLeadConversionStatus(id, conversion_id);
208
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
209
+ });
210
+ },
108
211
  /**
109
212
  * Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID.
110
213
  * @summary Search leads
@@ -134,6 +237,26 @@ export const LeadsApiFp = function (configuration) {
134
237
  export const LeadsApiFactory = function (configuration, basePath, axios) {
135
238
  const localVarFp = LeadsApiFp(configuration);
136
239
  return {
240
+ /**
241
+ * Initiates a conversion of a lead to a deal. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. If the conversion is successful, the lead is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the <a href=\"https://developers.pipedrive.com/docs/api/v1/Leads#getLeadConversionStatus\">/api/v2/leads/{lead_id}/convert/status/{conversion_id}</a> endpoint.
242
+ * @summary Convert a lead to a deal (BETA)
243
+ * @param {LeadsApiConvertLeadToDealRequest} requestParameters Request parameters.
244
+
245
+ * @throws {RequiredError}
246
+ */
247
+ convertLeadToDeal(requestParameters) {
248
+ return localVarFp.convertLeadToDeal(requestParameters.id, requestParameters.ConvertLeadToDealRequest).then((request) => request(axios, basePath));
249
+ },
250
+ /**
251
+ * Returns data about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Deal ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days.
252
+ * @summary Get Lead conversion status (BETA)
253
+ * @param {LeadsApiGetLeadConversionStatusRequest} requestParameters Request parameters.
254
+
255
+ * @throws {RequiredError}
256
+ */
257
+ getLeadConversionStatus(requestParameters) {
258
+ return localVarFp.getLeadConversionStatus(requestParameters.id, requestParameters.conversion_id).then((request) => request(axios, basePath));
259
+ },
137
260
  /**
138
261
  * Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID.
139
262
  * @summary Search leads
@@ -153,6 +276,28 @@ export const LeadsApiFactory = function (configuration, basePath, axios) {
153
276
  * @extends {BaseAPI}
154
277
  */
155
278
  export class LeadsApi extends BaseAPI {
279
+ /**
280
+ * Initiates a conversion of a lead to a deal. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. If the conversion is successful, the lead is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the <a href=\"https://developers.pipedrive.com/docs/api/v1/Leads#getLeadConversionStatus\">/api/v2/leads/{lead_id}/convert/status/{conversion_id}</a> endpoint.
281
+ * @summary Convert a lead to a deal (BETA)
282
+ * @param {LeadsApiConvertLeadToDealRequest} requestParameters Request parameters.
283
+
284
+ * @throws {RequiredError}
285
+ * @memberof LeadsApi
286
+ */
287
+ convertLeadToDeal(requestParameters) {
288
+ return LeadsApiFp(this.configuration).convertLeadToDeal(requestParameters.id, requestParameters.ConvertLeadToDealRequest).then((request) => request(this.axios, this.basePath));
289
+ }
290
+ /**
291
+ * Returns data about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Deal ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days.
292
+ * @summary Get Lead conversion status (BETA)
293
+ * @param {LeadsApiGetLeadConversionStatusRequest} requestParameters Request parameters.
294
+
295
+ * @throws {RequiredError}
296
+ * @memberof LeadsApi
297
+ */
298
+ getLeadConversionStatus(requestParameters) {
299
+ return LeadsApiFp(this.configuration).getLeadConversionStatus(requestParameters.id, requestParameters.conversion_id).then((request) => request(this.axios, this.basePath));
300
+ }
156
301
  /**
157
302
  * Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID.
158
303
  * @summary Search leads
@@ -29,7 +29,7 @@ import { UpsertPersonResponse } from '../models';
29
29
  */
30
30
  export declare const PersonsApiAxiosParamCreator: (configuration?: Configuration) => {
31
31
  /**
32
- * Adds a new person.
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
33
  * @summary Add a new person
34
34
  * @param {AddPersonRequest} [AddPersonRequest]
35
35
 
@@ -126,7 +126,7 @@ export declare const PersonsApiAxiosParamCreator: (configuration?: Configuration
126
126
  */
127
127
  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>;
128
128
  /**
129
- * Updates the properties of a person.
129
+ * 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.
130
130
  * @summary Update a person
131
131
  * @param {number} id The ID of the person
132
132
  * @param {UpdatePersonRequest} [UpdatePersonRequest]
@@ -141,7 +141,7 @@ export declare const PersonsApiAxiosParamCreator: (configuration?: Configuration
141
141
  */
142
142
  export declare const PersonsApiFp: (configuration?: Configuration) => {
143
143
  /**
144
- * Adds a new person.
144
+ * 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.
145
145
  * @summary Add a new person
146
146
  * @param {AddPersonRequest} [AddPersonRequest]
147
147
 
@@ -238,7 +238,7 @@ export declare const PersonsApiFp: (configuration?: Configuration) => {
238
238
  */
239
239
  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>>;
240
240
  /**
241
- * Updates the properties of a person.
241
+ * 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.
242
242
  * @summary Update a person
243
243
  * @param {number} id The ID of the person
244
244
  * @param {UpdatePersonRequest} [UpdatePersonRequest]
@@ -253,7 +253,7 @@ export declare const PersonsApiFp: (configuration?: Configuration) => {
253
253
  */
254
254
  export declare const PersonsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
255
255
  /**
256
- * Adds a new person.
256
+ * 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.
257
257
  * @summary Add a new person
258
258
  * @param {PersonsApiAddPersonRequest} requestParameters Request parameters.
259
259
 
@@ -325,7 +325,7 @@ export declare const PersonsApiFactory: (configuration?: Configuration, basePath
325
325
  */
326
326
  searchPersons(requestParameters: PersonsApiSearchPersonsRequest): Promise<GetPersonSearchResponse>;
327
327
  /**
328
- * Updates the properties of a person.
328
+ * 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.
329
329
  * @summary Update a person
330
330
  * @param {PersonsApiUpdatePersonRequest} requestParameters Request parameters.
331
331
 
@@ -627,7 +627,7 @@ export interface PersonsApiUpdatePersonRequest {
627
627
  */
628
628
  export declare class PersonsApi extends BaseAPI {
629
629
  /**
630
- * Adds a new person.
630
+ * 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.
631
631
  * @summary Add a new person
632
632
  * @param {PersonsApiAddPersonRequest} requestParameters Request parameters.
633
633
 
@@ -708,7 +708,7 @@ export declare class PersonsApi extends BaseAPI {
708
708
  */
709
709
  searchPersons(requestParameters: PersonsApiSearchPersonsRequest): Promise<GetPersonSearchResponse>;
710
710
  /**
711
- * Updates the properties of a person.
711
+ * 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.
712
712
  * @summary Update a person
713
713
  * @param {PersonsApiUpdatePersonRequest} requestParameters Request parameters.
714
714
 
@@ -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.
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.
37
37
  * @summary Add a new person
38
38
  * @param {AddPersonRequest} [AddPersonRequest]
39
39
 
@@ -439,7 +439,7 @@ export const PersonsApiAxiosParamCreator = function (configuration) {
439
439
  };
440
440
  }),
441
441
  /**
442
- * Updates the properties of a person.
442
+ * 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.
443
443
  * @summary Update a person
444
444
  * @param {number} id The ID of the person
445
445
  * @param {UpdatePersonRequest} [UpdatePersonRequest]
@@ -485,7 +485,7 @@ export const PersonsApiFp = function (configuration) {
485
485
  const localVarAxiosParamCreator = PersonsApiAxiosParamCreator(configuration);
486
486
  return {
487
487
  /**
488
- * Adds a new person.
488
+ * 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.
489
489
  * @summary Add a new person
490
490
  * @param {AddPersonRequest} [AddPersonRequest]
491
491
 
@@ -627,7 +627,7 @@ export const PersonsApiFp = function (configuration) {
627
627
  });
628
628
  },
629
629
  /**
630
- * Updates the properties of a person.
630
+ * 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.
631
631
  * @summary Update a person
632
632
  * @param {number} id The ID of the person
633
633
  * @param {UpdatePersonRequest} [UpdatePersonRequest]
@@ -650,7 +650,7 @@ export const PersonsApiFactory = function (configuration, basePath, axios) {
650
650
  const localVarFp = PersonsApiFp(configuration);
651
651
  return {
652
652
  /**
653
- * Adds a new person.
653
+ * 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.
654
654
  * @summary Add a new person
655
655
  * @param {PersonsApiAddPersonRequest} requestParameters Request parameters.
656
656
 
@@ -740,7 +740,7 @@ export const PersonsApiFactory = function (configuration, basePath, axios) {
740
740
  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));
741
741
  },
742
742
  /**
743
- * Updates the properties of a person.
743
+ * 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.
744
744
  * @summary Update a person
745
745
  * @param {PersonsApiUpdatePersonRequest} requestParameters Request parameters.
746
746
 
@@ -759,7 +759,7 @@ export const PersonsApiFactory = function (configuration, basePath, axios) {
759
759
  */
760
760
  export class PersonsApi extends BaseAPI {
761
761
  /**
762
- * Adds a new person.
762
+ * 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.
763
763
  * @summary Add a new person
764
764
  * @param {PersonsApiAddPersonRequest} requestParameters Request parameters.
765
765
 
@@ -858,7 +858,7 @@ export class PersonsApi extends BaseAPI {
858
858
  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));
859
859
  }
860
860
  /**
861
- * Updates the properties of a person.
861
+ * 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.
862
862
  * @summary Update a person
863
863
  * @param {PersonsApiUpdatePersonRequest} requestParameters Request parameters.
864
864
 
@@ -91,7 +91,7 @@ export const ProductsApiAxiosParamCreator = function (configuration) {
91
91
  yield setApiKeyToObject(localVarQueryParameter, "api_token", configuration);
92
92
  // authentication oauth2 required
93
93
  // oauth required
94
- yield setOAuthToObject(localVarHeaderParameter, "oauth2", [], configuration);
94
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:full"], configuration);
95
95
  localVarHeaderParameter['Content-Type'] = 'application/json';
96
96
  setSearchParams(localVarUrlObj, localVarQueryParameter);
97
97
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -10,8 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { Configuration } from './configuration';
13
- import type { AxiosError, AxiosResponse, AxiosRequestConfig, InternalAxiosRequestConfig } from 'axios';
14
- import axios from 'axios';
13
+ import type { AxiosError, AxiosResponse, AxiosRequestConfig, InternalAxiosRequestConfig, AxiosInstance } from 'axios';
15
14
  export declare const BASE_PATH: string;
16
15
  /**
17
16
  *
@@ -43,7 +42,7 @@ export declare const errorInterceptor: (error: AxiosError) => Promise<never>;
43
42
  export declare class BaseAPI {
44
43
  protected configuration: Configuration | undefined;
45
44
  protected basePath: string;
46
- protected axios: axios.AxiosInstance;
45
+ protected axios: AxiosInstance;
47
46
  constructor(configuration: Configuration);
48
47
  }
49
48
  /**
@@ -9,7 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import axios from "axios";
12
+ import { AxiosResponse } from "axios";
13
13
  export type TokenResponse = {
14
14
  access_token: string;
15
15
  refresh_token: string;
@@ -54,7 +54,7 @@ export declare class OAuth2Configuration {
54
54
  * Revoke Refresh Token aka marking an app uninstalled or revoke the Access Token.
55
55
  * @param {String} tokenTypeHint values can be: 'access_token' or 'refresh_token'.
56
56
  */
57
- revokeToken(tokenTypeHint?: 'access_token' | 'refresh_token'): Promise<axios.AxiosResponse<any, any>>;
57
+ revokeToken(tokenTypeHint?: 'access_token' | 'refresh_token'): Promise<AxiosResponse<any, any>>;
58
58
  private validateParam;
59
59
  }
60
60
  export interface ConfigurationParameters {
@@ -39,6 +39,11 @@ export interface ActivityItem {
39
39
  */
40
40
  'owner_id'?: number;
41
41
  /**
42
+ * The ID of the user who created the activity
43
+ * @type {number}
44
+ */
45
+ 'creator_user_id'?: number;
46
+ /**
42
47
  * Whether the activity is deleted or not
43
48
  * @type {boolean}
44
49
  */
@@ -39,6 +39,11 @@ export interface ActivityItem1 {
39
39
  */
40
40
  'owner_id'?: number;
41
41
  /**
42
+ * The ID of the user who created the activity
43
+ * @type {number}
44
+ */
45
+ 'creator_user_id'?: number;
46
+ /**
42
47
  * Whether the activity is deleted or not
43
48
  * @type {boolean}
44
49
  */
@@ -0,0 +1,23 @@
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
+ /**
13
+ * An object containing conversion job id that performs the conversion
14
+ * @export
15
+ * @interface AddConvertDealToLeadResponseData
16
+ */
17
+ export interface AddConvertDealToLeadResponseData {
18
+ /**
19
+ * The ID of the conversion job that can be used to retrieve conversion status and details. The ID has UUID format.
20
+ * @type {string}
21
+ */
22
+ 'conversion_id': string;
23
+ }
@@ -0,0 +1,14 @@
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 {};
@@ -0,0 +1,34 @@
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 { AddConvertDealToLeadResponseData } from './add-convert-deal-to-lead-response-data';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface AddConvertDealToLeadResponse
17
+ */
18
+ export interface AddConvertDealToLeadResponse {
19
+ /**
20
+ *
21
+ * @type {boolean}
22
+ */
23
+ 'success'?: boolean;
24
+ /**
25
+ *
26
+ * @type {AddConvertDealToLeadResponseData}
27
+ */
28
+ 'data'?: AddConvertDealToLeadResponseData;
29
+ /**
30
+ *
31
+ * @type {object}
32
+ */
33
+ 'additional_data'?: object | null;
34
+ }
@@ -0,0 +1,14 @@
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 {};
@@ -0,0 +1,34 @@
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 { AddConvertDealToLeadResponseData } from './add-convert-deal-to-lead-response-data';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface AddConvertLeadToDealResponse
17
+ */
18
+ export interface AddConvertLeadToDealResponse {
19
+ /**
20
+ *
21
+ * @type {boolean}
22
+ */
23
+ 'success'?: boolean;
24
+ /**
25
+ *
26
+ * @type {AddConvertDealToLeadResponseData}
27
+ */
28
+ 'data'?: AddConvertDealToLeadResponseData;
29
+ /**
30
+ *
31
+ * @type {object}
32
+ */
33
+ 'additional_data'?: object | null;
34
+ }
@@ -0,0 +1,14 @@
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 {};
@@ -62,4 +62,16 @@ export interface AddPersonRequest {
62
62
  * @type {Array<number>}
63
63
  */
64
64
  'label_ids'?: Array<number>;
65
+ /**
66
+ * 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
+ * @type {string}
68
+ */
69
+ 'marketing_status'?: AddPersonRequestMarketingStatusConst;
65
70
  }
71
+ export declare const AddPersonRequestMarketingStatusConst: {
72
+ readonly no_consent: "no_consent";
73
+ readonly unsubscribed: "unsubscribed";
74
+ readonly subscribed: "subscribed";
75
+ readonly archived: "archived";
76
+ };
77
+ export type AddPersonRequestMarketingStatusConst = typeof AddPersonRequestMarketingStatusConst[keyof typeof AddPersonRequestMarketingStatusConst];
@@ -11,4 +11,9 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
- export {};
14
+ export const AddPersonRequestMarketingStatusConst = {
15
+ no_consent: 'no_consent',
16
+ unsubscribed: 'unsubscribed',
17
+ subscribed: 'subscribed',
18
+ archived: 'archived'
19
+ };
@@ -0,0 +1,28 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface ConvertLeadToDealRequest
16
+ */
17
+ export interface ConvertLeadToDealRequest {
18
+ /**
19
+ * The ID of a stage the created deal will be added to. Please note that a pipeline will be assigned automatically based on the `stage_id`. If omitted, the deal will be placed in the first stage of the default pipeline.
20
+ * @type {number}
21
+ */
22
+ 'stage_id'?: number;
23
+ /**
24
+ * The ID of a pipeline the created deal will be added to. By default, the deal will be added to the first stage of the specified pipeline. Please note that `pipeline_id` and `stage_id` should not be used together as `pipeline_id` will be ignored.
25
+ * @type {number}
26
+ */
27
+ 'pipeline_id'?: number;
28
+ }
@@ -0,0 +1,14 @@
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 {};
@@ -76,6 +76,11 @@ export interface DealItem {
76
76
  */
77
77
  'stage_change_time'?: string;
78
78
  /**
79
+ * Whether the deal is archived or not
80
+ * @type {boolean}
81
+ */
82
+ 'is_archived'?: boolean;
83
+ /**
79
84
  * Whether the deal is deleted or not
80
85
  * @type {boolean}
81
86
  */
@@ -76,6 +76,11 @@ export interface DealItem1 {
76
76
  */
77
77
  'stage_change_time'?: string;
78
78
  /**
79
+ * Whether the deal is archived or not
80
+ * @type {boolean}
81
+ */
82
+ 'is_archived'?: boolean;
83
+ /**
79
84
  * Whether the deal is deleted or not
80
85
  * @type {boolean}
81
86
  */