@kquika-inc/s-system 1.0.8 → 2.0.1
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/README.md +86 -29
- package/dist/sdk.gen.d.ts +73 -7
- package/dist/sdk.gen.js +171 -6
- package/dist/types.gen.d.ts +321 -35
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,6 +26,10 @@ record before acting on it.
|
|
|
26
26
|
| `live_feed` | Observed from the live provider feed. |
|
|
27
27
|
| `database` | Observed on an earlier read and persisted. |
|
|
28
28
|
|
|
29
|
+
Every record this API returns is an observation. `live_feed` is the current
|
|
30
|
+
reading from the provider; `database` is the same reading persisted from an
|
|
31
|
+
earlier call, so it may lag the feed. Neither is an estimate.
|
|
32
|
+
|
|
29
33
|
Fields are left null where the source carries no value. A null
|
|
30
34
|
`delay_minutes` means no time was reported.
|
|
31
35
|
|
|
@@ -35,6 +39,20 @@ Fields are left null where the source carries no value. A null
|
|
|
35
39
|
are in the response. Flights that reported no time are excluded from that
|
|
36
40
|
denominator, so other ratios can be derived from the same payload.
|
|
37
41
|
|
|
42
|
+
`on_time` counts departures within `on_time_threshold_minutes`, which is
|
|
43
|
+
returned on the response and defaults to 15. Read it rather than assuming it.
|
|
44
|
+
|
|
45
|
+
`on_time_percentage` is null when the figure cannot be measured, and
|
|
46
|
+
`ontime_unavailable_reason` says why. Three cases:
|
|
47
|
+
|
|
48
|
+
- Nothing was measured.
|
|
49
|
+
- Coverage was too thin to describe the operation.
|
|
50
|
+
- The sample was censored: every flight carrying a time was late, and none
|
|
51
|
+
departed early or on schedule. This happens when the upstream feed publishes
|
|
52
|
+
a delay only when there is one, so "on time" and "unknown" collapse into the
|
|
53
|
+
same absence. A rate over only late flights reads near zero whatever the
|
|
54
|
+
real punctuality is, so no rate is returned at all.
|
|
55
|
+
|
|
38
56
|
`gate_conflicts` is keyed on airport and gate together, so gate labels are
|
|
39
57
|
only compared within a single station.
|
|
40
58
|
|
|
@@ -49,23 +67,23 @@ only compared within a single station.
|
|
|
49
67
|
| **Route analytics**: performance grouped by route | Professional |
|
|
50
68
|
| **Refresh** the live feed on demand | Professional |
|
|
51
69
|
| **Airport overview**: movements, delay, stand utilization | Standard |
|
|
52
|
-
| **
|
|
70
|
+
| **Passenger heatmap**: density by zone, measured or modeled | Professional |
|
|
53
71
|
| **Congestion**: current level plus 1h and 3h forecast | Professional |
|
|
72
|
+
| **Disruption lists**: the flights most at risk, with causes and actions | IOCC Briefing |
|
|
73
|
+
| **Aircraft rotations**: how a delay travels through the day | Disruption Prediction or IOCC Briefing |
|
|
74
|
+
| **Passengers, crew and fuel**: counts, duty margins and tankering | The matching capability, or IOCC Briefing |
|
|
75
|
+
| **Stations and airfield congestion** | Airport Heatmap or IOCC Briefing |
|
|
54
76
|
|
|
55
77
|
Passenger intelligence is delivered through the application and through
|
|
56
78
|
scheduled data delivery. Contact your account manager about direct access for
|
|
57
79
|
your integration.
|
|
58
80
|
|
|
59
|
-
## Plans
|
|
60
|
-
|
|
61
|
-
Your rate limit follows your plan. Read it from the response headers instead
|
|
62
|
-
of hardcoding it.
|
|
81
|
+
## Plans and rate limits
|
|
63
82
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
| Enterprise | 2,000 requests/minute | 5,000/minute |
|
|
83
|
+
Each key carries an hourly request limit, set with your plan. Every response
|
|
84
|
+
reports it in `X-RateLimit-Limit`, with what remains in `X-RateLimit-Remaining`
|
|
85
|
+
and in the `quota` block, so read it there instead of hardcoding a number. A
|
|
86
|
+
refused request returns 429 with `Retry-After`, in seconds.
|
|
69
87
|
|
|
70
88
|
API access starts at Standard. Starter covers the dashboard and basic
|
|
71
89
|
passenger insights without programmatic access.
|
|
@@ -88,7 +106,7 @@ client.setConfig({
|
|
|
88
106
|
headers: { 'X-API-Key': process.env.S_SYSTEM_API_KEY! },
|
|
89
107
|
});
|
|
90
108
|
|
|
91
|
-
const { data, error } = await listFlights({ query: { origin: '
|
|
109
|
+
const { data, error } = await listFlights({ query: { origin: 'JFK', limit: 25 } });
|
|
92
110
|
|
|
93
111
|
if (error || !data?.success) {
|
|
94
112
|
console.error(data?.message ?? error);
|
|
@@ -105,16 +123,21 @@ if (error || !data?.success) {
|
|
|
105
123
|
## `data_confidence`
|
|
106
124
|
|
|
107
125
|
```ts
|
|
108
|
-
for (const flight of data.data) {
|
|
109
|
-
|
|
126
|
+
for (const flight of data.data.flights) {
|
|
127
|
+
// Both values are observations, so both are safe to schedule against.
|
|
128
|
+
// Branch on freshness only when it matters to you: `database` may lag the
|
|
129
|
+
// live feed by a sync interval.
|
|
130
|
+
if (flight.data_confidence === 'live_feed') scheduleNow(flight);
|
|
131
|
+
else queueForRefresh(flight);
|
|
110
132
|
}
|
|
111
133
|
```
|
|
112
134
|
|
|
113
135
|
`live_feed` is the current reading from the provider. `database` is the same
|
|
114
|
-
reading persisted from an earlier call, so it may lag the feed
|
|
136
|
+
reading persisted from an earlier call, so it may lag the feed by up to one
|
|
137
|
+
sync interval.
|
|
115
138
|
|
|
116
|
-
TypeScript narrows
|
|
117
|
-
|
|
139
|
+
TypeScript narrows the union, so a typo fails to compile instead of silently
|
|
140
|
+
never matching.
|
|
118
141
|
|
|
119
142
|
## Nulls
|
|
120
143
|
|
|
@@ -143,21 +166,27 @@ import {
|
|
|
143
166
|
getAirportOverview, getAirportHeatmap, getAirportCongestion,
|
|
144
167
|
} from '@kquika-inc/s-system';
|
|
145
168
|
|
|
146
|
-
const heat = await getAirportHeatmap({ path: { airport_code: '
|
|
169
|
+
const heat = await getAirportHeatmap({ path: { airport_code: 'JFK' } });
|
|
170
|
+
const h = heat.data!.data!;
|
|
147
171
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
console.log(
|
|
151
|
-
} else {
|
|
152
|
-
for (const p of heat.data.data.points!) {
|
|
153
|
-
console.log(p.zone, p.intensity, p.wait_time_minutes);
|
|
154
|
-
}
|
|
172
|
+
console.log(h.data_source); // measured, or modelled
|
|
173
|
+
for (const p of h.points!) {
|
|
174
|
+
console.log(p.zone, p.intensity, p.wait_time_minutes);
|
|
155
175
|
}
|
|
156
176
|
```
|
|
157
177
|
|
|
158
178
|
`avg_wait_minutes` covers queueing zones only: security, check-in,
|
|
159
179
|
immigration and customs. Gates and lounges are out of scope.
|
|
160
180
|
|
|
181
|
+
Points come from the sensor or survey readings an airport shares, and are
|
|
182
|
+
modeled where it shares none; `lidar_available` keeps its name for
|
|
183
|
+
compatibility and is true when readings are available. Check `data_source` on
|
|
184
|
+
the heatmap response before acting on occupancy or wait times. `measured` means a sensor, gate read or throughput count is behind the
|
|
185
|
+
figure. `modelled` means it is derived from terminal layout and time of day
|
|
186
|
+
with no sensor behind it, in which case two calls seconds apart can return
|
|
187
|
+
different values with no underlying event. Do not diff them to infer movement.
|
|
188
|
+
|
|
189
|
+
|
|
161
190
|
Heatmap and congestion require Professional. Overview is Standard.
|
|
162
191
|
|
|
163
192
|
## Flight metrics and route analytics
|
|
@@ -179,6 +208,25 @@ flight as on time.
|
|
|
179
208
|
time, which means the check could not run. Null and 0 carry different
|
|
180
209
|
meanings here.
|
|
181
210
|
|
|
211
|
+
## Operations
|
|
212
|
+
|
|
213
|
+
The disruption lists, rotations, passengers, crew, fuel and stations your
|
|
214
|
+
operations team works from.
|
|
215
|
+
|
|
216
|
+
```ts
|
|
217
|
+
import { getDisruptions, getRotation } from '@kquika-inc/s-system';
|
|
218
|
+
|
|
219
|
+
const risk = await getDisruptions({ query: { kind: 'daily' } });
|
|
220
|
+
for (const flight of risk.data!.data!.items as any[]) {
|
|
221
|
+
console.log(flight.flight_number, flight.probability, flight.action);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
const day = await getRotation({ query: { tail: 'N123XX', seed: 45 } }); // a 45 minute what-if
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Each needs the capability shown in **What you can call** and a key carrying its
|
|
228
|
+
permission. Dates are `YYYY-MM-DD` and default to today; times are UTC.
|
|
229
|
+
|
|
182
230
|
## Errors
|
|
183
231
|
|
|
184
232
|
| Code | Meaning |
|
|
@@ -187,6 +235,9 @@ meanings here.
|
|
|
187
235
|
| `forbidden` | The key lacks the permission for this endpoint. |
|
|
188
236
|
| `plan_required` | Your plan does not cover this endpoint. |
|
|
189
237
|
| `rate_limited` | Back off for `retry_after_seconds`. |
|
|
238
|
+
| `not_found` | No such flight or station among yours. |
|
|
239
|
+
| `bad_request` | A parameter is missing or malformed; `message` says which. |
|
|
240
|
+
| `server_error` | Ours to fix. Retry once, then contact support. |
|
|
190
241
|
|
|
191
242
|
`error` is a stable code and safe to branch on. `message` is for a human and
|
|
192
243
|
its wording may change.
|
|
@@ -204,16 +255,22 @@ Every schema is exported.
|
|
|
204
255
|
```ts
|
|
205
256
|
import type {
|
|
206
257
|
Flight,
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
258
|
+
MetricsResponse,
|
|
259
|
+
HeatmapResponse,
|
|
260
|
+
ErrorResponse,
|
|
210
261
|
} from '@kquika-inc/s-system';
|
|
211
262
|
|
|
212
|
-
function isActionable(
|
|
213
|
-
|
|
263
|
+
function isActionable(flight: Flight): boolean {
|
|
264
|
+
// delay_minutes must be null-checked first. `?? 0` here would treat an
|
|
265
|
+
// unreported flight as departing exactly on schedule.
|
|
266
|
+
return flight.delay_minutes !== null && flight.delay_minutes > 15;
|
|
214
267
|
}
|
|
215
268
|
```
|
|
216
269
|
|
|
270
|
+
Disruption lists are on the Operations endpoints. Passenger-rights exposure is
|
|
271
|
+
delivered through the application and through scheduled data delivery; talk to
|
|
272
|
+
your account manager about direct access.
|
|
273
|
+
|
|
217
274
|
## Support
|
|
218
275
|
|
|
219
276
|
An API key, a plan change, or a capability you need that your plan does not
|
package/dist/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Options as ClientOptions, TDataShape, Client } from '@hey-api/client-fetch';
|
|
2
|
-
import type { ListFlightsData, GetFlightData, GetFlightMetricsData, GetRouteAnalyticsData, SearchFlightsData, RefreshFlightsData, GetAirportOverviewData, GetAirportHeatmapData, GetAirportCongestionData, GetUsageData } from './types.gen';
|
|
2
|
+
import type { ListFlightsData, GetFlightData, GetFlightMetricsData, GetRouteAnalyticsData, SearchFlightsData, RefreshFlightsData, GetAirportOverviewData, GetAirportHeatmapData, GetAirportCongestionData, GetUsageData, GetDisruptionsData, GetRotationData, GetAirfieldCongestionData, GetPassengersData, GetCrewData, GetFuelPlanData, ListStationsData, GetStationData, GetCapabilitiesData } from './types.gen';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -19,8 +19,9 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
|
|
|
19
19
|
*
|
|
20
20
|
* **Requires Standard.**
|
|
21
21
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
22
|
+
* Every record returned is an observation. Records generated to fill a gap in the live
|
|
23
|
+
* feed are excluded rather than labeled, so no provenance check is required before using
|
|
24
|
+
* a flight for operational planning. `excluded_generated` reports how many were removed.
|
|
24
25
|
*/
|
|
25
26
|
export declare const listFlights: <ThrowOnError extends boolean = false>(options?: Options<ListFlightsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").FlightListResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
26
27
|
/**
|
|
@@ -77,13 +78,15 @@ export declare const refreshFlights: <ThrowOnError extends boolean = false>(opti
|
|
|
77
78
|
*/
|
|
78
79
|
export declare const getAirportOverview: <ThrowOnError extends boolean = false>(options: Options<GetAirportOverviewData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").AirportOverviewResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
79
80
|
/**
|
|
80
|
-
*
|
|
81
|
-
* Passenger density by zone
|
|
81
|
+
* Passenger heatmap
|
|
82
|
+
* Passenger density by zone.
|
|
82
83
|
*
|
|
83
84
|
* **Requires Professional.**
|
|
84
85
|
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
86
|
+
* Measured from the sensor or survey readings an airport shares, and modeled from
|
|
87
|
+
* terminal layout and time of day where it shares none. Read `data_source` before
|
|
88
|
+
* acting on occupancy or wait times. `lidar_available` keeps its name for
|
|
89
|
+
* compatibility and is true when readings are available.
|
|
87
90
|
*/
|
|
88
91
|
export declare const getAirportHeatmap: <ThrowOnError extends boolean = false>(options: Options<GetAirportHeatmapData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").HeatmapResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
89
92
|
/**
|
|
@@ -105,3 +108,66 @@ export declare const getAirportCongestion: <ThrowOnError extends boolean = false
|
|
|
105
108
|
* Every response already carries the same position in its `quota` block and in the `X-Quota-*` headers, so polling this endpoint to watch consumption wastes the allowance it reports. Call it when you want the breakdown by endpoint, which headers cannot carry.
|
|
106
109
|
*/
|
|
107
110
|
export declare const getUsage: <ThrowOnError extends boolean = false>(options?: Options<GetUsageData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").UsageResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
111
|
+
/**
|
|
112
|
+
* Flights most at risk
|
|
113
|
+
* The daily or Next hours list: each flight’s risk, likely delay, causes, suggested action and rebooking options.
|
|
114
|
+
*
|
|
115
|
+
* **Requires IOCC Briefing.** Key permission `iocc:read`.
|
|
116
|
+
*/
|
|
117
|
+
export declare const getDisruptions: <ThrowOnError extends boolean = false>(options?: Options<GetDisruptionsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").OpsResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
118
|
+
/**
|
|
119
|
+
* An aircraft’s day
|
|
120
|
+
* How a delay travels through the aircraft’s rotation, leg by leg. Give a flight or a tail number; `seed` adds a starting delay as a what-if.
|
|
121
|
+
*
|
|
122
|
+
* **Requires Disruption Prediction or IOCC Briefing.** Key permission `disruptions:read`.
|
|
123
|
+
*/
|
|
124
|
+
export declare const getRotation: <ThrowOnError extends boolean = false>(options?: Options<GetRotationData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").OpsResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
125
|
+
/**
|
|
126
|
+
* Airfield congestion
|
|
127
|
+
* Airfield congestion per hour from measured taxi times, in UTC.
|
|
128
|
+
*
|
|
129
|
+
* **Requires Airport Heatmap or IOCC Briefing.** Key permission `heatmaps:read`.
|
|
130
|
+
*/
|
|
131
|
+
export declare const getAirfieldCongestion: <ThrowOnError extends boolean = false>(options: Options<GetAirfieldCongestionData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").OpsResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
132
|
+
/**
|
|
133
|
+
* Passengers per flight
|
|
134
|
+
* Booked, connecting and infant passengers per flight. Counts only; never a name.
|
|
135
|
+
*
|
|
136
|
+
* **Requires Passenger Analytics or IOCC Briefing.** Key permission `passengers:read`.
|
|
137
|
+
*/
|
|
138
|
+
export declare const getPassengers: <ThrowOnError extends boolean = false>(options?: Options<GetPassengersData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").OpsResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
139
|
+
/**
|
|
140
|
+
* Crew duty margins
|
|
141
|
+
* Duty margin per leg, and reserve crews needed per base. No individual is named.
|
|
142
|
+
*
|
|
143
|
+
* **Requires Crew Reserve or IOCC Briefing.** Key permission `crew:read`.
|
|
144
|
+
*/
|
|
145
|
+
export declare const getCrew: <ThrowOnError extends boolean = false>(options?: Options<GetCrewData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").OpsResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
146
|
+
/**
|
|
147
|
+
* Fuel tankering plan
|
|
148
|
+
* Whether carrying extra fuel pays on each leg, with the saving and its CO2 cost.
|
|
149
|
+
*
|
|
150
|
+
* **Requires Fuel Tankering or IOCC Briefing.** Key permission `fuel:read`.
|
|
151
|
+
*/
|
|
152
|
+
export declare const getFuelPlan: <ThrowOnError extends boolean = false>(options?: Options<GetFuelPlanData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").OpsResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
153
|
+
/**
|
|
154
|
+
* Stations
|
|
155
|
+
* The airline’s stations, busiest first, kept current from its own flights.
|
|
156
|
+
*
|
|
157
|
+
* **Requires Airport Heatmap or IOCC Briefing.** Key permission `airports:read`.
|
|
158
|
+
*/
|
|
159
|
+
export declare const listStations: <ThrowOnError extends boolean = false>(options?: Options<ListStationsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").OpsResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
160
|
+
/**
|
|
161
|
+
* One station
|
|
162
|
+
* A station’s departures at risk in the coming hours, and its congestion.
|
|
163
|
+
*
|
|
164
|
+
* **Requires Airport Heatmap or IOCC Briefing.** Key permission `airports:read`.
|
|
165
|
+
*/
|
|
166
|
+
export declare const getStation: <ThrowOnError extends boolean = false>(options: Options<GetStationData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").OpsResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
167
|
+
/**
|
|
168
|
+
* Capabilities
|
|
169
|
+
* Every data type this API serves, and whether your airline has it.
|
|
170
|
+
*
|
|
171
|
+
* **Available on every plan.**
|
|
172
|
+
*/
|
|
173
|
+
export declare const getCapabilities: <ThrowOnError extends boolean = false>(options?: Options<GetCapabilitiesData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").OpsResponse, import("./types.gen").ErrorResponse, ThrowOnError>;
|
package/dist/sdk.gen.js
CHANGED
|
@@ -6,8 +6,9 @@ import { client as _heyApiClient } from './client.gen';
|
|
|
6
6
|
*
|
|
7
7
|
* **Requires Standard.**
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* Every record returned is an observation. Records generated to fill a gap in the live
|
|
10
|
+
* feed are excluded rather than labeled, so no provenance check is required before using
|
|
11
|
+
* a flight for operational planning. `excluded_generated` reports how many were removed.
|
|
11
12
|
*/
|
|
12
13
|
export const listFlights = (options) => {
|
|
13
14
|
return (options?.client ?? _heyApiClient).get({
|
|
@@ -141,13 +142,15 @@ export const getAirportOverview = (options) => {
|
|
|
141
142
|
});
|
|
142
143
|
};
|
|
143
144
|
/**
|
|
144
|
-
*
|
|
145
|
-
* Passenger density by zone
|
|
145
|
+
* Passenger heatmap
|
|
146
|
+
* Passenger density by zone.
|
|
146
147
|
*
|
|
147
148
|
* **Requires Professional.**
|
|
148
149
|
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
150
|
+
* Measured from the sensor or survey readings an airport shares, and modeled from
|
|
151
|
+
* terminal layout and time of day where it shares none. Read `data_source` before
|
|
152
|
+
* acting on occupancy or wait times. `lidar_available` keeps its name for
|
|
153
|
+
* compatibility and is true when readings are available.
|
|
151
154
|
*/
|
|
152
155
|
export const getAirportHeatmap = (options) => {
|
|
153
156
|
return (options.client ?? _heyApiClient).get({
|
|
@@ -202,3 +205,165 @@ export const getUsage = (options) => {
|
|
|
202
205
|
...options
|
|
203
206
|
});
|
|
204
207
|
};
|
|
208
|
+
/**
|
|
209
|
+
* Flights most at risk
|
|
210
|
+
* The daily or Next hours list: each flight’s risk, likely delay, causes, suggested action and rebooking options.
|
|
211
|
+
*
|
|
212
|
+
* **Requires IOCC Briefing.** Key permission `iocc:read`.
|
|
213
|
+
*/
|
|
214
|
+
export const getDisruptions = (options) => {
|
|
215
|
+
return (options?.client ?? _heyApiClient).get({
|
|
216
|
+
security: [
|
|
217
|
+
{
|
|
218
|
+
name: 'X-API-Key',
|
|
219
|
+
type: 'apiKey'
|
|
220
|
+
}
|
|
221
|
+
],
|
|
222
|
+
url: '/api/v1/ops/disruptions',
|
|
223
|
+
...options
|
|
224
|
+
});
|
|
225
|
+
};
|
|
226
|
+
/**
|
|
227
|
+
* An aircraft’s day
|
|
228
|
+
* How a delay travels through the aircraft’s rotation, leg by leg. Give a flight or a tail number; `seed` adds a starting delay as a what-if.
|
|
229
|
+
*
|
|
230
|
+
* **Requires Disruption Prediction or IOCC Briefing.** Key permission `disruptions:read`.
|
|
231
|
+
*/
|
|
232
|
+
export const getRotation = (options) => {
|
|
233
|
+
return (options?.client ?? _heyApiClient).get({
|
|
234
|
+
security: [
|
|
235
|
+
{
|
|
236
|
+
name: 'X-API-Key',
|
|
237
|
+
type: 'apiKey'
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
url: '/api/v1/ops/rotation',
|
|
241
|
+
...options
|
|
242
|
+
});
|
|
243
|
+
};
|
|
244
|
+
/**
|
|
245
|
+
* Airfield congestion
|
|
246
|
+
* Airfield congestion per hour from measured taxi times, in UTC.
|
|
247
|
+
*
|
|
248
|
+
* **Requires Airport Heatmap or IOCC Briefing.** Key permission `heatmaps:read`.
|
|
249
|
+
*/
|
|
250
|
+
export const getAirfieldCongestion = (options) => {
|
|
251
|
+
return (options.client ?? _heyApiClient).get({
|
|
252
|
+
security: [
|
|
253
|
+
{
|
|
254
|
+
name: 'X-API-Key',
|
|
255
|
+
type: 'apiKey'
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
url: '/api/v1/ops/congestion',
|
|
259
|
+
...options
|
|
260
|
+
});
|
|
261
|
+
};
|
|
262
|
+
/**
|
|
263
|
+
* Passengers per flight
|
|
264
|
+
* Booked, connecting and infant passengers per flight. Counts only; never a name.
|
|
265
|
+
*
|
|
266
|
+
* **Requires Passenger Analytics or IOCC Briefing.** Key permission `passengers:read`.
|
|
267
|
+
*/
|
|
268
|
+
export const getPassengers = (options) => {
|
|
269
|
+
return (options?.client ?? _heyApiClient).get({
|
|
270
|
+
security: [
|
|
271
|
+
{
|
|
272
|
+
name: 'X-API-Key',
|
|
273
|
+
type: 'apiKey'
|
|
274
|
+
}
|
|
275
|
+
],
|
|
276
|
+
url: '/api/v1/ops/passengers',
|
|
277
|
+
...options
|
|
278
|
+
});
|
|
279
|
+
};
|
|
280
|
+
/**
|
|
281
|
+
* Crew duty margins
|
|
282
|
+
* Duty margin per leg, and reserve crews needed per base. No individual is named.
|
|
283
|
+
*
|
|
284
|
+
* **Requires Crew Reserve or IOCC Briefing.** Key permission `crew:read`.
|
|
285
|
+
*/
|
|
286
|
+
export const getCrew = (options) => {
|
|
287
|
+
return (options?.client ?? _heyApiClient).get({
|
|
288
|
+
security: [
|
|
289
|
+
{
|
|
290
|
+
name: 'X-API-Key',
|
|
291
|
+
type: 'apiKey'
|
|
292
|
+
}
|
|
293
|
+
],
|
|
294
|
+
url: '/api/v1/ops/crew',
|
|
295
|
+
...options
|
|
296
|
+
});
|
|
297
|
+
};
|
|
298
|
+
/**
|
|
299
|
+
* Fuel tankering plan
|
|
300
|
+
* Whether carrying extra fuel pays on each leg, with the saving and its CO2 cost.
|
|
301
|
+
*
|
|
302
|
+
* **Requires Fuel Tankering or IOCC Briefing.** Key permission `fuel:read`.
|
|
303
|
+
*/
|
|
304
|
+
export const getFuelPlan = (options) => {
|
|
305
|
+
return (options?.client ?? _heyApiClient).get({
|
|
306
|
+
security: [
|
|
307
|
+
{
|
|
308
|
+
name: 'X-API-Key',
|
|
309
|
+
type: 'apiKey'
|
|
310
|
+
}
|
|
311
|
+
],
|
|
312
|
+
url: '/api/v1/ops/fuel',
|
|
313
|
+
...options
|
|
314
|
+
});
|
|
315
|
+
};
|
|
316
|
+
/**
|
|
317
|
+
* Stations
|
|
318
|
+
* The airline’s stations, busiest first, kept current from its own flights.
|
|
319
|
+
*
|
|
320
|
+
* **Requires Airport Heatmap or IOCC Briefing.** Key permission `airports:read`.
|
|
321
|
+
*/
|
|
322
|
+
export const listStations = (options) => {
|
|
323
|
+
return (options?.client ?? _heyApiClient).get({
|
|
324
|
+
security: [
|
|
325
|
+
{
|
|
326
|
+
name: 'X-API-Key',
|
|
327
|
+
type: 'apiKey'
|
|
328
|
+
}
|
|
329
|
+
],
|
|
330
|
+
url: '/api/v1/ops/airports',
|
|
331
|
+
...options
|
|
332
|
+
});
|
|
333
|
+
};
|
|
334
|
+
/**
|
|
335
|
+
* One station
|
|
336
|
+
* A station’s departures at risk in the coming hours, and its congestion.
|
|
337
|
+
*
|
|
338
|
+
* **Requires Airport Heatmap or IOCC Briefing.** Key permission `airports:read`.
|
|
339
|
+
*/
|
|
340
|
+
export const getStation = (options) => {
|
|
341
|
+
return (options.client ?? _heyApiClient).get({
|
|
342
|
+
security: [
|
|
343
|
+
{
|
|
344
|
+
name: 'X-API-Key',
|
|
345
|
+
type: 'apiKey'
|
|
346
|
+
}
|
|
347
|
+
],
|
|
348
|
+
url: '/api/v1/ops/airports/{code}',
|
|
349
|
+
...options
|
|
350
|
+
});
|
|
351
|
+
};
|
|
352
|
+
/**
|
|
353
|
+
* Capabilities
|
|
354
|
+
* Every data type this API serves, and whether your airline has it.
|
|
355
|
+
*
|
|
356
|
+
* **Available on every plan.**
|
|
357
|
+
*/
|
|
358
|
+
export const getCapabilities = (options) => {
|
|
359
|
+
return (options?.client ?? _heyApiClient).get({
|
|
360
|
+
security: [
|
|
361
|
+
{
|
|
362
|
+
name: 'X-API-Key',
|
|
363
|
+
type: 'apiKey'
|
|
364
|
+
}
|
|
365
|
+
],
|
|
366
|
+
url: '/api/v1/ops/capabilities',
|
|
367
|
+
...options
|
|
368
|
+
});
|
|
369
|
+
};
|
package/dist/types.gen.d.ts
CHANGED
|
@@ -59,11 +59,11 @@ export type Flight = {
|
|
|
59
59
|
*/
|
|
60
60
|
status?: 'scheduled' | 'active' | 'landed' | 'delayed' | 'cancelled' | 'diverted' | 'unknown';
|
|
61
61
|
/**
|
|
62
|
-
* Provenance of this record. `live_feed`
|
|
63
|
-
*
|
|
64
|
-
*
|
|
62
|
+
* Provenance of this record. Both values are observations: `live_feed` is the current reading from the provider, `database` is the same reading persisted from an earlier call and may lag the feed by up to one sync interval.
|
|
63
|
+
*
|
|
64
|
+
* There is no value for generated data. Records produced to fill a gap in the feed are excluded from this API entirely rather than labelled, so every record you receive is an observation and no client-side check is required before acting on one.
|
|
65
65
|
*/
|
|
66
|
-
data_confidence: 'live_feed' | 'database'
|
|
66
|
+
data_confidence: 'live_feed' | 'database';
|
|
67
67
|
};
|
|
68
68
|
export type FlightListResponse = Envelope & {
|
|
69
69
|
data?: {
|
|
@@ -72,11 +72,13 @@ export type FlightListResponse = Envelope & {
|
|
|
72
72
|
/**
|
|
73
73
|
* Provenance of the returned records. `generated` appears only when it was requested explicitly, since the default excludes it.
|
|
74
74
|
*/
|
|
75
|
-
source?: 'live_feed' | 'database' | '
|
|
75
|
+
source?: 'live_feed' | 'database' | 'mixed';
|
|
76
76
|
/**
|
|
77
|
-
* Records matching
|
|
77
|
+
* Records matching your filters that were produced to fill a gap in the live feed, and therefore excluded. Always excluded; this is the count, not a choice.
|
|
78
|
+
*
|
|
79
|
+
* A non-zero value means the feed was thin enough for the platform to generate rows, so a short result can be told apart from a short schedule. It is a signal about the feed, not about your query.
|
|
78
80
|
*/
|
|
79
|
-
|
|
81
|
+
excluded_generated?: number | null;
|
|
80
82
|
};
|
|
81
83
|
};
|
|
82
84
|
export type FlightResponse = Envelope & {
|
|
@@ -93,13 +95,29 @@ export type MetricsResponse = Envelope & {
|
|
|
93
95
|
*/
|
|
94
96
|
measured_flights?: number;
|
|
95
97
|
/**
|
|
96
|
-
* Departures within
|
|
98
|
+
* Departures within `on_time_threshold_minutes` of schedule, which defaults to 15. Read the threshold from the response rather than assuming it.
|
|
97
99
|
*/
|
|
98
100
|
on_time?: number;
|
|
99
101
|
/**
|
|
100
|
-
* `on_time` divided by `measured_flights`.
|
|
102
|
+
* `on_time` divided by `measured_flights`.
|
|
103
|
+
*
|
|
104
|
+
* Null in three cases, which `ontime_unavailable_reason` distinguishes: nothing was measured; coverage was too thin for the figure to describe the operation; or the sample was censored, meaning every flight carrying a time was late and none departed early or on schedule. The third is the one to watch, because a rate computed over only late flights reads near zero whatever the real punctuality is.
|
|
105
|
+
*
|
|
106
|
+
* Null is not zero. Treating it as zero reports perfect lateness on a day nothing was measured.
|
|
101
107
|
*/
|
|
102
108
|
on_time_percentage?: number | null;
|
|
109
|
+
/**
|
|
110
|
+
* False when the sample cannot support an on-time rate. `on_time_percentage` is null whenever this is false.
|
|
111
|
+
*/
|
|
112
|
+
ontime_measurable?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Plain sentence naming why the rate could not be computed. Null when it could.
|
|
115
|
+
*/
|
|
116
|
+
ontime_unavailable_reason?: string | null;
|
|
117
|
+
/**
|
|
118
|
+
* Minutes of delay still counted as on time. Configurable per deployment, so read it rather than assuming 15.
|
|
119
|
+
*/
|
|
120
|
+
on_time_threshold_minutes?: number;
|
|
103
121
|
/**
|
|
104
122
|
* Mean delay across delayed departures only. The denominator excludes on time
|
|
105
123
|
* departures.
|
|
@@ -153,10 +171,23 @@ export type HeatmapResponse = Envelope & {
|
|
|
153
171
|
data?: {
|
|
154
172
|
airport_code?: string;
|
|
155
173
|
/**
|
|
156
|
-
*
|
|
157
|
-
*
|
|
174
|
+
* True when the airport shares sensor or survey readings, which the points then
|
|
175
|
+
* come from. The name is kept for compatibility. Read `data_source` for the same
|
|
176
|
+
* answer as `measured` or `modelled`.
|
|
158
177
|
*/
|
|
159
178
|
lidar_available?: boolean;
|
|
179
|
+
/**
|
|
180
|
+
* How the figures in `points` were produced. `measured` means a sensor, gate read or throughput count. `modelled` means derived from terminal layout and time of day, with no sensor behind it. Two calls seconds apart can return different modelled values with no underlying event, so do not diff them to infer movement.
|
|
181
|
+
*/
|
|
182
|
+
data_source?: 'measured' | 'modelled';
|
|
183
|
+
/**
|
|
184
|
+
* False when the figures are modelled. Present as a boolean as well as in `data_source` so a client can branch without string comparison.
|
|
185
|
+
*/
|
|
186
|
+
is_measured?: boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Plain sentence describing how these figures were produced, safe to display.
|
|
189
|
+
*/
|
|
190
|
+
provenance_note?: string | null;
|
|
160
191
|
points?: Array<{
|
|
161
192
|
zone?: string;
|
|
162
193
|
zone_type?: string;
|
|
@@ -215,21 +246,28 @@ export type UsageResponse = Envelope & {
|
|
|
215
246
|
endpoint?: string;
|
|
216
247
|
calls?: number;
|
|
217
248
|
}>;
|
|
249
|
+
/**
|
|
250
|
+
* The hourly limit spread evenly across a minute. Keys are limited per hour; see `rate_limit_per_hour`.
|
|
251
|
+
*/
|
|
218
252
|
rate_limit_per_minute?: number;
|
|
253
|
+
/**
|
|
254
|
+
* The requests this key may make per hour. Null when the call was not made with a key.
|
|
255
|
+
*/
|
|
256
|
+
rate_limit_per_hour?: number | null;
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
export type OpsResponse = Envelope & {
|
|
260
|
+
/**
|
|
261
|
+
* The figures the endpoint describes. Dates are YYYY-MM-DD and times are UTC.
|
|
262
|
+
*/
|
|
263
|
+
data?: {
|
|
264
|
+
[key: string]: unknown;
|
|
219
265
|
};
|
|
220
266
|
};
|
|
221
267
|
/**
|
|
222
268
|
* IATA code, three letters. Case insensitive.
|
|
223
269
|
*/
|
|
224
270
|
export type AirportCode = string;
|
|
225
|
-
/**
|
|
226
|
-
* Restrict to records of this provenance. Repeat the parameter for more than one value.
|
|
227
|
-
*
|
|
228
|
-
* **Defaults to `live_feed` and `database`.** Generated records must be asked for by name. A generated row filled a gap in the feed and carries a real carrier code on a route that carrier may not fly, so it does not reach a planner who did not ask for it.
|
|
229
|
-
*
|
|
230
|
-
* `count` reflects what was returned. `excluded_by_confidence` reports what the filter removed, so a small result can be told apart from a thin feed.
|
|
231
|
-
*/
|
|
232
|
-
export type Confidence = Array<'live_feed' | 'database' | 'generated'>;
|
|
233
271
|
export type ListFlightsData = {
|
|
234
272
|
body?: never;
|
|
235
273
|
path?: never;
|
|
@@ -244,14 +282,6 @@ export type ListFlightsData = {
|
|
|
244
282
|
*/
|
|
245
283
|
date?: string;
|
|
246
284
|
limit?: number;
|
|
247
|
-
/**
|
|
248
|
-
* Restrict to records of this provenance. Repeat the parameter for more than one value.
|
|
249
|
-
*
|
|
250
|
-
* **Defaults to `live_feed` and `database`.** Generated records must be asked for by name. A generated row filled a gap in the feed and carries a real carrier code on a route that carrier may not fly, so it does not reach a planner who did not ask for it.
|
|
251
|
-
*
|
|
252
|
-
* `count` reflects what was returned. `excluded_by_confidence` reports what the filter removed, so a small result can be told apart from a thin feed.
|
|
253
|
-
*/
|
|
254
|
-
confidence?: Array<'live_feed' | 'database' | 'generated'>;
|
|
255
285
|
};
|
|
256
286
|
url: '/api/v1/flights';
|
|
257
287
|
};
|
|
@@ -365,14 +395,6 @@ export type SearchFlightsData = {
|
|
|
365
395
|
*/
|
|
366
396
|
q: string;
|
|
367
397
|
limit?: number;
|
|
368
|
-
/**
|
|
369
|
-
* Restrict to records of this provenance. Repeat the parameter for more than one value.
|
|
370
|
-
*
|
|
371
|
-
* **Defaults to `live_feed` and `database`.** Generated records must be asked for by name. A generated row filled a gap in the feed and carries a real carrier code on a route that carrier may not fly, so it does not reach a planner who did not ask for it.
|
|
372
|
-
*
|
|
373
|
-
* `count` reflects what was returned. `excluded_by_confidence` reports what the filter removed, so a small result can be told apart from a thin feed.
|
|
374
|
-
*/
|
|
375
|
-
confidence?: Array<'live_feed' | 'database' | 'generated'>;
|
|
376
398
|
};
|
|
377
399
|
url: '/api/v1/flights/search';
|
|
378
400
|
};
|
|
@@ -529,6 +551,270 @@ export type GetUsageResponses = {
|
|
|
529
551
|
200: UsageResponse;
|
|
530
552
|
};
|
|
531
553
|
export type GetUsageResponse = GetUsageResponses[keyof GetUsageResponses];
|
|
554
|
+
export type GetDisruptionsData = {
|
|
555
|
+
body?: never;
|
|
556
|
+
path?: never;
|
|
557
|
+
query?: {
|
|
558
|
+
/**
|
|
559
|
+
* daily: the day-ahead list. sameday: Next hours.
|
|
560
|
+
*/
|
|
561
|
+
kind?: 'daily' | 'sameday';
|
|
562
|
+
/**
|
|
563
|
+
* Operating day. Defaults to today.
|
|
564
|
+
*/
|
|
565
|
+
date?: string;
|
|
566
|
+
/**
|
|
567
|
+
* One departure station, IATA.
|
|
568
|
+
*/
|
|
569
|
+
station?: string;
|
|
570
|
+
};
|
|
571
|
+
url: '/api/v1/ops/disruptions';
|
|
572
|
+
};
|
|
573
|
+
export type GetDisruptionsErrors = {
|
|
574
|
+
/**
|
|
575
|
+
* Missing or invalid API key.
|
|
576
|
+
*/
|
|
577
|
+
401: ErrorResponse;
|
|
578
|
+
};
|
|
579
|
+
export type GetDisruptionsError = GetDisruptionsErrors[keyof GetDisruptionsErrors];
|
|
580
|
+
export type GetDisruptionsResponses = {
|
|
581
|
+
/**
|
|
582
|
+
* Flights most at risk.
|
|
583
|
+
*/
|
|
584
|
+
200: OpsResponse;
|
|
585
|
+
};
|
|
586
|
+
export type GetDisruptionsResponse = GetDisruptionsResponses[keyof GetDisruptionsResponses];
|
|
587
|
+
export type GetRotationData = {
|
|
588
|
+
body?: never;
|
|
589
|
+
path?: never;
|
|
590
|
+
query?: {
|
|
591
|
+
/**
|
|
592
|
+
* Flight number.
|
|
593
|
+
*/
|
|
594
|
+
flight?: string;
|
|
595
|
+
/**
|
|
596
|
+
* Tail number, instead of a flight.
|
|
597
|
+
*/
|
|
598
|
+
tail?: string;
|
|
599
|
+
/**
|
|
600
|
+
* Operating day. Defaults to today.
|
|
601
|
+
*/
|
|
602
|
+
date?: string;
|
|
603
|
+
/**
|
|
604
|
+
* Departure station, when the flight number repeats.
|
|
605
|
+
*/
|
|
606
|
+
origin?: string;
|
|
607
|
+
/**
|
|
608
|
+
* Starting delay in minutes.
|
|
609
|
+
*/
|
|
610
|
+
seed?: number;
|
|
611
|
+
};
|
|
612
|
+
url: '/api/v1/ops/rotation';
|
|
613
|
+
};
|
|
614
|
+
export type GetRotationErrors = {
|
|
615
|
+
/**
|
|
616
|
+
* Missing or invalid API key.
|
|
617
|
+
*/
|
|
618
|
+
401: ErrorResponse;
|
|
619
|
+
};
|
|
620
|
+
export type GetRotationError = GetRotationErrors[keyof GetRotationErrors];
|
|
621
|
+
export type GetRotationResponses = {
|
|
622
|
+
/**
|
|
623
|
+
* An aircraft’s day.
|
|
624
|
+
*/
|
|
625
|
+
200: OpsResponse;
|
|
626
|
+
};
|
|
627
|
+
export type GetRotationResponse = GetRotationResponses[keyof GetRotationResponses];
|
|
628
|
+
export type GetAirfieldCongestionData = {
|
|
629
|
+
body?: never;
|
|
630
|
+
path?: never;
|
|
631
|
+
query: {
|
|
632
|
+
/**
|
|
633
|
+
* Station, IATA.
|
|
634
|
+
*/
|
|
635
|
+
airport: string;
|
|
636
|
+
/**
|
|
637
|
+
* Hours ahead, up to 48.
|
|
638
|
+
*/
|
|
639
|
+
hours?: number;
|
|
640
|
+
/**
|
|
641
|
+
* Start hour, YYYY-MM-DDTHH:MM, UTC. Defaults to now.
|
|
642
|
+
*/
|
|
643
|
+
start?: string;
|
|
644
|
+
};
|
|
645
|
+
url: '/api/v1/ops/congestion';
|
|
646
|
+
};
|
|
647
|
+
export type GetAirfieldCongestionErrors = {
|
|
648
|
+
/**
|
|
649
|
+
* Missing or invalid API key.
|
|
650
|
+
*/
|
|
651
|
+
401: ErrorResponse;
|
|
652
|
+
};
|
|
653
|
+
export type GetAirfieldCongestionError = GetAirfieldCongestionErrors[keyof GetAirfieldCongestionErrors];
|
|
654
|
+
export type GetAirfieldCongestionResponses = {
|
|
655
|
+
/**
|
|
656
|
+
* Airfield congestion.
|
|
657
|
+
*/
|
|
658
|
+
200: OpsResponse;
|
|
659
|
+
};
|
|
660
|
+
export type GetAirfieldCongestionResponse = GetAirfieldCongestionResponses[keyof GetAirfieldCongestionResponses];
|
|
661
|
+
export type GetPassengersData = {
|
|
662
|
+
body?: never;
|
|
663
|
+
path?: never;
|
|
664
|
+
query?: {
|
|
665
|
+
/**
|
|
666
|
+
* Operating day. Defaults to today.
|
|
667
|
+
*/
|
|
668
|
+
date?: string;
|
|
669
|
+
/**
|
|
670
|
+
* One flight.
|
|
671
|
+
*/
|
|
672
|
+
flight?: string;
|
|
673
|
+
};
|
|
674
|
+
url: '/api/v1/ops/passengers';
|
|
675
|
+
};
|
|
676
|
+
export type GetPassengersErrors = {
|
|
677
|
+
/**
|
|
678
|
+
* Missing or invalid API key.
|
|
679
|
+
*/
|
|
680
|
+
401: ErrorResponse;
|
|
681
|
+
};
|
|
682
|
+
export type GetPassengersError = GetPassengersErrors[keyof GetPassengersErrors];
|
|
683
|
+
export type GetPassengersResponses = {
|
|
684
|
+
/**
|
|
685
|
+
* Passengers per flight.
|
|
686
|
+
*/
|
|
687
|
+
200: OpsResponse;
|
|
688
|
+
};
|
|
689
|
+
export type GetPassengersResponse = GetPassengersResponses[keyof GetPassengersResponses];
|
|
690
|
+
export type GetCrewData = {
|
|
691
|
+
body?: never;
|
|
692
|
+
path?: never;
|
|
693
|
+
query?: {
|
|
694
|
+
/**
|
|
695
|
+
* Operating day. Defaults to today.
|
|
696
|
+
*/
|
|
697
|
+
date?: string;
|
|
698
|
+
/**
|
|
699
|
+
* One base.
|
|
700
|
+
*/
|
|
701
|
+
station?: string;
|
|
702
|
+
};
|
|
703
|
+
url: '/api/v1/ops/crew';
|
|
704
|
+
};
|
|
705
|
+
export type GetCrewErrors = {
|
|
706
|
+
/**
|
|
707
|
+
* Missing or invalid API key.
|
|
708
|
+
*/
|
|
709
|
+
401: ErrorResponse;
|
|
710
|
+
};
|
|
711
|
+
export type GetCrewError = GetCrewErrors[keyof GetCrewErrors];
|
|
712
|
+
export type GetCrewResponses = {
|
|
713
|
+
/**
|
|
714
|
+
* Crew duty margins.
|
|
715
|
+
*/
|
|
716
|
+
200: OpsResponse;
|
|
717
|
+
};
|
|
718
|
+
export type GetCrewResponse = GetCrewResponses[keyof GetCrewResponses];
|
|
719
|
+
export type GetFuelPlanData = {
|
|
720
|
+
body?: never;
|
|
721
|
+
path?: never;
|
|
722
|
+
query?: {
|
|
723
|
+
/**
|
|
724
|
+
* Operating day. Defaults to today.
|
|
725
|
+
*/
|
|
726
|
+
date?: string;
|
|
727
|
+
/**
|
|
728
|
+
* One flight.
|
|
729
|
+
*/
|
|
730
|
+
flight?: string;
|
|
731
|
+
};
|
|
732
|
+
url: '/api/v1/ops/fuel';
|
|
733
|
+
};
|
|
734
|
+
export type GetFuelPlanErrors = {
|
|
735
|
+
/**
|
|
736
|
+
* Missing or invalid API key.
|
|
737
|
+
*/
|
|
738
|
+
401: ErrorResponse;
|
|
739
|
+
};
|
|
740
|
+
export type GetFuelPlanError = GetFuelPlanErrors[keyof GetFuelPlanErrors];
|
|
741
|
+
export type GetFuelPlanResponses = {
|
|
742
|
+
/**
|
|
743
|
+
* Fuel tankering plan.
|
|
744
|
+
*/
|
|
745
|
+
200: OpsResponse;
|
|
746
|
+
};
|
|
747
|
+
export type GetFuelPlanResponse = GetFuelPlanResponses[keyof GetFuelPlanResponses];
|
|
748
|
+
export type ListStationsData = {
|
|
749
|
+
body?: never;
|
|
750
|
+
path?: never;
|
|
751
|
+
query?: never;
|
|
752
|
+
url: '/api/v1/ops/airports';
|
|
753
|
+
};
|
|
754
|
+
export type ListStationsErrors = {
|
|
755
|
+
/**
|
|
756
|
+
* Missing or invalid API key.
|
|
757
|
+
*/
|
|
758
|
+
401: ErrorResponse;
|
|
759
|
+
};
|
|
760
|
+
export type ListStationsError = ListStationsErrors[keyof ListStationsErrors];
|
|
761
|
+
export type ListStationsResponses = {
|
|
762
|
+
/**
|
|
763
|
+
* Stations.
|
|
764
|
+
*/
|
|
765
|
+
200: OpsResponse;
|
|
766
|
+
};
|
|
767
|
+
export type ListStationsResponse = ListStationsResponses[keyof ListStationsResponses];
|
|
768
|
+
export type GetStationData = {
|
|
769
|
+
body?: never;
|
|
770
|
+
path: {
|
|
771
|
+
/**
|
|
772
|
+
* Station, IATA.
|
|
773
|
+
*/
|
|
774
|
+
code: string;
|
|
775
|
+
};
|
|
776
|
+
query?: {
|
|
777
|
+
/**
|
|
778
|
+
* Hours ahead.
|
|
779
|
+
*/
|
|
780
|
+
hours?: number;
|
|
781
|
+
};
|
|
782
|
+
url: '/api/v1/ops/airports/{code}';
|
|
783
|
+
};
|
|
784
|
+
export type GetStationErrors = {
|
|
785
|
+
/**
|
|
786
|
+
* Missing or invalid API key.
|
|
787
|
+
*/
|
|
788
|
+
401: ErrorResponse;
|
|
789
|
+
};
|
|
790
|
+
export type GetStationError = GetStationErrors[keyof GetStationErrors];
|
|
791
|
+
export type GetStationResponses = {
|
|
792
|
+
/**
|
|
793
|
+
* One station.
|
|
794
|
+
*/
|
|
795
|
+
200: OpsResponse;
|
|
796
|
+
};
|
|
797
|
+
export type GetStationResponse = GetStationResponses[keyof GetStationResponses];
|
|
798
|
+
export type GetCapabilitiesData = {
|
|
799
|
+
body?: never;
|
|
800
|
+
path?: never;
|
|
801
|
+
query?: never;
|
|
802
|
+
url: '/api/v1/ops/capabilities';
|
|
803
|
+
};
|
|
804
|
+
export type GetCapabilitiesErrors = {
|
|
805
|
+
/**
|
|
806
|
+
* Missing or invalid API key.
|
|
807
|
+
*/
|
|
808
|
+
401: ErrorResponse;
|
|
809
|
+
};
|
|
810
|
+
export type GetCapabilitiesError = GetCapabilitiesErrors[keyof GetCapabilitiesErrors];
|
|
811
|
+
export type GetCapabilitiesResponses = {
|
|
812
|
+
/**
|
|
813
|
+
* Capabilities.
|
|
814
|
+
*/
|
|
815
|
+
200: OpsResponse;
|
|
816
|
+
};
|
|
817
|
+
export type GetCapabilitiesResponse = GetCapabilitiesResponses[keyof GetCapabilitiesResponses];
|
|
532
818
|
export type ClientOptions = {
|
|
533
819
|
baseUrl: 'https://www.s-system.cloud' | (string & {});
|
|
534
820
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kquika-inc/s-system",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Predict flight disruption, price the passenger-rights exposure it carries, and rebook before it costs you.",
|
|
5
5
|
"author": { "name": "Kquika, Inc.", "email": "support@kquika.com" },
|
|
6
6
|
"homepage": "https://www.s-system.cloud/document",
|