@samsarahq/samsara 13.1.0 → 13.2.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/Client.d.ts +1 -1
- package/dist/cjs/api/resources/betaApIs/client/Client.js +1 -1
- package/dist/cjs/api/resources/betaApIs/client/requests/SafetyEventsV2PatchSafetyEventsV2BatchRequestBody.d.ts +1 -1
- package/dist/cjs/api/resources/issues/client/Client.js +2 -1
- package/dist/cjs/api/resources/issues/client/requests/GetIssuesStreamRequest.d.ts +3 -1
- package/dist/cjs/api/resources/issues/client/requests/IssuesPatchIssueRequestBody.d.ts +15 -0
- package/dist/cjs/api/resources/issues/client/requests/IssuesPatchIssueRequestBody.js +6 -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/Client.d.mts +1 -1
- package/dist/esm/api/resources/betaApIs/client/Client.mjs +1 -1
- package/dist/esm/api/resources/betaApIs/client/requests/SafetyEventsV2PatchSafetyEventsV2BatchRequestBody.d.mts +1 -1
- package/dist/esm/api/resources/issues/client/Client.mjs +2 -1
- package/dist/esm/api/resources/issues/client/requests/GetIssuesStreamRequest.d.mts +3 -1
- package/dist/esm/api/resources/issues/client/requests/IssuesPatchIssueRequestBody.d.mts +15 -0
- package/dist/esm/api/resources/issues/client/requests/IssuesPatchIssueRequestBody.mjs +6 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +1 -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.2.0",
|
|
48
|
+
"User-Agent": "@samsarahq/samsara/13.2.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",
|
|
@@ -2014,7 +2014,7 @@ export declare class BetaApIsClient {
|
|
|
2014
2014
|
*
|
|
2015
2015
|
* @example
|
|
2016
2016
|
* await client.betaApIs.patchSafetyEventsV2Batch({
|
|
2017
|
-
* safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"
|
|
2017
|
+
* safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"]
|
|
2018
2018
|
* })
|
|
2019
2019
|
*/
|
|
2020
2020
|
patchSafetyEventsV2Batch(request: Samsara.SafetyEventsV2PatchSafetyEventsV2BatchRequestBody, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.SafetyEventsV2PatchSafetyEventsV2BatchResponseBody>;
|
|
@@ -5851,7 +5851,7 @@ class BetaApIsClient {
|
|
|
5851
5851
|
*
|
|
5852
5852
|
* @example
|
|
5853
5853
|
* await client.betaApIs.patchSafetyEventsV2Batch({
|
|
5854
|
-
* safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"
|
|
5854
|
+
* safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"]
|
|
5855
5855
|
* })
|
|
5856
5856
|
*/
|
|
5857
5857
|
patchSafetyEventsV2Batch(request, requestOptions) {
|
|
@@ -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"
|
|
5
|
+
* safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"]
|
|
6
6
|
* }
|
|
7
7
|
*/
|
|
8
8
|
export interface SafetyEventsV2PatchSafetyEventsV2BatchRequestBody {
|
|
@@ -257,13 +257,14 @@ class IssuesClient {
|
|
|
257
257
|
__getIssuesStream(request, requestOptions) {
|
|
258
258
|
return __awaiter(this, void 0, void 0, function* () {
|
|
259
259
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
260
|
-
const { startTime, endTime, after, status, assetIds, include, assignedToRouteStopIds } = request;
|
|
260
|
+
const { startTime, endTime, after, status, assetIds, assetExternalIds, include, assignedToRouteStopIds } = request;
|
|
261
261
|
const _queryParams = {
|
|
262
262
|
startTime,
|
|
263
263
|
endTime,
|
|
264
264
|
after,
|
|
265
265
|
status,
|
|
266
266
|
assetIds,
|
|
267
|
+
assetExternalIds,
|
|
267
268
|
include,
|
|
268
269
|
assignedToRouteStopIds,
|
|
269
270
|
};
|
|
@@ -13,8 +13,10 @@ export interface GetIssuesStreamRequest {
|
|
|
13
13
|
after?: string;
|
|
14
14
|
/** A comma-separated list containing status values to filter issues on. Valid values: `open`, `inProgress`, `resolved`, `dismissed` */
|
|
15
15
|
status?: string | string[];
|
|
16
|
-
/** A comma-separated list containing up to 50 asset IDs to filter issues on.
|
|
16
|
+
/** A comma-separated list containing up to 50 asset IDs to filter issues on. Each value can be a Samsara asset ID, an [external ID](https://developers.samsara.com/docs/external-ids) (`key:value` format), or the literal `untracked` to include issues with untracked assets. */
|
|
17
17
|
assetIds?: string | string[];
|
|
18
|
+
/** A comma-separated list containing up to 50 asset [external IDs](https://developers.samsara.com/docs/external-ids) (`key:value` format) to filter issues on. */
|
|
19
|
+
assetExternalIds?: string | string[];
|
|
18
20
|
/** A comma separated list of additional fields to include on requested objects. Valid values: `externalIds` */
|
|
19
21
|
include?: string | string[];
|
|
20
22
|
/** A comma-separated list containing up to 50 route stop IDs to filter data on. */
|
|
@@ -7,16 +7,31 @@ import type * as Samsara from "../../../../index.js";
|
|
|
7
7
|
*/
|
|
8
8
|
export interface IssuesPatchIssueRequestBody {
|
|
9
9
|
assignedTo?: Samsara.PatchIssueRequestBodyAssignedToRequestBody;
|
|
10
|
+
/** Description of the issue. Requires the `issue-api-media-attachment-endpoints` feature. */
|
|
11
|
+
description?: string;
|
|
10
12
|
/** Due date of the issue. UTC timestamp in RFC 3339 format. */
|
|
11
13
|
dueDate?: string;
|
|
12
14
|
/** A map of external ids */
|
|
13
15
|
externalIds?: Record<string, string>;
|
|
14
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. */
|
|
15
17
|
id: string;
|
|
18
|
+
/** Media items to append to the issue. Requires the `issue-api-media-attachment-endpoints` feature. */
|
|
19
|
+
media?: Samsara.FormSubmissionRequestMediaItemObjectRequestBody[];
|
|
20
|
+
/** Priority of the issue. Requires the `issue-api-media-attachment-endpoints` feature. Valid values: `low`, `medium`, `high` */
|
|
21
|
+
priority?: IssuesPatchIssueRequestBody.Priority;
|
|
16
22
|
/** Status of the issue. Valid values: `open`, `inProgress`, `resolved`, `dismissed` */
|
|
17
23
|
status?: IssuesPatchIssueRequestBody.Status;
|
|
24
|
+
/** Title of the issue. Requires the `issue-api-media-attachment-endpoints` feature. */
|
|
25
|
+
title?: string;
|
|
18
26
|
}
|
|
19
27
|
export declare namespace IssuesPatchIssueRequestBody {
|
|
28
|
+
/** Priority of the issue. Requires the `issue-api-media-attachment-endpoints` feature. Valid values: `low`, `medium`, `high` */
|
|
29
|
+
const Priority: {
|
|
30
|
+
readonly Low: "low";
|
|
31
|
+
readonly Medium: "medium";
|
|
32
|
+
readonly High: "high";
|
|
33
|
+
};
|
|
34
|
+
type Priority = (typeof Priority)[keyof typeof Priority];
|
|
20
35
|
/** Status of the issue. Valid values: `open`, `inProgress`, `resolved`, `dismissed` */
|
|
21
36
|
const Status: {
|
|
22
37
|
readonly Open: "open";
|
|
@@ -4,6 +4,12 @@ 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. Requires the `issue-api-media-attachment-endpoints` feature. Valid values: `low`, `medium`, `high` */
|
|
8
|
+
IssuesPatchIssueRequestBody.Priority = {
|
|
9
|
+
Low: "low",
|
|
10
|
+
Medium: "medium",
|
|
11
|
+
High: "high",
|
|
12
|
+
};
|
|
7
13
|
/** Status of the issue. Valid values: `open`, `inProgress`, `resolved`, `dismissed` */
|
|
8
14
|
IssuesPatchIssueRequestBody.Status = {
|
|
9
15
|
Open: "open",
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "13.
|
|
1
|
+
export declare const SDK_VERSION = "13.2.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -7,8 +7,8 @@ export function normalizeClientOptions(options) {
|
|
|
7
7
|
const headers = mergeHeaders({
|
|
8
8
|
"X-Fern-Language": "JavaScript",
|
|
9
9
|
"X-Fern-SDK-Name": "@samsarahq/samsara",
|
|
10
|
-
"X-Fern-SDK-Version": "13.
|
|
11
|
-
"User-Agent": "@samsarahq/samsara/13.
|
|
10
|
+
"X-Fern-SDK-Version": "13.2.0",
|
|
11
|
+
"User-Agent": "@samsarahq/samsara/13.2.0",
|
|
12
12
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
13
13
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
14
14
|
"X-Samsara-Version": (_a = options === null || options === void 0 ? void 0 : options.version) !== null && _a !== void 0 ? _a : "2025-06-11",
|
|
@@ -2014,7 +2014,7 @@ export declare class BetaApIsClient {
|
|
|
2014
2014
|
*
|
|
2015
2015
|
* @example
|
|
2016
2016
|
* await client.betaApIs.patchSafetyEventsV2Batch({
|
|
2017
|
-
* safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"
|
|
2017
|
+
* safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"]
|
|
2018
2018
|
* })
|
|
2019
2019
|
*/
|
|
2020
2020
|
patchSafetyEventsV2Batch(request: Samsara.SafetyEventsV2PatchSafetyEventsV2BatchRequestBody, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.SafetyEventsV2PatchSafetyEventsV2BatchResponseBody>;
|
|
@@ -5815,7 +5815,7 @@ export class BetaApIsClient {
|
|
|
5815
5815
|
*
|
|
5816
5816
|
* @example
|
|
5817
5817
|
* await client.betaApIs.patchSafetyEventsV2Batch({
|
|
5818
|
-
* safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"
|
|
5818
|
+
* safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"]
|
|
5819
5819
|
* })
|
|
5820
5820
|
*/
|
|
5821
5821
|
patchSafetyEventsV2Batch(request, requestOptions) {
|
|
@@ -2,7 +2,7 @@ import type * as Samsara from "../../../../index.mjs";
|
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
|
-
* safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"
|
|
5
|
+
* safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"]
|
|
6
6
|
* }
|
|
7
7
|
*/
|
|
8
8
|
export interface SafetyEventsV2PatchSafetyEventsV2BatchRequestBody {
|
|
@@ -221,13 +221,14 @@ export class IssuesClient {
|
|
|
221
221
|
__getIssuesStream(request, requestOptions) {
|
|
222
222
|
return __awaiter(this, void 0, void 0, function* () {
|
|
223
223
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
224
|
-
const { startTime, endTime, after, status, assetIds, include, assignedToRouteStopIds } = request;
|
|
224
|
+
const { startTime, endTime, after, status, assetIds, assetExternalIds, include, assignedToRouteStopIds } = request;
|
|
225
225
|
const _queryParams = {
|
|
226
226
|
startTime,
|
|
227
227
|
endTime,
|
|
228
228
|
after,
|
|
229
229
|
status,
|
|
230
230
|
assetIds,
|
|
231
|
+
assetExternalIds,
|
|
231
232
|
include,
|
|
232
233
|
assignedToRouteStopIds,
|
|
233
234
|
};
|
|
@@ -13,8 +13,10 @@ export interface GetIssuesStreamRequest {
|
|
|
13
13
|
after?: string;
|
|
14
14
|
/** A comma-separated list containing status values to filter issues on. Valid values: `open`, `inProgress`, `resolved`, `dismissed` */
|
|
15
15
|
status?: string | string[];
|
|
16
|
-
/** A comma-separated list containing up to 50 asset IDs to filter issues on.
|
|
16
|
+
/** A comma-separated list containing up to 50 asset IDs to filter issues on. Each value can be a Samsara asset ID, an [external ID](https://developers.samsara.com/docs/external-ids) (`key:value` format), or the literal `untracked` to include issues with untracked assets. */
|
|
17
17
|
assetIds?: string | string[];
|
|
18
|
+
/** A comma-separated list containing up to 50 asset [external IDs](https://developers.samsara.com/docs/external-ids) (`key:value` format) to filter issues on. */
|
|
19
|
+
assetExternalIds?: string | string[];
|
|
18
20
|
/** A comma separated list of additional fields to include on requested objects. Valid values: `externalIds` */
|
|
19
21
|
include?: string | string[];
|
|
20
22
|
/** A comma-separated list containing up to 50 route stop IDs to filter data on. */
|
|
@@ -7,16 +7,31 @@ import type * as Samsara from "../../../../index.mjs";
|
|
|
7
7
|
*/
|
|
8
8
|
export interface IssuesPatchIssueRequestBody {
|
|
9
9
|
assignedTo?: Samsara.PatchIssueRequestBodyAssignedToRequestBody;
|
|
10
|
+
/** Description of the issue. Requires the `issue-api-media-attachment-endpoints` feature. */
|
|
11
|
+
description?: string;
|
|
10
12
|
/** Due date of the issue. UTC timestamp in RFC 3339 format. */
|
|
11
13
|
dueDate?: string;
|
|
12
14
|
/** A map of external ids */
|
|
13
15
|
externalIds?: Record<string, string>;
|
|
14
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. */
|
|
15
17
|
id: string;
|
|
18
|
+
/** Media items to append to the issue. Requires the `issue-api-media-attachment-endpoints` feature. */
|
|
19
|
+
media?: Samsara.FormSubmissionRequestMediaItemObjectRequestBody[];
|
|
20
|
+
/** Priority of the issue. Requires the `issue-api-media-attachment-endpoints` feature. Valid values: `low`, `medium`, `high` */
|
|
21
|
+
priority?: IssuesPatchIssueRequestBody.Priority;
|
|
16
22
|
/** Status of the issue. Valid values: `open`, `inProgress`, `resolved`, `dismissed` */
|
|
17
23
|
status?: IssuesPatchIssueRequestBody.Status;
|
|
24
|
+
/** Title of the issue. Requires the `issue-api-media-attachment-endpoints` feature. */
|
|
25
|
+
title?: string;
|
|
18
26
|
}
|
|
19
27
|
export declare namespace IssuesPatchIssueRequestBody {
|
|
28
|
+
/** Priority of the issue. Requires the `issue-api-media-attachment-endpoints` feature. Valid values: `low`, `medium`, `high` */
|
|
29
|
+
const Priority: {
|
|
30
|
+
readonly Low: "low";
|
|
31
|
+
readonly Medium: "medium";
|
|
32
|
+
readonly High: "high";
|
|
33
|
+
};
|
|
34
|
+
type Priority = (typeof Priority)[keyof typeof Priority];
|
|
20
35
|
/** Status of the issue. Valid values: `open`, `inProgress`, `resolved`, `dismissed` */
|
|
21
36
|
const Status: {
|
|
22
37
|
readonly Open: "open";
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
export var IssuesPatchIssueRequestBody;
|
|
3
3
|
(function (IssuesPatchIssueRequestBody) {
|
|
4
|
+
/** Priority of the issue. Requires the `issue-api-media-attachment-endpoints` feature. Valid values: `low`, `medium`, `high` */
|
|
5
|
+
IssuesPatchIssueRequestBody.Priority = {
|
|
6
|
+
Low: "low",
|
|
7
|
+
Medium: "medium",
|
|
8
|
+
High: "high",
|
|
9
|
+
};
|
|
4
10
|
/** Status of the issue. Valid values: `open`, `inProgress`, `resolved`, `dismissed` */
|
|
5
11
|
IssuesPatchIssueRequestBody.Status = {
|
|
6
12
|
Open: "open",
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "13.
|
|
1
|
+
export declare const SDK_VERSION = "13.2.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "13.
|
|
1
|
+
export const SDK_VERSION = "13.2.0";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -6234,7 +6234,7 @@ To use this endpoint, select **Write Safety Events & Scores** under the Safety &
|
|
|
6234
6234
|
|
|
6235
6235
|
```typescript
|
|
6236
6236
|
await client.betaApIs.patchSafetyEventsV2Batch({
|
|
6237
|
-
safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"
|
|
6237
|
+
safetyEventIds: ["bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590", "bb2ff5ab-30ad-49ec-9d2d-55ec30bbf590"]
|
|
6238
6238
|
});
|
|
6239
6239
|
|
|
6240
6240
|
```
|