pipedrive 30.0.0 → 30.2.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 (31) hide show
  1. package/dist/esm/versions/v2/api/deals-api.d.ts +137 -26
  2. package/dist/esm/versions/v2/api/deals-api.js +153 -8
  3. package/dist/esm/versions/v2/models/add-many-deal-product-response.d.ts +29 -0
  4. package/dist/esm/versions/v2/models/add-many-deal-product-response.js +14 -0
  5. package/dist/esm/versions/v2/models/create-many-deal-product-request.d.ts +24 -0
  6. package/dist/esm/versions/v2/models/create-many-deal-product-request.js +14 -0
  7. package/dist/esm/versions/v2/models/delete-many-deal-product-response-additional-data.d.ts +23 -0
  8. package/dist/esm/versions/v2/models/delete-many-deal-product-response-additional-data.js +14 -0
  9. package/dist/esm/versions/v2/models/delete-many-deal-product-response-data.d.ts +23 -0
  10. package/dist/esm/versions/v2/models/delete-many-deal-product-response-data.js +14 -0
  11. package/dist/esm/versions/v2/models/delete-many-deal-product-response.d.ts +35 -0
  12. package/dist/esm/versions/v2/models/delete-many-deal-product-response.js +14 -0
  13. package/dist/esm/versions/v2/models/get-deals-products-response-data-inner-all-of.d.ts +5 -0
  14. package/dist/esm/versions/v2/models/index.d.ts +5 -0
  15. package/dist/esm/versions/v2/models/index.js +5 -0
  16. package/dist/versions/v2/api/deals-api.d.ts +137 -26
  17. package/dist/versions/v2/api/deals-api.js +153 -8
  18. package/dist/versions/v2/models/add-many-deal-product-response.d.ts +29 -0
  19. package/dist/versions/v2/models/add-many-deal-product-response.js +15 -0
  20. package/dist/versions/v2/models/create-many-deal-product-request.d.ts +24 -0
  21. package/dist/versions/v2/models/create-many-deal-product-request.js +15 -0
  22. package/dist/versions/v2/models/delete-many-deal-product-response-additional-data.d.ts +23 -0
  23. package/dist/versions/v2/models/delete-many-deal-product-response-additional-data.js +15 -0
  24. package/dist/versions/v2/models/delete-many-deal-product-response-data.d.ts +23 -0
  25. package/dist/versions/v2/models/delete-many-deal-product-response-data.js +15 -0
  26. package/dist/versions/v2/models/delete-many-deal-product-response.d.ts +35 -0
  27. package/dist/versions/v2/models/delete-many-deal-product-response.js +15 -0
  28. package/dist/versions/v2/models/get-deals-products-response-data-inner-all-of.d.ts +5 -0
  29. package/dist/versions/v2/models/index.d.ts +5 -0
  30. package/dist/versions/v2/models/index.js +5 -0
  31. package/package.json +1 -1
@@ -22,11 +22,14 @@ import { AddDealProductResponse } from '../models';
22
22
  import { AddDealRequest } from '../models';
23
23
  import { AddFollowerResponse } from '../models';
24
24
  import { AddInstallmentRequestBody } from '../models';
25
+ import { AddManyDealProductResponse } from '../models';
26
+ import { CreateManyDealProductRequest } from '../models';
25
27
  import { DeleteAdditionalDiscountResponse } from '../models';
26
28
  import { DeleteDealProductResponse } from '../models';
27
29
  import { DeleteDealResponse } from '../models';
28
30
  import { DeleteFollowerResponse } from '../models';
29
31
  import { DeleteInstallmentResponse } from '../models';
32
+ import { DeleteManyDealProductResponse } from '../models';
30
33
  import { GetAdditionalDiscountsResponse } from '../models';
31
34
  import { GetConvertResponse1 } from '../models';
32
35
  import { GetDealSearchResponse } from '../models';
@@ -73,6 +76,15 @@ export declare const DealsApiAxiosParamCreator: (configuration?: Configuration)
73
76
  * @throws {RequiredError}
74
77
  */
75
78
  addDealProduct: (id: number, AddDealProductRequest?: AddDealProductRequest) => Promise<RequestArgs>;
79
+ /**
80
+ * Adds multiple products to a deal in a single request. Maximum of 100 products allowed per request.
81
+ * @summary Add multiple products to a deal
82
+ * @param {number} id The ID of the deal
83
+ * @param {CreateManyDealProductRequest} [CreateManyDealProductRequest]
84
+
85
+ * @throws {RequiredError}
86
+ */
87
+ addManyDealProducts: (id: number, CreateManyDealProductRequest?: CreateManyDealProductRequest) => Promise<RequestArgs>;
76
88
  /**
77
89
  * Initiates a conversion of a deal to a lead. 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. There are exceptions for entities like invoices or history that are not transferred and remain linked to the original deal. If the conversion is successful, the deal 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/Deals#getDealConversionStatus\">/api/v2/deals/{deal_id}/convert/status/{conversion_id}</a> endpoint.
78
90
  * @summary Convert a deal to a lead (BETA)
@@ -85,11 +97,11 @@ export declare const DealsApiAxiosParamCreator: (configuration?: Configuration)
85
97
  * Removes a discount from a deal, changing the deal value if the deal has one-time products attached.
86
98
  * @summary Delete a discount from a deal
87
99
  * @param {number} id The ID of the deal
88
- * @param {number} discount_id The ID of the discount
100
+ * @param {string} discount_id The ID of the discount
89
101
 
90
102
  * @throws {RequiredError}
91
103
  */
92
- deleteAdditionalDiscount: (id: number, discount_id: number) => Promise<RequestArgs>;
104
+ deleteAdditionalDiscount: (id: number, discount_id: string) => Promise<RequestArgs>;
93
105
  /**
94
106
  * Marks a deal as deleted. After 30 days, the deal will be permanently deleted.
95
107
  * @summary Delete a deal
@@ -125,6 +137,15 @@ export declare const DealsApiAxiosParamCreator: (configuration?: Configuration)
125
137
  * @throws {RequiredError}
126
138
  */
127
139
  deleteInstallment: (id: number, installment_id: number) => Promise<RequestArgs>;
140
+ /**
141
+ * Deletes multiple products from a deal. If no product IDs are specified, up to 100 products will be removed from the deal. A maximum of 100 product IDs can be provided per request.
142
+ * @summary Delete many products from a deal
143
+ * @param {number} id The ID of the deal
144
+ * @param {string} [ids] Comma-separated list of deal product IDs to delete. If not provided, all deal products will be deleted up to 100 items. Maximum 100 IDs allowed.
145
+
146
+ * @throws {RequiredError}
147
+ */
148
+ deleteManyDealProducts: (id: number, ids?: string) => Promise<RequestArgs>;
128
149
  /**
129
150
  * Lists discounts attached to a deal.
130
151
  * @summary List discounts added to a deal
@@ -201,12 +222,12 @@ export declare const DealsApiAxiosParamCreator: (configuration?: Configuration)
201
222
  * @param {number} id The ID of the deal
202
223
  * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
203
224
  * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
204
- * @param {'id' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;add_time&#x60;, &#x60;update_time&#x60;.
225
+ * @param {'id' | 'add_time' | 'update_time' | 'order_nr'} [sort_by] The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;add_time&#x60;, &#x60;update_time&#x60;, &#x60;order_nr&#x60;.
205
226
  * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: &#x60;asc&#x60;, &#x60;desc&#x60;.
206
227
 
207
228
  * @throws {RequiredError}
208
229
  */
209
- getDealProducts: (id: number, cursor?: string, limit?: number, sort_by?: 'id' | 'add_time' | 'update_time', sort_direction?: 'asc' | 'desc') => Promise<RequestArgs>;
230
+ getDealProducts: (id: number, cursor?: string, limit?: number, sort_by?: 'id' | 'add_time' | 'update_time' | 'order_nr', sort_direction?: 'asc' | 'desc') => Promise<RequestArgs>;
210
231
  /**
211
232
  * Returns data about all not archived deals.
212
233
  * @summary Get all deals
@@ -236,12 +257,12 @@ export declare const DealsApiAxiosParamCreator: (configuration?: Configuration)
236
257
  * @param {Array<number>} deal_ids An array of integers with the IDs of the deals for which the attached products will be returned. A maximum of 100 deal IDs can be provided.
237
258
  * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
238
259
  * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
239
- * @param {'id' | 'deal_id' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;deal_id&#x60;, &#x60;add_time&#x60;, &#x60;update_time&#x60;.
260
+ * @param {'id' | 'deal_id' | 'add_time' | 'update_time' | 'order_nr'} [sort_by] The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;deal_id&#x60;, &#x60;add_time&#x60;, &#x60;update_time&#x60;, &#x60;order_nr&#x60;.
240
261
  * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: &#x60;asc&#x60;, &#x60;desc&#x60;.
241
262
 
242
263
  * @throws {RequiredError}
243
264
  */
244
- getDealsProducts: (deal_ids: Array<number>, cursor?: string, limit?: number, sort_by?: 'id' | 'deal_id' | 'add_time' | 'update_time', sort_direction?: 'asc' | 'desc') => Promise<RequestArgs>;
265
+ getDealsProducts: (deal_ids: Array<number>, cursor?: string, limit?: number, sort_by?: 'id' | 'deal_id' | 'add_time' | 'update_time' | 'order_nr', sort_direction?: 'asc' | 'desc') => Promise<RequestArgs>;
245
266
  /**
246
267
  * Lists installments attached to a list of deals. Only available in Growth and above plans.
247
268
  * @summary List installments added to a list of deals
@@ -292,12 +313,12 @@ export declare const DealsApiAxiosParamCreator: (configuration?: Configuration)
292
313
  * Edits a discount added to a deal, changing the deal value if the deal has one-time products attached.
293
314
  * @summary Update a discount added to a deal
294
315
  * @param {number} id The ID of the deal
295
- * @param {number} discount_id The ID of the discount
316
+ * @param {string} discount_id The ID of the discount
296
317
  * @param {UpdateAdditionalDiscountRequestBody} [UpdateAdditionalDiscountRequestBody]
297
318
 
298
319
  * @throws {RequiredError}
299
320
  */
300
- updateAdditionalDiscount: (id: number, discount_id: number, UpdateAdditionalDiscountRequestBody?: UpdateAdditionalDiscountRequestBody) => Promise<RequestArgs>;
321
+ updateAdditionalDiscount: (id: number, discount_id: string, UpdateAdditionalDiscountRequestBody?: UpdateAdditionalDiscountRequestBody) => Promise<RequestArgs>;
301
322
  /**
302
323
  * Updates the properties of a deal.
303
324
  * @summary Update a deal
@@ -359,6 +380,15 @@ export declare const DealsApiFp: (configuration?: Configuration) => {
359
380
  * @throws {RequiredError}
360
381
  */
361
382
  addDealProduct(id: number, AddDealProductRequest?: AddDealProductRequest): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AddDealProductResponse>>;
383
+ /**
384
+ * Adds multiple products to a deal in a single request. Maximum of 100 products allowed per request.
385
+ * @summary Add multiple products to a deal
386
+ * @param {number} id The ID of the deal
387
+ * @param {CreateManyDealProductRequest} [CreateManyDealProductRequest]
388
+
389
+ * @throws {RequiredError}
390
+ */
391
+ addManyDealProducts(id: number, CreateManyDealProductRequest?: CreateManyDealProductRequest): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AddManyDealProductResponse>>;
362
392
  /**
363
393
  * Initiates a conversion of a deal to a lead. 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. There are exceptions for entities like invoices or history that are not transferred and remain linked to the original deal. If the conversion is successful, the deal 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/Deals#getDealConversionStatus\">/api/v2/deals/{deal_id}/convert/status/{conversion_id}</a> endpoint.
364
394
  * @summary Convert a deal to a lead (BETA)
@@ -371,11 +401,11 @@ export declare const DealsApiFp: (configuration?: Configuration) => {
371
401
  * Removes a discount from a deal, changing the deal value if the deal has one-time products attached.
372
402
  * @summary Delete a discount from a deal
373
403
  * @param {number} id The ID of the deal
374
- * @param {number} discount_id The ID of the discount
404
+ * @param {string} discount_id The ID of the discount
375
405
 
376
406
  * @throws {RequiredError}
377
407
  */
378
- deleteAdditionalDiscount(id: number, discount_id: number): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<DeleteAdditionalDiscountResponse>>;
408
+ deleteAdditionalDiscount(id: number, discount_id: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<DeleteAdditionalDiscountResponse>>;
379
409
  /**
380
410
  * Marks a deal as deleted. After 30 days, the deal will be permanently deleted.
381
411
  * @summary Delete a deal
@@ -411,6 +441,15 @@ export declare const DealsApiFp: (configuration?: Configuration) => {
411
441
  * @throws {RequiredError}
412
442
  */
413
443
  deleteInstallment(id: number, installment_id: number): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<DeleteInstallmentResponse>>;
444
+ /**
445
+ * Deletes multiple products from a deal. If no product IDs are specified, up to 100 products will be removed from the deal. A maximum of 100 product IDs can be provided per request.
446
+ * @summary Delete many products from a deal
447
+ * @param {number} id The ID of the deal
448
+ * @param {string} [ids] Comma-separated list of deal product IDs to delete. If not provided, all deal products will be deleted up to 100 items. Maximum 100 IDs allowed.
449
+
450
+ * @throws {RequiredError}
451
+ */
452
+ deleteManyDealProducts(id: number, ids?: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<DeleteManyDealProductResponse>>;
414
453
  /**
415
454
  * Lists discounts attached to a deal.
416
455
  * @summary List discounts added to a deal
@@ -487,12 +526,12 @@ export declare const DealsApiFp: (configuration?: Configuration) => {
487
526
  * @param {number} id The ID of the deal
488
527
  * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
489
528
  * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
490
- * @param {'id' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;add_time&#x60;, &#x60;update_time&#x60;.
529
+ * @param {'id' | 'add_time' | 'update_time' | 'order_nr'} [sort_by] The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;add_time&#x60;, &#x60;update_time&#x60;, &#x60;order_nr&#x60;.
491
530
  * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: &#x60;asc&#x60;, &#x60;desc&#x60;.
492
531
 
493
532
  * @throws {RequiredError}
494
533
  */
495
- getDealProducts(id: number, cursor?: string, limit?: number, sort_by?: 'id' | 'add_time' | 'update_time', sort_direction?: 'asc' | 'desc'): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetDealsProductsResponse>>;
534
+ getDealProducts(id: number, cursor?: string, limit?: number, sort_by?: 'id' | 'add_time' | 'update_time' | 'order_nr', sort_direction?: 'asc' | 'desc'): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetDealsProductsResponse>>;
496
535
  /**
497
536
  * Returns data about all not archived deals.
498
537
  * @summary Get all deals
@@ -522,12 +561,12 @@ export declare const DealsApiFp: (configuration?: Configuration) => {
522
561
  * @param {Array<number>} deal_ids An array of integers with the IDs of the deals for which the attached products will be returned. A maximum of 100 deal IDs can be provided.
523
562
  * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
524
563
  * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
525
- * @param {'id' | 'deal_id' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;deal_id&#x60;, &#x60;add_time&#x60;, &#x60;update_time&#x60;.
564
+ * @param {'id' | 'deal_id' | 'add_time' | 'update_time' | 'order_nr'} [sort_by] The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;deal_id&#x60;, &#x60;add_time&#x60;, &#x60;update_time&#x60;, &#x60;order_nr&#x60;.
526
565
  * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: &#x60;asc&#x60;, &#x60;desc&#x60;.
527
566
 
528
567
  * @throws {RequiredError}
529
568
  */
530
- getDealsProducts(deal_ids: Array<number>, cursor?: string, limit?: number, sort_by?: 'id' | 'deal_id' | 'add_time' | 'update_time', sort_direction?: 'asc' | 'desc'): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetDealsProductsResponse>>;
569
+ getDealsProducts(deal_ids: Array<number>, cursor?: string, limit?: number, sort_by?: 'id' | 'deal_id' | 'add_time' | 'update_time' | 'order_nr', sort_direction?: 'asc' | 'desc'): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetDealsProductsResponse>>;
531
570
  /**
532
571
  * Lists installments attached to a list of deals. Only available in Growth and above plans.
533
572
  * @summary List installments added to a list of deals
@@ -578,12 +617,12 @@ export declare const DealsApiFp: (configuration?: Configuration) => {
578
617
  * Edits a discount added to a deal, changing the deal value if the deal has one-time products attached.
579
618
  * @summary Update a discount added to a deal
580
619
  * @param {number} id The ID of the deal
581
- * @param {number} discount_id The ID of the discount
620
+ * @param {string} discount_id The ID of the discount
582
621
  * @param {UpdateAdditionalDiscountRequestBody} [UpdateAdditionalDiscountRequestBody]
583
622
 
584
623
  * @throws {RequiredError}
585
624
  */
586
- updateAdditionalDiscount(id: number, discount_id: number, UpdateAdditionalDiscountRequestBody?: UpdateAdditionalDiscountRequestBody): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<UpdateAdditionalDiscountResponse>>;
625
+ updateAdditionalDiscount(id: number, discount_id: string, UpdateAdditionalDiscountRequestBody?: UpdateAdditionalDiscountRequestBody): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<UpdateAdditionalDiscountResponse>>;
587
626
  /**
588
627
  * Updates the properties of a deal.
589
628
  * @summary Update a deal
@@ -643,6 +682,14 @@ export declare const DealsApiFactory: (configuration?: Configuration, basePath?:
643
682
  * @throws {RequiredError}
644
683
  */
645
684
  addDealProduct(requestParameters: DealsApiAddDealProductRequest): Promise<AddDealProductResponse>;
685
+ /**
686
+ * Adds multiple products to a deal in a single request. Maximum of 100 products allowed per request.
687
+ * @summary Add multiple products to a deal
688
+ * @param {DealsApiAddManyDealProductsRequest} requestParameters Request parameters.
689
+
690
+ * @throws {RequiredError}
691
+ */
692
+ addManyDealProducts(requestParameters: DealsApiAddManyDealProductsRequest): Promise<AddManyDealProductResponse>;
646
693
  /**
647
694
  * Initiates a conversion of a deal to a lead. 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. There are exceptions for entities like invoices or history that are not transferred and remain linked to the original deal. If the conversion is successful, the deal 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/Deals#getDealConversionStatus\">/api/v2/deals/{deal_id}/convert/status/{conversion_id}</a> endpoint.
648
695
  * @summary Convert a deal to a lead (BETA)
@@ -691,6 +738,14 @@ export declare const DealsApiFactory: (configuration?: Configuration, basePath?:
691
738
  * @throws {RequiredError}
692
739
  */
693
740
  deleteInstallment(requestParameters: DealsApiDeleteInstallmentRequest): Promise<DeleteInstallmentResponse>;
741
+ /**
742
+ * Deletes multiple products from a deal. If no product IDs are specified, up to 100 products will be removed from the deal. A maximum of 100 product IDs can be provided per request.
743
+ * @summary Delete many products from a deal
744
+ * @param {DealsApiDeleteManyDealProductsRequest} requestParameters Request parameters.
745
+
746
+ * @throws {RequiredError}
747
+ */
748
+ deleteManyDealProducts(requestParameters: DealsApiDeleteManyDealProductsRequest): Promise<DeleteManyDealProductResponse>;
694
749
  /**
695
750
  * Lists discounts attached to a deal.
696
751
  * @summary List discounts added to a deal
@@ -879,6 +934,25 @@ export interface DealsApiAddDealProductRequest {
879
934
  */
880
935
  readonly AddDealProductRequest?: AddDealProductRequest;
881
936
  }
937
+ /**
938
+ * Request parameters for addManyDealProducts operation in DealsApi.
939
+ * @export
940
+ * @interface DealsApiAddManyDealProductsRequest
941
+ */
942
+ export interface DealsApiAddManyDealProductsRequest {
943
+ /**
944
+ * The ID of the deal
945
+ * @type {number}
946
+ * @memberof DealsApiAddManyDealProducts
947
+ */
948
+ readonly id: number;
949
+ /**
950
+ *
951
+ * @type {CreateManyDealProductRequest}
952
+ * @memberof DealsApiAddManyDealProducts
953
+ */
954
+ readonly CreateManyDealProductRequest?: CreateManyDealProductRequest;
955
+ }
882
956
  /**
883
957
  * Request parameters for convertDealToLead operation in DealsApi.
884
958
  * @export
@@ -906,10 +980,10 @@ export interface DealsApiDeleteAdditionalDiscountRequest {
906
980
  readonly id: number;
907
981
  /**
908
982
  * The ID of the discount
909
- * @type {number}
983
+ * @type {string}
910
984
  * @memberof DealsApiDeleteAdditionalDiscount
911
985
  */
912
- readonly discount_id: number;
986
+ readonly discount_id: string;
913
987
  }
914
988
  /**
915
989
  * Request parameters for deleteDeal operation in DealsApi.
@@ -981,6 +1055,25 @@ export interface DealsApiDeleteInstallmentRequest {
981
1055
  */
982
1056
  readonly installment_id: number;
983
1057
  }
1058
+ /**
1059
+ * Request parameters for deleteManyDealProducts operation in DealsApi.
1060
+ * @export
1061
+ * @interface DealsApiDeleteManyDealProductsRequest
1062
+ */
1063
+ export interface DealsApiDeleteManyDealProductsRequest {
1064
+ /**
1065
+ * The ID of the deal
1066
+ * @type {number}
1067
+ * @memberof DealsApiDeleteManyDealProducts
1068
+ */
1069
+ readonly id: number;
1070
+ /**
1071
+ * Comma-separated list of deal product IDs to delete. If not provided, all deal products will be deleted up to 100 items. Maximum 100 IDs allowed.
1072
+ * @type {string}
1073
+ * @memberof DealsApiDeleteManyDealProducts
1074
+ */
1075
+ readonly ids?: string;
1076
+ }
984
1077
  /**
985
1078
  * Request parameters for getAdditionalDiscounts operation in DealsApi.
986
1079
  * @export
@@ -1216,11 +1309,11 @@ export interface DealsApiGetDealProductsRequest {
1216
1309
  */
1217
1310
  readonly limit?: number;
1218
1311
  /**
1219
- * The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;add_time&#x60;, &#x60;update_time&#x60;.
1220
- * @type {'id' | 'add_time' | 'update_time'}
1312
+ * The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;add_time&#x60;, &#x60;update_time&#x60;, &#x60;order_nr&#x60;.
1313
+ * @type {'id' | 'add_time' | 'update_time' | 'order_nr'}
1221
1314
  * @memberof DealsApiGetDealProducts
1222
1315
  */
1223
- readonly sort_by?: 'id' | 'add_time' | 'update_time';
1316
+ readonly sort_by?: 'id' | 'add_time' | 'update_time' | 'order_nr';
1224
1317
  /**
1225
1318
  * The sorting direction. Supported values: &#x60;asc&#x60;, &#x60;desc&#x60;.
1226
1319
  * @type {'asc' | 'desc'}
@@ -1356,11 +1449,11 @@ export interface DealsApiGetDealsProductsRequest {
1356
1449
  */
1357
1450
  readonly limit?: number;
1358
1451
  /**
1359
- * The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;deal_id&#x60;, &#x60;add_time&#x60;, &#x60;update_time&#x60;.
1360
- * @type {'id' | 'deal_id' | 'add_time' | 'update_time'}
1452
+ * The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;deal_id&#x60;, &#x60;add_time&#x60;, &#x60;update_time&#x60;, &#x60;order_nr&#x60;.
1453
+ * @type {'id' | 'deal_id' | 'add_time' | 'update_time' | 'order_nr'}
1361
1454
  * @memberof DealsApiGetDealsProducts
1362
1455
  */
1363
- readonly sort_by?: 'id' | 'deal_id' | 'add_time' | 'update_time';
1456
+ readonly sort_by?: 'id' | 'deal_id' | 'add_time' | 'update_time' | 'order_nr';
1364
1457
  /**
1365
1458
  * The sorting direction. Supported values: &#x60;asc&#x60;, &#x60;desc&#x60;.
1366
1459
  * @type {'asc' | 'desc'}
@@ -1518,10 +1611,10 @@ export interface DealsApiUpdateAdditionalDiscountRequest {
1518
1611
  readonly id: number;
1519
1612
  /**
1520
1613
  * The ID of the discount
1521
- * @type {number}
1614
+ * @type {string}
1522
1615
  * @memberof DealsApiUpdateAdditionalDiscount
1523
1616
  */
1524
- readonly discount_id: number;
1617
+ readonly discount_id: string;
1525
1618
  /**
1526
1619
  *
1527
1620
  * @type {UpdateAdditionalDiscountRequestBody}
@@ -1632,6 +1725,15 @@ export declare class DealsApi extends BaseAPI {
1632
1725
  * @memberof DealsApi
1633
1726
  */
1634
1727
  addDealProduct(requestParameters: DealsApiAddDealProductRequest): Promise<AddDealProductResponse>;
1728
+ /**
1729
+ * Adds multiple products to a deal in a single request. Maximum of 100 products allowed per request.
1730
+ * @summary Add multiple products to a deal
1731
+ * @param {DealsApiAddManyDealProductsRequest} requestParameters Request parameters.
1732
+
1733
+ * @throws {RequiredError}
1734
+ * @memberof DealsApi
1735
+ */
1736
+ addManyDealProducts(requestParameters: DealsApiAddManyDealProductsRequest): Promise<AddManyDealProductResponse>;
1635
1737
  /**
1636
1738
  * Initiates a conversion of a deal to a lead. 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. There are exceptions for entities like invoices or history that are not transferred and remain linked to the original deal. If the conversion is successful, the deal 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/Deals#getDealConversionStatus\">/api/v2/deals/{deal_id}/convert/status/{conversion_id}</a> endpoint.
1637
1739
  * @summary Convert a deal to a lead (BETA)
@@ -1686,6 +1788,15 @@ export declare class DealsApi extends BaseAPI {
1686
1788
  * @memberof DealsApi
1687
1789
  */
1688
1790
  deleteInstallment(requestParameters: DealsApiDeleteInstallmentRequest): Promise<DeleteInstallmentResponse>;
1791
+ /**
1792
+ * Deletes multiple products from a deal. If no product IDs are specified, up to 100 products will be removed from the deal. A maximum of 100 product IDs can be provided per request.
1793
+ * @summary Delete many products from a deal
1794
+ * @param {DealsApiDeleteManyDealProductsRequest} requestParameters Request parameters.
1795
+
1796
+ * @throws {RequiredError}
1797
+ * @memberof DealsApi
1798
+ */
1799
+ deleteManyDealProducts(requestParameters: DealsApiDeleteManyDealProductsRequest): Promise<DeleteManyDealProductResponse>;
1689
1800
  /**
1690
1801
  * Lists discounts attached to a deal.
1691
1802
  * @summary List discounts added to a deal
@@ -139,6 +139,43 @@ export const DealsApiAxiosParamCreator = function (configuration) {
139
139
  options: localVarRequestOptions,
140
140
  };
141
141
  }),
142
+ /**
143
+ * Adds multiple products to a deal in a single request. Maximum of 100 products allowed per request.
144
+ * @summary Add multiple products to a deal
145
+ * @param {number} id The ID of the deal
146
+ * @param {CreateManyDealProductRequest} [CreateManyDealProductRequest]
147
+
148
+ * @throws {RequiredError}
149
+ */
150
+ addManyDealProducts: (id, CreateManyDealProductRequest) => __awaiter(this, void 0, void 0, function* () {
151
+ // verify required parameter 'id' is not null or undefined
152
+ assertParamExists('addManyDealProducts', 'id', id);
153
+ const localVarPath = `/deals/{id}/products/bulk`
154
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
155
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
156
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
157
+ let baseOptions;
158
+ if (configuration) {
159
+ baseOptions = configuration.baseOptions;
160
+ }
161
+ const localVarRequestOptions = Object.assign({ method: 'POST' }, baseOptions);
162
+ const localVarHeaderParameter = {};
163
+ const localVarQueryParameter = {};
164
+ // authentication api_key required
165
+ yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
166
+ // authentication oauth2 required
167
+ // oauth required
168
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:full", "deals:full"], configuration);
169
+ localVarHeaderParameter['Content-Type'] = 'application/json';
170
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
171
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
172
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
173
+ localVarRequestOptions.data = serializeDataIfNeeded(CreateManyDealProductRequest, localVarRequestOptions, configuration);
174
+ return {
175
+ url: toPathString(localVarUrlObj),
176
+ options: localVarRequestOptions,
177
+ };
178
+ }),
142
179
  /**
143
180
  * Initiates a conversion of a deal to a lead. 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. There are exceptions for entities like invoices or history that are not transferred and remain linked to the original deal. If the conversion is successful, the deal 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/Deals#getDealConversionStatus\">/api/v2/deals/{deal_id}/convert/status/{conversion_id}</a> endpoint.
144
181
  * @summary Convert a deal to a lead (BETA)
@@ -177,7 +214,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
177
214
  * Removes a discount from a deal, changing the deal value if the deal has one-time products attached.
178
215
  * @summary Delete a discount from a deal
179
216
  * @param {number} id The ID of the deal
180
- * @param {number} discount_id The ID of the discount
217
+ * @param {string} discount_id The ID of the discount
181
218
 
182
219
  * @throws {RequiredError}
183
220
  */
@@ -359,6 +396,44 @@ export const DealsApiAxiosParamCreator = function (configuration) {
359
396
  options: localVarRequestOptions,
360
397
  };
361
398
  }),
399
+ /**
400
+ * Deletes multiple products from a deal. If no product IDs are specified, up to 100 products will be removed from the deal. A maximum of 100 product IDs can be provided per request.
401
+ * @summary Delete many products from a deal
402
+ * @param {number} id The ID of the deal
403
+ * @param {string} [ids] Comma-separated list of deal product IDs to delete. If not provided, all deal products will be deleted up to 100 items. Maximum 100 IDs allowed.
404
+
405
+ * @throws {RequiredError}
406
+ */
407
+ deleteManyDealProducts: (id, ids) => __awaiter(this, void 0, void 0, function* () {
408
+ // verify required parameter 'id' is not null or undefined
409
+ assertParamExists('deleteManyDealProducts', 'id', id);
410
+ const localVarPath = `/deals/{id}/products`
411
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
412
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
413
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
414
+ let baseOptions;
415
+ if (configuration) {
416
+ baseOptions = configuration.baseOptions;
417
+ }
418
+ const localVarRequestOptions = Object.assign({ method: 'DELETE' }, baseOptions);
419
+ const localVarHeaderParameter = {};
420
+ const localVarQueryParameter = {};
421
+ // authentication api_key required
422
+ yield setApiKeyToObject(localVarHeaderParameter, "x-api-token", configuration);
423
+ // authentication oauth2 required
424
+ // oauth required
425
+ yield setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:full", "deals:full"], configuration);
426
+ if (ids !== undefined) {
427
+ localVarQueryParameter['ids'] = ids;
428
+ }
429
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
430
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
431
+ localVarRequestOptions.headers = Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions);
432
+ return {
433
+ url: toPathString(localVarUrlObj),
434
+ options: localVarRequestOptions,
435
+ };
436
+ }),
362
437
  /**
363
438
  * Lists discounts attached to a deal.
364
439
  * @summary List discounts added to a deal
@@ -657,7 +732,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
657
732
  * @param {number} id The ID of the deal
658
733
  * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
659
734
  * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
660
- * @param {'id' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;add_time&#x60;, &#x60;update_time&#x60;.
735
+ * @param {'id' | 'add_time' | 'update_time' | 'order_nr'} [sort_by] The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;add_time&#x60;, &#x60;update_time&#x60;, &#x60;order_nr&#x60;.
661
736
  * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: &#x60;asc&#x60;, &#x60;desc&#x60;.
662
737
 
663
738
  * @throws {RequiredError}
@@ -801,7 +876,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
801
876
  * @param {Array<number>} deal_ids An array of integers with the IDs of the deals for which the attached products will be returned. A maximum of 100 deal IDs can be provided.
802
877
  * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
803
878
  * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
804
- * @param {'id' | 'deal_id' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;deal_id&#x60;, &#x60;add_time&#x60;, &#x60;update_time&#x60;.
879
+ * @param {'id' | 'deal_id' | 'add_time' | 'update_time' | 'order_nr'} [sort_by] The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;deal_id&#x60;, &#x60;add_time&#x60;, &#x60;update_time&#x60;, &#x60;order_nr&#x60;.
805
880
  * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: &#x60;asc&#x60;, &#x60;desc&#x60;.
806
881
 
807
882
  * @throws {RequiredError}
@@ -1045,7 +1120,7 @@ export const DealsApiAxiosParamCreator = function (configuration) {
1045
1120
  * Edits a discount added to a deal, changing the deal value if the deal has one-time products attached.
1046
1121
  * @summary Update a discount added to a deal
1047
1122
  * @param {number} id The ID of the deal
1048
- * @param {number} discount_id The ID of the discount
1123
+ * @param {string} discount_id The ID of the discount
1049
1124
  * @param {UpdateAdditionalDiscountRequestBody} [UpdateAdditionalDiscountRequestBody]
1050
1125
 
1051
1126
  * @throws {RequiredError}
@@ -1251,6 +1326,20 @@ export const DealsApiFp = function (configuration) {
1251
1326
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1252
1327
  });
1253
1328
  },
1329
+ /**
1330
+ * Adds multiple products to a deal in a single request. Maximum of 100 products allowed per request.
1331
+ * @summary Add multiple products to a deal
1332
+ * @param {number} id The ID of the deal
1333
+ * @param {CreateManyDealProductRequest} [CreateManyDealProductRequest]
1334
+
1335
+ * @throws {RequiredError}
1336
+ */
1337
+ addManyDealProducts(id, CreateManyDealProductRequest) {
1338
+ return __awaiter(this, void 0, void 0, function* () {
1339
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.addManyDealProducts(id, CreateManyDealProductRequest);
1340
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1341
+ });
1342
+ },
1254
1343
  /**
1255
1344
  * Initiates a conversion of a deal to a lead. 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. There are exceptions for entities like invoices or history that are not transferred and remain linked to the original deal. If the conversion is successful, the deal 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/Deals#getDealConversionStatus\">/api/v2/deals/{deal_id}/convert/status/{conversion_id}</a> endpoint.
1256
1345
  * @summary Convert a deal to a lead (BETA)
@@ -1268,7 +1357,7 @@ export const DealsApiFp = function (configuration) {
1268
1357
  * Removes a discount from a deal, changing the deal value if the deal has one-time products attached.
1269
1358
  * @summary Delete a discount from a deal
1270
1359
  * @param {number} id The ID of the deal
1271
- * @param {number} discount_id The ID of the discount
1360
+ * @param {string} discount_id The ID of the discount
1272
1361
 
1273
1362
  * @throws {RequiredError}
1274
1363
  */
@@ -1333,6 +1422,20 @@ export const DealsApiFp = function (configuration) {
1333
1422
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1334
1423
  });
1335
1424
  },
1425
+ /**
1426
+ * Deletes multiple products from a deal. If no product IDs are specified, up to 100 products will be removed from the deal. A maximum of 100 product IDs can be provided per request.
1427
+ * @summary Delete many products from a deal
1428
+ * @param {number} id The ID of the deal
1429
+ * @param {string} [ids] Comma-separated list of deal product IDs to delete. If not provided, all deal products will be deleted up to 100 items. Maximum 100 IDs allowed.
1430
+
1431
+ * @throws {RequiredError}
1432
+ */
1433
+ deleteManyDealProducts(id, ids) {
1434
+ return __awaiter(this, void 0, void 0, function* () {
1435
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteManyDealProducts(id, ids);
1436
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1437
+ });
1438
+ },
1336
1439
  /**
1337
1440
  * Lists discounts attached to a deal.
1338
1441
  * @summary List discounts added to a deal
@@ -1439,7 +1542,7 @@ export const DealsApiFp = function (configuration) {
1439
1542
  * @param {number} id The ID of the deal
1440
1543
  * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
1441
1544
  * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
1442
- * @param {'id' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;add_time&#x60;, &#x60;update_time&#x60;.
1545
+ * @param {'id' | 'add_time' | 'update_time' | 'order_nr'} [sort_by] The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;add_time&#x60;, &#x60;update_time&#x60;, &#x60;order_nr&#x60;.
1443
1546
  * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: &#x60;asc&#x60;, &#x60;desc&#x60;.
1444
1547
 
1445
1548
  * @throws {RequiredError}
@@ -1484,7 +1587,7 @@ export const DealsApiFp = function (configuration) {
1484
1587
  * @param {Array<number>} deal_ids An array of integers with the IDs of the deals for which the attached products will be returned. A maximum of 100 deal IDs can be provided.
1485
1588
  * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
1486
1589
  * @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
1487
- * @param {'id' | 'deal_id' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;deal_id&#x60;, &#x60;add_time&#x60;, &#x60;update_time&#x60;.
1590
+ * @param {'id' | 'deal_id' | 'add_time' | 'update_time' | 'order_nr'} [sort_by] The field to sort by. Supported fields: &#x60;id&#x60;, &#x60;deal_id&#x60;, &#x60;add_time&#x60;, &#x60;update_time&#x60;, &#x60;order_nr&#x60;.
1488
1591
  * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: &#x60;asc&#x60;, &#x60;desc&#x60;.
1489
1592
 
1490
1593
  * @throws {RequiredError}
@@ -1565,7 +1668,7 @@ export const DealsApiFp = function (configuration) {
1565
1668
  * Edits a discount added to a deal, changing the deal value if the deal has one-time products attached.
1566
1669
  * @summary Update a discount added to a deal
1567
1670
  * @param {number} id The ID of the deal
1568
- * @param {number} discount_id The ID of the discount
1671
+ * @param {string} discount_id The ID of the discount
1569
1672
  * @param {UpdateAdditionalDiscountRequestBody} [UpdateAdditionalDiscountRequestBody]
1570
1673
 
1571
1674
  * @throws {RequiredError}
@@ -1659,6 +1762,16 @@ export const DealsApiFactory = function (configuration, basePath, axios) {
1659
1762
  addDealProduct(requestParameters) {
1660
1763
  return localVarFp.addDealProduct(requestParameters.id, requestParameters.AddDealProductRequest).then((request) => request(axios, basePath));
1661
1764
  },
1765
+ /**
1766
+ * Adds multiple products to a deal in a single request. Maximum of 100 products allowed per request.
1767
+ * @summary Add multiple products to a deal
1768
+ * @param {DealsApiAddManyDealProductsRequest} requestParameters Request parameters.
1769
+
1770
+ * @throws {RequiredError}
1771
+ */
1772
+ addManyDealProducts(requestParameters) {
1773
+ return localVarFp.addManyDealProducts(requestParameters.id, requestParameters.CreateManyDealProductRequest).then((request) => request(axios, basePath));
1774
+ },
1662
1775
  /**
1663
1776
  * Initiates a conversion of a deal to a lead. 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. There are exceptions for entities like invoices or history that are not transferred and remain linked to the original deal. If the conversion is successful, the deal 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/Deals#getDealConversionStatus\">/api/v2/deals/{deal_id}/convert/status/{conversion_id}</a> endpoint.
1664
1777
  * @summary Convert a deal to a lead (BETA)
@@ -1719,6 +1832,16 @@ export const DealsApiFactory = function (configuration, basePath, axios) {
1719
1832
  deleteInstallment(requestParameters) {
1720
1833
  return localVarFp.deleteInstallment(requestParameters.id, requestParameters.installment_id).then((request) => request(axios, basePath));
1721
1834
  },
1835
+ /**
1836
+ * Deletes multiple products from a deal. If no product IDs are specified, up to 100 products will be removed from the deal. A maximum of 100 product IDs can be provided per request.
1837
+ * @summary Delete many products from a deal
1838
+ * @param {DealsApiDeleteManyDealProductsRequest} requestParameters Request parameters.
1839
+
1840
+ * @throws {RequiredError}
1841
+ */
1842
+ deleteManyDealProducts(requestParameters) {
1843
+ return localVarFp.deleteManyDealProducts(requestParameters.id, requestParameters.ids).then((request) => request(axios, basePath));
1844
+ },
1722
1845
  /**
1723
1846
  * Lists discounts attached to a deal.
1724
1847
  * @summary List discounts added to a deal
@@ -1931,6 +2054,17 @@ export class DealsApi extends BaseAPI {
1931
2054
  addDealProduct(requestParameters) {
1932
2055
  return DealsApiFp(this.configuration).addDealProduct(requestParameters.id, requestParameters.AddDealProductRequest).then((request) => request(this.axios, this.basePath));
1933
2056
  }
2057
+ /**
2058
+ * Adds multiple products to a deal in a single request. Maximum of 100 products allowed per request.
2059
+ * @summary Add multiple products to a deal
2060
+ * @param {DealsApiAddManyDealProductsRequest} requestParameters Request parameters.
2061
+
2062
+ * @throws {RequiredError}
2063
+ * @memberof DealsApi
2064
+ */
2065
+ addManyDealProducts(requestParameters) {
2066
+ return DealsApiFp(this.configuration).addManyDealProducts(requestParameters.id, requestParameters.CreateManyDealProductRequest).then((request) => request(this.axios, this.basePath));
2067
+ }
1934
2068
  /**
1935
2069
  * Initiates a conversion of a deal to a lead. 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. There are exceptions for entities like invoices or history that are not transferred and remain linked to the original deal. If the conversion is successful, the deal 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/Deals#getDealConversionStatus\">/api/v2/deals/{deal_id}/convert/status/{conversion_id}</a> endpoint.
1936
2070
  * @summary Convert a deal to a lead (BETA)
@@ -1997,6 +2131,17 @@ export class DealsApi extends BaseAPI {
1997
2131
  deleteInstallment(requestParameters) {
1998
2132
  return DealsApiFp(this.configuration).deleteInstallment(requestParameters.id, requestParameters.installment_id).then((request) => request(this.axios, this.basePath));
1999
2133
  }
2134
+ /**
2135
+ * Deletes multiple products from a deal. If no product IDs are specified, up to 100 products will be removed from the deal. A maximum of 100 product IDs can be provided per request.
2136
+ * @summary Delete many products from a deal
2137
+ * @param {DealsApiDeleteManyDealProductsRequest} requestParameters Request parameters.
2138
+
2139
+ * @throws {RequiredError}
2140
+ * @memberof DealsApi
2141
+ */
2142
+ deleteManyDealProducts(requestParameters) {
2143
+ return DealsApiFp(this.configuration).deleteManyDealProducts(requestParameters.id, requestParameters.ids).then((request) => request(this.axios, this.basePath));
2144
+ }
2000
2145
  /**
2001
2146
  * Lists discounts attached to a deal.
2002
2147
  * @summary List discounts added to a deal