@chrt-inc/typescript-sdk 1.258.0 → 1.262.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 +4 -2
- package/dist/cjs/api/resources/drivers/client/Client.js +50 -30
- 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 +4 -4
- package/dist/cjs/api/resources/tracking/client/Client.js +6 -6
- package/dist/cjs/api/resources/tracking/resources/cargoByDevice/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/tracking/resources/cargoByDevice/client/Client.js +5 -4
- package/dist/cjs/api/resources/tracking/resources/cargoByDriver/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/tracking/resources/cargoByDriver/client/Client.js +5 -4
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/tracking/resources/devices/client/Client.js +25 -19
- package/dist/cjs/api/resources/tracking/resources/driver/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/tracking/resources/driver/client/Client.js +5 -3
- package/dist/cjs/api/resources/tracking/resources/index.d.ts +2 -2
- package/dist/cjs/api/resources/tracking/resources/index.js +3 -3
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/Client.d.ts +14 -17
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/Client.js +72 -80
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/tracking/resources/taskGroupByDriver/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/tracking/resources/taskGroupByDriver/client/Client.js +5 -4
- 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/Session1.d.ts +14 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- package/dist/cjs/core/auth/AuthProvider.d.ts +4 -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 +4 -2
- package/dist/esm/api/resources/drivers/client/Client.mjs +50 -30
- 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 +4 -4
- package/dist/esm/api/resources/tracking/client/Client.mjs +5 -5
- package/dist/esm/api/resources/tracking/resources/cargoByDevice/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/tracking/resources/cargoByDevice/client/Client.mjs +5 -4
- package/dist/esm/api/resources/tracking/resources/cargoByDriver/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/tracking/resources/cargoByDriver/client/Client.mjs +5 -4
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/tracking/resources/devices/client/Client.mjs +25 -19
- package/dist/esm/api/resources/tracking/resources/driver/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/tracking/resources/driver/client/Client.mjs +5 -3
- package/dist/esm/api/resources/tracking/resources/index.d.mts +2 -2
- package/dist/esm/api/resources/tracking/resources/index.mjs +2 -2
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/Client.d.mts +14 -17
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/Client.mjs +72 -80
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/tracking/resources/taskGroupByDriver/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/tracking/resources/taskGroupByDriver/client/Client.mjs +5 -4
- 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/Session1.d.mts +14 -0
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/core/auth/AuthProvider.d.mts +4 -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 +102 -49
- package/dist/cjs/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceDataPointsFancyRequest.d.ts +0 -13
- package/dist/cjs/core/file.d.ts +0 -1
- package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceDataPointsFancyRequest.d.mts +0 -13
- package/dist/esm/core/file.d.mts +0 -1
- /package/dist/cjs/api/{resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceDataPointsFancyRequest.js → types/Session1.js} +0 -0
- /package/dist/cjs/core/{file.js → auth/AuthProvider.js} +0 -0
- /package/dist/esm/api/{resources/tracking/resources/sessionByDevice/client/requests/SessionByDeviceDataPointsFancyRequest.mjs → types/Session1.mjs} +0 -0
- /package/dist/esm/core/{file.mjs → auth/AuthProvider.mjs} +0 -0
|
@@ -20,53 +20,38 @@ export class SessionByDevice {
|
|
|
20
20
|
this._options = _options;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* List all sessions for the current organization.
|
|
24
24
|
*
|
|
25
|
-
* @param {Chrt.tracking.SessionByDeviceLastSeenRequest} request
|
|
26
25
|
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
26
|
*
|
|
28
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
29
|
-
*
|
|
30
27
|
* @example
|
|
31
|
-
* await client.tracking.sessionByDevice.
|
|
32
|
-
* session_id: "session_id"
|
|
33
|
-
* })
|
|
28
|
+
* await client.tracking.sessionByDevice.list()
|
|
34
29
|
*/
|
|
35
|
-
|
|
36
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
30
|
+
list(requestOptions) {
|
|
31
|
+
return core.HttpResponsePromise.fromPromise(this.__list(requestOptions));
|
|
37
32
|
}
|
|
38
|
-
|
|
33
|
+
__list(requestOptions) {
|
|
39
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
35
|
var _a, _b, _c, _d;
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
45
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ChrtEnvironment.Local, "tracking/session_by_device/last_seen"),
|
|
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"),
|
|
46
39
|
method: "GET",
|
|
47
|
-
headers:
|
|
48
|
-
queryParameters:
|
|
40
|
+
headers: _headers,
|
|
41
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
49
42
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
50
43
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
51
44
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
52
45
|
});
|
|
53
46
|
if (_response.ok) {
|
|
54
|
-
return {
|
|
55
|
-
data: _response.body,
|
|
56
|
-
rawResponse: _response.rawResponse,
|
|
57
|
-
};
|
|
47
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
58
48
|
}
|
|
59
49
|
if (_response.error.reason === "status-code") {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
statusCode: _response.error.statusCode,
|
|
66
|
-
body: _response.error.body,
|
|
67
|
-
rawResponse: _response.rawResponse,
|
|
68
|
-
});
|
|
69
|
-
}
|
|
50
|
+
throw new errors.ChrtError({
|
|
51
|
+
statusCode: _response.error.statusCode,
|
|
52
|
+
body: _response.error.body,
|
|
53
|
+
rawResponse: _response.rawResponse,
|
|
54
|
+
});
|
|
70
55
|
}
|
|
71
56
|
switch (_response.error.reason) {
|
|
72
57
|
case "non-json":
|
|
@@ -76,7 +61,7 @@ export class SessionByDevice {
|
|
|
76
61
|
rawResponse: _response.rawResponse,
|
|
77
62
|
});
|
|
78
63
|
case "timeout":
|
|
79
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/session_by_device/
|
|
64
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/session_by_device/list.");
|
|
80
65
|
case "unknown":
|
|
81
66
|
throw new errors.ChrtError({
|
|
82
67
|
message: _response.error.errorMessage,
|
|
@@ -86,35 +71,33 @@ export class SessionByDevice {
|
|
|
86
71
|
});
|
|
87
72
|
}
|
|
88
73
|
/**
|
|
89
|
-
* Return
|
|
74
|
+
* Return the most recent datapoint for a session.
|
|
90
75
|
*
|
|
91
|
-
* @param {Chrt.tracking.
|
|
76
|
+
* @param {Chrt.tracking.SessionByDeviceLastSeenRequest} request
|
|
92
77
|
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
93
78
|
*
|
|
94
79
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
95
80
|
*
|
|
96
81
|
* @example
|
|
97
|
-
* await client.tracking.sessionByDevice.
|
|
82
|
+
* await client.tracking.sessionByDevice.lastSeen({
|
|
98
83
|
* session_id: "session_id"
|
|
99
84
|
* })
|
|
100
85
|
*/
|
|
101
|
-
|
|
102
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
86
|
+
lastSeen(request, requestOptions) {
|
|
87
|
+
return core.HttpResponsePromise.fromPromise(this.__lastSeen(request, requestOptions));
|
|
103
88
|
}
|
|
104
|
-
|
|
89
|
+
__lastSeen(request, requestOptions) {
|
|
105
90
|
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
-
var _a, _b, _c, _d
|
|
107
|
-
const { session_id: sessionId
|
|
91
|
+
var _a, _b, _c, _d;
|
|
92
|
+
const { session_id: sessionId } = request;
|
|
108
93
|
const _queryParams = {};
|
|
109
94
|
_queryParams["session_id"] = sessionId;
|
|
110
|
-
|
|
111
|
-
_queryParams["limit"] = (_a = limit === null || limit === void 0 ? void 0 : limit.toString()) !== null && _a !== void 0 ? _a : null;
|
|
112
|
-
}
|
|
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);
|
|
113
96
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
114
|
-
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/
|
|
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/last_seen"),
|
|
115
98
|
method: "GET",
|
|
116
|
-
headers:
|
|
117
|
-
queryParameters: _queryParams,
|
|
99
|
+
headers: _headers,
|
|
100
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
118
101
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
119
102
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
120
103
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -145,7 +128,7 @@ export class SessionByDevice {
|
|
|
145
128
|
rawResponse: _response.rawResponse,
|
|
146
129
|
});
|
|
147
130
|
case "timeout":
|
|
148
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/session_by_device/
|
|
131
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/session_by_device/last_seen.");
|
|
149
132
|
case "unknown":
|
|
150
133
|
throw new errors.ChrtError({
|
|
151
134
|
message: _response.error.errorMessage,
|
|
@@ -155,22 +138,22 @@ export class SessionByDevice {
|
|
|
155
138
|
});
|
|
156
139
|
}
|
|
157
140
|
/**
|
|
158
|
-
* Return
|
|
141
|
+
* Return a specified number of data points for a session, intelligently sampled across the time range.
|
|
159
142
|
*
|
|
160
|
-
* @param {Chrt.tracking.
|
|
143
|
+
* @param {Chrt.tracking.SessionByDeviceDataPointsRequest} request
|
|
161
144
|
* @param {SessionByDevice.RequestOptions} requestOptions - Request-specific configuration.
|
|
162
145
|
*
|
|
163
146
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
164
147
|
*
|
|
165
148
|
* @example
|
|
166
|
-
* await client.tracking.sessionByDevice.
|
|
149
|
+
* await client.tracking.sessionByDevice.dataPoints({
|
|
167
150
|
* session_id: "session_id"
|
|
168
151
|
* })
|
|
169
152
|
*/
|
|
170
|
-
|
|
171
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
153
|
+
dataPoints(request, requestOptions) {
|
|
154
|
+
return core.HttpResponsePromise.fromPromise(this.__dataPoints(request, requestOptions));
|
|
172
155
|
}
|
|
173
|
-
|
|
156
|
+
__dataPoints(request, requestOptions) {
|
|
174
157
|
return __awaiter(this, void 0, void 0, function* () {
|
|
175
158
|
var _a, _b, _c, _d, _e;
|
|
176
159
|
const { session_id: sessionId, limit } = request;
|
|
@@ -179,11 +162,12 @@ export class SessionByDevice {
|
|
|
179
162
|
if (limit !== undefined) {
|
|
180
163
|
_queryParams["limit"] = (_a = limit === null || limit === void 0 ? void 0 : limit.toString()) !== null && _a !== void 0 ? _a : null;
|
|
181
164
|
}
|
|
182
|
-
|
|
183
|
-
|
|
165
|
+
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);
|
|
166
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
167
|
+
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"),
|
|
184
168
|
method: "GET",
|
|
185
|
-
headers:
|
|
186
|
-
queryParameters: _queryParams,
|
|
169
|
+
headers: _headers,
|
|
170
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
187
171
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
188
172
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
189
173
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -214,7 +198,7 @@ export class SessionByDevice {
|
|
|
214
198
|
rawResponse: _response.rawResponse,
|
|
215
199
|
});
|
|
216
200
|
case "timeout":
|
|
217
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/session_by_device/
|
|
201
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/session_by_device/data_points.");
|
|
218
202
|
case "unknown":
|
|
219
203
|
throw new errors.ChrtError({
|
|
220
204
|
message: _response.error.errorMessage,
|
|
@@ -242,11 +226,13 @@ export class SessionByDevice {
|
|
|
242
226
|
__createSession(request, requestOptions) {
|
|
243
227
|
return __awaiter(this, void 0, void 0, function* () {
|
|
244
228
|
var _a, _b, _c, _d;
|
|
245
|
-
|
|
246
|
-
|
|
229
|
+
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);
|
|
230
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
231
|
+
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"),
|
|
247
232
|
method: "POST",
|
|
248
|
-
headers:
|
|
233
|
+
headers: _headers,
|
|
249
234
|
contentType: "application/json",
|
|
235
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
250
236
|
requestType: "json",
|
|
251
237
|
body: request,
|
|
252
238
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -304,11 +290,13 @@ export class SessionByDevice {
|
|
|
304
290
|
__updateComments(request, requestOptions) {
|
|
305
291
|
return __awaiter(this, void 0, void 0, function* () {
|
|
306
292
|
var _a, _b, _c, _d;
|
|
307
|
-
|
|
308
|
-
|
|
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/update_comments"),
|
|
309
296
|
method: "POST",
|
|
310
|
-
headers:
|
|
297
|
+
headers: _headers,
|
|
311
298
|
contentType: "application/json",
|
|
299
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
312
300
|
requestType: "json",
|
|
313
301
|
body: request,
|
|
314
302
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -369,11 +357,12 @@ export class SessionByDevice {
|
|
|
369
357
|
const { session_id: sessionId } = request;
|
|
370
358
|
const _queryParams = {};
|
|
371
359
|
_queryParams["session_id"] = sessionId;
|
|
372
|
-
|
|
373
|
-
|
|
360
|
+
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);
|
|
361
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
362
|
+
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_session"),
|
|
374
363
|
method: "POST",
|
|
375
|
-
headers:
|
|
376
|
-
queryParameters: _queryParams,
|
|
364
|
+
headers: _headers,
|
|
365
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
377
366
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
378
367
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
379
368
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -432,11 +421,12 @@ export class SessionByDevice {
|
|
|
432
421
|
const { session_id: sessionId } = request;
|
|
433
422
|
const _queryParams = {};
|
|
434
423
|
_queryParams["session_id"] = sessionId;
|
|
435
|
-
|
|
436
|
-
|
|
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/pause_session"),
|
|
437
427
|
method: "POST",
|
|
438
|
-
headers:
|
|
439
|
-
queryParameters: _queryParams,
|
|
428
|
+
headers: _headers,
|
|
429
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
440
430
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
441
431
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
442
432
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -495,11 +485,12 @@ export class SessionByDevice {
|
|
|
495
485
|
const { session_id: sessionId } = request;
|
|
496
486
|
const _queryParams = {};
|
|
497
487
|
_queryParams["session_id"] = sessionId;
|
|
498
|
-
|
|
499
|
-
|
|
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/resume_session"),
|
|
500
491
|
method: "POST",
|
|
501
|
-
headers:
|
|
502
|
-
queryParameters: _queryParams,
|
|
492
|
+
headers: _headers,
|
|
493
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
503
494
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
504
495
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
505
496
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -558,11 +549,12 @@ export class SessionByDevice {
|
|
|
558
549
|
const { session_id: sessionId } = request;
|
|
559
550
|
const _queryParams = {};
|
|
560
551
|
_queryParams["session_id"] = sessionId;
|
|
561
|
-
|
|
562
|
-
|
|
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/end_session"),
|
|
563
555
|
method: "POST",
|
|
564
|
-
headers:
|
|
565
|
-
queryParameters: _queryParams,
|
|
556
|
+
headers: _headers,
|
|
557
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
566
558
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
567
559
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
568
560
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
package/dist/esm/api/resources/tracking/resources/sessionByDevice/client/requests/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { type SessionByDeviceLastSeenRequest } from "./SessionByDeviceLastSeenRequest.mjs";
|
|
2
2
|
export { type SessionByDeviceDataPointsRequest } from "./SessionByDeviceDataPointsRequest.mjs";
|
|
3
|
-
export { type SessionByDeviceDataPointsFancyRequest } from "./SessionByDeviceDataPointsFancyRequest.mjs";
|
|
4
3
|
export { type SessionByDeviceCreateSessionRequest1 } from "./SessionByDeviceCreateSessionRequest1.mjs";
|
|
5
4
|
export { type SessionByDeviceUpdateCommentsRequest1 } from "./SessionByDeviceUpdateCommentsRequest1.mjs";
|
|
6
5
|
export { type SessionByDeviceStartSessionRequest } from "./SessionByDeviceStartSessionRequest.mjs";
|
|
@@ -11,7 +11,7 @@ export declare namespace TaskGroupByDriver {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
fetcher?: core.FetchFunction;
|
|
16
16
|
}
|
|
17
17
|
interface RequestOptions {
|
|
@@ -21,8 +21,10 @@ export declare namespace TaskGroupByDriver {
|
|
|
21
21
|
maxRetries?: number;
|
|
22
22
|
/** A hook to abort the request. */
|
|
23
23
|
abortSignal?: AbortSignal;
|
|
24
|
+
/** Additional query string parameters to include in the request. */
|
|
25
|
+
queryParams?: Record<string, unknown>;
|
|
24
26
|
/** Additional headers to include in the request. */
|
|
25
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
27
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
export declare class TaskGroupByDriver {
|
|
@@ -41,11 +41,12 @@ export class TaskGroupByDriver {
|
|
|
41
41
|
const { task_group_id: taskGroupId } = request;
|
|
42
42
|
const _queryParams = {};
|
|
43
43
|
_queryParams["task_group_id"] = taskGroupId;
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
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);
|
|
45
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
46
|
+
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/task_group_by_driver/last_seen"),
|
|
46
47
|
method: "GET",
|
|
47
|
-
headers:
|
|
48
|
-
queryParameters: _queryParams,
|
|
48
|
+
headers: _headers,
|
|
49
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
49
50
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
50
51
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
51
52
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -11,7 +11,7 @@ export declare namespace Users {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
fetcher?: core.FetchFunction;
|
|
16
16
|
}
|
|
17
17
|
interface RequestOptions {
|
|
@@ -21,8 +21,10 @@ export declare namespace Users {
|
|
|
21
21
|
maxRetries?: number;
|
|
22
22
|
/** A hook to abort the request. */
|
|
23
23
|
abortSignal?: AbortSignal;
|
|
24
|
+
/** Additional query string parameters to include in the request. */
|
|
25
|
+
queryParams?: Record<string, unknown>;
|
|
24
26
|
/** Additional headers to include in the request. */
|
|
25
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
27
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
export declare class Users {
|
|
@@ -32,10 +32,12 @@ export class Users {
|
|
|
32
32
|
__getPublicData(requestOptions) {
|
|
33
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
34
34
|
var _a, _b, _c, _d;
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
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);
|
|
36
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
37
|
+
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, "users/user_public_data"),
|
|
37
38
|
method: "GET",
|
|
38
|
-
headers:
|
|
39
|
+
headers: _headers,
|
|
40
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
39
41
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
40
42
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
41
43
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -11,7 +11,7 @@ export declare namespace Utils {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
fetcher?: core.FetchFunction;
|
|
16
16
|
}
|
|
17
17
|
interface RequestOptions {
|
|
@@ -21,8 +21,10 @@ export declare namespace Utils {
|
|
|
21
21
|
maxRetries?: number;
|
|
22
22
|
/** A hook to abort the request. */
|
|
23
23
|
abortSignal?: AbortSignal;
|
|
24
|
+
/** Additional query string parameters to include in the request. */
|
|
25
|
+
queryParams?: Record<string, unknown>;
|
|
24
26
|
/** Additional headers to include in the request. */
|
|
25
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
27
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
export declare class Utils {
|
|
@@ -43,11 +43,12 @@ export class Utils {
|
|
|
43
43
|
const _queryParams = {};
|
|
44
44
|
_queryParams["lat"] = lat.toString();
|
|
45
45
|
_queryParams["lng"] = lng.toString();
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
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);
|
|
47
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
48
|
+
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, "utils/timezone"),
|
|
48
49
|
method: "GET",
|
|
49
|
-
headers:
|
|
50
|
-
queryParameters: _queryParams,
|
|
50
|
+
headers: _headers,
|
|
51
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
51
52
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
52
53
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
53
54
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -9,12 +9,8 @@
|
|
|
9
9
|
* }
|
|
10
10
|
*/
|
|
11
11
|
export interface UtilsGetTimezoneRequest {
|
|
12
|
-
/**
|
|
13
|
-
* Latitude in decimal degrees (range: -90 to 90)
|
|
14
|
-
*/
|
|
12
|
+
/** Latitude in decimal degrees (range: -90 to 90) */
|
|
15
13
|
lat: number;
|
|
16
|
-
/**
|
|
17
|
-
* Longitude in decimal degrees (range: -180 to 180)
|
|
18
|
-
*/
|
|
14
|
+
/** Longitude in decimal degrees (range: -180 to 180) */
|
|
19
15
|
lng: number;
|
|
20
16
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface Session1 {
|
|
5
|
+
schema_version: number;
|
|
6
|
+
device_id: string;
|
|
7
|
+
device_mac_address: string;
|
|
8
|
+
/** Must be a string starting with `org_` */
|
|
9
|
+
org_id: string;
|
|
10
|
+
comments?: string | null;
|
|
11
|
+
recording?: boolean;
|
|
12
|
+
terminated?: boolean;
|
|
13
|
+
_id: string;
|
|
14
|
+
}
|
|
@@ -66,6 +66,7 @@ export * from "./Position2D.mjs";
|
|
|
66
66
|
export * from "./Position3D.mjs";
|
|
67
67
|
export * from "./PriceNameEnum.mjs";
|
|
68
68
|
export * from "./RouteTypeEnum1.mjs";
|
|
69
|
+
export * from "./Session1.mjs";
|
|
69
70
|
export * from "./ShipperContactInfo1.mjs";
|
|
70
71
|
export * from "./ShipperContactInfoClientCreate1.mjs";
|
|
71
72
|
export * from "./ShipperNotificationEventEnum.mjs";
|
|
@@ -66,6 +66,7 @@ export * from "./Position2D.mjs";
|
|
|
66
66
|
export * from "./Position3D.mjs";
|
|
67
67
|
export * from "./PriceNameEnum.mjs";
|
|
68
68
|
export * from "./RouteTypeEnum1.mjs";
|
|
69
|
+
export * from "./Session1.mjs";
|
|
69
70
|
export * from "./ShipperContactInfo1.mjs";
|
|
70
71
|
export * from "./ShipperContactInfoClientCreate1.mjs";
|
|
71
72
|
export * from "./ShipperNotificationEventEnum.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./file/exports.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./file/exports.mjs";
|
|
@@ -6,8 +6,8 @@ export declare namespace Fetcher {
|
|
|
6
6
|
url: string;
|
|
7
7
|
method: string;
|
|
8
8
|
contentType?: string;
|
|
9
|
-
headers?: Record<string, string | Supplier<string | undefined> | undefined>;
|
|
10
|
-
queryParameters?: Record<string,
|
|
9
|
+
headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
|
|
10
|
+
queryParameters?: Record<string, unknown>;
|
|
11
11
|
body?: unknown;
|
|
12
12
|
timeoutMs?: number;
|
|
13
13
|
maxRetries?: number;
|
|
@@ -8,15 +8,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { toJson } from "../json.mjs";
|
|
11
|
-
import { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.mjs";
|
|
12
|
-
import { Supplier } from "./Supplier.mjs";
|
|
13
11
|
import { createRequestUrl } from "./createRequestUrl.mjs";
|
|
14
12
|
import { getErrorResponseBody } from "./getErrorResponseBody.mjs";
|
|
15
13
|
import { getFetchFn } from "./getFetchFn.mjs";
|
|
16
14
|
import { getRequestBody } from "./getRequestBody.mjs";
|
|
17
15
|
import { getResponseBody } from "./getResponseBody.mjs";
|
|
18
16
|
import { makeRequest } from "./makeRequest.mjs";
|
|
17
|
+
import { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.mjs";
|
|
19
18
|
import { requestWithRetries } from "./requestWithRetries.mjs";
|
|
19
|
+
import { Supplier } from "./Supplier.mjs";
|
|
20
20
|
function getHeaders(args) {
|
|
21
21
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
22
|
const newHeaders = {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export type { APIResponse } from "./APIResponse.mjs";
|
|
2
|
-
export {
|
|
2
|
+
export type { BinaryResponse } from "./BinaryResponse.mjs";
|
|
3
3
|
export type { Fetcher, FetchFunction } from "./Fetcher.mjs";
|
|
4
|
+
export { fetcher } from "./Fetcher.mjs";
|
|
4
5
|
export { getHeader } from "./getHeader.mjs";
|
|
5
|
-
export { Supplier } from "./Supplier.mjs";
|
|
6
|
-
export { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.mjs";
|
|
7
|
-
export type { RawResponse, WithRawResponse } from "./RawResponse.mjs";
|
|
8
6
|
export { HttpResponsePromise } from "./HttpResponsePromise.mjs";
|
|
9
|
-
export {
|
|
7
|
+
export type { RawResponse, WithRawResponse } from "./RawResponse.mjs";
|
|
8
|
+
export { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.mjs";
|
|
9
|
+
export { Supplier } from "./Supplier.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { fetcher } from "./Fetcher.mjs";
|
|
2
2
|
export { getHeader } from "./getHeader.mjs";
|
|
3
|
-
export { Supplier } from "./Supplier.mjs";
|
|
4
|
-
export { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.mjs";
|
|
5
3
|
export { HttpResponsePromise } from "./HttpResponsePromise.mjs";
|
|
4
|
+
export { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.mjs";
|
|
5
|
+
export { Supplier } from "./Supplier.mjs";
|