@samsarahq/samsara 13.6.0 → 13.8.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/betaApIs/client/Client.d.ts +31 -7
- package/dist/cjs/api/resources/betaApIs/client/Client.js +33 -9
- package/dist/cjs/api/resources/betaApIs/client/requests/GetPlacesRequest.d.ts +2 -2
- package/dist/cjs/api/resources/betaApIs/client/requests/PlacesPatchPlaceRequestBody.d.ts +7 -7
- package/dist/cjs/api/resources/betaApIs/client/requests/PlacesPostPlaceRequestBody.d.ts +3 -1
- package/dist/cjs/api/types/PatchPlaceHubLocationUpsertBodyRequestBody.d.ts +11 -0
- package/dist/cjs/api/types/PlaceHubLocationCapacityServiceTimeInputRequestBody.d.ts +11 -0
- package/dist/cjs/api/types/PlaceHubLocationCapacityServiceTimeInputRequestBody.js +3 -0
- package/dist/cjs/api/types/PlaceHubLocationOrderServiceTimeInputRequestBody.d.ts +22 -0
- package/dist/cjs/api/types/PlaceHubLocationOrderServiceTimeInputRequestBody.js +14 -0
- package/dist/cjs/api/types/PlaceHubLocationRequiredSkillInputRequestBody.d.ts +7 -0
- package/dist/cjs/api/types/PlaceHubLocationRequiredSkillInputRequestBody.js +3 -0
- package/dist/cjs/api/types/PlaceHubLocationServiceTimeInputRequestBody.d.ts +9 -0
- package/dist/cjs/api/types/PlaceHubLocationServiceTimeInputRequestBody.js +3 -0
- package/dist/cjs/api/types/PlaceHubLocationServiceWindowInputRequestBody.d.ts +11 -0
- package/dist/cjs/api/types/PlaceHubLocationServiceWindowInputRequestBody.js +3 -0
- package/dist/cjs/api/types/index.d.ts +5 -0
- package/dist/cjs/api/types/index.js +5 -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/betaApIs/client/Client.d.mts +31 -7
- package/dist/esm/api/resources/betaApIs/client/Client.mjs +33 -9
- package/dist/esm/api/resources/betaApIs/client/requests/GetPlacesRequest.d.mts +2 -2
- package/dist/esm/api/resources/betaApIs/client/requests/PlacesPatchPlaceRequestBody.d.mts +7 -7
- package/dist/esm/api/resources/betaApIs/client/requests/PlacesPostPlaceRequestBody.d.mts +3 -1
- package/dist/esm/api/types/PatchPlaceHubLocationUpsertBodyRequestBody.d.mts +11 -0
- package/dist/esm/api/types/PlaceHubLocationCapacityServiceTimeInputRequestBody.d.mts +11 -0
- package/dist/esm/api/types/PlaceHubLocationCapacityServiceTimeInputRequestBody.mjs +2 -0
- package/dist/esm/api/types/PlaceHubLocationOrderServiceTimeInputRequestBody.d.mts +22 -0
- package/dist/esm/api/types/PlaceHubLocationOrderServiceTimeInputRequestBody.mjs +11 -0
- package/dist/esm/api/types/PlaceHubLocationRequiredSkillInputRequestBody.d.mts +7 -0
- package/dist/esm/api/types/PlaceHubLocationRequiredSkillInputRequestBody.mjs +2 -0
- package/dist/esm/api/types/PlaceHubLocationServiceTimeInputRequestBody.d.mts +9 -0
- package/dist/esm/api/types/PlaceHubLocationServiceTimeInputRequestBody.mjs +2 -0
- package/dist/esm/api/types/PlaceHubLocationServiceWindowInputRequestBody.d.mts +11 -0
- package/dist/esm/api/types/PlaceHubLocationServiceWindowInputRequestBody.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +5 -0
- package/dist/esm/api/types/index.mjs +5 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +30 -6
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.8.0",
|
|
48
|
+
"User-Agent": "@samsarahq/samsara/13.8.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",
|
|
@@ -1241,7 +1241,7 @@ export declare class BetaApIsClient {
|
|
|
1241
1241
|
deleteHubRouteTemplate(request: Samsara.DeleteHubRouteTemplateRequest, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
1242
1242
|
private __deleteHubRouteTemplate;
|
|
1243
1243
|
/**
|
|
1244
|
-
* Returns places for the authorized organization. Supports cursor pagination or batch fetch by Samsara place ids via `placeIds
|
|
1244
|
+
* Returns places for the authorized organization. Supports cursor pagination or batch fetch by Samsara place ids via `placeIds` or by external ids via `externalIds` (mutually exclusive).
|
|
1245
1245
|
*
|
|
1246
1246
|
* <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>).
|
|
1247
1247
|
*
|
|
@@ -1330,7 +1330,7 @@ export declare class BetaApIsClient {
|
|
|
1330
1330
|
deletePlace(request: Samsara.DeletePlaceRequest, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
1331
1331
|
private __deletePlace;
|
|
1332
1332
|
/**
|
|
1333
|
-
* Updates a place.
|
|
1333
|
+
* Updates a place. Provide exactly one of query parameter `placeId` (Samsara id) or `externalId` (key:value). Only fields present in the JSON body are changed; omit a field to leave it unchanged.
|
|
1334
1334
|
*
|
|
1335
1335
|
* <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
|
|
1336
1336
|
*
|
|
@@ -1353,11 +1353,9 @@ export declare class BetaApIsClient {
|
|
|
1353
1353
|
* @throws {@link Samsara.GatewayTimeoutError}
|
|
1354
1354
|
*
|
|
1355
1355
|
* @example
|
|
1356
|
-
* await client.betaApIs.patchPlace(
|
|
1357
|
-
* placeId: 1000000
|
|
1358
|
-
* })
|
|
1356
|
+
* await client.betaApIs.patchPlace()
|
|
1359
1357
|
*/
|
|
1360
|
-
patchPlace(request
|
|
1358
|
+
patchPlace(request?: Samsara.PlacesPatchPlaceRequestBody, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.PlacesPatchPlaceResponseBody>;
|
|
1361
1359
|
private __patchPlace;
|
|
1362
1360
|
/**
|
|
1363
1361
|
* List all preferred fuel stations for your organization.
|
|
@@ -1774,7 +1772,33 @@ export declare class BetaApIsClient {
|
|
|
1774
1772
|
/**
|
|
1775
1773
|
* Ingest new readings. This endpoint allows the ingestion of batches of readings.
|
|
1776
1774
|
*
|
|
1777
|
-
* Ingesting readings is only supported for assets created using the POST /assets API endpoint with readingsIngestionEnabled set to true. To see a full list of readings available for ingestion use the GET readings definitions API.
|
|
1775
|
+
* Ingesting readings is only supported for assets created using the POST /assets API endpoint with readingsIngestionEnabled set to true. To see a full list of readings available for ingestion use the GET readings definitions API.
|
|
1776
|
+
*
|
|
1777
|
+
*
|
|
1778
|
+
* Readings that currently support ingestion (by category):
|
|
1779
|
+
*
|
|
1780
|
+
*
|
|
1781
|
+
* <details>
|
|
1782
|
+
* <summary><strong>ingestible</strong></summary>
|
|
1783
|
+
*
|
|
1784
|
+
* * `batteryVoltage`
|
|
1785
|
+
* * `coolantTemp`
|
|
1786
|
+
* * `ecuFuelLevelMillipercent`
|
|
1787
|
+
* * `engineHours`
|
|
1788
|
+
* * `engineRpm`
|
|
1789
|
+
* * `engineState` (values: off | running | idling)
|
|
1790
|
+
* * `faultCodesJ1939`
|
|
1791
|
+
* * `faultCodesOBDII`
|
|
1792
|
+
* * `fuelLevelPerc`
|
|
1793
|
+
* * `location`
|
|
1794
|
+
* * `odometerEcu`
|
|
1795
|
+
* * `oilPressure`
|
|
1796
|
+
*
|
|
1797
|
+
* </details>
|
|
1798
|
+
*
|
|
1799
|
+
* **Note:** Use the `GET /readings/definitions` endpoint and check the `ingestionEnabled` field for the authoritative, up-to-date set of ingestible readings for your organization.
|
|
1800
|
+
*
|
|
1801
|
+
* When ingesting location data, the readingID 'location' must be used and the value object must contain at least the following fields: 'speed', 'latitude', 'longitude'.
|
|
1778
1802
|
*
|
|
1779
1803
|
* Related guide: [Readings](https://developers.samsara.com/docs/readings).
|
|
1780
1804
|
*
|
|
@@ -3686,7 +3686,7 @@ class BetaApIsClient {
|
|
|
3686
3686
|
});
|
|
3687
3687
|
}
|
|
3688
3688
|
/**
|
|
3689
|
-
* Returns places for the authorized organization. Supports cursor pagination or batch fetch by Samsara place ids via `placeIds
|
|
3689
|
+
* Returns places for the authorized organization. Supports cursor pagination or batch fetch by Samsara place ids via `placeIds` or by external ids via `externalIds` (mutually exclusive).
|
|
3690
3690
|
*
|
|
3691
3691
|
* <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>).
|
|
3692
3692
|
*
|
|
@@ -3948,7 +3948,7 @@ class BetaApIsClient {
|
|
|
3948
3948
|
});
|
|
3949
3949
|
}
|
|
3950
3950
|
/**
|
|
3951
|
-
* Updates a place.
|
|
3951
|
+
* Updates a place. Provide exactly one of query parameter `placeId` (Samsara id) or `externalId` (key:value). Only fields present in the JSON body are changed; omit a field to leave it unchanged.
|
|
3952
3952
|
*
|
|
3953
3953
|
* <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
|
|
3954
3954
|
*
|
|
@@ -3971,15 +3971,13 @@ class BetaApIsClient {
|
|
|
3971
3971
|
* @throws {@link Samsara.GatewayTimeoutError}
|
|
3972
3972
|
*
|
|
3973
3973
|
* @example
|
|
3974
|
-
* await client.betaApIs.patchPlace(
|
|
3975
|
-
* placeId: 1000000
|
|
3976
|
-
* })
|
|
3974
|
+
* await client.betaApIs.patchPlace()
|
|
3977
3975
|
*/
|
|
3978
|
-
patchPlace(request, requestOptions) {
|
|
3976
|
+
patchPlace(request = {}, requestOptions) {
|
|
3979
3977
|
return core.HttpResponsePromise.fromPromise(this.__patchPlace(request, requestOptions));
|
|
3980
3978
|
}
|
|
3981
|
-
__patchPlace(
|
|
3982
|
-
return __awaiter(this,
|
|
3979
|
+
__patchPlace() {
|
|
3980
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
3983
3981
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
3984
3982
|
const { placeId, externalId } = request, _body = __rest(request, ["placeId", "externalId"]);
|
|
3985
3983
|
const _queryParams = {
|
|
@@ -5202,7 +5200,33 @@ class BetaApIsClient {
|
|
|
5202
5200
|
/**
|
|
5203
5201
|
* Ingest new readings. This endpoint allows the ingestion of batches of readings.
|
|
5204
5202
|
*
|
|
5205
|
-
* Ingesting readings is only supported for assets created using the POST /assets API endpoint with readingsIngestionEnabled set to true. To see a full list of readings available for ingestion use the GET readings definitions API.
|
|
5203
|
+
* Ingesting readings is only supported for assets created using the POST /assets API endpoint with readingsIngestionEnabled set to true. To see a full list of readings available for ingestion use the GET readings definitions API.
|
|
5204
|
+
*
|
|
5205
|
+
*
|
|
5206
|
+
* Readings that currently support ingestion (by category):
|
|
5207
|
+
*
|
|
5208
|
+
*
|
|
5209
|
+
* <details>
|
|
5210
|
+
* <summary><strong>ingestible</strong></summary>
|
|
5211
|
+
*
|
|
5212
|
+
* * `batteryVoltage`
|
|
5213
|
+
* * `coolantTemp`
|
|
5214
|
+
* * `ecuFuelLevelMillipercent`
|
|
5215
|
+
* * `engineHours`
|
|
5216
|
+
* * `engineRpm`
|
|
5217
|
+
* * `engineState` (values: off | running | idling)
|
|
5218
|
+
* * `faultCodesJ1939`
|
|
5219
|
+
* * `faultCodesOBDII`
|
|
5220
|
+
* * `fuelLevelPerc`
|
|
5221
|
+
* * `location`
|
|
5222
|
+
* * `odometerEcu`
|
|
5223
|
+
* * `oilPressure`
|
|
5224
|
+
*
|
|
5225
|
+
* </details>
|
|
5226
|
+
*
|
|
5227
|
+
* **Note:** Use the `GET /readings/definitions` endpoint and check the `ingestionEnabled` field for the authoritative, up-to-date set of ingestible readings for your organization.
|
|
5228
|
+
*
|
|
5229
|
+
* When ingesting location data, the readingID 'location' must be used and the value object must contain at least the following fields: 'speed', 'latitude', 'longitude'.
|
|
5206
5230
|
*
|
|
5207
5231
|
* Related guide: [Readings](https://developers.samsara.com/docs/readings).
|
|
5208
5232
|
*
|
|
@@ -7,9 +7,9 @@ export interface GetPlacesRequest {
|
|
|
7
7
|
after?: string;
|
|
8
8
|
/** The limit for how many objects will be in the response. Default and max for this value is 512 objects. */
|
|
9
9
|
limit?: number;
|
|
10
|
-
/** Comma-separated Samsara place IDs for batch lookup (max 100). When set, list filters and cursor pagination are ignored.
|
|
10
|
+
/** Comma-separated Samsara place IDs for batch lookup (max 100). When set, list filters and cursor pagination are ignored. Mutually exclusive with `externalIds`. */
|
|
11
11
|
placeIds?: string;
|
|
12
|
-
/**
|
|
12
|
+
/** Comma-separated external ID tokens (`key:value`) for batch lookup (max 100). When set, list filters and cursor pagination are ignored. Mutually exclusive with `placeIds`. */
|
|
13
13
|
externalIds?: string;
|
|
14
14
|
/** When true, expands tag objects on each place. Defaults to false. */
|
|
15
15
|
includeTags?: boolean;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import type * as Samsara from "../../../../index.js";
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
|
-
* {
|
|
5
|
-
* placeId: 1000000
|
|
6
|
-
* }
|
|
4
|
+
* {}
|
|
7
5
|
*/
|
|
8
6
|
export interface PlacesPatchPlaceRequestBody {
|
|
9
|
-
/** Samsara place id to update
|
|
10
|
-
placeId
|
|
11
|
-
/** External id token in `key:value` form (e.g. crmId:warehouse-east). Mutually exclusive with `placeId
|
|
7
|
+
/** Samsara place id to update. Mutually exclusive with `externalId`; provide exactly one. */
|
|
8
|
+
placeId?: number;
|
|
9
|
+
/** External id token in `key:value` form (e.g. crmId:warehouse-east). Mutually exclusive with `placeId`; provide exactly one. */
|
|
12
10
|
externalId?: string;
|
|
13
11
|
/** Single-line address string. */
|
|
14
12
|
address?: string;
|
|
@@ -21,6 +19,8 @@ export interface PlacesPatchPlaceRequestBody {
|
|
|
21
19
|
hubLocations?: Samsara.PatchPlaceHubLocationsBodyRequestBody;
|
|
22
20
|
/** When present, replaces IFTA exemption types for the place. */
|
|
23
21
|
iftaExemptionTypes?: string[];
|
|
22
|
+
/** When true, show addresses inside the geofence on the map. */
|
|
23
|
+
isShowAddressesEnabled?: boolean;
|
|
24
24
|
/** Center latitude when switching to or editing a circle geofence. */
|
|
25
25
|
latitude?: number;
|
|
26
26
|
/** Center longitude when switching to or editing a circle geofence. */
|
|
@@ -30,7 +30,7 @@ export interface PlacesPatchPlaceRequestBody {
|
|
|
30
30
|
navigation?: Samsara.PostPlaceNavigationInputRequestBody;
|
|
31
31
|
/** Notes. */
|
|
32
32
|
notes?: string;
|
|
33
|
-
/**
|
|
33
|
+
/** When present, replaces address-type categories via address metadata. Metadata-derived types (hubLocation, navigation, iftaExemption) must match hubLocations, navigation, and IFTA metadata after this request; conflicting combinations return InvalidArgument. */
|
|
34
34
|
placeTypes?: string[];
|
|
35
35
|
/** Circle radius in meters; use with latitude and longitude. */
|
|
36
36
|
radiusMeters?: number;
|
|
@@ -19,6 +19,8 @@ export interface PlacesPostPlaceRequestBody {
|
|
|
19
19
|
hubLocations?: Samsara.PatchPlaceHubLocationUpsertBodyRequestBody[];
|
|
20
20
|
/** IFTA exemption types for this place. */
|
|
21
21
|
iftaExemptionTypes?: string[];
|
|
22
|
+
/** When true, show addresses inside the geofence on the map. */
|
|
23
|
+
isShowAddressesEnabled?: boolean;
|
|
22
24
|
/** Center latitude when using a circle geofence with radiusMeters. */
|
|
23
25
|
latitude?: number;
|
|
24
26
|
/** Center longitude when using a circle geofence with radiusMeters. */
|
|
@@ -28,7 +30,7 @@ export interface PlacesPostPlaceRequestBody {
|
|
|
28
30
|
navigation?: Samsara.PostPlaceNavigationInputRequestBody;
|
|
29
31
|
/** Optional notes. */
|
|
30
32
|
notes?: string;
|
|
31
|
-
/**
|
|
33
|
+
/** When present, replaces address-type categories via address metadata. Metadata-derived types (hubLocation, navigation, iftaExemption) must match hubLocations, navigation, and existing IFTA metadata in the same request; conflicting combinations return InvalidArgument. */
|
|
32
34
|
placeTypes?: string[];
|
|
33
35
|
/** Circle radius in meters; requires latitude and longitude. Must be at least 1 when set. */
|
|
34
36
|
radiusMeters?: number;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as Samsara from "../index.js";
|
|
1
2
|
/**
|
|
2
3
|
* Hub location upsert entry for PATCH /places.
|
|
3
4
|
*/
|
|
@@ -16,4 +17,14 @@ export interface PatchPlaceHubLocationUpsertBodyRequestBody {
|
|
|
16
17
|
isIgnoreOrderServiceTimeEnabled?: boolean | undefined;
|
|
17
18
|
/** Stop position preference: unspecified, any, first, or last. */
|
|
18
19
|
locationPositionType?: string | undefined;
|
|
20
|
+
/** Route priority from 1 (lowest) to 5 (highest). */
|
|
21
|
+
locationPriority?: number | undefined;
|
|
22
|
+
orderServiceTime?: Samsara.PlaceHubLocationOrderServiceTimeInputRequestBody | undefined;
|
|
23
|
+
/** Required planner skills for this hub location. */
|
|
24
|
+
requiredSkills?: Samsara.PlaceHubLocationRequiredSkillInputRequestBody[] | undefined;
|
|
25
|
+
serviceTime?: Samsara.PlaceHubLocationServiceTimeInputRequestBody | undefined;
|
|
26
|
+
/** Recurring local-time service windows for this hub location. */
|
|
27
|
+
serviceWindows?: Samsara.PlaceHubLocationServiceWindowInputRequestBody[] | undefined;
|
|
28
|
+
/** Default instructions for drivers at this hub location. */
|
|
29
|
+
standardDriverInstructions?: string | undefined;
|
|
19
30
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-capacity order service time entry for a hub location row.
|
|
3
|
+
*/
|
|
4
|
+
export interface PlaceHubLocationCapacityServiceTimeInputRequestBody {
|
|
5
|
+
/** Capacity UUID. */
|
|
6
|
+
capacityId: string;
|
|
7
|
+
/** Service time in seconds. */
|
|
8
|
+
serviceTimeSeconds: number;
|
|
9
|
+
/** Additional service time per quantity unit. */
|
|
10
|
+
serviceTimeSecondsPerQuantityUnit: number;
|
|
11
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type * as Samsara from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Order service time configuration for a hub location row.
|
|
4
|
+
*/
|
|
5
|
+
export interface PlaceHubLocationOrderServiceTimeInputRequestBody {
|
|
6
|
+
/** Capacity-based service times for variable mode. */
|
|
7
|
+
capacityServiceTimes?: Samsara.PlaceHubLocationCapacityServiceTimeInputRequestBody[] | undefined;
|
|
8
|
+
/** Fixed order service time in seconds when applicable. */
|
|
9
|
+
fixedTimeSeconds?: number | undefined;
|
|
10
|
+
/** Mode: fixed or variable. Valid values: `fixed`, `variable`, `unknown`, `unspecified` */
|
|
11
|
+
modeType: PlaceHubLocationOrderServiceTimeInputRequestBody.ModeType;
|
|
12
|
+
}
|
|
13
|
+
export declare namespace PlaceHubLocationOrderServiceTimeInputRequestBody {
|
|
14
|
+
/** Mode: fixed or variable. Valid values: `fixed`, `variable`, `unknown`, `unspecified` */
|
|
15
|
+
const ModeType: {
|
|
16
|
+
readonly Fixed: "fixed";
|
|
17
|
+
readonly Variable: "variable";
|
|
18
|
+
readonly Unknown: "unknown";
|
|
19
|
+
readonly Unspecified: "unspecified";
|
|
20
|
+
};
|
|
21
|
+
type ModeType = (typeof ModeType)[keyof typeof ModeType];
|
|
22
|
+
}
|
|
@@ -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.PlaceHubLocationOrderServiceTimeInputRequestBody = void 0;
|
|
5
|
+
var PlaceHubLocationOrderServiceTimeInputRequestBody;
|
|
6
|
+
(function (PlaceHubLocationOrderServiceTimeInputRequestBody) {
|
|
7
|
+
/** Mode: fixed or variable. Valid values: `fixed`, `variable`, `unknown`, `unspecified` */
|
|
8
|
+
PlaceHubLocationOrderServiceTimeInputRequestBody.ModeType = {
|
|
9
|
+
Fixed: "fixed",
|
|
10
|
+
Variable: "variable",
|
|
11
|
+
Unknown: "unknown",
|
|
12
|
+
Unspecified: "unspecified",
|
|
13
|
+
};
|
|
14
|
+
})(PlaceHubLocationOrderServiceTimeInputRequestBody || (exports.PlaceHubLocationOrderServiceTimeInputRequestBody = PlaceHubLocationOrderServiceTimeInputRequestBody = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Additional service time configuration for a hub location row.
|
|
3
|
+
*/
|
|
4
|
+
export interface PlaceHubLocationServiceTimeInputRequestBody {
|
|
5
|
+
/** Whole minutes of additional service time. */
|
|
6
|
+
additionalTimeMinutes: number;
|
|
7
|
+
/** Whether additional service time is enabled. */
|
|
8
|
+
isEnabled: boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recurring service window for a place hub location row.
|
|
3
|
+
*/
|
|
4
|
+
export interface PlaceHubLocationServiceWindowInputRequestBody {
|
|
5
|
+
/** Days this window applies. */
|
|
6
|
+
days: string[];
|
|
7
|
+
/** End time as seconds since local midnight. */
|
|
8
|
+
endTime: number;
|
|
9
|
+
/** Start time as seconds since local midnight. */
|
|
10
|
+
startTime: number;
|
|
11
|
+
}
|
|
@@ -1878,6 +1878,11 @@ export * from "./PersonDetectedResponseBody.js";
|
|
|
1878
1878
|
export * from "./PhotoValueObjectRequestBody.js";
|
|
1879
1879
|
export * from "./PhotoValueObjectResponseBody.js";
|
|
1880
1880
|
export * from "./PlaceGeofenceVertexResponseResponseBody.js";
|
|
1881
|
+
export * from "./PlaceHubLocationCapacityServiceTimeInputRequestBody.js";
|
|
1882
|
+
export * from "./PlaceHubLocationOrderServiceTimeInputRequestBody.js";
|
|
1883
|
+
export * from "./PlaceHubLocationRequiredSkillInputRequestBody.js";
|
|
1884
|
+
export * from "./PlaceHubLocationServiceTimeInputRequestBody.js";
|
|
1885
|
+
export * from "./PlaceHubLocationServiceWindowInputRequestBody.js";
|
|
1881
1886
|
export * from "./PlaceNavigationLocationResponseResponseBody.js";
|
|
1882
1887
|
export * from "./PlaceNavigationResponseResponseBody.js";
|
|
1883
1888
|
export * from "./PlaceResponseObjectResponseBody.js";
|
|
@@ -1894,6 +1894,11 @@ __exportStar(require("./PersonDetectedResponseBody.js"), exports);
|
|
|
1894
1894
|
__exportStar(require("./PhotoValueObjectRequestBody.js"), exports);
|
|
1895
1895
|
__exportStar(require("./PhotoValueObjectResponseBody.js"), exports);
|
|
1896
1896
|
__exportStar(require("./PlaceGeofenceVertexResponseResponseBody.js"), exports);
|
|
1897
|
+
__exportStar(require("./PlaceHubLocationCapacityServiceTimeInputRequestBody.js"), exports);
|
|
1898
|
+
__exportStar(require("./PlaceHubLocationOrderServiceTimeInputRequestBody.js"), exports);
|
|
1899
|
+
__exportStar(require("./PlaceHubLocationRequiredSkillInputRequestBody.js"), exports);
|
|
1900
|
+
__exportStar(require("./PlaceHubLocationServiceTimeInputRequestBody.js"), exports);
|
|
1901
|
+
__exportStar(require("./PlaceHubLocationServiceWindowInputRequestBody.js"), exports);
|
|
1897
1902
|
__exportStar(require("./PlaceNavigationLocationResponseResponseBody.js"), exports);
|
|
1898
1903
|
__exportStar(require("./PlaceNavigationResponseResponseBody.js"), exports);
|
|
1899
1904
|
__exportStar(require("./PlaceResponseObjectResponseBody.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "13.
|
|
1
|
+
export declare const SDK_VERSION = "13.8.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -7,8 +7,8 @@ export function normalizeClientOptions(options) {
|
|
|
7
7
|
const headers = mergeHeaders({
|
|
8
8
|
"X-Fern-Language": "JavaScript",
|
|
9
9
|
"X-Fern-SDK-Name": "@samsarahq/samsara",
|
|
10
|
-
"X-Fern-SDK-Version": "13.
|
|
11
|
-
"User-Agent": "@samsarahq/samsara/13.
|
|
10
|
+
"X-Fern-SDK-Version": "13.8.0",
|
|
11
|
+
"User-Agent": "@samsarahq/samsara/13.8.0",
|
|
12
12
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
13
13
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
14
14
|
"X-Samsara-Version": (_a = options === null || options === void 0 ? void 0 : options.version) !== null && _a !== void 0 ? _a : "2025-06-11",
|
|
@@ -1241,7 +1241,7 @@ export declare class BetaApIsClient {
|
|
|
1241
1241
|
deleteHubRouteTemplate(request: Samsara.DeleteHubRouteTemplateRequest, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
1242
1242
|
private __deleteHubRouteTemplate;
|
|
1243
1243
|
/**
|
|
1244
|
-
* Returns places for the authorized organization. Supports cursor pagination or batch fetch by Samsara place ids via `placeIds
|
|
1244
|
+
* Returns places for the authorized organization. Supports cursor pagination or batch fetch by Samsara place ids via `placeIds` or by external ids via `externalIds` (mutually exclusive).
|
|
1245
1245
|
*
|
|
1246
1246
|
* <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>).
|
|
1247
1247
|
*
|
|
@@ -1330,7 +1330,7 @@ export declare class BetaApIsClient {
|
|
|
1330
1330
|
deletePlace(request: Samsara.DeletePlaceRequest, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
1331
1331
|
private __deletePlace;
|
|
1332
1332
|
/**
|
|
1333
|
-
* Updates a place.
|
|
1333
|
+
* Updates a place. Provide exactly one of query parameter `placeId` (Samsara id) or `externalId` (key:value). Only fields present in the JSON body are changed; omit a field to leave it unchanged.
|
|
1334
1334
|
*
|
|
1335
1335
|
* <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
|
|
1336
1336
|
*
|
|
@@ -1353,11 +1353,9 @@ export declare class BetaApIsClient {
|
|
|
1353
1353
|
* @throws {@link Samsara.GatewayTimeoutError}
|
|
1354
1354
|
*
|
|
1355
1355
|
* @example
|
|
1356
|
-
* await client.betaApIs.patchPlace(
|
|
1357
|
-
* placeId: 1000000
|
|
1358
|
-
* })
|
|
1356
|
+
* await client.betaApIs.patchPlace()
|
|
1359
1357
|
*/
|
|
1360
|
-
patchPlace(request
|
|
1358
|
+
patchPlace(request?: Samsara.PlacesPatchPlaceRequestBody, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.PlacesPatchPlaceResponseBody>;
|
|
1361
1359
|
private __patchPlace;
|
|
1362
1360
|
/**
|
|
1363
1361
|
* List all preferred fuel stations for your organization.
|
|
@@ -1774,7 +1772,33 @@ export declare class BetaApIsClient {
|
|
|
1774
1772
|
/**
|
|
1775
1773
|
* Ingest new readings. This endpoint allows the ingestion of batches of readings.
|
|
1776
1774
|
*
|
|
1777
|
-
* Ingesting readings is only supported for assets created using the POST /assets API endpoint with readingsIngestionEnabled set to true. To see a full list of readings available for ingestion use the GET readings definitions API.
|
|
1775
|
+
* Ingesting readings is only supported for assets created using the POST /assets API endpoint with readingsIngestionEnabled set to true. To see a full list of readings available for ingestion use the GET readings definitions API.
|
|
1776
|
+
*
|
|
1777
|
+
*
|
|
1778
|
+
* Readings that currently support ingestion (by category):
|
|
1779
|
+
*
|
|
1780
|
+
*
|
|
1781
|
+
* <details>
|
|
1782
|
+
* <summary><strong>ingestible</strong></summary>
|
|
1783
|
+
*
|
|
1784
|
+
* * `batteryVoltage`
|
|
1785
|
+
* * `coolantTemp`
|
|
1786
|
+
* * `ecuFuelLevelMillipercent`
|
|
1787
|
+
* * `engineHours`
|
|
1788
|
+
* * `engineRpm`
|
|
1789
|
+
* * `engineState` (values: off | running | idling)
|
|
1790
|
+
* * `faultCodesJ1939`
|
|
1791
|
+
* * `faultCodesOBDII`
|
|
1792
|
+
* * `fuelLevelPerc`
|
|
1793
|
+
* * `location`
|
|
1794
|
+
* * `odometerEcu`
|
|
1795
|
+
* * `oilPressure`
|
|
1796
|
+
*
|
|
1797
|
+
* </details>
|
|
1798
|
+
*
|
|
1799
|
+
* **Note:** Use the `GET /readings/definitions` endpoint and check the `ingestionEnabled` field for the authoritative, up-to-date set of ingestible readings for your organization.
|
|
1800
|
+
*
|
|
1801
|
+
* When ingesting location data, the readingID 'location' must be used and the value object must contain at least the following fields: 'speed', 'latitude', 'longitude'.
|
|
1778
1802
|
*
|
|
1779
1803
|
* Related guide: [Readings](https://developers.samsara.com/docs/readings).
|
|
1780
1804
|
*
|
|
@@ -3650,7 +3650,7 @@ export class BetaApIsClient {
|
|
|
3650
3650
|
});
|
|
3651
3651
|
}
|
|
3652
3652
|
/**
|
|
3653
|
-
* Returns places for the authorized organization. Supports cursor pagination or batch fetch by Samsara place ids via `placeIds
|
|
3653
|
+
* Returns places for the authorized organization. Supports cursor pagination or batch fetch by Samsara place ids via `placeIds` or by external ids via `externalIds` (mutually exclusive).
|
|
3654
3654
|
*
|
|
3655
3655
|
* <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>).
|
|
3656
3656
|
*
|
|
@@ -3912,7 +3912,7 @@ export class BetaApIsClient {
|
|
|
3912
3912
|
});
|
|
3913
3913
|
}
|
|
3914
3914
|
/**
|
|
3915
|
-
* Updates a place.
|
|
3915
|
+
* Updates a place. Provide exactly one of query parameter `placeId` (Samsara id) or `externalId` (key:value). Only fields present in the JSON body are changed; omit a field to leave it unchanged.
|
|
3916
3916
|
*
|
|
3917
3917
|
* <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
|
|
3918
3918
|
*
|
|
@@ -3935,15 +3935,13 @@ export class BetaApIsClient {
|
|
|
3935
3935
|
* @throws {@link Samsara.GatewayTimeoutError}
|
|
3936
3936
|
*
|
|
3937
3937
|
* @example
|
|
3938
|
-
* await client.betaApIs.patchPlace(
|
|
3939
|
-
* placeId: 1000000
|
|
3940
|
-
* })
|
|
3938
|
+
* await client.betaApIs.patchPlace()
|
|
3941
3939
|
*/
|
|
3942
|
-
patchPlace(request, requestOptions) {
|
|
3940
|
+
patchPlace(request = {}, requestOptions) {
|
|
3943
3941
|
return core.HttpResponsePromise.fromPromise(this.__patchPlace(request, requestOptions));
|
|
3944
3942
|
}
|
|
3945
|
-
__patchPlace(
|
|
3946
|
-
return __awaiter(this,
|
|
3943
|
+
__patchPlace() {
|
|
3944
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
3947
3945
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
3948
3946
|
const { placeId, externalId } = request, _body = __rest(request, ["placeId", "externalId"]);
|
|
3949
3947
|
const _queryParams = {
|
|
@@ -5166,7 +5164,33 @@ export class BetaApIsClient {
|
|
|
5166
5164
|
/**
|
|
5167
5165
|
* Ingest new readings. This endpoint allows the ingestion of batches of readings.
|
|
5168
5166
|
*
|
|
5169
|
-
* Ingesting readings is only supported for assets created using the POST /assets API endpoint with readingsIngestionEnabled set to true. To see a full list of readings available for ingestion use the GET readings definitions API.
|
|
5167
|
+
* Ingesting readings is only supported for assets created using the POST /assets API endpoint with readingsIngestionEnabled set to true. To see a full list of readings available for ingestion use the GET readings definitions API.
|
|
5168
|
+
*
|
|
5169
|
+
*
|
|
5170
|
+
* Readings that currently support ingestion (by category):
|
|
5171
|
+
*
|
|
5172
|
+
*
|
|
5173
|
+
* <details>
|
|
5174
|
+
* <summary><strong>ingestible</strong></summary>
|
|
5175
|
+
*
|
|
5176
|
+
* * `batteryVoltage`
|
|
5177
|
+
* * `coolantTemp`
|
|
5178
|
+
* * `ecuFuelLevelMillipercent`
|
|
5179
|
+
* * `engineHours`
|
|
5180
|
+
* * `engineRpm`
|
|
5181
|
+
* * `engineState` (values: off | running | idling)
|
|
5182
|
+
* * `faultCodesJ1939`
|
|
5183
|
+
* * `faultCodesOBDII`
|
|
5184
|
+
* * `fuelLevelPerc`
|
|
5185
|
+
* * `location`
|
|
5186
|
+
* * `odometerEcu`
|
|
5187
|
+
* * `oilPressure`
|
|
5188
|
+
*
|
|
5189
|
+
* </details>
|
|
5190
|
+
*
|
|
5191
|
+
* **Note:** Use the `GET /readings/definitions` endpoint and check the `ingestionEnabled` field for the authoritative, up-to-date set of ingestible readings for your organization.
|
|
5192
|
+
*
|
|
5193
|
+
* When ingesting location data, the readingID 'location' must be used and the value object must contain at least the following fields: 'speed', 'latitude', 'longitude'.
|
|
5170
5194
|
*
|
|
5171
5195
|
* Related guide: [Readings](https://developers.samsara.com/docs/readings).
|
|
5172
5196
|
*
|
|
@@ -7,9 +7,9 @@ export interface GetPlacesRequest {
|
|
|
7
7
|
after?: string;
|
|
8
8
|
/** The limit for how many objects will be in the response. Default and max for this value is 512 objects. */
|
|
9
9
|
limit?: number;
|
|
10
|
-
/** Comma-separated Samsara place IDs for batch lookup (max 100). When set, list filters and cursor pagination are ignored.
|
|
10
|
+
/** Comma-separated Samsara place IDs for batch lookup (max 100). When set, list filters and cursor pagination are ignored. Mutually exclusive with `externalIds`. */
|
|
11
11
|
placeIds?: string;
|
|
12
|
-
/**
|
|
12
|
+
/** Comma-separated external ID tokens (`key:value`) for batch lookup (max 100). When set, list filters and cursor pagination are ignored. Mutually exclusive with `placeIds`. */
|
|
13
13
|
externalIds?: string;
|
|
14
14
|
/** When true, expands tag objects on each place. Defaults to false. */
|
|
15
15
|
includeTags?: boolean;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import type * as Samsara from "../../../../index.mjs";
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
|
-
* {
|
|
5
|
-
* placeId: 1000000
|
|
6
|
-
* }
|
|
4
|
+
* {}
|
|
7
5
|
*/
|
|
8
6
|
export interface PlacesPatchPlaceRequestBody {
|
|
9
|
-
/** Samsara place id to update
|
|
10
|
-
placeId
|
|
11
|
-
/** External id token in `key:value` form (e.g. crmId:warehouse-east). Mutually exclusive with `placeId
|
|
7
|
+
/** Samsara place id to update. Mutually exclusive with `externalId`; provide exactly one. */
|
|
8
|
+
placeId?: number;
|
|
9
|
+
/** External id token in `key:value` form (e.g. crmId:warehouse-east). Mutually exclusive with `placeId`; provide exactly one. */
|
|
12
10
|
externalId?: string;
|
|
13
11
|
/** Single-line address string. */
|
|
14
12
|
address?: string;
|
|
@@ -21,6 +19,8 @@ export interface PlacesPatchPlaceRequestBody {
|
|
|
21
19
|
hubLocations?: Samsara.PatchPlaceHubLocationsBodyRequestBody;
|
|
22
20
|
/** When present, replaces IFTA exemption types for the place. */
|
|
23
21
|
iftaExemptionTypes?: string[];
|
|
22
|
+
/** When true, show addresses inside the geofence on the map. */
|
|
23
|
+
isShowAddressesEnabled?: boolean;
|
|
24
24
|
/** Center latitude when switching to or editing a circle geofence. */
|
|
25
25
|
latitude?: number;
|
|
26
26
|
/** Center longitude when switching to or editing a circle geofence. */
|
|
@@ -30,7 +30,7 @@ export interface PlacesPatchPlaceRequestBody {
|
|
|
30
30
|
navigation?: Samsara.PostPlaceNavigationInputRequestBody;
|
|
31
31
|
/** Notes. */
|
|
32
32
|
notes?: string;
|
|
33
|
-
/**
|
|
33
|
+
/** When present, replaces address-type categories via address metadata. Metadata-derived types (hubLocation, navigation, iftaExemption) must match hubLocations, navigation, and IFTA metadata after this request; conflicting combinations return InvalidArgument. */
|
|
34
34
|
placeTypes?: string[];
|
|
35
35
|
/** Circle radius in meters; use with latitude and longitude. */
|
|
36
36
|
radiusMeters?: number;
|
|
@@ -19,6 +19,8 @@ export interface PlacesPostPlaceRequestBody {
|
|
|
19
19
|
hubLocations?: Samsara.PatchPlaceHubLocationUpsertBodyRequestBody[];
|
|
20
20
|
/** IFTA exemption types for this place. */
|
|
21
21
|
iftaExemptionTypes?: string[];
|
|
22
|
+
/** When true, show addresses inside the geofence on the map. */
|
|
23
|
+
isShowAddressesEnabled?: boolean;
|
|
22
24
|
/** Center latitude when using a circle geofence with radiusMeters. */
|
|
23
25
|
latitude?: number;
|
|
24
26
|
/** Center longitude when using a circle geofence with radiusMeters. */
|
|
@@ -28,7 +30,7 @@ export interface PlacesPostPlaceRequestBody {
|
|
|
28
30
|
navigation?: Samsara.PostPlaceNavigationInputRequestBody;
|
|
29
31
|
/** Optional notes. */
|
|
30
32
|
notes?: string;
|
|
31
|
-
/**
|
|
33
|
+
/** When present, replaces address-type categories via address metadata. Metadata-derived types (hubLocation, navigation, iftaExemption) must match hubLocations, navigation, and existing IFTA metadata in the same request; conflicting combinations return InvalidArgument. */
|
|
32
34
|
placeTypes?: string[];
|
|
33
35
|
/** Circle radius in meters; requires latitude and longitude. Must be at least 1 when set. */
|
|
34
36
|
radiusMeters?: number;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as Samsara from "../index.mjs";
|
|
1
2
|
/**
|
|
2
3
|
* Hub location upsert entry for PATCH /places.
|
|
3
4
|
*/
|
|
@@ -16,4 +17,14 @@ export interface PatchPlaceHubLocationUpsertBodyRequestBody {
|
|
|
16
17
|
isIgnoreOrderServiceTimeEnabled?: boolean | undefined;
|
|
17
18
|
/** Stop position preference: unspecified, any, first, or last. */
|
|
18
19
|
locationPositionType?: string | undefined;
|
|
20
|
+
/** Route priority from 1 (lowest) to 5 (highest). */
|
|
21
|
+
locationPriority?: number | undefined;
|
|
22
|
+
orderServiceTime?: Samsara.PlaceHubLocationOrderServiceTimeInputRequestBody | undefined;
|
|
23
|
+
/** Required planner skills for this hub location. */
|
|
24
|
+
requiredSkills?: Samsara.PlaceHubLocationRequiredSkillInputRequestBody[] | undefined;
|
|
25
|
+
serviceTime?: Samsara.PlaceHubLocationServiceTimeInputRequestBody | undefined;
|
|
26
|
+
/** Recurring local-time service windows for this hub location. */
|
|
27
|
+
serviceWindows?: Samsara.PlaceHubLocationServiceWindowInputRequestBody[] | undefined;
|
|
28
|
+
/** Default instructions for drivers at this hub location. */
|
|
29
|
+
standardDriverInstructions?: string | undefined;
|
|
19
30
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-capacity order service time entry for a hub location row.
|
|
3
|
+
*/
|
|
4
|
+
export interface PlaceHubLocationCapacityServiceTimeInputRequestBody {
|
|
5
|
+
/** Capacity UUID. */
|
|
6
|
+
capacityId: string;
|
|
7
|
+
/** Service time in seconds. */
|
|
8
|
+
serviceTimeSeconds: number;
|
|
9
|
+
/** Additional service time per quantity unit. */
|
|
10
|
+
serviceTimeSecondsPerQuantityUnit: number;
|
|
11
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type * as Samsara from "../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Order service time configuration for a hub location row.
|
|
4
|
+
*/
|
|
5
|
+
export interface PlaceHubLocationOrderServiceTimeInputRequestBody {
|
|
6
|
+
/** Capacity-based service times for variable mode. */
|
|
7
|
+
capacityServiceTimes?: Samsara.PlaceHubLocationCapacityServiceTimeInputRequestBody[] | undefined;
|
|
8
|
+
/** Fixed order service time in seconds when applicable. */
|
|
9
|
+
fixedTimeSeconds?: number | undefined;
|
|
10
|
+
/** Mode: fixed or variable. Valid values: `fixed`, `variable`, `unknown`, `unspecified` */
|
|
11
|
+
modeType: PlaceHubLocationOrderServiceTimeInputRequestBody.ModeType;
|
|
12
|
+
}
|
|
13
|
+
export declare namespace PlaceHubLocationOrderServiceTimeInputRequestBody {
|
|
14
|
+
/** Mode: fixed or variable. Valid values: `fixed`, `variable`, `unknown`, `unspecified` */
|
|
15
|
+
const ModeType: {
|
|
16
|
+
readonly Fixed: "fixed";
|
|
17
|
+
readonly Variable: "variable";
|
|
18
|
+
readonly Unknown: "unknown";
|
|
19
|
+
readonly Unspecified: "unspecified";
|
|
20
|
+
};
|
|
21
|
+
type ModeType = (typeof ModeType)[keyof typeof ModeType];
|
|
22
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
export var PlaceHubLocationOrderServiceTimeInputRequestBody;
|
|
3
|
+
(function (PlaceHubLocationOrderServiceTimeInputRequestBody) {
|
|
4
|
+
/** Mode: fixed or variable. Valid values: `fixed`, `variable`, `unknown`, `unspecified` */
|
|
5
|
+
PlaceHubLocationOrderServiceTimeInputRequestBody.ModeType = {
|
|
6
|
+
Fixed: "fixed",
|
|
7
|
+
Variable: "variable",
|
|
8
|
+
Unknown: "unknown",
|
|
9
|
+
Unspecified: "unspecified",
|
|
10
|
+
};
|
|
11
|
+
})(PlaceHubLocationOrderServiceTimeInputRequestBody || (PlaceHubLocationOrderServiceTimeInputRequestBody = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Additional service time configuration for a hub location row.
|
|
3
|
+
*/
|
|
4
|
+
export interface PlaceHubLocationServiceTimeInputRequestBody {
|
|
5
|
+
/** Whole minutes of additional service time. */
|
|
6
|
+
additionalTimeMinutes: number;
|
|
7
|
+
/** Whether additional service time is enabled. */
|
|
8
|
+
isEnabled: boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recurring service window for a place hub location row.
|
|
3
|
+
*/
|
|
4
|
+
export interface PlaceHubLocationServiceWindowInputRequestBody {
|
|
5
|
+
/** Days this window applies. */
|
|
6
|
+
days: string[];
|
|
7
|
+
/** End time as seconds since local midnight. */
|
|
8
|
+
endTime: number;
|
|
9
|
+
/** Start time as seconds since local midnight. */
|
|
10
|
+
startTime: number;
|
|
11
|
+
}
|
|
@@ -1878,6 +1878,11 @@ export * from "./PersonDetectedResponseBody.mjs";
|
|
|
1878
1878
|
export * from "./PhotoValueObjectRequestBody.mjs";
|
|
1879
1879
|
export * from "./PhotoValueObjectResponseBody.mjs";
|
|
1880
1880
|
export * from "./PlaceGeofenceVertexResponseResponseBody.mjs";
|
|
1881
|
+
export * from "./PlaceHubLocationCapacityServiceTimeInputRequestBody.mjs";
|
|
1882
|
+
export * from "./PlaceHubLocationOrderServiceTimeInputRequestBody.mjs";
|
|
1883
|
+
export * from "./PlaceHubLocationRequiredSkillInputRequestBody.mjs";
|
|
1884
|
+
export * from "./PlaceHubLocationServiceTimeInputRequestBody.mjs";
|
|
1885
|
+
export * from "./PlaceHubLocationServiceWindowInputRequestBody.mjs";
|
|
1881
1886
|
export * from "./PlaceNavigationLocationResponseResponseBody.mjs";
|
|
1882
1887
|
export * from "./PlaceNavigationResponseResponseBody.mjs";
|
|
1883
1888
|
export * from "./PlaceResponseObjectResponseBody.mjs";
|
|
@@ -1878,6 +1878,11 @@ export * from "./PersonDetectedResponseBody.mjs";
|
|
|
1878
1878
|
export * from "./PhotoValueObjectRequestBody.mjs";
|
|
1879
1879
|
export * from "./PhotoValueObjectResponseBody.mjs";
|
|
1880
1880
|
export * from "./PlaceGeofenceVertexResponseResponseBody.mjs";
|
|
1881
|
+
export * from "./PlaceHubLocationCapacityServiceTimeInputRequestBody.mjs";
|
|
1882
|
+
export * from "./PlaceHubLocationOrderServiceTimeInputRequestBody.mjs";
|
|
1883
|
+
export * from "./PlaceHubLocationRequiredSkillInputRequestBody.mjs";
|
|
1884
|
+
export * from "./PlaceHubLocationServiceTimeInputRequestBody.mjs";
|
|
1885
|
+
export * from "./PlaceHubLocationServiceWindowInputRequestBody.mjs";
|
|
1881
1886
|
export * from "./PlaceNavigationLocationResponseResponseBody.mjs";
|
|
1882
1887
|
export * from "./PlaceNavigationResponseResponseBody.mjs";
|
|
1883
1888
|
export * from "./PlaceResponseObjectResponseBody.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "13.
|
|
1
|
+
export declare const SDK_VERSION = "13.8.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "13.
|
|
1
|
+
export const SDK_VERSION = "13.8.0";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -4454,7 +4454,7 @@ await client.betaApIs.deleteHubRouteTemplate({
|
|
|
4454
4454
|
<dl>
|
|
4455
4455
|
<dd>
|
|
4456
4456
|
|
|
4457
|
-
Returns places for the authorized organization. Supports cursor pagination or batch fetch by Samsara place ids via `placeIds
|
|
4457
|
+
Returns places for the authorized organization. Supports cursor pagination or batch fetch by Samsara place ids via `placeIds` or by external ids via `externalIds` (mutually exclusive).
|
|
4458
4458
|
|
|
4459
4459
|
<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>).
|
|
4460
4460
|
|
|
@@ -4669,7 +4669,7 @@ await client.betaApIs.deletePlace({
|
|
|
4669
4669
|
<dl>
|
|
4670
4670
|
<dd>
|
|
4671
4671
|
|
|
4672
|
-
Updates a place.
|
|
4672
|
+
Updates a place. Provide exactly one of query parameter `placeId` (Samsara id) or `externalId` (key:value). Only fields present in the JSON body are changed; omit a field to leave it unchanged.
|
|
4673
4673
|
|
|
4674
4674
|
<b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
|
|
4675
4675
|
|
|
@@ -4691,9 +4691,7 @@ To use this endpoint, select **Write Places** under the Places category when cre
|
|
|
4691
4691
|
<dd>
|
|
4692
4692
|
|
|
4693
4693
|
```typescript
|
|
4694
|
-
await client.betaApIs.patchPlace(
|
|
4695
|
-
placeId: 1000000
|
|
4696
|
-
});
|
|
4694
|
+
await client.betaApIs.patchPlace();
|
|
4697
4695
|
|
|
4698
4696
|
```
|
|
4699
4697
|
</dd>
|
|
@@ -5701,7 +5699,33 @@ await client.betaApIs.getQualificationTypes({
|
|
|
5701
5699
|
|
|
5702
5700
|
Ingest new readings. This endpoint allows the ingestion of batches of readings.
|
|
5703
5701
|
|
|
5704
|
-
Ingesting readings is only supported for assets created using the POST /assets API endpoint with readingsIngestionEnabled set to true. To see a full list of readings available for ingestion use the GET readings definitions API.
|
|
5702
|
+
Ingesting readings is only supported for assets created using the POST /assets API endpoint with readingsIngestionEnabled set to true. To see a full list of readings available for ingestion use the GET readings definitions API.
|
|
5703
|
+
|
|
5704
|
+
|
|
5705
|
+
Readings that currently support ingestion (by category):
|
|
5706
|
+
|
|
5707
|
+
|
|
5708
|
+
<details>
|
|
5709
|
+
<summary><strong>ingestible</strong></summary>
|
|
5710
|
+
|
|
5711
|
+
* `batteryVoltage`
|
|
5712
|
+
* `coolantTemp`
|
|
5713
|
+
* `ecuFuelLevelMillipercent`
|
|
5714
|
+
* `engineHours`
|
|
5715
|
+
* `engineRpm`
|
|
5716
|
+
* `engineState` (values: off | running | idling)
|
|
5717
|
+
* `faultCodesJ1939`
|
|
5718
|
+
* `faultCodesOBDII`
|
|
5719
|
+
* `fuelLevelPerc`
|
|
5720
|
+
* `location`
|
|
5721
|
+
* `odometerEcu`
|
|
5722
|
+
* `oilPressure`
|
|
5723
|
+
|
|
5724
|
+
</details>
|
|
5725
|
+
|
|
5726
|
+
**Note:** Use the `GET /readings/definitions` endpoint and check the `ingestionEnabled` field for the authoritative, up-to-date set of ingestible readings for your organization.
|
|
5727
|
+
|
|
5728
|
+
When ingesting location data, the readingID 'location' must be used and the value object must contain at least the following fields: 'speed', 'latitude', 'longitude'.
|
|
5705
5729
|
|
|
5706
5730
|
Related guide: [Readings](https://developers.samsara.com/docs/readings).
|
|
5707
5731
|
|