@message-queue-toolkit/core
Advanced tools
Comparing version 9.0.2 to 9.0.3
@@ -36,7 +36,7 @@ import type { Either } from '@lokalise/node-core'; | ||
} | ||
export declare class MessageHandlerConfigBuilder<MessagePayloadSchemas extends object, ExecutionContext, PrehandlerOutput = undefined> { | ||
export declare class MessageHandlerConfigBuilder<MessagePayloadSchemas extends object, ExecutionContext, PrehandlerOutput = undefined, BarrierOutputs = undefined> { | ||
private readonly configs; | ||
constructor(); | ||
addConfig<MessagePayloadSchema extends MessagePayloadSchemas, const BarrierOutput>(schema: ZodSchema<MessagePayloadSchema>, handler: Handler<MessagePayloadSchema, ExecutionContext, PrehandlerOutput, BarrierOutput>, options?: HandlerConfigOptions<MessagePayloadSchema, ExecutionContext, PrehandlerOutput, BarrierOutput>): this; | ||
build(): MessageHandlerConfig<MessagePayloadSchemas, ExecutionContext, PrehandlerOutput, any>[]; | ||
build(): MessageHandlerConfig<MessagePayloadSchemas, ExecutionContext, PrehandlerOutput, BarrierOutputs>[]; | ||
} | ||
@@ -48,3 +48,3 @@ export type Handler<MessagePayloadSchemas, ExecutionContext, PrehandlerOutput = undefined, BarrierOutput = undefined> = (message: MessagePayloadSchemas, context: ExecutionContext, prehandlingOutputs: PrehandlingOutputs<PrehandlerOutput, BarrierOutput>) => Promise<Either<'retryLater', 'success'>>; | ||
}; | ||
export declare class HandlerContainer<MessagePayloadSchemas extends object, ExecutionContext, PrehandlerOutput = undefined> { | ||
export declare class HandlerContainer<MessagePayloadSchemas extends object, ExecutionContext, PrehandlerOutput = undefined, BarrierOutputs = undefined> { | ||
private readonly messageHandlers; | ||
@@ -51,0 +51,0 @@ private readonly messageTypeField; |
@@ -27,4 +27,6 @@ "use strict"; | ||
addConfig(schema, handler, options) { | ||
this.configs.push(new MessageHandlerConfig(schema, | ||
this.configs.push( | ||
// @ts-ignore | ||
new MessageHandlerConfig(schema, | ||
// @ts-ignore | ||
handler, options)); | ||
@@ -31,0 +33,0 @@ return this; |
{ | ||
"name": "@message-queue-toolkit/core", | ||
"version": "9.0.2", | ||
"version": "9.0.3", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
57702
815