@samsarahq/samsara 11.2.0 → 11.3.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.2.0",
48
- "User-Agent": "@samsarahq/samsara/11.2.0",
47
+ "X-Fern-SDK-Version": "11.3.0",
48
+ "User-Agent": "@samsarahq/samsara/11.3.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",
@@ -1323,7 +1323,6 @@ export declare class BetaApIsClient {
1323
1323
  * @example
1324
1324
  * await client.betaApIs.postReadings({
1325
1325
  * data: [{
1326
- * entityId: "123451234512345",
1327
1326
  * entityType: "asset",
1328
1327
  * happenedAtTime: "2023-10-27T10:00:00Z",
1329
1328
  * readingId: "airInletPressure",
@@ -3826,7 +3826,6 @@ class BetaApIsClient {
3826
3826
  * @example
3827
3827
  * await client.betaApIs.postReadings({
3828
3828
  * data: [{
3829
- * entityId: "123451234512345",
3830
3829
  * entityType: "asset",
3831
3830
  * happenedAtTime: "2023-10-27T10:00:00Z",
3832
3831
  * readingId: "airInletPressure",
@@ -3,7 +3,6 @@ import type * as Samsara from "../../../../index.js";
3
3
  * @example
4
4
  * {
5
5
  * data: [{
6
- * entityId: "123451234512345",
7
6
  * entityType: "asset",
8
7
  * happenedAtTime: "2023-10-27T10:00:00Z",
9
8
  * readingId: "airInletPressure",
@@ -2,10 +2,12 @@
2
2
  * A single reading data point to be created.
3
3
  */
4
4
  export interface ReadingDatapointRequestBody {
5
- /** Samsara entity ID. In case of an asset, it’s the assetId. If the asset is not yet present in the system, it is required to create a new one via the /assets endpoint. */
6
- entityId: string;
5
+ /** Samsara entity ID. Required if externalId is not provided. In case of an asset, it’s the assetId. If the asset is not yet present in the system, it is required to create a new one via the /assets endpoint. */
6
+ entityId?: string | undefined;
7
7
  /** The type of the entity (e.g., asset). Valid values: `asset` */
8
8
  entityType: ReadingDatapointRequestBody.EntityType;
9
+ /** An external ID in key:value format. Required if entityId is not provided. Use this to reference an asset by its external ID instead of the Samsara entity ID. */
10
+ externalId?: string | undefined;
9
11
  /** The timestamp of when the reading happened in RFC 3339 format. happenedAtTime must not be older than the last known reading for the same series. */
10
12
  happenedAtTime: string;
11
13
  /** The ID of the reading, you can get it from the /readings/definitions endpoint. */
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "11.2.0";
1
+ export declare const SDK_VERSION = "11.3.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.2.0";
4
+ exports.SDK_VERSION = "11.3.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.2.0",
11
- "User-Agent": "@samsarahq/samsara/11.2.0",
10
+ "X-Fern-SDK-Version": "11.3.0",
11
+ "User-Agent": "@samsarahq/samsara/11.3.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",
@@ -1323,7 +1323,6 @@ export declare class BetaApIsClient {
1323
1323
  * @example
1324
1324
  * await client.betaApIs.postReadings({
1325
1325
  * data: [{
1326
- * entityId: "123451234512345",
1327
1326
  * entityType: "asset",
1328
1327
  * happenedAtTime: "2023-10-27T10:00:00Z",
1329
1328
  * readingId: "airInletPressure",
@@ -3790,7 +3790,6 @@ export class BetaApIsClient {
3790
3790
  * @example
3791
3791
  * await client.betaApIs.postReadings({
3792
3792
  * data: [{
3793
- * entityId: "123451234512345",
3794
3793
  * entityType: "asset",
3795
3794
  * happenedAtTime: "2023-10-27T10:00:00Z",
3796
3795
  * readingId: "airInletPressure",
@@ -3,7 +3,6 @@ import type * as Samsara from "../../../../index.mjs";
3
3
  * @example
4
4
  * {
5
5
  * data: [{
6
- * entityId: "123451234512345",
7
6
  * entityType: "asset",
8
7
  * happenedAtTime: "2023-10-27T10:00:00Z",
9
8
  * readingId: "airInletPressure",
@@ -2,10 +2,12 @@
2
2
  * A single reading data point to be created.
3
3
  */
4
4
  export interface ReadingDatapointRequestBody {
5
- /** Samsara entity ID. In case of an asset, it’s the assetId. If the asset is not yet present in the system, it is required to create a new one via the /assets endpoint. */
6
- entityId: string;
5
+ /** Samsara entity ID. Required if externalId is not provided. In case of an asset, it’s the assetId. If the asset is not yet present in the system, it is required to create a new one via the /assets endpoint. */
6
+ entityId?: string | undefined;
7
7
  /** The type of the entity (e.g., asset). Valid values: `asset` */
8
8
  entityType: ReadingDatapointRequestBody.EntityType;
9
+ /** An external ID in key:value format. Required if entityId is not provided. Use this to reference an asset by its external ID instead of the Samsara entity ID. */
10
+ externalId?: string | undefined;
9
11
  /** The timestamp of when the reading happened in RFC 3339 format. happenedAtTime must not be older than the last known reading for the same series. */
10
12
  happenedAtTime: string;
11
13
  /** The ID of the reading, you can get it from the /readings/definitions endpoint. */
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "11.2.0";
1
+ export declare const SDK_VERSION = "11.3.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "11.2.0";
1
+ export const SDK_VERSION = "11.3.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@samsarahq/samsara",
3
- "version": "11.2.0",
3
+ "version": "11.3.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -4577,7 +4577,6 @@ To use this endpoint, select **Write Readings** under the Closed Beta category w
4577
4577
  ```typescript
4578
4578
  await client.betaApIs.postReadings({
4579
4579
  data: [{
4580
- entityId: "123451234512345",
4581
4580
  entityType: "asset",
4582
4581
  happenedAtTime: "2023-10-27T10:00:00Z",
4583
4582
  readingId: "airInletPressure",