@yugabytedb/perf-advisor-ui 1.0.152 → 1.0.154

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/dist/api.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';
1
2
  import { Anomaly, AnomalyDetectionStatus, AnomalyGroup, BackgroundTasksResponse, ClusterLoadResponseData, MetadataFields, GraphRequestParams, QueryPlanData, QueryStatsPagedBody, ClusterDetails, IndexPagedResponse, TablePagedResponse } from './helpers/dtos';
2
3
  export declare enum QUERY_KEY {
3
4
  fetchAnomalies = "fetchAnomalies",
@@ -36,14 +37,36 @@ export declare enum QUERY_KEY {
36
37
  fetchIndexesPage = "fetchIndexesPage",
37
38
  fetchTableMetadata = "fetchTableMetadata"
38
39
  }
40
+ export type { AxiosError, AxiosRequestConfig, AxiosResponse };
41
+ export type PerfAdvisorRequestInterceptor = (config: AxiosRequestConfig) => AxiosRequestConfig | Promise<AxiosRequestConfig>;
42
+ export type PerfAdvisorResponseInterceptor = (response: AxiosResponse) => AxiosResponse | Promise<AxiosResponse>;
43
+ export type PerfAdvisorInterceptorErrorHandler = (error: unknown) => unknown;
44
+ export type EjectPerfAdvisorInterceptor = () => void;
45
+ /**
46
+ * Registers a request interceptor on the internal axios instance used by every
47
+ * Perf Advisor API call. Returns a function that removes the interceptor.
48
+ */
49
+ export declare const registerPerfAdvisorRequestInterceptor: (onFulfilled: PerfAdvisorRequestInterceptor, onRejected?: PerfAdvisorInterceptorErrorHandler) => EjectPerfAdvisorInterceptor;
50
+ /**
51
+ * Registers a response interceptor on the internal axios instance used by every
52
+ * Perf Advisor API call. Returns a function that removes the interceptor.
53
+ */
54
+ export declare const registerPerfAdvisorResponseInterceptor: (onFulfilled: PerfAdvisorResponseInterceptor, onRejected?: PerfAdvisorInterceptorErrorHandler) => EjectPerfAdvisorInterceptor;
55
+ /**
56
+ * Convenience helper for the common case of adding a fixed set of custom
57
+ * headers to every request. `getHeaders` is evaluated per-request, so returning
58
+ * a fresh object (or reading from a mutable source) picks up updated values
59
+ * without re-registering. Values that are `undefined` or `null` are skipped.
60
+ */
61
+ export declare const setPerfAdvisorCustomHeaders: (getHeaders: () => Record<string, string | number | boolean | undefined | null>) => EjectPerfAdvisorInterceptor;
39
62
  declare class ApiService {
40
63
  fetchAnomalies: (universeUuid: string, startTime?: Date | null, endTime?: Date | null, apiUrl?: string) => Promise<Anomaly[]>;
41
- fetchAnomaliesPage: (universeUuid: string, pageno: number, apiUrl?: string, records_to_fetch?: number, startTime?: Date | null, endTime?: Date | null, category?: any, searchInput?: string) => Promise<import('axios').AxiosResponse<Anomaly[]>>;
42
- fetchQueriesPage: (universeUuid: string, payload: any) => Promise<import('axios').AxiosResponse<GraphRequestParams[]>>;
43
- fetchLoadDbStatsPage: (universeUuid: string, payload: any, getClusterDetails?: () => ClusterDetails) => Promise<import('axios').AxiosResponse<GraphRequestParams[]>>;
44
- fetchTabletStatsPage: (universeUuid: string, payload: any, getClusterDetails: () => ClusterDetails) => Promise<import('axios').AxiosResponse<GraphRequestParams[]>>;
45
- fetchNodeLoadStatsPage: (universeUuid: string, payload: any) => Promise<import('axios').AxiosResponse<GraphRequestParams[]>>;
46
- fetchQueriesStatsPage: (universeUuid: string, payload: any, getClusterDetails: () => ClusterDetails, filteredLegends: string[], showSystemQueries?: boolean) => Promise<import('axios').AxiosResponse<GraphRequestParams[]>>;
64
+ fetchAnomaliesPage: (universeUuid: string, pageno: number, apiUrl?: string, records_to_fetch?: number, startTime?: Date | null, endTime?: Date | null, category?: any, searchInput?: string) => Promise<AxiosResponse<Anomaly[]>>;
65
+ fetchQueriesPage: (universeUuid: string, payload: any) => Promise<AxiosResponse<GraphRequestParams[]>>;
66
+ fetchLoadDbStatsPage: (universeUuid: string, payload: any, getClusterDetails?: () => ClusterDetails) => Promise<AxiosResponse<GraphRequestParams[]>>;
67
+ fetchTabletStatsPage: (universeUuid: string, payload: any, getClusterDetails: () => ClusterDetails) => Promise<AxiosResponse<GraphRequestParams[]>>;
68
+ fetchNodeLoadStatsPage: (universeUuid: string, payload: any) => Promise<AxiosResponse<GraphRequestParams[]>>;
69
+ fetchQueriesStatsPage: (universeUuid: string, payload: any, getClusterDetails: () => ClusterDetails, filteredLegends: string[], showSystemQueries?: boolean) => Promise<AxiosResponse<GraphRequestParams[]>>;
47
70
  fetchNamespaceSchemas: (universeUuid: string, namespaceName: string, apiUrl?: string) => Promise<string[]>;
48
71
  fetchQueryStats: (universeUuid: string, payload: {
49
72
  queryId: string;
@@ -66,9 +89,9 @@ declare class ApiService {
66
89
  excludeTpUser?: boolean | undefined;
67
90
  excludeSystemDBs?: boolean | undefined;
68
91
  }, apiUrl?: string, signal?: AbortSignal) => Promise<QueryStatsPagedBody>;
69
- fetchTablesPage: (universeUuid: string, payload: any) => Promise<import('axios').AxiosResponse<any[]>>;
70
- fetchIndexesPage: (universeUuid: string, namespaceName: string, schemaName: string, tableName: string, apiUrl?: string, limit?: number) => Promise<import('axios').AxiosResponse<IndexPagedResponse>>;
71
- fetchTableMetadata: (universeUuid: string, namespaceName: string, schemaName: string, tableName: string, apiUrl?: string, limit?: number) => Promise<import('axios').AxiosResponse<TablePagedResponse>>;
92
+ fetchTablesPage: (universeUuid: string, payload: any) => Promise<AxiosResponse<any[]>>;
93
+ fetchIndexesPage: (universeUuid: string, namespaceName: string, schemaName: string, tableName: string, apiUrl?: string, limit?: number) => Promise<AxiosResponse<IndexPagedResponse>>;
94
+ fetchTableMetadata: (universeUuid: string, namespaceName: string, schemaName: string, tableName: string, apiUrl?: string, limit?: number) => Promise<AxiosResponse<TablePagedResponse>>;
72
95
  fetchNamespaces: (universeUuid: string, apiUrl?: string) => Promise<string[]>;
73
96
  fetchQueriesDatabases: (universeUuid: string, apiUrl?: string) => Promise<string[]>;
74
97
  fetchAnomaliesById: (universeUuid: string, anomalyUuid: string, apiUrl?: string) => Promise<Anomaly>;
@@ -97,4 +120,3 @@ declare class ApiService {
97
120
  fetchClusterDetails: (universeUuid: string, startTime: string | null, endTime: string | null, apiUrl?: string) => Promise<any>;
98
121
  }
99
122
  export declare const PerfAdvisorAPI: ApiService;
100
- export {};