@pageproof/sdk-pr 326.0.1620971390972 → 326.0.1621823020138
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 +12 -0
- package/lib/api/Proofs.d.ts +0 -1
- package/lib/api/ProofsDecisions.d.ts +11 -0
- package/lib/api/ProofsDecisions.js +1 -1
- package/lib/network/endpoints.json +5 -0
- package/lib/pageproof.js +1 -1
- package/lib/types/ReviewerDecision.d.ts +13 -0
- package/lib/types/ReviewerDecision.js +1 -0
- package/lib/types/ReviewerDecisionUser.d.ts +21 -0
- package/lib/types/ReviewerDecisionUser.js +1 -0
- package/lib/util/comments/convertToDraft.js +4 -2
- package/lib/util/comments/renderHTML.js +19 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.0.0-beta.168
|
|
4
|
+
|
|
5
|
+
Released on the 24th of May 2021.
|
|
6
|
+
|
|
7
|
+
- [[#326](https://github.com/PageProofCom/sdk/pull/326)] Added support for public proofs (includes support for custom key-pairs - which is a feature that allows additional/custom key-pairs to be added to the SDK instance for the use of decrypting and encrypting envelopes).
|
|
8
|
+
|
|
9
|
+
## 2.0.0-beta.167
|
|
10
|
+
|
|
11
|
+
Released on the 21st of May 2021.
|
|
12
|
+
|
|
13
|
+
- [[#341](https://github.com/PageProofCom/sdk/pull/341)] Added support for generating html for proof comments styled with lists, superscript, or subscript.
|
|
14
|
+
|
|
3
15
|
## 2.0.0-beta.166
|
|
4
16
|
|
|
5
17
|
Released on the 11th of May 2021.
|
package/lib/api/Proofs.d.ts
CHANGED
|
@@ -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",
|