@chrt-inc/typescript-sdk 1.1035.0 → 1.1037.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/client/Client.js +7 -2
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/airCanada/client/Client.d.ts +88 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/airCanada/client/Client.js +269 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/airCanada/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/airCanada/client/index.js +17 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/airCanada/client/requests/CargoOnFlightIntegrationsAirCanadaBookReq.d.ts +18 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/airCanada/client/requests/CargoOnFlightIntegrationsAirCanadaCancelReq.d.ts +12 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/airCanada/client/requests/CargoOnFlightIntegrationsAirCanadaCancelReq.js +5 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/airCanada/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/airCanada/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/airCanada/index.d.ts +1 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/airCanada/index.js +17 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/Client.js +1 -1
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/index.js +3 -1
- package/dist/cjs/api/resources/orgs/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/orgs/client/Client.js +19 -14
- package/dist/cjs/api/resources/orgs/resources/airWaybillStockNumbers/client/Client.d.ts +137 -0
- package/dist/cjs/api/resources/orgs/resources/airWaybillStockNumbers/client/Client.js +528 -0
- package/dist/cjs/api/resources/orgs/resources/airWaybillStockNumbers/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/orgs/resources/airWaybillStockNumbers/client/index.js +17 -0
- package/dist/cjs/api/resources/orgs/resources/airWaybillStockNumbers/client/requests/AirWaybillStockNumbersAddReq.d.ts +12 -0
- package/dist/cjs/api/resources/orgs/resources/airWaybillStockNumbers/client/requests/AirWaybillStockNumbersAddReq.js +5 -0
- package/dist/cjs/api/resources/orgs/resources/airWaybillStockNumbers/client/requests/AirWaybillStockNumbersListV1Request.d.ts +27 -0
- package/dist/cjs/api/resources/orgs/resources/airWaybillStockNumbers/client/requests/AirWaybillStockNumbersListV1Request.js +5 -0
- package/dist/cjs/api/resources/orgs/resources/airWaybillStockNumbers/client/requests/AirWaybillStockNumbersMarkAvailableReq.d.ts +12 -0
- package/dist/cjs/api/resources/orgs/resources/airWaybillStockNumbers/client/requests/AirWaybillStockNumbersMarkAvailableReq.js +5 -0
- package/dist/cjs/api/resources/orgs/resources/airWaybillStockNumbers/client/requests/AirWaybillStockNumbersMarkUsedReq.d.ts +13 -0
- package/dist/cjs/api/resources/orgs/resources/airWaybillStockNumbers/client/requests/AirWaybillStockNumbersMarkUsedReq.js +5 -0
- package/dist/cjs/api/resources/orgs/resources/airWaybillStockNumbers/client/requests/AirWaybillStockNumbersVoidReq.d.ts +13 -0
- package/dist/cjs/api/resources/orgs/resources/airWaybillStockNumbers/client/requests/AirWaybillStockNumbersVoidReq.js +5 -0
- package/dist/cjs/api/resources/orgs/resources/airWaybillStockNumbers/client/requests/index.d.ts +5 -0
- package/dist/cjs/api/resources/orgs/resources/airWaybillStockNumbers/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/orgs/resources/airWaybillStockNumbers/index.d.ts +1 -0
- package/dist/cjs/api/resources/orgs/resources/airWaybillStockNumbers/index.js +17 -0
- package/dist/cjs/api/resources/orgs/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/orgs/resources/index.js +3 -1
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookings/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookings/client/Client.js +1 -1
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookings/client/requests/CargoOnFlightBookingClientCreate1.d.ts +1 -1
- package/dist/cjs/api/types/AirWaybillStockNumber1.d.ts +21 -0
- package/dist/cjs/api/types/AirWaybillStockNumber1.js +5 -0
- package/dist/cjs/api/types/AirWaybillStockNumberListRes.d.ts +8 -0
- package/dist/cjs/api/types/AirWaybillStockNumberListRes.js +5 -0
- package/dist/cjs/api/types/AirWaybillStockNumberSortByEnum.d.ts +9 -0
- package/dist/cjs/api/types/AirWaybillStockNumberSortByEnum.js +11 -0
- package/dist/cjs/api/types/AirWaybillStockNumberStatusEnum1.d.ts +10 -0
- package/dist/cjs/api/types/AirWaybillStockNumberStatusEnum1.js +12 -0
- package/dist/cjs/api/types/AirWaybillStockNumbersAddRes.d.ts +8 -0
- package/dist/cjs/api/types/AirWaybillStockNumbersAddRes.js +5 -0
- package/dist/cjs/api/types/AirWaybillStockNumbersSummaryRes.d.ts +10 -0
- package/dist/cjs/api/types/AirWaybillStockNumbersSummaryRes.js +5 -0
- package/dist/cjs/api/{resources/cargoOnFlightIntegrations/resources/cargoai/client/requests → types}/CargoOnFlightBookingSearchClientCreate1.d.ts +0 -10
- package/dist/cjs/api/types/CargoOnFlightBookingSearchClientCreate1.js +5 -0
- package/dist/cjs/api/types/CargoOnFlightIntegrationEnum1.d.ts +2 -1
- package/dist/cjs/api/types/CargoOnFlightIntegrationEnum1.js +1 -0
- package/dist/cjs/api/types/index.d.ts +7 -0
- package/dist/cjs/api/types/index.js +7 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/cargoOnFlightIntegrations/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/client/Client.mjs +5 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/airCanada/client/Client.d.mts +88 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/airCanada/client/Client.mjs +232 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/airCanada/client/index.d.mts +2 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/airCanada/client/index.mjs +1 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/airCanada/client/requests/CargoOnFlightIntegrationsAirCanadaBookReq.d.mts +18 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/airCanada/client/requests/CargoOnFlightIntegrationsAirCanadaCancelReq.d.mts +12 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/airCanada/client/requests/CargoOnFlightIntegrationsAirCanadaCancelReq.mjs +4 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/airCanada/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/airCanada/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/airCanada/index.d.mts +1 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/airCanada/index.mjs +1 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/Client.mjs +1 -1
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/index.mjs +2 -0
- package/dist/esm/api/resources/orgs/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/orgs/client/Client.mjs +5 -0
- package/dist/esm/api/resources/orgs/resources/airWaybillStockNumbers/client/Client.d.mts +137 -0
- package/dist/esm/api/resources/orgs/resources/airWaybillStockNumbers/client/Client.mjs +491 -0
- package/dist/esm/api/resources/orgs/resources/airWaybillStockNumbers/client/index.d.mts +2 -0
- package/dist/esm/api/resources/orgs/resources/airWaybillStockNumbers/client/index.mjs +1 -0
- package/dist/esm/api/resources/orgs/resources/airWaybillStockNumbers/client/requests/AirWaybillStockNumbersAddReq.d.mts +12 -0
- package/dist/esm/api/resources/orgs/resources/airWaybillStockNumbers/client/requests/AirWaybillStockNumbersAddReq.mjs +4 -0
- package/dist/esm/api/resources/orgs/resources/airWaybillStockNumbers/client/requests/AirWaybillStockNumbersListV1Request.d.mts +27 -0
- package/dist/esm/api/resources/orgs/resources/airWaybillStockNumbers/client/requests/AirWaybillStockNumbersListV1Request.mjs +4 -0
- package/dist/esm/api/resources/orgs/resources/airWaybillStockNumbers/client/requests/AirWaybillStockNumbersMarkAvailableReq.d.mts +12 -0
- package/dist/esm/api/resources/orgs/resources/airWaybillStockNumbers/client/requests/AirWaybillStockNumbersMarkAvailableReq.mjs +4 -0
- package/dist/esm/api/resources/orgs/resources/airWaybillStockNumbers/client/requests/AirWaybillStockNumbersMarkUsedReq.d.mts +13 -0
- package/dist/esm/api/resources/orgs/resources/airWaybillStockNumbers/client/requests/AirWaybillStockNumbersMarkUsedReq.mjs +4 -0
- package/dist/esm/api/resources/orgs/resources/airWaybillStockNumbers/client/requests/AirWaybillStockNumbersVoidReq.d.mts +13 -0
- package/dist/esm/api/resources/orgs/resources/airWaybillStockNumbers/client/requests/AirWaybillStockNumbersVoidReq.mjs +4 -0
- package/dist/esm/api/resources/orgs/resources/airWaybillStockNumbers/client/requests/index.d.mts +5 -0
- package/dist/esm/api/resources/orgs/resources/airWaybillStockNumbers/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/orgs/resources/airWaybillStockNumbers/index.d.mts +1 -0
- package/dist/esm/api/resources/orgs/resources/airWaybillStockNumbers/index.mjs +1 -0
- package/dist/esm/api/resources/orgs/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/orgs/resources/index.mjs +2 -0
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookings/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookings/client/Client.mjs +1 -1
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookings/client/requests/CargoOnFlightBookingClientCreate1.d.mts +1 -1
- package/dist/esm/api/types/AirWaybillStockNumber1.d.mts +21 -0
- package/dist/esm/api/types/AirWaybillStockNumber1.mjs +4 -0
- package/dist/esm/api/types/AirWaybillStockNumberListRes.d.mts +8 -0
- package/dist/esm/api/types/AirWaybillStockNumberListRes.mjs +4 -0
- package/dist/esm/api/types/AirWaybillStockNumberSortByEnum.d.mts +9 -0
- package/dist/esm/api/types/AirWaybillStockNumberSortByEnum.mjs +8 -0
- package/dist/esm/api/types/AirWaybillStockNumberStatusEnum1.d.mts +10 -0
- package/dist/esm/api/types/AirWaybillStockNumberStatusEnum1.mjs +9 -0
- package/dist/esm/api/types/AirWaybillStockNumbersAddRes.d.mts +8 -0
- package/dist/esm/api/types/AirWaybillStockNumbersAddRes.mjs +4 -0
- package/dist/esm/api/types/AirWaybillStockNumbersSummaryRes.d.mts +10 -0
- package/dist/esm/api/types/AirWaybillStockNumbersSummaryRes.mjs +4 -0
- package/dist/esm/api/{resources/cargoOnFlightIntegrations/resources/cargoai/client/requests → types}/CargoOnFlightBookingSearchClientCreate1.d.mts +0 -10
- package/dist/esm/api/types/CargoOnFlightBookingSearchClientCreate1.mjs +4 -0
- package/dist/esm/api/types/CargoOnFlightIntegrationEnum1.d.mts +2 -1
- package/dist/esm/api/types/CargoOnFlightIntegrationEnum1.mjs +1 -0
- package/dist/esm/api/types/index.d.mts +7 -0
- package/dist/esm/api/types/index.mjs +7 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +679 -2
- /package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/{cargoai/client/requests/CargoOnFlightBookingSearchClientCreate1.js → airCanada/client/requests/CargoOnFlightIntegrationsAirCanadaBookReq.js} +0 -0
- /package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/{cargoai/client/requests/CargoOnFlightBookingSearchClientCreate1.mjs → airCanada/client/requests/CargoOnFlightIntegrationsAirCanadaBookReq.mjs} +0 -0
package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/airCanada/client/Client.mjs
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
8
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
9
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
10
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
import * as environments from "../../../../../../environments.mjs";
|
|
14
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
15
|
+
import * as Chrt from "../../../../../index.mjs";
|
|
16
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
|
|
17
|
+
import * as errors from "../../../../../../errors/index.mjs";
|
|
18
|
+
export class AirCanada {
|
|
19
|
+
constructor(_options = {}) {
|
|
20
|
+
this._options = _options;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Books a draft booking on Air Canada with one result and rate of one of its searches, with the user's Air Canada AWB or one Air Canada assigns. | authz_personas=[task_group_coordinator_operators] | (CargoOnFlightIntegrationsAirCanadaBookReq) -> (CargoOnFlightBooking1)
|
|
24
|
+
*
|
|
25
|
+
* @param {string} cargoOnFlightBookingId
|
|
26
|
+
* @param {Chrt.cargoOnFlightIntegrations.CargoOnFlightIntegrationsAirCanadaBookReq} request
|
|
27
|
+
* @param {AirCanada.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
|
+
*
|
|
29
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* await client.cargoOnFlightIntegrations.airCanada.bookV1("cargo_on_flight_booking_id", {
|
|
33
|
+
* cargo_on_flight_booking_search_id: "cargo_on_flight_booking_search_id",
|
|
34
|
+
* integration_rate_id: "integration_rate_id",
|
|
35
|
+
* integration_result_id: "integration_result_id"
|
|
36
|
+
* })
|
|
37
|
+
*/
|
|
38
|
+
bookV1(cargoOnFlightBookingId, request, requestOptions) {
|
|
39
|
+
return core.HttpResponsePromise.fromPromise(this.__bookV1(cargoOnFlightBookingId, request, requestOptions));
|
|
40
|
+
}
|
|
41
|
+
__bookV1(cargoOnFlightBookingId, request, requestOptions) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
var _a, _b, _c, _d;
|
|
44
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
45
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
46
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `cargo_on_flight_integrations/air_canada/book/v1/${encodeURIComponent(cargoOnFlightBookingId)}`),
|
|
47
|
+
method: "POST",
|
|
48
|
+
headers: _headers,
|
|
49
|
+
contentType: "application/json",
|
|
50
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
51
|
+
requestType: "json",
|
|
52
|
+
body: request,
|
|
53
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
54
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
55
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
56
|
+
});
|
|
57
|
+
if (_response.ok) {
|
|
58
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
59
|
+
}
|
|
60
|
+
if (_response.error.reason === "status-code") {
|
|
61
|
+
switch (_response.error.statusCode) {
|
|
62
|
+
case 422:
|
|
63
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
64
|
+
default:
|
|
65
|
+
throw new errors.ChrtError({
|
|
66
|
+
statusCode: _response.error.statusCode,
|
|
67
|
+
body: _response.error.body,
|
|
68
|
+
rawResponse: _response.rawResponse,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
switch (_response.error.reason) {
|
|
73
|
+
case "non-json":
|
|
74
|
+
throw new errors.ChrtError({
|
|
75
|
+
statusCode: _response.error.statusCode,
|
|
76
|
+
body: _response.error.rawBody,
|
|
77
|
+
rawResponse: _response.rawResponse,
|
|
78
|
+
});
|
|
79
|
+
case "timeout":
|
|
80
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /cargo_on_flight_integrations/air_canada/book/v1/{cargo_on_flight_booking_id}.");
|
|
81
|
+
case "unknown":
|
|
82
|
+
throw new errors.ChrtError({
|
|
83
|
+
message: _response.error.errorMessage,
|
|
84
|
+
rawResponse: _response.rawResponse,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Deletes a booking on Air Canada and cancels it: a confirmed or requested one with an AWB, Air Canada's or else the requested one. | authz_personas=[task_group_coordinator_operators] | (CargoOnFlightIntegrationsAirCanadaCancelReq) -> (CargoOnFlightBooking1)
|
|
91
|
+
*
|
|
92
|
+
* @param {string} cargoOnFlightBookingId
|
|
93
|
+
* @param {Chrt.cargoOnFlightIntegrations.CargoOnFlightIntegrationsAirCanadaCancelReq} request
|
|
94
|
+
* @param {AirCanada.RequestOptions} requestOptions - Request-specific configuration.
|
|
95
|
+
*
|
|
96
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* await client.cargoOnFlightIntegrations.airCanada.cancelV1("cargo_on_flight_booking_id", {
|
|
100
|
+
* cancellation_reason: "cancellation_reason"
|
|
101
|
+
* })
|
|
102
|
+
*/
|
|
103
|
+
cancelV1(cargoOnFlightBookingId, request, requestOptions) {
|
|
104
|
+
return core.HttpResponsePromise.fromPromise(this.__cancelV1(cargoOnFlightBookingId, request, requestOptions));
|
|
105
|
+
}
|
|
106
|
+
__cancelV1(cargoOnFlightBookingId, request, requestOptions) {
|
|
107
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
var _a, _b, _c, _d;
|
|
109
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
110
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
111
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `cargo_on_flight_integrations/air_canada/cancel/v1/${encodeURIComponent(cargoOnFlightBookingId)}`),
|
|
112
|
+
method: "POST",
|
|
113
|
+
headers: _headers,
|
|
114
|
+
contentType: "application/json",
|
|
115
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
116
|
+
requestType: "json",
|
|
117
|
+
body: request,
|
|
118
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
119
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
120
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
121
|
+
});
|
|
122
|
+
if (_response.ok) {
|
|
123
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
124
|
+
}
|
|
125
|
+
if (_response.error.reason === "status-code") {
|
|
126
|
+
switch (_response.error.statusCode) {
|
|
127
|
+
case 422:
|
|
128
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
129
|
+
default:
|
|
130
|
+
throw new errors.ChrtError({
|
|
131
|
+
statusCode: _response.error.statusCode,
|
|
132
|
+
body: _response.error.body,
|
|
133
|
+
rawResponse: _response.rawResponse,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
switch (_response.error.reason) {
|
|
138
|
+
case "non-json":
|
|
139
|
+
throw new errors.ChrtError({
|
|
140
|
+
statusCode: _response.error.statusCode,
|
|
141
|
+
body: _response.error.rawBody,
|
|
142
|
+
rawResponse: _response.rawResponse,
|
|
143
|
+
});
|
|
144
|
+
case "timeout":
|
|
145
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /cargo_on_flight_integrations/air_canada/cancel/v1/{cargo_on_flight_booking_id}.");
|
|
146
|
+
case "unknown":
|
|
147
|
+
throw new errors.ChrtError({
|
|
148
|
+
message: _response.error.errorMessage,
|
|
149
|
+
rawResponse: _response.rawResponse,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Quotes Air Canada flights with space and rates for a draft booking's cargos on a route and dates, and stores the search. | authz_personas=[task_group_coordinator_operators] | (CargoOnFlightBookingSearchClientCreate1) -> (CargoOnFlightBookingSearch1)
|
|
156
|
+
*
|
|
157
|
+
* @param {string} cargoOnFlightBookingId
|
|
158
|
+
* @param {Chrt.CargoOnFlightBookingSearchClientCreate1} request
|
|
159
|
+
* @param {AirCanada.RequestOptions} requestOptions - Request-specific configuration.
|
|
160
|
+
*
|
|
161
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* await client.cargoOnFlightIntegrations.airCanada.searchV1("cargo_on_flight_booking_id", {
|
|
165
|
+
* destination_iata: "destination_iata",
|
|
166
|
+
* earliest_departure_date: "earliest_departure_date",
|
|
167
|
+
* iata_cass_office_id: "iata_cass_office_id",
|
|
168
|
+
* origin_iata: "origin_iata",
|
|
169
|
+
* schema_version: 1
|
|
170
|
+
* })
|
|
171
|
+
*/
|
|
172
|
+
searchV1(cargoOnFlightBookingId, request, requestOptions) {
|
|
173
|
+
return core.HttpResponsePromise.fromPromise(this.__searchV1(cargoOnFlightBookingId, request, requestOptions));
|
|
174
|
+
}
|
|
175
|
+
__searchV1(cargoOnFlightBookingId, request, requestOptions) {
|
|
176
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
177
|
+
var _a, _b, _c, _d;
|
|
178
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
179
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
180
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, `cargo_on_flight_integrations/air_canada/search/v1/${encodeURIComponent(cargoOnFlightBookingId)}`),
|
|
181
|
+
method: "POST",
|
|
182
|
+
headers: _headers,
|
|
183
|
+
contentType: "application/json",
|
|
184
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
185
|
+
requestType: "json",
|
|
186
|
+
body: request,
|
|
187
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
188
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
189
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
190
|
+
});
|
|
191
|
+
if (_response.ok) {
|
|
192
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
193
|
+
}
|
|
194
|
+
if (_response.error.reason === "status-code") {
|
|
195
|
+
switch (_response.error.statusCode) {
|
|
196
|
+
case 422:
|
|
197
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
198
|
+
default:
|
|
199
|
+
throw new errors.ChrtError({
|
|
200
|
+
statusCode: _response.error.statusCode,
|
|
201
|
+
body: _response.error.body,
|
|
202
|
+
rawResponse: _response.rawResponse,
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
switch (_response.error.reason) {
|
|
207
|
+
case "non-json":
|
|
208
|
+
throw new errors.ChrtError({
|
|
209
|
+
statusCode: _response.error.statusCode,
|
|
210
|
+
body: _response.error.rawBody,
|
|
211
|
+
rawResponse: _response.rawResponse,
|
|
212
|
+
});
|
|
213
|
+
case "timeout":
|
|
214
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /cargo_on_flight_integrations/air_canada/search/v1/{cargo_on_flight_booking_id}.");
|
|
215
|
+
case "unknown":
|
|
216
|
+
throw new errors.ChrtError({
|
|
217
|
+
message: _response.error.errorMessage,
|
|
218
|
+
rawResponse: _response.rawResponse,
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
_getAuthorizationHeader() {
|
|
224
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
225
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
226
|
+
if (bearer != null) {
|
|
227
|
+
return `Bearer ${bearer}`;
|
|
228
|
+
}
|
|
229
|
+
return undefined;
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* cargo_on_flight_booking_search_id: "cargo_on_flight_booking_search_id",
|
|
8
|
+
* integration_rate_id: "integration_rate_id",
|
|
9
|
+
* integration_result_id: "integration_result_id"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface CargoOnFlightIntegrationsAirCanadaBookReq {
|
|
13
|
+
/** IATA Air Waybill number: 3-digit airline prefix + 8-digit serial, e.g. '020-12345678'. */
|
|
14
|
+
awb_number?: string | null;
|
|
15
|
+
cargo_on_flight_booking_search_id: string;
|
|
16
|
+
integration_rate_id: string;
|
|
17
|
+
integration_result_id: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* cancellation_reason: "cancellation_reason"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface CargoOnFlightIntegrationsAirCanadaCancelReq {
|
|
11
|
+
cancellation_reason: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/Client.d.mts
CHANGED
|
@@ -145,7 +145,7 @@ export declare class Cargoai {
|
|
|
145
145
|
* Starts a CargoAi search for flights with space and rates for a draft booking's cargos on a route and date, and stores it. | authz_personas=[task_group_coordinator_operators] | (CargoOnFlightBookingSearchClientCreate1) -> (CargoOnFlightBookingSearch1)
|
|
146
146
|
*
|
|
147
147
|
* @param {string} cargoOnFlightBookingId
|
|
148
|
-
* @param {Chrt.
|
|
148
|
+
* @param {Chrt.CargoOnFlightBookingSearchClientCreate1} request
|
|
149
149
|
* @param {Cargoai.RequestOptions} requestOptions - Request-specific configuration.
|
|
150
150
|
*
|
|
151
151
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
@@ -159,7 +159,7 @@ export declare class Cargoai {
|
|
|
159
159
|
* schema_version: 1
|
|
160
160
|
* })
|
|
161
161
|
*/
|
|
162
|
-
searchV1(cargoOnFlightBookingId: string, request: Chrt.
|
|
162
|
+
searchV1(cargoOnFlightBookingId: string, request: Chrt.CargoOnFlightBookingSearchClientCreate1, requestOptions?: Cargoai.RequestOptions): core.HttpResponsePromise<Chrt.CargoOnFlightBookingSearch1>;
|
|
163
163
|
private __searchV1;
|
|
164
164
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
165
165
|
}
|
package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/Client.mjs
CHANGED
|
@@ -495,7 +495,7 @@ export class Cargoai {
|
|
|
495
495
|
* Starts a CargoAi search for flights with space and rates for a draft booking's cargos on a route and date, and stores it. | authz_personas=[task_group_coordinator_operators] | (CargoOnFlightBookingSearchClientCreate1) -> (CargoOnFlightBookingSearch1)
|
|
496
496
|
*
|
|
497
497
|
* @param {string} cargoOnFlightBookingId
|
|
498
|
-
* @param {Chrt.
|
|
498
|
+
* @param {Chrt.CargoOnFlightBookingSearchClientCreate1} request
|
|
499
499
|
* @param {Cargoai.RequestOptions} requestOptions - Request-specific configuration.
|
|
500
500
|
*
|
|
501
501
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
@@ -3,4 +3,3 @@ export { type CargoOnFlightIntegrationsCargoAiSendAirWaybillReq } from "./CargoO
|
|
|
3
3
|
export { type CargoOnFlightIntegrationsCargoAiSimulateAirlineResponseReq } from "./CargoOnFlightIntegrationsCargoAiSimulateAirlineResponseReq.mjs";
|
|
4
4
|
export { type CargoOnFlightIntegrationsCargoAiBookReq } from "./CargoOnFlightIntegrationsCargoAiBookReq.mjs";
|
|
5
5
|
export { type CargoOnFlightIntegrationsCargoAiCancelReq } from "./CargoOnFlightIntegrationsCargoAiCancelReq.mjs";
|
|
6
|
-
export { type CargoOnFlightBookingSearchClientCreate1 } from "./CargoOnFlightBookingSearchClientCreate1.mjs";
|
|
@@ -5,6 +5,7 @@ import * as environments from "../../../../environments.mjs";
|
|
|
5
5
|
import * as core from "../../../../core/index.mjs";
|
|
6
6
|
import * as Chrt from "../../../index.mjs";
|
|
7
7
|
import { Accounts } from "../resources/accounts/client/Client.mjs";
|
|
8
|
+
import { AirWaybillStockNumbers } from "../resources/airWaybillStockNumbers/client/Client.mjs";
|
|
8
9
|
import { ComplianceDocuments } from "../resources/complianceDocuments/client/Client.mjs";
|
|
9
10
|
import { Connections } from "../resources/connections/client/Client.mjs";
|
|
10
11
|
import { Contacts } from "../resources/contacts/client/Client.mjs";
|
|
@@ -38,6 +39,7 @@ export declare namespace Orgs {
|
|
|
38
39
|
export declare class Orgs {
|
|
39
40
|
protected readonly _options: Orgs.Options;
|
|
40
41
|
protected _accounts: Accounts | undefined;
|
|
42
|
+
protected _airWaybillStockNumbers: AirWaybillStockNumbers | undefined;
|
|
41
43
|
protected _complianceDocuments: ComplianceDocuments | undefined;
|
|
42
44
|
protected _connections: Connections | undefined;
|
|
43
45
|
protected _contacts: Contacts | undefined;
|
|
@@ -47,6 +49,7 @@ export declare class Orgs {
|
|
|
47
49
|
protected _publicData: PublicData | undefined;
|
|
48
50
|
constructor(_options?: Orgs.Options);
|
|
49
51
|
get accounts(): Accounts;
|
|
52
|
+
get airWaybillStockNumbers(): AirWaybillStockNumbers;
|
|
50
53
|
get complianceDocuments(): ComplianceDocuments;
|
|
51
54
|
get connections(): Connections;
|
|
52
55
|
get contacts(): Contacts;
|
|
@@ -16,6 +16,7 @@ import * as Chrt from "../../../index.mjs";
|
|
|
16
16
|
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
17
17
|
import * as errors from "../../../../errors/index.mjs";
|
|
18
18
|
import { Accounts } from "../resources/accounts/client/Client.mjs";
|
|
19
|
+
import { AirWaybillStockNumbers } from "../resources/airWaybillStockNumbers/client/Client.mjs";
|
|
19
20
|
import { ComplianceDocuments } from "../resources/complianceDocuments/client/Client.mjs";
|
|
20
21
|
import { Connections } from "../resources/connections/client/Client.mjs";
|
|
21
22
|
import { Contacts } from "../resources/contacts/client/Client.mjs";
|
|
@@ -31,6 +32,10 @@ export class Orgs {
|
|
|
31
32
|
var _a;
|
|
32
33
|
return ((_a = this._accounts) !== null && _a !== void 0 ? _a : (this._accounts = new Accounts(this._options)));
|
|
33
34
|
}
|
|
35
|
+
get airWaybillStockNumbers() {
|
|
36
|
+
var _a;
|
|
37
|
+
return ((_a = this._airWaybillStockNumbers) !== null && _a !== void 0 ? _a : (this._airWaybillStockNumbers = new AirWaybillStockNumbers(this._options)));
|
|
38
|
+
}
|
|
34
39
|
get complianceDocuments() {
|
|
35
40
|
var _a;
|
|
36
41
|
return ((_a = this._complianceDocuments) !== null && _a !== void 0 ? _a : (this._complianceDocuments = new ComplianceDocuments(this._options)));
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../../../environments.mjs";
|
|
5
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
6
|
+
import * as Chrt from "../../../../../index.mjs";
|
|
7
|
+
export declare namespace AirWaybillStockNumbers {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.ChrtEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
|
+
/** Additional headers to include in requests. */
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
|
+
fetcher?: core.FetchFunction;
|
|
16
|
+
}
|
|
17
|
+
interface RequestOptions {
|
|
18
|
+
/** The maximum time to wait for a response in seconds. */
|
|
19
|
+
timeoutInSeconds?: number;
|
|
20
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
21
|
+
maxRetries?: number;
|
|
22
|
+
/** A hook to abort the request. */
|
|
23
|
+
abortSignal?: AbortSignal;
|
|
24
|
+
/** Additional query string parameters to include in the request. */
|
|
25
|
+
queryParams?: Record<string, unknown>;
|
|
26
|
+
/** Additional headers to include in the request. */
|
|
27
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export declare class AirWaybillStockNumbers {
|
|
31
|
+
protected readonly _options: AirWaybillStockNumbers.Options;
|
|
32
|
+
constructor(_options?: AirWaybillStockNumbers.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Adds AWB numbers an airline gave the caller's organization to its AWB stock, skipping numbers already in it. | authz: min_org_role=operator | (AirWaybillStockNumbersAddReq) -> (AirWaybillStockNumbersAddRes)
|
|
35
|
+
*
|
|
36
|
+
* @param {Chrt.orgs.AirWaybillStockNumbersAddReq} request
|
|
37
|
+
* @param {AirWaybillStockNumbers.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
|
+
*
|
|
39
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* await client.orgs.airWaybillStockNumbers.addV1({
|
|
43
|
+
* awb_numbers: ["awb_numbers"]
|
|
44
|
+
* })
|
|
45
|
+
*/
|
|
46
|
+
addV1(request: Chrt.orgs.AirWaybillStockNumbersAddReq, requestOptions?: AirWaybillStockNumbers.RequestOptions): core.HttpResponsePromise<Chrt.AirWaybillStockNumbersAddRes>;
|
|
47
|
+
private __addV1;
|
|
48
|
+
/**
|
|
49
|
+
* Deletes an available AWB number from the caller's organization's AWB stock, e.g. one added by mistake. | authz: min_org_role=operator | () -> (bool)
|
|
50
|
+
*
|
|
51
|
+
* @param {string} airWaybillStockNumberId
|
|
52
|
+
* @param {AirWaybillStockNumbers.RequestOptions} requestOptions - Request-specific configuration.
|
|
53
|
+
*
|
|
54
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* await client.orgs.airWaybillStockNumbers.deleteV1("air_waybill_stock_number_id")
|
|
58
|
+
*/
|
|
59
|
+
deleteV1(airWaybillStockNumberId: string, requestOptions?: AirWaybillStockNumbers.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
60
|
+
private __deleteV1;
|
|
61
|
+
/**
|
|
62
|
+
* Lists the AWB numbers in the caller's organization's AWB stock, by airline prefix and status. | () -> (AirWaybillStockNumberListRes)
|
|
63
|
+
*
|
|
64
|
+
* @param {Chrt.orgs.AirWaybillStockNumbersListV1Request} request
|
|
65
|
+
* @param {AirWaybillStockNumbers.RequestOptions} requestOptions - Request-specific configuration.
|
|
66
|
+
*
|
|
67
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* await client.orgs.airWaybillStockNumbers.listV1({
|
|
71
|
+
* filter_awb_prefix: "filter_awb_prefix",
|
|
72
|
+
* filter_status: ["available"],
|
|
73
|
+
* sort_by: "awb_number",
|
|
74
|
+
* sort_order: "asc",
|
|
75
|
+
* page: 1,
|
|
76
|
+
* page_size: 1
|
|
77
|
+
* })
|
|
78
|
+
*/
|
|
79
|
+
listV1(request?: Chrt.orgs.AirWaybillStockNumbersListV1Request, requestOptions?: AirWaybillStockNumbers.RequestOptions): core.HttpResponsePromise<Chrt.AirWaybillStockNumberListRes>;
|
|
80
|
+
private __listV1;
|
|
81
|
+
/**
|
|
82
|
+
* Marks AWB numbers of the caller's organization's AWB stock as available, whatever their status, taking them off their booking. | authz: min_org_role=operator | (AirWaybillStockNumbersMarkAvailableReq) -> (list[AirWaybillStockNumber1])
|
|
83
|
+
*
|
|
84
|
+
* @param {Chrt.orgs.AirWaybillStockNumbersMarkAvailableReq} request
|
|
85
|
+
* @param {AirWaybillStockNumbers.RequestOptions} requestOptions - Request-specific configuration.
|
|
86
|
+
*
|
|
87
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* await client.orgs.airWaybillStockNumbers.markAvailableV1({
|
|
91
|
+
* awb_numbers: ["awb_numbers"]
|
|
92
|
+
* })
|
|
93
|
+
*/
|
|
94
|
+
markAvailableV1(request: Chrt.orgs.AirWaybillStockNumbersMarkAvailableReq, requestOptions?: AirWaybillStockNumbers.RequestOptions): core.HttpResponsePromise<Chrt.AirWaybillStockNumber1[]>;
|
|
95
|
+
private __markAvailableV1;
|
|
96
|
+
/**
|
|
97
|
+
* Marks AWB numbers of the caller's organization's AWB stock as used, whatever their status, e.g. booked outside CHRT. | authz: min_org_role=operator | (AirWaybillStockNumbersMarkUsedReq) -> (list[AirWaybillStockNumber1])
|
|
98
|
+
*
|
|
99
|
+
* @param {Chrt.orgs.AirWaybillStockNumbersMarkUsedReq} request
|
|
100
|
+
* @param {AirWaybillStockNumbers.RequestOptions} requestOptions - Request-specific configuration.
|
|
101
|
+
*
|
|
102
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* await client.orgs.airWaybillStockNumbers.markUsedV1({
|
|
106
|
+
* awb_numbers: ["awb_numbers"]
|
|
107
|
+
* })
|
|
108
|
+
*/
|
|
109
|
+
markUsedV1(request: Chrt.orgs.AirWaybillStockNumbersMarkUsedReq, requestOptions?: AirWaybillStockNumbers.RequestOptions): core.HttpResponsePromise<Chrt.AirWaybillStockNumber1[]>;
|
|
110
|
+
private __markUsedV1;
|
|
111
|
+
/**
|
|
112
|
+
* Counts the caller's organization's AWB stock per airline prefix and status. | () -> (list[AirWaybillStockNumbersSummaryRes])
|
|
113
|
+
*
|
|
114
|
+
* @param {AirWaybillStockNumbers.RequestOptions} requestOptions - Request-specific configuration.
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* await client.orgs.airWaybillStockNumbers.summaryV1()
|
|
118
|
+
*/
|
|
119
|
+
summaryV1(requestOptions?: AirWaybillStockNumbers.RequestOptions): core.HttpResponsePromise<Chrt.AirWaybillStockNumbersSummaryRes[]>;
|
|
120
|
+
private __summaryV1;
|
|
121
|
+
/**
|
|
122
|
+
* Voids available AWB numbers of the caller's organization's AWB stock, e.g. spoiled or returned to the airline. | authz: min_org_role=operator | (AirWaybillStockNumbersVoidReq) -> (list[AirWaybillStockNumber1])
|
|
123
|
+
*
|
|
124
|
+
* @param {Chrt.orgs.AirWaybillStockNumbersVoidReq} request
|
|
125
|
+
* @param {AirWaybillStockNumbers.RequestOptions} requestOptions - Request-specific configuration.
|
|
126
|
+
*
|
|
127
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* await client.orgs.airWaybillStockNumbers.voidV1({
|
|
131
|
+
* awb_numbers: ["awb_numbers"]
|
|
132
|
+
* })
|
|
133
|
+
*/
|
|
134
|
+
voidV1(request: Chrt.orgs.AirWaybillStockNumbersVoidReq, requestOptions?: AirWaybillStockNumbers.RequestOptions): core.HttpResponsePromise<Chrt.AirWaybillStockNumber1[]>;
|
|
135
|
+
private __voidV1;
|
|
136
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
137
|
+
}
|