QueueMethods
Queue methods interface - operations bound to a queue returned by getAll, the options-object getById, getByName, and getByKey. The queue's own id, name, and folder are filled in automatically.
Methods¶
completeTransaction()¶
completeTransaction(
itemId:number,outcome:QueueTransactionOutcome,options?:Omit<QueueCompleteTransactionOptions,"folderId"|"folderKey"|"folderPath">):Promise<void>
Reports the processing outcome of one of this queue's items.
Parameters¶
| Parameter | Type | Description |
|---|---|---|
itemId |
number |
Queue item ID of the transaction to complete |
outcome |
QueueTransactionOutcome |
The caller's verdict on its own processing of the item; Orchestrator records it as-is |
options? |
Omit<QueueCompleteTransactionOptions, "folderId" | "folderKey" | "folderPath"> |
Completion details (output data, failure details, new defer/due dates) — folder scoping comes from the queue |
Returns¶
Promise<void>
Promise that resolves once the outcome is recorded
getAllItems()¶
getAllItems<
T>(options?:T):Promise<TextendsHasPaginationOptions<T> ?PaginatedResponse<QueueItem> :NonPaginatedResponse<QueueItem>>
Gets this queue's items with optional filtering and pagination.
Type Parameters¶
| Type Parameter | Default type |
|---|---|
T extends Omit<QueueGetAllItemsOptions, "folderId" | "folderKey" | "folderPath"> |
Omit<QueueGetAllItemsOptions, "folderId" | "folderKey" | "folderPath"> |
Parameters¶
| Parameter | Type | Description |
|---|---|---|
options? |
T |
Query options including filtering and pagination options |
Returns¶
Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<QueueItem> : NonPaginatedResponse<QueueItem>>
Promise resolving to the queue's QueueItem entries
insertItem()¶
insertItem(
specificData:Record<string,QueueItemValue>,options?:Omit<QueueInsertItemOptions,"folderId"|"folderKey"|"folderPath">):Promise<QueueItem>
Inserts a new item into this queue.
The payload must be flat — nested objects and arrays are rejected.
Parameters¶
| Parameter | Type | Description |
|---|---|---|
specificData |
Record<string, QueueItemValue> |
The item's business payload (keys are stored exactly as provided) |
options? |
Omit<QueueInsertItemOptions, "folderId" | "folderKey" | "folderPath"> |
Optional item metadata (priority, reference, defer/due dates) — folder scoping comes from the queue |
Returns¶
Promise<QueueItem>
Promise resolving to the created QueueItem
startTransaction()¶
startTransaction():
Promise<null|QueueItem>
Acquires the next available item from this queue, marking it InProgress.
Requires a robot session — Orchestrator returns the item to the robot
that requested it, so user and application identities receive null.
null means either no eligible items or no allocation target; the API
does not distinguish them.
Returns¶
Promise<null | QueueItem>
Promise resolving to the acquired QueueItem, or null