fshub-api 4.1.2 → 4.1.4

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.
Files changed (128) hide show
  1. package/README.md +15 -1
  2. package/dist/api/FSHubApiRequest.d.ts.map +1 -1
  3. package/dist/api/FSHubApiRequest.js +9 -2
  4. package/dist/api/FSHubApiRequest.js.map +1 -1
  5. package/dist/api/airline/Airline_approveManualPIREP.d.ts +3 -0
  6. package/dist/api/airline/Airline_approveManualPIREP.d.ts.map +1 -0
  7. package/dist/api/airline/Airline_approveManualPIREP.js +56 -0
  8. package/dist/api/airline/Airline_approveManualPIREP.js.map +1 -0
  9. package/dist/api/airline/Airline_getAll.d.ts +2 -2
  10. package/dist/api/airline/Airline_getAll.d.ts.map +1 -1
  11. package/dist/api/airline/Airline_getAll.js +2 -2
  12. package/dist/api/airline/Airline_getAll.js.map +1 -1
  13. package/dist/api/airline/Airline_getAllFlightDeparturesAndArrivals.d.ts +2 -2
  14. package/dist/api/airline/Airline_getAllFlightDeparturesAndArrivals.d.ts.map +1 -1
  15. package/dist/api/airline/Airline_getAllFlightDeparturesAndArrivals.js +2 -2
  16. package/dist/api/airline/Airline_getAllFlightDeparturesAndArrivals.js.map +1 -1
  17. package/dist/api/airline/Airline_getAllFlightsArrivals.d.ts +2 -2
  18. package/dist/api/airline/Airline_getAllFlightsArrivals.d.ts.map +1 -1
  19. package/dist/api/airline/Airline_getAllFlightsArrivals.js +2 -2
  20. package/dist/api/airline/Airline_getAllFlightsArrivals.js.map +1 -1
  21. package/dist/api/airline/Airline_getAllFlightsDepartures.d.ts +2 -2
  22. package/dist/api/airline/Airline_getAllFlightsDepartures.d.ts.map +1 -1
  23. package/dist/api/airline/Airline_getAllFlightsDepartures.js +2 -2
  24. package/dist/api/airline/Airline_getAllFlightsDepartures.js.map +1 -1
  25. package/dist/api/airline/Airline_getAllRanks.d.ts +2 -2
  26. package/dist/api/airline/Airline_getAllRanks.d.ts.map +1 -1
  27. package/dist/api/airline/Airline_getAllRanks.js +2 -2
  28. package/dist/api/airline/Airline_getAllRanks.js.map +1 -1
  29. package/dist/api/airline/Airline_getAllRoles.d.ts +2 -2
  30. package/dist/api/airline/Airline_getAllRoles.d.ts.map +1 -1
  31. package/dist/api/airline/Airline_getAllRoles.js +2 -2
  32. package/dist/api/airline/Airline_getAllRoles.js.map +1 -1
  33. package/dist/api/airline/Airline_getAllRoutes.d.ts +2 -2
  34. package/dist/api/airline/Airline_getAllRoutes.d.ts.map +1 -1
  35. package/dist/api/airline/Airline_getAllRoutes.js +2 -2
  36. package/dist/api/airline/Airline_getAllRoutes.js.map +1 -1
  37. package/dist/api/airline/Airline_getAllScreenshots.d.ts +2 -2
  38. package/dist/api/airline/Airline_getAllScreenshots.d.ts.map +1 -1
  39. package/dist/api/airline/Airline_getAllScreenshots.js +2 -2
  40. package/dist/api/airline/Airline_getAllScreenshots.js.map +1 -1
  41. package/dist/api/airline/Airline_getFlights.d.ts +2 -2
  42. package/dist/api/airline/Airline_getFlights.d.ts.map +1 -1
  43. package/dist/api/airline/Airline_getFlights.js +2 -2
  44. package/dist/api/airline/Airline_getFlights.js.map +1 -1
  45. package/dist/api/airline/Airline_getPilots.d.ts +2 -2
  46. package/dist/api/airline/Airline_getPilots.d.ts.map +1 -1
  47. package/dist/api/airline/Airline_getPilots.js +2 -2
  48. package/dist/api/airline/Airline_getPilots.js.map +1 -1
  49. package/dist/api/airline/Airline_rejectManualPIREP.d.ts +3 -0
  50. package/dist/api/airline/Airline_rejectManualPIREP.d.ts.map +1 -0
  51. package/dist/api/airline/Airline_rejectManualPIREP.js +56 -0
  52. package/dist/api/airline/Airline_rejectManualPIREP.js.map +1 -0
  53. package/dist/api/airline/index.d.ts +4 -0
  54. package/dist/api/airline/index.d.ts.map +1 -1
  55. package/dist/api/airline/index.js +4 -0
  56. package/dist/api/airline/index.js.map +1 -1
  57. package/dist/api/flight/Flight_getFlightScreenshotsById.d.ts +2 -2
  58. package/dist/api/flight/Flight_getFlightScreenshotsById.d.ts.map +1 -1
  59. package/dist/api/flight/Flight_getFlightScreenshotsById.js +2 -2
  60. package/dist/api/flight/Flight_getFlightScreenshotsById.js.map +1 -1
  61. package/dist/api/index.d.ts +2 -0
  62. package/dist/api/index.d.ts.map +1 -1
  63. package/dist/api/pilot/Pilot_getAll.d.ts +2 -2
  64. package/dist/api/pilot/Pilot_getAll.d.ts.map +1 -1
  65. package/dist/api/pilot/Pilot_getAll.js +2 -2
  66. package/dist/api/pilot/Pilot_getAll.js.map +1 -1
  67. package/dist/api/pilot/Pilot_getAllAirlines.d.ts +2 -2
  68. package/dist/api/pilot/Pilot_getAllAirlines.d.ts.map +1 -1
  69. package/dist/api/pilot/Pilot_getAllAirlines.js +2 -2
  70. package/dist/api/pilot/Pilot_getAllAirlines.js.map +1 -1
  71. package/dist/api/pilot/Pilot_getAllFlightDeparturesAndArrivals.d.ts +2 -2
  72. package/dist/api/pilot/Pilot_getAllFlightDeparturesAndArrivals.d.ts.map +1 -1
  73. package/dist/api/pilot/Pilot_getAllFlightDeparturesAndArrivals.js +2 -2
  74. package/dist/api/pilot/Pilot_getAllFlightDeparturesAndArrivals.js.map +1 -1
  75. package/dist/api/pilot/Pilot_getAllFlights.d.ts +2 -2
  76. package/dist/api/pilot/Pilot_getAllFlights.d.ts.map +1 -1
  77. package/dist/api/pilot/Pilot_getAllFlights.js +2 -2
  78. package/dist/api/pilot/Pilot_getAllFlights.js.map +1 -1
  79. package/dist/api/pilot/Pilot_getAllFlightsArrivals.d.ts +2 -2
  80. package/dist/api/pilot/Pilot_getAllFlightsArrivals.d.ts.map +1 -1
  81. package/dist/api/pilot/Pilot_getAllFlightsArrivals.js +2 -2
  82. package/dist/api/pilot/Pilot_getAllFlightsArrivals.js.map +1 -1
  83. package/dist/api/pilot/Pilot_getAllFlightsDepartures.d.ts +2 -2
  84. package/dist/api/pilot/Pilot_getAllFlightsDepartures.d.ts.map +1 -1
  85. package/dist/api/pilot/Pilot_getAllFlightsDepartures.js +2 -2
  86. package/dist/api/pilot/Pilot_getAllFlightsDepartures.js.map +1 -1
  87. package/dist/api/pilot/Pilot_getAllScreenshots.d.ts +2 -2
  88. package/dist/api/pilot/Pilot_getAllScreenshots.d.ts.map +1 -1
  89. package/dist/api/pilot/Pilot_getAllScreenshots.js +2 -2
  90. package/dist/api/pilot/Pilot_getAllScreenshots.js.map +1 -1
  91. package/dist/index.d.ts +20 -18
  92. package/dist/index.d.ts.map +1 -1
  93. package/dist/index.js +58 -36
  94. package/dist/index.js.map +1 -1
  95. package/dist/types/FSHubApi.d.ts +20 -18
  96. package/dist/types/FSHubApi.d.ts.map +1 -1
  97. package/dist/types/ManualPIREP.d.ts +159 -0
  98. package/dist/types/ManualPIREP.d.ts.map +1 -0
  99. package/dist/types/ManualPIREP.js +3 -0
  100. package/dist/types/ManualPIREP.js.map +1 -0
  101. package/package.json +5 -2
  102. package/release.ps1 +2 -1
  103. package/src/api/FSHubApiRequest.ts +5 -1
  104. package/src/api/airline/Airline_approveManualPIREP.ts +10 -0
  105. package/src/api/airline/Airline_getAll.ts +3 -3
  106. package/src/api/airline/Airline_getAllFlightDeparturesAndArrivals.ts +3 -3
  107. package/src/api/airline/Airline_getAllFlightsArrivals.ts +3 -3
  108. package/src/api/airline/Airline_getAllFlightsDepartures.ts +3 -3
  109. package/src/api/airline/Airline_getAllRanks.ts +3 -3
  110. package/src/api/airline/Airline_getAllRoles.ts +3 -3
  111. package/src/api/airline/Airline_getAllRoutes.ts +3 -3
  112. package/src/api/airline/Airline_getAllScreenshots.ts +3 -3
  113. package/src/api/airline/Airline_getFlights.ts +3 -3
  114. package/src/api/airline/Airline_getPilots.ts +3 -3
  115. package/src/api/airline/Airline_rejectManualPIREP.ts +10 -0
  116. package/src/api/airline/index.ts +4 -0
  117. package/src/api/flight/Flight_getFlightScreenshotsById.ts +3 -3
  118. package/src/api/pilot/Pilot_getAll.ts +3 -3
  119. package/src/api/pilot/Pilot_getAllAirlines.ts +3 -3
  120. package/src/api/pilot/Pilot_getAllFlightDeparturesAndArrivals.ts +3 -3
  121. package/src/api/pilot/Pilot_getAllFlights.ts +3 -3
  122. package/src/api/pilot/Pilot_getAllFlightsArrivals.ts +3 -3
  123. package/src/api/pilot/Pilot_getAllFlightsDepartures.ts +3 -3
  124. package/src/api/pilot/Pilot_getAllScreenshots.ts +3 -3
  125. package/src/index.spec.ts +246 -3
  126. package/src/index.ts +46 -36
  127. package/src/types/FSHubApi.ts +20 -18
  128. package/src/types/ManualPIREP.ts +175 -0
package/src/index.spec.ts CHANGED
@@ -49,6 +49,8 @@ describe('FSHubApi()', function() {
49
49
  expect(api.Airline_getAllRanks).to.be.a('function');
50
50
  expect(api.Airline_getAllRoles).to.be.a('function');
51
51
  expect(api.Airline_getAllRoutes).to.be.a('function');
52
+ expect(api.Airline_approveManualPIREP).to.be.a('function');
53
+ expect(api.Airline_rejectManualPIREP).to.be.a('function');
52
54
 
53
55
  expect(api.Flight_getFlightById).to.be.a('function');
54
56
  expect(api.Flight_getFlightScreenshotsById).to.be.a('function');
@@ -76,6 +78,17 @@ describe('FSHubApi()', function() {
76
78
  expect(pilots.data).to.be.an('Array');
77
79
  });
78
80
 
81
+ it('Pilot_getAll() is called with limit option, it should limit the number of pilots returned', async function() {
82
+ const pilots: FSHubResponse<Pilot[]> = await api.Pilot_getAll({ limit: 1 });
83
+ expect(pilots.data).to.be.an('Array');
84
+ expect(pilots.data.length).to.be.at.most(1);
85
+ });
86
+
87
+ it('Pilot_getAll() is called with cursor option, it should return the next page of pilots', async function() {
88
+ const pilots: FSHubResponse<Pilot[]> = await api.Pilot_getAll({ cursor: 1 });
89
+ expect(pilots.data).to.be.an('Array');
90
+ });
91
+
79
92
  it('Pilot_get(id) is called, it should return a valid Pilot object', async function() {
80
93
  const pilot: FSHubResponse<Pilot> = await api.Pilot_get(1);
81
94
 
@@ -102,6 +115,19 @@ describe('FSHubApi()', function() {
102
115
  expect(flights.data).to.be.an('Array');
103
116
  });
104
117
 
118
+ it('Pilot_getAllFlights(id, options) is called with limit option, it should limit the number of flights returned', async function() {
119
+ const pilot: FSHubResponse<CurrentPilot> = await api.Pilot_getCurrent();
120
+ const flights: FSHubResponse<Flight[]> = await api.Pilot_getAllFlights(pilot.data.id, { limit: 1 });
121
+ expect(flights.data).to.be.an('Array');
122
+ expect(flights.data.length).to.be.at.most(1);
123
+ });
124
+
125
+ it('Pilot_getAllFlights(id, options) is called with cursor option, it should return the next page of flights', async function() {
126
+ const pilot: FSHubResponse<CurrentPilot> = await api.Pilot_getCurrent();
127
+ const flights: FSHubResponse<Flight[]> = await api.Pilot_getAllFlights(pilot.data.id, { cursor: 1 });
128
+ expect(flights.data).to.be.an('Array');
129
+ });
130
+
105
131
  it('Pilot_getAllAirlines(id) is called, it should return an array of valid Airline objects', async function() {
106
132
  const pilot: FSHubResponse<CurrentPilot> = await api.Pilot_getCurrent();
107
133
  const airlines: FSHubResponse<Airline[]> = await api.Pilot_getAllAirlines(pilot.data.id);
@@ -109,6 +135,18 @@ describe('FSHubApi()', function() {
109
135
  expect(airlines.data).to.be.an('Array');
110
136
  });
111
137
 
138
+ it('Pilot_getAllAirlines(id, options) is called with limit option, it should return an array', async function() {
139
+ const pilot: FSHubResponse<CurrentPilot> = await api.Pilot_getCurrent();
140
+ const airlines: FSHubResponse<Airline[]> = await api.Pilot_getAllAirlines(pilot.data.id, { limit: 1 });
141
+ expect(airlines.data).to.be.an('Array');
142
+ });
143
+
144
+ it('Pilot_getAllAirlines(id, options) is called with cursor option, it should return the next page of airlines', async function() {
145
+ const pilot: FSHubResponse<CurrentPilot> = await api.Pilot_getCurrent();
146
+ const airlines: FSHubResponse<Airline[]> = await api.Pilot_getAllAirlines(pilot.data.id, { cursor: 1 });
147
+ expect(airlines.data).to.be.an('Array');
148
+ });
149
+
112
150
  it('Pilot_getStats(id) is called, it should return a valid PilotStats object', async function() {
113
151
  const pilot: FSHubResponse<CurrentPilot> = await api.Pilot_getCurrent();
114
152
  const stats: FSHubResponse<PilotStats> = await api.Pilot_getStats(pilot.data.id);
@@ -126,6 +164,19 @@ describe('FSHubApi()', function() {
126
164
  expect(flights.data).to.be.an('Array');
127
165
  });
128
166
 
167
+ it('Pilot_getAllFlightsDepartures(id, airportCode, options) is called with limit option, it should limit the number of flights returned', async function() {
168
+ const pilot: FSHubResponse<CurrentPilot> = await api.Pilot_getCurrent();
169
+ const flights: FSHubResponse<Flight[]> = await api.Pilot_getAllFlightsDepartures(pilot.data.id, 'KPHX', { limit: 1 });
170
+ expect(flights.data).to.be.an('Array');
171
+ expect(flights.data.length).to.be.at.most(1);
172
+ });
173
+
174
+ it('Pilot_getAllFlightsDepartures(id, airportCode, options) is called with cursor option, it should return the next page of flights', async function() {
175
+ const pilot: FSHubResponse<CurrentPilot> = await api.Pilot_getCurrent();
176
+ const flights: FSHubResponse<Flight[]> = await api.Pilot_getAllFlightsDepartures(pilot.data.id, 'KPHX', { cursor: 1 });
177
+ expect(flights.data).to.be.an('Array');
178
+ });
179
+
129
180
  it('Pilot_getAllFlightsArrivals(id, airportCode) is called, it should return an array of valid Flight objects', async function() {
130
181
  const pilot: FSHubResponse<CurrentPilot> = await api.Pilot_getCurrent();
131
182
  const flights: FSHubResponse<Flight[]> = await api.Pilot_getAllFlightsArrivals(pilot.data.id, 'KPHX');
@@ -133,6 +184,19 @@ describe('FSHubApi()', function() {
133
184
  expect(flights.data).to.be.an('Array');
134
185
  });
135
186
 
187
+ it('Pilot_getAllFlightsArrivals(id, airportCode, options) is called with limit option, it should limit the number of flights returned', async function() {
188
+ const pilot: FSHubResponse<CurrentPilot> = await api.Pilot_getCurrent();
189
+ const flights: FSHubResponse<Flight[]> = await api.Pilot_getAllFlightsArrivals(pilot.data.id, 'KPHX', { limit: 1 });
190
+ expect(flights.data).to.be.an('Array');
191
+ expect(flights.data.length).to.be.at.most(1);
192
+ });
193
+
194
+ it('Pilot_getAllFlightsArrivals(id, airportCode, options) is called with cursor option, it should return the next page of flights', async function() {
195
+ const pilot: FSHubResponse<CurrentPilot> = await api.Pilot_getCurrent();
196
+ const flights: FSHubResponse<Flight[]> = await api.Pilot_getAllFlightsArrivals(pilot.data.id, 'KPHX', { cursor: 1 });
197
+ expect(flights.data).to.be.an('Array');
198
+ });
199
+
136
200
  it('Pilot_getAllFlightDeparturesAndArrivals(id, departureAirportCode, arrivalAirportCode) is called, it should return an array of valid Flight objects', async function() {
137
201
  const pilot: FSHubResponse<CurrentPilot> = await api.Pilot_getCurrent();
138
202
  const flights: FSHubResponse<Flight[]> = await api.Pilot_getAllFlightDeparturesAndArrivals(pilot.data.id, 'KPHX', 'KJAC');
@@ -140,12 +204,38 @@ describe('FSHubApi()', function() {
140
204
  expect(flights.data).to.be.an('Array');
141
205
  });
142
206
 
207
+ it('Pilot_getAllFlightDeparturesAndArrivals(id, dep, arr, options) is called with limit option, it should limit the number of flights returned', async function() {
208
+ const pilot: FSHubResponse<CurrentPilot> = await api.Pilot_getCurrent();
209
+ const flights: FSHubResponse<Flight[]> = await api.Pilot_getAllFlightDeparturesAndArrivals(pilot.data.id, 'KPHX', 'KJAC', { limit: 1 });
210
+ expect(flights.data).to.be.an('Array');
211
+ expect(flights.data.length).to.be.at.most(1);
212
+ });
213
+
214
+ it('Pilot_getAllFlightDeparturesAndArrivals(id, dep, arr, options) is called with cursor option, it should return the next page of flights', async function() {
215
+ const pilot: FSHubResponse<CurrentPilot> = await api.Pilot_getCurrent();
216
+ const flights: FSHubResponse<Flight[]> = await api.Pilot_getAllFlightDeparturesAndArrivals(pilot.data.id, 'KPHX', 'KJAC', { cursor: 1 });
217
+ expect(flights.data).to.be.an('Array');
218
+ });
219
+
143
220
  it('Pilot_getAllScreenshots(id) is called, it should return an array of valid Screenshot objects', async function() {
144
221
  const pilot: FSHubResponse<CurrentPilot> = await api.Pilot_getCurrent();
145
222
  const screenshots: FSHubResponse<Screenshot[]> = await api.Pilot_getAllScreenshots(pilot.data.id);
146
223
 
147
224
  expect(screenshots.data).to.be.an('Array');
148
225
  });
226
+
227
+ it('Pilot_getAllScreenshots(id, options) is called with limit option, it should limit the number of screenshots returned', async function() {
228
+ const pilot: FSHubResponse<CurrentPilot> = await api.Pilot_getCurrent();
229
+ const screenshots: FSHubResponse<Screenshot[]> = await api.Pilot_getAllScreenshots(pilot.data.id, { limit: 1 });
230
+ expect(screenshots.data).to.be.an('Array');
231
+ expect(screenshots.data.length).to.be.at.most(1);
232
+ });
233
+
234
+ it('Pilot_getAllScreenshots(id, options) is called with cursor option, it should return the next page of screenshots', async function() {
235
+ const pilot: FSHubResponse<CurrentPilot> = await api.Pilot_getCurrent();
236
+ const screenshots: FSHubResponse<Screenshot[]> = await api.Pilot_getAllScreenshots(pilot.data.id, { cursor: 1 });
237
+ expect(screenshots.data).to.be.an('Array');
238
+ });
149
239
  });
150
240
 
151
241
  describe('Airline', function() {
@@ -155,6 +245,17 @@ describe('FSHubApi()', function() {
155
245
  expect(airlines.data).to.be.an('Array');
156
246
  });
157
247
 
248
+ it('Airline_getAll(options) is called with limit option, it should limit the number of airlines returned', async function() {
249
+ const airlines: FSHubResponse<Airline[]> = await api.Airline_getAll({ limit: 1 });
250
+ expect(airlines.data).to.be.an('Array');
251
+ expect(airlines.data.length).to.be.at.most(1);
252
+ });
253
+
254
+ it('Airline_getAll(options) is called with cursor option, it should return the next page of airlines', async function() {
255
+ const airlines: FSHubResponse<Airline[]> = await api.Airline_getAll({ cursor: 1 });
256
+ expect(airlines.data).to.be.an('Array');
257
+ });
258
+
158
259
  it('Airline_get(id) is called, it should return a valid Airline object', async function() {
159
260
  const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
160
261
 
@@ -168,6 +269,19 @@ describe('FSHubApi()', function() {
168
269
  expect(pilots.data).to.be.an('Array');
169
270
  });
170
271
 
272
+ it('Airline_getPilots(id, options) is called with limit option, it should limit the number of pilots returned', async function() {
273
+ const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
274
+ const pilots: FSHubResponse<Pilot[]> = await api.Airline_getPilots(airline.data.id, { limit: 1 });
275
+ expect(pilots.data).to.be.an('Array');
276
+ expect(pilots.data.length).to.be.at.most(1);
277
+ });
278
+
279
+ it('Airline_getPilots(id, options) is called with cursor option, it should return the next page of pilots', async function() {
280
+ const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
281
+ const pilots: FSHubResponse<Pilot[]> = await api.Airline_getPilots(airline.data.id, { cursor: 1 });
282
+ expect(pilots.data).to.be.an('Array');
283
+ });
284
+
171
285
  it('Airline_getPilotStats(id, pilotId) is called, it should return a valid PilotStats object', async function() {
172
286
  const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
173
287
  const pilot: FSHubResponse<Pilot> = await api.Pilot_getCurrent();
@@ -183,6 +297,19 @@ describe('FSHubApi()', function() {
183
297
  expect(flights.data).to.be.an('Array');
184
298
  });
185
299
 
300
+ it('Airline_getFlights(id, options) is called with limit option, it should limit the number of flights returned', async function() {
301
+ const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
302
+ const flights: FSHubResponse<Flight[]> = await api.Airline_getFlights(airline.data.id, { limit: 1 });
303
+ expect(flights.data).to.be.an('Array');
304
+ expect(flights.data.length).to.be.at.most(1);
305
+ });
306
+
307
+ it('Airline_getFlights(id, options) is called with cursor option, it should return the next page of flights', async function() {
308
+ const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
309
+ const flights: FSHubResponse<Flight[]> = await api.Airline_getFlights(airline.data.id, { cursor: 1 });
310
+ expect(flights.data).to.be.an('Array');
311
+ });
312
+
186
313
  it('Airline_getAllFlightsDepartures(id, airportCode) is called, it should return an array of valid Flight objects', async function() {
187
314
  const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
188
315
  const flights: FSHubResponse<Flight[]> = await api.Airline_getAllFlightsDepartures(airline.data.id, 'KPHX');
@@ -190,6 +317,19 @@ describe('FSHubApi()', function() {
190
317
  expect(flights.data).to.be.an('Array');
191
318
  });
192
319
 
320
+ it('Airline_getAllFlightsDepartures(id, airportCode, options) is called with limit option, it should limit the number of flights returned', async function() {
321
+ const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
322
+ const flights: FSHubResponse<Flight[]> = await api.Airline_getAllFlightsDepartures(airline.data.id, 'KPHX', { limit: 1 });
323
+ expect(flights.data).to.be.an('Array');
324
+ expect(flights.data.length).to.be.at.most(1);
325
+ });
326
+
327
+ it('Airline_getAllFlightsDepartures(id, airportCode, options) is called with cursor option, it should return the next page of flights', async function() {
328
+ const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
329
+ const flights: FSHubResponse<Flight[]> = await api.Airline_getAllFlightsDepartures(airline.data.id, 'KPHX', { cursor: 1 });
330
+ expect(flights.data).to.be.an('Array');
331
+ });
332
+
193
333
  it('Airline_getAllFlightsArrivals(id, airportCode) is called, it should return an array of valid Flight objects', async function() {
194
334
  const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
195
335
  const flights: FSHubResponse<Flight[]> = await api.Airline_getAllFlightsArrivals(airline.data.id, 'KPHX');
@@ -197,6 +337,19 @@ describe('FSHubApi()', function() {
197
337
  expect(flights.data).to.be.an('Array');
198
338
  });
199
339
 
340
+ it('Airline_getAllFlightsArrivals(id, airportCode, options) is called with limit option, it should limit the number of flights returned', async function() {
341
+ const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
342
+ const flights: FSHubResponse<Flight[]> = await api.Airline_getAllFlightsArrivals(airline.data.id, 'KPHX', { limit: 1 });
343
+ expect(flights.data).to.be.an('Array');
344
+ expect(flights.data.length).to.be.at.most(1);
345
+ });
346
+
347
+ it('Airline_getAllFlightsArrivals(id, airportCode, options) is called with cursor option, it should return the next page of flights', async function() {
348
+ const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
349
+ const flights: FSHubResponse<Flight[]> = await api.Airline_getAllFlightsArrivals(airline.data.id, 'KPHX', { cursor: 1 });
350
+ expect(flights.data).to.be.an('Array');
351
+ });
352
+
200
353
  it('Airline_getAllFlightDeparturesAndArrivals(id, departureAirportCode, arrivalAirportCode) is called, it should return an array of valid Flight objects', async function() {
201
354
  const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
202
355
  const flights: FSHubResponse<Flight[]> = await api.Airline_getAllFlightDeparturesAndArrivals(airline.data.id, 'KPHX', 'KJAC');
@@ -204,6 +357,19 @@ describe('FSHubApi()', function() {
204
357
  expect(flights.data).to.be.an('Array');
205
358
  });
206
359
 
360
+ it('Airline_getAllFlightDeparturesAndArrivals(id, dep, arr, options) is called with limit option, it should limit the number of flights returned', async function() {
361
+ const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
362
+ const flights: FSHubResponse<Flight[]> = await api.Airline_getAllFlightDeparturesAndArrivals(airline.data.id, 'KPHX', 'KJAC', { limit: 1 });
363
+ expect(flights.data).to.be.an('Array');
364
+ expect(flights.data.length).to.be.at.most(1);
365
+ });
366
+
367
+ it('Airline_getAllFlightDeparturesAndArrivals(id, dep, arr, options) is called with cursor option, it should return the next page of flights', async function() {
368
+ const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
369
+ const flights: FSHubResponse<Flight[]> = await api.Airline_getAllFlightDeparturesAndArrivals(airline.data.id, 'KPHX', 'KJAC', { cursor: 1 });
370
+ expect(flights.data).to.be.an('Array');
371
+ });
372
+
207
373
  it('Airline_getAllScreenshots(id) is called, it should return an array of valid Screenshot objects', async function() {
208
374
  const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
209
375
  const screenshots: FSHubResponse<Screenshot[]> = await api.Airline_getAllScreenshots(airline.data.id);
@@ -211,6 +377,19 @@ describe('FSHubApi()', function() {
211
377
  expect(screenshots.data).to.be.an('Array');
212
378
  });
213
379
 
380
+ it('Airline_getAllScreenshots(id, options) is called with limit option, it should limit the number of screenshots returned', async function() {
381
+ const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
382
+ const screenshots: FSHubResponse<Screenshot[]> = await api.Airline_getAllScreenshots(airline.data.id, { limit: 1 });
383
+ expect(screenshots.data).to.be.an('Array');
384
+ expect(screenshots.data.length).to.be.at.most(1);
385
+ });
386
+
387
+ it('Airline_getAllScreenshots(id, options) is called with cursor option, it should return the next page of screenshots', async function() {
388
+ const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
389
+ const screenshots: FSHubResponse<Screenshot[]> = await api.Airline_getAllScreenshots(airline.data.id, { cursor: 1 });
390
+ expect(screenshots.data).to.be.an('Array');
391
+ });
392
+
214
393
  it('Airline_getStats(id) is called, it should return a valid object with airline statistics', async function() {
215
394
  const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
216
395
  const stats: FSHubResponse<AirlineStats> = await api.Airline_getStats(airline.data.id);
@@ -250,6 +429,61 @@ describe('FSHubApi()', function() {
250
429
 
251
430
  expect(routes.data).to.be.an('Array');
252
431
  });
432
+
433
+ it('Airline_getAllRanks(airlineId, options) is called with limit option, it should limit the number of ranks returned', async function() {
434
+ const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
435
+ const ranks = await api.Airline_getAllRanks(airline.data.id, { limit: 1 });
436
+ expect(ranks.data).to.be.an('Array');
437
+ expect(ranks.data.length).to.be.at.most(1);
438
+ });
439
+
440
+ it('Airline_getAllRanks(airlineId, options) is called with cursor option, it should return the next page of ranks', async function() {
441
+ const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
442
+ const ranks = await api.Airline_getAllRanks(airline.data.id, { cursor: 1 });
443
+ expect(ranks.data).to.be.an('Array');
444
+ });
445
+
446
+ it('Airline_getAllRoles(airlineId, options) is called with limit option, it should limit the number of roles returned', async function() {
447
+ const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
448
+ const roles = await api.Airline_getAllRoles(airline.data.id, { limit: 1 });
449
+ expect(roles.data).to.be.an('Array');
450
+ expect(roles.data.length).to.be.at.most(1);
451
+ });
452
+
453
+ it('Airline_getAllRoles(airlineId, options) is called with cursor option, it should return the next page of roles', async function() {
454
+ const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
455
+ const roles = await api.Airline_getAllRoles(airline.data.id, { cursor: 1 });
456
+ expect(roles.data).to.be.an('Array');
457
+ });
458
+
459
+ it('Airline_getAllRoutes(airlineId, options) is called with limit option, it should limit the number of routes returned', async function() {
460
+ const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
461
+ const routes: FSHubResponse<AirlineRoute[]> = await api.Airline_getAllRoutes(airline.data.id, { limit: 1 });
462
+ expect(routes.data).to.be.an('Array');
463
+ expect(routes.data.length).to.be.at.most(1);
464
+ });
465
+
466
+ it('Airline_getAllRoutes(airlineId, options) is called with cursor option, it should return the next page of routes', async function() {
467
+ const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
468
+ const routes: FSHubResponse<AirlineRoute[]> = await api.Airline_getAllRoutes(airline.data.id, { cursor: 1 });
469
+ expect(routes.data).to.be.an('Array');
470
+ });
471
+
472
+ it.skip('Airline_approveManualPIREP(airlineId, flightId) is called, it should return a valid FSHubApplicationResponse object', async function() {
473
+ const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
474
+ const flight: FSHubResponse<Flight> = await api.Flight_getFlightById(4009359);
475
+ const response: FSHubResponse<FSHubApplicationResponse> = await api.Airline_approveManualPIREP(airline.data.id, flight.data.id);
476
+
477
+ expect(response.data).to.be.an('Object');
478
+ });
479
+
480
+ it.skip('Airline_rejectManualPIREP(airlineId, flightId) is called, it should return a valid FSHubApplicationResponse object', async function() {
481
+ const airline: FSHubResponse<Airline> = await api.Airline_get(6082);
482
+ const flight: FSHubResponse<Flight> = await api.Flight_getFlightById(4009359);
483
+ const response: FSHubResponse<FSHubApplicationResponse> = await api.Airline_rejectManualPIREP(airline.data.id, flight.data.id);
484
+
485
+ expect(response.data).to.be.an('Object');
486
+ });
253
487
  });
254
488
 
255
489
  describe('Flight', function() {
@@ -267,6 +501,17 @@ describe('FSHubApi()', function() {
267
501
 
268
502
  expect(flight.data).to.be.an('Array');
269
503
  });
504
+
505
+ it('Flight_getFlightScreenshotsById(id, options) is called with limit option, it should limit the number of screenshots returned', async function() {
506
+ const screenshots: FSHubResponse<Screenshot[]> = await api.Flight_getFlightScreenshotsById(4009359, { limit: 1 });
507
+ expect(screenshots.data).to.be.an('Array');
508
+ expect(screenshots.data.length).to.be.at.most(1);
509
+ });
510
+
511
+ it('Flight_getFlightScreenshotsById(id, options) is called with cursor option, it should return the next page of screenshots', async function() {
512
+ const screenshots: FSHubResponse<Screenshot[]> = await api.Flight_getFlightScreenshotsById(4009359, { cursor: 1 });
513
+ expect(screenshots.data).to.be.an('Array');
514
+ });
270
515
  });
271
516
 
272
517
  describe('Flight_getFlights(options)', function() {
@@ -274,7 +519,6 @@ describe('FSHubApi()', function() {
274
519
  const flights: FSHubResponse<Flight[]> = await api.Flight_getFlights();
275
520
 
276
521
  expect(flights.data).to.be.an('Array');
277
- expect(flights.data.length).to.be.equal(10);
278
522
  });
279
523
 
280
524
  it('Flight_getFlights(options) is called with limit option, it should limit the number of flights returned', async function() {
@@ -285,10 +529,9 @@ describe('FSHubApi()', function() {
285
529
  });
286
530
 
287
531
  it('Flight_getFlights(options) is called with cursor option, it should return the next page of flights', async function() {
288
- const flights: FSHubResponse<Flight[]> = await api.Flight_getFlights({ cursor: 100 });
532
+ const flights: FSHubResponse<Flight[]> = await api.Flight_getFlights({ cursor: 1 });
289
533
 
290
534
  expect(flights.data).to.be.an('Array');
291
- expect(flights.data.length).to.be.equal(100);
292
535
  });
293
536
  });
294
537
  });
package/src/index.ts CHANGED
@@ -53,6 +53,8 @@ export default class FSHubApiClass implements FSHubApi {
53
53
  this.Airline_getAllRanks = this.Airline_getAllRanks.bind(this);
54
54
  this.Airline_getAllRoles = this.Airline_getAllRoles.bind(this);
55
55
  this.Airline_getAllRoutes = this.Airline_getAllRoutes.bind(this);
56
+ this.Airline_approveManualPIREP = this.Airline_approveManualPIREP.bind(this);
57
+ this.Airline_rejectManualPIREP = this.Airline_rejectManualPIREP.bind(this);
56
58
 
57
59
  this.Flight_getFlightById = this.Flight_getFlightById.bind(this);
58
60
  this.Flight_getFlightScreenshotsById = this.Flight_getFlightScreenshotsById.bind(this);
@@ -66,8 +68,8 @@ export default class FSHubApiClass implements FSHubApi {
66
68
  return await Api.pilot.getCurrent(this);
67
69
  }
68
70
 
69
- public async Pilot_getAll() {
70
- return await Api.pilot.getAll(this);
71
+ public async Pilot_getAll(options?: FSHubRequestOptions) {
72
+ return await Api.pilot.getAll(this, options);
71
73
  }
72
74
 
73
75
  public async Pilot_get(id: number) {
@@ -78,68 +80,68 @@ export default class FSHubApiClass implements FSHubApi {
78
80
  return await Api.pilot.getLatestFlight(id, this);
79
81
  }
80
82
 
81
- public async Pilot_getAllFlights(id: number) {
82
- return await Api.pilot.getAllFlights(id, this);
83
+ public async Pilot_getAllFlights(id: number, options?: FSHubRequestOptions) {
84
+ return await Api.pilot.getAllFlights(id, this, options);
83
85
  }
84
86
 
85
- public async Pilot_getAllAirlines(id: number) {
86
- return await Api.pilot.getAllAirlines(id, this);
87
+ public async Pilot_getAllAirlines(id: number, options?: FSHubRequestOptions) {
88
+ return await Api.pilot.getAllAirlines(id, this, options);
87
89
  }
88
90
 
89
91
  public async Pilot_getStats(id: number) {
90
92
  return await Api.pilot.getStats(id, this);
91
93
  }
92
94
 
93
- public async Pilot_getAllFlightsDepartures(id: number, airportCode: string) {
94
- return await Api.pilot.getAllFlightsDepartures(id, airportCode, this);
95
+ public async Pilot_getAllFlightsDepartures(id: number, airportCode: string, options?: FSHubRequestOptions) {
96
+ return await Api.pilot.getAllFlightsDepartures(id, airportCode, this, options);
95
97
  }
96
98
 
97
- public async Pilot_getAllFlightsArrivals(id: number, airportCode: string) {
98
- return await Api.pilot.getAllFlightsArrivals(id, airportCode, this);
99
+ public async Pilot_getAllFlightsArrivals(id: number, airportCode: string, options?: FSHubRequestOptions) {
100
+ return await Api.pilot.getAllFlightsArrivals(id, airportCode, this, options);
99
101
  }
100
102
 
101
- public async Pilot_getAllFlightDeparturesAndArrivals(id: number, departureAirportCode: string, arrivalAirportCode: string) {
102
- return await Api.pilot.getAllFlightDeparturesAndArrivals(id, departureAirportCode, arrivalAirportCode, this);
103
+ public async Pilot_getAllFlightDeparturesAndArrivals(id: number, departureAirportCode: string, arrivalAirportCode: string, options?: FSHubRequestOptions) {
104
+ return await Api.pilot.getAllFlightDeparturesAndArrivals(id, departureAirportCode, arrivalAirportCode, this, options);
103
105
  }
104
106
 
105
- public async Pilot_getAllScreenshots(id: number) {
106
- return await Api.pilot.getAllScreenshots(id, this);
107
+ public async Pilot_getAllScreenshots(id: number, options?: FSHubRequestOptions) {
108
+ return await Api.pilot.getAllScreenshots(id, this, options);
107
109
  }
108
110
 
109
- public async Airline_getAll() {
110
- return await Api.airline.getAll(this);
111
+ public async Airline_getAll(options?: FSHubRequestOptions) {
112
+ return await Api.airline.getAll(this, options);
111
113
  }
112
114
 
113
115
  public async Airline_get(id: number) {
114
116
  return await Api.airline.get(id, this);
115
117
  }
116
118
 
117
- public async Airline_getPilots(id: number) {
118
- return await Api.airline.getPilots(id, this);
119
+ public async Airline_getPilots(id: number, options?: FSHubRequestOptions) {
120
+ return await Api.airline.getPilots(id, this, options);
119
121
  }
120
122
 
121
123
  public async Airline_getPilotStats(id: number, pilotId: number) {
122
124
  return await Api.airline.getPilotStats(id, pilotId, this);
123
125
  }
124
126
 
125
- public async Airline_getFlights(id: number) {
126
- return await Api.airline.getFlights(id, this);
127
+ public async Airline_getFlights(id: number, options?: FSHubRequestOptions) {
128
+ return await Api.airline.getFlights(id, this, options);
127
129
  }
128
130
 
129
- public async Airline_getAllFlightsDepartures(id: number, airportCode: string) {
130
- return await Api.airline.getAllFlightsDepartures(id, airportCode, this);
131
+ public async Airline_getAllFlightsDepartures(id: number, airportCode: string, options?: FSHubRequestOptions) {
132
+ return await Api.airline.getAllFlightsDepartures(id, airportCode, this, options);
131
133
  }
132
134
 
133
- public async Airline_getAllFlightsArrivals(id: number, airportCode: string) {
134
- return await Api.airline.getAllFlightsArrivals(id, airportCode, this);
135
+ public async Airline_getAllFlightsArrivals(id: number, airportCode: string, options?: FSHubRequestOptions) {
136
+ return await Api.airline.getAllFlightsArrivals(id, airportCode, this, options);
135
137
  }
136
138
 
137
- public async Airline_getAllFlightDeparturesAndArrivals(id: number, departureAirportCode: string, arrivalAirportCode: string) {
138
- return await Api.airline.getAllFlightDeparturesAndArrivals(id, departureAirportCode, arrivalAirportCode, this);
139
+ public async Airline_getAllFlightDeparturesAndArrivals(id: number, departureAirportCode: string, arrivalAirportCode: string, options?: FSHubRequestOptions) {
140
+ return await Api.airline.getAllFlightDeparturesAndArrivals(id, departureAirportCode, arrivalAirportCode, this, options);
139
141
  }
140
142
 
141
- public async Airline_getAllScreenshots(id: number) {
142
- return await Api.airline.getAllScreenshots(id, this);
143
+ public async Airline_getAllScreenshots(id: number, options?: FSHubRequestOptions) {
144
+ return await Api.airline.getAllScreenshots(id, this, options);
143
145
  }
144
146
 
145
147
  public async Airline_getStats(id: number) {
@@ -162,24 +164,32 @@ export default class FSHubApiClass implements FSHubApi {
162
164
  return await Api.airline.pilotSetRank(pilotId, airlineId, data, this);
163
165
  }
164
166
 
165
- public async Airline_getAllRanks(airlineId: number) {
166
- return await Api.airline.getAllRanks(airlineId, this);
167
+ public async Airline_getAllRanks(airlineId: number, options?: FSHubRequestOptions) {
168
+ return await Api.airline.getAllRanks(airlineId, this, options);
167
169
  }
168
170
 
169
- public async Airline_getAllRoles(airlineId: number) {
170
- return await Api.airline.getAllRoles(airlineId, this);
171
+ public async Airline_getAllRoles(airlineId: number, options?: FSHubRequestOptions) {
172
+ return await Api.airline.getAllRoles(airlineId, this, options);
171
173
  }
172
174
 
173
- public async Airline_getAllRoutes(airlineId: number) {
174
- return await Api.airline.getAllRoutes(airlineId, this);
175
+ public async Airline_getAllRoutes(airlineId: number, options?: FSHubRequestOptions) {
176
+ return await Api.airline.getAllRoutes(airlineId, this, options);
177
+ }
178
+
179
+ public async Airline_approveManualPIREP(airlineId: number, flightId: number) {
180
+ return await Api.airline.approveManualPIREP(airlineId, flightId, this);
181
+ }
182
+
183
+ public async Airline_rejectManualPIREP(airlineId: number, flightId: number) {
184
+ return await Api.airline.rejectManualPIREP(airlineId, flightId, this);
175
185
  }
176
186
 
177
187
  public async Flight_getFlightById(id: number) {
178
188
  return await Api.flight.getFlightById(id, this);
179
189
  }
180
190
 
181
- public async Flight_getFlightScreenshotsById(id: number) {
182
- return await Api.flight.getFlightScreenshotsById(id, this);
191
+ public async Flight_getFlightScreenshotsById(id: number, options?: FSHubRequestOptions) {
192
+ return await Api.flight.getFlightScreenshotsById(id, this, options);
183
193
  }
184
194
 
185
195
  public async Flight_getFlights(options?: FSHubRequestOptions) {
@@ -21,35 +21,37 @@ import { AirlineRoute } from './AirlineRoute';
21
21
  export type FSHubApi = {
22
22
  axios: AxiosInstance
23
23
  Pilot_getCurrent: () => Promise<FSHubResponse<CurrentPilot>>
24
- Pilot_getAll: () => Promise<FSHubResponse<Pilot[]>>
24
+ Pilot_getAll: (options?: FSHubRequestOptions) => Promise<FSHubResponse<Pilot[]>>
25
25
  Pilot_get: (id: number) => Promise<FSHubResponse<Pilot>>
26
26
  Pilot_getLatestFlight: (id: number) => Promise<FSHubResponse<Flight>>
27
- Pilot_getAllFlights: (id: number) => Promise<FSHubResponse<Flight[]>>
28
- Pilot_getAllAirlines: (id: number) => Promise<FSHubResponse<Airline[]>>
27
+ Pilot_getAllFlights: (id: number, options?: FSHubRequestOptions) => Promise<FSHubResponse<Flight[]>>
28
+ Pilot_getAllAirlines: (id: number, options?: FSHubRequestOptions) => Promise<FSHubResponse<Airline[]>>
29
29
  Pilot_getStats: (id: number) => Promise<FSHubResponse<PilotStats>>
30
- Pilot_getAllFlightsDepartures:(id:number, airportCode:string) => Promise<FSHubResponse<Flight[]>>
31
- Pilot_getAllFlightsArrivals:(id:number, airportCode:string) => Promise<FSHubResponse<Flight[]>>
32
- Pilot_getAllFlightDeparturesAndArrivals:(id:number, departureAirportCode:string, arrivalAirportCode:string) => Promise<FSHubResponse<Flight[]>>
33
- Pilot_getAllScreenshots: (id: number) => Promise<FSHubResponse<Screenshot[]>>
34
- Airline_getAll: () => Promise<FSHubResponse<Airline[]>>
30
+ Pilot_getAllFlightsDepartures:(id:number, airportCode:string, options?: FSHubRequestOptions) => Promise<FSHubResponse<Flight[]>>
31
+ Pilot_getAllFlightsArrivals:(id:number, airportCode:string, options?: FSHubRequestOptions) => Promise<FSHubResponse<Flight[]>>
32
+ Pilot_getAllFlightDeparturesAndArrivals:(id:number, departureAirportCode:string, arrivalAirportCode:string, options?: FSHubRequestOptions) => Promise<FSHubResponse<Flight[]>>
33
+ Pilot_getAllScreenshots: (id: number, options?: FSHubRequestOptions) => Promise<FSHubResponse<Screenshot[]>>
34
+ Airline_getAll: (options?: FSHubRequestOptions) => Promise<FSHubResponse<Airline[]>>
35
35
  Airline_get: (id: number) => Promise<FSHubResponse<Airline>>
36
- Airline_getPilots: (id: number) => Promise<FSHubResponse<Pilot[]>>
36
+ Airline_getPilots: (id: number, options?: FSHubRequestOptions) => Promise<FSHubResponse<Pilot[]>>
37
37
  Airline_getPilotStats: (id: number, pilotId: number) => Promise<FSHubResponse<FSHubAirlinePilotStats>>
38
- Airline_getFlights: (id: number) => Promise<FSHubResponse<Flight[]>>
39
- Airline_getAllFlightsDepartures:(id:number, airportCode:string) => Promise<FSHubResponse<Flight[]>>
40
- Airline_getAllFlightsArrivals:(id:number, airportCode:string) => Promise<FSHubResponse<Flight[]>>
41
- Airline_getAllFlightDeparturesAndArrivals:(id:number, departureAirportCode:string, arrivalAirportCode:string) => Promise<FSHubResponse<Flight[]>>
42
- Airline_getAllScreenshots: (id: number) => Promise<FSHubResponse<Screenshot[]>>
38
+ Airline_getFlights: (id: number, options?: FSHubRequestOptions) => Promise<FSHubResponse<Flight[]>>
39
+ Airline_getAllFlightsDepartures:(id:number, airportCode:string, options?: FSHubRequestOptions) => Promise<FSHubResponse<Flight[]>>
40
+ Airline_getAllFlightsArrivals:(id:number, airportCode:string, options?: FSHubRequestOptions) => Promise<FSHubResponse<Flight[]>>
41
+ Airline_getAllFlightDeparturesAndArrivals:(id:number, departureAirportCode:string, arrivalAirportCode:string, options?: FSHubRequestOptions) => Promise<FSHubResponse<Flight[]>>
42
+ Airline_getAllScreenshots: (id: number, options?: FSHubRequestOptions) => Promise<FSHubResponse<Screenshot[]>>
43
43
  Airline_getStats: (id: number) => Promise<FSHubResponse<AirlineStats>>
44
44
  Airline_approveApplication: (pilotId: number, airlineId: number) => Promise<FSHubResponse<FSHubApplicationResponse>>
45
45
  Airline_rejectApplication: (pilotId: number, airlineId: number) => Promise<FSHubResponse<FSHubApplicationResponse>>
46
46
  Airline_pilotPointPurchase: (pilotId: number, airlineId: number, data: FSHubPilotPointPurchaseTransactionData) => Promise<FSHubResponse<FSHubPilotPointPurchaseTransactionResponse>>
47
47
  Airline_pilotSetRank: (pilotId: number, airlineId: number, data: FSHubPilotSetRankData) => Promise<FSHubResponse<FSHubApplicationResponse>>
48
- Airline_getAllRanks: (airlineId: number) => Promise<FSHubResponse<FSHubAirlineRank[]>>
49
- Airline_getAllRoles: (airlineId: number) => Promise<FSHubResponse<FSHubAirlineRole[]>>
50
- Airline_getAllRoutes: (airlineId: number) => Promise<FSHubResponse<AirlineRoute[]>>
48
+ Airline_getAllRanks: (airlineId: number, options?: FSHubRequestOptions) => Promise<FSHubResponse<FSHubAirlineRank[]>>
49
+ Airline_getAllRoles: (airlineId: number, options?: FSHubRequestOptions) => Promise<FSHubResponse<FSHubAirlineRole[]>>
50
+ Airline_getAllRoutes: (airlineId: number, options?: FSHubRequestOptions) => Promise<FSHubResponse<AirlineRoute[]>>
51
+ Airline_approveManualPIREP: (airlineId: number, flightId: number) => Promise<FSHubResponse<FSHubApplicationResponse>>
52
+ Airline_rejectManualPIREP: (airlineId: number, flightId: number) => Promise<FSHubResponse<FSHubApplicationResponse>>
51
53
  Flight_getFlightById: (id: number) => Promise<FSHubResponse<Flight>>
52
- Flight_getFlightScreenshotsById: (id: number) => Promise<FSHubResponse<Screenshot[]>>
54
+ Flight_getFlightScreenshotsById: (id: number, options?: FSHubRequestOptions) => Promise<FSHubResponse<Screenshot[]>>
53
55
  Flight_getFlights: (options?: FSHubRequestOptions) => Promise<FSHubResponse<Flight[]>>
54
56
  Airport_findByICAO: (icao: string) => Promise<FSHubResponse<Airport>>
55
57
  Airport_findMETAR: (icao: string) => Promise<FSHubResponse<AirportMETARReport>>