diff --git a/frontend/src/openapi/models/index.ts b/frontend/src/openapi/models/index.ts index 6568c52edb..bbd126f33a 100644 --- a/frontend/src/openapi/models/index.ts +++ b/frontend/src/openapi/models/index.ts @@ -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'; diff --git a/frontend/src/openapi/models/trafficUsageDataSegmentedCombinedSchema.ts b/frontend/src/openapi/models/trafficUsageDataSegmentedCombinedSchema.ts new file mode 100644 index 0000000000..f7434ae209 --- /dev/null +++ b/frontend/src/openapi/models/trafficUsageDataSegmentedCombinedSchema.ts @@ -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; +} diff --git a/frontend/src/openapi/models/trafficUsageDataSegmentedCombinedSchemaApiDataItem.ts b/frontend/src/openapi/models/trafficUsageDataSegmentedCombinedSchemaApiDataItem.ts new file mode 100644 index 0000000000..a686636598 --- /dev/null +++ b/frontend/src/openapi/models/trafficUsageDataSegmentedCombinedSchemaApiDataItem.ts @@ -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[]; +}; diff --git a/frontend/src/openapi/models/trafficUsageDataSegmentedCombinedSchemaApiDataItemDataPointsItem.ts b/frontend/src/openapi/models/trafficUsageDataSegmentedCombinedSchemaApiDataItemDataPointsItem.ts new file mode 100644 index 0000000000..30260885ad --- /dev/null +++ b/frontend/src/openapi/models/trafficUsageDataSegmentedCombinedSchemaApiDataItemDataPointsItem.ts @@ -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[]; +}; diff --git a/frontend/src/openapi/models/trafficUsageDataSegmentedCombinedSchemaApiDataItemDataPointsItemTrafficTypesItem.ts b/frontend/src/openapi/models/trafficUsageDataSegmentedCombinedSchemaApiDataItemDataPointsItemTrafficTypesItem.ts new file mode 100644 index 0000000000..a6e2000d1e --- /dev/null +++ b/frontend/src/openapi/models/trafficUsageDataSegmentedCombinedSchemaApiDataItemDataPointsItemTrafficTypesItem.ts @@ -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; + }; diff --git a/frontend/src/openapi/models/trafficUsageDataSegmentedCombinedSchemaDateRange.ts b/frontend/src/openapi/models/trafficUsageDataSegmentedCombinedSchemaDateRange.ts new file mode 100644 index 0000000000..02b6c556c0 --- /dev/null +++ b/frontend/src/openapi/models/trafficUsageDataSegmentedCombinedSchemaDateRange.ts @@ -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; +}; diff --git a/frontend/src/openapi/models/trafficUsageDataSegmentedCombinedSchemaGrouping.ts b/frontend/src/openapi/models/trafficUsageDataSegmentedCombinedSchemaGrouping.ts new file mode 100644 index 0000000000..c2a21ea422 --- /dev/null +++ b/frontend/src/openapi/models/trafficUsageDataSegmentedCombinedSchemaGrouping.ts @@ -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;