@pageproof/sdk-pr 528.0.1712547835918 → 530.0.1715185344050
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.
|
@@ -63,5 +63,23 @@ declare class Integrations extends API {
|
|
|
63
63
|
* @returns {Promise}
|
|
64
64
|
*/
|
|
65
65
|
updateConfiguration(integrationKey: string, key: string, value: string): Promise<any>;
|
|
66
|
+
/**
|
|
67
|
+
* Gets the proof setup for an integration
|
|
68
|
+
*
|
|
69
|
+
* @example <caption>Retrieving the proof setup for a team</caption>
|
|
70
|
+
* const admin = await client.admin();
|
|
71
|
+
* const { payload } = await admin.team.integrations.getProofSetup('monday.com', 'token');
|
|
72
|
+
*
|
|
73
|
+
* @example <caption>Retrieving the proof setup for a user</caption>
|
|
74
|
+
* const { payload } = await client.profile.integrations.getProofSetup('monday.com', 'token');
|
|
75
|
+
*
|
|
76
|
+
* @since 2.0.0-beta.326
|
|
77
|
+
* @param {string} integrationKey The unique identifier for the integration
|
|
78
|
+
* @param {string} token The token required for the proof setup
|
|
79
|
+
* @returns {Promise<{ payload: object }>} The proof setup payload
|
|
80
|
+
*/
|
|
81
|
+
getProofSetup(integrationKey: string, token: string): Promise<{
|
|
82
|
+
payload: any;
|
|
83
|
+
}>;
|
|
66
84
|
}
|
|
67
85
|
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(){var integrationKeys=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];return this.client.request("integrations.get-configurations",{level:this.level,integration_keys:integrationKeys.join(",")}).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,level:this.level})}).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})};Integrations.prototype.updateConfiguration=function updateConfiguration(integrationKey,key,value){return this.client.request("integrations.update-configuration",{level:this.level,integrationKey:integrationKey,key:key,value:value})};return Integrations}(_API3.default);exports.default=Integrations;
|
|
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(){var integrationKeys=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];return this.client.request("integrations.get-configurations",{level:this.level,integration_keys:integrationKeys.join(",")}).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,level:this.level})}).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})};Integrations.prototype.updateConfiguration=function updateConfiguration(integrationKey,key,value){return this.client.request("integrations.update-configuration",{level:this.level,integrationKey:integrationKey,key:key,value:value})};Integrations.prototype.getProofSetup=function getProofSetup(integrationKey,token){return this.client.request("integrations.get-proof-setup",{integration_key:integrationKey,token:token}).then(function(response){return{payload:response.data.payload}})};return Integrations}(_API3.default);exports.default=Integrations;
|
|
@@ -891,6 +891,11 @@
|
|
|
891
891
|
"path": "/api/integrations/setup_url",
|
|
892
892
|
"query": "params"
|
|
893
893
|
},
|
|
894
|
+
"integrations.get-proof-setup": {
|
|
895
|
+
"method": "GET",
|
|
896
|
+
"path": "/api/integrations/proof_setup",
|
|
897
|
+
"query": "params"
|
|
898
|
+
},
|
|
894
899
|
"integrations.get-configurations": {
|
|
895
900
|
"method": "GET",
|
|
896
901
|
"path": "/api/integrations/configuration",
|