@pageproof/sdk-pr 538.0.1720003995225 → 538.0.1721870695118

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.0-beta.328
4
+
5
+ Released on the 9th of July 2024.
6
+
7
+ - [[PP-7234](https://goto.pageproof.dev/PP-7234)] Added support for View Only reviewers.
8
+
9
+ ## 2.0.0-beta.327
10
+
11
+ Released on the 8th of July 2024.
12
+
13
+ - [[PP-7106](https://goto.pageproof.dev/PP-7106)] Added support for PageProof Intelligence and Smart Tags.
14
+
3
15
  ## 2.0.0-beta.326
4
16
 
5
17
  Released on the 10th of June 2024.
@@ -3,15 +3,21 @@ declare class WorkerCryptoAdapter extends SchedulerCryptoAdapter {
3
3
  /**
4
4
  * @param {object} options
5
5
  * @param {string} [options.url]
6
- * @param {‏() => Worker} [options.create]
6
+ * @param {function} [options.create] Should return a new Worker instance
7
7
  * @param {number} [options.limit]
8
8
  * @param {boolean} [options.optimistic]
9
9
  */
10
10
  constructor(options?: {
11
11
  url?: string;
12
+ create?: Function;
13
+ limit?: number;
14
+ optimistic?: boolean;
12
15
  });
13
16
  options: {
14
17
  url?: string;
18
+ create?: Function;
19
+ limit?: number;
20
+ optimistic?: boolean;
15
21
  };
16
22
  }
17
23
  import SchedulerCryptoAdapter from "./SchedulerCryptoAdapter";
@@ -47,9 +47,12 @@ declare class TeamFeatures extends API {
47
47
  * @param {boolean} options.proofs.enableProofMagicAccess Whether the Magic Access feature is enabled for the team's proofs.
48
48
  * @param {boolean} options.addressBook.suggestionsIncludeTeamMembers Whether other team members are included in suggestions when selecting a user.
49
49
  * @param {boolean} options.webhooks.enabled Whether the webhooks feature is enabled for the team, and the team's active will trigger.
50
+ * @param {boolean} options.workflows.enableViewOnlyReviewers Whether users in a workflow can be given the view only role.
51
+ * @param {boolean} options.intelligence.enableIntelligence Whether PageProof intelligence is enabled for the team.
52
+ * @param {boolean} options.intelligence.enableSmartTags Whether Smart Tags is enabled for the team's proofs.
50
53
  * @returns {Promise}
51
54
  */
52
- update({ emails, comments, proofs, addressBook, webhooks, }: {
55
+ update({ emails, comments, proofs, workflows, addressBook, webhooks, intelligence, }: {
53
56
  emails: {
54
57
  displayComments: boolean;
55
58
  displayTeamName: boolean;
@@ -85,6 +85,9 @@ var TeamFeatures = function (_API) {
85
85
  * @param {boolean} options.proofs.enableProofMagicAccess Whether the Magic Access feature is enabled for the team's proofs.
86
86
  * @param {boolean} options.addressBook.suggestionsIncludeTeamMembers Whether other team members are included in suggestions when selecting a user.
87
87
  * @param {boolean} options.webhooks.enabled Whether the webhooks feature is enabled for the team, and the team's active will trigger.
88
+ * @param {boolean} options.workflows.enableViewOnlyReviewers Whether users in a workflow can be given the view only role.
89
+ * @param {boolean} options.intelligence.enableIntelligence Whether PageProof intelligence is enabled for the team.
90
+ * @param {boolean} options.intelligence.enableSmartTags Whether Smart Tags is enabled for the team's proofs.
88
91
  * @returns {Promise}
89
92
  */
90
93
 
@@ -93,8 +96,10 @@ var TeamFeatures = function (_API) {
93
96
  var emails = _ref.emails,
94
97
  comments = _ref.comments,
95
98
  proofs = _ref.proofs,
99
+ workflows = _ref.workflows,
96
100
  addressBook = _ref.addressBook,
97
- webhooks = _ref.webhooks;
101
+ webhooks = _ref.webhooks,
102
+ intelligence = _ref.intelligence;
98
103
 
99
104
  var displayComments = emails && emails.displayComments;
100
105
  var displayTeamName = emails && emails.displayTeamName;
@@ -102,6 +107,7 @@ var TeamFeatures = function (_API) {
102
107
  var privateComments = comments && comments.privateComments;
103
108
  var enableCommentVisibility = comments && comments.enableCommentVisibility;
104
109
  var defaultCommentVisibility = comments && comments.defaultCommentVisibility;
110
+ var enableViewOnlyReviewers = workflows && workflows.enableViewOnlyReviewers;
105
111
  var emailTitleTextColor = emails && emails.titleTextColor;
106
112
  var emailLinkTextColor = emails && emails.linkTextColor;
107
113
  var emailButtonBackgroundColor = emails && emails.buttonBackgroundColor;
@@ -119,6 +125,8 @@ var TeamFeatures = function (_API) {
119
125
  var enableProofMagicAccess = proofs && proofs.enableProofMagicAccess;
120
126
  var suggestionsIncludeTeamMembers = addressBook && addressBook.suggestionsIncludeTeamMembers;
121
127
  var enableWebhooks = webhooks && webhooks.enabled;
128
+ var enableIntelligence = intelligence && intelligence.enableIntelligence;
129
+ var enableIntelligenceSmartTags = intelligence && intelligence.enableSmartTags;
122
130
  return this.client.request('admin.team.features.update', {
123
131
  displayComments: displayComments,
124
132
  displayTeamName: displayTeamName,
@@ -127,6 +135,7 @@ var TeamFeatures = function (_API) {
127
135
  enableWebhooks: enableWebhooks,
128
136
  enableCommentVisibility: enableCommentVisibility,
129
137
  defaultCommentVisibility: defaultCommentVisibility,
138
+ enableViewOnlyReviewers: enableViewOnlyReviewers,
130
139
  emailTitleTextColor: emailTitleTextColor,
131
140
  emailLinkTextColor: emailLinkTextColor,
132
141
  emailButtonBackgroundColor: emailButtonBackgroundColor,
@@ -141,6 +150,8 @@ var TeamFeatures = function (_API) {
141
150
  allowedDecisions: allowedDecisions,
142
151
  enableChecklists: enableChecklists,
143
152
  enableProofMagicAccess: enableProofMagicAccess,
153
+ enableIntelligence: enableIntelligence,
154
+ enableIntelligenceSmartTags: enableIntelligenceSmartTags,
144
155
  suggestionsIncludeTeamMembers: suggestionsIncludeTeamMembers,
145
156
  usePreviousVersionDueDate: usePreviousVersionDueDate
146
157
  });
@@ -1,5 +1,6 @@
1
1
  export default WorkflowUserRole;
2
2
  declare namespace WorkflowUserRole {
3
+ export const VIEW_ONLY: string;
3
4
  export const REVIEWER: string;
4
5
  export const MANDATORY: string;
5
6
  export const GATEKEEPER: string;
@@ -1 +1 @@
1
- "use strict";exports.__esModule=true;var WorkflowUserRole={REVIEWER:"reviewer",MANDATORY:"mandatory",GATEKEEPER:"gatekeeper",APPROVER:"approver"};exports.default=WorkflowUserRole;
1
+ "use strict";exports.__esModule=true;var WorkflowUserRole={VIEW_ONLY:"view-only",REVIEWER:"reviewer",MANDATORY:"mandatory",GATEKEEPER:"gatekeeper",APPROVER:"approver"};exports.default=WorkflowUserRole;
@@ -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",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"};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"};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;
@@ -21,6 +21,12 @@ declare class TeamFeatures {
21
21
  * @type {TeamProofFeatures}
22
22
  */
23
23
  proofs: TeamProofFeatures;
24
+ /**
25
+ * Workflow features.
26
+ *
27
+ * @type {TeamWorkflowFeatures}
28
+ */
29
+ workflows: TeamWorkflowFeatures;
24
30
  /**
25
31
  * Account features.
26
32
  *
@@ -34,11 +40,19 @@ declare class TeamFeatures {
34
40
  * @type {TeamAddressBookFeatures}
35
41
  */
36
42
  addressBook: TeamAddressBookFeatures;
43
+ /**
44
+ * PageProof Intelligence features.
45
+ *
46
+ * @type {TeamIntelligenceFeatures}
47
+ */
48
+ intelligence: TeamIntelligenceFeatures;
37
49
  /** @private */
38
50
  fromTeamFeatures(teamFeaturesData: any): TeamFeatures;
39
51
  }
40
52
  import TeamEmailFeatures from "./TeamEmailFeatures";
41
53
  import TeamCommentFeatures from "./TeamCommentFeatures";
42
54
  import TeamProofFeatures from "./TeamProofFeatures";
55
+ import TeamWorkflowFeatures from "./TeamWorkflowFeatures";
43
56
  import TeamAccountFeatures from "./TeamAccountFeatures";
44
57
  import TeamAddressBookFeatures from "./TeamAddressBookFeatures";
58
+ import TeamIntelligenceFeatures from "./TeamIntelligenceFeatures";
@@ -1 +1 @@
1
- "use strict";exports.__esModule=true;var _transform=require("./transform");var _transform2=_interopRequireDefault(_transform);var _TeamEmailFeatures=require("./TeamEmailFeatures");var _TeamEmailFeatures2=_interopRequireDefault(_TeamEmailFeatures);var _TeamCommentFeatures=require("./TeamCommentFeatures");var _TeamCommentFeatures2=_interopRequireDefault(_TeamCommentFeatures);var _TeamProofFeatures=require("./TeamProofFeatures");var _TeamProofFeatures2=_interopRequireDefault(_TeamProofFeatures);var _TeamAddressBookFeatures=require("./TeamAddressBookFeatures");var _TeamAddressBookFeatures2=_interopRequireDefault(_TeamAddressBookFeatures);var _TeamAccountFeatures=require("./TeamAccountFeatures");var _TeamAccountFeatures2=_interopRequireDefault(_TeamAccountFeatures);var _TeamWebhookFeatures=require("./TeamWebhookFeatures");var _TeamWebhookFeatures2=_interopRequireDefault(_TeamWebhookFeatures);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var teamFeaturesSchema={emails:function emails(data){return(new _TeamEmailFeatures2.default).fromTeamEmailFeatures(data)},comments:function comments(data){return(new _TeamCommentFeatures2.default).fromTeamCommentFeatures(data)},proofs:function proofs(data){return(new _TeamProofFeatures2.default).fromTeamProofFeatures(data)},addressBook:function addressBook(data){return(new _TeamAddressBookFeatures2.default).fromTeamAddressBookFeatures(data)},accounts:function accounts(data){return(new _TeamAccountFeatures2.default).fromTeamAccountFeatures(data)},webhooks:function webhooks(data){return(new _TeamWebhookFeatures2.default).fromTeamWebhookFeatures(data)}};var TeamFeatures=function(){function TeamFeatures(){_classCallCheck(this,TeamFeatures)}TeamFeatures.prototype.fromTeamFeatures=function fromTeamFeatures(teamFeaturesData){(0,_transform2.default)(this,teamFeaturesSchema,teamFeaturesData);return this};return TeamFeatures}();exports.default=TeamFeatures;
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);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)},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;
@@ -0,0 +1,21 @@
1
+ export default TeamIntelligenceFeatures;
2
+ declare class TeamIntelligenceFeatures {
3
+ /**
4
+ * Whether PageProof intelligence is enabled for the team.
5
+ * This setting overrides the individual feature setting.
6
+ * Please review our AI commitment to understand how data is used
7
+ * for PageProof Intelligence™ before enabling these features.
8
+ * Our AI commitment can be found at https://go.pageproof.com/ai-commitment
9
+ *
10
+ * @type {boolean}
11
+ */
12
+ enableIntelligence: boolean;
13
+ /**
14
+ * Whether Smart Tags is enabled for the team's proofs.
15
+ *
16
+ * @type {boolean}
17
+ */
18
+ enableSmartTags: boolean;
19
+ /** @private */
20
+ fromTeamIntelligenceFeatures(teamIntelligenceFeaturesData: any): TeamIntelligenceFeatures;
21
+ }
@@ -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 TeamIntelligenceFeatureSchema={enableIntelligence:"EnableIntelligence",enableSmartTags:"EnableIntelligenceSmartTags"};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;
@@ -0,0 +1,17 @@
1
+ export default TeamWorkflowFeatures;
2
+ declare class TeamWorkflowFeatures {
3
+ /**
4
+ * Whether team admins can configure the View Only Reviewers feature for their team's workflows.
5
+ *
6
+ * @type {boolean}
7
+ */
8
+ configureViewOnlyReviewers: boolean;
9
+ /**
10
+ * Whether users in a workflow can be given the view only role.
11
+ *
12
+ * @type {boolean}
13
+ */
14
+ enableViewOnlyReviewers: boolean;
15
+ /** @private */
16
+ fromTeamWorkflowFeatures(teamWorkflowFeaturesData: any): TeamWorkflowFeatures;
17
+ }
@@ -0,0 +1 @@
1
+ "use strict";exports.__esModule=true;var _transform=require("./transform");var _transform2=_interopRequireDefault(_transform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var TeamWorkflowFeatureSchema={configureViewOnlyReviewers:"LicenseViewOnlyReviewers",enableViewOnlyReviewers:"EnableViewOnlyReviewers"};var TeamWorkflowFeatures=function(){function TeamWorkflowFeatures(){_classCallCheck(this,TeamWorkflowFeatures)}TeamWorkflowFeatures.prototype.fromTeamWorkflowFeatures=function fromTeamWorkflowFeatures(teamWorkflowFeaturesData){(0,_transform2.default)(this,TeamWorkflowFeatureSchema,teamWorkflowFeaturesData);return this};return TeamWorkflowFeatures}();exports.default=TeamWorkflowFeatures;
@@ -53,6 +53,12 @@ declare class Workflow {
53
53
  * @type {boolean}
54
54
  */
55
55
  isFavorite: boolean;
56
+ /**
57
+ * Roles that can be assigned to users in the workflow.
58
+ *
59
+ * @type {Array<WorkflowUserRole>}
60
+ */
61
+ availableRoles: Array<WorkflowUserRole>;
56
62
  /**
57
63
  * Returns a {@link WorkflowStep} by it's position within the workflow.
58
64
  *
@@ -1 +1 @@
1
- "use strict";exports.__esModule=true;var _transform=require("./transform");var _transform2=_interopRequireDefault(_transform);var _WorkflowStep=require("./WorkflowStep");var _WorkflowStep2=_interopRequireDefault(_WorkflowStep);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 workflowSchema={id:"WorkflowId",name:"Title",isOwnedByTeam:"OwnedByTeam",teamId:"TeamId",ownerId:"UserId",startFrom:"StartFrom",isFavorite:"IsFavorite",steps:(0,_transform.each)("WorkflowSteps",function(stepData){return(new _WorkflowStep2.default).fromWorkflowStep(stepData)})};var Workflow=function(){function Workflow(){_classCallCheck(this,Workflow)}Workflow.prototype.getStepByPosition=function getStepByPosition(position){var length=this.steps.length;for(var i=0;i<length;i+=1){var step=this.steps[i];if(step.position===position){return step}}return null};Workflow.prototype.getOrderedSteps=function getOrderedSteps(){return this.steps.sort(function(a,b){if(a.position<b.position)return-1;if(a.position>b.position)return 1;return 0})};Workflow.prototype.getApproverStep=function getApproverStep(){return this.getStepByPosition(1e3)};Workflow.prototype.fromWorkflow=function fromWorkflow(workflowData){(0,_transform2.default)(this,workflowSchema,workflowData);return this};return Workflow}();exports.default=Workflow;
1
+ "use strict";exports.__esModule=true;var _transform=require("./transform");var _transform2=_interopRequireDefault(_transform);var _WorkflowStep=require("./WorkflowStep");var _WorkflowStep2=_interopRequireDefault(_WorkflowStep);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 workflowSchema={id:"WorkflowId",name:"Title",isOwnedByTeam:"OwnedByTeam",teamId:"TeamId",ownerId:"UserId",startFrom:"StartFrom",isFavorite:"IsFavorite",availableRoles:"AvailableRoles",steps:(0,_transform.each)("WorkflowSteps",function(stepData){return(new _WorkflowStep2.default).fromWorkflowStep(stepData)})};var Workflow=function(){function Workflow(){_classCallCheck(this,Workflow)}Workflow.prototype.getStepByPosition=function getStepByPosition(position){var length=this.steps.length;for(var i=0;i<length;i+=1){var step=this.steps[i];if(step.position===position){return step}}return null};Workflow.prototype.getOrderedSteps=function getOrderedSteps(){return this.steps.sort(function(a,b){if(a.position<b.position)return-1;if(a.position>b.position)return 1;return 0})};Workflow.prototype.getApproverStep=function getApproverStep(){return this.getStepByPosition(1e3)};Workflow.prototype.fromWorkflow=function fromWorkflow(workflowData){(0,_transform2.default)(this,workflowSchema,workflowData);return this};return Workflow}();exports.default=Workflow;
@@ -878,7 +878,7 @@
878
878
  "version": 2,
879
879
  "method": "POST",
880
880
  "path": "/api/admin/settings",
881
- "body": ["displayComments", "generalComments", "privateComments", "enableWebhooks", "enableProofMagicAccess", "editComments", "ownerCanDeleteComments", "proofReference", "displayTeamName", "emailTitleTextColor", "emailLinkTextColor", "emailButtonBackgroundColor", "emailButtonTextColor", "disableReplyingToCommentsInStatuses", "publicProofs", "defaultProofIsPublic", "messageToOwners", "allowedDecisions", "enableChecklists", "suggestionsIncludeTeamMembers", "enableCommentVisibility", "defaultCommentVisibility", "usePreviousVersionDueDate"]
881
+ "body": ["displayComments", "generalComments", "privateComments", "enableWebhooks", "editComments", "ownerCanDeleteComments", "proofReference", "displayTeamName", "emailTitleTextColor", "emailLinkTextColor", "emailButtonBackgroundColor", "emailButtonTextColor", "disableReplyingToCommentsInStatuses", "publicProofs", "defaultProofIsPublic", "messageToOwners", "allowedDecisions", "enableChecklists", "suggestionsIncludeTeamMembers", "enableCommentVisibility", "defaultCommentVisibility", "usePreviousVersionDueDate", "enableViewOnlyReviewers", "enableIntelligence", "enableIntelligenceSmartTags", "enableProofMagicAccess"]
882
882
  },
883
883
  "admin.team.features.sender-email.set": {
884
884
  "version": 2,