pipedrive 13.1.0 → 13.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +4 -0
- package/README.md +1 -0
- package/dist/api/DealsApi.js +4 -4
- package/dist/api/OrganizationsApi.js +2 -2
- package/dist/api/PersonFieldsApi.js +2 -2
- package/dist/api/PersonsApi.js +10 -10
- package/dist/index.js +8 -0
- package/dist/model/BasicPerson.js +13 -0
- package/dist/model/MarketingStatus.js +69 -0
- package/dist/model/NewPerson.js +20 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -8,6 +8,10 @@ For public Changelog covering all changes done to Pipedrive’s API, webhooks an
|
|
8
8
|
|
9
9
|
## [Unreleased]
|
10
10
|
|
11
|
+
## 13.1.1
|
12
|
+
### Changed
|
13
|
+
- Changed person-related endpoints to include `marketing_status` body parameter: `POST /v1/persons`, `PUT /v1/persons/{id}`
|
14
|
+
|
11
15
|
## 13.1.0
|
12
16
|
### Fixed
|
13
17
|
- Fixed runtime error for `FilesApi.addFile`
|
package/README.md
CHANGED
@@ -925,6 +925,7 @@ Class | Method | HTTP request | Description
|
|
925
925
|
- [Pipedrive.MailThreadParticipant](docs/MailThreadParticipant.md)
|
926
926
|
- [Pipedrive.MailThreadPut](docs/MailThreadPut.md)
|
927
927
|
- [Pipedrive.MailThreadPutAllOf](docs/MailThreadPutAllOf.md)
|
928
|
+
- [Pipedrive.MarketingStatus](docs/MarketingStatus.md)
|
928
929
|
- [Pipedrive.MergeDealsRequest](docs/MergeDealsRequest.md)
|
929
930
|
- [Pipedrive.MergeOrganizationsRequest](docs/MergeOrganizationsRequest.md)
|
930
931
|
- [Pipedrive.MergePersonDealRelatedInfo](docs/MergePersonDealRelatedInfo.md)
|
package/dist/api/DealsApi.js
CHANGED
@@ -1040,7 +1040,7 @@ var DealsApi = /*#__PURE__*/function () {
|
|
1040
1040
|
}
|
1041
1041
|
/**
|
1042
1042
|
* List participants of a deal
|
1043
|
-
* Lists the participants associated with a deal.
|
1043
|
+
* Lists the participants associated with a deal.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
|
1044
1044
|
* @param {Number} id The ID of the deal
|
1045
1045
|
* @param {Object} opts Optional parameters
|
1046
1046
|
* @param {Number} opts.start Pagination start (default to 0)
|
@@ -1089,7 +1089,7 @@ var DealsApi = /*#__PURE__*/function () {
|
|
1089
1089
|
}
|
1090
1090
|
/**
|
1091
1091
|
* List participants of a deal
|
1092
|
-
* Lists the participants associated with a deal.
|
1092
|
+
* Lists the participants associated with a deal.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
|
1093
1093
|
* @param {Number} id The ID of the deal
|
1094
1094
|
* @param {Object} opts Optional parameters
|
1095
1095
|
* @param {Number} opts.start Pagination start (default to 0)
|
@@ -1247,7 +1247,7 @@ var DealsApi = /*#__PURE__*/function () {
|
|
1247
1247
|
* @param {Number} opts.start Pagination start (default to 0)
|
1248
1248
|
* @param {Number} opts.limit Items shown per page
|
1249
1249
|
* @param {String} opts.allChanges Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates.
|
1250
|
-
* @param {String} opts.items A comma-separated string for filtering out item specific updates. (Possible values - activity, plannedActivity, note, file,
|
1250
|
+
* @param {String} opts.items A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change)
|
1251
1251
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DealFlowResponse} and HTTP response
|
1252
1252
|
*/
|
1253
1253
|
|
@@ -1300,7 +1300,7 @@ var DealsApi = /*#__PURE__*/function () {
|
|
1300
1300
|
* @param {Number} opts.start Pagination start (default to 0)
|
1301
1301
|
* @param {Number} opts.limit Items shown per page
|
1302
1302
|
* @param {String} opts.allChanges Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates.
|
1303
|
-
* @param {String} opts.items A comma-separated string for filtering out item specific updates. (Possible values - activity, plannedActivity, note, file,
|
1303
|
+
* @param {String} opts.items A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change)
|
1304
1304
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DealFlowResponse}
|
1305
1305
|
*/
|
1306
1306
|
|
@@ -780,7 +780,7 @@ var OrganizationsApi = /*#__PURE__*/function () {
|
|
780
780
|
}
|
781
781
|
/**
|
782
782
|
* List persons of an organization
|
783
|
-
* Lists persons associated with an organization.
|
783
|
+
* Lists persons associated with an organization.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
|
784
784
|
* @param {Number} id The ID of the organization
|
785
785
|
* @param {Object} opts Optional parameters
|
786
786
|
* @param {Number} opts.start Pagination start (default to 0)
|
@@ -829,7 +829,7 @@ var OrganizationsApi = /*#__PURE__*/function () {
|
|
829
829
|
}
|
830
830
|
/**
|
831
831
|
* List persons of an organization
|
832
|
-
* Lists persons associated with an organization.
|
832
|
+
* Lists persons associated with an organization.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
|
833
833
|
* @param {Number} id The ID of the organization
|
834
834
|
* @param {Object} opts Optional parameters
|
835
835
|
* @param {Number} opts.start Pagination start (default to 0)
|
@@ -274,7 +274,7 @@ var PersonFieldsApi = /*#__PURE__*/function () {
|
|
274
274
|
}
|
275
275
|
/**
|
276
276
|
* Get all person fields
|
277
|
-
* Returns data about all person fields.
|
277
|
+
* Returns data about all person fields.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
|
278
278
|
* @param {Object} opts Optional parameters
|
279
279
|
* @param {Number} opts.start Pagination start (default to 0)
|
280
280
|
* @param {Number} opts.limit Items shown per page
|
@@ -315,7 +315,7 @@ var PersonFieldsApi = /*#__PURE__*/function () {
|
|
315
315
|
}
|
316
316
|
/**
|
317
317
|
* Get all person fields
|
318
|
-
* Returns data about all person fields.
|
318
|
+
* Returns data about all person fields.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
|
319
319
|
* @param {Object} opts Optional parameters
|
320
320
|
* @param {Number} opts.start Pagination start (default to 0)
|
321
321
|
* @param {Number} opts.limit Items shown per page
|
package/dist/api/PersonsApi.js
CHANGED
@@ -84,7 +84,7 @@ var PersonsApi = /*#__PURE__*/function () {
|
|
84
84
|
}
|
85
85
|
/**
|
86
86
|
* Add a person
|
87
|
-
* Adds a new person. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the personFields and look for `key` values.
|
87
|
+
* Adds a new person. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the personFields and look for `key` values.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field.
|
88
88
|
* @param {Object} opts Optional parameters
|
89
89
|
* @param {module:model/NewPerson} opts.newPerson
|
90
90
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AddPersonResponse} and HTTP response
|
@@ -122,7 +122,7 @@ var PersonsApi = /*#__PURE__*/function () {
|
|
122
122
|
}
|
123
123
|
/**
|
124
124
|
* Add a person
|
125
|
-
* Adds a new person. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the personFields and look for `key` values.
|
125
|
+
* Adds a new person. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the personFields and look for `key` values.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field.
|
126
126
|
* @param {Object} opts Optional parameters
|
127
127
|
* @param {module:model/NewPerson} opts.newPerson
|
128
128
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AddPersonResponse}
|
@@ -515,7 +515,7 @@ var PersonsApi = /*#__PURE__*/function () {
|
|
515
515
|
}
|
516
516
|
/**
|
517
517
|
* Get details of a person
|
518
|
-
* Returns the details of a person. Note that this also returns some additional fields which are not present when asking for all persons. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of personFields.
|
518
|
+
* Returns the details of a person. Note that this also returns some additional fields which are not present when asking for all persons. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of personFields.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
|
519
519
|
* @param {Number} id The ID of the person
|
520
520
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetPersonDetailsResponse} and HTTP response
|
521
521
|
*/
|
@@ -558,7 +558,7 @@ var PersonsApi = /*#__PURE__*/function () {
|
|
558
558
|
}
|
559
559
|
/**
|
560
560
|
* Get details of a person
|
561
|
-
* Returns the details of a person. Note that this also returns some additional fields which are not present when asking for all persons. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of personFields.
|
561
|
+
* Returns the details of a person. Note that this also returns some additional fields which are not present when asking for all persons. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the `key` value of personFields.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
|
562
562
|
* @param {Number} id The ID of the person
|
563
563
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetPersonDetailsResponse}
|
564
564
|
*/
|
@@ -977,13 +977,13 @@ var PersonsApi = /*#__PURE__*/function () {
|
|
977
977
|
}
|
978
978
|
/**
|
979
979
|
* List updates about a person
|
980
|
-
* Lists updates about a person.
|
980
|
+
* Lists updates about a person.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint's response will also include updates for the `marketing_status` field.
|
981
981
|
* @param {Number} id The ID of the person
|
982
982
|
* @param {Object} opts Optional parameters
|
983
983
|
* @param {Number} opts.start Pagination start (default to 0)
|
984
984
|
* @param {Number} opts.limit Items shown per page
|
985
985
|
* @param {String} opts.allChanges Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates.
|
986
|
-
* @param {String} opts.items A comma-separated string for filtering out item specific updates. (Possible values - activity, plannedActivity, note, file,
|
986
|
+
* @param {String} opts.items A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change)
|
987
987
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/PersonFlowResponse} and HTTP response
|
988
988
|
*/
|
989
989
|
|
@@ -1030,13 +1030,13 @@ var PersonsApi = /*#__PURE__*/function () {
|
|
1030
1030
|
}
|
1031
1031
|
/**
|
1032
1032
|
* List updates about a person
|
1033
|
-
* Lists updates about a person.
|
1033
|
+
* Lists updates about a person.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint's response will also include updates for the `marketing_status` field.
|
1034
1034
|
* @param {Number} id The ID of the person
|
1035
1035
|
* @param {Object} opts Optional parameters
|
1036
1036
|
* @param {Number} opts.start Pagination start (default to 0)
|
1037
1037
|
* @param {Number} opts.limit Items shown per page
|
1038
1038
|
* @param {String} opts.allChanges Whether to show custom field updates or not. 1 = Include custom field changes. If omitted returns changes without custom field updates.
|
1039
|
-
* @param {String} opts.items A comma-separated string for filtering out item specific updates. (Possible values - activity, plannedActivity, note, file,
|
1039
|
+
* @param {String} opts.items A comma-separated string for filtering out item specific updates. (Possible values - call, activity, plannedActivity, change, note, deal, file, dealChange, personChange, organizationChange, follower, dealFollower, personFollower, organizationFollower, participant, comment, mailMessage, mailMessageWithAttachment, invoice, document, marketing_campaign_stat, marketing_status_change)
|
1040
1040
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PersonFlowResponse}
|
1041
1041
|
*/
|
1042
1042
|
|
@@ -1317,7 +1317,7 @@ var PersonsApi = /*#__PURE__*/function () {
|
|
1317
1317
|
}
|
1318
1318
|
/**
|
1319
1319
|
* Update a person
|
1320
|
-
* Updates the properties of a person. For more information on how to update a person, see <a href=\"https://pipedrive.readme.io/docs/updating-a-person\" target=\"_blank\" rel=\"noopener noreferrer\">this tutorial</a
|
1320
|
+
* Updates the properties of a person. For more information on how to update a person, see <a href=\"https://pipedrive.readme.io/docs/updating-a-person\" target=\"_blank\" rel=\"noopener noreferrer\">this tutorial</a>.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field.
|
1321
1321
|
* @param {Number} id The ID of the person
|
1322
1322
|
* @param {Object} opts Optional parameters
|
1323
1323
|
* @param {module:model/BasicPerson} opts.basicPerson
|
@@ -1362,7 +1362,7 @@ var PersonsApi = /*#__PURE__*/function () {
|
|
1362
1362
|
}
|
1363
1363
|
/**
|
1364
1364
|
* Update a person
|
1365
|
-
* Updates the properties of a person. For more information on how to update a person, see <a href=\"https://pipedrive.readme.io/docs/updating-a-person\" target=\"_blank\" rel=\"noopener noreferrer\">this tutorial</a
|
1365
|
+
* Updates the properties of a person. For more information on how to update a person, see <a href=\"https://pipedrive.readme.io/docs/updating-a-person\" target=\"_blank\" rel=\"noopener noreferrer\">this tutorial</a>.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field.
|
1366
1366
|
* @param {Number} id The ID of the person
|
1367
1367
|
* @param {Object} opts Optional parameters
|
1368
1368
|
* @param {module:model/BasicPerson} opts.basicPerson
|
package/dist/index.js
CHANGED
@@ -2615,6 +2615,12 @@ Object.defineProperty(exports, "MailboxApi", {
|
|
2615
2615
|
return _MailboxApi["default"];
|
2616
2616
|
}
|
2617
2617
|
});
|
2618
|
+
Object.defineProperty(exports, "MarketingStatus", {
|
2619
|
+
enumerable: true,
|
2620
|
+
get: function get() {
|
2621
|
+
return _MarketingStatus["default"];
|
2622
|
+
}
|
2623
|
+
});
|
2618
2624
|
Object.defineProperty(exports, "MergeDealsRequest", {
|
2619
2625
|
enumerable: true,
|
2620
2626
|
get: function get() {
|
@@ -5140,6 +5146,8 @@ var _MailThreadPut = _interopRequireDefault(require("./model/MailThreadPut"));
|
|
5140
5146
|
|
5141
5147
|
var _MailThreadPutAllOf = _interopRequireDefault(require("./model/MailThreadPutAllOf"));
|
5142
5148
|
|
5149
|
+
var _MarketingStatus = _interopRequireDefault(require("./model/MarketingStatus"));
|
5150
|
+
|
5143
5151
|
var _MergeDealsRequest = _interopRequireDefault(require("./model/MergeDealsRequest"));
|
5144
5152
|
|
5145
5153
|
var _MergeOrganizationsRequest = _interopRequireDefault(require("./model/MergeOrganizationsRequest"));
|
@@ -17,6 +17,8 @@ var _BasePersonItemPhone = _interopRequireDefault(require("./BasePersonItemPhone
|
|
17
17
|
|
18
18
|
var _BasicPersonEmail = _interopRequireDefault(require("./BasicPersonEmail"));
|
19
19
|
|
20
|
+
var _MarketingStatus = _interopRequireDefault(require("./MarketingStatus"));
|
21
|
+
|
20
22
|
var _VisibleTo = _interopRequireDefault(require("./VisibleTo"));
|
21
23
|
|
22
24
|
/**
|
@@ -100,6 +102,11 @@ var BasicPerson = /*#__PURE__*/function () {
|
|
100
102
|
delete data['visible_to'];
|
101
103
|
}
|
102
104
|
|
105
|
+
if (data.hasOwnProperty('marketing_status')) {
|
106
|
+
obj['marketing_status'] = _ApiClient["default"].convertToType(data['marketing_status'], _MarketingStatus["default"]);
|
107
|
+
delete data['marketing_status'];
|
108
|
+
}
|
109
|
+
|
103
110
|
if (Object.keys(data).length > 0) {
|
104
111
|
Object.assign(obj, data);
|
105
112
|
}
|
@@ -147,5 +154,11 @@ BasicPerson.prototype['phone'] = undefined;
|
|
147
154
|
*/
|
148
155
|
|
149
156
|
BasicPerson.prototype['visible_to'] = undefined;
|
157
|
+
/**
|
158
|
+
* If the person does not have a valid email address, then the marketing status is **not set** and `no_consent` is returned for the `marketing_status` value when the new person is created. If the change is forbidden, the status will remain unchanged for every call that tries to modify the marketing status. Please be aware that it is only allowed **once** to change the marketing status from an old status to a new one.<table><tr><th>Value</th><th>Description</th></tr><tr><td>`no_consent`</td><td>The customer has not given consent to receive any marketing communications</td></tr><tr><td>`unsubscribed`</td><td>The customers have unsubscribed from ALL marketing communications</td></tr><tr><td>`subscribed`</td><td>The customers are subscribed and are counted towards marketing caps</td></tr><tr><td>`archived`</td><td>The customers with `subscribed` status can be moved to `archived` to save consent, but they are not paid for</td></tr></table>
|
159
|
+
* @member {module:model/MarketingStatus} marketing_status
|
160
|
+
*/
|
161
|
+
|
162
|
+
BasicPerson.prototype['marketing_status'] = undefined;
|
150
163
|
var _default = BasicPerson;
|
151
164
|
exports["default"] = _default;
|
@@ -0,0 +1,69 @@
|
|
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 _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
15
|
+
|
16
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
17
|
+
|
18
|
+
/**
|
19
|
+
* Pipedrive API v1
|
20
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
21
|
+
*
|
22
|
+
* The version of the OpenAPI document: 1.0.0
|
23
|
+
*
|
24
|
+
*
|
25
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
26
|
+
* https://openapi-generator.tech
|
27
|
+
* Do not edit the class manually.
|
28
|
+
*
|
29
|
+
*/
|
30
|
+
|
31
|
+
/**
|
32
|
+
* Enum class MarketingStatus.
|
33
|
+
* @enum {}
|
34
|
+
* @readonly
|
35
|
+
*/
|
36
|
+
var MarketingStatus = /*#__PURE__*/function () {
|
37
|
+
function MarketingStatus() {
|
38
|
+
(0, _classCallCheck2["default"])(this, MarketingStatus);
|
39
|
+
(0, _defineProperty2["default"])(this, "no_consent", "no_consent");
|
40
|
+
(0, _defineProperty2["default"])(this, "unsubscribed", "unsubscribed");
|
41
|
+
(0, _defineProperty2["default"])(this, "subscribed", "subscribed");
|
42
|
+
(0, _defineProperty2["default"])(this, "archived", "archived");
|
43
|
+
}
|
44
|
+
|
45
|
+
(0, _createClass2["default"])(MarketingStatus, null, [{
|
46
|
+
key: "constructFromObject",
|
47
|
+
value:
|
48
|
+
/**
|
49
|
+
* Returns a <code>MarketingStatus</code> enum value from a Javascript object name.
|
50
|
+
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
51
|
+
* @return {module:model/MarketingStatus} The enum <code>MarketingStatus</code> value.
|
52
|
+
*/
|
53
|
+
function constructFromObject(object) {
|
54
|
+
return object;
|
55
|
+
}
|
56
|
+
/**
|
57
|
+
* Initializes the fields of this object.
|
58
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
59
|
+
* Only for internal use.
|
60
|
+
*/
|
61
|
+
|
62
|
+
}, {
|
63
|
+
key: "initialize",
|
64
|
+
value: function initialize(obj) {}
|
65
|
+
}]);
|
66
|
+
return MarketingStatus;
|
67
|
+
}();
|
68
|
+
|
69
|
+
exports["default"] = MarketingStatus;
|
package/dist/model/NewPerson.js
CHANGED
@@ -19,6 +19,8 @@ var _BasicPerson = _interopRequireDefault(require("./BasicPerson"));
|
|
19
19
|
|
20
20
|
var _BasicPersonEmail = _interopRequireDefault(require("./BasicPersonEmail"));
|
21
21
|
|
22
|
+
var _MarketingStatus = _interopRequireDefault(require("./MarketingStatus"));
|
23
|
+
|
22
24
|
var _NewPersonAllOf = _interopRequireDefault(require("./NewPersonAllOf"));
|
23
25
|
|
24
26
|
var _VisibleTo = _interopRequireDefault(require("./VisibleTo"));
|
@@ -118,6 +120,11 @@ var NewPerson = /*#__PURE__*/function () {
|
|
118
120
|
delete data['visible_to'];
|
119
121
|
}
|
120
122
|
|
123
|
+
if (data.hasOwnProperty('marketing_status')) {
|
124
|
+
obj['marketing_status'] = _ApiClient["default"].convertToType(data['marketing_status'], _MarketingStatus["default"]);
|
125
|
+
delete data['marketing_status'];
|
126
|
+
}
|
127
|
+
|
121
128
|
if (data.hasOwnProperty('add_time')) {
|
122
129
|
obj['add_time'] = _ApiClient["default"].convertToType(data['add_time'], 'String');
|
123
130
|
delete data['add_time'];
|
@@ -170,6 +177,12 @@ NewPerson.prototype['phone'] = undefined;
|
|
170
177
|
*/
|
171
178
|
|
172
179
|
NewPerson.prototype['visible_to'] = undefined;
|
180
|
+
/**
|
181
|
+
* If the person does not have a valid email address, then the marketing status is **not set** and `no_consent` is returned for the `marketing_status` value when the new person is created. If the change is forbidden, the status will remain unchanged for every call that tries to modify the marketing status. Please be aware that it is only allowed **once** to change the marketing status from an old status to a new one.<table><tr><th>Value</th><th>Description</th></tr><tr><td>`no_consent`</td><td>The customer has not given consent to receive any marketing communications</td></tr><tr><td>`unsubscribed`</td><td>The customers have unsubscribed from ALL marketing communications</td></tr><tr><td>`subscribed`</td><td>The customers are subscribed and are counted towards marketing caps</td></tr><tr><td>`archived`</td><td>The customers with `subscribed` status can be moved to `archived` to save consent, but they are not paid for</td></tr></table>
|
182
|
+
* @member {module:model/MarketingStatus} marketing_status
|
183
|
+
*/
|
184
|
+
|
185
|
+
NewPerson.prototype['marketing_status'] = undefined;
|
173
186
|
/**
|
174
187
|
* The optional creation date & time of the person in UTC. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS
|
175
188
|
* @member {String} add_time
|
@@ -212,7 +225,13 @@ _BasicPerson["default"].prototype['phone'] = undefined;
|
|
212
225
|
* @member {module:model/VisibleTo} visible_to
|
213
226
|
*/
|
214
227
|
|
215
|
-
_BasicPerson["default"].prototype['visible_to'] = undefined;
|
228
|
+
_BasicPerson["default"].prototype['visible_to'] = undefined;
|
229
|
+
/**
|
230
|
+
* If the person does not have a valid email address, then the marketing status is **not set** and `no_consent` is returned for the `marketing_status` value when the new person is created. If the change is forbidden, the status will remain unchanged for every call that tries to modify the marketing status. Please be aware that it is only allowed **once** to change the marketing status from an old status to a new one.<table><tr><th>Value</th><th>Description</th></tr><tr><td>`no_consent`</td><td>The customer has not given consent to receive any marketing communications</td></tr><tr><td>`unsubscribed`</td><td>The customers have unsubscribed from ALL marketing communications</td></tr><tr><td>`subscribed`</td><td>The customers are subscribed and are counted towards marketing caps</td></tr><tr><td>`archived`</td><td>The customers with `subscribed` status can be moved to `archived` to save consent, but they are not paid for</td></tr></table>
|
231
|
+
* @member {module:model/MarketingStatus} marketing_status
|
232
|
+
*/
|
233
|
+
|
234
|
+
_BasicPerson["default"].prototype['marketing_status'] = undefined; // Implement NewPersonAllOf interface:
|
216
235
|
|
217
236
|
/**
|
218
237
|
* The optional creation date & time of the person in UTC. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS
|