diff --git a/src/asherah.d.ts b/src/asherah.d.ts
index b7892e6..3ba4454 100644
--- a/src/asherah.d.ts
+++ b/src/asherah.d.ts
@@ -3,50 +3,51 @@
///
export type AsherahConfig = {
/** The name of this service (Required) */
- ServiceName: string;
+ readonly ServiceName: string;
/** The name of the product that owns this service (Required) */
- ProductID: string;
+ readonly ProductID: string;
/** The amount of time a key is considered valid */
- ExpireAfter: number | null;
+ readonly ExpireAfter: number | null;
/** The amount of time before cached keys are considered stale */
- CheckInterval: number | null;
- /** Determines the type of metastore to use for persisting keys (Required) { "rdbms", "dynamodb", "memory" } */
- Metastore: string;
+ readonly CheckInterval: number | null;
+ /** Determines the type of metastore to use for persisting keys (Required) */
+ readonly Metastore: "rdbms" | "dynamodb" | "test-debug-memory" | string;
/** The database connection string (Required if metastore=rdbms) */
- ConnectionString: string | null;
- /** Required for Aurora sessions using write forwarding { "eventual", "global", "session" } */
- ReplicaReadConsistency: string | null;
+ readonly ConnectionString: string | null;
+ /** Required for Aurora sessions using write forwarding */
+ readonly ReplicaReadConsistency: "eventual" | "global" | "session" | string | null;
/** An optional endpoint URL (hostname only or fully qualified URI) (only supported by metastore=dynamodb) */
- DynamoDBEndpoint: string | null;
+ readonly DynamoDBEndpoint: string | null;
/** The AWS region for DynamoDB requests (defaults to globally configured region) (only supported by metastore=dynamodb) */
- DynamoDBRegion: string | null;
+ readonly DynamoDBRegion: string | null;
/** The table name for DynamoDB (only supported by metastore=dynamodb) */
- DynamoDBTableName: string | null;
+ readonly DynamoDBTableName: string | null;
/** Define the maximum number of sessions to cache (Default 1000) */
- SessionCacheMaxSize: number | null;
+ readonly SessionCacheMaxSize: number | null;
/** The amount of time a session will remain cached (Default 2h) */
- SessionCacheDuration: number | null;
- /** Configures the master key management service (Default kms) { "aws", "static" } */
- KMS: string | null;
+ readonly SessionCacheDuration: number | null;
+ /** Configures the master key management service (Default kms) */
+ readonly KMS: "aws" | "test-debug-static" | string | null;
/** Dictionary of REGION: ARN (required if kms=aws) */
- RegionMap: {
- [name: string]: string;
+ readonly RegionMap: {
+ readonly [name: string]: string;
} | null;
/** The preferred AWS region (required if kms=aws) */
- PreferredRegion: string | null;
+ readonly PreferredRegion: string | null;
/** Configure the metastore to use regional suffixes (only supported by metastore=dynamodb) */
- EnableRegionSuffix: boolean | null;
+ readonly EnableRegionSuffix: boolean | null;
/** Enable shared session caching */
- EnableSessionCaching: boolean | null;
+ readonly EnableSessionCaching: boolean | null;
/** Enable verbose logging output */
- Verbose: boolean | null;
+ readonly Verbose: boolean | null;
/** Disable the zero-copy optimization for the cobhan buffer protocol */
- DisableZeroCopy: boolean | null;
+ readonly DisableZeroCopy: boolean | null;
/** Enable canary buffer corruption checks (default: false) */
- EnableCanaries: boolean | null;
+ readonly EnableCanaries: boolean | null;
};
-type LogHookCallback = (level: number, message: string) => void;
+/** Callback function type for log hook */
+export type LogHookCallback = (level: number, message: string) => void;
export declare function setup(config: AsherahConfig): void;
export declare function setup_async(config: AsherahConfig): Promise;