/** * Metadata attached to a state operation request. * * A flexible key-value map for passing request-specific metadata to the state store component. * The exact metadata keys and values accepted depend on the specific state store implementation * being used (e.g., Redis, CosmosDB, PostgreSQL, etc.). * * @see {@link https://dapr.io/docs/reference/components-reference/state-stores/ | Dapr State Store Components} * * @example * ```typescript * // Metadata for TTL (Time To Live) * const metadata: IRequestMetadata = { * "ttlInSeconds": "3600" // Expire after 1 hour * }; * * // Component-specific metadata * const cosmosMetadata: IRequestMetadata = { * "partitionKey": "tenant-123", * "consistencyLevel": "eventual" * }; * * // Use in state request * await client.state.save("my-store", [{ * key: "session-456", * value: sessionData, * metadata: cosmosMetadata * }]); * ``` */ export type IRequestMetadata = { /** * Metadata value as a string. The interpretation depends on the state store component. * Common patterns: component-specific options, TTL values, routing hints, etc. */ [key: string]: string; };