@pageproof/sdk-pr 289.0.1605659865672 → 289.0.1606100663454

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,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.0-beta.148
4
+
5
+ Released on the 23th of November 2020.
6
+
7
+ - [[#289](https://github.com/PageProofCom/sdk/pull/289)] Support for user preference of default reminder. See [Preferences](https://docs.pageproof.tech/@pageproof/sdk/beta/class/src/api/Preferences.js~Preferences.html).
8
+
9
+ ## 2.0.0-beta.147
10
+
11
+ Released on the 23rd of November 2020.
12
+
13
+ - Allowed including parameters when retrieving options for proof integration references.
14
+
15
+ ## 2.0.0-beta.146
16
+
17
+ Released on the 20th of November 2020.
18
+
19
+ - Improved support for the enhancement adapter interface.
3
20
 
4
21
  ## 2.0.0-beta.145
5
22
 
@@ -64,6 +64,8 @@ declare class AngularEnhancementAdapter extends IEnhancementAdapter {
64
64
  /** @private */
65
65
  $exceptionHandler: any;
66
66
  /** @private */
67
+ onMethodFinally(): void;
68
+ /** @private */
67
69
  onMethodReject({ rejected }: {
68
70
  rejected: any;
69
71
  }): void;
@@ -3,34 +3,133 @@ declare class IEnhancementAdapter {
3
3
  static __adapter__: string;
4
4
  /** @private */
5
5
  onClientReady(client: any): void;
6
- /** @abstract */
7
- onMethodBefore(): void;
8
- /** @abstract */
9
- onMethodAfter(): void;
10
- /** @abstract */
11
- onMethodReject(): void;
12
- /** @abstract */
13
- onMethodResolve(): void;
14
- /** @abstract */
15
- onMethodFinally(): void;
16
- /** @abstract */
17
- onMethodThrown(): void;
18
- /** @abstract */
19
- onRequestBefore(): void;
20
- /** @abstract */
21
- onRequestAfter(): void;
22
- /** @abstract */
23
- onRequestReject(): void;
24
- /** @abstract */
25
- onRequestThrottled(): void;
26
- /** @abstract */
27
- onRequestRetry(): void;
28
- /** @abstract */
29
- onRequestUnauthorized(): void;
30
- /** @private */
31
- onRequestDeprecated(): void;
32
- /** @abstract */
33
- onRequestResolve(): void;
34
- /** @abstract */
35
- onRequestFinally(): void;
6
+ /**
7
+ * Called before the method is enhanced.
8
+ *
9
+ * @abstract
10
+ * @param {{ api: API, namespace: string, name: string, displayName: string }} ctx
11
+ */
12
+ onMethodEnhance(ctx: {
13
+ api: any;
14
+ namespace: string;
15
+ name: string;
16
+ displayName: string;
17
+ }): void;
18
+ /**
19
+ * Called before the method is invoked.
20
+ *
21
+ * @abstract
22
+ * @param {{ api: API, namespace: string, name: string, displayName: string }} ctx
23
+ */
24
+ onMethodBefore(ctx: {
25
+ api: any;
26
+ namespace: string;
27
+ name: string;
28
+ displayName: string;
29
+ }): void;
30
+ /**
31
+ * Called after the method has been invoked.
32
+ *
33
+ * @abstract
34
+ * @param {{ api: API, namespace: string, name: string, displayName: string }} ctx
35
+ */
36
+ onMethodAfter(ctx: {
37
+ api: any;
38
+ namespace: string;
39
+ name: string;
40
+ displayName: string;
41
+ }): void;
42
+ /**
43
+ * Called if the method returns a rejected promise.
44
+ *
45
+ * @abstract
46
+ * @param {{ api: API, namespace: string, name: string, displayName: string }} ctx
47
+ */
48
+ onMethodReject(ctx: {
49
+ api: any;
50
+ namespace: string;
51
+ name: string;
52
+ displayName: string;
53
+ }): void;
54
+ /**
55
+ * Called if the method returns a resolved promise.
56
+ *
57
+ * @abstract
58
+ * @param {{ api: API, namespace: string, name: string, displayName: string }} ctx
59
+ */
60
+ onMethodResolve(ctx: {
61
+ api: any;
62
+ namespace: string;
63
+ name: string;
64
+ displayName: string;
65
+ }): void;
66
+ /**
67
+ * Called after the method's promise has either resolved or rejected.
68
+ *
69
+ * @abstract
70
+ * @param {{ api: API, namespace: string, name: string, displayName: string }} ctx
71
+ */
72
+ onMethodFinally(ctx: {
73
+ api: any;
74
+ namespace: string;
75
+ name: string;
76
+ displayName: string;
77
+ }): void;
78
+ /**
79
+ * Called if the method throws an error synchronously.
80
+ *
81
+ * @abstract
82
+ * @param {{ api: API, namespace: string, name: string, displayName: string }} ctx
83
+ */
84
+ onMethodThrown(ctx: {
85
+ api: any;
86
+ namespace: string;
87
+ name: string;
88
+ displayName: string;
89
+ }): void;
90
+ /**
91
+ * @abstract
92
+ * @param {any} event
93
+ */
94
+ onRequestBefore(event: any): void;
95
+ /**
96
+ * @abstract
97
+ * @param {any} event
98
+ */
99
+ onRequestAfter(event: any): void;
100
+ /**
101
+ * @abstract
102
+ * @param {any} event
103
+ */
104
+ onRequestReject(event: any): void;
105
+ /**
106
+ * @abstract
107
+ * @param {any} event
108
+ */
109
+ onRequestThrottled(event: any): void;
110
+ /**
111
+ * @abstract
112
+ * @param {any} event
113
+ */
114
+ onRequestRetry(event: any): void;
115
+ /**
116
+ * @abstract
117
+ * @param {any} event
118
+ */
119
+ onRequestUnauthorized(event: any): void;
120
+ /**
121
+ * @abstract
122
+ * @param {any} event
123
+ */
124
+ onRequestDeprecated(event: any): void;
125
+ /**
126
+ * @abstract
127
+ * @param {any} event
128
+ */
129
+ onRequestResolve(event: any): void;
130
+ /**
131
+ * @abstract
132
+ * @param {any} event
133
+ */
134
+ onRequestFinally(event: any): void;
36
135
  }
@@ -1 +1 @@
1
- "use strict";exports.__esModule=true;var _class,_temp;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var IEnhancementAdapter=(_temp=_class=function(){function IEnhancementAdapter(){_classCallCheck(this,IEnhancementAdapter)}IEnhancementAdapter.prototype.onClientReady=function onClientReady(client){var _this=this;var methods=getNestedMethods(client);methods.forEach(function(definition){enhance(definition.api,definition.name,function(callback){var ctx={api:definition.api,namespace:definition.namespace,name:definition.name,displayName:definition.namespace+"."+definition.name};_this.onMethodBefore(ctx);return function(){var value=void 0;try{value=callback()}catch(err){ctx.error=err;_this.onMethodThrown(ctx);throw err}finally{ctx.value=value;_this.onMethodAfter(ctx);if(value&&typeof value.then==="function"){value.then(function(resolved){ctx.resolved=resolved;_this.onMethodResolve(ctx)},function(rejected){ctx.rejected=rejected;_this.onMethodReject(ctx)}).then(function(){_this.onMethodFinally(ctx)})}}return value}})});client.on("experimental.request.before",function(event){return _this.onRequestBefore(event.data)});client.on("experimental.request.after",function(event){return _this.onRequestAfter(event.data)});client.on("error.response",function(event){return _this.onRequestReject(event.data)});client.on("error.throttled",function(event){return _this.onRequestThrottled(event.data)});client.on("experimental.request.retry",function(event){return _this.onRequestRetry(event.data)});client.on("error.unauthorized",function(event){return _this.onRequestUnauthorized(event.data)});client.on("error.deprecated",function(event){return _this.onRequestDeprecated(event.data)});client.on("experimental.request.resolve",function(event){return _this.onRequestResolve(event.data)});client.on("experimental.request.finally",function(event){return _this.onRequestFinally(event.data)})};IEnhancementAdapter.prototype.onMethodBefore=function onMethodBefore(){};IEnhancementAdapter.prototype.onMethodAfter=function onMethodAfter(){};IEnhancementAdapter.prototype.onMethodReject=function onMethodReject(){};IEnhancementAdapter.prototype.onMethodResolve=function onMethodResolve(){};IEnhancementAdapter.prototype.onMethodFinally=function onMethodFinally(){};IEnhancementAdapter.prototype.onMethodThrown=function onMethodThrown(){};IEnhancementAdapter.prototype.onRequestBefore=function onRequestBefore(){};IEnhancementAdapter.prototype.onRequestAfter=function onRequestAfter(){};IEnhancementAdapter.prototype.onRequestReject=function onRequestReject(){};IEnhancementAdapter.prototype.onRequestThrottled=function onRequestThrottled(){};IEnhancementAdapter.prototype.onRequestRetry=function onRequestRetry(){};IEnhancementAdapter.prototype.onRequestUnauthorized=function onRequestUnauthorized(){};IEnhancementAdapter.prototype.onRequestDeprecated=function onRequestDeprecated(){};IEnhancementAdapter.prototype.onRequestResolve=function onRequestResolve(){};IEnhancementAdapter.prototype.onRequestFinally=function onRequestFinally(){};return IEnhancementAdapter}(),_class.__adapter__="IEnhancementAdapter",_temp);function enhance(obj,name,factory){var original=obj[name];obj[name]=function enhanced(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}var bound=original.bind.apply(original,[this].concat(args));var replacement=factory(bound,this,args);var value=replacement.apply(this,args);return value}}function getNestedMethods(client){var includeTop=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var definitions=[];function scan(api){var prefix=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];var children=Object.getOwnPropertyNames(api).filter(function(name){return api[name].client===client});var proto=Object.getPrototypeOf(api);var methods=Object.keys(proto).filter(function(name){return typeof proto[name]==="function"&&name.indexOf("_")!==0});if(prefix.length||includeTop){methods.forEach(function(name){definitions.push({namespace:prefix.join("."),name:name,api:api})})}children.forEach(function(name){scan(api[name],prefix.concat(name))})}scan(client);return definitions}exports.default=IEnhancementAdapter;
1
+ "use strict";exports.__esModule=true;var _class,_temp;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var IEnhancementAdapter=(_temp=_class=function(){function IEnhancementAdapter(){_classCallCheck(this,IEnhancementAdapter)}IEnhancementAdapter.prototype.onClientReady=function onClientReady(client){var _this=this;var methods=getNestedMethods(client);methods.forEach(function(definition){var ctx={api:definition.api,namespace:definition.namespace,name:definition.name,displayName:definition.namespace+"."+definition.name};_this.onMethodEnhance(ctx);enhance(definition.api,definition.name,function(callback){_this.onMethodBefore(ctx);return function(){var value=void 0;try{value=callback()}catch(err){ctx.error=err;_this.onMethodThrown(ctx);throw err}finally{ctx.value=value;_this.onMethodAfter(ctx);if(value&&typeof value.then==="function"){value.then(function(resolved){ctx.resolved=resolved;_this.onMethodResolve(ctx)},function(rejected){ctx.rejected=rejected;_this.onMethodReject(ctx)}).then(function(){_this.onMethodFinally(ctx)})}}return value}})});client.on("experimental.request.before",function(event){return _this.onRequestBefore(event.data)});client.on("experimental.request.after",function(event){return _this.onRequestAfter(event.data)});client.on("error.response",function(event){return _this.onRequestReject(event.data)});client.on("error.throttled",function(event){return _this.onRequestThrottled(event.data)});client.on("experimental.request.retry",function(event){return _this.onRequestRetry(event.data)});client.on("error.unauthorized",function(event){return _this.onRequestUnauthorized(event.data)});client.on("error.deprecated",function(event){return _this.onRequestDeprecated(event.data)});client.on("experimental.request.resolve",function(event){return _this.onRequestResolve(event.data)});client.on("experimental.request.finally",function(event){return _this.onRequestFinally(event.data)})};IEnhancementAdapter.prototype.onMethodEnhance=function onMethodEnhance(ctx){};IEnhancementAdapter.prototype.onMethodBefore=function onMethodBefore(ctx){};IEnhancementAdapter.prototype.onMethodAfter=function onMethodAfter(ctx){};IEnhancementAdapter.prototype.onMethodReject=function onMethodReject(ctx){};IEnhancementAdapter.prototype.onMethodResolve=function onMethodResolve(ctx){};IEnhancementAdapter.prototype.onMethodFinally=function onMethodFinally(ctx){};IEnhancementAdapter.prototype.onMethodThrown=function onMethodThrown(ctx){};IEnhancementAdapter.prototype.onRequestBefore=function onRequestBefore(event){};IEnhancementAdapter.prototype.onRequestAfter=function onRequestAfter(event){};IEnhancementAdapter.prototype.onRequestReject=function onRequestReject(event){};IEnhancementAdapter.prototype.onRequestThrottled=function onRequestThrottled(event){};IEnhancementAdapter.prototype.onRequestRetry=function onRequestRetry(event){};IEnhancementAdapter.prototype.onRequestUnauthorized=function onRequestUnauthorized(event){};IEnhancementAdapter.prototype.onRequestDeprecated=function onRequestDeprecated(event){};IEnhancementAdapter.prototype.onRequestResolve=function onRequestResolve(event){};IEnhancementAdapter.prototype.onRequestFinally=function onRequestFinally(event){};return IEnhancementAdapter}(),_class.__adapter__="IEnhancementAdapter",_temp);function enhance(obj,name,factory){var original=obj[name];obj[name]=function enhanced(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}var bound=original.bind.apply(original,[this].concat(args));var replacement=factory(bound,this,args);var value=replacement.apply(this,args);return value}}function getNestedMethods(client){var includeTop=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var definitions=[];function scan(api){var prefix=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];var children=Object.getOwnPropertyNames(api).filter(function(name){return api[name].client===client});var proto=Object.getPrototypeOf(api);var methods=Object.keys(proto).filter(function(name){return typeof proto[name]==="function"&&name.indexOf("_")!==0});if(prefix.length||includeTop){methods.forEach(function(name){definitions.push({namespace:prefix.join("."),name:name,api:api})})}children.forEach(function(name){scan(api[name],prefix.concat(name))})}scan(client);return definitions}exports.default=IEnhancementAdapter;
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.PageProofAngularEnhancementAdapter=t():e.PageProofAngularEnhancementAdapter=t()}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},c=n(1),a=function(e){return e&&e.__esModule?e:{default:e}}(c),p=n(2)("AngularEnhancementAdapter"),f={$scope:null,$exceptionHandler:null,module:null},s=function(e){function t(n){o(this,t);var i=r(this,e.call(this));return i.options=u({},f,n),i.$scope=i.options.$scope,i.$exceptionHandler=i.options.$exceptionHandler,i.options.module&&i.options.module.run(["$rootScope","$exceptionHandler",function(e,t){p("Extracting the $rootScope and $exceptionHandler from Angular module"),i.$scope=i.$scope||e,i.$exceptionHandler=i.$exceptionHandler||t}]),i}return i(t,e),t.prototype.onMethodFinally=function(){this.$scope&&!this.$scope.$$phase&&this.$scope.$apply(),this.$scope||p("Unable to tell $scope to re-digest, either module hasn't booted, or no $scope was provided")},t.prototype.onMethodReject=function(e){var t=e.rejected;this.$exceptionHandler?this.$exceptionHandler(t):p("Unable to invoke $exceptionHandler of rejected Promise, check configuration")},t.prototype.onMethodThrown=function(e){var t=e.error;this.$exceptionHandler?this.$exceptionHandler(t):p("Unable to invoke $exceptionHandler of uncaught error, check configuration")},t}(a.default);t.default=s},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n){var o=e[t];e[t]=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=o.bind.apply(o,[this].concat(t));return n(i,this,t).apply(this,t)}}function i(e){function t(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],u=Object.getOwnPropertyNames(r).filter(function(t){return r[t].client===e}),c=Object.getPrototypeOf(r),a=Object.keys(c).filter(function(e){return"function"==typeof c[e]&&0!==e.indexOf("_")});(i.length||n)&&a.forEach(function(e){o.push({namespace:i.join("."),name:e,api:r})}),u.forEach(function(e){t(r[e],i.concat(e))})}var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=[];return t(e),o}t.__esModule=!0;var u,c,a=(c=u=function(){function e(){o(this,e)}return e.prototype.onClientReady=function(e){var t=this;i(e).forEach(function(e){r(e.api,e.name,function(n){var o={api:e.api,namespace:e.namespace,name:e.name,displayName:e.namespace+"."+e.name};return t.onMethodBefore(o),function(){var e=void 0;try{e=n()}catch(e){throw o.error=e,t.onMethodThrown(o),e}finally{o.value=e,t.onMethodAfter(o),e&&"function"==typeof e.then&&e.then(function(e){o.resolved=e,t.onMethodResolve(o)},function(e){o.rejected=e,t.onMethodReject(o)}).then(function(){t.onMethodFinally(o)})}return e}})}),e.on("experimental.request.before",function(e){return t.onRequestBefore(e.data)}),e.on("experimental.request.after",function(e){return t.onRequestAfter(e.data)}),e.on("error.response",function(e){return t.onRequestReject(e.data)}),e.on("error.throttled",function(e){return t.onRequestThrottled(e.data)}),e.on("experimental.request.retry",function(e){return t.onRequestRetry(e.data)}),e.on("error.unauthorized",function(e){return t.onRequestUnauthorized(e.data)}),e.on("error.deprecated",function(e){return t.onRequestDeprecated(e.data)}),e.on("experimental.request.resolve",function(e){return t.onRequestResolve(e.data)}),e.on("experimental.request.finally",function(e){return t.onRequestFinally(e.data)})},e.prototype.onMethodBefore=function(){},e.prototype.onMethodAfter=function(){},e.prototype.onMethodReject=function(){},e.prototype.onMethodResolve=function(){},e.prototype.onMethodFinally=function(){},e.prototype.onMethodThrown=function(){},e.prototype.onRequestBefore=function(){},e.prototype.onRequestAfter=function(){},e.prototype.onRequestReject=function(){},e.prototype.onRequestThrottled=function(){},e.prototype.onRequestRetry=function(){},e.prototype.onRequestUnauthorized=function(){},e.prototype.onRequestDeprecated=function(){},e.prototype.onRequestResolve=function(){},e.prototype.onRequestFinally=function(){},e}(),u.__adapter__="IEnhancementAdapter",c);t.default=a},function(e,t,n){"use strict";e.exports=function e(){return e}}])});
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.PageProofAngularEnhancementAdapter=t():e.PageProofAngularEnhancementAdapter=t()}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},c=n(1),a=function(e){return e&&e.__esModule?e:{default:e}}(c),p=n(2)("AngularEnhancementAdapter"),f={$scope:null,$exceptionHandler:null,module:null},s=function(e){function t(n){o(this,t);var i=r(this,e.call(this));return i.options=u({},f,n),i.$scope=i.options.$scope,i.$exceptionHandler=i.options.$exceptionHandler,i.options.module&&i.options.module.run(["$rootScope","$exceptionHandler",function(e,t){p("Extracting the $rootScope and $exceptionHandler from Angular module"),i.$scope=i.$scope||e,i.$exceptionHandler=i.$exceptionHandler||t}]),i}return i(t,e),t.prototype.onMethodFinally=function(){this.$scope&&!this.$scope.$$phase&&this.$scope.$apply(),this.$scope||p("Unable to tell $scope to re-digest, either module hasn't booted, or no $scope was provided")},t.prototype.onMethodReject=function(e){var t=e.rejected;this.$exceptionHandler?this.$exceptionHandler(t):p("Unable to invoke $exceptionHandler of rejected Promise, check configuration")},t.prototype.onMethodThrown=function(e){var t=e.error;this.$exceptionHandler?this.$exceptionHandler(t):p("Unable to invoke $exceptionHandler of uncaught error, check configuration")},t}(a.default);t.default=s},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n){var o=e[t];e[t]=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=o.bind.apply(o,[this].concat(t));return n(i,this,t).apply(this,t)}}function i(e){function t(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],u=Object.getOwnPropertyNames(r).filter(function(t){return r[t].client===e}),c=Object.getPrototypeOf(r),a=Object.keys(c).filter(function(e){return"function"==typeof c[e]&&0!==e.indexOf("_")});(i.length||n)&&a.forEach(function(e){o.push({namespace:i.join("."),name:e,api:r})}),u.forEach(function(e){t(r[e],i.concat(e))})}var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=[];return t(e),o}t.__esModule=!0;var u,c,a=(c=u=function(){function e(){o(this,e)}return e.prototype.onClientReady=function(e){var t=this;i(e).forEach(function(e){var n={api:e.api,namespace:e.namespace,name:e.name,displayName:e.namespace+"."+e.name};t.onMethodEnhance(n),r(e.api,e.name,function(e){return t.onMethodBefore(n),function(){var o=void 0;try{o=e()}catch(e){throw n.error=e,t.onMethodThrown(n),e}finally{n.value=o,t.onMethodAfter(n),o&&"function"==typeof o.then&&o.then(function(e){n.resolved=e,t.onMethodResolve(n)},function(e){n.rejected=e,t.onMethodReject(n)}).then(function(){t.onMethodFinally(n)})}return o}})}),e.on("experimental.request.before",function(e){return t.onRequestBefore(e.data)}),e.on("experimental.request.after",function(e){return t.onRequestAfter(e.data)}),e.on("error.response",function(e){return t.onRequestReject(e.data)}),e.on("error.throttled",function(e){return t.onRequestThrottled(e.data)}),e.on("experimental.request.retry",function(e){return t.onRequestRetry(e.data)}),e.on("error.unauthorized",function(e){return t.onRequestUnauthorized(e.data)}),e.on("error.deprecated",function(e){return t.onRequestDeprecated(e.data)}),e.on("experimental.request.resolve",function(e){return t.onRequestResolve(e.data)}),e.on("experimental.request.finally",function(e){return t.onRequestFinally(e.data)})},e.prototype.onMethodEnhance=function(e){},e.prototype.onMethodBefore=function(e){},e.prototype.onMethodAfter=function(e){},e.prototype.onMethodReject=function(e){},e.prototype.onMethodResolve=function(e){},e.prototype.onMethodFinally=function(e){},e.prototype.onMethodThrown=function(e){},e.prototype.onRequestBefore=function(e){},e.prototype.onRequestAfter=function(e){},e.prototype.onRequestReject=function(e){},e.prototype.onRequestThrottled=function(e){},e.prototype.onRequestRetry=function(e){},e.prototype.onRequestUnauthorized=function(e){},e.prototype.onRequestDeprecated=function(e){},e.prototype.onRequestResolve=function(e){},e.prototype.onRequestFinally=function(e){},e}(),u.__adapter__="IEnhancementAdapter",c);t.default=a},function(e,t,n){"use strict";e.exports=function e(){return e}}])});
2
2
  //# sourceMappingURL=angular-enhancement-adapter.js.map
@@ -25,8 +25,9 @@ declare class Preferences extends API {
25
25
  * PageProof.Enum.Preference.DEFAULT_DUE_DATE,
26
26
  * PageProof.Enum.Preference.DEFAULT_DUE_TIME,
27
27
  * PageProof.Enum.Preference.DEFAULT_MESSAGE_TO_REVIEWERS,
28
+ * PageProof.Enum.Preference.DEFAULT_REMINDER,
28
29
  * ]);
29
- * const [dueDate, dueTime, messageToReviewers] = preferences;
30
+ * const [dueDate, dueTime, messageToReviewers, proofReminders] = preferences;
30
31
  * console.log(messageToReviewers.getValueOrDefault());
31
32
  *
32
33
  * @example <caption>Retrieving a single preference</caption>
@@ -16,9 +16,10 @@ declare class ProofsIntegrationReferences extends API {
16
16
  *
17
17
  * @since 2.0.0-beta.144
18
18
  * @param {string} integrationKey The unique identifier for the integration
19
+ * @param {object} [params] Any additional parameters required for retrieving the options
19
20
  * @returns {Promise<Array<object>>}
20
21
  */
21
- options(key: any): Promise<any[]>;
22
+ options(integrationKey: string, params?: any): Promise<any[]>;
22
23
  /**
23
24
  * Add an integration reference to a proof
24
25
  *
@@ -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 ProofsIntegrationReferences=function(_API){_inherits(ProofsIntegrationReferences,_API);function ProofsIntegrationReferences(){_classCallCheck(this,ProofsIntegrationReferences);return _possibleConstructorReturn(this,_API.apply(this,arguments))}ProofsIntegrationReferences.prototype.availableIntegrations=function availableIntegrations(){return this.client.request("integrations.get-available-reference-integrations").then(function(response){return response.data.integrations})};ProofsIntegrationReferences.prototype.options=function options(key){return this.client.request("integrations.get-available-reference-options",{integration_key:key}).then(function(response){return response.data.optionTypes})};ProofsIntegrationReferences.prototype.add=function add(proofId,integrationReference){return this.client.request("integrations.proof-integration-references.add",{proofId:proofId,integrationReference:integrationReference})};ProofsIntegrationReferences.prototype.remove=function remove(proofId,referenceId){return this.client.request("integrations.proof-integration-references.remove",{proofId:proofId,referenceId:referenceId})};return ProofsIntegrationReferences}(_API3.default);exports.default=ProofsIntegrationReferences;
1
+ "use strict";exports.__esModule=true;var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key]}}}return target};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 ProofsIntegrationReferences=function(_API){_inherits(ProofsIntegrationReferences,_API);function ProofsIntegrationReferences(){_classCallCheck(this,ProofsIntegrationReferences);return _possibleConstructorReturn(this,_API.apply(this,arguments))}ProofsIntegrationReferences.prototype.availableIntegrations=function availableIntegrations(){return this.client.request("integrations.get-available-reference-integrations").then(function(response){return response.data.integrations})};ProofsIntegrationReferences.prototype.options=function options(integrationKey,params){return this.client.request("integrations.get-available-reference-options",{params:_extends({},params,{integration_key:integrationKey})}).then(function(response){return response.data.optionTypes})};ProofsIntegrationReferences.prototype.add=function add(proofId,integrationReference){return this.client.request("integrations.proof-integration-references.add",{proofId:proofId,integrationReference:integrationReference})};ProofsIntegrationReferences.prototype.remove=function remove(proofId,referenceId){return this.client.request("integrations.proof-integration-references.remove",{proofId:proofId,referenceId:referenceId})};return ProofsIntegrationReferences}(_API3.default);exports.default=ProofsIntegrationReferences;
@@ -86,6 +86,7 @@
86
86
  "query": ["preferences"]
87
87
  },
88
88
  "preferences.update": {
89
+ "version": 2,
89
90
  "method": "POST",
90
91
  "path": "/api/users/preferences/update",
91
92
  "body": true
@@ -753,7 +754,7 @@
753
754
  "integrations.get-available-reference-options": {
754
755
  "method": "GET",
755
756
  "path": "/api/integrations/reference/options",
756
- "query": ["integration_key"]
757
+ "query": "params"
757
758
  },
758
759
  "integrations.proof-integration-references.add": {
759
760
  "version": 2,