eiagov-typescript-fetch-client 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +73 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/apis/AEOApi.ts +415 -0
- package/apis/COALApi.ts +3645 -0
- package/apis/CRUDIMPORTSApi.ts +322 -0
- package/apis/DBFApi.ts +2260 -0
- package/apis/ELECApi.ts +1180 -0
- package/apis/EMISSApi.ts +640 -0
- package/apis/IEOApi.ts +415 -0
- package/apis/INTLApi.ts +322 -0
- package/apis/NGApi.ts +511 -0
- package/apis/NUCSTATUSApi.ts +910 -0
- package/apis/RTOApi.ts +2260 -0
- package/apis/RootApi.ts +66 -0
- package/apis/SEDSApi.ts +322 -0
- package/apis/SEPApi.ts +1990 -0
- package/apis/STEOApi.ts +322 -0
- package/apis/TOTALApi.ts +322 -0
- package/apis/index.ts +18 -0
- package/docs/AEOApi.md +456 -0
- package/docs/COALApi.md +4847 -0
- package/docs/CRUDIMPORTSApi.md +371 -0
- package/docs/DBFApi.md +2976 -0
- package/docs/DataParams.md +48 -0
- package/docs/DataResponse.md +42 -0
- package/docs/DataResponseContainer.md +38 -0
- package/docs/ELECApi.md +1524 -0
- package/docs/EMISSApi.md +798 -0
- package/docs/Facet.md +38 -0
- package/docs/FacetDetails.md +36 -0
- package/docs/FacetDetailsContainer.md +38 -0
- package/docs/FacetMetaData.md +36 -0
- package/docs/FacetOptionList.md +36 -0
- package/docs/FacetOptionListContainer.md +38 -0
- package/docs/FinalRoute.md +52 -0
- package/docs/FinalRouteResponse.md +36 -0
- package/docs/FinalRouteResponseContainer.md +38 -0
- package/docs/Frequency.md +40 -0
- package/docs/IEOApi.md +456 -0
- package/docs/INTLApi.md +371 -0
- package/docs/NGApi.md +541 -0
- package/docs/NUCSTATUSApi.md +1161 -0
- package/docs/RTOApi.md +2976 -0
- package/docs/RootApi.md +70 -0
- package/docs/RouteRequest.md +36 -0
- package/docs/RouteResponse.md +36 -0
- package/docs/RouteResponseContainer.md +38 -0
- package/docs/Routes.md +40 -0
- package/docs/SEDSApi.md +372 -0
- package/docs/SEPApi.md +2613 -0
- package/docs/STEOApi.md +371 -0
- package/docs/Sort.md +36 -0
- package/docs/TOTALApi.md +371 -0
- package/index.ts +5 -0
- package/models/DataParams.ts +129 -0
- package/models/DataResponse.ts +97 -0
- package/models/DataResponseContainer.ts +96 -0
- package/models/Facet.ts +81 -0
- package/models/FacetDetails.ts +81 -0
- package/models/FacetDetailsContainer.ts +96 -0
- package/models/FacetMetaData.ts +73 -0
- package/models/FacetOptionList.ts +73 -0
- package/models/FacetOptionListContainer.ts +96 -0
- package/models/FinalRoute.ts +152 -0
- package/models/FinalRouteResponse.ts +88 -0
- package/models/FinalRouteResponseContainer.ts +96 -0
- package/models/Frequency.ts +89 -0
- package/models/RouteRequest.ts +73 -0
- package/models/RouteResponse.ts +88 -0
- package/models/RouteResponseContainer.ts +96 -0
- package/models/Routes.ts +89 -0
- package/models/Sort.ts +73 -0
- package/models/index.ts +20 -0
- package/package.json +15 -0
- package/runtime.ts +449 -0
package/apis/INTLApi.ts
ADDED
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* EIA APIv2
|
|
5
|
+
* Swagger UI interface for EIA\'s APIv2. You can also explore EIA\'s API using the [Opendata Query Browser](https://www.eia.gov/opendata/browser/). For this UI, you must use your EIA `api key` to apply filters and return data. You can register for an API Key at [https://www.eia.gov/opendata/](https://www.eia.gov/opendata/)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import * as runtime from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
type DataParams,
|
|
18
|
+
DataParamsFromJSON,
|
|
19
|
+
DataParamsToJSON,
|
|
20
|
+
} from '../models/DataParams';
|
|
21
|
+
import {
|
|
22
|
+
type DataResponseContainer,
|
|
23
|
+
DataResponseContainerFromJSON,
|
|
24
|
+
DataResponseContainerToJSON,
|
|
25
|
+
} from '../models/DataResponseContainer';
|
|
26
|
+
import {
|
|
27
|
+
type FacetDetailsContainer,
|
|
28
|
+
FacetDetailsContainerFromJSON,
|
|
29
|
+
FacetDetailsContainerToJSON,
|
|
30
|
+
} from '../models/FacetDetailsContainer';
|
|
31
|
+
import {
|
|
32
|
+
type FacetOptionListContainer,
|
|
33
|
+
FacetOptionListContainerFromJSON,
|
|
34
|
+
FacetOptionListContainerToJSON,
|
|
35
|
+
} from '../models/FacetOptionListContainer';
|
|
36
|
+
import {
|
|
37
|
+
type FinalRouteResponseContainer,
|
|
38
|
+
FinalRouteResponseContainerFromJSON,
|
|
39
|
+
FinalRouteResponseContainerToJSON,
|
|
40
|
+
} from '../models/FinalRouteResponseContainer';
|
|
41
|
+
import {
|
|
42
|
+
type Sort,
|
|
43
|
+
SortFromJSON,
|
|
44
|
+
SortToJSON,
|
|
45
|
+
} from '../models/Sort';
|
|
46
|
+
|
|
47
|
+
export interface V2InternationalDataGetRequest {
|
|
48
|
+
data?: Array<string>;
|
|
49
|
+
facets?: object;
|
|
50
|
+
frequency?: string;
|
|
51
|
+
start?: string;
|
|
52
|
+
end?: string;
|
|
53
|
+
sort?: Sort;
|
|
54
|
+
length?: number;
|
|
55
|
+
offset?: number;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface V2InternationalDataPostRequest {
|
|
59
|
+
dataParams: DataParams;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface V2InternationalFacetFacetIdGetRequest {
|
|
63
|
+
facetId: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
*/
|
|
69
|
+
export class INTLApi extends runtime.BaseAPI {
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Creates request options for v2InternationalDataGet without sending the request
|
|
73
|
+
*/
|
|
74
|
+
async v2InternationalDataGetRequestOpts(requestParameters: V2InternationalDataGetRequest): Promise<runtime.RequestOpts> {
|
|
75
|
+
const queryParameters: any = {};
|
|
76
|
+
|
|
77
|
+
if (requestParameters['data'] != null) {
|
|
78
|
+
queryParameters['data'] = requestParameters['data'];
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (requestParameters['facets'] != null) {
|
|
82
|
+
queryParameters['facets'] = requestParameters['facets'];
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (requestParameters['frequency'] != null) {
|
|
86
|
+
queryParameters['frequency'] = requestParameters['frequency'];
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (requestParameters['start'] != null) {
|
|
90
|
+
queryParameters['start'] = requestParameters['start'];
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (requestParameters['end'] != null) {
|
|
94
|
+
queryParameters['end'] = requestParameters['end'];
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (requestParameters['sort'] != null) {
|
|
98
|
+
queryParameters['sort'] = requestParameters['sort'];
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (requestParameters['length'] != null) {
|
|
102
|
+
queryParameters['length'] = requestParameters['length'];
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (requestParameters['offset'] != null) {
|
|
106
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
110
|
+
|
|
111
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
112
|
+
queryParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
let urlPath = `/v2/international/data`;
|
|
117
|
+
|
|
118
|
+
return {
|
|
119
|
+
path: urlPath,
|
|
120
|
+
method: 'GET',
|
|
121
|
+
headers: headerParameters,
|
|
122
|
+
query: queryParameters,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* API data with query params
|
|
128
|
+
*/
|
|
129
|
+
async v2InternationalDataGetRaw(requestParameters: V2InternationalDataGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DataResponseContainer>> {
|
|
130
|
+
const requestOptions = await this.v2InternationalDataGetRequestOpts(requestParameters);
|
|
131
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
132
|
+
|
|
133
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DataResponseContainerFromJSON(jsonValue));
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* API data with query params
|
|
138
|
+
*/
|
|
139
|
+
async v2InternationalDataGet(requestParameters: V2InternationalDataGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DataResponseContainer> {
|
|
140
|
+
const response = await this.v2InternationalDataGetRaw(requestParameters, initOverrides);
|
|
141
|
+
return await response.value();
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Creates request options for v2InternationalDataPost without sending the request
|
|
146
|
+
*/
|
|
147
|
+
async v2InternationalDataPostRequestOpts(requestParameters: V2InternationalDataPostRequest): Promise<runtime.RequestOpts> {
|
|
148
|
+
if (requestParameters['dataParams'] == null) {
|
|
149
|
+
throw new runtime.RequiredError(
|
|
150
|
+
'dataParams',
|
|
151
|
+
'Required parameter "dataParams" was null or undefined when calling v2InternationalDataPost().'
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
const queryParameters: any = {};
|
|
156
|
+
|
|
157
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
158
|
+
|
|
159
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
160
|
+
|
|
161
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
162
|
+
queryParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
let urlPath = `/v2/international/data`;
|
|
167
|
+
|
|
168
|
+
return {
|
|
169
|
+
path: urlPath,
|
|
170
|
+
method: 'POST',
|
|
171
|
+
headers: headerParameters,
|
|
172
|
+
query: queryParameters,
|
|
173
|
+
body: DataParamsToJSON(requestParameters['dataParams']),
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Class InternationalController International data set top-level controller.
|
|
179
|
+
* Return international Data
|
|
180
|
+
*/
|
|
181
|
+
async v2InternationalDataPostRaw(requestParameters: V2InternationalDataPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DataResponseContainer>> {
|
|
182
|
+
const requestOptions = await this.v2InternationalDataPostRequestOpts(requestParameters);
|
|
183
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
184
|
+
|
|
185
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DataResponseContainerFromJSON(jsonValue));
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Class InternationalController International data set top-level controller.
|
|
190
|
+
* Return international Data
|
|
191
|
+
*/
|
|
192
|
+
async v2InternationalDataPost(requestParameters: V2InternationalDataPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DataResponseContainer> {
|
|
193
|
+
const response = await this.v2InternationalDataPostRaw(requestParameters, initOverrides);
|
|
194
|
+
return await response.value();
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Creates request options for v2InternationalFacetFacetIdGet without sending the request
|
|
199
|
+
*/
|
|
200
|
+
async v2InternationalFacetFacetIdGetRequestOpts(requestParameters: V2InternationalFacetFacetIdGetRequest): Promise<runtime.RequestOpts> {
|
|
201
|
+
if (requestParameters['facetId'] == null) {
|
|
202
|
+
throw new runtime.RequiredError(
|
|
203
|
+
'facetId',
|
|
204
|
+
'Required parameter "facetId" was null or undefined when calling v2InternationalFacetFacetIdGet().'
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
const queryParameters: any = {};
|
|
209
|
+
|
|
210
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
211
|
+
|
|
212
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
213
|
+
queryParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
let urlPath = `/v2/international/facet/{facet_id}`;
|
|
218
|
+
urlPath = urlPath.replace('{facet_id}', encodeURIComponent(String(requestParameters['facetId'])));
|
|
219
|
+
|
|
220
|
+
return {
|
|
221
|
+
path: urlPath,
|
|
222
|
+
method: 'GET',
|
|
223
|
+
headers: headerParameters,
|
|
224
|
+
query: queryParameters,
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
*/
|
|
230
|
+
async v2InternationalFacetFacetIdGetRaw(requestParameters: V2InternationalFacetFacetIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FacetDetailsContainer>> {
|
|
231
|
+
const requestOptions = await this.v2InternationalFacetFacetIdGetRequestOpts(requestParameters);
|
|
232
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
233
|
+
|
|
234
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FacetDetailsContainerFromJSON(jsonValue));
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
*/
|
|
239
|
+
async v2InternationalFacetFacetIdGet(requestParameters: V2InternationalFacetFacetIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FacetDetailsContainer> {
|
|
240
|
+
const response = await this.v2InternationalFacetFacetIdGetRaw(requestParameters, initOverrides);
|
|
241
|
+
return await response.value();
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Creates request options for v2InternationalFacetGet without sending the request
|
|
246
|
+
*/
|
|
247
|
+
async v2InternationalFacetGetRequestOpts(): Promise<runtime.RequestOpts> {
|
|
248
|
+
const queryParameters: any = {};
|
|
249
|
+
|
|
250
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
251
|
+
|
|
252
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
253
|
+
queryParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
let urlPath = `/v2/international/facet`;
|
|
258
|
+
|
|
259
|
+
return {
|
|
260
|
+
path: urlPath,
|
|
261
|
+
method: 'GET',
|
|
262
|
+
headers: headerParameters,
|
|
263
|
+
query: queryParameters,
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
*/
|
|
269
|
+
async v2InternationalFacetGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FacetOptionListContainer>> {
|
|
270
|
+
const requestOptions = await this.v2InternationalFacetGetRequestOpts();
|
|
271
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
272
|
+
|
|
273
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FacetOptionListContainerFromJSON(jsonValue));
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
*/
|
|
278
|
+
async v2InternationalFacetGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FacetOptionListContainer> {
|
|
279
|
+
const response = await this.v2InternationalFacetGetRaw(initOverrides);
|
|
280
|
+
return await response.value();
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Creates request options for v2InternationalGet without sending the request
|
|
285
|
+
*/
|
|
286
|
+
async v2InternationalGetRequestOpts(): Promise<runtime.RequestOpts> {
|
|
287
|
+
const queryParameters: any = {};
|
|
288
|
+
|
|
289
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
290
|
+
|
|
291
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
292
|
+
queryParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
let urlPath = `/v2/international`;
|
|
297
|
+
|
|
298
|
+
return {
|
|
299
|
+
path: urlPath,
|
|
300
|
+
method: 'GET',
|
|
301
|
+
headers: headerParameters,
|
|
302
|
+
query: queryParameters,
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
*/
|
|
308
|
+
async v2InternationalGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FinalRouteResponseContainer>> {
|
|
309
|
+
const requestOptions = await this.v2InternationalGetRequestOpts();
|
|
310
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
311
|
+
|
|
312
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FinalRouteResponseContainerFromJSON(jsonValue));
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
*/
|
|
317
|
+
async v2InternationalGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FinalRouteResponseContainer> {
|
|
318
|
+
const response = await this.v2InternationalGetRaw(initOverrides);
|
|
319
|
+
return await response.value();
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
}
|