@devtable/dashboard 10.37.2 → 10.38.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.
@@ -0,0 +1,17 @@
1
+ import { AnyObject, IAPIClient, IAPIClientRequestOptions } from './types';
2
+ import { Method, AxiosRequestConfig } from 'axios';
3
+ export declare class DefaultApiClient implements IAPIClient {
4
+ baseURL: string;
5
+ app_id: string;
6
+ app_secret: string;
7
+ type: string;
8
+ constructor();
9
+ getAuthentication(params: Record<string, unknown>): {
10
+ app_id: string;
11
+ nonce_str: string;
12
+ sign: string;
13
+ } | undefined;
14
+ getRequest<T>(method: Method, signal?: AbortSignal): (url: string, data: AnyObject, options?: IAPIClientRequestOptions) => Promise<T>;
15
+ buildAxiosConfig(method: Method, url: string, data: AnyObject, options: IAPIClientRequestOptions, headers: AnyObject, signal: AbortSignal | undefined): AxiosRequestConfig<any>;
16
+ buildHeader(options: IAPIClientRequestOptions): AnyObject;
17
+ }
@@ -0,0 +1,7 @@
1
+ import { Method } from 'axios';
2
+ import { AnyObject, IAPIClient, IAPIClientRequestOptions } from './types';
3
+ export declare class FacadeApiClient implements IAPIClient {
4
+ implementation: IAPIClient;
5
+ constructor(implementation: IAPIClient);
6
+ getRequest<T>(method: Method, signal?: AbortSignal): (url: string, data: AnyObject, options?: IAPIClientRequestOptions) => Promise<T>;
7
+ }
@@ -0,0 +1,4 @@
1
+ export * from './types';
2
+ export * from './utils';
3
+ export * from './default-api-client';
4
+ export * from './facade-api-client';
@@ -0,0 +1,11 @@
1
+ import { Method } from 'axios';
2
+ export declare type $TSFixMe = any;
3
+ export declare type AnyObject = Record<string, $TSFixMe>;
4
+ export interface IAPIClientRequestOptions {
5
+ string?: boolean;
6
+ params?: AnyObject;
7
+ headers?: AnyObject;
8
+ }
9
+ export interface IAPIClient {
10
+ getRequest: <T = $TSFixMe>(method: Method, signal?: AbortSignal) => (url: string, data: AnyObject, options?: IAPIClientRequestOptions) => Promise<T>;
11
+ }
@@ -0,0 +1,3 @@
1
+ import { $TSFixMe } from './types';
2
+ export declare function marshall(params: Record<string, $TSFixMe>): string;
3
+ export declare function cryptSign(params: Record<string, $TSFixMe>, appsecret: string): string;
@@ -0,0 +1 @@
1
+ export * from './api-client';