Adds typings for DockerHub API response
This commit is contained in:
34
src/Types.ts
34
src/Types.ts
@@ -26,10 +26,12 @@ export interface Template {
|
|||||||
export interface Volume {
|
export interface Volume {
|
||||||
bind: string;
|
bind: string;
|
||||||
container: string;
|
container: string;
|
||||||
|
readonly?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Environment {
|
export interface Environment {
|
||||||
name: string;
|
name: string;
|
||||||
|
value?: string;
|
||||||
label?: string;
|
label?: string;
|
||||||
set?: string;
|
set?: string;
|
||||||
}
|
}
|
||||||
@@ -44,7 +46,37 @@ export interface Service {
|
|||||||
ports?: string[];
|
ports?: string[];
|
||||||
build?: string;
|
build?: string;
|
||||||
interactive?: boolean;
|
interactive?: boolean;
|
||||||
environment?: Environment[];
|
env?: Environment[];
|
||||||
|
dockerStats?: DockerHubResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TemplateOrService extends Template, Service {}
|
export interface TemplateOrService extends Template, Service {}
|
||||||
|
|
||||||
|
export interface DockerHubResponse {
|
||||||
|
user: string; // The user who owns the repository
|
||||||
|
name: string; // The name of the repository
|
||||||
|
namespace: string; // The namespace the repository belongs to
|
||||||
|
repository_type: string; // The type of repository (e.g., 'image')
|
||||||
|
status: number; // The status of the repository as a number
|
||||||
|
status_description: 'active' | 'inactive'; // Description of the repository status
|
||||||
|
description: string; // A brief description of the repository
|
||||||
|
is_private: boolean; // Whether the repository is private or not
|
||||||
|
is_automated: boolean; // Whether the repository is automated or not
|
||||||
|
star_count: number; // The number of stars the repository has received
|
||||||
|
pull_count: number; // The number of times the repository has been pulled
|
||||||
|
last_updated: string; // The date and time the repository was last updated
|
||||||
|
date_registered: string; // The date and time the repository was registered
|
||||||
|
collaborator_count: number; // The number of collaborators on the repository
|
||||||
|
affiliation?: string | null; // The affiliation of the user with the repo
|
||||||
|
hub_user: string; // The user who created the repository on Docker Hub
|
||||||
|
has_starred: boolean; // Whether the user has starred the repository or not
|
||||||
|
full_description: string; // The full description of the repository
|
||||||
|
permissions: {
|
||||||
|
read: boolean; // Whether the user has read permissions on the repository
|
||||||
|
write: boolean; // Whether the user has write permissions on the repository
|
||||||
|
admin: boolean; // Whether the user has admin permissions on the repository
|
||||||
|
};
|
||||||
|
media_types: string[]; // An array of supported media types for the repository
|
||||||
|
content_types: string[]; // An array of supported content types for the repository
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user