Some checks failed
ci/woodpecker/push/ci Pipeline failed
Co-authored-by: Jason Woltje <jason@diversecanvas.com> Co-committed-by: Jason Woltje <jason@diversecanvas.com>
24 lines
827 B
TypeScript
24 lines
827 B
TypeScript
/** DTO for storing a provider credential. */
|
|
export interface StoreCredentialDto {
|
|
/** Provider identifier (e.g., 'anthropic', 'openai', 'openrouter', 'zai') */
|
|
provider: string;
|
|
/** Credential type */
|
|
type: 'api_key' | 'oauth_token';
|
|
/** Plain-text credential value — will be encrypted before storage */
|
|
value: string;
|
|
/** Optional extra config (e.g., base URL overrides) */
|
|
metadata?: Record<string, unknown>;
|
|
}
|
|
|
|
/** DTO returned in list/existence responses — never contains decrypted values. */
|
|
export interface ProviderCredentialSummaryDto {
|
|
provider: string;
|
|
credentialType: 'api_key' | 'oauth_token';
|
|
/** Whether a credential is stored for this provider */
|
|
exists: boolean;
|
|
expiresAt?: string | null;
|
|
metadata?: Record<string, unknown> | null;
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
}
|