mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-10-30 16:05:30 +00:00
37 lines
933 B
Go
37 lines
933 B
Go
export namespace APIKey {
|
|
export type Status = 'Enable' | 'Disable' | 'Revoked' | 'Expired';
|
|
export interface Editable {
|
|
name: string;
|
|
description: string;
|
|
ipWhiteList: string;
|
|
apiTrustedProxies: string;
|
|
apiKeyValidityTime: number;
|
|
expiresAt: string | null;
|
|
allowAppBinding: boolean;
|
|
}
|
|
export interface Item extends Editable {
|
|
id: string;
|
|
kind: 'legacy' | 'apiKey';
|
|
keyHint: string;
|
|
status: Status;
|
|
revision: number;
|
|
createdAt: string | null;
|
|
}
|
|
export interface Search {
|
|
items: Item[];
|
|
total: number;
|
|
}
|
|
export interface Created {
|
|
item: Item;
|
|
apiKey: string;
|
|
alreadyCreated?: boolean;
|
|
}
|
|
export interface Reference {
|
|
id: string;
|
|
revision: number;
|
|
}
|
|
export interface Revealed extends Reference {
|
|
apiKey: string;
|
|
}
|
|
}
|