-
Notifications
You must be signed in to change notification settings - Fork 85
/
ZosmfHeaders.ts
220 lines (191 loc) · 6.41 KB
/
ZosmfHeaders.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
/*
* 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 { IHeaderContent } from "./doc/IHeaderContent";
/**
* Class to contain default z/OSMF headers
* @export
* @class ZosmfHeaders
*/
export class ZosmfHeaders {
/**
* lrecl header
* @static
* @memberof ZosmfHeaders
*/
public static readonly X_IBM_INTRDR_LRECL = "X-IBM-Intrdr-Lrecl";
/**
* recfm header
* @static
* @memberof ZosmfHeaders
*/
public static readonly X_IBM_INTRDR_RECFM = "X-IBM-Intrdr-Recfm";
/**
* jcl symbol header to be completed by API
* @static
* @memberof ZosmfHeaders
*/
public static readonly X_IBM_JCL_SYMBOL_PARTIAL = "X-IBM-JCL-Symbol-";
/**
* job class header
* @static
* @memberof ZosmfHeaders
*/
public static readonly X_IBM_INTRDR_CLASS_A: IHeaderContent = { "X-IBM-Intrdr-Class": "A" };
/**
* fixed recfm header
* @static
* @memberof ZosmfHeaders
*/
public static readonly X_IBM_INTRDR_RECFM_F: IHeaderContent = { "X-IBM-Intrdr-Recfm": "F" };
/**
* 80 lrecl header
* @static
* @memberof ZosmfHeaders
*/
public static readonly X_IBM_INTRDR_LRECL_80: IHeaderContent = { "X-IBM-Intrdr-Lrecl": "80" };
/**
* 256 lrecl header
* @static
* @memberof ZosmfHeaders
*/
public static readonly X_IBM_INTRDR_LRECL_256: IHeaderContent = { "X-IBM-Intrdr-Lrecl": "256" };
/**
* text type header
* @static
* @memberof ZosmfHeaders
*/
public static readonly X_IBM_INTRDR_MODE_TEXT: IHeaderContent = { "X-IBM-Intrdr-Mode": "TEXT" };
/**
* n/a header
* @static
* @memberof ZosmfHeaders
*/
public static readonly X_IBM_NOTIFICATION_URL: IHeaderContent = { "X-IBM-Notification-URL": "" };
/**
* base header
* @static
* @memberof ZosmfHeaders
*/
public static readonly X_IBM_ATTRIBUTES_BASE: IHeaderContent = { "X-IBM-Attributes": "base" };
/**
* If you use this header, delete job API will be asynchronous.
* This is the default setting, so using this header is not really necessary unless you want to be explicit.
* @static
* @memberof ZosmfHeaders
*/
public static readonly X_IBM_JOB_MODIFY_VERSION_1: IHeaderContent = { "X-IBM-Job-Modify-Version": "1.0" };
/**
* If you use this header, delete job API will be synchronous.
* But using it may cause problems for some users depending on their maintenance level and configuration.
* @static
* @memberof ZosmfHeaders
*/
public static readonly X_IBM_JOB_MODIFY_VERSION_2: IHeaderContent = { "X-IBM-Job-Modify-Version": "2.0" };
/**
* security header
* @static
* @memberof ZosmfHeaders
*/
public static readonly X_CSRF_ZOSMF_HEADER: object = { "X-CSRF-ZOSMF-HEADER": true }; // "the value does not matter"
/**
* binary transfer header
* @static
* @memberof ZosmfHeaders
*/
public static readonly X_IBM_BINARY: IHeaderContent = { "X-IBM-Data-Type": "binary" };
/**
* record transfer header
* @static
* @memberof ZosmfHeaders
*/
public static readonly X_IBM_RECORD: IHeaderContent = { "X-IBM-Data-Type": "record" };
/**
* binary by record header
* @static
* @memberof ZosmfHeaders
*/
public static readonly X_IBM_BINARY_BY_RECORD: IHeaderContent = { "X-IBM-Data-Type": "record" };
/**
* text transfer header
* @static
* @memberof ZosmfHeaders
*/
public static readonly X_IBM_TEXT: IHeaderContent = { "X-IBM-Data-Type": "text" };
/**
* encoding value for text headers
* @static
* @memberof ZosmfHeaders
*/
public static readonly X_IBM_TEXT_ENCODING: string = ";fileEncoding=";
/**
* octet stream header
* @static
* @memberof ZosmfHeaders
*/
public static readonly OCTET_STREAM: IHeaderContent = { "Content-Type": "application/octet-stream" };
/**
* plain text header
* @static
* @memberof ZosmfHeaders
*/
public static readonly TEXT_PLAIN: IHeaderContent = { "Content-Type": "text/plain" };
/**
* This header value specifies the maximum number of items to return.
* To request that all items be returned, set this header to 0. If you omit this header, or specify an incorrect value,
* up to 1000 items are returned by default.
* @static
* @memberof ZosmfHeaders
*/
public static readonly X_IBM_MAX_ITEMS: IHeaderContent = { "X-IBM-Max-Items": "0" };
/**
* data set migrated recall headers
* @static
* @memberof ZosmfHeaders
*/
public static readonly X_IBM_MIGRATED_RECALL_WAIT: IHeaderContent = { "X-IBM-Migrated-Recall": "wait" };
public static readonly X_IBM_MIGRATED_RECALL_NO_WAIT: IHeaderContent = { "X-IBM-Migrated-Recall": "nowait" };
public static readonly X_IBM_MIGRATED_RECALL_ERROR: IHeaderContent = { "X-IBM-Migrated-Recall": "error" };
/**
* Header to check ETag on read
* Request returns HTTP 304 if not modified
* @static
* @memberof ZosmfHeaders
*/
public static readonly IF_NONE_MATCH = "If-None-Match";
/**
* Header to check ETag on write
* Request returns HTTP 412 if not matched
* @static
* @memberof ZosmfHeaders
*/
public static readonly IF_MATCH = "If-Match";
/**
* Header to set response timeout
* Timeout defaults to 30 seconds if not modified
* @static
* @memberof ZosmfHeaders
*/
public static readonly X_IBM_RESPONSE_TIMEOUT: string = "X-IBM-Response-Timeout";
/**
* Header to force return of ETag in response regardless of file size
* By default Etag is returned only for files smaller than a system determined value (which is at least 8mb)
* @static
* @memberof ZosmfHeaders
*/
public static readonly X_IBM_RETURN_ETAG: IHeaderContent = {"X-IBM-Return-Etag": "true"};
/**
* Header that specifies GZIP compression is supported
* Recent versions of z/OSMF issue a warning if this header is omitted
* @static
* @memberof ZosmfHeaders
*/
public static readonly ACCEPT_ENCODING: IHeaderContent = { "Accept-Encoding": "gzip" };
}