@pageproof/sdk-pr 718.0.1787790646783 → 719.0.1787798246526

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.
@@ -9,23 +9,10 @@ declare class ProofsAudit extends API {
9
9
  /**
10
10
  * Generates a summary/timeline of the important proof events.
11
11
  *
12
- * Every proof version is a separate proof ID with its own audit, so passing the
13
- * ID of an older version returns that version's audit. Pass `allVersions` to get
14
- * a block per version across the whole version chain instead.
15
- *
16
- * The result always holds a `summaries` array, with one block per version, so
17
- * callers never have to branch on whether `allVersions` was requested. Versions
18
- * the user has no access to are listed in `versions` with `canAccess: false` and
19
- * are left out of `summaries`.
20
- *
21
12
  * @param {string} proofId The proof ID
22
- * @param {Object} [options]
23
- * @param {boolean} [options.allVersions=false] Whether to include every accessible version of the proof
24
13
  * @returns {Promise<ProofAuditSummary>}
25
14
  */
26
- summary(proofId: string, { allVersions }?: {
27
- allVersions: boolean;
28
- }): Promise<ProofAuditSummary>;
15
+ summary(proofId: string): Promise<any>;
29
16
  /**
30
17
  * Generates a chronological audit of every comment, reply, label and status
31
18
  * change on the proof.
@@ -1 +1 @@
1
- "use strict";exports.__esModule=true;var _API2=require("./API");var _API3=_interopRequireDefault(_API2);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 ProofsAudit=function(_API){_inherits(ProofsAudit,_API);function ProofsAudit(){_classCallCheck(this,ProofsAudit);return _possibleConstructorReturn(this,_API.apply(this,arguments))}ProofsAudit.prototype.summary=function summary(proofId){var _ref=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},allVersions=_ref.allVersions;return this.client.request("proofs.audit.summary",{proofId:proofId,allVersions:allVersions}).then(function(response){return response.data})};ProofsAudit.prototype.comments=function comments(proofId){return this.client.request("proofs.audit.comments",{proofId:proofId}).then(function(response){return response.data})};return ProofsAudit}(_API3.default);exports.default=ProofsAudit;
1
+ "use strict";exports.__esModule=true;var _API2=require("./API");var _API3=_interopRequireDefault(_API2);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 ProofsAudit=function(_API){_inherits(ProofsAudit,_API);function ProofsAudit(){_classCallCheck(this,ProofsAudit);return _possibleConstructorReturn(this,_API.apply(this,arguments))}ProofsAudit.prototype.summary=function summary(proofId){return this.client.request("proofs.audit.summary",{proofId:proofId}).then(function(response){return response.data.summary})};ProofsAudit.prototype.comments=function comments(proofId){return this.client.request("proofs.audit.comments",{proofId:proofId}).then(function(response){return response.data})};return ProofsAudit}(_API3.default);exports.default=ProofsAudit;
@@ -59,6 +59,7 @@ declare class TeamFeatures extends API {
59
59
  * @param {boolean} options.intelligence.licenseIntelligenceInsightsInProofing Whether PI Insights in Proofing is licensed for the team.
60
60
  * @param {boolean} options.intelligence.enableIntelligenceInsightsInProofing Whether PI Insights in Proofing is enabled for the team.
61
61
  * @param {boolean} options.intelligence.defaultIntelligenceInsightsInProofing The default setting for PI Insights in Proofing for the team.
62
+ * @param {boolean} options.intelligence.enableIntelligenceInsightsTeamOnlyVisibility Whether PI Insights in Proofing is only visible to the proof owner's team.
62
63
  * @param {boolean} options.intelligence.enableIntelligenceInsightsCommentsInProofing Whether PI Comments in Proofing is enabled for the team.
63
64
  * @param {boolean} options.intelligence.defaultIntelligenceInsightsCommentsInProofing The default setting for PI Comments in Proofing for the team.
64
65
  * @param {boolean} options.intelligence.licenseIntelligenceInsightsOnDashboard Whether PI Insights on Dashboard is licensed for the team.
@@ -97,6 +97,7 @@ var TeamFeatures = function (_API) {
97
97
  * @param {boolean} options.intelligence.licenseIntelligenceInsightsInProofing Whether PI Insights in Proofing is licensed for the team.
98
98
  * @param {boolean} options.intelligence.enableIntelligenceInsightsInProofing Whether PI Insights in Proofing is enabled for the team.
99
99
  * @param {boolean} options.intelligence.defaultIntelligenceInsightsInProofing The default setting for PI Insights in Proofing for the team.
100
+ * @param {boolean} options.intelligence.enableIntelligenceInsightsTeamOnlyVisibility Whether PI Insights in Proofing is only visible to the proof owner's team.
100
101
  * @param {boolean} options.intelligence.enableIntelligenceInsightsCommentsInProofing Whether PI Comments in Proofing is enabled for the team.
101
102
  * @param {boolean} options.intelligence.defaultIntelligenceInsightsCommentsInProofing The default setting for PI Comments in Proofing for the team.
102
103
  * @param {boolean} options.intelligence.licenseIntelligenceInsightsOnDashboard Whether PI Insights on Dashboard is licensed for the team.
@@ -154,6 +155,7 @@ var TeamFeatures = function (_API) {
154
155
  var licenseIntelligenceInsightsInProofing = intelligence && intelligence.licenseIntelligenceInsightsInProofing;
155
156
  var enableIntelligenceInsightsInProofing = intelligence && intelligence.enableIntelligenceInsightsInProofing;
156
157
  var defaultIntelligenceInsightsInProofing = intelligence && intelligence.defaultIntelligenceInsightsInProofing;
158
+ var enableIntelligenceInsightsTeamOnlyVisibility = intelligence && intelligence.enableIntelligenceInsightsTeamOnlyVisibility;
157
159
  var enableIntelligenceInsightsCommentsInProofing = intelligence && intelligence.enableIntelligenceInsightsCommentsInProofing;
158
160
  var defaultIntelligenceInsightsCommentsInProofing = intelligence && intelligence.defaultIntelligenceInsightsCommentsInProofing;
159
161
  var licenseIntelligenceInsightsOnDashboard = intelligence && intelligence.licenseIntelligenceInsightsOnDashboard;
@@ -198,6 +200,7 @@ var TeamFeatures = function (_API) {
198
200
  licenseIntelligenceInsightsInProofing: licenseIntelligenceInsightsInProofing,
199
201
  enableIntelligenceInsightsInProofing: enableIntelligenceInsightsInProofing,
200
202
  defaultIntelligenceInsightsInProofing: defaultIntelligenceInsightsInProofing,
203
+ enableIntelligenceInsightsTeamOnlyVisibility: enableIntelligenceInsightsTeamOnlyVisibility,
201
204
  enableIntelligenceInsightsCommentsInProofing: enableIntelligenceInsightsCommentsInProofing,
202
205
  defaultIntelligenceInsightsCommentsInProofing: defaultIntelligenceInsightsCommentsInProofing,
203
206
  licenseIntelligenceInsightsOnDashboard: licenseIntelligenceInsightsOnDashboard,
@@ -488,6 +488,12 @@ declare class Proof {
488
488
  * @type {boolean}
489
489
  */
490
490
  isProofInsightsCommentsEnabled: boolean;
491
+ /**
492
+ * Whether proof insights are only visible to members of this proof's owning team.
493
+ *
494
+ * @type {boolean}
495
+ */
496
+ isIntelligenceInsightsTeamOnlyVisibilityEnabled: boolean;
491
497
  /**
492
498
  * Whether a user is a team admin of this proof.
493
499
  *
@@ -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 _StatusMessage=require("../enum/StatusMessage");var _StatusMessage2=_interopRequireDefault(_StatusMessage);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"),statusMessage:"StatusMessage",isDigitalVerificationEnabled:"IsDigitalVerificationEnabled",isProofInsightsEnabled:"FeatureProofInsights",isProofInsightsCommentsEnabled:"FeatureProofInsightsComments"};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||!this.fileStatus&&this.statusMessage===_StatusMessage2.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:case _ProofStatus2.default.FINAL_APPROVING:state=_ProofState2.default.AWAITING_PROOF;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.APPROVED:state=_ProofState2.default.APPROVED;break;case _ProofStatus2.default.ARCHIVED:state=_ProofState2.default.ARCHIVED;break;default:state=_ProofState2.default.BRIEFING;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||this.dueDate&&this.dueDate.getTime()<Date.now()){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(){if(this.fileStatus===_FileStatus2.default.UPLOADING||this.fileStatus===_FileStatus2.default.QUEUED||this.fileStatus===_FileStatus2.default.RIPPING){return true}if(!this.fileStatus){return this.statusMessage===_StatusMessage2.default.UPLOADING||this.statusMessage===_StatusMessage2.default.PROCESSING}return false};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(){if(this.fileStatus===_FileStatus2.default.ERROR){return true}if(!this.fileStatus){if(this.statusMessage===_StatusMessage2.default.FILE_ERROR){return true}if(!this.hasFile()){return true}return false}return false};Proof.prototype.hasEditor=function hasEditor(){return(0,_id.isUserId)(this.editorUserId)};Proof.prototype.hasThumbnail=function hasThumbnail(){if(this.fileStatus===_FileStatus2.default.OK){return true}if(!this.fileStatus&&this.hasFile()){if(this.statusMessage===_StatusMessage2.default.FILE_ERROR||this.statusMessage===_StatusMessage2.default.UPLOADING||this.statusMessage===_StatusMessage2.default.PROCESSING||this.statusMessage===_StatusMessage2.default.AWAITING_FILE||this.statusMessage===_StatusMessage2.default.AWAITING_EMAIL){return false}return true}return false};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};Proof.getStateFromRawData=function getStateFromRawData(proofData){var proof=new Proof;proof.fromProof(proofData);return proof.getState()};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 _StatusMessage=require("../enum/StatusMessage");var _StatusMessage2=_interopRequireDefault(_StatusMessage);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"),statusMessage:"StatusMessage",isDigitalVerificationEnabled:"IsDigitalVerificationEnabled",isProofInsightsEnabled:"FeatureProofInsights",isProofInsightsCommentsEnabled:"FeatureProofInsightsComments",isIntelligenceInsightsTeamOnlyVisibilityEnabled:"FeatureIntelligenceInsightsTeamOnlyVisibility"};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||!this.fileStatus&&this.statusMessage===_StatusMessage2.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:case _ProofStatus2.default.FINAL_APPROVING:state=_ProofState2.default.AWAITING_PROOF;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.APPROVED:state=_ProofState2.default.APPROVED;break;case _ProofStatus2.default.ARCHIVED:state=_ProofState2.default.ARCHIVED;break;default:state=_ProofState2.default.BRIEFING;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||this.dueDate&&this.dueDate.getTime()<Date.now()){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(){if(this.fileStatus===_FileStatus2.default.UPLOADING||this.fileStatus===_FileStatus2.default.QUEUED||this.fileStatus===_FileStatus2.default.RIPPING){return true}if(!this.fileStatus){return this.statusMessage===_StatusMessage2.default.UPLOADING||this.statusMessage===_StatusMessage2.default.PROCESSING}return false};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(){if(this.fileStatus===_FileStatus2.default.ERROR){return true}if(!this.fileStatus){if(this.statusMessage===_StatusMessage2.default.FILE_ERROR){return true}if(!this.hasFile()){return true}return false}return false};Proof.prototype.hasEditor=function hasEditor(){return(0,_id.isUserId)(this.editorUserId)};Proof.prototype.hasThumbnail=function hasThumbnail(){if(this.fileStatus===_FileStatus2.default.OK){return true}if(!this.fileStatus&&this.hasFile()){if(this.statusMessage===_StatusMessage2.default.FILE_ERROR||this.statusMessage===_StatusMessage2.default.UPLOADING||this.statusMessage===_StatusMessage2.default.PROCESSING||this.statusMessage===_StatusMessage2.default.AWAITING_FILE||this.statusMessage===_StatusMessage2.default.AWAITING_EMAIL){return false}return true}return false};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};Proof.getStateFromRawData=function getStateFromRawData(proofData){var proof=new Proof;proof.fromProof(proofData);return proof.getState()};return Proof}();exports.default=Proof;
@@ -40,6 +40,12 @@ declare class TeamIntelligenceFeatures {
40
40
  * @type {boolean}
41
41
  */
42
42
  defaultIntelligenceInsightsInProofing: boolean;
43
+ /**
44
+ * Whether PI Insights in Proofing is only visible to members of the proof's owning team.
45
+ *
46
+ * @type {boolean}
47
+ */
48
+ enableIntelligenceInsightsTeamOnlyVisibility: boolean;
43
49
  /**
44
50
  * Whether PI Comments in Proofing is enabled for the team.
45
51
  *
@@ -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 TeamIntelligenceFeatureSchema={enableIntelligence:"EnableIntelligence",enableSmartTags:"EnableIntelligenceSmartTags",enableSmartCheckCr:"EnableIntelligenceSmartCheckCr",licenseIntelligenceInsightsInProofing:"LicenseIntelligenceInsightsInProofing",enableIntelligenceInsightsInProofing:"EnableIntelligenceInsightsInProofing",defaultIntelligenceInsightsInProofing:"DefaultIntelligenceInsightsInProofing",enableIntelligenceInsightsCommentsInProofing:"EnableIntelligenceInsightsCommentsInProofing",defaultIntelligenceInsightsCommentsInProofing:"DefaultIntelligenceInsightsCommentsInProofing",licenseIntelligenceInsightsOnDashboard:"LicenseIntelligenceInsightsOnDashboard",enableIntelligenceInsightsOnDashboard:"EnableIntelligenceInsightsOnDashboard",licenseIntelligenceInsightsInReports:"LicenseIntelligenceInsightsInReports",enableIntelligenceInsightsInReports:"EnableIntelligenceInsightsInReports"};var TeamIntelligenceFeatures=function(){function TeamIntelligenceFeatures(){_classCallCheck(this,TeamIntelligenceFeatures)}TeamIntelligenceFeatures.prototype.fromTeamIntelligenceFeatures=function fromTeamIntelligenceFeatures(teamIntelligenceFeaturesData){(0,_transform2.default)(this,TeamIntelligenceFeatureSchema,teamIntelligenceFeaturesData);return this};return TeamIntelligenceFeatures}();exports.default=TeamIntelligenceFeatures;
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 TeamIntelligenceFeatureSchema={enableIntelligence:"EnableIntelligence",enableSmartTags:"EnableIntelligenceSmartTags",enableSmartCheckCr:"EnableIntelligenceSmartCheckCr",licenseIntelligenceInsightsInProofing:"LicenseIntelligenceInsightsInProofing",enableIntelligenceInsightsInProofing:"EnableIntelligenceInsightsInProofing",defaultIntelligenceInsightsInProofing:"DefaultIntelligenceInsightsInProofing",enableIntelligenceInsightsTeamOnlyVisibility:"EnableIntelligenceInsightsTeamOnlyVisibility",enableIntelligenceInsightsCommentsInProofing:"EnableIntelligenceInsightsCommentsInProofing",defaultIntelligenceInsightsCommentsInProofing:"DefaultIntelligenceInsightsCommentsInProofing",licenseIntelligenceInsightsOnDashboard:"LicenseIntelligenceInsightsOnDashboard",enableIntelligenceInsightsOnDashboard:"EnableIntelligenceInsightsOnDashboard",licenseIntelligenceInsightsInReports:"LicenseIntelligenceInsightsInReports",enableIntelligenceInsightsInReports:"EnableIntelligenceInsightsInReports"};var TeamIntelligenceFeatures=function(){function TeamIntelligenceFeatures(){_classCallCheck(this,TeamIntelligenceFeatures)}TeamIntelligenceFeatures.prototype.fromTeamIntelligenceFeatures=function fromTeamIntelligenceFeatures(teamIntelligenceFeaturesData){(0,_transform2.default)(this,TeamIntelligenceFeatureSchema,teamIntelligenceFeaturesData);return this};return TeamIntelligenceFeatures}();exports.default=TeamIntelligenceFeatures;
@@ -921,7 +921,7 @@
921
921
  "version": 2,
922
922
  "method": "POST",
923
923
  "path": "/api/admin/settings",
924
- "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", "licenseIntelligenceInsightsInProofing", "enableIntelligenceInsightsInProofing", "defaultIntelligenceInsightsInProofing", "enableIntelligenceInsightsCommentsInProofing", "defaultIntelligenceInsightsCommentsInProofing", "licenseIntelligenceInsightsOnDashboard", "defaultIntelligenceInsightsCommentsOnDashboard", "enableIntelligenceInsightsOnDashboard", "licenseIntelligenceInsightsInReports", "enableIntelligenceInsightsInReports", "enableIntelligenceSmartTags", "enableProofMagicAccess", "enableIntelligenceSmartCheckCr", "defaultGifOutput", "enableCelebrations", "licenseDigitalVerification", "enableDigitalVerification", "defaultDigitalVerification", "reauthentication", "enableProofSoftDeletion", "enableLabels"]
924
+ "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", "licenseIntelligenceInsightsInProofing", "enableIntelligenceInsightsInProofing", "defaultIntelligenceInsightsInProofing", "enableIntelligenceInsightsTeamOnlyVisibility", "enableIntelligenceInsightsCommentsInProofing", "defaultIntelligenceInsightsCommentsInProofing", "licenseIntelligenceInsightsOnDashboard", "defaultIntelligenceInsightsCommentsOnDashboard", "enableIntelligenceInsightsOnDashboard", "licenseIntelligenceInsightsInReports", "enableIntelligenceInsightsInReports", "enableIntelligenceSmartTags", "enableProofMagicAccess", "enableIntelligenceSmartCheckCr", "defaultGifOutput", "enableCelebrations", "licenseDigitalVerification", "enableDigitalVerification", "defaultDigitalVerification", "reauthentication", "enableProofSoftDeletion", "enableLabels"]
925
925
  },
926
926
  "admin.team.features.sender-email.set": {
927
927
  "version": 2,
@@ -1123,8 +1123,7 @@
1123
1123
  "version": 2,
1124
1124
  "method": "GET",
1125
1125
  "path": "/api/proofs/audit/summary",
1126
- "chain": ["proofId"],
1127
- "query": ["allVersions"]
1126
+ "chain": ["proofId"]
1128
1127
  },
1129
1128
  "proofs.audit.comments": {
1130
1129
  "version": 2,