pipedrive 18.1.4 → 19.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. package/README.md +21 -1
  2. package/dist/api/ActivitiesApi.js +76 -5
  3. package/dist/api/DealsApi.js +91 -25
  4. package/dist/api/LeadsApi.js +56 -0
  5. package/dist/api/ProductsApi.js +6 -6
  6. package/dist/api/RolesApi.js +125 -0
  7. package/dist/api/StagesApi.js +7 -1
  8. package/dist/index.js +108 -3
  9. package/dist/model/ActivityCollectionResponseObject.js +637 -0
  10. package/dist/model/ActivityCollectionResponseObjectAllOf.js +346 -0
  11. package/dist/model/ActivityObjectFragment.js +11 -11
  12. package/dist/model/ActivityPostObject.js +32 -17
  13. package/dist/model/ActivityPostObjectAllOf.js +10 -0
  14. package/dist/model/ActivityPutObject.js +32 -17
  15. package/dist/model/ActivityPutObjectAllOf.js +10 -0
  16. package/dist/model/ActivityResponseObject.js +55 -45
  17. package/dist/model/ActivityResponseObjectAllOf.js +22 -22
  18. package/dist/model/AddProductAttachmentDetails.js +29 -28
  19. package/dist/model/AddProductRequestBody.js +18 -11
  20. package/dist/model/AddWebhookRequest.js +29 -0
  21. package/dist/model/AdditionalDataWithCursorPagination.js +79 -0
  22. package/dist/model/AdditionalDataWithOffsetPagination.js +79 -0
  23. package/dist/model/BaseDeal.js +1 -1
  24. package/dist/model/BaseProduct.js +10 -7
  25. package/dist/model/BasicDealProduct.js +19 -8
  26. package/dist/model/DealCollectionResponseObject.js +278 -0
  27. package/dist/model/DealNonStrict.js +2 -2
  28. package/dist/model/DealNonStrictWithDetails.js +2 -2
  29. package/dist/model/DealProductUnitDuration.js +61 -0
  30. package/dist/model/DealStrict.js +2 -2
  31. package/dist/model/DealStrictWithMergeId.js +2 -2
  32. package/dist/model/DeleteDealProductData.js +0 -10
  33. package/dist/model/GetActivitiesCollectionResponse200.js +97 -0
  34. package/dist/model/GetComments.js +3 -3
  35. package/dist/model/GetDealsCollection.js +98 -0
  36. package/dist/model/GetNotes.js +3 -3
  37. package/dist/model/GetRolePipelines.js +108 -0
  38. package/dist/model/GetRolePipelinesAllOf.js +78 -0
  39. package/dist/model/GetRolePipelinesAllOfData.js +89 -0
  40. package/dist/model/ListProductFilesResponse.js +124 -0
  41. package/dist/model/ListProductFilesResponseAllOf.js +89 -0
  42. package/dist/model/NewDealProduct.js +30 -13
  43. package/dist/model/PersonListProduct.js +10 -7
  44. package/dist/model/ProductAttachmentDetails.js +29 -23
  45. package/dist/model/ProductBaseDeal.js +1 -1
  46. package/dist/model/ProductFileItem.js +219 -0
  47. package/dist/model/ProductRequest.js +10 -7
  48. package/dist/model/ProductWithArrayPrices.js +18 -11
  49. package/dist/model/ProductWithObjectPrices.js +18 -11
  50. package/dist/model/PutRolePipelinesBody.js +81 -0
  51. package/dist/model/UpdateDealProduct.js +176 -0
  52. package/dist/model/UpdateProductRequestBody.js +18 -11
  53. package/package.json +1 -1
@@ -88,14 +88,14 @@ var ActivityResponseObject = /*#__PURE__*/function () {
88
88
  obj['person_id'] = _ApiClient["default"].convertToType(data['person_id'], 'Number');
89
89
  delete data['person_id'];
90
90
  }
91
+ if (data.hasOwnProperty('project_id')) {
92
+ obj['project_id'] = _ApiClient["default"].convertToType(data['project_id'], 'Number');
93
+ delete data['project_id'];
94
+ }
91
95
  if (data.hasOwnProperty('org_id')) {
92
96
  obj['org_id'] = _ApiClient["default"].convertToType(data['org_id'], 'Number');
93
97
  delete data['org_id'];
94
98
  }
95
- if (data.hasOwnProperty('note')) {
96
- obj['note'] = _ApiClient["default"].convertToType(data['note'], 'String');
97
- delete data['note'];
98
- }
99
99
  if (data.hasOwnProperty('location')) {
100
100
  obj['location'] = _ApiClient["default"].convertToType(data['location'], 'String');
101
101
  delete data['location'];
@@ -108,6 +108,10 @@ var ActivityResponseObject = /*#__PURE__*/function () {
108
108
  obj['id'] = _ApiClient["default"].convertToType(data['id'], 'Number');
109
109
  delete data['id'];
110
110
  }
111
+ if (data.hasOwnProperty('note')) {
112
+ obj['note'] = _ApiClient["default"].convertToType(data['note'], 'String');
113
+ delete data['note'];
114
+ }
111
115
  if (data.hasOwnProperty('done')) {
112
116
  obj['done'] = _ApiClient["default"].convertToType(data['done'], 'Boolean');
113
117
  delete data['done'];
@@ -350,16 +354,16 @@ ActivityResponseObject.prototype['lead_id'] = undefined;
350
354
  ActivityResponseObject.prototype['person_id'] = undefined;
351
355
 
352
356
  /**
353
- * The ID of the organization this activity is associated with
354
- * @member {Number} org_id
357
+ * The ID of the project this activity is associated with
358
+ * @member {Number} project_id
355
359
  */
356
- ActivityResponseObject.prototype['org_id'] = undefined;
360
+ ActivityResponseObject.prototype['project_id'] = undefined;
357
361
 
358
362
  /**
359
- * The note of the activity (HTML format)
360
- * @member {String} note
363
+ * The ID of the organization this activity is associated with
364
+ * @member {Number} org_id
361
365
  */
362
- ActivityResponseObject.prototype['note'] = undefined;
366
+ ActivityResponseObject.prototype['org_id'] = undefined;
363
367
 
364
368
  /**
365
369
  * The address of the activity. Pipedrive will automatically check if the location matches a geo-location on Google maps.
@@ -374,11 +378,17 @@ ActivityResponseObject.prototype['location'] = undefined;
374
378
  ActivityResponseObject.prototype['public_description'] = undefined;
375
379
 
376
380
  /**
377
- * The activity ID, generated when the activity was created
381
+ * The ID of the activity, generated when the activity was created
378
382
  * @member {Number} id
379
383
  */
380
384
  ActivityResponseObject.prototype['id'] = undefined;
381
385
 
386
+ /**
387
+ * The note of the activity (HTML format)
388
+ * @member {String} note
389
+ */
390
+ ActivityResponseObject.prototype['note'] = undefined;
391
+
382
392
  /**
383
393
  * Whether the activity is done or not
384
394
  * @member {Boolean} done
@@ -440,7 +450,7 @@ ActivityResponseObject.prototype['reference_type'] = undefined;
440
450
  ActivityResponseObject.prototype['reference_id'] = undefined;
441
451
 
442
452
  /**
443
- * The ID of Marketplace app, which is connected to this activity
453
+ * The ID of the Marketplace app, which is connected to this activity
444
454
  * @member {String} conference_meeting_client
445
455
  */
446
456
  ActivityResponseObject.prototype['conference_meeting_client'] = undefined;
@@ -566,61 +576,61 @@ ActivityResponseObject.prototype['series'] = undefined;
566
576
  ActivityResponseObject.prototype['created_by_user_id'] = undefined;
567
577
 
568
578
  /**
569
- * Subfield of location field. Indicates apartment/suite number.
579
+ * A subfield of the location field. Indicates apartment/suite number.
570
580
  * @member {String} location_subpremise
571
581
  */
572
582
  ActivityResponseObject.prototype['location_subpremise'] = undefined;
573
583
 
574
584
  /**
575
- * Subfield of location field. Indicates house number.
585
+ * A subfield of the location field. Indicates house number.
576
586
  * @member {String} location_street_number
577
587
  */
578
588
  ActivityResponseObject.prototype['location_street_number'] = undefined;
579
589
 
580
590
  /**
581
- * Subfield of location field. Indicates street name.
591
+ * A subfield of the location field. Indicates street name.
582
592
  * @member {String} location_route
583
593
  */
584
594
  ActivityResponseObject.prototype['location_route'] = undefined;
585
595
 
586
596
  /**
587
- * Subfield of location field. Indicates district/sublocality.
597
+ * A subfield of the location field. Indicates district/sublocality.
588
598
  * @member {String} location_sublocality
589
599
  */
590
600
  ActivityResponseObject.prototype['location_sublocality'] = undefined;
591
601
 
592
602
  /**
593
- * Subfield of location field. Indicates city/town/village/locality.
603
+ * A subfield of the location field. Indicates city/town/village/locality.
594
604
  * @member {String} location_locality
595
605
  */
596
606
  ActivityResponseObject.prototype['location_locality'] = undefined;
597
607
 
598
608
  /**
599
- * Subfield of location field. Indicates state/county.
609
+ * A subfield of the location field. Indicates state/county.
600
610
  * @member {String} location_admin_area_level_1
601
611
  */
602
612
  ActivityResponseObject.prototype['location_admin_area_level_1'] = undefined;
603
613
 
604
614
  /**
605
- * Subfield of location field. Indicates region.
615
+ * A subfield of the location field. Indicates region.
606
616
  * @member {String} location_admin_area_level_2
607
617
  */
608
618
  ActivityResponseObject.prototype['location_admin_area_level_2'] = undefined;
609
619
 
610
620
  /**
611
- * Subfield of location field. Indicates country.
621
+ * A subfield of the location field. Indicates country.
612
622
  * @member {String} location_country
613
623
  */
614
624
  ActivityResponseObject.prototype['location_country'] = undefined;
615
625
 
616
626
  /**
617
- * Subfield of location field. Indicates ZIP/postal code.
627
+ * A subfield of the location field. Indicates ZIP/postal code.
618
628
  * @member {String} location_postal_code
619
629
  */
620
630
  ActivityResponseObject.prototype['location_postal_code'] = undefined;
621
631
 
622
632
  /**
623
- * Subfield of location field. Indicates full/combined address.
633
+ * A subfield of the location field. Indicates full/combined address.
624
634
  * @member {String} location_formatted_address
625
635
  */
626
636
  ActivityResponseObject.prototype['location_formatted_address'] = undefined;
@@ -695,7 +705,7 @@ _ActivityObjectFragment["default"].prototype['duration'] = undefined;
695
705
  */
696
706
  _ActivityObjectFragment["default"].prototype['deal_id'] = undefined;
697
707
  /**
698
- * The ID of the lead this activity is associated with
708
+ * The ID of the lead in the UUID format this activity is associated with
699
709
  * @member {String} lead_id
700
710
  */
701
711
  _ActivityObjectFragment["default"].prototype['lead_id'] = undefined;
@@ -704,16 +714,16 @@ _ActivityObjectFragment["default"].prototype['lead_id'] = undefined;
704
714
  * @member {Number} person_id
705
715
  */
706
716
  _ActivityObjectFragment["default"].prototype['person_id'] = undefined;
717
+ /**
718
+ * The ID of the project this activity is associated with
719
+ * @member {Number} project_id
720
+ */
721
+ _ActivityObjectFragment["default"].prototype['project_id'] = undefined;
707
722
  /**
708
723
  * The ID of the organization this activity is associated with
709
724
  * @member {Number} org_id
710
725
  */
711
726
  _ActivityObjectFragment["default"].prototype['org_id'] = undefined;
712
- /**
713
- * The note of the activity (HTML format)
714
- * @member {String} note
715
- */
716
- _ActivityObjectFragment["default"].prototype['note'] = undefined;
717
727
  /**
718
728
  * The address of the activity. Pipedrive will automatically check if the location matches a geo-location on Google maps.
719
729
  * @member {String} location
@@ -726,10 +736,15 @@ _ActivityObjectFragment["default"].prototype['location'] = undefined;
726
736
  _ActivityObjectFragment["default"].prototype['public_description'] = undefined;
727
737
  // Implement ActivityResponseObjectAllOf interface:
728
738
  /**
729
- * The activity ID, generated when the activity was created
739
+ * The ID of the activity, generated when the activity was created
730
740
  * @member {Number} id
731
741
  */
732
742
  _ActivityResponseObjectAllOf["default"].prototype['id'] = undefined;
743
+ /**
744
+ * The note of the activity (HTML format)
745
+ * @member {String} note
746
+ */
747
+ _ActivityResponseObjectAllOf["default"].prototype['note'] = undefined;
733
748
  /**
734
749
  * Whether the activity is done or not
735
750
  * @member {Boolean} done
@@ -781,7 +796,7 @@ _ActivityResponseObjectAllOf["default"].prototype['reference_type'] = undefined;
781
796
  */
782
797
  _ActivityResponseObjectAllOf["default"].prototype['reference_id'] = undefined;
783
798
  /**
784
- * The ID of Marketplace app, which is connected to this activity
799
+ * The ID of the Marketplace app, which is connected to this activity
785
800
  * @member {String} conference_meeting_client
786
801
  */
787
802
  _ActivityResponseObjectAllOf["default"].prototype['conference_meeting_client'] = undefined;
@@ -820,11 +835,6 @@ _ActivityResponseObjectAllOf["default"].prototype['last_notification_user_id'] =
820
835
  * @member {Number} notification_language_id
821
836
  */
822
837
  _ActivityResponseObjectAllOf["default"].prototype['notification_language_id'] = undefined;
823
- /**
824
- * The ID of the lead in the UUID format this activity is associated with
825
- * @member {String} lead_id
826
- */
827
- _ActivityResponseObjectAllOf["default"].prototype['lead_id'] = undefined;
828
838
  /**
829
839
  * Whether the activity is active or not
830
840
  * @member {Boolean} active_flag
@@ -891,52 +901,52 @@ _ActivityResponseObjectAllOf["default"].prototype['series'] = undefined;
891
901
  */
892
902
  _ActivityResponseObjectAllOf["default"].prototype['created_by_user_id'] = undefined;
893
903
  /**
894
- * Subfield of location field. Indicates apartment/suite number.
904
+ * A subfield of the location field. Indicates apartment/suite number.
895
905
  * @member {String} location_subpremise
896
906
  */
897
907
  _ActivityResponseObjectAllOf["default"].prototype['location_subpremise'] = undefined;
898
908
  /**
899
- * Subfield of location field. Indicates house number.
909
+ * A subfield of the location field. Indicates house number.
900
910
  * @member {String} location_street_number
901
911
  */
902
912
  _ActivityResponseObjectAllOf["default"].prototype['location_street_number'] = undefined;
903
913
  /**
904
- * Subfield of location field. Indicates street name.
914
+ * A subfield of the location field. Indicates street name.
905
915
  * @member {String} location_route
906
916
  */
907
917
  _ActivityResponseObjectAllOf["default"].prototype['location_route'] = undefined;
908
918
  /**
909
- * Subfield of location field. Indicates district/sublocality.
919
+ * A subfield of the location field. Indicates district/sublocality.
910
920
  * @member {String} location_sublocality
911
921
  */
912
922
  _ActivityResponseObjectAllOf["default"].prototype['location_sublocality'] = undefined;
913
923
  /**
914
- * Subfield of location field. Indicates city/town/village/locality.
924
+ * A subfield of the location field. Indicates city/town/village/locality.
915
925
  * @member {String} location_locality
916
926
  */
917
927
  _ActivityResponseObjectAllOf["default"].prototype['location_locality'] = undefined;
918
928
  /**
919
- * Subfield of location field. Indicates state/county.
929
+ * A subfield of the location field. Indicates state/county.
920
930
  * @member {String} location_admin_area_level_1
921
931
  */
922
932
  _ActivityResponseObjectAllOf["default"].prototype['location_admin_area_level_1'] = undefined;
923
933
  /**
924
- * Subfield of location field. Indicates region.
934
+ * A subfield of the location field. Indicates region.
925
935
  * @member {String} location_admin_area_level_2
926
936
  */
927
937
  _ActivityResponseObjectAllOf["default"].prototype['location_admin_area_level_2'] = undefined;
928
938
  /**
929
- * Subfield of location field. Indicates country.
939
+ * A subfield of the location field. Indicates country.
930
940
  * @member {String} location_country
931
941
  */
932
942
  _ActivityResponseObjectAllOf["default"].prototype['location_country'] = undefined;
933
943
  /**
934
- * Subfield of location field. Indicates ZIP/postal code.
944
+ * A subfield of the location field. Indicates ZIP/postal code.
935
945
  * @member {String} location_postal_code
936
946
  */
937
947
  _ActivityResponseObjectAllOf["default"].prototype['location_postal_code'] = undefined;
938
948
  /**
939
- * Subfield of location field. Indicates full/combined address.
949
+ * A subfield of the location field. Indicates full/combined address.
940
950
  * @member {String} location_formatted_address
941
951
  */
942
952
  _ActivityResponseObjectAllOf["default"].prototype['location_formatted_address'] = undefined;
@@ -60,6 +60,10 @@ var ActivityResponseObjectAllOf = /*#__PURE__*/function () {
60
60
  obj['id'] = _ApiClient["default"].convertToType(data['id'], 'Number');
61
61
  delete data['id'];
62
62
  }
63
+ if (data.hasOwnProperty('note')) {
64
+ obj['note'] = _ApiClient["default"].convertToType(data['note'], 'String');
65
+ delete data['note'];
66
+ }
63
67
  if (data.hasOwnProperty('done')) {
64
68
  obj['done'] = _ApiClient["default"].convertToType(data['done'], 'Boolean');
65
69
  delete data['done'];
@@ -132,10 +136,6 @@ var ActivityResponseObjectAllOf = /*#__PURE__*/function () {
132
136
  obj['notification_language_id'] = _ApiClient["default"].convertToType(data['notification_language_id'], 'Number');
133
137
  delete data['notification_language_id'];
134
138
  }
135
- if (data.hasOwnProperty('lead_id')) {
136
- obj['lead_id'] = _ApiClient["default"].convertToType(data['lead_id'], 'String');
137
- delete data['lead_id'];
138
- }
139
139
  if (data.hasOwnProperty('active_flag')) {
140
140
  obj['active_flag'] = _ApiClient["default"].convertToType(data['active_flag'], 'Boolean');
141
141
  delete data['active_flag'];
@@ -270,11 +270,17 @@ var ActivityResponseObjectAllOf = /*#__PURE__*/function () {
270
270
  return ActivityResponseObjectAllOf;
271
271
  }();
272
272
  /**
273
- * The activity ID, generated when the activity was created
273
+ * The ID of the activity, generated when the activity was created
274
274
  * @member {Number} id
275
275
  */
276
276
  ActivityResponseObjectAllOf.prototype['id'] = undefined;
277
277
 
278
+ /**
279
+ * The note of the activity (HTML format)
280
+ * @member {String} note
281
+ */
282
+ ActivityResponseObjectAllOf.prototype['note'] = undefined;
283
+
278
284
  /**
279
285
  * Whether the activity is done or not
280
286
  * @member {Boolean} done
@@ -336,7 +342,7 @@ ActivityResponseObjectAllOf.prototype['reference_type'] = undefined;
336
342
  ActivityResponseObjectAllOf.prototype['reference_id'] = undefined;
337
343
 
338
344
  /**
339
- * The ID of Marketplace app, which is connected to this activity
345
+ * The ID of the Marketplace app, which is connected to this activity
340
346
  * @member {String} conference_meeting_client
341
347
  */
342
348
  ActivityResponseObjectAllOf.prototype['conference_meeting_client'] = undefined;
@@ -383,12 +389,6 @@ ActivityResponseObjectAllOf.prototype['last_notification_user_id'] = undefined;
383
389
  */
384
390
  ActivityResponseObjectAllOf.prototype['notification_language_id'] = undefined;
385
391
 
386
- /**
387
- * The ID of the lead in the UUID format this activity is associated with
388
- * @member {String} lead_id
389
- */
390
- ActivityResponseObjectAllOf.prototype['lead_id'] = undefined;
391
-
392
392
  /**
393
393
  * Whether the activity is active or not
394
394
  * @member {Boolean} active_flag
@@ -468,61 +468,61 @@ ActivityResponseObjectAllOf.prototype['series'] = undefined;
468
468
  ActivityResponseObjectAllOf.prototype['created_by_user_id'] = undefined;
469
469
 
470
470
  /**
471
- * Subfield of location field. Indicates apartment/suite number.
471
+ * A subfield of the location field. Indicates apartment/suite number.
472
472
  * @member {String} location_subpremise
473
473
  */
474
474
  ActivityResponseObjectAllOf.prototype['location_subpremise'] = undefined;
475
475
 
476
476
  /**
477
- * Subfield of location field. Indicates house number.
477
+ * A subfield of the location field. Indicates house number.
478
478
  * @member {String} location_street_number
479
479
  */
480
480
  ActivityResponseObjectAllOf.prototype['location_street_number'] = undefined;
481
481
 
482
482
  /**
483
- * Subfield of location field. Indicates street name.
483
+ * A subfield of the location field. Indicates street name.
484
484
  * @member {String} location_route
485
485
  */
486
486
  ActivityResponseObjectAllOf.prototype['location_route'] = undefined;
487
487
 
488
488
  /**
489
- * Subfield of location field. Indicates district/sublocality.
489
+ * A subfield of the location field. Indicates district/sublocality.
490
490
  * @member {String} location_sublocality
491
491
  */
492
492
  ActivityResponseObjectAllOf.prototype['location_sublocality'] = undefined;
493
493
 
494
494
  /**
495
- * Subfield of location field. Indicates city/town/village/locality.
495
+ * A subfield of the location field. Indicates city/town/village/locality.
496
496
  * @member {String} location_locality
497
497
  */
498
498
  ActivityResponseObjectAllOf.prototype['location_locality'] = undefined;
499
499
 
500
500
  /**
501
- * Subfield of location field. Indicates state/county.
501
+ * A subfield of the location field. Indicates state/county.
502
502
  * @member {String} location_admin_area_level_1
503
503
  */
504
504
  ActivityResponseObjectAllOf.prototype['location_admin_area_level_1'] = undefined;
505
505
 
506
506
  /**
507
- * Subfield of location field. Indicates region.
507
+ * A subfield of the location field. Indicates region.
508
508
  * @member {String} location_admin_area_level_2
509
509
  */
510
510
  ActivityResponseObjectAllOf.prototype['location_admin_area_level_2'] = undefined;
511
511
 
512
512
  /**
513
- * Subfield of location field. Indicates country.
513
+ * A subfield of the location field. Indicates country.
514
514
  * @member {String} location_country
515
515
  */
516
516
  ActivityResponseObjectAllOf.prototype['location_country'] = undefined;
517
517
 
518
518
  /**
519
- * Subfield of location field. Indicates ZIP/postal code.
519
+ * A subfield of the location field. Indicates ZIP/postal code.
520
520
  * @member {String} location_postal_code
521
521
  */
522
522
  ActivityResponseObjectAllOf.prototype['location_postal_code'] = undefined;
523
523
 
524
524
  /**
525
- * Subfield of location field. Indicates full/combined address.
525
+ * A subfield of the location field. Indicates full/combined address.
526
526
  * @member {String} location_formatted_address
527
527
  */
528
528
  ActivityResponseObjectAllOf.prototype['location_formatted_address'] = undefined;
@@ -9,14 +9,13 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
9
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
10
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
11
11
  var _AddProductAttachmentDetailsAllOf = _interopRequireDefault(require("./AddProductAttachmentDetailsAllOf"));
12
- var _NumberBoolean = _interopRequireDefault(require("./NumberBoolean"));
13
12
  var _ProductAttachmentDetails = _interopRequireDefault(require("./ProductAttachmentDetails"));
14
13
  /**
15
14
  * Pipedrive API v1
16
15
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
17
16
  *
18
17
  * The version of the OpenAPI document: 1.0.0
19
- *
18
+ *
20
19
  *
21
20
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
22
21
  * https://openapi-generator.tech
@@ -92,6 +91,10 @@ var AddProductAttachmentDetails = /*#__PURE__*/function () {
92
91
  obj['duration'] = _ApiClient["default"].convertToType(data['duration'], 'Number');
93
92
  delete data['duration'];
94
93
  }
94
+ if (data.hasOwnProperty('duration_unit')) {
95
+ obj['duration_unit'] = _ApiClient["default"].convertToType(data['duration_unit'], 'String');
96
+ delete data['duration_unit'];
97
+ }
95
98
  if (data.hasOwnProperty('product_variation_id')) {
96
99
  obj['product_variation_id'] = _ApiClient["default"].convertToType(data['product_variation_id'], 'Number');
97
100
  delete data['product_variation_id'];
@@ -105,7 +108,7 @@ var AddProductAttachmentDetails = /*#__PURE__*/function () {
105
108
  delete data['tax'];
106
109
  }
107
110
  if (data.hasOwnProperty('enabled_flag')) {
108
- obj['enabled_flag'] = _ApiClient["default"].convertToType(data['enabled_flag'], _NumberBoolean["default"]);
111
+ obj['enabled_flag'] = _ApiClient["default"].convertToType(data['enabled_flag'], 'Boolean');
109
112
  delete data['enabled_flag'];
110
113
  }
111
114
  if (data.hasOwnProperty('id')) {
@@ -120,10 +123,6 @@ var AddProductAttachmentDetails = /*#__PURE__*/function () {
120
123
  obj['deal_id'] = _ApiClient["default"].convertToType(data['deal_id'], 'Number');
121
124
  delete data['deal_id'];
122
125
  }
123
- if (data.hasOwnProperty('duration_unit')) {
124
- obj['duration_unit'] = _ApiClient["default"].convertToType(data['duration_unit'], 'String');
125
- delete data['duration_unit'];
126
- }
127
126
  if (data.hasOwnProperty('sum_no_discount')) {
128
127
  obj['sum_no_discount'] = _ApiClient["default"].convertToType(data['sum_no_discount'], 'Number');
129
128
  delete data['sum_no_discount'];
@@ -191,12 +190,18 @@ AddProductAttachmentDetails.prototype['quantity'] = undefined;
191
190
  AddProductAttachmentDetails.prototype['discount_percentage'] = 0;
192
191
 
193
192
  /**
194
- * The duration of the product (when product durations are not enabled for the company or if omitted, defaults to 1)
193
+ * The duration of the product. If omitted, will be set to 1.
195
194
  * @member {Number} duration
196
195
  * @default 1
197
196
  */
198
197
  AddProductAttachmentDetails.prototype['duration'] = 1;
199
198
 
199
+ /**
200
+ * The type of the duration. (For example hourly, daily, etc.)
201
+ * @member {String} duration_unit
202
+ */
203
+ AddProductAttachmentDetails.prototype['duration_unit'] = undefined;
204
+
200
205
  /**
201
206
  * The ID of the product variation to use. When omitted, no variation will be used.
202
207
  * @member {Number} product_variation_id
@@ -204,7 +209,7 @@ AddProductAttachmentDetails.prototype['duration'] = 1;
204
209
  AddProductAttachmentDetails.prototype['product_variation_id'] = undefined;
205
210
 
206
211
  /**
207
- * Any textual comment associated with this product-deal attachment. Visible and editable in the application UI.
212
+ * A textual comment associated with this product-deal attachment
208
213
  * @member {String} comments
209
214
  */
210
215
  AddProductAttachmentDetails.prototype['comments'] = undefined;
@@ -216,10 +221,11 @@ AddProductAttachmentDetails.prototype['comments'] = undefined;
216
221
  AddProductAttachmentDetails.prototype['tax'] = undefined;
217
222
 
218
223
  /**
219
- * Whether the product is enabled on the deal or not. This makes it possible to add products to a deal with a specific price and discount criteria - but keep them disabled, which refrains them from being included in the deal price calculation. When omitted, the product will be marked as enabled by default.
220
- * @member {module:model/NumberBoolean} enabled_flag
224
+ * Whether the product is enabled for a deal or not. This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default.
225
+ * @member {Boolean} enabled_flag
226
+ * @default true
221
227
  */
222
- AddProductAttachmentDetails.prototype['enabled_flag'] = undefined;
228
+ AddProductAttachmentDetails.prototype['enabled_flag'] = true;
223
229
 
224
230
  /**
225
231
  * The ID of the deal-product (the ID of the product attached to the deal)
@@ -239,12 +245,6 @@ AddProductAttachmentDetails.prototype['company_id'] = undefined;
239
245
  */
240
246
  AddProductAttachmentDetails.prototype['deal_id'] = undefined;
241
247
 
242
- /**
243
- * The type of the duration. (For example hourly, daily, etc.)
244
- * @member {String} duration_unit
245
- */
246
- AddProductAttachmentDetails.prototype['duration_unit'] = undefined;
247
-
248
248
  /**
249
249
  * The product sum without the discount
250
250
  * @member {Number} sum_no_discount
@@ -316,18 +316,23 @@ _ProductAttachmentDetails["default"].prototype['quantity'] = undefined;
316
316
  */
317
317
  _ProductAttachmentDetails["default"].prototype['discount_percentage'] = 0;
318
318
  /**
319
- * The duration of the product (when product durations are not enabled for the company or if omitted, defaults to 1)
319
+ * The duration of the product. If omitted, will be set to 1.
320
320
  * @member {Number} duration
321
321
  * @default 1
322
322
  */
323
323
  _ProductAttachmentDetails["default"].prototype['duration'] = 1;
324
+ /**
325
+ * The type of the duration. (For example hourly, daily, etc.)
326
+ * @member {String} duration_unit
327
+ */
328
+ _ProductAttachmentDetails["default"].prototype['duration_unit'] = undefined;
324
329
  /**
325
330
  * The ID of the product variation to use. When omitted, no variation will be used.
326
331
  * @member {Number} product_variation_id
327
332
  */
328
333
  _ProductAttachmentDetails["default"].prototype['product_variation_id'] = undefined;
329
334
  /**
330
- * Any textual comment associated with this product-deal attachment. Visible and editable in the application UI.
335
+ * A textual comment associated with this product-deal attachment
331
336
  * @member {String} comments
332
337
  */
333
338
  _ProductAttachmentDetails["default"].prototype['comments'] = undefined;
@@ -337,10 +342,11 @@ _ProductAttachmentDetails["default"].prototype['comments'] = undefined;
337
342
  */
338
343
  _ProductAttachmentDetails["default"].prototype['tax'] = undefined;
339
344
  /**
340
- * Whether the product is enabled on the deal or not. This makes it possible to add products to a deal with a specific price and discount criteria - but keep them disabled, which refrains them from being included in the deal price calculation. When omitted, the product will be marked as enabled by default.
341
- * @member {module:model/NumberBoolean} enabled_flag
345
+ * Whether the product is enabled for a deal or not. This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default.
346
+ * @member {Boolean} enabled_flag
347
+ * @default true
342
348
  */
343
- _ProductAttachmentDetails["default"].prototype['enabled_flag'] = undefined;
349
+ _ProductAttachmentDetails["default"].prototype['enabled_flag'] = true;
344
350
  /**
345
351
  * The ID of the deal-product (the ID of the product attached to the deal)
346
352
  * @member {Number} id
@@ -356,11 +362,6 @@ _ProductAttachmentDetails["default"].prototype['company_id'] = undefined;
356
362
  * @member {Number} deal_id
357
363
  */
358
364
  _ProductAttachmentDetails["default"].prototype['deal_id'] = undefined;
359
- /**
360
- * The type of the duration. (For example hourly, daily, etc.)
361
- * @member {String} duration_unit
362
- */
363
- _ProductAttachmentDetails["default"].prototype['duration_unit'] = undefined;
364
365
  /**
365
366
  * The product sum without the discount
366
367
  * @member {Number} sum_no_discount
@@ -8,7 +8,6 @@ exports["default"] = void 0;
8
8
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
10
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
11
- var _NumberBooleanDefault = _interopRequireDefault(require("./NumberBooleanDefault1"));
12
11
  var _ProductRequest = _interopRequireDefault(require("./ProductRequest"));
13
12
  var _RequiredNameObject = _interopRequireDefault(require("./RequiredNameObject"));
14
13
  var _VisibleTo = _interopRequireDefault(require("./VisibleTo"));
@@ -86,11 +85,11 @@ var AddProductRequestBody = /*#__PURE__*/function () {
86
85
  delete data['tax'];
87
86
  }
88
87
  if (data.hasOwnProperty('active_flag')) {
89
- obj['active_flag'] = _NumberBooleanDefault["default"].constructFromObject(data['active_flag']);
88
+ obj['active_flag'] = _ApiClient["default"].convertToType(data['active_flag'], 'Boolean');
90
89
  delete data['active_flag'];
91
90
  }
92
91
  if (data.hasOwnProperty('selectable')) {
93
- obj['selectable'] = _NumberBooleanDefault["default"].constructFromObject(data['selectable']);
92
+ obj['selectable'] = _ApiClient["default"].convertToType(data['selectable'], 'Boolean');
94
93
  delete data['selectable'];
95
94
  }
96
95
  if (data.hasOwnProperty('visible_to')) {
@@ -140,14 +139,18 @@ AddProductRequestBody.prototype['unit'] = undefined;
140
139
  AddProductRequestBody.prototype['tax'] = 0;
141
140
 
142
141
  /**
143
- * @member {module:model/NumberBooleanDefault1} active_flag
142
+ * Whether this product will be made active or not
143
+ * @member {Boolean} active_flag
144
+ * @default true
144
145
  */
145
- AddProductRequestBody.prototype['active_flag'] = undefined;
146
+ AddProductRequestBody.prototype['active_flag'] = true;
146
147
 
147
148
  /**
148
- * @member {module:model/NumberBooleanDefault1} selectable
149
+ * Whether this product can be selected in deals or not
150
+ * @member {Boolean} selectable
151
+ * @default true
149
152
  */
150
- AddProductRequestBody.prototype['selectable'] = undefined;
153
+ AddProductRequestBody.prototype['selectable'] = true;
151
154
 
152
155
  /**
153
156
  * The visibility of the product. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user. Read more about visibility groups <a href=\"https://support.pipedrive.com/en/article/visibility-groups\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.<h4>Essential / Advanced plan</h4><table><tr><th style=\"width: 40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner &amp; followers</td><tr><td>`3`</td><td>Entire company</td></tr></table><h4>Professional / Enterprise plan</h4><table><tr><th style=\"width: 40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner only</td><tr><td>`3`</td><td>Owner's visibility group</td></tr><tr><td>`5`</td><td>Owner's visibility group and sub-groups</td></tr><tr><td>`7`</td><td>Entire company</td></tr></table>
@@ -191,13 +194,17 @@ _ProductRequest["default"].prototype['unit'] = undefined;
191
194
  */
192
195
  _ProductRequest["default"].prototype['tax'] = 0;
193
196
  /**
194
- * @member {module:model/NumberBooleanDefault1} active_flag
197
+ * Whether this product will be made active or not
198
+ * @member {Boolean} active_flag
199
+ * @default true
195
200
  */
196
- _ProductRequest["default"].prototype['active_flag'] = undefined;
201
+ _ProductRequest["default"].prototype['active_flag'] = true;
197
202
  /**
198
- * @member {module:model/NumberBooleanDefault1} selectable
203
+ * Whether this product can be selected in deals or not
204
+ * @member {Boolean} selectable
205
+ * @default true
199
206
  */
200
- _ProductRequest["default"].prototype['selectable'] = undefined;
207
+ _ProductRequest["default"].prototype['selectable'] = true;
201
208
  /**
202
209
  * The visibility of the product. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user. Read more about visibility groups <a href=\"https://support.pipedrive.com/en/article/visibility-groups\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.<h4>Essential / Advanced plan</h4><table><tr><th style=\"width: 40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner &amp; followers</td><tr><td>`3`</td><td>Entire company</td></tr></table><h4>Professional / Enterprise plan</h4><table><tr><th style=\"width: 40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner only</td><tr><td>`3`</td><td>Owner's visibility group</td></tr><tr><td>`5`</td><td>Owner's visibility group and sub-groups</td></tr><tr><td>`7`</td><td>Entire company</td></tr></table>
203
210
  * @member {module:model/VisibleTo} visible_to