@frontegg/rest-api 3.0.42 → 3.0.43
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 +3 -3
- package/directory/interfaces.d.ts +5 -0
- package/fetch.d.ts +1 -1
- package/fetch.js +2 -2
- package/index.js +1 -1
- package/node/fetch.js +2 -2
- package/node/index.js +1 -1
- package/package.json +1 -1
package/directory/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Scim2ConnectionConfigResponse, Scim2CreateConnectionConfigRequest, Scim2PatchConnectionConfigRequest } from './interfaces';
|
|
1
|
+
import { Scim2ConnectionConfigResponse, Scim2CreateConnectionConfigRequest, Scim2CreateConnectionConfigResponse, Scim2PatchConnectionConfigRequest } from './interfaces';
|
|
2
2
|
/**
|
|
3
3
|
* returns all scim2 configurations
|
|
4
4
|
*
|
|
@@ -9,9 +9,9 @@ export declare function getConfigs(): Promise<Scim2ConnectionConfigResponse>;
|
|
|
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(id: string, body: Scim2CreateConnectionConfigRequest): Promise<
|
|
17
|
+
export declare function createConfiguration(id: string, body: Scim2CreateConnectionConfigRequest): Promise<Scim2CreateConnectionConfigResponse>;
|
|
@@ -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.js
CHANGED
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