@pageproof/sdk-pr 472.0.1668119030238 → 473.0.1669236413732
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/api/Workflows.d.ts +11 -0
- package/lib/api/Workflows.js +1 -1
- package/lib/api/admin/TeamFeatures.d.ts +0 -2
- package/lib/api/admin/TeamFeatures.js +0 -3
- package/lib/api/admin/TeamWorkflows.d.ts +5 -0
- package/lib/api/admin/TeamWorkflows.js +12 -0
- package/lib/models/TeamProofFeatures.d.ts +0 -6
- package/lib/models/TeamProofFeatures.js +1 -1
- package/lib/network/endpoints.json +15 -1
- package/lib/pageproof.js +1 -1
- package/package.json +1 -1
package/lib/api/Workflows.d.ts
CHANGED
|
@@ -433,6 +433,17 @@ declare class Workflows extends API {
|
|
|
433
433
|
_setWorkflowStepUsersMutate(workflowId: any, workflowStep: any, users: any, start: any): any;
|
|
434
434
|
/** @private */
|
|
435
435
|
_addProofOwnerToWorkflowTemplate(workflowId: any, user: any): any;
|
|
436
|
+
/**
|
|
437
|
+
* Loads all the emails attached to the user's own workflow templates
|
|
438
|
+
*
|
|
439
|
+
* @private
|
|
440
|
+
*/
|
|
441
|
+
_getOwnedEmailList(): any;
|
|
442
|
+
/**
|
|
443
|
+
* Loads all the emails attached to the workflow templates.
|
|
444
|
+
*
|
|
445
|
+
* @private */
|
|
446
|
+
_getSharedEmailList(): any;
|
|
436
447
|
}
|
|
437
448
|
import API from "./API";
|
|
438
449
|
import WorkflowsSteps from "./WorkflowsSteps";
|
package/lib/api/Workflows.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.__esModule=true;var _API2=require("./API");var _API3=_interopRequireDefault(_API2);var _Workflow=require("../models/Workflow");var _Workflow2=_interopRequireDefault(_Workflow);var _WorkflowStep=require("../models/WorkflowStep");var _WorkflowStep2=_interopRequireDefault(_WorkflowStep);var _WorkflowUser=require("../models/WorkflowUser");var _WorkflowUser2=_interopRequireDefault(_WorkflowUser);var _id=require("../util/id");var _WorkflowsSteps=require("./WorkflowsSteps");var _WorkflowsSteps2=_interopRequireDefault(_WorkflowsSteps);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}function hasEnoughUserDetails(workflowUser){return workflowUser&&((0,_id.isUserId)(workflowUser.id)||workflowUser.email)}function transformWorkflows(workflows){return(workflows||[]).map(function(workflowData){return(new _Workflow2.default).fromWorkflow(workflowData)})}var Workflows=function(_API){_inherits(Workflows,_API);function Workflows(client){_classCallCheck(this,Workflows);var _this=_possibleConstructorReturn(this,_API.call(this,client));_this.steps=new _WorkflowsSteps2.default(client);return _this}Workflows.prototype.create=function create(_ref){var _this2=this;var _ref$save=_ref.save,save=_ref$save===undefined?false:_ref$save,name=_ref.name,_ref$steps=_ref.steps,_steps=_ref$steps===undefined?[]:_ref$steps,reviewers=_ref.reviewers,approver=_ref.approver,owners=_ref.owners,_ref$isOwnedByTeam=_ref.isOwnedByTeam,isOwnedByTeam=_ref$isOwnedByTeam===undefined?false:_ref$isOwnedByTeam;if(approver&&!hasEnoughUserDetails(approver)){return Promise.reject(Error("Please provide an approver id or email address."))}if(save&&!name){return Promise.reject(Error("A workflow must have a name when saving it as a workflow template."))}var steps=_steps;if(reviewers&&reviewers.length){steps.splice(0,0,{users:reviewers})}if(approver){steps.push({position:1e3,users:[approver],start:approver.start})}var largestPosition=0;for(var i=0;i<steps.length;i++){var step=steps[i];step.users=step.users||[];if(!step.position||step.position<largestPosition){step.position=largestPosition+1}largestPosition=Math.max(largestPosition,step.position);for(var ii=0;ii<step.users.length;ii++){var user=step.users[ii];if(!hasEnoughUserDetails(user)){return Promise.reject(Error("A user id or email address must be provided for a workflow user."))}}}var workflowId=void 0;return this._createWorkflow(name,isOwnedByTeam).then(function(workflow){workflowId=workflow.id;return Promise.all([workflow,Promise.all(steps.map(function(step){var workflowStep=workflow.getStepByPosition(step.position);return workflowStep?Promise.resolve(step.dueDate&&_this2.steps.update(workflowStep.id,{dueDate:step.dueDate}).then(function(updatedWorkflowStep){workflowStep.dueDate=updatedWorkflowStep.dueDate})).then(function(){return _this2._setWorkflowStepUsersMutate(workflow.id,workflowStep,step.users,step.start)}):_this2._addWorkflowStepAndUsers(workflow.id,step,step.start)})),owners&&Promise.all(owners.map(function(owner){return _this2._addProofOwnerToWorkflowTemplate(workflowId,owner)}))])}).then(function(_ref2){var workflow=_ref2[0],workflowSteps=_ref2[1];workflow.steps=workflowSteps;return workflow}).then(function(workflow){if(save){return _this2._duplicateWorkflow(workflowId)}return workflow}).catch(function(err){return Promise.resolve(workflowId&&_this2._deleteWorkflow(workflowId)).then(function(){return Promise.reject(err)})})};Workflows.prototype.load=function load(workflowId){return this.client.request("workflows.load",{workflowId:workflowId}).then(function(response){return(new _Workflow2.default).fromWorkflow(response.data)})};Workflows.prototype.use=function use(workflowId,options){return this.duplicate(workflowId,options)};Workflows.prototype.duplicate=function duplicate(workflowId,options){return this._duplicateWorkflow(workflowId,options)};Workflows.prototype.delete=function _delete(workflowId){return this._deleteWorkflow(workflowId)};Workflows.prototype.all=function all(){return Promise.all([this.owned(),this.shared()]).then(function(_ref3){var owned=_ref3[0],shared=_ref3[1];return[].concat(owned,shared)})};Workflows.prototype.owned=function owned(){return this.client.request("workflows.owned").then(function(response){return transformWorkflows(response.data)})};Workflows.prototype.shared=function shared(){return this.client.request("workflows.shared").then(function(response){return transformWorkflows(response.data)})};Workflows.prototype.setApprover=function setApprover(workflowId,user){return this.client.request("workflows.users.set",{workflowId:workflowId,position:1e3,users:[user]})};Workflows.prototype.skipAll=function skipAll(workflowId){return this.client.request("workflows.users.skip-all",{workflowId:workflowId})};Workflows.prototype.nudgeUser=function nudgeUser(workflowId,userId){var message=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;return this.client.request("workflows.user.nudge",{workflowId:workflowId,userId:userId,message:message})};Workflows.prototype.nudgeAll=function nudgeAll(workflowIdOrIds){var message=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;return this.client.request("workflows.nudge-all",{workflowIds:[].concat(workflowIdOrIds),message:message}).then(function(response){return{nudgedWorkflows:response.data.NudgedWorkflows.map(function(nudgedWorkflow){return{workflowId:nudgedWorkflow.WorkflowId,users:nudgedWorkflow.Users.map(function(user){return{userId:user.UserId,role:user.Role,stepId:user.StepId,position:Number(user.Position)}})}}),errors:response.data.Errors.map(function(error){return{workflowId:error.WorkflowId,errorCode:error.ErrorCode,errorMessage:error.ErrorMessage}})}})};Workflows.prototype.setStartingStep=function setStartingStep(workflowId,stepId){return this.client.request("workflows.set-starting-step",{workflowId:workflowId,stepId:stepId})};Workflows.prototype.replaceApprover=function replaceApprover(workflowIdOrIds,user){return this.client.request("workflows.replace-approver",{workflowIds:[].concat(workflowIdOrIds),user:user})};Workflows.prototype.update=function update(workflowId,_ref4){var name=_ref4.name,isOwnedByTeam=_ref4.isOwnedByTeam;return this.client.request("workflows.update",{workflowId:workflowId,title:name,ownedByTeam:isOwnedByTeam}).then(function(response){return(new _Workflow2.default).fromWorkflow(response.data)})};Workflows.prototype.getNudgeAllMessage=function getNudgeAllMessage(workflowId){return this.client.request("workflows.nudge-message",{workflowId:workflowId}).then(function(response){return response.data.Message})};Workflows.prototype.getNudgeMessage=function getNudgeMessage(workflowId,userId){return this.client.request("workflows.nudge-message",{workflowId:workflowId,userId:userId}).then(function(response){return response.data.Message})};Workflows.prototype.favorite=function favorite(workflowId){return this.client.request("workflows.favorite",{workflowId:workflowId})};Workflows.prototype.unfavorite=function unfavorite(workflowId){return this.client.request("workflows.unfavorite",{workflowId:workflowId})};Workflows.prototype._duplicateWorkflow=function _duplicateWorkflow(workflowId,options){var _this3=this;return this.client.request("workflows.duplicate",{workflowId:workflowId,noOwners:options&&options.includeOwners===false?true:undefined,excludeStepDueDates:options&&options.includeStepDueDates===false?true:undefined,includeOwnedByTeam:options&&options.includeOwnedByTeam===true||undefined,includeSharedUsers:options&&options.includeSharedUsers===true||undefined}).then(function(response){var duplicatedWorkflowId=response.data.WorkflowId;return _this3.load(duplicatedWorkflowId)})};Workflows.prototype._deleteWorkflow=function _deleteWorkflow(workflowId){return this.client.request("workflows.delete",{workflowId:workflowId})};Workflows.prototype._createWorkflow=function _createWorkflow(name,isOwnedByTeam){return this.client.request("workflows.create",{title:name,ownedByTeam:isOwnedByTeam}).then(function(response){return(new _Workflow2.default).fromWorkflow(response.data)})};Workflows.prototype._addWorkflowStepAndUsers=function _addWorkflowStepAndUsers(workflowId,step,start){var _this4=this;return this.client.request("workflows.steps.add",{workflowId:workflowId,title:step.name,position:step.position,dueDate:step.dueDate,mandatoryDecisionThreshold:step.mandatoryDecisionThreshold}).then(function(response){var workflowStep=(new _WorkflowStep2.default).fromWorkflowStep(response.data);return _this4._setWorkflowStepUsersMutate(workflowId,workflowStep,step.users,start)})};Workflows.prototype._setWorkflowStepUsersMutate=function _setWorkflowStepUsersMutate(workflowId,workflowStep,users,start){var _this5=this;return this.client.request("workflows.users.set",{workflowId:workflowId,stepId:workflowStep.id,users:users.map(function(user){return{email:user.email,userId:user.id,role:user.role,permissions:user.permissions&&{inviter:!!user.permissions.inviter}}})}).then(function(response){var workflowUsers=response.data.map(function(user){return(new _WorkflowUser2.default).fromWorkflowUser(user)});workflowStep.users=workflowUsers}).then(function(){if(start===true){return _this5.setStartingStep(workflowId,workflowStep.id).then(function(){return workflowStep})}return workflowStep})};Workflows.prototype._addProofOwnerToWorkflowTemplate=function _addProofOwnerToWorkflowTemplate(workflowId,user){return this.client.request("workflows.proof-owners.add",{relatedId:workflowId,workflowCopyToProof:1,userId:user.id,email:user.email})};return Workflows}(_API3.default);exports.default=Workflows;
|
|
1
|
+
"use strict";exports.__esModule=true;var _API2=require("./API");var _API3=_interopRequireDefault(_API2);var _Workflow=require("../models/Workflow");var _Workflow2=_interopRequireDefault(_Workflow);var _WorkflowStep=require("../models/WorkflowStep");var _WorkflowStep2=_interopRequireDefault(_WorkflowStep);var _WorkflowUser=require("../models/WorkflowUser");var _WorkflowUser2=_interopRequireDefault(_WorkflowUser);var _id=require("../util/id");var _WorkflowsSteps=require("./WorkflowsSteps");var _WorkflowsSteps2=_interopRequireDefault(_WorkflowsSteps);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}function hasEnoughUserDetails(workflowUser){return workflowUser&&((0,_id.isUserId)(workflowUser.id)||workflowUser.email)}function transformWorkflows(workflows){return(workflows||[]).map(function(workflowData){return(new _Workflow2.default).fromWorkflow(workflowData)})}var Workflows=function(_API){_inherits(Workflows,_API);function Workflows(client){_classCallCheck(this,Workflows);var _this=_possibleConstructorReturn(this,_API.call(this,client));_this.steps=new _WorkflowsSteps2.default(client);return _this}Workflows.prototype.create=function create(_ref){var _this2=this;var _ref$save=_ref.save,save=_ref$save===undefined?false:_ref$save,name=_ref.name,_ref$steps=_ref.steps,_steps=_ref$steps===undefined?[]:_ref$steps,reviewers=_ref.reviewers,approver=_ref.approver,owners=_ref.owners,_ref$isOwnedByTeam=_ref.isOwnedByTeam,isOwnedByTeam=_ref$isOwnedByTeam===undefined?false:_ref$isOwnedByTeam;if(approver&&!hasEnoughUserDetails(approver)){return Promise.reject(Error("Please provide an approver id or email address."))}if(save&&!name){return Promise.reject(Error("A workflow must have a name when saving it as a workflow template."))}var steps=_steps;if(reviewers&&reviewers.length){steps.splice(0,0,{users:reviewers})}if(approver){steps.push({position:1e3,users:[approver],start:approver.start})}var largestPosition=0;for(var i=0;i<steps.length;i++){var step=steps[i];step.users=step.users||[];if(!step.position||step.position<largestPosition){step.position=largestPosition+1}largestPosition=Math.max(largestPosition,step.position);for(var ii=0;ii<step.users.length;ii++){var user=step.users[ii];if(!hasEnoughUserDetails(user)){return Promise.reject(Error("A user id or email address must be provided for a workflow user."))}}}var workflowId=void 0;return this._createWorkflow(name,isOwnedByTeam).then(function(workflow){workflowId=workflow.id;return Promise.all([workflow,Promise.all(steps.map(function(step){var workflowStep=workflow.getStepByPosition(step.position);return workflowStep?Promise.resolve(step.dueDate&&_this2.steps.update(workflowStep.id,{dueDate:step.dueDate}).then(function(updatedWorkflowStep){workflowStep.dueDate=updatedWorkflowStep.dueDate})).then(function(){return _this2._setWorkflowStepUsersMutate(workflow.id,workflowStep,step.users,step.start)}):_this2._addWorkflowStepAndUsers(workflow.id,step,step.start)})),owners&&Promise.all(owners.map(function(owner){return _this2._addProofOwnerToWorkflowTemplate(workflowId,owner)}))])}).then(function(_ref2){var workflow=_ref2[0],workflowSteps=_ref2[1];workflow.steps=workflowSteps;return workflow}).then(function(workflow){if(save){return _this2._duplicateWorkflow(workflowId)}return workflow}).catch(function(err){return Promise.resolve(workflowId&&_this2._deleteWorkflow(workflowId)).then(function(){return Promise.reject(err)})})};Workflows.prototype.load=function load(workflowId){return this.client.request("workflows.load",{workflowId:workflowId}).then(function(response){return(new _Workflow2.default).fromWorkflow(response.data)})};Workflows.prototype.use=function use(workflowId,options){return this.duplicate(workflowId,options)};Workflows.prototype.duplicate=function duplicate(workflowId,options){return this._duplicateWorkflow(workflowId,options)};Workflows.prototype.delete=function _delete(workflowId){return this._deleteWorkflow(workflowId)};Workflows.prototype.all=function all(){return Promise.all([this.owned(),this.shared()]).then(function(_ref3){var owned=_ref3[0],shared=_ref3[1];return[].concat(owned,shared)})};Workflows.prototype.owned=function owned(){return this.client.request("workflows.owned").then(function(response){return transformWorkflows(response.data)})};Workflows.prototype.shared=function shared(){return this.client.request("workflows.shared").then(function(response){return transformWorkflows(response.data)})};Workflows.prototype.setApprover=function setApprover(workflowId,user){return this.client.request("workflows.users.set",{workflowId:workflowId,position:1e3,users:[user]})};Workflows.prototype.skipAll=function skipAll(workflowId){return this.client.request("workflows.users.skip-all",{workflowId:workflowId})};Workflows.prototype.nudgeUser=function nudgeUser(workflowId,userId){var message=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;return this.client.request("workflows.user.nudge",{workflowId:workflowId,userId:userId,message:message})};Workflows.prototype.nudgeAll=function nudgeAll(workflowIdOrIds){var message=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;return this.client.request("workflows.nudge-all",{workflowIds:[].concat(workflowIdOrIds),message:message}).then(function(response){return{nudgedWorkflows:response.data.NudgedWorkflows.map(function(nudgedWorkflow){return{workflowId:nudgedWorkflow.WorkflowId,users:nudgedWorkflow.Users.map(function(user){return{userId:user.UserId,role:user.Role,stepId:user.StepId,position:Number(user.Position)}})}}),errors:response.data.Errors.map(function(error){return{workflowId:error.WorkflowId,errorCode:error.ErrorCode,errorMessage:error.ErrorMessage}})}})};Workflows.prototype.setStartingStep=function setStartingStep(workflowId,stepId){return this.client.request("workflows.set-starting-step",{workflowId:workflowId,stepId:stepId})};Workflows.prototype.replaceApprover=function replaceApprover(workflowIdOrIds,user){return this.client.request("workflows.replace-approver",{workflowIds:[].concat(workflowIdOrIds),user:user})};Workflows.prototype.update=function update(workflowId,_ref4){var name=_ref4.name,isOwnedByTeam=_ref4.isOwnedByTeam;return this.client.request("workflows.update",{workflowId:workflowId,title:name,ownedByTeam:isOwnedByTeam}).then(function(response){return(new _Workflow2.default).fromWorkflow(response.data)})};Workflows.prototype.getNudgeAllMessage=function getNudgeAllMessage(workflowId){return this.client.request("workflows.nudge-message",{workflowId:workflowId}).then(function(response){return response.data.Message})};Workflows.prototype.getNudgeMessage=function getNudgeMessage(workflowId,userId){return this.client.request("workflows.nudge-message",{workflowId:workflowId,userId:userId}).then(function(response){return response.data.Message})};Workflows.prototype.favorite=function favorite(workflowId){return this.client.request("workflows.favorite",{workflowId:workflowId})};Workflows.prototype.unfavorite=function unfavorite(workflowId){return this.client.request("workflows.unfavorite",{workflowId:workflowId})};Workflows.prototype._duplicateWorkflow=function _duplicateWorkflow(workflowId,options){var _this3=this;return this.client.request("workflows.duplicate",{workflowId:workflowId,noOwners:options&&options.includeOwners===false?true:undefined,excludeStepDueDates:options&&options.includeStepDueDates===false?true:undefined,includeOwnedByTeam:options&&options.includeOwnedByTeam===true||undefined,includeSharedUsers:options&&options.includeSharedUsers===true||undefined}).then(function(response){var duplicatedWorkflowId=response.data.WorkflowId;return _this3.load(duplicatedWorkflowId)})};Workflows.prototype._deleteWorkflow=function _deleteWorkflow(workflowId){return this.client.request("workflows.delete",{workflowId:workflowId})};Workflows.prototype._createWorkflow=function _createWorkflow(name,isOwnedByTeam){return this.client.request("workflows.create",{title:name,ownedByTeam:isOwnedByTeam}).then(function(response){return(new _Workflow2.default).fromWorkflow(response.data)})};Workflows.prototype._addWorkflowStepAndUsers=function _addWorkflowStepAndUsers(workflowId,step,start){var _this4=this;return this.client.request("workflows.steps.add",{workflowId:workflowId,title:step.name,position:step.position,dueDate:step.dueDate,mandatoryDecisionThreshold:step.mandatoryDecisionThreshold}).then(function(response){var workflowStep=(new _WorkflowStep2.default).fromWorkflowStep(response.data);return _this4._setWorkflowStepUsersMutate(workflowId,workflowStep,step.users,start)})};Workflows.prototype._setWorkflowStepUsersMutate=function _setWorkflowStepUsersMutate(workflowId,workflowStep,users,start){var _this5=this;return this.client.request("workflows.users.set",{workflowId:workflowId,stepId:workflowStep.id,users:users.map(function(user){return{email:user.email,userId:user.id,role:user.role,permissions:user.permissions&&{inviter:!!user.permissions.inviter}}})}).then(function(response){var workflowUsers=response.data.map(function(user){return(new _WorkflowUser2.default).fromWorkflowUser(user)});workflowStep.users=workflowUsers}).then(function(){if(start===true){return _this5.setStartingStep(workflowId,workflowStep.id).then(function(){return workflowStep})}return workflowStep})};Workflows.prototype._addProofOwnerToWorkflowTemplate=function _addProofOwnerToWorkflowTemplate(workflowId,user){return this.client.request("workflows.proof-owners.add",{relatedId:workflowId,workflowCopyToProof:1,userId:user.id,email:user.email})};Workflows.prototype._getOwnedEmailList=function _getOwnedEmailList(){return this.client.request("workflows.owned.email-list").then(function(response){return transformWorkflows(response.data)})};Workflows.prototype._getSharedEmailList=function _getSharedEmailList(){return this.client.request("workflows.shared.email-list").then(function(response){return transformWorkflows(response.data)})};return Workflows}(_API3.default);exports.default=Workflows;
|
|
@@ -35,7 +35,6 @@ declare class TeamFeatures extends API {
|
|
|
35
35
|
* @param {object} options.proofs The proofs features
|
|
36
36
|
* @param {boolean} options.proofs.reference Whether showing the reference field on a proof
|
|
37
37
|
* @param {boolean} options.proofs.publicProofs Whether the public proofs feature is enabled.
|
|
38
|
-
* @param {boolean} options.proofs.defaultDownloadOriginalFile The default value for whether the download option is enabled/disabled on the proof setup page.
|
|
39
38
|
* @param {boolean} options.proofs.defaultIsPublic The default value for whether a proof is public on the proof setup page.
|
|
40
39
|
* @param {boolean} options.proofs.messageToOwners Whether reviewers can send a message to the proof owners.
|
|
41
40
|
* @param {Array<Decision>} options.proofs.allowedDecisions The array of proof decisions that allowed to the reviewer.
|
|
@@ -59,7 +58,6 @@ declare class TeamFeatures extends API {
|
|
|
59
58
|
proofs: {
|
|
60
59
|
reference: boolean;
|
|
61
60
|
publicProofs: boolean;
|
|
62
|
-
defaultDownloadOriginalFile: boolean;
|
|
63
61
|
defaultIsPublic: boolean;
|
|
64
62
|
messageToOwners: boolean;
|
|
65
63
|
allowedDecisions: Decision[];
|
|
@@ -73,7 +73,6 @@ var TeamFeatures = function (_API) {
|
|
|
73
73
|
* @param {object} options.proofs The proofs features
|
|
74
74
|
* @param {boolean} options.proofs.reference Whether showing the reference field on a proof
|
|
75
75
|
* @param {boolean} options.proofs.publicProofs Whether the public proofs feature is enabled.
|
|
76
|
-
* @param {boolean} options.proofs.defaultDownloadOriginalFile The default value for whether the download option is enabled/disabled on the proof setup page.
|
|
77
76
|
* @param {boolean} options.proofs.defaultIsPublic The default value for whether a proof is public on the proof setup page.
|
|
78
77
|
* @param {boolean} options.proofs.messageToOwners Whether reviewers can send a message to the proof owners.
|
|
79
78
|
* @param {Array<Decision>} options.proofs.allowedDecisions The array of proof decisions that allowed to the reviewer.
|
|
@@ -99,7 +98,6 @@ var TeamFeatures = function (_API) {
|
|
|
99
98
|
var proofReference = proofs && proofs.reference;
|
|
100
99
|
var publicProofs = proofs && proofs.publicProofs;
|
|
101
100
|
var defaultProofIsPublic = proofs && proofs.defaultIsPublic;
|
|
102
|
-
var defaultDownloadOriginalFile = proofs && proofs.defaultDownloadOriginalFile;
|
|
103
101
|
var messageToOwners = proofs && proofs.messageToOwners;
|
|
104
102
|
var allowedDecisions = proofs && proofs.allowedDecisions;
|
|
105
103
|
var enableChecklists = proofs && proofs.enableChecklists;
|
|
@@ -116,7 +114,6 @@ var TeamFeatures = function (_API) {
|
|
|
116
114
|
proofReference: proofReference,
|
|
117
115
|
publicProofs: publicProofs,
|
|
118
116
|
defaultProofIsPublic: defaultProofIsPublic,
|
|
119
|
-
defaultDownloadOriginalFile: defaultDownloadOriginalFile,
|
|
120
117
|
messageToOwners: messageToOwners,
|
|
121
118
|
allowedDecisions: allowedDecisions,
|
|
122
119
|
enableChecklists: enableChecklists
|
|
@@ -14,6 +14,11 @@ declare class TeamWorkflows extends API {
|
|
|
14
14
|
*
|
|
15
15
|
*/
|
|
16
16
|
owned(): Promise<Workflow[]>;
|
|
17
|
+
/**
|
|
18
|
+
* Loads all the emails attached to the team workflow templates.
|
|
19
|
+
*
|
|
20
|
+
* @private */
|
|
21
|
+
_getOwnedEmailList(): any;
|
|
17
22
|
}
|
|
18
23
|
import API from "../API";
|
|
19
24
|
import Workflow from "../../models/Workflow";
|
|
@@ -56,6 +56,18 @@ var TeamWorkflows = function (_API) {
|
|
|
56
56
|
});
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
+
/**
|
|
60
|
+
* Loads all the emails attached to the team workflow templates.
|
|
61
|
+
*
|
|
62
|
+
* @private */
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
TeamWorkflows.prototype._getOwnedEmailList = function _getOwnedEmailList() {
|
|
66
|
+
return this.client.request('admin.team.workflows.owned.email-list').then(function (response) {
|
|
67
|
+
return transformWorkflows(response.data);
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
|
|
59
71
|
return TeamWorkflows;
|
|
60
72
|
}(_API3.default);
|
|
61
73
|
|
|
@@ -19,12 +19,6 @@ declare class TeamProofFeatures {
|
|
|
19
19
|
* @type {boolean}
|
|
20
20
|
*/
|
|
21
21
|
defaultIsPublic: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* The default value for download original file option on the proof setup page.
|
|
24
|
-
*
|
|
25
|
-
* @type {boolean}
|
|
26
|
-
*/
|
|
27
|
-
defaultDownloadOriginalFile: boolean;
|
|
28
22
|
/**
|
|
29
23
|
* Whether reviewers can send a message to the proof owners.
|
|
30
24
|
*
|
|
@@ -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",defaultIsPublic:"DefaultProofIsPublic",
|
|
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",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;
|
|
@@ -692,6 +692,16 @@
|
|
|
692
692
|
"path": "/api/workflows/share/user",
|
|
693
693
|
"trailing": true
|
|
694
694
|
},
|
|
695
|
+
"workflows.owned.email-list": {
|
|
696
|
+
"method": "GET",
|
|
697
|
+
"path": "/api/workflows/emaillist",
|
|
698
|
+
"trailing": true
|
|
699
|
+
},
|
|
700
|
+
"workflows.shared.email-list": {
|
|
701
|
+
"method": "GET",
|
|
702
|
+
"path": "/api/workflows/share/emaillist",
|
|
703
|
+
"trailing": true
|
|
704
|
+
},
|
|
695
705
|
"workflows.replace-approver": {
|
|
696
706
|
"version": 2,
|
|
697
707
|
"method": "POST",
|
|
@@ -854,7 +864,7 @@
|
|
|
854
864
|
"version": 2,
|
|
855
865
|
"method": "POST",
|
|
856
866
|
"path": "/api/admin/settings",
|
|
857
|
-
"body": ["displayComments", "generalComments", "editComments", "proofReference", "displayTeamName", "emailTitleTextColor", "emailLinkTextColor", "emailButtonBackgroundColor", "emailButtonTextColor", "disableReplyingToCommentsInStatuses", "publicProofs", "defaultProofIsPublic", "messageToOwners", "allowedDecisions", "enableChecklists"
|
|
867
|
+
"body": ["displayComments", "generalComments", "editComments", "proofReference", "displayTeamName", "emailTitleTextColor", "emailLinkTextColor", "emailButtonBackgroundColor", "emailButtonTextColor", "disableReplyingToCommentsInStatuses", "publicProofs", "defaultProofIsPublic", "messageToOwners", "allowedDecisions", "enableChecklists"]
|
|
858
868
|
},
|
|
859
869
|
"admin.team.features.sender-email.set": {
|
|
860
870
|
"version": 2,
|
|
@@ -923,6 +933,10 @@
|
|
|
923
933
|
"method": "GET",
|
|
924
934
|
"path": "/api/admin/workflows/templates"
|
|
925
935
|
},
|
|
936
|
+
"admin.team.workflows.owned.email-list": {
|
|
937
|
+
"method": "GET",
|
|
938
|
+
"path": "/api/admin/workflows/templates/emaillist"
|
|
939
|
+
},
|
|
926
940
|
"admin.team.custom-tools.load": {
|
|
927
941
|
"method": "GET",
|
|
928
942
|
"path": "/api/custom-tools/admin/team"
|