@pageproof/sdk-pr 287.0.1606182621749 → 289.0.1605659865672
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 +0 -17
- package/lib/adapters/AngularEnhancementAdapter.d.ts +0 -2
- package/lib/adapters/IEnhancementAdapter.d.ts +30 -129
- package/lib/adapters/IEnhancementAdapter.js +1 -1
- package/lib/angular-enhancement-adapter.js +1 -1
- package/lib/api/Integrations.d.ts +3 -14
- package/lib/api/Integrations.js +1 -1
- package/lib/api/Preferences.d.ts +1 -2
- package/lib/api/ProofsIntegrationReferences.d.ts +1 -2
- package/lib/api/ProofsIntegrationReferences.js +1 -1
- package/lib/network/endpoints.json +2 -9
- package/lib/pageproof.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,22 +1,5 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 2.0.0-beta.148
|
|
4
|
-
|
|
5
|
-
Released on the 24th 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.
|
|
20
3
|
|
|
21
4
|
## 2.0.0-beta.145
|
|
22
5
|
|
|
@@ -3,133 +3,34 @@ declare class IEnhancementAdapter {
|
|
|
3
3
|
static __adapter__: string;
|
|
4
4
|
/** @private */
|
|
5
5
|
onClientReady(client: any): void;
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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;
|
|
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;
|
|
135
36
|
}
|
|
@@ -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){var ctx={api:definition.api,namespace:definition.namespace,name:definition.name,displayName:definition.namespace+"."+definition.name};_this.
|
|
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,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){var
|
|
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}}])});
|
|
2
2
|
//# sourceMappingURL=angular-enhancement-adapter.js.map
|
|
@@ -15,10 +15,9 @@ declare class Integrations extends API {
|
|
|
15
15
|
* const availableConfigurations = await client.profile.integrations.configurations();
|
|
16
16
|
*
|
|
17
17
|
* @since 2.0.0-beta.141
|
|
18
|
-
* @
|
|
19
|
-
* @returns {Promise<Array|null>}
|
|
18
|
+
* @returns {Promise<object|null>}
|
|
20
19
|
*/
|
|
21
|
-
configurations(
|
|
20
|
+
configurations(): Promise<any>;
|
|
22
21
|
/**
|
|
23
22
|
* Gets the URL for setting up an integration
|
|
24
23
|
*
|
|
@@ -49,19 +48,9 @@ declare class Integrations extends API {
|
|
|
49
48
|
* await client.profile.integrations.disable('monday.com');
|
|
50
49
|
*
|
|
51
50
|
* @since 2.0.0-beta.144
|
|
52
|
-
* @param {string} integrationKey The unique identifier for the integration
|
|
51
|
+
* @param {string} integrationKey The unique identifier/identifiers for the integration/integrations
|
|
53
52
|
* @returns {Promise}
|
|
54
53
|
*/
|
|
55
54
|
disable(integrationKey: string): Promise<any>;
|
|
56
|
-
/**
|
|
57
|
-
* Updates the configuration of an integration
|
|
58
|
-
*
|
|
59
|
-
* @since 2.0.0-beta.148
|
|
60
|
-
* @param {string} integrationKey The unique identifier for the integration
|
|
61
|
-
* @param {string} key The key of the configuration to be updated
|
|
62
|
-
* @param {string} value The value for the configuration to be updated to
|
|
63
|
-
* @returns {Promise}
|
|
64
|
-
*/
|
|
65
|
-
updateConfiguration(integrationKey: string, key: string, value: string): Promise<any>;
|
|
66
55
|
}
|
|
67
56
|
import API from "./API";
|
package/lib/api/Integrations.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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 Integrations=function(_API){_inherits(Integrations,_API);function Integrations(client,level){_classCallCheck(this,Integrations);var _this=_possibleConstructorReturn(this,_API.call(this,client));_this.level=level;return _this}Integrations.prototype.configurations=function configurations(){
|
|
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 Integrations=function(_API){_inherits(Integrations,_API);function Integrations(client,level){_classCallCheck(this,Integrations);var _this=_possibleConstructorReturn(this,_API.call(this,client));_this.level=level;return _this}Integrations.prototype.configurations=function configurations(){return this.client.request("integrations.get-configurations",{level:this.level}).then(function(response){if(response.data){return response.data.integrations}return null})};Integrations.prototype.getSetupUrl=function getSetupUrl(integrationKey,params){return this.client.request("integrations.get-setup-url",{params:_extends({},params,{integration_key:integrationKey})}).then(function(response){return{url:response.data.url,windowFeatures:response.data.windowFeatures}})};Integrations.prototype.disable=function disable(integrationKey){return this.client.request("integrations.disable",{level:this.level,integration_key:integrationKey})};return Integrations}(_API3.default);exports.default=Integrations;
|
package/lib/api/Preferences.d.ts
CHANGED
|
@@ -25,9 +25,8 @@ 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,
|
|
29
28
|
* ]);
|
|
30
|
-
* const [dueDate, dueTime, messageToReviewers
|
|
29
|
+
* const [dueDate, dueTime, messageToReviewers] = preferences;
|
|
31
30
|
* console.log(messageToReviewers.getValueOrDefault());
|
|
32
31
|
*
|
|
33
32
|
* @example <caption>Retrieving a single preference</caption>
|
|
@@ -16,10 +16,9 @@ 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
|
|
20
19
|
* @returns {Promise<Array<object>>}
|
|
21
20
|
*/
|
|
22
|
-
options(
|
|
21
|
+
options(key: any): Promise<any[]>;
|
|
23
22
|
/**
|
|
24
23
|
* Add an integration reference to a proof
|
|
25
24
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.__esModule=true;var
|
|
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;
|
|
@@ -86,7 +86,6 @@
|
|
|
86
86
|
"query": ["preferences"]
|
|
87
87
|
},
|
|
88
88
|
"preferences.update": {
|
|
89
|
-
"version": 2,
|
|
90
89
|
"method": "POST",
|
|
91
90
|
"path": "/api/users/preferences/update",
|
|
92
91
|
"body": true
|
|
@@ -740,19 +739,13 @@
|
|
|
740
739
|
"integrations.get-configurations": {
|
|
741
740
|
"method": "GET",
|
|
742
741
|
"path": "/api/integrations/configuration",
|
|
743
|
-
"query": ["level"
|
|
742
|
+
"query": ["level"]
|
|
744
743
|
},
|
|
745
744
|
"integrations.disable": {
|
|
746
745
|
"method": "POST",
|
|
747
746
|
"path": "/api/integrations/disable",
|
|
748
747
|
"query": ["level", "integration_key"]
|
|
749
748
|
},
|
|
750
|
-
"integrations.update-configuration": {
|
|
751
|
-
"version": 2,
|
|
752
|
-
"method": "POST",
|
|
753
|
-
"path": "/api/integrations/configuration/update",
|
|
754
|
-
"body": ["level", "integrationKey", "key", "value"]
|
|
755
|
-
},
|
|
756
749
|
"integrations.get-available-reference-integrations": {
|
|
757
750
|
"method": "GET",
|
|
758
751
|
"path": "/api/integrations/reference/available_integrations"
|
|
@@ -760,7 +753,7 @@
|
|
|
760
753
|
"integrations.get-available-reference-options": {
|
|
761
754
|
"method": "GET",
|
|
762
755
|
"path": "/api/integrations/reference/options",
|
|
763
|
-
"query": "
|
|
756
|
+
"query": ["integration_key"]
|
|
764
757
|
},
|
|
765
758
|
"integrations.proof-integration-references.add": {
|
|
766
759
|
"version": 2,
|