@pageproof/sdk-pr 537.0.1720042615026 → 538.0.1720003995225
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/lib/adapters/WorkerCryptoAdapter.d.ts +1 -7
- package/lib/api/admin/TeamFeatures.d.ts +3 -2
- package/lib/api/admin/TeamFeatures.js +3 -4
- package/lib/enum/WorkflowUserRole.d.ts +0 -1
- package/lib/enum/WorkflowUserRole.js +1 -1
- package/lib/models/Proof.js +1 -1
- package/lib/models/TeamFeatures.d.ts +0 -7
- package/lib/models/TeamFeatures.js +1 -1
- package/lib/models/TeamProofFeatures.d.ts +6 -0
- package/lib/models/TeamProofFeatures.js +1 -1
- package/lib/models/Workflow.d.ts +0 -6
- package/lib/models/Workflow.js +1 -1
- package/lib/network/endpoints.json +1 -1
- package/lib/pageproof.js +1 -1
- package/package.json +1 -1
- package/lib/models/TeamWorkflowFeatures.d.ts +0 -17
- package/lib/models/TeamWorkflowFeatures.js +0 -1
|
@@ -3,21 +3,15 @@ declare class WorkerCryptoAdapter extends SchedulerCryptoAdapter {
|
|
|
3
3
|
/**
|
|
4
4
|
* @param {object} options
|
|
5
5
|
* @param {string} [options.url]
|
|
6
|
-
* @param {
|
|
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";
|
|
@@ -44,12 +44,12 @@ declare class TeamFeatures extends API {
|
|
|
44
44
|
* @param {boolean} options.proofs.messageToOwners Whether reviewers can send a message to the proof owners.
|
|
45
45
|
* @param {Array<Decision>} options.proofs.allowedDecisions The array of proof decisions that allowed to the reviewer.
|
|
46
46
|
* @param {boolean} options.proofs.enableChecklists Whether the checklists feature is enabled.
|
|
47
|
+
* @param {boolean} options.proofs.enableProofMagicAccess Whether the Magic Access feature is enabled for the team's proofs.
|
|
47
48
|
* @param {boolean} options.addressBook.suggestionsIncludeTeamMembers Whether other team members are included in suggestions when selecting a user.
|
|
48
49
|
* @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.
|
|
50
50
|
* @returns {Promise}
|
|
51
51
|
*/
|
|
52
|
-
update({ emails, comments, proofs,
|
|
52
|
+
update({ emails, comments, proofs, addressBook, webhooks, }: {
|
|
53
53
|
emails: {
|
|
54
54
|
displayComments: boolean;
|
|
55
55
|
displayTeamName: boolean;
|
|
@@ -75,6 +75,7 @@ declare class TeamFeatures extends API {
|
|
|
75
75
|
messageToOwners: boolean;
|
|
76
76
|
allowedDecisions: Decision[];
|
|
77
77
|
enableChecklists: boolean;
|
|
78
|
+
enableProofMagicAccess: boolean;
|
|
78
79
|
};
|
|
79
80
|
}): Promise<any>;
|
|
80
81
|
/**
|
|
@@ -82,9 +82,9 @@ var TeamFeatures = function (_API) {
|
|
|
82
82
|
* @param {boolean} options.proofs.messageToOwners Whether reviewers can send a message to the proof owners.
|
|
83
83
|
* @param {Array<Decision>} options.proofs.allowedDecisions The array of proof decisions that allowed to the reviewer.
|
|
84
84
|
* @param {boolean} options.proofs.enableChecklists Whether the checklists feature is enabled.
|
|
85
|
+
* @param {boolean} options.proofs.enableProofMagicAccess Whether the Magic Access feature is enabled for the team's proofs.
|
|
85
86
|
* @param {boolean} options.addressBook.suggestionsIncludeTeamMembers Whether other team members are included in suggestions when selecting a user.
|
|
86
87
|
* @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.
|
|
88
88
|
* @returns {Promise}
|
|
89
89
|
*/
|
|
90
90
|
|
|
@@ -93,7 +93,6 @@ var TeamFeatures = function (_API) {
|
|
|
93
93
|
var emails = _ref.emails,
|
|
94
94
|
comments = _ref.comments,
|
|
95
95
|
proofs = _ref.proofs,
|
|
96
|
-
workflows = _ref.workflows,
|
|
97
96
|
addressBook = _ref.addressBook,
|
|
98
97
|
webhooks = _ref.webhooks;
|
|
99
98
|
|
|
@@ -103,7 +102,6 @@ var TeamFeatures = function (_API) {
|
|
|
103
102
|
var privateComments = comments && comments.privateComments;
|
|
104
103
|
var enableCommentVisibility = comments && comments.enableCommentVisibility;
|
|
105
104
|
var defaultCommentVisibility = comments && comments.defaultCommentVisibility;
|
|
106
|
-
var enableViewOnlyReviewers = workflows && workflows.enableViewOnlyReviewers;
|
|
107
105
|
var emailTitleTextColor = emails && emails.titleTextColor;
|
|
108
106
|
var emailLinkTextColor = emails && emails.linkTextColor;
|
|
109
107
|
var emailButtonBackgroundColor = emails && emails.buttonBackgroundColor;
|
|
@@ -118,6 +116,7 @@ var TeamFeatures = function (_API) {
|
|
|
118
116
|
var messageToOwners = proofs && proofs.messageToOwners;
|
|
119
117
|
var allowedDecisions = proofs && proofs.allowedDecisions;
|
|
120
118
|
var enableChecklists = proofs && proofs.enableChecklists;
|
|
119
|
+
var enableProofMagicAccess = proofs && proofs.enableProofMagicAccess;
|
|
121
120
|
var suggestionsIncludeTeamMembers = addressBook && addressBook.suggestionsIncludeTeamMembers;
|
|
122
121
|
var enableWebhooks = webhooks && webhooks.enabled;
|
|
123
122
|
return this.client.request('admin.team.features.update', {
|
|
@@ -128,7 +127,6 @@ var TeamFeatures = function (_API) {
|
|
|
128
127
|
enableWebhooks: enableWebhooks,
|
|
129
128
|
enableCommentVisibility: enableCommentVisibility,
|
|
130
129
|
defaultCommentVisibility: defaultCommentVisibility,
|
|
131
|
-
enableViewOnlyReviewers: enableViewOnlyReviewers,
|
|
132
130
|
emailTitleTextColor: emailTitleTextColor,
|
|
133
131
|
emailLinkTextColor: emailLinkTextColor,
|
|
134
132
|
emailButtonBackgroundColor: emailButtonBackgroundColor,
|
|
@@ -142,6 +140,7 @@ var TeamFeatures = function (_API) {
|
|
|
142
140
|
messageToOwners: messageToOwners,
|
|
143
141
|
allowedDecisions: allowedDecisions,
|
|
144
142
|
enableChecklists: enableChecklists,
|
|
143
|
+
enableProofMagicAccess: enableProofMagicAccess,
|
|
145
144
|
suggestionsIncludeTeamMembers: suggestionsIncludeTeamMembers,
|
|
146
145
|
usePreviousVersionDueDate: usePreviousVersionDueDate
|
|
147
146
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.__esModule=true;var WorkflowUserRole={
|
|
1
|
+
"use strict";exports.__esModule=true;var WorkflowUserRole={REVIEWER:"reviewer",MANDATORY:"mandatory",GATEKEEPER:"gatekeeper",APPROVER:"approver"};exports.default=WorkflowUserRole;
|
package/lib/models/Proof.js
CHANGED
|
@@ -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",
|
|
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
|
*
|
|
@@ -46,6 +40,5 @@ declare class TeamFeatures {
|
|
|
46
40
|
import TeamEmailFeatures from "./TeamEmailFeatures";
|
|
47
41
|
import TeamCommentFeatures from "./TeamCommentFeatures";
|
|
48
42
|
import TeamProofFeatures from "./TeamProofFeatures";
|
|
49
|
-
import TeamWorkflowFeatures from "./TeamWorkflowFeatures";
|
|
50
43
|
import TeamAccountFeatures from "./TeamAccountFeatures";
|
|
51
44
|
import TeamAddressBookFeatures from "./TeamAddressBookFeatures";
|
|
@@ -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
|
|
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;
|
|
@@ -38,6 +38,12 @@ declare class TeamProofFeatures {
|
|
|
38
38
|
* @type {boolean}
|
|
39
39
|
*/
|
|
40
40
|
enableChecklists: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Whether the Magic Access feature is enabled for the team's proofs.
|
|
43
|
+
*
|
|
44
|
+
* @type {boolean}
|
|
45
|
+
*/
|
|
46
|
+
enableProofMagicAccess: boolean;
|
|
41
47
|
/**
|
|
42
48
|
* Whether the default due date on the proof setup page for a new version is the previous version's due date.
|
|
43
49
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.__esModule=true;var _transform=require("./transform");var _transform2=_interopRequireDefault(_transform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var TeamProofFeatureSchema={reference:"ProofReference",publicProofs:"PublicProofs",usePreviousVersionDueDate:"UsePreviousVersionDueDate",defaultIsPublic:"DefaultProofIsPublic",messageToOwners:"MessageToOwners",allowedDecisions:"AllowedDecisions",enableChecklists:"EnableChecklists"};var TeamProofFeatures=function(){function TeamProofFeatures(){_classCallCheck(this,TeamProofFeatures)}TeamProofFeatures.prototype.fromTeamProofFeatures=function fromTeamProofFeatures(teamProofFeaturesData){(0,_transform2.default)(this,TeamProofFeatureSchema,teamProofFeaturesData);return this};return TeamProofFeatures}();exports.default=TeamProofFeatures;
|
|
1
|
+
"use strict";exports.__esModule=true;var _transform=require("./transform");var _transform2=_interopRequireDefault(_transform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var TeamProofFeatureSchema={reference:"ProofReference",publicProofs:"PublicProofs",usePreviousVersionDueDate:"UsePreviousVersionDueDate",defaultIsPublic:"DefaultProofIsPublic",messageToOwners:"MessageToOwners",allowedDecisions:"AllowedDecisions",enableChecklists:"EnableChecklists",enableProofMagicAccess:"EnableProofMagicAccess"};var TeamProofFeatures=function(){function TeamProofFeatures(){_classCallCheck(this,TeamProofFeatures)}TeamProofFeatures.prototype.fromTeamProofFeatures=function fromTeamProofFeatures(teamProofFeaturesData){(0,_transform2.default)(this,TeamProofFeatureSchema,teamProofFeaturesData);return this};return TeamProofFeatures}();exports.default=TeamProofFeatures;
|
package/lib/models/Workflow.d.ts
CHANGED
|
@@ -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
|
*
|
package/lib/models/Workflow.js
CHANGED
|
@@ -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",
|
|
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"
|
|
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"]
|
|
882
882
|
},
|
|
883
883
|
"admin.team.features.sender-email.set": {
|
|
884
884
|
"version": 2,
|