@chrt-inc/typescript-sdk 1.510.0 → 1.512.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/tracking/resources/devices/client/Client.d.ts +30 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.js +128 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesPauseV1Request.d.ts +12 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesPauseV1Request.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesUnpauseV1Request.d.ts +12 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesUnpauseV1Request.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/index.d.ts +2 -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/resources/utils/resources/root/client/Client.d.ts +8 -8
- package/dist/cjs/api/resources/utils/resources/root/client/Client.js +14 -14
- package/dist/cjs/api/types/Caller.d.ts +15 -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/CargoByDeviceDataPointMetadata1.d.ts +1 -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/CredentialInfoRes.d.ts +9 -0
- package/dist/cjs/api/types/CredentialInfoRes.js +5 -0
- package/dist/cjs/api/types/DeviceLimitedForList1.d.ts +1 -0
- package/dist/cjs/api/types/OrgPrivateData1.d.ts +3 -0
- package/dist/cjs/api/types/SessionByDeviceDataPointMetadata1.d.ts +1 -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/tracking/resources/devices/client/Client.d.mts +30 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.mjs +128 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesPauseV1Request.d.mts +12 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesPauseV1Request.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesUnpauseV1Request.d.mts +12 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesUnpauseV1Request.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/index.d.mts +2 -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/resources/utils/resources/root/client/Client.d.mts +8 -8
- package/dist/esm/api/resources/utils/resources/root/client/Client.mjs +14 -14
- package/dist/esm/api/types/Caller.d.mts +15 -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/CargoByDeviceDataPointMetadata1.d.mts +1 -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/CredentialInfoRes.d.mts +9 -0
- package/dist/esm/api/types/CredentialInfoRes.mjs +4 -0
- package/dist/esm/api/types/DeviceLimitedForList1.d.mts +1 -0
- package/dist/esm/api/types/OrgPrivateData1.d.mts +3 -0
- package/dist/esm/api/types/SessionByDeviceDataPointMetadata1.d.mts +1 -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 +798 -9
- 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,149 @@
|
|
|
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 WebcargoBookings {
|
|
19
|
+
constructor(_options = {}) {
|
|
20
|
+
this._options = _options;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 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)
|
|
24
|
+
*
|
|
25
|
+
* @param {string} taskGroupId
|
|
26
|
+
* @param {WebcargoBookings.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
|
+
*
|
|
28
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* await client.integrations.webcargoBookings.syncV1("task_group_id")
|
|
32
|
+
*/
|
|
33
|
+
syncV1(taskGroupId, requestOptions) {
|
|
34
|
+
return core.HttpResponsePromise.fromPromise(this.__syncV1(taskGroupId, requestOptions));
|
|
35
|
+
}
|
|
36
|
+
__syncV1(taskGroupId, requestOptions) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
var _a, _b, _c, _d;
|
|
39
|
+
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);
|
|
40
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
41
|
+
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/webcargo_bookings/sync/v1/${encodeURIComponent(taskGroupId)}`),
|
|
42
|
+
method: "POST",
|
|
43
|
+
headers: _headers,
|
|
44
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
45
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
46
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
47
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
48
|
+
});
|
|
49
|
+
if (_response.ok) {
|
|
50
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
51
|
+
}
|
|
52
|
+
if (_response.error.reason === "status-code") {
|
|
53
|
+
switch (_response.error.statusCode) {
|
|
54
|
+
case 422:
|
|
55
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
56
|
+
default:
|
|
57
|
+
throw new errors.ChrtError({
|
|
58
|
+
statusCode: _response.error.statusCode,
|
|
59
|
+
body: _response.error.body,
|
|
60
|
+
rawResponse: _response.rawResponse,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
switch (_response.error.reason) {
|
|
65
|
+
case "non-json":
|
|
66
|
+
throw new errors.ChrtError({
|
|
67
|
+
statusCode: _response.error.statusCode,
|
|
68
|
+
body: _response.error.rawBody,
|
|
69
|
+
rawResponse: _response.rawResponse,
|
|
70
|
+
});
|
|
71
|
+
case "timeout":
|
|
72
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /integrations/webcargo_bookings/sync/v1/{task_group_id}.");
|
|
73
|
+
case "unknown":
|
|
74
|
+
throw new errors.ChrtError({
|
|
75
|
+
message: _response.error.errorMessage,
|
|
76
|
+
rawResponse: _response.rawResponse,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Retrieves the stored WebCargo booking record for a task group. Returns 404 if the booking has never been synced. | () -> (WebcargoBookingRecord1)
|
|
83
|
+
*
|
|
84
|
+
* @param {string} taskGroupId
|
|
85
|
+
* @param {WebcargoBookings.RequestOptions} requestOptions - Request-specific configuration.
|
|
86
|
+
*
|
|
87
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* await client.integrations.webcargoBookings.retrieveV1("task_group_id")
|
|
91
|
+
*/
|
|
92
|
+
retrieveV1(taskGroupId, requestOptions) {
|
|
93
|
+
return core.HttpResponsePromise.fromPromise(this.__retrieveV1(taskGroupId, requestOptions));
|
|
94
|
+
}
|
|
95
|
+
__retrieveV1(taskGroupId, requestOptions) {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
var _a, _b, _c, _d;
|
|
98
|
+
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);
|
|
99
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
100
|
+
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/webcargo_bookings/retrieve/v1/${encodeURIComponent(taskGroupId)}`),
|
|
101
|
+
method: "GET",
|
|
102
|
+
headers: _headers,
|
|
103
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
104
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
105
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
106
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
107
|
+
});
|
|
108
|
+
if (_response.ok) {
|
|
109
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
110
|
+
}
|
|
111
|
+
if (_response.error.reason === "status-code") {
|
|
112
|
+
switch (_response.error.statusCode) {
|
|
113
|
+
case 422:
|
|
114
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
115
|
+
default:
|
|
116
|
+
throw new errors.ChrtError({
|
|
117
|
+
statusCode: _response.error.statusCode,
|
|
118
|
+
body: _response.error.body,
|
|
119
|
+
rawResponse: _response.rawResponse,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
switch (_response.error.reason) {
|
|
124
|
+
case "non-json":
|
|
125
|
+
throw new errors.ChrtError({
|
|
126
|
+
statusCode: _response.error.statusCode,
|
|
127
|
+
body: _response.error.rawBody,
|
|
128
|
+
rawResponse: _response.rawResponse,
|
|
129
|
+
});
|
|
130
|
+
case "timeout":
|
|
131
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /integrations/webcargo_bookings/retrieve/v1/{task_group_id}.");
|
|
132
|
+
case "unknown":
|
|
133
|
+
throw new errors.ChrtError({
|
|
134
|
+
message: _response.error.errorMessage,
|
|
135
|
+
rawResponse: _response.rawResponse,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
_getAuthorizationHeader() {
|
|
141
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
142
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
143
|
+
if (bearer != null) {
|
|
144
|
+
return `Bearer ${bearer}`;
|
|
145
|
+
}
|
|
146
|
+
return undefined;
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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,53 @@
|
|
|
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 WebcargoEmbed {
|
|
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 WebcargoEmbed {
|
|
31
|
+
protected readonly _options: WebcargoEmbed.Options;
|
|
32
|
+
constructor(_options?: WebcargoEmbed.Options);
|
|
33
|
+
/**
|
|
34
|
+
* Generates a WebCargo Sky Embed token for a FLIGHT task group. Assembles cargo data from the task group's tasks and returns an embed URL for the booking widget. | (GetWebcargoEmbedReq) -> (WebcargoEmbedResponse)
|
|
35
|
+
*
|
|
36
|
+
* @param {string} taskGroupId
|
|
37
|
+
* @param {Chrt.integrations.GetWebcargoEmbedReq} request
|
|
38
|
+
* @param {WebcargoEmbed.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
|
+
*
|
|
40
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* await client.integrations.webcargoEmbed.getEmbedV1("task_group_id", {
|
|
44
|
+
* origin: "origin",
|
|
45
|
+
* destination: "destination",
|
|
46
|
+
* departure: "departure",
|
|
47
|
+
* country: "country"
|
|
48
|
+
* })
|
|
49
|
+
*/
|
|
50
|
+
getEmbedV1(taskGroupId: string, request: Chrt.integrations.GetWebcargoEmbedReq, requestOptions?: WebcargoEmbed.RequestOptions): core.HttpResponsePromise<Chrt.WebcargoEmbedResponse>;
|
|
51
|
+
private __getEmbedV1;
|
|
52
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
53
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
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 WebcargoEmbed {
|
|
19
|
+
constructor(_options = {}) {
|
|
20
|
+
this._options = _options;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Generates a WebCargo Sky Embed token for a FLIGHT task group. Assembles cargo data from the task group's tasks and returns an embed URL for the booking widget. | (GetWebcargoEmbedReq) -> (WebcargoEmbedResponse)
|
|
24
|
+
*
|
|
25
|
+
* @param {string} taskGroupId
|
|
26
|
+
* @param {Chrt.integrations.GetWebcargoEmbedReq} request
|
|
27
|
+
* @param {WebcargoEmbed.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
|
+
*
|
|
29
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* await client.integrations.webcargoEmbed.getEmbedV1("task_group_id", {
|
|
33
|
+
* origin: "origin",
|
|
34
|
+
* destination: "destination",
|
|
35
|
+
* departure: "departure",
|
|
36
|
+
* country: "country"
|
|
37
|
+
* })
|
|
38
|
+
*/
|
|
39
|
+
getEmbedV1(taskGroupId, request, requestOptions) {
|
|
40
|
+
return core.HttpResponsePromise.fromPromise(this.__getEmbedV1(taskGroupId, request, requestOptions));
|
|
41
|
+
}
|
|
42
|
+
__getEmbedV1(taskGroupId, request, requestOptions) {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
var _a, _b, _c, _d;
|
|
45
|
+
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);
|
|
46
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
47
|
+
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/webcargo_embed/get_embed/v1/${encodeURIComponent(taskGroupId)}`),
|
|
48
|
+
method: "POST",
|
|
49
|
+
headers: _headers,
|
|
50
|
+
contentType: "application/json",
|
|
51
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
52
|
+
requestType: "json",
|
|
53
|
+
body: request,
|
|
54
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
55
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
56
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
57
|
+
});
|
|
58
|
+
if (_response.ok) {
|
|
59
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
60
|
+
}
|
|
61
|
+
if (_response.error.reason === "status-code") {
|
|
62
|
+
switch (_response.error.statusCode) {
|
|
63
|
+
case 422:
|
|
64
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
65
|
+
default:
|
|
66
|
+
throw new errors.ChrtError({
|
|
67
|
+
statusCode: _response.error.statusCode,
|
|
68
|
+
body: _response.error.body,
|
|
69
|
+
rawResponse: _response.rawResponse,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
switch (_response.error.reason) {
|
|
74
|
+
case "non-json":
|
|
75
|
+
throw new errors.ChrtError({
|
|
76
|
+
statusCode: _response.error.statusCode,
|
|
77
|
+
body: _response.error.rawBody,
|
|
78
|
+
rawResponse: _response.rawResponse,
|
|
79
|
+
});
|
|
80
|
+
case "timeout":
|
|
81
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /integrations/webcargo_embed/get_embed/v1/{task_group_id}.");
|
|
82
|
+
case "unknown":
|
|
83
|
+
throw new errors.ChrtError({
|
|
84
|
+
message: _response.error.errorMessage,
|
|
85
|
+
rawResponse: _response.rawResponse,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
_getAuthorizationHeader() {
|
|
91
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
93
|
+
if (bearer != null) {
|
|
94
|
+
return `Bearer ${bearer}`;
|
|
95
|
+
}
|
|
96
|
+
return undefined;
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* origin: "origin",
|
|
8
|
+
* destination: "destination",
|
|
9
|
+
* departure: "departure",
|
|
10
|
+
* country: "country"
|
|
11
|
+
* }
|
|
12
|
+
*/
|
|
13
|
+
export interface GetWebcargoEmbedReq {
|
|
14
|
+
origin: string;
|
|
15
|
+
destination: string;
|
|
16
|
+
departure: string;
|
|
17
|
+
country: string;
|
|
18
|
+
}
|
package/dist/esm/api/resources/integrations/resources/webcargoEmbed/client/requests/index.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type GetWebcargoEmbedReq } from "./GetWebcargoEmbedReq.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -76,6 +76,36 @@ export declare class Devices {
|
|
|
76
76
|
*/
|
|
77
77
|
archiveV1(request: Chrt.tracking.DevicesArchiveV1Request, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
78
78
|
private __archiveV1;
|
|
79
|
+
/**
|
|
80
|
+
* Pauses a device. Cargo-by-device and session-by-device data points are marked as paused and excluded from data point queries. | () -> (bool)
|
|
81
|
+
*
|
|
82
|
+
* @param {Chrt.tracking.DevicesPauseV1Request} request
|
|
83
|
+
* @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
|
|
84
|
+
*
|
|
85
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* await client.tracking.devices.pauseV1({
|
|
89
|
+
* device_id: "device_id"
|
|
90
|
+
* })
|
|
91
|
+
*/
|
|
92
|
+
pauseV1(request: Chrt.tracking.DevicesPauseV1Request, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
93
|
+
private __pauseV1;
|
|
94
|
+
/**
|
|
95
|
+
* Unpauses a device. | () -> (bool)
|
|
96
|
+
*
|
|
97
|
+
* @param {Chrt.tracking.DevicesUnpauseV1Request} request
|
|
98
|
+
* @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
|
|
99
|
+
*
|
|
100
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* await client.tracking.devices.unpauseV1({
|
|
104
|
+
* device_id: "device_id"
|
|
105
|
+
* })
|
|
106
|
+
*/
|
|
107
|
+
unpauseV1(request: Chrt.tracking.DevicesUnpauseV1Request, requestOptions?: Devices.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
108
|
+
private __unpauseV1;
|
|
79
109
|
/**
|
|
80
110
|
* Adds and/or removes org_ids from a device's shared_with_org_ids list. Removal overrides addition. | (DevicesUpdateSharedOrgsReq1) -> (bool)
|
|
81
111
|
*
|
|
@@ -226,6 +226,134 @@ export class Devices {
|
|
|
226
226
|
}
|
|
227
227
|
});
|
|
228
228
|
}
|
|
229
|
+
/**
|
|
230
|
+
* Pauses a device. Cargo-by-device and session-by-device data points are marked as paused and excluded from data point queries. | () -> (bool)
|
|
231
|
+
*
|
|
232
|
+
* @param {Chrt.tracking.DevicesPauseV1Request} request
|
|
233
|
+
* @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
|
|
234
|
+
*
|
|
235
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
236
|
+
*
|
|
237
|
+
* @example
|
|
238
|
+
* await client.tracking.devices.pauseV1({
|
|
239
|
+
* device_id: "device_id"
|
|
240
|
+
* })
|
|
241
|
+
*/
|
|
242
|
+
pauseV1(request, requestOptions) {
|
|
243
|
+
return core.HttpResponsePromise.fromPromise(this.__pauseV1(request, requestOptions));
|
|
244
|
+
}
|
|
245
|
+
__pauseV1(request, requestOptions) {
|
|
246
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
247
|
+
var _a, _b, _c, _d;
|
|
248
|
+
const { device_id: deviceId } = request;
|
|
249
|
+
const _queryParams = {};
|
|
250
|
+
_queryParams["device_id"] = deviceId;
|
|
251
|
+
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);
|
|
252
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
253
|
+
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, "tracking/devices/pause/v1"),
|
|
254
|
+
method: "POST",
|
|
255
|
+
headers: _headers,
|
|
256
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
257
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
258
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
259
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
260
|
+
});
|
|
261
|
+
if (_response.ok) {
|
|
262
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
263
|
+
}
|
|
264
|
+
if (_response.error.reason === "status-code") {
|
|
265
|
+
switch (_response.error.statusCode) {
|
|
266
|
+
case 422:
|
|
267
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
268
|
+
default:
|
|
269
|
+
throw new errors.ChrtError({
|
|
270
|
+
statusCode: _response.error.statusCode,
|
|
271
|
+
body: _response.error.body,
|
|
272
|
+
rawResponse: _response.rawResponse,
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
switch (_response.error.reason) {
|
|
277
|
+
case "non-json":
|
|
278
|
+
throw new errors.ChrtError({
|
|
279
|
+
statusCode: _response.error.statusCode,
|
|
280
|
+
body: _response.error.rawBody,
|
|
281
|
+
rawResponse: _response.rawResponse,
|
|
282
|
+
});
|
|
283
|
+
case "timeout":
|
|
284
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/devices/pause/v1.");
|
|
285
|
+
case "unknown":
|
|
286
|
+
throw new errors.ChrtError({
|
|
287
|
+
message: _response.error.errorMessage,
|
|
288
|
+
rawResponse: _response.rawResponse,
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Unpauses a device. | () -> (bool)
|
|
295
|
+
*
|
|
296
|
+
* @param {Chrt.tracking.DevicesUnpauseV1Request} request
|
|
297
|
+
* @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
|
|
298
|
+
*
|
|
299
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
300
|
+
*
|
|
301
|
+
* @example
|
|
302
|
+
* await client.tracking.devices.unpauseV1({
|
|
303
|
+
* device_id: "device_id"
|
|
304
|
+
* })
|
|
305
|
+
*/
|
|
306
|
+
unpauseV1(request, requestOptions) {
|
|
307
|
+
return core.HttpResponsePromise.fromPromise(this.__unpauseV1(request, requestOptions));
|
|
308
|
+
}
|
|
309
|
+
__unpauseV1(request, requestOptions) {
|
|
310
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
311
|
+
var _a, _b, _c, _d;
|
|
312
|
+
const { device_id: deviceId } = request;
|
|
313
|
+
const _queryParams = {};
|
|
314
|
+
_queryParams["device_id"] = deviceId;
|
|
315
|
+
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);
|
|
316
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
317
|
+
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, "tracking/devices/unpause/v1"),
|
|
318
|
+
method: "POST",
|
|
319
|
+
headers: _headers,
|
|
320
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
321
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
322
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
323
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
324
|
+
});
|
|
325
|
+
if (_response.ok) {
|
|
326
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
327
|
+
}
|
|
328
|
+
if (_response.error.reason === "status-code") {
|
|
329
|
+
switch (_response.error.statusCode) {
|
|
330
|
+
case 422:
|
|
331
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
332
|
+
default:
|
|
333
|
+
throw new errors.ChrtError({
|
|
334
|
+
statusCode: _response.error.statusCode,
|
|
335
|
+
body: _response.error.body,
|
|
336
|
+
rawResponse: _response.rawResponse,
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
switch (_response.error.reason) {
|
|
341
|
+
case "non-json":
|
|
342
|
+
throw new errors.ChrtError({
|
|
343
|
+
statusCode: _response.error.statusCode,
|
|
344
|
+
body: _response.error.rawBody,
|
|
345
|
+
rawResponse: _response.rawResponse,
|
|
346
|
+
});
|
|
347
|
+
case "timeout":
|
|
348
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/devices/unpause/v1.");
|
|
349
|
+
case "unknown":
|
|
350
|
+
throw new errors.ChrtError({
|
|
351
|
+
message: _response.error.errorMessage,
|
|
352
|
+
rawResponse: _response.rawResponse,
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
}
|
|
229
357
|
/**
|
|
230
358
|
* Adds and/or removes org_ids from a device's shared_with_org_ids list. Removal overrides addition. | (DevicesUpdateSharedOrgsReq1) -> (bool)
|
|
231
359
|
*
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { type DeviceClientCreate1 } from "./DeviceClientCreate1.mjs";
|
|
2
2
|
export { type DeviceClientUpdate1 } from "./DeviceClientUpdate1.mjs";
|
|
3
3
|
export { type DevicesArchiveV1Request } from "./DevicesArchiveV1Request.mjs";
|
|
4
|
+
export { type DevicesPauseV1Request } from "./DevicesPauseV1Request.mjs";
|
|
5
|
+
export { type DevicesUnpauseV1Request } from "./DevicesUnpauseV1Request.mjs";
|
|
4
6
|
export { type DevicesUpdateSharedOrgsReq1 } from "./DevicesUpdateSharedOrgsReq1.mjs";
|
|
5
7
|
export { type DevicesGetV1Request } from "./DevicesGetV1Request.mjs";
|
|
6
8
|
export { type DevicesListV1Request } from "./DevicesListV1Request.mjs";
|
|
@@ -95,15 +95,15 @@ export declare class Dev {
|
|
|
95
95
|
getUserIdV2(requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<string>;
|
|
96
96
|
private __getUserIdV2;
|
|
97
97
|
/**
|
|
98
|
-
* Returns the
|
|
98
|
+
* Returns the verified caller identity and raw credential claims for development purposes. | () -> (CredentialInfoRes)
|
|
99
99
|
*
|
|
100
100
|
* @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
|
|
101
101
|
*
|
|
102
102
|
* @example
|
|
103
|
-
* await client.utils.dev.
|
|
103
|
+
* await client.utils.dev.getCredentialInfoV1()
|
|
104
104
|
*/
|
|
105
|
-
|
|
106
|
-
private
|
|
105
|
+
getCredentialInfoV1(requestOptions?: Dev.RequestOptions): core.HttpResponsePromise<Chrt.CredentialInfoRes>;
|
|
106
|
+
private __getCredentialInfoV1;
|
|
107
107
|
/**
|
|
108
108
|
* Retrieves the primary email address for the caller from the authentication service. | () -> (str)
|
|
109
109
|
*
|
|
@@ -313,22 +313,22 @@ export class Dev {
|
|
|
313
313
|
});
|
|
314
314
|
}
|
|
315
315
|
/**
|
|
316
|
-
* Returns the
|
|
316
|
+
* Returns the verified caller identity and raw credential claims for development purposes. | () -> (CredentialInfoRes)
|
|
317
317
|
*
|
|
318
318
|
* @param {Dev.RequestOptions} requestOptions - Request-specific configuration.
|
|
319
319
|
*
|
|
320
320
|
* @example
|
|
321
|
-
* await client.utils.dev.
|
|
321
|
+
* await client.utils.dev.getCredentialInfoV1()
|
|
322
322
|
*/
|
|
323
|
-
|
|
324
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
323
|
+
getCredentialInfoV1(requestOptions) {
|
|
324
|
+
return core.HttpResponsePromise.fromPromise(this.__getCredentialInfoV1(requestOptions));
|
|
325
325
|
}
|
|
326
|
-
|
|
326
|
+
__getCredentialInfoV1(requestOptions) {
|
|
327
327
|
return __awaiter(this, void 0, void 0, function* () {
|
|
328
328
|
var _a, _b, _c, _d;
|
|
329
329
|
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);
|
|
330
330
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
331
|
-
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, "dev/
|
|
331
|
+
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, "dev/credential_info/v1"),
|
|
332
332
|
method: "GET",
|
|
333
333
|
headers: _headers,
|
|
334
334
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -354,7 +354,7 @@ export class Dev {
|
|
|
354
354
|
rawResponse: _response.rawResponse,
|
|
355
355
|
});
|
|
356
356
|
case "timeout":
|
|
357
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /dev/
|
|
357
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /dev/credential_info/v1.");
|
|
358
358
|
case "unknown":
|
|
359
359
|
throw new errors.ChrtError({
|
|
360
360
|
message: _response.error.errorMessage,
|