@samsarahq/samsara 13.12.0 → 13.13.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 (96) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/alerts/client/Client.d.ts +1 -1
  3. package/dist/cjs/api/resources/alerts/client/Client.js +1 -1
  4. package/dist/cjs/api/resources/alerts/client/requests/AlertsPostConfigurationsRequestBody.d.ts +1 -1
  5. package/dist/cjs/api/resources/betaApIs/client/Client.d.ts +30 -2
  6. package/dist/cjs/api/resources/betaApIs/client/Client.js +88 -2
  7. package/dist/cjs/api/resources/betaApIs/client/requests/EngineImmobilizerUpdateEngineImmobilizerStateRequestBody.d.ts +1 -1
  8. package/dist/cjs/api/resources/betaApIs/client/requests/GetPlacesRequest.d.ts +1 -1
  9. package/dist/cjs/api/resources/betaApIs/client/requests/GetVoiceSessionsRequest.d.ts +8 -0
  10. package/dist/cjs/api/resources/betaApIs/client/requests/GetVoiceSessionsRequest.js +3 -0
  11. package/dist/cjs/api/resources/betaApIs/client/requests/SafetyEventsV2PatchSafetyEventsV2BatchRequestBody.d.ts +1 -1
  12. package/dist/cjs/api/resources/betaApIs/client/requests/index.d.ts +1 -0
  13. package/dist/cjs/api/resources/media/client/Client.d.ts +1 -1
  14. package/dist/cjs/api/resources/media/client/Client.js +1 -1
  15. package/dist/cjs/api/resources/media/client/requests/MediaRetrievalPostMediaRetrievalRequestBody.d.ts +1 -1
  16. package/dist/cjs/api/types/AgentStudioVoiceSessionCallEventResponseBody.d.ts +9 -0
  17. package/dist/cjs/api/types/AgentStudioVoiceSessionCallEventResponseBody.js +3 -0
  18. package/dist/cjs/api/types/AgentStudioVoiceSessionDetailResponseBody.d.ts +44 -0
  19. package/dist/cjs/api/types/AgentStudioVoiceSessionDetailResponseBody.js +14 -0
  20. package/dist/cjs/api/types/AgentStudioVoiceSessionToolCallResponseBody.d.ts +26 -0
  21. package/dist/cjs/api/types/AgentStudioVoiceSessionToolCallResponseBody.js +13 -0
  22. package/dist/cjs/api/types/AgentStudioVoiceSessionTranscriptEntryResponseBody.d.ts +23 -0
  23. package/dist/cjs/api/types/AgentStudioVoiceSessionTranscriptEntryResponseBody.js +14 -0
  24. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsBadGatewayErrorResponseBody.d.ts +9 -0
  25. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsBadGatewayErrorResponseBody.js +3 -0
  26. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsGatewayTimeoutErrorResponseBody.d.ts +9 -0
  27. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsGatewayTimeoutErrorResponseBody.js +3 -0
  28. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsInternalServerErrorResponseBody.d.ts +9 -0
  29. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsInternalServerErrorResponseBody.js +3 -0
  30. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsMethodNotAllowedErrorResponseBody.d.ts +9 -0
  31. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsMethodNotAllowedErrorResponseBody.js +3 -0
  32. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsNotFoundErrorResponseBody.d.ts +9 -0
  33. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsNotFoundErrorResponseBody.js +3 -0
  34. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsNotImplementedErrorResponseBody.d.ts +9 -0
  35. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsNotImplementedErrorResponseBody.js +3 -0
  36. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsResponseBody.d.ts +5 -0
  37. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsResponseBody.js +3 -0
  38. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsServiceUnavailableErrorResponseBody.d.ts +9 -0
  39. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsServiceUnavailableErrorResponseBody.js +3 -0
  40. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsTooManyRequestsErrorResponseBody.d.ts +9 -0
  41. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsTooManyRequestsErrorResponseBody.js +3 -0
  42. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsUnauthorizedErrorResponseBody.d.ts +9 -0
  43. package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsUnauthorizedErrorResponseBody.js +3 -0
  44. package/dist/cjs/api/types/index.d.ts +14 -0
  45. package/dist/cjs/api/types/index.js +14 -0
  46. package/dist/cjs/version.d.ts +1 -1
  47. package/dist/cjs/version.js +1 -1
  48. package/dist/esm/BaseClient.mjs +2 -2
  49. package/dist/esm/api/resources/alerts/client/Client.d.mts +1 -1
  50. package/dist/esm/api/resources/alerts/client/Client.mjs +1 -1
  51. package/dist/esm/api/resources/alerts/client/requests/AlertsPostConfigurationsRequestBody.d.mts +1 -1
  52. package/dist/esm/api/resources/betaApIs/client/Client.d.mts +30 -2
  53. package/dist/esm/api/resources/betaApIs/client/Client.mjs +88 -2
  54. package/dist/esm/api/resources/betaApIs/client/requests/EngineImmobilizerUpdateEngineImmobilizerStateRequestBody.d.mts +1 -1
  55. package/dist/esm/api/resources/betaApIs/client/requests/GetPlacesRequest.d.mts +1 -1
  56. package/dist/esm/api/resources/betaApIs/client/requests/GetVoiceSessionsRequest.d.mts +8 -0
  57. package/dist/esm/api/resources/betaApIs/client/requests/GetVoiceSessionsRequest.mjs +2 -0
  58. package/dist/esm/api/resources/betaApIs/client/requests/SafetyEventsV2PatchSafetyEventsV2BatchRequestBody.d.mts +1 -1
  59. package/dist/esm/api/resources/betaApIs/client/requests/index.d.mts +1 -0
  60. package/dist/esm/api/resources/media/client/Client.d.mts +1 -1
  61. package/dist/esm/api/resources/media/client/Client.mjs +1 -1
  62. package/dist/esm/api/resources/media/client/requests/MediaRetrievalPostMediaRetrievalRequestBody.d.mts +1 -1
  63. package/dist/esm/api/types/AgentStudioVoiceSessionCallEventResponseBody.d.mts +9 -0
  64. package/dist/esm/api/types/AgentStudioVoiceSessionCallEventResponseBody.mjs +2 -0
  65. package/dist/esm/api/types/AgentStudioVoiceSessionDetailResponseBody.d.mts +44 -0
  66. package/dist/esm/api/types/AgentStudioVoiceSessionDetailResponseBody.mjs +11 -0
  67. package/dist/esm/api/types/AgentStudioVoiceSessionToolCallResponseBody.d.mts +26 -0
  68. package/dist/esm/api/types/AgentStudioVoiceSessionToolCallResponseBody.mjs +10 -0
  69. package/dist/esm/api/types/AgentStudioVoiceSessionTranscriptEntryResponseBody.d.mts +23 -0
  70. package/dist/esm/api/types/AgentStudioVoiceSessionTranscriptEntryResponseBody.mjs +11 -0
  71. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsBadGatewayErrorResponseBody.d.mts +9 -0
  72. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsBadGatewayErrorResponseBody.mjs +2 -0
  73. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsGatewayTimeoutErrorResponseBody.d.mts +9 -0
  74. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsGatewayTimeoutErrorResponseBody.mjs +2 -0
  75. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsInternalServerErrorResponseBody.d.mts +9 -0
  76. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsInternalServerErrorResponseBody.mjs +2 -0
  77. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsMethodNotAllowedErrorResponseBody.d.mts +9 -0
  78. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsMethodNotAllowedErrorResponseBody.mjs +2 -0
  79. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsNotFoundErrorResponseBody.d.mts +9 -0
  80. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsNotFoundErrorResponseBody.mjs +2 -0
  81. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsNotImplementedErrorResponseBody.d.mts +9 -0
  82. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsNotImplementedErrorResponseBody.mjs +2 -0
  83. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsResponseBody.d.mts +5 -0
  84. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsResponseBody.mjs +2 -0
  85. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsServiceUnavailableErrorResponseBody.d.mts +9 -0
  86. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsServiceUnavailableErrorResponseBody.mjs +2 -0
  87. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsTooManyRequestsErrorResponseBody.d.mts +9 -0
  88. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsTooManyRequestsErrorResponseBody.mjs +2 -0
  89. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsUnauthorizedErrorResponseBody.d.mts +9 -0
  90. package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsUnauthorizedErrorResponseBody.mjs +2 -0
  91. package/dist/esm/api/types/index.d.mts +14 -0
  92. package/dist/esm/api/types/index.mjs +14 -0
  93. package/dist/esm/version.d.mts +1 -1
  94. package/dist/esm/version.mjs +1 -1
  95. package/package.json +1 -1
  96. package/reference.md +74 -4
@@ -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.12.0",
48
- "User-Agent": "@samsarahq/samsara/13.12.0",
47
+ "X-Fern-SDK-Version": "13.13.0",
48
+ "User-Agent": "@samsarahq/samsara/13.13.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",
@@ -117,7 +117,7 @@ export declare class AlertsClient {
117
117
  * isEnabled: true,
118
118
  * name: "My Harsh Event Alert",
119
119
  * scope: {
120
- * all: false
120
+ * all: true
121
121
  * },
122
122
  * triggers: [{
123
123
  * triggerTypeId: 1000
@@ -223,7 +223,7 @@ class AlertsClient {
223
223
  * isEnabled: true,
224
224
  * name: "My Harsh Event Alert",
225
225
  * scope: {
226
- * all: false
226
+ * all: true
227
227
  * },
228
228
  * triggers: [{
229
229
  * triggerTypeId: 1000
@@ -8,7 +8,7 @@ import type * as Samsara from "../../../../index.js";
8
8
  * isEnabled: true,
9
9
  * name: "My Harsh Event Alert",
10
10
  * scope: {
11
- * all: false
11
+ * all: true
12
12
  * },
13
13
  * triggers: [{
14
14
  * triggerTypeId: 1000
@@ -10,6 +10,34 @@ 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 full details — including the transcript, tool calls, lifecycle events, and a recording URL — for a batch of voice agent sessions identified by `ids`. Discover session IDs with GET /agent-studio/voice-sessions/stream. Up to 100 IDs may be requested per call; IDs that are not found are omitted from the response.
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.GetVoiceSessionsRequest} 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.getVoiceSessions()
38
+ */
39
+ getVoiceSessions(request?: Samsara.GetVoiceSessionsRequest, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.AgentStudioVoiceSessionsGetVoiceSessionsResponseBody>;
40
+ private __getVoiceSessions;
13
41
  /**
14
42
  * 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
43
  *
@@ -239,7 +267,7 @@ export declare class BetaApIsClient {
239
267
  * id: 1000000,
240
268
  * relayStates: [{
241
269
  * id: "relay1",
242
- * isOpen: false
270
+ * isOpen: true
243
271
  * }]
244
272
  * })
245
273
  */
@@ -2372,7 +2400,7 @@ export declare class BetaApIsClient {
2372
2400
  *
2373
2401
  * @example
2374
2402
  * await client.betaApIs.patchSafetyEventsV2Batch({
2375
- * safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"]
2403
+ * safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"]
2376
2404
  * })
2377
2405
  */
2378
2406
  patchSafetyEventsV2Batch(request: Samsara.SafetyEventsV2PatchSafetyEventsV2BatchRequestBody, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.SafetyEventsV2PatchSafetyEventsV2BatchResponseBody>;
@@ -66,6 +66,92 @@ class BetaApIsClient {
66
66
  constructor(options = {}) {
67
67
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
68
68
  }
69
+ /**
70
+ * Returns full details — including the transcript, tool calls, lifecycle events, and a recording URL — for a batch of voice agent sessions identified by `ids`. Discover session IDs with GET /agent-studio/voice-sessions/stream. Up to 100 IDs may be requested per call; IDs that are not found are omitted from the response.
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.GetVoiceSessionsRequest} 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.getVoiceSessions()
94
+ */
95
+ getVoiceSessions(request = {}, requestOptions) {
96
+ return core.HttpResponsePromise.fromPromise(this.__getVoiceSessions(request, requestOptions));
97
+ }
98
+ __getVoiceSessions() {
99
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
100
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
101
+ const { ids } = request;
102
+ const _queryParams = {
103
+ ids,
104
+ };
105
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
106
+ 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);
107
+ const _response = yield core.fetcher({
108
+ 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"),
109
+ method: "GET",
110
+ headers: _headers,
111
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
112
+ 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,
113
+ 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,
114
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
115
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
116
+ logging: this._options.logging,
117
+ });
118
+ if (_response.ok) {
119
+ return {
120
+ data: _response.body,
121
+ rawResponse: _response.rawResponse,
122
+ };
123
+ }
124
+ if (_response.error.reason === "status-code") {
125
+ switch (_response.error.statusCode) {
126
+ case 401:
127
+ throw new Samsara.UnauthorizedError(_response.error.body, _response.rawResponse);
128
+ case 404:
129
+ throw new Samsara.NotFoundError(_response.error.body, _response.rawResponse);
130
+ case 405:
131
+ throw new Samsara.MethodNotAllowedError(_response.error.body, _response.rawResponse);
132
+ case 429:
133
+ throw new Samsara.TooManyRequestsError(_response.error.body, _response.rawResponse);
134
+ case 500:
135
+ throw new Samsara.InternalServerError(_response.error.body, _response.rawResponse);
136
+ case 501:
137
+ throw new Samsara.NotImplementedError(_response.error.body, _response.rawResponse);
138
+ case 502:
139
+ throw new Samsara.BadGatewayError(_response.error.body, _response.rawResponse);
140
+ case 503:
141
+ throw new Samsara.ServiceUnavailableError(_response.error.body, _response.rawResponse);
142
+ case 504:
143
+ throw new Samsara.GatewayTimeoutError(_response.error.body, _response.rawResponse);
144
+ default:
145
+ throw new errors.SamsaraError({
146
+ statusCode: _response.error.statusCode,
147
+ body: _response.error.body,
148
+ rawResponse: _response.rawResponse,
149
+ });
150
+ }
151
+ }
152
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/agent-studio/voice-sessions");
153
+ });
154
+ }
69
155
  /**
70
156
  * 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
157
  *
@@ -704,7 +790,7 @@ class BetaApIsClient {
704
790
  * id: 1000000,
705
791
  * relayStates: [{
706
792
  * id: "relay1",
707
- * isOpen: false
793
+ * isOpen: true
708
794
  * }]
709
795
  * })
710
796
  */
@@ -6856,7 +6942,7 @@ class BetaApIsClient {
6856
6942
  *
6857
6943
  * @example
6858
6944
  * await client.betaApIs.patchSafetyEventsV2Batch({
6859
- * safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"]
6945
+ * safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"]
6860
6946
  * })
6861
6947
  */
6862
6948
  patchSafetyEventsV2Batch(request, requestOptions) {
@@ -5,7 +5,7 @@ import type * as Samsara from "../../../../index.js";
5
5
  * id: 1000000,
6
6
  * relayStates: [{
7
7
  * id: "relay1",
8
- * isOpen: false
8
+ * isOpen: true
9
9
  * }]
10
10
  * }
11
11
  */
@@ -17,7 +17,7 @@ export interface GetPlacesRequest {
17
17
  includeExternalIds?: boolean;
18
18
  /** Comma-separated numeric tag IDs to filter places. */
19
19
  tagIds?: string;
20
- /** Reserved. Filtering by parent tag IDs is not implemented in this API version. */
20
+ /** Comma-separated parent tag IDs to filter places. Includes places tagged with each parent tag and its descendant tags. */
21
21
  parentTagIds?: string;
22
22
  /** Comma-separated place type tokens (e.g. yard,normalGeofence). */
23
23
  placeTypes?: string;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @example
3
+ * {}
4
+ */
5
+ export interface GetVoiceSessionsRequest {
6
+ /** Required, comma-separated list of voice session IDs to fetch full details for. Up to 100 session IDs per call. IDs that are not found are omitted from the response. */
7
+ ids?: string | string[];
8
+ }
@@ -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 });
@@ -2,7 +2,7 @@ import type * as Samsara from "../../../../index.js";
2
2
  /**
3
3
  * @example
4
4
  * {
5
- * safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"]
5
+ * safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"]
6
6
  * }
7
7
  */
8
8
  export interface SafetyEventsV2PatchSafetyEventsV2BatchRequestBody {
@@ -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 { GetVoiceSessionsRequest } from "./GetVoiceSessionsRequest.js";
45
46
  export type { GetVoiceSessionsStreamRequest } from "./GetVoiceSessionsStreamRequest.js";
46
47
  export type { HosDailyLogsUpdateShippingDocsRequestBody } from "./HosDailyLogsUpdateShippingDocsRequestBody.js";
47
48
  export type { JobsCreateJobRequestBody } from "./JobsCreateJobRequestBody.js";
@@ -98,7 +98,7 @@ export declare class MediaClient {
98
98
  * @example
99
99
  * await client.media.postMediaRetrieval({
100
100
  * endTime: "2019-06-13T19:08:55Z",
101
- * inputs: ["dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing"],
101
+ * inputs: ["dashcamRoadFacing", "dashcamRoadFacing"],
102
102
  * mediaType: "image",
103
103
  * startTime: "2019-06-13T19:08:25Z",
104
104
  * vehicleId: "1234"
@@ -274,7 +274,7 @@ class MediaClient {
274
274
  * @example
275
275
  * await client.media.postMediaRetrieval({
276
276
  * endTime: "2019-06-13T19:08:55Z",
277
- * inputs: ["dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing"],
277
+ * inputs: ["dashcamRoadFacing", "dashcamRoadFacing"],
278
278
  * mediaType: "image",
279
279
  * startTime: "2019-06-13T19:08:25Z",
280
280
  * vehicleId: "1234"
@@ -2,7 +2,7 @@
2
2
  * @example
3
3
  * {
4
4
  * endTime: "2019-06-13T19:08:55Z",
5
- * inputs: ["dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing"],
5
+ * inputs: ["dashcamRoadFacing", "dashcamRoadFacing"],
6
6
  * mediaType: "image",
7
7
  * startTime: "2019-06-13T19:08:25Z",
8
8
  * vehicleId: "1234"
@@ -0,0 +1,9 @@
1
+ /**
2
+ * A lifecycle event that occurred during a voice session.
3
+ */
4
+ export interface AgentStudioVoiceSessionCallEventResponseBody {
5
+ /** Time at which the event occurred, in RFC 3339 format. */
6
+ happenedAtTime: string;
7
+ /** Human-readable description of the lifecycle event. */
8
+ type: 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,44 @@
1
+ import type * as Samsara from "../index.js";
2
+ /**
3
+ * Full detail of a voice agent session.
4
+ */
5
+ export interface AgentStudioVoiceSessionDetailResponseBody {
6
+ /** Identifier of the Agent Studio agent that handled the session. */
7
+ agentId: string;
8
+ /** Display name of the agent that handled the session. */
9
+ agentName: string;
10
+ /** Lifecycle events that occurred during the session, ordered by time ascending. */
11
+ callEvents: Samsara.AgentStudioVoiceSessionCallEventResponseBody[];
12
+ /** Duration of the session, in milliseconds. */
13
+ durationMilliseconds: number;
14
+ /** Time at which the session started, in RFC 3339 format. */
15
+ happenedAtTime: string;
16
+ /** Unique identifier for the voice session. */
17
+ id: string;
18
+ /** Human-readable name of the call recipient (driver name, dashboard user name, or phone number). Empty string when the recipient could not be resolved. */
19
+ recipient: string;
20
+ /** Presigned URL for the call recording. Empty string when no recording is available (e.g. the session has not completed). Expires at recordingUrlExpiresAtTime. */
21
+ recordingUrl: string;
22
+ /** Time at which recordingUrl stops working, in RFC 3339 format. Empty string when recordingUrl is empty. */
23
+ recordingUrlExpiresAtTime: string;
24
+ /** Lifecycle status of the session. Valid values: `completed`, `running`, `failed`, `unknown` */
25
+ sessionStatus: AgentStudioVoiceSessionDetailResponseBody.SessionStatus;
26
+ /** Tool calls made by the agent during the session, ordered by start time ascending. */
27
+ toolCalls: Samsara.AgentStudioVoiceSessionToolCallResponseBody[];
28
+ /** Conversation transcript, ordered by start time ascending. */
29
+ transcript: Samsara.AgentStudioVoiceSessionTranscriptEntryResponseBody[];
30
+ /** Human-readable name of the trigger that initiated the session, as configured in Automations. Empty string when no trigger is associated with the session. */
31
+ triggerType: string;
32
+ /** Time at which the session was last updated, in RFC 3339 format. */
33
+ updatedAtTime: string;
34
+ }
35
+ export declare namespace AgentStudioVoiceSessionDetailResponseBody {
36
+ /** Lifecycle status of the session. Valid values: `completed`, `running`, `failed`, `unknown` */
37
+ const SessionStatus: {
38
+ readonly Completed: "completed";
39
+ readonly Running: "running";
40
+ readonly Failed: "failed";
41
+ readonly Unknown: "unknown";
42
+ };
43
+ type SessionStatus = (typeof SessionStatus)[keyof typeof SessionStatus];
44
+ }
@@ -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.AgentStudioVoiceSessionDetailResponseBody = void 0;
5
+ var AgentStudioVoiceSessionDetailResponseBody;
6
+ (function (AgentStudioVoiceSessionDetailResponseBody) {
7
+ /** Lifecycle status of the session. Valid values: `completed`, `running`, `failed`, `unknown` */
8
+ AgentStudioVoiceSessionDetailResponseBody.SessionStatus = {
9
+ Completed: "completed",
10
+ Running: "running",
11
+ Failed: "failed",
12
+ Unknown: "unknown",
13
+ };
14
+ })(AgentStudioVoiceSessionDetailResponseBody || (exports.AgentStudioVoiceSessionDetailResponseBody = AgentStudioVoiceSessionDetailResponseBody = {}));
@@ -0,0 +1,26 @@
1
+ /**
2
+ * A tool invocation made by the agent during a voice session.
3
+ */
4
+ export interface AgentStudioVoiceSessionToolCallResponseBody {
5
+ /** Arguments passed to the tool, as a JSON-encoded string. */
6
+ arguments: string;
7
+ /** Wall-clock duration of the tool call, in milliseconds. Zero when the duration is unknown. */
8
+ durationMilliseconds: number;
9
+ /** Name of the tool that was invoked. */
10
+ name: string;
11
+ /** Output returned by the tool, as a string. Empty when the tool produced no output. */
12
+ output: string;
13
+ /** Offset from the start of the session at which the tool call started, in milliseconds. */
14
+ startMilliseconds: number;
15
+ /** Outcome of the tool call. Defaults to `unknown` when the outcome could not be determined. Valid values: `success`, `error`, `unknown` */
16
+ status: AgentStudioVoiceSessionToolCallResponseBody.Status;
17
+ }
18
+ export declare namespace AgentStudioVoiceSessionToolCallResponseBody {
19
+ /** Outcome of the tool call. Defaults to `unknown` when the outcome could not be determined. Valid values: `success`, `error`, `unknown` */
20
+ const Status: {
21
+ readonly Success: "success";
22
+ readonly Error: "error";
23
+ readonly Unknown: "unknown";
24
+ };
25
+ type Status = (typeof Status)[keyof typeof Status];
26
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.AgentStudioVoiceSessionToolCallResponseBody = void 0;
5
+ var AgentStudioVoiceSessionToolCallResponseBody;
6
+ (function (AgentStudioVoiceSessionToolCallResponseBody) {
7
+ /** Outcome of the tool call. Defaults to `unknown` when the outcome could not be determined. Valid values: `success`, `error`, `unknown` */
8
+ AgentStudioVoiceSessionToolCallResponseBody.Status = {
9
+ Success: "success",
10
+ Error: "error",
11
+ Unknown: "unknown",
12
+ };
13
+ })(AgentStudioVoiceSessionToolCallResponseBody || (exports.AgentStudioVoiceSessionToolCallResponseBody = AgentStudioVoiceSessionToolCallResponseBody = {}));
@@ -0,0 +1,23 @@
1
+ /**
2
+ * A single utterance in a voice session transcript.
3
+ */
4
+ export interface AgentStudioVoiceSessionTranscriptEntryResponseBody {
5
+ /** Offset from the start of the session at which this utterance ended, in milliseconds. Approximated from the start of the next utterance (or the end of the session for the final utterance). */
6
+ endMilliseconds: number;
7
+ /** Who produced this utterance. Defaults to `unknown` when the speaker cannot be confidently classified. Valid values: `agent`, `driver`, `admin`, `unknown` */
8
+ speakerType: AgentStudioVoiceSessionTranscriptEntryResponseBody.SpeakerType;
9
+ /** Offset from the start of the session at which this utterance began, in milliseconds. */
10
+ startMilliseconds: number;
11
+ /** Transcribed text of the utterance. */
12
+ text: string;
13
+ }
14
+ export declare namespace AgentStudioVoiceSessionTranscriptEntryResponseBody {
15
+ /** Who produced this utterance. Defaults to `unknown` when the speaker cannot be confidently classified. Valid values: `agent`, `driver`, `admin`, `unknown` */
16
+ const SpeakerType: {
17
+ readonly Agent: "agent";
18
+ readonly Driver: "driver";
19
+ readonly Admin: "admin";
20
+ readonly Unknown: "unknown";
21
+ };
22
+ type SpeakerType = (typeof SpeakerType)[keyof typeof SpeakerType];
23
+ }
@@ -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.AgentStudioVoiceSessionTranscriptEntryResponseBody = void 0;
5
+ var AgentStudioVoiceSessionTranscriptEntryResponseBody;
6
+ (function (AgentStudioVoiceSessionTranscriptEntryResponseBody) {
7
+ /** Who produced this utterance. Defaults to `unknown` when the speaker cannot be confidently classified. Valid values: `agent`, `driver`, `admin`, `unknown` */
8
+ AgentStudioVoiceSessionTranscriptEntryResponseBody.SpeakerType = {
9
+ Agent: "agent",
10
+ Driver: "driver",
11
+ Admin: "admin",
12
+ Unknown: "unknown",
13
+ };
14
+ })(AgentStudioVoiceSessionTranscriptEntryResponseBody || (exports.AgentStudioVoiceSessionTranscriptEntryResponseBody = AgentStudioVoiceSessionTranscriptEntryResponseBody = {}));
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Bad Gateway
3
+ */
4
+ export interface AgentStudioVoiceSessionsGetVoiceSessionsBadGatewayErrorResponseBody {
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 AgentStudioVoiceSessionsGetVoiceSessionsGatewayTimeoutErrorResponseBody {
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 AgentStudioVoiceSessionsGetVoiceSessionsInternalServerErrorResponseBody {
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 AgentStudioVoiceSessionsGetVoiceSessionsMethodNotAllowedErrorResponseBody {
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 AgentStudioVoiceSessionsGetVoiceSessionsNotFoundErrorResponseBody {
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 AgentStudioVoiceSessionsGetVoiceSessionsNotImplementedErrorResponseBody {
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,5 @@
1
+ import type * as Samsara from "../index.js";
2
+ export interface AgentStudioVoiceSessionsGetVoiceSessionsResponseBody {
3
+ /** Voice session details for the requested IDs. IDs that were not found are omitted. */
4
+ data: Samsara.AgentStudioVoiceSessionDetailResponseBody[];
5
+ }
@@ -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 AgentStudioVoiceSessionsGetVoiceSessionsServiceUnavailableErrorResponseBody {
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 AgentStudioVoiceSessionsGetVoiceSessionsTooManyRequestsErrorResponseBody {
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 AgentStudioVoiceSessionsGetVoiceSessionsUnauthorizedErrorResponseBody {
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 });