UNPKG

@daiso-tech/core

Version:

The library offers flexible, framework-agnostic solutions for modern web applications, built on adaptable components that integrate seamlessly with popular frameworks like Next Js.

46 lines (45 loc) 2 kB
/** * @module SharedLock */ import { type IEventBus } from "../../../../event-bus/contracts/_module.js"; import { type IExecutionContext } from "../../../../execution-context/contracts/_module.js"; import { type Use } from "../../../../middleware/contracts/_module.js"; import { type INamespace } from "../../../../namespace/contracts/_module.js"; import { type ISerdeTransformer } from "../../../../serde/contracts/_module.js"; import { type ISharedLockAdapter, type SharedLockAdapterVariants, type SharedLockEventMap } from "../../../../shared-lock/contracts/_module.js"; import { SharedLock, type ISerializedSharedLock } from "../../../../shared-lock/implementations/derivables/shared-lock-factory/shared-lock.js"; import { TimeSpan } from "../../../../time-span/implementations/_module.js"; import { type OneOrMore, type WaitUntil } from "../../../../utilities/_module.js"; /** * @internal */ export type SharedLockSerdeTransformerSettings = { adapter: ISharedLockAdapter; originalAdapter: SharedLockAdapterVariants; namespace: INamespace; defaultRefreshTime: TimeSpan; eventBus: IEventBus<SharedLockEventMap>; serdeTransformerName: string; waitUntil: WaitUntil; executionContext: IExecutionContext; use: Use; }; /** * @internal */ export declare class SharedLockSerdeTransformer implements ISerdeTransformer<SharedLock, ISerializedSharedLock> { private readonly adapter; private readonly originalAdapter; private readonly namespace; private readonly defaultRefreshTime; private readonly eventBus; private readonly serdeTransformerName; private readonly waitUntil; private readonly executionContext; private readonly use; constructor(settings: SharedLockSerdeTransformerSettings); get name(): OneOrMore<string>; isApplicable(value: unknown): value is SharedLock; deserialize(serializedValue: ISerializedSharedLock): SharedLock; serialize(deserializedValue: SharedLock): ISerializedSharedLock; }