@chrt-inc/typescript-sdk 1.1008.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/CalculatedInvoiceTax1.d.ts +3 -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/CalculatedInvoiceTax1.d.mts +3 -1
- 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
package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookingSearches/client/Client.mjs
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
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 CargoOnFlightBookingSearches {
|
|
19
|
+
constructor(_options = {}) {
|
|
20
|
+
this._options = _options;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Lists a cargo-on-flight booking's searches with their results. | authz_personas=[task_group_coordinator_operators] | () -> (CargoOnFlightBookingSearchListRes)
|
|
24
|
+
*
|
|
25
|
+
* @param {Chrt.shipping.CargoOnFlightBookingSearchesListV1Request} request
|
|
26
|
+
* @param {CargoOnFlightBookingSearches.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
|
+
*
|
|
28
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* await client.shipping.cargoOnFlightBookingSearches.listV1({
|
|
32
|
+
* cargo_on_flight_booking_id: "cargo_on_flight_booking_id",
|
|
33
|
+
* filter_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
34
|
+
* filter_created_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
35
|
+
* sort_by: "created_at_timestamp",
|
|
36
|
+
* sort_order: "asc",
|
|
37
|
+
* page: 1,
|
|
38
|
+
* page_size: 1
|
|
39
|
+
* })
|
|
40
|
+
*/
|
|
41
|
+
listV1(request, requestOptions) {
|
|
42
|
+
return core.HttpResponsePromise.fromPromise(this.__listV1(request, requestOptions));
|
|
43
|
+
}
|
|
44
|
+
__listV1(request, requestOptions) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
var _a, _b, _c, _d, _e, _f;
|
|
47
|
+
const { cargo_on_flight_booking_id: cargoOnFlightBookingId, filter_created_at_timestamp_gte: filterCreatedAtTimestampGte, filter_created_at_timestamp_lte: filterCreatedAtTimestampLte, sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, } = request;
|
|
48
|
+
const _queryParams = {};
|
|
49
|
+
_queryParams["cargo_on_flight_booking_id"] = cargoOnFlightBookingId;
|
|
50
|
+
if (filterCreatedAtTimestampGte !== undefined) {
|
|
51
|
+
_queryParams["filter_created_at_timestamp_gte"] = filterCreatedAtTimestampGte;
|
|
52
|
+
}
|
|
53
|
+
if (filterCreatedAtTimestampLte !== undefined) {
|
|
54
|
+
_queryParams["filter_created_at_timestamp_lte"] = filterCreatedAtTimestampLte;
|
|
55
|
+
}
|
|
56
|
+
if (sortBy !== undefined) {
|
|
57
|
+
_queryParams["sort_by"] = sortBy;
|
|
58
|
+
}
|
|
59
|
+
if (sortOrder !== undefined) {
|
|
60
|
+
_queryParams["sort_order"] = sortOrder;
|
|
61
|
+
}
|
|
62
|
+
if (page !== undefined) {
|
|
63
|
+
_queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
|
|
64
|
+
}
|
|
65
|
+
if (pageSize !== undefined) {
|
|
66
|
+
_queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
|
|
67
|
+
}
|
|
68
|
+
let _headers = mergeHeaders((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
69
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
70
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ChrtEnvironment.Local, "shipping/cargo_on_flight_booking_searches/list/v1"),
|
|
71
|
+
method: "GET",
|
|
72
|
+
headers: _headers,
|
|
73
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
74
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
75
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
76
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
77
|
+
});
|
|
78
|
+
if (_response.ok) {
|
|
79
|
+
return {
|
|
80
|
+
data: _response.body,
|
|
81
|
+
rawResponse: _response.rawResponse,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
if (_response.error.reason === "status-code") {
|
|
85
|
+
switch (_response.error.statusCode) {
|
|
86
|
+
case 422:
|
|
87
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
88
|
+
default:
|
|
89
|
+
throw new errors.ChrtError({
|
|
90
|
+
statusCode: _response.error.statusCode,
|
|
91
|
+
body: _response.error.body,
|
|
92
|
+
rawResponse: _response.rawResponse,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
switch (_response.error.reason) {
|
|
97
|
+
case "non-json":
|
|
98
|
+
throw new errors.ChrtError({
|
|
99
|
+
statusCode: _response.error.statusCode,
|
|
100
|
+
body: _response.error.rawBody,
|
|
101
|
+
rawResponse: _response.rawResponse,
|
|
102
|
+
});
|
|
103
|
+
case "timeout":
|
|
104
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping/cargo_on_flight_booking_searches/list/v1.");
|
|
105
|
+
case "unknown":
|
|
106
|
+
throw new errors.ChrtError({
|
|
107
|
+
message: _response.error.errorMessage,
|
|
108
|
+
rawResponse: _response.rawResponse,
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Retrieves a cargo-on-flight booking search with its results. | authz_personas=[task_group_coordinator_operators] | () -> (CargoOnFlightBookingSearch1)
|
|
115
|
+
*
|
|
116
|
+
* @param {string} cargoOnFlightBookingSearchId
|
|
117
|
+
* @param {CargoOnFlightBookingSearches.RequestOptions} requestOptions - Request-specific configuration.
|
|
118
|
+
*
|
|
119
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* await client.shipping.cargoOnFlightBookingSearches.getV1("cargo_on_flight_booking_search_id")
|
|
123
|
+
*/
|
|
124
|
+
getV1(cargoOnFlightBookingSearchId, requestOptions) {
|
|
125
|
+
return core.HttpResponsePromise.fromPromise(this.__getV1(cargoOnFlightBookingSearchId, requestOptions));
|
|
126
|
+
}
|
|
127
|
+
__getV1(cargoOnFlightBookingSearchId, requestOptions) {
|
|
128
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
+
var _a, _b, _c, _d;
|
|
130
|
+
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);
|
|
131
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
132
|
+
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, `shipping/cargo_on_flight_booking_searches/v1/${encodeURIComponent(cargoOnFlightBookingSearchId)}`),
|
|
133
|
+
method: "GET",
|
|
134
|
+
headers: _headers,
|
|
135
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
136
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
137
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
138
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
139
|
+
});
|
|
140
|
+
if (_response.ok) {
|
|
141
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
142
|
+
}
|
|
143
|
+
if (_response.error.reason === "status-code") {
|
|
144
|
+
switch (_response.error.statusCode) {
|
|
145
|
+
case 422:
|
|
146
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
147
|
+
default:
|
|
148
|
+
throw new errors.ChrtError({
|
|
149
|
+
statusCode: _response.error.statusCode,
|
|
150
|
+
body: _response.error.body,
|
|
151
|
+
rawResponse: _response.rawResponse,
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
switch (_response.error.reason) {
|
|
156
|
+
case "non-json":
|
|
157
|
+
throw new errors.ChrtError({
|
|
158
|
+
statusCode: _response.error.statusCode,
|
|
159
|
+
body: _response.error.rawBody,
|
|
160
|
+
rawResponse: _response.rawResponse,
|
|
161
|
+
});
|
|
162
|
+
case "timeout":
|
|
163
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /shipping/cargo_on_flight_booking_searches/v1/{cargo_on_flight_booking_search_id}.");
|
|
164
|
+
case "unknown":
|
|
165
|
+
throw new errors.ChrtError({
|
|
166
|
+
message: _response.error.errorMessage,
|
|
167
|
+
rawResponse: _response.rawResponse,
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
_getAuthorizationHeader() {
|
|
173
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
174
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
175
|
+
if (bearer != null) {
|
|
176
|
+
return `Bearer ${bearer}`;
|
|
177
|
+
}
|
|
178
|
+
return undefined;
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
}
|
package/dist/esm/api/resources/shipping/resources/cargoOnFlightBookingSearches/client/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../../../../../../index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* cargo_on_flight_booking_id: "cargo_on_flight_booking_id",
|
|
9
|
+
* filter_created_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
10
|
+
* filter_created_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
11
|
+
* sort_by: "created_at_timestamp",
|
|
12
|
+
* sort_order: "asc",
|
|
13
|
+
* page: 1,
|
|
14
|
+
* page_size: 1
|
|
15
|
+
* }
|
|
16
|
+
*/
|
|
17
|
+
export interface CargoOnFlightBookingSearchesListV1Request {
|
|
18
|
+
/** The booking whose searches are listed. */
|
|
19
|
+
cargo_on_flight_booking_id: string;
|
|
20
|
+
/** Filter created_at_timestamp >= value. */
|
|
21
|
+
filter_created_at_timestamp_gte?: string | null;
|
|
22
|
+
/** Filter created_at_timestamp <= value. */
|
|
23
|
+
filter_created_at_timestamp_lte?: string | null;
|
|
24
|
+
/** Field to sort by. */
|
|
25
|
+
sort_by?: Chrt.CargoOnFlightBookingSearchSortByEnum | null;
|
|
26
|
+
/** Sort order. */
|
|
27
|
+
sort_order?: Chrt.SortOrderEnum | null;
|
|
28
|
+
page?: number | null;
|
|
29
|
+
page_size?: number | null;
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type CargoOnFlightBookingSearchesListV1Request } from "./CargoOnFlightBookingSearchesListV1Request.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1,120 @@
|
|
|
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 CargoOnFlightBookings {
|
|
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 CargoOnFlightBookings {
|
|
31
|
+
protected readonly _options: CargoOnFlightBookings.Options;
|
|
32
|
+
constructor(_options?: CargoOnFlightBookings.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Cancels a MANUAL booking, removing the flights it created from the task group and its AWB from its cargos; an integration booking is cancelled through its integration. | authz_personas=[task_group_coordinator_operators] | () -> (CargoOnFlightBooking1)
|
|
35
|
+
*
|
|
36
|
+
* @param {string} cargoOnFlightBookingId
|
|
37
|
+
* @param {CargoOnFlightBookings.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
|
+
*
|
|
39
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* await client.shipping.cargoOnFlightBookings.cancelV1("cargo_on_flight_booking_id")
|
|
43
|
+
*/
|
|
44
|
+
cancelV1(cargoOnFlightBookingId: string, requestOptions?: CargoOnFlightBookings.RequestOptions): core.HttpResponsePromise<Chrt.CargoOnFlightBooking1>;
|
|
45
|
+
private __cancelV1;
|
|
46
|
+
/**
|
|
47
|
+
* Creates a booking for a flight task group's cargos: a draft to search and book through an integration, or a MANUAL booking placed outside CHRT, confirmed with its AWB and itinerary, which sets the task group's flights and the cargos' AWB. | authz_personas=[task_group_coordinator_operators] | (CargoOnFlightBookingClientCreate1) -> (CargoOnFlightBooking1)
|
|
48
|
+
*
|
|
49
|
+
* @param {Chrt.shipping.CargoOnFlightBookingClientCreate1} request
|
|
50
|
+
* @param {CargoOnFlightBookings.RequestOptions} requestOptions - Request-specific configuration.
|
|
51
|
+
*
|
|
52
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* await client.shipping.cargoOnFlightBookings.createV1({
|
|
56
|
+
* cargo_dimensions: [{
|
|
57
|
+
* height_inches: 1.1,
|
|
58
|
+
* length_inches: 1.1,
|
|
59
|
+
* quantity: 1,
|
|
60
|
+
* weight_per_piece_pounds: 1.1,
|
|
61
|
+
* width_inches: 1.1
|
|
62
|
+
* }],
|
|
63
|
+
* cargo_ids: ["cargo_ids"],
|
|
64
|
+
* cargo_on_flight_integration: "cargoai",
|
|
65
|
+
* schema_version: 1,
|
|
66
|
+
* task_group_id: "task_group_id"
|
|
67
|
+
* })
|
|
68
|
+
*/
|
|
69
|
+
createV1(request: Chrt.shipping.CargoOnFlightBookingClientCreate1, requestOptions?: CargoOnFlightBookings.RequestOptions): core.HttpResponsePromise<Chrt.CargoOnFlightBooking1>;
|
|
70
|
+
private __createV1;
|
|
71
|
+
/**
|
|
72
|
+
* Deletes a draft booking that was never booked, with its searches. | authz_personas=[task_group_coordinator_operators] | () -> (bool)
|
|
73
|
+
*
|
|
74
|
+
* @param {string} cargoOnFlightBookingId
|
|
75
|
+
* @param {CargoOnFlightBookings.RequestOptions} requestOptions - Request-specific configuration.
|
|
76
|
+
*
|
|
77
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* await client.shipping.cargoOnFlightBookings.deleteDraftV1("cargo_on_flight_booking_id")
|
|
81
|
+
*/
|
|
82
|
+
deleteDraftV1(cargoOnFlightBookingId: string, requestOptions?: CargoOnFlightBookings.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
83
|
+
private __deleteDraftV1;
|
|
84
|
+
/**
|
|
85
|
+
* Lists a flight task group's cargo-on-flight bookings, active and history. | authz_personas=[task_group_coordinator_operators] | () -> (CargoOnFlightBookingListRes)
|
|
86
|
+
*
|
|
87
|
+
* @param {Chrt.shipping.CargoOnFlightBookingsListV1Request} request
|
|
88
|
+
* @param {CargoOnFlightBookings.RequestOptions} requestOptions - Request-specific configuration.
|
|
89
|
+
*
|
|
90
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* await client.shipping.cargoOnFlightBookings.listV1({
|
|
94
|
+
* task_group_id: "task_group_id",
|
|
95
|
+
* filter_status: ["draft"],
|
|
96
|
+
* filter_draft_started_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
97
|
+
* filter_draft_started_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
98
|
+
* sort_by: "draft_started_at_timestamp",
|
|
99
|
+
* sort_order: "asc",
|
|
100
|
+
* page: 1,
|
|
101
|
+
* page_size: 1
|
|
102
|
+
* })
|
|
103
|
+
*/
|
|
104
|
+
listV1(request: Chrt.shipping.CargoOnFlightBookingsListV1Request, requestOptions?: CargoOnFlightBookings.RequestOptions): core.HttpResponsePromise<Chrt.CargoOnFlightBookingListRes>;
|
|
105
|
+
private __listV1;
|
|
106
|
+
/**
|
|
107
|
+
* Retrieves a cargo-on-flight booking. | authz_personas=[task_group_coordinator_operators] | () -> (CargoOnFlightBooking1)
|
|
108
|
+
*
|
|
109
|
+
* @param {string} cargoOnFlightBookingId
|
|
110
|
+
* @param {CargoOnFlightBookings.RequestOptions} requestOptions - Request-specific configuration.
|
|
111
|
+
*
|
|
112
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* await client.shipping.cargoOnFlightBookings.getV1("cargo_on_flight_booking_id")
|
|
116
|
+
*/
|
|
117
|
+
getV1(cargoOnFlightBookingId: string, requestOptions?: CargoOnFlightBookings.RequestOptions): core.HttpResponsePromise<Chrt.CargoOnFlightBooking1>;
|
|
118
|
+
private __getV1;
|
|
119
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
120
|
+
}
|