@pageproof/sdk-pr 696.0.1778852270802 → 696.0.1791512428396

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.
@@ -92,6 +92,30 @@ declare class Comments extends API {
92
92
  * @returns {Promise}
93
93
  */
94
94
  delete(commentId: string): Promise<any>;
95
+ /**
96
+ * Adds a label to a comment.
97
+ *
98
+ * Labels are an Enterprise feature, gated by the team's `enableLabels` setting. The request is
99
+ * idempotent: adding a label that is already applied resolves successfully without emitting an
100
+ * event.
101
+ *
102
+ * @param {string} commentId The comment id
103
+ * @param {string} labelId The label id to add
104
+ * @returns {Promise<string[]>} Resolves with the comment's full set of label ids after the change
105
+ */
106
+ addLabel(commentId: string, labelId: string): Promise<string[]>;
107
+ /**
108
+ * Removes a label from a comment.
109
+ *
110
+ * Labels are an Enterprise feature, gated by the team's `enableLabels` setting. The request is
111
+ * idempotent: removing a label that is not applied resolves successfully without emitting an
112
+ * event.
113
+ *
114
+ * @param {string} commentId The comment id
115
+ * @param {string} labelId The label id to remove
116
+ * @returns {Promise<string[]>} Resolves with the comment's full set of label ids after the change
117
+ */
118
+ removeLabel(commentId: string, labelId: string): Promise<string[]>;
95
119
  /**
96
120
  * Loads a proof's comments.
97
121
  *
@@ -1 +1 @@
1
- "use strict";exports.__esModule=true;var _API2=require("./API");var _API3=_interopRequireDefault(_API2);var _Comment=require("../models/Comment");var _Comment2=_interopRequireDefault(_Comment);var _CommentState=require("../enum/CommentState");var _CommentState2=_interopRequireDefault(_CommentState);var _constants=require("../util/constants");var _sort=require("../util/sort");var _v=require("../util/comments/v2");var _extractMentions=require("../util/comments/extractMentions");var _extractMentions2=_interopRequireDefault(_extractMentions);var _parseComment=require("../util/comments/parseComment");var _parseComment2=_interopRequireDefault(_parseComment);var _creationToken=require("../util/creationToken");var _throttle=require("../util/throttle");var _throttle2=_interopRequireDefault(_throttle);var _getCommentState=require("../util/comments/getCommentState");var _getCommentState2=_interopRequireDefault(_getCommentState);var _serializePins=require("../util/pins/serializePins");var _CommentsImport=require("./CommentsImport");var _CommentsImport2=_interopRequireDefault(_CommentsImport);var _bluffer=require("../bluffer");var _bluffer2=_interopRequireDefault(_bluffer);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 getCommentDataFromPages(pages){var comments=[];Object.keys(pages).forEach(function(pageNumber){pages[pageNumber].Comments.forEach(function(commentData){comments.push(commentData)})});return comments}var _sortPages=(0,_sort.sortObjectsByKey)("pageNumber");var _sortCreatedDateDESC=(0,_sort.sortObjectsByKey)("createdDate",true);var _sortCreatedDateASC=(0,_sort.sortObjectsByKey)("createdDate",false);var sortComments=(0,_sort.combineSort)(_sortPages,_sortCreatedDateDESC);var sortReplies=(0,_sort.combineSort)(_sortPages,_sortCreatedDateASC);function mapComments(commentsData){var comments=[];var replies=[];commentsData.forEach(function(commentData){var entity=(new _Comment2.default).fromComment(commentData);if(entity.parentCommentId){replies.push(entity)}else{comments.push(entity)}});comments.sort(sortComments);var commentIds=comments.map(function(c){return c.id});var sortByParentCommentIndex=(0,_sort.sortObjectsBy)(function(r){return commentIds.indexOf(r.parentCommentId)},true);replies.sort((0,_sort.combineSort)(sortReplies,sortByParentCommentIndex));return comments.concat(replies)}var Comments=function(_API){_inherits(Comments,_API);function Comments(client){_classCallCheck(this,Comments);var _this=_possibleConstructorReturn(this,_API.call(this,client));_this.import=new _CommentsImport2.default(client);return _this}Comments.prototype._mark=function _mark(commentId,state,value){if(Object.keys(_CommentState2.default).map(function(key){return _CommentState2.default[key]}).indexOf(state)===-1){throw new Error('Cannot mark comment state "'+state+'".')}var TODO=_CommentState2.default.TODO,DONE=_CommentState2.default.DONE,UNMARKED=_CommentState2.default.UNMARKED;var data={commentId:commentId};switch(state){case UNMARKED:{data.change=0;data.done=0;break}case TODO:{data.change=value?1:0;data.done=0;break}case DONE:{data.done=value?1:0;break}default:{break}}return this.client.request("comments.state.update",data).then(function(response){return(0,_getCommentState2.default)(response.data)})};Comments.prototype._markAll=function _markAll(proofId,commentIds,state,value){if(Object.keys(_CommentState2.default).map(function(key){return _CommentState2.default[key]}).indexOf(state)===-1){throw new Error('Cannot mark comment state "'+state+'".')}var TODO=_CommentState2.default.TODO,DONE=_CommentState2.default.DONE,UNMARKED=_CommentState2.default.UNMARKED;var data={proofId:proofId,commentIds:commentIds};switch(state){case UNMARKED:{data.change=0;data.done=0;break}case TODO:{data.change=value?1:0;data.done=0;break}case DONE:{data.done=value?1:0;break}default:{break}}return this.client.request("comments.state.multiple-update",data).then(function(response){return response.data.map(function(comment){return{commentId:comment.CommentId,commentState:(0,_getCommentState2.default)(comment)}})})};Comments.prototype.mark=function mark(commentId,state){return this._mark(commentId,state,true)};Comments.prototype.unmark=function unmark(commentId,state){return this._mark(commentId,state,false)};Comments.prototype.markAll=function markAll(proofId,commentIds,state){return this._markAll(proofId,commentIds,state,true)};Comments.prototype.unmarkAll=function unmarkAll(proofId,commentIds,state){return this._markAll(proofId,commentIds,state,false)};Comments.prototype.delete=function _delete(commentId){return this.client.request("comments.delete",{commentId:commentId})};Comments.prototype.load=function load(_options){var _this2=this;var options=typeof _options==="string"?{proofId:_options}:_options;var proofId=options.proofId,_options$pageNumber=options.pageNumber,pageNumber=_options$pageNumber===undefined?null:_options$pageNumber,_options$sinceDate=options.sinceDate,sinceDate=_options$sinceDate===undefined?null:_options$sinceDate,_options$async=options.async,async=_options$async===undefined?false:_options$async,_options$decrypt=options.decrypt,decrypt=_options$decrypt===undefined?true:_options$decrypt,onDecryptComment=options.onDecryptComment,onDecryptComments=options.onDecryptComments,_options$onDecryptCom=options.onDecryptCommentsThrottleMs,onDecryptCommentsThrottleMs=_options$onDecryptCom===undefined?1e3:_options$onDecryptCom,onDecryptError=options.onDecryptError;var sinceDateISO=sinceDate?sinceDate.toISOString().match(_constants.ISO_REGEX)[0]:_constants.DEFAULT_ISO_DATE;var payload={proofId:proofId,page:pageNumber,timestamp:sinceDateISO};return this.client.request(pageNumber!==null?"comments.load-page":"comments.load-all",payload).then(function(response){var comments=mapComments(response.data.Pages?getCommentDataFromPages(response.data.Pages):response.data);var wait=Promise.resolve();if(decrypt){var scheduled=[];var pendingBatch=[];var scheduleOnDecryptComments=onDecryptComments?(0,_throttle2.default)(function(){if(pendingBatch.length){onDecryptComments(pendingBatch);pendingBatch=[]}},onDecryptCommentsThrottleMs):function(){};var cached=Promise.all(comments.map(function(comment){return _this2.client.cache.auto(_constants.COMMENT_CACHE_PREFIX+comment.comment$,function(resolve){scheduled.push({comment:comment,resolve:resolve})}).then(function(rawComment){if(rawComment){comment.fromRawComment(rawComment)}return comment})}));wait=wait.then(function(){return cached});wait=wait.then(function(){var decrypted=scheduled.map(function(_ref){var comment=_ref.comment,resolve=_ref.resolve;return _this2.client.crypto().decryptComment(comment.comment$,comment.envelope,_this2.client.keyPairs.getPrivateKeyPEMs()).then(function(rawComment){comment.fromRawComment(rawComment);resolve(rawComment);if(onDecryptComment){onDecryptComment(comment)}pendingBatch.push(comment);scheduleOnDecryptComments()}).catch(function(err){if(onDecryptError){onDecryptError(err,comment)}if(!async){return Promise.reject(err)}return undefined})});if(!async){return Promise.all(decrypted)}return null})}return wait.then(function(){return comments})})};Comments.prototype.create=function create(_ref2){var _this3=this;var raw=_ref2.raw,tokens=_ref2.tokens,proofId=_ref2.proofId,_ref2$pageNumber=_ref2.pageNumber,pageNumber=_ref2$pageNumber===undefined?1:_ref2$pageNumber,pin=_ref2.pin,pins=_ref2.pins,mediaTime=_ref2.mediaTime,mediaDuration=_ref2.mediaDuration,parentCommentId=_ref2.parentCommentId,metadata=_ref2.metadata,sourceMetadata=_ref2.sourceMetadata,state=_ref2.state,autoState=_ref2.autoState,isPrivate=_ref2.isPrivate,retryCreationToken=_ref2.creationToken;var mentions=[];var serialized=raw||(0,_v.serialize)(tokens);{var parsed=tokens||(0,_parseComment2.default)(raw);mentions.push.apply(mentions,(0,_extractMentions2.default)(parsed))}var pinList=[];var boxFill=void 0;if(pins){pinList=pinList.concat(pins)}else if(pin){pinList.push(pin)}var primaryPin=pinList[0];if(primaryPin){if(primaryPin.fill)boxFill=primaryPin.fill;if(mediaTime)primaryPin.time=mediaTime;if(mediaDuration)primaryPin.duration=mediaDuration}var creationToken=retryCreationToken||(0,_creationToken.generateCreationToken)();return this.client.crypto().encryptComment(serialized,this.client.keyPairs.getPublicKeyPEMs()).then(function(_ref3){var envelope=_ref3.envelope,comment$=_ref3.comment$;return{proofId:proofId,page:parentCommentId?undefined:pageNumber,envelope:envelope,encryptedComment:comment$,xy:(0,_serializePins.serializePins)(pinList),boxFillImage:boxFill?boxFill.image:undefined,boxFillType:boxFill?boxFill.type:undefined,parent:parentCommentId||undefined,mentions:mentions,metadata:metadata?JSON.stringify(metadata):"{}",sourceMetadata:sourceMetadata,creationToken:creationToken,change:state===_CommentState2.default.TODO?"1":undefined,done:state===_CommentState2.default.DONE?"1":undefined,autoState:autoState,private:typeof isPrivate!=="undefined"?isPrivate?"1":"0":undefined}}).then(function(requestData){return _this3.client.request("comments.create",requestData).then(function(response){return(new _Comment2.default).fromComment(response.data).fromRawComment(serialized)})}).catch(function(err){if(err){err.creationToken=creationToken}return Promise.reject(err)})};Comments.prototype.loadContext=function loadContext(commentId){var _this4=this;return this.client.request("comments.load-context",{commentId:commentId}).then(function(response){return _this4.client.crypto().decryptImage(response.data,_this4.client.keyPairs.getPrivateKeyPEMs())}).then(function(imageBase64){var bluffer=new _bluffer2.default;return bluffer.createBase64(imageBase64)})};return Comments}(_API3.default);exports.default=Comments;
1
+ "use strict";exports.__esModule=true;var _API2=require("./API");var _API3=_interopRequireDefault(_API2);var _Comment=require("../models/Comment");var _Comment2=_interopRequireDefault(_Comment);var _CommentState=require("../enum/CommentState");var _CommentState2=_interopRequireDefault(_CommentState);var _constants=require("../util/constants");var _sort=require("../util/sort");var _v=require("../util/comments/v2");var _extractMentions=require("../util/comments/extractMentions");var _extractMentions2=_interopRequireDefault(_extractMentions);var _parseComment=require("../util/comments/parseComment");var _parseComment2=_interopRequireDefault(_parseComment);var _creationToken=require("../util/creationToken");var _throttle=require("../util/throttle");var _throttle2=_interopRequireDefault(_throttle);var _getCommentState=require("../util/comments/getCommentState");var _getCommentState2=_interopRequireDefault(_getCommentState);var _serializePins=require("../util/pins/serializePins");var _CommentsImport=require("./CommentsImport");var _CommentsImport2=_interopRequireDefault(_CommentsImport);var _bluffer=require("../bluffer");var _bluffer2=_interopRequireDefault(_bluffer);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 getCommentDataFromPages(pages){var comments=[];Object.keys(pages).forEach(function(pageNumber){pages[pageNumber].Comments.forEach(function(commentData){comments.push(commentData)})});return comments}var _sortPages=(0,_sort.sortObjectsByKey)("pageNumber");var _sortCreatedDateDESC=(0,_sort.sortObjectsByKey)("createdDate",true);var _sortCreatedDateASC=(0,_sort.sortObjectsByKey)("createdDate",false);var sortComments=(0,_sort.combineSort)(_sortPages,_sortCreatedDateDESC);var sortReplies=(0,_sort.combineSort)(_sortPages,_sortCreatedDateASC);function mapComments(commentsData){var comments=[];var replies=[];commentsData.forEach(function(commentData){var entity=(new _Comment2.default).fromComment(commentData);if(entity.parentCommentId){replies.push(entity)}else{comments.push(entity)}});comments.sort(sortComments);var commentIds=comments.map(function(c){return c.id});var sortByParentCommentIndex=(0,_sort.sortObjectsBy)(function(r){return commentIds.indexOf(r.parentCommentId)},true);replies.sort((0,_sort.combineSort)(sortReplies,sortByParentCommentIndex));return comments.concat(replies)}var Comments=function(_API){_inherits(Comments,_API);function Comments(client){_classCallCheck(this,Comments);var _this=_possibleConstructorReturn(this,_API.call(this,client));_this.import=new _CommentsImport2.default(client);return _this}Comments.prototype._mark=function _mark(commentId,state,value){if(Object.keys(_CommentState2.default).map(function(key){return _CommentState2.default[key]}).indexOf(state)===-1){throw new Error('Cannot mark comment state "'+state+'".')}var TODO=_CommentState2.default.TODO,DONE=_CommentState2.default.DONE,UNMARKED=_CommentState2.default.UNMARKED;var data={commentId:commentId};switch(state){case UNMARKED:{data.change=0;data.done=0;break}case TODO:{data.change=value?1:0;data.done=0;break}case DONE:{data.done=value?1:0;break}default:{break}}return this.client.request("comments.state.update",data).then(function(response){return(0,_getCommentState2.default)(response.data)})};Comments.prototype._markAll=function _markAll(proofId,commentIds,state,value){if(Object.keys(_CommentState2.default).map(function(key){return _CommentState2.default[key]}).indexOf(state)===-1){throw new Error('Cannot mark comment state "'+state+'".')}var TODO=_CommentState2.default.TODO,DONE=_CommentState2.default.DONE,UNMARKED=_CommentState2.default.UNMARKED;var data={proofId:proofId,commentIds:commentIds};switch(state){case UNMARKED:{data.change=0;data.done=0;break}case TODO:{data.change=value?1:0;data.done=0;break}case DONE:{data.done=value?1:0;break}default:{break}}return this.client.request("comments.state.multiple-update",data).then(function(response){return response.data.map(function(comment){return{commentId:comment.CommentId,commentState:(0,_getCommentState2.default)(comment)}})})};Comments.prototype.mark=function mark(commentId,state){return this._mark(commentId,state,true)};Comments.prototype.unmark=function unmark(commentId,state){return this._mark(commentId,state,false)};Comments.prototype.markAll=function markAll(proofId,commentIds,state){return this._markAll(proofId,commentIds,state,true)};Comments.prototype.unmarkAll=function unmarkAll(proofId,commentIds,state){return this._markAll(proofId,commentIds,state,false)};Comments.prototype.delete=function _delete(commentId){return this.client.request("comments.delete",{commentId:commentId})};Comments.prototype.addLabel=function addLabel(commentId,labelId){return this.client.request("comments.label.add",{commentId:commentId,labelId:labelId}).then(function(response){return response.data.LabelIds||[]})};Comments.prototype.removeLabel=function removeLabel(commentId,labelId){return this.client.request("comments.label.remove",{commentId:commentId,labelId:labelId}).then(function(response){return response.data.LabelIds||[]})};Comments.prototype.load=function load(_options){var _this2=this;var options=typeof _options==="string"?{proofId:_options}:_options;var proofId=options.proofId,_options$pageNumber=options.pageNumber,pageNumber=_options$pageNumber===undefined?null:_options$pageNumber,_options$sinceDate=options.sinceDate,sinceDate=_options$sinceDate===undefined?null:_options$sinceDate,_options$async=options.async,async=_options$async===undefined?false:_options$async,_options$decrypt=options.decrypt,decrypt=_options$decrypt===undefined?true:_options$decrypt,onDecryptComment=options.onDecryptComment,onDecryptComments=options.onDecryptComments,_options$onDecryptCom=options.onDecryptCommentsThrottleMs,onDecryptCommentsThrottleMs=_options$onDecryptCom===undefined?1e3:_options$onDecryptCom,onDecryptError=options.onDecryptError;var sinceDateISO=sinceDate?sinceDate.toISOString().match(_constants.ISO_REGEX)[0]:_constants.DEFAULT_ISO_DATE;var payload={proofId:proofId,page:pageNumber,timestamp:sinceDateISO};return this.client.request(pageNumber!==null?"comments.load-page":"comments.load-all",payload).then(function(response){var comments=mapComments(response.data.Pages?getCommentDataFromPages(response.data.Pages):response.data);var wait=Promise.resolve();if(decrypt){var scheduled=[];var pendingBatch=[];var scheduleOnDecryptComments=onDecryptComments?(0,_throttle2.default)(function(){if(pendingBatch.length){onDecryptComments(pendingBatch);pendingBatch=[]}},onDecryptCommentsThrottleMs):function(){};var cached=Promise.all(comments.map(function(comment){return _this2.client.cache.auto(_constants.COMMENT_CACHE_PREFIX+comment.comment$,function(resolve){scheduled.push({comment:comment,resolve:resolve})}).then(function(rawComment){if(rawComment){comment.fromRawComment(rawComment)}return comment})}));wait=wait.then(function(){return cached});wait=wait.then(function(){var decrypted=scheduled.map(function(_ref){var comment=_ref.comment,resolve=_ref.resolve;return _this2.client.crypto().decryptComment(comment.comment$,comment.envelope,_this2.client.keyPairs.getPrivateKeyPEMs()).then(function(rawComment){comment.fromRawComment(rawComment);resolve(rawComment);if(onDecryptComment){onDecryptComment(comment)}pendingBatch.push(comment);scheduleOnDecryptComments()}).catch(function(err){if(onDecryptError){onDecryptError(err,comment)}if(!async){return Promise.reject(err)}return undefined})});if(!async){return Promise.all(decrypted)}return null})}return wait.then(function(){return comments})})};Comments.prototype.create=function create(_ref2){var _this3=this;var raw=_ref2.raw,tokens=_ref2.tokens,proofId=_ref2.proofId,_ref2$pageNumber=_ref2.pageNumber,pageNumber=_ref2$pageNumber===undefined?1:_ref2$pageNumber,pin=_ref2.pin,pins=_ref2.pins,mediaTime=_ref2.mediaTime,mediaDuration=_ref2.mediaDuration,parentCommentId=_ref2.parentCommentId,metadata=_ref2.metadata,sourceMetadata=_ref2.sourceMetadata,state=_ref2.state,autoState=_ref2.autoState,isPrivate=_ref2.isPrivate,retryCreationToken=_ref2.creationToken;var mentions=[];var serialized=raw||(0,_v.serialize)(tokens);{var parsed=tokens||(0,_parseComment2.default)(raw);mentions.push.apply(mentions,(0,_extractMentions2.default)(parsed))}var pinList=[];var boxFill=void 0;if(pins){pinList=pinList.concat(pins)}else if(pin){pinList.push(pin)}var primaryPin=pinList[0];if(primaryPin){if(primaryPin.fill)boxFill=primaryPin.fill;if(mediaTime)primaryPin.time=mediaTime;if(mediaDuration)primaryPin.duration=mediaDuration}var creationToken=retryCreationToken||(0,_creationToken.generateCreationToken)();return this.client.crypto().encryptComment(serialized,this.client.keyPairs.getPublicKeyPEMs()).then(function(_ref3){var envelope=_ref3.envelope,comment$=_ref3.comment$;return{proofId:proofId,page:parentCommentId?undefined:pageNumber,envelope:envelope,encryptedComment:comment$,xy:(0,_serializePins.serializePins)(pinList),boxFillImage:boxFill?boxFill.image:undefined,boxFillType:boxFill?boxFill.type:undefined,parent:parentCommentId||undefined,mentions:mentions,metadata:metadata?JSON.stringify(metadata):"{}",sourceMetadata:sourceMetadata,creationToken:creationToken,change:state===_CommentState2.default.TODO?"1":undefined,done:state===_CommentState2.default.DONE?"1":undefined,autoState:autoState,private:typeof isPrivate!=="undefined"?isPrivate?"1":"0":undefined}}).then(function(requestData){return _this3.client.request("comments.create",requestData).then(function(response){return(new _Comment2.default).fromComment(response.data).fromRawComment(serialized)})}).catch(function(err){if(err){err.creationToken=creationToken}return Promise.reject(err)})};Comments.prototype.loadContext=function loadContext(commentId){var _this4=this;return this.client.request("comments.load-context",{commentId:commentId}).then(function(response){return _this4.client.crypto().decryptImage(response.data,_this4.client.keyPairs.getPrivateKeyPEMs())}).then(function(imageBase64){var bluffer=new _bluffer2.default;return bluffer.createBase64(imageBase64)})};return Comments}(_API3.default);exports.default=Comments;
@@ -63,5 +63,63 @@ declare class Integrations extends API {
63
63
  * @returns {Promise}
64
64
  */
65
65
  updateConfiguration(integrationKey: string, key: string, value: string): Promise<any>;
66
+ /**
67
+ * Lists the folders inside the connected OneDrive, for picking the folder
68
+ * approved proofs are delivered to.
69
+ *
70
+ * @example <caption>Listing the folders in the drive root</caption>
71
+ * const admin = await client.admin();
72
+ * const folders = await admin.team.integrations.getOneDriveFolders();
73
+ *
74
+ * @example <caption>Listing the subfolders of a folder</caption>
75
+ * const folders = await admin.team.integrations.getOneDriveFolders(folderId);
76
+ *
77
+ * @since 2.24.0
78
+ * @param {string} [itemId] The id of the folder to list; omit for the drive root
79
+ * @returns {Promise<Array<{ id: string, name: string }>>}
80
+ */
81
+ getOneDriveFolders(itemId?: string): Promise<Array<{
82
+ id: string;
83
+ name: string;
84
+ }>>;
85
+ /**
86
+ * Gets the list of Jira sites associated with a pending connection so the user
87
+ * can pick which one to finalise the integration against.
88
+ *
89
+ * Used when the OAuth callback found that the consenting user has access to more
90
+ * than one Atlassian site, and so the SDK consumer needs to prompt the user to
91
+ * pick which site to connect to.
92
+ *
93
+ * @example <caption>Retrieving the sites for a pending Jira connection</caption>
94
+ * const admin = await client.admin();
95
+ * const sites = await admin.team.integrations.getJiraPendingConnection(pendingId);
96
+ *
97
+ * @since 2.16.0
98
+ * @param {string} pendingId The id of the pending connection (returned from the OAuth callback)
99
+ * @returns {Promise<Array<{ cloudId: string, url: string, name: string, avatarUrl: string }>>}
100
+ */
101
+ getJiraPendingConnection(pendingId: string): Promise<Array<{
102
+ cloudId: string;
103
+ url: string;
104
+ name: string;
105
+ avatarUrl: string;
106
+ }>>;
107
+ /**
108
+ * Finalises a pending Jira connection by selecting which Atlassian site to use.
109
+ *
110
+ * The chosen `cloudId` must be one of the sites returned by
111
+ * {@link Integrations#getJiraPendingConnection}. On success the integration
112
+ * configuration is upserted and the pending connection is consumed.
113
+ *
114
+ * @example <caption>Completing a pending Jira connection</caption>
115
+ * const admin = await client.admin();
116
+ * await admin.team.integrations.completeJiraPendingConnection(pendingId, cloudId);
117
+ *
118
+ * @since 2.16.0
119
+ * @param {string} pendingId The id of the pending connection (returned from the OAuth callback)
120
+ * @param {string} cloudId The Atlassian cloud id of the site the user picked
121
+ * @returns {Promise}
122
+ */
123
+ completeJiraPendingConnection(pendingId: string, cloudId: string): Promise<any>;
66
124
  }
67
125
  import API from "./API";
@@ -1 +1 @@
1
- "use strict";exports.__esModule=true;var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key]}}}return target};var _API2=require("./API");var _API3=_interopRequireDefault(_API2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var Integrations=function(_API){_inherits(Integrations,_API);function Integrations(client,level){_classCallCheck(this,Integrations);var _this=_possibleConstructorReturn(this,_API.call(this,client));_this.level=level;return _this}Integrations.prototype.configurations=function configurations(){var integrationKeys=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];return this.client.request("integrations.get-configurations",{level:this.level,integration_keys:integrationKeys.join(",")}).then(function(response){if(response.data){return response.data.integrations}return null})};Integrations.prototype.getSetupUrl=function getSetupUrl(integrationKey,params){return this.client.request("integrations.get-setup-url",{params:_extends({},params,{integration_key:integrationKey,level:this.level})}).then(function(response){return{url:response.data.url,windowFeatures:response.data.windowFeatures}})};Integrations.prototype.disable=function disable(integrationKey){return this.client.request("integrations.disable",{level:this.level,integration_key:integrationKey})};Integrations.prototype.updateConfiguration=function updateConfiguration(integrationKey,key,value){return this.client.request("integrations.update-configuration",{level:this.level,integrationKey:integrationKey,key:key,value:value})};return Integrations}(_API3.default);exports.default=Integrations;
1
+ "use strict";exports.__esModule=true;var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key]}}}return target};var _API2=require("./API");var _API3=_interopRequireDefault(_API2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var Integrations=function(_API){_inherits(Integrations,_API);function Integrations(client,level){_classCallCheck(this,Integrations);var _this=_possibleConstructorReturn(this,_API.call(this,client));_this.level=level;return _this}Integrations.prototype.configurations=function configurations(){var integrationKeys=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];return this.client.request("integrations.get-configurations",{level:this.level,integration_keys:integrationKeys.join(",")}).then(function(response){if(response.data){return response.data.integrations}return null})};Integrations.prototype.getSetupUrl=function getSetupUrl(integrationKey,params){return this.client.request("integrations.get-setup-url",{params:_extends({},params,{integration_key:integrationKey,level:this.level})}).then(function(response){return{url:response.data.url,windowFeatures:response.data.windowFeatures}})};Integrations.prototype.disable=function disable(integrationKey){return this.client.request("integrations.disable",{level:this.level,integration_key:integrationKey})};Integrations.prototype.updateConfiguration=function updateConfiguration(integrationKey,key,value){return this.client.request("integrations.update-configuration",{level:this.level,integrationKey:integrationKey,key:key,value:value})};Integrations.prototype.getOneDriveFolders=function getOneDriveFolders(itemId){return this.client.request("integrations.one-drive.get-folders",{level:this.level,itemId:itemId||""}).then(function(response){return response.data.folders})};Integrations.prototype.getJiraPendingConnection=function getJiraPendingConnection(pendingId){return this.client.request("integrations.jira.get-pending-connection",{pendingId:pendingId}).then(function(response){return response.data.sites})};Integrations.prototype.completeJiraPendingConnection=function completeJiraPendingConnection(pendingId,cloudId){return this.client.request("integrations.jira.complete-pending-connection",{pendingId:pendingId,cloudId:cloudId})};return Integrations}(_API3.default);exports.default=Integrations;
@@ -9,9 +9,36 @@ declare class ProofsAudit extends API {
9
9
  /**
10
10
  * Generates a summary/timeline of the important proof events.
11
11
  *
12
+ * Every proof version is a separate proof ID with its own audit, so passing the
13
+ * ID of an older version returns that version's audit. Pass `allVersions` to get
14
+ * a block per version across the whole version chain instead.
15
+ *
16
+ * The result always holds a `summaries` array, with one block per version, so
17
+ * callers never have to branch on whether `allVersions` was requested. Versions
18
+ * the user has no access to are listed in `versions` with `canAccess: false` and
19
+ * are left out of `summaries`.
20
+ *
12
21
  * @param {string} proofId The proof ID
22
+ * @param {Object} [options]
23
+ * @param {boolean} [options.allVersions=false] Whether to include every accessible version of the proof
13
24
  * @returns {Promise<ProofAuditSummary>}
14
25
  */
15
- summary(proofId: string): Promise<any>;
26
+ summary(proofId: string, { allVersions }?: {
27
+ allVersions: boolean;
28
+ }): Promise<ProofAuditSummary>;
29
+ /**
30
+ * Generates a chronological audit of every comment, reply, label and status
31
+ * change on the proof.
32
+ *
33
+ * Non-enterprise proof teams only receive comment status change events; the
34
+ * full comment history is an enterprise feature.
35
+ *
36
+ * @param {string} proofId The proof ID
37
+ * @returns {Promise<{summary: Array, isEnterprise: boolean}>}
38
+ */
39
+ comments(proofId: string): Promise<{
40
+ summary: Array;
41
+ isEnterprise: boolean;
42
+ }>;
16
43
  }
17
44
  import API from "./API";
@@ -1 +1 @@
1
- "use strict";exports.__esModule=true;var _API2=require("./API");var _API3=_interopRequireDefault(_API2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var ProofsAudit=function(_API){_inherits(ProofsAudit,_API);function ProofsAudit(){_classCallCheck(this,ProofsAudit);return _possibleConstructorReturn(this,_API.apply(this,arguments))}ProofsAudit.prototype.summary=function summary(proofId){return this.client.request("proofs.audit.summary",{proofId:proofId}).then(function(response){return response.data.summary})};return ProofsAudit}(_API3.default);exports.default=ProofsAudit;
1
+ "use strict";exports.__esModule=true;var _API2=require("./API");var _API3=_interopRequireDefault(_API2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var ProofsAudit=function(_API){_inherits(ProofsAudit,_API);function ProofsAudit(){_classCallCheck(this,ProofsAudit);return _possibleConstructorReturn(this,_API.apply(this,arguments))}ProofsAudit.prototype.summary=function summary(proofId){var _ref=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},allVersions=_ref.allVersions;return this.client.request("proofs.audit.summary",{proofId:proofId,allVersions:allVersions}).then(function(response){return response.data})};ProofsAudit.prototype.comments=function comments(proofId){return this.client.request("proofs.audit.comments",{proofId:proofId}).then(function(response){return response.data})};return ProofsAudit}(_API3.default);exports.default=ProofsAudit;
@@ -61,9 +61,10 @@ declare class ProofsGroups extends API {
61
61
  * @param {string} [options.name] The name of the group to update
62
62
  * @param {string} [options.isOwnedByTeam] If group can be shared with team
63
63
  * @param {{name: string}} [options.folder] The folder the group belongs to
64
+ * @param {string} [options.parentGroupUuid] The id of the parent group that the group belongs to
64
65
  * @returns {Promise<ProofGroup>}
65
66
  */
66
- update(groupId: string, { name, isOwnedByTeam, folder, }?: object): Promise<ProofGroup>;
67
+ update(groupId: string, { name, isOwnedByTeam, folder, parentGroupUuid, }?: object): Promise<ProofGroup>;
67
68
  /**
68
69
  * Removes a proof from a group.
69
70
  *
@@ -1 +1 @@
1
- "use strict";exports.__esModule=true;var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key]}}}return target};var _templateObject=_taggedTemplateLiteralLoose(["\n query sdk_CollectionProgress($collectionId: ID!) {\n collectionProgress(id: $collectionId) {\n status\n completedProofsCount\n totalProofsCount\n }\n }\n"],["\n query sdk_CollectionProgress($collectionId: ID!) {\n collectionProgress(id: $collectionId) {\n status\n completedProofsCount\n totalProofsCount\n }\n }\n"]);var _API2=require("./API");var _API3=_interopRequireDefault(_API2);var _ProofGroup=require("../models/ProofGroup");var _ProofGroup2=_interopRequireDefault(_ProofGroup);var _GroupsOwners=require("./GroupsOwners");var _GroupsOwners2=_interopRequireDefault(_GroupsOwners);var _GroupsWorkflows=require("./GroupsWorkflows");var _GroupsWorkflows2=_interopRequireDefault(_GroupsWorkflows);var _gql=require("../util/gql");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 _taggedTemplateLiteralLoose(strings,raw){strings.raw=raw;return strings}function mapResponseToGroup(response){return(new _ProofGroup2.default).fromProofGroup(response.data)}var GET_COLLECTION_PROGRESS=(0,_gql.gql)(_templateObject);var ProofsGroups=function(_API){_inherits(ProofsGroups,_API);function ProofsGroups(client){_classCallCheck(this,ProofsGroups);var _this=_possibleConstructorReturn(this,_API.call(this,client));_this.owners=new _GroupsOwners2.default(client);_this.workflows=new _GroupsWorkflows2.default(client);return _this}ProofsGroups.prototype.create=function create(){var _ref=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},name=_ref.name,isOwnedByTeam=_ref.isOwnedByTeam;return this.client.request("proofs.groups.create",{name:name,ownedByTeam:isOwnedByTeam}).then(mapResponseToGroup)};ProofsGroups.prototype.load=function load(groupId){return this.client.request("proofs.groups.load",{groupId:groupId}).then(mapResponseToGroup)};ProofsGroups.prototype.getProgress=function getProgress(groupId){return this.client.graphql(GET_COLLECTION_PROGRESS,{collectionId:groupId}).then(function(response){return response.data.collectionProgress})};ProofsGroups.prototype.ready=function ready(groupId){return this.client.request("proofs.groups.ready",{groupId:groupId})};ProofsGroups.prototype.update=function update(groupId,_ref2){var name=_ref2.name,isOwnedByTeam=_ref2.isOwnedByTeam,folder=_ref2.folder;return this.client.request("proofs.groups.update",{groupId:groupId,name:name,ownedByTeam:isOwnedByTeam,folderName:folder&&folder.name}).then(mapResponseToGroup)};ProofsGroups.prototype.removeProof=function removeProof(proofId){return this.client.request("proofs.groups.remove-proof",{proofId:proofId})};ProofsGroups.prototype.addProof=function addProof(groupId,proofId){return this.client.request("proofs.groups.add-proof",{groupId:groupId,proofId:proofId})};ProofsGroups.prototype.delete=function _delete(groupId){return this.client.request("proofs.groups.delete",{groupId:groupId})};ProofsGroups.prototype.archive=function archive(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}if(args.every(function(arg){return typeof arg==="string"})){return this.client.request("proofs.groups.archive",{groupIds:args})}else{var defaultOptions={archiveProofs:false};var groupIdOrGroupIds=args[0],_args$=args[1],options=_args$===undefined?defaultOptions:_args$;var groupIds=[].concat(groupIdOrGroupIds);return this.client.request("proofs.groups.archive",_extends({groupIds:groupIds},options))}};ProofsGroups.prototype.reopen=function reopen(){for(var _len2=arguments.length,groupIds=Array(_len2),_key2=0;_key2<_len2;_key2++){groupIds[_key2]=arguments[_key2]}return this.client.request("proofs.groups.reopen",{groupIds:groupIds})};return ProofsGroups}(_API3.default);exports.default=ProofsGroups;
1
+ "use strict";exports.__esModule=true;var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key]}}}return target};var _templateObject=_taggedTemplateLiteralLoose(["\n query sdk_CollectionProgress($collectionId: ID!) {\n collectionProgress(id: $collectionId) {\n status\n completedProofsCount\n totalProofsCount\n }\n }\n"],["\n query sdk_CollectionProgress($collectionId: ID!) {\n collectionProgress(id: $collectionId) {\n status\n completedProofsCount\n totalProofsCount\n }\n }\n"]);var _API2=require("./API");var _API3=_interopRequireDefault(_API2);var _ProofGroup=require("../models/ProofGroup");var _ProofGroup2=_interopRequireDefault(_ProofGroup);var _GroupsOwners=require("./GroupsOwners");var _GroupsOwners2=_interopRequireDefault(_GroupsOwners);var _GroupsWorkflows=require("./GroupsWorkflows");var _GroupsWorkflows2=_interopRequireDefault(_GroupsWorkflows);var _gql=require("../util/gql");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 _taggedTemplateLiteralLoose(strings,raw){strings.raw=raw;return strings}function mapResponseToGroup(response){return(new _ProofGroup2.default).fromProofGroup(response.data)}var GET_COLLECTION_PROGRESS=(0,_gql.gql)(_templateObject);var ProofsGroups=function(_API){_inherits(ProofsGroups,_API);function ProofsGroups(client){_classCallCheck(this,ProofsGroups);var _this=_possibleConstructorReturn(this,_API.call(this,client));_this.owners=new _GroupsOwners2.default(client);_this.workflows=new _GroupsWorkflows2.default(client);return _this}ProofsGroups.prototype.create=function create(){var _ref=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},name=_ref.name,isOwnedByTeam=_ref.isOwnedByTeam;return this.client.request("proofs.groups.create",{name:name,ownedByTeam:isOwnedByTeam}).then(mapResponseToGroup)};ProofsGroups.prototype.load=function load(groupId){return this.client.request("proofs.groups.load",{groupId:groupId}).then(mapResponseToGroup)};ProofsGroups.prototype.getProgress=function getProgress(groupId){return this.client.graphql(GET_COLLECTION_PROGRESS,{collectionId:groupId}).then(function(response){return response.data.collectionProgress})};ProofsGroups.prototype.ready=function ready(groupId){return this.client.request("proofs.groups.ready",{groupId:groupId})};ProofsGroups.prototype.update=function update(groupId,_ref2){var name=_ref2.name,isOwnedByTeam=_ref2.isOwnedByTeam,folder=_ref2.folder,parentGroupUuid=_ref2.parentGroupUuid;return this.client.request("proofs.groups.update",{groupId:groupId,name:name,ownedByTeam:isOwnedByTeam,folderName:folder&&folder.name,parentGroupUuid:parentGroupUuid}).then(mapResponseToGroup)};ProofsGroups.prototype.removeProof=function removeProof(proofId){return this.client.request("proofs.groups.remove-proof",{proofId:proofId})};ProofsGroups.prototype.addProof=function addProof(groupId,proofId){return this.client.request("proofs.groups.add-proof",{groupId:groupId,proofId:proofId})};ProofsGroups.prototype.delete=function _delete(groupId){return this.client.request("proofs.groups.delete",{groupId:groupId})};ProofsGroups.prototype.archive=function archive(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}if(args.every(function(arg){return typeof arg==="string"})){return this.client.request("proofs.groups.archive",{groupIds:args})}else{var defaultOptions={archiveProofs:false};var groupIdOrGroupIds=args[0],_args$=args[1],options=_args$===undefined?defaultOptions:_args$;var groupIds=[].concat(groupIdOrGroupIds);return this.client.request("proofs.groups.archive",_extends({groupIds:groupIds},options))}};ProofsGroups.prototype.reopen=function reopen(){for(var _len2=arguments.length,groupIds=Array(_len2),_key2=0;_key2<_len2;_key2++){groupIds[_key2]=arguments[_key2]}return this.client.request("proofs.groups.reopen",{groupIds:groupIds})};return ProofsGroups}(_API3.default);exports.default=ProofsGroups;
@@ -50,7 +50,7 @@ declare class Users extends API {
50
50
  * @example <caption>By email</caption>
51
51
  * const url = client.users.avatarUrl('user@example.com', { size: 120 });
52
52
  *
53
- * @since v2.19.0
53
+ * @since v2.27.0
54
54
  * @param {string} idOrEmail The user's id (preferred) or email address
55
55
  * @param {object} [options]
56
56
  * @param {number} [options.size] Requested pixel size; server snaps to nearest bucket
package/lib/api/Users.js CHANGED
@@ -1 +1 @@
1
- "use strict";exports.__esModule=true;var _API2=require("./API");var _API3=_interopRequireDefault(_API2);var _User=require("../models/User");var _User2=_interopRequireDefault(_User);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 transformResponseUser(response){return response.data.length>0?(new _User2.default).fromUser(response.data[0]):(new _User2.default).fromUser(response.data)}function transformResponseUserArray(response){if(response.data.length){return(new _User2.default).fromUser(response.data[0])}return null}var Users=function(_API){_inherits(Users,_API);function Users(){_classCallCheck(this,Users);return _possibleConstructorReturn(this,_API.apply(this,arguments))}Users.prototype.byEmail=function byEmail(email){return this.client.request("users.by-email",{email:email}).then(transformResponseUserArray)};Users.prototype.byId=function byId(userId){return this.client.request("users.by-id",{userId:userId}).then(transformResponseUser)};Users.prototype.invite=function invite(email){return this.client.request("users.invite",{email:email}).then(transformResponseUser)};Users.prototype.requestRoleAccess=function requestRoleAccess(requestedRoleAccess,requestedPageName){return this.client.request("users.request-role-access",{requestedRoleAccess:requestedRoleAccess,requestedPageName:requestedPageName})};Users.prototype.avatarUrl=function avatarUrl(idOrEmail){var _ref=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},size=_ref.size;var host=this.client.options.avatarEndpoint||"https://avatar.pageproof.com";var query=size?"?size="+size:"";return host+"/-/"+encodeURIComponent(idOrEmail)+query};return Users}(_API3.default);exports.default=Users;
1
+ "use strict";exports.__esModule=true;var _API2=require("./API");var _API3=_interopRequireDefault(_API2);var _User=require("../models/User");var _User2=_interopRequireDefault(_User);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 transformResponseUser(response){return response.data.length>0?(new _User2.default).fromUser(response.data[0]):(new _User2.default).fromUser(response.data)}function transformResponseUserArray(response){if(response.data.length){return(new _User2.default).fromUser(response.data[0])}return null}var Users=function(_API){_inherits(Users,_API);function Users(){_classCallCheck(this,Users);return _possibleConstructorReturn(this,_API.apply(this,arguments))}Users.prototype.byEmail=function byEmail(email){return this.client.request("users.by-email",{email:email}).then(transformResponseUserArray)};Users.prototype.byId=function byId(userId){return this.client.request("users.by-id",{userId:userId}).then(transformResponseUser)};Users.prototype.invite=function invite(email){return this.client.request("users.invite",{email:email}).then(transformResponseUser)};Users.prototype.requestRoleAccess=function requestRoleAccess(requestedRoleAccess,requestedPageName){return this.client.request("users.request-role-access",{requestedRoleAccess:requestedRoleAccess,requestedPageName:requestedPageName})};Users.prototype.avatarUrl=function avatarUrl(idOrEmail){var _ref=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},size=_ref.size;var endpoint=this.client.options.avatarEndpoint||"https://avatar.pageproof.com";var host=endpoint.replace(/\/+$/,"");var query=size?"?size="+size:"";return host+"/-/"+encodeURIComponent(idOrEmail)+query};return Users}(_API3.default);exports.default=Users;
@@ -59,6 +59,7 @@ declare class TeamFeatures extends API {
59
59
  * @param {boolean} options.intelligence.licenseIntelligenceInsightsInProofing Whether PI Insights in Proofing is licensed for the team.
60
60
  * @param {boolean} options.intelligence.enableIntelligenceInsightsInProofing Whether PI Insights in Proofing is enabled for the team.
61
61
  * @param {boolean} options.intelligence.defaultIntelligenceInsightsInProofing The default setting for PI Insights in Proofing for the team.
62
+ * @param {boolean} options.intelligence.enableIntelligenceInsightsTeamOnlyVisibility Whether PI Insights in Proofing is only visible to the proof owner's team.
62
63
  * @param {boolean} options.intelligence.enableIntelligenceInsightsCommentsInProofing Whether PI Comments in Proofing is enabled for the team.
63
64
  * @param {boolean} options.intelligence.defaultIntelligenceInsightsCommentsInProofing The default setting for PI Comments in Proofing for the team.
64
65
  * @param {boolean} options.intelligence.licenseIntelligenceInsightsOnDashboard Whether PI Insights on Dashboard is licensed for the team.
@@ -69,6 +70,7 @@ declare class TeamFeatures extends API {
69
70
  * @param {boolean} options.intelligence.enableSmartCheckCr Whether Smart Check: CR is enabled for the team's proofs.
70
71
  * @param {boolean} options.general.enableCelebrations Whether celebrations are enabled for the team.
71
72
  * @param {boolean} options.proofs.enableProofSoftDeletion Whether the scheduled deletion feature is enabled for the team.
73
+ * @param {boolean} options.general.enableLabels Whether labels are enabled for the team.
72
74
  * @returns {Promise}
73
75
  */
74
76
  update({ emails, comments, proofs, workflows, addressBook, userGroups, webhooks, intelligence, general, }: {
@@ -97,6 +97,7 @@ var TeamFeatures = function (_API) {
97
97
  * @param {boolean} options.intelligence.licenseIntelligenceInsightsInProofing Whether PI Insights in Proofing is licensed for the team.
98
98
  * @param {boolean} options.intelligence.enableIntelligenceInsightsInProofing Whether PI Insights in Proofing is enabled for the team.
99
99
  * @param {boolean} options.intelligence.defaultIntelligenceInsightsInProofing The default setting for PI Insights in Proofing for the team.
100
+ * @param {boolean} options.intelligence.enableIntelligenceInsightsTeamOnlyVisibility Whether PI Insights in Proofing is only visible to the proof owner's team.
100
101
  * @param {boolean} options.intelligence.enableIntelligenceInsightsCommentsInProofing Whether PI Comments in Proofing is enabled for the team.
101
102
  * @param {boolean} options.intelligence.defaultIntelligenceInsightsCommentsInProofing The default setting for PI Comments in Proofing for the team.
102
103
  * @param {boolean} options.intelligence.licenseIntelligenceInsightsOnDashboard Whether PI Insights on Dashboard is licensed for the team.
@@ -107,6 +108,7 @@ var TeamFeatures = function (_API) {
107
108
  * @param {boolean} options.intelligence.enableSmartCheckCr Whether Smart Check: CR is enabled for the team's proofs.
108
109
  * @param {boolean} options.general.enableCelebrations Whether celebrations are enabled for the team.
109
110
  * @param {boolean} options.proofs.enableProofSoftDeletion Whether the scheduled deletion feature is enabled for the team.
111
+ * @param {boolean} options.general.enableLabels Whether labels are enabled for the team.
110
112
  * @returns {Promise}
111
113
  */
112
114
 
@@ -153,6 +155,7 @@ var TeamFeatures = function (_API) {
153
155
  var licenseIntelligenceInsightsInProofing = intelligence && intelligence.licenseIntelligenceInsightsInProofing;
154
156
  var enableIntelligenceInsightsInProofing = intelligence && intelligence.enableIntelligenceInsightsInProofing;
155
157
  var defaultIntelligenceInsightsInProofing = intelligence && intelligence.defaultIntelligenceInsightsInProofing;
158
+ var enableIntelligenceInsightsTeamOnlyVisibility = intelligence && intelligence.enableIntelligenceInsightsTeamOnlyVisibility;
156
159
  var enableIntelligenceInsightsCommentsInProofing = intelligence && intelligence.enableIntelligenceInsightsCommentsInProofing;
157
160
  var defaultIntelligenceInsightsCommentsInProofing = intelligence && intelligence.defaultIntelligenceInsightsCommentsInProofing;
158
161
  var licenseIntelligenceInsightsOnDashboard = intelligence && intelligence.licenseIntelligenceInsightsOnDashboard;
@@ -167,6 +170,7 @@ var TeamFeatures = function (_API) {
167
170
  var defaultDigitalVerification = proofs && proofs.defaultDigitalVerification;
168
171
  var reauthentication = proofs && proofs.reauthentication;
169
172
  var enableProofSoftDeletion = proofs && proofs.enableProofSoftDeletion;
173
+ var enableLabels = general && general.enableLabels;
170
174
  return this.client.request('admin.team.features.update', {
171
175
  displayComments: displayComments,
172
176
  displayTeamName: displayTeamName,
@@ -196,6 +200,7 @@ var TeamFeatures = function (_API) {
196
200
  licenseIntelligenceInsightsInProofing: licenseIntelligenceInsightsInProofing,
197
201
  enableIntelligenceInsightsInProofing: enableIntelligenceInsightsInProofing,
198
202
  defaultIntelligenceInsightsInProofing: defaultIntelligenceInsightsInProofing,
203
+ enableIntelligenceInsightsTeamOnlyVisibility: enableIntelligenceInsightsTeamOnlyVisibility,
199
204
  enableIntelligenceInsightsCommentsInProofing: enableIntelligenceInsightsCommentsInProofing,
200
205
  defaultIntelligenceInsightsCommentsInProofing: defaultIntelligenceInsightsCommentsInProofing,
201
206
  licenseIntelligenceInsightsOnDashboard: licenseIntelligenceInsightsOnDashboard,
@@ -212,7 +217,8 @@ var TeamFeatures = function (_API) {
212
217
  enableDigitalVerification: enableDigitalVerification,
213
218
  defaultDigitalVerification: defaultDigitalVerification,
214
219
  reauthentication: reauthentication,
215
- enableProofSoftDeletion: enableProofSoftDeletion
220
+ enableProofSoftDeletion: enableProofSoftDeletion,
221
+ enableLabels: enableLabels
216
222
  });
217
223
  };
218
224
 
@@ -184,6 +184,20 @@ declare class Comment {
184
184
  * @type {boolean}
185
185
  */
186
186
  isPrivate: boolean;
187
+ /**
188
+ * User ids of user who have been mentioned in this comment.
189
+ *
190
+ * @type {Array<String>}
191
+ */
192
+ mentionedIds: Array<string>;
193
+ /**
194
+ * The labels currently applied to the comment.
195
+ *
196
+ * Labels are an Enterprise feature, gated by the team's `enableLabels` setting.
197
+ *
198
+ * @type {Label[]}
199
+ */
200
+ labels: Label[];
187
201
  /**
188
202
  * @private
189
203
  * @param {object} commentData The comment object from the server
@@ -199,3 +213,4 @@ declare class Comment {
199
213
  }
200
214
  import User from "./User";
201
215
  import File from "./File";
216
+ import Label from "./Label";
@@ -1 +1 @@
1
- "use strict";exports.__esModule=true;var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key]}}}return target};var _transform=require("./transform");var _transform2=_interopRequireDefault(_transform);var _User=require("./User");var _User2=_interopRequireDefault(_User);var _File=require("./File");var _File2=_interopRequireDefault(_File);var _parseComment=require("../util/comments/parseComment");var _parseComment2=_interopRequireDefault(_parseComment);var _getCommentState=require("../util/comments/getCommentState");var _getCommentState2=_interopRequireDefault(_getCommentState);var _parsePins=require("../util/pins/parsePins");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 commentSchema={id:"CommentId",proofId:"ProofId",pins:function pins(data){return(0,_parsePins.parsePins)(data.XY).map(function(pin,index){if(index===0&&data.BoxFillType){return _extends({},pin,{fill:data.BoxFillType&&{type:data.BoxFillType,image:data.BoxFillImage}})}return pin})},pin:function pin(){return this.pins[0]},user:function user(data){return(new _User2.default).fromUser(data)},comment$:"EncryptedComment",envelope:"Envelope",attachments:function attachments(data){if(data.Attachments){return data.Attachments.map(function(attachment){return(new _File2.default).fromCommentAttachment(_extends({CommentId:data.CommentId},attachment))})}return[]},agreeCount:function agreeCount(data){return data.Agrees.length},pageNumber:(0,_transform.number)("Page"),mediaTime:function mediaTime(){return this.pin&&this.pin.time},mediaDuration:function mediaDuration(){return this.pin&&this.pin.duration},createdDate:(0,_transform.date)("Timestamp"),updatedDate:(0,_transform.date)("Updated"),parentCommentId:(0,_transform.optional)("Parent"),metadata:(0,_transform.json)("Metadata",{}),sourceMetadata:"SourceMetadata",state:function state(data){return(0,_getCommentState2.default)(data)},isPrivate:"Private"};var Comment=function(){function Comment(){_classCallCheck(this,Comment)}Comment.prototype.fromComment=function fromComment(commentData){(0,_transform2.default)(this,commentSchema,commentData);return this};Comment.prototype.fromRawComment=function fromRawComment(rawComment){var parsed=(0,_parseComment2.default)(rawComment);this.raw=rawComment;this.tokens=parsed;return this};return Comment}();exports.default=Comment;
1
+ "use strict";exports.__esModule=true;var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key]}}}return target};var _transform=require("./transform");var _transform2=_interopRequireDefault(_transform);var _User=require("./User");var _User2=_interopRequireDefault(_User);var _File=require("./File");var _File2=_interopRequireDefault(_File);var _Label=require("./Label");var _Label2=_interopRequireDefault(_Label);var _parseComment=require("../util/comments/parseComment");var _parseComment2=_interopRequireDefault(_parseComment);var _getCommentState=require("../util/comments/getCommentState");var _getCommentState2=_interopRequireDefault(_getCommentState);var _parsePins=require("../util/pins/parsePins");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 commentSchema={id:"CommentId",proofId:"ProofId",pins:function pins(data){return(0,_parsePins.parsePins)(data.XY).map(function(pin,index){if(index===0&&data.BoxFillType){return _extends({},pin,{fill:data.BoxFillType&&{type:data.BoxFillType,image:data.BoxFillImage}})}return pin})},pin:function pin(){return this.pins[0]},user:function user(data){return(new _User2.default).fromUser(data)},comment$:"EncryptedComment",envelope:"Envelope",attachments:function attachments(data){if(data.Attachments){return data.Attachments.map(function(attachment){return(new _File2.default).fromCommentAttachment(_extends({CommentId:data.CommentId},attachment))})}return[]},agreeCount:function agreeCount(data){return data.Agrees.length},pageNumber:(0,_transform.number)("Page"),mediaTime:function mediaTime(){return this.pin&&this.pin.time},mediaDuration:function mediaDuration(){return this.pin&&this.pin.duration},createdDate:(0,_transform.date)("Timestamp"),updatedDate:(0,_transform.date)("Updated"),parentCommentId:(0,_transform.optional)("Parent"),metadata:(0,_transform.json)("Metadata",{}),sourceMetadata:"SourceMetadata",state:function state(data){return(0,_getCommentState2.default)(data)},isPrivate:"Private",mentionedIds:"MentionedIds",labels:function labels(data){return(data.Labels||[]).map(function(label){return(new _Label2.default).fromLabel(label)})}};var Comment=function(){function Comment(){_classCallCheck(this,Comment)}Comment.prototype.fromComment=function fromComment(commentData){(0,_transform2.default)(this,commentSchema,commentData);return this};Comment.prototype.fromRawComment=function fromRawComment(rawComment){var parsed=(0,_parseComment2.default)(rawComment);this.raw=rawComment;this.tokens=parsed;return this};return Comment}();exports.default=Comment;
@@ -0,0 +1,36 @@
1
+ export default Label;
2
+ declare class Label {
3
+ /**
4
+ * The label's unique identifier.
5
+ *
6
+ * @type {string}
7
+ */
8
+ id: string;
9
+ /**
10
+ * The display text of the label.
11
+ *
12
+ * @type {string}
13
+ */
14
+ text: string;
15
+ /**
16
+ * The label's color (as a string, e.g. a hex code or named color).
17
+ *
18
+ * @type {string}
19
+ */
20
+ color: string;
21
+ /**
22
+ * Whether the label has been archived.
23
+ *
24
+ * Archived labels are still returned on existing comments, so callers can decide
25
+ * whether to render them differently (e.g. hide or grey-out).
26
+ *
27
+ * @type {boolean}
28
+ */
29
+ isArchived: boolean;
30
+ /**
31
+ * @private
32
+ * @param {object} labelData The label object from the server
33
+ * @returns {Label}
34
+ */
35
+ private fromLabel;
36
+ }
@@ -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 labelSchema={id:"Id",text:"Text",color:"Color",isArchived:"IsArchived"};var Label=function(){function Label(){_classCallCheck(this,Label)}Label.prototype.fromLabel=function fromLabel(labelData){(0,_transform2.default)(this,labelSchema,labelData);return this};return Label}();exports.default=Label;
@@ -476,6 +476,24 @@ declare class Proof {
476
476
  * @type {boolean}
477
477
  */
478
478
  isDigitalVerificationEnabled: boolean;
479
+ /**
480
+ * Whether the proof has proof insights enabled.
481
+ *
482
+ * @type {boolean}
483
+ */
484
+ isProofInsightsEnabled: boolean;
485
+ /**
486
+ * Whether the proof has proof insights on comments enabled.
487
+ *
488
+ * @type {boolean}
489
+ */
490
+ isProofInsightsCommentsEnabled: boolean;
491
+ /**
492
+ * Whether proof insights are only visible to members of this proof's owning team.
493
+ *
494
+ * @type {boolean}
495
+ */
496
+ isIntelligenceInsightsTeamOnlyVisibilityEnabled: boolean;
479
497
  /**
480
498
  * Whether a user is a team admin of this proof.
481
499
  *
@@ -1 +1 @@
1
- "use strict";exports.__esModule=true;var _transform=require("./transform");var _transform2=_interopRequireDefault(_transform);var _ProofState=require("../enum/ProofState");var _ProofState2=_interopRequireDefault(_ProofState);var _ProofStatus=require("../enum/ProofStatus");var _ProofStatus2=_interopRequireDefault(_ProofStatus);var _ProofType=require("../enum/ProofType");var _ProofType2=_interopRequireDefault(_ProofType);var _FileStatus=require("../enum/FileStatus");var _FileStatus2=_interopRequireDefault(_FileStatus);var _StatusMessage=require("../enum/StatusMessage");var _StatusMessage2=_interopRequireDefault(_StatusMessage);var _id=require("../util/id");var _getPercentage=require("../util/getPercentage");var _getPercentage2=_interopRequireDefault(_getPercentage);var _User=require("./User");var _User2=_interopRequireDefault(_User);var _DecisionSummary=require("./DecisionSummary");var _DecisionSummary2=_interopRequireDefault(_DecisionSummary);var _ProofIntegrationReference=require("./ProofIntegrationReference");var _ProofIntegrationReference2=_interopRequireDefault(_ProofIntegrationReference);var _ProofChecklist=require("./ProofChecklist");var _ProofChecklist2=_interopRequireDefault(_ProofChecklist);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function isOverdue(){return this.dueDate&&this.dueDate.getTime()<Date.now()}var proofSchema={id:"ProofId",name:"Title",status:"Status",workflowId:"WorkflowId",proofTemplateId:"ProofTemplateId",version:"Version",dueDate:(0,_transform.date)("DueDate"),createdDate:(0,_transform.date)("CreateDate"),approvedDate:(0,_transform.date)("ApprovedDate"),isLocked:"Locked",isArchived:"Closed",isOverdue:isOverdue,uploaderUserId:"UserId",ownerUserIds:"OwnerIds",editorUserId:"EditorId",editorUserIds:"EditorIds",lockerUserId:"ProofLockerId",messageToReviewers:"Description",messageToOwners:"OwnerMessage",messageToEditor:"EditorMessage",fileId:"FileId",fileExtension:"Extension",fileStatus:"FileStatus",fileMessage:"FileStatusMessage",fileSize:"FileSize",pageCount:(0,_transform.number)("Pages"),commentCount:(0,_transform.number)("ParentComments"),canDownload:(0,_transform.truthy)("DownloadOriginal"),type:"Type",processStatus:"ProcessStatus",recipient:"Recipient",recipientEmail:"RecipientEmail",todoCommentCount:(0,_transform.number)("CountTodoComments"),doneCommentCount:(0,_transform.number)("CountDoneComments"),fileCategory:"FileCategory",isAdminOnProof:"IsAdminOnProof",groupId:"GroupId",canReupload:"CanReupload",hasEditors:"HasEditors",groupName:"GroupName",role:"Role",canOthersEditComments:"FeatureEditComments",canAddCommentReplies:"FeatureCanAddCommentReplies",canHaveGeneralComments:"FeatureGeneralComments",canHavePrivateComments:"FeaturePrivateComments",canAddChecklist:"FeatureCanAddChecklist",hasDecisionsEnabled:"FeatureDecisions",hasColorSeparations:"HasColorSeparations",reference:"Reference",integrationReferences:(0,_transform.each)("IntegrationReferences",function(data){return(new _ProofIntegrationReference2.default).fromProofIntegrationReference(data)}),checklist:function checklist(data){return data.Checklist&&(new _ProofChecklist2.default).fromProofChecklist(data.Checklist)},isReferenceEnabled:"FeatureProofReference",source:"Source",owners:(0,_transform.each)("Owners",function(ownerData){return(new _User2.default).fromUser(ownerData)}),decisionSummary:(0,_transform.each)("Decisions",function(decisionsData){return(new _DecisionSummary2.default).fromDecisionSummary(decisionsData)}),tags:(0,_transform.each)("Tags",function(tag){return tag.Value}),teamId:"TeamId",isPublic:"IsPublic",canBePublic:"FeaturePublicProofs",availableWorkflowRoles:"FeatureAvailableWorkflowRoles",usePreviousVersionDueDate:"FeatureUsePreviousVersionDueDate",canSendShareLink:"FeatureSendShareLink",publicProofKeyPair:function publicProofKeyPair(data){return data.PublicProofKeyPair&&{publicKeyPEM:data.PublicProofKeyPair.PublicKey,privateKeyPEM:data.PublicProofKeyPair.PrivateKey}},canSendMessageToOwners:"FeatureMessageToOwners",workflowMetrics:"WorkflowMetrics",commentVisibility:"CommentVisibility",canHaveCommentVisibility:"FeatureCommentVisibility",importUrl:"ImportURL",priority:"Priority",scheduledDate:(0,_transform.date)("ScheduledDate"),statusMessage:"StatusMessage",isDigitalVerificationEnabled:"IsDigitalVerificationEnabled"};var Proof=function(){function Proof(){_classCallCheck(this,Proof)}Proof.prototype.isUserAdminOfProofTeam=function isUserAdminOfProofTeam(user){return user.isAdmin&&this.teamId===user.teamId};Proof.prototype.getState=function getState(){var state=_ProofState2.default.ACTIVE;if(this.fileStatus===_FileStatus2.default.UPLOADING||!this.fileStatus&&this.statusMessage===_StatusMessage2.default.UPLOADING){state=_ProofState2.default.UPLOADING}else if(this.hasFileError()){state=_ProofState2.default.FILE_ERROR}else if(this.isProcessing()){state=_ProofState2.default.PROCESSING}else if(this.type===_ProofType2.default.BRIEF){switch(this.status){case _ProofStatus2.default.NEW:state=_ProofState2.default.SETUP_NEEDED;break;case _ProofStatus2.default.PROOFING:case _ProofStatus2.default.FINAL_APPROVING:state=_ProofState2.default.AWAITING_PROOF;break;case _ProofStatus2.default.AWAITING_NEW_VERSION:state=_ProofState2.default.AWAITING_PROOF;break;case _ProofStatus2.default.HAS_NEW_VERSION:state=_ProofState2.default.HAS_NEW_VERSION;break;case _ProofStatus2.default.APPROVED:state=_ProofState2.default.APPROVED;break;case _ProofStatus2.default.ARCHIVED:state=_ProofState2.default.ARCHIVED;break;default:state=_ProofState2.default.BRIEFING;break}}else if(this.status===_ProofStatus2.default.ARCHIVED){state=_ProofState2.default.ARCHIVED}else if(this.status===_ProofStatus2.default.TODOS_REQUESTED){state=_ProofState2.default.TODOS_REQUESTED}else if(this.status===_ProofStatus2.default.AWAITING_NEW_VERSION){state=_ProofState2.default.AWAITING_NEW_VERSION}else if(this.status===_ProofStatus2.default.HAS_NEW_VERSION){state=_ProofState2.default.HAS_NEW_VERSION}else if(this.status===_ProofStatus2.default.APPROVED){state=_ProofState2.default.APPROVED}else if(!this.hasWorkflow()){state=_ProofState2.default.PROOFERS_NEEDED}else if(!this.hasWorkflowStarted()){state=_ProofState2.default.NOT_STARTED}else if(this.isOverdue||this.dueDate&&this.dueDate.getTime()<Date.now()){state=_ProofState2.default.OVERDUE}return state};Proof.prototype.getVideoProcessingProgress=function getVideoProcessingProgress(){var percent=0;var message=String(this.fileMessage);if(message){var thumbMatch=/^Thumb-\w+\-([-+]?[0-9]*\.?[0-9]*)/g.exec(message);var videoMatch=/^Video-\w+\-([-+]?[0-9]*\.?[0-9]*)/g.exec(message);if(message.startsWith("Video-Scheduled-")){percent=0}else if(videoMatch){percent=(0,_getPercentage2.default)(parseFloat(videoMatch[1])/100,0,.2)}else if(thumbMatch){percent=(0,_getPercentage2.default)(parseFloat(thumbMatch[1])/100,.8,0)}}return percent};Proof.prototype.hasWorkflowStarted=function hasWorkflowStarted(){return this.hasWorkflow()&&this.status!==_ProofStatus2.default.NEW};Proof.prototype.isProcessing=function isProcessing(){if(this.fileStatus===_FileStatus2.default.UPLOADING||this.fileStatus===_FileStatus2.default.QUEUED||this.fileStatus===_FileStatus2.default.RIPPING){return true}if(!this.fileStatus){return this.statusMessage===_StatusMessage2.default.UPLOADING||this.statusMessage===_StatusMessage2.default.PROCESSING}return false};Proof.prototype.isAwaitingFile=function isAwaitingFile(){return this.source&&this.fileStatus===_FileStatus2.default.CREATED};Proof.prototype.getProcessingProgress=function getProcessingProgress(){switch(this.fileStatus){case _FileStatus2.default.UPLOADING:return.1;case _FileStatus2.default.QUEUED:return.2;case _FileStatus2.default.RIPPING:if(this.fileCategory==="video"){return(0,_getPercentage2.default)(this.getVideoProcessingProgress(),.2,.1).toFixed(2)}return.6;default:return-1}};Proof.prototype.hasWorkflow=function hasWorkflow(){return(0,_id.isWorkflowId)(this.workflowId)};Proof.prototype.hasFile=function hasFile(){return(0,_id.isFileId)(this.fileId)};Proof.prototype.hasFileError=function hasFileError(){if(this.fileStatus===_FileStatus2.default.ERROR){return true}if(!this.fileStatus){if(this.statusMessage===_StatusMessage2.default.FILE_ERROR){return true}if(!this.hasFile()){return true}return false}return false};Proof.prototype.hasEditor=function hasEditor(){return(0,_id.isUserId)(this.editorUserId)};Proof.prototype.hasThumbnail=function hasThumbnail(){if(this.fileStatus===_FileStatus2.default.OK){return true}if(!this.fileStatus&&this.hasFile()){if(this.statusMessage===_StatusMessage2.default.FILE_ERROR||this.statusMessage===_StatusMessage2.default.UPLOADING||this.statusMessage===_StatusMessage2.default.PROCESSING||this.statusMessage===_StatusMessage2.default.AWAITING_FILE||this.statusMessage===_StatusMessage2.default.AWAITING_EMAIL){return false}return true}return false};Proof.prototype.canUserUploadNewVersion=function canUserUploadNewVersion(userId){return this.getState()===_ProofState2.default.AWAITING_NEW_VERSION&&(this.isEditor(userId)||this.isOwner(userId))||this.getState()===_ProofState2.default.AWAITING_PROOF&&(this.isEditor(userId)||this.isRecipient(userId))};Proof.prototype.isOwner=function isOwner(userId){return this.ownerUserIds.indexOf(userId)!==-1};Proof.prototype.isEditor=function isEditor(userId){return this.editorUserIds.indexOf(userId)!==-1};Proof.prototype.isRecipient=function isRecipient(userId){return this.recipient===userId};Proof.prototype.calculateState=function calculateState(){this.state=this.getState()};Proof.prototype.fromProof=function fromProof(proofData){(0,_transform2.default)(this,proofSchema,proofData);this.calculateState();return this};Proof.getStateFromRawData=function getStateFromRawData(proofData){var proof=new Proof;proof.fromProof(proofData);return proof.getState()};return Proof}();exports.default=Proof;
1
+ "use strict";exports.__esModule=true;var _transform=require("./transform");var _transform2=_interopRequireDefault(_transform);var _ProofState=require("../enum/ProofState");var _ProofState2=_interopRequireDefault(_ProofState);var _ProofStatus=require("../enum/ProofStatus");var _ProofStatus2=_interopRequireDefault(_ProofStatus);var _ProofType=require("../enum/ProofType");var _ProofType2=_interopRequireDefault(_ProofType);var _FileStatus=require("../enum/FileStatus");var _FileStatus2=_interopRequireDefault(_FileStatus);var _StatusMessage=require("../enum/StatusMessage");var _StatusMessage2=_interopRequireDefault(_StatusMessage);var _id=require("../util/id");var _getPercentage=require("../util/getPercentage");var _getPercentage2=_interopRequireDefault(_getPercentage);var _User=require("./User");var _User2=_interopRequireDefault(_User);var _DecisionSummary=require("./DecisionSummary");var _DecisionSummary2=_interopRequireDefault(_DecisionSummary);var _ProofIntegrationReference=require("./ProofIntegrationReference");var _ProofIntegrationReference2=_interopRequireDefault(_ProofIntegrationReference);var _ProofChecklist=require("./ProofChecklist");var _ProofChecklist2=_interopRequireDefault(_ProofChecklist);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function isOverdue(){return this.dueDate&&this.dueDate.getTime()<Date.now()}var proofSchema={id:"ProofId",name:"Title",status:"Status",workflowId:"WorkflowId",proofTemplateId:"ProofTemplateId",version:"Version",dueDate:(0,_transform.date)("DueDate"),createdDate:(0,_transform.date)("CreateDate"),approvedDate:(0,_transform.date)("ApprovedDate"),isLocked:"Locked",isArchived:"Closed",isOverdue:isOverdue,uploaderUserId:"UserId",ownerUserIds:"OwnerIds",editorUserId:"EditorId",editorUserIds:"EditorIds",lockerUserId:"ProofLockerId",messageToReviewers:"Description",messageToOwners:"OwnerMessage",messageToEditor:"EditorMessage",fileId:"FileId",fileExtension:"Extension",fileStatus:"FileStatus",fileMessage:"FileStatusMessage",fileSize:"FileSize",pageCount:(0,_transform.number)("Pages"),commentCount:(0,_transform.number)("ParentComments"),canDownload:(0,_transform.truthy)("DownloadOriginal"),type:"Type",processStatus:"ProcessStatus",recipient:"Recipient",recipientEmail:"RecipientEmail",todoCommentCount:(0,_transform.number)("CountTodoComments"),doneCommentCount:(0,_transform.number)("CountDoneComments"),fileCategory:"FileCategory",isAdminOnProof:"IsAdminOnProof",groupId:"GroupId",canReupload:"CanReupload",hasEditors:"HasEditors",groupName:"GroupName",role:"Role",canOthersEditComments:"FeatureEditComments",canAddCommentReplies:"FeatureCanAddCommentReplies",canHaveGeneralComments:"FeatureGeneralComments",canHavePrivateComments:"FeaturePrivateComments",canAddChecklist:"FeatureCanAddChecklist",hasDecisionsEnabled:"FeatureDecisions",hasColorSeparations:"HasColorSeparations",reference:"Reference",integrationReferences:(0,_transform.each)("IntegrationReferences",function(data){return(new _ProofIntegrationReference2.default).fromProofIntegrationReference(data)}),checklist:function checklist(data){return data.Checklist&&(new _ProofChecklist2.default).fromProofChecklist(data.Checklist)},isReferenceEnabled:"FeatureProofReference",source:"Source",owners:(0,_transform.each)("Owners",function(ownerData){return(new _User2.default).fromUser(ownerData)}),decisionSummary:(0,_transform.each)("Decisions",function(decisionsData){return(new _DecisionSummary2.default).fromDecisionSummary(decisionsData)}),tags:(0,_transform.each)("Tags",function(tag){return tag.Value}),teamId:"TeamId",isPublic:"IsPublic",canBePublic:"FeaturePublicProofs",availableWorkflowRoles:"FeatureAvailableWorkflowRoles",usePreviousVersionDueDate:"FeatureUsePreviousVersionDueDate",canSendShareLink:"FeatureSendShareLink",publicProofKeyPair:function publicProofKeyPair(data){return data.PublicProofKeyPair&&{publicKeyPEM:data.PublicProofKeyPair.PublicKey,privateKeyPEM:data.PublicProofKeyPair.PrivateKey}},canSendMessageToOwners:"FeatureMessageToOwners",workflowMetrics:"WorkflowMetrics",commentVisibility:"CommentVisibility",canHaveCommentVisibility:"FeatureCommentVisibility",importUrl:"ImportURL",priority:"Priority",scheduledDate:(0,_transform.date)("ScheduledDate"),statusMessage:"StatusMessage",isDigitalVerificationEnabled:"IsDigitalVerificationEnabled",isProofInsightsEnabled:"FeatureProofInsights",isProofInsightsCommentsEnabled:"FeatureProofInsightsComments",isIntelligenceInsightsTeamOnlyVisibilityEnabled:"FeatureIntelligenceInsightsTeamOnlyVisibility"};var Proof=function(){function Proof(){_classCallCheck(this,Proof)}Proof.prototype.isUserAdminOfProofTeam=function isUserAdminOfProofTeam(user){return user.isAdmin&&this.teamId===user.teamId};Proof.prototype.getState=function getState(){var state=_ProofState2.default.ACTIVE;if(this.fileStatus===_FileStatus2.default.UPLOADING||!this.fileStatus&&this.statusMessage===_StatusMessage2.default.UPLOADING){state=_ProofState2.default.UPLOADING}else if(this.hasFileError()){state=_ProofState2.default.FILE_ERROR}else if(this.isProcessing()){state=_ProofState2.default.PROCESSING}else if(this.type===_ProofType2.default.BRIEF){switch(this.status){case _ProofStatus2.default.NEW:state=_ProofState2.default.SETUP_NEEDED;break;case _ProofStatus2.default.PROOFING:case _ProofStatus2.default.FINAL_APPROVING:state=_ProofState2.default.AWAITING_PROOF;break;case _ProofStatus2.default.AWAITING_NEW_VERSION:state=_ProofState2.default.AWAITING_PROOF;break;case _ProofStatus2.default.HAS_NEW_VERSION:state=_ProofState2.default.HAS_NEW_VERSION;break;case _ProofStatus2.default.APPROVED:state=_ProofState2.default.APPROVED;break;case _ProofStatus2.default.ARCHIVED:state=_ProofState2.default.ARCHIVED;break;default:state=_ProofState2.default.BRIEFING;break}}else if(this.status===_ProofStatus2.default.ARCHIVED){state=_ProofState2.default.ARCHIVED}else if(this.status===_ProofStatus2.default.TODOS_REQUESTED){state=_ProofState2.default.TODOS_REQUESTED}else if(this.status===_ProofStatus2.default.AWAITING_NEW_VERSION){state=_ProofState2.default.AWAITING_NEW_VERSION}else if(this.status===_ProofStatus2.default.HAS_NEW_VERSION){state=_ProofState2.default.HAS_NEW_VERSION}else if(this.status===_ProofStatus2.default.APPROVED){state=_ProofState2.default.APPROVED}else if(!this.hasWorkflow()){state=_ProofState2.default.PROOFERS_NEEDED}else if(!this.hasWorkflowStarted()){state=_ProofState2.default.NOT_STARTED}else if(this.isOverdue||this.dueDate&&this.dueDate.getTime()<Date.now()){state=_ProofState2.default.OVERDUE}return state};Proof.prototype.getVideoProcessingProgress=function getVideoProcessingProgress(){var percent=0;var message=String(this.fileMessage);if(message){var thumbMatch=/^Thumb-\w+\-([-+]?[0-9]*\.?[0-9]*)/g.exec(message);var videoMatch=/^Video-\w+\-([-+]?[0-9]*\.?[0-9]*)/g.exec(message);if(message.startsWith("Video-Scheduled-")){percent=0}else if(videoMatch){percent=(0,_getPercentage2.default)(parseFloat(videoMatch[1])/100,0,.2)}else if(thumbMatch){percent=(0,_getPercentage2.default)(parseFloat(thumbMatch[1])/100,.8,0)}}return percent};Proof.prototype.hasWorkflowStarted=function hasWorkflowStarted(){return this.hasWorkflow()&&this.status!==_ProofStatus2.default.NEW};Proof.prototype.isProcessing=function isProcessing(){if(this.fileStatus===_FileStatus2.default.UPLOADING||this.fileStatus===_FileStatus2.default.QUEUED||this.fileStatus===_FileStatus2.default.RIPPING){return true}if(!this.fileStatus){return this.statusMessage===_StatusMessage2.default.UPLOADING||this.statusMessage===_StatusMessage2.default.PROCESSING}return false};Proof.prototype.isAwaitingFile=function isAwaitingFile(){return this.source&&this.fileStatus===_FileStatus2.default.CREATED};Proof.prototype.getProcessingProgress=function getProcessingProgress(){switch(this.fileStatus){case _FileStatus2.default.UPLOADING:return.1;case _FileStatus2.default.QUEUED:return.2;case _FileStatus2.default.RIPPING:if(this.fileCategory==="video"){return(0,_getPercentage2.default)(this.getVideoProcessingProgress(),.2,.1).toFixed(2)}return.6;default:return-1}};Proof.prototype.hasWorkflow=function hasWorkflow(){return(0,_id.isWorkflowId)(this.workflowId)};Proof.prototype.hasFile=function hasFile(){return(0,_id.isFileId)(this.fileId)};Proof.prototype.hasFileError=function hasFileError(){if(this.fileStatus===_FileStatus2.default.ERROR){return true}if(!this.fileStatus){if(this.statusMessage===_StatusMessage2.default.FILE_ERROR){return true}if(!this.hasFile()){return true}return false}return false};Proof.prototype.hasEditor=function hasEditor(){return(0,_id.isUserId)(this.editorUserId)};Proof.prototype.hasThumbnail=function hasThumbnail(){if(this.fileStatus===_FileStatus2.default.OK){return true}if(!this.fileStatus&&this.hasFile()){if(this.statusMessage===_StatusMessage2.default.FILE_ERROR||this.statusMessage===_StatusMessage2.default.UPLOADING||this.statusMessage===_StatusMessage2.default.PROCESSING||this.statusMessage===_StatusMessage2.default.AWAITING_FILE||this.statusMessage===_StatusMessage2.default.AWAITING_EMAIL){return false}return true}return false};Proof.prototype.canUserUploadNewVersion=function canUserUploadNewVersion(userId){return this.getState()===_ProofState2.default.AWAITING_NEW_VERSION&&(this.isEditor(userId)||this.isOwner(userId))||this.getState()===_ProofState2.default.AWAITING_PROOF&&(this.isEditor(userId)||this.isRecipient(userId))};Proof.prototype.isOwner=function isOwner(userId){return this.ownerUserIds.indexOf(userId)!==-1};Proof.prototype.isEditor=function isEditor(userId){return this.editorUserIds.indexOf(userId)!==-1};Proof.prototype.isRecipient=function isRecipient(userId){return this.recipient===userId};Proof.prototype.calculateState=function calculateState(){this.state=this.getState()};Proof.prototype.fromProof=function fromProof(proofData){(0,_transform2.default)(this,proofSchema,proofData);this.calculateState();return this};Proof.getStateFromRawData=function getStateFromRawData(proofData){var proof=new Proof;proof.fromProof(proofData);return proof.getState()};return Proof}();exports.default=Proof;
@@ -1 +1 @@
1
- "use strict";exports.__esModule=true;var _transform=require("./transform");var _transform2=_interopRequireDefault(_transform);var _Proof=require("./Proof");var _Proof2=_interopRequireDefault(_Proof);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 proofGroupSchema={canAddProofs:"CanAddProofs",id:"GroupId",name:"Name",description:"Description",isEmpty:"IsEmpty",isArchived:"Archived",teamId:"TeamId",createdBy:"CreatedBy",isOwnedByTeam:"OwnedByTeam",folder:function folder(data){if(data.FolderName!==null){return{name:data.FolderName}}return null},proofs:(0,_transform.each)("ProofInfo",function(proofData){return(new _Proof2.default).fromProof(proofData)})};var ProofGroup=function(){function ProofGroup(){_classCallCheck(this,ProofGroup)}ProofGroup.prototype.isUserAdminOfGroupTeam=function isUserAdminOfGroupTeam(user){return user.isAdmin&&this.teamId===user.teamId};ProofGroup.prototype.fromProofGroup=function fromProofGroup(proofGroupData){(0,_transform2.default)(this,proofGroupSchema,proofGroupData);return this};return ProofGroup}();exports.default=ProofGroup;
1
+ "use strict";exports.__esModule=true;var _transform=require("./transform");var _transform2=_interopRequireDefault(_transform);var _Proof=require("./Proof");var _Proof2=_interopRequireDefault(_Proof);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 proofGroupSchema={canAddProofs:"CanAddProofs",id:"GroupId",name:"Name",description:"Description",isEmpty:"IsEmpty",isArchived:"Archived",teamId:"TeamId",createdBy:"CreatedBy",isOwnedByTeam:"OwnedByTeam",folder:function folder(data){if(data.FolderName!==null){return{name:data.FolderName}}return null},proofs:(0,_transform.each)("ProofInfo",function(proofData){return(new _Proof2.default).fromProof(proofData)}),parentGroupUuid:"ParentGroupUuid"};var ProofGroup=function(){function ProofGroup(){_classCallCheck(this,ProofGroup)}ProofGroup.prototype.isUserAdminOfGroupTeam=function isUserAdminOfGroupTeam(user){return user.isAdmin&&this.teamId===user.teamId};ProofGroup.prototype.fromProofGroup=function fromProofGroup(proofGroupData){(0,_transform2.default)(this,proofGroupSchema,proofGroupData);return this};return ProofGroup}();exports.default=ProofGroup;
@@ -6,6 +6,18 @@ declare class TeamGeneralFeatures {
6
6
  * @type {boolean}
7
7
  */
8
8
  enableCelebrations: boolean;
9
+ /**
10
+ * Whether labels feature is licensed for the team.
11
+ *
12
+ * @type {boolean}
13
+ */
14
+ licenseLabels: boolean;
15
+ /**
16
+ * Whether the labels feature is enabled for the team.
17
+ *
18
+ * @type {boolean}
19
+ */
20
+ enableLabels: boolean;
9
21
  /** @private */
10
22
  private fromTeamGeneralFeatures;
11
23
  }
@@ -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 TeamGeneralFeaturesSchema={enableCelebrations:"EnableCelebrations"};var TeamGeneralFeatures=function(){function TeamGeneralFeatures(){_classCallCheck(this,TeamGeneralFeatures)}TeamGeneralFeatures.prototype.fromTeamGeneralFeatures=function fromTeamGeneralFeatures(teamGeneralFeaturesData){(0,_transform2.default)(this,TeamGeneralFeaturesSchema,teamGeneralFeaturesData);return this};return TeamGeneralFeatures}();exports.default=TeamGeneralFeatures;
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 TeamGeneralFeaturesSchema={enableCelebrations:"EnableCelebrations",licenseLabels:"LicenseLabels",enableLabels:"EnableLabels"};var TeamGeneralFeatures=function(){function TeamGeneralFeatures(){_classCallCheck(this,TeamGeneralFeatures)}TeamGeneralFeatures.prototype.fromTeamGeneralFeatures=function fromTeamGeneralFeatures(teamGeneralFeaturesData){(0,_transform2.default)(this,TeamGeneralFeaturesSchema,teamGeneralFeaturesData);return this};return TeamGeneralFeatures}();exports.default=TeamGeneralFeatures;
@@ -40,6 +40,12 @@ declare class TeamIntelligenceFeatures {
40
40
  * @type {boolean}
41
41
  */
42
42
  defaultIntelligenceInsightsInProofing: boolean;
43
+ /**
44
+ * Whether PI Insights in Proofing is only visible to members of the proof's owning team.
45
+ *
46
+ * @type {boolean}
47
+ */
48
+ enableIntelligenceInsightsTeamOnlyVisibility: boolean;
43
49
  /**
44
50
  * Whether PI Comments in Proofing is enabled for the team.
45
51
  *
@@ -1 +1 @@
1
- "use strict";exports.__esModule=true;var _transform=require("./transform");var _transform2=_interopRequireDefault(_transform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var TeamIntelligenceFeatureSchema={enableIntelligence:"EnableIntelligence",enableSmartTags:"EnableIntelligenceSmartTags",enableSmartCheckCr:"EnableIntelligenceSmartCheckCr",licenseIntelligenceInsightsInProofing:"LicenseIntelligenceInsightsInProofing",enableIntelligenceInsightsInProofing:"EnableIntelligenceInsightsInProofing",defaultIntelligenceInsightsInProofing:"DefaultIntelligenceInsightsInProofing",enableIntelligenceInsightsCommentsInProofing:"EnableIntelligenceInsightsCommentsInProofing",defaultIntelligenceInsightsCommentsInProofing:"DefaultIntelligenceInsightsCommentsInProofing",licenseIntelligenceInsightsOnDashboard:"LicenseIntelligenceInsightsOnDashboard",enableIntelligenceInsightsOnDashboard:"EnableIntelligenceInsightsOnDashboard",licenseIntelligenceInsightsInReports:"LicenseIntelligenceInsightsInReports",enableIntelligenceInsightsInReports:"EnableIntelligenceInsightsInReports"};var TeamIntelligenceFeatures=function(){function TeamIntelligenceFeatures(){_classCallCheck(this,TeamIntelligenceFeatures)}TeamIntelligenceFeatures.prototype.fromTeamIntelligenceFeatures=function fromTeamIntelligenceFeatures(teamIntelligenceFeaturesData){(0,_transform2.default)(this,TeamIntelligenceFeatureSchema,teamIntelligenceFeaturesData);return this};return TeamIntelligenceFeatures}();exports.default=TeamIntelligenceFeatures;
1
+ "use strict";exports.__esModule=true;var _transform=require("./transform");var _transform2=_interopRequireDefault(_transform);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var TeamIntelligenceFeatureSchema={enableIntelligence:"EnableIntelligence",enableSmartTags:"EnableIntelligenceSmartTags",enableSmartCheckCr:"EnableIntelligenceSmartCheckCr",licenseIntelligenceInsightsInProofing:"LicenseIntelligenceInsightsInProofing",enableIntelligenceInsightsInProofing:"EnableIntelligenceInsightsInProofing",defaultIntelligenceInsightsInProofing:"DefaultIntelligenceInsightsInProofing",enableIntelligenceInsightsTeamOnlyVisibility:"EnableIntelligenceInsightsTeamOnlyVisibility",enableIntelligenceInsightsCommentsInProofing:"EnableIntelligenceInsightsCommentsInProofing",defaultIntelligenceInsightsCommentsInProofing:"DefaultIntelligenceInsightsCommentsInProofing",licenseIntelligenceInsightsOnDashboard:"LicenseIntelligenceInsightsOnDashboard",enableIntelligenceInsightsOnDashboard:"EnableIntelligenceInsightsOnDashboard",licenseIntelligenceInsightsInReports:"LicenseIntelligenceInsightsInReports",enableIntelligenceInsightsInReports:"EnableIntelligenceInsightsInReports"};var TeamIntelligenceFeatures=function(){function TeamIntelligenceFeatures(){_classCallCheck(this,TeamIntelligenceFeatures)}TeamIntelligenceFeatures.prototype.fromTeamIntelligenceFeatures=function fromTeamIntelligenceFeatures(teamIntelligenceFeaturesData){(0,_transform2.default)(this,TeamIntelligenceFeatureSchema,teamIntelligenceFeaturesData);return this};return TeamIntelligenceFeatures}();exports.default=TeamIntelligenceFeatures;
@@ -1,5 +1,6 @@
1
1
  import Comment from "./Comment";
2
2
  import File from "./File";
3
+ import Label from "./Label";
3
4
  import Proof from "./Proof";
4
5
  import ProofGroup from "./ProofGroup";
5
6
  import ProofVersion from "./ProofVersion";
@@ -8,4 +9,4 @@ import User from "./User";
8
9
  import Workflow from "./Workflow";
9
10
  import WorkflowStep from "./WorkflowStep";
10
11
  import WorkflowUser from "./WorkflowUser";
11
- export { Comment, File, Proof, ProofGroup, ProofVersion, Session, User, Workflow, WorkflowStep, WorkflowUser };
12
+ export { Comment, File, Label, Proof, ProofGroup, ProofVersion, Session, User, Workflow, WorkflowStep, WorkflowUser };
@@ -1 +1 @@
1
- "use strict";exports.__esModule=true;exports.WorkflowUser=exports.WorkflowStep=exports.Workflow=exports.User=exports.Session=exports.ProofVersion=exports.ProofGroup=exports.Proof=exports.File=exports.Comment=undefined;var _Comment=require("./Comment");var _Comment2=_interopRequireDefault(_Comment);var _File=require("./File");var _File2=_interopRequireDefault(_File);var _Proof=require("./Proof");var _Proof2=_interopRequireDefault(_Proof);var _ProofGroup=require("./ProofGroup");var _ProofGroup2=_interopRequireDefault(_ProofGroup);var _ProofVersion=require("./ProofVersion");var _ProofVersion2=_interopRequireDefault(_ProofVersion);var _Session=require("./Session");var _Session2=_interopRequireDefault(_Session);var _User=require("./User");var _User2=_interopRequireDefault(_User);var _Workflow=require("./Workflow");var _Workflow2=_interopRequireDefault(_Workflow);var _WorkflowStep=require("./WorkflowStep");var _WorkflowStep2=_interopRequireDefault(_WorkflowStep);var _WorkflowUser=require("./WorkflowUser");var _WorkflowUser2=_interopRequireDefault(_WorkflowUser);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.Comment=_Comment2.default;exports.File=_File2.default;exports.Proof=_Proof2.default;exports.ProofGroup=_ProofGroup2.default;exports.ProofVersion=_ProofVersion2.default;exports.Session=_Session2.default;exports.User=_User2.default;exports.Workflow=_Workflow2.default;exports.WorkflowStep=_WorkflowStep2.default;exports.WorkflowUser=_WorkflowUser2.default;
1
+ "use strict";exports.__esModule=true;exports.WorkflowUser=exports.WorkflowStep=exports.Workflow=exports.User=exports.Session=exports.ProofVersion=exports.ProofGroup=exports.Proof=exports.Label=exports.File=exports.Comment=undefined;var _Comment=require("./Comment");var _Comment2=_interopRequireDefault(_Comment);var _File=require("./File");var _File2=_interopRequireDefault(_File);var _Label=require("./Label");var _Label2=_interopRequireDefault(_Label);var _Proof=require("./Proof");var _Proof2=_interopRequireDefault(_Proof);var _ProofGroup=require("./ProofGroup");var _ProofGroup2=_interopRequireDefault(_ProofGroup);var _ProofVersion=require("./ProofVersion");var _ProofVersion2=_interopRequireDefault(_ProofVersion);var _Session=require("./Session");var _Session2=_interopRequireDefault(_Session);var _User=require("./User");var _User2=_interopRequireDefault(_User);var _Workflow=require("./Workflow");var _Workflow2=_interopRequireDefault(_Workflow);var _WorkflowStep=require("./WorkflowStep");var _WorkflowStep2=_interopRequireDefault(_WorkflowStep);var _WorkflowUser=require("./WorkflowUser");var _WorkflowUser2=_interopRequireDefault(_WorkflowUser);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.Comment=_Comment2.default;exports.File=_File2.default;exports.Label=_Label2.default;exports.Proof=_Proof2.default;exports.ProofGroup=_ProofGroup2.default;exports.ProofVersion=_ProofVersion2.default;exports.Session=_Session2.default;exports.User=_User2.default;exports.Workflow=_Workflow2.default;exports.WorkflowStep=_WorkflowStep2.default;exports.WorkflowUser=_WorkflowUser2.default;