pipedrive 24.2.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 (223) 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 +413 -91
  4. package/dist/esm/versions/v1/api/deals-api.js +419 -90
  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 +71 -71
  12. package/dist/esm/versions/v1/api/organizations-api.js +70 -70
  13. package/dist/esm/versions/v1/api/persons-api.d.ts +59 -59
  14. package/dist/esm/versions/v1/api/persons-api.js +58 -58
  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/api/subscriptions-api.d.ts +36 -36
  22. package/dist/esm/versions/v1/api/subscriptions-api.js +36 -36
  23. package/dist/esm/versions/v1/api/webhooks-api.d.ts +4 -4
  24. package/dist/esm/versions/v1/api/webhooks-api.js +4 -4
  25. package/dist/esm/versions/v1/base.d.ts +2 -3
  26. package/dist/esm/versions/v1/configuration.d.ts +2 -2
  27. package/dist/esm/versions/v1/models/add-note-request-all-of.d.ts +9 -4
  28. package/dist/esm/versions/v1/models/add-note-request-all-of1.d.ts +10 -0
  29. package/dist/esm/versions/v1/models/add-note-request-all-of1.js +4 -0
  30. package/dist/esm/versions/v1/models/add-webhook-request.d.ts +5 -6
  31. package/dist/esm/versions/v1/models/add-webhook-request.js +4 -5
  32. package/dist/esm/versions/v1/models/get-deal-search-response-all-of-data-items-inner-item.d.ts +5 -0
  33. package/dist/esm/versions/v1/models/index.d.ts +1 -0
  34. package/dist/esm/versions/v1/models/index.js +1 -0
  35. package/dist/esm/versions/v1/models/note-project.d.ts +23 -0
  36. package/dist/esm/versions/v1/models/note-project.js +14 -0
  37. package/dist/esm/versions/v1/models/note-request-all-of1.d.ts +5 -0
  38. package/dist/esm/versions/v1/models/note.d.ts +16 -0
  39. package/dist/esm/versions/v1/models/user-access.d.ts +3 -2
  40. package/dist/esm/versions/v1/models/user-access.js +4 -3
  41. package/dist/esm/versions/v1/models/user-access1.d.ts +3 -2
  42. package/dist/esm/versions/v1/models/user-access1.js +4 -3
  43. package/dist/esm/versions/v2/api/activities-api.d.ts +15 -7
  44. package/dist/esm/versions/v2/api/activities-api.js +12 -7
  45. package/dist/esm/versions/v2/api/beta-api.d.ts +194 -2532
  46. package/dist/esm/versions/v2/api/beta-api.js +263 -2928
  47. package/dist/esm/versions/v2/api/deals-api.d.ts +509 -4
  48. package/dist/esm/versions/v2/api/deals-api.js +589 -4
  49. package/dist/esm/versions/v2/api/leads-api.d.ts +111 -0
  50. package/dist/esm/versions/v2/api/leads-api.js +146 -1
  51. package/dist/esm/versions/v2/api/organizations-api.d.ts +237 -0
  52. package/dist/esm/versions/v2/api/organizations-api.js +301 -0
  53. package/dist/esm/versions/v2/api/persons-api.d.ts +245 -8
  54. package/dist/esm/versions/v2/api/persons-api.js +309 -8
  55. package/dist/esm/versions/v2/api/products-api.d.ts +237 -0
  56. package/dist/esm/versions/v2/api/products-api.js +301 -0
  57. package/dist/esm/versions/v2/api/users-api.d.ts +103 -0
  58. package/dist/esm/versions/v2/api/users-api.js +140 -0
  59. package/dist/esm/versions/v2/api.d.ts +1 -0
  60. package/dist/esm/versions/v2/api.js +1 -0
  61. package/dist/esm/versions/v2/base.d.ts +2 -3
  62. package/dist/esm/versions/v2/configuration.d.ts +2 -2
  63. package/dist/esm/versions/v2/models/activity-item.d.ts +5 -0
  64. package/dist/esm/versions/v2/models/activity-item1.d.ts +5 -0
  65. package/dist/esm/versions/v2/models/add-convert-deal-to-lead-response-data.d.ts +23 -0
  66. package/dist/esm/versions/v2/models/add-convert-deal-to-lead-response-data.js +14 -0
  67. package/dist/esm/versions/v2/models/add-convert-deal-to-lead-response.d.ts +34 -0
  68. package/dist/esm/versions/v2/models/add-convert-deal-to-lead-response.js +14 -0
  69. package/dist/esm/versions/v2/models/add-convert-lead-to-deal-response.d.ts +34 -0
  70. package/dist/esm/versions/v2/models/add-convert-lead-to-deal-response.js +14 -0
  71. package/dist/esm/versions/v2/models/add-deal-follower-request.d.ts +23 -0
  72. package/dist/esm/versions/v2/models/add-deal-follower-request.js +14 -0
  73. package/dist/esm/versions/v2/models/add-follower-response-all-of.d.ts +24 -0
  74. package/dist/esm/versions/v2/models/add-follower-response-all-of.js +14 -0
  75. package/dist/esm/versions/v2/models/add-follower-response.d.ts +18 -0
  76. package/dist/esm/versions/v2/models/add-follower-response.js +14 -0
  77. package/dist/esm/versions/v2/models/add-person-request.d.ts +12 -0
  78. package/dist/esm/versions/v2/models/add-person-request.js +6 -1
  79. package/dist/esm/versions/v2/models/convert-lead-to-deal-request.d.ts +28 -0
  80. package/dist/esm/versions/v2/models/convert-lead-to-deal-request.js +14 -0
  81. package/dist/esm/versions/v2/models/deal-item.d.ts +5 -0
  82. package/dist/esm/versions/v2/models/deal-item1.d.ts +5 -0
  83. package/dist/esm/versions/v2/models/delete-follower-response-data.d.ts +23 -0
  84. package/dist/esm/versions/v2/models/delete-follower-response-data.js +14 -0
  85. package/dist/esm/versions/v2/models/delete-follower-response.d.ts +29 -0
  86. package/dist/esm/versions/v2/models/delete-follower-response.js +14 -0
  87. package/dist/esm/versions/v2/models/follower-changelog-item.d.ts +38 -0
  88. package/dist/esm/versions/v2/models/follower-changelog-item.js +14 -0
  89. package/dist/esm/versions/v2/models/follower-item.d.ts +28 -0
  90. package/dist/esm/versions/v2/models/follower-item.js +14 -0
  91. package/dist/esm/versions/v2/models/follower-item1.d.ts +28 -0
  92. package/dist/esm/versions/v2/models/follower-item1.js +14 -0
  93. package/dist/esm/versions/v2/models/get-convert-response.d.ts +43 -0
  94. package/dist/esm/versions/v2/models/get-convert-response.js +14 -0
  95. package/dist/esm/versions/v2/models/get-convert-response1-data.d.ts +46 -0
  96. package/dist/esm/versions/v2/models/get-convert-response1-data.js +20 -0
  97. package/dist/esm/versions/v2/models/get-convert-response1.d.ts +34 -0
  98. package/dist/esm/versions/v2/models/get-convert-response1.js +14 -0
  99. package/dist/esm/versions/v2/models/get-deal-search-response-all-of-data-items-inner-item.d.ts +5 -0
  100. package/dist/esm/versions/v2/models/get-follower-changelogs-response-all-of.d.ts +30 -0
  101. package/dist/esm/versions/v2/models/get-follower-changelogs-response-all-of.js +14 -0
  102. package/dist/esm/versions/v2/models/get-follower-changelogs-response.d.ts +18 -0
  103. package/dist/esm/versions/v2/models/get-follower-changelogs-response.js +14 -0
  104. package/dist/esm/versions/v2/models/get-followers-response-all-of.d.ts +30 -0
  105. package/dist/esm/versions/v2/models/get-followers-response-all-of.js +14 -0
  106. package/dist/esm/versions/v2/models/get-followers-response.d.ts +18 -0
  107. package/dist/esm/versions/v2/models/get-followers-response.js +14 -0
  108. package/dist/esm/versions/v2/models/index.d.ts +19 -0
  109. package/dist/esm/versions/v2/models/index.js +19 -0
  110. package/dist/esm/versions/v2/models/update-person-request.d.ts +12 -0
  111. package/dist/esm/versions/v2/models/update-person-request.js +6 -1
  112. package/dist/versions/v1/api/activities-api.d.ts +40 -40
  113. package/dist/versions/v1/api/activities-api.js +40 -40
  114. package/dist/versions/v1/api/deals-api.d.ts +413 -91
  115. package/dist/versions/v1/api/deals-api.js +419 -90
  116. package/dist/versions/v1/api/item-search-api.d.ts +8 -8
  117. package/dist/versions/v1/api/item-search-api.js +8 -8
  118. package/dist/versions/v1/api/leads-api.d.ts +100 -14
  119. package/dist/versions/v1/api/leads-api.js +107 -14
  120. package/dist/versions/v1/api/notes-api.d.ts +18 -2
  121. package/dist/versions/v1/api/notes-api.js +15 -5
  122. package/dist/versions/v1/api/organizations-api.d.ts +71 -71
  123. package/dist/versions/v1/api/organizations-api.js +70 -70
  124. package/dist/versions/v1/api/persons-api.d.ts +59 -59
  125. package/dist/versions/v1/api/persons-api.js +58 -58
  126. package/dist/versions/v1/api/pipelines-api.d.ts +28 -28
  127. package/dist/versions/v1/api/pipelines-api.js +28 -28
  128. package/dist/versions/v1/api/products-api.d.ts +24 -24
  129. package/dist/versions/v1/api/products-api.js +24 -24
  130. package/dist/versions/v1/api/stages-api.d.ts +36 -36
  131. package/dist/versions/v1/api/stages-api.js +36 -36
  132. package/dist/versions/v1/api/subscriptions-api.d.ts +36 -36
  133. package/dist/versions/v1/api/subscriptions-api.js +36 -36
  134. package/dist/versions/v1/api/webhooks-api.d.ts +4 -4
  135. package/dist/versions/v1/api/webhooks-api.js +4 -4
  136. package/dist/versions/v1/base.d.ts +2 -3
  137. package/dist/versions/v1/configuration.d.ts +2 -2
  138. package/dist/versions/v1/models/add-note-request-all-of.d.ts +9 -4
  139. package/dist/versions/v1/models/add-note-request-all-of1.d.ts +10 -0
  140. package/dist/versions/v1/models/add-note-request-all-of1.js +5 -1
  141. package/dist/versions/v1/models/add-webhook-request.d.ts +5 -6
  142. package/dist/versions/v1/models/add-webhook-request.js +4 -5
  143. package/dist/versions/v1/models/get-deal-search-response-all-of-data-items-inner-item.d.ts +5 -0
  144. package/dist/versions/v1/models/index.d.ts +1 -0
  145. package/dist/versions/v1/models/index.js +1 -0
  146. package/dist/versions/v1/models/note-project.d.ts +23 -0
  147. package/dist/versions/v1/models/note-project.js +15 -0
  148. package/dist/versions/v1/models/note-request-all-of1.d.ts +5 -0
  149. package/dist/versions/v1/models/note.d.ts +16 -0
  150. package/dist/versions/v1/models/user-access.d.ts +3 -2
  151. package/dist/versions/v1/models/user-access.js +4 -3
  152. package/dist/versions/v1/models/user-access1.d.ts +3 -2
  153. package/dist/versions/v1/models/user-access1.js +4 -3
  154. package/dist/versions/v2/api/activities-api.d.ts +15 -7
  155. package/dist/versions/v2/api/activities-api.js +12 -7
  156. package/dist/versions/v2/api/beta-api.d.ts +194 -2532
  157. package/dist/versions/v2/api/beta-api.js +265 -2930
  158. package/dist/versions/v2/api/deals-api.d.ts +509 -4
  159. package/dist/versions/v2/api/deals-api.js +589 -4
  160. package/dist/versions/v2/api/leads-api.d.ts +111 -0
  161. package/dist/versions/v2/api/leads-api.js +145 -0
  162. package/dist/versions/v2/api/organizations-api.d.ts +237 -0
  163. package/dist/versions/v2/api/organizations-api.js +301 -0
  164. package/dist/versions/v2/api/persons-api.d.ts +245 -8
  165. package/dist/versions/v2/api/persons-api.js +309 -8
  166. package/dist/versions/v2/api/products-api.d.ts +237 -0
  167. package/dist/versions/v2/api/products-api.js +301 -0
  168. package/dist/versions/v2/api/users-api.d.ts +103 -0
  169. package/dist/versions/v2/api/users-api.js +150 -0
  170. package/dist/versions/v2/api.d.ts +1 -0
  171. package/dist/versions/v2/api.js +1 -0
  172. package/dist/versions/v2/base.d.ts +2 -3
  173. package/dist/versions/v2/configuration.d.ts +2 -2
  174. package/dist/versions/v2/models/activity-item.d.ts +5 -0
  175. package/dist/versions/v2/models/activity-item1.d.ts +5 -0
  176. package/dist/versions/v2/models/add-convert-deal-to-lead-response-data.d.ts +23 -0
  177. package/dist/versions/v2/models/add-convert-deal-to-lead-response-data.js +15 -0
  178. package/dist/versions/v2/models/add-convert-deal-to-lead-response.d.ts +34 -0
  179. package/dist/versions/v2/models/add-convert-deal-to-lead-response.js +15 -0
  180. package/dist/versions/v2/models/add-convert-lead-to-deal-response.d.ts +34 -0
  181. package/dist/versions/v2/models/add-convert-lead-to-deal-response.js +15 -0
  182. package/dist/versions/v2/models/add-deal-follower-request.d.ts +23 -0
  183. package/dist/versions/v2/models/add-deal-follower-request.js +15 -0
  184. package/dist/versions/v2/models/add-follower-response-all-of.d.ts +24 -0
  185. package/dist/versions/v2/models/add-follower-response-all-of.js +15 -0
  186. package/dist/versions/v2/models/add-follower-response.d.ts +18 -0
  187. package/dist/versions/v2/models/add-follower-response.js +15 -0
  188. package/dist/versions/v2/models/add-person-request.d.ts +12 -0
  189. package/dist/versions/v2/models/add-person-request.js +7 -0
  190. package/dist/versions/v2/models/convert-lead-to-deal-request.d.ts +28 -0
  191. package/dist/versions/v2/models/convert-lead-to-deal-request.js +15 -0
  192. package/dist/versions/v2/models/deal-item.d.ts +5 -0
  193. package/dist/versions/v2/models/deal-item1.d.ts +5 -0
  194. package/dist/versions/v2/models/delete-follower-response-data.d.ts +23 -0
  195. package/dist/versions/v2/models/delete-follower-response-data.js +15 -0
  196. package/dist/versions/v2/models/delete-follower-response.d.ts +29 -0
  197. package/dist/versions/v2/models/delete-follower-response.js +15 -0
  198. package/dist/versions/v2/models/follower-changelog-item.d.ts +38 -0
  199. package/dist/versions/v2/models/follower-changelog-item.js +15 -0
  200. package/dist/versions/v2/models/follower-item.d.ts +28 -0
  201. package/dist/versions/v2/models/follower-item.js +15 -0
  202. package/dist/versions/v2/models/follower-item1.d.ts +28 -0
  203. package/dist/versions/v2/models/follower-item1.js +15 -0
  204. package/dist/versions/v2/models/get-convert-response.d.ts +43 -0
  205. package/dist/versions/v2/models/get-convert-response.js +15 -0
  206. package/dist/versions/v2/models/get-convert-response1-data.d.ts +46 -0
  207. package/dist/versions/v2/models/get-convert-response1-data.js +23 -0
  208. package/dist/versions/v2/models/get-convert-response1.d.ts +34 -0
  209. package/dist/versions/v2/models/get-convert-response1.js +15 -0
  210. package/dist/versions/v2/models/get-deal-search-response-all-of-data-items-inner-item.d.ts +5 -0
  211. package/dist/versions/v2/models/get-follower-changelogs-response-all-of.d.ts +30 -0
  212. package/dist/versions/v2/models/get-follower-changelogs-response-all-of.js +15 -0
  213. package/dist/versions/v2/models/get-follower-changelogs-response.d.ts +18 -0
  214. package/dist/versions/v2/models/get-follower-changelogs-response.js +15 -0
  215. package/dist/versions/v2/models/get-followers-response-all-of.d.ts +30 -0
  216. package/dist/versions/v2/models/get-followers-response-all-of.js +15 -0
  217. package/dist/versions/v2/models/get-followers-response.d.ts +18 -0
  218. package/dist/versions/v2/models/get-followers-response.js +15 -0
  219. package/dist/versions/v2/models/index.d.ts +19 -0
  220. package/dist/versions/v2/models/index.js +19 -0
  221. package/dist/versions/v2/models/update-person-request.d.ts +12 -0
  222. package/dist/versions/v2/models/update-person-request.js +7 -0
  223. package/package.json +1 -1
@@ -12,12 +12,33 @@
12
12
  import type { Configuration } from '../configuration';
13
13
  import type { AxiosInstance } from 'axios';
14
14
  import { RequestArgs, BaseAPI } from '../base';
15
+ import { AddConvertLeadToDealResponse } from '../models';
16
+ import { ConvertLeadToDealRequest } from '../models';
17
+ import { GetConvertResponse1 } from '../models';
15
18
  import { GetLeadSearchResponse } from '../models';
16
19
  /**
17
20
  * LeadsApi - axios parameter creator
18
21
  * @export
19
22
  */
20
23
  export declare const LeadsApiAxiosParamCreator: (configuration?: Configuration) => {
24
+ /**
25
+ * 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.
26
+ * @summary Convert a lead to a deal (BETA)
27
+ * @param {string} id The ID of the lead to convert
28
+ * @param {ConvertLeadToDealRequest} [ConvertLeadToDealRequest]
29
+
30
+ * @throws {RequiredError}
31
+ */
32
+ convertLeadToDeal: (id: string, ConvertLeadToDealRequest?: ConvertLeadToDealRequest) => Promise<RequestArgs>;
33
+ /**
34
+ * 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.
35
+ * @summary Get Lead conversion status (BETA)
36
+ * @param {string} id The ID of a lead
37
+ * @param {string} conversion_id The ID of the conversion
38
+
39
+ * @throws {RequiredError}
40
+ */
41
+ getLeadConversionStatus: (id: string, conversion_id: string) => Promise<RequestArgs>;
21
42
  /**
22
43
  * 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.
23
44
  * @summary Search leads
@@ -39,6 +60,24 @@ export declare const LeadsApiAxiosParamCreator: (configuration?: Configuration)
39
60
  * @export
40
61
  */
41
62
  export declare const LeadsApiFp: (configuration?: Configuration) => {
63
+ /**
64
+ * 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.
65
+ * @summary Convert a lead to a deal (BETA)
66
+ * @param {string} id The ID of the lead to convert
67
+ * @param {ConvertLeadToDealRequest} [ConvertLeadToDealRequest]
68
+
69
+ * @throws {RequiredError}
70
+ */
71
+ convertLeadToDeal(id: string, ConvertLeadToDealRequest?: ConvertLeadToDealRequest): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AddConvertLeadToDealResponse>>;
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: string, conversion_id: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetConvertResponse1>>;
42
81
  /**
43
82
  * 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.
44
83
  * @summary Search leads
@@ -60,6 +99,22 @@ export declare const LeadsApiFp: (configuration?: Configuration) => {
60
99
  * @export
61
100
  */
62
101
  export declare const LeadsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
102
+ /**
103
+ * 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.
104
+ * @summary Convert a lead to a deal (BETA)
105
+ * @param {LeadsApiConvertLeadToDealRequest} requestParameters Request parameters.
106
+
107
+ * @throws {RequiredError}
108
+ */
109
+ convertLeadToDeal(requestParameters: LeadsApiConvertLeadToDealRequest): Promise<AddConvertLeadToDealResponse>;
110
+ /**
111
+ * 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.
112
+ * @summary Get Lead conversion status (BETA)
113
+ * @param {LeadsApiGetLeadConversionStatusRequest} requestParameters Request parameters.
114
+
115
+ * @throws {RequiredError}
116
+ */
117
+ getLeadConversionStatus(requestParameters: LeadsApiGetLeadConversionStatusRequest): Promise<GetConvertResponse1>;
63
118
  /**
64
119
  * 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.
65
120
  * @summary Search leads
@@ -69,6 +124,44 @@ export declare const LeadsApiFactory: (configuration?: Configuration, basePath?:
69
124
  */
70
125
  searchLeads(requestParameters: LeadsApiSearchLeadsRequest): Promise<GetLeadSearchResponse>;
71
126
  };
127
+ /**
128
+ * Request parameters for convertLeadToDeal operation in LeadsApi.
129
+ * @export
130
+ * @interface LeadsApiConvertLeadToDealRequest
131
+ */
132
+ export interface LeadsApiConvertLeadToDealRequest {
133
+ /**
134
+ * The ID of the lead to convert
135
+ * @type {string}
136
+ * @memberof LeadsApiConvertLeadToDeal
137
+ */
138
+ readonly id: string;
139
+ /**
140
+ *
141
+ * @type {ConvertLeadToDealRequest}
142
+ * @memberof LeadsApiConvertLeadToDeal
143
+ */
144
+ readonly ConvertLeadToDealRequest?: ConvertLeadToDealRequest;
145
+ }
146
+ /**
147
+ * Request parameters for getLeadConversionStatus operation in LeadsApi.
148
+ * @export
149
+ * @interface LeadsApiGetLeadConversionStatusRequest
150
+ */
151
+ export interface LeadsApiGetLeadConversionStatusRequest {
152
+ /**
153
+ * The ID of a lead
154
+ * @type {string}
155
+ * @memberof LeadsApiGetLeadConversionStatus
156
+ */
157
+ readonly id: string;
158
+ /**
159
+ * The ID of the conversion
160
+ * @type {string}
161
+ * @memberof LeadsApiGetLeadConversionStatus
162
+ */
163
+ readonly conversion_id: string;
164
+ }
72
165
  /**
73
166
  * Request parameters for searchLeads operation in LeadsApi.
74
167
  * @export
@@ -131,6 +224,24 @@ export interface LeadsApiSearchLeadsRequest {
131
224
  * @extends {BaseAPI}
132
225
  */
133
226
  export declare class LeadsApi extends BaseAPI {
227
+ /**
228
+ * 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.
229
+ * @summary Convert a lead to a deal (BETA)
230
+ * @param {LeadsApiConvertLeadToDealRequest} requestParameters Request parameters.
231
+
232
+ * @throws {RequiredError}
233
+ * @memberof LeadsApi
234
+ */
235
+ convertLeadToDeal(requestParameters: LeadsApiConvertLeadToDealRequest): Promise<AddConvertLeadToDealResponse>;
236
+ /**
237
+ * 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.
238
+ * @summary Get Lead conversion status (BETA)
239
+ * @param {LeadsApiGetLeadConversionStatusRequest} requestParameters Request parameters.
240
+
241
+ * @throws {RequiredError}
242
+ * @memberof LeadsApi
243
+ */
244
+ getLeadConversionStatus(requestParameters: LeadsApiGetLeadConversionStatusRequest): Promise<GetConvertResponse1>;
134
245
  /**
135
246
  * 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.
136
247
  * @summary Search leads
@@ -38,6 +38,81 @@ const base_1 = require("../base");
38
38
  */
39
39
  const LeadsApiAxiosParamCreator = function (configuration) {
40
40
  return {
41
+ /**
42
+ * 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.
43
+ * @summary Convert a lead to a deal (BETA)
44
+ * @param {string} id The ID of the lead to convert
45
+ * @param {ConvertLeadToDealRequest} [ConvertLeadToDealRequest]
46
+
47
+ * @throws {RequiredError}
48
+ */
49
+ convertLeadToDeal: (id, ConvertLeadToDealRequest) => __awaiter(this, void 0, void 0, function* () {
50
+ // verify required parameter 'id' is not null or undefined
51
+ (0, common_1.assertParamExists)('convertLeadToDeal', 'id', id);
52
+ const localVarPath = `/leads/{id}/convert/deal`
53
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
54
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
55
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
56
+ let baseOptions;
57
+ if (configuration) {
58
+ baseOptions = configuration.baseOptions;
59
+ }
60
+ const localVarRequestOptions = Object.assign({ method: 'POST' }, baseOptions);
61
+ const localVarHeaderParameter = {};
62
+ const localVarQueryParameter = {};
63
+ // authentication api_key required
64
+ yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
65
+ // authentication oauth2 required
66
+ // oauth required
67
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["deals:full", "leads:full"], configuration);
68
+ localVarHeaderParameter['Content-Type'] = 'application/json';
69
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
70
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
71
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
72
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(ConvertLeadToDealRequest, localVarRequestOptions, configuration);
73
+ return {
74
+ url: (0, common_1.toPathString)(localVarUrlObj),
75
+ options: localVarRequestOptions,
76
+ };
77
+ }),
78
+ /**
79
+ * 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.
80
+ * @summary Get Lead conversion status (BETA)
81
+ * @param {string} id The ID of a lead
82
+ * @param {string} conversion_id The ID of the conversion
83
+
84
+ * @throws {RequiredError}
85
+ */
86
+ getLeadConversionStatus: (id, conversion_id) => __awaiter(this, void 0, void 0, function* () {
87
+ // verify required parameter 'id' is not null or undefined
88
+ (0, common_1.assertParamExists)('getLeadConversionStatus', 'id', id);
89
+ // verify required parameter 'conversion_id' is not null or undefined
90
+ (0, common_1.assertParamExists)('getLeadConversionStatus', 'conversion_id', conversion_id);
91
+ const localVarPath = `/leads/{id}/convert/status/{conversion_id}`
92
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)))
93
+ .replace(`{${"conversion_id"}}`, encodeURIComponent(String(conversion_id)));
94
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
95
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
96
+ let baseOptions;
97
+ if (configuration) {
98
+ baseOptions = configuration.baseOptions;
99
+ }
100
+ const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
101
+ const localVarHeaderParameter = {};
102
+ const localVarQueryParameter = {};
103
+ // authentication api_key required
104
+ yield (0, common_1.setApiKeyToObject)(localVarQueryParameter, "api_token", configuration);
105
+ // authentication oauth2 required
106
+ // oauth required
107
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["leads:read"], configuration);
108
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
109
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
110
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
111
+ return {
112
+ url: (0, common_1.toPathString)(localVarUrlObj),
113
+ options: localVarRequestOptions,
114
+ };
115
+ }),
41
116
  /**
42
117
  * 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.
43
118
  * @summary Search leads
@@ -112,6 +187,34 @@ exports.LeadsApiAxiosParamCreator = LeadsApiAxiosParamCreator;
112
187
  const LeadsApiFp = function (configuration) {
113
188
  const localVarAxiosParamCreator = (0, exports.LeadsApiAxiosParamCreator)(configuration);
114
189
  return {
190
+ /**
191
+ * 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.
192
+ * @summary Convert a lead to a deal (BETA)
193
+ * @param {string} id The ID of the lead to convert
194
+ * @param {ConvertLeadToDealRequest} [ConvertLeadToDealRequest]
195
+
196
+ * @throws {RequiredError}
197
+ */
198
+ convertLeadToDeal(id, ConvertLeadToDealRequest) {
199
+ return __awaiter(this, void 0, void 0, function* () {
200
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.convertLeadToDeal(id, ConvertLeadToDealRequest);
201
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
202
+ });
203
+ },
204
+ /**
205
+ * 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.
206
+ * @summary Get Lead conversion status (BETA)
207
+ * @param {string} id The ID of a lead
208
+ * @param {string} conversion_id The ID of the conversion
209
+
210
+ * @throws {RequiredError}
211
+ */
212
+ getLeadConversionStatus(id, conversion_id) {
213
+ return __awaiter(this, void 0, void 0, function* () {
214
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getLeadConversionStatus(id, conversion_id);
215
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
216
+ });
217
+ },
115
218
  /**
116
219
  * 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.
117
220
  * @summary Search leads
@@ -142,6 +245,26 @@ exports.LeadsApiFp = LeadsApiFp;
142
245
  const LeadsApiFactory = function (configuration, basePath, axios) {
143
246
  const localVarFp = (0, exports.LeadsApiFp)(configuration);
144
247
  return {
248
+ /**
249
+ * 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.
250
+ * @summary Convert a lead to a deal (BETA)
251
+ * @param {LeadsApiConvertLeadToDealRequest} requestParameters Request parameters.
252
+
253
+ * @throws {RequiredError}
254
+ */
255
+ convertLeadToDeal(requestParameters) {
256
+ return localVarFp.convertLeadToDeal(requestParameters.id, requestParameters.ConvertLeadToDealRequest).then((request) => request(axios, basePath));
257
+ },
258
+ /**
259
+ * 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.
260
+ * @summary Get Lead conversion status (BETA)
261
+ * @param {LeadsApiGetLeadConversionStatusRequest} requestParameters Request parameters.
262
+
263
+ * @throws {RequiredError}
264
+ */
265
+ getLeadConversionStatus(requestParameters) {
266
+ return localVarFp.getLeadConversionStatus(requestParameters.id, requestParameters.conversion_id).then((request) => request(axios, basePath));
267
+ },
145
268
  /**
146
269
  * 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.
147
270
  * @summary Search leads
@@ -162,6 +285,28 @@ exports.LeadsApiFactory = LeadsApiFactory;
162
285
  * @extends {BaseAPI}
163
286
  */
164
287
  class LeadsApi extends base_1.BaseAPI {
288
+ /**
289
+ * 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.
290
+ * @summary Convert a lead to a deal (BETA)
291
+ * @param {LeadsApiConvertLeadToDealRequest} requestParameters Request parameters.
292
+
293
+ * @throws {RequiredError}
294
+ * @memberof LeadsApi
295
+ */
296
+ convertLeadToDeal(requestParameters) {
297
+ return (0, exports.LeadsApiFp)(this.configuration).convertLeadToDeal(requestParameters.id, requestParameters.ConvertLeadToDealRequest).then((request) => request(this.axios, this.basePath));
298
+ }
299
+ /**
300
+ * 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.
301
+ * @summary Get Lead conversion status (BETA)
302
+ * @param {LeadsApiGetLeadConversionStatusRequest} requestParameters Request parameters.
303
+
304
+ * @throws {RequiredError}
305
+ * @memberof LeadsApi
306
+ */
307
+ getLeadConversionStatus(requestParameters) {
308
+ return (0, exports.LeadsApiFp)(this.configuration).getLeadConversionStatus(requestParameters.id, requestParameters.conversion_id).then((request) => request(this.axios, this.basePath));
309
+ }
165
310
  /**
166
311
  * 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.
167
312
  * @summary Search leads