-
-
Notifications
You must be signed in to change notification settings - Fork 742
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
b62c1d6
commit d0fa929
Showing
7 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
frontend/src/openapi/models/trafficUsageDataSegmentedCombinedSchema.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
13 changes: 13 additions & 0 deletions
13
frontend/src/openapi/models/trafficUsageDataSegmentedCombinedSchemaApiDataItem.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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[]; | ||
}; |
16 changes: 16 additions & 0 deletions
16
...nd/src/openapi/models/trafficUsageDataSegmentedCombinedSchemaApiDataItemDataPointsItem.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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[]; | ||
}; |
16 changes: 16 additions & 0 deletions
16
...odels/trafficUsageDataSegmentedCombinedSchemaApiDataItemDataPointsItemTrafficTypesItem.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}; |
15 changes: 15 additions & 0 deletions
15
frontend/src/openapi/models/trafficUsageDataSegmentedCombinedSchemaDateRange.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}; |
17 changes: 17 additions & 0 deletions
17
frontend/src/openapi/models/trafficUsageDataSegmentedCombinedSchemaGrouping.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |