createPartitionedIdempotencyKeyFactory
Αυτό το περιεχόμενο δεν είναι ακόμη διαθέσιμο στη γλώσσα σου.
Call Signature
Section titled “Call Signature”createPartitionedIdempotencyKeyFactory(
options): (context) =>string
Defined in: packages/pipeline-idempotency/src/helpers/partitioned-key.ts:114
Creates an IdempotencyKeyFactory whose keys partition by tenant, principal and operation, and fail closed when any of them is missing.
Segments are escaped and joined with joinKeySegments from
@cqrs-ddd/safe-stringify, so values
containing the separator — email addresses, external subject claims, composite
ids — cannot make two different operations collide on one key.
The key is an operation identity. Do not fold permissions into it: a key that
changed with permissions would let the same side effect run again. Bind replay
to the caller’s authorization with replayScopeFactory instead.
The produced key is
[version:]<tenantId>:<principal…>:<action>:<operation>, with the tenant
segment omitted when includeTenant is false.
Parameters
Section titled “Parameters”options
Section titled “options”PartitionedIdempotencyKeyOptions & object
Returns
Section titled “Returns”(context) => string
Throws
Section titled “Throws”When the tenant or principal is
absent, or the operation is absent and onMissingOperation is 'throw'.
Examples
Section titled “Examples”Per authenticated principal, deduplicated by a business identifier
Optional client-supplied Idempotency-Key
Call Signature
Section titled “Call Signature”createPartitionedIdempotencyKeyFactory(
options):IdempotencyKeyFactory
Defined in: packages/pipeline-idempotency/src/helpers/partitioned-key.ts:117
Creates an IdempotencyKeyFactory whose keys partition by tenant, principal and operation, and fail closed when any of them is missing.
Segments are escaped and joined with joinKeySegments from
@cqrs-ddd/safe-stringify, so values
containing the separator — email addresses, external subject claims, composite
ids — cannot make two different operations collide on one key.
The key is an operation identity. Do not fold permissions into it: a key that
changed with permissions would let the same side effect run again. Bind replay
to the caller’s authorization with replayScopeFactory instead.
The produced key is
[version:]<tenantId>:<principal…>:<action>:<operation>, with the tenant
segment omitted when includeTenant is false.
Parameters
Section titled “Parameters”options
Section titled “options”PartitionedIdempotencyKeyOptions
Returns
Section titled “Returns”Throws
Section titled “Throws”When the tenant or principal is
absent, or the operation is absent and onMissingOperation is 'throw'.
Examples
Section titled “Examples”Per authenticated principal, deduplicated by a business identifier
Optional client-supplied Idempotency-Key