A reference to a promise store.
An encoder instance used for encode and decode promise data.
The raw Durable Promise.
Private
completePrivate
Readonly
completedPrivate
encoderAn encoder instance used for encode and decode promise data.
Private
intervalPrivate
promiseThe raw Durable Promise.
Private
storeA reference to a promise store.
Returns true when the Durable Promise is canceled.
The Durable Promise created on time.
The Durable Promise id.
The Durable Promise complete idempotency key.
The Durable Promise create idempotency key.
Returns true when the Durable Promise is pending.
Returns true when the Durable Promise is rejected.
Returns true when the Durable Promise is resolved.
Returns true when the Durable Promise is timedout.
The Durable Promise timeout time.
Cancels the Durable Promise.
The Durable Promise error value, will be encoded with the provided encoder.
A partial Durable Promise create options.
this instance.
Private
pollRejects the Durable Promise.
The Durable Promise error value, will be encoded with the provided encoder.
A partial Durable Promise create options.
this instance.
Resolves the Durable Promise.
The Durable Promise value, will be encoded with the provided encoder.
A partial Durable Promise create options.
this instance.
Polls the Durable Promise store to sychronize the state, stops when the promise is complete.
The time at which to stop polling if the promise is still pending.
The frequency in ms to poll.
A Promise that resolves when the Durable Promise is complete.
Polls the Durable Promise store, and returns the value when the Durable Promise is complete.
The time at which to stop polling if the promise is still pending.
The frequency in ms to poll.
The promise value, or throws an error.
Static
cancelCancels a Durable Promise.
A reference to a promise store.
An encoder instance used for encode and decode promise data.
The Durable Promise id.
The Durable Promise error value, will be encoded with the provided encoder.
A partial Durable Promise create options.
A Durable Promise instance.
Static
createCreates a Durable Promise.
A reference to a promise store.
An encoder instance used for encode and decode promise data.
The Durable Promise id.
The Durable Promise timeout in milliseconds.
A partial Durable Promise create options.
A Durable Promise instance.
Static
getGets a Durable Promise.
A reference to a promise store.
An encoder instance used for encode and decode promise data.
The Durable Promise id.
A Durable Promise instance.
Static
rejectRejects a Durable Promise.
A reference to a promise store.
An encoder instance used for encode and decode promise data.
The Durable Promise id.
The Durable Promise error value, will be encoded with the provided encoder.
A partial Durable Promise create options.
A Durable Promise instance.
Static
resolveResolves a Durable Promise.
A reference to a promise store.
An encoder instance used for encode and decode promise data.
The Durable Promise id.
The Durable Promise value, will be encoded with the provided encoder.
A partial Durable Promise create options.
A Durable Promise instance.
Static
searchSearch for Durable Promises.
A reference to a promise store.
An encoder instance used for encode and decode promise data.
An id to match against Durable Promise ids, can include wilcards.
Optional
state: stringA state to search for, can be one of {pending, resolved, rejected}, matches all states if undefined.
Optional
tags: Record<string, string>Tags to search against.
Optional
limit: numberThe maximum number of Durable Promises to return per page.
An async generator that yields Durable Promise instances.
Creates a Durable Promise instance. This is provided as a lower level API, used by the Resonate class internally.