@kquika-inc/s-system 2.0.0 → 2.0.2
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 +46 -26
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/sdk.gen.d.ts +71 -6
- package/dist/sdk.gen.js +169 -5
- package/dist/types.gen.d.ts +282 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -67,23 +67,23 @@ only compared within a single station.
|
|
|
67
67
|
| **Route analytics**: performance grouped by route | Professional |
|
|
68
68
|
| **Refresh** the live feed on demand | Professional |
|
|
69
69
|
| **Airport overview**: movements, delay, stand utilization | Standard |
|
|
70
|
-
| **
|
|
70
|
+
| **Passenger heatmap**: density by zone, measured or modeled | Professional |
|
|
71
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 |
|
|
72
76
|
|
|
73
77
|
Passenger intelligence is delivered through the application and through
|
|
74
78
|
scheduled data delivery. Contact your account manager about direct access for
|
|
75
79
|
your integration.
|
|
76
80
|
|
|
77
|
-
## Plans
|
|
81
|
+
## Plans and rate limits
|
|
78
82
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|---|---|---|
|
|
84
|
-
| Standard | 100 requests/minute | 200/minute |
|
|
85
|
-
| Professional | 500 requests/minute | 1,000/minute |
|
|
86
|
-
| 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.
|
|
87
87
|
|
|
88
88
|
API access starts at Standard. Starter covers the dashboard and basic
|
|
89
89
|
passenger insights without programmatic access.
|
|
@@ -106,7 +106,7 @@ client.setConfig({
|
|
|
106
106
|
headers: { 'X-API-Key': process.env.S_SYSTEM_API_KEY! },
|
|
107
107
|
});
|
|
108
108
|
|
|
109
|
-
const { data, error } = await listFlights({ query: { origin: '
|
|
109
|
+
const { data, error } = await listFlights({ query: { origin: 'JFK', limit: 25 } });
|
|
110
110
|
|
|
111
111
|
if (error || !data?.success) {
|
|
112
112
|
console.error(data?.message ?? error);
|
|
@@ -123,7 +123,7 @@ if (error || !data?.success) {
|
|
|
123
123
|
## `data_confidence`
|
|
124
124
|
|
|
125
125
|
```ts
|
|
126
|
-
for (const flight of data.data) {
|
|
126
|
+
for (const flight of data.data.flights) {
|
|
127
127
|
// Both values are observations, so both are safe to schedule against.
|
|
128
128
|
// Branch on freshness only when it matters to you: `database` may lag the
|
|
129
129
|
// live feed by a sync interval.
|
|
@@ -166,23 +166,22 @@ import {
|
|
|
166
166
|
getAirportOverview, getAirportHeatmap, getAirportCongestion,
|
|
167
167
|
} from '@kquika-inc/s-system';
|
|
168
168
|
|
|
169
|
-
const heat = await getAirportHeatmap({ path: { airport_code: '
|
|
169
|
+
const heat = await getAirportHeatmap({ path: { airport_code: 'JFK' } });
|
|
170
|
+
const h = heat.data!.data!;
|
|
170
171
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
console.log(
|
|
174
|
-
} else {
|
|
175
|
-
for (const p of heat.data.data.points!) {
|
|
176
|
-
console.log(p.zone, p.intensity, p.wait_time_minutes);
|
|
177
|
-
}
|
|
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);
|
|
178
175
|
}
|
|
179
176
|
```
|
|
180
177
|
|
|
181
178
|
`avg_wait_minutes` covers queueing zones only: security, check-in,
|
|
182
179
|
immigration and customs. Gates and lounges are out of scope.
|
|
183
180
|
|
|
184
|
-
|
|
185
|
-
|
|
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
|
|
186
185
|
figure. `modelled` means it is derived from terminal layout and time of day
|
|
187
186
|
with no sensor behind it, in which case two calls seconds apart can return
|
|
188
187
|
different values with no underlying event. Do not diff them to infer movement.
|
|
@@ -209,6 +208,25 @@ flight as on time.
|
|
|
209
208
|
time, which means the check could not run. Null and 0 carry different
|
|
210
209
|
meanings here.
|
|
211
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
|
+
|
|
212
230
|
## Errors
|
|
213
231
|
|
|
214
232
|
| Code | Meaning |
|
|
@@ -217,6 +235,9 @@ meanings here.
|
|
|
217
235
|
| `forbidden` | The key lacks the permission for this endpoint. |
|
|
218
236
|
| `plan_required` | Your plan does not cover this endpoint. |
|
|
219
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. |
|
|
220
241
|
|
|
221
242
|
`error` is a stable code and safe to branch on. `message` is for a human and
|
|
222
243
|
its wording may change.
|
|
@@ -246,10 +267,9 @@ function isActionable(flight: Flight): boolean {
|
|
|
246
267
|
}
|
|
247
268
|
```
|
|
248
269
|
|
|
249
|
-
Disruption
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
access.
|
|
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.
|
|
253
273
|
|
|
254
274
|
## Support
|
|
255
275
|
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
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
|
|
@@ -20,7 +20,7 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
|
|
|
20
20
|
* **Requires Standard.**
|
|
21
21
|
*
|
|
22
22
|
* Every record returned is an observation. Records generated to fill a gap in the live
|
|
23
|
-
* feed are excluded rather than
|
|
23
|
+
* feed are excluded rather than labeled, so no provenance check is required before using
|
|
24
24
|
* a flight for operational planning. `excluded_generated` reports how many were removed.
|
|
25
25
|
*/
|
|
26
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>;
|
|
@@ -78,13 +78,15 @@ export declare const refreshFlights: <ThrowOnError extends boolean = false>(opti
|
|
|
78
78
|
*/
|
|
79
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>;
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
82
|
-
* Passenger density by zone
|
|
81
|
+
* Passenger heatmap
|
|
82
|
+
* Passenger density by zone.
|
|
83
83
|
*
|
|
84
84
|
* **Requires Professional.**
|
|
85
85
|
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
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.
|
|
88
90
|
*/
|
|
89
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>;
|
|
90
92
|
/**
|
|
@@ -106,3 +108,66 @@ export declare const getAirportCongestion: <ThrowOnError extends boolean = false
|
|
|
106
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.
|
|
107
109
|
*/
|
|
108
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
|
@@ -7,7 +7,7 @@ import { client as _heyApiClient } from './client.gen';
|
|
|
7
7
|
* **Requires Standard.**
|
|
8
8
|
*
|
|
9
9
|
* Every record returned is an observation. Records generated to fill a gap in the live
|
|
10
|
-
* feed are excluded rather than
|
|
10
|
+
* feed are excluded rather than labeled, so no provenance check is required before using
|
|
11
11
|
* a flight for operational planning. `excluded_generated` reports how many were removed.
|
|
12
12
|
*/
|
|
13
13
|
export const listFlights = (options) => {
|
|
@@ -142,13 +142,15 @@ export const getAirportOverview = (options) => {
|
|
|
142
142
|
});
|
|
143
143
|
};
|
|
144
144
|
/**
|
|
145
|
-
*
|
|
146
|
-
* Passenger density by zone
|
|
145
|
+
* Passenger heatmap
|
|
146
|
+
* Passenger density by zone.
|
|
147
147
|
*
|
|
148
148
|
* **Requires Professional.**
|
|
149
149
|
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
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.
|
|
152
154
|
*/
|
|
153
155
|
export const getAirportHeatmap = (options) => {
|
|
154
156
|
return (options.client ?? _heyApiClient).get({
|
|
@@ -203,3 +205,165 @@ export const getUsage = (options) => {
|
|
|
203
205
|
...options
|
|
204
206
|
});
|
|
205
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
|
@@ -171,10 +171,9 @@ export type HeatmapResponse = Envelope & {
|
|
|
171
171
|
data?: {
|
|
172
172
|
airport_code?: string;
|
|
173
173
|
/**
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
* **Read `data_source` before acting on any figure here.** Where it is `modelled`, occupancy and wait times are derived from terminal layout and time of day rather than measured from sensors, regardless of what this flag says.
|
|
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`.
|
|
178
177
|
*/
|
|
179
178
|
lidar_available?: boolean;
|
|
180
179
|
/**
|
|
@@ -247,7 +246,22 @@ export type UsageResponse = Envelope & {
|
|
|
247
246
|
endpoint?: string;
|
|
248
247
|
calls?: number;
|
|
249
248
|
}>;
|
|
249
|
+
/**
|
|
250
|
+
* The hourly limit spread evenly across a minute. Keys are limited per hour; see `rate_limit_per_hour`.
|
|
251
|
+
*/
|
|
250
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;
|
|
251
265
|
};
|
|
252
266
|
};
|
|
253
267
|
/**
|
|
@@ -537,6 +551,270 @@ export type GetUsageResponses = {
|
|
|
537
551
|
200: UsageResponse;
|
|
538
552
|
};
|
|
539
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];
|
|
540
818
|
export type ClientOptions = {
|
|
541
819
|
baseUrl: 'https://www.s-system.cloud' | (string & {});
|
|
542
820
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kquika-inc/s-system",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
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",
|