@samsarahq/samsara 8.0.0 → 8.1.1
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 +2 -1
- package/dist/cjs/api/resources/alerts/client/Client.js +2 -1
- package/dist/cjs/api/resources/alerts/client/requests/AlertsPostConfigurationsRequestBody.d.ts +1 -1
- package/dist/cjs/api/resources/betaApIs/client/Client.d.ts +125 -1
- package/dist/cjs/api/resources/betaApIs/client/Client.js +350 -1
- package/dist/cjs/api/resources/betaApIs/client/requests/DeployFunctionRequest.d.ts +10 -0
- package/dist/cjs/api/resources/betaApIs/client/requests/DeployFunctionRequest.js +3 -0
- package/dist/cjs/api/resources/betaApIs/client/requests/FunctionsCreateFunctionRequestBody.d.ts +17 -0
- package/dist/cjs/api/resources/betaApIs/client/requests/FunctionsCreateFunctionRequestBody.js +3 -0
- package/dist/cjs/api/resources/betaApIs/client/requests/FunctionsPatchFunctionRequestBody.d.ts +17 -0
- package/dist/cjs/api/resources/betaApIs/client/requests/FunctionsPatchFunctionRequestBody.js +3 -0
- package/dist/cjs/api/resources/betaApIs/client/requests/GetFunctionRequest.d.ts +10 -0
- package/dist/cjs/api/resources/betaApIs/client/requests/GetFunctionRequest.js +3 -0
- package/dist/cjs/api/resources/betaApIs/client/requests/GetReadingsHistoryRequest.d.ts +3 -3
- package/dist/cjs/api/resources/betaApIs/client/requests/GetReadingsSnapshotRequest.d.ts +3 -3
- package/dist/cjs/api/resources/betaApIs/client/requests/ListReadingsDefinitionsRequest.d.ts +1 -1
- package/dist/cjs/api/resources/betaApIs/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/previewApIs/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/previewApIs/client/Client.js +1 -1
- package/dist/cjs/api/resources/previewApIs/client/requests/SafetyEventsV2PatchSafetyEventsV2BatchRequestBody.d.ts +69 -5
- package/dist/cjs/api/resources/previewApIs/client/requests/SafetyEventsV2PatchSafetyEventsV2BatchRequestBody.js +62 -0
- package/dist/cjs/api/types/CreateFunctionDetailResponseBody.d.ts +21 -0
- package/dist/cjs/api/types/CreateFunctionDetailResponseBody.js +3 -0
- package/dist/cjs/api/types/CreateFunctionRequestConfigRequestBody.d.ts +25 -0
- package/dist/cjs/api/types/CreateFunctionRequestConfigRequestBody.js +3 -0
- package/dist/cjs/api/types/DeployFunctionDetailResponseBody.d.ts +7 -0
- package/dist/cjs/api/types/DeployFunctionDetailResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionCodePackageResponseBody.d.ts +19 -0
- package/dist/cjs/api/types/FunctionCodePackageResponseBody.js +14 -0
- package/dist/cjs/api/types/FunctionConfigResponseBody.d.ts +25 -0
- package/dist/cjs/api/types/FunctionConfigResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionEffectsResponseBody.d.ts +7 -0
- package/dist/cjs/api/types/FunctionEffectsResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionScheduleEntryRequestBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionScheduleEntryRequestBody.js +3 -0
- package/dist/cjs/api/types/FunctionScheduleEntryResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionScheduleEntryResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionScheduleRequestBody.d.ts +10 -0
- package/dist/cjs/api/types/FunctionScheduleRequestBody.js +3 -0
- package/dist/cjs/api/types/FunctionScheduleResponseBody.d.ts +10 -0
- package/dist/cjs/api/types/FunctionScheduleResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsCreateFunctionBadGatewayErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsCreateFunctionBadGatewayErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsCreateFunctionGatewayTimeoutErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsCreateFunctionGatewayTimeoutErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsCreateFunctionInternalServerErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsCreateFunctionInternalServerErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsCreateFunctionMethodNotAllowedErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsCreateFunctionMethodNotAllowedErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsCreateFunctionNotFoundErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsCreateFunctionNotFoundErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsCreateFunctionNotImplementedErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsCreateFunctionNotImplementedErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsCreateFunctionResponseBody.d.ts +4 -0
- package/dist/cjs/api/types/FunctionsCreateFunctionResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsCreateFunctionServiceUnavailableErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsCreateFunctionServiceUnavailableErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsCreateFunctionTooManyRequestsErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsCreateFunctionTooManyRequestsErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsCreateFunctionUnauthorizedErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsCreateFunctionUnauthorizedErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsDeployFunctionBadGatewayErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsDeployFunctionBadGatewayErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsDeployFunctionGatewayTimeoutErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsDeployFunctionGatewayTimeoutErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsDeployFunctionInternalServerErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsDeployFunctionInternalServerErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsDeployFunctionMethodNotAllowedErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsDeployFunctionMethodNotAllowedErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsDeployFunctionNotFoundErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsDeployFunctionNotFoundErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsDeployFunctionNotImplementedErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsDeployFunctionNotImplementedErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsDeployFunctionResponseBody.d.ts +4 -0
- package/dist/cjs/api/types/FunctionsDeployFunctionResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsDeployFunctionServiceUnavailableErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsDeployFunctionServiceUnavailableErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsDeployFunctionTooManyRequestsErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsDeployFunctionTooManyRequestsErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsDeployFunctionUnauthorizedErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsDeployFunctionUnauthorizedErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsGetFunctionBadGatewayErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsGetFunctionBadGatewayErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsGetFunctionGatewayTimeoutErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsGetFunctionGatewayTimeoutErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsGetFunctionInternalServerErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsGetFunctionInternalServerErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsGetFunctionMethodNotAllowedErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsGetFunctionMethodNotAllowedErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsGetFunctionNotFoundErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsGetFunctionNotFoundErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsGetFunctionNotImplementedErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsGetFunctionNotImplementedErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsGetFunctionResponseBody.d.ts +4 -0
- package/dist/cjs/api/types/FunctionsGetFunctionResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsGetFunctionServiceUnavailableErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsGetFunctionServiceUnavailableErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsGetFunctionTooManyRequestsErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsGetFunctionTooManyRequestsErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsGetFunctionUnauthorizedErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsGetFunctionUnauthorizedErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsPatchFunctionBadGatewayErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsPatchFunctionBadGatewayErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsPatchFunctionGatewayTimeoutErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsPatchFunctionGatewayTimeoutErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsPatchFunctionInternalServerErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsPatchFunctionInternalServerErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsPatchFunctionMethodNotAllowedErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsPatchFunctionMethodNotAllowedErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsPatchFunctionNotFoundErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsPatchFunctionNotFoundErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsPatchFunctionNotImplementedErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsPatchFunctionNotImplementedErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsPatchFunctionResponseBody.d.ts +4 -0
- package/dist/cjs/api/types/FunctionsPatchFunctionResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsPatchFunctionServiceUnavailableErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsPatchFunctionServiceUnavailableErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsPatchFunctionTooManyRequestsErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsPatchFunctionTooManyRequestsErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/FunctionsPatchFunctionUnauthorizedErrorResponseBody.d.ts +9 -0
- package/dist/cjs/api/types/FunctionsPatchFunctionUnauthorizedErrorResponseBody.js +3 -0
- package/dist/cjs/api/types/GetFunctionDetailResponseBody.d.ts +19 -0
- package/dist/cjs/api/types/GetFunctionDetailResponseBody.js +3 -0
- package/dist/cjs/api/types/PatchFunctionDetailResponseBody.d.ts +13 -0
- package/dist/cjs/api/types/PatchFunctionDetailResponseBody.js +3 -0
- package/dist/cjs/api/types/PatchFunctionRequestConfigRequestBody.d.ts +25 -0
- package/dist/cjs/api/types/PatchFunctionRequestConfigRequestBody.js +3 -0
- package/dist/cjs/api/types/ReadingHistoryResponseBody.d.ts +1 -1
- package/dist/cjs/api/types/ReadingSnapshotResponseBody.d.ts +1 -1
- package/dist/cjs/api/types/index.d.ts +53 -0
- package/dist/cjs/api/types/index.js +53 -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 +2 -1
- package/dist/esm/api/resources/alerts/client/Client.mjs +2 -1
- package/dist/esm/api/resources/alerts/client/requests/AlertsPostConfigurationsRequestBody.d.mts +1 -1
- package/dist/esm/api/resources/betaApIs/client/Client.d.mts +125 -1
- package/dist/esm/api/resources/betaApIs/client/Client.mjs +350 -1
- package/dist/esm/api/resources/betaApIs/client/requests/DeployFunctionRequest.d.mts +10 -0
- package/dist/esm/api/resources/betaApIs/client/requests/DeployFunctionRequest.mjs +2 -0
- package/dist/esm/api/resources/betaApIs/client/requests/FunctionsCreateFunctionRequestBody.d.mts +17 -0
- package/dist/esm/api/resources/betaApIs/client/requests/FunctionsCreateFunctionRequestBody.mjs +2 -0
- package/dist/esm/api/resources/betaApIs/client/requests/FunctionsPatchFunctionRequestBody.d.mts +17 -0
- package/dist/esm/api/resources/betaApIs/client/requests/FunctionsPatchFunctionRequestBody.mjs +2 -0
- package/dist/esm/api/resources/betaApIs/client/requests/GetFunctionRequest.d.mts +10 -0
- package/dist/esm/api/resources/betaApIs/client/requests/GetFunctionRequest.mjs +2 -0
- package/dist/esm/api/resources/betaApIs/client/requests/GetReadingsHistoryRequest.d.mts +3 -3
- package/dist/esm/api/resources/betaApIs/client/requests/GetReadingsSnapshotRequest.d.mts +3 -3
- package/dist/esm/api/resources/betaApIs/client/requests/ListReadingsDefinitionsRequest.d.mts +1 -1
- package/dist/esm/api/resources/betaApIs/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/previewApIs/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/previewApIs/client/Client.mjs +1 -1
- package/dist/esm/api/resources/previewApIs/client/requests/SafetyEventsV2PatchSafetyEventsV2BatchRequestBody.d.mts +69 -5
- package/dist/esm/api/resources/previewApIs/client/requests/SafetyEventsV2PatchSafetyEventsV2BatchRequestBody.mjs +62 -0
- package/dist/esm/api/types/CreateFunctionDetailResponseBody.d.mts +21 -0
- package/dist/esm/api/types/CreateFunctionDetailResponseBody.mjs +2 -0
- package/dist/esm/api/types/CreateFunctionRequestConfigRequestBody.d.mts +25 -0
- package/dist/esm/api/types/CreateFunctionRequestConfigRequestBody.mjs +2 -0
- package/dist/esm/api/types/DeployFunctionDetailResponseBody.d.mts +7 -0
- package/dist/esm/api/types/DeployFunctionDetailResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionCodePackageResponseBody.d.mts +19 -0
- package/dist/esm/api/types/FunctionCodePackageResponseBody.mjs +11 -0
- package/dist/esm/api/types/FunctionConfigResponseBody.d.mts +25 -0
- package/dist/esm/api/types/FunctionConfigResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionEffectsResponseBody.d.mts +7 -0
- package/dist/esm/api/types/FunctionEffectsResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionScheduleEntryRequestBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionScheduleEntryRequestBody.mjs +2 -0
- package/dist/esm/api/types/FunctionScheduleEntryResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionScheduleEntryResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionScheduleRequestBody.d.mts +10 -0
- package/dist/esm/api/types/FunctionScheduleRequestBody.mjs +2 -0
- package/dist/esm/api/types/FunctionScheduleResponseBody.d.mts +10 -0
- package/dist/esm/api/types/FunctionScheduleResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsCreateFunctionBadGatewayErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsCreateFunctionBadGatewayErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsCreateFunctionGatewayTimeoutErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsCreateFunctionGatewayTimeoutErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsCreateFunctionInternalServerErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsCreateFunctionInternalServerErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsCreateFunctionMethodNotAllowedErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsCreateFunctionMethodNotAllowedErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsCreateFunctionNotFoundErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsCreateFunctionNotFoundErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsCreateFunctionNotImplementedErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsCreateFunctionNotImplementedErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsCreateFunctionResponseBody.d.mts +4 -0
- package/dist/esm/api/types/FunctionsCreateFunctionResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsCreateFunctionServiceUnavailableErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsCreateFunctionServiceUnavailableErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsCreateFunctionTooManyRequestsErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsCreateFunctionTooManyRequestsErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsCreateFunctionUnauthorizedErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsCreateFunctionUnauthorizedErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsDeployFunctionBadGatewayErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsDeployFunctionBadGatewayErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsDeployFunctionGatewayTimeoutErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsDeployFunctionGatewayTimeoutErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsDeployFunctionInternalServerErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsDeployFunctionInternalServerErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsDeployFunctionMethodNotAllowedErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsDeployFunctionMethodNotAllowedErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsDeployFunctionNotFoundErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsDeployFunctionNotFoundErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsDeployFunctionNotImplementedErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsDeployFunctionNotImplementedErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsDeployFunctionResponseBody.d.mts +4 -0
- package/dist/esm/api/types/FunctionsDeployFunctionResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsDeployFunctionServiceUnavailableErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsDeployFunctionServiceUnavailableErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsDeployFunctionTooManyRequestsErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsDeployFunctionTooManyRequestsErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsDeployFunctionUnauthorizedErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsDeployFunctionUnauthorizedErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsGetFunctionBadGatewayErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsGetFunctionBadGatewayErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsGetFunctionGatewayTimeoutErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsGetFunctionGatewayTimeoutErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsGetFunctionInternalServerErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsGetFunctionInternalServerErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsGetFunctionMethodNotAllowedErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsGetFunctionMethodNotAllowedErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsGetFunctionNotFoundErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsGetFunctionNotFoundErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsGetFunctionNotImplementedErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsGetFunctionNotImplementedErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsGetFunctionResponseBody.d.mts +4 -0
- package/dist/esm/api/types/FunctionsGetFunctionResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsGetFunctionServiceUnavailableErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsGetFunctionServiceUnavailableErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsGetFunctionTooManyRequestsErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsGetFunctionTooManyRequestsErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsGetFunctionUnauthorizedErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsGetFunctionUnauthorizedErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsPatchFunctionBadGatewayErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsPatchFunctionBadGatewayErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsPatchFunctionGatewayTimeoutErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsPatchFunctionGatewayTimeoutErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsPatchFunctionInternalServerErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsPatchFunctionInternalServerErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsPatchFunctionMethodNotAllowedErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsPatchFunctionMethodNotAllowedErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsPatchFunctionNotFoundErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsPatchFunctionNotFoundErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsPatchFunctionNotImplementedErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsPatchFunctionNotImplementedErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsPatchFunctionResponseBody.d.mts +4 -0
- package/dist/esm/api/types/FunctionsPatchFunctionResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsPatchFunctionServiceUnavailableErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsPatchFunctionServiceUnavailableErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsPatchFunctionTooManyRequestsErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsPatchFunctionTooManyRequestsErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/FunctionsPatchFunctionUnauthorizedErrorResponseBody.d.mts +9 -0
- package/dist/esm/api/types/FunctionsPatchFunctionUnauthorizedErrorResponseBody.mjs +2 -0
- package/dist/esm/api/types/GetFunctionDetailResponseBody.d.mts +19 -0
- package/dist/esm/api/types/GetFunctionDetailResponseBody.mjs +2 -0
- package/dist/esm/api/types/PatchFunctionDetailResponseBody.d.mts +13 -0
- package/dist/esm/api/types/PatchFunctionDetailResponseBody.mjs +2 -0
- package/dist/esm/api/types/PatchFunctionRequestConfigRequestBody.d.mts +25 -0
- package/dist/esm/api/types/PatchFunctionRequestConfigRequestBody.mjs +2 -0
- package/dist/esm/api/types/ReadingHistoryResponseBody.d.mts +1 -1
- package/dist/esm/api/types/ReadingSnapshotResponseBody.d.mts +1 -1
- package/dist/esm/api/types/index.d.mts +53 -0
- package/dist/esm/api/types/index.mjs +53 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +296 -3
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": "8.
|
|
48
|
-
"User-Agent": "@samsarahq/samsara/8.
|
|
47
|
+
"X-Fern-SDK-Version": "8.1.1",
|
|
48
|
+
"User-Agent": "@samsarahq/samsara/8.1.1",
|
|
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",
|
|
@@ -30,6 +30,7 @@ export declare class AlertsClient {
|
|
|
30
30
|
* Vehicle Engine Idle
|
|
31
31
|
* Asset Engine On
|
|
32
32
|
* Asset Engine Off
|
|
33
|
+
* Harsh Event
|
|
33
34
|
* Scheduled Maintenance
|
|
34
35
|
* Scheduled Maintenance by Odometer
|
|
35
36
|
* Scheduled Maintenance by Engine Hours
|
|
@@ -115,7 +116,7 @@ export declare class AlertsClient {
|
|
|
115
116
|
* isEnabled: true,
|
|
116
117
|
* name: "My Harsh Event Alert",
|
|
117
118
|
* scope: {
|
|
118
|
-
* all:
|
|
119
|
+
* all: false
|
|
119
120
|
* },
|
|
120
121
|
* triggers: [{
|
|
121
122
|
* triggerTypeId: 1000
|
|
@@ -75,6 +75,7 @@ class AlertsClient {
|
|
|
75
75
|
* Vehicle Engine Idle
|
|
76
76
|
* Asset Engine On
|
|
77
77
|
* Asset Engine Off
|
|
78
|
+
* Harsh Event
|
|
78
79
|
* Scheduled Maintenance
|
|
79
80
|
* Scheduled Maintenance by Odometer
|
|
80
81
|
* Scheduled Maintenance by Engine Hours
|
|
@@ -221,7 +222,7 @@ class AlertsClient {
|
|
|
221
222
|
* isEnabled: true,
|
|
222
223
|
* name: "My Harsh Event Alert",
|
|
223
224
|
* scope: {
|
|
224
|
-
* all:
|
|
225
|
+
* all: false
|
|
225
226
|
* },
|
|
226
227
|
* triggers: [{
|
|
227
228
|
* triggerTypeId: 1000
|
|
@@ -788,6 +788,130 @@ export declare class BetaApIsClient {
|
|
|
788
788
|
*/
|
|
789
789
|
getEngineImmobilizerStates(request: Samsara.GetEngineImmobilizerStatesRequest, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.EngineImmobilizerGetEngineImmobilizerStatesResponseBody>;
|
|
790
790
|
private __getEngineImmobilizerStates;
|
|
791
|
+
/**
|
|
792
|
+
* Create a new Function with the given name, description, and configuration. The response includes a URL (`uploadPutUrl`) for uploading the function's code package. After uploading, call `POST /functions/{name}/deploy` to make the function runnable.
|
|
793
|
+
*
|
|
794
|
+
* <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>).
|
|
795
|
+
*
|
|
796
|
+
* To use this endpoint, select **Write Functions** 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>
|
|
797
|
+
*
|
|
798
|
+
*
|
|
799
|
+
* **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.
|
|
800
|
+
*
|
|
801
|
+
* @param {Samsara.FunctionsCreateFunctionRequestBody} request
|
|
802
|
+
* @param {BetaApIsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
803
|
+
*
|
|
804
|
+
* @throws {@link Samsara.UnauthorizedError}
|
|
805
|
+
* @throws {@link Samsara.NotFoundError}
|
|
806
|
+
* @throws {@link Samsara.MethodNotAllowedError}
|
|
807
|
+
* @throws {@link Samsara.TooManyRequestsError}
|
|
808
|
+
* @throws {@link Samsara.InternalServerError}
|
|
809
|
+
* @throws {@link Samsara.NotImplementedError}
|
|
810
|
+
* @throws {@link Samsara.BadGatewayError}
|
|
811
|
+
* @throws {@link Samsara.ServiceUnavailableError}
|
|
812
|
+
* @throws {@link Samsara.GatewayTimeoutError}
|
|
813
|
+
*
|
|
814
|
+
* @example
|
|
815
|
+
* await client.betaApIs.createFunction({
|
|
816
|
+
* config: {
|
|
817
|
+
* handler: "index.handler"
|
|
818
|
+
* },
|
|
819
|
+
* name: "my-function"
|
|
820
|
+
* })
|
|
821
|
+
*/
|
|
822
|
+
createFunction(request: Samsara.FunctionsCreateFunctionRequestBody, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.FunctionsCreateFunctionResponseBody>;
|
|
823
|
+
private __createFunction;
|
|
824
|
+
/**
|
|
825
|
+
* Retrieve the current state of an existing Function, including its configuration, code package status, and a `lastUpdateTimestampMs` value for use in subsequent PATCH requests.
|
|
826
|
+
*
|
|
827
|
+
* <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>).
|
|
828
|
+
*
|
|
829
|
+
* To use this endpoint, select **Read Functions** 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>
|
|
830
|
+
*
|
|
831
|
+
*
|
|
832
|
+
* **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.
|
|
833
|
+
*
|
|
834
|
+
* @param {Samsara.GetFunctionRequest} request
|
|
835
|
+
* @param {BetaApIsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
836
|
+
*
|
|
837
|
+
* @throws {@link Samsara.UnauthorizedError}
|
|
838
|
+
* @throws {@link Samsara.NotFoundError}
|
|
839
|
+
* @throws {@link Samsara.MethodNotAllowedError}
|
|
840
|
+
* @throws {@link Samsara.TooManyRequestsError}
|
|
841
|
+
* @throws {@link Samsara.InternalServerError}
|
|
842
|
+
* @throws {@link Samsara.NotImplementedError}
|
|
843
|
+
* @throws {@link Samsara.BadGatewayError}
|
|
844
|
+
* @throws {@link Samsara.ServiceUnavailableError}
|
|
845
|
+
* @throws {@link Samsara.GatewayTimeoutError}
|
|
846
|
+
*
|
|
847
|
+
* @example
|
|
848
|
+
* await client.betaApIs.getFunction({
|
|
849
|
+
* name: "name"
|
|
850
|
+
* })
|
|
851
|
+
*/
|
|
852
|
+
getFunction(request: Samsara.GetFunctionRequest, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.FunctionsGetFunctionResponseBody>;
|
|
853
|
+
private __getFunction;
|
|
854
|
+
/**
|
|
855
|
+
* Update an existing Function's description and configuration. The request must include `lastUpdateTimestampMs`, which is the timestamp value obtained from a previous create or get response. The response includes a URL (`uploadPutUrl`) for uploading new code. After uploading, call `POST /functions/{name}/deploy` for the changes to be applied.
|
|
856
|
+
*
|
|
857
|
+
* <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>).
|
|
858
|
+
*
|
|
859
|
+
* To use this endpoint, select **Write Functions** 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>
|
|
860
|
+
*
|
|
861
|
+
*
|
|
862
|
+
* **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.
|
|
863
|
+
*
|
|
864
|
+
* @param {Samsara.FunctionsPatchFunctionRequestBody} request
|
|
865
|
+
* @param {BetaApIsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
866
|
+
*
|
|
867
|
+
* @throws {@link Samsara.UnauthorizedError}
|
|
868
|
+
* @throws {@link Samsara.NotFoundError}
|
|
869
|
+
* @throws {@link Samsara.MethodNotAllowedError}
|
|
870
|
+
* @throws {@link Samsara.TooManyRequestsError}
|
|
871
|
+
* @throws {@link Samsara.InternalServerError}
|
|
872
|
+
* @throws {@link Samsara.NotImplementedError}
|
|
873
|
+
* @throws {@link Samsara.BadGatewayError}
|
|
874
|
+
* @throws {@link Samsara.ServiceUnavailableError}
|
|
875
|
+
* @throws {@link Samsara.GatewayTimeoutError}
|
|
876
|
+
*
|
|
877
|
+
* @example
|
|
878
|
+
* await client.betaApIs.patchFunction({
|
|
879
|
+
* name: "name",
|
|
880
|
+
* lastUpdateTimestampMs: 1609459200000
|
|
881
|
+
* })
|
|
882
|
+
*/
|
|
883
|
+
patchFunction(request: Samsara.FunctionsPatchFunctionRequestBody, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.FunctionsPatchFunctionResponseBody>;
|
|
884
|
+
private __patchFunction;
|
|
885
|
+
/**
|
|
886
|
+
* Deploy the uploaded code package for the specified Function, making it runnable.
|
|
887
|
+
*
|
|
888
|
+
* <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>).
|
|
889
|
+
*
|
|
890
|
+
* To use this endpoint, select **Write Functions** 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>
|
|
891
|
+
*
|
|
892
|
+
*
|
|
893
|
+
* **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.
|
|
894
|
+
*
|
|
895
|
+
* @param {Samsara.DeployFunctionRequest} request
|
|
896
|
+
* @param {BetaApIsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
897
|
+
*
|
|
898
|
+
* @throws {@link Samsara.UnauthorizedError}
|
|
899
|
+
* @throws {@link Samsara.NotFoundError}
|
|
900
|
+
* @throws {@link Samsara.MethodNotAllowedError}
|
|
901
|
+
* @throws {@link Samsara.TooManyRequestsError}
|
|
902
|
+
* @throws {@link Samsara.InternalServerError}
|
|
903
|
+
* @throws {@link Samsara.NotImplementedError}
|
|
904
|
+
* @throws {@link Samsara.BadGatewayError}
|
|
905
|
+
* @throws {@link Samsara.ServiceUnavailableError}
|
|
906
|
+
* @throws {@link Samsara.GatewayTimeoutError}
|
|
907
|
+
*
|
|
908
|
+
* @example
|
|
909
|
+
* await client.betaApIs.deployFunction({
|
|
910
|
+
* name: "name"
|
|
911
|
+
* })
|
|
912
|
+
*/
|
|
913
|
+
deployFunction(request: Samsara.DeployFunctionRequest, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.FunctionsDeployFunctionResponseBody>;
|
|
914
|
+
private __deployFunction;
|
|
791
915
|
/**
|
|
792
916
|
* Start an asynchronous run for the specified Function. This endpoint allows you to override parameters available at runtime.
|
|
793
917
|
*
|
|
@@ -1243,7 +1367,7 @@ export declare class BetaApIsClient {
|
|
|
1243
1367
|
listReadingsDefinitions(request?: Samsara.ListReadingsDefinitionsRequest, requestOptions?: BetaApIsClient.RequestOptions): core.HttpResponsePromise<Samsara.ReadingsListReadingsDefinitionsResponseBody>;
|
|
1244
1368
|
private __listReadingsDefinitions;
|
|
1245
1369
|
/**
|
|
1246
|
-
* Get the values of a reading for a set of entities within the specified time range. Returns a paginated response with data for the specified resource IDs where startTime <= happenedAtTime < endTime.
|
|
1370
|
+
* Get the values of a reading for a set of entities within the specified time range. Returns a paginated response with data for the specified resource IDs where startTime <= happenedAtTime < endTime. If endTime is not set, the time of the request is used as the endTime.
|
|
1247
1371
|
*
|
|
1248
1372
|
* <b>Rate limit:</b> 10 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
|
|
1249
1373
|
*
|
|
@@ -2394,6 +2394,355 @@ class BetaApIsClient {
|
|
|
2394
2394
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/fleet/vehicles/immobilizer/stream");
|
|
2395
2395
|
});
|
|
2396
2396
|
}
|
|
2397
|
+
/**
|
|
2398
|
+
* Create a new Function with the given name, description, and configuration. The response includes a URL (`uploadPutUrl`) for uploading the function's code package. After uploading, call `POST /functions/{name}/deploy` to make the function runnable.
|
|
2399
|
+
*
|
|
2400
|
+
* <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>).
|
|
2401
|
+
*
|
|
2402
|
+
* To use this endpoint, select **Write Functions** 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>
|
|
2403
|
+
*
|
|
2404
|
+
*
|
|
2405
|
+
* **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.
|
|
2406
|
+
*
|
|
2407
|
+
* @param {Samsara.FunctionsCreateFunctionRequestBody} request
|
|
2408
|
+
* @param {BetaApIsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
2409
|
+
*
|
|
2410
|
+
* @throws {@link Samsara.UnauthorizedError}
|
|
2411
|
+
* @throws {@link Samsara.NotFoundError}
|
|
2412
|
+
* @throws {@link Samsara.MethodNotAllowedError}
|
|
2413
|
+
* @throws {@link Samsara.TooManyRequestsError}
|
|
2414
|
+
* @throws {@link Samsara.InternalServerError}
|
|
2415
|
+
* @throws {@link Samsara.NotImplementedError}
|
|
2416
|
+
* @throws {@link Samsara.BadGatewayError}
|
|
2417
|
+
* @throws {@link Samsara.ServiceUnavailableError}
|
|
2418
|
+
* @throws {@link Samsara.GatewayTimeoutError}
|
|
2419
|
+
*
|
|
2420
|
+
* @example
|
|
2421
|
+
* await client.betaApIs.createFunction({
|
|
2422
|
+
* config: {
|
|
2423
|
+
* handler: "index.handler"
|
|
2424
|
+
* },
|
|
2425
|
+
* name: "my-function"
|
|
2426
|
+
* })
|
|
2427
|
+
*/
|
|
2428
|
+
createFunction(request, requestOptions) {
|
|
2429
|
+
return core.HttpResponsePromise.fromPromise(this.__createFunction(request, requestOptions));
|
|
2430
|
+
}
|
|
2431
|
+
__createFunction(request, requestOptions) {
|
|
2432
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2433
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
2434
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
2435
|
+
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);
|
|
2436
|
+
const _response = yield core.fetcher({
|
|
2437
|
+
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, "functions"),
|
|
2438
|
+
method: "POST",
|
|
2439
|
+
headers: _headers,
|
|
2440
|
+
contentType: "application/json",
|
|
2441
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
2442
|
+
requestType: "json",
|
|
2443
|
+
body: request,
|
|
2444
|
+
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,
|
|
2445
|
+
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,
|
|
2446
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
2447
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
2448
|
+
logging: this._options.logging,
|
|
2449
|
+
});
|
|
2450
|
+
if (_response.ok) {
|
|
2451
|
+
return {
|
|
2452
|
+
data: _response.body,
|
|
2453
|
+
rawResponse: _response.rawResponse,
|
|
2454
|
+
};
|
|
2455
|
+
}
|
|
2456
|
+
if (_response.error.reason === "status-code") {
|
|
2457
|
+
switch (_response.error.statusCode) {
|
|
2458
|
+
case 401:
|
|
2459
|
+
throw new Samsara.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
2460
|
+
case 404:
|
|
2461
|
+
throw new Samsara.NotFoundError(_response.error.body, _response.rawResponse);
|
|
2462
|
+
case 405:
|
|
2463
|
+
throw new Samsara.MethodNotAllowedError(_response.error.body, _response.rawResponse);
|
|
2464
|
+
case 429:
|
|
2465
|
+
throw new Samsara.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
2466
|
+
case 500:
|
|
2467
|
+
throw new Samsara.InternalServerError(_response.error.body, _response.rawResponse);
|
|
2468
|
+
case 501:
|
|
2469
|
+
throw new Samsara.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
2470
|
+
case 502:
|
|
2471
|
+
throw new Samsara.BadGatewayError(_response.error.body, _response.rawResponse);
|
|
2472
|
+
case 503:
|
|
2473
|
+
throw new Samsara.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
2474
|
+
case 504:
|
|
2475
|
+
throw new Samsara.GatewayTimeoutError(_response.error.body, _response.rawResponse);
|
|
2476
|
+
default:
|
|
2477
|
+
throw new errors.SamsaraError({
|
|
2478
|
+
statusCode: _response.error.statusCode,
|
|
2479
|
+
body: _response.error.body,
|
|
2480
|
+
rawResponse: _response.rawResponse,
|
|
2481
|
+
});
|
|
2482
|
+
}
|
|
2483
|
+
}
|
|
2484
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/functions");
|
|
2485
|
+
});
|
|
2486
|
+
}
|
|
2487
|
+
/**
|
|
2488
|
+
* Retrieve the current state of an existing Function, including its configuration, code package status, and a `lastUpdateTimestampMs` value for use in subsequent PATCH requests.
|
|
2489
|
+
*
|
|
2490
|
+
* <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>).
|
|
2491
|
+
*
|
|
2492
|
+
* To use this endpoint, select **Read Functions** 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>
|
|
2493
|
+
*
|
|
2494
|
+
*
|
|
2495
|
+
* **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.
|
|
2496
|
+
*
|
|
2497
|
+
* @param {Samsara.GetFunctionRequest} request
|
|
2498
|
+
* @param {BetaApIsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
2499
|
+
*
|
|
2500
|
+
* @throws {@link Samsara.UnauthorizedError}
|
|
2501
|
+
* @throws {@link Samsara.NotFoundError}
|
|
2502
|
+
* @throws {@link Samsara.MethodNotAllowedError}
|
|
2503
|
+
* @throws {@link Samsara.TooManyRequestsError}
|
|
2504
|
+
* @throws {@link Samsara.InternalServerError}
|
|
2505
|
+
* @throws {@link Samsara.NotImplementedError}
|
|
2506
|
+
* @throws {@link Samsara.BadGatewayError}
|
|
2507
|
+
* @throws {@link Samsara.ServiceUnavailableError}
|
|
2508
|
+
* @throws {@link Samsara.GatewayTimeoutError}
|
|
2509
|
+
*
|
|
2510
|
+
* @example
|
|
2511
|
+
* await client.betaApIs.getFunction({
|
|
2512
|
+
* name: "name"
|
|
2513
|
+
* })
|
|
2514
|
+
*/
|
|
2515
|
+
getFunction(request, requestOptions) {
|
|
2516
|
+
return core.HttpResponsePromise.fromPromise(this.__getFunction(request, requestOptions));
|
|
2517
|
+
}
|
|
2518
|
+
__getFunction(request, requestOptions) {
|
|
2519
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2520
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
2521
|
+
const { name } = request;
|
|
2522
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
2523
|
+
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);
|
|
2524
|
+
const _response = yield core.fetcher({
|
|
2525
|
+
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, `functions/${core.url.encodePathParam(name)}`),
|
|
2526
|
+
method: "GET",
|
|
2527
|
+
headers: _headers,
|
|
2528
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
2529
|
+
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,
|
|
2530
|
+
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,
|
|
2531
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
2532
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
2533
|
+
logging: this._options.logging,
|
|
2534
|
+
});
|
|
2535
|
+
if (_response.ok) {
|
|
2536
|
+
return {
|
|
2537
|
+
data: _response.body,
|
|
2538
|
+
rawResponse: _response.rawResponse,
|
|
2539
|
+
};
|
|
2540
|
+
}
|
|
2541
|
+
if (_response.error.reason === "status-code") {
|
|
2542
|
+
switch (_response.error.statusCode) {
|
|
2543
|
+
case 401:
|
|
2544
|
+
throw new Samsara.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
2545
|
+
case 404:
|
|
2546
|
+
throw new Samsara.NotFoundError(_response.error.body, _response.rawResponse);
|
|
2547
|
+
case 405:
|
|
2548
|
+
throw new Samsara.MethodNotAllowedError(_response.error.body, _response.rawResponse);
|
|
2549
|
+
case 429:
|
|
2550
|
+
throw new Samsara.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
2551
|
+
case 500:
|
|
2552
|
+
throw new Samsara.InternalServerError(_response.error.body, _response.rawResponse);
|
|
2553
|
+
case 501:
|
|
2554
|
+
throw new Samsara.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
2555
|
+
case 502:
|
|
2556
|
+
throw new Samsara.BadGatewayError(_response.error.body, _response.rawResponse);
|
|
2557
|
+
case 503:
|
|
2558
|
+
throw new Samsara.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
2559
|
+
case 504:
|
|
2560
|
+
throw new Samsara.GatewayTimeoutError(_response.error.body, _response.rawResponse);
|
|
2561
|
+
default:
|
|
2562
|
+
throw new errors.SamsaraError({
|
|
2563
|
+
statusCode: _response.error.statusCode,
|
|
2564
|
+
body: _response.error.body,
|
|
2565
|
+
rawResponse: _response.rawResponse,
|
|
2566
|
+
});
|
|
2567
|
+
}
|
|
2568
|
+
}
|
|
2569
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/functions/{name}");
|
|
2570
|
+
});
|
|
2571
|
+
}
|
|
2572
|
+
/**
|
|
2573
|
+
* Update an existing Function's description and configuration. The request must include `lastUpdateTimestampMs`, which is the timestamp value obtained from a previous create or get response. The response includes a URL (`uploadPutUrl`) for uploading new code. After uploading, call `POST /functions/{name}/deploy` for the changes to be applied.
|
|
2574
|
+
*
|
|
2575
|
+
* <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>).
|
|
2576
|
+
*
|
|
2577
|
+
* To use this endpoint, select **Write Functions** 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>
|
|
2578
|
+
*
|
|
2579
|
+
*
|
|
2580
|
+
* **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.
|
|
2581
|
+
*
|
|
2582
|
+
* @param {Samsara.FunctionsPatchFunctionRequestBody} request
|
|
2583
|
+
* @param {BetaApIsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
2584
|
+
*
|
|
2585
|
+
* @throws {@link Samsara.UnauthorizedError}
|
|
2586
|
+
* @throws {@link Samsara.NotFoundError}
|
|
2587
|
+
* @throws {@link Samsara.MethodNotAllowedError}
|
|
2588
|
+
* @throws {@link Samsara.TooManyRequestsError}
|
|
2589
|
+
* @throws {@link Samsara.InternalServerError}
|
|
2590
|
+
* @throws {@link Samsara.NotImplementedError}
|
|
2591
|
+
* @throws {@link Samsara.BadGatewayError}
|
|
2592
|
+
* @throws {@link Samsara.ServiceUnavailableError}
|
|
2593
|
+
* @throws {@link Samsara.GatewayTimeoutError}
|
|
2594
|
+
*
|
|
2595
|
+
* @example
|
|
2596
|
+
* await client.betaApIs.patchFunction({
|
|
2597
|
+
* name: "name",
|
|
2598
|
+
* lastUpdateTimestampMs: 1609459200000
|
|
2599
|
+
* })
|
|
2600
|
+
*/
|
|
2601
|
+
patchFunction(request, requestOptions) {
|
|
2602
|
+
return core.HttpResponsePromise.fromPromise(this.__patchFunction(request, requestOptions));
|
|
2603
|
+
}
|
|
2604
|
+
__patchFunction(request, requestOptions) {
|
|
2605
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2606
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
2607
|
+
const { name } = request, _body = __rest(request, ["name"]);
|
|
2608
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
2609
|
+
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);
|
|
2610
|
+
const _response = yield core.fetcher({
|
|
2611
|
+
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, `functions/${core.url.encodePathParam(name)}`),
|
|
2612
|
+
method: "PATCH",
|
|
2613
|
+
headers: _headers,
|
|
2614
|
+
contentType: "application/json",
|
|
2615
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
2616
|
+
requestType: "json",
|
|
2617
|
+
body: _body,
|
|
2618
|
+
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,
|
|
2619
|
+
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,
|
|
2620
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
2621
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
2622
|
+
logging: this._options.logging,
|
|
2623
|
+
});
|
|
2624
|
+
if (_response.ok) {
|
|
2625
|
+
return {
|
|
2626
|
+
data: _response.body,
|
|
2627
|
+
rawResponse: _response.rawResponse,
|
|
2628
|
+
};
|
|
2629
|
+
}
|
|
2630
|
+
if (_response.error.reason === "status-code") {
|
|
2631
|
+
switch (_response.error.statusCode) {
|
|
2632
|
+
case 401:
|
|
2633
|
+
throw new Samsara.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
2634
|
+
case 404:
|
|
2635
|
+
throw new Samsara.NotFoundError(_response.error.body, _response.rawResponse);
|
|
2636
|
+
case 405:
|
|
2637
|
+
throw new Samsara.MethodNotAllowedError(_response.error.body, _response.rawResponse);
|
|
2638
|
+
case 429:
|
|
2639
|
+
throw new Samsara.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
2640
|
+
case 500:
|
|
2641
|
+
throw new Samsara.InternalServerError(_response.error.body, _response.rawResponse);
|
|
2642
|
+
case 501:
|
|
2643
|
+
throw new Samsara.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
2644
|
+
case 502:
|
|
2645
|
+
throw new Samsara.BadGatewayError(_response.error.body, _response.rawResponse);
|
|
2646
|
+
case 503:
|
|
2647
|
+
throw new Samsara.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
2648
|
+
case 504:
|
|
2649
|
+
throw new Samsara.GatewayTimeoutError(_response.error.body, _response.rawResponse);
|
|
2650
|
+
default:
|
|
2651
|
+
throw new errors.SamsaraError({
|
|
2652
|
+
statusCode: _response.error.statusCode,
|
|
2653
|
+
body: _response.error.body,
|
|
2654
|
+
rawResponse: _response.rawResponse,
|
|
2655
|
+
});
|
|
2656
|
+
}
|
|
2657
|
+
}
|
|
2658
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/functions/{name}");
|
|
2659
|
+
});
|
|
2660
|
+
}
|
|
2661
|
+
/**
|
|
2662
|
+
* Deploy the uploaded code package for the specified Function, making it runnable.
|
|
2663
|
+
*
|
|
2664
|
+
* <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>).
|
|
2665
|
+
*
|
|
2666
|
+
* To use this endpoint, select **Write Functions** 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>
|
|
2667
|
+
*
|
|
2668
|
+
*
|
|
2669
|
+
* **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.
|
|
2670
|
+
*
|
|
2671
|
+
* @param {Samsara.DeployFunctionRequest} request
|
|
2672
|
+
* @param {BetaApIsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
2673
|
+
*
|
|
2674
|
+
* @throws {@link Samsara.UnauthorizedError}
|
|
2675
|
+
* @throws {@link Samsara.NotFoundError}
|
|
2676
|
+
* @throws {@link Samsara.MethodNotAllowedError}
|
|
2677
|
+
* @throws {@link Samsara.TooManyRequestsError}
|
|
2678
|
+
* @throws {@link Samsara.InternalServerError}
|
|
2679
|
+
* @throws {@link Samsara.NotImplementedError}
|
|
2680
|
+
* @throws {@link Samsara.BadGatewayError}
|
|
2681
|
+
* @throws {@link Samsara.ServiceUnavailableError}
|
|
2682
|
+
* @throws {@link Samsara.GatewayTimeoutError}
|
|
2683
|
+
*
|
|
2684
|
+
* @example
|
|
2685
|
+
* await client.betaApIs.deployFunction({
|
|
2686
|
+
* name: "name"
|
|
2687
|
+
* })
|
|
2688
|
+
*/
|
|
2689
|
+
deployFunction(request, requestOptions) {
|
|
2690
|
+
return core.HttpResponsePromise.fromPromise(this.__deployFunction(request, requestOptions));
|
|
2691
|
+
}
|
|
2692
|
+
__deployFunction(request, requestOptions) {
|
|
2693
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2694
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
2695
|
+
const { name } = request;
|
|
2696
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
2697
|
+
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);
|
|
2698
|
+
const _response = yield core.fetcher({
|
|
2699
|
+
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, `functions/${core.url.encodePathParam(name)}/deploy`),
|
|
2700
|
+
method: "POST",
|
|
2701
|
+
headers: _headers,
|
|
2702
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
2703
|
+
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,
|
|
2704
|
+
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,
|
|
2705
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
2706
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
2707
|
+
logging: this._options.logging,
|
|
2708
|
+
});
|
|
2709
|
+
if (_response.ok) {
|
|
2710
|
+
return {
|
|
2711
|
+
data: _response.body,
|
|
2712
|
+
rawResponse: _response.rawResponse,
|
|
2713
|
+
};
|
|
2714
|
+
}
|
|
2715
|
+
if (_response.error.reason === "status-code") {
|
|
2716
|
+
switch (_response.error.statusCode) {
|
|
2717
|
+
case 401:
|
|
2718
|
+
throw new Samsara.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
2719
|
+
case 404:
|
|
2720
|
+
throw new Samsara.NotFoundError(_response.error.body, _response.rawResponse);
|
|
2721
|
+
case 405:
|
|
2722
|
+
throw new Samsara.MethodNotAllowedError(_response.error.body, _response.rawResponse);
|
|
2723
|
+
case 429:
|
|
2724
|
+
throw new Samsara.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
2725
|
+
case 500:
|
|
2726
|
+
throw new Samsara.InternalServerError(_response.error.body, _response.rawResponse);
|
|
2727
|
+
case 501:
|
|
2728
|
+
throw new Samsara.NotImplementedError(_response.error.body, _response.rawResponse);
|
|
2729
|
+
case 502:
|
|
2730
|
+
throw new Samsara.BadGatewayError(_response.error.body, _response.rawResponse);
|
|
2731
|
+
case 503:
|
|
2732
|
+
throw new Samsara.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
2733
|
+
case 504:
|
|
2734
|
+
throw new Samsara.GatewayTimeoutError(_response.error.body, _response.rawResponse);
|
|
2735
|
+
default:
|
|
2736
|
+
throw new errors.SamsaraError({
|
|
2737
|
+
statusCode: _response.error.statusCode,
|
|
2738
|
+
body: _response.error.body,
|
|
2739
|
+
rawResponse: _response.rawResponse,
|
|
2740
|
+
});
|
|
2741
|
+
}
|
|
2742
|
+
}
|
|
2743
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/functions/{name}/deploy");
|
|
2744
|
+
});
|
|
2745
|
+
}
|
|
2397
2746
|
/**
|
|
2398
2747
|
* Start an asynchronous run for the specified Function. This endpoint allows you to override parameters available at runtime.
|
|
2399
2748
|
*
|
|
@@ -3664,7 +4013,7 @@ class BetaApIsClient {
|
|
|
3664
4013
|
});
|
|
3665
4014
|
}
|
|
3666
4015
|
/**
|
|
3667
|
-
* Get the values of a reading for a set of entities within the specified time range. Returns a paginated response with data for the specified resource IDs where startTime <= happenedAtTime < endTime.
|
|
4016
|
+
* Get the values of a reading for a set of entities within the specified time range. Returns a paginated response with data for the specified resource IDs where startTime <= happenedAtTime < endTime. If endTime is not set, the time of the request is used as the endTime.
|
|
3668
4017
|
*
|
|
3669
4018
|
* <b>Rate limit:</b> 10 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
|
|
3670
4019
|
*
|
package/dist/cjs/api/resources/betaApIs/client/requests/FunctionsCreateFunctionRequestBody.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type * as Samsara from "../../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* config: {
|
|
6
|
+
* handler: "index.handler"
|
|
7
|
+
* },
|
|
8
|
+
* name: "my-function"
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface FunctionsCreateFunctionRequestBody {
|
|
12
|
+
config: Samsara.CreateFunctionRequestConfigRequestBody;
|
|
13
|
+
/** A description of the Function. */
|
|
14
|
+
description?: string;
|
|
15
|
+
/** Unique name for the Function. */
|
|
16
|
+
name: string;
|
|
17
|
+
}
|
package/dist/cjs/api/resources/betaApIs/client/requests/FunctionsPatchFunctionRequestBody.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type * as Samsara from "../../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* name: "name",
|
|
6
|
+
* lastUpdateTimestampMs: 1609459200000
|
|
7
|
+
* }
|
|
8
|
+
*/
|
|
9
|
+
export interface FunctionsPatchFunctionRequestBody {
|
|
10
|
+
/** The name of the Function to update. */
|
|
11
|
+
name: string;
|
|
12
|
+
config?: Samsara.PatchFunctionRequestConfigRequestBody;
|
|
13
|
+
/** A description of the Function. */
|
|
14
|
+
description?: string;
|
|
15
|
+
/** Timestamp of the last known update to this Function, obtained from a create or get response. Required to prevent conflicting updates. */
|
|
16
|
+
lastUpdateTimestampMs: number;
|
|
17
|
+
}
|