@chrt-inc/typescript-sdk 0.231.0 → 0.271.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/README.md +13 -2
- package/dist/cjs/Client.d.ts +4 -2
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/connections/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/connections/client/Client.js +10 -6
- package/dist/cjs/api/resources/connections/resources/connectionToCourier/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/connections/resources/connectionToCourier/client/Client.js +5 -3
- package/dist/cjs/api/resources/courierPayDriverLineItemGroups/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/courierPayDriverLineItemGroups/client/Client.js +20 -12
- package/dist/cjs/api/resources/courierPayDriverLineItemGroups/resources/addLineItems/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/courierPayDriverLineItemGroups/resources/addLineItems/client/Client.js +5 -3
- package/dist/cjs/api/resources/courierPayDriverLineItemGroups/resources/removeLineItems/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/courierPayDriverLineItemGroups/resources/removeLineItems/client/Client.js +5 -3
- package/dist/cjs/api/resources/courierPayDriverPayouts/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/courierPayDriverPayouts/client/Client.js +20 -12
- package/dist/cjs/api/resources/courierPayDriverRateSheets/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/courierPayDriverRateSheets/client/Client.js +30 -18
- package/dist/cjs/api/resources/dev/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/dev/client/Client.js +30 -18
- package/dist/cjs/api/resources/drivers/client/Client.d.ts +12 -3
- package/dist/cjs/api/resources/drivers/client/Client.js +58 -31
- package/dist/cjs/api/resources/drivers/client/requests/DriverLastSeenReq.d.ts +8 -1
- package/dist/cjs/api/resources/milestoneNotifications/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/milestoneNotifications/client/Client.js +10 -6
- package/dist/cjs/api/resources/milestones/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/milestones/client/Client.js +10 -6
- package/dist/cjs/api/resources/milestones/resources/blurhash/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/milestones/resources/blurhash/client/Client.js +5 -3
- package/dist/cjs/api/resources/milestones/resources/images/client/Client.d.ts +5 -2
- package/dist/cjs/api/resources/milestones/resources/images/client/Client.js +16 -10
- package/dist/cjs/api/resources/milestones/resources/images/client/requests/BodyPostMilestonesUploadImageOortMilestonesImagesUploadMilestoneIdPost.d.ts +1 -1
- package/dist/cjs/api/resources/notifications/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/notifications/resources/courier/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/notifications/resources/courier/client/Client.js +10 -6
- package/dist/cjs/api/resources/notifications/resources/shipper/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/notifications/resources/shipper/client/Client.js +10 -6
- package/dist/cjs/api/resources/offChrtShipperOrgInfo/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/offChrtShipperOrgInfo/client/Client.js +25 -15
- package/dist/cjs/api/resources/orders/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/orders/client/Client.js +25 -15
- package/dist/cjs/api/resources/orders/resources/full/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/orders/resources/full/client/Client.js +15 -9
- package/dist/cjs/api/resources/orgConnectionInfos/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/orgConnectionInfos/resources/courier/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/orgConnectionInfos/resources/courier/client/Client.js +15 -9
- package/dist/cjs/api/resources/orgConnectionInfos/resources/shipper/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/orgConnectionInfos/resources/shipper/client/Client.js +15 -9
- package/dist/cjs/api/resources/orgProfiles/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/orgProfiles/client/Client.js +25 -15
- package/dist/cjs/api/resources/orgs/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/orgs/client/Client.js +40 -24
- package/dist/cjs/api/resources/payments/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/payments/client/Client.js +25 -15
- package/dist/cjs/api/resources/root/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/root/client/Client.js +25 -15
- package/dist/cjs/api/resources/shipperContactInfo/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/shipperContactInfo/client/Client.js +45 -27
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/client/Client.js +25 -15
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/resources/addLineItems/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/resources/addLineItems/client/Client.js +5 -3
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/resources/courier/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/resources/courier/client/Client.js +5 -3
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/resources/removeLineItems/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/resources/removeLineItems/client/Client.js +5 -3
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/resources/shipper/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/shipperPayCourierLineItemGroups/resources/shipper/client/Client.js +15 -9
- package/dist/cjs/api/resources/shipperPayCourierPayments/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/shipperPayCourierPayments/client/Client.js +35 -21
- package/dist/cjs/api/resources/shipperPayCourierRateSheets/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/shipperPayCourierRateSheets/client/Client.js +25 -15
- package/dist/cjs/api/resources/taskGroups/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/taskGroups/client/Client.js +30 -18
- package/dist/cjs/api/resources/taskGroups/resources/full/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/taskGroups/resources/full/client/Client.js +10 -6
- package/dist/cjs/api/resources/taskGroups/resources/togglePause/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/taskGroups/resources/togglePause/client/Client.js +5 -3
- package/dist/cjs/api/resources/tracking/client/Client.d.ts +13 -1
- package/dist/cjs/api/resources/tracking/client/Client.js +24 -4
- package/dist/cjs/api/resources/tracking/resources/cargoByDevice/client/Client.d.ts +50 -0
- package/dist/cjs/api/resources/tracking/resources/cargoByDevice/client/Client.js +137 -0
- package/dist/cjs/api/resources/tracking/resources/cargoByDevice/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/tracking/resources/cargoByDevice/client/index.js +17 -0
- package/dist/cjs/api/resources/tracking/resources/cargoByDevice/client/requests/CargoByDeviceLastSeenRequest.d.ts +14 -0
- package/dist/cjs/api/resources/tracking/resources/cargoByDevice/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/tracking/resources/cargoByDevice/index.d.ts +1 -0
- package/dist/cjs/api/resources/tracking/resources/cargoByDevice/index.js +17 -0
- package/dist/cjs/api/resources/tracking/resources/cargoByDriver/client/Client.d.ts +5 -22
- package/dist/cjs/api/resources/tracking/resources/cargoByDriver/client/Client.js +6 -71
- package/dist/cjs/api/resources/tracking/resources/cargoByDriver/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.d.ts +129 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.js +509 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/index.js +17 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesDeleteRequest.d.ts +11 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesGetRequest.d.ts +11 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesLinkToCargoRequest.d.ts +14 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesRegisterToOrgReq1.d.ts +15 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesRegisterToOrgReq1.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesUnlinkFromCargoRequest.d.ts +12 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesUnlinkFromCargoRequest.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesUpdateRequest1.d.ts +16 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/DevicesUpdateRequest1.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/index.d.ts +6 -0
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/tracking/resources/devices/index.d.ts +1 -0
- package/dist/cjs/api/resources/tracking/resources/devices/index.js +17 -0
- package/dist/cjs/api/resources/tracking/resources/driver/client/Client.d.ts +60 -0
- package/dist/cjs/api/resources/tracking/resources/driver/client/Client.js +143 -0
- package/dist/cjs/api/resources/tracking/resources/driver/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/tracking/resources/driver/client/index.js +17 -0
- package/dist/cjs/api/resources/tracking/resources/{cargoByDriver/client/requests/CargoByDriverUpdateReq.d.ts → driver/client/requests/DriverUpdateReq.d.ts} +9 -2
- package/dist/cjs/api/resources/tracking/resources/driver/client/requests/DriverUpdateReq.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/driver/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/tracking/resources/driver/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/tracking/resources/driver/index.d.ts +1 -0
- package/dist/cjs/api/resources/tracking/resources/driver/index.js +17 -0
- package/dist/cjs/api/resources/tracking/resources/index.d.ts +8 -0
- package/dist/cjs/api/resources/tracking/resources/index.js +9 -1
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/Client.d.ts +240 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/Client.js +973 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/index.js +17 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceCreateSessionRequest1.d.ts +13 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceCreateSessionRequest1.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceDataPointsPublicRequest.d.ts +13 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceDataPointsPublicRequest.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceDataPointsRequest.d.ts +13 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceDataPointsRequest.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceDeleteRequest.d.ts +12 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceDeleteRequest.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceGetRequest.d.ts +12 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceGetRequest.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceLastSeenPublicRequest.d.ts +12 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceLastSeenPublicRequest.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceLastSeenRequest.d.ts +12 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceLastSeenRequest.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceMarkOutliersRequest1.d.ts +14 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceMarkOutliersRequest1.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDevicePauseRecordingRequest.d.ts +12 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDevicePauseRecordingRequest.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceResumeRecordingRequest.d.ts +12 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceResumeRecordingRequest.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceStartRequest.d.ts +12 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceStartRequest.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceTerminateRequest.d.ts +12 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceTerminateRequest.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceUpdateRequest1.d.ts +15 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceUpdateRequest1.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/index.d.ts +13 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/index.d.ts +1 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/index.js +17 -0
- package/dist/cjs/api/resources/tracking/resources/taskGroupByDriver/client/Client.d.ts +5 -22
- package/dist/cjs/api/resources/tracking/resources/taskGroupByDriver/client/Client.js +6 -71
- package/dist/cjs/api/resources/tracking/resources/taskGroupByDriver/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/users/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/users/client/Client.js +5 -3
- package/dist/cjs/api/resources/utils/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/utils/client/Client.js +5 -4
- package/dist/cjs/api/resources/utils/client/requests/UtilsGetTimezoneRequest.d.ts +2 -6
- package/dist/cjs/api/types/Cargo1.d.ts +1 -1
- package/dist/cjs/api/types/DecodedJwtWithOrgAndUserId.d.ts +1 -1
- package/dist/cjs/api/types/Device1.d.ts +21 -0
- package/dist/cjs/api/types/Device1.js +5 -0
- package/dist/cjs/api/types/DriverUpdateResp.d.ts +11 -0
- package/dist/cjs/api/types/DriverUpdateResp.js +5 -0
- package/dist/cjs/api/types/{LocationFeatureInputGeometry.d.ts → Geometry.d.ts} +2 -2
- package/dist/cjs/api/types/Geometry.js +5 -0
- package/dist/cjs/api/types/LocationFeature.d.ts +5 -1
- package/dist/cjs/api/types/LocationProperties.d.ts +2 -0
- package/dist/cjs/api/types/OutlierLabellerEnum.d.ts +8 -0
- package/dist/cjs/api/types/OutlierLabellerEnum.js +10 -0
- package/dist/cjs/api/types/Session1.d.ts +17 -0
- package/dist/cjs/api/types/Session1.js +5 -0
- package/dist/cjs/api/types/SessionByDeviceDeleteResponse1.d.ts +7 -0
- package/dist/cjs/api/types/SessionByDeviceDeleteResponse1.js +5 -0
- package/dist/cjs/api/types/SessionByDeviceMarkOutliersResponse1.d.ts +7 -0
- package/dist/cjs/api/types/SessionByDeviceMarkOutliersResponse1.js +5 -0
- package/dist/cjs/api/types/TrackingCargoByDeviceDataPoint1.d.ts +12 -0
- package/dist/cjs/api/types/TrackingCargoByDeviceDataPoint1.js +5 -0
- package/dist/cjs/api/types/TrackingCargoByDeviceDataPointMetadata1.d.ts +11 -0
- package/dist/cjs/api/types/TrackingCargoByDeviceDataPointMetadata1.js +5 -0
- package/dist/cjs/api/types/TrackingCargoByDriverDataPointMetadata1.d.ts +3 -0
- package/dist/cjs/api/types/TrackingDeviceTypeEnum1.d.ts +9 -0
- package/dist/cjs/api/types/TrackingDeviceTypeEnum1.js +11 -0
- package/dist/cjs/api/types/TrackingSessionByDeviceDataPoint1.d.ts +12 -0
- package/dist/cjs/api/types/TrackingSessionByDeviceDataPoint1.js +5 -0
- package/dist/cjs/api/types/TrackingSessionByDeviceDataPointMetadata1.d.ts +9 -0
- package/dist/cjs/api/types/TrackingSessionByDeviceDataPointMetadata1.js +5 -0
- package/dist/cjs/api/types/TrackingTaskGroupByDriverDataPointMetadata1.d.ts +3 -0
- package/dist/cjs/api/types/index.d.ts +12 -2
- package/dist/cjs/api/types/index.js +12 -2
- package/dist/cjs/core/auth/AuthProvider.d.ts +4 -0
- package/dist/cjs/core/auth/AuthProvider.js +2 -0
- package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
- package/dist/cjs/core/auth/AuthRequest.js +2 -0
- package/dist/cjs/core/auth/index.d.ts +2 -0
- package/dist/cjs/core/exports.d.ts +1 -0
- package/dist/cjs/core/exports.js +17 -0
- package/dist/cjs/core/fetcher/Fetcher.d.ts +2 -2
- package/dist/cjs/core/fetcher/Fetcher.js +2 -2
- package/dist/cjs/core/fetcher/index.d.ts +5 -5
- package/dist/cjs/core/fetcher/index.js +5 -5
- package/dist/cjs/core/fetcher/requestWithRetries.js +44 -8
- package/dist/cjs/core/file/exports.d.ts +1 -0
- package/dist/cjs/core/file/exports.js +2 -0
- package/dist/cjs/core/file/file.d.ts +5 -0
- package/dist/cjs/core/file/file.js +203 -0
- package/dist/cjs/core/file/index.d.ts +2 -0
- package/dist/cjs/core/file/index.js +18 -0
- package/dist/cjs/core/file/types.d.ts +66 -0
- package/dist/cjs/core/file/types.js +2 -0
- package/dist/cjs/core/headers.d.ts +2 -2
- package/dist/cjs/core/index.d.ts +1 -1
- package/dist/cjs/core/index.js +2 -2
- package/dist/cjs/exports.d.ts +1 -0
- package/dist/cjs/exports.js +17 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +4 -2
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/connections/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/connections/client/Client.mjs +10 -6
- package/dist/esm/api/resources/connections/resources/connectionToCourier/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/connections/resources/connectionToCourier/client/Client.mjs +5 -3
- package/dist/esm/api/resources/courierPayDriverLineItemGroups/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/courierPayDriverLineItemGroups/client/Client.mjs +20 -12
- package/dist/esm/api/resources/courierPayDriverLineItemGroups/resources/addLineItems/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/courierPayDriverLineItemGroups/resources/addLineItems/client/Client.mjs +5 -3
- package/dist/esm/api/resources/courierPayDriverLineItemGroups/resources/removeLineItems/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/courierPayDriverLineItemGroups/resources/removeLineItems/client/Client.mjs +5 -3
- package/dist/esm/api/resources/courierPayDriverPayouts/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/courierPayDriverPayouts/client/Client.mjs +20 -12
- package/dist/esm/api/resources/courierPayDriverRateSheets/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/courierPayDriverRateSheets/client/Client.mjs +30 -18
- package/dist/esm/api/resources/dev/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/dev/client/Client.mjs +30 -18
- package/dist/esm/api/resources/drivers/client/Client.d.mts +12 -3
- package/dist/esm/api/resources/drivers/client/Client.mjs +58 -31
- package/dist/esm/api/resources/drivers/client/requests/DriverLastSeenReq.d.mts +8 -1
- package/dist/esm/api/resources/milestoneNotifications/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/milestoneNotifications/client/Client.mjs +10 -6
- package/dist/esm/api/resources/milestones/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/milestones/client/Client.mjs +10 -6
- package/dist/esm/api/resources/milestones/resources/blurhash/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/milestones/resources/blurhash/client/Client.mjs +5 -3
- package/dist/esm/api/resources/milestones/resources/images/client/Client.d.mts +5 -2
- package/dist/esm/api/resources/milestones/resources/images/client/Client.mjs +16 -10
- package/dist/esm/api/resources/milestones/resources/images/client/requests/BodyPostMilestonesUploadImageOortMilestonesImagesUploadMilestoneIdPost.d.mts +1 -1
- package/dist/esm/api/resources/notifications/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/notifications/resources/courier/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/notifications/resources/courier/client/Client.mjs +10 -6
- package/dist/esm/api/resources/notifications/resources/shipper/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/notifications/resources/shipper/client/Client.mjs +10 -6
- package/dist/esm/api/resources/offChrtShipperOrgInfo/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/offChrtShipperOrgInfo/client/Client.mjs +25 -15
- package/dist/esm/api/resources/orders/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/orders/client/Client.mjs +25 -15
- package/dist/esm/api/resources/orders/resources/full/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/orders/resources/full/client/Client.mjs +15 -9
- package/dist/esm/api/resources/orgConnectionInfos/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/orgConnectionInfos/resources/courier/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/orgConnectionInfos/resources/courier/client/Client.mjs +15 -9
- package/dist/esm/api/resources/orgConnectionInfos/resources/shipper/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/orgConnectionInfos/resources/shipper/client/Client.mjs +15 -9
- package/dist/esm/api/resources/orgProfiles/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/orgProfiles/client/Client.mjs +25 -15
- package/dist/esm/api/resources/orgs/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/orgs/client/Client.mjs +40 -24
- package/dist/esm/api/resources/payments/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/payments/client/Client.mjs +25 -15
- package/dist/esm/api/resources/root/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/root/client/Client.mjs +25 -15
- package/dist/esm/api/resources/shipperContactInfo/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/shipperContactInfo/client/Client.mjs +45 -27
- package/dist/esm/api/resources/shipperPayCourierLineItemGroups/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/shipperPayCourierLineItemGroups/client/Client.mjs +25 -15
- package/dist/esm/api/resources/shipperPayCourierLineItemGroups/resources/addLineItems/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/shipperPayCourierLineItemGroups/resources/addLineItems/client/Client.mjs +5 -3
- package/dist/esm/api/resources/shipperPayCourierLineItemGroups/resources/courier/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/shipperPayCourierLineItemGroups/resources/courier/client/Client.mjs +5 -3
- package/dist/esm/api/resources/shipperPayCourierLineItemGroups/resources/removeLineItems/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/shipperPayCourierLineItemGroups/resources/removeLineItems/client/Client.mjs +5 -3
- package/dist/esm/api/resources/shipperPayCourierLineItemGroups/resources/shipper/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/shipperPayCourierLineItemGroups/resources/shipper/client/Client.mjs +15 -9
- package/dist/esm/api/resources/shipperPayCourierPayments/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/shipperPayCourierPayments/client/Client.mjs +35 -21
- package/dist/esm/api/resources/shipperPayCourierRateSheets/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/shipperPayCourierRateSheets/client/Client.mjs +25 -15
- package/dist/esm/api/resources/taskGroups/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/taskGroups/client/Client.mjs +30 -18
- package/dist/esm/api/resources/taskGroups/resources/full/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/taskGroups/resources/full/client/Client.mjs +10 -6
- package/dist/esm/api/resources/taskGroups/resources/togglePause/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/taskGroups/resources/togglePause/client/Client.mjs +5 -3
- package/dist/esm/api/resources/tracking/client/Client.d.mts +13 -1
- package/dist/esm/api/resources/tracking/client/Client.mjs +20 -0
- package/dist/esm/api/resources/tracking/resources/cargoByDevice/client/Client.d.mts +50 -0
- package/dist/esm/api/resources/tracking/resources/cargoByDevice/client/Client.mjs +100 -0
- package/dist/esm/api/resources/tracking/resources/cargoByDevice/client/index.d.mts +2 -0
- package/dist/esm/api/resources/tracking/resources/cargoByDevice/client/index.mjs +1 -0
- package/dist/esm/api/resources/tracking/resources/cargoByDevice/client/requests/CargoByDeviceLastSeenRequest.d.mts +14 -0
- package/dist/esm/api/resources/tracking/resources/cargoByDevice/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/tracking/resources/cargoByDevice/index.d.mts +1 -0
- package/dist/esm/api/resources/tracking/resources/cargoByDevice/index.mjs +1 -0
- package/dist/esm/api/resources/tracking/resources/cargoByDriver/client/Client.d.mts +5 -22
- package/dist/esm/api/resources/tracking/resources/cargoByDriver/client/Client.mjs +6 -71
- package/dist/esm/api/resources/tracking/resources/cargoByDriver/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.d.mts +129 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.mjs +472 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/index.d.mts +2 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/index.mjs +1 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesDeleteRequest.d.mts +11 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesGetRequest.d.mts +11 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesLinkToCargoRequest.d.mts +14 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesRegisterToOrgReq1.d.mts +15 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesRegisterToOrgReq1.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesUnlinkFromCargoRequest.d.mts +12 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesUnlinkFromCargoRequest.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesUpdateRequest1.d.mts +16 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/DevicesUpdateRequest1.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/index.d.mts +6 -0
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/tracking/resources/devices/index.d.mts +1 -0
- package/dist/esm/api/resources/tracking/resources/devices/index.mjs +1 -0
- package/dist/esm/api/resources/tracking/resources/driver/client/Client.d.mts +60 -0
- package/dist/esm/api/resources/tracking/resources/driver/client/Client.mjs +106 -0
- package/dist/esm/api/resources/tracking/resources/driver/client/index.d.mts +2 -0
- package/dist/esm/api/resources/tracking/resources/driver/client/index.mjs +1 -0
- package/dist/esm/api/resources/tracking/resources/{taskGroupByDriver/client/requests/TaskGroupByDriverUpdateReq.d.mts → driver/client/requests/DriverUpdateReq.d.mts} +9 -2
- package/dist/esm/api/resources/tracking/resources/driver/client/requests/DriverUpdateReq.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/driver/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/tracking/resources/driver/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/tracking/resources/driver/index.d.mts +1 -0
- package/dist/esm/api/resources/tracking/resources/driver/index.mjs +1 -0
- package/dist/esm/api/resources/tracking/resources/index.d.mts +8 -0
- package/dist/esm/api/resources/tracking/resources/index.mjs +8 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/Client.d.mts +240 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/Client.mjs +936 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/index.d.mts +2 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/index.mjs +1 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceCreateSessionRequest1.d.mts +13 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceCreateSessionRequest1.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceDataPointsPublicRequest.d.mts +13 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceDataPointsPublicRequest.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceDataPointsRequest.d.mts +13 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceDataPointsRequest.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceDeleteRequest.d.mts +12 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceDeleteRequest.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceGetRequest.d.mts +12 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceGetRequest.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceLastSeenPublicRequest.d.mts +12 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceLastSeenPublicRequest.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceLastSeenRequest.d.mts +12 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceLastSeenRequest.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceMarkOutliersRequest1.d.mts +14 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceMarkOutliersRequest1.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDevicePauseRecordingRequest.d.mts +12 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDevicePauseRecordingRequest.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceResumeRecordingRequest.d.mts +12 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceResumeRecordingRequest.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceStartRequest.d.mts +12 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceStartRequest.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceTerminateRequest.d.mts +12 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceTerminateRequest.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceUpdateRequest1.d.mts +15 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceUpdateRequest1.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/index.d.mts +13 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/index.d.mts +1 -0
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/index.mjs +1 -0
- package/dist/esm/api/resources/tracking/resources/taskGroupByDriver/client/Client.d.mts +5 -22
- package/dist/esm/api/resources/tracking/resources/taskGroupByDriver/client/Client.mjs +6 -71
- package/dist/esm/api/resources/tracking/resources/taskGroupByDriver/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/users/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/users/client/Client.mjs +5 -3
- package/dist/esm/api/resources/utils/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/utils/client/Client.mjs +5 -4
- package/dist/esm/api/resources/utils/client/requests/UtilsGetTimezoneRequest.d.mts +2 -6
- package/dist/esm/api/types/Cargo1.d.mts +1 -1
- package/dist/esm/api/types/DecodedJwtWithOrgAndUserId.d.mts +1 -1
- package/dist/esm/api/types/Device1.d.mts +21 -0
- package/dist/esm/api/types/Device1.mjs +4 -0
- package/dist/esm/api/types/DriverUpdateResp.d.mts +11 -0
- package/dist/esm/api/types/DriverUpdateResp.mjs +4 -0
- package/dist/esm/api/types/{LocationFeatureInputGeometry.d.mts → Geometry.d.mts} +2 -2
- package/dist/esm/api/types/Geometry.mjs +4 -0
- package/dist/esm/api/types/LocationFeature.d.mts +5 -1
- package/dist/esm/api/types/LocationProperties.d.mts +2 -0
- package/dist/esm/api/types/OutlierLabellerEnum.d.mts +8 -0
- package/dist/esm/api/types/OutlierLabellerEnum.mjs +7 -0
- package/dist/esm/api/types/Session1.d.mts +17 -0
- package/dist/esm/api/types/Session1.mjs +4 -0
- package/dist/esm/api/types/SessionByDeviceDeleteResponse1.d.mts +7 -0
- package/dist/esm/api/types/SessionByDeviceDeleteResponse1.mjs +4 -0
- package/dist/esm/api/types/SessionByDeviceMarkOutliersResponse1.d.mts +7 -0
- package/dist/esm/api/types/SessionByDeviceMarkOutliersResponse1.mjs +4 -0
- package/dist/esm/api/types/TrackingCargoByDeviceDataPoint1.d.mts +12 -0
- package/dist/esm/api/types/TrackingCargoByDeviceDataPoint1.mjs +4 -0
- package/dist/esm/api/types/TrackingCargoByDeviceDataPointMetadata1.d.mts +11 -0
- package/dist/esm/api/types/TrackingCargoByDeviceDataPointMetadata1.mjs +4 -0
- package/dist/esm/api/types/TrackingCargoByDriverDataPointMetadata1.d.mts +3 -0
- package/dist/esm/api/types/TrackingDeviceTypeEnum1.d.mts +9 -0
- package/dist/esm/api/types/TrackingDeviceTypeEnum1.mjs +8 -0
- package/dist/esm/api/types/TrackingSessionByDeviceDataPoint1.d.mts +12 -0
- package/dist/esm/api/types/TrackingSessionByDeviceDataPoint1.mjs +4 -0
- package/dist/esm/api/types/TrackingSessionByDeviceDataPointMetadata1.d.mts +9 -0
- package/dist/esm/api/types/TrackingSessionByDeviceDataPointMetadata1.mjs +4 -0
- package/dist/esm/api/types/TrackingTaskGroupByDriverDataPointMetadata1.d.mts +3 -0
- package/dist/esm/api/types/index.d.mts +12 -2
- package/dist/esm/api/types/index.mjs +12 -2
- package/dist/esm/core/auth/AuthProvider.d.mts +4 -0
- package/dist/esm/core/auth/AuthProvider.mjs +1 -0
- package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
- package/dist/esm/core/auth/AuthRequest.mjs +1 -0
- package/dist/esm/core/auth/index.d.mts +2 -0
- package/dist/esm/core/exports.d.mts +1 -0
- package/dist/esm/core/exports.mjs +1 -0
- package/dist/esm/core/fetcher/Fetcher.d.mts +2 -2
- package/dist/esm/core/fetcher/Fetcher.mjs +2 -2
- package/dist/esm/core/fetcher/index.d.mts +5 -5
- package/dist/esm/core/fetcher/index.mjs +2 -2
- package/dist/esm/core/fetcher/requestWithRetries.mjs +44 -8
- package/dist/esm/core/file/exports.d.mts +1 -0
- package/dist/esm/core/file/exports.mjs +1 -0
- package/dist/esm/core/file/file.d.mts +5 -0
- package/dist/esm/core/file/file.mjs +167 -0
- package/dist/esm/core/file/index.d.mts +2 -0
- package/dist/esm/core/file/index.mjs +2 -0
- package/dist/esm/core/file/types.d.mts +66 -0
- package/dist/esm/core/file/types.mjs +1 -0
- package/dist/esm/core/headers.d.mts +2 -2
- package/dist/esm/core/index.d.mts +1 -1
- package/dist/esm/core/index.mjs +1 -1
- package/dist/esm/exports.d.mts +1 -0
- package/dist/esm/exports.mjs +1 -0
- package/dist/esm/index.d.mts +1 -0
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +1456 -29
- package/dist/cjs/api/resources/tracking/resources/taskGroupByDriver/client/requests/TaskGroupByDriverUpdateReq.d.ts +0 -19
- package/dist/cjs/api/types/LocationFeatureOutputGeometry.d.ts +0 -28
- package/dist/cjs/core/file.d.ts +0 -1
- package/dist/esm/api/resources/tracking/resources/cargoByDriver/client/requests/CargoByDriverUpdateReq.d.mts +0 -19
- package/dist/esm/api/types/LocationFeatureOutputGeometry.d.mts +0 -28
- package/dist/esm/core/file.d.mts +0 -1
- /package/dist/cjs/api/resources/tracking/resources/{cargoByDriver/client/requests/CargoByDriverUpdateReq.js → cargoByDevice/client/requests/CargoByDeviceLastSeenRequest.js} +0 -0
- /package/dist/cjs/{core/file.js → api/resources/tracking/resources/cargoByDevice/client/requests/index.js} +0 -0
- /package/dist/cjs/api/resources/tracking/resources/{taskGroupByDriver/client/requests/TaskGroupByDriverUpdateReq.js → devices/client/requests/DevicesDeleteRequest.js} +0 -0
- /package/dist/cjs/api/{types/LocationFeatureInputGeometry.js → resources/tracking/resources/devices/client/requests/DevicesGetRequest.js} +0 -0
- /package/dist/cjs/api/{types/LocationFeatureOutputGeometry.js → resources/tracking/resources/devices/client/requests/DevicesLinkToCargoRequest.js} +0 -0
- /package/dist/esm/api/resources/tracking/resources/{cargoByDriver/client/requests/CargoByDriverUpdateReq.mjs → cargoByDevice/client/requests/CargoByDeviceLastSeenRequest.mjs} +0 -0
- /package/dist/esm/{core/file.mjs → api/resources/tracking/resources/cargoByDevice/client/requests/index.mjs} +0 -0
- /package/dist/esm/api/resources/tracking/resources/{taskGroupByDriver/client/requests/TaskGroupByDriverUpdateReq.mjs → devices/client/requests/DevicesDeleteRequest.mjs} +0 -0
- /package/dist/esm/api/{types/LocationFeatureInputGeometry.mjs → resources/tracking/resources/devices/client/requests/DevicesGetRequest.mjs} +0 -0
- /package/dist/esm/api/{types/LocationFeatureOutputGeometry.mjs → resources/tracking/resources/devices/client/requests/DevicesLinkToCargoRequest.mjs} +0 -0
|
@@ -0,0 +1,936 @@
|
|
|
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 SessionByDevice {
|
|
19
|
+
constructor(_options = {}) {
|
|
20
|
+
this._options = _options;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* List all sessions for the current organization.
|
|
24
|
+
*
|
|
25
|
+
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* await client.tracking.sessionByDevice.list()
|
|
29
|
+
*/
|
|
30
|
+
list(requestOptions) {
|
|
31
|
+
return core.HttpResponsePromise.fromPromise(this.__list(requestOptions));
|
|
32
|
+
}
|
|
33
|
+
__list(requestOptions) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
var _a, _b, _c, _d;
|
|
36
|
+
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);
|
|
37
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
38
|
+
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/session_by_device/list"),
|
|
39
|
+
method: "GET",
|
|
40
|
+
headers: _headers,
|
|
41
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
42
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
43
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
44
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
45
|
+
});
|
|
46
|
+
if (_response.ok) {
|
|
47
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
48
|
+
}
|
|
49
|
+
if (_response.error.reason === "status-code") {
|
|
50
|
+
throw new errors.ChrtError({
|
|
51
|
+
statusCode: _response.error.statusCode,
|
|
52
|
+
body: _response.error.body,
|
|
53
|
+
rawResponse: _response.rawResponse,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
switch (_response.error.reason) {
|
|
57
|
+
case "non-json":
|
|
58
|
+
throw new errors.ChrtError({
|
|
59
|
+
statusCode: _response.error.statusCode,
|
|
60
|
+
body: _response.error.rawBody,
|
|
61
|
+
rawResponse: _response.rawResponse,
|
|
62
|
+
});
|
|
63
|
+
case "timeout":
|
|
64
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/session_by_device/list.");
|
|
65
|
+
case "unknown":
|
|
66
|
+
throw new errors.ChrtError({
|
|
67
|
+
message: _response.error.errorMessage,
|
|
68
|
+
rawResponse: _response.rawResponse,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Get a single session document by session_id.
|
|
75
|
+
*
|
|
76
|
+
* @param {Chrt.tracking.SessionByDeviceGetRequest} request
|
|
77
|
+
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
78
|
+
*
|
|
79
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* await client.tracking.sessionByDevice.get({
|
|
83
|
+
* session_id: "session_id"
|
|
84
|
+
* })
|
|
85
|
+
*/
|
|
86
|
+
get(request, requestOptions) {
|
|
87
|
+
return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));
|
|
88
|
+
}
|
|
89
|
+
__get(request, requestOptions) {
|
|
90
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
+
var _a, _b, _c, _d;
|
|
92
|
+
const { session_id: sessionId } = request;
|
|
93
|
+
const _queryParams = {};
|
|
94
|
+
_queryParams["session_id"] = sessionId;
|
|
95
|
+
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);
|
|
96
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
97
|
+
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/session_by_device/get"),
|
|
98
|
+
method: "GET",
|
|
99
|
+
headers: _headers,
|
|
100
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
101
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
102
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
103
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
104
|
+
});
|
|
105
|
+
if (_response.ok) {
|
|
106
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
107
|
+
}
|
|
108
|
+
if (_response.error.reason === "status-code") {
|
|
109
|
+
switch (_response.error.statusCode) {
|
|
110
|
+
case 422:
|
|
111
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
112
|
+
default:
|
|
113
|
+
throw new errors.ChrtError({
|
|
114
|
+
statusCode: _response.error.statusCode,
|
|
115
|
+
body: _response.error.body,
|
|
116
|
+
rawResponse: _response.rawResponse,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
switch (_response.error.reason) {
|
|
121
|
+
case "non-json":
|
|
122
|
+
throw new errors.ChrtError({
|
|
123
|
+
statusCode: _response.error.statusCode,
|
|
124
|
+
body: _response.error.rawBody,
|
|
125
|
+
rawResponse: _response.rawResponse,
|
|
126
|
+
});
|
|
127
|
+
case "timeout":
|
|
128
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/session_by_device/get.");
|
|
129
|
+
case "unknown":
|
|
130
|
+
throw new errors.ChrtError({
|
|
131
|
+
message: _response.error.errorMessage,
|
|
132
|
+
rawResponse: _response.rawResponse,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Return the most recent datapoint for a session.
|
|
139
|
+
*
|
|
140
|
+
* @param {Chrt.tracking.SessionByDeviceLastSeenRequest} request
|
|
141
|
+
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
142
|
+
*
|
|
143
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* await client.tracking.sessionByDevice.lastSeen({
|
|
147
|
+
* session_id: "session_id"
|
|
148
|
+
* })
|
|
149
|
+
*/
|
|
150
|
+
lastSeen(request, requestOptions) {
|
|
151
|
+
return core.HttpResponsePromise.fromPromise(this.__lastSeen(request, requestOptions));
|
|
152
|
+
}
|
|
153
|
+
__lastSeen(request, requestOptions) {
|
|
154
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
155
|
+
var _a, _b, _c, _d;
|
|
156
|
+
const { session_id: sessionId } = request;
|
|
157
|
+
const _queryParams = {};
|
|
158
|
+
_queryParams["session_id"] = sessionId;
|
|
159
|
+
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);
|
|
160
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
161
|
+
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/session_by_device/last_seen"),
|
|
162
|
+
method: "GET",
|
|
163
|
+
headers: _headers,
|
|
164
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
165
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
166
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
167
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
168
|
+
});
|
|
169
|
+
if (_response.ok) {
|
|
170
|
+
return {
|
|
171
|
+
data: _response.body,
|
|
172
|
+
rawResponse: _response.rawResponse,
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
if (_response.error.reason === "status-code") {
|
|
176
|
+
switch (_response.error.statusCode) {
|
|
177
|
+
case 422:
|
|
178
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
179
|
+
default:
|
|
180
|
+
throw new errors.ChrtError({
|
|
181
|
+
statusCode: _response.error.statusCode,
|
|
182
|
+
body: _response.error.body,
|
|
183
|
+
rawResponse: _response.rawResponse,
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
switch (_response.error.reason) {
|
|
188
|
+
case "non-json":
|
|
189
|
+
throw new errors.ChrtError({
|
|
190
|
+
statusCode: _response.error.statusCode,
|
|
191
|
+
body: _response.error.rawBody,
|
|
192
|
+
rawResponse: _response.rawResponse,
|
|
193
|
+
});
|
|
194
|
+
case "timeout":
|
|
195
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/session_by_device/last_seen.");
|
|
196
|
+
case "unknown":
|
|
197
|
+
throw new errors.ChrtError({
|
|
198
|
+
message: _response.error.errorMessage,
|
|
199
|
+
rawResponse: _response.rawResponse,
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Return a specified number of data points for a session, intelligently sampled across the time range.
|
|
206
|
+
*
|
|
207
|
+
* @param {Chrt.tracking.SessionByDeviceDataPointsRequest} request
|
|
208
|
+
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
209
|
+
*
|
|
210
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* await client.tracking.sessionByDevice.dataPoints({
|
|
214
|
+
* session_id: "session_id"
|
|
215
|
+
* })
|
|
216
|
+
*/
|
|
217
|
+
dataPoints(request, requestOptions) {
|
|
218
|
+
return core.HttpResponsePromise.fromPromise(this.__dataPoints(request, requestOptions));
|
|
219
|
+
}
|
|
220
|
+
__dataPoints(request, requestOptions) {
|
|
221
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
222
|
+
var _a, _b, _c, _d, _e;
|
|
223
|
+
const { session_id: sessionId, limit } = request;
|
|
224
|
+
const _queryParams = {};
|
|
225
|
+
_queryParams["session_id"] = sessionId;
|
|
226
|
+
if (limit !== undefined) {
|
|
227
|
+
_queryParams["limit"] = (_a = limit === null || limit === void 0 ? void 0 : limit.toString()) !== null && _a !== void 0 ? _a : null;
|
|
228
|
+
}
|
|
229
|
+
let _headers = mergeHeaders((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
230
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
231
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ChrtEnvironment.Local, "tracking/session_by_device/data_points"),
|
|
232
|
+
method: "GET",
|
|
233
|
+
headers: _headers,
|
|
234
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
235
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
236
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
237
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
238
|
+
});
|
|
239
|
+
if (_response.ok) {
|
|
240
|
+
return {
|
|
241
|
+
data: _response.body,
|
|
242
|
+
rawResponse: _response.rawResponse,
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
if (_response.error.reason === "status-code") {
|
|
246
|
+
switch (_response.error.statusCode) {
|
|
247
|
+
case 422:
|
|
248
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
249
|
+
default:
|
|
250
|
+
throw new errors.ChrtError({
|
|
251
|
+
statusCode: _response.error.statusCode,
|
|
252
|
+
body: _response.error.body,
|
|
253
|
+
rawResponse: _response.rawResponse,
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
switch (_response.error.reason) {
|
|
258
|
+
case "non-json":
|
|
259
|
+
throw new errors.ChrtError({
|
|
260
|
+
statusCode: _response.error.statusCode,
|
|
261
|
+
body: _response.error.rawBody,
|
|
262
|
+
rawResponse: _response.rawResponse,
|
|
263
|
+
});
|
|
264
|
+
case "timeout":
|
|
265
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/session_by_device/data_points.");
|
|
266
|
+
case "unknown":
|
|
267
|
+
throw new errors.ChrtError({
|
|
268
|
+
message: _response.error.errorMessage,
|
|
269
|
+
rawResponse: _response.rawResponse,
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Create a session for a device and link the device to it.
|
|
276
|
+
*
|
|
277
|
+
* @param {Chrt.tracking.SessionByDeviceCreateSessionRequest1} request
|
|
278
|
+
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
279
|
+
*
|
|
280
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
281
|
+
*
|
|
282
|
+
* @example
|
|
283
|
+
* await client.tracking.sessionByDevice.createSession({
|
|
284
|
+
* device_mac_address: "device_mac_address"
|
|
285
|
+
* })
|
|
286
|
+
*/
|
|
287
|
+
createSession(request, requestOptions) {
|
|
288
|
+
return core.HttpResponsePromise.fromPromise(this.__createSession(request, requestOptions));
|
|
289
|
+
}
|
|
290
|
+
__createSession(request, requestOptions) {
|
|
291
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
292
|
+
var _a, _b, _c, _d;
|
|
293
|
+
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);
|
|
294
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
295
|
+
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/session_by_device/create_session"),
|
|
296
|
+
method: "POST",
|
|
297
|
+
headers: _headers,
|
|
298
|
+
contentType: "application/json",
|
|
299
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
300
|
+
requestType: "json",
|
|
301
|
+
body: request,
|
|
302
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
303
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
304
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
305
|
+
});
|
|
306
|
+
if (_response.ok) {
|
|
307
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
308
|
+
}
|
|
309
|
+
if (_response.error.reason === "status-code") {
|
|
310
|
+
switch (_response.error.statusCode) {
|
|
311
|
+
case 422:
|
|
312
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
313
|
+
default:
|
|
314
|
+
throw new errors.ChrtError({
|
|
315
|
+
statusCode: _response.error.statusCode,
|
|
316
|
+
body: _response.error.body,
|
|
317
|
+
rawResponse: _response.rawResponse,
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
switch (_response.error.reason) {
|
|
322
|
+
case "non-json":
|
|
323
|
+
throw new errors.ChrtError({
|
|
324
|
+
statusCode: _response.error.statusCode,
|
|
325
|
+
body: _response.error.rawBody,
|
|
326
|
+
rawResponse: _response.rawResponse,
|
|
327
|
+
});
|
|
328
|
+
case "timeout":
|
|
329
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/session_by_device/create_session.");
|
|
330
|
+
case "unknown":
|
|
331
|
+
throw new errors.ChrtError({
|
|
332
|
+
message: _response.error.errorMessage,
|
|
333
|
+
rawResponse: _response.rawResponse,
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Update a session's comments and/or public visibility status.
|
|
340
|
+
*
|
|
341
|
+
* @param {Chrt.tracking.SessionByDeviceUpdateRequest1} request
|
|
342
|
+
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
343
|
+
*
|
|
344
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
345
|
+
*
|
|
346
|
+
* @example
|
|
347
|
+
* await client.tracking.sessionByDevice.update({
|
|
348
|
+
* session_id: "session_id"
|
|
349
|
+
* })
|
|
350
|
+
*/
|
|
351
|
+
update(request, requestOptions) {
|
|
352
|
+
return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions));
|
|
353
|
+
}
|
|
354
|
+
__update(request, requestOptions) {
|
|
355
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
356
|
+
var _a, _b, _c, _d;
|
|
357
|
+
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);
|
|
358
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
359
|
+
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/session_by_device/update"),
|
|
360
|
+
method: "POST",
|
|
361
|
+
headers: _headers,
|
|
362
|
+
contentType: "application/json",
|
|
363
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
364
|
+
requestType: "json",
|
|
365
|
+
body: request,
|
|
366
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
367
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
368
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
369
|
+
});
|
|
370
|
+
if (_response.ok) {
|
|
371
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
372
|
+
}
|
|
373
|
+
if (_response.error.reason === "status-code") {
|
|
374
|
+
switch (_response.error.statusCode) {
|
|
375
|
+
case 422:
|
|
376
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
377
|
+
default:
|
|
378
|
+
throw new errors.ChrtError({
|
|
379
|
+
statusCode: _response.error.statusCode,
|
|
380
|
+
body: _response.error.body,
|
|
381
|
+
rawResponse: _response.rawResponse,
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
switch (_response.error.reason) {
|
|
386
|
+
case "non-json":
|
|
387
|
+
throw new errors.ChrtError({
|
|
388
|
+
statusCode: _response.error.statusCode,
|
|
389
|
+
body: _response.error.rawBody,
|
|
390
|
+
rawResponse: _response.rawResponse,
|
|
391
|
+
});
|
|
392
|
+
case "timeout":
|
|
393
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/session_by_device/update.");
|
|
394
|
+
case "unknown":
|
|
395
|
+
throw new errors.ChrtError({
|
|
396
|
+
message: _response.error.errorMessage,
|
|
397
|
+
rawResponse: _response.rawResponse,
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* Start a session (set recording=true).
|
|
404
|
+
*
|
|
405
|
+
* @param {Chrt.tracking.SessionByDeviceStartRequest} request
|
|
406
|
+
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
407
|
+
*
|
|
408
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
409
|
+
*
|
|
410
|
+
* @example
|
|
411
|
+
* await client.tracking.sessionByDevice.start({
|
|
412
|
+
* session_id: "session_id"
|
|
413
|
+
* })
|
|
414
|
+
*/
|
|
415
|
+
start(request, requestOptions) {
|
|
416
|
+
return core.HttpResponsePromise.fromPromise(this.__start(request, requestOptions));
|
|
417
|
+
}
|
|
418
|
+
__start(request, requestOptions) {
|
|
419
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
420
|
+
var _a, _b, _c, _d;
|
|
421
|
+
const { session_id: sessionId } = request;
|
|
422
|
+
const _queryParams = {};
|
|
423
|
+
_queryParams["session_id"] = sessionId;
|
|
424
|
+
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);
|
|
425
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
426
|
+
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/session_by_device/start"),
|
|
427
|
+
method: "POST",
|
|
428
|
+
headers: _headers,
|
|
429
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
430
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
431
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
432
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
433
|
+
});
|
|
434
|
+
if (_response.ok) {
|
|
435
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
436
|
+
}
|
|
437
|
+
if (_response.error.reason === "status-code") {
|
|
438
|
+
switch (_response.error.statusCode) {
|
|
439
|
+
case 422:
|
|
440
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
441
|
+
default:
|
|
442
|
+
throw new errors.ChrtError({
|
|
443
|
+
statusCode: _response.error.statusCode,
|
|
444
|
+
body: _response.error.body,
|
|
445
|
+
rawResponse: _response.rawResponse,
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
switch (_response.error.reason) {
|
|
450
|
+
case "non-json":
|
|
451
|
+
throw new errors.ChrtError({
|
|
452
|
+
statusCode: _response.error.statusCode,
|
|
453
|
+
body: _response.error.rawBody,
|
|
454
|
+
rawResponse: _response.rawResponse,
|
|
455
|
+
});
|
|
456
|
+
case "timeout":
|
|
457
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/session_by_device/start.");
|
|
458
|
+
case "unknown":
|
|
459
|
+
throw new errors.ChrtError({
|
|
460
|
+
message: _response.error.errorMessage,
|
|
461
|
+
rawResponse: _response.rawResponse,
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Pause a session (set recording=false).
|
|
468
|
+
*
|
|
469
|
+
* @param {Chrt.tracking.SessionByDevicePauseRecordingRequest} request
|
|
470
|
+
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
471
|
+
*
|
|
472
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
473
|
+
*
|
|
474
|
+
* @example
|
|
475
|
+
* await client.tracking.sessionByDevice.pauseRecording({
|
|
476
|
+
* session_id: "session_id"
|
|
477
|
+
* })
|
|
478
|
+
*/
|
|
479
|
+
pauseRecording(request, requestOptions) {
|
|
480
|
+
return core.HttpResponsePromise.fromPromise(this.__pauseRecording(request, requestOptions));
|
|
481
|
+
}
|
|
482
|
+
__pauseRecording(request, requestOptions) {
|
|
483
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
484
|
+
var _a, _b, _c, _d;
|
|
485
|
+
const { session_id: sessionId } = request;
|
|
486
|
+
const _queryParams = {};
|
|
487
|
+
_queryParams["session_id"] = sessionId;
|
|
488
|
+
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);
|
|
489
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
490
|
+
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/session_by_device/pause_recording"),
|
|
491
|
+
method: "POST",
|
|
492
|
+
headers: _headers,
|
|
493
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
494
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
495
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
496
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
497
|
+
});
|
|
498
|
+
if (_response.ok) {
|
|
499
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
500
|
+
}
|
|
501
|
+
if (_response.error.reason === "status-code") {
|
|
502
|
+
switch (_response.error.statusCode) {
|
|
503
|
+
case 422:
|
|
504
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
505
|
+
default:
|
|
506
|
+
throw new errors.ChrtError({
|
|
507
|
+
statusCode: _response.error.statusCode,
|
|
508
|
+
body: _response.error.body,
|
|
509
|
+
rawResponse: _response.rawResponse,
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
switch (_response.error.reason) {
|
|
514
|
+
case "non-json":
|
|
515
|
+
throw new errors.ChrtError({
|
|
516
|
+
statusCode: _response.error.statusCode,
|
|
517
|
+
body: _response.error.rawBody,
|
|
518
|
+
rawResponse: _response.rawResponse,
|
|
519
|
+
});
|
|
520
|
+
case "timeout":
|
|
521
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/session_by_device/pause_recording.");
|
|
522
|
+
case "unknown":
|
|
523
|
+
throw new errors.ChrtError({
|
|
524
|
+
message: _response.error.errorMessage,
|
|
525
|
+
rawResponse: _response.rawResponse,
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Resume a session (set recording=true).
|
|
532
|
+
*
|
|
533
|
+
* @param {Chrt.tracking.SessionByDeviceResumeRecordingRequest} request
|
|
534
|
+
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
535
|
+
*
|
|
536
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
537
|
+
*
|
|
538
|
+
* @example
|
|
539
|
+
* await client.tracking.sessionByDevice.resumeRecording({
|
|
540
|
+
* session_id: "session_id"
|
|
541
|
+
* })
|
|
542
|
+
*/
|
|
543
|
+
resumeRecording(request, requestOptions) {
|
|
544
|
+
return core.HttpResponsePromise.fromPromise(this.__resumeRecording(request, requestOptions));
|
|
545
|
+
}
|
|
546
|
+
__resumeRecording(request, requestOptions) {
|
|
547
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
548
|
+
var _a, _b, _c, _d;
|
|
549
|
+
const { session_id: sessionId } = request;
|
|
550
|
+
const _queryParams = {};
|
|
551
|
+
_queryParams["session_id"] = sessionId;
|
|
552
|
+
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);
|
|
553
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
554
|
+
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/session_by_device/resume_recording"),
|
|
555
|
+
method: "POST",
|
|
556
|
+
headers: _headers,
|
|
557
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
558
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
559
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
560
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
561
|
+
});
|
|
562
|
+
if (_response.ok) {
|
|
563
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
564
|
+
}
|
|
565
|
+
if (_response.error.reason === "status-code") {
|
|
566
|
+
switch (_response.error.statusCode) {
|
|
567
|
+
case 422:
|
|
568
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
569
|
+
default:
|
|
570
|
+
throw new errors.ChrtError({
|
|
571
|
+
statusCode: _response.error.statusCode,
|
|
572
|
+
body: _response.error.body,
|
|
573
|
+
rawResponse: _response.rawResponse,
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
switch (_response.error.reason) {
|
|
578
|
+
case "non-json":
|
|
579
|
+
throw new errors.ChrtError({
|
|
580
|
+
statusCode: _response.error.statusCode,
|
|
581
|
+
body: _response.error.rawBody,
|
|
582
|
+
rawResponse: _response.rawResponse,
|
|
583
|
+
});
|
|
584
|
+
case "timeout":
|
|
585
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/session_by_device/resume_recording.");
|
|
586
|
+
case "unknown":
|
|
587
|
+
throw new errors.ChrtError({
|
|
588
|
+
message: _response.error.errorMessage,
|
|
589
|
+
rawResponse: _response.rawResponse,
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
/**
|
|
595
|
+
* End a session (set recording=false).
|
|
596
|
+
*
|
|
597
|
+
* @param {Chrt.tracking.SessionByDeviceTerminateRequest} request
|
|
598
|
+
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
599
|
+
*
|
|
600
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
601
|
+
*
|
|
602
|
+
* @example
|
|
603
|
+
* await client.tracking.sessionByDevice.terminate({
|
|
604
|
+
* session_id: "session_id"
|
|
605
|
+
* })
|
|
606
|
+
*/
|
|
607
|
+
terminate(request, requestOptions) {
|
|
608
|
+
return core.HttpResponsePromise.fromPromise(this.__terminate(request, requestOptions));
|
|
609
|
+
}
|
|
610
|
+
__terminate(request, requestOptions) {
|
|
611
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
612
|
+
var _a, _b, _c, _d;
|
|
613
|
+
const { session_id: sessionId } = request;
|
|
614
|
+
const _queryParams = {};
|
|
615
|
+
_queryParams["session_id"] = sessionId;
|
|
616
|
+
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);
|
|
617
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
618
|
+
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/session_by_device/terminate"),
|
|
619
|
+
method: "POST",
|
|
620
|
+
headers: _headers,
|
|
621
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
622
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
623
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
624
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
625
|
+
});
|
|
626
|
+
if (_response.ok) {
|
|
627
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
628
|
+
}
|
|
629
|
+
if (_response.error.reason === "status-code") {
|
|
630
|
+
switch (_response.error.statusCode) {
|
|
631
|
+
case 422:
|
|
632
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
633
|
+
default:
|
|
634
|
+
throw new errors.ChrtError({
|
|
635
|
+
statusCode: _response.error.statusCode,
|
|
636
|
+
body: _response.error.body,
|
|
637
|
+
rawResponse: _response.rawResponse,
|
|
638
|
+
});
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
switch (_response.error.reason) {
|
|
642
|
+
case "non-json":
|
|
643
|
+
throw new errors.ChrtError({
|
|
644
|
+
statusCode: _response.error.statusCode,
|
|
645
|
+
body: _response.error.rawBody,
|
|
646
|
+
rawResponse: _response.rawResponse,
|
|
647
|
+
});
|
|
648
|
+
case "timeout":
|
|
649
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/session_by_device/terminate.");
|
|
650
|
+
case "unknown":
|
|
651
|
+
throw new errors.ChrtError({
|
|
652
|
+
message: _response.error.errorMessage,
|
|
653
|
+
rawResponse: _response.rawResponse,
|
|
654
|
+
});
|
|
655
|
+
}
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* Mark data points as outliers or non-outliers. Uses atomic delete + insert strategy for time-series collection updates.
|
|
660
|
+
*
|
|
661
|
+
* @param {Chrt.tracking.SessionByDeviceMarkOutliersRequest1} request
|
|
662
|
+
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
663
|
+
*
|
|
664
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
665
|
+
*
|
|
666
|
+
* @example
|
|
667
|
+
* await client.tracking.sessionByDevice.outlier({
|
|
668
|
+
* tracking_session_by_device_data_point_ids: ["tracking_session_by_device_data_point_ids"],
|
|
669
|
+
* outlier: true
|
|
670
|
+
* })
|
|
671
|
+
*/
|
|
672
|
+
outlier(request, requestOptions) {
|
|
673
|
+
return core.HttpResponsePromise.fromPromise(this.__outlier(request, requestOptions));
|
|
674
|
+
}
|
|
675
|
+
__outlier(request, requestOptions) {
|
|
676
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
677
|
+
var _a, _b, _c, _d;
|
|
678
|
+
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);
|
|
679
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
680
|
+
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/session_by_device/outlier"),
|
|
681
|
+
method: "POST",
|
|
682
|
+
headers: _headers,
|
|
683
|
+
contentType: "application/json",
|
|
684
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
685
|
+
requestType: "json",
|
|
686
|
+
body: request,
|
|
687
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
688
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
689
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
690
|
+
});
|
|
691
|
+
if (_response.ok) {
|
|
692
|
+
return {
|
|
693
|
+
data: _response.body,
|
|
694
|
+
rawResponse: _response.rawResponse,
|
|
695
|
+
};
|
|
696
|
+
}
|
|
697
|
+
if (_response.error.reason === "status-code") {
|
|
698
|
+
switch (_response.error.statusCode) {
|
|
699
|
+
case 422:
|
|
700
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
701
|
+
default:
|
|
702
|
+
throw new errors.ChrtError({
|
|
703
|
+
statusCode: _response.error.statusCode,
|
|
704
|
+
body: _response.error.body,
|
|
705
|
+
rawResponse: _response.rawResponse,
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
switch (_response.error.reason) {
|
|
710
|
+
case "non-json":
|
|
711
|
+
throw new errors.ChrtError({
|
|
712
|
+
statusCode: _response.error.statusCode,
|
|
713
|
+
body: _response.error.rawBody,
|
|
714
|
+
rawResponse: _response.rawResponse,
|
|
715
|
+
});
|
|
716
|
+
case "timeout":
|
|
717
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/session_by_device/outlier.");
|
|
718
|
+
case "unknown":
|
|
719
|
+
throw new errors.ChrtError({
|
|
720
|
+
message: _response.error.errorMessage,
|
|
721
|
+
rawResponse: _response.rawResponse,
|
|
722
|
+
});
|
|
723
|
+
}
|
|
724
|
+
});
|
|
725
|
+
}
|
|
726
|
+
/**
|
|
727
|
+
* Delete a terminated session and all associated timeseries data.
|
|
728
|
+
*
|
|
729
|
+
* @param {Chrt.tracking.SessionByDeviceDeleteRequest} request
|
|
730
|
+
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
731
|
+
*
|
|
732
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
733
|
+
*
|
|
734
|
+
* @example
|
|
735
|
+
* await client.tracking.sessionByDevice.delete({
|
|
736
|
+
* session_id: "session_id"
|
|
737
|
+
* })
|
|
738
|
+
*/
|
|
739
|
+
delete(request, requestOptions) {
|
|
740
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));
|
|
741
|
+
}
|
|
742
|
+
__delete(request, requestOptions) {
|
|
743
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
744
|
+
var _a, _b, _c, _d;
|
|
745
|
+
const { session_id: sessionId } = request;
|
|
746
|
+
const _queryParams = {};
|
|
747
|
+
_queryParams["session_id"] = sessionId;
|
|
748
|
+
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);
|
|
749
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
750
|
+
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/session_by_device/delete"),
|
|
751
|
+
method: "DELETE",
|
|
752
|
+
headers: _headers,
|
|
753
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
754
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
755
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
756
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
757
|
+
});
|
|
758
|
+
if (_response.ok) {
|
|
759
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
760
|
+
}
|
|
761
|
+
if (_response.error.reason === "status-code") {
|
|
762
|
+
switch (_response.error.statusCode) {
|
|
763
|
+
case 422:
|
|
764
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
765
|
+
default:
|
|
766
|
+
throw new errors.ChrtError({
|
|
767
|
+
statusCode: _response.error.statusCode,
|
|
768
|
+
body: _response.error.body,
|
|
769
|
+
rawResponse: _response.rawResponse,
|
|
770
|
+
});
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
switch (_response.error.reason) {
|
|
774
|
+
case "non-json":
|
|
775
|
+
throw new errors.ChrtError({
|
|
776
|
+
statusCode: _response.error.statusCode,
|
|
777
|
+
body: _response.error.rawBody,
|
|
778
|
+
rawResponse: _response.rawResponse,
|
|
779
|
+
});
|
|
780
|
+
case "timeout":
|
|
781
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /tracking/session_by_device/delete.");
|
|
782
|
+
case "unknown":
|
|
783
|
+
throw new errors.ChrtError({
|
|
784
|
+
message: _response.error.errorMessage,
|
|
785
|
+
rawResponse: _response.rawResponse,
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
});
|
|
789
|
+
}
|
|
790
|
+
/**
|
|
791
|
+
* Return the most recent datapoint for a session. Session must be have public=True.
|
|
792
|
+
*
|
|
793
|
+
* @param {Chrt.tracking.SessionByDeviceLastSeenPublicRequest} request
|
|
794
|
+
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
795
|
+
*
|
|
796
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
797
|
+
*
|
|
798
|
+
* @example
|
|
799
|
+
* await client.tracking.sessionByDevice.lastSeenPublic({
|
|
800
|
+
* session_id: "session_id"
|
|
801
|
+
* })
|
|
802
|
+
*/
|
|
803
|
+
lastSeenPublic(request, requestOptions) {
|
|
804
|
+
return core.HttpResponsePromise.fromPromise(this.__lastSeenPublic(request, requestOptions));
|
|
805
|
+
}
|
|
806
|
+
__lastSeenPublic(request, requestOptions) {
|
|
807
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
808
|
+
var _a, _b, _c, _d;
|
|
809
|
+
const { session_id: sessionId } = request;
|
|
810
|
+
const _queryParams = {};
|
|
811
|
+
_queryParams["session_id"] = sessionId;
|
|
812
|
+
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);
|
|
813
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
814
|
+
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/session_by_device/last_seen_public"),
|
|
815
|
+
method: "GET",
|
|
816
|
+
headers: _headers,
|
|
817
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
818
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
819
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
820
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
821
|
+
});
|
|
822
|
+
if (_response.ok) {
|
|
823
|
+
return {
|
|
824
|
+
data: _response.body,
|
|
825
|
+
rawResponse: _response.rawResponse,
|
|
826
|
+
};
|
|
827
|
+
}
|
|
828
|
+
if (_response.error.reason === "status-code") {
|
|
829
|
+
switch (_response.error.statusCode) {
|
|
830
|
+
case 422:
|
|
831
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
832
|
+
default:
|
|
833
|
+
throw new errors.ChrtError({
|
|
834
|
+
statusCode: _response.error.statusCode,
|
|
835
|
+
body: _response.error.body,
|
|
836
|
+
rawResponse: _response.rawResponse,
|
|
837
|
+
});
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
switch (_response.error.reason) {
|
|
841
|
+
case "non-json":
|
|
842
|
+
throw new errors.ChrtError({
|
|
843
|
+
statusCode: _response.error.statusCode,
|
|
844
|
+
body: _response.error.rawBody,
|
|
845
|
+
rawResponse: _response.rawResponse,
|
|
846
|
+
});
|
|
847
|
+
case "timeout":
|
|
848
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/session_by_device/last_seen_public.");
|
|
849
|
+
case "unknown":
|
|
850
|
+
throw new errors.ChrtError({
|
|
851
|
+
message: _response.error.errorMessage,
|
|
852
|
+
rawResponse: _response.rawResponse,
|
|
853
|
+
});
|
|
854
|
+
}
|
|
855
|
+
});
|
|
856
|
+
}
|
|
857
|
+
/**
|
|
858
|
+
* Return a specified number of data points for a public session, intelligently sampled across the time range. Session must have public=True.
|
|
859
|
+
*
|
|
860
|
+
* @param {Chrt.tracking.SessionByDeviceDataPointsPublicRequest} request
|
|
861
|
+
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
862
|
+
*
|
|
863
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
864
|
+
*
|
|
865
|
+
* @example
|
|
866
|
+
* await client.tracking.sessionByDevice.dataPointsPublic({
|
|
867
|
+
* session_id: "session_id"
|
|
868
|
+
* })
|
|
869
|
+
*/
|
|
870
|
+
dataPointsPublic(request, requestOptions) {
|
|
871
|
+
return core.HttpResponsePromise.fromPromise(this.__dataPointsPublic(request, requestOptions));
|
|
872
|
+
}
|
|
873
|
+
__dataPointsPublic(request, requestOptions) {
|
|
874
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
875
|
+
var _a, _b, _c, _d, _e;
|
|
876
|
+
const { session_id: sessionId, limit } = request;
|
|
877
|
+
const _queryParams = {};
|
|
878
|
+
_queryParams["session_id"] = sessionId;
|
|
879
|
+
if (limit !== undefined) {
|
|
880
|
+
_queryParams["limit"] = (_a = limit === null || limit === void 0 ? void 0 : limit.toString()) !== null && _a !== void 0 ? _a : null;
|
|
881
|
+
}
|
|
882
|
+
let _headers = mergeHeaders((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
883
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
884
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ChrtEnvironment.Local, "tracking/session_by_device/data_points/public"),
|
|
885
|
+
method: "GET",
|
|
886
|
+
headers: _headers,
|
|
887
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
888
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
889
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
890
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
891
|
+
});
|
|
892
|
+
if (_response.ok) {
|
|
893
|
+
return {
|
|
894
|
+
data: _response.body,
|
|
895
|
+
rawResponse: _response.rawResponse,
|
|
896
|
+
};
|
|
897
|
+
}
|
|
898
|
+
if (_response.error.reason === "status-code") {
|
|
899
|
+
switch (_response.error.statusCode) {
|
|
900
|
+
case 422:
|
|
901
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
902
|
+
default:
|
|
903
|
+
throw new errors.ChrtError({
|
|
904
|
+
statusCode: _response.error.statusCode,
|
|
905
|
+
body: _response.error.body,
|
|
906
|
+
rawResponse: _response.rawResponse,
|
|
907
|
+
});
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
switch (_response.error.reason) {
|
|
911
|
+
case "non-json":
|
|
912
|
+
throw new errors.ChrtError({
|
|
913
|
+
statusCode: _response.error.statusCode,
|
|
914
|
+
body: _response.error.rawBody,
|
|
915
|
+
rawResponse: _response.rawResponse,
|
|
916
|
+
});
|
|
917
|
+
case "timeout":
|
|
918
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/session_by_device/data_points/public.");
|
|
919
|
+
case "unknown":
|
|
920
|
+
throw new errors.ChrtError({
|
|
921
|
+
message: _response.error.errorMessage,
|
|
922
|
+
rawResponse: _response.rawResponse,
|
|
923
|
+
});
|
|
924
|
+
}
|
|
925
|
+
});
|
|
926
|
+
}
|
|
927
|
+
_getAuthorizationHeader() {
|
|
928
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
929
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
930
|
+
if (bearer != null) {
|
|
931
|
+
return `Bearer ${bearer}`;
|
|
932
|
+
}
|
|
933
|
+
return undefined;
|
|
934
|
+
});
|
|
935
|
+
}
|
|
936
|
+
}
|