@chrt-inc/typescript-sdk 1.1011.0 → 1.1013.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.d.ts +3 -0
- package/dist/cjs/Client.js +25 -20
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/client/Client.d.ts +23 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/client/Client.js +17 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/client/index.js +2 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/index.d.ts +2 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/index.js +18 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/Client.d.ts +114 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/Client.js +387 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/index.js +17 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/requests/CargoOnFlightBookingSearchClientCreate1.d.ts +20 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/requests/CargoOnFlightBookingSearchClientCreate1.js +5 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/requests/CargoOnFlightIntegrationsCargoAiBookReq.d.ts +18 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/requests/CargoOnFlightIntegrationsCargoAiBookReq.js +5 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/requests/CargoOnFlightIntegrationsCargoAiCancelReq.d.ts +12 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/requests/CargoOnFlightIntegrationsCargoAiCancelReq.js +5 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/cargoai/index.d.ts +1 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/cargoai/index.js +17 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/cargoOnFlightIntegrations/resources/index.js +41 -0
- package/dist/cjs/api/resources/index.d.ts +1 -0
- package/dist/cjs/api/resources/index.js +2 -1
- package/dist/cjs/api/resources/orgs/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/orgs/client/Client.js +11 -6
- package/dist/cjs/api/resources/orgs/resources/iataCassOffices/client/Client.d.ts +93 -0
- package/dist/cjs/api/resources/orgs/resources/iataCassOffices/client/Client.js +331 -0
- package/dist/cjs/api/resources/orgs/resources/iataCassOffices/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/orgs/resources/iataCassOffices/client/index.js +17 -0
- package/dist/cjs/api/resources/orgs/resources/iataCassOffices/client/requests/IataCassOfficeClientUpdate1.d.ts +13 -0
- package/dist/cjs/api/resources/orgs/resources/iataCassOffices/client/requests/IataCassOfficeClientUpdate1.js +5 -0
- package/dist/cjs/api/resources/orgs/resources/iataCassOffices/client/requests/IataCassOfficesListV1Request.d.ts +24 -0
- package/dist/cjs/api/resources/orgs/resources/iataCassOffices/client/requests/IataCassOfficesListV1Request.js +5 -0
- package/dist/cjs/api/resources/orgs/resources/iataCassOffices/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/orgs/resources/iataCassOffices/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/orgs/resources/iataCassOffices/index.d.ts +1 -0
- package/dist/cjs/api/resources/orgs/resources/iataCassOffices/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/client/Client.d.ts +6 -0
- package/dist/cjs/api/resources/shipping/client/Client.js +24 -14
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookingSearches/client/Client.d.ts +68 -0
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookingSearches/client/Client.js +218 -0
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookingSearches/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookingSearches/client/index.js +17 -0
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookingSearches/client/requests/CargoOnFlightBookingSearchesListV1Request.d.ts +30 -0
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookingSearches/client/requests/CargoOnFlightBookingSearchesListV1Request.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookingSearches/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookingSearches/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookingSearches/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookingSearches/index.js +17 -0
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookings/client/Client.d.ts +120 -0
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookings/client/Client.js +416 -0
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookings/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookings/client/index.js +17 -0
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookings/client/requests/CargoOnFlightBookingClientCreate1.d.ts +31 -0
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookings/client/requests/CargoOnFlightBookingClientCreate1.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookings/client/requests/CargoOnFlightBookingsListV1Request.d.ts +33 -0
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookings/client/requests/CargoOnFlightBookingsListV1Request.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookings/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookings/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookings/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/cargoOnFlightBookings/index.js +17 -0
- package/dist/cjs/api/resources/shipping/resources/index.d.ts +4 -0
- package/dist/cjs/api/resources/shipping/resources/index.js +5 -1
- package/dist/cjs/api/types/CargoOnFlightBooking1.d.ts +34 -0
- package/dist/cjs/api/types/CargoOnFlightBooking1.js +5 -0
- package/dist/cjs/api/types/CargoOnFlightBookingCargoDimension1.d.ts +15 -0
- package/dist/cjs/api/types/CargoOnFlightBookingCargoDimension1.js +5 -0
- package/dist/cjs/api/types/CargoOnFlightBookingItinerary1.d.ts +13 -0
- package/dist/cjs/api/types/CargoOnFlightBookingItinerary1.js +5 -0
- package/dist/cjs/api/types/CargoOnFlightBookingItineraryLeg1.d.ts +15 -0
- package/dist/cjs/api/types/CargoOnFlightBookingItineraryLeg1.js +5 -0
- package/dist/cjs/api/types/CargoOnFlightBookingListRes.d.ts +8 -0
- package/dist/cjs/api/types/CargoOnFlightBookingListRes.js +5 -0
- package/dist/cjs/api/types/CargoOnFlightBookingRate1.d.ts +12 -0
- package/dist/cjs/api/types/CargoOnFlightBookingRate1.js +5 -0
- package/dist/cjs/api/types/CargoOnFlightBookingSearch1.d.ts +23 -0
- package/dist/cjs/api/types/CargoOnFlightBookingSearch1.js +5 -0
- package/dist/cjs/api/types/CargoOnFlightBookingSearchListRes.d.ts +8 -0
- package/dist/cjs/api/types/CargoOnFlightBookingSearchListRes.js +5 -0
- package/dist/cjs/api/types/CargoOnFlightBookingSearchResult1.d.ts +16 -0
- package/dist/cjs/api/types/CargoOnFlightBookingSearchResult1.js +5 -0
- package/dist/cjs/api/types/CargoOnFlightBookingSearchSortByEnum.d.ts +4 -0
- package/dist/cjs/api/types/CargoOnFlightBookingSearchSortByEnum.js +5 -0
- package/dist/cjs/api/types/CargoOnFlightBookingSortByEnum.d.ts +4 -0
- package/dist/cjs/api/types/CargoOnFlightBookingSortByEnum.js +5 -0
- package/dist/cjs/api/types/CargoOnFlightBookingStatusEnum1.d.ts +13 -0
- package/dist/cjs/api/types/CargoOnFlightBookingStatusEnum1.js +15 -0
- package/dist/cjs/api/types/CargoOnFlightIntegrationEnum1.d.ts +8 -0
- package/dist/cjs/api/types/CargoOnFlightIntegrationEnum1.js +10 -0
- package/dist/cjs/api/types/CargoOnFlightIntegrationsCargoAiWebhookRes.d.ts +6 -0
- package/dist/cjs/api/types/CargoOnFlightIntegrationsCargoAiWebhookRes.js +5 -0
- package/dist/cjs/api/types/FlightLegProvenanceEnum1.d.ts +2 -1
- package/dist/cjs/api/types/FlightLegProvenanceEnum1.js +1 -0
- package/dist/cjs/api/types/IataCassOffice1.d.ts +22 -0
- package/dist/cjs/api/types/IataCassOffice1.js +5 -0
- package/dist/cjs/api/types/IataCassOfficeListRes.d.ts +8 -0
- package/dist/cjs/api/types/IataCassOfficeListRes.js +5 -0
- package/dist/cjs/api/types/IataCassOfficeSortByEnum.d.ts +8 -0
- package/dist/cjs/api/types/IataCassOfficeSortByEnum.js +10 -0
- package/dist/cjs/api/types/index.d.ts +17 -0
- package/dist/cjs/api/types/index.js +17 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +3 -0
- package/dist/esm/Client.mjs +7 -2
- package/dist/esm/api/resources/cargoOnFlightIntegrations/client/Client.d.mts +23 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/client/Client.mjs +13 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/client/index.d.mts +1 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/client/index.mjs +1 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/index.d.mts +2 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/index.mjs +2 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/Client.d.mts +114 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/Client.mjs +350 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/index.d.mts +2 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/index.mjs +1 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/requests/CargoOnFlightBookingSearchClientCreate1.d.mts +20 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/requests/CargoOnFlightBookingSearchClientCreate1.mjs +4 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/requests/CargoOnFlightIntegrationsCargoAiBookReq.d.mts +18 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/requests/CargoOnFlightIntegrationsCargoAiBookReq.mjs +4 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/requests/CargoOnFlightIntegrationsCargoAiCancelReq.d.mts +12 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/requests/CargoOnFlightIntegrationsCargoAiCancelReq.mjs +4 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/cargoai/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/cargoai/index.d.mts +1 -0
- package/dist/esm/api/resources/cargoOnFlightIntegrations/resources/cargoai/index.mjs +1 -0
- 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/index.d.mts +1 -0
- package/dist/esm/api/resources/index.mjs +1 -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/iataCassOffices/client/Client.d.mts +93 -0
- package/dist/esm/api/resources/orgs/resources/iataCassOffices/client/Client.mjs +294 -0
- package/dist/esm/api/resources/orgs/resources/iataCassOffices/client/index.d.mts +2 -0
- package/dist/esm/api/resources/orgs/resources/iataCassOffices/client/index.mjs +1 -0
- package/dist/esm/api/resources/orgs/resources/iataCassOffices/client/requests/IataCassOfficeClientUpdate1.d.mts +13 -0
- package/dist/esm/api/resources/orgs/resources/iataCassOffices/client/requests/IataCassOfficeClientUpdate1.mjs +4 -0
- package/dist/esm/api/resources/orgs/resources/iataCassOffices/client/requests/IataCassOfficesListV1Request.d.mts +24 -0
- package/dist/esm/api/resources/orgs/resources/iataCassOffices/client/requests/IataCassOfficesListV1Request.mjs +4 -0
- package/dist/esm/api/resources/orgs/resources/iataCassOffices/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/orgs/resources/iataCassOffices/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/orgs/resources/iataCassOffices/index.d.mts +1 -0
- package/dist/esm/api/resources/orgs/resources/iataCassOffices/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/client/Client.d.mts +6 -0
- package/dist/esm/api/resources/shipping/client/Client.mjs +10 -0
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookingSearches/client/Client.d.mts +68 -0
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookingSearches/client/Client.mjs +181 -0
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookingSearches/client/index.d.mts +2 -0
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookingSearches/client/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookingSearches/client/requests/CargoOnFlightBookingSearchesListV1Request.d.mts +30 -0
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookingSearches/client/requests/CargoOnFlightBookingSearchesListV1Request.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookingSearches/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookingSearches/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookingSearches/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookingSearches/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookings/client/Client.d.mts +120 -0
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookings/client/Client.mjs +379 -0
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookings/client/index.d.mts +2 -0
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookings/client/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookings/client/requests/CargoOnFlightBookingClientCreate1.d.mts +31 -0
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookings/client/requests/CargoOnFlightBookingClientCreate1.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookings/client/requests/CargoOnFlightBookingsListV1Request.d.mts +33 -0
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookings/client/requests/CargoOnFlightBookingsListV1Request.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookings/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookings/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookings/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookings/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/index.d.mts +4 -0
- package/dist/esm/api/resources/shipping/resources/index.mjs +4 -0
- package/dist/esm/api/types/CargoOnFlightBooking1.d.mts +34 -0
- package/dist/esm/api/types/CargoOnFlightBooking1.mjs +4 -0
- package/dist/esm/api/types/CargoOnFlightBookingCargoDimension1.d.mts +15 -0
- package/dist/esm/api/types/CargoOnFlightBookingCargoDimension1.mjs +4 -0
- package/dist/esm/api/types/CargoOnFlightBookingItinerary1.d.mts +13 -0
- package/dist/esm/api/types/CargoOnFlightBookingItinerary1.mjs +4 -0
- package/dist/esm/api/types/CargoOnFlightBookingItineraryLeg1.d.mts +15 -0
- package/dist/esm/api/types/CargoOnFlightBookingItineraryLeg1.mjs +4 -0
- package/dist/esm/api/types/CargoOnFlightBookingListRes.d.mts +8 -0
- package/dist/esm/api/types/CargoOnFlightBookingListRes.mjs +4 -0
- package/dist/esm/api/types/CargoOnFlightBookingRate1.d.mts +12 -0
- package/dist/esm/api/types/CargoOnFlightBookingRate1.mjs +4 -0
- package/dist/esm/api/types/CargoOnFlightBookingSearch1.d.mts +23 -0
- package/dist/esm/api/types/CargoOnFlightBookingSearch1.mjs +4 -0
- package/dist/esm/api/types/CargoOnFlightBookingSearchListRes.d.mts +8 -0
- package/dist/esm/api/types/CargoOnFlightBookingSearchListRes.mjs +4 -0
- package/dist/esm/api/types/CargoOnFlightBookingSearchResult1.d.mts +16 -0
- package/dist/esm/api/types/CargoOnFlightBookingSearchResult1.mjs +4 -0
- package/dist/esm/api/types/CargoOnFlightBookingSearchSortByEnum.d.mts +4 -0
- package/dist/esm/api/types/CargoOnFlightBookingSearchSortByEnum.mjs +4 -0
- package/dist/esm/api/types/CargoOnFlightBookingSortByEnum.d.mts +4 -0
- package/dist/esm/api/types/CargoOnFlightBookingSortByEnum.mjs +4 -0
- package/dist/esm/api/types/CargoOnFlightBookingStatusEnum1.d.mts +13 -0
- package/dist/esm/api/types/CargoOnFlightBookingStatusEnum1.mjs +12 -0
- package/dist/esm/api/types/CargoOnFlightIntegrationEnum1.d.mts +8 -0
- package/dist/esm/api/types/CargoOnFlightIntegrationEnum1.mjs +7 -0
- package/dist/esm/api/types/CargoOnFlightIntegrationsCargoAiWebhookRes.d.mts +6 -0
- package/dist/esm/api/types/CargoOnFlightIntegrationsCargoAiWebhookRes.mjs +4 -0
- package/dist/esm/api/types/FlightLegProvenanceEnum1.d.mts +2 -1
- package/dist/esm/api/types/FlightLegProvenanceEnum1.mjs +1 -0
- package/dist/esm/api/types/IataCassOffice1.d.mts +22 -0
- package/dist/esm/api/types/IataCassOffice1.mjs +4 -0
- package/dist/esm/api/types/IataCassOfficeListRes.d.mts +8 -0
- package/dist/esm/api/types/IataCassOfficeListRes.mjs +4 -0
- package/dist/esm/api/types/IataCassOfficeSortByEnum.d.mts +8 -0
- package/dist/esm/api/types/IataCassOfficeSortByEnum.mjs +7 -0
- package/dist/esm/api/types/index.d.mts +17 -0
- package/dist/esm/api/types/index.mjs +17 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +2602 -1505
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
exports.Cargoai = void 0;
|
|
49
|
+
const environments = __importStar(require("../../../../../../environments.js"));
|
|
50
|
+
const core = __importStar(require("../../../../../../core/index.js"));
|
|
51
|
+
const Chrt = __importStar(require("../../../../../index.js"));
|
|
52
|
+
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
53
|
+
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
54
|
+
class Cargoai {
|
|
55
|
+
constructor(_options = {}) {
|
|
56
|
+
this._options = _options;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Books a draft booking on CargoAi with one result and rate of one of its searches, with the user's AWB or one from the airline's stock. | authz_personas=[task_group_coordinator_operators] | (CargoOnFlightIntegrationsCargoAiBookReq) -> (CargoOnFlightBooking1)
|
|
60
|
+
*
|
|
61
|
+
* @param {string} cargoOnFlightBookingId
|
|
62
|
+
* @param {Chrt.cargoOnFlightIntegrations.CargoOnFlightIntegrationsCargoAiBookReq} request
|
|
63
|
+
* @param {Cargoai.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* await client.cargoOnFlightIntegrations.cargoai.bookV1("cargo_on_flight_booking_id", {
|
|
69
|
+
* cargo_on_flight_booking_search_id: "cargo_on_flight_booking_search_id",
|
|
70
|
+
* integration_rate_id: "integration_rate_id",
|
|
71
|
+
* integration_result_id: "integration_result_id"
|
|
72
|
+
* })
|
|
73
|
+
*/
|
|
74
|
+
bookV1(cargoOnFlightBookingId, request, requestOptions) {
|
|
75
|
+
return core.HttpResponsePromise.fromPromise(this.__bookV1(cargoOnFlightBookingId, request, requestOptions));
|
|
76
|
+
}
|
|
77
|
+
__bookV1(cargoOnFlightBookingId, request, requestOptions) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
var _a, _b, _c, _d;
|
|
80
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
81
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
82
|
+
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/cargoai/book/v1/${encodeURIComponent(cargoOnFlightBookingId)}`),
|
|
83
|
+
method: "POST",
|
|
84
|
+
headers: _headers,
|
|
85
|
+
contentType: "application/json",
|
|
86
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
87
|
+
requestType: "json",
|
|
88
|
+
body: request,
|
|
89
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
90
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
91
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
92
|
+
});
|
|
93
|
+
if (_response.ok) {
|
|
94
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
95
|
+
}
|
|
96
|
+
if (_response.error.reason === "status-code") {
|
|
97
|
+
switch (_response.error.statusCode) {
|
|
98
|
+
case 422:
|
|
99
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
100
|
+
default:
|
|
101
|
+
throw new errors.ChrtError({
|
|
102
|
+
statusCode: _response.error.statusCode,
|
|
103
|
+
body: _response.error.body,
|
|
104
|
+
rawResponse: _response.rawResponse,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
switch (_response.error.reason) {
|
|
109
|
+
case "non-json":
|
|
110
|
+
throw new errors.ChrtError({
|
|
111
|
+
statusCode: _response.error.statusCode,
|
|
112
|
+
body: _response.error.rawBody,
|
|
113
|
+
rawResponse: _response.rawResponse,
|
|
114
|
+
});
|
|
115
|
+
case "timeout":
|
|
116
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /cargo_on_flight_integrations/cargoai/book/v1/{cargo_on_flight_booking_id}.");
|
|
117
|
+
case "unknown":
|
|
118
|
+
throw new errors.ChrtError({
|
|
119
|
+
message: _response.error.errorMessage,
|
|
120
|
+
rawResponse: _response.rawResponse,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Asks CargoAi to cancel a confirmed booking; it is CANCELLATION_REQUESTED until the airline answers. | authz_personas=[task_group_coordinator_operators] | (CargoOnFlightIntegrationsCargoAiCancelReq) -> (CargoOnFlightBooking1)
|
|
127
|
+
*
|
|
128
|
+
* @param {string} cargoOnFlightBookingId
|
|
129
|
+
* @param {Chrt.cargoOnFlightIntegrations.CargoOnFlightIntegrationsCargoAiCancelReq} request
|
|
130
|
+
* @param {Cargoai.RequestOptions} requestOptions - Request-specific configuration.
|
|
131
|
+
*
|
|
132
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* await client.cargoOnFlightIntegrations.cargoai.cancelV1("cargo_on_flight_booking_id", {
|
|
136
|
+
* cancellation_reason: "cancellation_reason"
|
|
137
|
+
* })
|
|
138
|
+
*/
|
|
139
|
+
cancelV1(cargoOnFlightBookingId, request, requestOptions) {
|
|
140
|
+
return core.HttpResponsePromise.fromPromise(this.__cancelV1(cargoOnFlightBookingId, request, requestOptions));
|
|
141
|
+
}
|
|
142
|
+
__cancelV1(cargoOnFlightBookingId, request, requestOptions) {
|
|
143
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
var _a, _b, _c, _d;
|
|
145
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
146
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
147
|
+
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/cargoai/cancel/v1/${encodeURIComponent(cargoOnFlightBookingId)}`),
|
|
148
|
+
method: "POST",
|
|
149
|
+
headers: _headers,
|
|
150
|
+
contentType: "application/json",
|
|
151
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
152
|
+
requestType: "json",
|
|
153
|
+
body: request,
|
|
154
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
155
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
156
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
157
|
+
});
|
|
158
|
+
if (_response.ok) {
|
|
159
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
160
|
+
}
|
|
161
|
+
if (_response.error.reason === "status-code") {
|
|
162
|
+
switch (_response.error.statusCode) {
|
|
163
|
+
case 422:
|
|
164
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
165
|
+
default:
|
|
166
|
+
throw new errors.ChrtError({
|
|
167
|
+
statusCode: _response.error.statusCode,
|
|
168
|
+
body: _response.error.body,
|
|
169
|
+
rawResponse: _response.rawResponse,
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
switch (_response.error.reason) {
|
|
174
|
+
case "non-json":
|
|
175
|
+
throw new errors.ChrtError({
|
|
176
|
+
statusCode: _response.error.statusCode,
|
|
177
|
+
body: _response.error.rawBody,
|
|
178
|
+
rawResponse: _response.rawResponse,
|
|
179
|
+
});
|
|
180
|
+
case "timeout":
|
|
181
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /cargo_on_flight_integrations/cargoai/cancel/v1/{cargo_on_flight_booking_id}.");
|
|
182
|
+
case "unknown":
|
|
183
|
+
throw new errors.ChrtError({
|
|
184
|
+
message: _response.error.errorMessage,
|
|
185
|
+
rawResponse: _response.rawResponse,
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Asks CargoAi for an active booking's current status and AWB and applies them, e.g. when its book answer was lost. | authz_personas=[task_group_coordinator_operators] | () -> (CargoOnFlightBooking1)
|
|
192
|
+
*
|
|
193
|
+
* @param {string} cargoOnFlightBookingId
|
|
194
|
+
* @param {Cargoai.RequestOptions} requestOptions - Request-specific configuration.
|
|
195
|
+
*
|
|
196
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
197
|
+
*
|
|
198
|
+
* @example
|
|
199
|
+
* await client.cargoOnFlightIntegrations.cargoai.refreshV1("cargo_on_flight_booking_id")
|
|
200
|
+
*/
|
|
201
|
+
refreshV1(cargoOnFlightBookingId, requestOptions) {
|
|
202
|
+
return core.HttpResponsePromise.fromPromise(this.__refreshV1(cargoOnFlightBookingId, requestOptions));
|
|
203
|
+
}
|
|
204
|
+
__refreshV1(cargoOnFlightBookingId, requestOptions) {
|
|
205
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
206
|
+
var _a, _b, _c, _d;
|
|
207
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
208
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
209
|
+
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/cargoai/refresh/v1/${encodeURIComponent(cargoOnFlightBookingId)}`),
|
|
210
|
+
method: "POST",
|
|
211
|
+
headers: _headers,
|
|
212
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
213
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
214
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
215
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
216
|
+
});
|
|
217
|
+
if (_response.ok) {
|
|
218
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
219
|
+
}
|
|
220
|
+
if (_response.error.reason === "status-code") {
|
|
221
|
+
switch (_response.error.statusCode) {
|
|
222
|
+
case 422:
|
|
223
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
224
|
+
default:
|
|
225
|
+
throw new errors.ChrtError({
|
|
226
|
+
statusCode: _response.error.statusCode,
|
|
227
|
+
body: _response.error.body,
|
|
228
|
+
rawResponse: _response.rawResponse,
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
switch (_response.error.reason) {
|
|
233
|
+
case "non-json":
|
|
234
|
+
throw new errors.ChrtError({
|
|
235
|
+
statusCode: _response.error.statusCode,
|
|
236
|
+
body: _response.error.rawBody,
|
|
237
|
+
rawResponse: _response.rawResponse,
|
|
238
|
+
});
|
|
239
|
+
case "timeout":
|
|
240
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /cargo_on_flight_integrations/cargoai/refresh/v1/{cargo_on_flight_booking_id}.");
|
|
241
|
+
case "unknown":
|
|
242
|
+
throw new errors.ChrtError({
|
|
243
|
+
message: _response.error.errorMessage,
|
|
244
|
+
rawResponse: _response.rawResponse,
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Collects the remaining CargoAi results of an unfinished search and stores them; a completed search is returned as is. | authz_personas=[task_group_coordinator_operators] | () -> (CargoOnFlightBookingSearch1)
|
|
251
|
+
*
|
|
252
|
+
* @param {string} cargoOnFlightBookingSearchId
|
|
253
|
+
* @param {Cargoai.RequestOptions} requestOptions - Request-specific configuration.
|
|
254
|
+
*
|
|
255
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
256
|
+
*
|
|
257
|
+
* @example
|
|
258
|
+
* await client.cargoOnFlightIntegrations.cargoai.searchContinueV1("cargo_on_flight_booking_search_id")
|
|
259
|
+
*/
|
|
260
|
+
searchContinueV1(cargoOnFlightBookingSearchId, requestOptions) {
|
|
261
|
+
return core.HttpResponsePromise.fromPromise(this.__searchContinueV1(cargoOnFlightBookingSearchId, requestOptions));
|
|
262
|
+
}
|
|
263
|
+
__searchContinueV1(cargoOnFlightBookingSearchId, requestOptions) {
|
|
264
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
265
|
+
var _a, _b, _c, _d;
|
|
266
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
267
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
268
|
+
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/cargoai/search/continue/v1/${encodeURIComponent(cargoOnFlightBookingSearchId)}`),
|
|
269
|
+
method: "POST",
|
|
270
|
+
headers: _headers,
|
|
271
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
272
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
273
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
274
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
275
|
+
});
|
|
276
|
+
if (_response.ok) {
|
|
277
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
278
|
+
}
|
|
279
|
+
if (_response.error.reason === "status-code") {
|
|
280
|
+
switch (_response.error.statusCode) {
|
|
281
|
+
case 422:
|
|
282
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
283
|
+
default:
|
|
284
|
+
throw new errors.ChrtError({
|
|
285
|
+
statusCode: _response.error.statusCode,
|
|
286
|
+
body: _response.error.body,
|
|
287
|
+
rawResponse: _response.rawResponse,
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
switch (_response.error.reason) {
|
|
292
|
+
case "non-json":
|
|
293
|
+
throw new errors.ChrtError({
|
|
294
|
+
statusCode: _response.error.statusCode,
|
|
295
|
+
body: _response.error.rawBody,
|
|
296
|
+
rawResponse: _response.rawResponse,
|
|
297
|
+
});
|
|
298
|
+
case "timeout":
|
|
299
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /cargo_on_flight_integrations/cargoai/search/continue/v1/{cargo_on_flight_booking_search_id}.");
|
|
300
|
+
case "unknown":
|
|
301
|
+
throw new errors.ChrtError({
|
|
302
|
+
message: _response.error.errorMessage,
|
|
303
|
+
rawResponse: _response.rawResponse,
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* 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)
|
|
310
|
+
*
|
|
311
|
+
* @param {string} cargoOnFlightBookingId
|
|
312
|
+
* @param {Chrt.cargoOnFlightIntegrations.CargoOnFlightBookingSearchClientCreate1} request
|
|
313
|
+
* @param {Cargoai.RequestOptions} requestOptions - Request-specific configuration.
|
|
314
|
+
*
|
|
315
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
316
|
+
*
|
|
317
|
+
* @example
|
|
318
|
+
* await client.cargoOnFlightIntegrations.cargoai.searchV1("cargo_on_flight_booking_id", {
|
|
319
|
+
* destination_iata: "destination_iata",
|
|
320
|
+
* earliest_departure_date: "earliest_departure_date",
|
|
321
|
+
* iata_cass_office_id: "iata_cass_office_id",
|
|
322
|
+
* origin_iata: "origin_iata",
|
|
323
|
+
* schema_version: 1
|
|
324
|
+
* })
|
|
325
|
+
*/
|
|
326
|
+
searchV1(cargoOnFlightBookingId, request, requestOptions) {
|
|
327
|
+
return core.HttpResponsePromise.fromPromise(this.__searchV1(cargoOnFlightBookingId, request, requestOptions));
|
|
328
|
+
}
|
|
329
|
+
__searchV1(cargoOnFlightBookingId, request, requestOptions) {
|
|
330
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
331
|
+
var _a, _b, _c, _d;
|
|
332
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
333
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
334
|
+
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/cargoai/search/v1/${encodeURIComponent(cargoOnFlightBookingId)}`),
|
|
335
|
+
method: "POST",
|
|
336
|
+
headers: _headers,
|
|
337
|
+
contentType: "application/json",
|
|
338
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
339
|
+
requestType: "json",
|
|
340
|
+
body: request,
|
|
341
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
342
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
343
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
344
|
+
});
|
|
345
|
+
if (_response.ok) {
|
|
346
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
347
|
+
}
|
|
348
|
+
if (_response.error.reason === "status-code") {
|
|
349
|
+
switch (_response.error.statusCode) {
|
|
350
|
+
case 422:
|
|
351
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
352
|
+
default:
|
|
353
|
+
throw new errors.ChrtError({
|
|
354
|
+
statusCode: _response.error.statusCode,
|
|
355
|
+
body: _response.error.body,
|
|
356
|
+
rawResponse: _response.rawResponse,
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
switch (_response.error.reason) {
|
|
361
|
+
case "non-json":
|
|
362
|
+
throw new errors.ChrtError({
|
|
363
|
+
statusCode: _response.error.statusCode,
|
|
364
|
+
body: _response.error.rawBody,
|
|
365
|
+
rawResponse: _response.rawResponse,
|
|
366
|
+
});
|
|
367
|
+
case "timeout":
|
|
368
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /cargo_on_flight_integrations/cargoai/search/v1/{cargo_on_flight_booking_id}.");
|
|
369
|
+
case "unknown":
|
|
370
|
+
throw new errors.ChrtError({
|
|
371
|
+
message: _response.error.errorMessage,
|
|
372
|
+
rawResponse: _response.rawResponse,
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
_getAuthorizationHeader() {
|
|
378
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
379
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
380
|
+
if (bearer != null) {
|
|
381
|
+
return `Bearer ${bearer}`;
|
|
382
|
+
}
|
|
383
|
+
return undefined;
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
exports.Cargoai = Cargoai;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* destination_iata: "destination_iata",
|
|
8
|
+
* earliest_departure_date: "earliest_departure_date",
|
|
9
|
+
* iata_cass_office_id: "iata_cass_office_id",
|
|
10
|
+
* origin_iata: "origin_iata",
|
|
11
|
+
* schema_version: 1
|
|
12
|
+
* }
|
|
13
|
+
*/
|
|
14
|
+
export interface CargoOnFlightBookingSearchClientCreate1 {
|
|
15
|
+
destination_iata: string;
|
|
16
|
+
earliest_departure_date: string;
|
|
17
|
+
iata_cass_office_id: string;
|
|
18
|
+
origin_iata: string;
|
|
19
|
+
schema_version: number;
|
|
20
|
+
}
|
|
@@ -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 CargoOnFlightIntegrationsCargoAiBookReq {
|
|
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 CargoOnFlightIntegrationsCargoAiCancelReq {
|
|
11
|
+
cancellation_reason: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { type CargoOnFlightIntegrationsCargoAiBookReq } from "./CargoOnFlightIntegrationsCargoAiBookReq.js";
|
|
2
|
+
export { type CargoOnFlightIntegrationsCargoAiCancelReq } from "./CargoOnFlightIntegrationsCargoAiCancelReq.js";
|
|
3
|
+
export { type CargoOnFlightBookingSearchClientCreate1 } from "./CargoOnFlightBookingSearchClientCreate1.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.cargoai = void 0;
|
|
40
|
+
exports.cargoai = __importStar(require("./cargoai/index.js"));
|
|
41
|
+
__exportStar(require("./cargoai/client/requests/index.js"), exports);
|
|
@@ -6,6 +6,7 @@ export * as agent from "./agent/index.js";
|
|
|
6
6
|
export * as analytics from "./analytics/index.js";
|
|
7
7
|
export * as billing from "./billing/index.js";
|
|
8
8
|
export * as billingNew from "./billingNew/index.js";
|
|
9
|
+
export * as cargoOnFlightIntegrations from "./cargoOnFlightIntegrations/index.js";
|
|
9
10
|
export * as integrations from "./integrations/index.js";
|
|
10
11
|
export * as listing from "./listing/index.js";
|
|
11
12
|
export * as notifications from "./notifications/index.js";
|
|
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.users = exports.trackingIntegrations = exports.tracking = exports.shippingIntegrations = exports.operations = exports.notifications = exports.listing = exports.integrations = exports.billingNew = exports.billing = exports.analytics = exports.agent = exports.utils = exports.flights = exports.shipping = exports.orgs = void 0;
|
|
39
|
+
exports.users = exports.trackingIntegrations = exports.tracking = exports.shippingIntegrations = exports.operations = exports.notifications = exports.listing = exports.integrations = exports.cargoOnFlightIntegrations = exports.billingNew = exports.billing = exports.analytics = exports.agent = exports.utils = exports.flights = exports.shipping = exports.orgs = void 0;
|
|
40
40
|
exports.orgs = __importStar(require("./orgs/index.js"));
|
|
41
41
|
exports.shipping = __importStar(require("./shipping/index.js"));
|
|
42
42
|
exports.flights = __importStar(require("./flights/index.js"));
|
|
@@ -45,6 +45,7 @@ exports.agent = __importStar(require("./agent/index.js"));
|
|
|
45
45
|
exports.analytics = __importStar(require("./analytics/index.js"));
|
|
46
46
|
exports.billing = __importStar(require("./billing/index.js"));
|
|
47
47
|
exports.billingNew = __importStar(require("./billingNew/index.js"));
|
|
48
|
+
exports.cargoOnFlightIntegrations = __importStar(require("./cargoOnFlightIntegrations/index.js"));
|
|
48
49
|
exports.integrations = __importStar(require("./integrations/index.js"));
|
|
49
50
|
exports.listing = __importStar(require("./listing/index.js"));
|
|
50
51
|
exports.notifications = __importStar(require("./notifications/index.js"));
|
|
@@ -8,6 +8,7 @@ import { Accounts } from "../resources/accounts/client/Client.js";
|
|
|
8
8
|
import { ComplianceDocuments } from "../resources/complianceDocuments/client/Client.js";
|
|
9
9
|
import { Connections } from "../resources/connections/client/Client.js";
|
|
10
10
|
import { Contacts } from "../resources/contacts/client/Client.js";
|
|
11
|
+
import { IataCassOffices } from "../resources/iataCassOffices/client/Client.js";
|
|
11
12
|
import { OffChrtOrgData } from "../resources/offChrtOrgData/client/Client.js";
|
|
12
13
|
import { PrivateData } from "../resources/privateData/client/Client.js";
|
|
13
14
|
import { PublicData } from "../resources/publicData/client/Client.js";
|
|
@@ -40,6 +41,7 @@ export declare class Orgs {
|
|
|
40
41
|
protected _complianceDocuments: ComplianceDocuments | undefined;
|
|
41
42
|
protected _connections: Connections | undefined;
|
|
42
43
|
protected _contacts: Contacts | undefined;
|
|
44
|
+
protected _iataCassOffices: IataCassOffices | undefined;
|
|
43
45
|
protected _offChrtOrgData: OffChrtOrgData | undefined;
|
|
44
46
|
protected _privateData: PrivateData | undefined;
|
|
45
47
|
protected _publicData: PublicData | undefined;
|
|
@@ -48,6 +50,7 @@ export declare class Orgs {
|
|
|
48
50
|
get complianceDocuments(): ComplianceDocuments;
|
|
49
51
|
get connections(): Connections;
|
|
50
52
|
get contacts(): Contacts;
|
|
53
|
+
get iataCassOffices(): IataCassOffices;
|
|
51
54
|
get offChrtOrgData(): OffChrtOrgData;
|
|
52
55
|
get privateData(): PrivateData;
|
|
53
56
|
get publicData(): PublicData;
|