@pageproof/sdk-pr 511.0.1701120229529 → 512.0.1701395944499
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/lib/api/Briefs.d.ts +1 -2
- package/lib/api/Briefs.js +1 -1
- package/lib/api/admin/TeamFeatures.d.ts +2 -1
- package/lib/api/admin/TeamFeatures.js +5 -1
- package/lib/models/TeamFeatures.js +1 -1
- package/lib/models/TeamWebhookFeatures.d.ts +17 -0
- package/lib/models/TeamWebhookFeatures.js +1 -0
- package/lib/network/endpoints.json +3 -3
- package/lib/pageproof.js +1 -1
- package/package.json +1 -1
package/lib/api/Briefs.d.ts
CHANGED
|
@@ -46,11 +46,10 @@ declare class Briefs extends API {
|
|
|
46
46
|
* @param {string} name The name of the brief
|
|
47
47
|
* @param {array} [tags] array of tags
|
|
48
48
|
* @param {File} [file] The brief file, for assigning fileId to brief
|
|
49
|
-
* @param {boolean} [isPublic] Whether the brief is publicly accessible
|
|
50
49
|
* @param {string} [messageToRecipient] message for recipient of brief, it is not needed at the moment at time of creation of Brief. but keeping it for now until it gets removed from API endpoint for brief creation
|
|
51
50
|
* @returns {Promise<Brief>}
|
|
52
51
|
*/
|
|
53
|
-
create({ name, file,
|
|
52
|
+
create({ name, file, tags, dueDate, }: string): Promise<Brief>;
|
|
54
53
|
/**
|
|
55
54
|
* Updates brief with edited title, tags, dueDate and added recipient, message for recipient and starts it by default
|
|
56
55
|
*
|
package/lib/api/Briefs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.__esModule=true;var _API2=require("./API");var _API3=_interopRequireDefault(_API2);var _Proof=require("../models/Proof");var _Proof2=_interopRequireDefault(_Proof);var _FileStatus=require("../enum/FileStatus");var _FileStatus2=_interopRequireDefault(_FileStatus);var _constants=require("../util/constants");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")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var Briefs=function(_API){_inherits(Briefs,_API);function Briefs(){_classCallCheck(this,Briefs);return _possibleConstructorReturn(this,_API.apply(this,arguments))}Briefs.prototype.setTags=function setTags(briefId,tags){return this.client.request("proofs.set-tags",{relatedId:briefId,tag:tags.join(",")})};Briefs.prototype.deleteTag=function deleteTag(briefId,tag){return this.client.request("proofs.tag-delete",{relatedId:briefId,tag:tag})};Briefs.prototype.setFile=function setFile(briefId,fileId){var _this2=this;return this.client.request("proofs.set-file",{proofId:briefId,fileId:fileId}).then(function(){return _this2.client.request("proofs.distribute-file",{proofId:briefId})})};Briefs.prototype.create=function create(_ref){var _this3=this;var name=_ref.name,file=_ref.file,
|
|
1
|
+
"use strict";exports.__esModule=true;var _API2=require("./API");var _API3=_interopRequireDefault(_API2);var _Proof=require("../models/Proof");var _Proof2=_interopRequireDefault(_Proof);var _FileStatus=require("../enum/FileStatus");var _FileStatus2=_interopRequireDefault(_FileStatus);var _constants=require("../util/constants");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")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var Briefs=function(_API){_inherits(Briefs,_API);function Briefs(){_classCallCheck(this,Briefs);return _possibleConstructorReturn(this,_API.apply(this,arguments))}Briefs.prototype.setTags=function setTags(briefId,tags){return this.client.request("proofs.set-tags",{relatedId:briefId,tag:tags.join(",")})};Briefs.prototype.deleteTag=function deleteTag(briefId,tag){return this.client.request("proofs.tag-delete",{relatedId:briefId,tag:tag})};Briefs.prototype.setFile=function setFile(briefId,fileId){var _this2=this;return this.client.request("proofs.set-file",{proofId:briefId,fileId:fileId}).then(function(){return _this2.client.request("proofs.distribute-file",{proofId:briefId})})};Briefs.prototype.create=function create(_ref){var _this3=this;var name=_ref.name,file=_ref.file,_ref$tags=_ref.tags,tags=_ref$tags===undefined?[]:_ref$tags,_ref$dueDate=_ref.dueDate,dueDate=_ref$dueDate===undefined?new Date(Date.now()+3*_constants.DAY_IN_MS):_ref$dueDate;return this.client.request("briefs.create",{title:name,messageToRecipient:"",dueDate:dueDate.toISOString(),tag:tags.join(",")}).then(function(response){var brief=(new _Proof2.default).fromProof(response.data.Brief);return Promise.all([brief,file&&_this3.setFile(brief.id,file.id)])}).then(function(_ref2){var brief=_ref2[0];if(file){brief.fileId=file.id;brief.fileStatus=_FileStatus2.default.UPLOADING}brief.calculateState();return brief})};Briefs.prototype.update=function update(_ref3){var _this4=this;var briefId=_ref3.briefId,data=_ref3.data,_ref3$start=_ref3.start,start=_ref3$start===undefined?false:_ref3$start;return this.client.request("briefs.update",{briefId:briefId,title:data.title,messageToRecipient:data.messageToRecipient,dueDate:data.dueDate?data.dueDate.toISOString():"",tag:data.tags?data.tags.join(","):"",recipient:data.recipient,editorId:data.editorId,editorMessage:data.editorMessage}).then(function(response){var brief=(new _Proof2.default).fromProof(response.data.Brief);return brief}).then(function(brief){return Promise.resolve(start&&_this4.start(brief.id)).then(function(){return brief})})};Briefs.prototype.delete=function _delete(briefId){return this.client.request("proofs.delete",{proofId:briefId})};Briefs.prototype.start=function start(briefId){return this.client.request("briefs.start",{briefId:briefId})};return Briefs}(_API3.default);exports.default=Briefs;
|
|
@@ -42,9 +42,10 @@ declare class TeamFeatures extends API {
|
|
|
42
42
|
* @param {Array<Decision>} options.proofs.allowedDecisions The array of proof decisions that allowed to the reviewer.
|
|
43
43
|
* @param {boolean} options.proofs.enableChecklists Whether the checklists feature is enabled.
|
|
44
44
|
* @param {boolean} options.addressBook.suggestionsIncludeTeamMembers Whether other team members are included in suggestions when selecting a user.
|
|
45
|
+
* @param {boolean} options.webhooks.enabled Whether the webhooks feature is enabled for the team, and the team's active will trigger.
|
|
45
46
|
* @returns {Promise}
|
|
46
47
|
*/
|
|
47
|
-
update({ emails, comments, proofs, addressBook }: {
|
|
48
|
+
update({ emails, comments, proofs, addressBook, webhooks, }: {
|
|
48
49
|
emails: {
|
|
49
50
|
displayComments: boolean;
|
|
50
51
|
displayTeamName: boolean;
|
|
@@ -80,6 +80,7 @@ var TeamFeatures = function (_API) {
|
|
|
80
80
|
* @param {Array<Decision>} options.proofs.allowedDecisions The array of proof decisions that allowed to the reviewer.
|
|
81
81
|
* @param {boolean} options.proofs.enableChecklists Whether the checklists feature is enabled.
|
|
82
82
|
* @param {boolean} options.addressBook.suggestionsIncludeTeamMembers Whether other team members are included in suggestions when selecting a user.
|
|
83
|
+
* @param {boolean} options.webhooks.enabled Whether the webhooks feature is enabled for the team, and the team's active will trigger.
|
|
83
84
|
* @returns {Promise}
|
|
84
85
|
*/
|
|
85
86
|
|
|
@@ -88,7 +89,8 @@ var TeamFeatures = function (_API) {
|
|
|
88
89
|
var emails = _ref.emails,
|
|
89
90
|
comments = _ref.comments,
|
|
90
91
|
proofs = _ref.proofs,
|
|
91
|
-
addressBook = _ref.addressBook
|
|
92
|
+
addressBook = _ref.addressBook,
|
|
93
|
+
webhooks = _ref.webhooks;
|
|
92
94
|
|
|
93
95
|
var displayComments = emails && emails.displayComments;
|
|
94
96
|
var displayTeamName = emails && emails.displayTeamName;
|
|
@@ -108,11 +110,13 @@ var TeamFeatures = function (_API) {
|
|
|
108
110
|
var allowedDecisions = proofs && proofs.allowedDecisions;
|
|
109
111
|
var enableChecklists = proofs && proofs.enableChecklists;
|
|
110
112
|
var suggestionsIncludeTeamMembers = addressBook && addressBook.suggestionsIncludeTeamMembers;
|
|
113
|
+
var enableWebhooks = webhooks && webhooks.enabled;
|
|
111
114
|
return this.client.request('admin.team.features.update', {
|
|
112
115
|
displayComments: displayComments,
|
|
113
116
|
displayTeamName: displayTeamName,
|
|
114
117
|
generalComments: generalComments,
|
|
115
118
|
privateComments: privateComments,
|
|
119
|
+
enableWebhooks: enableWebhooks,
|
|
116
120
|
emailTitleTextColor: emailTitleTextColor,
|
|
117
121
|
emailLinkTextColor: emailLinkTextColor,
|
|
118
122
|
emailButtonBackgroundColor: emailButtonBackgroundColor,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.__esModule=true;var _transform=require("./transform");var _transform2=_interopRequireDefault(_transform);var _TeamEmailFeatures=require("./TeamEmailFeatures");var _TeamEmailFeatures2=_interopRequireDefault(_TeamEmailFeatures);var _TeamCommentFeatures=require("./TeamCommentFeatures");var _TeamCommentFeatures2=_interopRequireDefault(_TeamCommentFeatures);var _TeamProofFeatures=require("./TeamProofFeatures");var _TeamProofFeatures2=_interopRequireDefault(_TeamProofFeatures);var _TeamAddressBookFeatures=require("./TeamAddressBookFeatures");var _TeamAddressBookFeatures2=_interopRequireDefault(_TeamAddressBookFeatures);var _TeamAccountFeatures=require("./TeamAccountFeatures");var _TeamAccountFeatures2=_interopRequireDefault(_TeamAccountFeatures);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 teamFeaturesSchema={emails:function emails(data){return(new _TeamEmailFeatures2.default).fromTeamEmailFeatures(data)},comments:function comments(data){return(new _TeamCommentFeatures2.default).fromTeamCommentFeatures(data)},proofs:function proofs(data){return(new _TeamProofFeatures2.default).fromTeamProofFeatures(data)},addressBook:function addressBook(data){return(new _TeamAddressBookFeatures2.default).fromTeamAddressBookFeatures(data)},accounts:function accounts(data){return(new _TeamAccountFeatures2.default).fromTeamAccountFeatures(data)}};var TeamFeatures=function(){function TeamFeatures(){_classCallCheck(this,TeamFeatures)}TeamFeatures.prototype.fromTeamFeatures=function fromTeamFeatures(teamFeaturesData){(0,_transform2.default)(this,teamFeaturesSchema,teamFeaturesData);return this};return TeamFeatures}();exports.default=TeamFeatures;
|
|
1
|
+
"use strict";exports.__esModule=true;var _transform=require("./transform");var _transform2=_interopRequireDefault(_transform);var _TeamEmailFeatures=require("./TeamEmailFeatures");var _TeamEmailFeatures2=_interopRequireDefault(_TeamEmailFeatures);var _TeamCommentFeatures=require("./TeamCommentFeatures");var _TeamCommentFeatures2=_interopRequireDefault(_TeamCommentFeatures);var _TeamProofFeatures=require("./TeamProofFeatures");var _TeamProofFeatures2=_interopRequireDefault(_TeamProofFeatures);var _TeamAddressBookFeatures=require("./TeamAddressBookFeatures");var _TeamAddressBookFeatures2=_interopRequireDefault(_TeamAddressBookFeatures);var _TeamAccountFeatures=require("./TeamAccountFeatures");var _TeamAccountFeatures2=_interopRequireDefault(_TeamAccountFeatures);var _TeamWebhookFeatures=require("./TeamWebhookFeatures");var _TeamWebhookFeatures2=_interopRequireDefault(_TeamWebhookFeatures);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 teamFeaturesSchema={emails:function emails(data){return(new _TeamEmailFeatures2.default).fromTeamEmailFeatures(data)},comments:function comments(data){return(new _TeamCommentFeatures2.default).fromTeamCommentFeatures(data)},proofs:function proofs(data){return(new _TeamProofFeatures2.default).fromTeamProofFeatures(data)},addressBook:function addressBook(data){return(new _TeamAddressBookFeatures2.default).fromTeamAddressBookFeatures(data)},accounts:function accounts(data){return(new _TeamAccountFeatures2.default).fromTeamAccountFeatures(data)},webhooks:function webhooks(data){return(new _TeamWebhookFeatures2.default).fromTeamWebhookFeatures(data)}};var TeamFeatures=function(){function TeamFeatures(){_classCallCheck(this,TeamFeatures)}TeamFeatures.prototype.fromTeamFeatures=function fromTeamFeatures(teamFeaturesData){(0,_transform2.default)(this,teamFeaturesSchema,teamFeaturesData);return this};return TeamFeatures}();exports.default=TeamFeatures;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default TeamWebhookFeatures;
|
|
2
|
+
declare class TeamWebhookFeatures {
|
|
3
|
+
/**
|
|
4
|
+
* Whether team admins can configure the webhooks feature for their team.
|
|
5
|
+
*
|
|
6
|
+
* @type {boolean}
|
|
7
|
+
*/
|
|
8
|
+
configurable: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Whether the webhooks feature is enabled for the team, and the team's active will trigger.
|
|
11
|
+
*
|
|
12
|
+
* @type {boolean}
|
|
13
|
+
*/
|
|
14
|
+
enabled: boolean;
|
|
15
|
+
/** @private */
|
|
16
|
+
fromTeamWebhookFeatures(teamWebhookFeaturesData: any): TeamWebhookFeatures;
|
|
17
|
+
}
|
|
@@ -0,0 +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 TeamWebhookFeaturesSchema={configurable:"LicenseWebhooks",enabled:"EnableWebhooks"};var TeamWebhookFeatures=function(){function TeamWebhookFeatures(){_classCallCheck(this,TeamWebhookFeatures)}TeamWebhookFeatures.prototype.fromTeamWebhookFeatures=function fromTeamWebhookFeatures(teamWebhookFeaturesData){(0,_transform2.default)(this,TeamWebhookFeaturesSchema,teamWebhookFeaturesData);return this};return TeamWebhookFeatures}();exports.default=TeamWebhookFeatures;
|
|
@@ -815,12 +815,12 @@
|
|
|
815
815
|
"briefs.create": {
|
|
816
816
|
"method": "POST",
|
|
817
817
|
"path": "/api/briefs/create",
|
|
818
|
-
"body": ["title", "messageToRecipient", "dueDate", "tag"
|
|
818
|
+
"body": ["title", "messageToRecipient", "dueDate", "tag"]
|
|
819
819
|
},
|
|
820
820
|
"briefs.update": {
|
|
821
821
|
"method": "POST",
|
|
822
822
|
"path": "/api/briefs/update",
|
|
823
|
-
"body": ["briefId", "title", "messageToRecipient", "dueDate", "tag", "recipient", "editorId", "editorMessage"
|
|
823
|
+
"body": ["briefId", "title", "messageToRecipient", "dueDate", "tag", "recipient", "editorId", "editorMessage"]
|
|
824
824
|
},
|
|
825
825
|
"admin.team.users.enabled": {
|
|
826
826
|
"method": "GET",
|
|
@@ -878,7 +878,7 @@
|
|
|
878
878
|
"version": 2,
|
|
879
879
|
"method": "POST",
|
|
880
880
|
"path": "/api/admin/settings",
|
|
881
|
-
"body": ["displayComments", "generalComments", "privateComments", "editComments", "ownerCanDeleteComments", "proofReference", "displayTeamName", "emailTitleTextColor", "emailLinkTextColor", "emailButtonBackgroundColor", "emailButtonTextColor", "disableReplyingToCommentsInStatuses", "publicProofs", "defaultProofIsPublic", "messageToOwners", "allowedDecisions", "enableChecklists", "suggestionsIncludeTeamMembers"]
|
|
881
|
+
"body": ["displayComments", "generalComments", "privateComments", "enableWebhooks", "editComments", "ownerCanDeleteComments", "proofReference", "displayTeamName", "emailTitleTextColor", "emailLinkTextColor", "emailButtonBackgroundColor", "emailButtonTextColor", "disableReplyingToCommentsInStatuses", "publicProofs", "defaultProofIsPublic", "messageToOwners", "allowedDecisions", "enableChecklists", "suggestionsIncludeTeamMembers"]
|
|
882
882
|
},
|
|
883
883
|
"admin.team.features.sender-email.set": {
|
|
884
884
|
"version": 2,
|