@pageproof/sdk-pr 604.0.1757976119423 → 604.0.1762133603434

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,3 +1,15 @@
1
+ ## 2.6.0
2
+
3
+ Released on the 16th of October 2025.
4
+
5
+ - [[PP-4742](https://pageproof.atlassian.net/browse/PP-4742)] Added support for scheduled proofs. Proofs and briefs can now be scheduled for future delivery by setting a `scheduledDate` when creating or updating them.
6
+
7
+ ## 2.5.1
8
+
9
+ Released on the 13th of October 2025.
10
+
11
+ - [[PP-7200](https://pageproof.atlassian.net/browse/PP-7200)] Add support for team celebrations feature.
12
+
1
13
  ## 2.5.0
2
14
 
3
15
  Released on the 12th of September 2025.
@@ -50,9 +50,9 @@ declare class Briefs extends API {
50
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
51
51
  * @returns {Promise<Brief>}
52
52
  */
53
- create({ name, file, isPublic, tags, dueDate, }: string): Promise<Brief>;
53
+ create({ name, file, isPublic, tags, dueDate, scheduledDate, }: string): Promise<Brief>;
54
54
  /**
55
- * Updates brief with edited title, tags, dueDate and added recipient, message for recipient and starts it by default
55
+ * Updates brief with edited title, tags, dueDate, scheduledDate, and added recipient, message for recipient and starts it by default
56
56
  *
57
57
  * @example <caption>Updating a brief</caption>
58
58
  * const brief = await client.briefs.update({
@@ -65,6 +65,7 @@ declare class Briefs extends API {
65
65
  messageToRecipient: 'message to recipient',
66
66
  editorId: 'UHGHV78678JHGJ',
67
67
  editorMessage: 'message for editor',
68
+ scheduledDate: new Date('Mon Oct 23 2017 14:56:51 GMT+1300 (NZDT)'),
68
69
  }
69
70
  * });
70
71
  *
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,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;
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,_ref$scheduledDate=_ref.scheduledDate,scheduledDate=_ref$scheduledDate===undefined?null:_ref$scheduledDate;return this.client.request("briefs.create",{title:name,isPublic:isPublic,messageToRecipient:"",dueDate:dueDate.toISOString(),tag:tags.join(","),scheduledDate:scheduledDate&&scheduledDate.toISOString?scheduledDate.toISOString():null}).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,scheduledDate:data.scheduledDate&&data.scheduledDate.toISOString?data.scheduledDate.toISOString():null}).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;
@@ -206,7 +206,7 @@ declare class Proofs extends API {
206
206
  * @param [options.isDigitalVerificationEnabled] Whether the proof has digital verification enabled.
207
207
  * @returns {Promise<Proof>}
208
208
  */
209
- create({ name, tags, dueDate, messageToReviewers, workflow, workflowTemplate, proofTemplate, checklist, file, group, previousProof, team, reference, customTools, integrationReferences, reminders, owners, canDownload, isPublic, start, commentVisibility, priority, isDigitalVerificationEnabled, }: {
209
+ create({ name, tags, dueDate, messageToReviewers, workflow, workflowTemplate, proofTemplate, checklist, file, group, previousProof, team, reference, customTools, integrationReferences, reminders, owners, canDownload, isPublic, start, commentVisibility, priority, isDigitalVerificationEnabled, scheduledDate, }: {
210
210
  name: string;
211
211
  tags?: string[];
212
212
  dueDate?: string | Date;
package/lib/api/Proofs.js CHANGED
@@ -1 +1 @@
1
- "use strict";exports.__esModule=true;var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key]}}}return target};var _API2=require("./API");var _API3=_interopRequireDefault(_API2);var _ProofsOwners=require("./ProofsOwners");var _ProofsOwners2=_interopRequireDefault(_ProofsOwners);var _ProofsEditors=require("./ProofsEditors");var _ProofsEditors2=_interopRequireDefault(_ProofsEditors);var _ProofsReviewers=require("./ProofsReviewers");var _ProofsReviewers2=_interopRequireDefault(_ProofsReviewers);var _ProofsVersions=require("./ProofsVersions");var _ProofsVersions2=_interopRequireDefault(_ProofsVersions);var _ProofsGroups=require("./ProofsGroups");var _ProofsGroups2=_interopRequireDefault(_ProofsGroups);var _ProofsAudit=require("./ProofsAudit");var _ProofsAudit2=_interopRequireDefault(_ProofsAudit);var _ProofsAssets=require("./ProofsAssets");var _ProofsAssets2=_interopRequireDefault(_ProofsAssets);var _ProofsCustomTools=require("./ProofsCustomTools");var _ProofsCustomTools2=_interopRequireDefault(_ProofsCustomTools);var _ProofsIntegrationReferences=require("./ProofsIntegrationReferences");var _ProofsIntegrationReferences2=_interopRequireDefault(_ProofsIntegrationReferences);var _ProofsLinkCheck=require("./ProofsLinkCheck");var _ProofsLinkCheck2=_interopRequireDefault(_ProofsLinkCheck);var _ProofsDecisions=require("./ProofsDecisions");var _ProofsDecisions2=_interopRequireDefault(_ProofsDecisions);var _Proof=require("../models/Proof");var _Proof2=_interopRequireDefault(_Proof);var _Reminders=require("./Reminders");var _Reminders2=_interopRequireDefault(_Reminders);var _whatwgURL=require("../util/whatwgURL");var _whatwgURL2=_interopRequireDefault(_whatwgURL);var _constants=require("../util/constants");var _bluffer=require("../bluffer");var _bluffer2=_interopRequireDefault(_bluffer);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 VIDEO_URL_TOKEN_SEPARATOR="|";function transformProofsForUpdate(proofs){var proofsArrForUpdate=[].concat(proofs);proofsArrForUpdate.forEach(function(proof){proof.proofId=proof.id;delete proof.id});return proofsArrForUpdate}var Proofs=function(_API){_inherits(Proofs,_API);function Proofs(client){_classCallCheck(this,Proofs);var _this=_possibleConstructorReturn(this,_API.call(this,client));_this.owners=new _ProofsOwners2.default(client);_this.editors=new _ProofsEditors2.default(client);_this.reviewers=new _ProofsReviewers2.default(client);_this.versions=new _ProofsVersions2.default(client);_this.groups=new _ProofsGroups2.default(client);_this.reminders=new _Reminders2.default(client);_this.audit=new _ProofsAudit2.default(client);_this.assets=new _ProofsAssets2.default(client);_this.customTools=new _ProofsCustomTools2.default(client);_this.integrationReferences=new _ProofsIntegrationReferences2.default(client);_this.linkCheck=new _ProofsLinkCheck2.default(client);_this.decisions=new _ProofsDecisions2.default(client);return _this}Proofs.prototype.setWorkflow=function setWorkflow(proofId,workflowId){var _this2=this;return this.client.request("proofs.normalize-workflow",{proofId:proofId,workflowId:workflowId}).then(function(){return _this2.client.request("proofs.set-workflow",{proofId:proofId,workflowId:workflowId})})};Proofs.prototype.setTags=function setTags(proofId,tags){return this.client.request("proofs.set-tags",{relatedId:proofId,tag:tags.join(",")})};Proofs.prototype.deleteTag=function deleteTag(proofId,tag){return this.client.request("proofs.tag-delete",{relatedId:proofId,tag:tag})};Proofs.prototype.setFile=function setFile(proofId,fileId){var _this3=this;return this.client.request("proofs.set-file",{proofId:proofId,fileId:fileId}).then(function(){return _this3.client.request("proofs.distribute-file",{proofId:proofId})})};Proofs.prototype.create=function create(_ref){var _this4=this;var name=_ref.name,_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,messageToReviewers=_ref.messageToReviewers,workflow=_ref.workflow,workflowTemplate=_ref.workflowTemplate,proofTemplate=_ref.proofTemplate,checklist=_ref.checklist,file=_ref.file,group=_ref.group,previousProof=_ref.previousProof,team=_ref.team,reference=_ref.reference,customTools=_ref.customTools,integrationReferences=_ref.integrationReferences,_ref$reminders=_ref.reminders,reminders=_ref$reminders===undefined?[]:_ref$reminders,owners=_ref.owners,canDownload=_ref.canDownload,isPublic=_ref.isPublic,_ref$start=_ref.start,start=_ref$start===undefined?true:_ref$start,_ref$commentVisibilit=_ref.commentVisibility,commentVisibility=_ref$commentVisibilit===undefined?null:_ref$commentVisibilit,priority=_ref.priority,isDigitalVerificationEnabled=_ref.isDigitalVerificationEnabled;return this.client.request("proofs.create",{proof:{name:name,tags:tags,dueDate:dueDate.toISOString?dueDate.toISOString():String(dueDate),messageToReviewers:messageToReviewers,workflowId:workflow&&workflow.id||undefined,workflowTemplateId:workflowTemplate&&workflowTemplate.id||undefined,proofTemplateId:proofTemplate&&proofTemplate.id||undefined,checklist:checklist,fileId:file&&file.id||undefined,groupId:group&&group.id||undefined,previousProofId:previousProof&&previousProof.id||undefined,teamSlug:team&&team.slug||undefined,reference:reference,integrationReferences:integrationReferences,reminders:[].concat(reminders),owners:owners,canDownload:canDownload,isPublic:isPublic,start:start,commentVisibility:commentVisibility,priority:priority,isDigitalVerificationEnabled:isDigitalVerificationEnabled}}).then(function(response){var proof=(new _Proof2.default).fromProof(response.data);proof.calculateState();if(customTools&&!previousProof){return _this4.customTools.update(proof.id,customTools).then(function(){return proof})}return proof})};Proofs.prototype.archive=function archive(proofIdOrIds){return this.client.request("proofs.archive",{proofIds:proofIdOrIds})};Proofs.prototype.unarchive=function unarchive(proofId){return this.client.request("proofs.unarchive",{proofId:proofId})};Proofs.prototype.delete=function _delete(proofId){return this.client.request("proofs.delete",{proofId:proofId})};Proofs.prototype.finish=function finish(proofId,decision){return this.client.request("proofs.finish",{proofId:proofId,decision:decision})};Proofs.prototype.approve=function approve(proofId,message){return this.client.request("proofs.manual-approval",{proofId:proofId,message:message})};Proofs.prototype.withdrawApproval=function withdrawApproval(proofId,messageToSender){return this.client.request("proofs.withdraw-approval",{proofId:proofId,messageToSender:messageToSender})};Proofs.prototype.generateEmail=function generateEmail(proofId){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return this.client.request("email.proofs.generate",_extends({proofId:proofId},options)).then(function(response){return response.data})};Proofs.prototype.return=function _return(proofIdOrIds){return this.client.request("proofs.return",{proofIds:[].concat(proofIdOrIds)}).then(function(response){return{proofIds:response.data.ProofIds,errors:response.data.Errors.map(function(error){return{proofId:error.ProofId,errorCode:error.ErrorCode,errorMessage:error.ErrorMessage}})}})};Proofs.prototype.start=function start(proofId){return this.client.request("proofs.start",{proofId:proofId})};Proofs.prototype.removeEditor=function removeEditor(id){return this.client.request("proofs.remove-editor",{proofId:id})};Proofs.prototype.load=function load(proofId){return this.client.request("proofs.load",{proofId:proofId}).then(function(response){return(new _Proof2.default).fromProof(response.data)})};Proofs.prototype.lock=function lock(proofId){return this.client.request("proofs.lock",{proofId:proofId})};Proofs.prototype.unlock=function unlock(proofId){return this.client.request("proofs.unlock",{proofId:proofId})};Proofs.prototype.requestUnlock=function requestUnlock(proofId){return this.client.request("proofs.request-unlock",{proofId:proofId})};Proofs.prototype.requestAccess=function requestAccess(proofId){return this.client.request("proofs.request-access",{proofId:proofId})};Proofs.prototype.images=function images(proofId){return this.client.request("proofs.images",{proofId:proofId}).then(function(response){return response.data.proof.file})};Proofs.prototype.videoCredentials=function videoCredentials(proofId){var _this5=this;return this.client.cache.auto(_constants.VIDEO_CREDENTIALS_CACHE_PREFIX+proofId,function(){return _this5._videoCredentials(proofId)})};Proofs.prototype._videoCredentials=function _videoCredentials(proofId){var _this6=this;var bluffer=new _bluffer2.default;return this.client.request("proofs.video-credentials",{proofId:proofId}).then(function(response){return Promise.all([response.data.envelope.envelope,_this6.client.rawRequest({method:"GET",url:new _whatwgURL2.default(response.data.videoCredentials.url)}).then(function(videoCredentialsResponse){return videoCredentialsResponse.body})])}).then(function(_ref2){var envelope=_ref2[0],videoCredentials$=_ref2[1];return _this6.client.crypto().decryptImage(envelope+"-"+videoCredentials$,_this6.client.keyPairs.getPrivateKeyPEMs())}).then(function(videoCredentialsBase64){return bluffer.createBase64(videoCredentialsBase64).then(function(buffer){return bluffer.read(buffer)})}).then(function(videoCredentials){try{return JSON.parse(videoCredentials)}catch(err){var _videoCredentials$spl=videoCredentials.split(VIDEO_URL_TOKEN_SEPARATOR),unsafeBaseStreamingUrl=_videoCredentials$spl[0],accessToken=_videoCredentials$spl[1];return{streamingUrl:unsafeBaseStreamingUrl.replace("http://","https://")+"/manifest(format=m3u8-aapl,encryption=cbc)",accessToken:accessToken,manifestUrl:unsafeBaseStreamingUrl.replace("http://","https://")+"/manifest",bearerToken:accessToken}}})};Proofs.prototype._getProofSetup=function _getProofSetup(integrationKey,id){return this.client.request("integrations.get-proof-setup",{integration_key:integrationKey,id:id}).then(function(response){return{payload:response.data.payload}})};Proofs.prototype.setMessageToReviewers=function setMessageToReviewers(proofIdOrIds,messageToReviewers){return this.client.request("proofs.set-message-to-reviewers",{proofIds:[].concat(proofIdOrIds),messageToReviewers:messageToReviewers})};Proofs.prototype.returnTodos=function returnTodos(proofIdOrIds,_ref3){var messageToOwners=_ref3.messageToOwners,_ref3$markCommentsAsT=_ref3.markCommentsAsTodo,markCommentsAsTodo=_ref3$markCommentsAsT===undefined?false:_ref3$markCommentsAsT;return this.client.request("proofs.return-todos",{proofIds:[].concat(proofIdOrIds),messageToOwners:messageToOwners,markCommentAsTodo:markCommentsAsTodo})};Proofs.prototype.updateDecision=function updateDecision(proofId,decision){return this.client.request("proofs.update-decision",{proofId:proofId,decision:decision})};Proofs.prototype.update=function update(proofOrProofs){if(proofOrProofs.length===1||typeof proofOrProofs.length==="undefined"){var _concat$=[].concat(proofOrProofs)[0],id=_concat$.id,name=_concat$.name,tags=_concat$.tags,dueDate=_concat$.dueDate,messageToReviewers=_concat$.messageToReviewers,workflow=_concat$.workflow,checklist=_concat$.checklist,group=_concat$.group,proofTemplate=_concat$.proofTemplate,file=_concat$.file,reference=_concat$.reference,integrationReferences=_concat$.integrationReferences,reminders=_concat$.reminders,owners=_concat$.owners,canDownload=_concat$.canDownload,isPublic=_concat$.isPublic,start=_concat$.start,commentVisibility=_concat$.commentVisibility,priority=_concat$.priority,isDigitalVerificationEnabled=_concat$.isDigitalVerificationEnabled;return this.client.request("proofs.update",{proof:{id:id,name:name,tags:tags,dueDate:dueDate?dueDate.toISOString():undefined,messageToReviewers:messageToReviewers,workflowId:workflow&&workflow.id||undefined,proofTemplateId:proofTemplate&&proofTemplate.id||undefined,checklist:checklist,fileId:file&&file.id||undefined,groupId:group&&group.id||undefined,reference:reference,integrationReferences:integrationReferences,reminders:reminders?[].concat(reminders):undefined,owners:owners,canDownload:canDownload,isPublic:isPublic,start:start,commentVisibility:commentVisibility,priority:priority,isDigitalVerificationEnabled:isDigitalVerificationEnabled}}).then(function(response){var proof=(new _Proof2.default).fromProof(response.data);proof.calculateState();return proof})}return this.client.request("proofs.bulk-update",{proofs:transformProofsForUpdate(proofOrProofs)})};Proofs.prototype.next=function next(proofId){return this.client.request("proofs.next",{proofId:proofId}).then(function(response){return(new _Proof2.default).fromProof(response.data)})};Proofs.prototype.addWorkflow=function addWorkflow(proofIdOrIds,workflowTemplateId){return this.client.request("proofs-workflow.add-bulk",{proofIds:[].concat(proofIdOrIds),workflowTemplateId:workflowTemplateId})};Proofs.prototype.sendShareLink=function sendShareLink(_ref4){var proofId=_ref4.proofId,message=_ref4.message,emailAddresses=_ref4.emailAddresses;return this.client.request("proofs.send-share-link",{proofId:proofId,message:message,emailAddresses:emailAddresses})};Proofs.prototype.getWorkflowMetrics=function getWorkflowMetrics(proofId){return this.client.request("proofs.get-workflow-metrics",{proofId:proofId}).then(function(response){if(response.data){return response.data.workflowMetrics}return null})};return Proofs}(_API3.default);exports.default=Proofs;
1
+ "use strict";exports.__esModule=true;var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key]}}}return target};var _API2=require("./API");var _API3=_interopRequireDefault(_API2);var _ProofsOwners=require("./ProofsOwners");var _ProofsOwners2=_interopRequireDefault(_ProofsOwners);var _ProofsEditors=require("./ProofsEditors");var _ProofsEditors2=_interopRequireDefault(_ProofsEditors);var _ProofsReviewers=require("./ProofsReviewers");var _ProofsReviewers2=_interopRequireDefault(_ProofsReviewers);var _ProofsVersions=require("./ProofsVersions");var _ProofsVersions2=_interopRequireDefault(_ProofsVersions);var _ProofsGroups=require("./ProofsGroups");var _ProofsGroups2=_interopRequireDefault(_ProofsGroups);var _ProofsAudit=require("./ProofsAudit");var _ProofsAudit2=_interopRequireDefault(_ProofsAudit);var _ProofsAssets=require("./ProofsAssets");var _ProofsAssets2=_interopRequireDefault(_ProofsAssets);var _ProofsCustomTools=require("./ProofsCustomTools");var _ProofsCustomTools2=_interopRequireDefault(_ProofsCustomTools);var _ProofsIntegrationReferences=require("./ProofsIntegrationReferences");var _ProofsIntegrationReferences2=_interopRequireDefault(_ProofsIntegrationReferences);var _ProofsLinkCheck=require("./ProofsLinkCheck");var _ProofsLinkCheck2=_interopRequireDefault(_ProofsLinkCheck);var _ProofsDecisions=require("./ProofsDecisions");var _ProofsDecisions2=_interopRequireDefault(_ProofsDecisions);var _Proof=require("../models/Proof");var _Proof2=_interopRequireDefault(_Proof);var _Reminders=require("./Reminders");var _Reminders2=_interopRequireDefault(_Reminders);var _whatwgURL=require("../util/whatwgURL");var _whatwgURL2=_interopRequireDefault(_whatwgURL);var _constants=require("../util/constants");var _bluffer=require("../bluffer");var _bluffer2=_interopRequireDefault(_bluffer);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 VIDEO_URL_TOKEN_SEPARATOR="|";function transformProofsForUpdate(proofs){var proofsArrForUpdate=[].concat(proofs);proofsArrForUpdate.forEach(function(proof){proof.proofId=proof.id;delete proof.id});return proofsArrForUpdate}var Proofs=function(_API){_inherits(Proofs,_API);function Proofs(client){_classCallCheck(this,Proofs);var _this=_possibleConstructorReturn(this,_API.call(this,client));_this.owners=new _ProofsOwners2.default(client);_this.editors=new _ProofsEditors2.default(client);_this.reviewers=new _ProofsReviewers2.default(client);_this.versions=new _ProofsVersions2.default(client);_this.groups=new _ProofsGroups2.default(client);_this.reminders=new _Reminders2.default(client);_this.audit=new _ProofsAudit2.default(client);_this.assets=new _ProofsAssets2.default(client);_this.customTools=new _ProofsCustomTools2.default(client);_this.integrationReferences=new _ProofsIntegrationReferences2.default(client);_this.linkCheck=new _ProofsLinkCheck2.default(client);_this.decisions=new _ProofsDecisions2.default(client);return _this}Proofs.prototype.setWorkflow=function setWorkflow(proofId,workflowId){var _this2=this;return this.client.request("proofs.normalize-workflow",{proofId:proofId,workflowId:workflowId}).then(function(){return _this2.client.request("proofs.set-workflow",{proofId:proofId,workflowId:workflowId})})};Proofs.prototype.setTags=function setTags(proofId,tags){return this.client.request("proofs.set-tags",{relatedId:proofId,tag:tags.join(",")})};Proofs.prototype.deleteTag=function deleteTag(proofId,tag){return this.client.request("proofs.tag-delete",{relatedId:proofId,tag:tag})};Proofs.prototype.setFile=function setFile(proofId,fileId){var _this3=this;return this.client.request("proofs.set-file",{proofId:proofId,fileId:fileId}).then(function(){return _this3.client.request("proofs.distribute-file",{proofId:proofId})})};Proofs.prototype.create=function create(_ref){var _this4=this;var name=_ref.name,_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,messageToReviewers=_ref.messageToReviewers,workflow=_ref.workflow,workflowTemplate=_ref.workflowTemplate,proofTemplate=_ref.proofTemplate,checklist=_ref.checklist,file=_ref.file,group=_ref.group,previousProof=_ref.previousProof,team=_ref.team,reference=_ref.reference,customTools=_ref.customTools,integrationReferences=_ref.integrationReferences,_ref$reminders=_ref.reminders,reminders=_ref$reminders===undefined?[]:_ref$reminders,owners=_ref.owners,canDownload=_ref.canDownload,isPublic=_ref.isPublic,_ref$start=_ref.start,start=_ref$start===undefined?true:_ref$start,_ref$commentVisibilit=_ref.commentVisibility,commentVisibility=_ref$commentVisibilit===undefined?null:_ref$commentVisibilit,priority=_ref.priority,isDigitalVerificationEnabled=_ref.isDigitalVerificationEnabled,_ref$scheduledDate=_ref.scheduledDate,scheduledDate=_ref$scheduledDate===undefined?null:_ref$scheduledDate;return this.client.request("proofs.create",{proof:{name:name,tags:tags,dueDate:dueDate.toISOString?dueDate.toISOString():String(dueDate),messageToReviewers:messageToReviewers,workflowId:workflow&&workflow.id||undefined,workflowTemplateId:workflowTemplate&&workflowTemplate.id||undefined,proofTemplateId:proofTemplate&&proofTemplate.id||undefined,checklist:checklist,fileId:file&&file.id||undefined,groupId:group&&group.id||undefined,previousProofId:previousProof&&previousProof.id||undefined,teamSlug:team&&team.slug||undefined,reference:reference,integrationReferences:integrationReferences,reminders:[].concat(reminders),owners:owners,canDownload:canDownload,isPublic:isPublic,start:start,commentVisibility:commentVisibility,priority:priority,scheduledDate:scheduledDate&&scheduledDate.toISOString?scheduledDate.toISOString():null,isDigitalVerificationEnabled:isDigitalVerificationEnabled}}).then(function(response){var proof=(new _Proof2.default).fromProof(response.data);proof.calculateState();if(customTools&&!previousProof){return _this4.customTools.update(proof.id,customTools).then(function(){return proof})}return proof})};Proofs.prototype.archive=function archive(proofIdOrIds){return this.client.request("proofs.archive",{proofIds:proofIdOrIds})};Proofs.prototype.unarchive=function unarchive(proofId){return this.client.request("proofs.unarchive",{proofId:proofId})};Proofs.prototype.delete=function _delete(proofId){return this.client.request("proofs.delete",{proofId:proofId})};Proofs.prototype.finish=function finish(proofId,decision){return this.client.request("proofs.finish",{proofId:proofId,decision:decision})};Proofs.prototype.approve=function approve(proofId,message){return this.client.request("proofs.manual-approval",{proofId:proofId,message:message})};Proofs.prototype.withdrawApproval=function withdrawApproval(proofId,messageToSender){return this.client.request("proofs.withdraw-approval",{proofId:proofId,messageToSender:messageToSender})};Proofs.prototype.generateEmail=function generateEmail(proofId){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return this.client.request("email.proofs.generate",_extends({proofId:proofId},options)).then(function(response){return response.data})};Proofs.prototype.return=function _return(proofIdOrIds){return this.client.request("proofs.return",{proofIds:[].concat(proofIdOrIds)}).then(function(response){return{proofIds:response.data.ProofIds,errors:response.data.Errors.map(function(error){return{proofId:error.ProofId,errorCode:error.ErrorCode,errorMessage:error.ErrorMessage}})}})};Proofs.prototype.start=function start(proofId){return this.client.request("proofs.start",{proofId:proofId})};Proofs.prototype.removeEditor=function removeEditor(id){return this.client.request("proofs.remove-editor",{proofId:id})};Proofs.prototype.load=function load(proofId){return this.client.request("proofs.load",{proofId:proofId}).then(function(response){return(new _Proof2.default).fromProof(response.data)})};Proofs.prototype.lock=function lock(proofId){return this.client.request("proofs.lock",{proofId:proofId})};Proofs.prototype.unlock=function unlock(proofId){return this.client.request("proofs.unlock",{proofId:proofId})};Proofs.prototype.requestUnlock=function requestUnlock(proofId){return this.client.request("proofs.request-unlock",{proofId:proofId})};Proofs.prototype.requestAccess=function requestAccess(proofId){return this.client.request("proofs.request-access",{proofId:proofId})};Proofs.prototype.images=function images(proofId){return this.client.request("proofs.images",{proofId:proofId}).then(function(response){return response.data.proof.file})};Proofs.prototype.videoCredentials=function videoCredentials(proofId){var _this5=this;return this.client.cache.auto(_constants.VIDEO_CREDENTIALS_CACHE_PREFIX+proofId,function(){return _this5._videoCredentials(proofId)})};Proofs.prototype._videoCredentials=function _videoCredentials(proofId){var _this6=this;var bluffer=new _bluffer2.default;return this.client.request("proofs.video-credentials",{proofId:proofId}).then(function(response){return Promise.all([response.data.envelope.envelope,_this6.client.rawRequest({method:"GET",url:new _whatwgURL2.default(response.data.videoCredentials.url)}).then(function(videoCredentialsResponse){return videoCredentialsResponse.body})])}).then(function(_ref2){var envelope=_ref2[0],videoCredentials$=_ref2[1];return _this6.client.crypto().decryptImage(envelope+"-"+videoCredentials$,_this6.client.keyPairs.getPrivateKeyPEMs())}).then(function(videoCredentialsBase64){return bluffer.createBase64(videoCredentialsBase64).then(function(buffer){return bluffer.read(buffer)})}).then(function(videoCredentials){try{return JSON.parse(videoCredentials)}catch(err){var _videoCredentials$spl=videoCredentials.split(VIDEO_URL_TOKEN_SEPARATOR),unsafeBaseStreamingUrl=_videoCredentials$spl[0],accessToken=_videoCredentials$spl[1];return{streamingUrl:unsafeBaseStreamingUrl.replace("http://","https://")+"/manifest(format=m3u8-aapl,encryption=cbc)",accessToken:accessToken,manifestUrl:unsafeBaseStreamingUrl.replace("http://","https://")+"/manifest",bearerToken:accessToken}}})};Proofs.prototype._getProofSetup=function _getProofSetup(integrationKey,id){return this.client.request("integrations.get-proof-setup",{integration_key:integrationKey,id:id}).then(function(response){return{payload:response.data.payload}})};Proofs.prototype.setMessageToReviewers=function setMessageToReviewers(proofIdOrIds,messageToReviewers){return this.client.request("proofs.set-message-to-reviewers",{proofIds:[].concat(proofIdOrIds),messageToReviewers:messageToReviewers})};Proofs.prototype.returnTodos=function returnTodos(proofIdOrIds,_ref3){var messageToOwners=_ref3.messageToOwners,_ref3$markCommentsAsT=_ref3.markCommentsAsTodo,markCommentsAsTodo=_ref3$markCommentsAsT===undefined?false:_ref3$markCommentsAsT;return this.client.request("proofs.return-todos",{proofIds:[].concat(proofIdOrIds),messageToOwners:messageToOwners,markCommentAsTodo:markCommentsAsTodo})};Proofs.prototype.updateDecision=function updateDecision(proofId,decision){return this.client.request("proofs.update-decision",{proofId:proofId,decision:decision})};Proofs.prototype.update=function update(proofOrProofs){if(proofOrProofs.length===1||typeof proofOrProofs.length==="undefined"){var _concat$=[].concat(proofOrProofs)[0],id=_concat$.id,name=_concat$.name,tags=_concat$.tags,dueDate=_concat$.dueDate,messageToReviewers=_concat$.messageToReviewers,workflow=_concat$.workflow,checklist=_concat$.checklist,group=_concat$.group,proofTemplate=_concat$.proofTemplate,file=_concat$.file,reference=_concat$.reference,integrationReferences=_concat$.integrationReferences,reminders=_concat$.reminders,owners=_concat$.owners,canDownload=_concat$.canDownload,isPublic=_concat$.isPublic,start=_concat$.start,commentVisibility=_concat$.commentVisibility,priority=_concat$.priority,_concat$$scheduledDat=_concat$.scheduledDate,scheduledDate=_concat$$scheduledDat===undefined?null:_concat$$scheduledDat,isDigitalVerificationEnabled=_concat$.isDigitalVerificationEnabled;return this.client.request("proofs.update",{proof:{id:id,name:name,tags:tags,dueDate:dueDate?dueDate.toISOString():undefined,messageToReviewers:messageToReviewers,workflowId:workflow&&workflow.id||undefined,proofTemplateId:proofTemplate&&proofTemplate.id||undefined,checklist:checklist,fileId:file&&file.id||undefined,groupId:group&&group.id||undefined,reference:reference,integrationReferences:integrationReferences,reminders:reminders?[].concat(reminders):undefined,owners:owners,canDownload:canDownload,isPublic:isPublic,start:start,commentVisibility:commentVisibility,priority:priority,scheduledDate:scheduledDate&&scheduledDate.toISOString?scheduledDate.toISOString():null,isDigitalVerificationEnabled:isDigitalVerificationEnabled}}).then(function(response){var proof=(new _Proof2.default).fromProof(response.data);proof.calculateState();return proof})}return this.client.request("proofs.bulk-update",{proofs:transformProofsForUpdate(proofOrProofs)})};Proofs.prototype.next=function next(proofId){return this.client.request("proofs.next",{proofId:proofId}).then(function(response){return(new _Proof2.default).fromProof(response.data)})};Proofs.prototype.addWorkflow=function addWorkflow(proofIdOrIds,workflowTemplateId){return this.client.request("proofs-workflow.add-bulk",{proofIds:[].concat(proofIdOrIds),workflowTemplateId:workflowTemplateId})};Proofs.prototype.sendShareLink=function sendShareLink(_ref4){var proofId=_ref4.proofId,message=_ref4.message,emailAddresses=_ref4.emailAddresses;return this.client.request("proofs.send-share-link",{proofId:proofId,message:message,emailAddresses:emailAddresses})};Proofs.prototype.getWorkflowMetrics=function getWorkflowMetrics(proofId){return this.client.request("proofs.get-workflow-metrics",{proofId:proofId}).then(function(response){if(response.data){return response.data.workflowMetrics}return null})};return Proofs}(_API3.default);exports.default=Proofs;
@@ -46,6 +46,10 @@ declare class TeamFeatures extends API {
46
46
  * @param {Array<Decision>} options.proofs.allowedDecisions The array of proof decisions that allowed to the reviewer.
47
47
  * @param {boolean} options.proofs.enableChecklists Whether the checklists feature is enabled.
48
48
  * @param {boolean} options.proofs.enableProofMagicAccess Whether the Magic Access feature is enabled for the team's proofs.
49
+ * @param {boolean} options.proofs.licenseDigitalVerification Whether the digital verification feature is licensed for the team.
50
+ * @param {boolean} options.proofs.enableDigitalVerification Whether the digital verification feature is enabled for the team's proofs.
51
+ * @param {boolean} options.proofs.defaultDigitalVerification Whether the digital verification feature is enabled for the team's proofs by default.
52
+ * @param {boolean} options.proofs.reauthentication The time window between re-authentication requests for approvals with digital verification.
49
53
  * @param {boolean} options.proofs.defaultGifOutput Determines how gif files are processed.
50
54
  * @param {boolean} options.addressBook.suggestionsIncludeTeamMembers Whether other team members are included in suggestions when selecting a user.
51
55
  * @param {boolean} options.userGroups.enableUserGroups Whether the user groups feature is enabled for the team.
@@ -54,9 +58,10 @@ declare class TeamFeatures extends API {
54
58
  * @param {boolean} options.intelligence.enableIntelligence Whether PageProof intelligence is enabled for the team.
55
59
  * @param {boolean} options.intelligence.enableSmartTags Whether Smart Tags is enabled for the team's proofs.
56
60
  * @param {boolean} options.intelligence.enableSmartCheckCr Whether Smart Check: CR is enabled for the team's proofs.
61
+ * @param {boolean} options.general.enableCelebrations Whether celebrations are enabled for the team.
57
62
  * @returns {Promise}
58
63
  */
59
- update({ emails, comments, proofs, workflows, addressBook, userGroups, webhooks, intelligence, }: {
64
+ update({ emails, comments, proofs, workflows, addressBook, userGroups, webhooks, intelligence, general, }: {
60
65
  emails: {
61
66
  displayComments: boolean;
62
67
  displayTeamName: boolean;
@@ -84,6 +89,10 @@ declare class TeamFeatures extends API {
84
89
  allowedDecisions: Decision[];
85
90
  enableChecklists: boolean;
86
91
  enableProofMagicAccess: boolean;
92
+ licenseDigitalVerification: boolean;
93
+ enableDigitalVerification: boolean;
94
+ defaultDigitalVerification: boolean;
95
+ reauthentication: boolean;
87
96
  defaultGifOutput: boolean;
88
97
  };
89
98
  }): Promise<any>;
@@ -84,6 +84,10 @@ var TeamFeatures = function (_API) {
84
84
  * @param {Array<Decision>} options.proofs.allowedDecisions The array of proof decisions that allowed to the reviewer.
85
85
  * @param {boolean} options.proofs.enableChecklists Whether the checklists feature is enabled.
86
86
  * @param {boolean} options.proofs.enableProofMagicAccess Whether the Magic Access feature is enabled for the team's proofs.
87
+ * @param {boolean} options.proofs.licenseDigitalVerification Whether the digital verification feature is licensed for the team.
88
+ * @param {boolean} options.proofs.enableDigitalVerification Whether the digital verification feature is enabled for the team's proofs.
89
+ * @param {boolean} options.proofs.defaultDigitalVerification Whether the digital verification feature is enabled for the team's proofs by default.
90
+ * @param {boolean} options.proofs.reauthentication The time window between re-authentication requests for approvals with digital verification.
87
91
  * @param {boolean} options.proofs.defaultGifOutput Determines how gif files are processed.
88
92
  * @param {boolean} options.addressBook.suggestionsIncludeTeamMembers Whether other team members are included in suggestions when selecting a user.
89
93
  * @param {boolean} options.userGroups.enableUserGroups Whether the user groups feature is enabled for the team.
@@ -92,6 +96,7 @@ var TeamFeatures = function (_API) {
92
96
  * @param {boolean} options.intelligence.enableIntelligence Whether PageProof intelligence is enabled for the team.
93
97
  * @param {boolean} options.intelligence.enableSmartTags Whether Smart Tags is enabled for the team's proofs.
94
98
  * @param {boolean} options.intelligence.enableSmartCheckCr Whether Smart Check: CR is enabled for the team's proofs.
99
+ * @param {boolean} options.general.enableCelebrations Whether celebrations are enabled for the team.
95
100
  * @returns {Promise}
96
101
  */
97
102
 
@@ -104,7 +109,8 @@ var TeamFeatures = function (_API) {
104
109
  addressBook = _ref.addressBook,
105
110
  userGroups = _ref.userGroups,
106
111
  webhooks = _ref.webhooks,
107
- intelligence = _ref.intelligence;
112
+ intelligence = _ref.intelligence,
113
+ general = _ref.general;
108
114
 
109
115
  var displayComments = emails && emails.displayComments;
110
116
  var displayTeamName = emails && emails.displayTeamName;
@@ -136,6 +142,11 @@ var TeamFeatures = function (_API) {
136
142
  var enableIntelligence = intelligence && intelligence.enableIntelligence;
137
143
  var enableIntelligenceSmartTags = intelligence && intelligence.enableSmartTags;
138
144
  var enableIntelligenceSmartCheckCr = intelligence && intelligence.enableSmartCheckCr;
145
+ var enableCelebrations = general && general.enableCelebrations;
146
+ var licenseDigitalVerification = proofs && proofs.licenseDigitalVerification;
147
+ var enableDigitalVerification = proofs && proofs.enableDigitalVerification;
148
+ var defaultDigitalVerification = proofs && proofs.defaultDigitalVerification;
149
+ var reauthentication = proofs && proofs.reauthentication;
139
150
  return this.client.request('admin.team.features.update', {
140
151
  displayComments: displayComments,
141
152
  displayTeamName: displayTeamName,
@@ -166,7 +177,12 @@ var TeamFeatures = function (_API) {
166
177
  enableIntelligenceSmartCheckCr: enableIntelligenceSmartCheckCr,
167
178
  suggestionsIncludeTeamMembers: suggestionsIncludeTeamMembers,
168
179
  enableUserGroups: enableUserGroups,
169
- usePreviousVersionDueDate: usePreviousVersionDueDate
180
+ usePreviousVersionDueDate: usePreviousVersionDueDate,
181
+ enableCelebrations: enableCelebrations,
182
+ licenseDigitalVerification: licenseDigitalVerification,
183
+ enableDigitalVerification: enableDigitalVerification,
184
+ defaultDigitalVerification: defaultDigitalVerification,
185
+ reauthentication: reauthentication
170
186
  });
171
187
  };
172
188
 
@@ -443,6 +443,12 @@ declare class Proof {
443
443
  * @type {boolean}
444
444
  */
445
445
  usePreviousVersionDueDate: boolean;
446
+ /**
447
+ * The date the proof is scheduled to be started.
448
+ *
449
+ * @type {Date}
450
+ */
451
+ scheduledDate: Date;
446
452
  /**
447
453
  * Whether the proof has digital verification enabled.
448
454
  *
@@ -1 +1 @@
1
- "use strict";exports.__esModule=true;var _transform=require("./transform");var _transform2=_interopRequireDefault(_transform);var _ProofState=require("../enum/ProofState");var _ProofState2=_interopRequireDefault(_ProofState);var _ProofStatus=require("../enum/ProofStatus");var _ProofStatus2=_interopRequireDefault(_ProofStatus);var _ProofType=require("../enum/ProofType");var _ProofType2=_interopRequireDefault(_ProofType);var _FileStatus=require("../enum/FileStatus");var _FileStatus2=_interopRequireDefault(_FileStatus);var _id=require("../util/id");var _getPercentage=require("../util/getPercentage");var _getPercentage2=_interopRequireDefault(_getPercentage);var _User=require("./User");var _User2=_interopRequireDefault(_User);var _DecisionSummary=require("./DecisionSummary");var _DecisionSummary2=_interopRequireDefault(_DecisionSummary);var _ProofIntegrationReference=require("./ProofIntegrationReference");var _ProofIntegrationReference2=_interopRequireDefault(_ProofIntegrationReference);var _ProofChecklist=require("./ProofChecklist");var _ProofChecklist2=_interopRequireDefault(_ProofChecklist);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 isOverdue(){return this.dueDate&&this.dueDate.getTime()<Date.now()}var proofSchema={id:"ProofId",name:"Title",status:"Status",workflowId:"WorkflowId",proofTemplateId:"ProofTemplateId",version:"Version",dueDate:(0,_transform.date)("DueDate"),createdDate:(0,_transform.date)("CreateDate"),approvedDate:(0,_transform.date)("ApprovedDate"),isLocked:"Locked",isArchived:"Closed",isOverdue:isOverdue,uploaderUserId:"UserId",ownerUserIds:"OwnerIds",editorUserId:"EditorId",editorUserIds:"EditorIds",lockerUserId:"ProofLockerId",messageToReviewers:"Description",messageToOwners:"OwnerMessage",messageToEditor:"EditorMessage",fileId:"FileId",fileExtension:"Extension",fileStatus:"FileStatus",fileMessage:"FileStatusMessage",fileSize:"FileSize",pageCount:(0,_transform.number)("Pages"),commentCount:(0,_transform.number)("ParentComments"),canDownload:(0,_transform.truthy)("DownloadOriginal"),type:"Type",processStatus:"ProcessStatus",recipient:"Recipient",recipientEmail:"RecipientEmail",todoCommentCount:(0,_transform.number)("CountTodoComments"),doneCommentCount:(0,_transform.number)("CountDoneComments"),fileCategory:"FileCategory",isAdminOnProof:"IsAdminOnProof",groupId:"GroupId",canReupload:"CanReupload",hasEditors:"HasEditors",groupName:"GroupName",role:"Role",canOthersEditComments:"FeatureEditComments",canAddCommentReplies:"FeatureCanAddCommentReplies",canHaveGeneralComments:"FeatureGeneralComments",canHavePrivateComments:"FeaturePrivateComments",canAddChecklist:"FeatureCanAddChecklist",hasDecisionsEnabled:"FeatureDecisions",hasColorSeparations:"HasColorSeparations",reference:"Reference",integrationReferences:(0,_transform.each)("IntegrationReferences",function(data){return(new _ProofIntegrationReference2.default).fromProofIntegrationReference(data)}),checklist:function checklist(data){return data.Checklist&&(new _ProofChecklist2.default).fromProofChecklist(data.Checklist)},isReferenceEnabled:"FeatureProofReference",source:"Source",owners:(0,_transform.each)("Owners",function(ownerData){return(new _User2.default).fromUser(ownerData)}),decisionSummary:(0,_transform.each)("Decisions",function(decisionsData){return(new _DecisionSummary2.default).fromDecisionSummary(decisionsData)}),tags:(0,_transform.each)("Tags",function(tag){return tag.Value}),teamId:"TeamId",isPublic:"IsPublic",canBePublic:"FeaturePublicProofs",availableWorkflowRoles:"FeatureAvailableWorkflowRoles",usePreviousVersionDueDate:"FeatureUsePreviousVersionDueDate",canSendShareLink:"FeatureSendShareLink",publicProofKeyPair:function publicProofKeyPair(data){return data.PublicProofKeyPair&&{publicKeyPEM:data.PublicProofKeyPair.PublicKey,privateKeyPEM:data.PublicProofKeyPair.PrivateKey}},canSendMessageToOwners:"FeatureMessageToOwners",workflowMetrics:"WorkflowMetrics",commentVisibility:"CommentVisibility",canHaveCommentVisibility:"FeatureCommentVisibility",importUrl:"ImportURL",priority:"Priority",isDigitalVerificationEnabled:"IsDigitalVerificationEnabled"};var Proof=function(){function Proof(){_classCallCheck(this,Proof)}Proof.prototype.isUserAdminOfProofTeam=function isUserAdminOfProofTeam(user){return user.isAdmin&&this.teamId===user.teamId};Proof.prototype.getState=function getState(){var state=_ProofState2.default.ACTIVE;if(this.fileStatus===_FileStatus2.default.UPLOADING){state=_ProofState2.default.UPLOADING}else if(this.hasFileError()){state=_ProofState2.default.FILE_ERROR}else if(this.isProcessing()){state=_ProofState2.default.PROCESSING}else if(this.type===_ProofType2.default.BRIEF){switch(this.status){case _ProofStatus2.default.NEW:state=_ProofState2.default.SETUP_NEEDED;break;case _ProofStatus2.default.PROOFING:state=_ProofState2.default.BRIEFING;break;case _ProofStatus2.default.AWAITING_NEW_VERSION:state=_ProofState2.default.AWAITING_PROOF;break;case _ProofStatus2.default.HAS_NEW_VERSION:state=_ProofState2.default.HAS_NEW_VERSION;break;case _ProofStatus2.default.ARCHIVED:state=_ProofState2.default.ARCHIVED;break}}else if(this.status===_ProofStatus2.default.ARCHIVED){state=_ProofState2.default.ARCHIVED}else if(this.status===_ProofStatus2.default.TODOS_REQUESTED){state=_ProofState2.default.TODOS_REQUESTED}else if(this.status===_ProofStatus2.default.AWAITING_NEW_VERSION){state=_ProofState2.default.AWAITING_NEW_VERSION}else if(this.status===_ProofStatus2.default.HAS_NEW_VERSION){state=_ProofState2.default.HAS_NEW_VERSION}else if(this.status===_ProofStatus2.default.APPROVED){state=_ProofState2.default.APPROVED}else if(!this.hasWorkflow()){state=_ProofState2.default.PROOFERS_NEEDED}else if(!this.hasWorkflowStarted()){state=_ProofState2.default.NOT_STARTED}else if(this.isOverdue){state=_ProofState2.default.OVERDUE}return state};Proof.prototype.getVideoProcessingProgress=function getVideoProcessingProgress(){var percent=0;var message=String(this.fileMessage);if(message){var thumbMatch=/^Thumb-\w+\-([-+]?[0-9]*\.?[0-9]*)/g.exec(message);var videoMatch=/^Video-\w+\-([-+]?[0-9]*\.?[0-9]*)/g.exec(message);if(message.startsWith("Video-Scheduled-")){percent=0}else if(videoMatch){percent=(0,_getPercentage2.default)(parseFloat(videoMatch[1])/100,0,.2)}else if(thumbMatch){percent=(0,_getPercentage2.default)(parseFloat(thumbMatch[1])/100,.8,0)}}return percent};Proof.prototype.hasWorkflowStarted=function hasWorkflowStarted(){return this.hasWorkflow()&&this.status!==_ProofStatus2.default.NEW};Proof.prototype.isProcessing=function isProcessing(){return this.fileStatus===_FileStatus2.default.UPLOADING||this.fileStatus===_FileStatus2.default.QUEUED||this.fileStatus===_FileStatus2.default.RIPPING};Proof.prototype.isAwaitingFile=function isAwaitingFile(){return this.source&&this.fileStatus===_FileStatus2.default.CREATED};Proof.prototype.getProcessingProgress=function getProcessingProgress(){switch(this.fileStatus){case _FileStatus2.default.UPLOADING:return.1;case _FileStatus2.default.QUEUED:return.2;case _FileStatus2.default.RIPPING:if(this.fileCategory==="video"){return(0,_getPercentage2.default)(this.getVideoProcessingProgress(),.2,.1).toFixed(2)}return.6;default:return-1}};Proof.prototype.hasWorkflow=function hasWorkflow(){return(0,_id.isWorkflowId)(this.workflowId)};Proof.prototype.hasFile=function hasFile(){return(0,_id.isFileId)(this.fileId)};Proof.prototype.hasFileError=function hasFileError(){return this.fileStatus===_FileStatus2.default.ERROR||!this.fileStatus||!this.hasFile()};Proof.prototype.hasEditor=function hasEditor(){return(0,_id.isUserId)(this.editorUserId)};Proof.prototype.hasThumbnail=function hasThumbnail(){return this.fileStatus===_FileStatus2.default.OK};Proof.prototype.canUserUploadNewVersion=function canUserUploadNewVersion(userId){return this.getState()===_ProofState2.default.AWAITING_NEW_VERSION&&(this.isEditor(userId)||this.isOwner(userId))||this.getState()===_ProofState2.default.AWAITING_PROOF&&(this.isEditor(userId)||this.isRecipient(userId))};Proof.prototype.isOwner=function isOwner(userId){return this.ownerUserIds.indexOf(userId)!==-1};Proof.prototype.isEditor=function isEditor(userId){return this.editorUserIds.indexOf(userId)!==-1};Proof.prototype.isRecipient=function isRecipient(userId){return this.recipient===userId};Proof.prototype.calculateState=function calculateState(){this.state=this.getState()};Proof.prototype.fromProof=function fromProof(proofData){(0,_transform2.default)(this,proofSchema,proofData);this.calculateState();return this};return Proof}();exports.default=Proof;
1
+ "use strict";exports.__esModule=true;var _transform=require("./transform");var _transform2=_interopRequireDefault(_transform);var _ProofState=require("../enum/ProofState");var _ProofState2=_interopRequireDefault(_ProofState);var _ProofStatus=require("../enum/ProofStatus");var _ProofStatus2=_interopRequireDefault(_ProofStatus);var _ProofType=require("../enum/ProofType");var _ProofType2=_interopRequireDefault(_ProofType);var _FileStatus=require("../enum/FileStatus");var _FileStatus2=_interopRequireDefault(_FileStatus);var _id=require("../util/id");var _getPercentage=require("../util/getPercentage");var _getPercentage2=_interopRequireDefault(_getPercentage);var _User=require("./User");var _User2=_interopRequireDefault(_User);var _DecisionSummary=require("./DecisionSummary");var _DecisionSummary2=_interopRequireDefault(_DecisionSummary);var _ProofIntegrationReference=require("./ProofIntegrationReference");var _ProofIntegrationReference2=_interopRequireDefault(_ProofIntegrationReference);var _ProofChecklist=require("./ProofChecklist");var _ProofChecklist2=_interopRequireDefault(_ProofChecklist);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 isOverdue(){return this.dueDate&&this.dueDate.getTime()<Date.now()}var proofSchema={id:"ProofId",name:"Title",status:"Status",workflowId:"WorkflowId",proofTemplateId:"ProofTemplateId",version:"Version",dueDate:(0,_transform.date)("DueDate"),createdDate:(0,_transform.date)("CreateDate"),approvedDate:(0,_transform.date)("ApprovedDate"),isLocked:"Locked",isArchived:"Closed",isOverdue:isOverdue,uploaderUserId:"UserId",ownerUserIds:"OwnerIds",editorUserId:"EditorId",editorUserIds:"EditorIds",lockerUserId:"ProofLockerId",messageToReviewers:"Description",messageToOwners:"OwnerMessage",messageToEditor:"EditorMessage",fileId:"FileId",fileExtension:"Extension",fileStatus:"FileStatus",fileMessage:"FileStatusMessage",fileSize:"FileSize",pageCount:(0,_transform.number)("Pages"),commentCount:(0,_transform.number)("ParentComments"),canDownload:(0,_transform.truthy)("DownloadOriginal"),type:"Type",processStatus:"ProcessStatus",recipient:"Recipient",recipientEmail:"RecipientEmail",todoCommentCount:(0,_transform.number)("CountTodoComments"),doneCommentCount:(0,_transform.number)("CountDoneComments"),fileCategory:"FileCategory",isAdminOnProof:"IsAdminOnProof",groupId:"GroupId",canReupload:"CanReupload",hasEditors:"HasEditors",groupName:"GroupName",role:"Role",canOthersEditComments:"FeatureEditComments",canAddCommentReplies:"FeatureCanAddCommentReplies",canHaveGeneralComments:"FeatureGeneralComments",canHavePrivateComments:"FeaturePrivateComments",canAddChecklist:"FeatureCanAddChecklist",hasDecisionsEnabled:"FeatureDecisions",hasColorSeparations:"HasColorSeparations",reference:"Reference",integrationReferences:(0,_transform.each)("IntegrationReferences",function(data){return(new _ProofIntegrationReference2.default).fromProofIntegrationReference(data)}),checklist:function checklist(data){return data.Checklist&&(new _ProofChecklist2.default).fromProofChecklist(data.Checklist)},isReferenceEnabled:"FeatureProofReference",source:"Source",owners:(0,_transform.each)("Owners",function(ownerData){return(new _User2.default).fromUser(ownerData)}),decisionSummary:(0,_transform.each)("Decisions",function(decisionsData){return(new _DecisionSummary2.default).fromDecisionSummary(decisionsData)}),tags:(0,_transform.each)("Tags",function(tag){return tag.Value}),teamId:"TeamId",isPublic:"IsPublic",canBePublic:"FeaturePublicProofs",availableWorkflowRoles:"FeatureAvailableWorkflowRoles",usePreviousVersionDueDate:"FeatureUsePreviousVersionDueDate",canSendShareLink:"FeatureSendShareLink",publicProofKeyPair:function publicProofKeyPair(data){return data.PublicProofKeyPair&&{publicKeyPEM:data.PublicProofKeyPair.PublicKey,privateKeyPEM:data.PublicProofKeyPair.PrivateKey}},canSendMessageToOwners:"FeatureMessageToOwners",workflowMetrics:"WorkflowMetrics",commentVisibility:"CommentVisibility",canHaveCommentVisibility:"FeatureCommentVisibility",importUrl:"ImportURL",priority:"Priority",scheduledDate:(0,_transform.date)("ScheduledDate"),isDigitalVerificationEnabled:"IsDigitalVerificationEnabled"};var Proof=function(){function Proof(){_classCallCheck(this,Proof)}Proof.prototype.isUserAdminOfProofTeam=function isUserAdminOfProofTeam(user){return user.isAdmin&&this.teamId===user.teamId};Proof.prototype.getState=function getState(){var state=_ProofState2.default.ACTIVE;if(this.fileStatus===_FileStatus2.default.UPLOADING){state=_ProofState2.default.UPLOADING}else if(this.hasFileError()){state=_ProofState2.default.FILE_ERROR}else if(this.isProcessing()){state=_ProofState2.default.PROCESSING}else if(this.type===_ProofType2.default.BRIEF){switch(this.status){case _ProofStatus2.default.NEW:state=_ProofState2.default.SETUP_NEEDED;break;case _ProofStatus2.default.PROOFING:state=_ProofState2.default.BRIEFING;break;case _ProofStatus2.default.AWAITING_NEW_VERSION:state=_ProofState2.default.AWAITING_PROOF;break;case _ProofStatus2.default.HAS_NEW_VERSION:state=_ProofState2.default.HAS_NEW_VERSION;break;case _ProofStatus2.default.ARCHIVED:state=_ProofState2.default.ARCHIVED;break}}else if(this.status===_ProofStatus2.default.ARCHIVED){state=_ProofState2.default.ARCHIVED}else if(this.status===_ProofStatus2.default.TODOS_REQUESTED){state=_ProofState2.default.TODOS_REQUESTED}else if(this.status===_ProofStatus2.default.AWAITING_NEW_VERSION){state=_ProofState2.default.AWAITING_NEW_VERSION}else if(this.status===_ProofStatus2.default.HAS_NEW_VERSION){state=_ProofState2.default.HAS_NEW_VERSION}else if(this.status===_ProofStatus2.default.APPROVED){state=_ProofState2.default.APPROVED}else if(!this.hasWorkflow()){state=_ProofState2.default.PROOFERS_NEEDED}else if(!this.hasWorkflowStarted()){state=_ProofState2.default.NOT_STARTED}else if(this.isOverdue){state=_ProofState2.default.OVERDUE}return state};Proof.prototype.getVideoProcessingProgress=function getVideoProcessingProgress(){var percent=0;var message=String(this.fileMessage);if(message){var thumbMatch=/^Thumb-\w+\-([-+]?[0-9]*\.?[0-9]*)/g.exec(message);var videoMatch=/^Video-\w+\-([-+]?[0-9]*\.?[0-9]*)/g.exec(message);if(message.startsWith("Video-Scheduled-")){percent=0}else if(videoMatch){percent=(0,_getPercentage2.default)(parseFloat(videoMatch[1])/100,0,.2)}else if(thumbMatch){percent=(0,_getPercentage2.default)(parseFloat(thumbMatch[1])/100,.8,0)}}return percent};Proof.prototype.hasWorkflowStarted=function hasWorkflowStarted(){return this.hasWorkflow()&&this.status!==_ProofStatus2.default.NEW};Proof.prototype.isProcessing=function isProcessing(){return this.fileStatus===_FileStatus2.default.UPLOADING||this.fileStatus===_FileStatus2.default.QUEUED||this.fileStatus===_FileStatus2.default.RIPPING};Proof.prototype.isAwaitingFile=function isAwaitingFile(){return this.source&&this.fileStatus===_FileStatus2.default.CREATED};Proof.prototype.getProcessingProgress=function getProcessingProgress(){switch(this.fileStatus){case _FileStatus2.default.UPLOADING:return.1;case _FileStatus2.default.QUEUED:return.2;case _FileStatus2.default.RIPPING:if(this.fileCategory==="video"){return(0,_getPercentage2.default)(this.getVideoProcessingProgress(),.2,.1).toFixed(2)}return.6;default:return-1}};Proof.prototype.hasWorkflow=function hasWorkflow(){return(0,_id.isWorkflowId)(this.workflowId)};Proof.prototype.hasFile=function hasFile(){return(0,_id.isFileId)(this.fileId)};Proof.prototype.hasFileError=function hasFileError(){return this.fileStatus===_FileStatus2.default.ERROR||!this.fileStatus||!this.hasFile()};Proof.prototype.hasEditor=function hasEditor(){return(0,_id.isUserId)(this.editorUserId)};Proof.prototype.hasThumbnail=function hasThumbnail(){return this.fileStatus===_FileStatus2.default.OK};Proof.prototype.canUserUploadNewVersion=function canUserUploadNewVersion(userId){return this.getState()===_ProofState2.default.AWAITING_NEW_VERSION&&(this.isEditor(userId)||this.isOwner(userId))||this.getState()===_ProofState2.default.AWAITING_PROOF&&(this.isEditor(userId)||this.isRecipient(userId))};Proof.prototype.isOwner=function isOwner(userId){return this.ownerUserIds.indexOf(userId)!==-1};Proof.prototype.isEditor=function isEditor(userId){return this.editorUserIds.indexOf(userId)!==-1};Proof.prototype.isRecipient=function isRecipient(userId){return this.recipient===userId};Proof.prototype.calculateState=function calculateState(){this.state=this.getState()};Proof.prototype.fromProof=function fromProof(proofData){(0,_transform2.default)(this,proofSchema,proofData);this.calculateState();return this};return Proof}();exports.default=Proof;
@@ -46,6 +46,12 @@ declare class TeamFeatures {
46
46
  * @type {TeamIntelligenceFeatures}
47
47
  */
48
48
  intelligence: TeamIntelligenceFeatures;
49
+ /**
50
+ * Team generic features.
51
+ *
52
+ * @type {boolean}
53
+ */
54
+ general: boolean;
49
55
  /** @private */
50
56
  fromTeamFeatures(teamFeaturesData: any): TeamFeatures;
51
57
  }
@@ -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 _TeamWorkflowFeatures=require("./TeamWorkflowFeatures");var _TeamWorkflowFeatures2=_interopRequireDefault(_TeamWorkflowFeatures);var _TeamAddressBookFeatures=require("./TeamAddressBookFeatures");var _TeamAddressBookFeatures2=_interopRequireDefault(_TeamAddressBookFeatures);var _TeamAccountFeatures=require("./TeamAccountFeatures");var _TeamAccountFeatures2=_interopRequireDefault(_TeamAccountFeatures);var _TeamWebhookFeatures=require("./TeamWebhookFeatures");var _TeamWebhookFeatures2=_interopRequireDefault(_TeamWebhookFeatures);var _TeamIntelligenceFeatures=require("./TeamIntelligenceFeatures");var _TeamIntelligenceFeatures2=_interopRequireDefault(_TeamIntelligenceFeatures);var _TeamUserGroupsFeatures=require("./TeamUserGroupsFeatures");var _TeamUserGroupsFeatures2=_interopRequireDefault(_TeamUserGroupsFeatures);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)},workflows:function workflows(data){return(new _TeamWorkflowFeatures2.default).fromTeamWorkflowFeatures(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)},userGroups:function userGroups(data){return(new _TeamUserGroupsFeatures2.default).fromTeamUserGroupsFeatures(data)},intelligence:function intelligence(data){return(new _TeamIntelligenceFeatures2.default).fromTeamIntelligenceFeatures(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 _TeamWorkflowFeatures=require("./TeamWorkflowFeatures");var _TeamWorkflowFeatures2=_interopRequireDefault(_TeamWorkflowFeatures);var _TeamAddressBookFeatures=require("./TeamAddressBookFeatures");var _TeamAddressBookFeatures2=_interopRequireDefault(_TeamAddressBookFeatures);var _TeamAccountFeatures=require("./TeamAccountFeatures");var _TeamAccountFeatures2=_interopRequireDefault(_TeamAccountFeatures);var _TeamWebhookFeatures=require("./TeamWebhookFeatures");var _TeamWebhookFeatures2=_interopRequireDefault(_TeamWebhookFeatures);var _TeamIntelligenceFeatures=require("./TeamIntelligenceFeatures");var _TeamIntelligenceFeatures2=_interopRequireDefault(_TeamIntelligenceFeatures);var _TeamUserGroupsFeatures=require("./TeamUserGroupsFeatures");var _TeamUserGroupsFeatures2=_interopRequireDefault(_TeamUserGroupsFeatures);var _TeamGeneralFeatures=require("./TeamGeneralFeatures");var _TeamGeneralFeatures2=_interopRequireDefault(_TeamGeneralFeatures);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)},workflows:function workflows(data){return(new _TeamWorkflowFeatures2.default).fromTeamWorkflowFeatures(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)},userGroups:function userGroups(data){return(new _TeamUserGroupsFeatures2.default).fromTeamUserGroupsFeatures(data)},intelligence:function intelligence(data){return(new _TeamIntelligenceFeatures2.default).fromTeamIntelligenceFeatures(data)},general:function general(data){return(new _TeamGeneralFeatures2.default).fromTeamGeneralFeatures(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,11 @@
1
+ export default TeamGeneralFeatures;
2
+ declare class TeamGeneralFeatures {
3
+ /**
4
+ * Whether celebrations are enabled for the team.
5
+ *
6
+ * @type {boolean}
7
+ */
8
+ enableCelebrations: boolean;
9
+ /** @private */
10
+ fromTeamGeneralFeatures(teamGeneralFeaturesData: any): TeamGeneralFeatures;
11
+ }
@@ -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 TeamGeneralFeaturesSchema={enableCelebrations:"EnableCelebrations"};var TeamGeneralFeatures=function(){function TeamGeneralFeatures(){_classCallCheck(this,TeamGeneralFeatures)}TeamGeneralFeatures.prototype.fromTeamGeneralFeatures=function fromTeamGeneralFeatures(teamGeneralFeaturesData){(0,_transform2.default)(this,TeamGeneralFeaturesSchema,teamGeneralFeaturesData);return this};return TeamGeneralFeatures}();exports.default=TeamGeneralFeatures;
@@ -63,6 +63,30 @@ declare class TeamProofFeatures {
63
63
  * @type {boolean}
64
64
  */
65
65
  usePreviousVersionDueDate: boolean;
66
+ /**
67
+ * Whether the digital verification feature is licensed for the team.
68
+ *
69
+ * @type {boolean}
70
+ */
71
+ licenseDigitalVerification: boolean;
72
+ /**
73
+ * Whether the digital verification feature is enabled for the team's proofs.
74
+ *
75
+ * @type {boolean}
76
+ */
77
+ enableDigitalVerification: boolean;
78
+ /**
79
+ * Whether the digital verification feature is enabled for the team's proofs by default.
80
+ *
81
+ * @type {boolean}
82
+ */
83
+ defaultDigitalVerification: boolean;
84
+ /**
85
+ * The time window between re-authentication requests for approvals with digital verification.
86
+ *
87
+ * @type {number}
88
+ */
89
+ reauthentication: number;
66
90
  /** @private */
67
91
  fromTeamProofFeatures(teamProofFeaturesData: any): TeamProofFeatures;
68
92
  }
@@ -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 TeamProofFeatureSchema={reference:"ProofReference",referenceRequired:"ProofReferenceRequired",publicProofs:"PublicProofs",usePreviousVersionDueDate:"UsePreviousVersionDueDate",defaultIsPublic:"DefaultProofIsPublic",messageToOwners:"MessageToOwners",allowedDecisions:"AllowedDecisions",enableChecklists:"EnableChecklists",defaultGifOutput:"DefaultGifOutput",enableProofMagicAccess:"EnableProofMagicAccess"};var TeamProofFeatures=function(){function TeamProofFeatures(){_classCallCheck(this,TeamProofFeatures)}TeamProofFeatures.prototype.fromTeamProofFeatures=function fromTeamProofFeatures(teamProofFeaturesData){(0,_transform2.default)(this,TeamProofFeatureSchema,teamProofFeaturesData);return this};return TeamProofFeatures}();exports.default=TeamProofFeatures;
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 TeamProofFeatureSchema={reference:"ProofReference",referenceRequired:"ProofReferenceRequired",publicProofs:"PublicProofs",usePreviousVersionDueDate:"UsePreviousVersionDueDate",defaultIsPublic:"DefaultProofIsPublic",messageToOwners:"MessageToOwners",allowedDecisions:"AllowedDecisions",enableChecklists:"EnableChecklists",defaultGifOutput:"DefaultGifOutput",enableProofMagicAccess:"EnableProofMagicAccess",licenseDigitalVerification:"LicenseDigitalVerification",enableDigitalVerification:"EnableDigitalVerification",defaultDigitalVerification:"DefaultDigitalVerification",reauthentication:"Reauthentication"};var TeamProofFeatures=function(){function TeamProofFeatures(){_classCallCheck(this,TeamProofFeatures)}TeamProofFeatures.prototype.fromTeamProofFeatures=function fromTeamProofFeatures(teamProofFeaturesData){(0,_transform2.default)(this,TeamProofFeatureSchema,teamProofFeaturesData);return this};return TeamProofFeatures}();exports.default=TeamProofFeatures;
@@ -830,7 +830,7 @@
830
830
  "briefs.update": {
831
831
  "method": "POST",
832
832
  "path": "/api/briefs/update",
833
- "body": ["briefId", "title", "messageToRecipient", "dueDate", "tag", "recipient", "editorId", "editorMessage", "isPublic"]
833
+ "body": ["briefId", "title", "messageToRecipient", "dueDate", "tag", "recipient", "editorId", "editorMessage", "isPublic", "scheduledDate"]
834
834
  },
835
835
  "admin.team.users.enabled": {
836
836
  "method": "GET",
@@ -888,7 +888,7 @@
888
888
  "version": 2,
889
889
  "method": "POST",
890
890
  "path": "/api/admin/settings",
891
- "body": ["displayComments", "generalComments", "privateComments", "enableWebhooks", "editComments", "ownerCanDeleteComments", "proofReference", "proofReferenceRequired", "displayTeamName", "emailTitleTextColor", "emailLinkTextColor", "emailButtonBackgroundColor", "emailButtonTextColor", "disableReplyingToCommentsInStatuses", "publicProofs", "defaultProofIsPublic", "messageToOwners", "allowedDecisions", "enableChecklists", "suggestionsIncludeTeamMembers", "enableUserGroups", "enableCommentVisibility", "defaultCommentVisibility", "usePreviousVersionDueDate", "enableViewOnlyReviewers", "enableIntelligence", "enableIntelligenceSmartTags", "enableProofMagicAccess", "enableIntelligenceSmartCheckCr", "defaultGifOutput"]
891
+ "body": ["displayComments", "generalComments", "privateComments", "enableWebhooks", "editComments", "ownerCanDeleteComments", "proofReference", "proofReferenceRequired", "displayTeamName", "emailTitleTextColor", "emailLinkTextColor", "emailButtonBackgroundColor", "emailButtonTextColor", "disableReplyingToCommentsInStatuses", "publicProofs", "defaultProofIsPublic", "messageToOwners", "allowedDecisions", "enableChecklists", "suggestionsIncludeTeamMembers", "enableUserGroups", "enableCommentVisibility", "defaultCommentVisibility", "usePreviousVersionDueDate", "enableViewOnlyReviewers", "enableIntelligence", "enableIntelligenceSmartTags", "enableProofMagicAccess", "enableIntelligenceSmartCheckCr", "defaultGifOutput", "enableCelebrations", "licenseDigitalVerification", "enableDigitalVerification", "defaultDigitalVerification", "reauthentication"]
892
892
  },
893
893
  "admin.team.features.sender-email.set": {
894
894
  "version": 2,