@pageproof/sdk-pr 251.0.1596660172421 → 251.0.1599430474232

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,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.0-beta.134
4
+
5
+ Released on the 31st of August 2020.
6
+
7
+ - Support for monday.com.
8
+
9
+ ## 2.0.0-beta.133
10
+
11
+ Released on the 18th of August 2020.
12
+
13
+ - Added support for team email notification settings. See [TeamNotifications](https://docs.pageproof.tech/@pageproof/sdk/beta/class/src/api/admin/TeamNotifications.js~TeamNotifications.html)
14
+
3
15
  ## 2.0.0-beta.132
4
16
 
5
17
  Released on the 3th of August 2020.
@@ -6,13 +6,20 @@ export default ProofsLinkCheck;
6
6
  declare class ProofsLinkCheck extends API {
7
7
  constructor(client: any);
8
8
  /**
9
- * Scans zip websites (including email proofs) for issues relating to links. // TODO: tidy this up because wow.
10
- *
9
+ * Fetch the results for a Link Check scan of an email proof.
11
10
  *
11
+ * @param fileId The fileId to an email proof file.
12
12
  * @since 2.0.0-beta.XX
13
- * @returns {Promise<any>} // TODO: The typings here
13
+ * @returns {Promise<LinkCheckResults>}
14
14
  */
15
- results(fileId: any): Promise<any>;
16
- recheck(fileId: any): any;
15
+ results(fileId: any): Promise<LinkCheckResults>;
16
+ /**
17
+ * Requests a re-check of links for a given email proof file.
18
+ *
19
+ * @param fileId The fileId to an email proof file.
20
+ * @since 2.0.0-beta.XX
21
+ * @returns {Promise}
22
+ */
23
+ recheck(fileId: any): Promise<any>;
17
24
  }
18
25
  import API from "./API";
@@ -20,6 +20,12 @@ declare class Team extends API {
20
20
  * @type {TeamFeatures}
21
21
  */
22
22
  features: TeamFeatures;
23
+ /**
24
+ * The Admin Team Preferences API.
25
+ *
26
+ * @type {TeamPreferences}
27
+ */
28
+ preferences: TeamPreferences;
23
29
  /**
24
30
  * The Admin Custom Webhooks API.
25
31
  *
@@ -32,10 +38,19 @@ declare class Team extends API {
32
38
  * @type {TeamSCIM}
33
39
  */
34
40
  scim: TeamSCIM;
41
+ /**
42
+ * The Admin Team Integrations API.
43
+ *
44
+ * @type {TeamIntegrations}
45
+ */
46
+ teamIntegrations: TeamIntegrations;
47
+ integrations: TeamIntegrations;
35
48
  }
36
49
  import API from "../API";
37
50
  import TeamUsers from "./TeamUsers";
38
51
  import TeamDashboard from "./TeamDashboard";
39
52
  import TeamFeatures from "./TeamFeatures";
53
+ import TeamPreferences from "./TeamPreferences";
40
54
  import TeamCustomWebhooks from "./TeamCustomWebhooks";
41
55
  import TeamSCIM from "./TeamSCIM";
56
+ import TeamIntegrations from "./TeamIntegrations";
@@ -18,6 +18,10 @@ var _TeamFeatures = require('./TeamFeatures');
18
18
 
19
19
  var _TeamFeatures2 = _interopRequireDefault(_TeamFeatures);
20
20
 
21
+ var _TeamPreferences = require('./TeamPreferences');
22
+
23
+ var _TeamPreferences2 = _interopRequireDefault(_TeamPreferences);
24
+
21
25
  var _TeamCustomWebhooks = require('./TeamCustomWebhooks');
22
26
 
23
27
  var _TeamCustomWebhooks2 = _interopRequireDefault(_TeamCustomWebhooks);
@@ -26,6 +30,10 @@ var _TeamSCIM = require('./TeamSCIM');
26
30
 
27
31
  var _TeamSCIM2 = _interopRequireDefault(_TeamSCIM);
28
32
 
33
+ var _TeamIntegrations = require('./TeamIntegrations');
34
+
35
+ var _TeamIntegrations2 = _interopRequireDefault(_TeamIntegrations);
36
+
29
37
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
30
38
 
31
39
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -45,9 +53,16 @@ var Team = function (_API) {
45
53
 
46
54
 
47
55
  /**
48
- * The Admin Custom Webhooks API.
56
+ * The Admin Team SCIM API.
49
57
  *
50
- * @type {TeamCustomWebhooks}
58
+ * @type {TeamSCIM}
59
+ */
60
+
61
+
62
+ /**
63
+ * The Admin Team Preferences API.
64
+ *
65
+ * @type {TeamPreferences}
51
66
  */
52
67
 
53
68
 
@@ -65,15 +80,24 @@ var Team = function (_API) {
65
80
  _this.users = new _TeamUsers2.default(client);
66
81
  _this.dashboard = new _TeamDashboard2.default(client);
67
82
  _this.features = new _TeamFeatures2.default(client);
83
+ _this.preferences = new _TeamPreferences2.default(client);
68
84
  _this.customWebhooks = new _TeamCustomWebhooks2.default(client);
69
85
  _this.scim = new _TeamSCIM2.default(client);
86
+ _this.integrations = new _TeamIntegrations2.default(client);
70
87
  return _this;
71
88
  }
72
89
 
73
90
  /**
74
- * The Admin Team SCIM API.
91
+ * The Admin Team Integrations API.
75
92
  *
76
- * @type {TeamSCIM}
93
+ * @type {TeamIntegrations}
94
+ */
95
+
96
+
97
+ /**
98
+ * The Admin Custom Webhooks API.
99
+ *
100
+ * @type {TeamCustomWebhooks}
77
101
  */
78
102
 
79
103
 
@@ -0,0 +1,10 @@
1
+ export default TeamIntegrations;
2
+ declare class TeamIntegrations extends API {
3
+ /** @private */
4
+ constructor(client: any);
5
+ /**
6
+ * The Admin Team monday.com API.
7
+ */
8
+ mondayDotCom: any;
9
+ }
10
+ import API from "../API";
@@ -0,0 +1,47 @@
1
+ 'use strict';
2
+
3
+ exports.__esModule = true;
4
+
5
+ var _API2 = require('../API');
6
+
7
+ var _API3 = _interopRequireDefault(_API2);
8
+
9
+ var _TeamMondayDotCom = require('./TeamMondayDotCom');
10
+
11
+ var _TeamMondayDotCom2 = _interopRequireDefault(_TeamMondayDotCom);
12
+
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+
15
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
16
+
17
+ 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; }
18
+
19
+ 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; } /* Copyright (C) 2018 PageProof Holdings Limited - All Rights Reserved.
20
+ * Unauthorized copying of this file, via any medium is strictly prohibited.
21
+ * Proprietary and confidential.
22
+ */
23
+
24
+
25
+ var TeamIntegrations = function (_API) {
26
+ _inherits(TeamIntegrations, _API);
27
+
28
+ /** @private */
29
+ function TeamIntegrations(client) {
30
+ _classCallCheck(this, TeamIntegrations);
31
+
32
+ // Nested APIs
33
+ var _this = _possibleConstructorReturn(this, _API.call(this, client));
34
+
35
+ _this.mondayDotCom = new _TeamMondayDotCom2.default(client);
36
+ return _this;
37
+ }
38
+ /**
39
+ * The Admin Team monday.com API.
40
+ */
41
+
42
+
43
+ return TeamIntegrations;
44
+ }(_API3.default);
45
+
46
+ exports.default = TeamIntegrations;
47
+ //# sourceMappingURL=TeamIntegrations.js.map
@@ -0,0 +1,15 @@
1
+ export default TeamMondayDotCom;
2
+ declare class TeamMondayDotCom extends API {
3
+ constructor(client: any);
4
+ /**
5
+ * Gets URL used to authenticate against monday.com.
6
+ *
7
+ * @example
8
+ * const admin = await client.admin();
9
+ * const authUrl = await admin.team.integrations.mondayDotCom.getAuthUrl();
10
+ *
11
+ * @returns {Promise<string>}
12
+ */
13
+ getAuthUrl(): Promise<string>;
14
+ }
15
+ import API from "../API";
@@ -0,0 +1,52 @@
1
+ 'use strict';
2
+
3
+ exports.__esModule = true;
4
+
5
+ var _API2 = require('../API');
6
+
7
+ var _API3 = _interopRequireDefault(_API2);
8
+
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+
11
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
12
+
13
+ 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; }
14
+
15
+ 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; } /* Copyright (C) 2018 PageProof Holdings Limited - All Rights Reserved.
16
+ * Unauthorized copying of this file, via any medium is strictly prohibited.
17
+ * Proprietary and confidential.
18
+ */
19
+
20
+
21
+ var TeamMondayDotCom = function (_API) {
22
+ _inherits(TeamMondayDotCom, _API);
23
+
24
+ function TeamMondayDotCom() {
25
+ _classCallCheck(this, TeamMondayDotCom);
26
+
27
+ return _possibleConstructorReturn(this, _API.apply(this, arguments));
28
+ }
29
+
30
+ /**
31
+ * Gets URL used to authenticate against monday.com.
32
+ *
33
+ * @example
34
+ * const admin = await client.admin();
35
+ * const authUrl = await admin.team.integrations.mondayDotCom.getAuthUrl();
36
+ *
37
+ * @returns {Promise<string>}
38
+ */
39
+ TeamMondayDotCom.prototype.getAuthUrl = function getAuthUrl() {
40
+ return this.client.request('admin.team.integrations.monday-dot-com.get-request-url').then(function (response) {
41
+ if (response.data) {
42
+ return response.data.url;
43
+ }
44
+ return null;
45
+ });
46
+ };
47
+
48
+ return TeamMondayDotCom;
49
+ }(_API3.default);
50
+
51
+ exports.default = TeamMondayDotCom;
52
+ //# sourceMappingURL=TeamMondayDotCom.js.map
@@ -0,0 +1,31 @@
1
+ export default TeamNotifications;
2
+ declare class TeamNotifications extends API {
3
+ constructor(client: any);
4
+ /**
5
+ * Loads the administrator's team notifications.
6
+ *
7
+ * @example
8
+ * const admin = await client.admin();
9
+ * const preferences = admin.team.preferences.notifications.load();
10
+ *
11
+ * @since v2.0.0-beta.134
12
+ * @returns {Promise<TeamNotifications>}
13
+ */
14
+ load(): Promise<TeamNotifications>;
15
+ /**
16
+ * Set the notifications preferences for the administrator's team.
17
+ *
18
+ * @example <caption>Disabling the owner add email from admin</caption>
19
+ * const admin = await client.admin();
20
+ * const preferences = admin.team.preferences.notifications.set({ownerAddedByAdmin: false});
21
+ *
22
+ * @since v2.0.0-beta.134
23
+ * @param {object} options
24
+ * @param {boolean} options.ownerAddedByAdmin Whether the email should be sent or not to other owners, when an owner added on a proof by admin.
25
+ * @returns {Promise}
26
+ */
27
+ set({ ownerAddedByAdmin, }: {
28
+ ownerAddedByAdmin: boolean;
29
+ }): Promise<any>;
30
+ }
31
+ import API from "../API";
@@ -0,0 +1,79 @@
1
+ 'use strict';
2
+
3
+ exports.__esModule = true;
4
+
5
+ var _API2 = require('../API');
6
+
7
+ var _API3 = _interopRequireDefault(_API2);
8
+
9
+ var _TeamNotifications = require('../../models/TeamNotifications');
10
+
11
+ var _TeamNotifications2 = _interopRequireDefault(_TeamNotifications);
12
+
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+
15
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
16
+
17
+ 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; }
18
+
19
+ 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; } /* Copyright (C) 2018 PageProof Holdings Limited - All Rights Reserved.
20
+ * Unauthorized copying of this file, via any medium is strictly prohibited.
21
+ * Proprietary and confidential.
22
+ */
23
+
24
+
25
+ var TeamNotifications = function (_API) {
26
+ _inherits(TeamNotifications, _API);
27
+
28
+ function TeamNotifications() {
29
+ _classCallCheck(this, TeamNotifications);
30
+
31
+ return _possibleConstructorReturn(this, _API.apply(this, arguments));
32
+ }
33
+
34
+ /**
35
+ * Loads the administrator's team notifications.
36
+ *
37
+ * @example
38
+ * const admin = await client.admin();
39
+ * const preferences = admin.team.preferences.notifications.load();
40
+ *
41
+ * @since v2.0.0-beta.134
42
+ * @returns {Promise<TeamNotifications>}
43
+ */
44
+ TeamNotifications.prototype.load = function load() {
45
+ return this.client.request('admin.team.preferences.notifications.load').then(function (response) {
46
+ if (response.data) {
47
+ return new _TeamNotifications2.default().fromTeamNotifications(response.data);
48
+ }
49
+ return null;
50
+ });
51
+ };
52
+
53
+ /**
54
+ * Set the notifications preferences for the administrator's team.
55
+ *
56
+ * @example <caption>Disabling the owner add email from admin</caption>
57
+ * const admin = await client.admin();
58
+ * const preferences = admin.team.preferences.notifications.set({ownerAddedByAdmin: false});
59
+ *
60
+ * @since v2.0.0-beta.134
61
+ * @param {object} options
62
+ * @param {boolean} options.ownerAddedByAdmin Whether the email should be sent or not to other owners, when an owner added on a proof by admin.
63
+ * @returns {Promise}
64
+ */
65
+
66
+
67
+ TeamNotifications.prototype.set = function set(_ref) {
68
+ var ownerAddedByAdmin = _ref.ownerAddedByAdmin;
69
+
70
+ return this.client.request('admin.team.preferences.notifications.set', {
71
+ ownerAddedByAdmin: ownerAddedByAdmin
72
+ });
73
+ };
74
+
75
+ return TeamNotifications;
76
+ }(_API3.default);
77
+
78
+ exports.default = TeamNotifications;
79
+ //# sourceMappingURL=TeamNotifications.js.map
@@ -0,0 +1,10 @@
1
+ export default TeamPreferences;
2
+ declare class TeamPreferences extends API {
3
+ /** @private */
4
+ constructor(client: any);
5
+ /**
6
+ * The Admin Team Notification API.
7
+ */
8
+ notifications: any;
9
+ }
10
+ import API from "../API";
@@ -0,0 +1,47 @@
1
+ 'use strict';
2
+
3
+ exports.__esModule = true;
4
+
5
+ var _API2 = require('../API');
6
+
7
+ var _API3 = _interopRequireDefault(_API2);
8
+
9
+ var _TeamNotifications = require('./TeamNotifications');
10
+
11
+ var _TeamNotifications2 = _interopRequireDefault(_TeamNotifications);
12
+
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+
15
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
16
+
17
+ 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; }
18
+
19
+ 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; } /* Copyright (C) 2018 PageProof Holdings Limited - All Rights Reserved.
20
+ * Unauthorized copying of this file, via any medium is strictly prohibited.
21
+ * Proprietary and confidential.
22
+ */
23
+
24
+
25
+ var TeamPreferences = function (_API) {
26
+ _inherits(TeamPreferences, _API);
27
+
28
+ /** @private */
29
+ function TeamPreferences(client) {
30
+ _classCallCheck(this, TeamPreferences);
31
+
32
+ // Nested APIs
33
+ var _this = _possibleConstructorReturn(this, _API.call(this, client));
34
+
35
+ _this.notifications = new _TeamNotifications2.default(client);
36
+ return _this;
37
+ }
38
+ /**
39
+ * The Admin Team Notification API.
40
+ */
41
+
42
+
43
+ return TeamPreferences;
44
+ }(_API3.default);
45
+
46
+ exports.default = TeamPreferences;
47
+ //# sourceMappingURL=TeamPreferences.js.map
@@ -0,0 +1,19 @@
1
+ export default TeamNotifications;
2
+ declare class TeamNotifications {
3
+ /**
4
+ * The team id.
5
+ *
6
+ * @since v2.0.0-beta.134
7
+ * @type {string}
8
+ */
9
+ teamId: string;
10
+ /**
11
+ * The notification type (when owner added by admin).
12
+ *
13
+ * @since v2.0.0-beta.134
14
+ * @type {boolean}
15
+ */
16
+ ownerAddedByAdmin: boolean;
17
+ /** @private */
18
+ fromTeamNotifications(teamNotificationsData: any): TeamNotifications;
19
+ }
@@ -0,0 +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 teamNotificationsSchema={teamId:"TeamId",ownerAddedByAdmin:"OwnerAddedByAdmin"};var TeamNotifications=function(){function TeamNotifications(){_classCallCheck(this,TeamNotifications)}TeamNotifications.prototype.fromTeamNotifications=function fromTeamNotifications(teamNotificationsData){(0,_transform2.default)(this,teamNotificationsSchema,teamNotificationsData);return this};return TeamNotifications}();exports.default=TeamNotifications;
@@ -687,6 +687,20 @@
687
687
  "path": "/api/admin/settings",
688
688
  "body": ["displayComments", "editComments", "proofReference"]
689
689
  },
690
+ "admin.team.integrations.monday-dot-com.get-request-url": {
691
+ "method": "GET",
692
+ "path": "/api/integrations/monday-dot-com/oauth/requesturl"
693
+ },
694
+ "admin.team.preferences.notifications.load": {
695
+ "method": "GET",
696
+ "path": "/api/admin/preferences/notifications",
697
+ "trailing": true
698
+ },
699
+ "admin.team.preferences.notifications.set": {
700
+ "method": "POST",
701
+ "path": "/api/admin/preferences/notifications/set",
702
+ "body": ["ownerAddedByAdmin"]
703
+ },
690
704
  "sessions.check": {
691
705
  "method": "GET",
692
706
  "path": "/api/sessions/check"