@delmaredigital/payload-better-auth 0.5.6 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/management/ApiKeysManagementClient.d.ts +16 -7
- package/dist/components/management/ApiKeysManagementClient.js +293 -286
- package/dist/components/management/views/ApiKeysView.js +55 -9
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/plugin/index.d.ts +8 -8
- package/dist/plugin/index.js +131 -63
- package/dist/types/apiKey.d.ts +19 -47
- package/dist/types/apiKey.js +10 -5
- package/dist/utils/apiKeyAccess.d.ts +47 -95
- package/dist/utils/apiKeyAccess.js +128 -284
- package/dist/utils/generatePermissions.d.ts +11 -0
- package/dist/utils/generatePermissions.js +30 -0
- package/package.json +1 -1
- package/dist/utils/generateScopes.d.ts +0 -20
- package/dist/utils/generateScopes.js +0 -110
|
@@ -1,17 +1,26 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PermissionDefinition } from '../../types/apiKey.js';
|
|
2
|
+
/** Organization option for the org selector */
|
|
3
|
+
export type OrganizationOption = {
|
|
4
|
+
id: string | number;
|
|
5
|
+
name: string;
|
|
6
|
+
};
|
|
2
7
|
export type ApiKeysManagementClientProps = {
|
|
3
8
|
/** Optional pre-configured auth client with apiKey plugin */
|
|
4
9
|
authClient?: any;
|
|
5
10
|
/** Page title. Default: 'API Keys' */
|
|
6
11
|
title?: string;
|
|
7
|
-
/** Available
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
|
|
12
|
+
/** Available permission definitions (collections + actions). Auto-generated if not provided. */
|
|
13
|
+
permissions?: PermissionDefinition[];
|
|
14
|
+
/**
|
|
15
|
+
* Available organizations for scoping API keys.
|
|
16
|
+
* When provided, shows an organization selector in the creation form.
|
|
17
|
+
* Each key can be optionally bound to one organization.
|
|
18
|
+
*/
|
|
19
|
+
organizations?: OrganizationOption[];
|
|
11
20
|
};
|
|
12
21
|
/**
|
|
13
22
|
* Client component for API keys management.
|
|
14
|
-
* Lists, creates, and deletes API keys with
|
|
23
|
+
* Lists, creates, and deletes API keys with permission selection (read/write per collection).
|
|
15
24
|
*/
|
|
16
|
-
export declare function ApiKeysManagementClient({ authClient: providedClient, title,
|
|
25
|
+
export declare function ApiKeysManagementClient({ authClient: providedClient, title, permissions, organizations, }?: ApiKeysManagementClientProps): import("react").JSX.Element;
|
|
17
26
|
export default ApiKeysManagementClient;
|