@samsarahq/samsara 13.4.0 → 13.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/betaApIs/client/requests/PlacesPatchPlaceRequestBody.d.ts +17 -0
- package/dist/cjs/api/resources/betaApIs/client/requests/PlacesPatchPlaceRequestBody.js +13 -0
- package/dist/cjs/api/resources/betaApIs/client/requests/PlacesPostPlaceRequestBody.d.ts +17 -0
- package/dist/cjs/api/resources/betaApIs/client/requests/PlacesPostPlaceRequestBody.js +13 -0
- package/dist/cjs/api/resources/betaApIs/client/requests/index.d.ts +2 -2
- package/dist/cjs/api/resources/betaApIs/client/requests/index.js +5 -1
- package/dist/cjs/api/resources/issues/client/Client.d.ts +33 -0
- package/dist/cjs/api/resources/issues/client/Client.js +87 -0
- package/dist/cjs/api/resources/issues/client/requests/IssuesPatchIssueRequestBody.d.ts +5 -5
- package/dist/cjs/api/resources/issues/client/requests/IssuesPatchIssueRequestBody.js +1 -1
- package/dist/cjs/api/resources/issues/client/requests/IssuesPostIssueRequestBody.d.ts +45 -0
- package/dist/cjs/api/resources/issues/client/requests/IssuesPostIssueRequestBody.js +20 -0
- package/dist/cjs/api/resources/issues/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/issues/client/requests/index.js +3 -1
- 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/IssuesPostIssueBadGatewayErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/IssuesPostIssueBadGatewayErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/IssuesPostIssueGatewayTimeoutErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/IssuesPostIssueGatewayTimeoutErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/IssuesPostIssueInternalServerErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/IssuesPostIssueInternalServerErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/IssuesPostIssueMethodNotAllowedErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/IssuesPostIssueMethodNotAllowedErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/IssuesPostIssueNotFoundErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/IssuesPostIssueNotFoundErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/IssuesPostIssueNotImplementedErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/IssuesPostIssueNotImplementedErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/IssuesPostIssueResponseBody.d.ts +4 -0
- package/dist/cjs/api/types/IssuesPostIssueResponseBody.js +3 -0
- package/dist/cjs/api/types/IssuesPostIssueServiceUnavailableErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/IssuesPostIssueServiceUnavailableErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/IssuesPostIssueTooManyRequestsErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/IssuesPostIssueTooManyRequestsErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/IssuesPostIssueUnauthorizedErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/IssuesPostIssueUnauthorizedErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/PlaceStreetViewResponseRequestBody.d.ts +17 -0
- package/dist/cjs/api/types/PlaceStreetViewResponseRequestBody.js +3 -0
- package/dist/cjs/api/types/PostIssueRequestBodyAssetRequestBody.d.ts +7 -0
- package/dist/cjs/api/types/PostIssueRequestBodyAssetRequestBody.js +3 -0
- package/dist/cjs/api/types/PostIssueRequestBodyAssignedToRequestBody.d.ts +16 -0
- package/dist/cjs/api/types/PostIssueRequestBodyAssignedToRequestBody.js +11 -0
- package/dist/cjs/api/types/ServiceTaskInstanceInputObjectRequestBody.d.ts +2 -0
- package/dist/cjs/api/types/ServiceTaskInstanceObjectResponseBody.d.ts +2 -0
- package/dist/cjs/api/types/ServiceTaskInstanceWithTimeEntriesObjectResponseBody.d.ts +2 -0
- package/dist/cjs/api/types/index.d.ts +13 -0
- package/dist/cjs/api/types/index.js +13 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/betaApIs/client/requests/PlacesPatchPlaceRequestBody.d.mts +17 -0
- package/dist/esm/api/resources/betaApIs/client/requests/PlacesPatchPlaceRequestBody.mjs +12 -1
- package/dist/esm/api/resources/betaApIs/client/requests/PlacesPostPlaceRequestBody.d.mts +17 -0
- package/dist/esm/api/resources/betaApIs/client/requests/PlacesPostPlaceRequestBody.mjs +12 -1
- package/dist/esm/api/resources/betaApIs/client/requests/index.d.mts +2 -2
- package/dist/esm/api/resources/betaApIs/client/requests/index.mjs +2 -0
- package/dist/esm/api/resources/issues/client/Client.d.mts +33 -0
- package/dist/esm/api/resources/issues/client/Client.mjs +87 -0
- package/dist/esm/api/resources/issues/client/requests/IssuesPatchIssueRequestBody.d.mts +5 -5
- package/dist/esm/api/resources/issues/client/requests/IssuesPatchIssueRequestBody.mjs +1 -1
- package/dist/esm/api/resources/issues/client/requests/IssuesPostIssueRequestBody.d.mts +45 -0
- package/dist/esm/api/resources/issues/client/requests/IssuesPostIssueRequestBody.mjs +17 -0
- package/dist/esm/api/resources/issues/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/issues/client/requests/index.mjs +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/IssuesPostIssueBadGatewayErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/IssuesPostIssueBadGatewayErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/IssuesPostIssueGatewayTimeoutErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/IssuesPostIssueGatewayTimeoutErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/IssuesPostIssueInternalServerErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/IssuesPostIssueInternalServerErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/IssuesPostIssueMethodNotAllowedErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/IssuesPostIssueMethodNotAllowedErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/IssuesPostIssueNotFoundErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/IssuesPostIssueNotFoundErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/IssuesPostIssueNotImplementedErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/IssuesPostIssueNotImplementedErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/IssuesPostIssueResponseBody.d.mts +4 -0
- package/dist/esm/api/types/IssuesPostIssueResponseBody.mjs +2 -0
- package/dist/esm/api/types/IssuesPostIssueServiceUnavailableErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/IssuesPostIssueServiceUnavailableErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/IssuesPostIssueTooManyRequestsErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/IssuesPostIssueTooManyRequestsErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/IssuesPostIssueUnauthorizedErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/IssuesPostIssueUnauthorizedErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/PlaceStreetViewResponseRequestBody.d.mts +17 -0
- package/dist/esm/api/types/PlaceStreetViewResponseRequestBody.mjs +2 -0
- package/dist/esm/api/types/PostIssueRequestBodyAssetRequestBody.d.mts +7 -0
- package/dist/esm/api/types/PostIssueRequestBodyAssetRequestBody.mjs +2 -0
- package/dist/esm/api/types/PostIssueRequestBodyAssignedToRequestBody.d.mts +16 -0
- package/dist/esm/api/types/PostIssueRequestBodyAssignedToRequestBody.mjs +8 -0
- package/dist/esm/api/types/ServiceTaskInstanceInputObjectRequestBody.d.mts +2 -0
- package/dist/esm/api/types/ServiceTaskInstanceObjectResponseBody.d.mts +2 -0
- package/dist/esm/api/types/ServiceTaskInstanceWithTimeEntriesObjectResponseBody.d.mts +2 -0
- package/dist/esm/api/types/index.d.mts +13 -0
- package/dist/esm/api/types/index.mjs +13 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +76 -1
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.6.0",
|
|
48
|
+
"User-Agent": "@samsarahq/samsara/13.6.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",
|
|
@@ -12,11 +12,15 @@ export interface PlacesPatchPlaceRequestBody {
|
|
|
12
12
|
externalId?: string;
|
|
13
13
|
/** Single-line address string. */
|
|
14
14
|
address?: string;
|
|
15
|
+
/** Camera recording mode: fullRecording, driverPrivacy, completePrivacy, or inherit. Valid values: `fullRecording`, `driverPrivacy`, `completePrivacy`, `inherit`, `unknown`, `unspecified` */
|
|
16
|
+
cameraRecordingModeType?: PlacesPatchPlaceRequestBody.CameraRecordingModeType;
|
|
15
17
|
/** When present, replaces external ids for the place. */
|
|
16
18
|
externalIds?: PlacesPatchPlaceRequestBody.ExternalIds;
|
|
17
19
|
/** Polygon vertices; at least three when switching to polygon mode. */
|
|
18
20
|
geofence?: Samsara.GeofenceVertexInputRequestBody[];
|
|
19
21
|
hubLocations?: Samsara.PatchPlaceHubLocationsBodyRequestBody;
|
|
22
|
+
/** When present, replaces IFTA exemption types for the place. */
|
|
23
|
+
iftaExemptionTypes?: string[];
|
|
20
24
|
/** Center latitude when switching to or editing a circle geofence. */
|
|
21
25
|
latitude?: number;
|
|
22
26
|
/** Center longitude when switching to or editing a circle geofence. */
|
|
@@ -30,10 +34,23 @@ export interface PlacesPatchPlaceRequestBody {
|
|
|
30
34
|
placeTypes?: string[];
|
|
31
35
|
/** Circle radius in meters; use with latitude and longitude. */
|
|
32
36
|
radiusMeters?: number;
|
|
37
|
+
/** When present, replaces safety event exclusions for the place. */
|
|
38
|
+
safetyEventExclusions?: string[];
|
|
39
|
+
streetView?: Samsara.PlaceStreetViewResponseRequestBody;
|
|
33
40
|
/** When present, replaces all tag associations for the place. */
|
|
34
41
|
tags?: Samsara.PostPlaceTagRefRequestBody[];
|
|
35
42
|
}
|
|
36
43
|
export declare namespace PlacesPatchPlaceRequestBody {
|
|
44
|
+
/** Camera recording mode: fullRecording, driverPrivacy, completePrivacy, or inherit. Valid values: `fullRecording`, `driverPrivacy`, `completePrivacy`, `inherit`, `unknown`, `unspecified` */
|
|
45
|
+
const CameraRecordingModeType: {
|
|
46
|
+
readonly FullRecording: "fullRecording";
|
|
47
|
+
readonly DriverPrivacy: "driverPrivacy";
|
|
48
|
+
readonly CompletePrivacy: "completePrivacy";
|
|
49
|
+
readonly Inherit: "inherit";
|
|
50
|
+
readonly Unknown: "unknown";
|
|
51
|
+
readonly Unspecified: "unspecified";
|
|
52
|
+
};
|
|
53
|
+
type CameraRecordingModeType = (typeof CameraRecordingModeType)[keyof typeof CameraRecordingModeType];
|
|
37
54
|
/**
|
|
38
55
|
* When present, replaces external ids for the place.
|
|
39
56
|
*/
|
|
@@ -1,3 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.PlacesPatchPlaceRequestBody = void 0;
|
|
5
|
+
var PlacesPatchPlaceRequestBody;
|
|
6
|
+
(function (PlacesPatchPlaceRequestBody) {
|
|
7
|
+
/** Camera recording mode: fullRecording, driverPrivacy, completePrivacy, or inherit. Valid values: `fullRecording`, `driverPrivacy`, `completePrivacy`, `inherit`, `unknown`, `unspecified` */
|
|
8
|
+
PlacesPatchPlaceRequestBody.CameraRecordingModeType = {
|
|
9
|
+
FullRecording: "fullRecording",
|
|
10
|
+
DriverPrivacy: "driverPrivacy",
|
|
11
|
+
CompletePrivacy: "completePrivacy",
|
|
12
|
+
Inherit: "inherit",
|
|
13
|
+
Unknown: "unknown",
|
|
14
|
+
Unspecified: "unspecified",
|
|
15
|
+
};
|
|
16
|
+
})(PlacesPatchPlaceRequestBody || (exports.PlacesPatchPlaceRequestBody = PlacesPatchPlaceRequestBody = {}));
|
|
@@ -9,12 +9,16 @@ import type * as Samsara from "../../../../index.js";
|
|
|
9
9
|
export interface PlacesPostPlaceRequestBody {
|
|
10
10
|
/** Single-line address string. */
|
|
11
11
|
address: string;
|
|
12
|
+
/** Camera recording mode: fullRecording, driverPrivacy, completePrivacy, or inherit. Valid values: `fullRecording`, `driverPrivacy`, `completePrivacy`, `inherit`, `unknown`, `unspecified` */
|
|
13
|
+
cameraRecordingModeType?: PlacesPostPlaceRequestBody.CameraRecordingModeType;
|
|
12
14
|
/** External identifiers. */
|
|
13
15
|
externalIds?: PlacesPostPlaceRequestBody.ExternalIds;
|
|
14
16
|
/** Polygon vertices; at least three when using polygon mode (omit entirely when using latitude, longitude, and radiusMeters for a circle). */
|
|
15
17
|
geofence?: Samsara.GeofenceVertexInputRequestBody[];
|
|
16
18
|
/** Initial route-planning hub rows for the new place. Each entry requires hubId. Omit hubLocationId to let the server assign a row UUID, or set hubLocationId to pin the UUID for idempotent creates. */
|
|
17
19
|
hubLocations?: Samsara.PatchPlaceHubLocationUpsertBodyRequestBody[];
|
|
20
|
+
/** IFTA exemption types for this place. */
|
|
21
|
+
iftaExemptionTypes?: string[];
|
|
18
22
|
/** Center latitude when using a circle geofence with radiusMeters. */
|
|
19
23
|
latitude?: number;
|
|
20
24
|
/** Center longitude when using a circle geofence with radiusMeters. */
|
|
@@ -28,10 +32,23 @@ export interface PlacesPostPlaceRequestBody {
|
|
|
28
32
|
placeTypes?: string[];
|
|
29
33
|
/** Circle radius in meters; requires latitude and longitude. Must be at least 1 when set. */
|
|
30
34
|
radiusMeters?: number;
|
|
35
|
+
/** Safety event types excluded at this place. */
|
|
36
|
+
safetyEventExclusions?: string[];
|
|
37
|
+
streetView?: Samsara.PlaceStreetViewResponseRequestBody;
|
|
31
38
|
/** Tags to associate. */
|
|
32
39
|
tags?: Samsara.PostPlaceTagRefRequestBody[];
|
|
33
40
|
}
|
|
34
41
|
export declare namespace PlacesPostPlaceRequestBody {
|
|
42
|
+
/** Camera recording mode: fullRecording, driverPrivacy, completePrivacy, or inherit. Valid values: `fullRecording`, `driverPrivacy`, `completePrivacy`, `inherit`, `unknown`, `unspecified` */
|
|
43
|
+
const CameraRecordingModeType: {
|
|
44
|
+
readonly FullRecording: "fullRecording";
|
|
45
|
+
readonly DriverPrivacy: "driverPrivacy";
|
|
46
|
+
readonly CompletePrivacy: "completePrivacy";
|
|
47
|
+
readonly Inherit: "inherit";
|
|
48
|
+
readonly Unknown: "unknown";
|
|
49
|
+
readonly Unspecified: "unspecified";
|
|
50
|
+
};
|
|
51
|
+
type CameraRecordingModeType = (typeof CameraRecordingModeType)[keyof typeof CameraRecordingModeType];
|
|
35
52
|
/**
|
|
36
53
|
* External identifiers.
|
|
37
54
|
*/
|
|
@@ -1,3 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.PlacesPostPlaceRequestBody = void 0;
|
|
5
|
+
var PlacesPostPlaceRequestBody;
|
|
6
|
+
(function (PlacesPostPlaceRequestBody) {
|
|
7
|
+
/** Camera recording mode: fullRecording, driverPrivacy, completePrivacy, or inherit. Valid values: `fullRecording`, `driverPrivacy`, `completePrivacy`, `inherit`, `unknown`, `unspecified` */
|
|
8
|
+
PlacesPostPlaceRequestBody.CameraRecordingModeType = {
|
|
9
|
+
FullRecording: "fullRecording",
|
|
10
|
+
DriverPrivacy: "driverPrivacy",
|
|
11
|
+
CompletePrivacy: "completePrivacy",
|
|
12
|
+
Inherit: "inherit",
|
|
13
|
+
Unknown: "unknown",
|
|
14
|
+
Unspecified: "unspecified",
|
|
15
|
+
};
|
|
16
|
+
})(PlacesPostPlaceRequestBody || (exports.PlacesPostPlaceRequestBody = PlacesPostPlaceRequestBody = {}));
|
|
@@ -55,8 +55,8 @@ export type { ListRidershipPassengersRequest } from "./ListRidershipPassengersRe
|
|
|
55
55
|
export type { ListRidershipRouteSetupsRequest } from "./ListRidershipRouteSetupsRequest.js";
|
|
56
56
|
export type { ListTachographLiveDataRequest } from "./ListTachographLiveDataRequest.js";
|
|
57
57
|
export type { ListVendorCategoriesRequest } from "./ListVendorCategoriesRequest.js";
|
|
58
|
-
export
|
|
59
|
-
export
|
|
58
|
+
export { PlacesPatchPlaceRequestBody } from "./PlacesPatchPlaceRequestBody.js";
|
|
59
|
+
export { PlacesPostPlaceRequestBody } from "./PlacesPostPlaceRequestBody.js";
|
|
60
60
|
export type { PreferredStationsPatchPreferredStationRequestBody } from "./PreferredStationsPatchPreferredStationRequestBody.js";
|
|
61
61
|
export type { PreferredStationsPostPreferredStationRequestBody } from "./PreferredStationsPostPreferredStationRequestBody.js";
|
|
62
62
|
export type { QualificationsArchiveQualificationRecordRequestBody } from "./QualificationsArchiveQualificationRecordRequestBody.js";
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SafetyEventsV2PatchSafetyEventsV2BatchRequestBody = exports.RidershipPassengersUpdateRidershipPassengerRequestBody = exports.RidershipPassengersCreateRidershipPassengerRequestBody = exports.DeviceRecoveryRecoverAssetRequestBody = void 0;
|
|
3
|
+
exports.SafetyEventsV2PatchSafetyEventsV2BatchRequestBody = exports.RidershipPassengersUpdateRidershipPassengerRequestBody = exports.RidershipPassengersCreateRidershipPassengerRequestBody = exports.PlacesPostPlaceRequestBody = exports.PlacesPatchPlaceRequestBody = exports.DeviceRecoveryRecoverAssetRequestBody = void 0;
|
|
4
4
|
var DeviceRecoveryRecoverAssetRequestBody_js_1 = require("./DeviceRecoveryRecoverAssetRequestBody.js");
|
|
5
5
|
Object.defineProperty(exports, "DeviceRecoveryRecoverAssetRequestBody", { enumerable: true, get: function () { return DeviceRecoveryRecoverAssetRequestBody_js_1.DeviceRecoveryRecoverAssetRequestBody; } });
|
|
6
|
+
var PlacesPatchPlaceRequestBody_js_1 = require("./PlacesPatchPlaceRequestBody.js");
|
|
7
|
+
Object.defineProperty(exports, "PlacesPatchPlaceRequestBody", { enumerable: true, get: function () { return PlacesPatchPlaceRequestBody_js_1.PlacesPatchPlaceRequestBody; } });
|
|
8
|
+
var PlacesPostPlaceRequestBody_js_1 = require("./PlacesPostPlaceRequestBody.js");
|
|
9
|
+
Object.defineProperty(exports, "PlacesPostPlaceRequestBody", { enumerable: true, get: function () { return PlacesPostPlaceRequestBody_js_1.PlacesPostPlaceRequestBody; } });
|
|
6
10
|
var RidershipPassengersCreateRidershipPassengerRequestBody_js_1 = require("./RidershipPassengersCreateRidershipPassengerRequestBody.js");
|
|
7
11
|
Object.defineProperty(exports, "RidershipPassengersCreateRidershipPassengerRequestBody", { enumerable: true, get: function () { return RidershipPassengersCreateRidershipPassengerRequestBody_js_1.RidershipPassengersCreateRidershipPassengerRequestBody; } });
|
|
8
12
|
var RidershipPassengersUpdateRidershipPassengerRequestBody_js_1 = require("./RidershipPassengersUpdateRidershipPassengerRequestBody.js");
|
|
@@ -38,6 +38,39 @@ export declare class IssuesClient {
|
|
|
38
38
|
*/
|
|
39
39
|
getIssues(request?: Samsara.GetIssuesRequest, requestOptions?: IssuesClient.RequestOptions): core.HttpResponsePromise<Samsara.IssuesGetIssuesResponseBody>;
|
|
40
40
|
private __getIssues;
|
|
41
|
+
/**
|
|
42
|
+
* Creates a new issue associated with an asset, with optional media attachments uploaded inline as base64.
|
|
43
|
+
*
|
|
44
|
+
* <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>).
|
|
45
|
+
*
|
|
46
|
+
* To use this endpoint, select **Write Issues** under the Forms 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>
|
|
47
|
+
*
|
|
48
|
+
*
|
|
49
|
+
* **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.
|
|
50
|
+
*
|
|
51
|
+
* @param {Samsara.IssuesPostIssueRequestBody} request
|
|
52
|
+
* @param {IssuesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
53
|
+
*
|
|
54
|
+
* @throws {@link Samsara.UnauthorizedError}
|
|
55
|
+
* @throws {@link Samsara.NotFoundError}
|
|
56
|
+
* @throws {@link Samsara.MethodNotAllowedError}
|
|
57
|
+
* @throws {@link Samsara.TooManyRequestsError}
|
|
58
|
+
* @throws {@link Samsara.InternalServerError}
|
|
59
|
+
* @throws {@link Samsara.NotImplementedError}
|
|
60
|
+
* @throws {@link Samsara.BadGatewayError}
|
|
61
|
+
* @throws {@link Samsara.ServiceUnavailableError}
|
|
62
|
+
* @throws {@link Samsara.GatewayTimeoutError}
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* await client.issues.postIssue({
|
|
66
|
+
* asset: {
|
|
67
|
+
* id: "hertzAssetId:HZ-100423"
|
|
68
|
+
* },
|
|
69
|
+
* title: "Front bumper scratch"
|
|
70
|
+
* })
|
|
71
|
+
*/
|
|
72
|
+
postIssue(request: Samsara.IssuesPostIssueRequestBody, requestOptions?: IssuesClient.RequestOptions): core.HttpResponsePromise<Samsara.IssuesPostIssueResponseBody>;
|
|
73
|
+
private __postIssue;
|
|
41
74
|
/**
|
|
42
75
|
* Updates an instance of an issue.
|
|
43
76
|
*
|
|
@@ -139,6 +139,93 @@ class IssuesClient {
|
|
|
139
139
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/issues");
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* Creates a new issue associated with an asset, with optional media attachments uploaded inline as base64.
|
|
144
|
+
*
|
|
145
|
+
* <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>).
|
|
146
|
+
*
|
|
147
|
+
* To use this endpoint, select **Write Issues** under the Forms 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>
|
|
148
|
+
*
|
|
149
|
+
*
|
|
150
|
+
* **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.
|
|
151
|
+
*
|
|
152
|
+
* @param {Samsara.IssuesPostIssueRequestBody} request
|
|
153
|
+
* @param {IssuesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
154
|
+
*
|
|
155
|
+
* @throws {@link Samsara.UnauthorizedError}
|
|
156
|
+
* @throws {@link Samsara.NotFoundError}
|
|
157
|
+
* @throws {@link Samsara.MethodNotAllowedError}
|
|
158
|
+
* @throws {@link Samsara.TooManyRequestsError}
|
|
159
|
+
* @throws {@link Samsara.InternalServerError}
|
|
160
|
+
* @throws {@link Samsara.NotImplementedError}
|
|
161
|
+
* @throws {@link Samsara.BadGatewayError}
|
|
162
|
+
* @throws {@link Samsara.ServiceUnavailableError}
|
|
163
|
+
* @throws {@link Samsara.GatewayTimeoutError}
|
|
164
|
+
*
|
|
165
|
+
* @example
|
|
166
|
+
* await client.issues.postIssue({
|
|
167
|
+
* asset: {
|
|
168
|
+
* id: "hertzAssetId:HZ-100423"
|
|
169
|
+
* },
|
|
170
|
+
* title: "Front bumper scratch"
|
|
171
|
+
* })
|
|
172
|
+
*/
|
|
173
|
+
postIssue(request, requestOptions) {
|
|
174
|
+
return core.HttpResponsePromise.fromPromise(this.__postIssue(request, requestOptions));
|
|
175
|
+
}
|
|
176
|
+
__postIssue(request, requestOptions) {
|
|
177
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
178
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
179
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
180
|
+
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);
|
|
181
|
+
const _response = yield core.fetcher({
|
|
182
|
+
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, "issues"),
|
|
183
|
+
method: "POST",
|
|
184
|
+
headers: _headers,
|
|
185
|
+
contentType: "application/json",
|
|
186
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
187
|
+
requestType: "json",
|
|
188
|
+
body: request,
|
|
189
|
+
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,
|
|
190
|
+
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,
|
|
191
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
192
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
193
|
+
logging: this._options.logging,
|
|
194
|
+
});
|
|
195
|
+
if (_response.ok) {
|
|
196
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
197
|
+
}
|
|
198
|
+
if (_response.error.reason === "status-code") {
|
|
199
|
+
switch (_response.error.statusCode) {
|
|
200
|
+
case 401:
|
|
201
|
+
throw new Samsara.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
202
|
+
case 404:
|
|
203
|
+
throw new Samsara.NotFoundError(_response.error.body, _response.rawResponse);
|
|
204
|
+
case 405:
|
|
205
|
+
throw new Samsara.MethodNotAllowedError(_response.error.body, _response.rawResponse);
|
|
206
|
+
case 429:
|
|
207
|
+
throw new Samsara.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
208
|
+
case 500:
|
|
209
|
+
throw new Samsara.InternalServerError(_response.error.body, _response.rawResponse);
|
|
210
|
+
case 501:
|
|
211
|
+
throw new Samsara.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
212
|
+
case 502:
|
|
213
|
+
throw new Samsara.BadGatewayError(_response.error.body, _response.rawResponse);
|
|
214
|
+
case 503:
|
|
215
|
+
throw new Samsara.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
216
|
+
case 504:
|
|
217
|
+
throw new Samsara.GatewayTimeoutError(_response.error.body, _response.rawResponse);
|
|
218
|
+
default:
|
|
219
|
+
throw new errors.SamsaraError({
|
|
220
|
+
statusCode: _response.error.statusCode,
|
|
221
|
+
body: _response.error.body,
|
|
222
|
+
rawResponse: _response.rawResponse,
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/issues");
|
|
227
|
+
});
|
|
228
|
+
}
|
|
142
229
|
/**
|
|
143
230
|
* Updates an instance of an issue.
|
|
144
231
|
*
|
|
@@ -7,7 +7,7 @@ import type * as Samsara from "../../../../index.js";
|
|
|
7
7
|
*/
|
|
8
8
|
export interface IssuesPatchIssueRequestBody {
|
|
9
9
|
assignedTo?: Samsara.PatchIssueRequestBodyAssignedToRequestBody;
|
|
10
|
-
/** Description of the issue.
|
|
10
|
+
/** Description of the issue. */
|
|
11
11
|
description?: string;
|
|
12
12
|
/** Due date of the issue. UTC timestamp in RFC 3339 format. */
|
|
13
13
|
dueDate?: string;
|
|
@@ -15,17 +15,17 @@ export interface IssuesPatchIssueRequestBody {
|
|
|
15
15
|
externalIds?: Record<string, string>;
|
|
16
16
|
/** ID of the issue. Can be either a unique Samsara ID or an [external ID](https://developers.samsara.com/docs/external-ids) for the issue. */
|
|
17
17
|
id: string;
|
|
18
|
-
/** Media items to append to the issue.
|
|
18
|
+
/** Media items to append to the issue. */
|
|
19
19
|
media?: Samsara.FormSubmissionRequestMediaItemObjectRequestBody[];
|
|
20
|
-
/** Priority of the issue.
|
|
20
|
+
/** Priority of the issue. Valid values: `low`, `medium`, `high` */
|
|
21
21
|
priority?: IssuesPatchIssueRequestBody.Priority;
|
|
22
22
|
/** Status of the issue. Valid values: `open`, `inProgress`, `resolved`, `dismissed` */
|
|
23
23
|
status?: IssuesPatchIssueRequestBody.Status;
|
|
24
|
-
/** Title of the issue.
|
|
24
|
+
/** Title of the issue. */
|
|
25
25
|
title?: string;
|
|
26
26
|
}
|
|
27
27
|
export declare namespace IssuesPatchIssueRequestBody {
|
|
28
|
-
/** Priority of the issue.
|
|
28
|
+
/** Priority of the issue. Valid values: `low`, `medium`, `high` */
|
|
29
29
|
const Priority: {
|
|
30
30
|
readonly Low: "low";
|
|
31
31
|
readonly Medium: "medium";
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.IssuesPatchIssueRequestBody = void 0;
|
|
5
5
|
var IssuesPatchIssueRequestBody;
|
|
6
6
|
(function (IssuesPatchIssueRequestBody) {
|
|
7
|
-
/** Priority of the issue.
|
|
7
|
+
/** Priority of the issue. Valid values: `low`, `medium`, `high` */
|
|
8
8
|
IssuesPatchIssueRequestBody.Priority = {
|
|
9
9
|
Low: "low",
|
|
10
10
|
Medium: "medium",
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type * as Samsara from "../../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* asset: {
|
|
6
|
+
* id: "hertzAssetId:HZ-100423"
|
|
7
|
+
* },
|
|
8
|
+
* title: "Front bumper scratch"
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface IssuesPostIssueRequestBody {
|
|
12
|
+
asset: Samsara.PostIssueRequestBodyAssetRequestBody;
|
|
13
|
+
assignedTo?: Samsara.PostIssueRequestBodyAssignedToRequestBody;
|
|
14
|
+
/** Description of the issue. */
|
|
15
|
+
description?: string;
|
|
16
|
+
/** Due date of the issue. UTC timestamp in RFC 3339 format. */
|
|
17
|
+
dueDate?: string;
|
|
18
|
+
/** A map of external ids */
|
|
19
|
+
externalIds?: Record<string, string>;
|
|
20
|
+
/** Media items to attach to the issue. */
|
|
21
|
+
media?: Samsara.FormSubmissionRequestMediaItemObjectRequestBody[];
|
|
22
|
+
/** Priority of the issue. Valid values: `low`, `medium`, `high` */
|
|
23
|
+
priority?: IssuesPostIssueRequestBody.Priority;
|
|
24
|
+
/** Status of the issue. Defaults to `open` when omitted. Valid values: `open`, `inProgress`, `resolved`, `dismissed` */
|
|
25
|
+
status?: IssuesPostIssueRequestBody.Status;
|
|
26
|
+
/** Title of the issue. */
|
|
27
|
+
title: string;
|
|
28
|
+
}
|
|
29
|
+
export declare namespace IssuesPostIssueRequestBody {
|
|
30
|
+
/** Priority of the issue. Valid values: `low`, `medium`, `high` */
|
|
31
|
+
const Priority: {
|
|
32
|
+
readonly Low: "low";
|
|
33
|
+
readonly Medium: "medium";
|
|
34
|
+
readonly High: "high";
|
|
35
|
+
};
|
|
36
|
+
type Priority = (typeof Priority)[keyof typeof Priority];
|
|
37
|
+
/** Status of the issue. Defaults to `open` when omitted. Valid values: `open`, `inProgress`, `resolved`, `dismissed` */
|
|
38
|
+
const Status: {
|
|
39
|
+
readonly Open: "open";
|
|
40
|
+
readonly InProgress: "inProgress";
|
|
41
|
+
readonly Resolved: "resolved";
|
|
42
|
+
readonly Dismissed: "dismissed";
|
|
43
|
+
};
|
|
44
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
45
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.IssuesPostIssueRequestBody = void 0;
|
|
5
|
+
var IssuesPostIssueRequestBody;
|
|
6
|
+
(function (IssuesPostIssueRequestBody) {
|
|
7
|
+
/** Priority of the issue. Valid values: `low`, `medium`, `high` */
|
|
8
|
+
IssuesPostIssueRequestBody.Priority = {
|
|
9
|
+
Low: "low",
|
|
10
|
+
Medium: "medium",
|
|
11
|
+
High: "high",
|
|
12
|
+
};
|
|
13
|
+
/** Status of the issue. Defaults to `open` when omitted. Valid values: `open`, `inProgress`, `resolved`, `dismissed` */
|
|
14
|
+
IssuesPostIssueRequestBody.Status = {
|
|
15
|
+
Open: "open",
|
|
16
|
+
InProgress: "inProgress",
|
|
17
|
+
Resolved: "resolved",
|
|
18
|
+
Dismissed: "dismissed",
|
|
19
|
+
};
|
|
20
|
+
})(IssuesPostIssueRequestBody || (exports.IssuesPostIssueRequestBody = IssuesPostIssueRequestBody = {}));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export type { GetIssuesRequest } from "./GetIssuesRequest.js";
|
|
2
2
|
export type { GetIssuesStreamRequest } from "./GetIssuesStreamRequest.js";
|
|
3
3
|
export { IssuesPatchIssueRequestBody } from "./IssuesPatchIssueRequestBody.js";
|
|
4
|
+
export { IssuesPostIssueRequestBody } from "./IssuesPostIssueRequestBody.js";
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IssuesPatchIssueRequestBody = void 0;
|
|
3
|
+
exports.IssuesPostIssueRequestBody = exports.IssuesPatchIssueRequestBody = void 0;
|
|
4
4
|
var IssuesPatchIssueRequestBody_js_1 = require("./IssuesPatchIssueRequestBody.js");
|
|
5
5
|
Object.defineProperty(exports, "IssuesPatchIssueRequestBody", { enumerable: true, get: function () { return IssuesPatchIssueRequestBody_js_1.IssuesPatchIssueRequestBody; } });
|
|
6
|
+
var IssuesPostIssueRequestBody_js_1 = require("./IssuesPostIssueRequestBody.js");
|
|
7
|
+
Object.defineProperty(exports, "IssuesPostIssueRequestBody", { enumerable: true, get: function () { return IssuesPostIssueRequestBody_js_1.IssuesPostIssueRequestBody; } });
|
|
@@ -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", "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", "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", "dashcamRoadFacing"],
|
|
6
6
|
* mediaType: "image",
|
|
7
7
|
* startTime: "2019-06-13T19:08:25Z",
|
|
8
8
|
* vehicleId: "1234"
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An internal server error occurred
|
|
3
|
+
*/
|
|
4
|
+
export interface IssuesPostIssueInternalServerErrorResponseBody {
|
|
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
|
+
* Requested endpoint is not yet implemented
|
|
3
|
+
*/
|
|
4
|
+
export interface IssuesPostIssueNotImplementedErrorResponseBody {
|
|
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,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Street view settings for a place.
|
|
3
|
+
*/
|
|
4
|
+
export interface PlaceStreetViewResponseRequestBody {
|
|
5
|
+
/** Camera heading. */
|
|
6
|
+
heading?: number | undefined;
|
|
7
|
+
/** Whether street view is enabled. */
|
|
8
|
+
isEnabled: boolean;
|
|
9
|
+
/** Latitude. */
|
|
10
|
+
latitude?: number | undefined;
|
|
11
|
+
/** Longitude. */
|
|
12
|
+
longitude?: number | undefined;
|
|
13
|
+
/** Camera pitch. */
|
|
14
|
+
pitch?: number | undefined;
|
|
15
|
+
/** Zoom level. */
|
|
16
|
+
zoom?: number | undefined;
|
|
17
|
+
}
|