@frontegg/rest-api 7.92.0 → 7.93.0

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 CHANGED
@@ -63,6 +63,10 @@ export declare const urls: {
63
63
  v1: string;
64
64
  };
65
65
  };
66
+ phoneNumbers: {
67
+ v1: string;
68
+ v2: string;
69
+ };
66
70
  };
67
71
  configurations: {
68
72
  v1: string;
@@ -135,6 +139,9 @@ export declare const urls: {
135
139
  phoneNumbers: {
136
140
  v1: string;
137
141
  };
142
+ emails: {
143
+ v1: string;
144
+ };
138
145
  usernames: {
139
146
  v1: string;
140
147
  };
package/constants.js CHANGED
@@ -62,6 +62,10 @@ export const urls = {
62
62
  configuration: {
63
63
  v1: '/identity/resources/users/temporary/v1/configuration'
64
64
  }
65
+ },
66
+ phoneNumbers: {
67
+ v1: '/identity/resources/users/phone-numbers/v1',
68
+ v2: '/identity/resources/users/phone-numbers/v2'
65
69
  }
66
70
  },
67
71
  configurations: {
@@ -135,6 +139,9 @@ export const urls = {
135
139
  phoneNumbers: {
136
140
  v1: '/identity/resources/users/phone-numbers/v1'
137
141
  },
142
+ emails: {
143
+ v1: '/identity/resources/users/emails/v1'
144
+ },
138
145
  usernames: {
139
146
  v1: '/identity/resources/usernames/v1'
140
147
  },
package/index.d.ts CHANGED
@@ -25,6 +25,7 @@ import { GroupsApi } from './groups';
25
25
  import { EntitlementsApi } from './entitlements';
26
26
  import { SecurityCenterApi } from './security-center';
27
27
  import { PhoneNumbersApi } from './user-phone-numbers';
28
+ import { UsersEmailsApi } from './users-emails';
28
29
  import { ApplicationsApi } from './applications';
29
30
  import { VeloApi } from './velo';
30
31
  import { UsernamesApi } from './usernames';
@@ -89,6 +90,7 @@ declare const api: {
89
90
  entitlements: EntitlementsApi;
90
91
  securityCenter: SecurityCenterApi;
91
92
  userPhoneNumbers: PhoneNumbersApi;
93
+ usersEmails: UsersEmailsApi;
92
94
  applications: ApplicationsApi;
93
95
  velo: VeloApi;
94
96
  usernames: UsernamesApi;
@@ -117,6 +119,7 @@ export type FronteggApiClient = {
117
119
  entitlements: EntitlementsApi;
118
120
  securityCenter: SecurityCenterApi;
119
121
  userPhoneNumbers: PhoneNumbersApi;
122
+ usersEmails: UsersEmailsApi;
120
123
  applications: ApplicationsApi;
121
124
  velo: VeloApi;
122
125
  usernames: UsernamesApi;
@@ -170,6 +173,7 @@ declare const _default: {
170
173
  entitlements: EntitlementsApi;
171
174
  securityCenter: SecurityCenterApi;
172
175
  userPhoneNumbers: PhoneNumbersApi;
176
+ usersEmails: UsersEmailsApi;
173
177
  applications: ApplicationsApi;
174
178
  velo: VeloApi;
175
179
  usernames: UsernamesApi;
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.92.0
1
+ /** @license Frontegg v7.93.0
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.
@@ -30,6 +30,7 @@ import DefaultGroupsApi, { GroupsApi } from './groups';
30
30
  import DefaultEntitlementsApi, { EntitlementsApi } from './entitlements';
31
31
  import DefaultSecurityCenterApi, { SecurityCenterApi } from './security-center';
32
32
  import DefaultPhoneNumbersApi, { PhoneNumbersApi } from './user-phone-numbers';
33
+ import DefaultUsersEmailsApi, { UsersEmailsApi } from './users-emails';
33
34
  import DefaultApplicationsApi, { ApplicationsApi } from './applications';
34
35
  import DefaultVeloApi, { VeloApi } from './velo';
35
36
  import DefaultUsernamesApi, { UsernamesApi } from './usernames';
@@ -94,6 +95,7 @@ const api = {
94
95
  entitlements: DefaultEntitlementsApi,
95
96
  securityCenter: DefaultSecurityCenterApi,
96
97
  userPhoneNumbers: DefaultPhoneNumbersApi,
98
+ usersEmails: DefaultUsersEmailsApi,
97
99
  applications: DefaultApplicationsApi,
98
100
  velo: DefaultVeloApi,
99
101
  usernames: DefaultUsernamesApi,
@@ -122,6 +124,7 @@ const createApiClient = appName => ({
122
124
  entitlements: new EntitlementsApi(appName),
123
125
  securityCenter: new SecurityCenterApi(appName),
124
126
  userPhoneNumbers: new PhoneNumbersApi(appName),
127
+ usersEmails: new UsersEmailsApi(appName),
125
128
  applications: new ApplicationsApi(appName),
126
129
  velo: new VeloApi(appName),
127
130
  usernames: new UsernamesApi(appName),
package/node/constants.js CHANGED
@@ -68,6 +68,10 @@ const urls = {
68
68
  configuration: {
69
69
  v1: '/identity/resources/users/temporary/v1/configuration'
70
70
  }
71
+ },
72
+ phoneNumbers: {
73
+ v1: '/identity/resources/users/phone-numbers/v1',
74
+ v2: '/identity/resources/users/phone-numbers/v2'
71
75
  }
72
76
  },
73
77
  configurations: {
@@ -141,6 +145,9 @@ const urls = {
141
145
  phoneNumbers: {
142
146
  v1: '/identity/resources/users/phone-numbers/v1'
143
147
  },
148
+ emails: {
149
+ v1: '/identity/resources/users/emails/v1'
150
+ },
144
151
  usernames: {
145
152
  v1: '/identity/resources/usernames/v1'
146
153
  },
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v7.92.0
1
+ /** @license Frontegg v7.93.0
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.
@@ -178,6 +178,7 @@ var _groups = _interopRequireWildcard(require("./groups"));
178
178
  var _entitlements = _interopRequireWildcard(require("./entitlements"));
179
179
  var _securityCenter = _interopRequireWildcard(require("./security-center"));
180
180
  var _userPhoneNumbers = _interopRequireWildcard(require("./user-phone-numbers"));
181
+ var _usersEmails = _interopRequireWildcard(require("./users-emails"));
181
182
  var _applications = _interopRequireWildcard(require("./applications"));
182
183
  var _velo = _interopRequireWildcard(require("./velo"));
183
184
  var _usernames = _interopRequireWildcard(require("./usernames"));
@@ -573,6 +574,7 @@ const api = {
573
574
  entitlements: _entitlements.default,
574
575
  securityCenter: _securityCenter.default,
575
576
  userPhoneNumbers: _userPhoneNumbers.default,
577
+ usersEmails: _usersEmails.default,
576
578
  applications: _applications.default,
577
579
  velo: _velo.default,
578
580
  usernames: _usernames.default,
@@ -602,6 +604,7 @@ const createApiClient = appName => ({
602
604
  entitlements: new _entitlements.EntitlementsApi(appName),
603
605
  securityCenter: new _securityCenter.SecurityCenterApi(appName),
604
606
  userPhoneNumbers: new _userPhoneNumbers.PhoneNumbersApi(appName),
607
+ usersEmails: new _usersEmails.UsersEmailsApi(appName),
605
608
  applications: new _applications.ApplicationsApi(appName),
606
609
  velo: new _velo.VeloApi(appName),
607
610
  usernames: new _usernames.UsernamesApi(appName),
@@ -30,6 +30,11 @@ class PhoneNumbersApi extends _BaseApiClient.BaseApiClient {
30
30
  this.verifyDeletePhoneNumber = async (phoneId, body) => {
31
31
  return this.post(`${_constants.urls.identity.phoneNumbers.v1}/${phoneId}/delete/verify`, body);
32
32
  };
33
+ this.getUsersPhoneNumberV2 = async (queryParams, options) => {
34
+ return this.get(_constants.urls.identity.users.phoneNumbers.v2, queryParams, {
35
+ headers: this.extractHeadersFromOptions(options)
36
+ });
37
+ };
33
38
  }
34
39
 
35
40
  /**
@@ -9,6 +9,11 @@ var _constants = require("../constants");
9
9
  class UsernamesApi extends _BaseApiClient.BaseApiClient {
10
10
  constructor(appName) {
11
11
  super(appName);
12
+ this.getUsernamesV1 = async (queryParams, options) => {
13
+ return this.get(`${_constants.urls.identity.usernames.v1}`, queryParams, {
14
+ headers: this.extractHeadersFromOptions(options)
15
+ });
16
+ };
12
17
  this.getUserOwnUsername = async () => {
13
18
  return this.get(`${_constants.urls.identity.usernames.v1}/me`);
14
19
  };
@@ -19,10 +24,6 @@ class UsernamesApi extends _BaseApiClient.BaseApiClient {
19
24
  return this.delete(`${_constants.urls.identity.usernames.v1}/${username}`);
20
25
  };
21
26
  }
22
-
23
- /**
24
- * Get own username of user
25
- */
26
27
  }
27
28
  exports.UsernamesApi = UsernamesApi;
28
29
  var _default = new UsernamesApi('default');
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.UsersEmailsApi = void 0;
7
+ var _constants = require("../constants");
8
+ var _BaseApiClient = require("../BaseApiClient");
9
+ class UsersEmailsApi extends _BaseApiClient.BaseApiClient {
10
+ constructor(appName) {
11
+ super(appName);
12
+ this.getUsersEmailsV1 = async (queryParams, options) => {
13
+ return this.get(_constants.urls.identity.emails.v1, queryParams, {
14
+ headers: this.extractHeadersFromOptions(options)
15
+ });
16
+ };
17
+ }
18
+ }
19
+ exports.UsersEmailsApi = UsersEmailsApi;
20
+ var _default = new UsersEmailsApi('default');
21
+ exports.default = _default;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontegg/rest-api",
3
- "version": "7.92.0",
3
+ "version": "7.93.0",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "author": "Frontegg LTD",
@@ -1,5 +1,5 @@
1
- import { FronteggPaginationWrapper } from '../interfaces';
2
- import { ICreatePhoneNumberResponse, IDeletePhoneNumberResponse, IGetPhoneNumbersQueryParams, IPhoneNumber, IPreVerifyPhoneNumber, IPreVerifyPhoneNumberResponse, IUpdatePhoneNumber, IVerifyPhoneNumber } from './interfaces';
1
+ import { FronteggPaginationWrapper, UserJwtOptions } from '../interfaces';
2
+ import { ICreatePhoneNumberResponse, IDeletePhoneNumberResponse, IGetPhoneNumbersQueryParams, IGetUsersPhoneNumbersV2QueryParams, GetUsersPhoneNumberV2Response, IPhoneNumber, IPreVerifyPhoneNumber, IPreVerifyPhoneNumberResponse, IUpdatePhoneNumber, IVerifyPhoneNumber } from './interfaces';
3
3
  import { BaseApiClient } from '../BaseApiClient';
4
4
  export declare class PhoneNumbersApi extends BaseApiClient {
5
5
  constructor(appName: string);
@@ -31,6 +31,10 @@ export declare class PhoneNumbersApi extends BaseApiClient {
31
31
  * Verify delete phone number
32
32
  */
33
33
  verifyDeletePhoneNumber: (phoneId: string, body: IVerifyPhoneNumber) => Promise<void>;
34
+ /**
35
+ * Get users by phone number
36
+ */
37
+ getUsersPhoneNumberV2: (queryParams: IGetUsersPhoneNumbersV2QueryParams, options?: UserJwtOptions) => Promise<FronteggPaginationWrapper<GetUsersPhoneNumberV2Response>>;
34
38
  }
35
39
  declare const _default: PhoneNumbersApi;
36
40
  export default _default;
@@ -24,6 +24,11 @@ export class PhoneNumbersApi extends BaseApiClient {
24
24
  this.verifyDeletePhoneNumber = async (phoneId, body) => {
25
25
  return this.post(`${urls.identity.phoneNumbers.v1}/${phoneId}/delete/verify`, body);
26
26
  };
27
+ this.getUsersPhoneNumberV2 = async (queryParams, options) => {
28
+ return this.get(urls.identity.users.phoneNumbers.v2, queryParams, {
29
+ headers: this.extractHeadersFromOptions(options)
30
+ });
31
+ };
27
32
  }
28
33
 
29
34
  /**
@@ -30,3 +30,12 @@ export interface IDeletePhoneNumberResponse {
30
30
  phoneId: string;
31
31
  otcToken: string;
32
32
  }
33
+ export interface IGetUsersPhoneNumbersV2QueryParams {
34
+ _limit?: number;
35
+ _offset?: number;
36
+ _phoneNumber?: string;
37
+ }
38
+ export interface GetUsersPhoneNumberV2Response {
39
+ userId: string;
40
+ phoneNumber: string;
41
+ }
@@ -1,7 +1,9 @@
1
1
  import { BaseApiClient } from '../BaseApiClient';
2
- import { ICreateUsername, IGetUserOwnUsernameResponse } from './interfaces';
2
+ import { ICreateUsername, IGetUserOwnUsernameResponse, IGetUsernamesV1QueryParams, getUsernamesV1Response } from './interfaces';
3
+ import { FronteggPaginationWrapper, UserJwtOptions } from '../interfaces';
3
4
  export declare class UsernamesApi extends BaseApiClient {
4
5
  constructor(appName: string);
6
+ getUsernamesV1: (queryParams: IGetUsernamesV1QueryParams, options?: UserJwtOptions) => Promise<FronteggPaginationWrapper<getUsernamesV1Response>>;
5
7
  /**
6
8
  * Get own username of user
7
9
  */
@@ -3,6 +3,11 @@ import { urls } from '../constants';
3
3
  export class UsernamesApi extends BaseApiClient {
4
4
  constructor(appName) {
5
5
  super(appName);
6
+ this.getUsernamesV1 = async (queryParams, options) => {
7
+ return this.get(`${urls.identity.usernames.v1}`, queryParams, {
8
+ headers: this.extractHeadersFromOptions(options)
9
+ });
10
+ };
6
11
  this.getUserOwnUsername = async () => {
7
12
  return this.get(`${urls.identity.usernames.v1}/me`);
8
13
  };
@@ -13,10 +18,5 @@ export class UsernamesApi extends BaseApiClient {
13
18
  return this.delete(`${urls.identity.usernames.v1}/${username}`);
14
19
  };
15
20
  }
16
-
17
- /**
18
- * Get own username of user
19
- */
20
21
  }
21
-
22
22
  export default new UsernamesApi('default');
@@ -5,3 +5,12 @@ export type IGetUserOwnUsernameResponse = {
5
5
  username: string;
6
6
  userId: string;
7
7
  };
8
+ export type IGetUsernamesV1QueryParams = {
9
+ _limit?: number;
10
+ _offset?: number;
11
+ _usernamePrefix?: string;
12
+ };
13
+ export type getUsernamesV1Response = {
14
+ userId: string;
15
+ username: string;
16
+ };
@@ -42,6 +42,7 @@ export interface ISearchUserQueryParamsV3 extends IGetUserQueryParams {
42
42
  _maxInactiveSeconds?: number;
43
43
  _identifier?: string;
44
44
  _identifierType?: string;
45
+ _namePrefix?: string;
45
46
  }
46
47
  export interface IUserTenantData {
47
48
  tenantId: string;
@@ -108,6 +109,10 @@ export interface GetUsersRolesParams {
108
109
  export interface GetUsersUsernamesParams {
109
110
  userIds: string[];
110
111
  }
112
+ export interface GetUsersEmailsV1Response {
113
+ userId: string;
114
+ email: string;
115
+ }
111
116
  export interface GetUserRolesResponse {
112
117
  vendorId: string;
113
118
  tenantId: string;
@@ -0,0 +1,9 @@
1
+ import { FronteggPaginationWrapper, UserJwtOptions } from '../interfaces';
2
+ import { BaseApiClient } from '../BaseApiClient';
3
+ import { IGetUsersEmailsV1QueryParams, GetUsersEmailsV1Response } from './interfaces';
4
+ export declare class UsersEmailsApi extends BaseApiClient {
5
+ constructor(appName: string);
6
+ getUsersEmailsV1: (queryParams: IGetUsersEmailsV1QueryParams, options?: UserJwtOptions) => Promise<FronteggPaginationWrapper<GetUsersEmailsV1Response>>;
7
+ }
8
+ declare const _default: UsersEmailsApi;
9
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import { urls } from '../constants';
2
+ import { BaseApiClient } from '../BaseApiClient';
3
+ export class UsersEmailsApi extends BaseApiClient {
4
+ constructor(appName) {
5
+ super(appName);
6
+ this.getUsersEmailsV1 = async (queryParams, options) => {
7
+ return this.get(urls.identity.emails.v1, queryParams, {
8
+ headers: this.extractHeadersFromOptions(options)
9
+ });
10
+ };
11
+ }
12
+ }
13
+ export default new UsersEmailsApi('default');
@@ -0,0 +1,9 @@
1
+ export interface IGetUsersEmailsV1QueryParams {
2
+ _limit?: number;
3
+ _offset?: number;
4
+ _email?: string;
5
+ }
6
+ export interface GetUsersEmailsV1Response {
7
+ userId: string;
8
+ email: string;
9
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "./index.js",
4
+ "main": "../node/users-emails/index.js",
5
+ "types": "./index.d.ts"
6
+ }