@pageproof/sdk-pr 281.0.1602190868209 → 283.0.1603155681848
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 +12 -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/api/admin/TeamFeatures.d.ts +7 -0
- package/lib/api/admin/TeamFeatures.js +5 -0
- package/lib/models/TeamEmailFeatures.d.ts +8 -1
- package/lib/models/TeamEmailFeatures.js +1 -1
- package/lib/network/endpoints.json +9 -3
- 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,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.0.0-beta.141
|
|
4
|
+
|
|
5
|
+
Released on the 19th of October 2020.
|
|
6
|
+
|
|
7
|
+
- [[#270](https://github.com/PageProofCom/sdk/pull/270)] Support for retrieving configurations for services integrated with PageProof.
|
|
8
|
+
|
|
9
|
+
## 2.0.0-beta.140
|
|
10
|
+
|
|
11
|
+
Released on the 9th of October 2020.
|
|
12
|
+
|
|
13
|
+
- Minor bug fixes related to extracted text.
|
|
14
|
+
|
|
3
15
|
## 2.0.0-beta.139
|
|
4
16
|
|
|
5
17
|
Released on the 30th of September 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
|
|
|
@@ -23,17 +23,24 @@ declare class TeamFeatures extends API {
|
|
|
23
23
|
* @param {object} options
|
|
24
24
|
* @param {object} options.emails The emails features
|
|
25
25
|
* @param {boolean} options.emails.displayComments Whether the comment should display in emails or not
|
|
26
|
+
* @param {boolean} options.emails.displayTeamName Whether using the team name or ’PageProof Team’ as the ‘from’ name in Email.
|
|
26
27
|
* @param {object} options.comments The comments features
|
|
27
28
|
* @param {boolean} options.comments.editComments Whether the comments/replies can be edited by other users or not
|
|
29
|
+
* @param {object} options.proofs The proofs features
|
|
30
|
+
* @param {boolean} options.proofs.reference Whether showing the reference field on a proof
|
|
28
31
|
* @returns {Promise}
|
|
29
32
|
*/
|
|
30
33
|
update({ emails, comments, proofs, }: {
|
|
31
34
|
emails: {
|
|
32
35
|
displayComments: boolean;
|
|
36
|
+
displayTeamName: boolean;
|
|
33
37
|
};
|
|
34
38
|
comments: {
|
|
35
39
|
editComments: boolean;
|
|
36
40
|
};
|
|
41
|
+
proofs: {
|
|
42
|
+
reference: boolean;
|
|
43
|
+
};
|
|
37
44
|
}): Promise<any>;
|
|
38
45
|
}
|
|
39
46
|
import API from "../API";
|
|
@@ -61,8 +61,11 @@ var TeamFeatures = function (_API) {
|
|
|
61
61
|
* @param {object} options
|
|
62
62
|
* @param {object} options.emails The emails features
|
|
63
63
|
* @param {boolean} options.emails.displayComments Whether the comment should display in emails or not
|
|
64
|
+
* @param {boolean} options.emails.displayTeamName Whether using the team name or ’PageProof Team’ as the ‘from’ name in Email.
|
|
64
65
|
* @param {object} options.comments The comments features
|
|
65
66
|
* @param {boolean} options.comments.editComments Whether the comments/replies can be edited by other users or not
|
|
67
|
+
* @param {object} options.proofs The proofs features
|
|
68
|
+
* @param {boolean} options.proofs.reference Whether showing the reference field on a proof
|
|
66
69
|
* @returns {Promise}
|
|
67
70
|
*/
|
|
68
71
|
|
|
@@ -73,10 +76,12 @@ var TeamFeatures = function (_API) {
|
|
|
73
76
|
proofs = _ref.proofs;
|
|
74
77
|
|
|
75
78
|
var displayComments = emails && emails.displayComments;
|
|
79
|
+
var displayTeamName = emails && emails.displayTeamName;
|
|
76
80
|
var editComments = comments && comments.editComments;
|
|
77
81
|
var proofReference = proofs && proofs.reference;
|
|
78
82
|
return this.client.request('admin.team.features.update', {
|
|
79
83
|
displayComments: displayComments,
|
|
84
|
+
displayTeamName: displayTeamName,
|
|
80
85
|
editComments: editComments,
|
|
81
86
|
proofReference: proofReference
|
|
82
87
|
});
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
export default TeamEmailFeatures;
|
|
2
2
|
declare class TeamEmailFeatures {
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Whether emails should contain a preview of raw (decrypted) comments.
|
|
5
5
|
*
|
|
6
6
|
* @since v2.0.0-beta.75
|
|
7
7
|
* @type {boolean}
|
|
8
8
|
*/
|
|
9
9
|
displayComments: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Whether using the team name or ’PageProof Team’ as the ‘from’ name in Email.
|
|
12
|
+
*
|
|
13
|
+
* @since v2.0.0-beta.142
|
|
14
|
+
* @type {boolean}
|
|
15
|
+
*/
|
|
16
|
+
displayTeamName: boolean;
|
|
10
17
|
/** @private */
|
|
11
18
|
fromTeamEmailFeatures(teamEmailFeaturesData: any): TeamEmailFeatures;
|
|
12
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.__esModule=true;var _transform=require("./transform");var _transform2=_interopRequireDefault(_transform);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")}}var TeamEmailFeatureSchema={displayComments:"DisplayComments"};var TeamEmailFeatures=function(){function TeamEmailFeatures(){_classCallCheck(this,TeamEmailFeatures)}TeamEmailFeatures.prototype.fromTeamEmailFeatures=function fromTeamEmailFeatures(teamEmailFeaturesData){(0,_transform2.default)(this,TeamEmailFeatureSchema,teamEmailFeaturesData);return this};return TeamEmailFeatures}();exports.default=TeamEmailFeatures;
|
|
1
|
+
"use strict";exports.__esModule=true;var _transform=require("./transform");var _transform2=_interopRequireDefault(_transform);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")}}var TeamEmailFeatureSchema={displayComments:"DisplayComments",displayTeamName:"DisplayTeamName"};var TeamEmailFeatures=function(){function TeamEmailFeatures(){_classCallCheck(this,TeamEmailFeatures)}TeamEmailFeatures.prototype.fromTeamEmailFeatures=function fromTeamEmailFeatures(teamEmailFeaturesData){(0,_transform2.default)(this,TeamEmailFeatureSchema,teamEmailFeaturesData);return this};return TeamEmailFeatures}();exports.default=TeamEmailFeatures;
|
|
@@ -724,11 +724,17 @@
|
|
|
724
724
|
"admin.team.features.update": {
|
|
725
725
|
"method": "POST",
|
|
726
726
|
"path": "/api/admin/settings",
|
|
727
|
-
"body": ["displayComments", "editComments", "proofReference"]
|
|
727
|
+
"body": ["displayComments", "editComments", "proofReference", "displayTeamName"]
|
|
728
728
|
},
|
|
729
|
-
"
|
|
729
|
+
"integrations.get-setup-url": {
|
|
730
730
|
"method": "GET",
|
|
731
|
-
"path": "/api/integrations/
|
|
731
|
+
"path": "/api/integrations/setup_url",
|
|
732
|
+
"query": ["integration_key"]
|
|
733
|
+
},
|
|
734
|
+
"integrations.get-configurations": {
|
|
735
|
+
"method": "GET",
|
|
736
|
+
"path": "/api/integrations/configuration",
|
|
737
|
+
"query": ["level"]
|
|
732
738
|
},
|
|
733
739
|
"admin.team.preferences.notifications.load": {
|
|
734
740
|
"method": "GET",
|