-
Notifications
You must be signed in to change notification settings - Fork 85
/
IRestClientResponse.ts
71 lines (61 loc) · 1.52 KB
/
IRestClientResponse.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
/*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright Contributors to the Zowe Project.
*
*/
import { Session, Logger } from "@zowe/imperative";
/**
* Interface to map client's REST call response
* @export
* @interface IRestClientResponse
*/
export interface IRestClientResponse {
/**
* Status whether or not a REST request was successful by HTTP status code
* @type {boolean}
* @memberof IRestClientResponse
*/
requestSuccess?: boolean;
/**
* Status whether or not a REST request was successful by HTTP status code
* Reverse of requestSuccess
* @type {boolean}
* @memberof IRestClientResponse
*/
requestFailure?: boolean;
/**
* Http(s) response body as a buffer
* @type {Buffer}
* @memberof IRestClientResponse
*/
data?: Buffer;
/**
* Http(s) response body as a string
* @type {string}
* @memberof IRestClientResponse
*/
dataString?: string;
/**
* Http(s) response object
* @type {any}
* @memberof IRestClientResponse
*/
response?: any;
/**
* Session object
* @type {Session}
* @memberof IRestClientResponse
*/
session?: Session;
/**
* Logger object
* @type {Logger}
* @memberof IRestClientResponse
*/
log?: Logger;
}