@pageproof/sdk-pr 272.0.1602710709012 → 272.0.1603254932734
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 +9 -0
- package/lib/api/Integrations.d.ts +40 -0
- package/lib/api/Integrations.js +1 -0
- package/lib/api/Profile.d.ts +8 -0
- package/lib/api/Profile.js +1 -1
- package/lib/api/admin/Team.d.ts +3 -4
- package/lib/api/admin/Team.js +4 -4
- package/lib/network/endpoints.json +8 -2
- package/lib/pageproof.js +1 -1
- package/package.json +1 -1
- package/lib/api/admin/TeamIntegrations.d.ts +0 -10
- package/lib/api/admin/TeamIntegrations.js +0 -47
- package/lib/api/admin/TeamMondayDotCom.d.ts +0 -15
- package/lib/api/admin/TeamMondayDotCom.js +0 -52
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
## 2.0.0-beta.142
|
|
4
5
|
|
|
5
6
|
Released on the 16th of October 2020.
|
|
6
7
|
|
|
7
8
|
- [[#272](https://github.com/PageProofCom/sdk/pull/272)] Team administrators can now load their team's groups - see [TeamDashboardGroups](https://docs.pageproof.tech/@pageproof/sdk/beta/class/src/api/admin/TeamDashboardGroups.js~TeamDashboardGroups.html). The Proof model now contains the team ID, it belongs to ([Proof.teamId](https://docs.pageproof.tech/@pageproof/sdk/beta/class/src/models/Proof.js~Proof.html#instance-member-teamId))
|
|
8
9
|
|
|
10
|
+
|
|
11
|
+
## 2.0.0-beta.141
|
|
12
|
+
|
|
13
|
+
Released on the 19th of October 2020.
|
|
14
|
+
|
|
15
|
+
- [[#270](https://github.com/PageProofCom/sdk/pull/270)] Support for retrieving configurations for services integrated with PageProof.
|
|
16
|
+
|
|
17
|
+
|
|
9
18
|
## 2.0.0-beta.140
|
|
10
19
|
|
|
11
20
|
Released on the 9th of October 2020.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export default Integrations;
|
|
2
|
+
declare class Integrations extends API {
|
|
3
|
+
/** @private */
|
|
4
|
+
constructor(client: any, level: any);
|
|
5
|
+
/** @private */
|
|
6
|
+
level: any;
|
|
7
|
+
/**
|
|
8
|
+
* Gets the configurations for the available integrations
|
|
9
|
+
*
|
|
10
|
+
* @example <caption>Retrieving configurations for a team</caption>
|
|
11
|
+
* const admin = await client.admin();
|
|
12
|
+
* const availableConfigurations = await admin.team.integrations.configurations();
|
|
13
|
+
*
|
|
14
|
+
* @example <caption>Retrieving configurations for a user</caption>
|
|
15
|
+
* const availableConfigurations = await client.profile.integrations.configurations();
|
|
16
|
+
*
|
|
17
|
+
* @since 2.0.0-beta.141
|
|
18
|
+
* @returns {Promise<object|null>}
|
|
19
|
+
*/
|
|
20
|
+
configurations(): Promise<any>;
|
|
21
|
+
/**
|
|
22
|
+
* Gets the URL for setting up an integration
|
|
23
|
+
*
|
|
24
|
+
* @example <caption>Retrieving the integration setup url for a team</caption>
|
|
25
|
+
* const admin = await client.admin();
|
|
26
|
+
* const { url, windowFeatures } = await admin.team.integrations.getSetupUrl('monday.com');
|
|
27
|
+
*
|
|
28
|
+
* @example <caption>Retrieving the integration setup url for a user</caption>
|
|
29
|
+
* const { url, windowFeatures } = await client.profile.integrations.getSetupUrl('monday.com');
|
|
30
|
+
*
|
|
31
|
+
* @since 2.0.0-beta.141
|
|
32
|
+
* @param {string|Array<string>} integrationKey The unique identifier/identifiers for the integration/integrations
|
|
33
|
+
* @returns {Promise<{ url: string, windowFeatures: string}>}
|
|
34
|
+
*/
|
|
35
|
+
getSetupUrl(integrationKey: string | string[]): Promise<{
|
|
36
|
+
url: string;
|
|
37
|
+
windowFeatures: string;
|
|
38
|
+
}>;
|
|
39
|
+
}
|
|
40
|
+
import API from "./API";
|
|
@@ -0,0 +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 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){return this.client.request("integrations.get-setup-url",{integration_key:integrationKey}).then(function(response){return{url:response.data.url,windowFeatures:response.data.windowFeatures}})};return Integrations}(_API3.default);exports.default=Integrations;
|
package/lib/api/Profile.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
export default Profile;
|
|
2
2
|
declare class Profile extends API {
|
|
3
|
+
/** @private */
|
|
3
4
|
constructor(client: any);
|
|
5
|
+
/**
|
|
6
|
+
* The Integrations API.
|
|
7
|
+
*
|
|
8
|
+
* @type {Integrations}
|
|
9
|
+
*/
|
|
10
|
+
integrations: Integrations;
|
|
4
11
|
/**
|
|
5
12
|
* Uploads the avatar for the current user.
|
|
6
13
|
*
|
|
@@ -76,3 +83,4 @@ declare class Profile extends API {
|
|
|
76
83
|
clearStatus(): Promise<any>;
|
|
77
84
|
}
|
|
78
85
|
import API from "./API";
|
|
86
|
+
import Integrations from "./Integrations";
|
package/lib/api/Profile.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.__esModule=true;var _API2=require("./API");var _API3=_interopRequireDefault(_API2);var _bluffer=require("../bluffer");var _bluffer2=_interopRequireDefault(_bluffer);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 Profile=function(_API){_inherits(Profile,_API);function Profile(){_classCallCheck(this,Profile);
|
|
1
|
+
"use strict";exports.__esModule=true;var _API2=require("./API");var _API3=_interopRequireDefault(_API2);var _bluffer=require("../bluffer");var _bluffer2=_interopRequireDefault(_bluffer);var _Integrations=require("./Integrations");var _Integrations2=_interopRequireDefault(_Integrations);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 Profile=function(_API){_inherits(Profile,_API);function Profile(client){_classCallCheck(this,Profile);var _this=_possibleConstructorReturn(this,_API.call(this,client));_this.integrations=new _Integrations2.default(client,"user");return _this}Profile.prototype.uploadAvatar=function uploadAvatar(file){var _this2=this;var bluffer=new _bluffer2.default;return bluffer.readBase64(file).then(function(base64){return _this2.client.request("profile.upload-avatar",{uploadedImage:"data:image/png;base64,"+base64})})};Profile.prototype.changePassword=function changePassword(currentPassword,password){var _this3=this;var crypto=this.client.crypto();return Promise.all([crypto.generatePasswordHash(currentPassword),crypto.generatePasswordHash(password),crypto.encryptPrivateKey(this.client.session.privateKeyPEM,password)]).then(function(_ref){var oldPassword=_ref[0],newPassword=_ref[1],newPrivateKey=_ref[2];return _this3.client.request("profile.change-password",{oldPassword:oldPassword,newPassword:newPassword,newPrivateKey:newPrivateKey})})};Profile.prototype.getStatus=function getStatus(){return this.client.request("profile.status").then(function(response){return response.data.status})};Profile.prototype.setStatus=function setStatus(status){return this.client.request("profile.set-status",status)};Profile.prototype.clearStatus=function clearStatus(){return this.client.request("profile.clear-status")};return Profile}(_API3.default);exports.default=Profile;
|
package/lib/api/admin/Team.d.ts
CHANGED
|
@@ -41,10 +41,9 @@ declare class Team extends API {
|
|
|
41
41
|
/**
|
|
42
42
|
* The Admin Team Integrations API.
|
|
43
43
|
*
|
|
44
|
-
* @type {
|
|
44
|
+
* @type {Integrations}
|
|
45
45
|
*/
|
|
46
|
-
|
|
47
|
-
integrations: TeamIntegrations;
|
|
46
|
+
integrations: Integrations;
|
|
48
47
|
}
|
|
49
48
|
import API from "../API";
|
|
50
49
|
import TeamUsers from "./TeamUsers";
|
|
@@ -53,4 +52,4 @@ import TeamFeatures from "./TeamFeatures";
|
|
|
53
52
|
import TeamPreferences from "./TeamPreferences";
|
|
54
53
|
import TeamCustomWebhooks from "./TeamCustomWebhooks";
|
|
55
54
|
import TeamSCIM from "./TeamSCIM";
|
|
56
|
-
import
|
|
55
|
+
import Integrations from "../Integrations";
|
package/lib/api/admin/Team.js
CHANGED
|
@@ -30,9 +30,9 @@ var _TeamSCIM = require('./TeamSCIM');
|
|
|
30
30
|
|
|
31
31
|
var _TeamSCIM2 = _interopRequireDefault(_TeamSCIM);
|
|
32
32
|
|
|
33
|
-
var
|
|
33
|
+
var _Integrations = require('../Integrations');
|
|
34
34
|
|
|
35
|
-
var
|
|
35
|
+
var _Integrations2 = _interopRequireDefault(_Integrations);
|
|
36
36
|
|
|
37
37
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
38
38
|
|
|
@@ -83,14 +83,14 @@ var Team = function (_API) {
|
|
|
83
83
|
_this.preferences = new _TeamPreferences2.default(client);
|
|
84
84
|
_this.customWebhooks = new _TeamCustomWebhooks2.default(client);
|
|
85
85
|
_this.scim = new _TeamSCIM2.default(client);
|
|
86
|
-
_this.integrations = new
|
|
86
|
+
_this.integrations = new _Integrations2.default(client, 'team');
|
|
87
87
|
return _this;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
91
|
* The Admin Team Integrations API.
|
|
92
92
|
*
|
|
93
|
-
* @type {
|
|
93
|
+
* @type {Integrations}
|
|
94
94
|
*/
|
|
95
95
|
|
|
96
96
|
|
|
@@ -736,9 +736,15 @@
|
|
|
736
736
|
"path": "/api/admin/settings",
|
|
737
737
|
"body": ["displayComments", "editComments", "proofReference"]
|
|
738
738
|
},
|
|
739
|
-
"
|
|
739
|
+
"integrations.get-setup-url": {
|
|
740
740
|
"method": "GET",
|
|
741
|
-
"path": "/api/integrations/
|
|
741
|
+
"path": "/api/integrations/setup_url",
|
|
742
|
+
"query": ["integration_key"]
|
|
743
|
+
},
|
|
744
|
+
"integrations.get-configurations": {
|
|
745
|
+
"method": "GET",
|
|
746
|
+
"path": "/api/integrations/configuration",
|
|
747
|
+
"query": ["level"]
|
|
742
748
|
},
|
|
743
749
|
"admin.team.preferences.notifications.load": {
|
|
744
750
|
"method": "GET",
|