@samsarahq/samsara 13.12.1 → 13.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/alerts/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/alerts/client/Client.js +1 -1
- package/dist/cjs/api/resources/alerts/client/requests/AlertsPostConfigurationsRequestBody.d.ts +1 -1
- package/dist/cjs/api/resources/betaApIs/client/Client.d.ts +30 -2
- package/dist/cjs/api/resources/betaApIs/client/Client.js +88 -2
- package/dist/cjs/api/resources/betaApIs/client/requests/EngineImmobilizerUpdateEngineImmobilizerStateRequestBody.d.ts +1 -1
- package/dist/cjs/api/resources/betaApIs/client/requests/GetDetectionsRequest.d.ts +1 -1
- package/dist/cjs/api/resources/betaApIs/client/requests/GetVoiceSessionsRequest.d.ts +8 -0
- package/dist/cjs/api/resources/betaApIs/client/requests/GetVoiceSessionsRequest.js +3 -0
- package/dist/cjs/api/resources/betaApIs/client/requests/SafetyEventsV2PatchSafetyEventsV2BatchRequestBody.d.ts +5 -3
- package/dist/cjs/api/resources/betaApIs/client/requests/SafetyEventsV2PatchSafetyEventsV2BatchRequestBody.js +4 -2
- package/dist/cjs/api/resources/betaApIs/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/media/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/media/client/Client.js +1 -1
- package/dist/cjs/api/resources/media/client/requests/MediaRetrievalPostMediaRetrievalRequestBody.d.ts +1 -1
- package/dist/cjs/api/types/AgentStudioVoiceSessionCallEventResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionCallEventResponseBody.js +3 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionDetailResponseBody.d.ts +44 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionDetailResponseBody.js +14 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionToolCallResponseBody.d.ts +26 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionToolCallResponseBody.js +13 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionTranscriptEntryResponseBody.d.ts +23 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionTranscriptEntryResponseBody.js +14 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsBadGatewayErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsBadGatewayErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsGatewayTimeoutErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsGatewayTimeoutErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsInternalServerErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsInternalServerErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsMethodNotAllowedErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsMethodNotAllowedErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsNotFoundErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsNotFoundErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsNotImplementedErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsNotImplementedErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsResponseBody.d.ts +5 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsResponseBody.js +3 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsServiceUnavailableErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsServiceUnavailableErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsTooManyRequestsErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsTooManyRequestsErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsUnauthorizedErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsUnauthorizedErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/DetectionLogDetectionObjectResponseBody.d.ts +3 -2
- package/dist/cjs/api/types/DetectionLogDetectionObjectResponseBody.js +2 -1
- package/dist/cjs/api/types/HarshEventTriggerDetailsObjectRequestBody.d.ts +2 -1
- package/dist/cjs/api/types/HarshEventTriggerDetailsObjectRequestBody.js +2 -1
- package/dist/cjs/api/types/HarshEventTriggerDetailsObjectResponseBody.d.ts +2 -1
- package/dist/cjs/api/types/HarshEventTriggerDetailsObjectResponseBody.js +2 -1
- package/dist/cjs/api/types/SafetyBehaviorTriggerDetailsObjectRequestBody.d.ts +2 -1
- package/dist/cjs/api/types/SafetyBehaviorTriggerDetailsObjectRequestBody.js +2 -1
- package/dist/cjs/api/types/SafetyBehaviorTriggerDetailsObjectResponseBody.d.ts +2 -1
- package/dist/cjs/api/types/SafetyBehaviorTriggerDetailsObjectResponseBody.js +2 -1
- package/dist/cjs/api/types/SafetyEventBehaviorLabelsResponseBody.d.ts +3 -2
- package/dist/cjs/api/types/SafetyEventBehaviorLabelsResponseBody.js +2 -1
- package/dist/cjs/api/types/SafetyEventV2BehaviorLabelsResponseBody.d.ts +3 -2
- package/dist/cjs/api/types/SafetyEventV2BehaviorLabelsResponseBody.js +2 -1
- package/dist/cjs/api/types/index.d.ts +14 -0
- package/dist/cjs/api/types/index.js +14 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/alerts/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/alerts/client/Client.mjs +1 -1
- package/dist/esm/api/resources/alerts/client/requests/AlertsPostConfigurationsRequestBody.d.mts +1 -1
- package/dist/esm/api/resources/betaApIs/client/Client.d.mts +30 -2
- package/dist/esm/api/resources/betaApIs/client/Client.mjs +88 -2
- package/dist/esm/api/resources/betaApIs/client/requests/EngineImmobilizerUpdateEngineImmobilizerStateRequestBody.d.mts +1 -1
- package/dist/esm/api/resources/betaApIs/client/requests/GetDetectionsRequest.d.mts +1 -1
- package/dist/esm/api/resources/betaApIs/client/requests/GetVoiceSessionsRequest.d.mts +8 -0
- package/dist/esm/api/resources/betaApIs/client/requests/GetVoiceSessionsRequest.mjs +2 -0
- package/dist/esm/api/resources/betaApIs/client/requests/SafetyEventsV2PatchSafetyEventsV2BatchRequestBody.d.mts +5 -3
- package/dist/esm/api/resources/betaApIs/client/requests/SafetyEventsV2PatchSafetyEventsV2BatchRequestBody.mjs +4 -2
- package/dist/esm/api/resources/betaApIs/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/media/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/media/client/Client.mjs +1 -1
- package/dist/esm/api/resources/media/client/requests/MediaRetrievalPostMediaRetrievalRequestBody.d.mts +1 -1
- package/dist/esm/api/types/AgentStudioVoiceSessionCallEventResponseBody.d.mts +9 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionCallEventResponseBody.mjs +2 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionDetailResponseBody.d.mts +44 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionDetailResponseBody.mjs +11 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionToolCallResponseBody.d.mts +26 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionToolCallResponseBody.mjs +10 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionTranscriptEntryResponseBody.d.mts +23 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionTranscriptEntryResponseBody.mjs +11 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsBadGatewayErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsBadGatewayErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsGatewayTimeoutErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsGatewayTimeoutErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsInternalServerErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsInternalServerErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsMethodNotAllowedErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsMethodNotAllowedErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsNotFoundErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsNotFoundErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsNotImplementedErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsNotImplementedErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsResponseBody.d.mts +5 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsResponseBody.mjs +2 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsServiceUnavailableErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsServiceUnavailableErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsTooManyRequestsErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsTooManyRequestsErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsUnauthorizedErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/AgentStudioVoiceSessionsGetVoiceSessionsUnauthorizedErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/DetectionLogDetectionObjectResponseBody.d.mts +3 -2
- package/dist/esm/api/types/DetectionLogDetectionObjectResponseBody.mjs +2 -1
- package/dist/esm/api/types/HarshEventTriggerDetailsObjectRequestBody.d.mts +2 -1
- package/dist/esm/api/types/HarshEventTriggerDetailsObjectRequestBody.mjs +2 -1
- package/dist/esm/api/types/HarshEventTriggerDetailsObjectResponseBody.d.mts +2 -1
- package/dist/esm/api/types/HarshEventTriggerDetailsObjectResponseBody.mjs +2 -1
- package/dist/esm/api/types/SafetyBehaviorTriggerDetailsObjectRequestBody.d.mts +2 -1
- package/dist/esm/api/types/SafetyBehaviorTriggerDetailsObjectRequestBody.mjs +2 -1
- package/dist/esm/api/types/SafetyBehaviorTriggerDetailsObjectResponseBody.d.mts +2 -1
- package/dist/esm/api/types/SafetyBehaviorTriggerDetailsObjectResponseBody.mjs +2 -1
- package/dist/esm/api/types/SafetyEventBehaviorLabelsResponseBody.d.mts +3 -2
- package/dist/esm/api/types/SafetyEventBehaviorLabelsResponseBody.mjs +2 -1
- package/dist/esm/api/types/SafetyEventV2BehaviorLabelsResponseBody.d.mts +3 -2
- package/dist/esm/api/types/SafetyEventV2BehaviorLabelsResponseBody.mjs +2 -1
- package/dist/esm/api/types/index.d.mts +14 -0
- package/dist/esm/api/types/index.mjs +14 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +74 -4
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -44,8 +44,8 @@ function normalizeClientOptions(options) {
|
|
|
44
44
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
45
45
|
"X-Fern-Language": "JavaScript",
|
|
46
46
|
"X-Fern-SDK-Name": "@samsarahq/samsara",
|
|
47
|
-
"X-Fern-SDK-Version": "13.
|
|
48
|
-
"User-Agent": "@samsarahq/samsara/13.
|
|
47
|
+
"X-Fern-SDK-Version": "13.14.0",
|
|
48
|
+
"User-Agent": "@samsarahq/samsara/13.14.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",
|
|
@@ -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:
|
|
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"
|
|
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:
|
|
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"
|
|
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) {
|
|
@@ -9,7 +9,7 @@ export interface GetDetectionsRequest {
|
|
|
9
9
|
driverIds?: string | string[];
|
|
10
10
|
/** 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) */
|
|
11
11
|
assetIds?: string | string[];
|
|
12
|
-
/** 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) */
|
|
12
|
+
/** 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`, `harshImpact`, `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) */
|
|
13
13
|
detectionBehaviorLabels?: string | string[];
|
|
14
14
|
/** 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) */
|
|
15
15
|
inboxFilterReason?: string | 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
|
+
}
|
|
@@ -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"
|
|
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 {
|
|
@@ -23,7 +23,7 @@ export interface SafetyEventsV2PatchSafetyEventsV2BatchRequestBody {
|
|
|
23
23
|
export declare namespace SafetyEventsV2PatchSafetyEventsV2BatchRequestBody {
|
|
24
24
|
type BehaviorLabelsToAdd = BehaviorLabelsToAdd.Item[];
|
|
25
25
|
namespace BehaviorLabelsToAdd {
|
|
26
|
-
/** A behavior label name to add. Valid values: `Acceleration`, `AggressiveDriving`, `BluetoothHeadset`, `Braking`, `ContextConstructionOrWorkZone`, `ContextSnowyOrIcy`, `ContextVulnerableRoadUser`, `ContextWet`, `Crash`, `DefensiveDriving`, `DidNotYield`, `Drinking`, `Drowsy`, `Eating`, `EatingDrinking`, `EdgeDistractedDriving`, `EdgeRailroadCrossingViolation`, `FollowingDistance`, `FollowingDistanceModerate`, `FollowingDistanceSevere`, `ForwardCollisionWarning`, `GenericDistraction`, `GenericTailgating`, `HarshTurn`, `HeavySpeeding`, `HighSpeedSuddenDisconnect`, `HosViolation`, `Idling`, `Invalid`, `LaneDeparture`, `LateResponse`, `LeftTurn`, `LightSpeeding`, `MaxSpeed`, `MobileUsage`, `ModerateSpeeding`, `NearCollison`, `NearPedestrianCollision`, `NoSeatbelt`, `ObstructedCamera`, `OperationalEvent`, `OtherViolation`, `Passenger`, `PolicyViolationMask`, `ProtectiveEquipment`, `RanRedLight`, `RearCollisionWarning`, `Reversing`, `RollingStop`, `RolloverProtection`, `SevereSpeeding`, `Smoking`, `Speeding`, `UTurn`, `UnsafeManeuver`, `UnsafeParking`, `VehicleInBlindSpotWarning`, `VulnerableRoadUserCollisionWarning`, `YawControl` */
|
|
26
|
+
/** A behavior label name to add. Valid values: `Acceleration`, `AggressiveDriving`, `BluetoothHeadset`, `Braking`, `ContextConstructionOrWorkZone`, `ContextSnowyOrIcy`, `ContextVulnerableRoadUser`, `ContextWet`, `Crash`, `DefensiveDriving`, `DidNotYield`, `Drinking`, `Drowsy`, `Eating`, `EatingDrinking`, `EdgeDistractedDriving`, `EdgeRailroadCrossingViolation`, `FollowingDistance`, `FollowingDistanceModerate`, `FollowingDistanceSevere`, `ForwardCollisionWarning`, `GenericDistraction`, `GenericTailgating`, `HarshImpact`, `HarshTurn`, `HeavySpeeding`, `HighSpeedSuddenDisconnect`, `HosViolation`, `Idling`, `Invalid`, `LaneDeparture`, `LateResponse`, `LeftTurn`, `LightSpeeding`, `MaxSpeed`, `MobileUsage`, `ModerateSpeeding`, `NearCollison`, `NearPedestrianCollision`, `NoSeatbelt`, `ObstructedCamera`, `OperationalEvent`, `OtherViolation`, `Passenger`, `PolicyViolationMask`, `ProtectiveEquipment`, `RanRedLight`, `RearCollisionWarning`, `Reversing`, `RollingStop`, `RolloverProtection`, `SevereSpeeding`, `Smoking`, `Speeding`, `UTurn`, `UnsafeManeuver`, `UnsafeParking`, `VehicleInBlindSpotWarning`, `VulnerableRoadUserCollisionWarning`, `YawControl` */
|
|
27
27
|
const Item: {
|
|
28
28
|
readonly Acceleration: "Acceleration";
|
|
29
29
|
readonly AggressiveDriving: "AggressiveDriving";
|
|
@@ -48,6 +48,7 @@ export declare namespace SafetyEventsV2PatchSafetyEventsV2BatchRequestBody {
|
|
|
48
48
|
readonly ForwardCollisionWarning: "ForwardCollisionWarning";
|
|
49
49
|
readonly GenericDistraction: "GenericDistraction";
|
|
50
50
|
readonly GenericTailgating: "GenericTailgating";
|
|
51
|
+
readonly HarshImpact: "HarshImpact";
|
|
51
52
|
readonly HarshTurn: "HarshTurn";
|
|
52
53
|
readonly HeavySpeeding: "HeavySpeeding";
|
|
53
54
|
readonly HighSpeedSuddenDisconnect: "HighSpeedSuddenDisconnect";
|
|
@@ -89,7 +90,7 @@ export declare namespace SafetyEventsV2PatchSafetyEventsV2BatchRequestBody {
|
|
|
89
90
|
}
|
|
90
91
|
type BehaviorLabelsToRemove = BehaviorLabelsToRemove.Item[];
|
|
91
92
|
namespace BehaviorLabelsToRemove {
|
|
92
|
-
/** A behavior label name to remove. Valid values: `Acceleration`, `AggressiveDriving`, `BluetoothHeadset`, `Braking`, `ContextConstructionOrWorkZone`, `ContextSnowyOrIcy`, `ContextVulnerableRoadUser`, `ContextWet`, `Crash`, `DefensiveDriving`, `DidNotYield`, `Drinking`, `Drowsy`, `Eating`, `EatingDrinking`, `EdgeDistractedDriving`, `EdgeRailroadCrossingViolation`, `FollowingDistance`, `FollowingDistanceModerate`, `FollowingDistanceSevere`, `ForwardCollisionWarning`, `GenericDistraction`, `GenericTailgating`, `HarshTurn`, `HeavySpeeding`, `HighSpeedSuddenDisconnect`, `HosViolation`, `Idling`, `Invalid`, `LaneDeparture`, `LateResponse`, `LeftTurn`, `LightSpeeding`, `MaxSpeed`, `MobileUsage`, `ModerateSpeeding`, `NearCollison`, `NearPedestrianCollision`, `NoSeatbelt`, `ObstructedCamera`, `OperationalEvent`, `OtherViolation`, `Passenger`, `PolicyViolationMask`, `ProtectiveEquipment`, `RanRedLight`, `RearCollisionWarning`, `Reversing`, `RollingStop`, `RolloverProtection`, `SevereSpeeding`, `Smoking`, `Speeding`, `UTurn`, `UnsafeManeuver`, `UnsafeParking`, `VehicleInBlindSpotWarning`, `VulnerableRoadUserCollisionWarning`, `YawControl` */
|
|
93
|
+
/** A behavior label name to remove. Valid values: `Acceleration`, `AggressiveDriving`, `BluetoothHeadset`, `Braking`, `ContextConstructionOrWorkZone`, `ContextSnowyOrIcy`, `ContextVulnerableRoadUser`, `ContextWet`, `Crash`, `DefensiveDriving`, `DidNotYield`, `Drinking`, `Drowsy`, `Eating`, `EatingDrinking`, `EdgeDistractedDriving`, `EdgeRailroadCrossingViolation`, `FollowingDistance`, `FollowingDistanceModerate`, `FollowingDistanceSevere`, `ForwardCollisionWarning`, `GenericDistraction`, `GenericTailgating`, `HarshImpact`, `HarshTurn`, `HeavySpeeding`, `HighSpeedSuddenDisconnect`, `HosViolation`, `Idling`, `Invalid`, `LaneDeparture`, `LateResponse`, `LeftTurn`, `LightSpeeding`, `MaxSpeed`, `MobileUsage`, `ModerateSpeeding`, `NearCollison`, `NearPedestrianCollision`, `NoSeatbelt`, `ObstructedCamera`, `OperationalEvent`, `OtherViolation`, `Passenger`, `PolicyViolationMask`, `ProtectiveEquipment`, `RanRedLight`, `RearCollisionWarning`, `Reversing`, `RollingStop`, `RolloverProtection`, `SevereSpeeding`, `Smoking`, `Speeding`, `UTurn`, `UnsafeManeuver`, `UnsafeParking`, `VehicleInBlindSpotWarning`, `VulnerableRoadUserCollisionWarning`, `YawControl` */
|
|
93
94
|
const Item: {
|
|
94
95
|
readonly Acceleration: "Acceleration";
|
|
95
96
|
readonly AggressiveDriving: "AggressiveDriving";
|
|
@@ -114,6 +115,7 @@ export declare namespace SafetyEventsV2PatchSafetyEventsV2BatchRequestBody {
|
|
|
114
115
|
readonly ForwardCollisionWarning: "ForwardCollisionWarning";
|
|
115
116
|
readonly GenericDistraction: "GenericDistraction";
|
|
116
117
|
readonly GenericTailgating: "GenericTailgating";
|
|
118
|
+
readonly HarshImpact: "HarshImpact";
|
|
117
119
|
readonly HarshTurn: "HarshTurn";
|
|
118
120
|
readonly HeavySpeeding: "HeavySpeeding";
|
|
119
121
|
readonly HighSpeedSuddenDisconnect: "HighSpeedSuddenDisconnect";
|
|
@@ -6,7 +6,7 @@ var SafetyEventsV2PatchSafetyEventsV2BatchRequestBody;
|
|
|
6
6
|
(function (SafetyEventsV2PatchSafetyEventsV2BatchRequestBody) {
|
|
7
7
|
let BehaviorLabelsToAdd;
|
|
8
8
|
(function (BehaviorLabelsToAdd) {
|
|
9
|
-
/** A behavior label name to add. Valid values: `Acceleration`, `AggressiveDriving`, `BluetoothHeadset`, `Braking`, `ContextConstructionOrWorkZone`, `ContextSnowyOrIcy`, `ContextVulnerableRoadUser`, `ContextWet`, `Crash`, `DefensiveDriving`, `DidNotYield`, `Drinking`, `Drowsy`, `Eating`, `EatingDrinking`, `EdgeDistractedDriving`, `EdgeRailroadCrossingViolation`, `FollowingDistance`, `FollowingDistanceModerate`, `FollowingDistanceSevere`, `ForwardCollisionWarning`, `GenericDistraction`, `GenericTailgating`, `HarshTurn`, `HeavySpeeding`, `HighSpeedSuddenDisconnect`, `HosViolation`, `Idling`, `Invalid`, `LaneDeparture`, `LateResponse`, `LeftTurn`, `LightSpeeding`, `MaxSpeed`, `MobileUsage`, `ModerateSpeeding`, `NearCollison`, `NearPedestrianCollision`, `NoSeatbelt`, `ObstructedCamera`, `OperationalEvent`, `OtherViolation`, `Passenger`, `PolicyViolationMask`, `ProtectiveEquipment`, `RanRedLight`, `RearCollisionWarning`, `Reversing`, `RollingStop`, `RolloverProtection`, `SevereSpeeding`, `Smoking`, `Speeding`, `UTurn`, `UnsafeManeuver`, `UnsafeParking`, `VehicleInBlindSpotWarning`, `VulnerableRoadUserCollisionWarning`, `YawControl` */
|
|
9
|
+
/** A behavior label name to add. Valid values: `Acceleration`, `AggressiveDriving`, `BluetoothHeadset`, `Braking`, `ContextConstructionOrWorkZone`, `ContextSnowyOrIcy`, `ContextVulnerableRoadUser`, `ContextWet`, `Crash`, `DefensiveDriving`, `DidNotYield`, `Drinking`, `Drowsy`, `Eating`, `EatingDrinking`, `EdgeDistractedDriving`, `EdgeRailroadCrossingViolation`, `FollowingDistance`, `FollowingDistanceModerate`, `FollowingDistanceSevere`, `ForwardCollisionWarning`, `GenericDistraction`, `GenericTailgating`, `HarshImpact`, `HarshTurn`, `HeavySpeeding`, `HighSpeedSuddenDisconnect`, `HosViolation`, `Idling`, `Invalid`, `LaneDeparture`, `LateResponse`, `LeftTurn`, `LightSpeeding`, `MaxSpeed`, `MobileUsage`, `ModerateSpeeding`, `NearCollison`, `NearPedestrianCollision`, `NoSeatbelt`, `ObstructedCamera`, `OperationalEvent`, `OtherViolation`, `Passenger`, `PolicyViolationMask`, `ProtectiveEquipment`, `RanRedLight`, `RearCollisionWarning`, `Reversing`, `RollingStop`, `RolloverProtection`, `SevereSpeeding`, `Smoking`, `Speeding`, `UTurn`, `UnsafeManeuver`, `UnsafeParking`, `VehicleInBlindSpotWarning`, `VulnerableRoadUserCollisionWarning`, `YawControl` */
|
|
10
10
|
BehaviorLabelsToAdd.Item = {
|
|
11
11
|
Acceleration: "Acceleration",
|
|
12
12
|
AggressiveDriving: "AggressiveDriving",
|
|
@@ -31,6 +31,7 @@ var SafetyEventsV2PatchSafetyEventsV2BatchRequestBody;
|
|
|
31
31
|
ForwardCollisionWarning: "ForwardCollisionWarning",
|
|
32
32
|
GenericDistraction: "GenericDistraction",
|
|
33
33
|
GenericTailgating: "GenericTailgating",
|
|
34
|
+
HarshImpact: "HarshImpact",
|
|
34
35
|
HarshTurn: "HarshTurn",
|
|
35
36
|
HeavySpeeding: "HeavySpeeding",
|
|
36
37
|
HighSpeedSuddenDisconnect: "HighSpeedSuddenDisconnect",
|
|
@@ -71,7 +72,7 @@ var SafetyEventsV2PatchSafetyEventsV2BatchRequestBody;
|
|
|
71
72
|
})(BehaviorLabelsToAdd = SafetyEventsV2PatchSafetyEventsV2BatchRequestBody.BehaviorLabelsToAdd || (SafetyEventsV2PatchSafetyEventsV2BatchRequestBody.BehaviorLabelsToAdd = {}));
|
|
72
73
|
let BehaviorLabelsToRemove;
|
|
73
74
|
(function (BehaviorLabelsToRemove) {
|
|
74
|
-
/** A behavior label name to remove. Valid values: `Acceleration`, `AggressiveDriving`, `BluetoothHeadset`, `Braking`, `ContextConstructionOrWorkZone`, `ContextSnowyOrIcy`, `ContextVulnerableRoadUser`, `ContextWet`, `Crash`, `DefensiveDriving`, `DidNotYield`, `Drinking`, `Drowsy`, `Eating`, `EatingDrinking`, `EdgeDistractedDriving`, `EdgeRailroadCrossingViolation`, `FollowingDistance`, `FollowingDistanceModerate`, `FollowingDistanceSevere`, `ForwardCollisionWarning`, `GenericDistraction`, `GenericTailgating`, `HarshTurn`, `HeavySpeeding`, `HighSpeedSuddenDisconnect`, `HosViolation`, `Idling`, `Invalid`, `LaneDeparture`, `LateResponse`, `LeftTurn`, `LightSpeeding`, `MaxSpeed`, `MobileUsage`, `ModerateSpeeding`, `NearCollison`, `NearPedestrianCollision`, `NoSeatbelt`, `ObstructedCamera`, `OperationalEvent`, `OtherViolation`, `Passenger`, `PolicyViolationMask`, `ProtectiveEquipment`, `RanRedLight`, `RearCollisionWarning`, `Reversing`, `RollingStop`, `RolloverProtection`, `SevereSpeeding`, `Smoking`, `Speeding`, `UTurn`, `UnsafeManeuver`, `UnsafeParking`, `VehicleInBlindSpotWarning`, `VulnerableRoadUserCollisionWarning`, `YawControl` */
|
|
75
|
+
/** A behavior label name to remove. Valid values: `Acceleration`, `AggressiveDriving`, `BluetoothHeadset`, `Braking`, `ContextConstructionOrWorkZone`, `ContextSnowyOrIcy`, `ContextVulnerableRoadUser`, `ContextWet`, `Crash`, `DefensiveDriving`, `DidNotYield`, `Drinking`, `Drowsy`, `Eating`, `EatingDrinking`, `EdgeDistractedDriving`, `EdgeRailroadCrossingViolation`, `FollowingDistance`, `FollowingDistanceModerate`, `FollowingDistanceSevere`, `ForwardCollisionWarning`, `GenericDistraction`, `GenericTailgating`, `HarshImpact`, `HarshTurn`, `HeavySpeeding`, `HighSpeedSuddenDisconnect`, `HosViolation`, `Idling`, `Invalid`, `LaneDeparture`, `LateResponse`, `LeftTurn`, `LightSpeeding`, `MaxSpeed`, `MobileUsage`, `ModerateSpeeding`, `NearCollison`, `NearPedestrianCollision`, `NoSeatbelt`, `ObstructedCamera`, `OperationalEvent`, `OtherViolation`, `Passenger`, `PolicyViolationMask`, `ProtectiveEquipment`, `RanRedLight`, `RearCollisionWarning`, `Reversing`, `RollingStop`, `RolloverProtection`, `SevereSpeeding`, `Smoking`, `Speeding`, `UTurn`, `UnsafeManeuver`, `UnsafeParking`, `VehicleInBlindSpotWarning`, `VulnerableRoadUserCollisionWarning`, `YawControl` */
|
|
75
76
|
BehaviorLabelsToRemove.Item = {
|
|
76
77
|
Acceleration: "Acceleration",
|
|
77
78
|
AggressiveDriving: "AggressiveDriving",
|
|
@@ -96,6 +97,7 @@ var SafetyEventsV2PatchSafetyEventsV2BatchRequestBody;
|
|
|
96
97
|
ForwardCollisionWarning: "ForwardCollisionWarning",
|
|
97
98
|
GenericDistraction: "GenericDistraction",
|
|
98
99
|
GenericTailgating: "GenericTailgating",
|
|
100
|
+
HarshImpact: "HarshImpact",
|
|
99
101
|
HarshTurn: "HarshTurn",
|
|
100
102
|
HeavySpeeding: "HeavySpeeding",
|
|
101
103
|
HighSpeedSuddenDisconnect: "HighSpeedSuddenDisconnect",
|
|
@@ -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"
|
|
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"
|
|
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"
|
|
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,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 = {}));
|
package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsBadGatewayErrorResponseBody.d.ts
ADDED
|
@@ -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,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,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,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
|
+
}
|
package/dist/cjs/api/types/AgentStudioVoiceSessionsGetVoiceSessionsNotFoundErrorResponseBody.d.ts
ADDED
|
@@ -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
|
+
}
|