@pageproof/sdk-pr 716.0.1787304651138 → 718.0.1787790646783

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.
@@ -9,10 +9,23 @@ 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>;
16
29
  /**
17
30
  * Generates a chronological audit of every comment, reply, label and status
18
31
  * change on the proof.
@@ -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})};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;
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;
@@ -1123,7 +1123,8 @@
1123
1123
  "version": 2,
1124
1124
  "method": "GET",
1125
1125
  "path": "/api/proofs/audit/summary",
1126
- "chain": ["proofId"]
1126
+ "chain": ["proofId"],
1127
+ "query": ["allVersions"]
1127
1128
  },
1128
1129
  "proofs.audit.comments": {
1129
1130
  "version": 2,