@pageproof/sdk-pr 217.0.1574897114852 → 217.0.1574998753876
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/admin/Team.js +20 -8
- package/lib/api/admin/TeamSCIM.js +104 -0
- package/lib/network/endpoints.json +20 -0
- package/lib/pageproof.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.0.0-beta.109
|
|
4
|
+
|
|
5
|
+
Released on the 29th of November 2019
|
|
6
|
+
|
|
7
|
+
- Support for regenerating SCIM access tokens.
|
|
8
|
+
|
|
9
|
+
## 2.0.0-beta.108
|
|
10
|
+
|
|
11
|
+
Released on the 28th of November 2019
|
|
12
|
+
|
|
13
|
+
- Support for SCIM.
|
|
14
|
+
|
|
3
15
|
## 2.0.0-beta.106
|
|
4
16
|
|
|
5
17
|
Released on the 23rd of October 2019.
|
package/lib/api/admin/Team.js
CHANGED
|
@@ -22,6 +22,10 @@ var _TeamCustomWebhooks = require('./TeamCustomWebhooks');
|
|
|
22
22
|
|
|
23
23
|
var _TeamCustomWebhooks2 = _interopRequireDefault(_TeamCustomWebhooks);
|
|
24
24
|
|
|
25
|
+
var _TeamSCIM = require('./TeamSCIM');
|
|
26
|
+
|
|
27
|
+
var _TeamSCIM2 = _interopRequireDefault(_TeamSCIM);
|
|
28
|
+
|
|
25
29
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
26
30
|
|
|
27
31
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -41,15 +45,16 @@ var Team = function (_API) {
|
|
|
41
45
|
|
|
42
46
|
|
|
43
47
|
/**
|
|
44
|
-
* The Admin
|
|
48
|
+
* The Admin Custom Webhooks API.
|
|
45
49
|
*
|
|
46
|
-
* @type {
|
|
50
|
+
* @type {TeamCustomWebhooks}
|
|
47
51
|
*/
|
|
48
52
|
|
|
53
|
+
|
|
49
54
|
/**
|
|
50
|
-
* The Admin Team
|
|
55
|
+
* The Admin Team Dashboard API.
|
|
51
56
|
*
|
|
52
|
-
* @type {
|
|
57
|
+
* @type {TeamDashboard}
|
|
53
58
|
*/
|
|
54
59
|
function Team(client) {
|
|
55
60
|
_classCallCheck(this, Team);
|
|
@@ -61,20 +66,27 @@ var Team = function (_API) {
|
|
|
61
66
|
_this.dashboard = new _TeamDashboard2.default(client);
|
|
62
67
|
_this.features = new _TeamFeatures2.default(client);
|
|
63
68
|
_this.customWebhooks = new _TeamCustomWebhooks2.default(client);
|
|
69
|
+
_this.scim = new _TeamSCIM2.default(client);
|
|
64
70
|
return _this;
|
|
65
71
|
}
|
|
66
72
|
|
|
67
73
|
/**
|
|
68
|
-
* The Admin
|
|
74
|
+
* The Admin Team SCIM API.
|
|
69
75
|
*
|
|
70
|
-
* @type {
|
|
76
|
+
* @type {TeamSCIM}
|
|
71
77
|
*/
|
|
72
78
|
|
|
73
79
|
|
|
74
80
|
/**
|
|
75
|
-
* The Admin Team
|
|
81
|
+
* The Admin Team Features API.
|
|
76
82
|
*
|
|
77
|
-
* @type {
|
|
83
|
+
* @type {TeamFeatures}
|
|
84
|
+
*/
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The Admin Team Users API.
|
|
88
|
+
*
|
|
89
|
+
* @type {TeamUsers}
|
|
78
90
|
*/
|
|
79
91
|
|
|
80
92
|
|
|
@@ -0,0 +1,104 @@
|
|
|
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 TeamSCIM = function (_API) {
|
|
22
|
+
_inherits(TeamSCIM, _API);
|
|
23
|
+
|
|
24
|
+
function TeamSCIM() {
|
|
25
|
+
_classCallCheck(this, TeamSCIM);
|
|
26
|
+
|
|
27
|
+
return _possibleConstructorReturn(this, _API.apply(this, arguments));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Loads the SCIM settings for the team.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* const admin = await client.admin();
|
|
35
|
+
* const settings = await admin.team.scim.settings();
|
|
36
|
+
*
|
|
37
|
+
* @since v2.0.0-beta.108
|
|
38
|
+
* @returns {Promise<SCIMSettings>}
|
|
39
|
+
*/
|
|
40
|
+
TeamSCIM.prototype.settings = function settings() {
|
|
41
|
+
return this.client.request('scim.admin.settings').then(function (response) {
|
|
42
|
+
return response.data.settings;
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Enables SCIM and returns the settings.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* const admin = await client.admin();
|
|
51
|
+
* const settings = await admin.team.scim.enable();
|
|
52
|
+
*
|
|
53
|
+
* @since v2.0.0-beta.108
|
|
54
|
+
* @returns {Promise<SCIMSettings>}
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
TeamSCIM.prototype.enable = function enable() {
|
|
59
|
+
return this.client.request('scim.admin.enable').then(function (response) {
|
|
60
|
+
return response.data.settings;
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Disables SCIM.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* const admin = await client.admin();
|
|
69
|
+
* const settings = await admin.team.scim.disable();
|
|
70
|
+
*
|
|
71
|
+
* @since v2.0.0-beta.108
|
|
72
|
+
* @returns {Promise}
|
|
73
|
+
*/
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
TeamSCIM.prototype.disable = function disable() {
|
|
77
|
+
return this.client.request('scim.admin.disable').then(function () {
|
|
78
|
+
return undefined;
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Regenerate an access token and returns the settings (including the regenerated access token).
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* const admin = await client.admin();
|
|
87
|
+
* const settings = await admin.team.scim.regenerateAccessToken('primary');
|
|
88
|
+
*
|
|
89
|
+
* @param {string} type The type of access token to generate (eg. primary or secondary)
|
|
90
|
+
* @returns {Promise<SCIMSettings>}
|
|
91
|
+
*/
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
TeamSCIM.prototype.regenerateAccessToken = function regenerateAccessToken(type) {
|
|
95
|
+
return this.client.request('scim.admin.regenerate-access-token', { type: type }).then(function (response) {
|
|
96
|
+
return response.data.settings;
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
return TeamSCIM;
|
|
101
|
+
}(_API3.default);
|
|
102
|
+
|
|
103
|
+
exports.default = TeamSCIM;
|
|
104
|
+
//# sourceMappingURL=TeamSCIM.js.map
|
|
@@ -298,11 +298,13 @@
|
|
|
298
298
|
"body": ["groupId"]
|
|
299
299
|
},
|
|
300
300
|
"proofs.groups.archive": {
|
|
301
|
+
"version": 2,
|
|
301
302
|
"method": "POST",
|
|
302
303
|
"path": "/api/groups/archive",
|
|
303
304
|
"body": ["groupIds"]
|
|
304
305
|
},
|
|
305
306
|
"proofs.groups.reopen": {
|
|
307
|
+
"version": 2,
|
|
306
308
|
"method": "POST",
|
|
307
309
|
"path": "/api/groups/reopen",
|
|
308
310
|
"body": ["groupIds"]
|
|
@@ -729,5 +731,23 @@
|
|
|
729
731
|
"method": "POST",
|
|
730
732
|
"path": "/api/teams/invitations/decline",
|
|
731
733
|
"chain": ["invitationId"]
|
|
734
|
+
},
|
|
735
|
+
"scim.admin.settings": {
|
|
736
|
+
"method": "GET",
|
|
737
|
+
"path": "/api/scim/admin/settings"
|
|
738
|
+
},
|
|
739
|
+
"scim.admin.enable": {
|
|
740
|
+
"method": "POST",
|
|
741
|
+
"path": "/api/scim/admin/enable"
|
|
742
|
+
},
|
|
743
|
+
"scim.admin.disable": {
|
|
744
|
+
"method": "POST",
|
|
745
|
+
"path": "/api/scim/admin/disable"
|
|
746
|
+
},
|
|
747
|
+
"scim.admin.regenerate-access-token": {
|
|
748
|
+
"version": 2,
|
|
749
|
+
"method": "POST",
|
|
750
|
+
"path": "/api/scim/admin/regenerate-access-token",
|
|
751
|
+
"body": ["type"]
|
|
732
752
|
}
|
|
733
753
|
}
|