-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrequests.ts
69 lines (64 loc) · 2.2 KB
/
requests.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
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import {
GenerateRequestPostmanCollectionAcceptEnum,
requestsGenerateRequestPostmanCollection,
} from "../funcs/requestsGenerateRequestPostmanCollection.js";
import { requestsGetRequestFromEventLog } from "../funcs/requestsGetRequestFromEventLog.js";
import { requestsQueryEventLog } from "../funcs/requestsQueryEventLog.js";
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
import * as operations from "./models/operations/index.js";
import { unwrapAsync } from "./types/fp.js";
export { GenerateRequestPostmanCollectionAcceptEnum } from "../funcs/requestsGenerateRequestPostmanCollection.js";
export class Requests extends ClientSDK {
/**
* Generate a Postman collection for a particular request.
*
* @remarks
* Generates a Postman collection for a particular request.
* Allowing it to be replayed with the same inputs that were captured by the SDK.
*/
async generateRequestPostmanCollection(
request: operations.GenerateRequestPostmanCollectionRequest,
options?: RequestOptions & {
acceptHeaderOverride?: GenerateRequestPostmanCollectionAcceptEnum;
},
): Promise<operations.GenerateRequestPostmanCollectionResponse> {
return unwrapAsync(requestsGenerateRequestPostmanCollection(
this,
request,
options,
));
}
/**
* Get information about a particular request.
*/
async getRequestFromEventLog(
request: operations.GetRequestFromEventLogRequest,
options?: RequestOptions,
): Promise<operations.GetRequestFromEventLogResponse> {
return unwrapAsync(requestsGetRequestFromEventLog(
this,
request,
options,
));
}
/**
* Query the event log to retrieve a list of requests.
*
* @remarks
* Supports retrieving a list of request captured by the SDK for this workspace.
* Allows the filtering of requests on a number of criteria such as ApiID, VersionID, Path, Method, etc.
*/
async queryEventLog(
request: operations.QueryEventLogRequest,
options?: RequestOptions,
): Promise<operations.QueryEventLogResponse> {
return unwrapAsync(requestsQueryEventLog(
this,
request,
options,
));
}
}