UNPKG

@aws-lambda-powertools/idempotency

Version:

The idempotency package for the Powertools for AWS Lambda (TypeScript) library. It provides options to make your Lambda functions idempotent and safe to retry.

27 lines 1.07 kB
import type { BasePersistenceAttributes } from './types/BasePersistenceLayer.js'; /** * Number of times to retry a request in case of `IdempotencyInconsistentStateError` * * Used in `IdempotencyHandler` and `makeHandlerIdempotent` * * @internal */ declare const MAX_RETRIES = 2; /** * Idempotency record status. * * A record is created when a request is received. The status is set to `INPROGRESS` and the request is processed. * After the request is processed, the status is set to `COMPLETED`. If the request is not processed within the * `inProgressExpiryTimestamp`, the status is set to `EXPIRED`. */ declare const IdempotencyRecordStatus: { readonly INPROGRESS: "INPROGRESS"; readonly COMPLETED: "COMPLETED"; readonly EXPIRED: "EXPIRED"; }; /** * Base persistence attribute key names for persistence layers */ declare const PERSISTENCE_ATTRIBUTE_KEY_MAPPINGS: Record<keyof Required<BasePersistenceAttributes>, string>; export { IdempotencyRecordStatus, MAX_RETRIES, PERSISTENCE_ATTRIBUTE_KEY_MAPPINGS, }; //# sourceMappingURL=constants.d.ts.map