@pageproof/sdk-pr 540.0.1720124260863 → 541.0.1720393345323

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,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.0-beta.327
4
+
5
+ Released on the 8th of July 2024.
6
+
7
+ - [[PP-7106](https://goto.pageproof.dev/PP-7106)] Added support for PageProof Intelligence and Smart Tags.
8
+
3
9
  ## 2.0.0-beta.326
4
10
 
5
11
  Released on the 10th of June 2024.
@@ -3,21 +3,15 @@ declare class WorkerCryptoAdapter extends SchedulerCryptoAdapter {
3
3
  /**
4
4
  * @param {object} options
5
5
  * @param {string} [options.url]
6
- * @param {function} [options.create] Should return a new Worker instance
6
+ * @param {‏() => Worker} [options.create]
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;
15
12
  });
16
13
  options: {
17
14
  url?: string;
18
- create?: Function;
19
- limit?: number;
20
- optimistic?: boolean;
21
15
  };
22
16
  }
23
17
  import SchedulerCryptoAdapter from "./SchedulerCryptoAdapter";
@@ -46,10 +46,11 @@ declare class TeamFeatures extends API {
46
46
  * @param {boolean} options.proofs.enableChecklists Whether the checklists feature is enabled.
47
47
  * @param {boolean} options.addressBook.suggestionsIncludeTeamMembers Whether other team members are included in suggestions when selecting a user.
48
48
  * @param {boolean} options.webhooks.enabled Whether the webhooks feature is enabled for the team, and the team's active will trigger.
49
- * @param {boolean} options.workflows.enableViewOnlyReviewers Whether users in a workflow can be given the view only role.
49
+ * @param {boolean} options.intelligence.enableIntelligence Whether PageProof intelligence is enabled for the team.
50
+ * @param {boolean} options.intelligence.enableSmartTags Whether Smart Tags is enabled for the team's proofs.
50
51
  * @returns {Promise}
51
52
  */
52
- update({ emails, comments, proofs, workflows, addressBook, webhooks, }: {
53
+ update({ emails, comments, proofs, addressBook, webhooks, intelligence, }: {
53
54
  emails: {
54
55
  displayComments: boolean;
55
56
  displayTeamName: boolean;
@@ -84,7 +84,8 @@ var TeamFeatures = function (_API) {
84
84
  * @param {boolean} options.proofs.enableChecklists Whether the checklists feature is enabled.
85
85
  * @param {boolean} options.addressBook.suggestionsIncludeTeamMembers Whether other team members are included in suggestions when selecting a user.
86
86
  * @param {boolean} options.webhooks.enabled Whether the webhooks feature is enabled for the team, and the team's active will trigger.
87
- * @param {boolean} options.workflows.enableViewOnlyReviewers Whether users in a workflow can be given the view only role.
87
+ * @param {boolean} options.intelligence.enableIntelligence Whether PageProof intelligence is enabled for the team.
88
+ * @param {boolean} options.intelligence.enableSmartTags Whether Smart Tags is enabled for the team's proofs.
88
89
  * @returns {Promise}
89
90
  */
90
91
 
@@ -93,9 +94,9 @@ var TeamFeatures = function (_API) {
93
94
  var emails = _ref.emails,
94
95
  comments = _ref.comments,
95
96
  proofs = _ref.proofs,
96
- workflows = _ref.workflows,
97
97
  addressBook = _ref.addressBook,
98
- webhooks = _ref.webhooks;
98
+ webhooks = _ref.webhooks,
99
+ intelligence = _ref.intelligence;
99
100
 
100
101
  var displayComments = emails && emails.displayComments;
101
102
  var displayTeamName = emails && emails.displayTeamName;
@@ -103,7 +104,6 @@ var TeamFeatures = function (_API) {
103
104
  var privateComments = comments && comments.privateComments;
104
105
  var enableCommentVisibility = comments && comments.enableCommentVisibility;
105
106
  var defaultCommentVisibility = comments && comments.defaultCommentVisibility;
106
- var enableViewOnlyReviewers = workflows && workflows.enableViewOnlyReviewers;
107
107
  var emailTitleTextColor = emails && emails.titleTextColor;
108
108
  var emailLinkTextColor = emails && emails.linkTextColor;
109
109
  var emailButtonBackgroundColor = emails && emails.buttonBackgroundColor;
@@ -120,6 +120,8 @@ var TeamFeatures = function (_API) {
120
120
  var enableChecklists = proofs && proofs.enableChecklists;
121
121
  var suggestionsIncludeTeamMembers = addressBook && addressBook.suggestionsIncludeTeamMembers;
122
122
  var enableWebhooks = webhooks && webhooks.enabled;
123
+ var enableIntelligence = intelligence && intelligence.enableIntelligence;
124
+ var enableIntelligenceSmartTags = intelligence && intelligence.enableSmartTags;
123
125
  return this.client.request('admin.team.features.update', {
124
126
  displayComments: displayComments,
125
127
  displayTeamName: displayTeamName,
@@ -128,7 +130,6 @@ var TeamFeatures = function (_API) {
128
130
  enableWebhooks: enableWebhooks,
129
131
  enableCommentVisibility: enableCommentVisibility,
130
132
  defaultCommentVisibility: defaultCommentVisibility,
131
- enableViewOnlyReviewers: enableViewOnlyReviewers,
132
133
  emailTitleTextColor: emailTitleTextColor,
133
134
  emailLinkTextColor: emailLinkTextColor,
134
135
  emailButtonBackgroundColor: emailButtonBackgroundColor,
@@ -142,6 +143,8 @@ var TeamFeatures = function (_API) {
142
143
  messageToOwners: messageToOwners,
143
144
  allowedDecisions: allowedDecisions,
144
145
  enableChecklists: enableChecklists,
146
+ enableIntelligence: enableIntelligence,
147
+ enableIntelligenceSmartTags: enableIntelligenceSmartTags,
145
148
  suggestionsIncludeTeamMembers: suggestionsIncludeTeamMembers,
146
149
  usePreviousVersionDueDate: usePreviousVersionDueDate
147
150
  });
@@ -1,6 +1,5 @@
1
1
  export default WorkflowUserRole;
2
2
  declare namespace WorkflowUserRole {
3
- export const VIEW_ONLY: string;
4
3
  export const REVIEWER: string;
5
4
  export const MANDATORY: string;
6
5
  export const GATEKEEPER: string;
@@ -1 +1 @@
1
- "use strict";exports.__esModule=true;var WorkflowUserRole={VIEW_ONLY:"view-only",REVIEWER:"reviewer",MANDATORY:"mandatory",GATEKEEPER:"gatekeeper",APPROVER:"approver"};exports.default=WorkflowUserRole;
1
+ "use strict";exports.__esModule=true;var WorkflowUserRole={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",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;
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;
@@ -21,12 +21,6 @@ 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;
30
24
  /**
31
25
  * Account features.
32
26
  *
@@ -40,12 +34,18 @@ declare class TeamFeatures {
40
34
  * @type {TeamAddressBookFeatures}
41
35
  */
42
36
  addressBook: TeamAddressBookFeatures;
37
+ /**
38
+ * PageProof Intelligence features.
39
+ *
40
+ * @type {TeamIntelligenceFeatures}
41
+ */
42
+ intelligence: TeamIntelligenceFeatures;
43
43
  /** @private */
44
44
  fromTeamFeatures(teamFeaturesData: any): TeamFeatures;
45
45
  }
46
46
  import TeamEmailFeatures from "./TeamEmailFeatures";
47
47
  import TeamCommentFeatures from "./TeamCommentFeatures";
48
48
  import TeamProofFeatures from "./TeamProofFeatures";
49
- import TeamWorkflowFeatures from "./TeamWorkflowFeatures";
50
49
  import TeamAccountFeatures from "./TeamAccountFeatures";
51
50
  import TeamAddressBookFeatures from "./TeamAddressBookFeatures";
51
+ 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 _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);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)}};var TeamFeatures=function(){function TeamFeatures(){_classCallCheck(this,TeamFeatures)}TeamFeatures.prototype.fromTeamFeatures=function fromTeamFeatures(teamFeaturesData){(0,_transform2.default)(this,teamFeaturesSchema,teamFeaturesData);return this};return TeamFeatures}();exports.default=TeamFeatures;
1
+ "use strict";exports.__esModule=true;var _transform=require("./transform");var _transform2=_interopRequireDefault(_transform);var _TeamEmailFeatures=require("./TeamEmailFeatures");var _TeamEmailFeatures2=_interopRequireDefault(_TeamEmailFeatures);var _TeamCommentFeatures=require("./TeamCommentFeatures");var _TeamCommentFeatures2=_interopRequireDefault(_TeamCommentFeatures);var _TeamProofFeatures=require("./TeamProofFeatures");var _TeamProofFeatures2=_interopRequireDefault(_TeamProofFeatures);var _TeamAddressBookFeatures=require("./TeamAddressBookFeatures");var _TeamAddressBookFeatures2=_interopRequireDefault(_TeamAddressBookFeatures);var _TeamAccountFeatures=require("./TeamAccountFeatures");var _TeamAccountFeatures2=_interopRequireDefault(_TeamAccountFeatures);var _TeamWebhookFeatures=require("./TeamWebhookFeatures");var _TeamWebhookFeatures2=_interopRequireDefault(_TeamWebhookFeatures);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)},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;
@@ -53,12 +53,6 @@ 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>;
62
56
  /**
63
57
  * Returns a {@link WorkflowStep} by it's position within the workflow.
64
58
  *
@@ -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",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;
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;
@@ -878,7 +878,7 @@
878
878
  "version": 2,
879
879
  "method": "POST",
880
880
  "path": "/api/admin/settings",
881
- "body": ["displayComments", "generalComments", "privateComments", "enableWebhooks", "editComments", "ownerCanDeleteComments", "proofReference", "displayTeamName", "emailTitleTextColor", "emailLinkTextColor", "emailButtonBackgroundColor", "emailButtonTextColor", "disableReplyingToCommentsInStatuses", "publicProofs", "defaultProofIsPublic", "messageToOwners", "allowedDecisions", "enableChecklists", "suggestionsIncludeTeamMembers", "enableCommentVisibility", "defaultCommentVisibility", "usePreviousVersionDueDate", "enableViewOnlyReviewers"]
881
+ "body": ["displayComments", "generalComments", "privateComments", "enableWebhooks", "editComments", "ownerCanDeleteComments", "proofReference", "displayTeamName", "emailTitleTextColor", "emailLinkTextColor", "emailButtonBackgroundColor", "emailButtonTextColor", "disableReplyingToCommentsInStatuses", "publicProofs", "defaultProofIsPublic", "messageToOwners", "allowedDecisions", "enableChecklists", "suggestionsIncludeTeamMembers", "enableCommentVisibility", "defaultCommentVisibility", "usePreviousVersionDueDate", "enableIntelligence", "enableIntelligenceSmartTags"]
882
882
  },
883
883
  "admin.team.features.sender-email.set": {
884
884
  "version": 2,