@chrt-inc/typescript-sdk 1.504.0 → 1.511.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 +15 -10
- package/dist/cjs/api/resources/index.d.ts +1 -0
- package/dist/cjs/api/resources/index.js +2 -1
- package/dist/cjs/api/resources/integrations/client/Client.d.ts +29 -0
- package/dist/cjs/api/resources/integrations/client/Client.js +27 -0
- package/dist/cjs/api/resources/integrations/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/integrations/client/index.js +2 -0
- package/dist/cjs/api/resources/integrations/index.d.ts +2 -0
- package/dist/cjs/api/resources/integrations/index.js +18 -0
- package/dist/cjs/api/resources/integrations/resources/airWaybills/client/Client.d.ts +128 -0
- package/dist/cjs/api/resources/integrations/resources/airWaybills/client/Client.js +490 -0
- package/dist/cjs/api/resources/integrations/resources/airWaybills/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/integrations/resources/airWaybills/client/index.js +17 -0
- package/dist/cjs/api/resources/integrations/resources/airWaybills/client/requests/AirWaybillCreateReq.d.ts +12 -0
- package/dist/cjs/api/resources/integrations/resources/airWaybills/client/requests/ChampAirWaybillClientUpdate1.d.ts +40 -0
- package/dist/cjs/api/resources/integrations/resources/airWaybills/client/requests/ChampAirWaybillClientUpdate1.js +5 -0
- package/dist/cjs/api/resources/integrations/resources/airWaybills/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/integrations/resources/airWaybills/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/integrations/resources/airWaybills/index.d.ts +1 -0
- package/dist/cjs/api/resources/integrations/resources/airWaybills/index.js +17 -0
- package/dist/cjs/api/resources/integrations/resources/index.d.ts +5 -0
- package/dist/cjs/api/resources/integrations/resources/index.js +44 -0
- package/dist/cjs/api/resources/integrations/resources/webcargoBookings/client/Client.d.ts +60 -0
- package/dist/cjs/api/resources/integrations/resources/webcargoBookings/client/Client.js +186 -0
- package/dist/cjs/api/resources/integrations/resources/webcargoBookings/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/integrations/resources/webcargoBookings/client/index.js +2 -0
- package/dist/cjs/api/resources/integrations/resources/webcargoBookings/index.d.ts +1 -0
- package/dist/cjs/api/resources/integrations/resources/webcargoBookings/index.js +17 -0
- package/dist/cjs/api/resources/integrations/resources/webcargoEmbed/client/Client.d.ts +53 -0
- package/dist/cjs/api/resources/integrations/resources/webcargoEmbed/client/Client.js +136 -0
- package/dist/cjs/api/resources/integrations/resources/webcargoEmbed/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/integrations/resources/webcargoEmbed/client/index.js +17 -0
- package/dist/cjs/api/resources/integrations/resources/webcargoEmbed/client/requests/GetWebcargoEmbedReq.d.ts +18 -0
- package/dist/cjs/api/resources/integrations/resources/webcargoEmbed/client/requests/GetWebcargoEmbedReq.js +5 -0
- package/dist/cjs/api/resources/integrations/resources/webcargoEmbed/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/integrations/resources/webcargoEmbed/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/integrations/resources/webcargoEmbed/index.d.ts +1 -0
- package/dist/cjs/api/resources/integrations/resources/webcargoEmbed/index.js +17 -0
- package/dist/cjs/api/resources/utils/resources/dev/client/Client.d.ts +4 -4
- package/dist/cjs/api/resources/utils/resources/dev/client/Client.js +7 -7
- package/dist/cjs/api/types/Caller.d.ts +14 -0
- package/dist/cjs/api/types/Caller.js +5 -0
- package/dist/cjs/api/types/CallerCredentialTypeEnum.d.ts +9 -0
- package/dist/cjs/api/types/CallerCredentialTypeEnum.js +11 -0
- package/dist/cjs/api/types/CargojsonAccountContact.d.ts +13 -0
- package/dist/cjs/api/types/CargojsonAccountContact.js +5 -0
- package/dist/cjs/api/types/CargojsonAccounting.d.ts +11 -0
- package/dist/cjs/api/types/CargojsonAccounting.js +5 -0
- package/dist/cjs/api/types/CargojsonAccountingInformationIdentifier.d.ts +18 -0
- package/dist/cjs/api/types/CargojsonAccountingInformationIdentifier.js +17 -0
- package/dist/cjs/api/types/CargojsonAddress.d.ts +16 -0
- package/dist/cjs/api/types/CargojsonAddress.js +5 -0
- package/dist/cjs/api/types/CargojsonAddressing.d.ts +14 -0
- package/dist/cjs/api/types/CargojsonAddressing.js +5 -0
- package/dist/cjs/api/types/CargojsonAgent.d.ts +16 -0
- package/dist/cjs/api/types/CargojsonAgent.js +5 -0
- package/dist/cjs/api/types/CargojsonCassIndicator.d.ts +21 -0
- package/dist/cjs/api/types/CargojsonCassIndicator.js +20 -0
- package/dist/cjs/api/types/CargojsonCharge.d.ts +16 -0
- package/dist/cjs/api/types/CargojsonCharge.js +5 -0
- package/dist/cjs/api/types/CargojsonChargeCode.d.ts +34 -0
- package/dist/cjs/api/types/CargojsonChargeCode.js +33 -0
- package/dist/cjs/api/types/CargojsonChargeDeclarations.d.ts +17 -0
- package/dist/cjs/api/types/CargojsonChargeDeclarations.js +5 -0
- package/dist/cjs/api/types/CargojsonChargeItem.d.ts +20 -0
- package/dist/cjs/api/types/CargojsonChargeItem.js +5 -0
- package/dist/cjs/api/types/CargojsonChargeSummary.d.ts +15 -0
- package/dist/cjs/api/types/CargojsonChargeSummary.js +5 -0
- package/dist/cjs/api/types/CargojsonCollectChargesInDestCurrency.d.ts +13 -0
- package/dist/cjs/api/types/CargojsonCollectChargesInDestCurrency.js +5 -0
- package/dist/cjs/api/types/CargojsonCommissionInfo.d.ts +10 -0
- package/dist/cjs/api/types/CargojsonCommissionInfo.js +5 -0
- package/dist/cjs/api/types/CargojsonContactDetail.d.ts +11 -0
- package/dist/cjs/api/types/CargojsonContactDetail.js +5 -0
- package/dist/cjs/api/types/CargojsonDimensionUnit.d.ts +17 -0
- package/dist/cjs/api/types/CargojsonDimensionUnit.js +15 -0
- package/dist/cjs/api/types/CargojsonDimensions.d.ts +13 -0
- package/dist/cjs/api/types/CargojsonDimensions.js +5 -0
- package/dist/cjs/api/types/CargojsonEdifactData.d.ts +12 -0
- package/dist/cjs/api/types/CargojsonEdifactData.js +5 -0
- package/dist/cjs/api/types/CargojsonEntitlementCode.d.ts +11 -0
- package/dist/cjs/api/types/CargojsonEntitlementCode.js +10 -0
- package/dist/cjs/api/types/CargojsonFlightIdentity.d.ts +13 -0
- package/dist/cjs/api/types/CargojsonFlightIdentity.js +5 -0
- package/dist/cjs/api/types/CargojsonMessageHeader.d.ts +12 -0
- package/dist/cjs/api/types/CargojsonMessageHeader.js +5 -0
- package/dist/cjs/api/types/CargojsonNominatedHandlingParty.d.ts +10 -0
- package/dist/cjs/api/types/CargojsonNominatedHandlingParty.js +5 -0
- package/dist/cjs/api/types/CargojsonOci.d.ts +13 -0
- package/dist/cjs/api/types/CargojsonOci.js +5 -0
- package/dist/cjs/api/types/CargojsonOfficeMessageAddress.d.ts +11 -0
- package/dist/cjs/api/types/CargojsonOfficeMessageAddress.js +5 -0
- package/dist/cjs/api/types/CargojsonOtherChargeCode.d.ts +147 -0
- package/dist/cjs/api/types/CargojsonOtherChargeCode.js +143 -0
- package/dist/cjs/api/types/CargojsonOtherChargeItem.d.ts +13 -0
- package/dist/cjs/api/types/CargojsonOtherChargeItem.js +5 -0
- package/dist/cjs/api/types/CargojsonOtherParticipant.d.ts +13 -0
- package/dist/cjs/api/types/CargojsonOtherParticipant.js +5 -0
- package/dist/cjs/api/types/CargojsonPackaging.d.ts +15 -0
- package/dist/cjs/api/types/CargojsonPackaging.js +5 -0
- package/dist/cjs/api/types/CargojsonParticipantAddress.d.ts +11 -0
- package/dist/cjs/api/types/CargojsonParticipantAddress.js +5 -0
- package/dist/cjs/api/types/CargojsonParticipantAddressType.d.ts +16 -0
- package/dist/cjs/api/types/CargojsonParticipantAddressType.js +15 -0
- package/dist/cjs/api/types/CargojsonParticipantIdentifier.d.ts +12 -0
- package/dist/cjs/api/types/CargojsonParticipantIdentifier.js +5 -0
- package/dist/cjs/api/types/CargojsonParticipantType.d.ts +23 -0
- package/dist/cjs/api/types/CargojsonParticipantType.js +22 -0
- package/dist/cjs/api/types/CargojsonPaymentCondition.d.ts +11 -0
- package/dist/cjs/api/types/CargojsonPaymentCondition.js +10 -0
- package/dist/cjs/api/types/CargojsonRateClassCode.d.ts +22 -0
- package/dist/cjs/api/types/CargojsonRateClassCode.js +21 -0
- package/dist/cjs/api/types/CargojsonRouting.d.ts +10 -0
- package/dist/cjs/api/types/CargojsonRouting.js +5 -0
- package/dist/cjs/api/types/CargojsonSalesIncentive.d.ts +11 -0
- package/dist/cjs/api/types/CargojsonSalesIncentive.js +5 -0
- package/dist/cjs/api/types/CargojsonServiceCode.d.ts +35 -0
- package/dist/cjs/api/types/CargojsonServiceCode.js +34 -0
- package/dist/cjs/api/types/CargojsonShipmentReferenceInformation.d.ts +10 -0
- package/dist/cjs/api/types/CargojsonShipmentReferenceInformation.js +5 -0
- package/dist/cjs/api/types/CargojsonSpecialHandlingCode.d.ts +122 -0
- package/dist/cjs/api/types/CargojsonSpecialHandlingCode.js +120 -0
- package/dist/cjs/api/types/CargojsonUld.d.ts +15 -0
- package/dist/cjs/api/types/CargojsonUld.js +5 -0
- package/dist/cjs/api/types/CargojsonVolume.d.ts +11 -0
- package/dist/cjs/api/types/CargojsonVolume.js +5 -0
- package/dist/cjs/api/types/CargojsonVolumeUnit.d.ts +10 -0
- package/dist/cjs/api/types/CargojsonVolumeUnit.js +12 -0
- package/dist/cjs/api/types/CargojsonWeight.d.ts +16 -0
- package/dist/cjs/api/types/CargojsonWeight.js +5 -0
- package/dist/cjs/api/types/CargojsonWeightUnit.d.ts +8 -0
- package/dist/cjs/api/types/CargojsonWeightUnit.js +10 -0
- package/dist/cjs/api/types/ChampAirWaybill1.d.ts +49 -0
- package/dist/cjs/api/types/ChampAirWaybill1.js +5 -0
- package/dist/cjs/api/types/ChampAirWaybillStatusEnum1.d.ts +10 -0
- package/dist/cjs/api/types/ChampAirWaybillStatusEnum1.js +12 -0
- package/dist/cjs/api/types/ChampConfirmationReceipt1.d.ts +22 -0
- package/dist/cjs/api/types/ChampConfirmationReceipt1.js +5 -0
- package/dist/cjs/api/types/ChampFlightStatus1.d.ts +20 -0
- package/dist/cjs/api/types/ChampFlightStatus1.js +5 -0
- package/dist/cjs/api/types/ChampFlightStatusEvent1.d.ts +27 -0
- package/dist/cjs/api/types/ChampFlightStatusEvent1.js +5 -0
- package/dist/cjs/api/types/ChampOriginAndDestination.d.ts +7 -0
- package/dist/cjs/api/types/ChampOriginAndDestination.js +5 -0
- package/dist/cjs/api/types/ChampQuantity.d.ts +9 -0
- package/dist/cjs/api/types/ChampQuantity.js +5 -0
- package/dist/cjs/api/types/CredentialInfoResponse.d.ts +17 -0
- package/dist/cjs/api/types/CredentialInfoResponse.js +14 -0
- package/dist/cjs/api/types/OrgPrivateData1.d.ts +3 -0
- package/dist/cjs/api/types/WebcargoAccountId.d.ts +7 -0
- package/dist/cjs/api/types/WebcargoAccountId.js +5 -0
- package/dist/cjs/api/types/WebcargoBookStatus.d.ts +7 -0
- package/dist/cjs/api/types/WebcargoBookStatus.js +5 -0
- package/dist/cjs/api/types/WebcargoBookingRate.d.ts +20 -0
- package/dist/cjs/api/types/WebcargoBookingRate.js +5 -0
- package/dist/cjs/api/types/WebcargoBookingRecord1.d.ts +19 -0
- package/dist/cjs/api/types/WebcargoBookingRecord1.js +5 -0
- package/dist/cjs/api/types/WebcargoBusinessInfo.d.ts +9 -0
- package/dist/cjs/api/types/WebcargoBusinessInfo.js +5 -0
- package/dist/cjs/api/types/WebcargoCarrier.d.ts +6 -0
- package/dist/cjs/api/types/WebcargoCarrier.js +5 -0
- package/dist/cjs/api/types/WebcargoCommodityClass.d.ts +8 -0
- package/dist/cjs/api/types/WebcargoCommodityClass.js +5 -0
- package/dist/cjs/api/types/WebcargoConnection.d.ts +8 -0
- package/dist/cjs/api/types/WebcargoConnection.js +5 -0
- package/dist/cjs/api/types/WebcargoContact.d.ts +9 -0
- package/dist/cjs/api/types/WebcargoContact.js +5 -0
- package/dist/cjs/api/types/WebcargoDimension.d.ts +9 -0
- package/dist/cjs/api/types/WebcargoDimension.js +5 -0
- package/dist/cjs/api/types/WebcargoDocumentIdentifier.d.ts +8 -0
- package/dist/cjs/api/types/WebcargoDocumentIdentifier.js +5 -0
- package/dist/cjs/api/types/WebcargoEmbedResponse.d.ts +11 -0
- package/dist/cjs/api/types/WebcargoEmbedResponse.js +5 -0
- package/dist/cjs/api/types/WebcargoFee.d.ts +16 -0
- package/dist/cjs/api/types/WebcargoFee.js +5 -0
- package/dist/cjs/api/types/WebcargoLeg.d.ts +10 -0
- package/dist/cjs/api/types/WebcargoLeg.js +5 -0
- package/dist/cjs/api/types/WebcargoLoad.d.ts +11 -0
- package/dist/cjs/api/types/WebcargoLoad.js +5 -0
- package/dist/cjs/api/types/WebcargoLocation.d.ts +11 -0
- package/dist/cjs/api/types/WebcargoLocation.js +5 -0
- package/dist/cjs/api/types/WebcargoMessageHeader.d.ts +7 -0
- package/dist/cjs/api/types/WebcargoMessageHeader.js +5 -0
- package/dist/cjs/api/types/WebcargoPackage.d.ts +12 -0
- package/dist/cjs/api/types/WebcargoPackage.js +5 -0
- package/dist/cjs/api/types/WebcargoParty.d.ts +12 -0
- package/dist/cjs/api/types/WebcargoParty.js +5 -0
- package/dist/cjs/api/types/WebcargoPostalAddress.d.ts +14 -0
- package/dist/cjs/api/types/WebcargoPostalAddress.js +5 -0
- package/dist/cjs/api/types/WebcargoPriceIndicator.d.ts +12 -0
- package/dist/cjs/api/types/WebcargoPriceIndicator.js +5 -0
- package/dist/cjs/api/types/WebcargoProduct.d.ts +7 -0
- package/dist/cjs/api/types/WebcargoProduct.js +5 -0
- package/dist/cjs/api/types/WebcargoResponseStatus.d.ts +7 -0
- package/dist/cjs/api/types/WebcargoResponseStatus.js +5 -0
- package/dist/cjs/api/types/WebcargoResponseStatusEntry.d.ts +7 -0
- package/dist/cjs/api/types/WebcargoResponseStatusEntry.js +5 -0
- package/dist/cjs/api/types/WebcargoSegment.d.ts +21 -0
- package/dist/cjs/api/types/WebcargoSegment.js +5 -0
- package/dist/cjs/api/types/WebcargoShipment.d.ts +8 -0
- package/dist/cjs/api/types/WebcargoShipment.js +5 -0
- package/dist/cjs/api/types/WebcargoValueWithUnit.d.ts +13 -0
- package/dist/cjs/api/types/WebcargoValueWithUnit.js +5 -0
- package/dist/cjs/api/types/index.d.ts +81 -1
- package/dist/cjs/api/types/index.js +81 -1
- 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/index.d.mts +1 -0
- package/dist/esm/api/resources/index.mjs +1 -0
- package/dist/esm/api/resources/integrations/client/Client.d.mts +29 -0
- package/dist/esm/api/resources/integrations/client/Client.mjs +23 -0
- package/dist/esm/api/resources/integrations/client/index.d.mts +1 -0
- package/dist/esm/api/resources/integrations/client/index.mjs +1 -0
- package/dist/esm/api/resources/integrations/index.d.mts +2 -0
- package/dist/esm/api/resources/integrations/index.mjs +2 -0
- package/dist/esm/api/resources/integrations/resources/airWaybills/client/Client.d.mts +128 -0
- package/dist/esm/api/resources/integrations/resources/airWaybills/client/Client.mjs +453 -0
- package/dist/esm/api/resources/integrations/resources/airWaybills/client/index.d.mts +2 -0
- package/dist/esm/api/resources/integrations/resources/airWaybills/client/index.mjs +1 -0
- package/dist/esm/api/resources/integrations/resources/airWaybills/client/requests/AirWaybillCreateReq.d.mts +12 -0
- package/dist/esm/api/resources/integrations/resources/airWaybills/client/requests/ChampAirWaybillClientUpdate1.d.mts +40 -0
- package/dist/esm/api/resources/integrations/resources/airWaybills/client/requests/ChampAirWaybillClientUpdate1.mjs +4 -0
- package/dist/esm/api/resources/integrations/resources/airWaybills/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/integrations/resources/airWaybills/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/integrations/resources/airWaybills/index.d.mts +1 -0
- package/dist/esm/api/resources/integrations/resources/airWaybills/index.mjs +1 -0
- package/dist/esm/api/resources/integrations/resources/index.d.mts +5 -0
- package/dist/esm/api/resources/integrations/resources/index.mjs +5 -0
- package/dist/esm/api/resources/integrations/resources/webcargoBookings/client/Client.d.mts +60 -0
- package/dist/esm/api/resources/integrations/resources/webcargoBookings/client/Client.mjs +149 -0
- package/dist/esm/api/resources/integrations/resources/webcargoBookings/client/index.d.mts +1 -0
- package/dist/esm/api/resources/integrations/resources/webcargoBookings/client/index.mjs +1 -0
- package/dist/esm/api/resources/integrations/resources/webcargoBookings/index.d.mts +1 -0
- package/dist/esm/api/resources/integrations/resources/webcargoBookings/index.mjs +1 -0
- package/dist/esm/api/resources/integrations/resources/webcargoEmbed/client/Client.d.mts +53 -0
- package/dist/esm/api/resources/integrations/resources/webcargoEmbed/client/Client.mjs +99 -0
- package/dist/esm/api/resources/integrations/resources/webcargoEmbed/client/index.d.mts +2 -0
- package/dist/esm/api/resources/integrations/resources/webcargoEmbed/client/index.mjs +1 -0
- package/dist/esm/api/resources/integrations/resources/webcargoEmbed/client/requests/GetWebcargoEmbedReq.d.mts +18 -0
- package/dist/esm/api/resources/integrations/resources/webcargoEmbed/client/requests/GetWebcargoEmbedReq.mjs +4 -0
- package/dist/esm/api/resources/integrations/resources/webcargoEmbed/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/integrations/resources/webcargoEmbed/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/integrations/resources/webcargoEmbed/index.d.mts +1 -0
- package/dist/esm/api/resources/integrations/resources/webcargoEmbed/index.mjs +1 -0
- package/dist/esm/api/resources/utils/resources/dev/client/Client.d.mts +4 -4
- package/dist/esm/api/resources/utils/resources/dev/client/Client.mjs +7 -7
- package/dist/esm/api/types/Caller.d.mts +14 -0
- package/dist/esm/api/types/Caller.mjs +4 -0
- package/dist/esm/api/types/CallerCredentialTypeEnum.d.mts +9 -0
- package/dist/esm/api/types/CallerCredentialTypeEnum.mjs +8 -0
- package/dist/esm/api/types/CargojsonAccountContact.d.mts +13 -0
- package/dist/esm/api/types/CargojsonAccountContact.mjs +4 -0
- package/dist/esm/api/types/CargojsonAccounting.d.mts +11 -0
- package/dist/esm/api/types/CargojsonAccounting.mjs +4 -0
- package/dist/esm/api/types/CargojsonAccountingInformationIdentifier.d.mts +18 -0
- package/dist/esm/api/types/CargojsonAccountingInformationIdentifier.mjs +14 -0
- package/dist/esm/api/types/CargojsonAddress.d.mts +16 -0
- package/dist/esm/api/types/CargojsonAddress.mjs +4 -0
- package/dist/esm/api/types/CargojsonAddressing.d.mts +14 -0
- package/dist/esm/api/types/CargojsonAddressing.mjs +4 -0
- package/dist/esm/api/types/CargojsonAgent.d.mts +16 -0
- package/dist/esm/api/types/CargojsonAgent.mjs +4 -0
- package/dist/esm/api/types/CargojsonCassIndicator.d.mts +21 -0
- package/dist/esm/api/types/CargojsonCassIndicator.mjs +17 -0
- package/dist/esm/api/types/CargojsonCharge.d.mts +16 -0
- package/dist/esm/api/types/CargojsonCharge.mjs +4 -0
- package/dist/esm/api/types/CargojsonChargeCode.d.mts +34 -0
- package/dist/esm/api/types/CargojsonChargeCode.mjs +30 -0
- package/dist/esm/api/types/CargojsonChargeDeclarations.d.mts +17 -0
- package/dist/esm/api/types/CargojsonChargeDeclarations.mjs +4 -0
- package/dist/esm/api/types/CargojsonChargeItem.d.mts +20 -0
- package/dist/esm/api/types/CargojsonChargeItem.mjs +4 -0
- package/dist/esm/api/types/CargojsonChargeSummary.d.mts +15 -0
- package/dist/esm/api/types/CargojsonChargeSummary.mjs +4 -0
- package/dist/esm/api/types/CargojsonCollectChargesInDestCurrency.d.mts +13 -0
- package/dist/esm/api/types/CargojsonCollectChargesInDestCurrency.mjs +4 -0
- package/dist/esm/api/types/CargojsonCommissionInfo.d.mts +10 -0
- package/dist/esm/api/types/CargojsonCommissionInfo.mjs +4 -0
- package/dist/esm/api/types/CargojsonContactDetail.d.mts +11 -0
- package/dist/esm/api/types/CargojsonContactDetail.mjs +4 -0
- package/dist/esm/api/types/CargojsonDimensionUnit.d.mts +17 -0
- package/dist/esm/api/types/CargojsonDimensionUnit.mjs +12 -0
- package/dist/esm/api/types/CargojsonDimensions.d.mts +13 -0
- package/dist/esm/api/types/CargojsonDimensions.mjs +4 -0
- package/dist/esm/api/types/CargojsonEdifactData.d.mts +12 -0
- package/dist/esm/api/types/CargojsonEdifactData.mjs +4 -0
- package/dist/esm/api/types/CargojsonEntitlementCode.d.mts +11 -0
- package/dist/esm/api/types/CargojsonEntitlementCode.mjs +7 -0
- package/dist/esm/api/types/CargojsonFlightIdentity.d.mts +13 -0
- package/dist/esm/api/types/CargojsonFlightIdentity.mjs +4 -0
- package/dist/esm/api/types/CargojsonMessageHeader.d.mts +12 -0
- package/dist/esm/api/types/CargojsonMessageHeader.mjs +4 -0
- package/dist/esm/api/types/CargojsonNominatedHandlingParty.d.mts +10 -0
- package/dist/esm/api/types/CargojsonNominatedHandlingParty.mjs +4 -0
- package/dist/esm/api/types/CargojsonOci.d.mts +13 -0
- package/dist/esm/api/types/CargojsonOci.mjs +4 -0
- package/dist/esm/api/types/CargojsonOfficeMessageAddress.d.mts +11 -0
- package/dist/esm/api/types/CargojsonOfficeMessageAddress.mjs +4 -0
- package/dist/esm/api/types/CargojsonOtherChargeCode.d.mts +147 -0
- package/dist/esm/api/types/CargojsonOtherChargeCode.mjs +140 -0
- package/dist/esm/api/types/CargojsonOtherChargeItem.d.mts +13 -0
- package/dist/esm/api/types/CargojsonOtherChargeItem.mjs +4 -0
- package/dist/esm/api/types/CargojsonOtherParticipant.d.mts +13 -0
- package/dist/esm/api/types/CargojsonOtherParticipant.mjs +4 -0
- package/dist/esm/api/types/CargojsonPackaging.d.mts +15 -0
- package/dist/esm/api/types/CargojsonPackaging.mjs +4 -0
- package/dist/esm/api/types/CargojsonParticipantAddress.d.mts +11 -0
- package/dist/esm/api/types/CargojsonParticipantAddress.mjs +4 -0
- package/dist/esm/api/types/CargojsonParticipantAddressType.d.mts +16 -0
- package/dist/esm/api/types/CargojsonParticipantAddressType.mjs +12 -0
- package/dist/esm/api/types/CargojsonParticipantIdentifier.d.mts +12 -0
- package/dist/esm/api/types/CargojsonParticipantIdentifier.mjs +4 -0
- package/dist/esm/api/types/CargojsonParticipantType.d.mts +23 -0
- package/dist/esm/api/types/CargojsonParticipantType.mjs +19 -0
- package/dist/esm/api/types/CargojsonPaymentCondition.d.mts +11 -0
- package/dist/esm/api/types/CargojsonPaymentCondition.mjs +7 -0
- package/dist/esm/api/types/CargojsonRateClassCode.d.mts +22 -0
- package/dist/esm/api/types/CargojsonRateClassCode.mjs +18 -0
- package/dist/esm/api/types/CargojsonRouting.d.mts +10 -0
- package/dist/esm/api/types/CargojsonRouting.mjs +4 -0
- package/dist/esm/api/types/CargojsonSalesIncentive.d.mts +11 -0
- package/dist/esm/api/types/CargojsonSalesIncentive.mjs +4 -0
- package/dist/esm/api/types/CargojsonServiceCode.d.mts +35 -0
- package/dist/esm/api/types/CargojsonServiceCode.mjs +31 -0
- package/dist/esm/api/types/CargojsonShipmentReferenceInformation.d.mts +10 -0
- package/dist/esm/api/types/CargojsonShipmentReferenceInformation.mjs +4 -0
- package/dist/esm/api/types/CargojsonSpecialHandlingCode.d.mts +122 -0
- package/dist/esm/api/types/CargojsonSpecialHandlingCode.mjs +117 -0
- package/dist/esm/api/types/CargojsonUld.d.mts +15 -0
- package/dist/esm/api/types/CargojsonUld.mjs +4 -0
- package/dist/esm/api/types/CargojsonVolume.d.mts +11 -0
- package/dist/esm/api/types/CargojsonVolume.mjs +4 -0
- package/dist/esm/api/types/CargojsonVolumeUnit.d.mts +10 -0
- package/dist/esm/api/types/CargojsonVolumeUnit.mjs +9 -0
- package/dist/esm/api/types/CargojsonWeight.d.mts +16 -0
- package/dist/esm/api/types/CargojsonWeight.mjs +4 -0
- package/dist/esm/api/types/CargojsonWeightUnit.d.mts +8 -0
- package/dist/esm/api/types/CargojsonWeightUnit.mjs +7 -0
- package/dist/esm/api/types/ChampAirWaybill1.d.mts +49 -0
- package/dist/esm/api/types/ChampAirWaybill1.mjs +4 -0
- package/dist/esm/api/types/ChampAirWaybillStatusEnum1.d.mts +10 -0
- package/dist/esm/api/types/ChampAirWaybillStatusEnum1.mjs +9 -0
- package/dist/esm/api/types/ChampConfirmationReceipt1.d.mts +22 -0
- package/dist/esm/api/types/ChampConfirmationReceipt1.mjs +4 -0
- package/dist/esm/api/types/ChampFlightStatus1.d.mts +20 -0
- package/dist/esm/api/types/ChampFlightStatus1.mjs +4 -0
- package/dist/esm/api/types/ChampFlightStatusEvent1.d.mts +27 -0
- package/dist/esm/api/types/ChampFlightStatusEvent1.mjs +4 -0
- package/dist/esm/api/types/ChampOriginAndDestination.d.mts +7 -0
- package/dist/esm/api/types/ChampOriginAndDestination.mjs +4 -0
- package/dist/esm/api/types/ChampQuantity.d.mts +9 -0
- package/dist/esm/api/types/ChampQuantity.mjs +4 -0
- package/dist/esm/api/types/CredentialInfoResponse.d.mts +17 -0
- package/dist/esm/api/types/CredentialInfoResponse.mjs +11 -0
- package/dist/esm/api/types/OrgPrivateData1.d.mts +3 -0
- package/dist/esm/api/types/WebcargoAccountId.d.mts +7 -0
- package/dist/esm/api/types/WebcargoAccountId.mjs +4 -0
- package/dist/esm/api/types/WebcargoBookStatus.d.mts +7 -0
- package/dist/esm/api/types/WebcargoBookStatus.mjs +4 -0
- package/dist/esm/api/types/WebcargoBookingRate.d.mts +20 -0
- package/dist/esm/api/types/WebcargoBookingRate.mjs +4 -0
- package/dist/esm/api/types/WebcargoBookingRecord1.d.mts +19 -0
- package/dist/esm/api/types/WebcargoBookingRecord1.mjs +4 -0
- package/dist/esm/api/types/WebcargoBusinessInfo.d.mts +9 -0
- package/dist/esm/api/types/WebcargoBusinessInfo.mjs +4 -0
- package/dist/esm/api/types/WebcargoCarrier.d.mts +6 -0
- package/dist/esm/api/types/WebcargoCarrier.mjs +4 -0
- package/dist/esm/api/types/WebcargoCommodityClass.d.mts +8 -0
- package/dist/esm/api/types/WebcargoCommodityClass.mjs +4 -0
- package/dist/esm/api/types/WebcargoConnection.d.mts +8 -0
- package/dist/esm/api/types/WebcargoConnection.mjs +4 -0
- package/dist/esm/api/types/WebcargoContact.d.mts +9 -0
- package/dist/esm/api/types/WebcargoContact.mjs +4 -0
- package/dist/esm/api/types/WebcargoDimension.d.mts +9 -0
- package/dist/esm/api/types/WebcargoDimension.mjs +4 -0
- package/dist/esm/api/types/WebcargoDocumentIdentifier.d.mts +8 -0
- package/dist/esm/api/types/WebcargoDocumentIdentifier.mjs +4 -0
- package/dist/esm/api/types/WebcargoEmbedResponse.d.mts +11 -0
- package/dist/esm/api/types/WebcargoEmbedResponse.mjs +4 -0
- package/dist/esm/api/types/WebcargoFee.d.mts +16 -0
- package/dist/esm/api/types/WebcargoFee.mjs +4 -0
- package/dist/esm/api/types/WebcargoLeg.d.mts +10 -0
- package/dist/esm/api/types/WebcargoLeg.mjs +4 -0
- package/dist/esm/api/types/WebcargoLoad.d.mts +11 -0
- package/dist/esm/api/types/WebcargoLoad.mjs +4 -0
- package/dist/esm/api/types/WebcargoLocation.d.mts +11 -0
- package/dist/esm/api/types/WebcargoLocation.mjs +4 -0
- package/dist/esm/api/types/WebcargoMessageHeader.d.mts +7 -0
- package/dist/esm/api/types/WebcargoMessageHeader.mjs +4 -0
- package/dist/esm/api/types/WebcargoPackage.d.mts +12 -0
- package/dist/esm/api/types/WebcargoPackage.mjs +4 -0
- package/dist/esm/api/types/WebcargoParty.d.mts +12 -0
- package/dist/esm/api/types/WebcargoParty.mjs +4 -0
- package/dist/esm/api/types/WebcargoPostalAddress.d.mts +14 -0
- package/dist/esm/api/types/WebcargoPostalAddress.mjs +4 -0
- package/dist/esm/api/types/WebcargoPriceIndicator.d.mts +12 -0
- package/dist/esm/api/types/WebcargoPriceIndicator.mjs +4 -0
- package/dist/esm/api/types/WebcargoProduct.d.mts +7 -0
- package/dist/esm/api/types/WebcargoProduct.mjs +4 -0
- package/dist/esm/api/types/WebcargoResponseStatus.d.mts +7 -0
- package/dist/esm/api/types/WebcargoResponseStatus.mjs +4 -0
- package/dist/esm/api/types/WebcargoResponseStatusEntry.d.mts +7 -0
- package/dist/esm/api/types/WebcargoResponseStatusEntry.mjs +4 -0
- package/dist/esm/api/types/WebcargoSegment.d.mts +21 -0
- package/dist/esm/api/types/WebcargoSegment.mjs +4 -0
- package/dist/esm/api/types/WebcargoShipment.d.mts +8 -0
- package/dist/esm/api/types/WebcargoShipment.mjs +4 -0
- package/dist/esm/api/types/WebcargoValueWithUnit.d.mts +13 -0
- package/dist/esm/api/types/WebcargoValueWithUnit.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +81 -1
- package/dist/esm/api/types/index.mjs +81 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +662 -3
- package/dist/cjs/api/types/DecodedJwtWithOrgAndUserId.d.ts +0 -27
- package/dist/esm/api/types/DecodedJwtWithOrgAndUserId.d.mts +0 -27
- /package/dist/cjs/api/{types/DecodedJwtWithOrgAndUserId.js → resources/integrations/resources/airWaybills/client/requests/AirWaybillCreateReq.js} +0 -0
- /package/dist/esm/api/{types/DecodedJwtWithOrgAndUserId.mjs → resources/integrations/resources/airWaybills/client/requests/AirWaybillCreateReq.mjs} +0 -0
|
@@ -0,0 +1,453 @@
|
|
|
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 AirWaybills {
|
|
19
|
+
constructor(_options = {}) {
|
|
20
|
+
this._options = _options;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Creates a CHAMP air waybill pre-populated from the stored WebCargo booking record. The booking must be synced first via the webcargo_bookings sync route. Returns 409 if an air waybill already exists for this task group. | (AirWaybillCreateReq) -> (ChampAirWaybill1)
|
|
24
|
+
*
|
|
25
|
+
* @param {Chrt.integrations.AirWaybillCreateReq} request
|
|
26
|
+
* @param {AirWaybills.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
|
+
*
|
|
28
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* await client.integrations.airWaybills.createV1({
|
|
32
|
+
* task_group_id: "task_group_id"
|
|
33
|
+
* })
|
|
34
|
+
*/
|
|
35
|
+
createV1(request, requestOptions) {
|
|
36
|
+
return core.HttpResponsePromise.fromPromise(this.__createV1(request, requestOptions));
|
|
37
|
+
}
|
|
38
|
+
__createV1(request, requestOptions) {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
var _a, _b, _c, _d;
|
|
41
|
+
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);
|
|
42
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
43
|
+
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, "integrations/air_waybills/create/v1"),
|
|
44
|
+
method: "POST",
|
|
45
|
+
headers: _headers,
|
|
46
|
+
contentType: "application/json",
|
|
47
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
48
|
+
requestType: "json",
|
|
49
|
+
body: request,
|
|
50
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
51
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
52
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
53
|
+
});
|
|
54
|
+
if (_response.ok) {
|
|
55
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
56
|
+
}
|
|
57
|
+
if (_response.error.reason === "status-code") {
|
|
58
|
+
switch (_response.error.statusCode) {
|
|
59
|
+
case 422:
|
|
60
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
61
|
+
default:
|
|
62
|
+
throw new errors.ChrtError({
|
|
63
|
+
statusCode: _response.error.statusCode,
|
|
64
|
+
body: _response.error.body,
|
|
65
|
+
rawResponse: _response.rawResponse,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
switch (_response.error.reason) {
|
|
70
|
+
case "non-json":
|
|
71
|
+
throw new errors.ChrtError({
|
|
72
|
+
statusCode: _response.error.statusCode,
|
|
73
|
+
body: _response.error.rawBody,
|
|
74
|
+
rawResponse: _response.rawResponse,
|
|
75
|
+
});
|
|
76
|
+
case "timeout":
|
|
77
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /integrations/air_waybills/create/v1.");
|
|
78
|
+
case "unknown":
|
|
79
|
+
throw new errors.ChrtError({
|
|
80
|
+
message: _response.error.errorMessage,
|
|
81
|
+
rawResponse: _response.rawResponse,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Retrieves the stored CHAMP air waybill for a task group. | () -> (ChampAirWaybill1)
|
|
88
|
+
*
|
|
89
|
+
* @param {string} taskGroupId
|
|
90
|
+
* @param {AirWaybills.RequestOptions} requestOptions - Request-specific configuration.
|
|
91
|
+
*
|
|
92
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* await client.integrations.airWaybills.retrieveV1("task_group_id")
|
|
96
|
+
*/
|
|
97
|
+
retrieveV1(taskGroupId, requestOptions) {
|
|
98
|
+
return core.HttpResponsePromise.fromPromise(this.__retrieveV1(taskGroupId, requestOptions));
|
|
99
|
+
}
|
|
100
|
+
__retrieveV1(taskGroupId, requestOptions) {
|
|
101
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
+
var _a, _b, _c, _d;
|
|
103
|
+
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);
|
|
104
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
105
|
+
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, `integrations/air_waybills/retrieve/v1/${encodeURIComponent(taskGroupId)}`),
|
|
106
|
+
method: "GET",
|
|
107
|
+
headers: _headers,
|
|
108
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
109
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
110
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
111
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
112
|
+
});
|
|
113
|
+
if (_response.ok) {
|
|
114
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
115
|
+
}
|
|
116
|
+
if (_response.error.reason === "status-code") {
|
|
117
|
+
switch (_response.error.statusCode) {
|
|
118
|
+
case 422:
|
|
119
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
120
|
+
default:
|
|
121
|
+
throw new errors.ChrtError({
|
|
122
|
+
statusCode: _response.error.statusCode,
|
|
123
|
+
body: _response.error.body,
|
|
124
|
+
rawResponse: _response.rawResponse,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
switch (_response.error.reason) {
|
|
129
|
+
case "non-json":
|
|
130
|
+
throw new errors.ChrtError({
|
|
131
|
+
statusCode: _response.error.statusCode,
|
|
132
|
+
body: _response.error.rawBody,
|
|
133
|
+
rawResponse: _response.rawResponse,
|
|
134
|
+
});
|
|
135
|
+
case "timeout":
|
|
136
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /integrations/air_waybills/retrieve/v1/{task_group_id}.");
|
|
137
|
+
case "unknown":
|
|
138
|
+
throw new errors.ChrtError({
|
|
139
|
+
message: _response.error.errorMessage,
|
|
140
|
+
rawResponse: _response.rawResponse,
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Updates fields on an existing CHAMP air waybill. Any editable field can be set — only fields included in the request body are changed. | (ChampAirWaybillClientUpdate1) -> (ChampAirWaybill1)
|
|
147
|
+
*
|
|
148
|
+
* @param {string} taskGroupId
|
|
149
|
+
* @param {Chrt.integrations.ChampAirWaybillClientUpdate1} request
|
|
150
|
+
* @param {AirWaybills.RequestOptions} requestOptions - Request-specific configuration.
|
|
151
|
+
*
|
|
152
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* await client.integrations.airWaybills.updateV1("task_group_id")
|
|
156
|
+
*/
|
|
157
|
+
updateV1(taskGroupId, request = {}, requestOptions) {
|
|
158
|
+
return core.HttpResponsePromise.fromPromise(this.__updateV1(taskGroupId, request, requestOptions));
|
|
159
|
+
}
|
|
160
|
+
__updateV1(taskGroupId_1) {
|
|
161
|
+
return __awaiter(this, arguments, void 0, function* (taskGroupId, request = {}, requestOptions) {
|
|
162
|
+
var _a, _b, _c, _d;
|
|
163
|
+
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);
|
|
164
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
165
|
+
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, `integrations/air_waybills/update/v1/${encodeURIComponent(taskGroupId)}`),
|
|
166
|
+
method: "PATCH",
|
|
167
|
+
headers: _headers,
|
|
168
|
+
contentType: "application/json",
|
|
169
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
170
|
+
requestType: "json",
|
|
171
|
+
body: request,
|
|
172
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
173
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
174
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
175
|
+
});
|
|
176
|
+
if (_response.ok) {
|
|
177
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
178
|
+
}
|
|
179
|
+
if (_response.error.reason === "status-code") {
|
|
180
|
+
switch (_response.error.statusCode) {
|
|
181
|
+
case 422:
|
|
182
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
183
|
+
default:
|
|
184
|
+
throw new errors.ChrtError({
|
|
185
|
+
statusCode: _response.error.statusCode,
|
|
186
|
+
body: _response.error.body,
|
|
187
|
+
rawResponse: _response.rawResponse,
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
switch (_response.error.reason) {
|
|
192
|
+
case "non-json":
|
|
193
|
+
throw new errors.ChrtError({
|
|
194
|
+
statusCode: _response.error.statusCode,
|
|
195
|
+
body: _response.error.rawBody,
|
|
196
|
+
rawResponse: _response.rawResponse,
|
|
197
|
+
});
|
|
198
|
+
case "timeout":
|
|
199
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /integrations/air_waybills/update/v1/{task_group_id}.");
|
|
200
|
+
case "unknown":
|
|
201
|
+
throw new errors.ChrtError({
|
|
202
|
+
message: _response.error.errorMessage,
|
|
203
|
+
rawResponse: _response.rawResponse,
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Submits a draft CHAMP air waybill to Traxon cargoHUB. Requires shipper, consignee, and charge_declarations to be filled in. Returns 422 if the AWB is not in draft status or required fields are missing. | () -> (ChampAirWaybill1)
|
|
210
|
+
*
|
|
211
|
+
* @param {string} taskGroupId
|
|
212
|
+
* @param {AirWaybills.RequestOptions} requestOptions - Request-specific configuration.
|
|
213
|
+
*
|
|
214
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
215
|
+
*
|
|
216
|
+
* @example
|
|
217
|
+
* await client.integrations.airWaybills.submitV1("task_group_id")
|
|
218
|
+
*/
|
|
219
|
+
submitV1(taskGroupId, requestOptions) {
|
|
220
|
+
return core.HttpResponsePromise.fromPromise(this.__submitV1(taskGroupId, requestOptions));
|
|
221
|
+
}
|
|
222
|
+
__submitV1(taskGroupId, requestOptions) {
|
|
223
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
224
|
+
var _a, _b, _c, _d;
|
|
225
|
+
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);
|
|
226
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
227
|
+
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, `integrations/air_waybills/submit/v1/${encodeURIComponent(taskGroupId)}`),
|
|
228
|
+
method: "POST",
|
|
229
|
+
headers: _headers,
|
|
230
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
231
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
232
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
233
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
234
|
+
});
|
|
235
|
+
if (_response.ok) {
|
|
236
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
237
|
+
}
|
|
238
|
+
if (_response.error.reason === "status-code") {
|
|
239
|
+
switch (_response.error.statusCode) {
|
|
240
|
+
case 422:
|
|
241
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
242
|
+
default:
|
|
243
|
+
throw new errors.ChrtError({
|
|
244
|
+
statusCode: _response.error.statusCode,
|
|
245
|
+
body: _response.error.body,
|
|
246
|
+
rawResponse: _response.rawResponse,
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
switch (_response.error.reason) {
|
|
251
|
+
case "non-json":
|
|
252
|
+
throw new errors.ChrtError({
|
|
253
|
+
statusCode: _response.error.statusCode,
|
|
254
|
+
body: _response.error.rawBody,
|
|
255
|
+
rawResponse: _response.rawResponse,
|
|
256
|
+
});
|
|
257
|
+
case "timeout":
|
|
258
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /integrations/air_waybills/submit/v1/{task_group_id}.");
|
|
259
|
+
case "unknown":
|
|
260
|
+
throw new errors.ChrtError({
|
|
261
|
+
message: _response.error.errorMessage,
|
|
262
|
+
rawResponse: _response.rawResponse,
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Converts a CHAMP air waybill to PDF via CHAMP's conversion API. Requires shipper, consignee, and charge_declarations to be filled in. Returns the PDF file as application/pdf. | () -> (PDF binary)
|
|
269
|
+
*
|
|
270
|
+
* @param {string} taskGroupId
|
|
271
|
+
* @param {AirWaybills.RequestOptions} requestOptions - Request-specific configuration.
|
|
272
|
+
*
|
|
273
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
274
|
+
*
|
|
275
|
+
* @example
|
|
276
|
+
* await client.integrations.airWaybills.pdfV1("task_group_id")
|
|
277
|
+
*/
|
|
278
|
+
pdfV1(taskGroupId, requestOptions) {
|
|
279
|
+
return core.HttpResponsePromise.fromPromise(this.__pdfV1(taskGroupId, requestOptions));
|
|
280
|
+
}
|
|
281
|
+
__pdfV1(taskGroupId, requestOptions) {
|
|
282
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
283
|
+
var _a, _b, _c, _d;
|
|
284
|
+
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);
|
|
285
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
286
|
+
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, `integrations/air_waybills/pdf/v1/${encodeURIComponent(taskGroupId)}`),
|
|
287
|
+
method: "POST",
|
|
288
|
+
headers: _headers,
|
|
289
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
290
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
291
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
292
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
293
|
+
});
|
|
294
|
+
if (_response.ok) {
|
|
295
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
296
|
+
}
|
|
297
|
+
if (_response.error.reason === "status-code") {
|
|
298
|
+
switch (_response.error.statusCode) {
|
|
299
|
+
case 422:
|
|
300
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
301
|
+
default:
|
|
302
|
+
throw new errors.ChrtError({
|
|
303
|
+
statusCode: _response.error.statusCode,
|
|
304
|
+
body: _response.error.body,
|
|
305
|
+
rawResponse: _response.rawResponse,
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
switch (_response.error.reason) {
|
|
310
|
+
case "non-json":
|
|
311
|
+
throw new errors.ChrtError({
|
|
312
|
+
statusCode: _response.error.statusCode,
|
|
313
|
+
body: _response.error.rawBody,
|
|
314
|
+
rawResponse: _response.rawResponse,
|
|
315
|
+
});
|
|
316
|
+
case "timeout":
|
|
317
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /integrations/air_waybills/pdf/v1/{task_group_id}.");
|
|
318
|
+
case "unknown":
|
|
319
|
+
throw new errors.ChrtError({
|
|
320
|
+
message: _response.error.errorMessage,
|
|
321
|
+
rawResponse: _response.rawResponse,
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Retrieves all CHAMP confirmation receipts linked to the air waybill for a task group. | () -> (list[ChampConfirmationReceipt1])
|
|
328
|
+
*
|
|
329
|
+
* @param {string} taskGroupId
|
|
330
|
+
* @param {AirWaybills.RequestOptions} requestOptions - Request-specific configuration.
|
|
331
|
+
*
|
|
332
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
333
|
+
*
|
|
334
|
+
* @example
|
|
335
|
+
* await client.integrations.airWaybills.confirmationsV1("task_group_id")
|
|
336
|
+
*/
|
|
337
|
+
confirmationsV1(taskGroupId, requestOptions) {
|
|
338
|
+
return core.HttpResponsePromise.fromPromise(this.__confirmationsV1(taskGroupId, requestOptions));
|
|
339
|
+
}
|
|
340
|
+
__confirmationsV1(taskGroupId, requestOptions) {
|
|
341
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
342
|
+
var _a, _b, _c, _d;
|
|
343
|
+
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);
|
|
344
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
345
|
+
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, `integrations/air_waybills/confirmations/v1/${encodeURIComponent(taskGroupId)}`),
|
|
346
|
+
method: "GET",
|
|
347
|
+
headers: _headers,
|
|
348
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
349
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
350
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
351
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
352
|
+
});
|
|
353
|
+
if (_response.ok) {
|
|
354
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
355
|
+
}
|
|
356
|
+
if (_response.error.reason === "status-code") {
|
|
357
|
+
switch (_response.error.statusCode) {
|
|
358
|
+
case 422:
|
|
359
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
360
|
+
default:
|
|
361
|
+
throw new errors.ChrtError({
|
|
362
|
+
statusCode: _response.error.statusCode,
|
|
363
|
+
body: _response.error.body,
|
|
364
|
+
rawResponse: _response.rawResponse,
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
switch (_response.error.reason) {
|
|
369
|
+
case "non-json":
|
|
370
|
+
throw new errors.ChrtError({
|
|
371
|
+
statusCode: _response.error.statusCode,
|
|
372
|
+
body: _response.error.rawBody,
|
|
373
|
+
rawResponse: _response.rawResponse,
|
|
374
|
+
});
|
|
375
|
+
case "timeout":
|
|
376
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /integrations/air_waybills/confirmations/v1/{task_group_id}.");
|
|
377
|
+
case "unknown":
|
|
378
|
+
throw new errors.ChrtError({
|
|
379
|
+
message: _response.error.errorMessage,
|
|
380
|
+
rawResponse: _response.rawResponse,
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Retrieves all CHAMP flight status updates linked to the air waybill for a task group. | () -> (list[ChampFlightStatus1])
|
|
387
|
+
*
|
|
388
|
+
* @param {string} taskGroupId
|
|
389
|
+
* @param {AirWaybills.RequestOptions} requestOptions - Request-specific configuration.
|
|
390
|
+
*
|
|
391
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
392
|
+
*
|
|
393
|
+
* @example
|
|
394
|
+
* await client.integrations.airWaybills.flightStatusesV1("task_group_id")
|
|
395
|
+
*/
|
|
396
|
+
flightStatusesV1(taskGroupId, requestOptions) {
|
|
397
|
+
return core.HttpResponsePromise.fromPromise(this.__flightStatusesV1(taskGroupId, requestOptions));
|
|
398
|
+
}
|
|
399
|
+
__flightStatusesV1(taskGroupId, requestOptions) {
|
|
400
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
401
|
+
var _a, _b, _c, _d;
|
|
402
|
+
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);
|
|
403
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
404
|
+
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, `integrations/air_waybills/flight_statuses/v1/${encodeURIComponent(taskGroupId)}`),
|
|
405
|
+
method: "GET",
|
|
406
|
+
headers: _headers,
|
|
407
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
408
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
409
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
410
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
411
|
+
});
|
|
412
|
+
if (_response.ok) {
|
|
413
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
414
|
+
}
|
|
415
|
+
if (_response.error.reason === "status-code") {
|
|
416
|
+
switch (_response.error.statusCode) {
|
|
417
|
+
case 422:
|
|
418
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
419
|
+
default:
|
|
420
|
+
throw new errors.ChrtError({
|
|
421
|
+
statusCode: _response.error.statusCode,
|
|
422
|
+
body: _response.error.body,
|
|
423
|
+
rawResponse: _response.rawResponse,
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
switch (_response.error.reason) {
|
|
428
|
+
case "non-json":
|
|
429
|
+
throw new errors.ChrtError({
|
|
430
|
+
statusCode: _response.error.statusCode,
|
|
431
|
+
body: _response.error.rawBody,
|
|
432
|
+
rawResponse: _response.rawResponse,
|
|
433
|
+
});
|
|
434
|
+
case "timeout":
|
|
435
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /integrations/air_waybills/flight_statuses/v1/{task_group_id}.");
|
|
436
|
+
case "unknown":
|
|
437
|
+
throw new errors.ChrtError({
|
|
438
|
+
message: _response.error.errorMessage,
|
|
439
|
+
rawResponse: _response.rawResponse,
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
_getAuthorizationHeader() {
|
|
445
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
446
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
447
|
+
if (bearer != null) {
|
|
448
|
+
return `Bearer ${bearer}`;
|
|
449
|
+
}
|
|
450
|
+
return undefined;
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
*/
|
|
9
|
+
export interface ChampAirWaybillClientUpdate1 {
|
|
10
|
+
total_consignment_number_of_pieces?: number | null;
|
|
11
|
+
weight?: Chrt.CargojsonWeight | null;
|
|
12
|
+
volume?: Chrt.CargojsonVolume | null;
|
|
13
|
+
charge_items?: Chrt.CargojsonChargeItem[] | null;
|
|
14
|
+
flights?: Chrt.CargojsonFlightIdentity[] | null;
|
|
15
|
+
iso_currency_code?: string | null;
|
|
16
|
+
agent?: Chrt.CargojsonAgent | null;
|
|
17
|
+
route?: Chrt.CargojsonRouting[] | null;
|
|
18
|
+
shipper?: Chrt.CargojsonAccountContact | null;
|
|
19
|
+
consignee?: Chrt.CargojsonAccountContact | null;
|
|
20
|
+
charge_declarations?: Chrt.CargojsonChargeDeclarations | null;
|
|
21
|
+
density_group?: number | null;
|
|
22
|
+
special_handling_codes?: Chrt.CargojsonSpecialHandlingCode[] | null;
|
|
23
|
+
additional_special_handling_codes?: string[] | null;
|
|
24
|
+
special_service_request?: string | null;
|
|
25
|
+
also_notify?: Chrt.CargojsonAccountContact | null;
|
|
26
|
+
prepaid_charge_summary?: Chrt.CargojsonChargeSummary | null;
|
|
27
|
+
collect_charge_summary?: Chrt.CargojsonChargeSummary | null;
|
|
28
|
+
accounting?: Chrt.CargojsonAccounting[] | null;
|
|
29
|
+
other_charges?: Chrt.CargojsonOtherChargeItem[] | null;
|
|
30
|
+
shippers_certification?: string | null;
|
|
31
|
+
other_service_information?: string | null;
|
|
32
|
+
charges_collect_in_dest_currency?: Chrt.CargojsonCollectChargesInDestCurrency | null;
|
|
33
|
+
customs_origin_code?: string | null;
|
|
34
|
+
commission_info?: Chrt.CargojsonCommissionInfo | null;
|
|
35
|
+
sales_incentive?: Chrt.CargojsonSalesIncentive | null;
|
|
36
|
+
nominated_handling_party?: Chrt.CargojsonNominatedHandlingParty | null;
|
|
37
|
+
shipment_reference_information?: Chrt.CargojsonShipmentReferenceInformation | null;
|
|
38
|
+
other_participant?: Chrt.CargojsonOtherParticipant[] | null;
|
|
39
|
+
oci?: Chrt.CargojsonOci[] | null;
|
|
40
|
+
}
|
|
@@ -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,5 @@
|
|
|
1
|
+
export * as airWaybills from "./airWaybills/index.mjs";
|
|
2
|
+
export * as webcargoBookings from "./webcargoBookings/index.mjs";
|
|
3
|
+
export * as webcargoEmbed from "./webcargoEmbed/index.mjs";
|
|
4
|
+
export * from "./airWaybills/client/requests/index.mjs";
|
|
5
|
+
export * from "./webcargoEmbed/client/requests/index.mjs";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * as airWaybills from "./airWaybills/index.mjs";
|
|
2
|
+
export * as webcargoBookings from "./webcargoBookings/index.mjs";
|
|
3
|
+
export * as webcargoEmbed from "./webcargoEmbed/index.mjs";
|
|
4
|
+
export * from "./airWaybills/client/requests/index.mjs";
|
|
5
|
+
export * from "./webcargoEmbed/client/requests/index.mjs";
|
|
@@ -0,0 +1,60 @@
|
|
|
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 WebcargoBookings {
|
|
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 WebcargoBookings {
|
|
31
|
+
protected readonly _options: WebcargoBookings.Options;
|
|
32
|
+
constructor(_options?: WebcargoBookings.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Fetches the latest booking record from WebCargo for a task group and upserts it in the database. Creates the record on first call, updates on subsequent calls. | () -> (WebcargoBookingRecord1)
|
|
35
|
+
*
|
|
36
|
+
* @param {string} taskGroupId
|
|
37
|
+
* @param {WebcargoBookings.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
|
+
*
|
|
39
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* await client.integrations.webcargoBookings.syncV1("task_group_id")
|
|
43
|
+
*/
|
|
44
|
+
syncV1(taskGroupId: string, requestOptions?: WebcargoBookings.RequestOptions): core.HttpResponsePromise<Chrt.WebcargoBookingRecord1>;
|
|
45
|
+
private __syncV1;
|
|
46
|
+
/**
|
|
47
|
+
* Retrieves the stored WebCargo booking record for a task group. Returns 404 if the booking has never been synced. | () -> (WebcargoBookingRecord1)
|
|
48
|
+
*
|
|
49
|
+
* @param {string} taskGroupId
|
|
50
|
+
* @param {WebcargoBookings.RequestOptions} requestOptions - Request-specific configuration.
|
|
51
|
+
*
|
|
52
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* await client.integrations.webcargoBookings.retrieveV1("task_group_id")
|
|
56
|
+
*/
|
|
57
|
+
retrieveV1(taskGroupId: string, requestOptions?: WebcargoBookings.RequestOptions): core.HttpResponsePromise<Chrt.WebcargoBookingRecord1>;
|
|
58
|
+
private __retrieveV1;
|
|
59
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
60
|
+
}
|