@devtable/settings-form 5.3.0 → 5.5.0-alpha

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.
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { IStyles } from './styles';
3
- import { ISettingsFormConfig } from './types';
4
3
  interface IAccountList {
5
4
  styles?: IStyles;
6
5
  config: ISettingsFormConfig;
@@ -1,7 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { IStyles } from '../styles';
3
- import { ISettingsFormConfig } from '../types';
4
2
  import { ILoginResp } from '../../api-caller/account.typed';
3
+ import { IStyles } from '../styles';
5
4
  interface ILogin {
6
5
  styles?: IStyles;
7
6
  config: ISettingsFormConfig;
@@ -0,0 +1,7 @@
1
+ import { IAPIKey } from './api-key.typed';
2
+ import { PaginationResponse } from './types';
3
+ export declare const api_key: {
4
+ list: () => Promise<PaginationResponse<IAPIKey>>;
5
+ create: (name: string, role_id: number, domain: string) => Promise<string>;
6
+ delete: (id: string) => Promise<void>;
7
+ };
@@ -0,0 +1,6 @@
1
+ export interface IAPIKey {
2
+ id: string;
3
+ name: string;
4
+ role_id: number;
5
+ domain: string;
6
+ }
@@ -17,4 +17,9 @@ export declare const APICaller: {
17
17
  role: {
18
18
  list: () => Promise<import("./role.typed").IRole[]>;
19
19
  };
20
+ api_key: {
21
+ list: () => Promise<import("./types").PaginationResponse<import("./api-key.typed").IAPIKey>>;
22
+ create: (name: string, role_id: number, domain: string) => Promise<string>;
23
+ delete: (id: string) => Promise<void>;
24
+ };
20
25
  };
@@ -1,5 +1,7 @@
1
1
  import { Method } from 'axios';
2
2
  export declare const APIClient: {
3
3
  baseURL: string;
4
+ apiKey: string;
4
5
  getRequest(method: Method): (url: string, data: $TSFixMe, options?: $TSFixMe) => Promise<any>;
5
6
  };
7
+ export declare function configureAPIClient(config: ISettingsFormConfig): void;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { IStyles } from './styles';
3
+ interface IAddAPIKey {
4
+ styles?: IStyles;
5
+ onSuccess: () => void;
6
+ initialRoleID: number;
7
+ }
8
+ export declare function AddAPIKey({ onSuccess, styles, initialRoleID }: IAddAPIKey): JSX.Element;
9
+ export {};
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { IStyles } from './styles';
3
+ interface IAPIKeyList {
4
+ styles?: IStyles;
5
+ config: ISettingsFormConfig;
6
+ }
7
+ export declare function APIKeyList({ styles, config }: IAPIKeyList): JSX.Element;
8
+ export {};
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { IStyles } from './styles';
3
+ interface IDeleteAPIKey {
4
+ id: string;
5
+ name: string;
6
+ onSuccess: () => void;
7
+ styles?: IStyles;
8
+ }
9
+ export declare function DeleteAPIKey({ id, name, onSuccess, styles }: IDeleteAPIKey): JSX.Element;
10
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './add-api-key';
2
+ export * from './api-key-list';
3
+ export * from './delete-api-key';
@@ -0,0 +1,9 @@
1
+ import { MantineSize } from '@mantine/core';
2
+ export interface IStyles {
3
+ size: MantineSize;
4
+ spacing: MantineSize;
5
+ button: {
6
+ size: MantineSize;
7
+ };
8
+ }
9
+ export declare const defaultStyles: IStyles;
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { IStyles } from './styles';
3
- import { ISettingsFormConfig } from './types';
4
3
  interface IDataSourceList {
5
4
  styles?: IStyles;
6
5
  config: ISettingsFormConfig;
package/dist/global.d.ts CHANGED
@@ -1,2 +1,7 @@
1
1
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2
2
  type $TSFixMe = any;
3
+
4
+ interface ISettingsFormConfig {
5
+ apiBaseURL: string;
6
+ apiKey?: string;
7
+ }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './datasource';
2
2
  export * from './account';
3
+ export * from './api-key';
3
4
  export * from './api-caller/account.typed';
4
5
  export * from './api-caller/datasource.typed';
5
6
  export * from './api-caller/role.typed';