@frontegg/rest-api 3.0.97 → 3.0.98

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.0.97
1
+ /** @license Frontegg v3.0.98
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.
@@ -1,4 +1,6 @@
1
- import { IAuditsMetadata, IMetadataIp, INotificationMetadata, ISamlMetadata } from './interfaces';
1
+ import { CommitChangesRequest, IAuditsMetadata, IMetadataIp, INotificationMetadata, ISamlMetadata } from './interfaces';
2
+ export declare function getAdminBoxMetadata(): Promise<any>;
3
+ export declare function updateAdminBoxMetadata(body: CommitChangesRequest): Promise<any>;
2
4
  export declare function getCurrentUserIpMetadata(): Promise<IMetadataIp>;
3
5
  export declare const getNotificationsMetadata: () => Promise<INotificationMetadata>;
4
6
  export declare const getSamlMetadata: () => Promise<ISamlMetadata>;
package/metadata/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Get } from '../fetch';
1
+ import { Get, Post } from '../fetch';
2
2
 
3
3
  async function getMetadata(body) {
4
4
  var _data$rows, _data$rows2;
@@ -8,6 +8,13 @@ async function getMetadata(body) {
8
8
  throw new Error(`metadata not found: ${body.entityName}`);
9
9
  }
10
10
 
11
+ export async function getAdminBoxMetadata() {
12
+ return Get('/metadata/admin-box');
13
+ }
14
+ export async function updateAdminBoxMetadata(body) {
15
+ return Post('/metadata/admin-box', body);
16
+ }
17
+
11
18
  async function getIpMetadata(ip) {
12
19
  const data = await Get(`/metadata/ip/${ip}`);
13
20
  if (data) return data;
@@ -44,4 +44,11 @@ export interface IMetadataIp {
44
44
  country_flag_emoji?: string | null;
45
45
  };
46
46
  }
47
+ export interface CommitChangeDto {
48
+ type: string;
49
+ payload: unknown;
50
+ }
51
+ export interface CommitChangesRequest {
52
+ actions: CommitChangeDto[];
53
+ }
47
54
  export {};
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.0.97
1
+ /** @license Frontegg v3.0.98
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.
@@ -3,9 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ exports.getAdminBoxMetadata = getAdminBoxMetadata;
6
7
  exports.getAuditsMetadata = void 0;
7
8
  exports.getCurrentUserIpMetadata = getCurrentUserIpMetadata;
8
9
  exports.getSamlMetadata = exports.getNotificationsMetadata = exports.getIpAdressMetadata = void 0;
10
+ exports.updateAdminBoxMetadata = updateAdminBoxMetadata;
9
11
 
10
12
  var _fetch = require("../fetch");
11
13
 
@@ -17,6 +19,14 @@ async function getMetadata(body) {
17
19
  throw new Error(`metadata not found: ${body.entityName}`);
18
20
  }
19
21
 
22
+ async function getAdminBoxMetadata() {
23
+ return (0, _fetch.Get)('/metadata/admin-box');
24
+ }
25
+
26
+ async function updateAdminBoxMetadata(body) {
27
+ return (0, _fetch.Post)('/metadata/admin-box', body);
28
+ }
29
+
20
30
  async function getIpMetadata(ip) {
21
31
  const data = await (0, _fetch.Get)(`/metadata/ip/${ip}`);
22
32
  if (data) return data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontegg/rest-api",
3
- "version": "3.0.97",
3
+ "version": "3.0.98",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {