@samsarahq/samsara 13.11.0 → 13.12.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.
Files changed (80) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +2 -2
  3. package/dist/cjs/Client.js +4 -4
  4. package/dist/cjs/api/resources/alerts/client/Client.d.ts +1 -0
  5. package/dist/cjs/api/resources/alerts/client/Client.js +1 -0
  6. package/dist/cjs/api/resources/betaApIs/client/Client.d.ts +30 -0
  7. package/dist/cjs/api/resources/betaApIs/client/Client.js +95 -0
  8. package/dist/cjs/api/resources/betaApIs/client/requests/GetVoiceSessionsStreamRequest.d.ts +24 -0
  9. package/dist/cjs/api/resources/betaApIs/client/requests/GetVoiceSessionsStreamRequest.js +3 -0
  10. package/dist/cjs/api/resources/betaApIs/client/requests/index.d.ts +1 -0
  11. package/dist/cjs/api/types/AgentStudioVoiceSessionSummaryResponseBody.d.ts +33 -0
  12. package/dist/cjs/api/types/AgentStudioVoiceSessionSummaryResponseBody.js +14 -0
  13. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamBadGatewayErrorResponseBody.d.ts +9 -0
  14. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamBadGatewayErrorResponseBody.js +3 -0
  15. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamGatewayTimeoutErrorResponseBody.d.ts +9 -0
  16. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamGatewayTimeoutErrorResponseBody.js +3 -0
  17. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamInternalServerErrorResponseBody.d.ts +9 -0
  18. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamInternalServerErrorResponseBody.js +3 -0
  19. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamMethodNotAllowedErrorResponseBody.d.ts +9 -0
  20. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamMethodNotAllowedErrorResponseBody.js +3 -0
  21. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamNotFoundErrorResponseBody.d.ts +9 -0
  22. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamNotFoundErrorResponseBody.js +3 -0
  23. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamNotImplementedErrorResponseBody.d.ts +9 -0
  24. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamNotImplementedErrorResponseBody.js +3 -0
  25. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamResponseBody.d.ts +6 -0
  26. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamResponseBody.js +3 -0
  27. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamServiceUnavailableErrorResponseBody.d.ts +9 -0
  28. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamServiceUnavailableErrorResponseBody.js +3 -0
  29. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamTooManyRequestsErrorResponseBody.d.ts +9 -0
  30. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamTooManyRequestsErrorResponseBody.js +3 -0
  31. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamUnauthorizedErrorResponseBody.d.ts +9 -0
  32. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamUnauthorizedErrorResponseBody.js +3 -0
  33. package/dist/cjs/api/types/UploadedMediaObjectResponseBody.d.ts +2 -0
  34. package/dist/cjs/api/types/WorkflowTriggerObjectRequestBody.d.ts +1 -0
  35. package/dist/cjs/api/types/WorkflowTriggerObjectResponseBody.d.ts +1 -0
  36. package/dist/cjs/api/types/index.d.ts +11 -0
  37. package/dist/cjs/api/types/index.js +11 -0
  38. package/dist/cjs/version.d.ts +1 -1
  39. package/dist/cjs/version.js +1 -1
  40. package/dist/esm/BaseClient.mjs +2 -2
  41. package/dist/esm/Client.d.mts +2 -2
  42. package/dist/esm/Client.mjs +4 -4
  43. package/dist/esm/api/resources/alerts/client/Client.d.mts +1 -0
  44. package/dist/esm/api/resources/alerts/client/Client.mjs +1 -0
  45. package/dist/esm/api/resources/betaApIs/client/Client.d.mts +30 -0
  46. package/dist/esm/api/resources/betaApIs/client/Client.mjs +95 -0
  47. package/dist/esm/api/resources/betaApIs/client/requests/GetVoiceSessionsStreamRequest.d.mts +24 -0
  48. package/dist/esm/api/resources/betaApIs/client/requests/GetVoiceSessionsStreamRequest.mjs +2 -0
  49. package/dist/esm/api/resources/betaApIs/client/requests/index.d.mts +1 -0
  50. package/dist/esm/api/types/AgentStudioVoiceSessionSummaryResponseBody.d.mts +33 -0
  51. package/dist/esm/api/types/AgentStudioVoiceSessionSummaryResponseBody.mjs +11 -0
  52. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamBadGatewayErrorResponseBody.d.mts +9 -0
  53. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamBadGatewayErrorResponseBody.mjs +2 -0
  54. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamGatewayTimeoutErrorResponseBody.d.mts +9 -0
  55. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamGatewayTimeoutErrorResponseBody.mjs +2 -0
  56. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamInternalServerErrorResponseBody.d.mts +9 -0
  57. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamInternalServerErrorResponseBody.mjs +2 -0
  58. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamMethodNotAllowedErrorResponseBody.d.mts +9 -0
  59. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamMethodNotAllowedErrorResponseBody.mjs +2 -0
  60. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamNotFoundErrorResponseBody.d.mts +9 -0
  61. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamNotFoundErrorResponseBody.mjs +2 -0
  62. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamNotImplementedErrorResponseBody.d.mts +9 -0
  63. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamNotImplementedErrorResponseBody.mjs +2 -0
  64. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamResponseBody.d.mts +6 -0
  65. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamResponseBody.mjs +2 -0
  66. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamServiceUnavailableErrorResponseBody.d.mts +9 -0
  67. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamServiceUnavailableErrorResponseBody.mjs +2 -0
  68. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamTooManyRequestsErrorResponseBody.d.mts +9 -0
  69. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamTooManyRequestsErrorResponseBody.mjs +2 -0
  70. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamUnauthorizedErrorResponseBody.d.mts +9 -0
  71. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsStreamUnauthorizedErrorResponseBody.mjs +2 -0
  72. package/dist/esm/api/types/UploadedMediaObjectResponseBody.d.mts +2 -0
  73. package/dist/esm/api/types/WorkflowTriggerObjectRequestBody.d.mts +1 -0
  74. package/dist/esm/api/types/WorkflowTriggerObjectResponseBody.d.mts +1 -0
  75. package/dist/esm/api/types/index.d.mts +11 -0
  76. package/dist/esm/api/types/index.mjs +11 -0
  77. package/dist/esm/version.d.mts +1 -1
  78. package/dist/esm/version.mjs +1 -1
  79. package/package.json +1 -1
  80. package/reference.md +932 -859
@@ -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.11.0",
48
- "User-Agent": "@samsarahq/samsara/13.11.0",
47
+ "X-Fern-SDK-Version": "13.12.0",
48
+ "User-Agent": "@samsarahq/samsara/13.12.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",
@@ -65,9 +65,9 @@ export declare namespace SamsaraClient {
65
65
  export declare class SamsaraClient {
66
66
  protected readonly _options: NormalizedClientOptionsWithAuth<SamsaraClient.Options>;
67
67
  protected _addresses: AddressesClient | undefined;
68
+ protected _betaApIs: BetaApIsClient | undefined;
68
69
  protected _alerts: AlertsClient | undefined;
69
70
  protected _assets: AssetsClient | undefined;
70
- protected _betaApIs: BetaApIsClient | undefined;
71
71
  protected _locationAndSpeed: LocationAndSpeedClient | undefined;
72
72
  protected _attributes: AttributesClient | undefined;
73
73
  protected _media: MediaClient | undefined;
@@ -123,9 +123,9 @@ export declare class SamsaraClient {
123
123
  protected _fleet: FleetClient | undefined;
124
124
  constructor(options?: SamsaraClient.Options);
125
125
  get addresses(): AddressesClient;
126
+ get betaApIs(): BetaApIsClient;
126
127
  get alerts(): AlertsClient;
127
128
  get assets(): AssetsClient;
128
- get betaApIs(): BetaApIsClient;
129
129
  get locationAndSpeed(): LocationAndSpeedClient;
130
130
  get attributes(): AttributesClient;
131
131
  get media(): MediaClient;
@@ -68,6 +68,10 @@ class SamsaraClient {
68
68
  var _a;
69
69
  return ((_a = this._addresses) !== null && _a !== void 0 ? _a : (this._addresses = new Client_js_1.AddressesClient(this._options)));
70
70
  }
71
+ get betaApIs() {
72
+ var _a;
73
+ return ((_a = this._betaApIs) !== null && _a !== void 0 ? _a : (this._betaApIs = new Client_js_6.BetaApIsClient(this._options)));
74
+ }
71
75
  get alerts() {
72
76
  var _a;
73
77
  return ((_a = this._alerts) !== null && _a !== void 0 ? _a : (this._alerts = new Client_js_2.AlertsClient(this._options)));
@@ -76,10 +80,6 @@ class SamsaraClient {
76
80
  var _a;
77
81
  return ((_a = this._assets) !== null && _a !== void 0 ? _a : (this._assets = new Client_js_3.AssetsClient(this._options)));
78
82
  }
79
- get betaApIs() {
80
- var _a;
81
- return ((_a = this._betaApIs) !== null && _a !== void 0 ? _a : (this._betaApIs = new Client_js_6.BetaApIsClient(this._options)));
82
- }
83
83
  get locationAndSpeed() {
84
84
  var _a;
85
85
  return ((_a = this._locationAndSpeed) !== null && _a !== void 0 ? _a : (this._locationAndSpeed = new Client_js_30.LocationAndSpeedClient(this._options)));
@@ -59,6 +59,7 @@ export declare class AlertsClient {
59
59
  * Scheduled Date And Time
60
60
  * Training Assignment Due Soon
61
61
  * Training Assignment Past Due
62
+ * Asset assignment past due
62
63
  *
63
64
  * <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>).
64
65
  *
@@ -104,6 +104,7 @@ class AlertsClient {
104
104
  * Scheduled Date And Time
105
105
  * Training Assignment Due Soon
106
106
  * Training Assignment Past Due
107
+ * Asset assignment past due
107
108
  *
108
109
  * <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>).
109
110
  *
@@ -10,6 +10,36 @@ export declare namespace BetaApIsClient {
10
10
  export declare class BetaApIsClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<BetaApIsClient.Options>;
12
12
  constructor(options?: BetaApIsClient.Options);
13
+ /**
14
+ * Returns a paginated stream of voice agent session summaries, filterable by start time, agent, vehicle, driver, and status. Sessions are returned ordered by `happenedAtTime` descending (most recent first). Use this endpoint to discover sessions; pass the returned IDs to GET /agent-studio/voice-sessions to fetch full session details.
15
+ *
16
+ * <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>).
17
+ *
18
+ * To use this endpoint, select **Read Agent Studio Voice Sessions** under the Closed Beta 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>
19
+ *
20
+ *
21
+ * **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.
22
+ *
23
+ * @param {Samsara.GetVoiceSessionsStreamRequest} request
24
+ * @param {BetaApIsClient.RequestOptions} requestOptions - Request-specific configuration.
25
+ *
26
+ * @throws {@link Samsara.UnauthorizedError}
27
+ * @throws {@link Samsara.NotFoundError}
28
+ * @throws {@link Samsara.MethodNotAllowedError}
29
+ * @throws {@link Samsara.TooManyRequestsError}
30
+ * @throws {@link Samsara.InternalServerError}
31
+ * @throws {@link Samsara.NotImplementedError}
32
+ * @throws {@link Samsara.BadGatewayError}
33
+ * @throws {@link Samsara.ServiceUnavailableError}
34
+ * @throws {@link Samsara.GatewayTimeoutError}
35
+ *
36
+ * @example
37
+ * await client.betaApIs.getVoiceSessionsStream({
38
+ * startTime: "startTime"
39
+ * })
40
+ */
41
+ getVoiceSessionsStream(request: Samsara.GetVoiceSessionsStreamRequest, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.AgentStudioVoiceSessionsGetVoiceSessionsStreamResponseBody>;
42
+ private __getVoiceSessionsStream;
13
43
  /**
14
44
  * Returns depreciation and adjustment transactions for assets. Transactions are returned ordered by updatedAt in ascending order (oldest to newest). Use startTime parameter for incremental sync.
15
45
  *
@@ -66,6 +66,101 @@ class BetaApIsClient {
66
66
  constructor(options = {}) {
67
67
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
68
68
  }
69
+ /**
70
+ * Returns a paginated stream of voice agent session summaries, filterable by start time, agent, vehicle, driver, and status. Sessions are returned ordered by `happenedAtTime` descending (most recent first). Use this endpoint to discover sessions; pass the returned IDs to GET /agent-studio/voice-sessions to fetch full session details.
71
+ *
72
+ * <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>).
73
+ *
74
+ * To use this endpoint, select **Read Agent Studio Voice Sessions** under the Closed Beta 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>
75
+ *
76
+ *
77
+ * **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.
78
+ *
79
+ * @param {Samsara.GetVoiceSessionsStreamRequest} request
80
+ * @param {BetaApIsClient.RequestOptions} requestOptions - Request-specific configuration.
81
+ *
82
+ * @throws {@link Samsara.UnauthorizedError}
83
+ * @throws {@link Samsara.NotFoundError}
84
+ * @throws {@link Samsara.MethodNotAllowedError}
85
+ * @throws {@link Samsara.TooManyRequestsError}
86
+ * @throws {@link Samsara.InternalServerError}
87
+ * @throws {@link Samsara.NotImplementedError}
88
+ * @throws {@link Samsara.BadGatewayError}
89
+ * @throws {@link Samsara.ServiceUnavailableError}
90
+ * @throws {@link Samsara.GatewayTimeoutError}
91
+ *
92
+ * @example
93
+ * await client.betaApIs.getVoiceSessionsStream({
94
+ * startTime: "startTime"
95
+ * })
96
+ */
97
+ getVoiceSessionsStream(request, requestOptions) {
98
+ return core.HttpResponsePromise.fromPromise(this.__getVoiceSessionsStream(request, requestOptions));
99
+ }
100
+ __getVoiceSessionsStream(request, requestOptions) {
101
+ return __awaiter(this, void 0, void 0, function* () {
102
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
103
+ const { startTime, endTime, agentIds, vehicleIds, driverIds, sessionStatus, after, limit } = request;
104
+ const _queryParams = {
105
+ startTime,
106
+ endTime,
107
+ agentIds,
108
+ vehicleIds,
109
+ driverIds,
110
+ sessionStatus,
111
+ after,
112
+ limit,
113
+ };
114
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
115
+ 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);
116
+ const _response = yield core.fetcher({
117
+ 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, "agent-studio/voice-sessions/stream"),
118
+ method: "GET",
119
+ headers: _headers,
120
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
121
+ 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,
122
+ 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,
123
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
124
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
125
+ logging: this._options.logging,
126
+ });
127
+ if (_response.ok) {
128
+ return {
129
+ data: _response.body,
130
+ rawResponse: _response.rawResponse,
131
+ };
132
+ }
133
+ if (_response.error.reason === "status-code") {
134
+ switch (_response.error.statusCode) {
135
+ case 401:
136
+ throw new Samsara.UnauthorizedError(_response.error.body, _response.rawResponse);
137
+ case 404:
138
+ throw new Samsara.NotFoundError(_response.error.body, _response.rawResponse);
139
+ case 405:
140
+ throw new Samsara.MethodNotAllowedError(_response.error.body, _response.rawResponse);
141
+ case 429:
142
+ throw new Samsara.TooManyRequestsError(_response.error.body, _response.rawResponse);
143
+ case 500:
144
+ throw new Samsara.InternalServerError(_response.error.body, _response.rawResponse);
145
+ case 501:
146
+ throw new Samsara.NotImplementedError(_response.error.body, _response.rawResponse);
147
+ case 502:
148
+ throw new Samsara.BadGatewayError(_response.error.body, _response.rawResponse);
149
+ case 503:
150
+ throw new Samsara.ServiceUnavailableError(_response.error.body, _response.rawResponse);
151
+ case 504:
152
+ throw new Samsara.GatewayTimeoutError(_response.error.body, _response.rawResponse);
153
+ default:
154
+ throw new errors.SamsaraError({
155
+ statusCode: _response.error.statusCode,
156
+ body: _response.error.body,
157
+ rawResponse: _response.rawResponse,
158
+ });
159
+ }
160
+ }
161
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/agent-studio/voice-sessions/stream");
162
+ });
163
+ }
69
164
  /**
70
165
  * Returns depreciation and adjustment transactions for assets. Transactions are returned ordered by updatedAt in ascending order (oldest to newest). Use startTime parameter for incremental sync.
71
166
  *
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * startTime: "startTime"
5
+ * }
6
+ */
7
+ export interface GetVoiceSessionsStreamRequest {
8
+ /** Lower bound on session start time, in RFC 3339 format. Millisecond precision and timezones are supported. (Examples: 2026-05-19T14:23:11Z, 2026-05-19T14:23:11.455Z, OR 2026-05-19T10:23:11-04:00). */
9
+ startTime: string;
10
+ /** Upper bound on session start time, in RFC 3339 format. Defaults to the current time when omitted. Millisecond precision and timezones are supported. */
11
+ endTime?: string;
12
+ /** Required, comma-separated list of Agent Studio agent IDs to filter sessions on. Up to 100 agent IDs per call. */
13
+ agentIds?: string | string[];
14
+ /** Optional, comma-separated list of vehicle IDs. When set, only sessions whose target device was associated with one of these vehicles are returned. Up to 100 vehicle IDs per call. */
15
+ vehicleIds?: string | string[];
16
+ /** Optional, comma-separated list of driver IDs. When set, only sessions whose target device was associated with one of these drivers are returned. Up to 100 driver IDs per call. */
17
+ driverIds?: string | string[];
18
+ /** Optional, comma-separated list of session statuses to filter on. Valid values: `completed`, `running`, `failed`, `unknown`. Defaults to `completed` when omitted. */
19
+ sessionStatus?: string | string[];
20
+ /** 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. */
21
+ after?: string;
22
+ /** Maximum number of sessions to return. Default 50, max 100. */
23
+ limit?: number;
24
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -42,6 +42,7 @@ export type { GetReportRunDataRequest } from "./GetReportRunDataRequest.js";
42
42
  export type { GetReportRunsRequest } from "./GetReportRunsRequest.js";
43
43
  export type { GetRidershipPassengerRequest } from "./GetRidershipPassengerRequest.js";
44
44
  export type { GetRidershipRouteSetupRequest } from "./GetRidershipRouteSetupRequest.js";
45
+ export type { GetVoiceSessionsStreamRequest } from "./GetVoiceSessionsStreamRequest.js";
45
46
  export type { HosDailyLogsUpdateShippingDocsRequestBody } from "./HosDailyLogsUpdateShippingDocsRequestBody.js";
46
47
  export type { JobsCreateJobRequestBody } from "./JobsCreateJobRequestBody.js";
47
48
  export type { JobsPatchJobRequestBody } from "./JobsPatchJobRequestBody.js";
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Summary of a voice agent session.
3
+ */
4
+ export interface AgentStudioVoiceSessionSummaryResponseBody {
5
+ /** Identifier of the Agent Studio agent that handled the session. */
6
+ agentId: string;
7
+ /** Display name of the agent that handled the session. */
8
+ agentName: string;
9
+ /** Duration of the session, in milliseconds. */
10
+ durationMilliseconds: number;
11
+ /** Time at which the session started, in RFC 3339 format. */
12
+ happenedAtTime: string;
13
+ /** Unique identifier for the voice session. */
14
+ id: string;
15
+ /** Human-readable name of the call recipient (driver name, dashboard user name, or phone number). Empty string when the recipient could not be resolved. */
16
+ recipient: string;
17
+ /** Lifecycle status of the session. Valid values: `completed`, `running`, `failed`, `unknown` */
18
+ sessionStatus: AgentStudioVoiceSessionSummaryResponseBody.SessionStatus;
19
+ /** Human-readable name of the trigger that initiated the session, as configured in Automations. Empty string when no trigger is associated with the session. */
20
+ triggerType: string;
21
+ /** Time at which the session was last updated, in RFC 3339 format. */
22
+ updatedAtTime: string;
23
+ }
24
+ export declare namespace AgentStudioVoiceSessionSummaryResponseBody {
25
+ /** Lifecycle status of the session. Valid values: `completed`, `running`, `failed`, `unknown` */
26
+ const SessionStatus: {
27
+ readonly Completed: "completed";
28
+ readonly Running: "running";
29
+ readonly Failed: "failed";
30
+ readonly Unknown: "unknown";
31
+ };
32
+ type SessionStatus = (typeof SessionStatus)[keyof typeof SessionStatus];
33
+ }
@@ -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.AgentStudioVoiceSessionSummaryResponseBody = void 0;
5
+ var AgentStudioVoiceSessionSummaryResponseBody;
6
+ (function (AgentStudioVoiceSessionSummaryResponseBody) {
7
+ /** Lifecycle status of the session. Valid values: `completed`, `running`, `failed`, `unknown` */
8
+ AgentStudioVoiceSessionSummaryResponseBody.SessionStatus = {
9
+ Completed: "completed",
10
+ Running: "running",
11
+ Failed: "failed",
12
+ Unknown: "unknown",
13
+ };
14
+ })(AgentStudioVoiceSessionSummaryResponseBody || (exports.AgentStudioVoiceSessionSummaryResponseBody = AgentStudioVoiceSessionSummaryResponseBody = {}));
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Bad Gateway
3
+ */
4
+ export interface AgentStudioVoiceSessionsGetVoiceSessionsStreamBadGatewayErrorResponseBody {
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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Gateway timeout
3
+ */
4
+ export interface AgentStudioVoiceSessionsGetVoiceSessionsStreamGatewayTimeoutErrorResponseBody {
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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * An internal server error occurred
3
+ */
4
+ export interface AgentStudioVoiceSessionsGetVoiceSessionsStreamInternalServerErrorResponseBody {
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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Method not allowed
3
+ */
4
+ export interface AgentStudioVoiceSessionsGetVoiceSessionsStreamMethodNotAllowedErrorResponseBody {
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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Resource not found
3
+ */
4
+ export interface AgentStudioVoiceSessionsGetVoiceSessionsStreamNotFoundErrorResponseBody {
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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Requested endpoint is not yet implemented
3
+ */
4
+ export interface AgentStudioVoiceSessionsGetVoiceSessionsStreamNotImplementedErrorResponseBody {
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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import type * as Samsara from "../index.js";
2
+ export interface AgentStudioVoiceSessionsGetVoiceSessionsStreamResponseBody {
3
+ /** Voice session summaries for the requested page. */
4
+ data: Samsara.AgentStudioVoiceSessionSummaryResponseBody[];
5
+ pagination: Samsara.GoaPaginationResponseResponseBody;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Service unavailable
3
+ */
4
+ export interface AgentStudioVoiceSessionsGetVoiceSessionsStreamServiceUnavailableErrorResponseBody {
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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Too many requests
3
+ */
4
+ export interface AgentStudioVoiceSessionsGetVoiceSessionsStreamTooManyRequestsErrorResponseBody {
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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Unauthorized
3
+ */
4
+ export interface AgentStudioVoiceSessionsGetVoiceSessionsStreamUnauthorizedErrorResponseBody {
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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,7 @@
1
1
  import type * as Samsara from "../index.js";
2
2
  export interface UploadedMediaObjectResponseBody {
3
+ /** Serial number of the auxiliary camera that captured this media. Only present for analog inputs from auxiliary camera devices (e.g. Octo-1, Octo-4). Examples: ABDVJ123456789 */
4
+ auxCamSerial?: string | undefined;
3
5
  /** Timestamp, in RFC 3339 format, at which the media item was made available. Examples: 2019-06-13T19:08:25Z, 2019-06-13T19:08:25.455Z, OR 2015-09-15T14:00:12-04:00 */
4
6
  availableAtTime: string;
5
7
  /** Camera role for this media. Valid values: `leftMirrorMount`, `leftSide`, `rightMirrorMount`, `rightSide`, `rearHigh`, `rearBumper`, `inCab`, `front`, `hopper`, `other1`, `other2`, `other3`, `other4`, `leftBev`, `rightBev`, `rearBev`, `frontBev`, `otherBev`, `bevNotUsed` */
@@ -15,6 +15,7 @@ export interface WorkflowTriggerObjectRequestBody {
15
15
  * Sudden Fuel Level Drop = 5035
16
16
  * Training Assignment Due Soon = 8003
17
17
  * Training Assignment Past Due = 8004
18
+ * Asset assignment past due = 8014
18
19
  * Vehicle Speed = 1000
19
20
  * Fuel Level (Percentage) = 1005
20
21
  * Vehicle DEF Level (Percentage) = 1006
@@ -15,6 +15,7 @@ export interface WorkflowTriggerObjectResponseBody {
15
15
  * Sudden Fuel Level Drop = 5035
16
16
  * Training Assignment Due Soon = 8003
17
17
  * Training Assignment Past Due = 8004
18
+ * Asset assignment past due = 8014
18
19
  * Vehicle Speed = 1000
19
20
  * Fuel Level (Percentage) = 1005
20
21
  * Vehicle DEF Level (Percentage) = 1006
@@ -35,6 +35,17 @@ export * from "./AempEquipmentGetAempEquipmentListUnauthorizedErrorResponseBody.
35
35
  export * from "./AempEquipmentWithAdditionalFieldsResponseBody.js";
36
36
  export * from "./AempFleetListResponseBody.js";
37
37
  export * from "./AempLinkResponseBody.js";
38
+ export * from "./AgentStudioVoiceSessionSummaryResponseBody.js";
39
+ export * from "./AgentStudioVoiceSessionsGetVoiceSessionsStreamBadGatewayErrorResponseBody.js";
40
+ export * from "./AgentStudioVoiceSessionsGetVoiceSessionsStreamGatewayTimeoutErrorResponseBody.js";
41
+ export * from "./AgentStudioVoiceSessionsGetVoiceSessionsStreamInternalServerErrorResponseBody.js";
42
+ export * from "./AgentStudioVoiceSessionsGetVoiceSessionsStreamMethodNotAllowedErrorResponseBody.js";
43
+ export * from "./AgentStudioVoiceSessionsGetVoiceSessionsStreamNotFoundErrorResponseBody.js";
44
+ export * from "./AgentStudioVoiceSessionsGetVoiceSessionsStreamNotImplementedErrorResponseBody.js";
45
+ export * from "./AgentStudioVoiceSessionsGetVoiceSessionsStreamResponseBody.js";
46
+ export * from "./AgentStudioVoiceSessionsGetVoiceSessionsStreamServiceUnavailableErrorResponseBody.js";
47
+ export * from "./AgentStudioVoiceSessionsGetVoiceSessionsStreamTooManyRequestsErrorResponseBody.js";
48
+ export * from "./AgentStudioVoiceSessionsGetVoiceSessionsStreamUnauthorizedErrorResponseBody.js";
38
49
  export * from "./AlertObjectAssetResponseBody.js";
39
50
  export * from "./AlertObjectDriverResponseBody.js";
40
51
  export * from "./AlertObjectMachineInputResponseBody.js";
@@ -51,6 +51,17 @@ __exportStar(require("./AempEquipmentGetAempEquipmentListUnauthorizedErrorRespon
51
51
  __exportStar(require("./AempEquipmentWithAdditionalFieldsResponseBody.js"), exports);
52
52
  __exportStar(require("./AempFleetListResponseBody.js"), exports);
53
53
  __exportStar(require("./AempLinkResponseBody.js"), exports);
54
+ __exportStar(require("./AgentStudioVoiceSessionSummaryResponseBody.js"), exports);
55
+ __exportStar(require("./AgentStudioVoiceSessionsGetVoiceSessionsStreamBadGatewayErrorResponseBody.js"), exports);
56
+ __exportStar(require("./AgentStudioVoiceSessionsGetVoiceSessionsStreamGatewayTimeoutErrorResponseBody.js"), exports);
57
+ __exportStar(require("./AgentStudioVoiceSessionsGetVoiceSessionsStreamInternalServerErrorResponseBody.js"), exports);
58
+ __exportStar(require("./AgentStudioVoiceSessionsGetVoiceSessionsStreamMethodNotAllowedErrorResponseBody.js"), exports);
59
+ __exportStar(require("./AgentStudioVoiceSessionsGetVoiceSessionsStreamNotFoundErrorResponseBody.js"), exports);
60
+ __exportStar(require("./AgentStudioVoiceSessionsGetVoiceSessionsStreamNotImplementedErrorResponseBody.js"), exports);
61
+ __exportStar(require("./AgentStudioVoiceSessionsGetVoiceSessionsStreamResponseBody.js"), exports);
62
+ __exportStar(require("./AgentStudioVoiceSessionsGetVoiceSessionsStreamServiceUnavailableErrorResponseBody.js"), exports);
63
+ __exportStar(require("./AgentStudioVoiceSessionsGetVoiceSessionsStreamTooManyRequestsErrorResponseBody.js"), exports);
64
+ __exportStar(require("./AgentStudioVoiceSessionsGetVoiceSessionsStreamUnauthorizedErrorResponseBody.js"), exports);
54
65
  __exportStar(require("./AlertObjectAssetResponseBody.js"), exports);
55
66
  __exportStar(require("./AlertObjectDriverResponseBody.js"), exports);
56
67
  __exportStar(require("./AlertObjectMachineInputResponseBody.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "13.11.0";
1
+ export declare const SDK_VERSION = "13.12.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "13.11.0";
4
+ exports.SDK_VERSION = "13.12.0";
@@ -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.0",
11
- "User-Agent": "@samsarahq/samsara/13.11.0",
10
+ "X-Fern-SDK-Version": "13.12.0",
11
+ "User-Agent": "@samsarahq/samsara/13.12.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",
@@ -65,9 +65,9 @@ export declare namespace SamsaraClient {
65
65
  export declare class SamsaraClient {
66
66
  protected readonly _options: NormalizedClientOptionsWithAuth<SamsaraClient.Options>;
67
67
  protected _addresses: AddressesClient | undefined;
68
+ protected _betaApIs: BetaApIsClient | undefined;
68
69
  protected _alerts: AlertsClient | undefined;
69
70
  protected _assets: AssetsClient | undefined;
70
- protected _betaApIs: BetaApIsClient | undefined;
71
71
  protected _locationAndSpeed: LocationAndSpeedClient | undefined;
72
72
  protected _attributes: AttributesClient | undefined;
73
73
  protected _media: MediaClient | undefined;
@@ -123,9 +123,9 @@ export declare class SamsaraClient {
123
123
  protected _fleet: FleetClient | undefined;
124
124
  constructor(options?: SamsaraClient.Options);
125
125
  get addresses(): AddressesClient;
126
+ get betaApIs(): BetaApIsClient;
126
127
  get alerts(): AlertsClient;
127
128
  get assets(): AssetsClient;
128
- get betaApIs(): BetaApIsClient;
129
129
  get locationAndSpeed(): LocationAndSpeedClient;
130
130
  get attributes(): AttributesClient;
131
131
  get media(): MediaClient;
@@ -65,6 +65,10 @@ export class SamsaraClient {
65
65
  var _a;
66
66
  return ((_a = this._addresses) !== null && _a !== void 0 ? _a : (this._addresses = new AddressesClient(this._options)));
67
67
  }
68
+ get betaApIs() {
69
+ var _a;
70
+ return ((_a = this._betaApIs) !== null && _a !== void 0 ? _a : (this._betaApIs = new BetaApIsClient(this._options)));
71
+ }
68
72
  get alerts() {
69
73
  var _a;
70
74
  return ((_a = this._alerts) !== null && _a !== void 0 ? _a : (this._alerts = new AlertsClient(this._options)));
@@ -73,10 +77,6 @@ export class SamsaraClient {
73
77
  var _a;
74
78
  return ((_a = this._assets) !== null && _a !== void 0 ? _a : (this._assets = new AssetsClient(this._options)));
75
79
  }
76
- get betaApIs() {
77
- var _a;
78
- return ((_a = this._betaApIs) !== null && _a !== void 0 ? _a : (this._betaApIs = new BetaApIsClient(this._options)));
79
- }
80
80
  get locationAndSpeed() {
81
81
  var _a;
82
82
  return ((_a = this._locationAndSpeed) !== null && _a !== void 0 ? _a : (this._locationAndSpeed = new LocationAndSpeedClient(this._options)));
@@ -59,6 +59,7 @@ export declare class AlertsClient {
59
59
  * Scheduled Date And Time
60
60
  * Training Assignment Due Soon
61
61
  * Training Assignment Past Due
62
+ * Asset assignment past due
62
63
  *
63
64
  * <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>).
64
65
  *
@@ -68,6 +68,7 @@ export class AlertsClient {
68
68
  * Scheduled Date And Time
69
69
  * Training Assignment Due Soon
70
70
  * Training Assignment Past Due
71
+ * Asset assignment past due
71
72
  *
72
73
  * <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>).
73
74
  *