@pageproof/sdk-pr 402.0.1639716044155 → 404.0.1639964821769
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 +6 -0
- package/lib/api/admin/TeamFeatures.d.ts +19 -0
- package/lib/api/admin/TeamFeatures.js +42 -0
- package/lib/models/TeamEmailFeatures.d.ts +24 -0
- package/lib/models/TeamEmailFeatures.js +1 -1
- package/lib/network/endpoints.json +7 -1
- package/lib/pageproof.js +1 -1
- package/lib/types/SpfRecordDefinition.d.ts +17 -0
- package/lib/types/SpfRecordDefinition.js +1 -0
- package/lib/types/TeamSenderEmail.d.ts +21 -0
- package/lib/types/TeamSenderEmail.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## 2.0.0-beta.282
|
|
5
|
+
|
|
6
|
+
Released on the 20th of December 2021.
|
|
7
|
+
|
|
8
|
+
- [[PP-1654](https://goto.pageproof.dev/PP-1654)] Added support enterprise teams to specify a custom email address for all of their emails to be sent from (requires SPF verification). See [TeamFeatures.setSenderEmail](https://docs.pageproof.tech/@pageproof/sdk/beta/class/src/api/admin/TeamFeatures.js~TeamFeatures.html#instance-method-setSenderEmail).
|
|
9
|
+
|
|
4
10
|
## 2.0.0-beta.281
|
|
5
11
|
|
|
6
12
|
Released on the 17th of December 2021.
|
|
@@ -24,6 +24,9 @@ declare class TeamFeatures extends API {
|
|
|
24
24
|
* @param {object} options.emails The emails features
|
|
25
25
|
* @param {boolean} options.emails.displayComments Whether the comment should display in emails or not
|
|
26
26
|
* @param {boolean} options.emails.displayTeamName Whether using the team name or ’PageProof Team’ as the ‘from’ name in Email.
|
|
27
|
+
* @param {string} options.emails.linkTextColor The link text color in the email.
|
|
28
|
+
* @param {string} options.emails.buttonBackgroundColor The button background color in the email.
|
|
29
|
+
* @param {string} options.emails.buttonTextColor The button text color in the email.
|
|
27
30
|
* @param {object} options.comments The comments features
|
|
28
31
|
* @param {boolean} options.comments.editComments Whether the comments/replies can be edited by other users or not
|
|
29
32
|
* @param {ProofStatus|Array<ProofStatus>} options.comments.disableReplyingToCommentsInStatuses The proof status or array of proof status to disable the replies to comments (by reviewers).
|
|
@@ -38,6 +41,9 @@ declare class TeamFeatures extends API {
|
|
|
38
41
|
emails: {
|
|
39
42
|
displayComments: boolean;
|
|
40
43
|
displayTeamName: boolean;
|
|
44
|
+
linkTextColor: string;
|
|
45
|
+
buttonBackgroundColor: string;
|
|
46
|
+
buttonTextColor: string;
|
|
41
47
|
};
|
|
42
48
|
comments: {
|
|
43
49
|
editComments: boolean;
|
|
@@ -50,5 +56,18 @@ declare class TeamFeatures extends API {
|
|
|
50
56
|
messageToOwners: boolean;
|
|
51
57
|
};
|
|
52
58
|
}): Promise<any>;
|
|
59
|
+
/**
|
|
60
|
+
* Set the team sender email address for the team email notification.
|
|
61
|
+
*
|
|
62
|
+
* Note: This feature is only available to enterprise teams.
|
|
63
|
+
*
|
|
64
|
+
* @example <caption>Setting the team sender email</caption>
|
|
65
|
+
* const admin = await client.admin();
|
|
66
|
+
* const features = admin.team.features.setSenderEmail('team@example.com');
|
|
67
|
+
*
|
|
68
|
+
* @param {string} senderEmail The team sender email address.
|
|
69
|
+
* @returns {Promise<TeamSenderEmail>}
|
|
70
|
+
*/
|
|
71
|
+
setSenderEmail(senderEmail: string): Promise<TeamSenderEmail>;
|
|
53
72
|
}
|
|
54
73
|
import API from "../API";
|
|
@@ -62,6 +62,9 @@ var TeamFeatures = function (_API) {
|
|
|
62
62
|
* @param {object} options.emails The emails features
|
|
63
63
|
* @param {boolean} options.emails.displayComments Whether the comment should display in emails or not
|
|
64
64
|
* @param {boolean} options.emails.displayTeamName Whether using the team name or ’PageProof Team’ as the ‘from’ name in Email.
|
|
65
|
+
* @param {string} options.emails.linkTextColor The link text color in the email.
|
|
66
|
+
* @param {string} options.emails.buttonBackgroundColor The button background color in the email.
|
|
67
|
+
* @param {string} options.emails.buttonTextColor The button text color in the email.
|
|
65
68
|
* @param {object} options.comments The comments features
|
|
66
69
|
* @param {boolean} options.comments.editComments Whether the comments/replies can be edited by other users or not
|
|
67
70
|
* @param {ProofStatus|Array<ProofStatus>} options.comments.disableReplyingToCommentsInStatuses The proof status or array of proof status to disable the replies to comments (by reviewers).
|
|
@@ -81,6 +84,9 @@ var TeamFeatures = function (_API) {
|
|
|
81
84
|
|
|
82
85
|
var displayComments = emails && emails.displayComments;
|
|
83
86
|
var displayTeamName = emails && emails.displayTeamName;
|
|
87
|
+
var emailLinkTextColor = emails && emails.linkTextColor;
|
|
88
|
+
var emailButtonBackgroundColor = emails && emails.buttonBackgroundColor;
|
|
89
|
+
var emailButtonTextColor = emails && emails.buttonTextColor;
|
|
84
90
|
var editComments = comments && comments.editComments;
|
|
85
91
|
var disableReplyingToCommentsInStatuses = comments && comments.disableReplyingToCommentsInStatuses && [].concat(comments.disableReplyingToCommentsInStatuses);
|
|
86
92
|
var proofReference = proofs && proofs.reference;
|
|
@@ -90,6 +96,9 @@ var TeamFeatures = function (_API) {
|
|
|
90
96
|
return this.client.request('admin.team.features.update', {
|
|
91
97
|
displayComments: displayComments,
|
|
92
98
|
displayTeamName: displayTeamName,
|
|
99
|
+
emailLinkTextColor: emailLinkTextColor,
|
|
100
|
+
emailButtonBackgroundColor: emailButtonBackgroundColor,
|
|
101
|
+
emailButtonTextColor: emailButtonTextColor,
|
|
93
102
|
editComments: editComments,
|
|
94
103
|
disableReplyingToCommentsInStatuses: disableReplyingToCommentsInStatuses,
|
|
95
104
|
proofReference: proofReference,
|
|
@@ -99,6 +108,39 @@ var TeamFeatures = function (_API) {
|
|
|
99
108
|
});
|
|
100
109
|
};
|
|
101
110
|
|
|
111
|
+
/**
|
|
112
|
+
* Set the team sender email address for the team email notification.
|
|
113
|
+
*
|
|
114
|
+
* Note: This feature is only available to enterprise teams.
|
|
115
|
+
*
|
|
116
|
+
* @example <caption>Setting the team sender email</caption>
|
|
117
|
+
* const admin = await client.admin();
|
|
118
|
+
* const features = admin.team.features.setSenderEmail('team@example.com');
|
|
119
|
+
*
|
|
120
|
+
* @param {string} senderEmail The team sender email address.
|
|
121
|
+
* @returns {Promise<TeamSenderEmail>}
|
|
122
|
+
*/
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
TeamFeatures.prototype.setSenderEmail = function setSenderEmail(senderEmail) {
|
|
126
|
+
return this.client.request('admin.team.features.sender-email.set', {
|
|
127
|
+
senderEmail: senderEmail
|
|
128
|
+
}).then(function (response) {
|
|
129
|
+
return {
|
|
130
|
+
success: response.data.Success,
|
|
131
|
+
domain: response.data.Domain,
|
|
132
|
+
email: response.data.Email,
|
|
133
|
+
records: response.data.Records && response.data.Records.map(function (record) {
|
|
134
|
+
return {
|
|
135
|
+
version: record.Version,
|
|
136
|
+
current: record.Current,
|
|
137
|
+
new: record.New
|
|
138
|
+
};
|
|
139
|
+
})
|
|
140
|
+
};
|
|
141
|
+
});
|
|
142
|
+
};
|
|
143
|
+
|
|
102
144
|
return TeamFeatures;
|
|
103
145
|
}(_API3.default);
|
|
104
146
|
|
|
@@ -14,6 +14,30 @@ declare class TeamEmailFeatures {
|
|
|
14
14
|
* @type {boolean}
|
|
15
15
|
*/
|
|
16
16
|
displayTeamName: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The link text color in the email.
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
*/
|
|
22
|
+
linkTextColor: string;
|
|
23
|
+
/**
|
|
24
|
+
* The button background color in the email.
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
*/
|
|
28
|
+
buttonBackgroundColor: string;
|
|
29
|
+
/**
|
|
30
|
+
* The button text color in the email.
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
*/
|
|
34
|
+
buttonTextColor: string;
|
|
35
|
+
/**
|
|
36
|
+
* The sender email address for the team email notification.
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
*/
|
|
40
|
+
senderEmail: string;
|
|
17
41
|
/** @private */
|
|
18
42
|
fromTeamEmailFeatures(teamEmailFeaturesData: any): TeamEmailFeatures;
|
|
19
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.__esModule=true;var _transform=require("./transform");var _transform2=_interopRequireDefault(_transform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var TeamEmailFeatureSchema={displayComments:"DisplayComments",displayTeamName:"DisplayTeamName"};var TeamEmailFeatures=function(){function TeamEmailFeatures(){_classCallCheck(this,TeamEmailFeatures)}TeamEmailFeatures.prototype.fromTeamEmailFeatures=function fromTeamEmailFeatures(teamEmailFeaturesData){(0,_transform2.default)(this,TeamEmailFeatureSchema,teamEmailFeaturesData);return this};return TeamEmailFeatures}();exports.default=TeamEmailFeatures;
|
|
1
|
+
"use strict";exports.__esModule=true;var _transform=require("./transform");var _transform2=_interopRequireDefault(_transform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var TeamEmailFeatureSchema={displayComments:"DisplayComments",displayTeamName:"DisplayTeamName",linkTextColor:"EmailLinkTextColor",buttonBackgroundColor:"EmailButtonBackgroundColor",buttonTextColor:"EmailButtonTextColor",senderEmail:"SenderEmail"};var TeamEmailFeatures=function(){function TeamEmailFeatures(){_classCallCheck(this,TeamEmailFeatures)}TeamEmailFeatures.prototype.fromTeamEmailFeatures=function fromTeamEmailFeatures(teamEmailFeaturesData){(0,_transform2.default)(this,TeamEmailFeatureSchema,teamEmailFeaturesData);return this};return TeamEmailFeatures}();exports.default=TeamEmailFeatures;
|
|
@@ -851,7 +851,13 @@
|
|
|
851
851
|
"version": 2,
|
|
852
852
|
"method": "POST",
|
|
853
853
|
"path": "/api/admin/settings",
|
|
854
|
-
"body": ["displayComments", "editComments", "proofReference", "displayTeamName", "disableReplyingToCommentsInStatuses", "publicProofs", "defaultProofIsPublic", "messageToOwners"]
|
|
854
|
+
"body": ["displayComments", "editComments", "proofReference", "displayTeamName", "emailLinkTextColor", "emailButtonBackgroundColor", "emailButtonTextColor", "disableReplyingToCommentsInStatuses", "publicProofs", "defaultProofIsPublic", "messageToOwners", "senderEmail"]
|
|
855
|
+
},
|
|
856
|
+
"admin.team.features.sender-email.set": {
|
|
857
|
+
"version": 2,
|
|
858
|
+
"method": "POST",
|
|
859
|
+
"path": "/api/admin/sender-email/set",
|
|
860
|
+
"body": ["senderEmail"]
|
|
855
861
|
},
|
|
856
862
|
"integrations.get-setup-url": {
|
|
857
863
|
"method": "GET",
|