EventsOperations
The events.* operations.
Methods
Section titled “Methods”list()
Section titled “list()”list(input?, options?): Promise<Events>;Read the agents' events.
A page reads after the cursor, from the start without one. A stream reads after the cursor, from what's written next without one. Where a log was trimmed past the cursor, a wardrik.events.dropped says so, and the log is read on from the oldest event it holds.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
input? |
{ agents?: string[]; types?: string[]; after?: string; limit?: number; } |
- |
input.agents? |
string[] |
The agents to cover, by ID, given once for each. Each covers its conversations too. Every agent you may see unless set. |
input.types? |
string[] |
The event types to read, as wardrik.run.completed, given once for each. Every type where left out. A wardrik.events.dropped comes whatever the types. |
input.after? |
string |
The cursor to read after: a page's next, the id of an event a stream gave, or a snapshot's cursor. |
input.limit? |
number |
How many to read, 100 unless set. |
options? |
CallOptions |
- |
Returns
Section titled “Returns”Promise<Events>
streamList()
Section titled “streamList()”streamList(input?, options?): EventStream;Like list, then follows each new event as it's written. Starts after after, or at
the end of the log. See EventStream.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
input? |
{ agents?: string[]; types?: string[]; after?: string; } |
- |
input.agents? |
string[] |
The agents to cover, by ID, given once for each. Each covers its conversations too. Every agent you may see unless set. |
input.types? |
string[] |
The event types to read, as wardrik.run.completed, given once for each. Every type where left out. A wardrik.events.dropped comes whatever the types. |
input.after? |
string |
The cursor to read after: a page's next, the id of an event a stream gave, or a snapshot's cursor. |
options? |
StreamOptions |
- |
Returns
Section titled “Returns”head()
Section titled “head()”head(input?, options?): Promise<string>;Read where the agents' logs stand.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
input? |
{ agents?: string[]; } |
- |
input.agents? |
string[] |
The agents to cover, by ID, given once for each. Each covers its conversations too. Every agent you may see unless set. |
options? |
CallOptions |
- |
Returns
Section titled “Returns”Promise<string>