|
1 | | -// biome-ignore lint/performance/noBarrelFile: This is a public API |
2 | | -export { type Cache, MemoryCache, RedisCache } from "./core/cache"; |
| 1 | +// Main API |
| 2 | +/** biome-ignore-all lint/performance/noBarrelFile: This is a public API */ |
| 3 | + |
| 4 | +// Core utilities |
3 | 5 | export { getExpirationTime, isExpired } from "./core/expiration"; |
4 | | -export { |
5 | | - extractKeyFromHeaders, |
6 | | - hasApiKey, |
7 | | - type KeyExtractionOptions, |
8 | | -} from "./core/extract-key"; |
9 | | -export { createResourceBuilder, ResourceBuilder } from "./core/resources"; |
10 | | -export { |
11 | | - hasAllScopes, |
12 | | - hasAllScopesWithResources, |
13 | | - hasAnyScope, |
14 | | - hasAnyScopeWithResources, |
15 | | - hasScope, |
16 | | - hasScopeWithResources, |
17 | | - type ScopeCheckOptions, |
18 | | -} from "./core/scopes"; |
19 | | -export { |
20 | | - ApiKeyManager, |
21 | | - createKeys, |
22 | | - type VerifyOptions, |
23 | | - type VerifyResult, |
24 | | -} from "./manager"; |
25 | | -export { DrizzleStore } from "./storage/drizzle"; |
26 | | -export { MemoryStore } from "./storage/memory"; |
| 6 | +export { extractKeyFromHeaders, hasApiKey } from "./core/extract-key"; |
| 7 | +export { hasAllScopes, hasAnyScope, hasScope } from "./core/scopes"; |
| 8 | +export type { ApiKeyManager, VerifyOptions, VerifyResult } from "./manager"; |
| 9 | +export { createKeys } from "./manager"; |
| 10 | +// Types |
27 | 11 | export type { |
28 | 12 | ApiKeyMetadata, |
29 | 13 | ApiKeyRecord, |
30 | 14 | CreateApiKeyInput, |
31 | 15 | } from "./types/api-key-types"; |
32 | 16 | export type { Config, ConfigInput } from "./types/config-types"; |
33 | 17 | export type { ApiKeyError } from "./types/error-types"; |
34 | | -export { |
35 | | - ApiKeyErrorCode, |
36 | | - createApiKeyError, |
37 | | - createErrorResult, |
38 | | -} from "./types/error-types"; |
| 18 | +// Error codes and helpers |
| 19 | +export { ApiKeyErrorCode, createApiKeyError } from "./types/error-types"; |
39 | 20 | export type { |
40 | 21 | Permission, |
41 | | - PermissionChecker, |
42 | 22 | PermissionScope, |
43 | 23 | } from "./types/permissions-types"; |
44 | | -export type { |
45 | | - DrizzleColumnMapping, |
46 | | - Storage, |
47 | | - StorageOptions, |
48 | | -} from "./types/storage-types"; |
| 24 | +export type { Storage, StorageOptions } from "./types/storage-types"; |
0 commit comments