feat(opsserver,web): replace the Angular UI and REST management layer with a TypedRequest-based ops server and bundled web frontend
This commit is contained in:
33
ts_interfaces/data/token.ts
Normal file
33
ts_interfaces/data/token.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
// ============================================================================
|
||||
// Token Data Types
|
||||
// ============================================================================
|
||||
|
||||
import type { TRegistryProtocol } from './package.ts';
|
||||
|
||||
export type TTokenAction = 'read' | 'write' | 'delete' | '*';
|
||||
|
||||
export interface ITokenScope {
|
||||
protocol: TRegistryProtocol | '*';
|
||||
organizationId?: string;
|
||||
repositoryId?: string;
|
||||
actions: TTokenAction[];
|
||||
}
|
||||
|
||||
export interface IToken {
|
||||
id: string;
|
||||
name: string;
|
||||
tokenPrefix: string;
|
||||
protocols: TRegistryProtocol[];
|
||||
scopes: ITokenScope[];
|
||||
organizationId?: string;
|
||||
createdById?: string;
|
||||
expiresAt?: string;
|
||||
lastUsedAt?: string;
|
||||
usageCount: number;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export interface ITokenCreateResult extends IToken {
|
||||
token: string;
|
||||
warning: string;
|
||||
}
|
||||
Reference in New Issue
Block a user