@samsarahq/samsara 11.3.0 → 11.4.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.
@@ -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": "11.3.0",
48
- "User-Agent": "@samsarahq/samsara/11.3.0",
47
+ "X-Fern-SDK-Version": "11.4.0",
48
+ "User-Agent": "@samsarahq/samsara/11.4.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",
@@ -96,7 +96,7 @@ class AssetsClient {
96
96
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
97
97
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
98
98
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
99
- const { type: type_, after, updatedAfterTime, includeExternalIds, includeTags, tagIds, parentTagIds, ids, attributeValueIds, attributes, } = request;
99
+ const { type: type_, after, updatedAfterTime, includeExternalIds, includeTags, tagIds, parentTagIds, ids, externalIds, attributeValueIds, attributes, } = request;
100
100
  const _queryParams = {
101
101
  type: type_ != null ? type_ : undefined,
102
102
  after,
@@ -106,6 +106,7 @@ class AssetsClient {
106
106
  tagIds,
107
107
  parentTagIds,
108
108
  ids,
109
+ externalIds,
109
110
  attributeValueIds,
110
111
  attributes,
111
112
  };
@@ -1,8 +1,11 @@
1
+ import type * as Samsara from "../../../../index.js";
1
2
  /**
2
3
  * @example
3
4
  * {}
4
5
  */
5
6
  export interface AssetsCreateAssetRequestBody {
7
+ /** A list of attributes to assign to the asset. */
8
+ attributes?: Samsara.GoaAttributeTinyRequestBody[];
6
9
  /** A map of external ids */
7
10
  externalIds?: Record<string, string>;
8
11
  /** The license plate of the asset. */
@@ -21,6 +24,8 @@ export interface AssetsCreateAssetRequestBody {
21
24
  regulationMode?: AssetsCreateAssetRequestBody.RegulationMode;
22
25
  /** The serial number of the asset. This can be an internal serial number or used to hold legacy VIN/PIN numbers such as ones of shorter lengths. */
23
26
  serialNumber?: string;
27
+ /** An array of IDs of tags to associate with this asset. If your access to the API is scoped by one or more tags, this field is required to pass in. */
28
+ tagIds?: string[];
24
29
  /** The operational context in which the asset interacts with the Samsara system. Examples: Vehicle (eg: truck, bus...), Trailer (eg: dry van, reefer, flatbed...), Powered Equipment (eg: dozer, crane...), Unpowered Equipment (eg: container, dumpster...), or Uncategorized. Valid values: `uncategorized`, `trailer`, `equipment`, `unpowered`, `vehicle` */
25
30
  type?: AssetsCreateAssetRequestBody.Type;
26
31
  /** The unique 17-digit VIN (Vehicle Identification Number) or PIN (Product Identification Number) of the asset. */
@@ -20,6 +20,8 @@ export interface ListAssetsRequest {
20
20
  parentTagIds?: string;
21
21
  /** A filter on the data based on this comma-separated list of asset IDs and External IDs. */
22
22
  ids?: string | string[];
23
+ /** A filter on the data based on this comma-separated list of external IDs. Example: `externalIds=maintenanceId:250020,vin:1HGBH41JXMN109186` */
24
+ externalIds?: string | string[];
23
25
  /** A filter on the data based on this comma-separated list of attribute value IDs. Only entities associated with ALL of the referenced values will be returned (i.e. the intersection of the sets of entities with each value). Example: `attributeValueIds=076efac2-83b5-47aa-ba36-18428436dcac,6707b3f0-23b9-4fe3-b7be-11be34aea544` */
24
26
  attributeValueIds?: string;
25
27
  /** A filter on the data to return entities within given range query (only for numeric and date attributes) separated by a comma. Only entities meeting all the conditions will be returned. At least one bound must be provided. Example: `attributes=Length:range(8,)&attributes=Length:range(10,20)&attributes=Date:range(2025-01-01,2025-01-31)` */
@@ -98,7 +98,7 @@ export declare class MediaClient {
98
98
  * @example
99
99
  * await client.media.postMediaRetrieval({
100
100
  * endTime: "2019-06-13T19:08:55Z",
101
- * inputs: ["dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing"],
101
+ * inputs: ["dashcamRoadFacing", "dashcamRoadFacing"],
102
102
  * mediaType: "image",
103
103
  * startTime: "2019-06-13T19:08:25Z",
104
104
  * vehicleId: "1234"
@@ -274,7 +274,7 @@ class MediaClient {
274
274
  * @example
275
275
  * await client.media.postMediaRetrieval({
276
276
  * endTime: "2019-06-13T19:08:55Z",
277
- * inputs: ["dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing"],
277
+ * inputs: ["dashcamRoadFacing", "dashcamRoadFacing"],
278
278
  * mediaType: "image",
279
279
  * startTime: "2019-06-13T19:08:25Z",
280
280
  * vehicleId: "1234"
@@ -2,7 +2,7 @@
2
2
  * @example
3
3
  * {
4
4
  * endTime: "2019-06-13T19:08:55Z",
5
- * inputs: ["dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing"],
5
+ * inputs: ["dashcamRoadFacing", "dashcamRoadFacing"],
6
6
  * mediaType: "image",
7
7
  * startTime: "2019-06-13T19:08:25Z",
8
8
  * vehicleId: "1234"
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "11.3.0";
1
+ export declare const SDK_VERSION = "11.4.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "11.3.0";
4
+ exports.SDK_VERSION = "11.4.0";
@@ -7,8 +7,8 @@ export function normalizeClientOptions(options) {
7
7
  const headers = mergeHeaders({
8
8
  "X-Fern-Language": "JavaScript",
9
9
  "X-Fern-SDK-Name": "@samsarahq/samsara",
10
- "X-Fern-SDK-Version": "11.3.0",
11
- "User-Agent": "@samsarahq/samsara/11.3.0",
10
+ "X-Fern-SDK-Version": "11.4.0",
11
+ "User-Agent": "@samsarahq/samsara/11.4.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",
@@ -60,7 +60,7 @@ export class AssetsClient {
60
60
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
61
61
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
62
62
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
63
- const { type: type_, after, updatedAfterTime, includeExternalIds, includeTags, tagIds, parentTagIds, ids, attributeValueIds, attributes, } = request;
63
+ const { type: type_, after, updatedAfterTime, includeExternalIds, includeTags, tagIds, parentTagIds, ids, externalIds, attributeValueIds, attributes, } = request;
64
64
  const _queryParams = {
65
65
  type: type_ != null ? type_ : undefined,
66
66
  after,
@@ -70,6 +70,7 @@ export class AssetsClient {
70
70
  tagIds,
71
71
  parentTagIds,
72
72
  ids,
73
+ externalIds,
73
74
  attributeValueIds,
74
75
  attributes,
75
76
  };
@@ -1,8 +1,11 @@
1
+ import type * as Samsara from "../../../../index.mjs";
1
2
  /**
2
3
  * @example
3
4
  * {}
4
5
  */
5
6
  export interface AssetsCreateAssetRequestBody {
7
+ /** A list of attributes to assign to the asset. */
8
+ attributes?: Samsara.GoaAttributeTinyRequestBody[];
6
9
  /** A map of external ids */
7
10
  externalIds?: Record<string, string>;
8
11
  /** The license plate of the asset. */
@@ -21,6 +24,8 @@ export interface AssetsCreateAssetRequestBody {
21
24
  regulationMode?: AssetsCreateAssetRequestBody.RegulationMode;
22
25
  /** The serial number of the asset. This can be an internal serial number or used to hold legacy VIN/PIN numbers such as ones of shorter lengths. */
23
26
  serialNumber?: string;
27
+ /** An array of IDs of tags to associate with this asset. If your access to the API is scoped by one or more tags, this field is required to pass in. */
28
+ tagIds?: string[];
24
29
  /** The operational context in which the asset interacts with the Samsara system. Examples: Vehicle (eg: truck, bus...), Trailer (eg: dry van, reefer, flatbed...), Powered Equipment (eg: dozer, crane...), Unpowered Equipment (eg: container, dumpster...), or Uncategorized. Valid values: `uncategorized`, `trailer`, `equipment`, `unpowered`, `vehicle` */
25
30
  type?: AssetsCreateAssetRequestBody.Type;
26
31
  /** The unique 17-digit VIN (Vehicle Identification Number) or PIN (Product Identification Number) of the asset. */
@@ -20,6 +20,8 @@ export interface ListAssetsRequest {
20
20
  parentTagIds?: string;
21
21
  /** A filter on the data based on this comma-separated list of asset IDs and External IDs. */
22
22
  ids?: string | string[];
23
+ /** A filter on the data based on this comma-separated list of external IDs. Example: `externalIds=maintenanceId:250020,vin:1HGBH41JXMN109186` */
24
+ externalIds?: string | string[];
23
25
  /** A filter on the data based on this comma-separated list of attribute value IDs. Only entities associated with ALL of the referenced values will be returned (i.e. the intersection of the sets of entities with each value). Example: `attributeValueIds=076efac2-83b5-47aa-ba36-18428436dcac,6707b3f0-23b9-4fe3-b7be-11be34aea544` */
24
26
  attributeValueIds?: string;
25
27
  /** A filter on the data to return entities within given range query (only for numeric and date attributes) separated by a comma. Only entities meeting all the conditions will be returned. At least one bound must be provided. Example: `attributes=Length:range(8,)&attributes=Length:range(10,20)&attributes=Date:range(2025-01-01,2025-01-31)` */
@@ -98,7 +98,7 @@ export declare class MediaClient {
98
98
  * @example
99
99
  * await client.media.postMediaRetrieval({
100
100
  * endTime: "2019-06-13T19:08:55Z",
101
- * inputs: ["dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing"],
101
+ * inputs: ["dashcamRoadFacing", "dashcamRoadFacing"],
102
102
  * mediaType: "image",
103
103
  * startTime: "2019-06-13T19:08:25Z",
104
104
  * vehicleId: "1234"
@@ -238,7 +238,7 @@ export class MediaClient {
238
238
  * @example
239
239
  * await client.media.postMediaRetrieval({
240
240
  * endTime: "2019-06-13T19:08:55Z",
241
- * inputs: ["dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing"],
241
+ * inputs: ["dashcamRoadFacing", "dashcamRoadFacing"],
242
242
  * mediaType: "image",
243
243
  * startTime: "2019-06-13T19:08:25Z",
244
244
  * vehicleId: "1234"
@@ -2,7 +2,7 @@
2
2
  * @example
3
3
  * {
4
4
  * endTime: "2019-06-13T19:08:55Z",
5
- * inputs: ["dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing"],
5
+ * inputs: ["dashcamRoadFacing", "dashcamRoadFacing"],
6
6
  * mediaType: "image",
7
7
  * startTime: "2019-06-13T19:08:25Z",
8
8
  * vehicleId: "1234"
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "11.3.0";
1
+ export declare const SDK_VERSION = "11.4.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "11.3.0";
1
+ export const SDK_VERSION = "11.4.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@samsarahq/samsara",
3
- "version": "11.3.0",
3
+ "version": "11.4.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -6893,7 +6893,7 @@ To use this endpoint, select **Write Media Retrieval** under the Safety & Camera
6893
6893
  ```typescript
6894
6894
  await client.media.postMediaRetrieval({
6895
6895
  endTime: "2019-06-13T19:08:55Z",
6896
- inputs: ["dashcamRoadFacing", "dashcamRoadFacing", "dashcamRoadFacing"],
6896
+ inputs: ["dashcamRoadFacing", "dashcamRoadFacing"],
6897
6897
  mediaType: "image",
6898
6898
  startTime: "2019-06-13T19:08:25Z",
6899
6899
  vehicleId: "1234"