-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathevents.ts
More file actions
61 lines (52 loc) · 1.64 KB
/
Copy pathevents.ts
File metadata and controls
61 lines (52 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../resource';
import { isRequestOptions } from '../../core';
import * as Core from '../../core';
import * as AxonsAPI from './axons';
export class Events extends APIResource {
/**
* [Beta] List events from an axon's event stream, ordered by sequence descending.
*/
list(
id: string,
query?: EventListParams,
options?: Core.RequestOptions,
): Core.APIPromise<AxonEventListView>;
list(id: string, options?: Core.RequestOptions): Core.APIPromise<AxonEventListView>;
list(
id: string,
query: EventListParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
): Core.APIPromise<AxonEventListView> {
if (isRequestOptions(query)) {
return this.list(id, {}, query);
}
return this._client.get(`/v1/axons/${id}/events`, { query, ...options });
}
}
export interface AxonEventListView {
/**
* List of axon events.
*/
events: Array<AxonsAPI.AxonEventView>;
has_more: boolean;
total_count?: number | null;
}
export interface EventListParams {
/**
* If true (default), includes total_count in the response. Set to false to skip
* the count query for better performance on large datasets.
*/
include_total_count?: boolean;
/**
* The limit of items to return. Default is 20. Max is 5000.
*/
limit?: number;
/**
* Load the next page of data starting after the item with the given ID.
*/
starting_after?: string;
}
export declare namespace Events {
export { type AxonEventListView as AxonEventListView, type EventListParams as EventListParams };
}