@chrt-inc/typescript-sdk 0.252.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 +10 -4
- package/dist/cjs/api/resources/tracking/client/Client.js +19 -9
- 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 +35 -9
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.js +170 -32
- 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 +3 -4
- package/dist/cjs/api/resources/tracking/resources/devices/client/requests/{DevicesRegisterToOrgRequest.d.ts → DevicesRegisterToOrgReq1.d.ts} +4 -1
- 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/index.d.ts +3 -1
- 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/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 +6 -2
- package/dist/cjs/api/resources/tracking/resources/index.js +7 -3
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/Client.d.ts +126 -23
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/Client.js +524 -61
- 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/SessionByDeviceDataPointsRequest.d.ts +13 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/{SessionByDeviceEndSessionRequest.d.ts → SessionByDeviceDeleteRequest.d.ts} +1 -1
- package/dist/{esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceEndSessionRequest.d.mts → cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceGetRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/{SessionByDeviceResumeSessionRequest.d.ts → SessionByDeviceLastSeenPublicRequest.d.ts} +1 -1
- 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/{SessionByDevicePauseSessionRequest.d.ts → SessionByDeviceStartRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceStartRequest.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/{SessionByDeviceStartSessionRequest.d.ts → SessionByDeviceTerminateRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceTerminateRequest.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/{SessionByDeviceUpdateCommentsRequest1.d.ts → SessionByDeviceUpdateRequest1.d.ts} +2 -1
- 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 +11 -5
- 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/Device1.d.ts +2 -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 +4 -4
- package/dist/cjs/api/types/TrackingDeviceTypeEnum1.js +3 -3
- package/dist/cjs/api/types/TrackingSessionByDeviceDataPointMetadata1.d.ts +3 -0
- package/dist/cjs/api/types/TrackingTaskGroupByDriverDataPointMetadata1.d.ts +3 -0
- package/dist/cjs/api/types/index.d.ts +8 -2
- package/dist/cjs/api/types/index.js +8 -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 +10 -4
- package/dist/esm/api/resources/tracking/client/Client.mjs +13 -3
- 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 +35 -9
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.mjs +170 -32
- 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 +3 -4
- package/dist/esm/api/resources/tracking/resources/devices/client/requests/{DevicesRegisterToOrgRequest.d.mts → DevicesRegisterToOrgReq1.d.mts} +4 -1
- 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/index.d.mts +3 -1
- 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/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 +6 -2
- package/dist/esm/api/resources/tracking/resources/index.mjs +6 -2
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/Client.d.mts +126 -23
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/Client.mjs +524 -61
- 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/SessionByDeviceDataPointsRequest.d.mts +13 -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/SessionByDeviceGetRequest.d.mts +12 -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/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/{SessionByDeviceUpdateCommentsRequest1.d.mts → SessionByDeviceUpdateRequest1.d.mts} +2 -1
- 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 +11 -5
- 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/Device1.d.mts +2 -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 +4 -4
- package/dist/esm/api/types/TrackingDeviceTypeEnum1.mjs +3 -3
- package/dist/esm/api/types/TrackingSessionByDeviceDataPointMetadata1.d.mts +3 -0
- package/dist/esm/api/types/TrackingTaskGroupByDriverDataPointMetadata1.d.mts +3 -0
- package/dist/esm/api/types/index.d.mts +8 -2
- package/dist/esm/api/types/index.mjs +8 -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 +727 -75
- 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/resources/tracking/resources/sessionByDevice/client/requests/SessionByDevicePauseSessionRequest.d.mts +0 -12
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceResumeSessionRequest.d.mts +0 -12
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceStartSessionRequest.d.mts +0 -12
- 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/devices/client/requests/{DevicesRegisterToOrgRequest.js → DevicesDeleteRequest.js} +0 -0
- /package/dist/cjs/api/resources/tracking/resources/{sessionByDevice/client/requests/SessionByDeviceEndSessionRequest.js → devices/client/requests/DevicesRegisterToOrgReq1.js} +0 -0
- /package/dist/cjs/api/resources/tracking/resources/{sessionByDevice/client/requests/SessionByDevicePauseSessionRequest.js → devices/client/requests/DevicesUpdateRequest1.js} +0 -0
- /package/dist/cjs/api/resources/tracking/resources/{sessionByDevice/client/requests/SessionByDeviceResumeSessionRequest.js → driver/client/requests/DriverUpdateReq.js} +0 -0
- /package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/{SessionByDeviceStartSessionRequest.js → SessionByDeviceDataPointsPublicRequest.js} +0 -0
- /package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/{SessionByDeviceUpdateCommentsRequest1.js → SessionByDeviceDataPointsRequest.js} +0 -0
- /package/dist/cjs/api/resources/tracking/resources/{taskGroupByDriver/client/requests/TaskGroupByDriverUpdateReq.js → sessionByDevice/client/requests/SessionByDeviceDeleteRequest.js} +0 -0
- /package/dist/cjs/api/{types/LocationFeatureInputGeometry.js → resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceGetRequest.js} +0 -0
- /package/dist/cjs/api/{types/LocationFeatureOutputGeometry.js → resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceLastSeenPublicRequest.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/devices/client/requests/{DevicesRegisterToOrgRequest.mjs → DevicesDeleteRequest.mjs} +0 -0
- /package/dist/esm/api/resources/tracking/resources/{sessionByDevice/client/requests/SessionByDeviceEndSessionRequest.mjs → devices/client/requests/DevicesRegisterToOrgReq1.mjs} +0 -0
- /package/dist/esm/api/resources/tracking/resources/{sessionByDevice/client/requests/SessionByDevicePauseSessionRequest.mjs → devices/client/requests/DevicesUpdateRequest1.mjs} +0 -0
- /package/dist/esm/api/resources/tracking/resources/{sessionByDevice/client/requests/SessionByDeviceResumeSessionRequest.mjs → driver/client/requests/DriverUpdateReq.mjs} +0 -0
- /package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/{SessionByDeviceStartSessionRequest.mjs → SessionByDeviceDataPointsPublicRequest.mjs} +0 -0
- /package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/{SessionByDeviceUpdateCommentsRequest1.mjs → SessionByDeviceDataPointsRequest.mjs} +0 -0
- /package/dist/esm/api/resources/tracking/resources/{taskGroupByDriver/client/requests/TaskGroupByDriverUpdateReq.mjs → sessionByDevice/client/requests/SessionByDeviceDeleteRequest.mjs} +0 -0
- /package/dist/esm/api/{types/LocationFeatureInputGeometry.mjs → resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceGetRequest.mjs} +0 -0
- /package/dist/esm/api/{types/LocationFeatureOutputGeometry.mjs → resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceLastSeenPublicRequest.mjs} +0 -0
|
@@ -55,6 +55,121 @@ class SessionByDevice {
|
|
|
55
55
|
constructor(_options = {}) {
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* List all sessions for the current organization.
|
|
60
|
+
*
|
|
61
|
+
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* await client.tracking.sessionByDevice.list()
|
|
65
|
+
*/
|
|
66
|
+
list(requestOptions) {
|
|
67
|
+
return core.HttpResponsePromise.fromPromise(this.__list(requestOptions));
|
|
68
|
+
}
|
|
69
|
+
__list(requestOptions) {
|
|
70
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
+
var _a, _b, _c, _d;
|
|
72
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
73
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
74
|
+
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"),
|
|
75
|
+
method: "GET",
|
|
76
|
+
headers: _headers,
|
|
77
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
78
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
79
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
80
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
81
|
+
});
|
|
82
|
+
if (_response.ok) {
|
|
83
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
84
|
+
}
|
|
85
|
+
if (_response.error.reason === "status-code") {
|
|
86
|
+
throw new errors.ChrtError({
|
|
87
|
+
statusCode: _response.error.statusCode,
|
|
88
|
+
body: _response.error.body,
|
|
89
|
+
rawResponse: _response.rawResponse,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
switch (_response.error.reason) {
|
|
93
|
+
case "non-json":
|
|
94
|
+
throw new errors.ChrtError({
|
|
95
|
+
statusCode: _response.error.statusCode,
|
|
96
|
+
body: _response.error.rawBody,
|
|
97
|
+
rawResponse: _response.rawResponse,
|
|
98
|
+
});
|
|
99
|
+
case "timeout":
|
|
100
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/session_by_device/list.");
|
|
101
|
+
case "unknown":
|
|
102
|
+
throw new errors.ChrtError({
|
|
103
|
+
message: _response.error.errorMessage,
|
|
104
|
+
rawResponse: _response.rawResponse,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Get a single session document by session_id.
|
|
111
|
+
*
|
|
112
|
+
* @param {Chrt.tracking.SessionByDeviceGetRequest} request
|
|
113
|
+
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
114
|
+
*
|
|
115
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* await client.tracking.sessionByDevice.get({
|
|
119
|
+
* session_id: "session_id"
|
|
120
|
+
* })
|
|
121
|
+
*/
|
|
122
|
+
get(request, requestOptions) {
|
|
123
|
+
return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));
|
|
124
|
+
}
|
|
125
|
+
__get(request, requestOptions) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
var _a, _b, _c, _d;
|
|
128
|
+
const { session_id: sessionId } = request;
|
|
129
|
+
const _queryParams = {};
|
|
130
|
+
_queryParams["session_id"] = sessionId;
|
|
131
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
132
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
133
|
+
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"),
|
|
134
|
+
method: "GET",
|
|
135
|
+
headers: _headers,
|
|
136
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
137
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
138
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
139
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
140
|
+
});
|
|
141
|
+
if (_response.ok) {
|
|
142
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
143
|
+
}
|
|
144
|
+
if (_response.error.reason === "status-code") {
|
|
145
|
+
switch (_response.error.statusCode) {
|
|
146
|
+
case 422:
|
|
147
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
148
|
+
default:
|
|
149
|
+
throw new errors.ChrtError({
|
|
150
|
+
statusCode: _response.error.statusCode,
|
|
151
|
+
body: _response.error.body,
|
|
152
|
+
rawResponse: _response.rawResponse,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
switch (_response.error.reason) {
|
|
157
|
+
case "non-json":
|
|
158
|
+
throw new errors.ChrtError({
|
|
159
|
+
statusCode: _response.error.statusCode,
|
|
160
|
+
body: _response.error.rawBody,
|
|
161
|
+
rawResponse: _response.rawResponse,
|
|
162
|
+
});
|
|
163
|
+
case "timeout":
|
|
164
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/session_by_device/get.");
|
|
165
|
+
case "unknown":
|
|
166
|
+
throw new errors.ChrtError({
|
|
167
|
+
message: _response.error.errorMessage,
|
|
168
|
+
rawResponse: _response.rawResponse,
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
}
|
|
58
173
|
/**
|
|
59
174
|
* Return the most recent datapoint for a session.
|
|
60
175
|
*
|
|
@@ -77,11 +192,12 @@ class SessionByDevice {
|
|
|
77
192
|
const { session_id: sessionId } = request;
|
|
78
193
|
const _queryParams = {};
|
|
79
194
|
_queryParams["session_id"] = sessionId;
|
|
80
|
-
|
|
81
|
-
|
|
195
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
196
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
197
|
+
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"),
|
|
82
198
|
method: "GET",
|
|
83
|
-
headers:
|
|
84
|
-
queryParameters: _queryParams,
|
|
199
|
+
headers: _headers,
|
|
200
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
85
201
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
86
202
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
87
203
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -121,6 +237,76 @@ class SessionByDevice {
|
|
|
121
237
|
}
|
|
122
238
|
});
|
|
123
239
|
}
|
|
240
|
+
/**
|
|
241
|
+
* Return a specified number of data points for a session, intelligently sampled across the time range.
|
|
242
|
+
*
|
|
243
|
+
* @param {Chrt.tracking.SessionByDeviceDataPointsRequest} request
|
|
244
|
+
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
245
|
+
*
|
|
246
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
247
|
+
*
|
|
248
|
+
* @example
|
|
249
|
+
* await client.tracking.sessionByDevice.dataPoints({
|
|
250
|
+
* session_id: "session_id"
|
|
251
|
+
* })
|
|
252
|
+
*/
|
|
253
|
+
dataPoints(request, requestOptions) {
|
|
254
|
+
return core.HttpResponsePromise.fromPromise(this.__dataPoints(request, requestOptions));
|
|
255
|
+
}
|
|
256
|
+
__dataPoints(request, requestOptions) {
|
|
257
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
258
|
+
var _a, _b, _c, _d, _e;
|
|
259
|
+
const { session_id: sessionId, limit } = request;
|
|
260
|
+
const _queryParams = {};
|
|
261
|
+
_queryParams["session_id"] = sessionId;
|
|
262
|
+
if (limit !== undefined) {
|
|
263
|
+
_queryParams["limit"] = (_a = limit === null || limit === void 0 ? void 0 : limit.toString()) !== null && _a !== void 0 ? _a : null;
|
|
264
|
+
}
|
|
265
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
266
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
267
|
+
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"),
|
|
268
|
+
method: "GET",
|
|
269
|
+
headers: _headers,
|
|
270
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
271
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
272
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
273
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
274
|
+
});
|
|
275
|
+
if (_response.ok) {
|
|
276
|
+
return {
|
|
277
|
+
data: _response.body,
|
|
278
|
+
rawResponse: _response.rawResponse,
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
if (_response.error.reason === "status-code") {
|
|
282
|
+
switch (_response.error.statusCode) {
|
|
283
|
+
case 422:
|
|
284
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
285
|
+
default:
|
|
286
|
+
throw new errors.ChrtError({
|
|
287
|
+
statusCode: _response.error.statusCode,
|
|
288
|
+
body: _response.error.body,
|
|
289
|
+
rawResponse: _response.rawResponse,
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
switch (_response.error.reason) {
|
|
294
|
+
case "non-json":
|
|
295
|
+
throw new errors.ChrtError({
|
|
296
|
+
statusCode: _response.error.statusCode,
|
|
297
|
+
body: _response.error.rawBody,
|
|
298
|
+
rawResponse: _response.rawResponse,
|
|
299
|
+
});
|
|
300
|
+
case "timeout":
|
|
301
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/session_by_device/data_points.");
|
|
302
|
+
case "unknown":
|
|
303
|
+
throw new errors.ChrtError({
|
|
304
|
+
message: _response.error.errorMessage,
|
|
305
|
+
rawResponse: _response.rawResponse,
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
}
|
|
124
310
|
/**
|
|
125
311
|
* Create a session for a device and link the device to it.
|
|
126
312
|
*
|
|
@@ -140,11 +326,13 @@ class SessionByDevice {
|
|
|
140
326
|
__createSession(request, requestOptions) {
|
|
141
327
|
return __awaiter(this, void 0, void 0, function* () {
|
|
142
328
|
var _a, _b, _c, _d;
|
|
143
|
-
|
|
144
|
-
|
|
329
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
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, "tracking/session_by_device/create_session"),
|
|
145
332
|
method: "POST",
|
|
146
|
-
headers:
|
|
333
|
+
headers: _headers,
|
|
147
334
|
contentType: "application/json",
|
|
335
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
148
336
|
requestType: "json",
|
|
149
337
|
body: request,
|
|
150
338
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -184,29 +372,31 @@ class SessionByDevice {
|
|
|
184
372
|
});
|
|
185
373
|
}
|
|
186
374
|
/**
|
|
187
|
-
*
|
|
375
|
+
* Update a session's comments and/or public visibility status.
|
|
188
376
|
*
|
|
189
|
-
* @param {Chrt.tracking.
|
|
377
|
+
* @param {Chrt.tracking.SessionByDeviceUpdateRequest1} request
|
|
190
378
|
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
191
379
|
*
|
|
192
380
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
193
381
|
*
|
|
194
382
|
* @example
|
|
195
|
-
* await client.tracking.sessionByDevice.
|
|
383
|
+
* await client.tracking.sessionByDevice.update({
|
|
196
384
|
* session_id: "session_id"
|
|
197
385
|
* })
|
|
198
386
|
*/
|
|
199
|
-
|
|
200
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
387
|
+
update(request, requestOptions) {
|
|
388
|
+
return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions));
|
|
201
389
|
}
|
|
202
|
-
|
|
390
|
+
__update(request, requestOptions) {
|
|
203
391
|
return __awaiter(this, void 0, void 0, function* () {
|
|
204
392
|
var _a, _b, _c, _d;
|
|
205
|
-
|
|
206
|
-
|
|
393
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
394
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
395
|
+
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"),
|
|
207
396
|
method: "POST",
|
|
208
|
-
headers:
|
|
397
|
+
headers: _headers,
|
|
209
398
|
contentType: "application/json",
|
|
399
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
210
400
|
requestType: "json",
|
|
211
401
|
body: request,
|
|
212
402
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -236,7 +426,7 @@ class SessionByDevice {
|
|
|
236
426
|
rawResponse: _response.rawResponse,
|
|
237
427
|
});
|
|
238
428
|
case "timeout":
|
|
239
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/session_by_device/
|
|
429
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/session_by_device/update.");
|
|
240
430
|
case "unknown":
|
|
241
431
|
throw new errors.ChrtError({
|
|
242
432
|
message: _response.error.errorMessage,
|
|
@@ -248,30 +438,31 @@ class SessionByDevice {
|
|
|
248
438
|
/**
|
|
249
439
|
* Start a session (set recording=true).
|
|
250
440
|
*
|
|
251
|
-
* @param {Chrt.tracking.
|
|
441
|
+
* @param {Chrt.tracking.SessionByDeviceStartRequest} request
|
|
252
442
|
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
253
443
|
*
|
|
254
444
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
255
445
|
*
|
|
256
446
|
* @example
|
|
257
|
-
* await client.tracking.sessionByDevice.
|
|
447
|
+
* await client.tracking.sessionByDevice.start({
|
|
258
448
|
* session_id: "session_id"
|
|
259
449
|
* })
|
|
260
450
|
*/
|
|
261
|
-
|
|
262
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
451
|
+
start(request, requestOptions) {
|
|
452
|
+
return core.HttpResponsePromise.fromPromise(this.__start(request, requestOptions));
|
|
263
453
|
}
|
|
264
|
-
|
|
454
|
+
__start(request, requestOptions) {
|
|
265
455
|
return __awaiter(this, void 0, void 0, function* () {
|
|
266
456
|
var _a, _b, _c, _d;
|
|
267
457
|
const { session_id: sessionId } = request;
|
|
268
458
|
const _queryParams = {};
|
|
269
459
|
_queryParams["session_id"] = sessionId;
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
460
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
461
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
462
|
+
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"),
|
|
463
|
+
method: "POST",
|
|
464
|
+
headers: _headers,
|
|
465
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
275
466
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
276
467
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
277
468
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -299,7 +490,7 @@ class SessionByDevice {
|
|
|
299
490
|
rawResponse: _response.rawResponse,
|
|
300
491
|
});
|
|
301
492
|
case "timeout":
|
|
302
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
493
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/session_by_device/start.");
|
|
303
494
|
case "unknown":
|
|
304
495
|
throw new errors.ChrtError({
|
|
305
496
|
message: _response.error.errorMessage,
|
|
@@ -311,30 +502,31 @@ class SessionByDevice {
|
|
|
311
502
|
/**
|
|
312
503
|
* Pause a session (set recording=false).
|
|
313
504
|
*
|
|
314
|
-
* @param {Chrt.tracking.
|
|
505
|
+
* @param {Chrt.tracking.SessionByDevicePauseRecordingRequest} request
|
|
315
506
|
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
316
507
|
*
|
|
317
508
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
318
509
|
*
|
|
319
510
|
* @example
|
|
320
|
-
* await client.tracking.sessionByDevice.
|
|
511
|
+
* await client.tracking.sessionByDevice.pauseRecording({
|
|
321
512
|
* session_id: "session_id"
|
|
322
513
|
* })
|
|
323
514
|
*/
|
|
324
|
-
|
|
325
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
515
|
+
pauseRecording(request, requestOptions) {
|
|
516
|
+
return core.HttpResponsePromise.fromPromise(this.__pauseRecording(request, requestOptions));
|
|
326
517
|
}
|
|
327
|
-
|
|
518
|
+
__pauseRecording(request, requestOptions) {
|
|
328
519
|
return __awaiter(this, void 0, void 0, function* () {
|
|
329
520
|
var _a, _b, _c, _d;
|
|
330
521
|
const { session_id: sessionId } = request;
|
|
331
522
|
const _queryParams = {};
|
|
332
523
|
_queryParams["session_id"] = sessionId;
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
524
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
525
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
526
|
+
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"),
|
|
527
|
+
method: "POST",
|
|
528
|
+
headers: _headers,
|
|
529
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
338
530
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
339
531
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
340
532
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -362,7 +554,7 @@ class SessionByDevice {
|
|
|
362
554
|
rawResponse: _response.rawResponse,
|
|
363
555
|
});
|
|
364
556
|
case "timeout":
|
|
365
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
557
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/session_by_device/pause_recording.");
|
|
366
558
|
case "unknown":
|
|
367
559
|
throw new errors.ChrtError({
|
|
368
560
|
message: _response.error.errorMessage,
|
|
@@ -374,30 +566,31 @@ class SessionByDevice {
|
|
|
374
566
|
/**
|
|
375
567
|
* Resume a session (set recording=true).
|
|
376
568
|
*
|
|
377
|
-
* @param {Chrt.tracking.
|
|
569
|
+
* @param {Chrt.tracking.SessionByDeviceResumeRecordingRequest} request
|
|
378
570
|
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
379
571
|
*
|
|
380
572
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
381
573
|
*
|
|
382
574
|
* @example
|
|
383
|
-
* await client.tracking.sessionByDevice.
|
|
575
|
+
* await client.tracking.sessionByDevice.resumeRecording({
|
|
384
576
|
* session_id: "session_id"
|
|
385
577
|
* })
|
|
386
578
|
*/
|
|
387
|
-
|
|
388
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
579
|
+
resumeRecording(request, requestOptions) {
|
|
580
|
+
return core.HttpResponsePromise.fromPromise(this.__resumeRecording(request, requestOptions));
|
|
389
581
|
}
|
|
390
|
-
|
|
582
|
+
__resumeRecording(request, requestOptions) {
|
|
391
583
|
return __awaiter(this, void 0, void 0, function* () {
|
|
392
584
|
var _a, _b, _c, _d;
|
|
393
585
|
const { session_id: sessionId } = request;
|
|
394
586
|
const _queryParams = {};
|
|
395
587
|
_queryParams["session_id"] = sessionId;
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
588
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
589
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
590
|
+
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"),
|
|
591
|
+
method: "POST",
|
|
592
|
+
headers: _headers,
|
|
593
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
401
594
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
402
595
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
403
596
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -425,7 +618,7 @@ class SessionByDevice {
|
|
|
425
618
|
rawResponse: _response.rawResponse,
|
|
426
619
|
});
|
|
427
620
|
case "timeout":
|
|
428
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
621
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/session_by_device/resume_recording.");
|
|
429
622
|
case "unknown":
|
|
430
623
|
throw new errors.ChrtError({
|
|
431
624
|
message: _response.error.errorMessage,
|
|
@@ -437,30 +630,163 @@ class SessionByDevice {
|
|
|
437
630
|
/**
|
|
438
631
|
* End a session (set recording=false).
|
|
439
632
|
*
|
|
440
|
-
* @param {Chrt.tracking.
|
|
633
|
+
* @param {Chrt.tracking.SessionByDeviceTerminateRequest} request
|
|
441
634
|
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
442
635
|
*
|
|
443
636
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
444
637
|
*
|
|
445
638
|
* @example
|
|
446
|
-
* await client.tracking.sessionByDevice.
|
|
639
|
+
* await client.tracking.sessionByDevice.terminate({
|
|
447
640
|
* session_id: "session_id"
|
|
448
641
|
* })
|
|
449
642
|
*/
|
|
450
|
-
|
|
451
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
643
|
+
terminate(request, requestOptions) {
|
|
644
|
+
return core.HttpResponsePromise.fromPromise(this.__terminate(request, requestOptions));
|
|
452
645
|
}
|
|
453
|
-
|
|
646
|
+
__terminate(request, requestOptions) {
|
|
454
647
|
return __awaiter(this, void 0, void 0, function* () {
|
|
455
648
|
var _a, _b, _c, _d;
|
|
456
649
|
const { session_id: sessionId } = request;
|
|
457
650
|
const _queryParams = {};
|
|
458
651
|
_queryParams["session_id"] = sessionId;
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
652
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
653
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
654
|
+
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"),
|
|
655
|
+
method: "POST",
|
|
656
|
+
headers: _headers,
|
|
657
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
658
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
659
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
660
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
661
|
+
});
|
|
662
|
+
if (_response.ok) {
|
|
663
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
664
|
+
}
|
|
665
|
+
if (_response.error.reason === "status-code") {
|
|
666
|
+
switch (_response.error.statusCode) {
|
|
667
|
+
case 422:
|
|
668
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
669
|
+
default:
|
|
670
|
+
throw new errors.ChrtError({
|
|
671
|
+
statusCode: _response.error.statusCode,
|
|
672
|
+
body: _response.error.body,
|
|
673
|
+
rawResponse: _response.rawResponse,
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
switch (_response.error.reason) {
|
|
678
|
+
case "non-json":
|
|
679
|
+
throw new errors.ChrtError({
|
|
680
|
+
statusCode: _response.error.statusCode,
|
|
681
|
+
body: _response.error.rawBody,
|
|
682
|
+
rawResponse: _response.rawResponse,
|
|
683
|
+
});
|
|
684
|
+
case "timeout":
|
|
685
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/session_by_device/terminate.");
|
|
686
|
+
case "unknown":
|
|
687
|
+
throw new errors.ChrtError({
|
|
688
|
+
message: _response.error.errorMessage,
|
|
689
|
+
rawResponse: _response.rawResponse,
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
});
|
|
693
|
+
}
|
|
694
|
+
/**
|
|
695
|
+
* Mark data points as outliers or non-outliers. Uses atomic delete + insert strategy for time-series collection updates.
|
|
696
|
+
*
|
|
697
|
+
* @param {Chrt.tracking.SessionByDeviceMarkOutliersRequest1} request
|
|
698
|
+
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
699
|
+
*
|
|
700
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
701
|
+
*
|
|
702
|
+
* @example
|
|
703
|
+
* await client.tracking.sessionByDevice.outlier({
|
|
704
|
+
* tracking_session_by_device_data_point_ids: ["tracking_session_by_device_data_point_ids"],
|
|
705
|
+
* outlier: true
|
|
706
|
+
* })
|
|
707
|
+
*/
|
|
708
|
+
outlier(request, requestOptions) {
|
|
709
|
+
return core.HttpResponsePromise.fromPromise(this.__outlier(request, requestOptions));
|
|
710
|
+
}
|
|
711
|
+
__outlier(request, requestOptions) {
|
|
712
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
713
|
+
var _a, _b, _c, _d;
|
|
714
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
715
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
716
|
+
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"),
|
|
717
|
+
method: "POST",
|
|
718
|
+
headers: _headers,
|
|
719
|
+
contentType: "application/json",
|
|
720
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
721
|
+
requestType: "json",
|
|
722
|
+
body: request,
|
|
723
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
724
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
725
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
726
|
+
});
|
|
727
|
+
if (_response.ok) {
|
|
728
|
+
return {
|
|
729
|
+
data: _response.body,
|
|
730
|
+
rawResponse: _response.rawResponse,
|
|
731
|
+
};
|
|
732
|
+
}
|
|
733
|
+
if (_response.error.reason === "status-code") {
|
|
734
|
+
switch (_response.error.statusCode) {
|
|
735
|
+
case 422:
|
|
736
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
737
|
+
default:
|
|
738
|
+
throw new errors.ChrtError({
|
|
739
|
+
statusCode: _response.error.statusCode,
|
|
740
|
+
body: _response.error.body,
|
|
741
|
+
rawResponse: _response.rawResponse,
|
|
742
|
+
});
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
switch (_response.error.reason) {
|
|
746
|
+
case "non-json":
|
|
747
|
+
throw new errors.ChrtError({
|
|
748
|
+
statusCode: _response.error.statusCode,
|
|
749
|
+
body: _response.error.rawBody,
|
|
750
|
+
rawResponse: _response.rawResponse,
|
|
751
|
+
});
|
|
752
|
+
case "timeout":
|
|
753
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/session_by_device/outlier.");
|
|
754
|
+
case "unknown":
|
|
755
|
+
throw new errors.ChrtError({
|
|
756
|
+
message: _response.error.errorMessage,
|
|
757
|
+
rawResponse: _response.rawResponse,
|
|
758
|
+
});
|
|
759
|
+
}
|
|
760
|
+
});
|
|
761
|
+
}
|
|
762
|
+
/**
|
|
763
|
+
* Delete a terminated session and all associated timeseries data.
|
|
764
|
+
*
|
|
765
|
+
* @param {Chrt.tracking.SessionByDeviceDeleteRequest} request
|
|
766
|
+
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
767
|
+
*
|
|
768
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
769
|
+
*
|
|
770
|
+
* @example
|
|
771
|
+
* await client.tracking.sessionByDevice.delete({
|
|
772
|
+
* session_id: "session_id"
|
|
773
|
+
* })
|
|
774
|
+
*/
|
|
775
|
+
delete(request, requestOptions) {
|
|
776
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));
|
|
777
|
+
}
|
|
778
|
+
__delete(request, requestOptions) {
|
|
779
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
780
|
+
var _a, _b, _c, _d;
|
|
781
|
+
const { session_id: sessionId } = request;
|
|
782
|
+
const _queryParams = {};
|
|
783
|
+
_queryParams["session_id"] = sessionId;
|
|
784
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
785
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
786
|
+
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"),
|
|
787
|
+
method: "DELETE",
|
|
788
|
+
headers: _headers,
|
|
789
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
464
790
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
465
791
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
466
792
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -488,7 +814,144 @@ class SessionByDevice {
|
|
|
488
814
|
rawResponse: _response.rawResponse,
|
|
489
815
|
});
|
|
490
816
|
case "timeout":
|
|
491
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
817
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling DELETE /tracking/session_by_device/delete.");
|
|
818
|
+
case "unknown":
|
|
819
|
+
throw new errors.ChrtError({
|
|
820
|
+
message: _response.error.errorMessage,
|
|
821
|
+
rawResponse: _response.rawResponse,
|
|
822
|
+
});
|
|
823
|
+
}
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* Return the most recent datapoint for a session. Session must be have public=True.
|
|
828
|
+
*
|
|
829
|
+
* @param {Chrt.tracking.SessionByDeviceLastSeenPublicRequest} request
|
|
830
|
+
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
831
|
+
*
|
|
832
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
833
|
+
*
|
|
834
|
+
* @example
|
|
835
|
+
* await client.tracking.sessionByDevice.lastSeenPublic({
|
|
836
|
+
* session_id: "session_id"
|
|
837
|
+
* })
|
|
838
|
+
*/
|
|
839
|
+
lastSeenPublic(request, requestOptions) {
|
|
840
|
+
return core.HttpResponsePromise.fromPromise(this.__lastSeenPublic(request, requestOptions));
|
|
841
|
+
}
|
|
842
|
+
__lastSeenPublic(request, requestOptions) {
|
|
843
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
844
|
+
var _a, _b, _c, _d;
|
|
845
|
+
const { session_id: sessionId } = request;
|
|
846
|
+
const _queryParams = {};
|
|
847
|
+
_queryParams["session_id"] = sessionId;
|
|
848
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
849
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
850
|
+
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"),
|
|
851
|
+
method: "GET",
|
|
852
|
+
headers: _headers,
|
|
853
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
854
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
855
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
856
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
857
|
+
});
|
|
858
|
+
if (_response.ok) {
|
|
859
|
+
return {
|
|
860
|
+
data: _response.body,
|
|
861
|
+
rawResponse: _response.rawResponse,
|
|
862
|
+
};
|
|
863
|
+
}
|
|
864
|
+
if (_response.error.reason === "status-code") {
|
|
865
|
+
switch (_response.error.statusCode) {
|
|
866
|
+
case 422:
|
|
867
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
868
|
+
default:
|
|
869
|
+
throw new errors.ChrtError({
|
|
870
|
+
statusCode: _response.error.statusCode,
|
|
871
|
+
body: _response.error.body,
|
|
872
|
+
rawResponse: _response.rawResponse,
|
|
873
|
+
});
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
switch (_response.error.reason) {
|
|
877
|
+
case "non-json":
|
|
878
|
+
throw new errors.ChrtError({
|
|
879
|
+
statusCode: _response.error.statusCode,
|
|
880
|
+
body: _response.error.rawBody,
|
|
881
|
+
rawResponse: _response.rawResponse,
|
|
882
|
+
});
|
|
883
|
+
case "timeout":
|
|
884
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/session_by_device/last_seen_public.");
|
|
885
|
+
case "unknown":
|
|
886
|
+
throw new errors.ChrtError({
|
|
887
|
+
message: _response.error.errorMessage,
|
|
888
|
+
rawResponse: _response.rawResponse,
|
|
889
|
+
});
|
|
890
|
+
}
|
|
891
|
+
});
|
|
892
|
+
}
|
|
893
|
+
/**
|
|
894
|
+
* Return a specified number of data points for a public session, intelligently sampled across the time range. Session must have public=True.
|
|
895
|
+
*
|
|
896
|
+
* @param {Chrt.tracking.SessionByDeviceDataPointsPublicRequest} request
|
|
897
|
+
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
898
|
+
*
|
|
899
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
900
|
+
*
|
|
901
|
+
* @example
|
|
902
|
+
* await client.tracking.sessionByDevice.dataPointsPublic({
|
|
903
|
+
* session_id: "session_id"
|
|
904
|
+
* })
|
|
905
|
+
*/
|
|
906
|
+
dataPointsPublic(request, requestOptions) {
|
|
907
|
+
return core.HttpResponsePromise.fromPromise(this.__dataPointsPublic(request, requestOptions));
|
|
908
|
+
}
|
|
909
|
+
__dataPointsPublic(request, requestOptions) {
|
|
910
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
911
|
+
var _a, _b, _c, _d, _e;
|
|
912
|
+
const { session_id: sessionId, limit } = request;
|
|
913
|
+
const _queryParams = {};
|
|
914
|
+
_queryParams["session_id"] = sessionId;
|
|
915
|
+
if (limit !== undefined) {
|
|
916
|
+
_queryParams["limit"] = (_a = limit === null || limit === void 0 ? void 0 : limit.toString()) !== null && _a !== void 0 ? _a : null;
|
|
917
|
+
}
|
|
918
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
919
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
920
|
+
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"),
|
|
921
|
+
method: "GET",
|
|
922
|
+
headers: _headers,
|
|
923
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
924
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
925
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
926
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
927
|
+
});
|
|
928
|
+
if (_response.ok) {
|
|
929
|
+
return {
|
|
930
|
+
data: _response.body,
|
|
931
|
+
rawResponse: _response.rawResponse,
|
|
932
|
+
};
|
|
933
|
+
}
|
|
934
|
+
if (_response.error.reason === "status-code") {
|
|
935
|
+
switch (_response.error.statusCode) {
|
|
936
|
+
case 422:
|
|
937
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
938
|
+
default:
|
|
939
|
+
throw new errors.ChrtError({
|
|
940
|
+
statusCode: _response.error.statusCode,
|
|
941
|
+
body: _response.error.body,
|
|
942
|
+
rawResponse: _response.rawResponse,
|
|
943
|
+
});
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
switch (_response.error.reason) {
|
|
947
|
+
case "non-json":
|
|
948
|
+
throw new errors.ChrtError({
|
|
949
|
+
statusCode: _response.error.statusCode,
|
|
950
|
+
body: _response.error.rawBody,
|
|
951
|
+
rawResponse: _response.rawResponse,
|
|
952
|
+
});
|
|
953
|
+
case "timeout":
|
|
954
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/session_by_device/data_points/public.");
|
|
492
955
|
case "unknown":
|
|
493
956
|
throw new errors.ChrtError({
|
|
494
957
|
message: _response.error.errorMessage,
|