@pageproof/sdk-pr 274.0.1600297006136 → 274.0.1600383388900

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.
@@ -20,10 +20,10 @@ declare class ProofsGroups extends API {
20
20
  * @since v2.0.0-beta.31
21
21
  * @param {object} [option]
22
22
  * @param {string} [options.name] An optional name of the group
23
- * @param {string} [options.ownedByTeam] If group can be shared with team
23
+ * @param {string} [options.isOwnedByTeam] Whether the group should belong to your team
24
24
  * @returns {Promise<ProofGroup>}
25
25
  */
26
- create({ name, ownedByTeam, }?: any): Promise<ProofGroup>;
26
+ create({ name, isOwnedByTeam, }?: any): Promise<ProofGroup>;
27
27
  /**
28
28
  * Loads a single proof group by id.
29
29
  *
@@ -48,10 +48,10 @@ declare class ProofsGroups extends API {
48
48
  * @param {string} groupId The group id
49
49
  * @param {object} [option]
50
50
  * @param {string} [options.name] The name of the group to update
51
- * @param {string} [options.ownedByTeam] If group can be shared with team
51
+ * @param {string} [options.isOwnedByTeam] If group can be shared with team
52
52
  * @returns {Promise<ProofGroup>}
53
53
  */
54
- update(groupId: string, { name, ownedByTeam, }?: any): Promise<ProofGroup>;
54
+ update(groupId: string, { name, isOwnedByTeam, }?: any): Promise<ProofGroup>;
55
55
  /**
56
56
  * Removes a proof from a group.
57
57
  *
@@ -1 +1 @@
1
- "use strict";exports.__esModule=true;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);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 mapResponseToGroup(response){return(new _ProofGroup2.default).fromProofGroup(response.data)}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,_ref$ownedByTeam=_ref.ownedByTeam,ownedByTeam=_ref$ownedByTeam===undefined?false:_ref$ownedByTeam;return this.client.request("proofs.groups.create",{name:name,ownedByTeam:ownedByTeam}).then(mapResponseToGroup)};ProofsGroups.prototype.load=function load(groupId){return this.client.request("proofs.groups.load",{groupId:groupId}).then(mapResponseToGroup)};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,_ref2$ownedByTeam=_ref2.ownedByTeam,ownedByTeam=_ref2$ownedByTeam===undefined?false:_ref2$ownedByTeam;return this.client.request("proofs.groups.update",{groupId:groupId,name:name,ownedByTeam:ownedByTeam}).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,groupIds=Array(_len),_key=0;_key<_len;_key++){groupIds[_key]=arguments[_key]}return this.client.request("proofs.groups.archive",{groupIds:groupIds})};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 _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);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 mapResponseToGroup(response){return(new _ProofGroup2.default).fromProofGroup(response.data)}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.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;return this.client.request("proofs.groups.update",{groupId:groupId,name:name,ownedByTeam:isOwnedByTeam}).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,groupIds=Array(_len),_key=0;_key<_len;_key++){groupIds[_key]=arguments[_key]}return this.client.request("proofs.groups.archive",{groupIds:groupIds})};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;
@@ -37,7 +37,7 @@ declare class ProofGroup {
37
37
  */
38
38
  proofs: Array<Proof>;
39
39
  /**
40
- * Whether the user can add new proofs to the collection.
40
+ * Whether the user can add new proofs to the group.
41
41
  *
42
42
  * @since v2.0.0-beta.56
43
43
  *
@@ -45,21 +45,27 @@ declare class ProofGroup {
45
45
  */
46
46
  canAddProofs: boolean;
47
47
  /**
48
- * The teamId collection belongs to, if collection owner is a part of team.
48
+ * The group owner's team.
49
49
  *
50
50
  * @since v2.0.0-beta.139
51
- *
52
51
  * @type {string}
53
52
  */
54
53
  teamId: string;
55
54
  /**
56
- * Whether the collection has been shared with team.
55
+ * Whether the group is also owned by the group owner's team.
57
56
  *
58
57
  * @since v2.0.0-beta.139
59
- *
60
58
  * @type {boolean}
61
59
  */
62
- OwnedByTeam: boolean;
60
+ isOwnedByTeam: boolean;
61
+ /**
62
+ * The group owner's Id.
63
+ *
64
+ * @since v2.0.0-beta.139
65
+ *
66
+ * @type {string}
67
+ */
68
+ createdBy: string;
63
69
  /**
64
70
  * @private
65
71
  */
@@ -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",isEmpty:"IsEmpty",isArchived:"Archived",teamId:"TeamId",ownedByTeam:"OwnedByTeam",proofs:(0,_transform.each)("ProofInfo",function(proofData){return(new _Proof2.default).fromProof(proofData)})};var ProofGroup=function(){function ProofGroup(){_classCallCheck(this,ProofGroup)}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",isEmpty:"IsEmpty",isArchived:"Archived",teamId:"TeamId",createdBy:"CreatedBy",isOwnedByTeam:"OwnedByTeam",proofs:(0,_transform.each)("ProofInfo",function(proofData){return(new _Proof2.default).fromProof(proofData)})};var ProofGroup=function(){function ProofGroup(){_classCallCheck(this,ProofGroup)}ProofGroup.prototype.fromProofGroup=function fromProofGroup(proofGroupData){(0,_transform2.default)(this,proofGroupSchema,proofGroupData);return this};return ProofGroup}();exports.default=ProofGroup;