UseAddKey
katanakit-js / useAddKey
Function: useAddKey()
Section titled “Function: useAddKey()”function useAddKey(data, record): { createdAt: string; keys: { createdAt: string; id: string; label: string; note?: string; provider: string; secret: string; status: "active" | "revoked"; updatedAt: string; }[]; mcpServers: { command?: string[]; disabled?: boolean; environment?: Record<string, string>; headers?: Record<string, string>; name: string; type: "local" | "remote"; url?: string; }[]; updatedAt: string; version: 1;};Defined in: core/services/keyvault.service.ts:282
Appends a record to the vault payload. See KeyVaultService.useAddKey.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
data |
{ createdAt: string; keys: { createdAt: string; id: string; label: string; note?: string; provider: string; secret: string; status: "active" | "revoked"; updatedAt: string; }[]; mcpServers: { command?: string[]; disabled?: boolean; environment?: Record<string, string>; headers?: Record<string, string>; name: string; type: "local" | "remote"; url?: string; }[]; updatedAt: string; version: 1; } |
data.createdAt? |
string |
data.keys? |
{ createdAt: string; id: string; label: string; note?: string; provider: string; secret: string; status: "active" | "revoked"; updatedAt: string; }[] |
data.mcpServers? |
{ command?: string[]; disabled?: boolean; environment?: Record<string, string>; headers?: Record<string, string>; name: string; type: "local" | "remote"; url?: string; }[] |
data.updatedAt? |
string |
data.version? |
1 |
record |
{ createdAt: string; id: string; label: string; note?: string; provider: string; secret: string; status: "active" | "revoked"; updatedAt: string; } |
record.createdAt? |
string |
record.id? |
string |
record.label? |
string |
record.note? |
string |
record.provider? |
string |
record.secret? |
string |
record.status? |
"active" | "revoked" |
record.updatedAt? |
string |
Returns
Section titled “Returns”{ createdAt: string; keys: { createdAt: string; id: string; label: string; note?: string; provider: string; secret: string; status: "active" | "revoked"; updatedAt: string; }[]; mcpServers: { command?: string[]; disabled?: boolean; environment?: Record<string, string>; headers?: Record<string, string>; name: string; type: "local" | "remote"; url?: string; }[]; updatedAt: string; version: 1;}createdAt
Section titled “createdAt”createdAt: string;keys: { createdAt: string; id: string; label: string; note?: string; provider: string; secret: string; status: "active" | "revoked"; updatedAt: string;}[];Type Declaration
Section titled “Type Declaration”mcpServers
Section titled “mcpServers”mcpServers: { command?: string[]; disabled?: boolean; environment?: Record<string, string>; headers?: Record<string, string>; name: string; type: "local" | "remote"; url?: string;}[];Type Declaration
Section titled “Type Declaration”updatedAt
Section titled “updatedAt”updatedAt: string;version
Section titled “version”version: 1;