-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathevents.ts
88 lines (82 loc) · 2.32 KB
/
events.ts
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { eventsGetEventsByTarget } from "../funcs/eventsGetEventsByTarget.js";
import { eventsGetTargets } from "../funcs/eventsGetTargets.js";
import { eventsGetTargetsDeprecated } from "../funcs/eventsGetTargetsDeprecated.js";
import { eventsPost } from "../funcs/eventsPost.js";
import { eventsSearch } from "../funcs/eventsSearch.js";
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
import * as operations from "./models/operations/index.js";
import * as shared from "./models/shared/index.js";
import { unwrapAsync } from "./types/fp.js";
export class Events extends ClientSDK {
/**
* Load recent events for a particular workspace
*/
async getEventsByTarget(
request: operations.GetWorkspaceEventsByTargetRequest,
options?: RequestOptions,
): Promise<operations.GetWorkspaceEventsByTargetResponse> {
return unwrapAsync(eventsGetEventsByTarget(
this,
request,
options,
));
}
/**
* Load targets for a particular workspace
*/
async getTargets(
request: operations.GetWorkspaceTargetsRequest,
options?: RequestOptions,
): Promise<operations.GetWorkspaceTargetsResponse> {
return unwrapAsync(eventsGetTargets(
this,
request,
options,
));
}
/**
* Load targets for a particular workspace
*/
async getTargetsDeprecated(
request: operations.GetWorkspaceTargetsDeprecatedRequest,
options?: RequestOptions,
): Promise<operations.GetWorkspaceTargetsDeprecatedResponse> {
return unwrapAsync(eventsGetTargetsDeprecated(
this,
request,
options,
));
}
/**
* Post events for a specific workspace
*
* @remarks
* Sends an array of events to be stored for a particular workspace.
*/
async post(
request: operations.PostWorkspaceEventsRequest,
options?: RequestOptions,
): Promise<shared.ErrorT | undefined> {
return unwrapAsync(eventsPost(
this,
request,
options,
));
}
/**
* Search events for a particular workspace by any field
*/
async search(
request: operations.SearchWorkspaceEventsRequest,
options?: RequestOptions,
): Promise<operations.SearchWorkspaceEventsResponse> {
return unwrapAsync(eventsSearch(
this,
request,
options,
));
}
}