Class: BookingEventRepository
Defined in: server/bookings/booking-event-repository.ts:50
APPEND-ONLY timeline + transactional outbox (§6.5/§8.1). The dispatcher's cursor and lease fields are mutable; domain event content is immutable.
Extends
WriteRepository<PrismaClient,BookingEvents,BookingEventAppendInput,Record<string,never>,string,Tx<PrismaClient>>
Constructors
Constructor
new BookingEventRepository(prismaClient: PrismaClientLike<Tx<PrismaClient<PrismaClientOptions, never, DefaultArgs>>> & PrismaClient<PrismaClientOptions, never, DefaultArgs>, options?: RepositoryOptions): BookingEventRepository;Defined in: server/persistence/base-repository.ts:68
Parameters
| Parameter | Type |
|---|---|
prismaClient | PrismaClientLike<Tx<PrismaClient<PrismaClientOptions, never, DefaultArgs>>> & PrismaClient<PrismaClientOptions, never, DefaultArgs> |
options | RepositoryOptions |
Returns
BookingEventRepository
Inherited from
Properties
ENTITY_TYPE?
protected readonly optional ENTITY_TYPE?: string;Defined in: server/persistence/base-repository.ts:61
Set ENTITY_TYPE in child repositories to enable automatic activity
logging. When set, create/update/delete operations auto-log unless
silenced with .silent. Requires an activity model on the consumer's
Prisma schema.
Inherited from
logger?
protected readonly optional logger?: Logger;Defined in: server/persistence/base-repository.ts:64
Inherited from
prismaClient
protected prismaClient: PrismaClientLike<Tx<PrismaClient<PrismaClientOptions, never, DefaultArgs>>> & PrismaClient<PrismaClientOptions, never, DefaultArgs>;Defined in: server/persistence/base-repository.ts:69
Inherited from
Accessors
actorId
Get Signature
get protected actorId(): string | null | undefined;Defined in: server/persistence/base-repository.ts:76
Returns
string | null | undefined
Inherited from
auditCreate
Get Signature
get protected auditCreate(): {
createdBy: string | null | undefined;
updatedBy: string | null | undefined;
};Defined in: server/persistence/base-repository.ts:90
Returns
{
createdBy: string | null | undefined;
updatedBy: string | null | undefined;
}createdBy
createdBy: string | null | undefined = actorId;updatedBy
updatedBy: string | null | undefined = actorId;Inherited from
auditDelete
Get Signature
get protected auditDelete(): {
deletedAt: Date;
deletedBy: string | null | undefined;
};Defined in: server/persistence/base-repository.ts:99
Returns
{
deletedAt: Date;
deletedBy: string | null | undefined;
}deletedAt
deletedAt: Date;deletedBy
deletedBy: string | null | undefined;Inherited from
auditUpdate
Get Signature
get protected auditUpdate(): {
updatedBy: string | null | undefined;
};Defined in: server/persistence/base-repository.ts:95
Returns
{
updatedBy: string | null | undefined;
}updatedBy
updatedBy: string | null | undefined;Inherited from
silent
Get Signature
get silent(): this;Defined in: server/persistence/base-repository.ts:115
Suppress activity logging for the next mutation call. One-shot: the flag is consumed by the next create/update/delete.
Example
await repo.silent.update(id, data); // no activity logged
await repo.update(id, data); // activity logged normallyReturns
this
Inherited from
tx
Get Signature
get protected tx(): TTx;Defined in: server/persistence/base-repository.ts:86
The current Prisma handle: the active transaction if one is running on this async context, otherwise the raw client.
Returns
TTx
Inherited from
Methods
_count()
protected _count(): Promise<number>;Defined in: server/bookings/booking-event-repository.ts:71
Returns
Promise<number>
Overrides
_create()
protected _create(input: BookingEventAppendInput): Promise<{
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}>;Defined in: server/bookings/booking-event-repository.ts:89
Parameters
| Parameter | Type |
|---|---|
input | BookingEventAppendInput |
Returns
Promise<{
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}>
Overrides
_exists()
protected _exists(id: string): Promise<boolean>;Defined in: server/bookings/booking-event-repository.ts:66
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<boolean>
Overrides
_findById()
protected _findById(id: string): Promise<
| {
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}
| null>;Defined in: server/bookings/booking-event-repository.ts:62
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<
| {
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}
| null>
Overrides
_findMany()
protected _findMany(): Promise<{
items: {
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}[];
total: number;
}>;Defined in: server/bookings/booking-event-repository.ts:80
No unscoped reads: paging over EVERY org's events is never a valid access
pattern (mirrors _update throwing on this append-only repo). Use
findByBooking or findUndispatched instead.
Returns
Promise<{
items: {
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}[];
total: number;
}>
Overrides
_update()
protected _update(): Promise<{
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}>;Defined in: server/bookings/booking-event-repository.ts:132
Append-only: event content is never mutated. Use markDispatched for the cursor.
Returns
Promise<{
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}>
Overrides
acknowledge()
acknowledge(id: string, token: string): Promise<boolean>;Defined in: server/bookings/booking-event-repository.ts:193
Call with the matching outcome append in one short transaction.
Parameters
| Parameter | Type |
|---|---|
id | string |
token | string |
Returns
Promise<boolean>
afterCreate()
protected afterCreate(entity: {
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}, _input: BookingEventAppendInput): Promise<void>;Defined in: server/persistence/base-repository.ts:316
Parameters
| Parameter | Type | Description |
|---|---|---|
entity | { actorId: string | null; bookingId: string; channel: string | null; createdBy: string | null; data: JsonValue; dispatchedAt: Date | null; eventType: string; id: string; idempotencyKey: string | null; leaseToken: string | null; leaseUntil: Date | null; occurredAt: Date; reason: string | null; sequence: number; statusAfter: string | null; statusBefore: string | null; } | - |
entity.actorId | string | null | - |
entity.bookingId | string | - |
entity.channel | string | null | - |
entity.createdBy | string | null | - |
entity.data | JsonValue | - |
entity.dispatchedAt | Date | null | Outbox cursor: NULL for an undispatched effect row (*_due eventType); set by event-dispatcher.ts after the side effect succeeds (§8.1). The ONLY mutable domain cursor; leases are dispatcher bookkeeping. Plain timeline rows are born dispatched. |
entity.eventType | string | - |
entity.id | string | - |
entity.idempotencyKey | string | null | Dedup key so a cron re-run doesn't re-emit (cedar's fire-and-forget bug, §12). |
entity.leaseToken | string | null | - |
entity.leaseUntil | Date | null | - |
entity.occurredAt | Date | - |
entity.reason | string | null | - |
entity.sequence | number | - |
entity.statusAfter | string | null | - |
entity.statusBefore | string | null | - |
_input | BookingEventAppendInput | - |
Returns
Promise<void>
Inherited from
afterUpdate()
protected afterUpdate(
_entity: {
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
},
id: string,
input: Record<string, never>
): Promise<void>;Defined in: server/persistence/base-repository.ts:328
Parameters
| Parameter | Type | Description |
|---|---|---|
_entity | { actorId: string | null; bookingId: string; channel: string | null; createdBy: string | null; data: JsonValue; dispatchedAt: Date | null; eventType: string; id: string; idempotencyKey: string | null; leaseToken: string | null; leaseUntil: Date | null; occurredAt: Date; reason: string | null; sequence: number; statusAfter: string | null; statusBefore: string | null; } | - |
_entity.actorId | string | null | - |
_entity.bookingId | string | - |
_entity.channel | string | null | - |
_entity.createdBy | string | null | - |
_entity.data | JsonValue | - |
_entity.dispatchedAt | Date | null | Outbox cursor: NULL for an undispatched effect row (*_due eventType); set by event-dispatcher.ts after the side effect succeeds (§8.1). The ONLY mutable domain cursor; leases are dispatcher bookkeeping. Plain timeline rows are born dispatched. |
_entity.eventType | string | - |
_entity.id | string | - |
_entity.idempotencyKey | string | null | Dedup key so a cron re-run doesn't re-emit (cedar's fire-and-forget bug, §12). |
_entity.leaseToken | string | null | - |
_entity.leaseUntil | Date | null | - |
_entity.occurredAt | Date | - |
_entity.reason | string | null | - |
_entity.sequence | number | - |
_entity.statusAfter | string | null | - |
_entity.statusBefore | string | null | - |
id | string | - |
input | Record<string, never> | - |
Returns
Promise<void>
Inherited from
append()
append(input: BookingEventAppendInput): Promise<
| {
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}
| null>;Defined in: server/bookings/booking-event-repository.ts:142
Atomic idempotent append. Reusing a key for another booking/event type fails explicitly; redelivery of the same event returns its existing row.
Parameters
| Parameter | Type |
|---|---|
input | BookingEventAppendInput |
Returns
Promise<
| {
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}
| null>
beforeCreate()
protected beforeCreate(_input: BookingEventAppendInput): Promise<void>;Defined in: server/persistence/base-repository.ts:315
Parameters
| Parameter | Type |
|---|---|
_input | BookingEventAppendInput |
Returns
Promise<void>
Inherited from
beforeUpdate()
protected beforeUpdate(
_id: string,
_input: Record<string, never>,
_existing: {
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}
): Promise<void>;Defined in: server/persistence/base-repository.ts:323
Parameters
| Parameter | Type | Description |
|---|---|---|
_id | string | - |
_input | Record<string, never> | - |
_existing | { actorId: string | null; bookingId: string; channel: string | null; createdBy: string | null; data: JsonValue; dispatchedAt: Date | null; eventType: string; id: string; idempotencyKey: string | null; leaseToken: string | null; leaseUntil: Date | null; occurredAt: Date; reason: string | null; sequence: number; statusAfter: string | null; statusBefore: string | null; } | - |
_existing.actorId | string | null | - |
_existing.bookingId | string | - |
_existing.channel | string | null | - |
_existing.createdBy | string | null | - |
_existing.data | JsonValue | - |
_existing.dispatchedAt | Date | null | Outbox cursor: NULL for an undispatched effect row (*_due eventType); set by event-dispatcher.ts after the side effect succeeds (§8.1). The ONLY mutable domain cursor; leases are dispatcher bookkeeping. Plain timeline rows are born dispatched. |
_existing.eventType | string | - |
_existing.id | string | - |
_existing.idempotencyKey | string | null | Dedup key so a cron re-run doesn't re-emit (cedar's fire-and-forget bug, §12). |
_existing.leaseToken | string | null | - |
_existing.leaseUntil | Date | null | - |
_existing.occurredAt | Date | - |
_existing.reason | string | null | - |
_existing.sequence | number | - |
_existing.statusAfter | string | null | - |
_existing.statusBefore | string | null | - |
Returns
Promise<void>
Inherited from
claim()
claim(id: string, leaseSeconds: number): Promise<string | null>;Defined in: server/bookings/booking-event-repository.ts:167
Lease only the oldest unacknowledged effect for this booking. DB time and an ownership token prevent concurrent drains from sharing a live claim.
Parameters
| Parameter | Type |
|---|---|
id | string |
leaseSeconds | number |
Returns
Promise<string | null>
consumeSilent()
protected consumeSilent(): boolean;Defined in: server/persistence/base-repository.ts:128
Consume and reset the silent flag. Called by template methods.
Returns
boolean
Inherited from
count()
count(): Promise<number>;Defined in: server/persistence/base-repository.ts:191
Returns
Promise<number>
Inherited from
create()
create(input: BookingEventAppendInput): Promise<{
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}>;Defined in: server/persistence/base-repository.ts:292
Parameters
| Parameter | Type |
|---|---|
input | BookingEventAppendInput |
Returns
Promise<{
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}>
Inherited from
exists()
exists(id: string): Promise<boolean>;Defined in: server/persistence/base-repository.ts:187
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<boolean>
Inherited from
findByBooking()
findByBooking(bookingId: string): Promise<{
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}[]>;Defined in: server/bookings/booking-event-repository.ts:147
Timeline read, oldest first.
Parameters
| Parameter | Type |
|---|---|
bookingId | string |
Returns
Promise<{
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}[]>
findById()
findById(id: string): Promise<
| {
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}
| null>;Defined in: server/persistence/base-repository.ts:177
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<
| {
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}
| null>
Inherited from
findByIdOrThrow()
findByIdOrThrow(id: string): Promise<{
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}>;Defined in: server/persistence/base-repository.ts:181
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<{
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}>
Inherited from
WriteRepository.findByIdOrThrow
findMany()
findMany(pagination: {
page: number;
pageSize: number;
}): Promise<OffsetPaginatedResult<{
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}>>;Defined in: server/persistence/base-repository.ts:195
Parameters
| Parameter | Type |
|---|---|
pagination | { page: number; pageSize: number; } |
pagination.page | number |
pagination.pageSize | number |
Returns
Promise<OffsetPaginatedResult<{
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}>>
Inherited from
findUndispatched()
findUndispatched(bookingId?: string): Promise<{
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}[]>;Defined in: server/bookings/booking-event-repository.ts:155
Undispatched outbox rows (dispatched_at IS NULL), oldest first.
Parameters
| Parameter | Type |
|---|---|
bookingId? | string |
Returns
Promise<{
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}[]>
latestOccurredAtByType()
latestOccurredAtByType(eventTypes: readonly string[]): Promise<Map<string, Date | null>>;Defined in: server/bookings/booking-event-repository.ts:209
Return the occurredAt timestamp of the most-recent event for each
provided eventType. Used by SchedulerHealth to derive per-sweeper
watermarks (§11): { eventType → latestOccurredAt | null }.
A null value means the sweeper has never emitted that event type — its
watermark is epoch-zero, i.e. it has never run.
Parameters
| Parameter | Type |
|---|---|
eventTypes | readonly string[] |
Returns
Promise<Map<string, Date | null>>
logActivity()
protected logActivity(
_entityId: string,
_action: string,
_metadata?: Record<string, unknown>
): Promise<void>;Defined in: server/persistence/base-repository.ts:140
Log an activity entry.
NOTE: This is not implemented because there's no activity model implemented in taproot yet! https://linear.app/kaizenlabs/issue/ENG-7846/add-activity-log-tables
Parameters
| Parameter | Type |
|---|---|
_entityId | string |
_action | string |
_metadata? | Record<string, unknown> |
Returns
Promise<void>
Inherited from
markDispatched()
markDispatched(id: string): Promise<{
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}>;Defined in: server/bookings/booking-event-repository.ts:230
Flip the outbox cursor — the one mutable column on this table.
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<{
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}>
notFoundError()
protected notFoundError(id: string): Error;Defined in: server/bookings/booking-event-repository.ts:58
Create a not-found error. Override to provide custom error types.
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Error
Overrides
release()
release(id: string, token: string): Promise<void>;Defined in: server/bookings/booking-event-repository.ts:185
A failed attempt is retryable; a stale worker cannot clear a newer lease.
Parameters
| Parameter | Type |
|---|---|
id | string |
token | string |
Returns
Promise<void>
update()
update(id: string, input: Record<string, never>): Promise<{
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}>;Defined in: server/persistence/base-repository.ts:301
Parameters
| Parameter | Type |
|---|---|
id | string |
input | Record<string, never> |
Returns
Promise<{
actorId: string | null;
bookingId: string;
channel: string | null;
createdBy: string | null;
data: JsonValue;
dispatchedAt: Date | null;
eventType: string;
id: string;
idempotencyKey: string | null;
leaseToken: string | null;
leaseUntil: Date | null;
occurredAt: Date;
reason: string | null;
sequence: number;
statusAfter: string | null;
statusBefore: string | null;
}>