@frontegg/rest-api 3.0.104 → 3.0.106
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/constants.d.ts +3 -0
- package/constants.js +3 -0
- package/entitlements/index.d.ts +7 -0
- package/entitlements/index.js +5 -0
- package/entitlements/interfaces.d.ts +6 -0
- package/entitlements/interfaces.js +1 -0
- package/entitlements/package.json +6 -0
- package/fetch.js +2 -2
- package/index.d.ts +4 -0
- package/index.js +5 -2
- package/interfaces.d.ts +0 -1
- package/node/constants.js +3 -0
- package/node/entitlements/index.js +14 -0
- package/node/entitlements/interfaces.js +5 -0
- package/node/fetch.js +4 -2
- package/node/index.js +19 -2
- package/package.json +1 -1
package/constants.d.ts
CHANGED
package/constants.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/fetch.js
CHANGED
|
@@ -39,10 +39,10 @@ async function prepareUrl(context, url, params) {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
async function buildRequestHeaders(context, contentType) {
|
|
42
|
-
var _context$tokenResolve
|
|
42
|
+
var _context$tokenResolve;
|
|
43
43
|
|
|
44
44
|
const authToken = await ((_context$tokenResolve = context == null ? void 0 : context.tokenResolver) != null ? _context$tokenResolve : ContextHolder.getAccessToken)();
|
|
45
|
-
const requestSource =
|
|
45
|
+
const requestSource = ContextHolder.getRequestSource();
|
|
46
46
|
const headers = {};
|
|
47
47
|
|
|
48
48
|
if (authToken) {
|
package/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ import * as directory from "./directory";
|
|
|
20
20
|
import * as impersonate from "./impersonate";
|
|
21
21
|
import * as groups from "./groups";
|
|
22
22
|
import * as users from "./users";
|
|
23
|
+
import * as entitlements from "./entitlements";
|
|
23
24
|
import { ContextHolder, FronteggContext } from "./ContextHolder";
|
|
24
25
|
export * from "./interfaces";
|
|
25
26
|
export * from "./auth/interfaces";
|
|
@@ -44,6 +45,7 @@ export * from "./impersonate/interfaces";
|
|
|
44
45
|
export * from "./groups/interfaces";
|
|
45
46
|
export * from "./groups/enums";
|
|
46
47
|
export * from "./users/interfaces";
|
|
48
|
+
export * from "./entitlements/interfaces";
|
|
47
49
|
declare const api: {
|
|
48
50
|
auth: typeof auth;
|
|
49
51
|
teams: typeof teams;
|
|
@@ -63,6 +65,7 @@ declare const api: {
|
|
|
63
65
|
impersonate: typeof impersonate;
|
|
64
66
|
groups: typeof groups;
|
|
65
67
|
users: typeof users;
|
|
68
|
+
entitlements: typeof entitlements;
|
|
66
69
|
};
|
|
67
70
|
export { fetch, ContextHolder, FronteggContext, api, FronteggApiError, AuthStrategyEnum, SocialLoginProviders, ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType, MachineToMachineAuthStrategy, };
|
|
68
71
|
declare const _default: {
|
|
@@ -94,6 +97,7 @@ declare const _default: {
|
|
|
94
97
|
impersonate: typeof impersonate;
|
|
95
98
|
groups: typeof groups;
|
|
96
99
|
users: typeof users;
|
|
100
|
+
entitlements: typeof entitlements;
|
|
97
101
|
};
|
|
98
102
|
FronteggApiError: typeof FronteggApiError;
|
|
99
103
|
AuthStrategyEnum: typeof auth.AuthStrategyEnum;
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license Frontegg v3.0.
|
|
1
|
+
/** @license Frontegg v3.0.106
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the MIT license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -25,6 +25,7 @@ import * as directory from "./directory";
|
|
|
25
25
|
import * as impersonate from "./impersonate";
|
|
26
26
|
import * as groups from "./groups";
|
|
27
27
|
import * as users from "./users";
|
|
28
|
+
import * as entitlements from "./entitlements";
|
|
28
29
|
import { ContextHolder, FronteggContext } from "./ContextHolder";
|
|
29
30
|
export * from "./interfaces";
|
|
30
31
|
export * from "./auth/interfaces";
|
|
@@ -49,6 +50,7 @@ export * from "./impersonate/interfaces";
|
|
|
49
50
|
export * from "./groups/interfaces";
|
|
50
51
|
export * from "./groups/enums";
|
|
51
52
|
export * from "./users/interfaces";
|
|
53
|
+
export * from "./entitlements/interfaces";
|
|
52
54
|
const api = {
|
|
53
55
|
auth,
|
|
54
56
|
teams,
|
|
@@ -67,7 +69,8 @@ const api = {
|
|
|
67
69
|
directory,
|
|
68
70
|
impersonate,
|
|
69
71
|
groups,
|
|
70
|
-
users
|
|
72
|
+
users,
|
|
73
|
+
entitlements
|
|
71
74
|
};
|
|
72
75
|
export { fetch, ContextHolder, FronteggContext, api, FronteggApiError, AuthStrategyEnum, SocialLoginProviders, ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType, MachineToMachineAuthStrategy };
|
|
73
76
|
export default {
|
package/interfaces.d.ts
CHANGED
package/node/constants.js
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.loadEntitlements = loadEntitlements;
|
|
7
|
+
|
|
8
|
+
var _constants = require("../constants");
|
|
9
|
+
|
|
10
|
+
var _fetch = require("../fetch");
|
|
11
|
+
|
|
12
|
+
async function loadEntitlements() {
|
|
13
|
+
return (0, _fetch.Get)(_constants.urls.entitlements.v1);
|
|
14
|
+
}
|
package/node/fetch.js
CHANGED
|
@@ -52,10 +52,12 @@ async function prepareUrl(context, url, params) {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
async function buildRequestHeaders(context, contentType) {
|
|
55
|
-
var _context$tokenResolve
|
|
55
|
+
var _context$tokenResolve;
|
|
56
56
|
|
|
57
57
|
const authToken = await ((_context$tokenResolve = context == null ? void 0 : context.tokenResolver) != null ? _context$tokenResolve : _ContextHolder.ContextHolder.getAccessToken)();
|
|
58
|
-
|
|
58
|
+
|
|
59
|
+
const requestSource = _ContextHolder.ContextHolder.getRequestSource();
|
|
60
|
+
|
|
59
61
|
const headers = {};
|
|
60
62
|
|
|
61
63
|
if (authToken) {
|
package/node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license Frontegg v3.0.
|
|
1
|
+
/** @license Frontegg v3.0.106
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the MIT license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -150,6 +150,8 @@ var groups = _interopRequireWildcard(require("./groups"));
|
|
|
150
150
|
|
|
151
151
|
var users = _interopRequireWildcard(require("./users"));
|
|
152
152
|
|
|
153
|
+
var entitlements = _interopRequireWildcard(require("./entitlements"));
|
|
154
|
+
|
|
153
155
|
var _ContextHolder = require("./ContextHolder");
|
|
154
156
|
|
|
155
157
|
var _interfaces = require("./interfaces");
|
|
@@ -446,6 +448,20 @@ Object.keys(_interfaces19).forEach(function (key) {
|
|
|
446
448
|
});
|
|
447
449
|
});
|
|
448
450
|
|
|
451
|
+
var _interfaces20 = require("./entitlements/interfaces");
|
|
452
|
+
|
|
453
|
+
Object.keys(_interfaces20).forEach(function (key) {
|
|
454
|
+
if (key === "default" || key === "__esModule") return;
|
|
455
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
456
|
+
if (key in exports && exports[key] === _interfaces20[key]) return;
|
|
457
|
+
Object.defineProperty(exports, key, {
|
|
458
|
+
enumerable: true,
|
|
459
|
+
get: function () {
|
|
460
|
+
return _interfaces20[key];
|
|
461
|
+
}
|
|
462
|
+
});
|
|
463
|
+
});
|
|
464
|
+
|
|
449
465
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
450
466
|
|
|
451
467
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -468,7 +484,8 @@ const api = {
|
|
|
468
484
|
directory,
|
|
469
485
|
impersonate,
|
|
470
486
|
groups,
|
|
471
|
-
users
|
|
487
|
+
users,
|
|
488
|
+
entitlements
|
|
472
489
|
};
|
|
473
490
|
exports.api = api;
|
|
474
491
|
var _default = {
|