@samsarahq/samsara 13.28.0 → 13.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/assets/client/requests/AssetsCreateAssetRequestBody.d.ts +2 -2
- package/dist/cjs/api/resources/assets/client/requests/AssetsUpdateAssetRequestBody.d.ts +5 -0
- package/dist/cjs/api/resources/betaApIs/client/Client.d.ts +31 -1
- package/dist/cjs/api/resources/betaApIs/client/Client.js +91 -1
- package/dist/cjs/api/resources/betaApIs/client/requests/GetPlaceGeocodeRequest.d.ts +14 -0
- package/dist/cjs/api/resources/betaApIs/client/requests/GetPlaceGeocodeRequest.js +3 -0
- package/dist/cjs/api/resources/betaApIs/client/requests/SafetyEventsV2PatchSafetyEventsV2BatchRequestBody.d.ts +1 -1
- package/dist/cjs/api/resources/betaApIs/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/media/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/media/client/Client.js +1 -1
- package/dist/cjs/api/resources/media/client/requests/MediaRetrievalPostMediaRetrievalRequestBody.d.ts +1 -1
- package/dist/cjs/api/resources/readings/client/requests/GetReadingsHistoryRequest.d.ts +3 -3
- package/dist/cjs/api/resources/readings/client/requests/GetReadingsSnapshotRequest.d.ts +3 -3
- package/dist/cjs/api/types/BleAssetTagDetailsResponseResponseBody.d.ts +19 -0
- package/dist/cjs/api/types/BleAssetTagDetailsResponseResponseBody.js +14 -0
- package/dist/cjs/api/types/CameraConnectorDetailsResponseResponseBody.d.ts +11 -0
- package/dist/cjs/api/types/CameraConnectorDetailsResponseResponseBody.js +3 -0
- package/dist/cjs/api/types/HealthDetailsResponseResponseBody.d.ts +2 -0
- package/dist/cjs/api/types/PlaceGeocodeResultResponseResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/PlaceGeocodeResultResponseResponseBody.js +3 -0
- package/dist/cjs/api/types/PlacesGetPlaceGeocodeBadGatewayErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/PlacesGetPlaceGeocodeBadGatewayErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/PlacesGetPlaceGeocodeGatewayTimeoutErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/PlacesGetPlaceGeocodeGatewayTimeoutErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/PlacesGetPlaceGeocodeInternalServerErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/PlacesGetPlaceGeocodeInternalServerErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/PlacesGetPlaceGeocodeMethodNotAllowedErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/PlacesGetPlaceGeocodeMethodNotAllowedErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/PlacesGetPlaceGeocodeNotFoundErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/PlacesGetPlaceGeocodeNotFoundErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/PlacesGetPlaceGeocodeNotImplementedErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/PlacesGetPlaceGeocodeNotImplementedErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/PlacesGetPlaceGeocodeResponseBody.d.ts +6 -0
- package/dist/cjs/api/types/PlacesGetPlaceGeocodeResponseBody.js +3 -0
- package/dist/cjs/api/types/PlacesGetPlaceGeocodeServiceUnavailableErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/PlacesGetPlaceGeocodeServiceUnavailableErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/PlacesGetPlaceGeocodeTooManyRequestsErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/PlacesGetPlaceGeocodeTooManyRequestsErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/PlacesGetPlaceGeocodeUnauthorizedErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/PlacesGetPlaceGeocodeUnauthorizedErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/index.d.ts +13 -0
- package/dist/cjs/api/types/index.js +13 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/assets/client/requests/AssetsCreateAssetRequestBody.d.mts +2 -2
- package/dist/esm/api/resources/assets/client/requests/AssetsUpdateAssetRequestBody.d.mts +5 -0
- package/dist/esm/api/resources/betaApIs/client/Client.d.mts +31 -1
- package/dist/esm/api/resources/betaApIs/client/Client.mjs +91 -1
- package/dist/esm/api/resources/betaApIs/client/requests/GetPlaceGeocodeRequest.d.mts +14 -0
- package/dist/esm/api/resources/betaApIs/client/requests/GetPlaceGeocodeRequest.mjs +2 -0
- package/dist/esm/api/resources/betaApIs/client/requests/SafetyEventsV2PatchSafetyEventsV2BatchRequestBody.d.mts +1 -1
- package/dist/esm/api/resources/betaApIs/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/media/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/media/client/Client.mjs +1 -1
- package/dist/esm/api/resources/media/client/requests/MediaRetrievalPostMediaRetrievalRequestBody.d.mts +1 -1
- package/dist/esm/api/resources/readings/client/requests/GetReadingsHistoryRequest.d.mts +3 -3
- package/dist/esm/api/resources/readings/client/requests/GetReadingsSnapshotRequest.d.mts +3 -3
- package/dist/esm/api/types/BleAssetTagDetailsResponseResponseBody.d.mts +19 -0
- package/dist/esm/api/types/BleAssetTagDetailsResponseResponseBody.mjs +11 -0
- package/dist/esm/api/types/CameraConnectorDetailsResponseResponseBody.d.mts +11 -0
- package/dist/esm/api/types/CameraConnectorDetailsResponseResponseBody.mjs +2 -0
- package/dist/esm/api/types/HealthDetailsResponseResponseBody.d.mts +2 -0
- package/dist/esm/api/types/PlaceGeocodeResultResponseResponseBody.d.mts +9 -0
- package/dist/esm/api/types/PlaceGeocodeResultResponseResponseBody.mjs +2 -0
- package/dist/esm/api/types/PlacesGetPlaceGeocodeBadGatewayErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/PlacesGetPlaceGeocodeBadGatewayErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/PlacesGetPlaceGeocodeGatewayTimeoutErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/PlacesGetPlaceGeocodeGatewayTimeoutErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/PlacesGetPlaceGeocodeInternalServerErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/PlacesGetPlaceGeocodeInternalServerErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/PlacesGetPlaceGeocodeMethodNotAllowedErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/PlacesGetPlaceGeocodeMethodNotAllowedErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/PlacesGetPlaceGeocodeNotFoundErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/PlacesGetPlaceGeocodeNotFoundErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/PlacesGetPlaceGeocodeNotImplementedErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/PlacesGetPlaceGeocodeNotImplementedErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/PlacesGetPlaceGeocodeResponseBody.d.mts +6 -0
- package/dist/esm/api/types/PlacesGetPlaceGeocodeResponseBody.mjs +2 -0
- package/dist/esm/api/types/PlacesGetPlaceGeocodeServiceUnavailableErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/PlacesGetPlaceGeocodeServiceUnavailableErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/PlacesGetPlaceGeocodeTooManyRequestsErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/PlacesGetPlaceGeocodeTooManyRequestsErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/PlacesGetPlaceGeocodeUnauthorizedErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/PlacesGetPlaceGeocodeUnauthorizedErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +13 -0
- package/dist/esm/api/types/index.mjs +13 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +74 -2
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -44,8 +44,8 @@ function normalizeClientOptions(options) {
|
|
|
44
44
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
45
45
|
"X-Fern-Language": "JavaScript",
|
|
46
46
|
"X-Fern-SDK-Name": "@samsarahq/samsara",
|
|
47
|
-
"X-Fern-SDK-Version": "13.
|
|
48
|
-
"User-Agent": "@samsarahq/samsara/13.
|
|
47
|
+
"X-Fern-SDK-Version": "13.30.0",
|
|
48
|
+
"User-Agent": "@samsarahq/samsara/13.30.0",
|
|
49
49
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
50
50
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
51
51
|
"X-Samsara-Version": (_a = options === null || options === void 0 ? void 0 : options.version) !== null && _a !== void 0 ? _a : "2025-06-11",
|
|
@@ -4,7 +4,7 @@ import type * as Samsara from "../../../../index.js";
|
|
|
4
4
|
* {}
|
|
5
5
|
*/
|
|
6
6
|
export interface AssetsCreateAssetRequestBody {
|
|
7
|
-
/** A list of attributes to assign to the asset. */
|
|
7
|
+
/** A list of attributes to assign to the asset. If provided, this replaces the asset's entire set of attribute associations with exactly this list; omit this field to leave existing attribute associations unchanged, or pass an empty array to clear them. */
|
|
8
8
|
attributes?: Samsara.GoaAttributeTinyRequestBody[];
|
|
9
9
|
/** A map of external ids */
|
|
10
10
|
externalIds?: Record<string, string>;
|
|
@@ -24,7 +24,7 @@ export interface AssetsCreateAssetRequestBody {
|
|
|
24
24
|
regulationMode?: AssetsCreateAssetRequestBody.RegulationMode;
|
|
25
25
|
/** The serial number of the asset. This can be an internal serial number or used to hold legacy VIN/PIN numbers such as ones of shorter lengths. */
|
|
26
26
|
serialNumber?: string;
|
|
27
|
-
/** An array of IDs of tags to associate with this asset. If your access to the API is scoped by one or more tags, this field is required to pass in. */
|
|
27
|
+
/** An array of IDs of tags to associate with this asset. If provided, this replaces the asset's entire set of tag associations with exactly this list; omit this field to leave existing tag associations unchanged, or pass an empty array to clear them. If your access to the API is scoped by one or more tags, this field is required to pass in. */
|
|
28
28
|
tagIds?: string[];
|
|
29
29
|
/** The operational context in which the asset interacts with the Samsara system. Examples: Vehicle (eg: truck, bus...), Trailer (eg: dry van, reefer, flatbed...), Powered Equipment (eg: dozer, crane...), Unpowered Equipment (eg: container, dumpster...), or Uncategorized. Valid values: `uncategorized`, `trailer`, `equipment`, `unpowered`, `vehicle` */
|
|
30
30
|
type?: AssetsCreateAssetRequestBody.Type;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as Samsara from "../../../../index.js";
|
|
1
2
|
/**
|
|
2
3
|
* @example
|
|
3
4
|
* {
|
|
@@ -7,6 +8,8 @@
|
|
|
7
8
|
export interface AssetsUpdateAssetRequestBody {
|
|
8
9
|
/** A filter selecting a single asset by id. */
|
|
9
10
|
id: string;
|
|
11
|
+
/** A list of attributes to assign to the asset. If provided, this replaces the asset's entire set of attribute associations with exactly this list; omit this field to leave existing attribute associations unchanged, or pass an empty array to clear them. */
|
|
12
|
+
attributes?: Samsara.GoaAttributeTinyRequestBody[];
|
|
10
13
|
/** A map of external ids */
|
|
11
14
|
externalIds?: Record<string, string>;
|
|
12
15
|
/** The license plate of the asset. */
|
|
@@ -25,6 +28,8 @@ export interface AssetsUpdateAssetRequestBody {
|
|
|
25
28
|
regulationMode?: AssetsUpdateAssetRequestBody.RegulationMode;
|
|
26
29
|
/** The serial number of the asset. This can be an internal serial number or used to hold legacy VIN/PIN numbers such as ones of shorter lengths. */
|
|
27
30
|
serialNumber?: string;
|
|
31
|
+
/** An array of IDs of tags to associate with this asset. If provided, this replaces the asset's entire set of tag associations with exactly this list; omit this field to leave existing tag associations unchanged, or pass an empty array to clear them. If your access to the API is scoped by one or more tags, this field is required to pass in. */
|
|
32
|
+
tagIds?: string[];
|
|
28
33
|
/** The operational context in which the asset interacts with the Samsara system. Examples: Vehicle (eg: truck, bus...), Trailer (eg: dry van, reefer, flatbed...), Powered Equipment (eg: dozer, crane...), Unpowered Equipment (eg: container, dumpster...), or Uncategorized. Valid values: `uncategorized`, `trailer`, `equipment`, `unpowered`, `vehicle` */
|
|
29
34
|
type?: AssetsUpdateAssetRequestBody.Type;
|
|
30
35
|
/** The unique 17-digit VIN (Vehicle Identification Number) or PIN (Product Identification Number) of the asset. */
|
|
@@ -1648,6 +1648,36 @@ export declare class BetaApIsClient {
|
|
|
1648
1648
|
*/
|
|
1649
1649
|
getPlaceDeletions(request?: Samsara.GetPlaceDeletionsRequest, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.PlacesGetPlaceDeletionsResponseBody>;
|
|
1650
1650
|
private __getPlaceDeletions;
|
|
1651
|
+
/**
|
|
1652
|
+
* Forward-geocodes a free-form address string. Does not create or update a Place. Returns geocode candidates with cursor pagination.
|
|
1653
|
+
*
|
|
1654
|
+
* <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
|
|
1655
|
+
*
|
|
1656
|
+
* To use this endpoint, select **Read Places** under the Places category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
1657
|
+
*
|
|
1658
|
+
*
|
|
1659
|
+
* **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
|
|
1660
|
+
*
|
|
1661
|
+
* @param {Samsara.GetPlaceGeocodeRequest} request
|
|
1662
|
+
* @param {BetaApIsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1663
|
+
*
|
|
1664
|
+
* @throws {@link Samsara.UnauthorizedError}
|
|
1665
|
+
* @throws {@link Samsara.NotFoundError}
|
|
1666
|
+
* @throws {@link Samsara.MethodNotAllowedError}
|
|
1667
|
+
* @throws {@link Samsara.TooManyRequestsError}
|
|
1668
|
+
* @throws {@link Samsara.InternalServerError}
|
|
1669
|
+
* @throws {@link Samsara.NotImplementedError}
|
|
1670
|
+
* @throws {@link Samsara.BadGatewayError}
|
|
1671
|
+
* @throws {@link Samsara.ServiceUnavailableError}
|
|
1672
|
+
* @throws {@link Samsara.GatewayTimeoutError}
|
|
1673
|
+
*
|
|
1674
|
+
* @example
|
|
1675
|
+
* await client.betaApIs.getPlaceGeocode({
|
|
1676
|
+
* address: "address"
|
|
1677
|
+
* })
|
|
1678
|
+
*/
|
|
1679
|
+
getPlaceGeocode(request: Samsara.GetPlaceGeocodeRequest, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.PlacesGetPlaceGeocodeResponseBody>;
|
|
1680
|
+
private __getPlaceGeocode;
|
|
1651
1681
|
/**
|
|
1652
1682
|
* List all preferred fuel stations for your organization.
|
|
1653
1683
|
*
|
|
@@ -2602,7 +2632,7 @@ export declare class BetaApIsClient {
|
|
|
2602
2632
|
*
|
|
2603
2633
|
* @example
|
|
2604
2634
|
* await client.betaApIs.patchSafetyEventsV2Batch({
|
|
2605
|
-
* safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"
|
|
2635
|
+
* safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"]
|
|
2606
2636
|
* })
|
|
2607
2637
|
*/
|
|
2608
2638
|
patchSafetyEventsV2Batch(request: Samsara.SafetyEventsV2PatchSafetyEventsV2BatchRequestBody, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.SafetyEventsV2PatchSafetyEventsV2BatchResponseBody>;
|
|
@@ -4858,6 +4858,96 @@ class BetaApIsClient {
|
|
|
4858
4858
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/places/deletions");
|
|
4859
4859
|
});
|
|
4860
4860
|
}
|
|
4861
|
+
/**
|
|
4862
|
+
* Forward-geocodes a free-form address string. Does not create or update a Place. Returns geocode candidates with cursor pagination.
|
|
4863
|
+
*
|
|
4864
|
+
* <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
|
|
4865
|
+
*
|
|
4866
|
+
* To use this endpoint, select **Read Places** under the Places category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
|
|
4867
|
+
*
|
|
4868
|
+
*
|
|
4869
|
+
* **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
|
|
4870
|
+
*
|
|
4871
|
+
* @param {Samsara.GetPlaceGeocodeRequest} request
|
|
4872
|
+
* @param {BetaApIsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4873
|
+
*
|
|
4874
|
+
* @throws {@link Samsara.UnauthorizedError}
|
|
4875
|
+
* @throws {@link Samsara.NotFoundError}
|
|
4876
|
+
* @throws {@link Samsara.MethodNotAllowedError}
|
|
4877
|
+
* @throws {@link Samsara.TooManyRequestsError}
|
|
4878
|
+
* @throws {@link Samsara.InternalServerError}
|
|
4879
|
+
* @throws {@link Samsara.NotImplementedError}
|
|
4880
|
+
* @throws {@link Samsara.BadGatewayError}
|
|
4881
|
+
* @throws {@link Samsara.ServiceUnavailableError}
|
|
4882
|
+
* @throws {@link Samsara.GatewayTimeoutError}
|
|
4883
|
+
*
|
|
4884
|
+
* @example
|
|
4885
|
+
* await client.betaApIs.getPlaceGeocode({
|
|
4886
|
+
* address: "address"
|
|
4887
|
+
* })
|
|
4888
|
+
*/
|
|
4889
|
+
getPlaceGeocode(request, requestOptions) {
|
|
4890
|
+
return core.HttpResponsePromise.fromPromise(this.__getPlaceGeocode(request, requestOptions));
|
|
4891
|
+
}
|
|
4892
|
+
__getPlaceGeocode(request, requestOptions) {
|
|
4893
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4894
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
4895
|
+
const { address, after, limit } = request;
|
|
4896
|
+
const _queryParams = {
|
|
4897
|
+
address,
|
|
4898
|
+
after,
|
|
4899
|
+
limit,
|
|
4900
|
+
};
|
|
4901
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
4902
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Samsara-Version": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
4903
|
+
const _response = yield core.fetcher({
|
|
4904
|
+
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.SamsaraEnvironment.ProductionApi, "places/geocode"),
|
|
4905
|
+
method: "GET",
|
|
4906
|
+
headers: _headers,
|
|
4907
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
4908
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
4909
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
4910
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
4911
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
4912
|
+
logging: this._options.logging,
|
|
4913
|
+
});
|
|
4914
|
+
if (_response.ok) {
|
|
4915
|
+
return {
|
|
4916
|
+
data: _response.body,
|
|
4917
|
+
rawResponse: _response.rawResponse,
|
|
4918
|
+
};
|
|
4919
|
+
}
|
|
4920
|
+
if (_response.error.reason === "status-code") {
|
|
4921
|
+
switch (_response.error.statusCode) {
|
|
4922
|
+
case 401:
|
|
4923
|
+
throw new Samsara.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
4924
|
+
case 404:
|
|
4925
|
+
throw new Samsara.NotFoundError(_response.error.body, _response.rawResponse);
|
|
4926
|
+
case 405:
|
|
4927
|
+
throw new Samsara.MethodNotAllowedError(_response.error.body, _response.rawResponse);
|
|
4928
|
+
case 429:
|
|
4929
|
+
throw new Samsara.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
4930
|
+
case 500:
|
|
4931
|
+
throw new Samsara.InternalServerError(_response.error.body, _response.rawResponse);
|
|
4932
|
+
case 501:
|
|
4933
|
+
throw new Samsara.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
4934
|
+
case 502:
|
|
4935
|
+
throw new Samsara.BadGatewayError(_response.error.body, _response.rawResponse);
|
|
4936
|
+
case 503:
|
|
4937
|
+
throw new Samsara.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
4938
|
+
case 504:
|
|
4939
|
+
throw new Samsara.GatewayTimeoutError(_response.error.body, _response.rawResponse);
|
|
4940
|
+
default:
|
|
4941
|
+
throw new errors.SamsaraError({
|
|
4942
|
+
statusCode: _response.error.statusCode,
|
|
4943
|
+
body: _response.error.body,
|
|
4944
|
+
rawResponse: _response.rawResponse,
|
|
4945
|
+
});
|
|
4946
|
+
}
|
|
4947
|
+
}
|
|
4948
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/places/geocode");
|
|
4949
|
+
});
|
|
4950
|
+
}
|
|
4861
4951
|
/**
|
|
4862
4952
|
* List all preferred fuel stations for your organization.
|
|
4863
4953
|
*
|
|
@@ -7495,7 +7585,7 @@ class BetaApIsClient {
|
|
|
7495
7585
|
*
|
|
7496
7586
|
* @example
|
|
7497
7587
|
* await client.betaApIs.patchSafetyEventsV2Batch({
|
|
7498
|
-
* safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"
|
|
7588
|
+
* safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"]
|
|
7499
7589
|
* })
|
|
7500
7590
|
*/
|
|
7501
7591
|
patchSafetyEventsV2Batch(request, requestOptions) {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* address: "address"
|
|
5
|
+
* }
|
|
6
|
+
*/
|
|
7
|
+
export interface GetPlaceGeocodeRequest {
|
|
8
|
+
/** Address string to forward-geocode (URL-encoded). Required; must be non-empty. */
|
|
9
|
+
address: string;
|
|
10
|
+
/** If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results. */
|
|
11
|
+
after?: string;
|
|
12
|
+
/** The limit for how many objects will be in the response. Default 5, max 20. */
|
|
13
|
+
limit?: number;
|
|
14
|
+
}
|
|
@@ -2,7 +2,7 @@ import type * as Samsara from "../../../../index.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
|
-
* safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"
|
|
5
|
+
* safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"]
|
|
6
6
|
* }
|
|
7
7
|
*/
|
|
8
8
|
export interface SafetyEventsV2PatchSafetyEventsV2BatchRequestBody {
|
|
@@ -33,6 +33,7 @@ export type { GetFunctionStorageFileRequest } from "./GetFunctionStorageFileRequ
|
|
|
33
33
|
export type { GetHosEldEventsRequest } from "./GetHosEldEventsRequest.js";
|
|
34
34
|
export type { GetJobsRequest } from "./GetJobsRequest.js";
|
|
35
35
|
export type { GetPlaceDeletionsRequest } from "./GetPlaceDeletionsRequest.js";
|
|
36
|
+
export type { GetPlaceGeocodeRequest } from "./GetPlaceGeocodeRequest.js";
|
|
36
37
|
export type { GetPlacesRequest } from "./GetPlacesRequest.js";
|
|
37
38
|
export type { GetPreferredStationRequest } from "./GetPreferredStationRequest.js";
|
|
38
39
|
export type { GetQualificationRecordsRequest } from "./GetQualificationRecordsRequest.js";
|
|
@@ -98,7 +98,7 @@ export declare class MediaClient {
|
|
|
98
98
|
* @example
|
|
99
99
|
* await client.media.postMediaRetrieval({
|
|
100
100
|
* endTime: "2019-06-13T19:08:55Z",
|
|
101
|
-
* inputs: ["dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing"],
|
|
101
|
+
* inputs: ["dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing"],
|
|
102
102
|
* mediaType: "image",
|
|
103
103
|
* startTime: "2019-06-13T19:08:25Z",
|
|
104
104
|
* vehicleId: "1234"
|
|
@@ -274,7 +274,7 @@ class MediaClient {
|
|
|
274
274
|
* @example
|
|
275
275
|
* await client.media.postMediaRetrieval({
|
|
276
276
|
* endTime: "2019-06-13T19:08:55Z",
|
|
277
|
-
* inputs: ["dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing"],
|
|
277
|
+
* inputs: ["dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing"],
|
|
278
278
|
* mediaType: "image",
|
|
279
279
|
* startTime: "2019-06-13T19:08:25Z",
|
|
280
280
|
* vehicleId: "1234"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
4
|
* endTime: "2019-06-13T19:08:55Z",
|
|
5
|
-
* inputs: ["dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing"],
|
|
5
|
+
* inputs: ["dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing"],
|
|
6
6
|
* mediaType: "image",
|
|
7
7
|
* startTime: "2019-06-13T19:08:25Z",
|
|
8
8
|
* vehicleId: "1234"
|
|
@@ -221,9 +221,6 @@ export interface GetReadingsHistoryRequest {
|
|
|
221
221
|
*
|
|
222
222
|
* * `addressEntry` (Address Entry): Address data from the address entry event
|
|
223
223
|
* * `addressExit` (Address Exit): Address data from the address exit event
|
|
224
|
-
* * `ag51BatteryStatus` (AG51 Battery Status): Battery status of the AG51 gateway based on temperature-compensated voltage threshold. The threshold varies from 3672mV at -40°C to 4579mV at 60°C. (values: ok | low)
|
|
225
|
-
* * `ag51BatteryTemperature` (AG51 Battery Temperature): Internal temperature of the AG51 gateway battery in degrees Celsius (celsius)
|
|
226
|
-
* * `ag51BatteryVoltage` (AG51 Battery Voltage): Total battery voltage of the AG51 gateway (sum of all 3 cells) in volts (volt)
|
|
227
224
|
* * `atisLamp` (Atis Lamp status): Atis lamp on/off status (values: off | on)
|
|
228
225
|
* * `derivedCargoState` (Cargo Status): Indicates if the overall cargo status of the asset is Empty, Partially Empty, Full, or Unknown. (values: unknown | empty | partiallyEmpty | full)
|
|
229
226
|
* * `doorClosedStatus` (Door Closed Status): Status indicating whether a door is closed or open (values: open | closed)
|
|
@@ -232,6 +229,9 @@ export interface GetReadingsHistoryRequest {
|
|
|
232
229
|
* * `environmentMonitorAmbientTemperatureBLEConnection` (Ambient Temperature (BLE Connection)): Air temperature at the environmental monitor device (built-in sensor) via BLE Connection. (celsius)
|
|
233
230
|
* * `environmentMonitorThermistorTemperature` (Thermistor Temperature): Temperature from an external thermistor probe (e.g. cable probe in cargo or reefer). (celsius)
|
|
234
231
|
* * `environmentMonitorThermistorTemperatureBLEConnection` (Thermistor Temperature (BLE Connection)): Temperature from an external thermistor probe (e.g. cable probe in cargo or reefer) via BLE Connection. (celsius)
|
|
232
|
+
* * `gatewayBatteryStatus` (Gateway Battery Status): Battery status of the gateway based on temperature-compensated voltage threshold. The threshold varies from 3672mV at -40°C to 4579mV at 60°C. (values: ok | low)
|
|
233
|
+
* * `gatewayBatteryTemperature` (Gateway Battery Temperature): Internal temperature of the gateway battery in degrees Celsius (celsius)
|
|
234
|
+
* * `gatewayBatteryVoltage` (Gateway Battery Voltage): Total battery voltage of the gateway (sum of all 3 cells) in volts (volt)
|
|
235
235
|
* * `trailerMovingWithoutPower` (Trailer Moving Without Power): Trailer moving without power status (values: off | on)
|
|
236
236
|
* * `validBrakeScore` (Braking Performance Value): Percent score representing trailer braking effectiveness using regression analysis over the past 90 days, guaranteed to have under 3% margin of error. (percent)
|
|
237
237
|
* * `widgetBatteryVoltage` (Widget Battery Voltage): Battery voltage level of the widget sensor in millivolts (volt)
|
|
@@ -221,9 +221,6 @@ export interface GetReadingsSnapshotRequest {
|
|
|
221
221
|
*
|
|
222
222
|
* * `addressEntry` (Address Entry): Address data from the address entry event
|
|
223
223
|
* * `addressExit` (Address Exit): Address data from the address exit event
|
|
224
|
-
* * `ag51BatteryStatus` (AG51 Battery Status): Battery status of the AG51 gateway based on temperature-compensated voltage threshold. The threshold varies from 3672mV at -40°C to 4579mV at 60°C. (values: ok | low)
|
|
225
|
-
* * `ag51BatteryTemperature` (AG51 Battery Temperature): Internal temperature of the AG51 gateway battery in degrees Celsius (celsius)
|
|
226
|
-
* * `ag51BatteryVoltage` (AG51 Battery Voltage): Total battery voltage of the AG51 gateway (sum of all 3 cells) in volts (volt)
|
|
227
224
|
* * `atisLamp` (Atis Lamp status): Atis lamp on/off status (values: off | on)
|
|
228
225
|
* * `derivedCargoState` (Cargo Status): Indicates if the overall cargo status of the asset is Empty, Partially Empty, Full, or Unknown. (values: unknown | empty | partiallyEmpty | full)
|
|
229
226
|
* * `doorClosedStatus` (Door Closed Status): Status indicating whether a door is closed or open (values: open | closed)
|
|
@@ -232,6 +229,9 @@ export interface GetReadingsSnapshotRequest {
|
|
|
232
229
|
* * `environmentMonitorAmbientTemperatureBLEConnection` (Ambient Temperature (BLE Connection)): Air temperature at the environmental monitor device (built-in sensor) via BLE Connection. (celsius)
|
|
233
230
|
* * `environmentMonitorThermistorTemperature` (Thermistor Temperature): Temperature from an external thermistor probe (e.g. cable probe in cargo or reefer). (celsius)
|
|
234
231
|
* * `environmentMonitorThermistorTemperatureBLEConnection` (Thermistor Temperature (BLE Connection)): Temperature from an external thermistor probe (e.g. cable probe in cargo or reefer) via BLE Connection. (celsius)
|
|
232
|
+
* * `gatewayBatteryStatus` (Gateway Battery Status): Battery status of the gateway based on temperature-compensated voltage threshold. The threshold varies from 3672mV at -40°C to 4579mV at 60°C. (values: ok | low)
|
|
233
|
+
* * `gatewayBatteryTemperature` (Gateway Battery Temperature): Internal temperature of the gateway battery in degrees Celsius (celsius)
|
|
234
|
+
* * `gatewayBatteryVoltage` (Gateway Battery Voltage): Total battery voltage of the gateway (sum of all 3 cells) in volts (volt)
|
|
235
235
|
* * `trailerMovingWithoutPower` (Trailer Moving Without Power): Trailer moving without power status (values: off | on)
|
|
236
236
|
* * `validBrakeScore` (Braking Performance Value): Percent score representing trailer braking effectiveness using regression analysis over the past 90 days, guaranteed to have under 3% margin of error. (percent)
|
|
237
237
|
* * `widgetBatteryVoltage` (Widget Battery Voltage): Battery voltage level of the widget sensor in millivolts (volt)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BLE asset tag-specific health metadata details.
|
|
3
|
+
*/
|
|
4
|
+
export interface BleAssetTagDetailsResponseResponseBody {
|
|
5
|
+
/** The BLE asset tag's battery state. Valid values: `critical`, `low`, `ok`, `unknown` */
|
|
6
|
+
batteryState?: BleAssetTagDetailsResponseResponseBody.BatteryState | undefined;
|
|
7
|
+
/** The timestamp when the BLE asset tag was last detected by a gateway in the Samsara network, in RFC 3339 format. */
|
|
8
|
+
lastCheckInTime?: string | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare namespace BleAssetTagDetailsResponseResponseBody {
|
|
11
|
+
/** The BLE asset tag's battery state. Valid values: `critical`, `low`, `ok`, `unknown` */
|
|
12
|
+
const BatteryState: {
|
|
13
|
+
readonly Critical: "critical";
|
|
14
|
+
readonly Low: "low";
|
|
15
|
+
readonly Ok: "ok";
|
|
16
|
+
readonly Unknown: "unknown";
|
|
17
|
+
};
|
|
18
|
+
type BatteryState = (typeof BatteryState)[keyof typeof BatteryState];
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.BleAssetTagDetailsResponseResponseBody = void 0;
|
|
5
|
+
var BleAssetTagDetailsResponseResponseBody;
|
|
6
|
+
(function (BleAssetTagDetailsResponseResponseBody) {
|
|
7
|
+
/** The BLE asset tag's battery state. Valid values: `critical`, `low`, `ok`, `unknown` */
|
|
8
|
+
BleAssetTagDetailsResponseResponseBody.BatteryState = {
|
|
9
|
+
Critical: "critical",
|
|
10
|
+
Low: "low",
|
|
11
|
+
Ok: "ok",
|
|
12
|
+
Unknown: "unknown",
|
|
13
|
+
};
|
|
14
|
+
})(BleAssetTagDetailsResponseResponseBody || (exports.BleAssetTagDetailsResponseResponseBody = BleAssetTagDetailsResponseResponseBody = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Camera connector-specific health metadata details.
|
|
3
|
+
*/
|
|
4
|
+
export interface CameraConnectorDetailsResponseResponseBody {
|
|
5
|
+
/** The timestamp when the gateway was last connected to the vehicle, in RFC 3339 format. */
|
|
6
|
+
gatewayLastConnectedTime?: string | undefined;
|
|
7
|
+
/** The percentage of successful recording time during the time when the vehicle is on an active trip over the past 50 hours, in percentage points. */
|
|
8
|
+
lastFiftyHoursUptimePercentage?: number | undefined;
|
|
9
|
+
/** The serial number of the vehicle gateway that the camera connector is connected to. */
|
|
10
|
+
vehicleGatewaySerial?: string | undefined;
|
|
11
|
+
}
|
|
@@ -3,6 +3,8 @@ import type * as Samsara from "../index.js";
|
|
|
3
3
|
* Detailed health related metadata for the device.
|
|
4
4
|
*/
|
|
5
5
|
export interface HealthDetailsResponseResponseBody {
|
|
6
|
+
bleAssetTagDetails?: Samsara.BleAssetTagDetailsResponseResponseBody | undefined;
|
|
7
|
+
cameraConnectorDetails?: Samsara.CameraConnectorDetailsResponseResponseBody | undefined;
|
|
6
8
|
cameraDetails?: Samsara.CameraDetailsResponseResponseBody | undefined;
|
|
7
9
|
gatewayDetails?: Samsara.GatewayDetailsResponseResponseBody | undefined;
|
|
8
10
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An internal server error occurred
|
|
3
|
+
*/
|
|
4
|
+
export interface PlacesGetPlaceGeocodeInternalServerErrorResponseBody {
|
|
5
|
+
/** Message of error */
|
|
6
|
+
message: string;
|
|
7
|
+
/** The request ID; used when reaching out to support for issues with requests. */
|
|
8
|
+
requestId: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Requested endpoint is not yet implemented
|
|
3
|
+
*/
|
|
4
|
+
export interface PlacesGetPlaceGeocodeNotImplementedErrorResponseBody {
|
|
5
|
+
/** Message of error */
|
|
6
|
+
message: string;
|
|
7
|
+
/** The request ID; used when reaching out to support for issues with requests. */
|
|
8
|
+
requestId: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as Samsara from "../index.js";
|
|
2
|
+
export interface PlacesGetPlaceGeocodeResponseBody {
|
|
3
|
+
/** Geocode candidates for the requested address. */
|
|
4
|
+
data: Samsara.PlaceGeocodeResultResponseResponseBody[];
|
|
5
|
+
pagination: Samsara.GoaPaginationResponseResponseBody;
|
|
6
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Service unavailable
|
|
3
|
+
*/
|
|
4
|
+
export interface PlacesGetPlaceGeocodeServiceUnavailableErrorResponseBody {
|
|
5
|
+
/** Message of error */
|
|
6
|
+
message: string;
|
|
7
|
+
/** The request ID; used when reaching out to support for issues with requests. */
|
|
8
|
+
requestId: string;
|
|
9
|
+
}
|
|
@@ -233,6 +233,8 @@ export * from "./BaseRouteResponseObjectResponseBody.js";
|
|
|
233
233
|
export * from "./BehaviorCountDetailsRequestBody.js";
|
|
234
234
|
export * from "./BehaviorCountDetailsResponseBody.js";
|
|
235
235
|
export * from "./BehaviorResponseBody.js";
|
|
236
|
+
export * from "./BleAssetTagDetailsResponseResponseBody.js";
|
|
237
|
+
export * from "./CameraConnectorDetailsResponseResponseBody.js";
|
|
236
238
|
export * from "./CameraConnectorDisconectedResponseBody.js";
|
|
237
239
|
export * from "./CameraDetailsResponseResponseBody.js";
|
|
238
240
|
export * from "./CameraSerial.js";
|
|
@@ -1970,6 +1972,7 @@ export * from "./PersonDetectedResponseBody.js";
|
|
|
1970
1972
|
export * from "./PhotoValueObjectRequestBody.js";
|
|
1971
1973
|
export * from "./PhotoValueObjectResponseBody.js";
|
|
1972
1974
|
export * from "./PlaceDeletionMarkerObjectResponseBody.js";
|
|
1975
|
+
export * from "./PlaceGeocodeResultResponseResponseBody.js";
|
|
1973
1976
|
export * from "./PlaceGeofenceCircleInputRequestBody.js";
|
|
1974
1977
|
export * from "./PlaceGeofenceCircleResponseResponseBody.js";
|
|
1975
1978
|
export * from "./PlaceGeofenceInputRequestBody.js";
|
|
@@ -2008,6 +2011,16 @@ export * from "./PlacesGetPlaceDeletionsResponseBody.js";
|
|
|
2008
2011
|
export * from "./PlacesGetPlaceDeletionsServiceUnavailableErrorResponseBody.js";
|
|
2009
2012
|
export * from "./PlacesGetPlaceDeletionsTooManyRequestsErrorResponseBody.js";
|
|
2010
2013
|
export * from "./PlacesGetPlaceDeletionsUnauthorizedErrorResponseBody.js";
|
|
2014
|
+
export * from "./PlacesGetPlaceGeocodeBadGatewayErrorResponseBody.js";
|
|
2015
|
+
export * from "./PlacesGetPlaceGeocodeGatewayTimeoutErrorResponseBody.js";
|
|
2016
|
+
export * from "./PlacesGetPlaceGeocodeInternalServerErrorResponseBody.js";
|
|
2017
|
+
export * from "./PlacesGetPlaceGeocodeMethodNotAllowedErrorResponseBody.js";
|
|
2018
|
+
export * from "./PlacesGetPlaceGeocodeNotFoundErrorResponseBody.js";
|
|
2019
|
+
export * from "./PlacesGetPlaceGeocodeNotImplementedErrorResponseBody.js";
|
|
2020
|
+
export * from "./PlacesGetPlaceGeocodeResponseBody.js";
|
|
2021
|
+
export * from "./PlacesGetPlaceGeocodeServiceUnavailableErrorResponseBody.js";
|
|
2022
|
+
export * from "./PlacesGetPlaceGeocodeTooManyRequestsErrorResponseBody.js";
|
|
2023
|
+
export * from "./PlacesGetPlaceGeocodeUnauthorizedErrorResponseBody.js";
|
|
2011
2024
|
export * from "./PlacesGetPlacesBadGatewayErrorResponseBody.js";
|
|
2012
2025
|
export * from "./PlacesGetPlacesGatewayTimeoutErrorResponseBody.js";
|
|
2013
2026
|
export * from "./PlacesGetPlacesInternalServerErrorResponseBody.js";
|