redis-smq
Version:
A high-performance, reliable, and scalable message queue for Node.js.
53 lines • 2.79 kB
TypeScript
import { EMessageProperty } from './message.js';
export interface IMessageStateTransferable {
uuid: string;
scheduledAt: number | null;
publishedAt: number | null;
requeuedAt: number | null;
processingStartedAt: number | null;
acknowledgedAt: number | null;
unacknowledgedAt: number | null;
deadLetteredAt: number | null;
lastRequeuedAt: number | null;
lastUnacknowledgedAt: number | null;
lastScheduledAt: number | null;
lastRetriedAttemptAt: number | null;
lastProcessedAt: number | null;
scheduledCronFired: boolean;
attempts: number;
scheduledRepeatCount: number;
requeueCount: number;
expired: boolean;
effectiveScheduledDelay: number;
scheduledTimes: number;
scheduledMessageParentId: string | null;
requeuedMessageParentId: string | null;
}
export type TMessageStateProperty = EMessageProperty.ID | EMessageProperty.SCHEDULED_AT | EMessageProperty.PUBLISHED_AT | EMessageProperty.REQUEUED_AT | EMessageProperty.PROCESSING_STARTED_AT | EMessageProperty.DEAD_LETTERED_AT | EMessageProperty.ACKNOWLEDGED_AT | EMessageProperty.UNACKNOWLEDGED_AT | EMessageProperty.LAST_UNACKNOWLEDGED_AT | EMessageProperty.LAST_SCHEDULED_AT | EMessageProperty.LAST_RETRIED_ATTEMPT_AT | EMessageProperty.SCHEDULED_CRON_FIRED | EMessageProperty.ATTEMPTS | EMessageProperty.SCHEDULED_REPEAT_COUNT | EMessageProperty.EXPIRED | EMessageProperty.EFFECTIVE_SCHEDULED_DELAY | EMessageProperty.SCHEDULED_TIMES | EMessageProperty.SCHEDULED_MESSAGE_PARENT_ID | EMessageProperty.REQUEUED_MESSAGE_PARENT_ID | EMessageProperty.REQUEUE_COUNT | EMessageProperty.LAST_REQUEUED_AT | EMessageProperty.LAST_PROCESSED_AT;
export declare const MessageStatePropertyMap: {
readonly 0: "uuid";
readonly 4: "publishedAt";
readonly 3: "scheduledAt";
readonly 12: "requeuedAt";
readonly 7: "acknowledgedAt";
readonly 8: "unacknowledgedAt";
readonly 9: "lastUnacknowledgedAt";
readonly 6: "deadLetteredAt";
readonly 5: "processingStartedAt";
readonly 10: "lastScheduledAt";
readonly 15: "lastRetriedAttemptAt";
readonly 16: "scheduledCronFired";
readonly 17: "attempts";
readonly 18: "scheduledRepeatCount";
readonly 19: "expired";
readonly 20: "effectiveScheduledDelay";
readonly 21: "scheduledTimes";
readonly 22: "scheduledMessageParentId";
readonly 23: "requeuedMessageParentId";
readonly 13: "requeueCount";
readonly 14: "lastRequeuedAt";
readonly 11: "lastProcessedAt";
};
export type TMessageStatePropertyKey<T extends TMessageStateProperty> = (typeof MessageStatePropertyMap)[T];
export type TMessageStatePropertyType<T extends TMessageStateProperty> = IMessageStateTransferable[TMessageStatePropertyKey<T>];
//# sourceMappingURL=message-state.d.ts.map