pipedrive 13.2.5 → 13.2.8
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.
- package/CHANGELOG.md +17 -2
- package/README.md +12 -1
- package/dist/api/DealsApi.js +8 -0
- package/dist/api/LeadsApi.js +92 -1
- package/dist/api/ProductsApi.js +5 -5
- package/dist/api/StagesApi.js +11 -5
- package/dist/index.js +88 -8
- package/dist/model/ActivityObjectFragment.js +11 -0
- package/dist/model/ActivityPostObject.js +17 -0
- package/dist/model/ActivityPutObject.js +17 -0
- package/dist/model/ActivityResponseObject.js +17 -11
- package/dist/model/AddLeadRequest.js +1 -1
- package/dist/model/AddProductAttachmentDetails.js +11 -4
- package/dist/model/AddProductRequestBody.js +16 -5
- package/dist/model/BaseStage.js +6 -6
- package/dist/model/BasicDeal.js +12 -1
- package/dist/model/BasicDealProduct.js +8 -3
- package/dist/model/FilterType.js +1 -0
- package/dist/model/LeadSearchItem.js +102 -0
- package/dist/model/LeadSearchItemItem.js +234 -0
- package/dist/model/LeadSearchItemItemOrganization.js +101 -0
- package/dist/model/LeadSearchItemItemOwner.js +90 -0
- package/dist/model/LeadSearchItemItemPerson.js +101 -0
- package/dist/model/LeadSearchResponse.js +147 -0
- package/dist/model/LeadSearchResponseAllOf.js +103 -0
- package/dist/model/LeadSearchResponseAllOfData.js +92 -0
- package/dist/model/NewDeal.js +19 -2
- package/dist/model/NewDealProduct.js +6 -33
- package/dist/model/OptionalNameObject.js +90 -0
- package/dist/model/ProductAttachmentDetails.js +11 -4
- package/dist/model/ProductRequest.js +1 -12
- package/dist/model/RequiredNameObject.js +93 -0
- package/dist/model/Stage.js +6 -6
- package/dist/model/StageDetails.js +6 -6
- package/dist/model/StageWithPipelineInfo.js +6 -6
- package/dist/model/UpdateDealRequest.js +19 -2
- package/dist/model/UpdateLeadRequest.js +1 -1
- package/dist/model/UpdateProductRequestBody.js +254 -0
- package/dist/model/UpdateStageRequest.js +6 -6
- package/package.json +1 -1
@@ -0,0 +1,90 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports["default"] = void 0;
|
9
|
+
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
11
|
+
|
12
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
13
|
+
|
14
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
15
|
+
|
16
|
+
/**
|
17
|
+
* Pipedrive API v1
|
18
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
19
|
+
*
|
20
|
+
* The version of the OpenAPI document: 1.0.0
|
21
|
+
*
|
22
|
+
*
|
23
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
24
|
+
* https://openapi-generator.tech
|
25
|
+
* Do not edit the class manually.
|
26
|
+
*
|
27
|
+
*/
|
28
|
+
|
29
|
+
/**
|
30
|
+
* The OptionalNameObject model module.
|
31
|
+
* @module model/OptionalNameObject
|
32
|
+
* @version 1.0.0
|
33
|
+
*/
|
34
|
+
var OptionalNameObject = /*#__PURE__*/function () {
|
35
|
+
/**
|
36
|
+
* Constructs a new <code>OptionalNameObject</code>.
|
37
|
+
* @alias module:model/OptionalNameObject
|
38
|
+
*/
|
39
|
+
function OptionalNameObject() {
|
40
|
+
(0, _classCallCheck2["default"])(this, OptionalNameObject);
|
41
|
+
OptionalNameObject.initialize(this);
|
42
|
+
}
|
43
|
+
/**
|
44
|
+
* Initializes the fields of this object.
|
45
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
46
|
+
* Only for internal use.
|
47
|
+
*/
|
48
|
+
|
49
|
+
|
50
|
+
(0, _createClass2["default"])(OptionalNameObject, null, [{
|
51
|
+
key: "initialize",
|
52
|
+
value: function initialize(obj) {}
|
53
|
+
/**
|
54
|
+
* Constructs a <code>OptionalNameObject</code> from a plain JavaScript object, optionally creating a new instance.
|
55
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
56
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
57
|
+
* @param {module:model/OptionalNameObject} obj Optional instance to populate.
|
58
|
+
* @return {module:model/OptionalNameObject} The populated <code>OptionalNameObject</code> instance.
|
59
|
+
*/
|
60
|
+
|
61
|
+
}, {
|
62
|
+
key: "constructFromObject",
|
63
|
+
value: function constructFromObject(data, obj) {
|
64
|
+
if (data) {
|
65
|
+
obj = obj || new OptionalNameObject();
|
66
|
+
|
67
|
+
if (data.hasOwnProperty('name')) {
|
68
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
69
|
+
delete data['name'];
|
70
|
+
}
|
71
|
+
|
72
|
+
if (Object.keys(data).length > 0) {
|
73
|
+
Object.assign(obj, data);
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
return obj;
|
78
|
+
}
|
79
|
+
}]);
|
80
|
+
return OptionalNameObject;
|
81
|
+
}();
|
82
|
+
/**
|
83
|
+
* The name of the product
|
84
|
+
* @member {String} name
|
85
|
+
*/
|
86
|
+
|
87
|
+
|
88
|
+
OptionalNameObject.prototype['name'] = undefined;
|
89
|
+
var _default = OptionalNameObject;
|
90
|
+
exports["default"] = _default;
|
@@ -43,15 +43,18 @@ var ProductAttachmentDetails = /*#__PURE__*/function () {
|
|
43
43
|
* @alias module:model/ProductAttachmentDetails
|
44
44
|
* @implements module:model/BasicDealProduct
|
45
45
|
* @implements module:model/ProductAttachementFields
|
46
|
+
* @param itemPrice {Number} The price at which this product will be added to the deal
|
47
|
+
* @param quantity {Number} Quantity – e.g. how many items of this product will be added to the deal
|
48
|
+
* @param productId {Number} The ID of the product
|
46
49
|
*/
|
47
|
-
function ProductAttachmentDetails() {
|
50
|
+
function ProductAttachmentDetails(itemPrice, quantity, productId) {
|
48
51
|
(0, _classCallCheck2["default"])(this, ProductAttachmentDetails);
|
49
52
|
|
50
|
-
_BasicDealProduct["default"].initialize(this);
|
53
|
+
_BasicDealProduct["default"].initialize(this, itemPrice, quantity);
|
51
54
|
|
52
55
|
_ProductAttachementFields["default"].initialize(this);
|
53
56
|
|
54
|
-
ProductAttachmentDetails.initialize(this);
|
57
|
+
ProductAttachmentDetails.initialize(this, itemPrice, quantity, productId);
|
55
58
|
}
|
56
59
|
/**
|
57
60
|
* Initializes the fields of this object.
|
@@ -62,7 +65,11 @@ var ProductAttachmentDetails = /*#__PURE__*/function () {
|
|
62
65
|
|
63
66
|
(0, _createClass2["default"])(ProductAttachmentDetails, null, [{
|
64
67
|
key: "initialize",
|
65
|
-
value: function initialize(obj) {
|
68
|
+
value: function initialize(obj, itemPrice, quantity, productId) {
|
69
|
+
obj['item_price'] = itemPrice;
|
70
|
+
obj['quantity'] = quantity;
|
71
|
+
obj['product_id'] = productId;
|
72
|
+
}
|
66
73
|
/**
|
67
74
|
* Constructs a <code>ProductAttachmentDetails</code> from a plain JavaScript object, optionally creating a new instance.
|
68
75
|
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
@@ -68,11 +68,6 @@ var ProductRequest = /*#__PURE__*/function () {
|
|
68
68
|
if (data) {
|
69
69
|
obj = obj || new ProductRequest();
|
70
70
|
|
71
|
-
if (data.hasOwnProperty('name')) {
|
72
|
-
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
73
|
-
delete data['name'];
|
74
|
-
}
|
75
|
-
|
76
71
|
if (data.hasOwnProperty('code')) {
|
77
72
|
obj['code'] = _ApiClient["default"].convertToType(data['code'], 'String');
|
78
73
|
delete data['code'];
|
@@ -123,18 +118,12 @@ var ProductRequest = /*#__PURE__*/function () {
|
|
123
118
|
}]);
|
124
119
|
return ProductRequest;
|
125
120
|
}();
|
126
|
-
/**
|
127
|
-
* The name of the product
|
128
|
-
* @member {String} name
|
129
|
-
*/
|
130
|
-
|
131
|
-
|
132
|
-
ProductRequest.prototype['name'] = undefined;
|
133
121
|
/**
|
134
122
|
* The product code
|
135
123
|
* @member {String} code
|
136
124
|
*/
|
137
125
|
|
126
|
+
|
138
127
|
ProductRequest.prototype['code'] = undefined;
|
139
128
|
/**
|
140
129
|
* The unit in which this product is sold
|
@@ -0,0 +1,93 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports["default"] = void 0;
|
9
|
+
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
11
|
+
|
12
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
13
|
+
|
14
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
15
|
+
|
16
|
+
/**
|
17
|
+
* Pipedrive API v1
|
18
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
19
|
+
*
|
20
|
+
* The version of the OpenAPI document: 1.0.0
|
21
|
+
*
|
22
|
+
*
|
23
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
24
|
+
* https://openapi-generator.tech
|
25
|
+
* Do not edit the class manually.
|
26
|
+
*
|
27
|
+
*/
|
28
|
+
|
29
|
+
/**
|
30
|
+
* The RequiredNameObject model module.
|
31
|
+
* @module model/RequiredNameObject
|
32
|
+
* @version 1.0.0
|
33
|
+
*/
|
34
|
+
var RequiredNameObject = /*#__PURE__*/function () {
|
35
|
+
/**
|
36
|
+
* Constructs a new <code>RequiredNameObject</code>.
|
37
|
+
* @alias module:model/RequiredNameObject
|
38
|
+
* @param name {String} The name of the product
|
39
|
+
*/
|
40
|
+
function RequiredNameObject(name) {
|
41
|
+
(0, _classCallCheck2["default"])(this, RequiredNameObject);
|
42
|
+
RequiredNameObject.initialize(this, name);
|
43
|
+
}
|
44
|
+
/**
|
45
|
+
* Initializes the fields of this object.
|
46
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
47
|
+
* Only for internal use.
|
48
|
+
*/
|
49
|
+
|
50
|
+
|
51
|
+
(0, _createClass2["default"])(RequiredNameObject, null, [{
|
52
|
+
key: "initialize",
|
53
|
+
value: function initialize(obj, name) {
|
54
|
+
obj['name'] = name;
|
55
|
+
}
|
56
|
+
/**
|
57
|
+
* Constructs a <code>RequiredNameObject</code> from a plain JavaScript object, optionally creating a new instance.
|
58
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
59
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
60
|
+
* @param {module:model/RequiredNameObject} obj Optional instance to populate.
|
61
|
+
* @return {module:model/RequiredNameObject} The populated <code>RequiredNameObject</code> instance.
|
62
|
+
*/
|
63
|
+
|
64
|
+
}, {
|
65
|
+
key: "constructFromObject",
|
66
|
+
value: function constructFromObject(data, obj) {
|
67
|
+
if (data) {
|
68
|
+
obj = obj || new RequiredNameObject();
|
69
|
+
|
70
|
+
if (data.hasOwnProperty('name')) {
|
71
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
72
|
+
delete data['name'];
|
73
|
+
}
|
74
|
+
|
75
|
+
if (Object.keys(data).length > 0) {
|
76
|
+
Object.assign(obj, data);
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
return obj;
|
81
|
+
}
|
82
|
+
}]);
|
83
|
+
return RequiredNameObject;
|
84
|
+
}();
|
85
|
+
/**
|
86
|
+
* The name of the product
|
87
|
+
* @member {String} name
|
88
|
+
*/
|
89
|
+
|
90
|
+
|
91
|
+
RequiredNameObject.prototype['name'] = undefined;
|
92
|
+
var _default = RequiredNameObject;
|
93
|
+
exports["default"] = _default;
|
package/dist/model/Stage.js
CHANGED
@@ -80,7 +80,7 @@ var Stage = /*#__PURE__*/function () {
|
|
80
80
|
}
|
81
81
|
|
82
82
|
if (data.hasOwnProperty('rotten_flag')) {
|
83
|
-
obj['rotten_flag'] = _ApiClient["default"].convertToType(data['rotten_flag'], '
|
83
|
+
obj['rotten_flag'] = _ApiClient["default"].convertToType(data['rotten_flag'], 'Boolean');
|
84
84
|
delete data['rotten_flag'];
|
85
85
|
}
|
86
86
|
|
@@ -132,22 +132,22 @@ Stage.prototype['rotten_flag'] = undefined;
|
|
132
132
|
Stage.prototype['rotten_days'] = undefined;
|
133
133
|
/**
|
134
134
|
* Allowed values for the <code>rotten_flag</code> property.
|
135
|
-
* @enum {
|
135
|
+
* @enum {Boolean}
|
136
136
|
* @readonly
|
137
137
|
*/
|
138
138
|
|
139
139
|
Stage['RottenFlagEnum'] = {
|
140
140
|
/**
|
141
|
-
* value:
|
141
|
+
* value: "true"
|
142
142
|
* @const
|
143
143
|
*/
|
144
|
-
"
|
144
|
+
"true": "true",
|
145
145
|
|
146
146
|
/**
|
147
|
-
* value:
|
147
|
+
* value: "false"
|
148
148
|
* @const
|
149
149
|
*/
|
150
|
-
"
|
150
|
+
"false": "false"
|
151
151
|
};
|
152
152
|
var _default = Stage;
|
153
153
|
exports["default"] = _default;
|
@@ -113,7 +113,7 @@ var StageDetails = /*#__PURE__*/function () {
|
|
113
113
|
}
|
114
114
|
|
115
115
|
if (data.hasOwnProperty('rotten_flag')) {
|
116
|
-
obj['rotten_flag'] = _ApiClient["default"].convertToType(data['rotten_flag'], '
|
116
|
+
obj['rotten_flag'] = _ApiClient["default"].convertToType(data['rotten_flag'], 'Boolean');
|
117
117
|
delete data['rotten_flag'];
|
118
118
|
}
|
119
119
|
|
@@ -282,22 +282,22 @@ _BaseStage["default"].prototype['update_time'] = undefined; // Implement Pipelin
|
|
282
282
|
_PipelineDetailsAllOf["default"].prototype['deals_summary'] = undefined;
|
283
283
|
/**
|
284
284
|
* Allowed values for the <code>rotten_flag</code> property.
|
285
|
-
* @enum {
|
285
|
+
* @enum {Boolean}
|
286
286
|
* @readonly
|
287
287
|
*/
|
288
288
|
|
289
289
|
StageDetails['RottenFlagEnum'] = {
|
290
290
|
/**
|
291
|
-
* value:
|
291
|
+
* value: "true"
|
292
292
|
* @const
|
293
293
|
*/
|
294
|
-
"
|
294
|
+
"true": "true",
|
295
295
|
|
296
296
|
/**
|
297
|
-
* value:
|
297
|
+
* value: "false"
|
298
298
|
* @const
|
299
299
|
*/
|
300
|
-
"
|
300
|
+
"false": "false"
|
301
301
|
};
|
302
302
|
var _default = StageDetails;
|
303
303
|
exports["default"] = _default;
|
@@ -110,7 +110,7 @@ var StageWithPipelineInfo = /*#__PURE__*/function () {
|
|
110
110
|
}
|
111
111
|
|
112
112
|
if (data.hasOwnProperty('rotten_flag')) {
|
113
|
-
obj['rotten_flag'] = _ApiClient["default"].convertToType(data['rotten_flag'], '
|
113
|
+
obj['rotten_flag'] = _ApiClient["default"].convertToType(data['rotten_flag'], 'Boolean');
|
114
114
|
delete data['rotten_flag'];
|
115
115
|
}
|
116
116
|
|
@@ -298,22 +298,22 @@ _StageWithPipelineInfoAllOf["default"].prototype['pipeline_name'] = undefined;
|
|
298
298
|
_StageWithPipelineInfoAllOf["default"].prototype['pipeline_deal_probability'] = undefined;
|
299
299
|
/**
|
300
300
|
* Allowed values for the <code>rotten_flag</code> property.
|
301
|
-
* @enum {
|
301
|
+
* @enum {Boolean}
|
302
302
|
* @readonly
|
303
303
|
*/
|
304
304
|
|
305
305
|
StageWithPipelineInfo['RottenFlagEnum'] = {
|
306
306
|
/**
|
307
|
-
* value:
|
307
|
+
* value: "true"
|
308
308
|
* @const
|
309
309
|
*/
|
310
|
-
"
|
310
|
+
"true": "true",
|
311
311
|
|
312
312
|
/**
|
313
|
-
* value:
|
313
|
+
* value: "false"
|
314
314
|
* @const
|
315
315
|
*/
|
316
|
-
"
|
316
|
+
"false": "false"
|
317
317
|
};
|
318
318
|
var _default = StageWithPipelineInfo;
|
319
319
|
exports["default"] = _default;
|
@@ -111,6 +111,11 @@ var UpdateDealRequest = /*#__PURE__*/function () {
|
|
111
111
|
delete data['org_id'];
|
112
112
|
}
|
113
113
|
|
114
|
+
if (data.hasOwnProperty('pipeline_id')) {
|
115
|
+
obj['pipeline_id'] = _ApiClient["default"].convertToType(data['pipeline_id'], 'Number');
|
116
|
+
delete data['pipeline_id'];
|
117
|
+
}
|
118
|
+
|
114
119
|
if (data.hasOwnProperty('stage_id')) {
|
115
120
|
obj['stage_id'] = _ApiClient["default"].convertToType(data['stage_id'], 'Number');
|
116
121
|
delete data['stage_id'];
|
@@ -189,7 +194,13 @@ UpdateDealRequest.prototype['person_id'] = undefined;
|
|
189
194
|
|
190
195
|
UpdateDealRequest.prototype['org_id'] = undefined;
|
191
196
|
/**
|
192
|
-
* The ID of
|
197
|
+
* The ID of the pipeline this deal will be added to. By default, the deal will be added to the first stage of the specified pipeline. Please note that `pipeline_id` and `stage_id` should not be used together as `pipeline_id` will be ignored.
|
198
|
+
* @member {Number} pipeline_id
|
199
|
+
*/
|
200
|
+
|
201
|
+
UpdateDealRequest.prototype['pipeline_id'] = undefined;
|
202
|
+
/**
|
203
|
+
* The ID of the stage this deal will be added to. Please note that a pipeline will be assigned automatically based on the `stage_id`. If omitted, the deal will be placed in the first stage of the default pipeline.
|
193
204
|
* @member {Number} stage_id
|
194
205
|
*/
|
195
206
|
|
@@ -263,7 +274,13 @@ _BasicDeal["default"].prototype['person_id'] = undefined;
|
|
263
274
|
|
264
275
|
_BasicDeal["default"].prototype['org_id'] = undefined;
|
265
276
|
/**
|
266
|
-
* The ID of
|
277
|
+
* The ID of the pipeline this deal will be added to. By default, the deal will be added to the first stage of the specified pipeline. Please note that `pipeline_id` and `stage_id` should not be used together as `pipeline_id` will be ignored.
|
278
|
+
* @member {Number} pipeline_id
|
279
|
+
*/
|
280
|
+
|
281
|
+
_BasicDeal["default"].prototype['pipeline_id'] = undefined;
|
282
|
+
/**
|
283
|
+
* The ID of the stage this deal will be added to. Please note that a pipeline will be assigned automatically based on the `stage_id`. If omitted, the deal will be placed in the first stage of the default pipeline.
|
267
284
|
* @member {Number} stage_id
|
268
285
|
*/
|
269
286
|
|
@@ -177,7 +177,7 @@ UpdateLeadRequest.prototype['value'] = undefined;
|
|
177
177
|
|
178
178
|
UpdateLeadRequest.prototype['expected_close_date'] = undefined;
|
179
179
|
/**
|
180
|
-
* The visibility of the lead. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user
|
180
|
+
* The visibility of the lead. 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 & 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>
|
181
181
|
* @member {module:model/VisibleTo} visible_to
|
182
182
|
*/
|
183
183
|
|
@@ -0,0 +1,254 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports["default"] = void 0;
|
9
|
+
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
11
|
+
|
12
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
13
|
+
|
14
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
15
|
+
|
16
|
+
var _NumberBooleanDefault = _interopRequireDefault(require("./NumberBooleanDefault1"));
|
17
|
+
|
18
|
+
var _OptionalNameObject = _interopRequireDefault(require("./OptionalNameObject"));
|
19
|
+
|
20
|
+
var _ProductRequest = _interopRequireDefault(require("./ProductRequest"));
|
21
|
+
|
22
|
+
var _VisibleTo = _interopRequireDefault(require("./VisibleTo"));
|
23
|
+
|
24
|
+
/**
|
25
|
+
* Pipedrive API v1
|
26
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
27
|
+
*
|
28
|
+
* The version of the OpenAPI document: 1.0.0
|
29
|
+
*
|
30
|
+
*
|
31
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
32
|
+
* https://openapi-generator.tech
|
33
|
+
* Do not edit the class manually.
|
34
|
+
*
|
35
|
+
*/
|
36
|
+
|
37
|
+
/**
|
38
|
+
* The UpdateProductRequestBody model module.
|
39
|
+
* @module model/UpdateProductRequestBody
|
40
|
+
* @version 1.0.0
|
41
|
+
*/
|
42
|
+
var UpdateProductRequestBody = /*#__PURE__*/function () {
|
43
|
+
/**
|
44
|
+
* Constructs a new <code>UpdateProductRequestBody</code>.
|
45
|
+
* @alias module:model/UpdateProductRequestBody
|
46
|
+
* @implements module:model/OptionalNameObject
|
47
|
+
* @implements module:model/ProductRequest
|
48
|
+
* @param name {String} The name of the product
|
49
|
+
*/
|
50
|
+
function UpdateProductRequestBody(name) {
|
51
|
+
(0, _classCallCheck2["default"])(this, UpdateProductRequestBody);
|
52
|
+
|
53
|
+
_OptionalNameObject["default"].initialize(this);
|
54
|
+
|
55
|
+
_ProductRequest["default"].initialize(this);
|
56
|
+
|
57
|
+
UpdateProductRequestBody.initialize(this, name);
|
58
|
+
}
|
59
|
+
/**
|
60
|
+
* Initializes the fields of this object.
|
61
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
62
|
+
* Only for internal use.
|
63
|
+
*/
|
64
|
+
|
65
|
+
|
66
|
+
(0, _createClass2["default"])(UpdateProductRequestBody, null, [{
|
67
|
+
key: "initialize",
|
68
|
+
value: function initialize(obj, name) {
|
69
|
+
obj['name'] = name;
|
70
|
+
}
|
71
|
+
/**
|
72
|
+
* Constructs a <code>UpdateProductRequestBody</code> from a plain JavaScript object, optionally creating a new instance.
|
73
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
74
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
75
|
+
* @param {module:model/UpdateProductRequestBody} obj Optional instance to populate.
|
76
|
+
* @return {module:model/UpdateProductRequestBody} The populated <code>UpdateProductRequestBody</code> instance.
|
77
|
+
*/
|
78
|
+
|
79
|
+
}, {
|
80
|
+
key: "constructFromObject",
|
81
|
+
value: function constructFromObject(data, obj) {
|
82
|
+
if (data) {
|
83
|
+
obj = obj || new UpdateProductRequestBody();
|
84
|
+
|
85
|
+
_OptionalNameObject["default"].constructFromObject(data, obj);
|
86
|
+
|
87
|
+
_ProductRequest["default"].constructFromObject(data, obj);
|
88
|
+
|
89
|
+
if (data.hasOwnProperty('name')) {
|
90
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
91
|
+
delete data['name'];
|
92
|
+
}
|
93
|
+
|
94
|
+
if (data.hasOwnProperty('code')) {
|
95
|
+
obj['code'] = _ApiClient["default"].convertToType(data['code'], 'String');
|
96
|
+
delete data['code'];
|
97
|
+
}
|
98
|
+
|
99
|
+
if (data.hasOwnProperty('unit')) {
|
100
|
+
obj['unit'] = _ApiClient["default"].convertToType(data['unit'], 'String');
|
101
|
+
delete data['unit'];
|
102
|
+
}
|
103
|
+
|
104
|
+
if (data.hasOwnProperty('tax')) {
|
105
|
+
obj['tax'] = _ApiClient["default"].convertToType(data['tax'], 'Number');
|
106
|
+
delete data['tax'];
|
107
|
+
}
|
108
|
+
|
109
|
+
if (data.hasOwnProperty('active_flag')) {
|
110
|
+
obj['active_flag'] = _NumberBooleanDefault["default"].constructFromObject(data['active_flag']);
|
111
|
+
delete data['active_flag'];
|
112
|
+
}
|
113
|
+
|
114
|
+
if (data.hasOwnProperty('selectable')) {
|
115
|
+
obj['selectable'] = _NumberBooleanDefault["default"].constructFromObject(data['selectable']);
|
116
|
+
delete data['selectable'];
|
117
|
+
}
|
118
|
+
|
119
|
+
if (data.hasOwnProperty('visible_to')) {
|
120
|
+
obj['visible_to'] = _ApiClient["default"].convertToType(data['visible_to'], _VisibleTo["default"]);
|
121
|
+
delete data['visible_to'];
|
122
|
+
}
|
123
|
+
|
124
|
+
if (data.hasOwnProperty('owner_id')) {
|
125
|
+
obj['owner_id'] = _ApiClient["default"].convertToType(data['owner_id'], 'Number');
|
126
|
+
delete data['owner_id'];
|
127
|
+
}
|
128
|
+
|
129
|
+
if (data.hasOwnProperty('prices')) {
|
130
|
+
obj['prices'] = _ApiClient["default"].convertToType(data['prices'], [Object]);
|
131
|
+
delete data['prices'];
|
132
|
+
}
|
133
|
+
|
134
|
+
if (Object.keys(data).length > 0) {
|
135
|
+
Object.assign(obj, data);
|
136
|
+
}
|
137
|
+
}
|
138
|
+
|
139
|
+
return obj;
|
140
|
+
}
|
141
|
+
}]);
|
142
|
+
return UpdateProductRequestBody;
|
143
|
+
}();
|
144
|
+
/**
|
145
|
+
* The name of the product
|
146
|
+
* @member {String} name
|
147
|
+
*/
|
148
|
+
|
149
|
+
|
150
|
+
UpdateProductRequestBody.prototype['name'] = undefined;
|
151
|
+
/**
|
152
|
+
* The product code
|
153
|
+
* @member {String} code
|
154
|
+
*/
|
155
|
+
|
156
|
+
UpdateProductRequestBody.prototype['code'] = undefined;
|
157
|
+
/**
|
158
|
+
* The unit in which this product is sold
|
159
|
+
* @member {String} unit
|
160
|
+
*/
|
161
|
+
|
162
|
+
UpdateProductRequestBody.prototype['unit'] = undefined;
|
163
|
+
/**
|
164
|
+
* The tax percentage
|
165
|
+
* @member {Number} tax
|
166
|
+
* @default 0
|
167
|
+
*/
|
168
|
+
|
169
|
+
UpdateProductRequestBody.prototype['tax'] = 0;
|
170
|
+
/**
|
171
|
+
* @member {module:model/NumberBooleanDefault1} active_flag
|
172
|
+
*/
|
173
|
+
|
174
|
+
UpdateProductRequestBody.prototype['active_flag'] = undefined;
|
175
|
+
/**
|
176
|
+
* @member {module:model/NumberBooleanDefault1} selectable
|
177
|
+
*/
|
178
|
+
|
179
|
+
UpdateProductRequestBody.prototype['selectable'] = undefined;
|
180
|
+
/**
|
181
|
+
* 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 & 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>
|
182
|
+
* @member {module:model/VisibleTo} visible_to
|
183
|
+
*/
|
184
|
+
|
185
|
+
UpdateProductRequestBody.prototype['visible_to'] = undefined;
|
186
|
+
/**
|
187
|
+
* The ID of the user who will be marked as the owner of this product. When omitted, the authorized user ID will be used.
|
188
|
+
* @member {Number} owner_id
|
189
|
+
*/
|
190
|
+
|
191
|
+
UpdateProductRequestBody.prototype['owner_id'] = undefined;
|
192
|
+
/**
|
193
|
+
* An array of objects, each containing: `currency` (string), `price` (number), `cost` (number, optional), `overhead_cost` (number, optional). Note that there can only be one price per product per currency. When `prices` is omitted altogether, no prices will be set up for the product.
|
194
|
+
* @member {Array.<Object>} prices
|
195
|
+
*/
|
196
|
+
|
197
|
+
UpdateProductRequestBody.prototype['prices'] = undefined; // Implement OptionalNameObject interface:
|
198
|
+
|
199
|
+
/**
|
200
|
+
* The name of the product
|
201
|
+
* @member {String} name
|
202
|
+
*/
|
203
|
+
|
204
|
+
_OptionalNameObject["default"].prototype['name'] = undefined; // Implement ProductRequest interface:
|
205
|
+
|
206
|
+
/**
|
207
|
+
* The product code
|
208
|
+
* @member {String} code
|
209
|
+
*/
|
210
|
+
|
211
|
+
_ProductRequest["default"].prototype['code'] = undefined;
|
212
|
+
/**
|
213
|
+
* The unit in which this product is sold
|
214
|
+
* @member {String} unit
|
215
|
+
*/
|
216
|
+
|
217
|
+
_ProductRequest["default"].prototype['unit'] = undefined;
|
218
|
+
/**
|
219
|
+
* The tax percentage
|
220
|
+
* @member {Number} tax
|
221
|
+
* @default 0
|
222
|
+
*/
|
223
|
+
|
224
|
+
_ProductRequest["default"].prototype['tax'] = 0;
|
225
|
+
/**
|
226
|
+
* @member {module:model/NumberBooleanDefault1} active_flag
|
227
|
+
*/
|
228
|
+
|
229
|
+
_ProductRequest["default"].prototype['active_flag'] = undefined;
|
230
|
+
/**
|
231
|
+
* @member {module:model/NumberBooleanDefault1} selectable
|
232
|
+
*/
|
233
|
+
|
234
|
+
_ProductRequest["default"].prototype['selectable'] = undefined;
|
235
|
+
/**
|
236
|
+
* 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 & 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>
|
237
|
+
* @member {module:model/VisibleTo} visible_to
|
238
|
+
*/
|
239
|
+
|
240
|
+
_ProductRequest["default"].prototype['visible_to'] = undefined;
|
241
|
+
/**
|
242
|
+
* The ID of the user who will be marked as the owner of this product. When omitted, the authorized user ID will be used.
|
243
|
+
* @member {Number} owner_id
|
244
|
+
*/
|
245
|
+
|
246
|
+
_ProductRequest["default"].prototype['owner_id'] = undefined;
|
247
|
+
/**
|
248
|
+
* An array of objects, each containing: `currency` (string), `price` (number), `cost` (number, optional), `overhead_cost` (number, optional). Note that there can only be one price per product per currency. When `prices` is omitted altogether, no prices will be set up for the product.
|
249
|
+
* @member {Array.<Object>} prices
|
250
|
+
*/
|
251
|
+
|
252
|
+
_ProductRequest["default"].prototype['prices'] = undefined;
|
253
|
+
var _default = UpdateProductRequestBody;
|
254
|
+
exports["default"] = _default;
|