Skip to content

Commit bf4dfc4

Browse files
authored
Merge pull request #43 from samsarahq/fern-bot/2026-03-09T17-03Z
🌿 Fern Regeneration -- March 9, 2026
2 parents 6dd6f5c + f1ae074 commit bf4dfc4

File tree

56 files changed

+733
-767
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+733
-767
lines changed

.fern/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
"namespaceExport": "Samsara",
77
"generateWireTests": true
88
},
9-
"sdkVersion": "5.11.0"
9+
"sdkVersion": "6.0.1"
1010
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@samsarahq/samsara",
3-
"version": "5.11.0",
3+
"version": "6.0.1",
44
"private": false,
55
"repository": {
66
"type": "git",

reference.md

Lines changed: 77 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -5119,6 +5119,78 @@ await client.betaApIs.getRidershipPassenger({
51195119
</dl>
51205120

51215121

5122+
</dd>
5123+
</dl>
5124+
</details>
5125+
5126+
<details><summary><code>client.betaApIs.<a href="/src/api/resources/betaApIs/client/Client.ts">listRidershipRouteSetups</a>({ ...params }) -> Samsara.RidershipRouteSetupsListRidershipRouteSetupsResponseBody</code></summary>
5127+
<dl>
5128+
<dd>
5129+
5130+
#### 📝 Description
5131+
5132+
<dl>
5133+
<dd>
5134+
5135+
<dl>
5136+
<dd>
5137+
5138+
List all route setups for a ridership account.
5139+
5140+
<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>).
5141+
5142+
To use this endpoint, select **Read Ridership** under the Ridership 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>
5143+
5144+
5145+
**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.
5146+
</dd>
5147+
</dl>
5148+
</dd>
5149+
</dl>
5150+
5151+
#### 🔌 Usage
5152+
5153+
<dl>
5154+
<dd>
5155+
5156+
<dl>
5157+
<dd>
5158+
5159+
```typescript
5160+
await client.betaApIs.listRidershipRouteSetups({
5161+
accountId: "accountId"
5162+
});
5163+
5164+
```
5165+
</dd>
5166+
</dl>
5167+
</dd>
5168+
</dl>
5169+
5170+
#### ⚙️ Parameters
5171+
5172+
<dl>
5173+
<dd>
5174+
5175+
<dl>
5176+
<dd>
5177+
5178+
**request:** `Samsara.ListRidershipRouteSetupsRequest`
5179+
5180+
</dd>
5181+
</dl>
5182+
5183+
<dl>
5184+
<dd>
5185+
5186+
**requestOptions:** `BetaApIsClient.RequestOptions`
5187+
5188+
</dd>
5189+
</dl>
5190+
</dd>
5191+
</dl>
5192+
5193+
51225194
</dd>
51235195
</dl>
51245196
</details>
@@ -5135,7 +5207,7 @@ await client.betaApIs.getRidershipPassenger({
51355207
<dl>
51365208
<dd>
51375209

5138-
Create or replace the passenger assignment setup for a route.
5210+
Create the passenger assignment setup for a route.
51395211

51405212
<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>).
51415213

@@ -17590,7 +17662,7 @@ await client.organizationInfo.getOrganizationInfo();
1759017662
</details>
1759117663

1759217664
## Preview APIs
17593-
<details><summary><code>client.previewApIs.<a href="/src/api/resources/previewApIs/client/Client.ts">listDeviceRecoveryAssets</a>({ ...params }) -> Samsara.DeviceRecoveryListDeviceRecoveryAssetsResponseBody</code></summary>
17665+
<details><summary><code>client.previewApIs.<a href="/src/api/resources/previewApIs/client/Client.ts">listDeviceRecoveryMissingAssets</a>({ ...params }) -> Samsara.DeviceRecoveryListDeviceRecoveryMissingAssetsResponseBody</code></summary>
1759417666
<dl>
1759517667
<dd>
1759617668

@@ -17602,7 +17674,7 @@ await client.organizationInfo.getOrganizationInfo();
1760217674
<dl>
1760317675
<dd>
1760417676

17605-
List all assets that have a device recovery state for the organization. Optionally filter by one or more statuses (UNKNOWN, MISSING, LOCATED, RECOVERED).
17677+
List all assets that are currently marked as missing for the organization.
1760617678

1760717679
<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>).
1760817680

@@ -17630,7 +17702,7 @@ Endpoints in this section are in Preview. These APIs are not functional and are
1763017702
<dd>
1763117703

1763217704
```typescript
17633-
await client.previewApIs.listDeviceRecoveryAssets();
17705+
await client.previewApIs.listDeviceRecoveryMissingAssets();
1763417706

1763517707
```
1763617708
</dd>
@@ -17646,7 +17718,7 @@ await client.previewApIs.listDeviceRecoveryAssets();
1764617718
<dl>
1764717719
<dd>
1764817720

17649-
**request:** `Samsara.ListDeviceRecoveryAssetsRequest`
17721+
**request:** `Samsara.ListDeviceRecoveryMissingAssetsRequest`
1765017722

1765117723
</dd>
1765217724
</dl>
@@ -17821,84 +17893,6 @@ await client.previewApIs.recoverAsset({
1782117893
</dl>
1782217894

1782317895

17824-
</dd>
17825-
</dl>
17826-
</details>
17827-
17828-
<details><summary><code>client.previewApIs.<a href="/src/api/resources/previewApIs/client/Client.ts">getAssetRecoveryState</a>({ ...params }) -> Samsara.DeviceRecoveryGetAssetRecoveryStateResponseBody</code></summary>
17829-
<dl>
17830-
<dd>
17831-
17832-
#### 📝 Description
17833-
17834-
<dl>
17835-
<dd>
17836-
17837-
<dl>
17838-
<dd>
17839-
17840-
Get the current recovery state for a specific asset, including recovery photos and notification recipients.
17841-
17842-
<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>).
17843-
17844-
To use this endpoint, select **Read Assets** under the Assets 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>
17845-
17846-
Endpoints in this section are in Preview. These APIs are not functional and are instead for soliciting feedback from our API users on the intended design of this API. Additionally, it is not guaranteed that we will be releasing an endpoint included in this section to production. This means that developers should **NOT** rely on these APIs to build business critical applications
17847-
17848-
- Samsara may change the structure of a preview API's interface without versioning or any notice to API users.
17849-
17850-
- When an endpoint becomes generally available, it will be announced in the API [changelog](https://developers.samsara.com/changelog).
17851-
17852-
17853-
**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.
17854-
</dd>
17855-
</dl>
17856-
</dd>
17857-
</dl>
17858-
17859-
#### 🔌 Usage
17860-
17861-
<dl>
17862-
<dd>
17863-
17864-
<dl>
17865-
<dd>
17866-
17867-
```typescript
17868-
await client.previewApIs.getAssetRecoveryState({
17869-
id: "id"
17870-
});
17871-
17872-
```
17873-
</dd>
17874-
</dl>
17875-
</dd>
17876-
</dl>
17877-
17878-
#### ⚙️ Parameters
17879-
17880-
<dl>
17881-
<dd>
17882-
17883-
<dl>
17884-
<dd>
17885-
17886-
**request:** `Samsara.GetAssetRecoveryStateRequest`
17887-
17888-
</dd>
17889-
</dl>
17890-
17891-
<dl>
17892-
<dd>
17893-
17894-
**requestOptions:** `PreviewApIsClient.RequestOptions`
17895-
17896-
</dd>
17897-
</dl>
17898-
</dd>
17899-
</dl>
17900-
17901-
1790217896
</dd>
1790317897
</dl>
1790417898
</details>

src/BaseClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ export function normalizeClientOptions<T extends BaseClientOptions = BaseClientO
5555
{
5656
"X-Fern-Language": "JavaScript",
5757
"X-Fern-SDK-Name": "@samsarahq/samsara",
58-
"X-Fern-SDK-Version": "5.11.0",
59-
"User-Agent": "@samsarahq/samsara/5.11.0",
58+
"X-Fern-SDK-Version": "6.0.1",
59+
"User-Agent": "@samsarahq/samsara/6.0.1",
6060
"X-Fern-Runtime": core.RUNTIME.type,
6161
"X-Fern-Runtime-Version": core.RUNTIME.version,
6262
"X-Samsara-Version": options?.version ?? "2025-06-11",

src/api/resources/betaApIs/client/Client.ts

Lines changed: 108 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5456,7 +5456,114 @@ export class BetaApIsClient {
54565456
}
54575457

54585458
/**
5459-
* Create or replace the passenger assignment setup for a route.
5459+
* List all route setups for a ridership account.
5460+
*
5461+
* <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>).
5462+
*
5463+
* To use this endpoint, select **Read Ridership** under the Ridership 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>
5464+
*
5465+
*
5466+
* **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.
5467+
*
5468+
* @param {Samsara.ListRidershipRouteSetupsRequest} request
5469+
* @param {BetaApIsClient.RequestOptions} requestOptions - Request-specific configuration.
5470+
*
5471+
* @throws {@link Samsara.UnauthorizedError}
5472+
* @throws {@link Samsara.NotFoundError}
5473+
* @throws {@link Samsara.MethodNotAllowedError}
5474+
* @throws {@link Samsara.TooManyRequestsError}
5475+
* @throws {@link Samsara.InternalServerError}
5476+
* @throws {@link Samsara.NotImplementedError}
5477+
* @throws {@link Samsara.BadGatewayError}
5478+
* @throws {@link Samsara.ServiceUnavailableError}
5479+
* @throws {@link Samsara.GatewayTimeoutError}
5480+
*
5481+
* @example
5482+
* await client.betaApIs.listRidershipRouteSetups({
5483+
* accountId: "accountId"
5484+
* })
5485+
*/
5486+
public listRidershipRouteSetups(
5487+
request: Samsara.ListRidershipRouteSetupsRequest,
5488+
requestOptions?: BetaApIsClient.RequestOptions,
5489+
): core.HttpResponsePromise<Samsara.RidershipRouteSetupsListRidershipRouteSetupsResponseBody> {
5490+
return core.HttpResponsePromise.fromPromise(this.__listRidershipRouteSetups(request, requestOptions));
5491+
}
5492+
5493+
private async __listRidershipRouteSetups(
5494+
request: Samsara.ListRidershipRouteSetupsRequest,
5495+
requestOptions?: BetaApIsClient.RequestOptions,
5496+
): Promise<core.WithRawResponse<Samsara.RidershipRouteSetupsListRidershipRouteSetupsResponseBody>> {
5497+
const { accountId, after, limit } = request;
5498+
const _queryParams: Record<string, unknown> = {
5499+
accountId,
5500+
after,
5501+
limit,
5502+
};
5503+
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
5504+
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
5505+
_authRequest.headers,
5506+
this._options?.headers,
5507+
mergeOnlyDefinedHeaders({ "X-Samsara-Version": requestOptions?.version }),
5508+
requestOptions?.headers,
5509+
);
5510+
const _response = await core.fetcher({
5511+
url: core.url.join(
5512+
(await core.Supplier.get(this._options.baseUrl)) ??
5513+
(await core.Supplier.get(this._options.environment)) ??
5514+
environments.SamsaraEnvironment.ProductionApi,
5515+
"ridership/route-setups",
5516+
),
5517+
method: "GET",
5518+
headers: _headers,
5519+
queryParameters: { ..._queryParams, ...requestOptions?.queryParams },
5520+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
5521+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
5522+
abortSignal: requestOptions?.abortSignal,
5523+
fetchFn: this._options?.fetch,
5524+
logging: this._options.logging,
5525+
});
5526+
if (_response.ok) {
5527+
return {
5528+
data: _response.body as Samsara.RidershipRouteSetupsListRidershipRouteSetupsResponseBody,
5529+
rawResponse: _response.rawResponse,
5530+
};
5531+
}
5532+
5533+
if (_response.error.reason === "status-code") {
5534+
switch (_response.error.statusCode) {
5535+
case 401:
5536+
throw new Samsara.UnauthorizedError(_response.error.body as unknown, _response.rawResponse);
5537+
case 404:
5538+
throw new Samsara.NotFoundError(_response.error.body as unknown, _response.rawResponse);
5539+
case 405:
5540+
throw new Samsara.MethodNotAllowedError(_response.error.body as unknown, _response.rawResponse);
5541+
case 429:
5542+
throw new Samsara.TooManyRequestsError(_response.error.body as unknown, _response.rawResponse);
5543+
case 500:
5544+
throw new Samsara.InternalServerError(_response.error.body as unknown, _response.rawResponse);
5545+
case 501:
5546+
throw new Samsara.NotImplementedError(_response.error.body as unknown, _response.rawResponse);
5547+
case 502:
5548+
throw new Samsara.BadGatewayError(_response.error.body as unknown, _response.rawResponse);
5549+
case 503:
5550+
throw new Samsara.ServiceUnavailableError(_response.error.body as unknown, _response.rawResponse);
5551+
case 504:
5552+
throw new Samsara.GatewayTimeoutError(_response.error.body as unknown, _response.rawResponse);
5553+
default:
5554+
throw new errors.SamsaraError({
5555+
statusCode: _response.error.statusCode,
5556+
body: _response.error.body,
5557+
rawResponse: _response.rawResponse,
5558+
});
5559+
}
5560+
}
5561+
5562+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/ridership/route-setups");
5563+
}
5564+
5565+
/**
5566+
* Create the passenger assignment setup for a route.
54605567
*
54615568
* <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>).
54625569
*

src/api/resources/betaApIs/client/requests/GetDetectionsRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export interface GetDetectionsRequest {
1111
driverIds?: string | string[];
1212
/** Optional string of comma separated asset IDs. If asset ID is present, events for the specified asset(s) will be returned. Max for this value is 2000 objects. (Example: 281474982859091,281471982957527) */
1313
assetIds?: string | string[];
14-
/** Optional string of comma separated labels to filter behavior labels. Uses OR semantics for filtering. An empty list allows all values. Valid values: `acceleration`, `braking`, `crash`, `drowsy`, `eatingDrinking`, `edgeRailroadCrossingViolation`, `followingDistance`, `forwardCollisionWarning`, `genericDistraction`, `harshTurn`, `heavySpeeding`, `laneDeparture`, `lightSpeeding`, `maxSpeed`, `mobileUsage`, `moderateSpeeding`, `noSeatbelt`, `obstructedCamera`, `passenger`, `policyViolationMask`, `ranRedLight`, `rearCollisionWarning`, `rollingStop`, `rolloverProtection`, `severeSpeeding`, `smoking`, `speeding`, `unsafeParking`, `vehicleInBlindSpotWarning`, `vulnerableRoadUserCollisionWarning`, `yawControl`. (Example: rollingStop,obstructedCamera,noSeatbelt) */
14+
/** Optional string of comma separated labels to filter behavior labels. Uses OR semantics for filtering. An empty list allows all values. Valid values: `acceleration`, `braking`, `crash`, `drowsy`, `eatingDrinking`, `edgeRailroadCrossingViolation`, `followingDistance`, `forwardCollisionWarning`, `genericDistraction`, `harshTurn`, `heavySpeeding`, `laneDeparture`, `lightSpeeding`, `maxSpeed`, `mobileUsage`, `moderateSpeeding`, `noSeatbelt`, `obstructedCamera`, `passenger`, `policyViolationMask`, `ranRedLight`, `rearCollisionWarning`, `reversing`, `rollingStop`, `rolloverProtection`, `severeSpeeding`, `smoking`, `speeding`, `unsafeParking`, `vehicleInBlindSpotWarning`, `vulnerableRoadUserCollisionWarning`, `yawControl`. (Example: rollingStop,obstructedCamera,noSeatbelt) */
1515
detectionBehaviorLabels?: string | string[];
1616
/** Optional string of comma separated reasons to filter detections. Uses OR semantics for filtering. An empty list allows all values. Valid values: `overDailyLimit`, `overHourlyLimit`, `overTripLimit`, `belowConfidenceThreshold`, `belowSeverityThreshold`, `overEventRateLimit`, `geofenceFilter`, `belowNudgeThreshold`, `belowSpeedThreshold`, `nighttimeFilter`, `speedingFilter`, `inCabAlertOnly`, `unknown`. (Example: overDailyLimit,overHourlyLimit,belowConfidenceThreshold) */
1717
inboxFilterReason?: string | string[];

0 commit comments

Comments
 (0)