@pageproof/sdk-pr 513.0.1701650033736 → 515.0.1701985599137

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.0-beta.315
4
+
5
+ Released on the 5th of December 2023.
6
+
7
+ - [[PP-400](https://goto.pageproof.dev/PP-400)] Changes for a soon-to-be announced feature for 12 days of Christmas.
8
+ - [[PP-5710](https://goto.pageproof.dev/PP-5710)] Changes for a soon-to-be announced feature for 12 days of Christmas.
9
+
3
10
  ## 2.0.0-beta.314
4
11
 
5
12
  Released on the 27th of November 2023.
@@ -46,10 +46,11 @@ 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
49
50
  * @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
50
51
  * @returns {Promise<Brief>}
51
52
  */
52
- create({ name, file, tags, dueDate, }: string): Promise<Brief>;
53
+ create({ name, file, isPublic, tags, dueDate, }: string): Promise<Brief>;
53
54
  /**
54
55
  * Updates brief with edited title, tags, dueDate and added recipient, message for recipient and starts it by default
55
56
  *
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,_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;
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,isPublic=_ref.isPublic,_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,isPublic:isPublic,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,isPublic:data.isPublic}).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;
@@ -111,6 +111,7 @@ var TeamFeatures = function (_API) {
111
111
  var enableChecklists = proofs && proofs.enableChecklists;
112
112
  var suggestionsIncludeTeamMembers = addressBook && addressBook.suggestionsIncludeTeamMembers;
113
113
  var enableWebhooks = webhooks && webhooks.enabled;
114
+ var defaultIsPreviousVersionDueDate = proofs && proofs.defaultIsPreviousVersionDueDate;
114
115
  return this.client.request('admin.team.features.update', {
115
116
  displayComments: displayComments,
116
117
  displayTeamName: displayTeamName,
@@ -130,7 +131,8 @@ var TeamFeatures = function (_API) {
130
131
  messageToOwners: messageToOwners,
131
132
  allowedDecisions: allowedDecisions,
132
133
  enableChecklists: enableChecklists,
133
- suggestionsIncludeTeamMembers: suggestionsIncludeTeamMembers
134
+ suggestionsIncludeTeamMembers: suggestionsIncludeTeamMembers,
135
+ defaultIsPreviousVersionDueDate: defaultIsPreviousVersionDueDate
134
136
  });
135
137
  };
136
138
 
@@ -38,6 +38,12 @@ declare class TeamProofFeatures {
38
38
  * @type {boolean}
39
39
  */
40
40
  enableChecklists: boolean;
41
+ /**
42
+ * Whether the default due date for a new version is the previous version's due date.
43
+ *
44
+ * @type {boolean}
45
+ */
46
+ defaultIsPreviousVersionDueDate: boolean;
41
47
  /** @private */
42
48
  fromTeamProofFeatures(teamProofFeaturesData: any): TeamProofFeatures;
43
49
  }
@@ -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", "isPublic"]
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", "isPublic"]
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", "enableWebhooks", "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", "defaultIsPreviousVersionDueDate"]
882
882
  },
883
883
  "admin.team.features.sender-email.set": {
884
884
  "version": 2,