@frontegg/rest-api 3.0.42 → 3.0.44
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/directory/index.d.ts +8 -3
- package/directory/index.js +5 -2
- package/directory/interfaces.d.ts +5 -0
- package/fetch.d.ts +1 -1
- package/fetch.js +2 -2
- package/index.d.ts +3 -0
- package/index.js +4 -2
- package/node/directory/index.js +6 -1
- package/node/fetch.js +2 -2
- package/node/index.js +17 -16
- package/package.json +1 -1
package/directory/index.d.ts
CHANGED
|
@@ -4,14 +4,19 @@ import { Scim2ConnectionConfigResponse, Scim2CreateConnectionConfigRequest, Scim
|
|
|
4
4
|
*
|
|
5
5
|
* ``authorized user``
|
|
6
6
|
*/
|
|
7
|
-
export declare function getConfigs(): Promise<Scim2ConnectionConfigResponse>;
|
|
7
|
+
export declare function getConfigs(): Promise<Scim2ConnectionConfigResponse[]>;
|
|
8
8
|
/**
|
|
9
9
|
* update scim2 configuration
|
|
10
10
|
* ``authorized user``
|
|
11
11
|
*/
|
|
12
|
-
export declare function updateConfiguration(id: string, body: Scim2PatchConnectionConfigRequest): Promise<
|
|
12
|
+
export declare function updateConfiguration(id: string, body: Scim2PatchConnectionConfigRequest): Promise<void>;
|
|
13
13
|
/**
|
|
14
14
|
* create scim2 configuration
|
|
15
15
|
* ``authorized user``
|
|
16
16
|
*/
|
|
17
|
-
export declare function createConfiguration(
|
|
17
|
+
export declare function createConfiguration(body: Scim2CreateConnectionConfigRequest): Promise<Scim2ConnectionConfigResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* delete scim2 configuration
|
|
20
|
+
* ``authorized user``
|
|
21
|
+
*/
|
|
22
|
+
export declare function deleteConfiguration(id: string): Promise<void>;
|
package/directory/index.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { urls } from '../constants';
|
|
2
|
-
import { Get, Patch, Post } from '../fetch';
|
|
2
|
+
import { Delete, Get, Patch, Post } from '../fetch';
|
|
3
3
|
export async function getConfigs() {
|
|
4
4
|
return Get(`${urls.directory.v1}`);
|
|
5
5
|
}
|
|
6
6
|
export async function updateConfiguration(id, body) {
|
|
7
7
|
return Patch(`${urls.directory.v1}/${id}`, body);
|
|
8
8
|
}
|
|
9
|
-
export async function createConfiguration(
|
|
9
|
+
export async function createConfiguration(body) {
|
|
10
10
|
return Post(`${urls.directory.v1}`, body);
|
|
11
|
+
}
|
|
12
|
+
export async function deleteConfiguration(id) {
|
|
13
|
+
return Delete(`${urls.directory.v1}/${id}`);
|
|
11
14
|
}
|
|
@@ -19,3 +19,8 @@ export interface Scim2CreateConnectionConfigRequest {
|
|
|
19
19
|
export interface Scim2PatchConnectionConfigRequest {
|
|
20
20
|
syncToUserManagement?: boolean;
|
|
21
21
|
}
|
|
22
|
+
export interface Scim2CreateConnectionConfigResponse {
|
|
23
|
+
id: string;
|
|
24
|
+
connectionName: string;
|
|
25
|
+
token: string;
|
|
26
|
+
}
|
package/fetch.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ interface RequestOptions {
|
|
|
9
9
|
headers?: Record<string, string>;
|
|
10
10
|
credentials?: RequestCredentials;
|
|
11
11
|
}
|
|
12
|
-
export declare function getBaseUrl(context: ContextOptions, url: string): string;
|
|
12
|
+
export declare function getBaseUrl(context: ContextOptions, url: string, withFronteggSuffix?: boolean): string;
|
|
13
13
|
export declare const Get: (url: string, params?: any, opts?: Pick<RequestOptions, "body" | "params" | "contentType" | "responseType" | "headers" | "credentials"> | undefined) => Promise<any>;
|
|
14
14
|
export declare const Post: (url: string, body?: any, opts?: Pick<RequestOptions, "body" | "params" | "contentType" | "responseType" | "headers" | "credentials"> | undefined) => Promise<any>;
|
|
15
15
|
export declare const Patch: (url: string, body?: any, opts?: Pick<RequestOptions, "body" | "params" | "contentType" | "responseType" | "headers" | "credentials"> | undefined) => Promise<any>;
|
package/fetch.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { ContextHolder } from './ContextHolder';
|
|
3
3
|
import { FronteggApiError } from './error';
|
|
4
|
-
export function getBaseUrl(context, url) {
|
|
4
|
+
export function getBaseUrl(context, url, withFronteggSuffix = true) {
|
|
5
5
|
let baseUrl;
|
|
6
6
|
|
|
7
7
|
if (typeof context.baseUrl === 'function') {
|
|
@@ -10,7 +10,7 @@ export function getBaseUrl(context, url) {
|
|
|
10
10
|
baseUrl = context.baseUrl;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
const prefix = context.urlPrefix || 'frontegg';
|
|
13
|
+
const prefix = context.urlPrefix || withFronteggSuffix ? 'frontegg' : '';
|
|
14
14
|
|
|
15
15
|
if (!baseUrl.endsWith('/')) {
|
|
16
16
|
baseUrl += '/';
|
package/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { FronteggApiError } from './error';
|
|
|
14
14
|
import * as vendor from './vendor';
|
|
15
15
|
import * as subTenants from './sub-tenants';
|
|
16
16
|
import * as featureFlags from './feature-flags';
|
|
17
|
+
import * as directory from './directory';
|
|
17
18
|
import { ContextHolder, FronteggContext } from './ContextHolder';
|
|
18
19
|
export * from './interfaces';
|
|
19
20
|
export * from './auth/interfaces';
|
|
@@ -51,6 +52,7 @@ declare const api: {
|
|
|
51
52
|
vendor: typeof vendor;
|
|
52
53
|
subTenants: typeof subTenants;
|
|
53
54
|
featureFlags: typeof featureFlags;
|
|
55
|
+
directory: typeof directory;
|
|
54
56
|
};
|
|
55
57
|
export { fetch, ContextHolder, FronteggContext, api, FronteggApiError, AuthStrategyEnum, SocialLoginProviders, ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType, };
|
|
56
58
|
declare const _default: {
|
|
@@ -78,6 +80,7 @@ declare const _default: {
|
|
|
78
80
|
vendor: typeof vendor;
|
|
79
81
|
subTenants: typeof subTenants;
|
|
80
82
|
featureFlags: typeof featureFlags;
|
|
83
|
+
directory: typeof directory;
|
|
81
84
|
};
|
|
82
85
|
FronteggApiError: typeof FronteggApiError;
|
|
83
86
|
AuthStrategyEnum: typeof auth.AuthStrategyEnum;
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license Frontegg v3.0.
|
|
1
|
+
/** @license Frontegg v3.0.44
|
|
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.
|
|
@@ -19,6 +19,7 @@ import { FronteggApiError } from './error';
|
|
|
19
19
|
import * as vendor from './vendor';
|
|
20
20
|
import * as subTenants from './sub-tenants';
|
|
21
21
|
import * as featureFlags from './feature-flags';
|
|
22
|
+
import * as directory from './directory';
|
|
22
23
|
import { ContextHolder, FronteggContext } from './ContextHolder';
|
|
23
24
|
export * from './interfaces';
|
|
24
25
|
export * from './auth/interfaces';
|
|
@@ -55,7 +56,8 @@ const api = {
|
|
|
55
56
|
subscriptions,
|
|
56
57
|
vendor,
|
|
57
58
|
subTenants,
|
|
58
|
-
featureFlags
|
|
59
|
+
featureFlags,
|
|
60
|
+
directory
|
|
59
61
|
};
|
|
60
62
|
export { fetch, ContextHolder, FronteggContext, api, FronteggApiError, AuthStrategyEnum, SocialLoginProviders, ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType };
|
|
61
63
|
export default {
|
package/node/directory/index.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.createConfiguration = createConfiguration;
|
|
7
|
+
exports.deleteConfiguration = deleteConfiguration;
|
|
7
8
|
exports.getConfigs = getConfigs;
|
|
8
9
|
exports.updateConfiguration = updateConfiguration;
|
|
9
10
|
|
|
@@ -19,6 +20,10 @@ async function updateConfiguration(id, body) {
|
|
|
19
20
|
return (0, _fetch.Patch)(`${_constants.urls.directory.v1}/${id}`, body);
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
async function createConfiguration(
|
|
23
|
+
async function createConfiguration(body) {
|
|
23
24
|
return (0, _fetch.Post)(`${_constants.urls.directory.v1}`, body);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async function deleteConfiguration(id) {
|
|
28
|
+
return (0, _fetch.Delete)(`${_constants.urls.directory.v1}/${id}`);
|
|
24
29
|
}
|
package/node/fetch.js
CHANGED
|
@@ -14,7 +14,7 @@ var _ContextHolder = require("./ContextHolder");
|
|
|
14
14
|
|
|
15
15
|
var _error = require("./error");
|
|
16
16
|
|
|
17
|
-
function getBaseUrl(context, url) {
|
|
17
|
+
function getBaseUrl(context, url, withFronteggSuffix = true) {
|
|
18
18
|
let baseUrl;
|
|
19
19
|
|
|
20
20
|
if (typeof context.baseUrl === 'function') {
|
|
@@ -23,7 +23,7 @@ function getBaseUrl(context, url) {
|
|
|
23
23
|
baseUrl = context.baseUrl;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
const prefix = context.urlPrefix || 'frontegg';
|
|
26
|
+
const prefix = context.urlPrefix || withFronteggSuffix ? 'frontegg' : '';
|
|
27
27
|
|
|
28
28
|
if (!baseUrl.endsWith('/')) {
|
|
29
29
|
baseUrl += '/';
|
package/node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license Frontegg v3.0.
|
|
1
|
+
/** @license Frontegg v3.0.44
|
|
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.
|
|
@@ -123,6 +123,20 @@ Object.keys(featureFlags).forEach(function (key) {
|
|
|
123
123
|
});
|
|
124
124
|
});
|
|
125
125
|
|
|
126
|
+
var directory = _interopRequireWildcard(require("./directory"));
|
|
127
|
+
|
|
128
|
+
Object.keys(directory).forEach(function (key) {
|
|
129
|
+
if (key === "default" || key === "__esModule") return;
|
|
130
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
131
|
+
if (key in exports && exports[key] === directory[key]) return;
|
|
132
|
+
Object.defineProperty(exports, key, {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
get: function () {
|
|
135
|
+
return directory[key];
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
|
|
126
140
|
var _ContextHolder = require("./ContextHolder");
|
|
127
141
|
|
|
128
142
|
var _interfaces = require("./interfaces");
|
|
@@ -349,20 +363,6 @@ Object.keys(_interfaces15).forEach(function (key) {
|
|
|
349
363
|
});
|
|
350
364
|
});
|
|
351
365
|
|
|
352
|
-
var _directory = require("./directory");
|
|
353
|
-
|
|
354
|
-
Object.keys(_directory).forEach(function (key) {
|
|
355
|
-
if (key === "default" || key === "__esModule") return;
|
|
356
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
357
|
-
if (key in exports && exports[key] === _directory[key]) return;
|
|
358
|
-
Object.defineProperty(exports, key, {
|
|
359
|
-
enumerable: true,
|
|
360
|
-
get: function () {
|
|
361
|
-
return _directory[key];
|
|
362
|
-
}
|
|
363
|
-
});
|
|
364
|
-
});
|
|
365
|
-
|
|
366
366
|
var _interfaces16 = require("./directory/interfaces");
|
|
367
367
|
|
|
368
368
|
Object.keys(_interfaces16).forEach(function (key) {
|
|
@@ -395,7 +395,8 @@ const api = {
|
|
|
395
395
|
subscriptions,
|
|
396
396
|
vendor,
|
|
397
397
|
subTenants,
|
|
398
|
-
featureFlags
|
|
398
|
+
featureFlags,
|
|
399
|
+
directory
|
|
399
400
|
};
|
|
400
401
|
exports.api = api;
|
|
401
402
|
var _default = {
|