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
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
.openapi-generator-ignore
|
|
2
|
+
apis/AEOApi.ts
|
|
3
|
+
apis/COALApi.ts
|
|
4
|
+
apis/CRUDIMPORTSApi.ts
|
|
5
|
+
apis/DBFApi.ts
|
|
6
|
+
apis/ELECApi.ts
|
|
7
|
+
apis/EMISSApi.ts
|
|
8
|
+
apis/IEOApi.ts
|
|
9
|
+
apis/INTLApi.ts
|
|
10
|
+
apis/NGApi.ts
|
|
11
|
+
apis/NUCSTATUSApi.ts
|
|
12
|
+
apis/RTOApi.ts
|
|
13
|
+
apis/RootApi.ts
|
|
14
|
+
apis/SEDSApi.ts
|
|
15
|
+
apis/SEPApi.ts
|
|
16
|
+
apis/STEOApi.ts
|
|
17
|
+
apis/TOTALApi.ts
|
|
18
|
+
apis/index.ts
|
|
19
|
+
docs/AEOApi.md
|
|
20
|
+
docs/COALApi.md
|
|
21
|
+
docs/CRUDIMPORTSApi.md
|
|
22
|
+
docs/DBFApi.md
|
|
23
|
+
docs/DataParams.md
|
|
24
|
+
docs/DataResponse.md
|
|
25
|
+
docs/DataResponseContainer.md
|
|
26
|
+
docs/ELECApi.md
|
|
27
|
+
docs/EMISSApi.md
|
|
28
|
+
docs/Facet.md
|
|
29
|
+
docs/FacetDetails.md
|
|
30
|
+
docs/FacetDetailsContainer.md
|
|
31
|
+
docs/FacetMetaData.md
|
|
32
|
+
docs/FacetOptionList.md
|
|
33
|
+
docs/FacetOptionListContainer.md
|
|
34
|
+
docs/FinalRoute.md
|
|
35
|
+
docs/FinalRouteResponse.md
|
|
36
|
+
docs/FinalRouteResponseContainer.md
|
|
37
|
+
docs/Frequency.md
|
|
38
|
+
docs/IEOApi.md
|
|
39
|
+
docs/INTLApi.md
|
|
40
|
+
docs/NGApi.md
|
|
41
|
+
docs/NUCSTATUSApi.md
|
|
42
|
+
docs/RTOApi.md
|
|
43
|
+
docs/RootApi.md
|
|
44
|
+
docs/RouteRequest.md
|
|
45
|
+
docs/RouteResponse.md
|
|
46
|
+
docs/RouteResponseContainer.md
|
|
47
|
+
docs/Routes.md
|
|
48
|
+
docs/SEDSApi.md
|
|
49
|
+
docs/SEPApi.md
|
|
50
|
+
docs/STEOApi.md
|
|
51
|
+
docs/Sort.md
|
|
52
|
+
docs/TOTALApi.md
|
|
53
|
+
index.ts
|
|
54
|
+
models/DataParams.ts
|
|
55
|
+
models/DataResponse.ts
|
|
56
|
+
models/DataResponseContainer.ts
|
|
57
|
+
models/Facet.ts
|
|
58
|
+
models/FacetDetails.ts
|
|
59
|
+
models/FacetDetailsContainer.ts
|
|
60
|
+
models/FacetMetaData.ts
|
|
61
|
+
models/FacetOptionList.ts
|
|
62
|
+
models/FacetOptionListContainer.ts
|
|
63
|
+
models/FinalRoute.ts
|
|
64
|
+
models/FinalRouteResponse.ts
|
|
65
|
+
models/FinalRouteResponseContainer.ts
|
|
66
|
+
models/Frequency.ts
|
|
67
|
+
models/RouteRequest.ts
|
|
68
|
+
models/RouteResponse.ts
|
|
69
|
+
models/RouteResponseContainer.ts
|
|
70
|
+
models/Routes.ts
|
|
71
|
+
models/Sort.ts
|
|
72
|
+
models/index.ts
|
|
73
|
+
runtime.ts
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7.22.0
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# OpenAPI Generator Ignore
|
|
2
|
+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
|
3
|
+
|
|
4
|
+
# Use this file to prevent files from being overwritten by the generator.
|
|
5
|
+
# The patterns follow closely to .gitignore or .dockerignore.
|
|
6
|
+
|
|
7
|
+
# As an example, the C# client generator defines ApiClient.cs.
|
|
8
|
+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
|
9
|
+
#ApiClient.cs
|
|
10
|
+
|
|
11
|
+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
|
12
|
+
#foo/*/qux
|
|
13
|
+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
|
14
|
+
|
|
15
|
+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
|
16
|
+
#foo/**/qux
|
|
17
|
+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
|
18
|
+
|
|
19
|
+
# You can also negate patterns with an exclamation (!).
|
|
20
|
+
# For example, you can ignore all files in a docs folder with the file extension .md:
|
|
21
|
+
#docs/*.md
|
|
22
|
+
# Then explicitly reverse the ignore rule for a single file:
|
|
23
|
+
#!docs/README.md
|
package/apis/AEOApi.ts
ADDED
|
@@ -0,0 +1,415 @@
|
|
|
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 RouteResponseContainer,
|
|
43
|
+
RouteResponseContainerFromJSON,
|
|
44
|
+
RouteResponseContainerToJSON,
|
|
45
|
+
} from '../models/RouteResponseContainer';
|
|
46
|
+
import {
|
|
47
|
+
type Sort,
|
|
48
|
+
SortFromJSON,
|
|
49
|
+
SortToJSON,
|
|
50
|
+
} from '../models/Sort';
|
|
51
|
+
|
|
52
|
+
export interface V2AeoRoute1DataGetRequest {
|
|
53
|
+
route1: string;
|
|
54
|
+
data?: Array<string>;
|
|
55
|
+
facets?: object;
|
|
56
|
+
frequency?: string;
|
|
57
|
+
start?: string;
|
|
58
|
+
end?: string;
|
|
59
|
+
sort?: Sort;
|
|
60
|
+
length?: number;
|
|
61
|
+
offset?: number;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface V2AeoRoute1DataPostRequest {
|
|
65
|
+
route1: string;
|
|
66
|
+
dataParams: DataParams;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface V2AeoRoute1FacetFacetIdGetRequest {
|
|
70
|
+
route1: string;
|
|
71
|
+
facetId: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface V2AeoRoute1FacetGetRequest {
|
|
75
|
+
route1: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface V2AeoRoute1GetRequest {
|
|
79
|
+
route1: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
*/
|
|
85
|
+
export class AEOApi extends runtime.BaseAPI {
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Creates request options for v2AeoGet without sending the request
|
|
89
|
+
*/
|
|
90
|
+
async v2AeoGetRequestOpts(): Promise<runtime.RequestOpts> {
|
|
91
|
+
const queryParameters: any = {};
|
|
92
|
+
|
|
93
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
94
|
+
|
|
95
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
96
|
+
queryParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
let urlPath = `/v2/aeo`;
|
|
101
|
+
|
|
102
|
+
return {
|
|
103
|
+
path: urlPath,
|
|
104
|
+
method: 'GET',
|
|
105
|
+
headers: headerParameters,
|
|
106
|
+
query: queryParameters,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
*/
|
|
112
|
+
async v2AeoGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RouteResponseContainer>> {
|
|
113
|
+
const requestOptions = await this.v2AeoGetRequestOpts();
|
|
114
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
115
|
+
|
|
116
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RouteResponseContainerFromJSON(jsonValue));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
*/
|
|
121
|
+
async v2AeoGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RouteResponseContainer> {
|
|
122
|
+
const response = await this.v2AeoGetRaw(initOverrides);
|
|
123
|
+
return await response.value();
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Creates request options for v2AeoRoute1DataGet without sending the request
|
|
128
|
+
*/
|
|
129
|
+
async v2AeoRoute1DataGetRequestOpts(requestParameters: V2AeoRoute1DataGetRequest): Promise<runtime.RequestOpts> {
|
|
130
|
+
if (requestParameters['route1'] == null) {
|
|
131
|
+
throw new runtime.RequiredError(
|
|
132
|
+
'route1',
|
|
133
|
+
'Required parameter "route1" was null or undefined when calling v2AeoRoute1DataGet().'
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const queryParameters: any = {};
|
|
138
|
+
|
|
139
|
+
if (requestParameters['data'] != null) {
|
|
140
|
+
queryParameters['data'] = requestParameters['data'];
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if (requestParameters['facets'] != null) {
|
|
144
|
+
queryParameters['facets'] = requestParameters['facets'];
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (requestParameters['frequency'] != null) {
|
|
148
|
+
queryParameters['frequency'] = requestParameters['frequency'];
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (requestParameters['start'] != null) {
|
|
152
|
+
queryParameters['start'] = requestParameters['start'];
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (requestParameters['end'] != null) {
|
|
156
|
+
queryParameters['end'] = requestParameters['end'];
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (requestParameters['sort'] != null) {
|
|
160
|
+
queryParameters['sort'] = requestParameters['sort'];
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
if (requestParameters['length'] != null) {
|
|
164
|
+
queryParameters['length'] = requestParameters['length'];
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if (requestParameters['offset'] != null) {
|
|
168
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
172
|
+
|
|
173
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
174
|
+
queryParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
let urlPath = `/v2/aeo/{route1}/data`;
|
|
179
|
+
urlPath = urlPath.replace('{route1}', encodeURIComponent(String(requestParameters['route1'])));
|
|
180
|
+
|
|
181
|
+
return {
|
|
182
|
+
path: urlPath,
|
|
183
|
+
method: 'GET',
|
|
184
|
+
headers: headerParameters,
|
|
185
|
+
query: queryParameters,
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* API data with query params
|
|
191
|
+
*/
|
|
192
|
+
async v2AeoRoute1DataGetRaw(requestParameters: V2AeoRoute1DataGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DataResponseContainer>> {
|
|
193
|
+
const requestOptions = await this.v2AeoRoute1DataGetRequestOpts(requestParameters);
|
|
194
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
195
|
+
|
|
196
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DataResponseContainerFromJSON(jsonValue));
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* API data with query params
|
|
201
|
+
*/
|
|
202
|
+
async v2AeoRoute1DataGet(requestParameters: V2AeoRoute1DataGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DataResponseContainer> {
|
|
203
|
+
const response = await this.v2AeoRoute1DataGetRaw(requestParameters, initOverrides);
|
|
204
|
+
return await response.value();
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Creates request options for v2AeoRoute1DataPost without sending the request
|
|
209
|
+
*/
|
|
210
|
+
async v2AeoRoute1DataPostRequestOpts(requestParameters: V2AeoRoute1DataPostRequest): Promise<runtime.RequestOpts> {
|
|
211
|
+
if (requestParameters['route1'] == null) {
|
|
212
|
+
throw new runtime.RequiredError(
|
|
213
|
+
'route1',
|
|
214
|
+
'Required parameter "route1" was null or undefined when calling v2AeoRoute1DataPost().'
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
if (requestParameters['dataParams'] == null) {
|
|
219
|
+
throw new runtime.RequiredError(
|
|
220
|
+
'dataParams',
|
|
221
|
+
'Required parameter "dataParams" was null or undefined when calling v2AeoRoute1DataPost().'
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
const queryParameters: any = {};
|
|
226
|
+
|
|
227
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
228
|
+
|
|
229
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
230
|
+
|
|
231
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
232
|
+
queryParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
let urlPath = `/v2/aeo/{route1}/data`;
|
|
237
|
+
urlPath = urlPath.replace('{route1}', encodeURIComponent(String(requestParameters['route1'])));
|
|
238
|
+
|
|
239
|
+
return {
|
|
240
|
+
path: urlPath,
|
|
241
|
+
method: 'POST',
|
|
242
|
+
headers: headerParameters,
|
|
243
|
+
query: queryParameters,
|
|
244
|
+
body: DataParamsToJSON(requestParameters['dataParams']),
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Return AEO Data
|
|
250
|
+
*/
|
|
251
|
+
async v2AeoRoute1DataPostRaw(requestParameters: V2AeoRoute1DataPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DataResponseContainer>> {
|
|
252
|
+
const requestOptions = await this.v2AeoRoute1DataPostRequestOpts(requestParameters);
|
|
253
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
254
|
+
|
|
255
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DataResponseContainerFromJSON(jsonValue));
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Return AEO Data
|
|
260
|
+
*/
|
|
261
|
+
async v2AeoRoute1DataPost(requestParameters: V2AeoRoute1DataPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DataResponseContainer> {
|
|
262
|
+
const response = await this.v2AeoRoute1DataPostRaw(requestParameters, initOverrides);
|
|
263
|
+
return await response.value();
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Creates request options for v2AeoRoute1FacetFacetIdGet without sending the request
|
|
268
|
+
*/
|
|
269
|
+
async v2AeoRoute1FacetFacetIdGetRequestOpts(requestParameters: V2AeoRoute1FacetFacetIdGetRequest): Promise<runtime.RequestOpts> {
|
|
270
|
+
if (requestParameters['route1'] == null) {
|
|
271
|
+
throw new runtime.RequiredError(
|
|
272
|
+
'route1',
|
|
273
|
+
'Required parameter "route1" was null or undefined when calling v2AeoRoute1FacetFacetIdGet().'
|
|
274
|
+
);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
if (requestParameters['facetId'] == null) {
|
|
278
|
+
throw new runtime.RequiredError(
|
|
279
|
+
'facetId',
|
|
280
|
+
'Required parameter "facetId" was null or undefined when calling v2AeoRoute1FacetFacetIdGet().'
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
const queryParameters: any = {};
|
|
285
|
+
|
|
286
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
287
|
+
|
|
288
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
289
|
+
queryParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
let urlPath = `/v2/aeo/{route1}/facet/{facet_id}`;
|
|
294
|
+
urlPath = urlPath.replace('{route1}', encodeURIComponent(String(requestParameters['route1'])));
|
|
295
|
+
urlPath = urlPath.replace('{facet_id}', encodeURIComponent(String(requestParameters['facetId'])));
|
|
296
|
+
|
|
297
|
+
return {
|
|
298
|
+
path: urlPath,
|
|
299
|
+
method: 'GET',
|
|
300
|
+
headers: headerParameters,
|
|
301
|
+
query: queryParameters,
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
*/
|
|
307
|
+
async v2AeoRoute1FacetFacetIdGetRaw(requestParameters: V2AeoRoute1FacetFacetIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FacetDetailsContainer>> {
|
|
308
|
+
const requestOptions = await this.v2AeoRoute1FacetFacetIdGetRequestOpts(requestParameters);
|
|
309
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
310
|
+
|
|
311
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FacetDetailsContainerFromJSON(jsonValue));
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
*/
|
|
316
|
+
async v2AeoRoute1FacetFacetIdGet(requestParameters: V2AeoRoute1FacetFacetIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FacetDetailsContainer> {
|
|
317
|
+
const response = await this.v2AeoRoute1FacetFacetIdGetRaw(requestParameters, initOverrides);
|
|
318
|
+
return await response.value();
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Creates request options for v2AeoRoute1FacetGet without sending the request
|
|
323
|
+
*/
|
|
324
|
+
async v2AeoRoute1FacetGetRequestOpts(requestParameters: V2AeoRoute1FacetGetRequest): Promise<runtime.RequestOpts> {
|
|
325
|
+
if (requestParameters['route1'] == null) {
|
|
326
|
+
throw new runtime.RequiredError(
|
|
327
|
+
'route1',
|
|
328
|
+
'Required parameter "route1" was null or undefined when calling v2AeoRoute1FacetGet().'
|
|
329
|
+
);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
const queryParameters: any = {};
|
|
333
|
+
|
|
334
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
335
|
+
|
|
336
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
337
|
+
queryParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
let urlPath = `/v2/aeo/{route1}/facet`;
|
|
342
|
+
urlPath = urlPath.replace('{route1}', encodeURIComponent(String(requestParameters['route1'])));
|
|
343
|
+
|
|
344
|
+
return {
|
|
345
|
+
path: urlPath,
|
|
346
|
+
method: 'GET',
|
|
347
|
+
headers: headerParameters,
|
|
348
|
+
query: queryParameters,
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
*/
|
|
354
|
+
async v2AeoRoute1FacetGetRaw(requestParameters: V2AeoRoute1FacetGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FacetOptionListContainer>> {
|
|
355
|
+
const requestOptions = await this.v2AeoRoute1FacetGetRequestOpts(requestParameters);
|
|
356
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
357
|
+
|
|
358
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FacetOptionListContainerFromJSON(jsonValue));
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
*/
|
|
363
|
+
async v2AeoRoute1FacetGet(requestParameters: V2AeoRoute1FacetGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FacetOptionListContainer> {
|
|
364
|
+
const response = await this.v2AeoRoute1FacetGetRaw(requestParameters, initOverrides);
|
|
365
|
+
return await response.value();
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Creates request options for v2AeoRoute1Get without sending the request
|
|
370
|
+
*/
|
|
371
|
+
async v2AeoRoute1GetRequestOpts(requestParameters: V2AeoRoute1GetRequest): Promise<runtime.RequestOpts> {
|
|
372
|
+
if (requestParameters['route1'] == null) {
|
|
373
|
+
throw new runtime.RequiredError(
|
|
374
|
+
'route1',
|
|
375
|
+
'Required parameter "route1" was null or undefined when calling v2AeoRoute1Get().'
|
|
376
|
+
);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
const queryParameters: any = {};
|
|
380
|
+
|
|
381
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
382
|
+
|
|
383
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
384
|
+
queryParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
let urlPath = `/v2/aeo/{route1}`;
|
|
389
|
+
urlPath = urlPath.replace('{route1}', encodeURIComponent(String(requestParameters['route1'])));
|
|
390
|
+
|
|
391
|
+
return {
|
|
392
|
+
path: urlPath,
|
|
393
|
+
method: 'GET',
|
|
394
|
+
headers: headerParameters,
|
|
395
|
+
query: queryParameters,
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
*/
|
|
401
|
+
async v2AeoRoute1GetRaw(requestParameters: V2AeoRoute1GetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FinalRouteResponseContainer>> {
|
|
402
|
+
const requestOptions = await this.v2AeoRoute1GetRequestOpts(requestParameters);
|
|
403
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
404
|
+
|
|
405
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FinalRouteResponseContainerFromJSON(jsonValue));
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
*/
|
|
410
|
+
async v2AeoRoute1Get(requestParameters: V2AeoRoute1GetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FinalRouteResponseContainer> {
|
|
411
|
+
const response = await this.v2AeoRoute1GetRaw(requestParameters, initOverrides);
|
|
412
|
+
return await response.value();
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
}
|