Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: export the exposure report interface #903

Merged
merged 4 commits into from
Jan 8, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 27 additions & 28 deletions src/resources/ApiKeys/ApiKeysInterfaces.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {GranularResource, PrivilegeModel} from '../BaseInterfaces.js';
import {ApiKeyExposureReportSeverity, ApiKeyReportCreationType, ApiKeyStatus} from '../Enums.js';
import {ApiKeyStatus, ApiKeyExposureReportSeverity, ApiKeyReportCreationType} from '../Enums.js';
import {UserModel} from '../Users/UserInterfaces.js';

export interface ApiKeyBaseModel extends GranularResource {
Expand Down Expand Up @@ -106,6 +106,32 @@ export interface ApiKeyModel extends ApiKeyBaseModel {
exposureReport?: ExposureReport;
}

export interface ExposureReport {
/**
* API Key logger id associated to the Exposure Report
*/
apiKeyLoggerId: string;
/**
* The severity of the exposure
*/
severity: ApiKeyExposureReportSeverity;
/**
* The reason behind the exposure report for a given API key
*/
reason: string;
/**
* The date the key should be deactivated
*/
deactivationDate: number;
/**
* The way the API key report has been created
*/
creationType: ApiKeyReportCreationType;
/**
* Represents the user that has created the report
*/
createdBy: UserModel;
}
export interface CreateApiKeyModel extends ApiKeyBaseModel {
/**
* The duration of the API key in ISO-8601 format. Once the duration is reached the key expires and cannot be used anymore.
Expand Down Expand Up @@ -189,30 +215,3 @@ interface EnforceQueryPipelineConfigurationModel {
interface ImpersonationRestrictionsModel {
allowedUserIds: QueryAuthenticationModel[];
}

interface ExposureReport {
/**
* API Key logger id associated to the Exposure Report
*/
apiKeyLoggerId: string;
/**
* The severity of the exposure
*/
severity: ApiKeyExposureReportSeverity;
/**
* The reason behind the exposure report for a given API key
*/
reason: string;
/**
* The date the key should be deactivated
*/
deactivationDate: number;
/**
* The way the API key report has been created
*/
creationType: ApiKeyReportCreationType;
/**
* Represents the user that has created the report
*/
createdBy: UserModel;
}
Loading