@pageproof/sdk-pr 229.0.1587335296676 → 231.0.1586997564428

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,11 +1,5 @@
1
1
  # Changelog
2
2
 
3
- ## 2.0.0-beta.121
4
-
5
- Released on the 20th of April 2020.
6
-
7
- - [[#229](https://github.com/PageProofCom/sdk/pull/229)] Support for adding multiple editors on different proofs. See [ProofsEditors.bulkAdd](https://docs.pageproof.tech/@pageproof/sdk/beta/class/src/api/ProofsEditors.js~ProofsEditors.html#instance-method-bulkAdd).
8
-
9
3
  ## 2.0.0-beta.120
10
4
 
11
5
  Released on the 16th of March 2020.
@@ -26,43 +26,6 @@ declare class ProofsEditors extends API {
26
26
  * @returns {Promise}
27
27
  */
28
28
  add(proofId: string, editorOrEditors: EditorUserDefinition | EditorUserDefinition[], editorMessage: string): Promise<any>;
29
- /**
30
- * Add a user (or users) as an editor/editors on a proof (or proofs).
31
- *
32
- * @example <caption>Adding an editor (by user id) on a proof with message for editor</caption>
33
- * await client.proofs.editors.addBulk(
34
- * {
35
- * proofId: 'PXJHGJHJVHGHHGHJH',
36
- * editors: [{id: 'ULVRHSLLP69ACHCT'}],
37
- * messageToEditors: 'test msg'
38
- * });
39
- *
40
- * @example <caption>Adding an editor (by user email) on a proof</caption>
41
- * await client.proofs.editors.addBulk(
42
- * {
43
- * proofId: 'PXJHGJHJVHGHHGHJH',
44
- * editors: [{email: 'new-editor@gmail.com'}],
45
- * messageToEditors: 'test msg'
46
- * });
47
- *
48
- * @example <caption>Adding multiple editor on multiple proofs (by user emails/ids)</caption>
49
- * await client.proofs.editors.addBulk([
50
- * {
51
- * proofId: 'PXJHGJHJVHGHHGHJH',
52
- * editors: [{id: 'ULVRHSLLP69ACHCT'}, {email: 'new-editor-y@gmail.com'}],
53
- * messageToEditors: 'test msg for this proof 1'
54
- * },
55
- * {
56
- * proofId: 'PXJHGJHJVHGHHGHJK',
57
- * editors: [{id: 'ULVRHSLLP69ACHCU'}, {email: 'new-editor-x@gmail.com'}],
58
- * messageToEditors: 'test msg for proof 2'
59
- * }]);
60
- *
61
- * @since v2.0.0-beta.121
62
- * @param {ProofsWithEditorsDefinition|Array<ProofsWithEditorsDefinition>} proofsWithEditors Object having the editor or editors to be add along with proofId
63
- * @returns {Promise}
64
- */
65
- addBulk(proofsWithEditors: any): Promise<any>;
66
29
  /**
67
30
  * Removes an editor (or editors) from a proof.
68
31
  *
@@ -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}function transformProofsWithEditors(proofsWithEditors){var proofsWithEditorsArr=[].concat(proofsWithEditors);proofsWithEditorsArr.forEach(function(proofWithEditors){proofWithEditors.editorMessage=proofWithEditors.messageToEditors;delete proofWithEditors.messageToEditors});return proofsWithEditorsArr}var ProofsEditors=function(_API){_inherits(ProofsEditors,_API);function ProofsEditors(){_classCallCheck(this,ProofsEditors);return _possibleConstructorReturn(this,_API.apply(this,arguments))}ProofsEditors.prototype.add=function add(proofId,editorOrEditors,editorMessage){var data={proofId:proofId,editors:[].concat(editorOrEditors),editorMessage:editorMessage===null?"":editorMessage};return this.client.request("proofs.editors.add",data)};ProofsEditors.prototype.addBulk=function addBulk(proofsWithEditors){return this.client.request("proofs.editors.add-bulk",{proofsWithEditors:transformProofsWithEditors(proofsWithEditors)})};ProofsEditors.prototype.remove=function remove(proofId,editorOrEditors){return this.client.request("proofs.editors.remove",{proofId:proofId,editors:[].concat(editorOrEditors)})};ProofsEditors.prototype.replace=function replace(proofId,oldEditorOrEditors,newEditorOrEditors){return this.client.request("proofs.editors.replace",{proofId:proofId,oldEditors:[].concat(oldEditorOrEditors),newEditors:[].concat(newEditorOrEditors)})};ProofsEditors.prototype.set=function set(proofId,allNewEditorOrEditors){return this.client.request("proofs.editors.set",{proofId:proofId,editors:[].concat(allNewEditorOrEditors)})};return ProofsEditors}(_API3.default);exports.default=ProofsEditors;
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 ProofsEditors=function(_API){_inherits(ProofsEditors,_API);function ProofsEditors(){_classCallCheck(this,ProofsEditors);return _possibleConstructorReturn(this,_API.apply(this,arguments))}ProofsEditors.prototype.add=function add(proofId,editorOrEditors,editorMessage){var data={proofId:proofId,editors:[].concat(editorOrEditors),editorMessage:editorMessage===null?"":editorMessage};return this.client.request("proofs.editors.add",data)};ProofsEditors.prototype.remove=function remove(proofId,editorOrEditors){return this.client.request("proofs.editors.remove",{proofId:proofId,editors:[].concat(editorOrEditors)})};ProofsEditors.prototype.replace=function replace(proofId,oldEditorOrEditors,newEditorOrEditors){return this.client.request("proofs.editors.replace",{proofId:proofId,oldEditors:[].concat(oldEditorOrEditors),newEditors:[].concat(newEditorOrEditors)})};ProofsEditors.prototype.set=function set(proofId,allNewEditorOrEditors){return this.client.request("proofs.editors.set",{proofId:proofId,editors:[].concat(allNewEditorOrEditors)})};return ProofsEditors}(_API3.default);exports.default=ProofsEditors;
@@ -244,12 +244,6 @@
244
244
  "path": "/api/proofs/editor/add",
245
245
  "body": ["proofId", "editors", "editorMessage"]
246
246
  },
247
- "proofs.editors.add-bulk": {
248
- "version": 2,
249
- "method": "POST",
250
- "path": "/api/proofs/editor/add/bulk",
251
- "body": ["proofsWithEditors"]
252
- },
253
247
  "proofs.editors.remove": {
254
248
  "version": 2,
255
249
  "method": "POST",