@frontegg/rest-api 3.1.23 → 3.1.24

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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.1.23
1
+ /** @license Frontegg v3.1.24
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/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.1.23
1
+ /** @license Frontegg v3.1.24
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.
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.createPhoneNumber = createPhoneNumber;
7
7
  exports.deletePhoneNumber = deletePhoneNumber;
8
8
  exports.getUserPhoneNumbers = getUserPhoneNumbers;
9
- exports.updatePhoneNumber = updatePhoneNumber;
10
9
  exports.verifyDeletePhoneNumber = verifyDeletePhoneNumber;
11
10
  exports.verifyPhoneNumber = verifyPhoneNumber;
12
11
 
@@ -22,16 +21,12 @@ async function createPhoneNumber(body) {
22
21
  return (0, _fetch.Post)(`${_constants.urls.identity.phoneNumbers.v1}`, body);
23
22
  }
24
23
 
25
- async function updatePhoneNumber(phoneId, body) {
26
- return (0, _fetch.Patch)(`${_constants.urls.identity.phoneNumbers.v1}/${phoneId}`, body);
27
- }
28
-
29
24
  async function deletePhoneNumber(phoneId) {
30
25
  return (0, _fetch.Delete)(`${_constants.urls.identity.phoneNumbers.v1}/${phoneId}`);
31
26
  }
32
27
 
33
- async function verifyPhoneNumber(phoneId, body) {
34
- return (0, _fetch.Post)(`${_constants.urls.identity.phoneNumbers.v1}/${phoneId}/verify`, body);
28
+ async function verifyPhoneNumber(body) {
29
+ return (0, _fetch.Post)(`${_constants.urls.identity.phoneNumbers.v1}/verify`, body);
35
30
  }
36
31
 
37
32
  async function verifyDeletePhoneNumber(phoneId, body) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontegg/rest-api",
3
- "version": "3.1.23",
3
+ "version": "3.1.24",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {
@@ -1,5 +1,5 @@
1
1
  import { FronteggPaginationWrapper } from "../interfaces";
2
- import { IGetPhoneNumbersQueryParams, IPhoneNumber, IUpdatePhoneNumber, IUpdatePhoneNumberResponse, IVerifyPhoneNumber } from "./interfaces";
2
+ import { ICreatePhoneNumberResponse, IDeletePhoneNumberResponse, IGetPhoneNumbersQueryParams, IPhoneNumber, IUpdatePhoneNumber, IVerifyPhoneNumber } from "./interfaces";
3
3
  /**
4
4
  * Get phone numbers of user
5
5
  */
@@ -7,19 +7,15 @@ export declare function getUserPhoneNumbers(queryParams: IGetPhoneNumbersQueryPa
7
7
  /**
8
8
  * Create new phone number for user
9
9
  */
10
- export declare function createPhoneNumber(body: IUpdatePhoneNumber): Promise<IUpdatePhoneNumberResponse>;
11
- /**
12
- * Update existing phone number for user
13
- */
14
- export declare function updatePhoneNumber(phoneId: string, body: IUpdatePhoneNumber): Promise<IUpdatePhoneNumberResponse>;
10
+ export declare function createPhoneNumber(body: IUpdatePhoneNumber): Promise<ICreatePhoneNumberResponse>;
15
11
  /**
16
12
  * Delete existing phone number for user
17
13
  */
18
- export declare function deletePhoneNumber(phoneId: string): Promise<IUpdatePhoneNumberResponse>;
14
+ export declare function deletePhoneNumber(phoneId: string): Promise<IDeletePhoneNumberResponse>;
19
15
  /**
20
16
  * Verify phone number
21
17
  */
22
- export declare function verifyPhoneNumber(phoneId: string, body: IVerifyPhoneNumber): Promise<void>;
18
+ export declare function verifyPhoneNumber(body: IVerifyPhoneNumber): Promise<void>;
23
19
  /**
24
20
  * Verify delete phone number
25
21
  */
@@ -1,19 +1,16 @@
1
1
  import { urls } from "../constants";
2
- import { Delete, Get, Patch, Post } from "../fetch";
2
+ import { Delete, Get, Post } from "../fetch";
3
3
  export async function getUserPhoneNumbers(queryParams) {
4
4
  return Get(`${urls.identity.phoneNumbers.v1}`, queryParams);
5
5
  }
6
6
  export async function createPhoneNumber(body) {
7
7
  return Post(`${urls.identity.phoneNumbers.v1}`, body);
8
8
  }
9
- export async function updatePhoneNumber(phoneId, body) {
10
- return Patch(`${urls.identity.phoneNumbers.v1}/${phoneId}`, body);
11
- }
12
9
  export async function deletePhoneNumber(phoneId) {
13
10
  return Delete(`${urls.identity.phoneNumbers.v1}/${phoneId}`);
14
11
  }
15
- export async function verifyPhoneNumber(phoneId, body) {
16
- return Post(`${urls.identity.phoneNumbers.v1}/${phoneId}/verify`, body);
12
+ export async function verifyPhoneNumber(body) {
13
+ return Post(`${urls.identity.phoneNumbers.v1}/verify`, body);
17
14
  }
18
15
  export async function verifyDeletePhoneNumber(phoneId, body) {
19
16
  return Post(`${urls.identity.phoneNumbers.v1}/${phoneId}/delete/verify`, body);
@@ -20,7 +20,10 @@ export interface IVerifyPhoneNumber {
20
20
  otcToken: string;
21
21
  code: string;
22
22
  }
23
- export interface IUpdatePhoneNumberResponse {
23
+ export interface ICreatePhoneNumberResponse {
24
24
  otcToken: string;
25
+ }
26
+ export interface IDeletePhoneNumberResponse {
25
27
  phoneId: string;
28
+ otcToken: string;
26
29
  }