-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Svelte 5 Migration 19: migrate
/admin/api_keys
(#721)
* improvements to `<OrderSearchBar>` when shown in `<NavSub>` * migrate `<ApiKeys>` * catch more user errors in `<InputDate>` for better DX * migrate `<ApiKeyConfig>` + `<ApiKeyAccessMatrix>` * migrate `<ApiKeySecret>` * migrate `<ApiKeyDelete>` + `<ApiKeyAddNew>` * rebuild UI
- Loading branch information
Showing
715 changed files
with
2,390 additions
and
2,278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import {PATTERN_API_KEY} from "$utils/patterns.ts"; | ||
|
||
export type AccessGroup = 'Blacklist' | ||
| 'Clients' | ||
| 'Events' | ||
| 'Generic' | ||
| 'Groups' | ||
| 'Roles' | ||
| 'Secrets' | ||
| 'Sessions' | ||
| 'Scopes' | ||
| 'UserAttributes' | ||
| 'Users'; | ||
export type AccessRight = 'read' | 'create' | 'update' | 'delete'; | ||
|
||
export interface ApiKeyAccess { | ||
group: AccessGroup, | ||
access_rights: AccessRight[], | ||
} | ||
|
||
export interface ApiKeyRequest { | ||
/// Validation: PATTERN_API_KEY, min 2, max 24 | ||
name: string, | ||
/// Unix timestamp in seconds | ||
exp?: number, | ||
access: ApiKeyAccess[], | ||
} | ||
|
||
export interface ApiKeyResponse { | ||
name: string, | ||
/// Unix timestamp in seconds | ||
created: number, | ||
/// Unix timestamp in seconds | ||
expires?: number, | ||
access: ApiKeyAccess[], | ||
} | ||
|
||
export interface ApiKeysResponse { | ||
keys: ApiKeyResponse[], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
178 changes: 0 additions & 178 deletions
178
frontend/src/components/admin/api_keys/ApiKeyAccessMatrix.svelte
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.