fshub-api 4.0.0 → 4.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 +30 -0
- package/dist/api/FSHubApiRequest.d.ts +4 -1
- package/dist/api/FSHubApiRequest.d.ts.map +1 -1
- package/dist/api/FSHubApiRequest.js +40 -1
- package/dist/api/FSHubApiRequest.js.map +1 -1
- package/dist/api/airline/Airline_approveApplication.d.ts +3 -0
- package/dist/api/airline/Airline_approveApplication.d.ts.map +1 -0
- package/dist/api/airline/Airline_approveApplication.js +56 -0
- package/dist/api/airline/Airline_approveApplication.js.map +1 -0
- package/dist/api/airline/Airline_getAllRanks.d.ts +3 -0
- package/dist/api/airline/Airline_getAllRanks.d.ts.map +1 -0
- package/dist/api/airline/Airline_getAllRanks.js +57 -0
- package/dist/api/airline/Airline_getAllRanks.js.map +1 -0
- package/dist/api/airline/Airline_getAllRoles.d.ts +3 -0
- package/dist/api/airline/Airline_getAllRoles.d.ts.map +1 -0
- package/dist/api/airline/Airline_getAllRoles.js +57 -0
- package/dist/api/airline/Airline_getAllRoles.js.map +1 -0
- package/dist/api/airline/Airline_getPilotStats.d.ts +2 -2
- package/dist/api/airline/Airline_getPilotStats.d.ts.map +1 -1
- package/dist/api/airline/Airline_getPilotStats.js.map +1 -1
- package/dist/api/airline/Airline_pilotPointPurchase.d.ts +3 -0
- package/dist/api/airline/Airline_pilotPointPurchase.d.ts.map +1 -0
- package/dist/api/airline/Airline_pilotPointPurchase.js +56 -0
- package/dist/api/airline/Airline_pilotPointPurchase.js.map +1 -0
- package/dist/api/airline/Airline_pilotSetRank.d.ts +3 -0
- package/dist/api/airline/Airline_pilotSetRank.d.ts.map +1 -0
- package/dist/api/airline/Airline_pilotSetRank.js +56 -0
- package/dist/api/airline/Airline_pilotSetRank.js.map +1 -0
- package/dist/api/airline/Airline_rejectApplication.d.ts +3 -0
- package/dist/api/airline/Airline_rejectApplication.d.ts.map +1 -0
- package/dist/api/airline/Airline_rejectApplication.js +56 -0
- package/dist/api/airline/Airline_rejectApplication.js.map +1 -0
- package/dist/api/airline/index.d.ts +12 -0
- package/dist/api/airline/index.d.ts.map +1 -1
- package/dist/api/airline/index.js +12 -0
- package/dist/api/airline/index.js.map +1 -1
- package/dist/api/index.d.ts +6 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +66 -0
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +87 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/api/FSHubApiRequest.ts +24 -2
- package/src/api/airline/Airline_approveApplication.ts +10 -0
- package/src/api/airline/Airline_getAllRanks.ts +8 -0
- package/src/api/airline/Airline_getAllRoles.ts +8 -0
- package/src/api/airline/Airline_getPilotStats.ts +3 -3
- package/src/api/airline/Airline_pilotPointPurchase.ts +10 -0
- package/src/api/airline/Airline_pilotSetRank.ts +10 -0
- package/src/api/airline/Airline_rejectApplication.ts +10 -0
- package/src/api/airline/index.ts +13 -1
- package/src/index.spec.ts +33 -1
- package/src/index.ts +32 -2
- package/src/types/index.ts +102 -2
package/README.md
CHANGED
|
@@ -157,6 +157,30 @@ const arrivals = await api.Airline_getAllFlightsArrivals(6082, 'KLAX');
|
|
|
157
157
|
const routeFlights = await api.Airline_getAllFlightDeparturesAndArrivals(6082, 'KPHX', 'KLAX');
|
|
158
158
|
```
|
|
159
159
|
|
|
160
|
+
#### Get All Airline Roles
|
|
161
|
+
```typescript
|
|
162
|
+
// Get all Roles
|
|
163
|
+
const allRoles = await api.Airline_getAllRoles();
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
#### Get All Airline Ranks
|
|
167
|
+
```typescript
|
|
168
|
+
// Get all Ranks
|
|
169
|
+
const allRanks = await api.Airline_getAllRanks();
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
#### Set Airline Pilot Rank
|
|
173
|
+
```typescript
|
|
174
|
+
const rank_id = 6254 // Reef Recruit
|
|
175
|
+
const pilot_id = 25097 //NDBoost
|
|
176
|
+
|
|
177
|
+
const payload: FSHubPilotSetRankData = {
|
|
178
|
+
rank_id: rank_id,
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
const response: FSHubApplicationResponse = await api.Airline_Airline_pilotSetRank(pilot_id, airline_id, payload);
|
|
182
|
+
```
|
|
183
|
+
|
|
160
184
|
## 🔍 Data Types
|
|
161
185
|
|
|
162
186
|
The library provides comprehensive TypeScript types for all FSHub data structures:
|
|
@@ -224,6 +248,12 @@ npm run dev
|
|
|
224
248
|
- `Airline_getAllFlightDeparturesAndArrivals(id, departureAirport, arrivalAirport)` - Get airline flights between airports
|
|
225
249
|
- `Airline_getAllScreenshots(id)` - Get airline screenshots
|
|
226
250
|
- `Airline_getStats(id)` - Get airline statistics
|
|
251
|
+
- `Airline_approveApplication` - approve an application to join the airline
|
|
252
|
+
- `Airline_rejectApplication` - reject an application to join the airline
|
|
253
|
+
- `Airline_pilotPointPurchase` - exchange pilots points for airline
|
|
254
|
+
- `Airline_pilotSetRank` - set a pilots rank
|
|
255
|
+
- `Airline_getAllRanks` - get all airline ranks
|
|
256
|
+
- `Airline_getAllRoles` - get all airline roles
|
|
227
257
|
|
|
228
258
|
## 🤝 Contributing
|
|
229
259
|
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { FSHubRequestOptions, FSHubResponse, FSHubApi } from '../types';
|
|
2
|
-
export
|
|
2
|
+
export declare function FSHubApiRequest<T>(url: string, api: FSHubApi, options?: FSHubRequestOptions): Promise<FSHubResponse<T>>;
|
|
3
|
+
export declare function FSHubApiPostRequest<T, D = any>(url: string, api: FSHubApi, data?: D): Promise<FSHubResponse<T>>;
|
|
4
|
+
export declare function FSHubApiPutRequest<T, D = any>(url: string, api: FSHubApi, data?: D): Promise<FSHubResponse<T>>;
|
|
5
|
+
export default FSHubApiRequest;
|
|
3
6
|
//# sourceMappingURL=FSHubApiRequest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FSHubApiRequest.d.ts","sourceRoot":"","sources":["../../src/api/FSHubApiRequest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAc,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpF,
|
|
1
|
+
{"version":3,"file":"FSHubApiRequest.d.ts","sourceRoot":"","sources":["../../src/api/FSHubApiRequest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAc,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpF,wBAAsB,eAAe,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAiB7H;AAED,wBAAsB,mBAAmB,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAQrH;AAED,wBAAsB,kBAAkB,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAQpH;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -36,7 +36,9 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.FSHubApiRequest = FSHubApiRequest;
|
|
40
|
+
exports.FSHubApiPostRequest = FSHubApiPostRequest;
|
|
41
|
+
exports.FSHubApiPutRequest = FSHubApiPutRequest;
|
|
40
42
|
function FSHubApiRequest(url, api, options) {
|
|
41
43
|
return __awaiter(this, void 0, void 0, function () {
|
|
42
44
|
var queryParams, response;
|
|
@@ -63,4 +65,41 @@ function FSHubApiRequest(url, api, options) {
|
|
|
63
65
|
});
|
|
64
66
|
});
|
|
65
67
|
}
|
|
68
|
+
function FSHubApiPostRequest(url, api, data) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
70
|
+
var response;
|
|
71
|
+
return __generator(this, function (_a) {
|
|
72
|
+
switch (_a.label) {
|
|
73
|
+
case 0: return [4 /*yield*/, api.axios.post(url, data)
|
|
74
|
+
.then(function (res) { return res.data; })
|
|
75
|
+
.catch(function (err) {
|
|
76
|
+
var _a;
|
|
77
|
+
throw new Error((_a = err.response) === null || _a === void 0 ? void 0 : _a.data.message);
|
|
78
|
+
})];
|
|
79
|
+
case 1:
|
|
80
|
+
response = _a.sent();
|
|
81
|
+
return [2 /*return*/, response];
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function FSHubApiPutRequest(url, api, data) {
|
|
87
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
88
|
+
var response;
|
|
89
|
+
return __generator(this, function (_a) {
|
|
90
|
+
switch (_a.label) {
|
|
91
|
+
case 0: return [4 /*yield*/, api.axios.put(url, data)
|
|
92
|
+
.then(function (res) { return res.data; })
|
|
93
|
+
.catch(function (err) {
|
|
94
|
+
var _a;
|
|
95
|
+
throw new Error((_a = err.response) === null || _a === void 0 ? void 0 : _a.data.message);
|
|
96
|
+
})];
|
|
97
|
+
case 1:
|
|
98
|
+
response = _a.sent();
|
|
99
|
+
return [2 /*return*/, response];
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
exports.default = FSHubApiRequest;
|
|
66
105
|
//# sourceMappingURL=FSHubApiRequest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FSHubApiRequest.js","sourceRoot":"","sources":["../../src/api/FSHubApiRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,
|
|
1
|
+
{"version":3,"file":"FSHubApiRequest.js","sourceRoot":"","sources":["../../src/api/FSHubApiRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,0CAiBC;AAED,kDAQC;AAED,gDAQC;AArCD,SAAsB,eAAe,CAAI,GAAW,EAAE,GAAa,EAAE,OAA6B;;;;;;oBAC1F,WAAW,GAAG,EAAE,CAAC;oBACrB,IAAI,OAAO,EAAE,CAAC;wBACV,WAAW,GAAG,kBAAW,OAAO,CAAC,MAAM,oBAAU,OAAO,CAAC,KAAK,CAAE,CAAC;oBACrE,CAAC;oBAEmC,qBAAM,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,WAAW,CAAC;6BACrE,IAAI,CAAC,UAAC,GAAoC,IAAK,OAAA,GAAG,CAAC,IAAI,EAAR,CAAQ,CAAC;6BACxD,KAAK,CAAC,UAAC,GAA2B;;4BAC/B,IAAI,CAAA,MAAA,GAAG,CAAC,QAAQ,0CAAE,IAAI,CAAC,IAAI,MAAK,GAAG,EAAE,CAAC;gCAClC,MAAM,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC;4BACjC,CAAC;4BAED,MAAM,IAAI,KAAK,CAAC,MAAA,GAAG,CAAC,QAAQ,0CAAE,IAAI,CAAC,OAAO,CAAC,CAAC;wBAChD,CAAC,CAAC,EAAA;;oBARA,QAAQ,GAAsB,SAQ9B;oBAEN,sBAAO,QAAQ,EAAC;;;;CACnB;AAED,SAAsB,mBAAmB,CAAa,GAAW,EAAE,GAAa,EAAE,IAAQ;;;;;wBACnD,qBAAM,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC;yBAC7D,IAAI,CAAC,UAAC,GAAoC,IAAK,OAAA,GAAG,CAAC,IAAI,EAAR,CAAQ,CAAC;yBACxD,KAAK,CAAC,UAAC,GAA2B;;wBAC/B,MAAM,IAAI,KAAK,CAAC,MAAA,GAAG,CAAC,QAAQ,0CAAE,IAAI,CAAC,OAAO,CAAC,CAAC;oBAChD,CAAC,CAAC,EAAA;;oBAJA,QAAQ,GAAqB,SAI7B;oBAEN,sBAAO,QAAQ,EAAC;;;;CACnB;AAED,SAAsB,kBAAkB,CAAa,GAAW,EAAE,GAAa,EAAE,IAAQ;;;;;wBAClD,qBAAM,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC;yBAC5D,IAAI,CAAC,UAAC,GAAoC,IAAK,OAAA,GAAG,CAAC,IAAI,EAAR,CAAQ,CAAC;yBACxD,KAAK,CAAC,UAAC,GAA2B;;wBAC/B,MAAM,IAAI,KAAK,CAAC,MAAA,GAAG,CAAC,QAAQ,0CAAE,IAAI,CAAC,OAAO,CAAC,CAAC;oBAChD,CAAC,CAAC,EAAA;;oBAJA,QAAQ,GAAqB,SAI7B;oBAEN,sBAAO,QAAQ,EAAC;;;;CACnB;AAED,kBAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { FSHubApi, FSHubResponse, FSHubApplicationResponse } from "../../types";
|
|
2
|
+
export default function Airline_approveApplication(pilotId: number, airlineId: number, api: FSHubApi): Promise<FSHubResponse<FSHubApplicationResponse>>;
|
|
3
|
+
//# sourceMappingURL=Airline_approveApplication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Airline_approveApplication.d.ts","sourceRoot":"","sources":["../../../src/api/airline/Airline_approveApplication.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAGhF,wBAA8B,0BAA0B,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,wBAAwB,CAAC,CAAC,CAM5J"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.default = Airline_approveApplication;
|
|
40
|
+
var FSHubApiRequest_1 = require("../FSHubApiRequest");
|
|
41
|
+
function Airline_approveApplication(pilotId, airlineId, api) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
43
|
+
var url, response;
|
|
44
|
+
return __generator(this, function (_a) {
|
|
45
|
+
switch (_a.label) {
|
|
46
|
+
case 0:
|
|
47
|
+
url = "airline/".concat(airlineId, "/application/").concat(pilotId, "/approve");
|
|
48
|
+
return [4 /*yield*/, (0, FSHubApiRequest_1.FSHubApiPostRequest)(url, api)];
|
|
49
|
+
case 1:
|
|
50
|
+
response = _a.sent();
|
|
51
|
+
return [2 /*return*/, response];
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=Airline_approveApplication.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Airline_approveApplication.js","sourceRoot":"","sources":["../../../src/api/airline/Airline_approveApplication.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,6CAMC;AARD,sDAAyD;AAEzD,SAA8B,0BAA0B,CAAC,OAAe,EAAE,SAAiB,EAAE,GAAa;;;;;;oBAChG,GAAG,GAAG,kBAAW,SAAS,0BAAgB,OAAO,aAAU,CAAC;oBAER,qBAAM,IAAA,qCAAmB,EAAiC,GAAG,EAAE,GAAG,CAAC,EAAA;;oBAAvH,QAAQ,GAA4C,SAAmE;oBAE7H,sBAAO,QAAQ,EAAC;;;;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Airline_getAllRanks.d.ts","sourceRoot":"","sources":["../../../src/api/airline/Airline_getAllRanks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGxE,wBAA8B,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAI9H"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
+
};
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.default = Airline_getAllRanks;
|
|
43
|
+
var FSHubApiRequest_1 = __importDefault(require("../FSHubApiRequest"));
|
|
44
|
+
function Airline_getAllRanks(airlineId, api) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
46
|
+
var response;
|
|
47
|
+
return __generator(this, function (_a) {
|
|
48
|
+
switch (_a.label) {
|
|
49
|
+
case 0: return [4 /*yield*/, (0, FSHubApiRequest_1.default)("airline/".concat(airlineId, "/rank"), api)];
|
|
50
|
+
case 1:
|
|
51
|
+
response = _a.sent();
|
|
52
|
+
return [2 /*return*/, response];
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=Airline_getAllRanks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Airline_getAllRanks.js","sourceRoot":"","sources":["../../../src/api/airline/Airline_getAllRanks.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,sCAIC;AAND,uEAAiD;AAEjD,SAA8B,mBAAmB,CAAC,SAAiB,EAAE,GAAa;;;;;wBAC1B,qBAAM,IAAA,yBAAe,EAAC,kBAAW,SAAS,UAAO,EAAE,GAAG,CAAC,EAAA;;oBAArG,QAAQ,GAAsC,SAAuD;oBAE3G,sBAAO,QAAQ,EAAC;;;;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Airline_getAllRoles.d.ts","sourceRoot":"","sources":["../../../src/api/airline/Airline_getAllRoles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGxE,wBAA8B,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAI9H"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
+
};
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.default = Airline_getAllRoles;
|
|
43
|
+
var FSHubApiRequest_1 = __importDefault(require("../FSHubApiRequest"));
|
|
44
|
+
function Airline_getAllRoles(airlineId, api) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
46
|
+
var response;
|
|
47
|
+
return __generator(this, function (_a) {
|
|
48
|
+
switch (_a.label) {
|
|
49
|
+
case 0: return [4 /*yield*/, (0, FSHubApiRequest_1.default)("airline/".concat(airlineId, "/role"), api)];
|
|
50
|
+
case 1:
|
|
51
|
+
response = _a.sent();
|
|
52
|
+
return [2 /*return*/, response];
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=Airline_getAllRoles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Airline_getAllRoles.js","sourceRoot":"","sources":["../../../src/api/airline/Airline_getAllRoles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,sCAIC;AAND,uEAAiD;AAEjD,SAA8B,mBAAmB,CAAC,SAAiB,EAAE,GAAa;;;;;wBAC1B,qBAAM,IAAA,yBAAe,EAAC,kBAAW,SAAS,UAAO,EAAE,GAAG,CAAC,EAAA;;oBAArG,QAAQ,GAAsC,SAAuD;oBAE3G,sBAAO,QAAQ,EAAC;;;;CACnB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FSHubApi, FSHubResponse
|
|
2
|
-
export default function Airline_getPilotStats(id: number, pilotId: number, api: FSHubApi): Promise<FSHubResponse<
|
|
1
|
+
import { FSHubAirlinePilotStats, FSHubApi, FSHubResponse } from "../../types";
|
|
2
|
+
export default function Airline_getPilotStats(id: number, pilotId: number, api: FSHubApi): Promise<FSHubResponse<FSHubAirlinePilotStats>>;
|
|
3
3
|
//# sourceMappingURL=Airline_getPilotStats.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Airline_getPilotStats.d.ts","sourceRoot":"","sources":["../../../src/api/airline/Airline_getPilotStats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Airline_getPilotStats.d.ts","sourceRoot":"","sources":["../../../src/api/airline/Airline_getPilotStats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG9E,wBAA8B,qBAAqB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC,CAI9I"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Airline_getPilotStats.js","sourceRoot":"","sources":["../../../src/api/airline/Airline_getPilotStats.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wCAIC;AAND,uEAAiD;AAEjD,SAA8B,qBAAqB,CAAC,EAAU,EAAE,OAAe,EAAE,GAAa;;;;;
|
|
1
|
+
{"version":3,"file":"Airline_getPilotStats.js","sourceRoot":"","sources":["../../../src/api/airline/Airline_getPilotStats.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wCAIC;AAND,uEAAiD;AAEjD,SAA8B,qBAAqB,CAAC,EAAU,EAAE,OAAe,EAAE,GAAa;;;;;wBAClC,qBAAM,IAAA,yBAAe,EAAC,kBAAW,EAAE,oBAAU,OAAO,WAAQ,EAAE,GAAG,CAAC,EAAA;;oBAApH,QAAQ,GAA0C,SAAkE;oBAE1H,sBAAO,QAAQ,EAAC;;;;CACnB"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { FSHubApi, FSHubResponse, FSHubPilotPointPurchaseTransactionResponse, FSHubPilotPointPurchaseTransactionData } from "../../types";
|
|
2
|
+
export default function Airline_pilotPointPurchase(pilotId: number, airlineId: number, data: FSHubPilotPointPurchaseTransactionData, api: FSHubApi): Promise<FSHubResponse<FSHubPilotPointPurchaseTransactionResponse>>;
|
|
3
|
+
//# sourceMappingURL=Airline_pilotPointPurchase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Airline_pilotPointPurchase.d.ts","sourceRoot":"","sources":["../../../src/api/airline/Airline_pilotPointPurchase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,0CAA0C,EAAE,sCAAsC,EAAE,MAAM,aAAa,CAAC;AAG1I,wBAA8B,0BAA0B,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,sCAAsC,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,0CAA0C,CAAC,CAAC,CAM5N"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.default = Airline_pilotPointPurchase;
|
|
40
|
+
var FSHubApiRequest_1 = require("../FSHubApiRequest");
|
|
41
|
+
function Airline_pilotPointPurchase(pilotId, airlineId, data, api) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
43
|
+
var url, response;
|
|
44
|
+
return __generator(this, function (_a) {
|
|
45
|
+
switch (_a.label) {
|
|
46
|
+
case 0:
|
|
47
|
+
url = "airline/".concat(airlineId, "/application/").concat(pilotId, "/purchase");
|
|
48
|
+
return [4 /*yield*/, (0, FSHubApiRequest_1.FSHubApiPostRequest)(url, api, data)];
|
|
49
|
+
case 1:
|
|
50
|
+
response = _a.sent();
|
|
51
|
+
return [2 /*return*/, response];
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=Airline_pilotPointPurchase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Airline_pilotPointPurchase.js","sourceRoot":"","sources":["../../../src/api/airline/Airline_pilotPointPurchase.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,6CAMC;AARD,sDAAyD;AAEzD,SAA8B,0BAA0B,CAAC,OAAe,EAAE,SAAiB,EAAE,IAA4C,EAAE,GAAa;;;;;;oBAC9I,GAAG,GAAG,kBAAW,SAAS,0BAAgB,OAAO,cAAW,CAAC;oBAES,qBAAM,IAAA,qCAAmB,EAAqF,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,EAAA;;oBAAnM,QAAQ,GAA8D,SAA6H;oBAEzM,sBAAO,QAAQ,EAAC;;;;CACnB"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { FSHubApi, FSHubResponse, FSHubApplicationResponse, FSHubPilotSetRankData } from "../../types";
|
|
2
|
+
export default function Airline_pilotSetRank(pilotId: number, airlineId: number, data: FSHubPilotSetRankData, api: FSHubApi): Promise<FSHubResponse<FSHubApplicationResponse>>;
|
|
3
|
+
//# sourceMappingURL=Airline_pilotSetRank.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Airline_pilotSetRank.d.ts","sourceRoot":"","sources":["../../../src/api/airline/Airline_pilotSetRank.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAGvG,wBAA8B,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,wBAAwB,CAAC,CAAC,CAMnL"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.default = Airline_pilotSetRank;
|
|
40
|
+
var FSHubApiRequest_1 = require("../FSHubApiRequest");
|
|
41
|
+
function Airline_pilotSetRank(pilotId, airlineId, data, api) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
43
|
+
var url, response;
|
|
44
|
+
return __generator(this, function (_a) {
|
|
45
|
+
switch (_a.label) {
|
|
46
|
+
case 0:
|
|
47
|
+
url = "airline/".concat(airlineId, "/application/").concat(pilotId, "/rank");
|
|
48
|
+
return [4 /*yield*/, (0, FSHubApiRequest_1.FSHubApiPutRequest)(url, api, data)];
|
|
49
|
+
case 1:
|
|
50
|
+
response = _a.sent();
|
|
51
|
+
return [2 /*return*/, response];
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=Airline_pilotSetRank.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Airline_pilotSetRank.js","sourceRoot":"","sources":["../../../src/api/airline/Airline_pilotSetRank.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,uCAMC;AARD,sDAAwD;AAExD,SAA8B,oBAAoB,CAAC,OAAe,EAAE,SAAiB,EAAE,IAA2B,EAAE,GAAa;;;;;;oBACvH,GAAG,GAAG,kBAAW,SAAS,0BAAgB,OAAO,UAAO,CAAC;oBAEL,qBAAM,IAAA,oCAAkB,EAAkD,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,EAAA;;oBAA7I,QAAQ,GAA4C,SAAyF;oBAEnJ,sBAAO,QAAQ,EAAC;;;;CACnB"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { FSHubApi, FSHubResponse, FSHubApplicationResponse } from "../../types";
|
|
2
|
+
export default function Airline_rejectApplication(pilotId: number, airlineId: number, api: FSHubApi): Promise<FSHubResponse<FSHubApplicationResponse>>;
|
|
3
|
+
//# sourceMappingURL=Airline_rejectApplication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Airline_rejectApplication.d.ts","sourceRoot":"","sources":["../../../src/api/airline/Airline_rejectApplication.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAGhF,wBAA8B,yBAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,wBAAwB,CAAC,CAAC,CAM3J"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.default = Airline_rejectApplication;
|
|
40
|
+
var FSHubApiRequest_1 = require("../FSHubApiRequest");
|
|
41
|
+
function Airline_rejectApplication(pilotId, airlineId, api) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
43
|
+
var url, response;
|
|
44
|
+
return __generator(this, function (_a) {
|
|
45
|
+
switch (_a.label) {
|
|
46
|
+
case 0:
|
|
47
|
+
url = "airline/".concat(airlineId, "/application/").concat(pilotId, "/reject");
|
|
48
|
+
return [4 /*yield*/, (0, FSHubApiRequest_1.FSHubApiPostRequest)(url, api)];
|
|
49
|
+
case 1:
|
|
50
|
+
response = _a.sent();
|
|
51
|
+
return [2 /*return*/, response];
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=Airline_rejectApplication.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Airline_rejectApplication.js","sourceRoot":"","sources":["../../../src/api/airline/Airline_rejectApplication.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,4CAMC;AARD,sDAAyD;AAEzD,SAA8B,yBAAyB,CAAC,OAAe,EAAE,SAAiB,EAAE,GAAa;;;;;;oBAC/F,GAAG,GAAG,kBAAW,SAAS,0BAAgB,OAAO,YAAS,CAAC;oBAEP,qBAAM,IAAA,qCAAmB,EAAiC,GAAG,EAAE,GAAG,CAAC,EAAA;;oBAAvH,QAAQ,GAA4C,SAAmE;oBAE7H,sBAAO,QAAQ,EAAC;;;;CACnB"}
|
|
@@ -8,6 +8,12 @@ import Airline_getAllFlightsArrivals from './Airline_getAllFlightsArrivals';
|
|
|
8
8
|
import Airline_getAllFlightDeparturesAndArrivals from './Airline_getAllFlightDeparturesAndArrivals';
|
|
9
9
|
import Airline_getAllScreenshots from './Airline_getAllScreenshots';
|
|
10
10
|
import Airline_getStats from './Airline_getStats';
|
|
11
|
+
import Airline_approveApplication from './Airline_approveApplication';
|
|
12
|
+
import Airline_rejectApplication from './Airline_rejectApplication';
|
|
13
|
+
import Airline_pilotPointPurchase from './Airline_pilotPointPurchase';
|
|
14
|
+
import Airline_getAllRanks from './Airline_getAllRanks';
|
|
15
|
+
import Airline_getAllRoles from './Airline_getAllRoles';
|
|
16
|
+
import Airline_pilotSetRank from './Airline_pilotSetRank';
|
|
11
17
|
export declare const Airline: {
|
|
12
18
|
getAll: typeof Airline_getAll;
|
|
13
19
|
get: typeof Airline_get;
|
|
@@ -19,5 +25,11 @@ export declare const Airline: {
|
|
|
19
25
|
getAllFlightDeparturesAndArrivals: typeof Airline_getAllFlightDeparturesAndArrivals;
|
|
20
26
|
getAllScreenshots: typeof Airline_getAllScreenshots;
|
|
21
27
|
getStats: typeof Airline_getStats;
|
|
28
|
+
approveApplication: typeof Airline_approveApplication;
|
|
29
|
+
rejectApplication: typeof Airline_rejectApplication;
|
|
30
|
+
pilotPointPurchase: typeof Airline_pilotPointPurchase;
|
|
31
|
+
pilotSetRank: typeof Airline_pilotSetRank;
|
|
32
|
+
getAllRanks: typeof Airline_getAllRanks;
|
|
33
|
+
getAllRoles: typeof Airline_getAllRoles;
|
|
22
34
|
};
|
|
23
35
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/airline/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,+BAA+B,MAAM,mCAAmC,CAAC;AAChF,OAAO,6BAA6B,MAAM,iCAAiC,CAAC;AAC5E,OAAO,yCAAyC,MAAM,6CAA6C,CAAC;AACpG,OAAO,yBAAyB,MAAM,6BAA6B,CAAC;AACpE,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/airline/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,+BAA+B,MAAM,mCAAmC,CAAC;AAChF,OAAO,6BAA6B,MAAM,iCAAiC,CAAC;AAC5E,OAAO,yCAAyC,MAAM,6CAA6C,CAAC;AACpG,OAAO,yBAAyB,MAAM,6BAA6B,CAAC;AACpE,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AACtE,OAAO,yBAAyB,MAAM,6BAA6B,CAAC;AACpE,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AACtE,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAE1D,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;CAiBnB,CAAA"}
|
|
@@ -14,6 +14,12 @@ var Airline_getAllFlightsArrivals_1 = __importDefault(require("./Airline_getAllF
|
|
|
14
14
|
var Airline_getAllFlightDeparturesAndArrivals_1 = __importDefault(require("./Airline_getAllFlightDeparturesAndArrivals"));
|
|
15
15
|
var Airline_getAllScreenshots_1 = __importDefault(require("./Airline_getAllScreenshots"));
|
|
16
16
|
var Airline_getStats_1 = __importDefault(require("./Airline_getStats"));
|
|
17
|
+
var Airline_approveApplication_1 = __importDefault(require("./Airline_approveApplication"));
|
|
18
|
+
var Airline_rejectApplication_1 = __importDefault(require("./Airline_rejectApplication"));
|
|
19
|
+
var Airline_pilotPointPurchase_1 = __importDefault(require("./Airline_pilotPointPurchase"));
|
|
20
|
+
var Airline_getAllRanks_1 = __importDefault(require("./Airline_getAllRanks"));
|
|
21
|
+
var Airline_getAllRoles_1 = __importDefault(require("./Airline_getAllRoles"));
|
|
22
|
+
var Airline_pilotSetRank_1 = __importDefault(require("./Airline_pilotSetRank"));
|
|
17
23
|
exports.Airline = {
|
|
18
24
|
getAll: Airline_getAll_1.default,
|
|
19
25
|
get: Airline_get_1.default,
|
|
@@ -25,5 +31,11 @@ exports.Airline = {
|
|
|
25
31
|
getAllFlightDeparturesAndArrivals: Airline_getAllFlightDeparturesAndArrivals_1.default,
|
|
26
32
|
getAllScreenshots: Airline_getAllScreenshots_1.default,
|
|
27
33
|
getStats: Airline_getStats_1.default,
|
|
34
|
+
approveApplication: Airline_approveApplication_1.default,
|
|
35
|
+
rejectApplication: Airline_rejectApplication_1.default,
|
|
36
|
+
pilotPointPurchase: Airline_pilotPointPurchase_1.default,
|
|
37
|
+
pilotSetRank: Airline_pilotSetRank_1.default,
|
|
38
|
+
getAllRanks: Airline_getAllRanks_1.default,
|
|
39
|
+
getAllRoles: Airline_getAllRoles_1.default,
|
|
28
40
|
};
|
|
29
41
|
//# sourceMappingURL=index.js.map
|