@frontegg/rest-api 3.0.41 → 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/auth/index.d.ts CHANGED
@@ -145,7 +145,7 @@ export declare function enrollMFAAuthenticatorApp(body: WithoutMFAToken<IEnrollM
145
145
  * pre enroll Multi-Factor SMS
146
146
  * the server returns otcToken that should be sent to the enroll function with the code that was sent to
147
147
  */
148
- export declare function preEnrollMFASMS(): Promise<IPreEnrollMFASMSResponse>;
148
+ export declare function preEnrollMFASMS(body: WithoutMFAToken<IPreEnrollMFASMS>): Promise<IPreEnrollMFASMSResponse>;
149
149
  /**
150
150
  * after pre enroll with SMS, enroll SMS function should be called
151
151
  * with the otcToken and the code that has been sent to the phone number that was requested
package/auth/index.js CHANGED
@@ -134,8 +134,8 @@ export async function preEnrollMFAAuthenticatorApp() {
134
134
  export async function enrollMFAAuthenticatorApp(body) {
135
135
  return Post(`${urls.identity.users.v1}/mfa/authenticator/enroll/verify`, body);
136
136
  }
137
- export async function preEnrollMFASMS() {
138
- return Post(`${urls.identity.users.v1}/mfa/sms/enroll`);
137
+ export async function preEnrollMFASMS(body) {
138
+ return Post(`${urls.identity.users.v1}/mfa/sms/enroll`, body);
139
139
  }
140
140
  export async function enrollMFASMS(body) {
141
141
  return Post(`${urls.identity.users.v1}/mfa/sms/enroll/verify`, body);
@@ -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<Scim2ConnectionConfigResponse>;
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<Scim2ConnectionConfigResponse>;
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
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.0.41
1
+ /** @license Frontegg v3.0.43
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.
@@ -431,8 +431,8 @@ async function enrollMFAAuthenticatorApp(body) {
431
431
  return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/mfa/authenticator/enroll/verify`, body);
432
432
  }
433
433
 
434
- async function preEnrollMFASMS() {
435
- return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/mfa/sms/enroll`);
434
+ async function preEnrollMFASMS(body) {
435
+ return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/mfa/sms/enroll`, body);
436
436
  }
437
437
 
438
438
  async function enrollMFASMS(body) {
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.41
1
+ /** @license Frontegg v3.0.43
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontegg/rest-api",
3
- "version": "3.0.41",
3
+ "version": "3.0.43",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {