mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +01:00
chore(1-3267): add orval schemas for the new API endpoint (#9164)
Adds Orval schemas for the new API enpdoint to display monthly/daily traffic data usage.
This commit is contained in:
parent
b62c1d6c1e
commit
d0fa929847
@ -1260,6 +1260,12 @@ export * from './tokenUserSchema';
|
||||
export * from './trafficUsageApiDataSchema';
|
||||
export * from './trafficUsageApiDataSchemaDaysItem';
|
||||
export * from './trafficUsageApiDataSchemaDaysItemTrafficTypesItem';
|
||||
export * from './trafficUsageDataSegmentedCombinedSchema';
|
||||
export * from './trafficUsageDataSegmentedCombinedSchemaApiDataItem';
|
||||
export * from './trafficUsageDataSegmentedCombinedSchemaApiDataItemDataPointsItem';
|
||||
export * from './trafficUsageDataSegmentedCombinedSchemaApiDataItemDataPointsItemTrafficTypesItem';
|
||||
export * from './trafficUsageDataSegmentedCombinedSchemaDateRange';
|
||||
export * from './trafficUsageDataSegmentedCombinedSchemaGrouping';
|
||||
export * from './trafficUsageDataSegmentedSchema';
|
||||
export * from './uiConfigSchema';
|
||||
export * from './uiConfigSchemaAuthenticationType';
|
||||
|
@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
import type { TrafficUsageDataSegmentedCombinedSchemaApiDataItem } from './trafficUsageDataSegmentedCombinedSchemaApiDataItem';
|
||||
import type { TrafficUsageDataSegmentedCombinedSchemaDateRange } from './trafficUsageDataSegmentedCombinedSchemaDateRange';
|
||||
import type { TrafficUsageDataSegmentedCombinedSchemaGrouping } from './trafficUsageDataSegmentedCombinedSchemaGrouping';
|
||||
|
||||
/**
|
||||
* Contains the recorded data usage for each API path, segmented by day/month and type of traffic
|
||||
*/
|
||||
export interface TrafficUsageDataSegmentedCombinedSchema {
|
||||
/** Contains the recorded daily/monthly data usage for each API path */
|
||||
apiData: TrafficUsageDataSegmentedCombinedSchemaApiDataItem[];
|
||||
/** The date range there is data for. The range is inclusive and goes from the start of the `from` date to the end of the `to` date */
|
||||
dateRange: TrafficUsageDataSegmentedCombinedSchemaDateRange;
|
||||
/** Whether the data is aggregated by month or by day. */
|
||||
grouping: TrafficUsageDataSegmentedCombinedSchemaGrouping;
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
import type { TrafficUsageDataSegmentedCombinedSchemaApiDataItemDataPointsItem } from './trafficUsageDataSegmentedCombinedSchemaApiDataItemDataPointsItem';
|
||||
|
||||
export type TrafficUsageDataSegmentedCombinedSchemaApiDataItem = {
|
||||
/** The API path */
|
||||
apiPath: string;
|
||||
/** The recorded data points for the API path */
|
||||
dataPoints: TrafficUsageDataSegmentedCombinedSchemaApiDataItemDataPointsItem[];
|
||||
};
|
@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
import type { TrafficUsageDataSegmentedCombinedSchemaApiDataItemDataPointsItemTrafficTypesItem } from './trafficUsageDataSegmentedCombinedSchemaApiDataItemDataPointsItemTrafficTypesItem';
|
||||
|
||||
export type TrafficUsageDataSegmentedCombinedSchemaApiDataItemDataPointsItem = {
|
||||
/**
|
||||
* The date of the data point. Formatted as a full date (e.g. 2023-04-01) if the data is aggregated by day or as a month (e.g. 2023-04) if the data is aggregated by month.
|
||||
* @pattern ^\d{4}-\d{2}(-\d{2})?$
|
||||
*/
|
||||
period: string;
|
||||
/** The recorded traffic types for the data point */
|
||||
trafficTypes: TrafficUsageDataSegmentedCombinedSchemaApiDataItemDataPointsItemTrafficTypesItem[];
|
||||
};
|
@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
export type TrafficUsageDataSegmentedCombinedSchemaApiDataItemDataPointsItemTrafficTypesItem =
|
||||
{
|
||||
/**
|
||||
* The number of requests
|
||||
* @minimum 0
|
||||
*/
|
||||
count: number;
|
||||
/** The type of traffic */
|
||||
group: string;
|
||||
};
|
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
/**
|
||||
* The date range there is data for. The range is inclusive and goes from the start of the `from` date to the end of the `to` date
|
||||
*/
|
||||
export type TrafficUsageDataSegmentedCombinedSchemaDateRange = {
|
||||
/** The start of the dateRange */
|
||||
from: string;
|
||||
/** The end of the dateRange */
|
||||
to: string;
|
||||
};
|
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Generated by Orval
|
||||
* Do not edit manually.
|
||||
* See `gen:api` script in package.json
|
||||
*/
|
||||
|
||||
/**
|
||||
* Whether the data is aggregated by month or by day.
|
||||
*/
|
||||
export type TrafficUsageDataSegmentedCombinedSchemaGrouping =
|
||||
(typeof TrafficUsageDataSegmentedCombinedSchemaGrouping)[keyof typeof TrafficUsageDataSegmentedCombinedSchemaGrouping];
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const TrafficUsageDataSegmentedCombinedSchemaGrouping = {
|
||||
monthly: 'monthly',
|
||||
daily: 'daily',
|
||||
} as const;
|
Loading…
Reference in New Issue
Block a user