Skip to content

Commit

Permalink
Update API CLient with KEDA Triggers support, rename ts to cts for co…
Browse files Browse the repository at this point in the history
…degen
  • Loading branch information
Richard87 committed Jun 13, 2024
1 parent 14ec1f2 commit db4b5c6
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 13 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
"deps": "npm run deps:license && npm run deps:stale",
"deps:license": "node scripts/deps-license-check.js",
"deps:stale": "node scripts/deps-stale-check.js",
"apigen:cost": "npx @rtk-query/codegen-openapi ./src/store/configs/cost-openapi-config.ts",
"apigen:log": "npx @rtk-query/codegen-openapi ./src/store/configs/log-openapi-config.ts",
"apigen:radix": "npx @rtk-query/codegen-openapi ./src/store/configs/radix-openapi-config.ts",
"apigen:scan": "npx @rtk-query/codegen-openapi ./src/store/configs/scan-openapi-config.ts",
"apigen:service-now": "npx @rtk-query/codegen-openapi ./src/store/configs/service-now-openapi-config.ts"
"apigen:cost": "npx @rtk-query/codegen-openapi ./src/store/configs/cost-openapi-config.cts",
"apigen:log": "npx @rtk-query/codegen-openapi ./src/store/configs/log-openapi-config.cts",
"apigen:radix": "npx @rtk-query/codegen-openapi ./src/store/configs/radix-openapi-config.cts",
"apigen:scan": "npx @rtk-query/codegen-openapi ./src/store/configs/scan-openapi-config.cts",
"apigen:service-now": "npx @rtk-query/codegen-openapi ./src/store/configs/service-now-openapi-config.cts"
},
"dependencies": {
"@azure/msal-browser": "^3.14.0",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions src/store/cost-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,35 @@ export type GetTotalCostsApiArg = {
'Impersonate-Group'?: string;
};
export type ApplicationCost = {
/** Comment regarding cost */
comment?: string;
/** Cost */
cost: number;
/** CostPercentageByCPU is cost percentage by CPU for the application. */
costPercentageByCpu?: number;
/** CostPercentageByMemory is cost percentage by memory for the application */
costPercentageByMemory?: number;
/** Creator of the application. */
creator?: string;
/** Cost currency */
currency: string;
/** Name of the application */
name: string;
/** Owner of the application (email). Can be a single person or a shared group email. */
owner?: string;
/** WBS for the application. */
wbs?: string;
};
export type ApplicationCostSet = {
/** ApplicationCosts with costs. */
applicationCosts: ApplicationCost[];
/** ApplicationCostSet period started From */
from: string;
/** ApplicationCostSet period continued To */
to: string;
/** TotalRequestedCPU within the period. */
totalRequestedCpu?: number;
/** TotalRequestedMemory within the period. */
totalRequestedMemory?: number;
};
export const {
Expand Down
18 changes: 18 additions & 0 deletions src/store/radix-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2201,7 +2201,21 @@ export type ExternalDns = {
fqdn: string;
tls: Tls;
};
export type HorizontalScalingSummaryTriggerStatus = {
/** CurrentUtilization is the last measured utilization */
current_utilization?: string;
/** Error contains short description if trigger have problems */
error?: string;
/** Name of trigger */
name?: string;
/** TargetUtilization is the average target across replicas */
target_utilization?: string;
/** Type of trigger */
type?: string;
};
export type HorizontalScalingSummary = {
/** CooldownPeriod in seconds. From radixconfig.yaml */
cooldownPeriod?: number;
/** Component current average CPU utilization over all pods, represented as a percentage of requested CPU */
currentCPUUtilizationPercentage?: number;
/** Component current average memory utilization over all pods, represented as a percentage of requested memory */
Expand All @@ -2210,10 +2224,14 @@ export type HorizontalScalingSummary = {
maxReplicas?: number;
/** Component minimum replicas. From radixconfig.yaml */
minReplicas?: number;
/** PollingInterval in seconds. From radixconfig.yaml */
pollingInterval?: number;
/** Component target average CPU utilization over all pods */
targetCPUUtilizationPercentage?: number;
/** Component target average memory utilization over all pods */
targetMemoryUtilizationPercentage?: number;
/** Triggers lists status of all triggers found in radixconfig.yaml */
triggers?: HorizontalScalingSummaryTriggerStatus[];
};
export type AzureIdentity = {
/** The Azure Key Vaults names, which use Azure Identity */
Expand Down
17 changes: 17 additions & 0 deletions src/store/scan-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,25 +72,41 @@ export type GetJobVulnerabilitiesApiArg = {
jobName: string;
};
export type Image = {
/** Base image */
baseImage?: string;
/** Name of image */
image: string;
};
export type Vulnerability = {
/** A list of CVEs referencing the vulnerability */
cve?: string[];
/** The CVSS value of the vulnerability */
cvss?: number;
/** A list of CWEs referencing the vulnerability */
cwe?: string[];
/** A detailed description of the vulnerability */
description?: string;
/** Name of the vulnerabile package */
packageName: string;
/** The date the vulnerability was published */
publishedDate?: string;
/** A list of URLs with more information about the vulnerability */
references?: string[];
/** The severity of the vulnerability */
severity: 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW' | 'UNKNOWN';
/** Title of the vulnerability */
title?: string;
/** Version of the affected package */
version: string;
};
export type ImageScan = {
/** Flag indicating if scan succeeded or not */
scanSuccess: boolean;
/** Date and time of scan */
scanTime: string;
/** List of vulnerabilities */
vulnerabilities?: Vulnerability[];
/** Count of vulnerabilities grouped by severity */
vulnerabilitySummary?: {
[key: string]: number;
};
Expand All @@ -102,6 +118,7 @@ export type ComponentVulnerabilities = {
export type EnvironmentVulnerabilities = {
components?: ComponentVulnerabilities;
jobs?: ComponentVulnerabilities;
/** Name of environment */
name: string;
};
export type ApplicationVulnerabilities = EnvironmentVulnerabilities[];
Expand Down

0 comments on commit db4b5c6

Please sign in to comment.