@message-queue-toolkit/sqs 11.0.0 → 11.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -11,13 +11,13 @@ export type NewSQSConsumerOptionsMultiSchema<MessagePayloadSchemas extends objec
|
|
|
11
11
|
export type ExistingSQSConsumerOptionsMultiSchema<MessagePayloadSchemas extends object, ExecutionContext, PrehandlerOutput, QueueLocatorType extends SQSQueueLocatorType = SQSQueueLocatorType> = ExistingQueueOptionsMultiSchema<MessagePayloadSchemas, QueueLocatorType, ExecutionContext, PrehandlerOutput> & {
|
|
12
12
|
consumerOverrides?: Partial<ConsumerOptions>;
|
|
13
13
|
};
|
|
14
|
-
export declare abstract class AbstractSqsConsumerMultiSchema<MessagePayloadType extends object, ExecutionContext, PrehandlerOutput, QueueLocatorType extends SQSQueueLocatorType = SQSQueueLocatorType, CreationConfigType extends SQSCreationConfig = SQSCreationConfig, ConsumerOptionsType extends NewSQSConsumerOptionsMultiSchema<MessagePayloadType, ExecutionContext, PrehandlerOutput, CreationConfigType> = NewSQSConsumerOptionsMultiSchema<MessagePayloadType, ExecutionContext, PrehandlerOutput, CreationConfigType>> extends AbstractSqsConsumer<MessagePayloadType, QueueLocatorType, CreationConfigType, ConsumerOptionsType, ExecutionContext, PrehandlerOutput> {
|
|
14
|
+
export declare abstract class AbstractSqsConsumerMultiSchema<MessagePayloadType extends object, ExecutionContext, PrehandlerOutput = undefined, QueueLocatorType extends SQSQueueLocatorType = SQSQueueLocatorType, CreationConfigType extends SQSCreationConfig = SQSCreationConfig, ConsumerOptionsType extends NewSQSConsumerOptionsMultiSchema<MessagePayloadType, ExecutionContext, PrehandlerOutput, CreationConfigType> = NewSQSConsumerOptionsMultiSchema<MessagePayloadType, ExecutionContext, PrehandlerOutput, CreationConfigType>> extends AbstractSqsConsumer<MessagePayloadType, QueueLocatorType, CreationConfigType, ConsumerOptionsType, ExecutionContext, PrehandlerOutput> {
|
|
15
15
|
messageSchemaContainer: MessageSchemaContainer<MessagePayloadType>;
|
|
16
16
|
handlerContainer: HandlerContainer<MessagePayloadType, ExecutionContext, PrehandlerOutput>;
|
|
17
17
|
protected readonly executionContext: ExecutionContext;
|
|
18
18
|
constructor(dependencies: SQSConsumerDependencies, options: ConsumerOptionsType, executionContext: ExecutionContext);
|
|
19
19
|
protected resolveSchema(message: MessagePayloadType): Either<Error, import("zod").ZodType<MessagePayloadType, import("zod").ZodTypeDef, MessagePayloadType>>;
|
|
20
|
-
processMessage(message: MessagePayloadType, messageType: string, prehandlingOutputs: PrehandlingOutputs<PrehandlerOutput,
|
|
20
|
+
processMessage(message: MessagePayloadType, messageType: string, prehandlingOutputs: PrehandlingOutputs<PrehandlerOutput, any>): Promise<Either<'retryLater', 'success'>>;
|
|
21
21
|
protected processPrehandlers(message: MessagePayloadType, messageType: string): Promise<PrehandlerOutput>;
|
|
22
22
|
protected resolveNextFunction(prehandlers: Prehandler<MessagePayloadType, ExecutionContext, unknown>[], message: MessagePayloadType, index: number, prehandlerOutput: PrehandlerOutput, resolve: (value: PrehandlerOutput | PromiseLike<PrehandlerOutput>) => void, reject: (err: Error) => void): (prehandlerResult: import("@message-queue-toolkit/core/dist/lib/queues/HandlerContainer").PrehandlerResult) => void;
|
|
23
23
|
protected resolveMessageLog(message: MessagePayloadType, messageType: string): unknown;
|
|
@@ -23,7 +23,9 @@ class AbstractSqsConsumerMultiSchema extends AbstractSqsConsumer_1.AbstractSqsCo
|
|
|
23
23
|
resolveSchema(message) {
|
|
24
24
|
return this.messageSchemaContainer.resolveSchema(message);
|
|
25
25
|
}
|
|
26
|
-
async processMessage(message, messageType,
|
|
26
|
+
async processMessage(message, messageType,
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28
|
+
prehandlingOutputs) {
|
|
27
29
|
const handler = this.handlerContainer.resolveHandler(messageType);
|
|
28
30
|
return handler.handler(message, this.executionContext, prehandlingOutputs);
|
|
29
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractSqsConsumerMultiSchema.js","sourceRoot":"","sources":["../../../lib/sqs/AbstractSqsConsumerMultiSchema.ts"],"names":[],"mappings":";;;AACA,sDAAsF;AAWtF,+DAA2D;AA+B3D,MAAsB,8BAiBpB,SAAQ,yCAOT;IACC,sBAAsB,CAA4C;IAClE,gBAAgB,CAA0E;IACvE,gBAAgB,CAAkB;IAErD,YACE,YAAqC,EACrC,OAA4B,EAC5B,gBAAkC;QAElC,KAAK,CAAC,YAAY,EAAE,OAAO,CAAC,CAAA;QAE5B,MAAM,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;QAEpE,IAAI,CAAC,sBAAsB,GAAG,IAAI,6BAAsB,CAAqB;YAC3E,cAAc;YACd,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;SAC3C,CAAC,CAAA;QACF,IAAI,CAAC,gBAAgB,GAAG,IAAI,uBAAgB,CAI1C;YACA,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;YACvC,eAAe,EAAE,OAAO,CAAC,QAAQ;SAClC,CAAC,CAAA;QACF,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAA;IAC1C,CAAC;IAEkB,aAAa,CAAC,OAA2B;QAC1D,OAAO,IAAI,CAAC,sBAAsB,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;IAC3D,CAAC;IAEe,KAAK,CAAC,cAAc,CAClC,OAA2B,EAC3B,WAAmB,
|
|
1
|
+
{"version":3,"file":"AbstractSqsConsumerMultiSchema.js","sourceRoot":"","sources":["../../../lib/sqs/AbstractSqsConsumerMultiSchema.ts"],"names":[],"mappings":";;;AACA,sDAAsF;AAWtF,+DAA2D;AA+B3D,MAAsB,8BAiBpB,SAAQ,yCAOT;IACC,sBAAsB,CAA4C;IAClE,gBAAgB,CAA0E;IACvE,gBAAgB,CAAkB;IAEr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EAClC,OAA0E,EAC1E,MAA4B;QAE5B,OAAO,IAAI,CAAC,qCAAqC,CAC/C,WAAW,EACX,IAAI,CAAC,gBAAgB,EACrB,OAAO,EACP,KAAK,EACL,gBAAgB,EAChB,OAAO,EACP,MAAM,CACP,CAAA;IACH,CAAC;IAEkB,iBAAiB,CAAC,OAA2B,EAAE,WAAmB;QACnF,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;QACjE,OAAO,OAAO,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAA;IAC7C,CAAC;IAEkB,KAAK,CAAC,iBAAiB,CACxC,OAA2B,EAC3B,WAAmB,EACnB,gBAAkC;QAElC,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAClD,WAAW,CACZ,CAAA;QACD,aAAa;QACb,OAAO,OAAO,CAAC,iBAAiB;YAC9B,CAAC,CAAC,aAAa;gBACb,MAAM,OAAO,CAAC,iBAAiB,CAAC,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;YACnF,CAAC,CAAC;gBACE,SAAS,EAAE,IAAI;gBACf,MAAM,EAAE,SAAS;aAClB,CAAA;IACP,CAAC;CACF;AApHD,wEAoHC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@message-queue-toolkit/sqs",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "SQS adapter for message-queue-toolkit",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@aws-sdk/client-sqs": "^3.476.0",
|
|
34
|
-
"@message-queue-toolkit/core": "^9.0.
|
|
34
|
+
"@message-queue-toolkit/core": "^9.0.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@aws-sdk/client-sqs": "^3.529.1",
|