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
@@ -30,7 +30,7 @@ export declare const ItemSearchApiAxiosParamCreator: (configuration?: Configurat
30
30
  * @param {'deal.cc_email' | 'person.picture' | 'product.price'} [include_fields] A comma-separated string array. Supports including optional fields in the results which are not provided by default.
31
31
  * @param {number} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using `search_for_related_items` parameter.
32
32
  * @param {number} [limit] Items shown per page
33
-
33
+ * @deprecated
34
34
  * @throws {RequiredError}
35
35
  */
36
36
  searchItem: (term: string, item_types?: 'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project', fields?: 'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'organization_name' | 'person_name' | 'phone' | 'title' | 'description', search_for_related_items?: boolean, exact_match?: boolean, include_fields?: 'deal.cc_email' | 'person.picture' | 'product.price', start?: number, limit?: number) => Promise<RequestArgs>;
@@ -44,7 +44,7 @@ export declare const ItemSearchApiAxiosParamCreator: (configuration?: Configurat
44
44
  * @param {boolean} [return_item_ids] Whether to return the IDs of the matching items or not. When not set or set to &#x60;0&#x60; or &#x60;false&#x60;, only distinct values of the searched field are returned. When set to &#x60;1&#x60; or &#x60;true&#x60;, the ID of each found item is returned.
45
45
  * @param {number} [start] Pagination start
46
46
  * @param {number} [limit] Items shown per page
47
-
47
+ * @deprecated
48
48
  * @throws {RequiredError}
49
49
  */
50
50
  searchItemByField: (term: string, field_type: 'dealField' | 'leadField' | 'personField' | 'organizationField' | 'productField' | 'projectField', field_key: string, exact_match?: boolean, return_item_ids?: boolean, start?: number, limit?: number) => Promise<RequestArgs>;
@@ -65,7 +65,7 @@ export declare const ItemSearchApiFp: (configuration?: Configuration) => {
65
65
  * @param {'deal.cc_email' | 'person.picture' | 'product.price'} [include_fields] A comma-separated string array. Supports including optional fields in the results which are not provided by default.
66
66
  * @param {number} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using &#x60;search_for_related_items&#x60; parameter.
67
67
  * @param {number} [limit] Items shown per page
68
-
68
+ * @deprecated
69
69
  * @throws {RequiredError}
70
70
  */
71
71
  searchItem(term: string, item_types?: 'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project', fields?: 'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'organization_name' | 'person_name' | 'phone' | 'title' | 'description', search_for_related_items?: boolean, exact_match?: boolean, include_fields?: 'deal.cc_email' | 'person.picture' | 'product.price', start?: number, limit?: number): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetItemSearchResponse>>;
@@ -79,7 +79,7 @@ export declare const ItemSearchApiFp: (configuration?: Configuration) => {
79
79
  * @param {boolean} [return_item_ids] Whether to return the IDs of the matching items or not. When not set or set to &#x60;0&#x60; or &#x60;false&#x60;, only distinct values of the searched field are returned. When set to &#x60;1&#x60; or &#x60;true&#x60;, the ID of each found item is returned.
80
80
  * @param {number} [start] Pagination start
81
81
  * @param {number} [limit] Items shown per page
82
-
82
+ * @deprecated
83
83
  * @throws {RequiredError}
84
84
  */
85
85
  searchItemByField(term: string, field_type: 'dealField' | 'leadField' | 'personField' | 'organizationField' | 'productField' | 'projectField', field_key: string, exact_match?: boolean, return_item_ids?: boolean, start?: number, limit?: number): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetItemSearchFieldResponse>>;
@@ -93,7 +93,7 @@ export declare const ItemSearchApiFactory: (configuration?: Configuration, baseP
93
93
  * Performs a search from your choice of item types and fields.
94
94
  * @summary Perform a search from multiple item types
95
95
  * @param {ItemSearchApiSearchItemRequest} requestParameters Request parameters.
96
-
96
+ * @deprecated
97
97
  * @throws {RequiredError}
98
98
  */
99
99
  searchItem(requestParameters: ItemSearchApiSearchItemRequest): Promise<GetItemSearchResponse>;
@@ -101,7 +101,7 @@ export declare const ItemSearchApiFactory: (configuration?: Configuration, baseP
101
101
  * Performs a search from the values of a specific field. Results can either be the distinct values of the field (useful for searching autocomplete field values), or the IDs of actual items (deals, leads, persons, organizations or products).
102
102
  * @summary Perform a search using a specific field from an item type
103
103
  * @param {ItemSearchApiSearchItemByFieldRequest} requestParameters Request parameters.
104
-
104
+ * @deprecated
105
105
  * @throws {RequiredError}
106
106
  */
107
107
  searchItemByField(requestParameters: ItemSearchApiSearchItemByFieldRequest): Promise<GetItemSearchFieldResponse>;
@@ -221,7 +221,7 @@ export declare class ItemSearchApi extends BaseAPI {
221
221
  * Performs a search from your choice of item types and fields.
222
222
  * @summary Perform a search from multiple item types
223
223
  * @param {ItemSearchApiSearchItemRequest} requestParameters Request parameters.
224
-
224
+ * @deprecated
225
225
  * @throws {RequiredError}
226
226
  * @memberof ItemSearchApi
227
227
  */
@@ -230,7 +230,7 @@ export declare class ItemSearchApi extends BaseAPI {
230
230
  * Performs a search from the values of a specific field. Results can either be the distinct values of the field (useful for searching autocomplete field values), or the IDs of actual items (deals, leads, persons, organizations or products).
231
231
  * @summary Perform a search using a specific field from an item type
232
232
  * @param {ItemSearchApiSearchItemByFieldRequest} requestParameters Request parameters.
233
-
233
+ * @deprecated
234
234
  * @throws {RequiredError}
235
235
  * @memberof ItemSearchApi
236
236
  */
@@ -43,7 +43,7 @@ export const ItemSearchApiAxiosParamCreator = function (configuration) {
43
43
  * @param {'deal.cc_email' | 'person.picture' | 'product.price'} [include_fields] A comma-separated string array. Supports including optional fields in the results which are not provided by default.
44
44
  * @param {number} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using &#x60;search_for_related_items&#x60; parameter.
45
45
  * @param {number} [limit] Items shown per page
46
-
46
+ * @deprecated
47
47
  * @throws {RequiredError}
48
48
  */
49
49
  searchItem: (term, item_types, fields, search_for_related_items, exact_match, include_fields, start, limit) => __awaiter(this, void 0, void 0, function* () {
@@ -106,7 +106,7 @@ export const ItemSearchApiAxiosParamCreator = function (configuration) {
106
106
  * @param {boolean} [return_item_ids] Whether to return the IDs of the matching items or not. When not set or set to &#x60;0&#x60; or &#x60;false&#x60;, only distinct values of the searched field are returned. When set to &#x60;1&#x60; or &#x60;true&#x60;, the ID of each found item is returned.
107
107
  * @param {number} [start] Pagination start
108
108
  * @param {number} [limit] Items shown per page
109
-
109
+ * @deprecated
110
110
  * @throws {RequiredError}
111
111
  */
112
112
  searchItemByField: (term, field_type, field_key, exact_match, return_item_ids, start, limit) => __awaiter(this, void 0, void 0, function* () {
@@ -180,7 +180,7 @@ export const ItemSearchApiFp = function (configuration) {
180
180
  * @param {'deal.cc_email' | 'person.picture' | 'product.price'} [include_fields] A comma-separated string array. Supports including optional fields in the results which are not provided by default.
181
181
  * @param {number} [start] Pagination start. Note that the pagination is based on main results and does not include related items when using &#x60;search_for_related_items&#x60; parameter.
182
182
  * @param {number} [limit] Items shown per page
183
-
183
+ * @deprecated
184
184
  * @throws {RequiredError}
185
185
  */
186
186
  searchItem(term, item_types, fields, search_for_related_items, exact_match, include_fields, start, limit) {
@@ -199,7 +199,7 @@ export const ItemSearchApiFp = function (configuration) {
199
199
  * @param {boolean} [return_item_ids] Whether to return the IDs of the matching items or not. When not set or set to &#x60;0&#x60; or &#x60;false&#x60;, only distinct values of the searched field are returned. When set to &#x60;1&#x60; or &#x60;true&#x60;, the ID of each found item is returned.
200
200
  * @param {number} [start] Pagination start
201
201
  * @param {number} [limit] Items shown per page
202
-
202
+ * @deprecated
203
203
  * @throws {RequiredError}
204
204
  */
205
205
  searchItemByField(term, field_type, field_key, exact_match, return_item_ids, start, limit) {
@@ -221,7 +221,7 @@ export const ItemSearchApiFactory = function (configuration, basePath, axios) {
221
221
  * Performs a search from your choice of item types and fields.
222
222
  * @summary Perform a search from multiple item types
223
223
  * @param {ItemSearchApiSearchItemRequest} requestParameters Request parameters.
224
-
224
+ * @deprecated
225
225
  * @throws {RequiredError}
226
226
  */
227
227
  searchItem(requestParameters) {
@@ -231,7 +231,7 @@ export const ItemSearchApiFactory = function (configuration, basePath, axios) {
231
231
  * Performs a search from the values of a specific field. Results can either be the distinct values of the field (useful for searching autocomplete field values), or the IDs of actual items (deals, leads, persons, organizations or products).
232
232
  * @summary Perform a search using a specific field from an item type
233
233
  * @param {ItemSearchApiSearchItemByFieldRequest} requestParameters Request parameters.
234
-
234
+ * @deprecated
235
235
  * @throws {RequiredError}
236
236
  */
237
237
  searchItemByField(requestParameters) {
@@ -250,7 +250,7 @@ export class ItemSearchApi extends BaseAPI {
250
250
  * Performs a search from your choice of item types and fields.
251
251
  * @summary Perform a search from multiple item types
252
252
  * @param {ItemSearchApiSearchItemRequest} requestParameters Request parameters.
253
-
253
+ * @deprecated
254
254
  * @throws {RequiredError}
255
255
  * @memberof ItemSearchApi
256
256
  */
@@ -261,7 +261,7 @@ export class ItemSearchApi extends BaseAPI {
261
261
  * Performs a search from the values of a specific field. Results can either be the distinct values of the field (useful for searching autocomplete field values), or the IDs of actual items (deals, leads, persons, organizations or products).
262
262
  * @summary Perform a search using a specific field from an item type
263
263
  * @param {ItemSearchApiSearchItemByFieldRequest} requestParameters Request parameters.
264
-
264
+ * @deprecated
265
265
  * @throws {RequiredError}
266
266
  * @memberof ItemSearchApi
267
267
  */
@@ -40,6 +40,20 @@ export declare const LeadsApiAxiosParamCreator: (configuration?: Configuration)
40
40
  * @throws {RequiredError}
41
41
  */
42
42
  deleteLead: (id: string) => Promise<RequestArgs>;
43
+ /**
44
+ * Returns multiple archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals.
45
+ * @summary Get all archived leads
46
+ * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned.
47
+ * @param {number} [start] For pagination, the position that represents the first result for the page
48
+ * @param {number} [owner_id] If supplied, only leads matching the given user will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;owner_id&#x60; when supplied.
49
+ * @param {number} [person_id] If supplied, only leads matching the given person will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;person_id&#x60; when supplied.
50
+ * @param {number} [organization_id] If supplied, only leads matching the given organization will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;organization_id&#x60; when supplied.
51
+ * @param {number} [filter_id] The ID of the filter to use
52
+ * @param {'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time'} [sort] The field names and sorting mode separated by a comma (&#x60;field_name_1 ASC&#x60;, &#x60;field_name_2 DESC&#x60;). Only first-level field keys are supported (no nested keys).
53
+
54
+ * @throws {RequiredError}
55
+ */
56
+ getArchivedLeads: (limit?: number, start?: number, owner_id?: number, person_id?: number, organization_id?: number, filter_id?: number, sort?: 'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time') => Promise<RequestArgs>;
43
57
  /**
44
58
  * Returns details of a specific lead. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields’ structure from deals.
45
59
  * @summary Get one lead
@@ -57,11 +71,10 @@ export declare const LeadsApiAxiosParamCreator: (configuration?: Configuration)
57
71
  */
58
72
  getLeadUsers: (id: string) => Promise<RequestArgs>;
59
73
  /**
60
- * Returns multiple leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals.
74
+ * Returns multiple not archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals.
61
75
  * @summary Get all leads
62
76
  * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned.
63
77
  * @param {number} [start] For pagination, the position that represents the first result for the page
64
- * @param {'archived' | 'not_archived' | 'all'} [archived_status] Filtering based on the archived status of a lead. If not provided, &#x60;All&#x60; is used.
65
78
  * @param {number} [owner_id] If supplied, only leads matching the given user will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;owner_id&#x60; when supplied.
66
79
  * @param {number} [person_id] If supplied, only leads matching the given person will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;person_id&#x60; when supplied.
67
80
  * @param {number} [organization_id] If supplied, only leads matching the given organization will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;organization_id&#x60; when supplied.
@@ -70,7 +83,7 @@ export declare const LeadsApiAxiosParamCreator: (configuration?: Configuration)
70
83
 
71
84
  * @throws {RequiredError}
72
85
  */
73
- getLeads: (limit?: number, start?: number, archived_status?: 'archived' | 'not_archived' | 'all', owner_id?: number, person_id?: number, organization_id?: number, filter_id?: number, sort?: 'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time') => Promise<RequestArgs>;
86
+ getLeads: (limit?: number, start?: number, owner_id?: number, person_id?: number, organization_id?: number, filter_id?: number, sort?: 'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time') => Promise<RequestArgs>;
74
87
  /**
75
88
  * 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.
76
89
  * @summary Search leads
@@ -117,6 +130,20 @@ export declare const LeadsApiFp: (configuration?: Configuration) => {
117
130
  * @throws {RequiredError}
118
131
  */
119
132
  deleteLead(id: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetLeadIdResponse>>;
133
+ /**
134
+ * Returns multiple archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals.
135
+ * @summary Get all archived leads
136
+ * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned.
137
+ * @param {number} [start] For pagination, the position that represents the first result for the page
138
+ * @param {number} [owner_id] If supplied, only leads matching the given user will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;owner_id&#x60; when supplied.
139
+ * @param {number} [person_id] If supplied, only leads matching the given person will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;person_id&#x60; when supplied.
140
+ * @param {number} [organization_id] If supplied, only leads matching the given organization will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;organization_id&#x60; when supplied.
141
+ * @param {number} [filter_id] The ID of the filter to use
142
+ * @param {'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time'} [sort] The field names and sorting mode separated by a comma (&#x60;field_name_1 ASC&#x60;, &#x60;field_name_2 DESC&#x60;). Only first-level field keys are supported (no nested keys).
143
+
144
+ * @throws {RequiredError}
145
+ */
146
+ getArchivedLeads(limit?: number, start?: number, owner_id?: number, person_id?: number, organization_id?: number, filter_id?: number, sort?: 'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time'): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetLeadsResponse>>;
120
147
  /**
121
148
  * Returns details of a specific lead. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields’ structure from deals.
122
149
  * @summary Get one lead
@@ -134,11 +161,10 @@ export declare const LeadsApiFp: (configuration?: Configuration) => {
134
161
  */
135
162
  getLeadUsers(id: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<UserIds>>;
136
163
  /**
137
- * Returns multiple leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals.
164
+ * Returns multiple not archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals.
138
165
  * @summary Get all leads
139
166
  * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned.
140
167
  * @param {number} [start] For pagination, the position that represents the first result for the page
141
- * @param {'archived' | 'not_archived' | 'all'} [archived_status] Filtering based on the archived status of a lead. If not provided, &#x60;All&#x60; is used.
142
168
  * @param {number} [owner_id] If supplied, only leads matching the given user will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;owner_id&#x60; when supplied.
143
169
  * @param {number} [person_id] If supplied, only leads matching the given person will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;person_id&#x60; when supplied.
144
170
  * @param {number} [organization_id] If supplied, only leads matching the given organization will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;organization_id&#x60; when supplied.
@@ -147,7 +173,7 @@ export declare const LeadsApiFp: (configuration?: Configuration) => {
147
173
 
148
174
  * @throws {RequiredError}
149
175
  */
150
- getLeads(limit?: number, start?: number, archived_status?: 'archived' | 'not_archived' | 'all', owner_id?: number, person_id?: number, organization_id?: number, filter_id?: number, sort?: 'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time'): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetLeadsResponse>>;
176
+ getLeads(limit?: number, start?: number, owner_id?: number, person_id?: number, organization_id?: number, filter_id?: number, sort?: 'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time'): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetLeadsResponse>>;
151
177
  /**
152
178
  * 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.
153
179
  * @summary Search leads
@@ -194,6 +220,14 @@ export declare const LeadsApiFactory: (configuration?: Configuration, basePath?:
194
220
  * @throws {RequiredError}
195
221
  */
196
222
  deleteLead(requestParameters: LeadsApiDeleteLeadRequest): Promise<GetLeadIdResponse>;
223
+ /**
224
+ * Returns multiple archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals.
225
+ * @summary Get all archived leads
226
+ * @param {LeadsApiGetArchivedLeadsRequest} requestParameters Request parameters.
227
+
228
+ * @throws {RequiredError}
229
+ */
230
+ getArchivedLeads(requestParameters?: LeadsApiGetArchivedLeadsRequest): Promise<GetLeadsResponse>;
197
231
  /**
198
232
  * Returns details of a specific lead. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields’ structure from deals.
199
233
  * @summary Get one lead
@@ -211,7 +245,7 @@ export declare const LeadsApiFactory: (configuration?: Configuration, basePath?:
211
245
  */
212
246
  getLeadUsers(requestParameters: LeadsApiGetLeadUsersRequest): Promise<UserIds>;
213
247
  /**
214
- * Returns multiple leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals.
248
+ * Returns multiple not archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals.
215
249
  * @summary Get all leads
216
250
  * @param {LeadsApiGetLeadsRequest} requestParameters Request parameters.
217
251
 
@@ -261,6 +295,55 @@ export interface LeadsApiDeleteLeadRequest {
261
295
  */
262
296
  readonly id: string;
263
297
  }
298
+ /**
299
+ * Request parameters for getArchivedLeads operation in LeadsApi.
300
+ * @export
301
+ * @interface LeadsApiGetArchivedLeadsRequest
302
+ */
303
+ export interface LeadsApiGetArchivedLeadsRequest {
304
+ /**
305
+ * For pagination, the limit of entries to be returned. If not provided, 100 items will be returned.
306
+ * @type {number}
307
+ * @memberof LeadsApiGetArchivedLeads
308
+ */
309
+ readonly limit?: number;
310
+ /**
311
+ * For pagination, the position that represents the first result for the page
312
+ * @type {number}
313
+ * @memberof LeadsApiGetArchivedLeads
314
+ */
315
+ readonly start?: number;
316
+ /**
317
+ * If supplied, only leads matching the given user will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;owner_id&#x60; when supplied.
318
+ * @type {number}
319
+ * @memberof LeadsApiGetArchivedLeads
320
+ */
321
+ readonly owner_id?: number;
322
+ /**
323
+ * If supplied, only leads matching the given person will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;person_id&#x60; when supplied.
324
+ * @type {number}
325
+ * @memberof LeadsApiGetArchivedLeads
326
+ */
327
+ readonly person_id?: number;
328
+ /**
329
+ * If supplied, only leads matching the given organization will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;organization_id&#x60; when supplied.
330
+ * @type {number}
331
+ * @memberof LeadsApiGetArchivedLeads
332
+ */
333
+ readonly organization_id?: number;
334
+ /**
335
+ * The ID of the filter to use
336
+ * @type {number}
337
+ * @memberof LeadsApiGetArchivedLeads
338
+ */
339
+ readonly filter_id?: number;
340
+ /**
341
+ * The field names and sorting mode separated by a comma (&#x60;field_name_1 ASC&#x60;, &#x60;field_name_2 DESC&#x60;). Only first-level field keys are supported (no nested keys).
342
+ * @type {'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time'}
343
+ * @memberof LeadsApiGetArchivedLeads
344
+ */
345
+ readonly sort?: 'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time';
346
+ }
264
347
  /**
265
348
  * Request parameters for getLead operation in LeadsApi.
266
349
  * @export
@@ -305,12 +388,6 @@ export interface LeadsApiGetLeadsRequest {
305
388
  * @memberof LeadsApiGetLeads
306
389
  */
307
390
  readonly start?: number;
308
- /**
309
- * Filtering based on the archived status of a lead. If not provided, &#x60;All&#x60; is used.
310
- * @type {'archived' | 'not_archived' | 'all'}
311
- * @memberof LeadsApiGetLeads
312
- */
313
- readonly archived_status?: 'archived' | 'not_archived' | 'all';
314
391
  /**
315
392
  * If supplied, only leads matching the given user will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;owner_id&#x60; when supplied.
316
393
  * @type {number}
@@ -441,6 +518,15 @@ export declare class LeadsApi extends BaseAPI {
441
518
  * @memberof LeadsApi
442
519
  */
443
520
  deleteLead(requestParameters: LeadsApiDeleteLeadRequest): Promise<GetLeadIdResponse>;
521
+ /**
522
+ * Returns multiple archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals.
523
+ * @summary Get all archived leads
524
+ * @param {LeadsApiGetArchivedLeadsRequest} requestParameters Request parameters.
525
+
526
+ * @throws {RequiredError}
527
+ * @memberof LeadsApi
528
+ */
529
+ getArchivedLeads(requestParameters?: LeadsApiGetArchivedLeadsRequest): Promise<GetLeadsResponse>;
444
530
  /**
445
531
  * Returns details of a specific lead. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields’ structure from deals.
446
532
  * @summary Get one lead
@@ -460,7 +546,7 @@ export declare class LeadsApi extends BaseAPI {
460
546
  */
461
547
  getLeadUsers(requestParameters: LeadsApiGetLeadUsersRequest): Promise<UserIds>;
462
548
  /**
463
- * Returns multiple leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals.
549
+ * Returns multiple not archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals.
464
550
  * @summary Get all leads
465
551
  * @param {LeadsApiGetLeadsRequest} requestParameters Request parameters.
466
552
 
@@ -99,6 +99,64 @@ export const LeadsApiAxiosParamCreator = function (configuration) {
99
99
  options: localVarRequestOptions,
100
100
  };
101
101
  }),
102
+ /**
103
+ * Returns multiple archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals.
104
+ * @summary Get all archived leads
105
+ * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned.
106
+ * @param {number} [start] For pagination, the position that represents the first result for the page
107
+ * @param {number} [owner_id] If supplied, only leads matching the given user will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;owner_id&#x60; when supplied.
108
+ * @param {number} [person_id] If supplied, only leads matching the given person will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;person_id&#x60; when supplied.
109
+ * @param {number} [organization_id] If supplied, only leads matching the given organization will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;organization_id&#x60; when supplied.
110
+ * @param {number} [filter_id] The ID of the filter to use
111
+ * @param {'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time'} [sort] The field names and sorting mode separated by a comma (&#x60;field_name_1 ASC&#x60;, &#x60;field_name_2 DESC&#x60;). Only first-level field keys are supported (no nested keys).
112
+
113
+ * @throws {RequiredError}
114
+ */
115
+ getArchivedLeads: (limit, start, owner_id, person_id, organization_id, filter_id, sort) => __awaiter(this, void 0, void 0, function* () {
116
+ const localVarPath = `/leads/archived`;
117
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
118
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
119
+ let baseOptions;
120
+ if (configuration) {
121
+ baseOptions = configuration.baseOptions;
122
+ }
123
+ const localVarRequestOptions = Object.assign({ method: 'GET' }, baseOptions);
124
+ const localVarHeaderParameter = {};
125
+ const localVarQueryParameter = {};
126
+ // authentication api_key required
127
+ yield setApiKeyToObject(localVarQueryParameter, "api_token", configuration);
128
+ // authentication oauth2 required
129
+ // oauth required
130
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["leads:read", "leads:full"], configuration);
131
+ if (limit !== undefined) {
132
+ localVarQueryParameter['limit'] = limit;
133
+ }
134
+ if (start !== undefined) {
135
+ localVarQueryParameter['start'] = start;
136
+ }
137
+ if (owner_id !== undefined) {
138
+ localVarQueryParameter['owner_id'] = owner_id;
139
+ }
140
+ if (person_id !== undefined) {
141
+ localVarQueryParameter['person_id'] = person_id;
142
+ }
143
+ if (organization_id !== undefined) {
144
+ localVarQueryParameter['organization_id'] = organization_id;
145
+ }
146
+ if (filter_id !== undefined) {
147
+ localVarQueryParameter['filter_id'] = filter_id;
148
+ }
149
+ if (sort !== undefined) {
150
+ localVarQueryParameter['sort'] = sort;
151
+ }
152
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
153
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
154
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
155
+ return {
156
+ url: toPathString(localVarUrlObj),
157
+ options: localVarRequestOptions,
158
+ };
159
+ }),
102
160
  /**
103
161
  * Returns details of a specific lead. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields’ structure from deals.
104
162
  * @summary Get one lead
@@ -168,11 +226,10 @@ export const LeadsApiAxiosParamCreator = function (configuration) {
168
226
  };
169
227
  }),
170
228
  /**
171
- * Returns multiple leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals.
229
+ * Returns multiple not archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals.
172
230
  * @summary Get all leads
173
231
  * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned.
174
232
  * @param {number} [start] For pagination, the position that represents the first result for the page
175
- * @param {'archived' | 'not_archived' | 'all'} [archived_status] Filtering based on the archived status of a lead. If not provided, &#x60;All&#x60; is used.
176
233
  * @param {number} [owner_id] If supplied, only leads matching the given user will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;owner_id&#x60; when supplied.
177
234
  * @param {number} [person_id] If supplied, only leads matching the given person will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;person_id&#x60; when supplied.
178
235
  * @param {number} [organization_id] If supplied, only leads matching the given organization will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;organization_id&#x60; when supplied.
@@ -181,7 +238,7 @@ export const LeadsApiAxiosParamCreator = function (configuration) {
181
238
 
182
239
  * @throws {RequiredError}
183
240
  */
184
- getLeads: (limit, start, archived_status, owner_id, person_id, organization_id, filter_id, sort) => __awaiter(this, void 0, void 0, function* () {
241
+ getLeads: (limit, start, owner_id, person_id, organization_id, filter_id, sort) => __awaiter(this, void 0, void 0, function* () {
185
242
  const localVarPath = `/leads`;
186
243
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
187
244
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -203,9 +260,6 @@ export const LeadsApiAxiosParamCreator = function (configuration) {
203
260
  if (start !== undefined) {
204
261
  localVarQueryParameter['start'] = start;
205
262
  }
206
- if (archived_status !== undefined) {
207
- localVarQueryParameter['archived_status'] = archived_status;
208
- }
209
263
  if (owner_id !== undefined) {
210
264
  localVarQueryParameter['owner_id'] = owner_id;
211
265
  }
@@ -365,6 +419,25 @@ export const LeadsApiFp = function (configuration) {
365
419
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
366
420
  });
367
421
  },
422
+ /**
423
+ * Returns multiple archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals.
424
+ * @summary Get all archived leads
425
+ * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned.
426
+ * @param {number} [start] For pagination, the position that represents the first result for the page
427
+ * @param {number} [owner_id] If supplied, only leads matching the given user will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;owner_id&#x60; when supplied.
428
+ * @param {number} [person_id] If supplied, only leads matching the given person will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;person_id&#x60; when supplied.
429
+ * @param {number} [organization_id] If supplied, only leads matching the given organization will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;organization_id&#x60; when supplied.
430
+ * @param {number} [filter_id] The ID of the filter to use
431
+ * @param {'id' | 'title' | 'owner_id' | 'creator_id' | 'was_seen' | 'expected_close_date' | 'next_activity_id' | 'add_time' | 'update_time'} [sort] The field names and sorting mode separated by a comma (&#x60;field_name_1 ASC&#x60;, &#x60;field_name_2 DESC&#x60;). Only first-level field keys are supported (no nested keys).
432
+
433
+ * @throws {RequiredError}
434
+ */
435
+ getArchivedLeads(limit, start, owner_id, person_id, organization_id, filter_id, sort) {
436
+ return __awaiter(this, void 0, void 0, function* () {
437
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getArchivedLeads(limit, start, owner_id, person_id, organization_id, filter_id, sort);
438
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
439
+ });
440
+ },
368
441
  /**
369
442
  * Returns details of a specific lead. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields’ structure from deals.
370
443
  * @summary Get one lead
@@ -392,11 +465,10 @@ export const LeadsApiFp = function (configuration) {
392
465
  });
393
466
  },
394
467
  /**
395
- * Returns multiple leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals.
468
+ * Returns multiple not archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals.
396
469
  * @summary Get all leads
397
470
  * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned.
398
471
  * @param {number} [start] For pagination, the position that represents the first result for the page
399
- * @param {'archived' | 'not_archived' | 'all'} [archived_status] Filtering based on the archived status of a lead. If not provided, &#x60;All&#x60; is used.
400
472
  * @param {number} [owner_id] If supplied, only leads matching the given user will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;owner_id&#x60; when supplied.
401
473
  * @param {number} [person_id] If supplied, only leads matching the given person will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;person_id&#x60; when supplied.
402
474
  * @param {number} [organization_id] If supplied, only leads matching the given organization will be returned. However, &#x60;filter_id&#x60; takes precedence over &#x60;organization_id&#x60; when supplied.
@@ -405,9 +477,9 @@ export const LeadsApiFp = function (configuration) {
405
477
 
406
478
  * @throws {RequiredError}
407
479
  */
408
- getLeads(limit, start, archived_status, owner_id, person_id, organization_id, filter_id, sort) {
480
+ getLeads(limit, start, owner_id, person_id, organization_id, filter_id, sort) {
409
481
  return __awaiter(this, void 0, void 0, function* () {
410
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getLeads(limit, start, archived_status, owner_id, person_id, organization_id, filter_id, sort);
482
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getLeads(limit, start, owner_id, person_id, organization_id, filter_id, sort);
411
483
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
412
484
  });
413
485
  },
@@ -474,6 +546,16 @@ export const LeadsApiFactory = function (configuration, basePath, axios) {
474
546
  deleteLead(requestParameters) {
475
547
  return localVarFp.deleteLead(requestParameters.id).then((request) => request(axios, basePath));
476
548
  },
549
+ /**
550
+ * Returns multiple archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals.
551
+ * @summary Get all archived leads
552
+ * @param {LeadsApiGetArchivedLeadsRequest} requestParameters Request parameters.
553
+
554
+ * @throws {RequiredError}
555
+ */
556
+ getArchivedLeads(requestParameters = {}) {
557
+ return localVarFp.getArchivedLeads(requestParameters.limit, requestParameters.start, requestParameters.owner_id, requestParameters.person_id, requestParameters.organization_id, requestParameters.filter_id, requestParameters.sort).then((request) => request(axios, basePath));
558
+ },
477
559
  /**
478
560
  * Returns details of a specific lead. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields’ structure from deals.
479
561
  * @summary Get one lead
@@ -495,14 +577,14 @@ export const LeadsApiFactory = function (configuration, basePath, axios) {
495
577
  return localVarFp.getLeadUsers(requestParameters.id).then((request) => request(axios, basePath));
496
578
  },
497
579
  /**
498
- * Returns multiple leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals.
580
+ * Returns multiple not archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals.
499
581
  * @summary Get all leads
500
582
  * @param {LeadsApiGetLeadsRequest} requestParameters Request parameters.
501
583
 
502
584
  * @throws {RequiredError}
503
585
  */
504
586
  getLeads(requestParameters = {}) {
505
- return localVarFp.getLeads(requestParameters.limit, requestParameters.start, requestParameters.archived_status, requestParameters.owner_id, requestParameters.person_id, requestParameters.organization_id, requestParameters.filter_id, requestParameters.sort).then((request) => request(axios, basePath));
587
+ return localVarFp.getLeads(requestParameters.limit, requestParameters.start, requestParameters.owner_id, requestParameters.person_id, requestParameters.organization_id, requestParameters.filter_id, requestParameters.sort).then((request) => request(axios, basePath));
506
588
  },
507
589
  /**
508
590
  * 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.
@@ -555,6 +637,17 @@ export class LeadsApi extends BaseAPI {
555
637
  deleteLead(requestParameters) {
556
638
  return LeadsApiFp(this.configuration).deleteLead(requestParameters.id).then((request) => request(this.axios, this.basePath));
557
639
  }
640
+ /**
641
+ * Returns multiple archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals.
642
+ * @summary Get all archived leads
643
+ * @param {LeadsApiGetArchivedLeadsRequest} requestParameters Request parameters.
644
+
645
+ * @throws {RequiredError}
646
+ * @memberof LeadsApi
647
+ */
648
+ getArchivedLeads(requestParameters = {}) {
649
+ return LeadsApiFp(this.configuration).getArchivedLeads(requestParameters.limit, requestParameters.start, requestParameters.owner_id, requestParameters.person_id, requestParameters.organization_id, requestParameters.filter_id, requestParameters.sort).then((request) => request(this.axios, this.basePath));
650
+ }
558
651
  /**
559
652
  * Returns details of a specific lead. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields’ structure from deals.
560
653
  * @summary Get one lead
@@ -578,7 +671,7 @@ export class LeadsApi extends BaseAPI {
578
671
  return LeadsApiFp(this.configuration).getLeadUsers(requestParameters.id).then((request) => request(this.axios, this.basePath));
579
672
  }
580
673
  /**
581
- * Returns multiple leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals.
674
+ * Returns multiple not archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields\' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field\'s value hasn\'t been set for the lead, it won\'t appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields\' structure from deals.
582
675
  * @summary Get all leads
583
676
  * @param {LeadsApiGetLeadsRequest} requestParameters Request parameters.
584
677
 
@@ -586,7 +679,7 @@ export class LeadsApi extends BaseAPI {
586
679
  * @memberof LeadsApi
587
680
  */
588
681
  getLeads(requestParameters = {}) {
589
- return LeadsApiFp(this.configuration).getLeads(requestParameters.limit, requestParameters.start, requestParameters.archived_status, requestParameters.owner_id, requestParameters.person_id, requestParameters.organization_id, requestParameters.filter_id, requestParameters.sort).then((request) => request(this.axios, this.basePath));
682
+ return LeadsApiFp(this.configuration).getLeads(requestParameters.limit, requestParameters.start, requestParameters.owner_id, requestParameters.person_id, requestParameters.organization_id, requestParameters.filter_id, requestParameters.sort).then((request) => request(this.axios, this.basePath));
590
683
  }
591
684
  /**
592
685
  * 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.