@pageproof/sdk-pr 337.0.1620968147689 → 338.0.1621225829831

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.
@@ -65,7 +65,6 @@ declare class Proofs extends API {
65
65
  /**
66
66
  * The Proofs Decisions API.
67
67
  *
68
- * @private
69
68
  * @type {ProofsDecisions}
70
69
  */
71
70
  decisions: ProofsDecisions;
@@ -1,6 +1,17 @@
1
1
  export default ProofsDecisions;
2
2
  declare class ProofsDecisions extends API {
3
3
  constructor(client: any);
4
+ /**
5
+ * Loads all decisions on proof.
6
+ *
7
+ * @example <caption>Load decisions on proof</caption>
8
+ * const proofDecisions = await client.proofs.decisions.load('PCY4GPLA3G3HKICQ');
9
+ * console.log(proofDecisions);
10
+ *
11
+ * @param {string} proofId The proof id
12
+ * @returns {Promise<Array<ReviewerDecision>>}
13
+ */
14
+ load(proofId: string): Promise<ReviewerDecision[]>;
4
15
  /**
5
16
  * Get decision options on a proof for viewing user.
6
17
  *
@@ -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 ProofsDecisions=function(_API){_inherits(ProofsDecisions,_API);function ProofsDecisions(){_classCallCheck(this,ProofsDecisions);return _possibleConstructorReturn(this,_API.apply(this,arguments))}ProofsDecisions.prototype.getOptions=function getOptions(proofId){return this.client.request("proofs.decisions.get-options",{proofId:proofId,type:"options"}).then(function(response){return{currentDecision:response.data.currentDecision,options:response.data.options}})};ProofsDecisions.prototype.leaveDecision=function leaveDecision(proofId,decisionId){return this.client.request("proofs.decisions.leave-decision",{proofId:proofId,decisionId:decisionId})};return ProofsDecisions}(_API3.default);exports.default=ProofsDecisions;
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 ProofsDecisions=function(_API){_inherits(ProofsDecisions,_API);function ProofsDecisions(){_classCallCheck(this,ProofsDecisions);return _possibleConstructorReturn(this,_API.apply(this,arguments))}ProofsDecisions.prototype.load=function load(proofId){return this.client.request("proofs.decisions.load",{proofId:proofId}).then(function(response){return response.data.decisions})};ProofsDecisions.prototype.getOptions=function getOptions(proofId){return this.client.request("proofs.decisions.get-options",{proofId:proofId,type:"options"}).then(function(response){return{currentDecision:response.data.currentDecision,options:response.data.options}})};ProofsDecisions.prototype.leaveDecision=function leaveDecision(proofId,decisionId){return this.client.request("proofs.decisions.leave-decision",{proofId:proofId,decisionId:decisionId})};return ProofsDecisions}(_API3.default);exports.default=ProofsDecisions;
@@ -425,6 +425,11 @@
425
425
  "path": "/api/proofs/update/decision",
426
426
  "body": ["proofId", "decision"]
427
427
  },
428
+ "proofs.decisions.load": {
429
+ "method": "GET",
430
+ "path": "/api/decisions/proofs",
431
+ "chain": ["proofId"]
432
+ },
428
433
  "proofs.decisions.get-options": {
429
434
  "method": "GET",
430
435
  "path": "/api/decisions/proofs",