lonnymq 0.0.13 → 0.0.15
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.
- package/dist/index.cjs +189 -129
- package/dist/index.d.ts +29 -0
- package/dist/index.js +196 -136
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -121,8 +121,10 @@ export type MessageDeleteCommandResult = MessageDeleteCommandResultMessageNotFou
|
|
|
121
121
|
export declare class MessageDeleteCommand {
|
|
122
122
|
readonly schema: string;
|
|
123
123
|
readonly id: string;
|
|
124
|
+
readonly numAttempts: number;
|
|
124
125
|
constructor(params: {
|
|
125
126
|
schema: string;
|
|
127
|
+
numAttempts: number;
|
|
126
128
|
id: string;
|
|
127
129
|
});
|
|
128
130
|
execute(databaseClient: DatabaseClient): Promise<MessageDeleteCommandResult>;
|
|
@@ -140,16 +142,39 @@ export type MessageDeferCommandResult = MessageDeferCommandResultMessageNotFound
|
|
|
140
142
|
export declare class MessageDeferCommand {
|
|
141
143
|
readonly schema: string;
|
|
142
144
|
readonly id: string;
|
|
145
|
+
readonly numAttempts: number;
|
|
143
146
|
readonly delayMs: number;
|
|
144
147
|
readonly state: Buffer | null;
|
|
145
148
|
constructor(params: {
|
|
146
149
|
schema: string;
|
|
147
150
|
id: string;
|
|
151
|
+
numAttempts: number;
|
|
148
152
|
delayMs?: number;
|
|
149
153
|
state?: Buffer | null;
|
|
150
154
|
});
|
|
151
155
|
execute(databaseClient: DatabaseClient): Promise<MessageDeferCommandResult>;
|
|
152
156
|
}
|
|
157
|
+
export type MessageHeartbeatCommandResultMessageNotFound = {
|
|
158
|
+
resultType: "MESSAGE_NOT_FOUND";
|
|
159
|
+
};
|
|
160
|
+
export type MessageHeartbeatCommandResultStateInvalid = {
|
|
161
|
+
resultType: "MESSAGE_STATE_INVALID";
|
|
162
|
+
};
|
|
163
|
+
export type MessageHeartbeatCommandResultMessageHeartbeated = {
|
|
164
|
+
resultType: "MESSAGE_HEARTBEATED";
|
|
165
|
+
};
|
|
166
|
+
export type MessageHeartbeatCommandResult = MessageHeartbeatCommandResultMessageNotFound | MessageHeartbeatCommandResultStateInvalid | MessageHeartbeatCommandResultMessageHeartbeated;
|
|
167
|
+
export declare class MessageHeartbeatCommand {
|
|
168
|
+
readonly schema: string;
|
|
169
|
+
readonly id: string;
|
|
170
|
+
readonly numAttempts: number;
|
|
171
|
+
constructor(params: {
|
|
172
|
+
schema: string;
|
|
173
|
+
id: string;
|
|
174
|
+
numAttempts: number;
|
|
175
|
+
});
|
|
176
|
+
execute(databaseClient: DatabaseClient): Promise<MessageHeartbeatCommandResult>;
|
|
177
|
+
}
|
|
153
178
|
export type QueueBatchChannelMessageCreateResult = {
|
|
154
179
|
messageId: string;
|
|
155
180
|
promise: Promise<MessageCreateCommandResult>;
|
|
@@ -278,6 +303,10 @@ export declare class QueueMessage {
|
|
|
278
303
|
delete(params: {
|
|
279
304
|
databaseClient: DatabaseClient;
|
|
280
305
|
}): Promise<MessageDeleteCommandResult>;
|
|
306
|
+
heartbeat(params: {
|
|
307
|
+
databaseClient: DatabaseClient;
|
|
308
|
+
delayMs?: number;
|
|
309
|
+
}): Promise<MessageDeferCommandResult>;
|
|
281
310
|
}
|
|
282
311
|
export type MessageDequeueResult = {
|
|
283
312
|
resultType: "MESSAGE_NOT_AVAILABLE";
|