From 487494dd0a93945df98444ae44159d5dcb712e2b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 6 Nov 2024 08:52:00 +0000 Subject: [PATCH] Release release-20241106085113 --- .openapi-generator/FILES | 171 ++--- docs/ArduinoAction.md | 28 + docs/ArduinoActionTemplate.md | 25 + docs/ArduinoDevicev2.md | 2 + docs/ArduinoLinkedDevice.md | 21 + docs/ArduinoLinkedDeviceTemplate.md | 9 + docs/ArduinoLinkedProperty.md | 23 + docs/ArduinoLinkedPropertyTemplate.md | 10 + docs/ArduinoTrigger.md | 20 + docs/ArduinoTriggerTemplate.md | 19 + docs/ArduinoTriggerWithLinkedEntities.md | 17 + docs/BodyExpression.md | 10 + docs/CreateAction.md | 26 + docs/CreateDevicesV2Payload.md | 1 + docs/DashboardsV2Api.md | 139 +++- docs/Dashboardv2.md | 1 + docs/DeviceStatusSource.md | 23 + docs/DeviceStatusSourceWithLinkedDevices.md | 12 + docs/DevicesV2Api.md | 50 +- docs/DevicesV2CertsApi.md | 4 +- docs/DevicesV2OtaApi.md | 4 +- docs/DevicesV2PassApi.md | 4 +- docs/DevicesV2TagsApi.md | 2 +- docs/Devicev2.md | 1 + docs/EmailAction.md | 11 + docs/EmailDeliveryOpts.md | 11 + docs/LoraDevicesV1Api.md | 12 +- docs/LoraFreqPlanV1Api.md | 6 +- docs/NetworkCredentialsV1Api.md | 12 +- docs/PropertiesV2Api.md | 34 +- docs/PushAction.md | 11 + docs/PushDeliveryOpts.md | 9 + docs/SeriesV2Api.md | 30 +- docs/TemplatesApi.md | 12 +- docs/ThingUpdate.md | 1 + docs/ThingsV2Api.md | 50 +- docs/ThingsV2TagsApi.md | 2 +- docs/TitleExpression.md | 10 + docs/Trigger.md | 16 + docs/TriggersV1Api.md | 656 ++++++++++++++++ docs/UpdateAction.md | 13 + docs/UserRecipient.md | 11 + docs/Variable.md | 54 ++ src/api/DashboardsV2Api.js | 147 ++-- src/api/DevicesV2Api.js | 52 +- src/api/DevicesV2CertsApi.js | 4 +- src/api/DevicesV2OtaApi.js | 4 +- src/api/DevicesV2PassApi.js | 4 +- src/api/DevicesV2TagsApi.js | 2 +- src/api/LoraDevicesV1Api.js | 8 +- src/api/LoraFreqPlanV1Api.js | 2 +- src/api/NetworkCredentialsV1Api.js | 4 +- src/api/PropertiesV2Api.js | 34 +- src/api/SeriesV2Api.js | 30 +- src/api/TemplatesApi.js | 8 +- src/api/ThingsV2Api.js | 50 +- src/api/ThingsV2TagsApi.js | 2 +- src/api/TriggersV1Api.js | 710 ++++++++++++++++++ src/index.js | 163 +++- src/model/ArduinoAction.js | 214 ++++++ src/model/ArduinoActionTemplate.js | 175 +++++ src/model/ArduinoDevicev2.js | 18 + src/model/ArduinoLinkedDevice.js | 133 ++++ src/model/ArduinoLinkedDeviceTemplate.js | 97 +++ src/model/ArduinoLinkedProperty.js | 139 ++++ src/model/ArduinoLinkedPropertyTemplate.js | 112 +++ src/model/ArduinoTrigger.js | 231 ++++++ src/model/ArduinoTriggerTemplate.js | 231 ++++++ src/model/ArduinoTriggerWithLinkedEntities.js | 206 +++++ src/model/BodyExpression.js | 116 +++ src/model/Clone.js | 1 + src/model/CreateAction.js | 197 +++++ src/model/CreateDevicesV2Payload.js | 11 + src/model/Dashboardv2.js | 13 +- src/model/DeviceStatusSource.js | 148 ++++ .../DeviceStatusSourceWithLinkedDevices.js | 135 ++++ src/model/Devicev2.js | 11 + src/model/EmailAction.js | 126 ++++ src/model/EmailDeliveryOpts.js | 141 ++++ src/model/PushAction.js | 126 ++++ src/model/PushDeliveryOpts.js | 103 +++ src/model/ThingUpdate.js | 11 + src/model/TitleExpression.js | 116 +++ src/model/Trigger.js | 180 +++++ src/model/UpdateAction.js | 140 ++++ src/model/UserRecipient.js | 122 +++ src/model/Variable.js | 261 +++++++ test/api/TriggersV1Api.spec.js | 173 +++++ test/model/ArduinoAction.spec.js | 113 +++ test/model/ArduinoActionTemplate.spec.js | 95 +++ test/model/ArduinoLinkedDevice.spec.js | 71 ++ .../model/ArduinoLinkedDeviceTemplate.spec.js | 65 ++ test/model/ArduinoLinkedProperty.spec.js | 71 ++ .../ArduinoLinkedPropertyTemplate.spec.js | 71 ++ test/model/ArduinoTrigger.spec.js | 131 ++++ test/model/ArduinoTriggerTemplate.spec.js | 125 +++ .../ArduinoTriggerWithLinkedEntities.spec.js | 113 +++ test/model/BodyExpression.spec.js | 71 ++ test/model/CreateAction.spec.js | 101 +++ test/model/DeviceStatusSource.spec.js | 83 ++ ...eviceStatusSourceWithLinkedDevices.spec.js | 83 ++ test/model/EmailAction.spec.js | 77 ++ test/model/EmailDeliveryOpts.spec.js | 77 ++ test/model/PushAction.spec.js | 77 ++ test/model/PushDeliveryOpts.spec.js | 65 ++ test/model/TitleExpression.spec.js | 71 ++ test/model/Trigger.spec.js | 107 +++ test/model/UpdateAction.spec.js | 89 +++ test/model/UserRecipient.spec.js | 77 ++ test/model/Variable.spec.js | 95 +++ 110 files changed, 8037 insertions(+), 385 deletions(-) create mode 100644 docs/ArduinoAction.md create mode 100644 docs/ArduinoActionTemplate.md create mode 100644 docs/ArduinoLinkedDevice.md create mode 100644 docs/ArduinoLinkedDeviceTemplate.md create mode 100644 docs/ArduinoLinkedProperty.md create mode 100644 docs/ArduinoLinkedPropertyTemplate.md create mode 100644 docs/ArduinoTrigger.md create mode 100644 docs/ArduinoTriggerTemplate.md create mode 100644 docs/ArduinoTriggerWithLinkedEntities.md create mode 100644 docs/BodyExpression.md create mode 100644 docs/CreateAction.md create mode 100644 docs/DeviceStatusSource.md create mode 100644 docs/DeviceStatusSourceWithLinkedDevices.md create mode 100644 docs/EmailAction.md create mode 100644 docs/EmailDeliveryOpts.md create mode 100644 docs/PushAction.md create mode 100644 docs/PushDeliveryOpts.md create mode 100644 docs/TitleExpression.md create mode 100644 docs/Trigger.md create mode 100644 docs/TriggersV1Api.md create mode 100644 docs/UpdateAction.md create mode 100644 docs/UserRecipient.md create mode 100644 docs/Variable.md create mode 100644 src/api/TriggersV1Api.js create mode 100644 src/model/ArduinoAction.js create mode 100644 src/model/ArduinoActionTemplate.js create mode 100644 src/model/ArduinoLinkedDevice.js create mode 100644 src/model/ArduinoLinkedDeviceTemplate.js create mode 100644 src/model/ArduinoLinkedProperty.js create mode 100644 src/model/ArduinoLinkedPropertyTemplate.js create mode 100644 src/model/ArduinoTrigger.js create mode 100644 src/model/ArduinoTriggerTemplate.js create mode 100644 src/model/ArduinoTriggerWithLinkedEntities.js create mode 100644 src/model/BodyExpression.js create mode 100644 src/model/CreateAction.js create mode 100644 src/model/DeviceStatusSource.js create mode 100644 src/model/DeviceStatusSourceWithLinkedDevices.js create mode 100644 src/model/EmailAction.js create mode 100644 src/model/EmailDeliveryOpts.js create mode 100644 src/model/PushAction.js create mode 100644 src/model/PushDeliveryOpts.js create mode 100644 src/model/TitleExpression.js create mode 100644 src/model/Trigger.js create mode 100644 src/model/UpdateAction.js create mode 100644 src/model/UserRecipient.js create mode 100644 src/model/Variable.js create mode 100644 test/api/TriggersV1Api.spec.js create mode 100644 test/model/ArduinoAction.spec.js create mode 100644 test/model/ArduinoActionTemplate.spec.js create mode 100644 test/model/ArduinoLinkedDevice.spec.js create mode 100644 test/model/ArduinoLinkedDeviceTemplate.spec.js create mode 100644 test/model/ArduinoLinkedProperty.spec.js create mode 100644 test/model/ArduinoLinkedPropertyTemplate.spec.js create mode 100644 test/model/ArduinoTrigger.spec.js create mode 100644 test/model/ArduinoTriggerTemplate.spec.js create mode 100644 test/model/ArduinoTriggerWithLinkedEntities.spec.js create mode 100644 test/model/BodyExpression.spec.js create mode 100644 test/model/CreateAction.spec.js create mode 100644 test/model/DeviceStatusSource.spec.js create mode 100644 test/model/DeviceStatusSourceWithLinkedDevices.spec.js create mode 100644 test/model/EmailAction.spec.js create mode 100644 test/model/EmailDeliveryOpts.spec.js create mode 100644 test/model/PushAction.spec.js create mode 100644 test/model/PushDeliveryOpts.spec.js create mode 100644 test/model/TitleExpression.spec.js create mode 100644 test/model/Trigger.spec.js create mode 100644 test/model/UpdateAction.spec.js create mode 100644 test/model/UserRecipient.spec.js create mode 100644 test/model/Variable.spec.js diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index d92937f..94af017 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -2,6 +2,8 @@ .gitignore .travis.yml README.md +docs/ArduinoAction.md +docs/ArduinoActionTemplate.md docs/ArduinoCompressedv2.md docs/ArduinoCredentialsv1.md docs/ArduinoDashboardowner.md @@ -24,6 +26,10 @@ docs/ArduinoDevicev2propertyvalueValueStatistics.md docs/ArduinoDevicev2propertyvalues.md docs/ArduinoDevicev2propertyvaluesLastEvaluatedKey.md docs/ArduinoDevicev2templatedevice.md +docs/ArduinoLinkedDevice.md +docs/ArduinoLinkedDeviceTemplate.md +docs/ArduinoLinkedProperty.md +docs/ArduinoLinkedPropertyTemplate.md docs/ArduinoLinkedvariable.md docs/ArduinoLoradevicev1.md docs/ArduinoLorafreqplansv1.md @@ -47,6 +53,9 @@ docs/ArduinoThingresult.md docs/ArduinoThingtemplate.md docs/ArduinoTimeseriesmedia.md docs/ArduinoTimezone.md +docs/ArduinoTrigger.md +docs/ArduinoTriggerTemplate.md +docs/ArduinoTriggerWithLinkedEntities.md docs/ArduinoVariableslinks.md docs/ArduinoWidgetv2.md docs/ArduinoWidgetv2template.md @@ -59,14 +68,18 @@ docs/BatchQueryRequestMediaV1.md docs/BatchQueryRequestsMediaV1.md docs/BatchQuerySampledRequestMediaV1.md docs/BatchQuerySampledRequestsMediaV1.md +docs/BodyExpression.md docs/CheckDevicesV2PassPayload.md docs/Clone.md +docs/CreateAction.md docs/CreateDevicesV2CertsPayload.md docs/CreateDevicesV2Payload.md docs/CreateLoraDevicesV1Payload.md docs/DashboardsV2Api.md docs/Dashboardshare.md docs/Dashboardv2.md +docs/DeviceStatusSource.md +docs/DeviceStatusSourceWithLinkedDevices.md docs/DevicesV2Api.md docs/DevicesV2CertsApi.md docs/DevicesV2OtaApi.md @@ -77,6 +90,8 @@ docs/Devicev2Cert.md docs/Devicev2Otabinaryurl.md docs/Devicev2Otaurlpyalod.md docs/Devicev2Pass.md +docs/EmailAction.md +docs/EmailDeliveryOpts.md docs/Error.md docs/HistoricDataRequest.md docs/LoraDevicesV1Api.md @@ -89,6 +104,8 @@ docs/PropertiesValues.md docs/Property.md docs/PropertyTypesV1Api.md docs/PropertyValue.md +docs/PushAction.md +docs/PushDeliveryOpts.md docs/SeriesV2Api.md docs/Sharerequest.md docs/Tag.md @@ -101,7 +118,13 @@ docs/ThingUpdate.md docs/ThingsV2Api.md docs/ThingsV2TagsApi.md docs/TimeseriesDataPoint.md +docs/TitleExpression.md +docs/Trigger.md +docs/TriggersV1Api.md +docs/UpdateAction.md docs/UpdateSketch.md +docs/UserRecipient.md +docs/Variable.md docs/Widget.md docs/Widgetlink.md git_push.sh @@ -123,7 +146,10 @@ src/api/SeriesV2Api.js src/api/TemplatesApi.js src/api/ThingsV2Api.js src/api/ThingsV2TagsApi.js +src/api/TriggersV1Api.js src/index.js +src/model/ArduinoAction.js +src/model/ArduinoActionTemplate.js src/model/ArduinoCompressedv2.js src/model/ArduinoCredentialsv1.js src/model/ArduinoDashboardowner.js @@ -146,6 +172,10 @@ src/model/ArduinoDevicev2propertyvalueValueStatistics.js src/model/ArduinoDevicev2propertyvalues.js src/model/ArduinoDevicev2propertyvaluesLastEvaluatedKey.js src/model/ArduinoDevicev2templatedevice.js +src/model/ArduinoLinkedDevice.js +src/model/ArduinoLinkedDeviceTemplate.js +src/model/ArduinoLinkedProperty.js +src/model/ArduinoLinkedPropertyTemplate.js src/model/ArduinoLinkedvariable.js src/model/ArduinoLoradevicev1.js src/model/ArduinoLorafreqplansv1.js @@ -169,6 +199,9 @@ src/model/ArduinoThingresult.js src/model/ArduinoThingtemplate.js src/model/ArduinoTimeseriesmedia.js src/model/ArduinoTimezone.js +src/model/ArduinoTrigger.js +src/model/ArduinoTriggerTemplate.js +src/model/ArduinoTriggerWithLinkedEntities.js src/model/ArduinoVariableslinks.js src/model/ArduinoWidgetv2.js src/model/ArduinoWidgetv2template.js @@ -181,18 +214,24 @@ src/model/BatchQueryRequestMediaV1.js src/model/BatchQueryRequestsMediaV1.js src/model/BatchQuerySampledRequestMediaV1.js src/model/BatchQuerySampledRequestsMediaV1.js +src/model/BodyExpression.js src/model/CheckDevicesV2PassPayload.js src/model/Clone.js +src/model/CreateAction.js src/model/CreateDevicesV2CertsPayload.js src/model/CreateDevicesV2Payload.js src/model/CreateLoraDevicesV1Payload.js src/model/Dashboardshare.js src/model/Dashboardv2.js +src/model/DeviceStatusSource.js +src/model/DeviceStatusSourceWithLinkedDevices.js src/model/Devicev2.js src/model/Devicev2Cert.js src/model/Devicev2Otabinaryurl.js src/model/Devicev2Otaurlpyalod.js src/model/Devicev2Pass.js +src/model/EmailAction.js +src/model/EmailDeliveryOpts.js src/model/Error.js src/model/HistoricDataRequest.js src/model/Override.js @@ -200,6 +239,8 @@ src/model/PropertiesValue.js src/model/PropertiesValues.js src/model/Property.js src/model/PropertyValue.js +src/model/PushAction.js +src/model/PushDeliveryOpts.js src/model/Sharerequest.js src/model/Tag.js src/model/Template.js @@ -208,108 +249,34 @@ src/model/ThingCreate.js src/model/ThingSketch.js src/model/ThingUpdate.js src/model/TimeseriesDataPoint.js +src/model/TitleExpression.js +src/model/Trigger.js +src/model/UpdateAction.js src/model/UpdateSketch.js +src/model/UserRecipient.js +src/model/Variable.js src/model/Widget.js src/model/Widgetlink.js -test/api/DashboardsV2Api.spec.js -test/api/DevicesV2Api.spec.js -test/api/DevicesV2CertsApi.spec.js -test/api/DevicesV2OtaApi.spec.js -test/api/DevicesV2PassApi.spec.js -test/api/DevicesV2TagsApi.spec.js -test/api/LoraDevicesV1Api.spec.js -test/api/LoraFreqPlanV1Api.spec.js -test/api/NetworkCredentialsV1Api.spec.js -test/api/PropertiesV2Api.spec.js -test/api/PropertyTypesV1Api.spec.js -test/api/SeriesV2Api.spec.js -test/api/TemplatesApi.spec.js -test/api/ThingsV2Api.spec.js -test/api/ThingsV2TagsApi.spec.js -test/model/ArduinoCompressedv2.spec.js -test/model/ArduinoCredentialsv1.spec.js -test/model/ArduinoDashboardowner.spec.js -test/model/ArduinoDashboardshare.spec.js -test/model/ArduinoDashboardv2.spec.js -test/model/ArduinoDashboardv2template.spec.js -test/model/ArduinoDevicev2.spec.js -test/model/ArduinoDevicev2Cert.spec.js -test/model/ArduinoDevicev2EventProperties.spec.js -test/model/ArduinoDevicev2Otaupload.spec.js -test/model/ArduinoDevicev2Pass.spec.js -test/model/ArduinoDevicev2SimpleProperties.spec.js -test/model/ArduinoDevicev2StatusEvent.spec.js -test/model/ArduinoDevicev2StatusEvents.spec.js -test/model/ArduinoDevicev2Webhook.spec.js -test/model/ArduinoDevicev2properties.spec.js -test/model/ArduinoDevicev2propertyvalue.spec.js -test/model/ArduinoDevicev2propertyvalueValue.spec.js -test/model/ArduinoDevicev2propertyvalueValueStatistics.spec.js -test/model/ArduinoDevicev2propertyvalues.spec.js -test/model/ArduinoDevicev2propertyvaluesLastEvaluatedKey.spec.js -test/model/ArduinoDevicev2templatedevice.spec.js -test/model/ArduinoLinkedvariable.spec.js -test/model/ArduinoLoradevicev1.spec.js -test/model/ArduinoLorafreqplansv1.spec.js -test/model/ArduinoLorafreqplanv1.spec.js -test/model/ArduinoProperty.spec.js -test/model/ArduinoPropertytype.spec.js -test/model/ArduinoSeriesBatch.spec.js -test/model/ArduinoSeriesBatchSampled.spec.js -test/model/ArduinoSeriesRawBatch.spec.js -test/model/ArduinoSeriesRawBatchLastvalue.spec.js -test/model/ArduinoSeriesRawLastValueResponse.spec.js -test/model/ArduinoSeriesRawResponse.spec.js -test/model/ArduinoSeriesResponse.spec.js -test/model/ArduinoSeriesSampledResponse.spec.js -test/model/ArduinoTags.spec.js -test/model/ArduinoTemplate.spec.js -test/model/ArduinoTemplateproperty.spec.js -test/model/ArduinoTemplatevariable.spec.js -test/model/ArduinoThing.spec.js -test/model/ArduinoThingresult.spec.js -test/model/ArduinoThingtemplate.spec.js -test/model/ArduinoTimeseriesmedia.spec.js -test/model/ArduinoTimezone.spec.js -test/model/ArduinoVariableslinks.spec.js -test/model/ArduinoWidgetv2.spec.js -test/model/ArduinoWidgetv2template.spec.js -test/model/BatchLastValueRequestsMediaV1.spec.js -test/model/BatchQueryRawLastValueRequestMediaV1.spec.js -test/model/BatchQueryRawRequestMediaV1.spec.js -test/model/BatchQueryRawRequestsMediaV1.spec.js -test/model/BatchQueryRawResponseSeriesMediaV1.spec.js -test/model/BatchQueryRequestMediaV1.spec.js -test/model/BatchQueryRequestsMediaV1.spec.js -test/model/BatchQuerySampledRequestMediaV1.spec.js -test/model/BatchQuerySampledRequestsMediaV1.spec.js -test/model/CheckDevicesV2PassPayload.spec.js -test/model/Clone.spec.js -test/model/CreateDevicesV2CertsPayload.spec.js -test/model/CreateDevicesV2Payload.spec.js -test/model/CreateLoraDevicesV1Payload.spec.js -test/model/Dashboardshare.spec.js -test/model/Dashboardv2.spec.js -test/model/Devicev2.spec.js -test/model/Devicev2Cert.spec.js -test/model/Devicev2Otabinaryurl.spec.js -test/model/Devicev2Otaurlpyalod.spec.js -test/model/Devicev2Pass.spec.js -test/model/Error.spec.js -test/model/HistoricDataRequest.spec.js -test/model/Override.spec.js -test/model/PropertiesValue.spec.js -test/model/PropertiesValues.spec.js -test/model/Property.spec.js -test/model/PropertyValue.spec.js -test/model/Sharerequest.spec.js -test/model/Tag.spec.js -test/model/Template.spec.js -test/model/ThingClone.spec.js -test/model/ThingCreate.spec.js -test/model/ThingSketch.spec.js -test/model/ThingUpdate.spec.js -test/model/TimeseriesDataPoint.spec.js -test/model/UpdateSketch.spec.js -test/model/Widget.spec.js -test/model/Widgetlink.spec.js +test/api/TriggersV1Api.spec.js +test/model/ArduinoAction.spec.js +test/model/ArduinoActionTemplate.spec.js +test/model/ArduinoLinkedDevice.spec.js +test/model/ArduinoLinkedDeviceTemplate.spec.js +test/model/ArduinoLinkedProperty.spec.js +test/model/ArduinoLinkedPropertyTemplate.spec.js +test/model/ArduinoTrigger.spec.js +test/model/ArduinoTriggerTemplate.spec.js +test/model/ArduinoTriggerWithLinkedEntities.spec.js +test/model/BodyExpression.spec.js +test/model/CreateAction.spec.js +test/model/DeviceStatusSource.spec.js +test/model/DeviceStatusSourceWithLinkedDevices.spec.js +test/model/EmailAction.spec.js +test/model/EmailDeliveryOpts.spec.js +test/model/PushAction.spec.js +test/model/PushDeliveryOpts.spec.js +test/model/TitleExpression.spec.js +test/model/Trigger.spec.js +test/model/UpdateAction.spec.js +test/model/UserRecipient.spec.js +test/model/Variable.spec.js diff --git a/docs/ArduinoAction.md b/docs/ArduinoAction.md new file mode 100644 index 0000000..21b0b79 --- /dev/null +++ b/docs/ArduinoAction.md @@ -0,0 +1,28 @@ +# ArduinoIotClient.ArduinoAction + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**createdBy** | **String** | Id of the user who created the action | [optional] +**description** | **String** | The description of the action | [optional] +**email** | [**EmailAction**](EmailAction.md) | | [optional] +**id** | **String** | The id of the action | [optional] +**kind** | **String** | The kind of the action | [optional] +**name** | **String** | The name of the action | [optional] +**organizationId** | **String** | Id of the organization the trigger belongs to | [optional] +**pushNotification** | [**PushAction**](PushAction.md) | | [optional] +**triggerId** | **String** | Id of the trigger the action is associated to | [optional] + + + +## Enum: KindEnum + + +* `EMAIL` (value: `"NOTIFY-EMAIL"`) + +* `PUSH` (value: `"NOTIFY-PUSH"`) + + + + diff --git a/docs/ArduinoActionTemplate.md b/docs/ArduinoActionTemplate.md new file mode 100644 index 0000000..f9bdb32 --- /dev/null +++ b/docs/ArduinoActionTemplate.md @@ -0,0 +1,25 @@ +# ArduinoIotClient.ArduinoActionTemplate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **String** | The description of the action | [optional] +**email** | [**EmailAction**](EmailAction.md) | | [optional] +**kind** | **String** | The kind of the action | [optional] +**name** | **String** | The name of the action | [optional] +**organizationId** | **String** | Id of the organization the trigger belongs to | [optional] +**pushNotification** | [**PushAction**](PushAction.md) | | [optional] + + + +## Enum: KindEnum + + +* `EMAIL` (value: `"NOTIFY-EMAIL"`) + +* `PUSH` (value: `"NOTIFY-PUSH"`) + + + + diff --git a/docs/ArduinoDevicev2.md b/docs/ArduinoDevicev2.md index 6581feb..9727e63 100644 --- a/docs/ArduinoDevicev2.md +++ b/docs/ArduinoDevicev2.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **connectionType** | **String** | The type of the connections selected by the user when multiple connections are available | [optional] **createdAt** | **Date** | Creation date of the device | [optional] +**deletedAt** | **Date** | Deletion date of the trigger | [optional] **deviceStatus** | **String** | The connection status of the device | [optional] **events** | [**[ArduinoDevicev2SimpleProperties]**](ArduinoDevicev2SimpleProperties.md) | ArduinoDevicev2SimplePropertiesCollection is the media type for an array of ArduinoDevicev2SimpleProperties (default view) | [optional] **fqbn** | **String** | The fully qualified board name | [optional] @@ -25,6 +26,7 @@ Name | Type | Description | Notes **tags** | **{String: Object}** | Tags belonging to the device | [optional] **thing** | [**ArduinoThing**](ArduinoThing.md) | | [optional] **type** | **String** | The type of the device | +**updatedAt** | **Date** | Update date of the trigger | [optional] **userId** | **String** | The id of the user | **webhooks** | [**[ArduinoDevicev2Webhook]**](ArduinoDevicev2Webhook.md) | ArduinoDevicev2WebhookCollection is the media type for an array of ArduinoDevicev2Webhook (default view) | [optional] **wifiFwVersion** | **String** | The version of the NINA/WIFI101 firmware running on the device | [optional] diff --git a/docs/ArduinoLinkedDevice.md b/docs/ArduinoLinkedDevice.md new file mode 100644 index 0000000..a5ba2ee --- /dev/null +++ b/docs/ArduinoLinkedDevice.md @@ -0,0 +1,21 @@ +# ArduinoIotClient.ArduinoLinkedDevice + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**device** | [**ArduinoDevicev2**](ArduinoDevicev2.md) | | +**status** | **String** | The status of the linked device | + + + +## Enum: StatusEnum + + +* `OK` (value: `"OK"`) + +* `DELETED` (value: `"DELETED"`) + + + + diff --git a/docs/ArduinoLinkedDeviceTemplate.md b/docs/ArduinoLinkedDeviceTemplate.md new file mode 100644 index 0000000..0d8376f --- /dev/null +++ b/docs/ArduinoLinkedDeviceTemplate.md @@ -0,0 +1,9 @@ +# ArduinoIotClient.ArduinoLinkedDeviceTemplate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**thingId** | **String** | The thing the device is associated to | + + diff --git a/docs/ArduinoLinkedProperty.md b/docs/ArduinoLinkedProperty.md new file mode 100644 index 0000000..1453156 --- /dev/null +++ b/docs/ArduinoLinkedProperty.md @@ -0,0 +1,23 @@ +# ArduinoIotClient.ArduinoLinkedProperty + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**property** | [**ArduinoProperty**](ArduinoProperty.md) | | +**status** | **String** | The status of the linked property | + + + +## Enum: StatusEnum + + +* `OK` (value: `"OK"`) + +* `WRONG_TYPE` (value: `"WRONG_TYPE"`) + +* `DELETED` (value: `"DELETED"`) + + + + diff --git a/docs/ArduinoLinkedPropertyTemplate.md b/docs/ArduinoLinkedPropertyTemplate.md new file mode 100644 index 0000000..314a167 --- /dev/null +++ b/docs/ArduinoLinkedPropertyTemplate.md @@ -0,0 +1,10 @@ +# ArduinoIotClient.ArduinoLinkedPropertyTemplate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**propertyId** | **String** | The property the trigger is associated to | +**thingId** | **String** | The thing the trigger is associated to | + + diff --git a/docs/ArduinoTrigger.md b/docs/ArduinoTrigger.md new file mode 100644 index 0000000..c332923 --- /dev/null +++ b/docs/ArduinoTrigger.md @@ -0,0 +1,20 @@ +# ArduinoIotClient.ArduinoTrigger + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**actions** | [**[ArduinoAction]**](ArduinoAction.md) | A list of actions associated with the trigger | [optional] +**active** | **Boolean** | Is true if the trigger is enabled | [optional] +**createdAt** | **Date** | Creation date of the trigger | [optional] +**createdBy** | **String** | Id of the user who last updated the trigger | [optional] +**deletedAt** | **Date** | Deletion date of the trigger | [optional] +**description** | **String** | The description of the trigger | [optional] +**deviceStatusSource** | [**DeviceStatusSource**](DeviceStatusSource.md) | | [optional] +**id** | **String** | The id of the trigger | [optional] +**name** | **String** | The name of the trigger | +**organizationId** | **String** | Id of the organization the trigger belongs to | [optional] +**propertyId** | **String** | Id of the property the trigger is associated to (mutually exclusive with 'device_status_source') | [optional] +**updatedAt** | **Date** | Update date of the trigger | [optional] + + diff --git a/docs/ArduinoTriggerTemplate.md b/docs/ArduinoTriggerTemplate.md new file mode 100644 index 0000000..a1d4cf0 --- /dev/null +++ b/docs/ArduinoTriggerTemplate.md @@ -0,0 +1,19 @@ +# ArduinoIotClient.ArduinoTriggerTemplate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**actions** | [**[ArduinoActionTemplate]**](ArduinoActionTemplate.md) | A list of actions associated with the trigger | [optional] +**active** | **Boolean** | Is true if the trigger is enabled | [optional] +**criteria** | **String** | The criteria of the trigger, could be INCLUDE or EXCLUDE | [optional] +**description** | **String** | The description of the trigger | [optional] +**gracePeriodOffline** | **Number** | The amount of seconds the trigger will wait before considering a matching device as offline | [optional] +**gracePeriodOnline** | **Number** | The amount of seconds the trigger will wait before considering a matching device as online | [optional] +**id** | **String** | The id of the trigger | +**linkedDevices** | [**[ArduinoLinkedDeviceTemplate]**](ArduinoLinkedDeviceTemplate.md) | A list of devices the trigger is associated to | [optional] +**linkedProperty** | [**ArduinoLinkedPropertyTemplate**](ArduinoLinkedPropertyTemplate.md) | | [optional] +**name** | **String** | The name of the trigger | +**organizationId** | **String** | Id of the organization the trigger belongs to | [optional] + + diff --git a/docs/ArduinoTriggerWithLinkedEntities.md b/docs/ArduinoTriggerWithLinkedEntities.md new file mode 100644 index 0000000..45b9fd8 --- /dev/null +++ b/docs/ArduinoTriggerWithLinkedEntities.md @@ -0,0 +1,17 @@ +# ArduinoIotClient.ArduinoTriggerWithLinkedEntities + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**actions** | [**[ArduinoAction]**](ArduinoAction.md) | A list of actions associated with the trigger | [optional] +**active** | **Boolean** | Is true if the trigger is enabled | [optional] +**createdBy** | **String** | Id of the user who last updated the trigger | [optional] +**description** | **String** | The description of the trigger | [optional] +**deviceStatusSource** | [**DeviceStatusSourceWithLinkedDevices**](DeviceStatusSourceWithLinkedDevices.md) | | [optional] +**id** | **String** | The id of the trigger | +**linkedProperty** | [**ArduinoLinkedProperty**](ArduinoLinkedProperty.md) | | [optional] +**name** | **String** | The name of the trigger | +**organizationId** | **String** | Id of the organization the trigger belongs to | [optional] + + diff --git a/docs/BodyExpression.md b/docs/BodyExpression.md new file mode 100644 index 0000000..51ec208 --- /dev/null +++ b/docs/BodyExpression.md @@ -0,0 +1,10 @@ +# ArduinoIotClient.BodyExpression + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**expression** | **String** | Content of the body of a message, variables are allowed | +**variables** | [**[Variable]**](Variable.md) | Variables used by the expression | [optional] + + diff --git a/docs/CreateAction.md b/docs/CreateAction.md new file mode 100644 index 0000000..605e27b --- /dev/null +++ b/docs/CreateAction.md @@ -0,0 +1,26 @@ +# ArduinoIotClient.CreateAction + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **String** | The description of the trigger | [optional] +**email** | [**EmailAction**](EmailAction.md) | | [optional] +**kind** | **String** | The kind of the action | +**name** | **String** | The name of the action | +**organizationId** | **String** | Id of the organization the trigger belongs to | [optional] +**pushNotification** | [**PushAction**](PushAction.md) | | [optional] +**triggerId** | **String** | Id of the trigger the action is associated to | [optional] + + + +## Enum: KindEnum + + +* `EMAIL` (value: `"NOTIFY-EMAIL"`) + +* `PUSH` (value: `"NOTIFY-PUSH"`) + + + + diff --git a/docs/CreateDevicesV2Payload.md b/docs/CreateDevicesV2Payload.md index 768a762..3fd03c5 100644 --- a/docs/CreateDevicesV2Payload.md +++ b/docs/CreateDevicesV2Payload.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **fqbn** | **String** | The fully qualified board name | [optional] **name** | **String** | The friendly name of the device | [optional] **serial** | **String** | The serial uuid of the device | [optional] +**softDeleted** | **Boolean** | If false, restore the thing from the soft deletion | [optional] [default to false] **type** | **String** | The type of the device | **userId** | **String** | The user_id associated to the device. If absent it will be inferred from the authentication header | [optional] **wifiFwVersion** | **String** | The version of the NINA/WIFI101 firmware running on the device | [optional] diff --git a/docs/DashboardsV2Api.md b/docs/DashboardsV2Api.md index 4e3b057..6b05dc3 100644 --- a/docs/DashboardsV2Api.md +++ b/docs/DashboardsV2Api.md @@ -11,6 +11,7 @@ Method | HTTP request | Description [**dashboardsV2Link**](DashboardsV2Api.md#dashboardsV2Link) | **PUT** /iot/v2/dashboards/{id}/widgets/{widgetId}/variables | link dashboards_v2 [**dashboardsV2List**](DashboardsV2Api.md#dashboardsV2List) | **GET** /iot/v2/dashboards | list dashboards_v2 [**dashboardsV2ListShares**](DashboardsV2Api.md#dashboardsV2ListShares) | **GET** /iot/v2/dashboards/{id}/shares | listShares dashboards_v2 +[**dashboardsV2Patch**](DashboardsV2Api.md#dashboardsV2Patch) | **PATCH** /iot/v2/dashboards/{id} | patch dashboards_v2 [**dashboardsV2RequestAccess**](DashboardsV2Api.md#dashboardsV2RequestAccess) | **PUT** /iot/v2/dashboards/{id}/share_request | requestAccess dashboards_v2 [**dashboardsV2Share**](DashboardsV2Api.md#dashboardsV2Share) | **PUT** /iot/v2/dashboards/{id}/shares | share dashboards_v2 [**dashboardsV2Show**](DashboardsV2Api.md#dashboardsV2Show) | **GET** /iot/v2/dashboards/{id} | show dashboards_v2 @@ -38,9 +39,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new ArduinoIotClient.DashboardsV2Api(); let id = "id_example"; // String | The id of the dashboard -let clone = new ArduinoIotClient.Clone(); // Clone | +let clone = new ArduinoIotClient.Clone(); // Clone | Add overrides used when performing a clone of a dashboard let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.dashboardsV2Clone(id, clone, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -56,8 +57,8 @@ apiInstance.dashboardsV2Clone(id, clone, opts).then((data) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| The id of the dashboard | - **clone** | [**Clone**](Clone.md)| | - **xOrganization** | **String**| | [optional] + **clone** | [**Clone**](Clone.md)| Add overrides used when performing a clone of a dashboard | + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -69,7 +70,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.arduino.dashboardv2+json, application/vnd.goa.error+json @@ -91,9 +92,9 @@ let oauth2 = defaultClient.authentications['oauth2']; oauth2.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new ArduinoIotClient.DashboardsV2Api(); -let dashboardv2 = new ArduinoIotClient.Dashboardv2(); // Dashboardv2 | DashboardV2Payload describes a dashboard +let dashboardv2 = new ArduinoIotClient.Dashboardv2(); // Dashboardv2 | Describes a dashboard let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.dashboardsV2Create(dashboardv2, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -108,8 +109,8 @@ apiInstance.dashboardsV2Create(dashboardv2, opts).then((data) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **dashboardv2** | [**Dashboardv2**](Dashboardv2.md)| DashboardV2Payload describes a dashboard | - **xOrganization** | **String**| | [optional] + **dashboardv2** | [**Dashboardv2**](Dashboardv2.md)| Describes a dashboard | + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -121,7 +122,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.arduino.dashboardv2+json, application/vnd.goa.error+json @@ -145,7 +146,8 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new ArduinoIotClient.DashboardsV2Api(); let id = "id_example"; // String | The id of the dashboard let opts = { - 'xOrganization': "xOrganization_example" // String | + 'force': false, // Boolean | If true, hard delete the thing + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.dashboardsV2Delete(id, opts).then(() => { console.log('API called successfully.'); @@ -161,7 +163,8 @@ apiInstance.dashboardsV2Delete(id, opts).then(() => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| The id of the dashboard | - **xOrganization** | **String**| | [optional] + **force** | **Boolean**| If true, hard delete the thing | [optional] [default to false] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -198,7 +201,7 @@ let apiInstance = new ArduinoIotClient.DashboardsV2Api(); let id = "id_example"; // String | The id of the dashboard let userId = "userId_example"; // String | The id of the user let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.dashboardsV2DeleteShare(id, userId, opts).then(() => { console.log('API called successfully.'); @@ -215,7 +218,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| The id of the dashboard | **userId** | **String**| The id of the user | - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -253,7 +256,7 @@ let id = "id_example"; // String | The id of the dashboard let widgetId = "widgetId_example"; // String | The id of the widget let widgetlink = new ArduinoIotClient.Widgetlink(); // Widgetlink | let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.dashboardsV2Link(id, widgetId, widgetlink, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -271,7 +274,7 @@ Name | Type | Description | Notes **id** | **String**| The id of the dashboard | **widgetId** | **String**| The id of the widget | **widgetlink** | [**Widgetlink**](Widgetlink.md)| | - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -283,7 +286,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.arduino.variableslinks+json, application/vnd.goa.error+json @@ -306,9 +309,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new ArduinoIotClient.DashboardsV2Api(); let opts = { - 'name': "name_example", // String | The name of the dashboard - 'userId': "userId_example", // String | The user_id of the dashboard's owner - 'xOrganization': "xOrganization_example" // String | + 'name': "name_example", // String | Filter by name of the dashboard. It support like matching. + 'userId': "userId_example", // String | Filter by user_id of the dashboard's owner + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.dashboardsV2List(opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -323,9 +326,9 @@ apiInstance.dashboardsV2List(opts).then((data) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **String**| The name of the dashboard | [optional] - **userId** | **String**| The user_id of the dashboard's owner | [optional] - **xOrganization** | **String**| | [optional] + **name** | **String**| Filter by name of the dashboard. It support like matching. | [optional] + **userId** | **String**| Filter by user_id of the dashboard's owner | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -361,7 +364,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new ArduinoIotClient.DashboardsV2Api(); let id = "id_example"; // String | The id of the dashboard let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.dashboardsV2ListShares(id, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -377,7 +380,7 @@ apiInstance.dashboardsV2ListShares(id, opts).then((data) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| The id of the dashboard | - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -393,6 +396,60 @@ Name | Type | Description | Notes - **Accept**: application/vnd.arduino.dashboardshare+json; type=collection, application/vnd.goa.error+json +## dashboardsV2Patch + +> ArduinoDashboardv2 dashboardsV2Patch(id, dashboardv2, opts) + +patch dashboards_v2 + +Updates an existing dashboard field without overwriting the existing data + +### Example + +```javascript +import ArduinoIotClient from '@arduino/arduino-iot-client'; +let defaultClient = ArduinoIotClient.ApiClient.instance; +// Configure OAuth2 access token for authorization: oauth2 +let oauth2 = defaultClient.authentications['oauth2']; +oauth2.accessToken = 'YOUR ACCESS TOKEN'; + +let apiInstance = new ArduinoIotClient.DashboardsV2Api(); +let id = "id_example"; // String | The id of the dashboard +let dashboardv2 = new ArduinoIotClient.Dashboardv2(); // Dashboardv2 | Describes a dashboard +let opts = { + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) +}; +apiInstance.dashboardsV2Patch(id, dashboardv2, opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| The id of the dashboard | + **dashboardv2** | [**Dashboardv2**](Dashboardv2.md)| Describes a dashboard | + **xOrganization** | **String**| Organization space identifer (optional) | [optional] + +### Return type + +[**ArduinoDashboardv2**](ArduinoDashboardv2.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/vnd.arduino.dashboardv2+json, application/vnd.goa.error+json + + ## dashboardsV2RequestAccess > dashboardsV2RequestAccess(id, sharerequest, opts) @@ -414,7 +471,7 @@ let apiInstance = new ArduinoIotClient.DashboardsV2Api(); let id = "id_example"; // String | The id of the dashboard let sharerequest = new ArduinoIotClient.Sharerequest(); // Sharerequest | let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.dashboardsV2RequestAccess(id, sharerequest, opts).then(() => { console.log('API called successfully.'); @@ -431,7 +488,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| The id of the dashboard | **sharerequest** | [**Sharerequest**](Sharerequest.md)| | - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -443,7 +500,7 @@ null (empty response body) ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.goa.error+json, text/plain @@ -468,7 +525,7 @@ let apiInstance = new ArduinoIotClient.DashboardsV2Api(); let id = "id_example"; // String | The id of the dashboard let dashboardshare = new ArduinoIotClient.Dashboardshare(); // Dashboardshare | let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.dashboardsV2Share(id, dashboardshare, opts).then(() => { console.log('API called successfully.'); @@ -485,7 +542,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| The id of the dashboard | **dashboardshare** | [**Dashboardshare**](Dashboardshare.md)| | - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -497,7 +554,7 @@ null (empty response body) ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.goa.error+json, text/plain @@ -507,7 +564,7 @@ null (empty response body) show dashboards_v2 -Show a dashboard +Show a dashboard by id ### Example @@ -521,7 +578,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new ArduinoIotClient.DashboardsV2Api(); let id = "id_example"; // String | The id of the dashboard let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.dashboardsV2Show(id, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -537,7 +594,7 @@ apiInstance.dashboardsV2Show(id, opts).then((data) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| The id of the dashboard | - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -573,7 +630,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new ArduinoIotClient.DashboardsV2Api(); let id = "id_example"; // String | The id of the dashboard let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.dashboardsV2Template(id, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -589,7 +646,7 @@ apiInstance.dashboardsV2Template(id, opts).then((data) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| The id of the dashboard | - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -624,9 +681,9 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new ArduinoIotClient.DashboardsV2Api(); let id = "id_example"; // String | The id of the dashboard -let dashboardv2 = new ArduinoIotClient.Dashboardv2(); // Dashboardv2 | DashboardV2Payload describes a dashboard +let dashboardv2 = new ArduinoIotClient.Dashboardv2(); // Dashboardv2 | Describes a dashboard let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.dashboardsV2Update(id, dashboardv2, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -642,8 +699,8 @@ apiInstance.dashboardsV2Update(id, dashboardv2, opts).then((data) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| The id of the dashboard | - **dashboardv2** | [**Dashboardv2**](Dashboardv2.md)| DashboardV2Payload describes a dashboard | - **xOrganization** | **String**| | [optional] + **dashboardv2** | [**Dashboardv2**](Dashboardv2.md)| Describes a dashboard | + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -655,6 +712,6 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.arduino.dashboardv2+json, application/vnd.goa.error+json diff --git a/docs/Dashboardv2.md b/docs/Dashboardv2.md index fc90e42..b16eb70 100644 --- a/docs/Dashboardv2.md +++ b/docs/Dashboardv2.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **coverImage** | **String** | The cover image of the dashboard | [optional] **name** | **String** | The friendly name of the dashboard | [optional] +**softDeleted** | **Boolean** | If false, restore the thing from the soft deletion | [optional] [default to false] **widgets** | [**[Widget]**](Widget.md) | Widgets attached to this dashboard | [optional] diff --git a/docs/DeviceStatusSource.md b/docs/DeviceStatusSource.md new file mode 100644 index 0000000..028c299 --- /dev/null +++ b/docs/DeviceStatusSource.md @@ -0,0 +1,23 @@ +# ArduinoIotClient.DeviceStatusSource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**criteria** | **String** | The matching criteria of the trigger, this allows to interpret device_ids as an inclusion or exclusion list | +**deviceIds** | **[String]** | A list of device IDs to be included in or excluded from the trigger (see criteria). Mutually exclusive with property_id. | [optional] +**gracePeriodOffline** | **Number** | Amount of seconds the trigger will wait before the device will be considered disconnected (requires 'device_id') | [optional] +**gracePeriodOnline** | **Number** | Amount of seconds the trigger will wait before the device will be considered connected (requires 'device_id') | [optional] + + + +## Enum: CriteriaEnum + + +* `INCLUDE` (value: `"INCLUDE"`) + +* `EXCLUDE` (value: `"EXCLUDE"`) + + + + diff --git a/docs/DeviceStatusSourceWithLinkedDevices.md b/docs/DeviceStatusSourceWithLinkedDevices.md new file mode 100644 index 0000000..430c57f --- /dev/null +++ b/docs/DeviceStatusSourceWithLinkedDevices.md @@ -0,0 +1,12 @@ +# ArduinoIotClient.DeviceStatusSourceWithLinkedDevices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**criteria** | **String** | The criteria of the trigger, could be INCLUDE or EXCLUDE | +**gracePeriodOffline** | **Number** | The amount of seconds the trigger will wait before considering a matching device as offline | [optional] +**gracePeriodOnline** | **Number** | The amount of seconds the trigger will wait before considering a matching device as online | [optional] +**linkedDevices** | [**[ArduinoLinkedDevice]**](ArduinoLinkedDevice.md) | A list of devices the trigger is associated to | [optional] + + diff --git a/docs/DevicesV2Api.md b/docs/DevicesV2Api.md index 1a0e5e1..3374ed5 100644 --- a/docs/DevicesV2Api.md +++ b/docs/DevicesV2Api.md @@ -37,7 +37,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new ArduinoIotClient.DevicesV2Api(); let createDevicesV2Payload = new ArduinoIotClient.CreateDevicesV2Payload(); // CreateDevicesV2Payload | DeviceV2 describes a device. let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.devicesV2Create(createDevicesV2Payload, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -53,7 +53,7 @@ apiInstance.devicesV2Create(createDevicesV2Payload, opts).then((data) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **createDevicesV2Payload** | [**CreateDevicesV2Payload**](CreateDevicesV2Payload.md)| DeviceV2 describes a device. | - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -65,7 +65,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.arduino.devicev2+json, application/vnd.goa.error+json @@ -89,7 +89,8 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new ArduinoIotClient.DevicesV2Api(); let id = "id_example"; // String | The id of the device let opts = { - 'xOrganization': "xOrganization_example" // String | + 'force': false, // Boolean | If true, hard delete the device + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.devicesV2Delete(id, opts).then(() => { console.log('API called successfully.'); @@ -105,7 +106,8 @@ apiInstance.devicesV2Delete(id, opts).then(() => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| The id of the device | - **xOrganization** | **String**| | [optional] + **force** | **Boolean**| If true, hard delete the device | [optional] [default to false] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -143,7 +145,7 @@ let id = "id_example"; // String | The id of the device let opts = { 'limit': 56, // Number | The number of events to select 'start': "start_example", // String | The time at which to start selecting events - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.devicesV2GetEvents(id, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -161,7 +163,7 @@ Name | Type | Description | Notes **id** | **String**| The id of the device | **limit** | **Number**| The number of events to select | [optional] **start** | **String**| The time at which to start selecting events | [optional] - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -198,7 +200,7 @@ let apiInstance = new ArduinoIotClient.DevicesV2Api(); let id = "id_example"; // String | The id of the device let opts = { 'showDeleted': false, // Boolean | If true, shows the soft deleted properties - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.devicesV2GetProperties(id, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -215,7 +217,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| The id of the device | **showDeleted** | **Boolean**| If true, shows the soft deleted properties | [optional] [default to false] - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -253,7 +255,7 @@ let id = "id_example"; // String | The id of the device let opts = { 'limit': 30, // Number | The number of events to select 'start': "start_example", // String | The time at which to start selecting events - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.devicesV2GetStatusEvents(id, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -271,7 +273,7 @@ Name | Type | Description | Notes **id** | **String**| The id of the device | **limit** | **Number**| The number of events to select | [optional] [default to 30] **start** | **String**| The time at which to start selecting events | [optional] - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -308,8 +310,9 @@ let apiInstance = new ArduinoIotClient.DevicesV2Api(); let opts = { 'acrossUserIds': false, // Boolean | If true, returns all the devices 'serial': "serial_example", // String | Filter by device serial number + 'showDeleted': false, // Boolean | If true, shows the soft deleted devices 'tags': ["null"], // [String] | Filter by tags - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.devicesV2List(opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -326,8 +329,9 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **acrossUserIds** | **Boolean**| If true, returns all the devices | [optional] [default to false] **serial** | **String**| Filter by device serial number | [optional] + **showDeleted** | **Boolean**| If true, shows the soft deleted devices | [optional] [default to false] **tags** | [**[String]**](String.md)| Filter by tags | [optional] - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -363,7 +367,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new ArduinoIotClient.DevicesV2Api(); let id = "id_example"; // String | The id of the device let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.devicesV2Show(id, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -379,7 +383,7 @@ apiInstance.devicesV2Show(id, opts).then((data) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| The id of the device | - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -418,7 +422,7 @@ let pid = "pid_example"; // String | The id of the property let opts = { 'limit': 56, // Number | The number of properties to select 'start': "start_example", // String | The time at which to start selecting properties - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.devicesV2Timeseries(id, pid, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -437,7 +441,7 @@ Name | Type | Description | Notes **pid** | **String**| The id of the property | **limit** | **Number**| The number of properties to select | [optional] **start** | **String**| The time at which to start selecting properties | [optional] - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -474,7 +478,7 @@ let apiInstance = new ArduinoIotClient.DevicesV2Api(); let id = "id_example"; // String | The id of the device let devicev2 = new ArduinoIotClient.Devicev2(); // Devicev2 | DeviceV2 describes a device. let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.devicesV2Update(id, devicev2, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -491,7 +495,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| The id of the device | **devicev2** | [**Devicev2**](Devicev2.md)| DeviceV2 describes a device. | - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -503,7 +507,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.arduino.devicev2+json, application/vnd.goa.error+json @@ -528,7 +532,7 @@ let apiInstance = new ArduinoIotClient.DevicesV2Api(); let id = "id_example"; // String | The id of the device let propertiesValues = new ArduinoIotClient.PropertiesValues(); // PropertiesValues | let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.devicesV2UpdateProperties(id, propertiesValues, opts).then(() => { console.log('API called successfully.'); @@ -545,7 +549,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| The id of the device | **propertiesValues** | [**PropertiesValues**](PropertiesValues.md)| | - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -557,6 +561,6 @@ null (empty response body) ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.goa.error+json, text/plain diff --git a/docs/DevicesV2CertsApi.md b/docs/DevicesV2CertsApi.md index 89b07e8..0f8895d 100644 --- a/docs/DevicesV2CertsApi.md +++ b/docs/DevicesV2CertsApi.md @@ -58,7 +58,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.arduino.devicev2.cert+json, application/vnd.goa.error+json @@ -258,6 +258,6 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.arduino.devicev2.cert+json, application/vnd.goa.error+json diff --git a/docs/DevicesV2OtaApi.md b/docs/DevicesV2OtaApi.md index 400c5b5..e1d14e9 100644 --- a/docs/DevicesV2OtaApi.md +++ b/docs/DevicesV2OtaApi.md @@ -56,7 +56,7 @@ null (empty response body) ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.goa.error+json, text/plain @@ -162,6 +162,6 @@ null (empty response body) ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.goa.error+json, text/plain diff --git a/docs/DevicesV2PassApi.md b/docs/DevicesV2PassApi.md index 07bf379..cb3c1dd 100644 --- a/docs/DevicesV2PassApi.md +++ b/docs/DevicesV2PassApi.md @@ -57,7 +57,7 @@ null (empty response body) ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.goa.error+json, text/plain @@ -207,6 +207,6 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.arduino.devicev2.pass+json, application/vnd.goa.error+json diff --git a/docs/DevicesV2TagsApi.md b/docs/DevicesV2TagsApi.md index d82d054..29bd997 100644 --- a/docs/DevicesV2TagsApi.md +++ b/docs/DevicesV2TagsApi.md @@ -154,6 +154,6 @@ null (empty response body) ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.goa.error+json, text/plain diff --git a/docs/Devicev2.md b/docs/Devicev2.md index 612e61f..88f1cc5 100644 --- a/docs/Devicev2.md +++ b/docs/Devicev2.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **fqbn** | **String** | The fully qualified board name | [optional] **name** | **String** | The friendly name of the device | [optional] **serial** | **String** | The serial uuid of the device | [optional] +**softDeleted** | **Boolean** | If false, restore the thing from the soft deletion | [optional] [default to false] **type** | **String** | The type of the device | [optional] **userId** | **String** | The user_id associated to the device. If absent it will be inferred from the authentication header | [optional] **wifiFwVersion** | **String** | The version of the NINA/WIFI101 firmware running on the device | [optional] diff --git a/docs/EmailAction.md b/docs/EmailAction.md new file mode 100644 index 0000000..9c79566 --- /dev/null +++ b/docs/EmailAction.md @@ -0,0 +1,11 @@ +# ArduinoIotClient.EmailAction + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | [**BodyExpression**](BodyExpression.md) | | +**delivery** | [**EmailDeliveryOpts**](EmailDeliveryOpts.md) | | +**subject** | [**TitleExpression**](TitleExpression.md) | | + + diff --git a/docs/EmailDeliveryOpts.md b/docs/EmailDeliveryOpts.md new file mode 100644 index 0000000..209a604 --- /dev/null +++ b/docs/EmailDeliveryOpts.md @@ -0,0 +1,11 @@ +# ArduinoIotClient.EmailDeliveryOpts + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bcc** | [**[UserRecipient]**](UserRecipient.md) | The \"bcc:\" field of an e-mail | [optional] +**cc** | [**[UserRecipient]**](UserRecipient.md) | The \"cc:\" field of an e-mail | [optional] +**to** | [**[UserRecipient]**](UserRecipient.md) | The \"to:\" field of an e-mail | + + diff --git a/docs/LoraDevicesV1Api.md b/docs/LoraDevicesV1Api.md index 18e9437..25f8fed 100644 --- a/docs/LoraDevicesV1Api.md +++ b/docs/LoraDevicesV1Api.md @@ -20,11 +20,15 @@ Create a new lora device. Its info are saved on our database, and on the lora pr ```javascript import ArduinoIotClient from '@arduino/arduino-iot-client'; +let defaultClient = ArduinoIotClient.ApiClient.instance; +// Configure OAuth2 access token for authorization: oauth2 +let oauth2 = defaultClient.authentications['oauth2']; +oauth2.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new ArduinoIotClient.LoraDevicesV1Api(); let createLoraDevicesV1Payload = new ArduinoIotClient.CreateLoraDevicesV1Payload(); // CreateLoraDevicesV1Payload | let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.loraDevicesV1Create(createLoraDevicesV1Payload, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -40,7 +44,7 @@ apiInstance.loraDevicesV1Create(createLoraDevicesV1Payload, opts).then((data) => Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **createLoraDevicesV1Payload** | [**CreateLoraDevicesV1Payload**](CreateLoraDevicesV1Payload.md)| | - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -48,10 +52,10 @@ Name | Type | Description | Notes ### Authorization -No authorization required +[oauth2](../README.md#oauth2) ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.arduino.loradevicev1+json diff --git a/docs/LoraFreqPlanV1Api.md b/docs/LoraFreqPlanV1Api.md index 61af766..2fd177b 100644 --- a/docs/LoraFreqPlanV1Api.md +++ b/docs/LoraFreqPlanV1Api.md @@ -20,6 +20,10 @@ List the lora frequency plans supported ```javascript import ArduinoIotClient from '@arduino/arduino-iot-client'; +let defaultClient = ArduinoIotClient.ApiClient.instance; +// Configure OAuth2 access token for authorization: oauth2 +let oauth2 = defaultClient.authentications['oauth2']; +oauth2.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new ArduinoIotClient.LoraFreqPlanV1Api(); apiInstance.loraFreqPlanV1List().then((data) => { @@ -40,7 +44,7 @@ This endpoint does not need any parameter. ### Authorization -No authorization required +[oauth2](../README.md#oauth2) ### HTTP request headers diff --git a/docs/NetworkCredentialsV1Api.md b/docs/NetworkCredentialsV1Api.md index 7cec289..d16634e 100644 --- a/docs/NetworkCredentialsV1Api.md +++ b/docs/NetworkCredentialsV1Api.md @@ -21,6 +21,10 @@ Show required network credentials depending on device type ```javascript import ArduinoIotClient from '@arduino/arduino-iot-client'; +let defaultClient = ArduinoIotClient.ApiClient.instance; +// Configure OAuth2 access token for authorization: oauth2 +let oauth2 = defaultClient.authentications['oauth2']; +oauth2.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new ArduinoIotClient.NetworkCredentialsV1Api(); let type = "type_example"; // String | Device type @@ -49,7 +53,7 @@ Name | Type | Description | Notes ### Authorization -No authorization required +[oauth2](../README.md#oauth2) ### HTTP request headers @@ -69,6 +73,10 @@ Show available connection types depending on device type ```javascript import ArduinoIotClient from '@arduino/arduino-iot-client'; +let defaultClient = ArduinoIotClient.ApiClient.instance; +// Configure OAuth2 access token for authorization: oauth2 +let oauth2 = defaultClient.authentications['oauth2']; +oauth2.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new ArduinoIotClient.NetworkCredentialsV1Api(); let type = "type_example"; // String | Device type @@ -93,7 +101,7 @@ null (empty response body) ### Authorization -No authorization required +[oauth2](../README.md#oauth2) ### HTTP request headers diff --git a/docs/PropertiesV2Api.md b/docs/PropertiesV2Api.md index 0223161..c49ba26 100644 --- a/docs/PropertiesV2Api.md +++ b/docs/PropertiesV2Api.md @@ -35,7 +35,7 @@ let apiInstance = new ArduinoIotClient.PropertiesV2Api(); let id = "id_example"; // String | The id of the thing let property = new ArduinoIotClient.Property(); // Property | PropertyPayload describes a property of a thing. No field is mandatory let opts = { - 'xOrganization': "xOrganization_example" // String | The id of the organization + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.propertiesV2Create(id, property, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -52,7 +52,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| The id of the thing | **property** | [**Property**](Property.md)| PropertyPayload describes a property of a thing. No field is mandatory | - **xOrganization** | **String**| The id of the organization | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -64,7 +64,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.arduino.property+json, application/vnd.goa.error+json @@ -90,7 +90,7 @@ let id = "id_example"; // String | The id of the thing let pid = "pid_example"; // String | The id of the property let opts = { 'force': false, // Boolean | If true, hard delete the property - 'xOrganization': "xOrganization_example" // String | The id of the organization + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.propertiesV2Delete(id, pid, opts).then(() => { console.log('API called successfully.'); @@ -108,7 +108,7 @@ Name | Type | Description | Notes **id** | **String**| The id of the thing | **pid** | **String**| The id of the property | **force** | **Boolean**| If true, hard delete the property | [optional] [default to false] - **xOrganization** | **String**| The id of the organization | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -145,7 +145,7 @@ let apiInstance = new ArduinoIotClient.PropertiesV2Api(); let id = "id_example"; // String | The id of the thing let opts = { 'showDeleted': false, // Boolean | If true, shows the soft deleted properties - 'xOrganization': "xOrganization_example" // String | The id of the organization + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.propertiesV2List(id, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -162,7 +162,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| The id of the thing | **showDeleted** | **Boolean**| If true, shows the soft deleted properties | [optional] [default to false] - **xOrganization** | **String**| The id of the organization | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -200,7 +200,7 @@ let id = "id_example"; // String | The id of the thing let pid = "pid_example"; // String | The id of the property let propertyValue = new ArduinoIotClient.PropertyValue(); // PropertyValue | PropertyValuePayload describes a property value let opts = { - 'xOrganization': "xOrganization_example" // String | The id of the organization + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.propertiesV2Publish(id, pid, propertyValue, opts).then(() => { console.log('API called successfully.'); @@ -218,7 +218,7 @@ Name | Type | Description | Notes **id** | **String**| The id of the thing | **pid** | **String**| The id of the property | **propertyValue** | [**PropertyValue**](PropertyValue.md)| PropertyValuePayload describes a property value | - **xOrganization** | **String**| The id of the organization | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -230,7 +230,7 @@ null (empty response body) ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.goa.error+json, text/plain @@ -256,7 +256,7 @@ let id = "id_example"; // String | The id of the thing let pid = "pid_example"; // String | The id of the property let opts = { 'showDeleted': false, // Boolean | If true, shows the soft deleted properties - 'xOrganization': "xOrganization_example" // String | The id of the organization + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.propertiesV2Show(id, pid, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -274,7 +274,7 @@ Name | Type | Description | Notes **id** | **String**| The id of the thing | **pid** | **String**| The id of the property | **showDeleted** | **Boolean**| If true, shows the soft deleted properties | [optional] [default to false] - **xOrganization** | **String**| The id of the organization | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -316,7 +316,7 @@ let opts = { 'from': "from_example", // String | Get data with a timestamp >= to this date (default: 2 weeks ago, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z) 'interval': 56, // Number | Binning interval in seconds (defaut: the smallest possible value compatibly with the limit of 1000 data points in the response) 'to': "to_example", // String | Get data with a timestamp < to this date (default: now, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z) - 'xOrganization': "xOrganization_example" // String | The id of the organization + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.propertiesV2Timeseries(id, pid, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -338,7 +338,7 @@ Name | Type | Description | Notes **from** | **String**| Get data with a timestamp >= to this date (default: 2 weeks ago, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z) | [optional] **interval** | **Number**| Binning interval in seconds (defaut: the smallest possible value compatibly with the limit of 1000 data points in the response) | [optional] **to** | **String**| Get data with a timestamp < to this date (default: now, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z) | [optional] - **xOrganization** | **String**| The id of the organization | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -376,7 +376,7 @@ let id = "id_example"; // String | The id of the thing let pid = "pid_example"; // String | The id of the property let property = new ArduinoIotClient.Property(); // Property | PropertyPayload describes a property of a thing. No field is mandatory let opts = { - 'xOrganization': "xOrganization_example" // String | The id of the organization + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.propertiesV2Update(id, pid, property, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -394,7 +394,7 @@ Name | Type | Description | Notes **id** | **String**| The id of the thing | **pid** | **String**| The id of the property | **property** | [**Property**](Property.md)| PropertyPayload describes a property of a thing. No field is mandatory | - **xOrganization** | **String**| The id of the organization | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -406,6 +406,6 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.arduino.property+json, application/vnd.goa.error+json diff --git a/docs/PushAction.md b/docs/PushAction.md new file mode 100644 index 0000000..644a98c --- /dev/null +++ b/docs/PushAction.md @@ -0,0 +1,11 @@ +# ArduinoIotClient.PushAction + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | [**BodyExpression**](BodyExpression.md) | | +**delivery** | [**PushDeliveryOpts**](PushDeliveryOpts.md) | | +**title** | [**TitleExpression**](TitleExpression.md) | | + + diff --git a/docs/PushDeliveryOpts.md b/docs/PushDeliveryOpts.md new file mode 100644 index 0000000..4efe8eb --- /dev/null +++ b/docs/PushDeliveryOpts.md @@ -0,0 +1,9 @@ +# ArduinoIotClient.PushDeliveryOpts + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**to** | [**[UserRecipient]**](UserRecipient.md) | The recipient of a push notification | + + diff --git a/docs/SeriesV2Api.md b/docs/SeriesV2Api.md index a2695b1..5518e57 100644 --- a/docs/SeriesV2Api.md +++ b/docs/SeriesV2Api.md @@ -32,7 +32,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new ArduinoIotClient.SeriesV2Api(); let batchQueryRequestsMediaV1 = new ArduinoIotClient.BatchQueryRequestsMediaV1(); // BatchQueryRequestsMediaV1 | let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.seriesV2BatchQuery(batchQueryRequestsMediaV1, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -48,7 +48,7 @@ apiInstance.seriesV2BatchQuery(batchQueryRequestsMediaV1, opts).then((data) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **batchQueryRequestsMediaV1** | [**BatchQueryRequestsMediaV1**](BatchQueryRequestsMediaV1.md)| | - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -60,7 +60,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.arduino.series.batch+json, application/vnd.goa.error+json @@ -84,7 +84,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new ArduinoIotClient.SeriesV2Api(); let batchQueryRawRequestsMediaV1 = new ArduinoIotClient.BatchQueryRawRequestsMediaV1(); // BatchQueryRawRequestsMediaV1 | let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.seriesV2BatchQueryRaw(batchQueryRawRequestsMediaV1, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -100,7 +100,7 @@ apiInstance.seriesV2BatchQueryRaw(batchQueryRawRequestsMediaV1, opts).then((data Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **batchQueryRawRequestsMediaV1** | [**BatchQueryRawRequestsMediaV1**](BatchQueryRawRequestsMediaV1.md)| | - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -112,7 +112,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.arduino.series.raw.batch+json, application/vnd.goa.error+json @@ -136,7 +136,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new ArduinoIotClient.SeriesV2Api(); let batchLastValueRequestsMediaV1 = new ArduinoIotClient.BatchLastValueRequestsMediaV1(); // BatchLastValueRequestsMediaV1 | let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.seriesV2BatchQueryRawLastValue(batchLastValueRequestsMediaV1, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -152,7 +152,7 @@ apiInstance.seriesV2BatchQueryRawLastValue(batchLastValueRequestsMediaV1, opts). Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **batchLastValueRequestsMediaV1** | [**BatchLastValueRequestsMediaV1**](BatchLastValueRequestsMediaV1.md)| | - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -164,7 +164,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.arduino.series.raw.batch.lastvalue+json, application/vnd.goa.error+json @@ -188,7 +188,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new ArduinoIotClient.SeriesV2Api(); let batchQuerySampledRequestsMediaV1 = new ArduinoIotClient.BatchQuerySampledRequestsMediaV1(); // BatchQuerySampledRequestsMediaV1 | let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.seriesV2BatchQuerySampling(batchQuerySampledRequestsMediaV1, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -204,7 +204,7 @@ apiInstance.seriesV2BatchQuerySampling(batchQuerySampledRequestsMediaV1, opts).t Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **batchQuerySampledRequestsMediaV1** | [**BatchQuerySampledRequestsMediaV1**](BatchQuerySampledRequestsMediaV1.md)| | - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -216,7 +216,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.arduino.series.batch.sampled+json, application/vnd.goa.error+json @@ -240,7 +240,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new ArduinoIotClient.SeriesV2Api(); let historicDataRequest = new ArduinoIotClient.HistoricDataRequest(); // HistoricDataRequest | let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.seriesV2HistoricData(historicDataRequest, opts).then(() => { console.log('API called successfully.'); @@ -256,7 +256,7 @@ apiInstance.seriesV2HistoricData(historicDataRequest, opts).then(() => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **historicDataRequest** | [**HistoricDataRequest**](HistoricDataRequest.md)| | - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -268,6 +268,6 @@ null (empty response body) ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.goa.error+json diff --git a/docs/TemplatesApi.md b/docs/TemplatesApi.md index 7c23375..ec93e54 100644 --- a/docs/TemplatesApi.md +++ b/docs/TemplatesApi.md @@ -20,11 +20,15 @@ Apply an existing cloud template and generate all the needed resources ```javascript import ArduinoIotClient from '@arduino/arduino-iot-client'; +let defaultClient = ArduinoIotClient.ApiClient.instance; +// Configure OAuth2 access token for authorization: oauth2 +let oauth2 = defaultClient.authentications['oauth2']; +oauth2.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new ArduinoIotClient.TemplatesApi(); let template = new ArduinoIotClient.Template(); // Template | TemplatePayload describes the needed attribute to apply a template let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.templatesApply(template, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -40,7 +44,7 @@ apiInstance.templatesApply(template, opts).then((data) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **template** | [**Template**](Template.md)| TemplatePayload describes the needed attribute to apply a template | - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -48,10 +52,10 @@ Name | Type | Description | Notes ### Authorization -No authorization required +[oauth2](../README.md#oauth2) ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.arduino.template+json, application/vnd.goa.error+json diff --git a/docs/ThingUpdate.md b/docs/ThingUpdate.md index 02269cf..f5973ee 100644 --- a/docs/ThingUpdate.md +++ b/docs/ThingUpdate.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **id** | **String** | The id of the thing | [optional] **name** | **String** | The friendly name of the thing | [optional] **properties** | [**[Property]**](Property.md) | The properties of the thing | [optional] +**softDeleted** | **Boolean** | If false, restore the thing from the soft deletion | [optional] [default to false] **timezone** | **String** | A time zone name. Check /v2/timezones for a list of valid names. | [optional] **webhookActive** | **Boolean** | Webhook uri | [optional] **webhookUri** | **String** | Webhook uri | [optional] diff --git a/docs/ThingsV2Api.md b/docs/ThingsV2Api.md index a466285..be36e25 100644 --- a/docs/ThingsV2Api.md +++ b/docs/ThingsV2Api.md @@ -38,7 +38,7 @@ let apiInstance = new ArduinoIotClient.ThingsV2Api(); let id = "id_example"; // String | The id of the thing let thingClone = new ArduinoIotClient.ThingClone(); // ThingClone | Payload to clone a new thing from an existing one let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.thingsV2Clone(id, thingClone, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -55,7 +55,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| The id of the thing | **thingClone** | [**ThingClone**](ThingClone.md)| Payload to clone a new thing from an existing one | - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -67,7 +67,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.arduino.thing+json, application/vnd.goa.error+json @@ -92,7 +92,7 @@ let apiInstance = new ArduinoIotClient.ThingsV2Api(); let thingCreate = new ArduinoIotClient.ThingCreate(); // ThingCreate | Payload to create a new thing let opts = { 'force': false, // Boolean | If true, detach device from the other thing, and attach to this thing - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.thingsV2Create(thingCreate, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -109,7 +109,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **thingCreate** | [**ThingCreate**](ThingCreate.md)| Payload to create a new thing | **force** | **Boolean**| If true, detach device from the other thing, and attach to this thing | [optional] [default to false] - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -121,7 +121,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.arduino.thing+json, application/vnd.goa.error+json @@ -146,7 +146,7 @@ let apiInstance = new ArduinoIotClient.ThingsV2Api(); let id = "id_example"; // String | The id of the thing let thingSketch = new ArduinoIotClient.ThingSketch(); // ThingSketch | ThingSketchPayload describes a sketch of a thing let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.thingsV2CreateSketch(id, thingSketch, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -163,7 +163,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| The id of the thing | **thingSketch** | [**ThingSketch**](ThingSketch.md)| ThingSketchPayload describes a sketch of a thing | - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -175,7 +175,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.arduino.thing+json, application/vnd.goa.error+json @@ -200,7 +200,7 @@ let apiInstance = new ArduinoIotClient.ThingsV2Api(); let id = "id_example"; // String | The id of the thing let opts = { 'force': false, // Boolean | If true, hard delete the thing - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.thingsV2Delete(id, opts).then(() => { console.log('API called successfully.'); @@ -217,7 +217,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| The id of the thing | **force** | **Boolean**| If true, hard delete the thing | [optional] [default to false] - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -251,7 +251,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new ArduinoIotClient.ThingsV2Api(); let id = "id_example"; // String | The id of the thing let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.thingsV2DeleteSketch(id, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -267,7 +267,7 @@ apiInstance.thingsV2DeleteSketch(id, opts).then((data) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| The id of the thing | - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -308,7 +308,7 @@ let opts = { 'showDeleted': false, // Boolean | If true, shows the soft deleted things 'showProperties': false, // Boolean | If true, returns things with their properties, and last values 'tags': ["null"], // [String] | Filter by tags - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.thingsV2List(opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -329,7 +329,7 @@ Name | Type | Description | Notes **showDeleted** | **Boolean**| If true, shows the soft deleted things | [optional] [default to false] **showProperties** | **Boolean**| If true, returns things with their properties, and last values | [optional] [default to false] **tags** | [**[String]**](String.md)| Filter by tags | [optional] - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -366,7 +366,7 @@ let apiInstance = new ArduinoIotClient.ThingsV2Api(); let id = "id_example"; // String | The id of the thing let opts = { 'showDeleted': false, // Boolean | If true, shows the soft deleted thing - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.thingsV2Show(id, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -383,7 +383,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| The id of the thing | **showDeleted** | **Boolean**| If true, shows the soft deleted thing | [optional] [default to false] - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -419,7 +419,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; let apiInstance = new ArduinoIotClient.ThingsV2Api(); let id = "id_example"; // String | The id of the thing let opts = { - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.thingsV2Template(id, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -435,7 +435,7 @@ apiInstance.thingsV2Template(id, opts).then((data) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| The id of the thing | - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -473,7 +473,7 @@ let id = "id_example"; // String | The id of the thing let thingUpdate = new ArduinoIotClient.ThingUpdate(); // ThingUpdate | Payload to update an existing thing let opts = { 'force': false, // Boolean | If true, detach device from the other thing, and attach to this thing - 'xOrganization': "xOrganization_example" // String | + 'xOrganization': "xOrganization_example" // String | Organization space identifer (optional) }; apiInstance.thingsV2Update(id, thingUpdate, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -491,7 +491,7 @@ Name | Type | Description | Notes **id** | **String**| The id of the thing | **thingUpdate** | [**ThingUpdate**](ThingUpdate.md)| Payload to update an existing thing | **force** | **Boolean**| If true, detach device from the other thing, and attach to this thing | [optional] [default to false] - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] ### Return type @@ -503,7 +503,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.arduino.thing+json, application/vnd.goa.error+json @@ -528,7 +528,7 @@ let apiInstance = new ArduinoIotClient.ThingsV2Api(); let id = "id_example"; // String | The id of the thing let sketchId = "sketchId_example"; // String | The id of the sketch let opts = { - 'xOrganization': "xOrganization_example", // String | + 'xOrganization': "xOrganization_example", // String | Organization space identifer (optional) 'updateSketch': new ArduinoIotClient.UpdateSketch() // UpdateSketch | }; apiInstance.thingsV2UpdateSketch(id, sketchId, opts).then((data) => { @@ -546,7 +546,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **String**| The id of the thing | **sketchId** | **String**| The id of the sketch | - **xOrganization** | **String**| | [optional] + **xOrganization** | **String**| Organization space identifer (optional) | [optional] **updateSketch** | [**UpdateSketch**](UpdateSketch.md)| | [optional] ### Return type @@ -559,6 +559,6 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.arduino.thing+json, application/vnd.goa.error+json diff --git a/docs/ThingsV2TagsApi.md b/docs/ThingsV2TagsApi.md index 84911fc..68fba81 100644 --- a/docs/ThingsV2TagsApi.md +++ b/docs/ThingsV2TagsApi.md @@ -154,6 +154,6 @@ null (empty response body) ### HTTP request headers -- **Content-Type**: application/json, application/x-www-form-urlencoded +- **Content-Type**: application/json - **Accept**: application/vnd.goa.error+json, text/plain diff --git a/docs/TitleExpression.md b/docs/TitleExpression.md new file mode 100644 index 0000000..a12cccf --- /dev/null +++ b/docs/TitleExpression.md @@ -0,0 +1,10 @@ +# ArduinoIotClient.TitleExpression + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**expression** | **String** | Content of the title (or subject) of a message, variables are allowed | +**variables** | [**[Variable]**](Variable.md) | Variables used by the expression | [optional] + + diff --git a/docs/Trigger.md b/docs/Trigger.md new file mode 100644 index 0000000..dd42275 --- /dev/null +++ b/docs/Trigger.md @@ -0,0 +1,16 @@ +# ArduinoIotClient.Trigger + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**actions** | [**[CreateAction]**](CreateAction.md) | A list of actions to be associated with the trigger | [optional] +**active** | **Boolean** | Is true if the trigger is enabled | [optional] +**description** | **String** | The description of the trigger | [optional] +**deviceStatusSource** | [**DeviceStatusSource**](DeviceStatusSource.md) | | [optional] +**id** | **String** | The id of the trigger | [optional] +**name** | **String** | The name of the trigger | [optional] +**propertyId** | **String** | Id of the property the trigger is associated to (mutually exclusive with 'device_status_source') | [optional] +**softDeleted** | **Boolean** | If false, restore the thing from the soft deletion | [optional] [default to false] + + diff --git a/docs/TriggersV1Api.md b/docs/TriggersV1Api.md new file mode 100644 index 0000000..e0853d5 --- /dev/null +++ b/docs/TriggersV1Api.md @@ -0,0 +1,656 @@ +# ArduinoIotClient.TriggersV1Api + +All URIs are relative to *https://api2.arduino.cc* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**actionsV1Create**](TriggersV1Api.md#actionsV1Create) | **POST** /iot/v1/actions | create actions_v1 +[**actionsV1Delete**](TriggersV1Api.md#actionsV1Delete) | **DELETE** /iot/v1/actions/{id} | delete actions_v1 +[**actionsV1List**](TriggersV1Api.md#actionsV1List) | **GET** /iot/v1/actions | list actions_v1 +[**actionsV1Show**](TriggersV1Api.md#actionsV1Show) | **GET** /iot/v1/actions/{id} | show actions_v1 +[**actionsV1Update**](TriggersV1Api.md#actionsV1Update) | **PUT** /iot/v1/actions/{id} | update actions_v1 +[**triggersV1Create**](TriggersV1Api.md#triggersV1Create) | **PUT** /iot/v1/triggers | create triggers_v1 +[**triggersV1Delete**](TriggersV1Api.md#triggersV1Delete) | **DELETE** /iot/v1/triggers/{id} | delete triggers_v1 +[**triggersV1List**](TriggersV1Api.md#triggersV1List) | **GET** /iot/v1/triggers | list triggers_v1 +[**triggersV1Patch**](TriggersV1Api.md#triggersV1Patch) | **PATCH** /iot/v1/triggers/{id} | patch triggers_v1 +[**triggersV1Show**](TriggersV1Api.md#triggersV1Show) | **GET** /iot/v1/triggers/{id} | show triggers_v1 +[**triggersV1Template**](TriggersV1Api.md#triggersV1Template) | **GET** /iot/v1/triggers/{id}/template | template triggers_v1 +[**triggersV1Update**](TriggersV1Api.md#triggersV1Update) | **POST** /iot/v1/triggers/{id} | update triggers_v1 + + + +## actionsV1Create + +> ArduinoAction actionsV1Create(createAction, opts) + +create actions_v1 + +Creates a new action + +### Example + +```javascript +import ArduinoIotClient from '@arduino/arduino-iot-client'; +let defaultClient = ArduinoIotClient.ApiClient.instance; +// Configure OAuth2 access token for authorization: oauth2 +let oauth2 = defaultClient.authentications['oauth2']; +oauth2.accessToken = 'YOUR ACCESS TOKEN'; + +let apiInstance = new ArduinoIotClient.TriggersV1Api(); +let createAction = new ArduinoIotClient.CreateAction(); // CreateAction | +let opts = { + 'xOrganization': "xOrganization_example" // String | +}; +apiInstance.actionsV1Create(createAction, opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createAction** | [**CreateAction**](CreateAction.md)| | + **xOrganization** | **String**| | [optional] + +### Return type + +[**ArduinoAction**](ArduinoAction.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/vnd.arduino.action+json, application/vnd.goa.error+json + + +## actionsV1Delete + +> actionsV1Delete(id, opts) + +delete actions_v1 + +Removes an action + +### Example + +```javascript +import ArduinoIotClient from '@arduino/arduino-iot-client'; +let defaultClient = ArduinoIotClient.ApiClient.instance; +// Configure OAuth2 access token for authorization: oauth2 +let oauth2 = defaultClient.authentications['oauth2']; +oauth2.accessToken = 'YOUR ACCESS TOKEN'; + +let apiInstance = new ArduinoIotClient.TriggersV1Api(); +let id = "id_example"; // String | The id of the action +let opts = { + 'xOrganization': "xOrganization_example" // String | +}; +apiInstance.actionsV1Delete(id, opts).then(() => { + console.log('API called successfully.'); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| The id of the action | + **xOrganization** | **String**| | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/vnd.goa.error+json, text/plain + + +## actionsV1List + +> [ArduinoAction] actionsV1List(opts) + +list actions_v1 + +Returns the list of actions + +### Example + +```javascript +import ArduinoIotClient from '@arduino/arduino-iot-client'; +let defaultClient = ArduinoIotClient.ApiClient.instance; +// Configure OAuth2 access token for authorization: oauth2 +let oauth2 = defaultClient.authentications['oauth2']; +oauth2.accessToken = 'YOUR ACCESS TOKEN'; + +let apiInstance = new ArduinoIotClient.TriggersV1Api(); +let opts = { + 'xOrganization': "xOrganization_example" // String | +}; +apiInstance.actionsV1List(opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xOrganization** | **String**| | [optional] + +### Return type + +[**[ArduinoAction]**](ArduinoAction.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/vnd.arduino.action+json; type=collection, application/vnd.goa.error+json + + +## actionsV1Show + +> ArduinoAction actionsV1Show(id, opts) + +show actions_v1 + +Returns an action + +### Example + +```javascript +import ArduinoIotClient from '@arduino/arduino-iot-client'; +let defaultClient = ArduinoIotClient.ApiClient.instance; +// Configure OAuth2 access token for authorization: oauth2 +let oauth2 = defaultClient.authentications['oauth2']; +oauth2.accessToken = 'YOUR ACCESS TOKEN'; + +let apiInstance = new ArduinoIotClient.TriggersV1Api(); +let id = "id_example"; // String | The id of the action +let opts = { + 'xOrganization': "xOrganization_example" // String | +}; +apiInstance.actionsV1Show(id, opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| The id of the action | + **xOrganization** | **String**| | [optional] + +### Return type + +[**ArduinoAction**](ArduinoAction.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/vnd.arduino.action+json, application/vnd.goa.error+json + + +## actionsV1Update + +> ArduinoAction actionsV1Update(id, updateAction, opts) + +update actions_v1 + +Updates an action + +### Example + +```javascript +import ArduinoIotClient from '@arduino/arduino-iot-client'; +let defaultClient = ArduinoIotClient.ApiClient.instance; +// Configure OAuth2 access token for authorization: oauth2 +let oauth2 = defaultClient.authentications['oauth2']; +oauth2.accessToken = 'YOUR ACCESS TOKEN'; + +let apiInstance = new ArduinoIotClient.TriggersV1Api(); +let id = "id_example"; // String | The id of the action +let updateAction = new ArduinoIotClient.UpdateAction(); // UpdateAction | +let opts = { + 'xOrganization': "xOrganization_example" // String | +}; +apiInstance.actionsV1Update(id, updateAction, opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| The id of the action | + **updateAction** | [**UpdateAction**](UpdateAction.md)| | + **xOrganization** | **String**| | [optional] + +### Return type + +[**ArduinoAction**](ArduinoAction.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/vnd.arduino.action+json, application/vnd.goa.error+json + + +## triggersV1Create + +> ArduinoTrigger triggersV1Create(trigger, opts) + +create triggers_v1 + +Creates a new trigger + +### Example + +```javascript +import ArduinoIotClient from '@arduino/arduino-iot-client'; +let defaultClient = ArduinoIotClient.ApiClient.instance; +// Configure OAuth2 access token for authorization: oauth2 +let oauth2 = defaultClient.authentications['oauth2']; +oauth2.accessToken = 'YOUR ACCESS TOKEN'; + +let apiInstance = new ArduinoIotClient.TriggersV1Api(); +let trigger = new ArduinoIotClient.Trigger(); // Trigger | +let opts = { + 'xOrganization': "xOrganization_example" // String | +}; +apiInstance.triggersV1Create(trigger, opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **trigger** | [**Trigger**](Trigger.md)| | + **xOrganization** | **String**| | [optional] + +### Return type + +[**ArduinoTrigger**](ArduinoTrigger.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/vnd.arduino.trigger+json, application/vnd.goa.error+json + + +## triggersV1Delete + +> triggersV1Delete(id, opts) + +delete triggers_v1 + +Removes a trigger + +### Example + +```javascript +import ArduinoIotClient from '@arduino/arduino-iot-client'; +let defaultClient = ArduinoIotClient.ApiClient.instance; +// Configure OAuth2 access token for authorization: oauth2 +let oauth2 = defaultClient.authentications['oauth2']; +oauth2.accessToken = 'YOUR ACCESS TOKEN'; + +let apiInstance = new ArduinoIotClient.TriggersV1Api(); +let id = "id_example"; // String | The id of the trigger +let opts = { + 'force': false, // Boolean | If true, hard delete the trigger + 'xOrganization': "xOrganization_example" // String | +}; +apiInstance.triggersV1Delete(id, opts).then(() => { + console.log('API called successfully.'); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| The id of the trigger | + **force** | **Boolean**| If true, hard delete the trigger | [optional] [default to false] + **xOrganization** | **String**| | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/vnd.goa.error+json, text/plain + + +## triggersV1List + +> [ArduinoTrigger] triggersV1List(opts) + +list triggers_v1 + +Returns the list of triggers + +### Example + +```javascript +import ArduinoIotClient from '@arduino/arduino-iot-client'; +let defaultClient = ArduinoIotClient.ApiClient.instance; +// Configure OAuth2 access token for authorization: oauth2 +let oauth2 = defaultClient.authentications['oauth2']; +oauth2.accessToken = 'YOUR ACCESS TOKEN'; + +let apiInstance = new ArduinoIotClient.TriggersV1Api(); +let opts = { + 'deviceId': "deviceId_example", // String | The id of the device associated with the triggers (mutually exclusive with 'property_id') + 'propertyId': "propertyId_example", // String | The id of the property associated with the triggers (mutually exclusive with 'device_id') + 'showDeleted': false, // Boolean | If true, shows the soft deleted triggers + 'sourceType': "sourceType_example", // String | The source type of the trigger, could be PROPERTY, DEVICE_INCLUDE or DEVICE_EXCLUDE + 'xOrganization': "xOrganization_example" // String | +}; +apiInstance.triggersV1List(opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deviceId** | **String**| The id of the device associated with the triggers (mutually exclusive with 'property_id') | [optional] + **propertyId** | **String**| The id of the property associated with the triggers (mutually exclusive with 'device_id') | [optional] + **showDeleted** | **Boolean**| If true, shows the soft deleted triggers | [optional] [default to false] + **sourceType** | **String**| The source type of the trigger, could be PROPERTY, DEVICE_INCLUDE or DEVICE_EXCLUDE | [optional] + **xOrganization** | **String**| | [optional] + +### Return type + +[**[ArduinoTrigger]**](ArduinoTrigger.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/vnd.arduino.trigger+json; type=collection, application/vnd.goa.error+json + + +## triggersV1Patch + +> ArduinoTrigger triggersV1Patch(id, trigger, opts) + +patch triggers_v1 + +Patch a trigger + +### Example + +```javascript +import ArduinoIotClient from '@arduino/arduino-iot-client'; +let defaultClient = ArduinoIotClient.ApiClient.instance; +// Configure OAuth2 access token for authorization: oauth2 +let oauth2 = defaultClient.authentications['oauth2']; +oauth2.accessToken = 'YOUR ACCESS TOKEN'; + +let apiInstance = new ArduinoIotClient.TriggersV1Api(); +let id = "id_example"; // String | The id of the trigger +let trigger = new ArduinoIotClient.Trigger(); // Trigger | +let opts = { + 'xOrganization': "xOrganization_example" // String | +}; +apiInstance.triggersV1Patch(id, trigger, opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| The id of the trigger | + **trigger** | [**Trigger**](Trigger.md)| | + **xOrganization** | **String**| | [optional] + +### Return type + +[**ArduinoTrigger**](ArduinoTrigger.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/vnd.arduino.trigger+json, application/vnd.goa.error+json + + +## triggersV1Show + +> ArduinoTriggerWithLinkedEntities triggersV1Show(id, opts) + +show triggers_v1 + +Returns a trigger + +### Example + +```javascript +import ArduinoIotClient from '@arduino/arduino-iot-client'; +let defaultClient = ArduinoIotClient.ApiClient.instance; +// Configure OAuth2 access token for authorization: oauth2 +let oauth2 = defaultClient.authentications['oauth2']; +oauth2.accessToken = 'YOUR ACCESS TOKEN'; + +let apiInstance = new ArduinoIotClient.TriggersV1Api(); +let id = "id_example"; // String | The id of the trigger +let opts = { + 'xOrganization': "xOrganization_example" // String | +}; +apiInstance.triggersV1Show(id, opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| The id of the trigger | + **xOrganization** | **String**| | [optional] + +### Return type + +[**ArduinoTriggerWithLinkedEntities**](ArduinoTriggerWithLinkedEntities.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/vnd.arduino.trigger_with_linked_entities+json, application/vnd.goa.error+json + + +## triggersV1Template + +> ArduinoTriggerTemplate triggersV1Template(id, opts) + +template triggers_v1 + +Extract template from the given trigger + +### Example + +```javascript +import ArduinoIotClient from '@arduino/arduino-iot-client'; +let defaultClient = ArduinoIotClient.ApiClient.instance; +// Configure OAuth2 access token for authorization: oauth2 +let oauth2 = defaultClient.authentications['oauth2']; +oauth2.accessToken = 'YOUR ACCESS TOKEN'; + +let apiInstance = new ArduinoIotClient.TriggersV1Api(); +let id = "id_example"; // String | The id of the trigger +let opts = { + 'xOrganization': "xOrganization_example" // String | +}; +apiInstance.triggersV1Template(id, opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| The id of the trigger | + **xOrganization** | **String**| | [optional] + +### Return type + +[**ArduinoTriggerTemplate**](ArduinoTriggerTemplate.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/vnd.arduino.trigger_template+json, application/vnd.goa.error+json + + +## triggersV1Update + +> ArduinoTrigger triggersV1Update(id, trigger, opts) + +update triggers_v1 + +Updates a trigger + +### Example + +```javascript +import ArduinoIotClient from '@arduino/arduino-iot-client'; +let defaultClient = ArduinoIotClient.ApiClient.instance; +// Configure OAuth2 access token for authorization: oauth2 +let oauth2 = defaultClient.authentications['oauth2']; +oauth2.accessToken = 'YOUR ACCESS TOKEN'; + +let apiInstance = new ArduinoIotClient.TriggersV1Api(); +let id = "id_example"; // String | The id of the trigger +let trigger = new ArduinoIotClient.Trigger(); // Trigger | +let opts = { + 'xOrganization': "xOrganization_example" // String | +}; +apiInstance.triggersV1Update(id, trigger, opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| The id of the trigger | + **trigger** | [**Trigger**](Trigger.md)| | + **xOrganization** | **String**| | [optional] + +### Return type + +[**ArduinoTrigger**](ArduinoTrigger.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/vnd.arduino.trigger+json, application/vnd.goa.error+json + diff --git a/docs/UpdateAction.md b/docs/UpdateAction.md new file mode 100644 index 0000000..168de3c --- /dev/null +++ b/docs/UpdateAction.md @@ -0,0 +1,13 @@ +# ArduinoIotClient.UpdateAction + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **String** | The description of the trigger | [optional] +**email** | [**EmailAction**](EmailAction.md) | | [optional] +**name** | **String** | The name of the action | [optional] +**pushNotification** | [**PushAction**](PushAction.md) | | [optional] +**triggerId** | **String** | Id of the trigger the action is associated to | [optional] + + diff --git a/docs/UserRecipient.md b/docs/UserRecipient.md new file mode 100644 index 0000000..9447bbd --- /dev/null +++ b/docs/UserRecipient.md @@ -0,0 +1,11 @@ +# ArduinoIotClient.UserRecipient + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | The email address of the user | [optional] +**id** | **String** | The id of the user | +**username** | **String** | The username of the user | [optional] + + diff --git a/docs/Variable.md b/docs/Variable.md new file mode 100644 index 0000000..013d962 --- /dev/null +++ b/docs/Variable.md @@ -0,0 +1,54 @@ +# ArduinoIotClient.Variable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**attribute** | **String** | The template expression that extracts the value from the respective entity | +**entity** | **String** | Type of the entity being referenced | +**id** | **String** | The ID of the referenced entity | [optional] +**placeholder** | **String** | Name of the variable as referenced by the expression | +**propertyId** | **String** | The ID of the property referenced entity | [optional] +**thingId** | **String** | The ID of the thing referenced entity | [optional] + + + +## Enum: AttributeEnum + + +* `ID` (value: `"ID"`) + +* `NAME` (value: `"NAME"`) + +* `VALUE` (value: `"VALUE"`) + +* `TIMESTAMP` (value: `"TIMESTAMP"`) + +* `USERNAME` (value: `"USERNAME"`) + +* `EMAIL` (value: `"EMAIL"`) + +* `STATUS` (value: `"STATUS"`) + + + + + +## Enum: EntityEnum + + +* `RECIPIENT` (value: `"RECIPIENT"`) + +* `USER` (value: `"USER"`) + +* `DEVICE` (value: `"DEVICE"`) + +* `THING` (value: `"THING"`) + +* `PROPERTY` (value: `"PROPERTY"`) + +* `TRIGGERING_DEVICE` (value: `"TRIGGERING_DEVICE"`) + + + + diff --git a/src/api/DashboardsV2Api.js b/src/api/DashboardsV2Api.js index 34eb47a..a20d2b8 100644 --- a/src/api/DashboardsV2Api.js +++ b/src/api/DashboardsV2Api.js @@ -48,9 +48,9 @@ export default class DashboardsV2Api { * clone dashboards_v2 * Clone an existing dashboard * @param {String} id The id of the dashboard - * @param {module:model/Clone} clone + * @param {module:model/Clone} clone Add overrides used when performing a clone of a dashboard * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoDashboardv2} and HTTP response */ dashboardsV2CloneWithHttpInfo(id, clone, opts) { @@ -77,7 +77,7 @@ export default class DashboardsV2Api { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.arduino.dashboardv2+json', 'application/vnd.goa.error+json']; let returnType = ArduinoDashboardv2; return this.apiClient.callApi( @@ -91,9 +91,9 @@ export default class DashboardsV2Api { * clone dashboards_v2 * Clone an existing dashboard * @param {String} id The id of the dashboard - * @param {module:model/Clone} clone + * @param {module:model/Clone} clone Add overrides used when performing a clone of a dashboard * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoDashboardv2} */ dashboardsV2Clone(id, clone, opts) { @@ -107,9 +107,9 @@ export default class DashboardsV2Api { /** * create dashboards_v2 * Create a new dashboard - * @param {module:model/Dashboardv2} dashboardv2 DashboardV2Payload describes a dashboard + * @param {module:model/Dashboardv2} dashboardv2 Describes a dashboard * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoDashboardv2} and HTTP response */ dashboardsV2CreateWithHttpInfo(dashboardv2, opts) { @@ -131,7 +131,7 @@ export default class DashboardsV2Api { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.arduino.dashboardv2+json', 'application/vnd.goa.error+json']; let returnType = ArduinoDashboardv2; return this.apiClient.callApi( @@ -144,9 +144,9 @@ export default class DashboardsV2Api { /** * create dashboards_v2 * Create a new dashboard - * @param {module:model/Dashboardv2} dashboardv2 DashboardV2Payload describes a dashboard + * @param {module:model/Dashboardv2} dashboardv2 Describes a dashboard * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoDashboardv2} */ dashboardsV2Create(dashboardv2, opts) { @@ -162,7 +162,8 @@ export default class DashboardsV2Api { * Delete a dashboard * @param {String} id The id of the dashboard * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {Boolean} [force = false)] If true, hard delete the thing + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response */ dashboardsV2DeleteWithHttpInfo(id, opts) { @@ -177,6 +178,7 @@ export default class DashboardsV2Api { 'id': id }; let queryParams = { + 'force': opts['force'] }; let headerParams = { 'X-Organization': opts['xOrganization'] @@ -200,7 +202,8 @@ export default class DashboardsV2Api { * Delete a dashboard * @param {String} id The id of the dashboard * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {Boolean} opts.force If true, hard delete the thing (default to false) + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise} */ dashboardsV2Delete(id, opts) { @@ -217,7 +220,7 @@ export default class DashboardsV2Api { * @param {String} id The id of the dashboard * @param {String} userId The id of the user * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response */ dashboardsV2DeleteShareWithHttpInfo(id, userId, opts) { @@ -261,7 +264,7 @@ export default class DashboardsV2Api { * @param {String} id The id of the dashboard * @param {String} userId The id of the user * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise} */ dashboardsV2DeleteShare(id, userId, opts) { @@ -279,7 +282,7 @@ export default class DashboardsV2Api { * @param {String} widgetId The id of the widget * @param {module:model/Widgetlink} widgetlink * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoVariableslinks} and HTTP response */ dashboardsV2LinkWithHttpInfo(id, widgetId, widgetlink, opts) { @@ -311,7 +314,7 @@ export default class DashboardsV2Api { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.arduino.variableslinks+json', 'application/vnd.goa.error+json']; let returnType = ArduinoVariableslinks; return this.apiClient.callApi( @@ -328,7 +331,7 @@ export default class DashboardsV2Api { * @param {String} widgetId The id of the widget * @param {module:model/Widgetlink} widgetlink * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoVariableslinks} */ dashboardsV2Link(id, widgetId, widgetlink, opts) { @@ -343,9 +346,9 @@ export default class DashboardsV2Api { * list dashboards_v2 * Returns the list of dashboards * @param {Object} opts Optional parameters - * @param {String} [name] The name of the dashboard - * @param {String} [userId] The user_id of the dashboard's owner - * @param {String} [xOrganization] + * @param {String} [name] Filter by name of the dashboard. It support like matching. + * @param {String} [userId] Filter by user_id of the dashboard's owner + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response */ dashboardsV2ListWithHttpInfo(opts) { @@ -379,9 +382,9 @@ export default class DashboardsV2Api { * list dashboards_v2 * Returns the list of dashboards * @param {Object} opts Optional parameters - * @param {String} opts.name The name of the dashboard - * @param {String} opts.userId The user_id of the dashboard's owner - * @param {String} opts.xOrganization + * @param {String} opts.name Filter by name of the dashboard. It support like matching. + * @param {String} opts.userId Filter by user_id of the dashboard's owner + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} */ dashboardsV2List(opts) { @@ -397,7 +400,7 @@ export default class DashboardsV2Api { * List of users the dashboard has been shared with * @param {String} id The id of the dashboard * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response */ dashboardsV2ListSharesWithHttpInfo(id, opts) { @@ -435,7 +438,7 @@ export default class DashboardsV2Api { * List of users the dashboard has been shared with * @param {String} id The id of the dashboard * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} */ dashboardsV2ListShares(id, opts) { @@ -446,13 +449,73 @@ export default class DashboardsV2Api { } + /** + * patch dashboards_v2 + * Updates an existing dashboard field without overwriting the existing data + * @param {String} id The id of the dashboard + * @param {module:model/Dashboardv2} dashboardv2 Describes a dashboard + * @param {Object} opts Optional parameters + * @param {String} [xOrganization] Organization space identifer (optional) + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoDashboardv2} and HTTP response + */ + dashboardsV2PatchWithHttpInfo(id, dashboardv2, opts) { + opts = opts || {}; + let postBody = dashboardv2; + // verify the required parameter 'id' is set + if (id === undefined || id === null) { + throw new Error("Missing the required parameter 'id' when calling dashboardsV2Patch"); + } + // verify the required parameter 'dashboardv2' is set + if (dashboardv2 === undefined || dashboardv2 === null) { + throw new Error("Missing the required parameter 'dashboardv2' when calling dashboardsV2Patch"); + } + + let pathParams = { + 'id': id + }; + let queryParams = { + }; + let headerParams = { + 'X-Organization': opts['xOrganization'] + }; + let formParams = { + }; + + let authNames = ['oauth2']; + let contentTypes = ['application/json']; + let accepts = ['application/vnd.arduino.dashboardv2+json', 'application/vnd.goa.error+json']; + let returnType = ArduinoDashboardv2; + return this.apiClient.callApi( + '/iot/v2/dashboards/{id}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * patch dashboards_v2 + * Updates an existing dashboard field without overwriting the existing data + * @param {String} id The id of the dashboard + * @param {module:model/Dashboardv2} dashboardv2 Describes a dashboard + * @param {Object} opts Optional parameters + * @param {String} opts.xOrganization Organization space identifer (optional) + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoDashboardv2} + */ + dashboardsV2Patch(id, dashboardv2, opts) { + return this.dashboardsV2PatchWithHttpInfo(id, dashboardv2, opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + /** * requestAccess dashboards_v2 * Request access to a dashboard * @param {String} id The id of the dashboard * @param {module:model/Sharerequest} sharerequest * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response */ dashboardsV2RequestAccessWithHttpInfo(id, sharerequest, opts) { @@ -479,7 +542,7 @@ export default class DashboardsV2Api { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.goa.error+json', 'text/plain']; let returnType = null; return this.apiClient.callApi( @@ -495,7 +558,7 @@ export default class DashboardsV2Api { * @param {String} id The id of the dashboard * @param {module:model/Sharerequest} sharerequest * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise} */ dashboardsV2RequestAccess(id, sharerequest, opts) { @@ -512,7 +575,7 @@ export default class DashboardsV2Api { * @param {String} id The id of the dashboard * @param {module:model/Dashboardshare} dashboardshare * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response */ dashboardsV2ShareWithHttpInfo(id, dashboardshare, opts) { @@ -539,7 +602,7 @@ export default class DashboardsV2Api { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.goa.error+json', 'text/plain']; let returnType = null; return this.apiClient.callApi( @@ -555,7 +618,7 @@ export default class DashboardsV2Api { * @param {String} id The id of the dashboard * @param {module:model/Dashboardshare} dashboardshare * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise} */ dashboardsV2Share(id, dashboardshare, opts) { @@ -568,10 +631,10 @@ export default class DashboardsV2Api { /** * show dashboards_v2 - * Show a dashboard + * Show a dashboard by id * @param {String} id The id of the dashboard * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoDashboardv2} and HTTP response */ dashboardsV2ShowWithHttpInfo(id, opts) { @@ -606,10 +669,10 @@ export default class DashboardsV2Api { /** * show dashboards_v2 - * Show a dashboard + * Show a dashboard by id * @param {String} id The id of the dashboard * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoDashboardv2} */ dashboardsV2Show(id, opts) { @@ -625,7 +688,7 @@ export default class DashboardsV2Api { * Get a template of the dashboard * @param {String} id The id of the dashboard * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoDashboardv2template} and HTTP response */ dashboardsV2TemplateWithHttpInfo(id, opts) { @@ -663,7 +726,7 @@ export default class DashboardsV2Api { * Get a template of the dashboard * @param {String} id The id of the dashboard * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoDashboardv2template} */ dashboardsV2Template(id, opts) { @@ -678,9 +741,9 @@ export default class DashboardsV2Api { * update dashboards_v2 * Updates an existing dashboard * @param {String} id The id of the dashboard - * @param {module:model/Dashboardv2} dashboardv2 DashboardV2Payload describes a dashboard + * @param {module:model/Dashboardv2} dashboardv2 Describes a dashboard * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoDashboardv2} and HTTP response */ dashboardsV2UpdateWithHttpInfo(id, dashboardv2, opts) { @@ -707,7 +770,7 @@ export default class DashboardsV2Api { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.arduino.dashboardv2+json', 'application/vnd.goa.error+json']; let returnType = ArduinoDashboardv2; return this.apiClient.callApi( @@ -721,9 +784,9 @@ export default class DashboardsV2Api { * update dashboards_v2 * Updates an existing dashboard * @param {String} id The id of the dashboard - * @param {module:model/Dashboardv2} dashboardv2 DashboardV2Payload describes a dashboard + * @param {module:model/Dashboardv2} dashboardv2 Describes a dashboard * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoDashboardv2} */ dashboardsV2Update(id, dashboardv2, opts) { diff --git a/src/api/DevicesV2Api.js b/src/api/DevicesV2Api.js index 45ab08d..a80381e 100644 --- a/src/api/DevicesV2Api.js +++ b/src/api/DevicesV2Api.js @@ -48,7 +48,7 @@ export default class DevicesV2Api { * Creates a new device associated to the user. * @param {module:model/CreateDevicesV2Payload} createDevicesV2Payload DeviceV2 describes a device. * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoDevicev2} and HTTP response */ devicesV2CreateWithHttpInfo(createDevicesV2Payload, opts) { @@ -70,7 +70,7 @@ export default class DevicesV2Api { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.arduino.devicev2+json', 'application/vnd.goa.error+json']; let returnType = ArduinoDevicev2; return this.apiClient.callApi( @@ -85,7 +85,7 @@ export default class DevicesV2Api { * Creates a new device associated to the user. * @param {module:model/CreateDevicesV2Payload} createDevicesV2Payload DeviceV2 describes a device. * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoDevicev2} */ devicesV2Create(createDevicesV2Payload, opts) { @@ -101,7 +101,8 @@ export default class DevicesV2Api { * Removes a device associated to the user * @param {String} id The id of the device * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {Boolean} [force = false)] If true, hard delete the device + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response */ devicesV2DeleteWithHttpInfo(id, opts) { @@ -116,6 +117,7 @@ export default class DevicesV2Api { 'id': id }; let queryParams = { + 'force': opts['force'] }; let headerParams = { 'X-Organization': opts['xOrganization'] @@ -139,7 +141,8 @@ export default class DevicesV2Api { * Removes a device associated to the user * @param {String} id The id of the device * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {Boolean} opts.force If true, hard delete the device (default to false) + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise} */ devicesV2Delete(id, opts) { @@ -157,7 +160,7 @@ export default class DevicesV2Api { * @param {Object} opts Optional parameters * @param {Number} [limit] The number of events to select * @param {String} [start] The time at which to start selecting events - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoDevicev2EventProperties} and HTTP response */ devicesV2GetEventsWithHttpInfo(id, opts) { @@ -199,7 +202,7 @@ export default class DevicesV2Api { * @param {Object} opts Optional parameters * @param {Number} opts.limit The number of events to select * @param {String} opts.start The time at which to start selecting events - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoDevicev2EventProperties} */ devicesV2GetEvents(id, opts) { @@ -216,7 +219,7 @@ export default class DevicesV2Api { * @param {String} id The id of the device * @param {Object} opts Optional parameters * @param {Boolean} [showDeleted = false)] If true, shows the soft deleted properties - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoDevicev2properties} and HTTP response */ devicesV2GetPropertiesWithHttpInfo(id, opts) { @@ -256,7 +259,7 @@ export default class DevicesV2Api { * @param {String} id The id of the device * @param {Object} opts Optional parameters * @param {Boolean} opts.showDeleted If true, shows the soft deleted properties (default to false) - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoDevicev2properties} */ devicesV2GetProperties(id, opts) { @@ -274,7 +277,7 @@ export default class DevicesV2Api { * @param {Object} opts Optional parameters * @param {Number} [limit = 30)] The number of events to select * @param {String} [start] The time at which to start selecting events - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoDevicev2StatusEvents} and HTTP response */ devicesV2GetStatusEventsWithHttpInfo(id, opts) { @@ -316,7 +319,7 @@ export default class DevicesV2Api { * @param {Object} opts Optional parameters * @param {Number} opts.limit The number of events to select (default to 30) * @param {String} opts.start The time at which to start selecting events - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoDevicev2StatusEvents} */ devicesV2GetStatusEvents(id, opts) { @@ -333,8 +336,9 @@ export default class DevicesV2Api { * @param {Object} opts Optional parameters * @param {Boolean} [acrossUserIds = false)] If true, returns all the devices * @param {String} [serial] Filter by device serial number + * @param {Boolean} [showDeleted = false)] If true, shows the soft deleted devices * @param {Array.} [tags] Filter by tags - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response */ devicesV2ListWithHttpInfo(opts) { @@ -346,6 +350,7 @@ export default class DevicesV2Api { let queryParams = { 'across_user_ids': opts['acrossUserIds'], 'serial': opts['serial'], + 'show_deleted': opts['showDeleted'], 'tags': this.apiClient.buildCollectionParam(opts['tags'], 'multi') }; let headerParams = { @@ -371,8 +376,9 @@ export default class DevicesV2Api { * @param {Object} opts Optional parameters * @param {Boolean} opts.acrossUserIds If true, returns all the devices (default to false) * @param {String} opts.serial Filter by device serial number + * @param {Boolean} opts.showDeleted If true, shows the soft deleted devices (default to false) * @param {Array.} opts.tags Filter by tags - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} */ devicesV2List(opts) { @@ -388,7 +394,7 @@ export default class DevicesV2Api { * Returns the device requested by the user * @param {String} id The id of the device * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoDevicev2} and HTTP response */ devicesV2ShowWithHttpInfo(id, opts) { @@ -426,7 +432,7 @@ export default class DevicesV2Api { * Returns the device requested by the user * @param {String} id The id of the device * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoDevicev2} */ devicesV2Show(id, opts) { @@ -445,7 +451,7 @@ export default class DevicesV2Api { * @param {Object} opts Optional parameters * @param {Number} [limit] The number of properties to select * @param {String} [start] The time at which to start selecting properties - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoDevicev2propertyvalues} and HTTP response */ devicesV2TimeseriesWithHttpInfo(id, pid, opts) { @@ -493,7 +499,7 @@ export default class DevicesV2Api { * @param {Object} opts Optional parameters * @param {Number} opts.limit The number of properties to select * @param {String} opts.start The time at which to start selecting properties - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoDevicev2propertyvalues} */ devicesV2Timeseries(id, pid, opts) { @@ -510,7 +516,7 @@ export default class DevicesV2Api { * @param {String} id The id of the device * @param {module:model/Devicev2} devicev2 DeviceV2 describes a device. * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoDevicev2} and HTTP response */ devicesV2UpdateWithHttpInfo(id, devicev2, opts) { @@ -537,7 +543,7 @@ export default class DevicesV2Api { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.arduino.devicev2+json', 'application/vnd.goa.error+json']; let returnType = ArduinoDevicev2; return this.apiClient.callApi( @@ -553,7 +559,7 @@ export default class DevicesV2Api { * @param {String} id The id of the device * @param {module:model/Devicev2} devicev2 DeviceV2 describes a device. * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoDevicev2} */ devicesV2Update(id, devicev2, opts) { @@ -570,7 +576,7 @@ export default class DevicesV2Api { * @param {String} id The id of the device * @param {module:model/PropertiesValues} propertiesValues * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response */ devicesV2UpdatePropertiesWithHttpInfo(id, propertiesValues, opts) { @@ -597,7 +603,7 @@ export default class DevicesV2Api { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.goa.error+json', 'text/plain']; let returnType = null; return this.apiClient.callApi( @@ -613,7 +619,7 @@ export default class DevicesV2Api { * @param {String} id The id of the device * @param {module:model/PropertiesValues} propertiesValues * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise} */ devicesV2UpdateProperties(id, propertiesValues, opts) { diff --git a/src/api/DevicesV2CertsApi.js b/src/api/DevicesV2CertsApi.js index 0695e7e..77dce0c 100644 --- a/src/api/DevicesV2CertsApi.js +++ b/src/api/DevicesV2CertsApi.js @@ -67,7 +67,7 @@ export default class DevicesV2CertsApi { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.arduino.devicev2.cert+json', 'application/vnd.goa.error+json']; let returnType = ArduinoDevicev2Cert; return this.apiClient.callApi( @@ -285,7 +285,7 @@ export default class DevicesV2CertsApi { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.arduino.devicev2.cert+json', 'application/vnd.goa.error+json']; let returnType = ArduinoDevicev2Cert; return this.apiClient.callApi( diff --git a/src/api/DevicesV2OtaApi.js b/src/api/DevicesV2OtaApi.js index 530514b..176efa5 100644 --- a/src/api/DevicesV2OtaApi.js +++ b/src/api/DevicesV2OtaApi.js @@ -67,7 +67,7 @@ export default class DevicesV2OtaApi { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.goa.error+json', 'text/plain']; let returnType = null; return this.apiClient.callApi( @@ -185,7 +185,7 @@ export default class DevicesV2OtaApi { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.goa.error+json', 'text/plain']; let returnType = null; return this.apiClient.callApi( diff --git a/src/api/DevicesV2PassApi.js b/src/api/DevicesV2PassApi.js index 498e70a..37b0551 100644 --- a/src/api/DevicesV2PassApi.js +++ b/src/api/DevicesV2PassApi.js @@ -67,7 +67,7 @@ export default class DevicesV2PassApi { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.goa.error+json', 'text/plain']; let returnType = null; return this.apiClient.callApi( @@ -223,7 +223,7 @@ export default class DevicesV2PassApi { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.arduino.devicev2.pass+json', 'application/vnd.goa.error+json']; let returnType = ArduinoDevicev2Pass; return this.apiClient.callApi( diff --git a/src/api/DevicesV2TagsApi.js b/src/api/DevicesV2TagsApi.js index a4a6847..a0ce176 100644 --- a/src/api/DevicesV2TagsApi.js +++ b/src/api/DevicesV2TagsApi.js @@ -169,7 +169,7 @@ export default class DevicesV2TagsApi { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.goa.error+json', 'text/plain']; let returnType = null; return this.apiClient.callApi( diff --git a/src/api/LoraDevicesV1Api.js b/src/api/LoraDevicesV1Api.js index 25679e7..4e96e2b 100644 --- a/src/api/LoraDevicesV1Api.js +++ b/src/api/LoraDevicesV1Api.js @@ -41,7 +41,7 @@ export default class LoraDevicesV1Api { * Create a new lora device. Its info are saved on our database, and on the lora provider network. Creates a device_v2 automatically * @param {module:model/CreateLoraDevicesV1Payload} createLoraDevicesV1Payload * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoLoradevicev1} and HTTP response */ loraDevicesV1CreateWithHttpInfo(createLoraDevicesV1Payload, opts) { @@ -62,8 +62,8 @@ export default class LoraDevicesV1Api { let formParams = { }; - let authNames = []; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let authNames = ['oauth2']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.arduino.loradevicev1+json']; let returnType = ArduinoLoradevicev1; return this.apiClient.callApi( @@ -78,7 +78,7 @@ export default class LoraDevicesV1Api { * Create a new lora device. Its info are saved on our database, and on the lora provider network. Creates a device_v2 automatically * @param {module:model/CreateLoraDevicesV1Payload} createLoraDevicesV1Payload * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoLoradevicev1} */ loraDevicesV1Create(createLoraDevicesV1Payload, opts) { diff --git a/src/api/LoraFreqPlanV1Api.js b/src/api/LoraFreqPlanV1Api.js index f9aaf85..a182779 100644 --- a/src/api/LoraFreqPlanV1Api.js +++ b/src/api/LoraFreqPlanV1Api.js @@ -53,7 +53,7 @@ export default class LoraFreqPlanV1Api { let formParams = { }; - let authNames = []; + let authNames = ['oauth2']; let contentTypes = []; let accepts = ['application/vnd.arduino.lorafreqplansv1+json', 'application/vnd.goa.error+json']; let returnType = ArduinoLorafreqplansv1; diff --git a/src/api/NetworkCredentialsV1Api.js b/src/api/NetworkCredentialsV1Api.js index 5bfd9ad..dc58cfd 100644 --- a/src/api/NetworkCredentialsV1Api.js +++ b/src/api/NetworkCredentialsV1Api.js @@ -63,7 +63,7 @@ export default class NetworkCredentialsV1Api { let formParams = { }; - let authNames = []; + let authNames = ['oauth2']; let contentTypes = []; let accepts = ['application/vnd.arduino.credentialsv1+json; type=collection', 'application/vnd.goa.error+json']; let returnType = [ArduinoCredentialsv1]; @@ -113,7 +113,7 @@ export default class NetworkCredentialsV1Api { let formParams = { }; - let authNames = []; + let authNames = ['oauth2']; let contentTypes = []; let accepts = ['application/json', 'application/vnd.goa.error+json']; let returnType = null; diff --git a/src/api/PropertiesV2Api.js b/src/api/PropertiesV2Api.js index d9bfe01..f95853c 100644 --- a/src/api/PropertiesV2Api.js +++ b/src/api/PropertiesV2Api.js @@ -45,7 +45,7 @@ export default class PropertiesV2Api { * @param {String} id The id of the thing * @param {module:model/Property} property PropertyPayload describes a property of a thing. No field is mandatory * @param {Object} opts Optional parameters - * @param {String} [xOrganization] The id of the organization + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoProperty} and HTTP response */ propertiesV2CreateWithHttpInfo(id, property, opts) { @@ -72,7 +72,7 @@ export default class PropertiesV2Api { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.arduino.property+json', 'application/vnd.goa.error+json']; let returnType = ArduinoProperty; return this.apiClient.callApi( @@ -88,7 +88,7 @@ export default class PropertiesV2Api { * @param {String} id The id of the thing * @param {module:model/Property} property PropertyPayload describes a property of a thing. No field is mandatory * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization The id of the organization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoProperty} */ propertiesV2Create(id, property, opts) { @@ -106,7 +106,7 @@ export default class PropertiesV2Api { * @param {String} pid The id of the property * @param {Object} opts Optional parameters * @param {Boolean} [force = false)] If true, hard delete the property - * @param {String} [xOrganization] The id of the organization + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response */ propertiesV2DeleteWithHttpInfo(id, pid, opts) { @@ -152,7 +152,7 @@ export default class PropertiesV2Api { * @param {String} pid The id of the property * @param {Object} opts Optional parameters * @param {Boolean} opts.force If true, hard delete the property (default to false) - * @param {String} opts.xOrganization The id of the organization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise} */ propertiesV2Delete(id, pid, opts) { @@ -169,7 +169,7 @@ export default class PropertiesV2Api { * @param {String} id The id of the thing * @param {Object} opts Optional parameters * @param {Boolean} [showDeleted = false)] If true, shows the soft deleted properties - * @param {String} [xOrganization] The id of the organization + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response */ propertiesV2ListWithHttpInfo(id, opts) { @@ -209,7 +209,7 @@ export default class PropertiesV2Api { * @param {String} id The id of the thing * @param {Object} opts Optional parameters * @param {Boolean} opts.showDeleted If true, shows the soft deleted properties (default to false) - * @param {String} opts.xOrganization The id of the organization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} */ propertiesV2List(id, opts) { @@ -227,7 +227,7 @@ export default class PropertiesV2Api { * @param {String} pid The id of the property * @param {module:model/PropertyValue} propertyValue PropertyValuePayload describes a property value * @param {Object} opts Optional parameters - * @param {String} [xOrganization] The id of the organization + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response */ propertiesV2PublishWithHttpInfo(id, pid, propertyValue, opts) { @@ -259,7 +259,7 @@ export default class PropertiesV2Api { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.goa.error+json', 'text/plain']; let returnType = null; return this.apiClient.callApi( @@ -276,7 +276,7 @@ export default class PropertiesV2Api { * @param {String} pid The id of the property * @param {module:model/PropertyValue} propertyValue PropertyValuePayload describes a property value * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization The id of the organization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise} */ propertiesV2Publish(id, pid, propertyValue, opts) { @@ -294,7 +294,7 @@ export default class PropertiesV2Api { * @param {String} pid The id of the property * @param {Object} opts Optional parameters * @param {Boolean} [showDeleted = false)] If true, shows the soft deleted properties - * @param {String} [xOrganization] The id of the organization + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoProperty} and HTTP response */ propertiesV2ShowWithHttpInfo(id, pid, opts) { @@ -340,7 +340,7 @@ export default class PropertiesV2Api { * @param {String} pid The id of the property * @param {Object} opts Optional parameters * @param {Boolean} opts.showDeleted If true, shows the soft deleted properties (default to false) - * @param {String} opts.xOrganization The id of the organization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoProperty} */ propertiesV2Show(id, pid, opts) { @@ -362,7 +362,7 @@ export default class PropertiesV2Api { * @param {String} [from] Get data with a timestamp >= to this date (default: 2 weeks ago, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z) * @param {Number} [interval] Binning interval in seconds (defaut: the smallest possible value compatibly with the limit of 1000 data points in the response) * @param {String} [to] Get data with a timestamp < to this date (default: now, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z) - * @param {String} [xOrganization] The id of the organization + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoTimeseriesmedia} and HTTP response */ propertiesV2TimeseriesWithHttpInfo(id, pid, opts) { @@ -416,7 +416,7 @@ export default class PropertiesV2Api { * @param {String} opts.from Get data with a timestamp >= to this date (default: 2 weeks ago, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z) * @param {Number} opts.interval Binning interval in seconds (defaut: the smallest possible value compatibly with the limit of 1000 data points in the response) * @param {String} opts.to Get data with a timestamp < to this date (default: now, min: 1842-01-01T00:00:00Z, max: 2242-01-01T00:00:00Z) - * @param {String} opts.xOrganization The id of the organization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoTimeseriesmedia} */ propertiesV2Timeseries(id, pid, opts) { @@ -434,7 +434,7 @@ export default class PropertiesV2Api { * @param {String} pid The id of the property * @param {module:model/Property} property PropertyPayload describes a property of a thing. No field is mandatory * @param {Object} opts Optional parameters - * @param {String} [xOrganization] The id of the organization + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoProperty} and HTTP response */ propertiesV2UpdateWithHttpInfo(id, pid, property, opts) { @@ -466,7 +466,7 @@ export default class PropertiesV2Api { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.arduino.property+json', 'application/vnd.goa.error+json']; let returnType = ArduinoProperty; return this.apiClient.callApi( @@ -483,7 +483,7 @@ export default class PropertiesV2Api { * @param {String} pid The id of the property * @param {module:model/Property} property PropertyPayload describes a property of a thing. No field is mandatory * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization The id of the organization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoProperty} */ propertiesV2Update(id, pid, property, opts) { diff --git a/src/api/SeriesV2Api.js b/src/api/SeriesV2Api.js index 1438c68..f78e9cc 100644 --- a/src/api/SeriesV2Api.js +++ b/src/api/SeriesV2Api.js @@ -49,7 +49,7 @@ export default class SeriesV2Api { * Returns the batch of time-series aggregated samples * @param {module:model/BatchQueryRequestsMediaV1} batchQueryRequestsMediaV1 * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoSeriesBatch} and HTTP response */ seriesV2BatchQueryWithHttpInfo(batchQueryRequestsMediaV1, opts) { @@ -71,7 +71,7 @@ export default class SeriesV2Api { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.arduino.series.batch+json', 'application/vnd.goa.error+json']; let returnType = ArduinoSeriesBatch; return this.apiClient.callApi( @@ -86,7 +86,7 @@ export default class SeriesV2Api { * Returns the batch of time-series aggregated samples * @param {module:model/BatchQueryRequestsMediaV1} batchQueryRequestsMediaV1 * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoSeriesBatch} */ seriesV2BatchQuery(batchQueryRequestsMediaV1, opts) { @@ -102,7 +102,7 @@ export default class SeriesV2Api { * Returns the batch of time-series raw samples * @param {module:model/BatchQueryRawRequestsMediaV1} batchQueryRawRequestsMediaV1 * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoSeriesRawBatch} and HTTP response */ seriesV2BatchQueryRawWithHttpInfo(batchQueryRawRequestsMediaV1, opts) { @@ -124,7 +124,7 @@ export default class SeriesV2Api { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.arduino.series.raw.batch+json', 'application/vnd.goa.error+json']; let returnType = ArduinoSeriesRawBatch; return this.apiClient.callApi( @@ -139,7 +139,7 @@ export default class SeriesV2Api { * Returns the batch of time-series raw samples * @param {module:model/BatchQueryRawRequestsMediaV1} batchQueryRawRequestsMediaV1 * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoSeriesRawBatch} */ seriesV2BatchQueryRaw(batchQueryRawRequestsMediaV1, opts) { @@ -155,7 +155,7 @@ export default class SeriesV2Api { * Returns the batch of time-series data raw * @param {module:model/BatchLastValueRequestsMediaV1} batchLastValueRequestsMediaV1 * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoSeriesRawBatchLastvalue} and HTTP response */ seriesV2BatchQueryRawLastValueWithHttpInfo(batchLastValueRequestsMediaV1, opts) { @@ -177,7 +177,7 @@ export default class SeriesV2Api { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.arduino.series.raw.batch.lastvalue+json', 'application/vnd.goa.error+json']; let returnType = ArduinoSeriesRawBatchLastvalue; return this.apiClient.callApi( @@ -192,7 +192,7 @@ export default class SeriesV2Api { * Returns the batch of time-series data raw * @param {module:model/BatchLastValueRequestsMediaV1} batchLastValueRequestsMediaV1 * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoSeriesRawBatchLastvalue} */ seriesV2BatchQueryRawLastValue(batchLastValueRequestsMediaV1, opts) { @@ -208,7 +208,7 @@ export default class SeriesV2Api { * Returns a batch of time-series sampled samples. To be used for types that does not support mathematic aggregation. Types supported: strings, complex types. * @param {module:model/BatchQuerySampledRequestsMediaV1} batchQuerySampledRequestsMediaV1 * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoSeriesBatchSampled} and HTTP response */ seriesV2BatchQuerySamplingWithHttpInfo(batchQuerySampledRequestsMediaV1, opts) { @@ -230,7 +230,7 @@ export default class SeriesV2Api { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.arduino.series.batch.sampled+json', 'application/vnd.goa.error+json']; let returnType = ArduinoSeriesBatchSampled; return this.apiClient.callApi( @@ -245,7 +245,7 @@ export default class SeriesV2Api { * Returns a batch of time-series sampled samples. To be used for types that does not support mathematic aggregation. Types supported: strings, complex types. * @param {module:model/BatchQuerySampledRequestsMediaV1} batchQuerySampledRequestsMediaV1 * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoSeriesBatchSampled} */ seriesV2BatchQuerySampling(batchQuerySampledRequestsMediaV1, opts) { @@ -261,7 +261,7 @@ export default class SeriesV2Api { * Request sending of historical data of properties by email * @param {module:model/HistoricDataRequest} historicDataRequest * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response */ seriesV2HistoricDataWithHttpInfo(historicDataRequest, opts) { @@ -283,7 +283,7 @@ export default class SeriesV2Api { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.goa.error+json']; let returnType = null; return this.apiClient.callApi( @@ -298,7 +298,7 @@ export default class SeriesV2Api { * Request sending of historical data of properties by email * @param {module:model/HistoricDataRequest} historicDataRequest * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise} */ seriesV2HistoricData(historicDataRequest, opts) { diff --git a/src/api/TemplatesApi.js b/src/api/TemplatesApi.js index 6a81052..777bd2c 100644 --- a/src/api/TemplatesApi.js +++ b/src/api/TemplatesApi.js @@ -42,7 +42,7 @@ export default class TemplatesApi { * Apply an existing cloud template and generate all the needed resources * @param {module:model/Template} template TemplatePayload describes the needed attribute to apply a template * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoTemplate} and HTTP response */ templatesApplyWithHttpInfo(template, opts) { @@ -63,8 +63,8 @@ export default class TemplatesApi { let formParams = { }; - let authNames = []; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let authNames = ['oauth2']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.arduino.template+json', 'application/vnd.goa.error+json']; let returnType = ArduinoTemplate; return this.apiClient.callApi( @@ -79,7 +79,7 @@ export default class TemplatesApi { * Apply an existing cloud template and generate all the needed resources * @param {module:model/Template} template TemplatePayload describes the needed attribute to apply a template * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoTemplate} */ templatesApply(template, opts) { diff --git a/src/api/ThingsV2Api.js b/src/api/ThingsV2Api.js index 587e6f8..dda1d91 100644 --- a/src/api/ThingsV2Api.js +++ b/src/api/ThingsV2Api.js @@ -48,7 +48,7 @@ export default class ThingsV2Api { * @param {String} id The id of the thing * @param {module:model/ThingClone} thingClone Payload to clone a new thing from an existing one * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoThing} and HTTP response */ thingsV2CloneWithHttpInfo(id, thingClone, opts) { @@ -75,7 +75,7 @@ export default class ThingsV2Api { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.arduino.thing+json', 'application/vnd.goa.error+json']; let returnType = ArduinoThing; return this.apiClient.callApi( @@ -91,7 +91,7 @@ export default class ThingsV2Api { * @param {String} id The id of the thing * @param {module:model/ThingClone} thingClone Payload to clone a new thing from an existing one * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoThing} */ thingsV2Clone(id, thingClone, opts) { @@ -108,7 +108,7 @@ export default class ThingsV2Api { * @param {module:model/ThingCreate} thingCreate Payload to create a new thing * @param {Object} opts Optional parameters * @param {Boolean} [force = false)] If true, detach device from the other thing, and attach to this thing - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoThing} and HTTP response */ thingsV2CreateWithHttpInfo(thingCreate, opts) { @@ -131,7 +131,7 @@ export default class ThingsV2Api { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.arduino.thing+json', 'application/vnd.goa.error+json']; let returnType = ArduinoThing; return this.apiClient.callApi( @@ -147,7 +147,7 @@ export default class ThingsV2Api { * @param {module:model/ThingCreate} thingCreate Payload to create a new thing * @param {Object} opts Optional parameters * @param {Boolean} opts.force If true, detach device from the other thing, and attach to this thing (default to false) - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoThing} */ thingsV2Create(thingCreate, opts) { @@ -164,7 +164,7 @@ export default class ThingsV2Api { * @param {String} id The id of the thing * @param {module:model/ThingSketch} thingSketch ThingSketchPayload describes a sketch of a thing * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoThing} and HTTP response */ thingsV2CreateSketchWithHttpInfo(id, thingSketch, opts) { @@ -191,7 +191,7 @@ export default class ThingsV2Api { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.arduino.thing+json', 'application/vnd.goa.error+json']; let returnType = ArduinoThing; return this.apiClient.callApi( @@ -207,7 +207,7 @@ export default class ThingsV2Api { * @param {String} id The id of the thing * @param {module:model/ThingSketch} thingSketch ThingSketchPayload describes a sketch of a thing * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoThing} */ thingsV2CreateSketch(id, thingSketch, opts) { @@ -224,7 +224,7 @@ export default class ThingsV2Api { * @param {String} id The id of the thing * @param {Object} opts Optional parameters * @param {Boolean} [force = false)] If true, hard delete the thing - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response */ thingsV2DeleteWithHttpInfo(id, opts) { @@ -264,7 +264,7 @@ export default class ThingsV2Api { * @param {String} id The id of the thing * @param {Object} opts Optional parameters * @param {Boolean} opts.force If true, hard delete the thing (default to false) - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise} */ thingsV2Delete(id, opts) { @@ -279,7 +279,7 @@ export default class ThingsV2Api { * deleteSketch things_v2 * @param {String} id The id of the thing * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoThing} and HTTP response */ thingsV2DeleteSketchWithHttpInfo(id, opts) { @@ -316,7 +316,7 @@ export default class ThingsV2Api { * deleteSketch things_v2 * @param {String} id The id of the thing * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoThing} */ thingsV2DeleteSketch(id, opts) { @@ -337,7 +337,7 @@ export default class ThingsV2Api { * @param {Boolean} [showDeleted = false)] If true, shows the soft deleted things * @param {Boolean} [showProperties = false)] If true, returns things with their properties, and last values * @param {Array.} [tags] Filter by tags - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response */ thingsV2ListWithHttpInfo(opts) { @@ -381,7 +381,7 @@ export default class ThingsV2Api { * @param {Boolean} opts.showDeleted If true, shows the soft deleted things (default to false) * @param {Boolean} opts.showProperties If true, returns things with their properties, and last values (default to false) * @param {Array.} opts.tags Filter by tags - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} */ thingsV2List(opts) { @@ -398,7 +398,7 @@ export default class ThingsV2Api { * @param {String} id The id of the thing * @param {Object} opts Optional parameters * @param {Boolean} [showDeleted = false)] If true, shows the soft deleted thing - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoThing} and HTTP response */ thingsV2ShowWithHttpInfo(id, opts) { @@ -438,7 +438,7 @@ export default class ThingsV2Api { * @param {String} id The id of the thing * @param {Object} opts Optional parameters * @param {Boolean} opts.showDeleted If true, shows the soft deleted thing (default to false) - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoThing} */ thingsV2Show(id, opts) { @@ -454,7 +454,7 @@ export default class ThingsV2Api { * Extract template from the given thing * @param {String} id The id of the thing * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoThingtemplate} and HTTP response */ thingsV2TemplateWithHttpInfo(id, opts) { @@ -492,7 +492,7 @@ export default class ThingsV2Api { * Extract template from the given thing * @param {String} id The id of the thing * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoThingtemplate} */ thingsV2Template(id, opts) { @@ -510,7 +510,7 @@ export default class ThingsV2Api { * @param {module:model/ThingUpdate} thingUpdate Payload to update an existing thing * @param {Object} opts Optional parameters * @param {Boolean} [force = false)] If true, detach device from the other thing, and attach to this thing - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoThing} and HTTP response */ thingsV2UpdateWithHttpInfo(id, thingUpdate, opts) { @@ -538,7 +538,7 @@ export default class ThingsV2Api { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.arduino.thing+json', 'application/vnd.goa.error+json']; let returnType = ArduinoThing; return this.apiClient.callApi( @@ -555,7 +555,7 @@ export default class ThingsV2Api { * @param {module:model/ThingUpdate} thingUpdate Payload to update an existing thing * @param {Object} opts Optional parameters * @param {Boolean} opts.force If true, detach device from the other thing, and attach to this thing (default to false) - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoThing} */ thingsV2Update(id, thingUpdate, opts) { @@ -572,7 +572,7 @@ export default class ThingsV2Api { * @param {String} id The id of the thing * @param {String} sketchId The id of the sketch * @param {Object} opts Optional parameters - * @param {String} [xOrganization] + * @param {String} [xOrganization] Organization space identifer (optional) * @param {module:model/UpdateSketch} [updateSketch] * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoThing} and HTTP response */ @@ -601,7 +601,7 @@ export default class ThingsV2Api { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.arduino.thing+json', 'application/vnd.goa.error+json']; let returnType = ArduinoThing; return this.apiClient.callApi( @@ -617,7 +617,7 @@ export default class ThingsV2Api { * @param {String} id The id of the thing * @param {String} sketchId The id of the sketch * @param {Object} opts Optional parameters - * @param {String} opts.xOrganization + * @param {String} opts.xOrganization Organization space identifer (optional) * @param {module:model/UpdateSketch} opts.updateSketch * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoThing} */ diff --git a/src/api/ThingsV2TagsApi.js b/src/api/ThingsV2TagsApi.js index 94ed28c..5096aa7 100644 --- a/src/api/ThingsV2TagsApi.js +++ b/src/api/ThingsV2TagsApi.js @@ -169,7 +169,7 @@ export default class ThingsV2TagsApi { }; let authNames = ['oauth2']; - let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let contentTypes = ['application/json']; let accepts = ['application/vnd.goa.error+json', 'text/plain']; let returnType = null; return this.apiClient.callApi( diff --git a/src/api/TriggersV1Api.js b/src/api/TriggersV1Api.js new file mode 100644 index 0000000..bec1d4b --- /dev/null +++ b/src/api/TriggersV1Api.js @@ -0,0 +1,710 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + + +import ApiClient from "../ApiClient"; +import ArduinoAction from '../model/ArduinoAction'; +import ArduinoTrigger from '../model/ArduinoTrigger'; +import ArduinoTriggerTemplate from '../model/ArduinoTriggerTemplate'; +import ArduinoTriggerWithLinkedEntities from '../model/ArduinoTriggerWithLinkedEntities'; +import CreateAction from '../model/CreateAction'; +import Error from '../model/Error'; +import Trigger from '../model/Trigger'; +import UpdateAction from '../model/UpdateAction'; + +/** +* TriggersV1 service. +* @module api/TriggersV1Api +* @version 3.0.0 +*/ +export default class TriggersV1Api { + + /** + * Constructs a new TriggersV1Api. + * @alias module:api/TriggersV1Api + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + constructor(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + } + + + + /** + * create actions_v1 + * Creates a new action + * @param {module:model/CreateAction} createAction + * @param {Object} opts Optional parameters + * @param {String} [xOrganization] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoAction} and HTTP response + */ + actionsV1CreateWithHttpInfo(createAction, opts) { + opts = opts || {}; + let postBody = createAction; + // verify the required parameter 'createAction' is set + if (createAction === undefined || createAction === null) { + throw new Error("Missing the required parameter 'createAction' when calling actionsV1Create"); + } + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + 'X-Organization': opts['xOrganization'] + }; + let formParams = { + }; + + let authNames = ['oauth2']; + let contentTypes = ['application/json']; + let accepts = ['application/vnd.arduino.action+json', 'application/vnd.goa.error+json']; + let returnType = ArduinoAction; + return this.apiClient.callApi( + '/iot/v1/actions', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * create actions_v1 + * Creates a new action + * @param {module:model/CreateAction} createAction + * @param {Object} opts Optional parameters + * @param {String} opts.xOrganization + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoAction} + */ + actionsV1Create(createAction, opts) { + return this.actionsV1CreateWithHttpInfo(createAction, opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * delete actions_v1 + * Removes an action + * @param {String} id The id of the action + * @param {Object} opts Optional parameters + * @param {String} [xOrganization] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + actionsV1DeleteWithHttpInfo(id, opts) { + opts = opts || {}; + let postBody = null; + // verify the required parameter 'id' is set + if (id === undefined || id === null) { + throw new Error("Missing the required parameter 'id' when calling actionsV1Delete"); + } + + let pathParams = { + 'id': id + }; + let queryParams = { + }; + let headerParams = { + 'X-Organization': opts['xOrganization'] + }; + let formParams = { + }; + + let authNames = ['oauth2']; + let contentTypes = []; + let accepts = ['application/vnd.goa.error+json', 'text/plain']; + let returnType = null; + return this.apiClient.callApi( + '/iot/v1/actions/{id}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * delete actions_v1 + * Removes an action + * @param {String} id The id of the action + * @param {Object} opts Optional parameters + * @param {String} opts.xOrganization + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + actionsV1Delete(id, opts) { + return this.actionsV1DeleteWithHttpInfo(id, opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * list actions_v1 + * Returns the list of actions + * @param {Object} opts Optional parameters + * @param {String} [xOrganization] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + actionsV1ListWithHttpInfo(opts) { + opts = opts || {}; + let postBody = null; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + 'X-Organization': opts['xOrganization'] + }; + let formParams = { + }; + + let authNames = ['oauth2']; + let contentTypes = []; + let accepts = ['application/vnd.arduino.action+json; type=collection', 'application/vnd.goa.error+json']; + let returnType = [ArduinoAction]; + return this.apiClient.callApi( + '/iot/v1/actions', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * list actions_v1 + * Returns the list of actions + * @param {Object} opts Optional parameters + * @param {String} opts.xOrganization + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + actionsV1List(opts) { + return this.actionsV1ListWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * show actions_v1 + * Returns an action + * @param {String} id The id of the action + * @param {Object} opts Optional parameters + * @param {String} [xOrganization] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoAction} and HTTP response + */ + actionsV1ShowWithHttpInfo(id, opts) { + opts = opts || {}; + let postBody = null; + // verify the required parameter 'id' is set + if (id === undefined || id === null) { + throw new Error("Missing the required parameter 'id' when calling actionsV1Show"); + } + + let pathParams = { + 'id': id + }; + let queryParams = { + }; + let headerParams = { + 'X-Organization': opts['xOrganization'] + }; + let formParams = { + }; + + let authNames = ['oauth2']; + let contentTypes = []; + let accepts = ['application/vnd.arduino.action+json', 'application/vnd.goa.error+json']; + let returnType = ArduinoAction; + return this.apiClient.callApi( + '/iot/v1/actions/{id}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * show actions_v1 + * Returns an action + * @param {String} id The id of the action + * @param {Object} opts Optional parameters + * @param {String} opts.xOrganization + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoAction} + */ + actionsV1Show(id, opts) { + return this.actionsV1ShowWithHttpInfo(id, opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * update actions_v1 + * Updates an action + * @param {String} id The id of the action + * @param {module:model/UpdateAction} updateAction + * @param {Object} opts Optional parameters + * @param {String} [xOrganization] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoAction} and HTTP response + */ + actionsV1UpdateWithHttpInfo(id, updateAction, opts) { + opts = opts || {}; + let postBody = updateAction; + // verify the required parameter 'id' is set + if (id === undefined || id === null) { + throw new Error("Missing the required parameter 'id' when calling actionsV1Update"); + } + // verify the required parameter 'updateAction' is set + if (updateAction === undefined || updateAction === null) { + throw new Error("Missing the required parameter 'updateAction' when calling actionsV1Update"); + } + + let pathParams = { + 'id': id + }; + let queryParams = { + }; + let headerParams = { + 'X-Organization': opts['xOrganization'] + }; + let formParams = { + }; + + let authNames = ['oauth2']; + let contentTypes = ['application/json']; + let accepts = ['application/vnd.arduino.action+json', 'application/vnd.goa.error+json']; + let returnType = ArduinoAction; + return this.apiClient.callApi( + '/iot/v1/actions/{id}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * update actions_v1 + * Updates an action + * @param {String} id The id of the action + * @param {module:model/UpdateAction} updateAction + * @param {Object} opts Optional parameters + * @param {String} opts.xOrganization + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoAction} + */ + actionsV1Update(id, updateAction, opts) { + return this.actionsV1UpdateWithHttpInfo(id, updateAction, opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * create triggers_v1 + * Creates a new trigger + * @param {module:model/Trigger} trigger + * @param {Object} opts Optional parameters + * @param {String} [xOrganization] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoTrigger} and HTTP response + */ + triggersV1CreateWithHttpInfo(trigger, opts) { + opts = opts || {}; + let postBody = trigger; + // verify the required parameter 'trigger' is set + if (trigger === undefined || trigger === null) { + throw new Error("Missing the required parameter 'trigger' when calling triggersV1Create"); + } + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + 'X-Organization': opts['xOrganization'] + }; + let formParams = { + }; + + let authNames = ['oauth2']; + let contentTypes = ['application/json']; + let accepts = ['application/vnd.arduino.trigger+json', 'application/vnd.goa.error+json']; + let returnType = ArduinoTrigger; + return this.apiClient.callApi( + '/iot/v1/triggers', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * create triggers_v1 + * Creates a new trigger + * @param {module:model/Trigger} trigger + * @param {Object} opts Optional parameters + * @param {String} opts.xOrganization + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoTrigger} + */ + triggersV1Create(trigger, opts) { + return this.triggersV1CreateWithHttpInfo(trigger, opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * delete triggers_v1 + * Removes a trigger + * @param {String} id The id of the trigger + * @param {Object} opts Optional parameters + * @param {Boolean} [force = false)] If true, hard delete the trigger + * @param {String} [xOrganization] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + triggersV1DeleteWithHttpInfo(id, opts) { + opts = opts || {}; + let postBody = null; + // verify the required parameter 'id' is set + if (id === undefined || id === null) { + throw new Error("Missing the required parameter 'id' when calling triggersV1Delete"); + } + + let pathParams = { + 'id': id + }; + let queryParams = { + 'force': opts['force'] + }; + let headerParams = { + 'X-Organization': opts['xOrganization'] + }; + let formParams = { + }; + + let authNames = ['oauth2']; + let contentTypes = []; + let accepts = ['application/vnd.goa.error+json', 'text/plain']; + let returnType = null; + return this.apiClient.callApi( + '/iot/v1/triggers/{id}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * delete triggers_v1 + * Removes a trigger + * @param {String} id The id of the trigger + * @param {Object} opts Optional parameters + * @param {Boolean} opts.force If true, hard delete the trigger (default to false) + * @param {String} opts.xOrganization + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + triggersV1Delete(id, opts) { + return this.triggersV1DeleteWithHttpInfo(id, opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * list triggers_v1 + * Returns the list of triggers + * @param {Object} opts Optional parameters + * @param {String} [deviceId] The id of the device associated with the triggers (mutually exclusive with 'property_id') + * @param {String} [propertyId] The id of the property associated with the triggers (mutually exclusive with 'device_id') + * @param {Boolean} [showDeleted = false)] If true, shows the soft deleted triggers + * @param {module:model/String} [sourceType] The source type of the trigger, could be PROPERTY, DEVICE_INCLUDE or DEVICE_EXCLUDE + * @param {String} [xOrganization] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + triggersV1ListWithHttpInfo(opts) { + opts = opts || {}; + let postBody = null; + + let pathParams = { + }; + let queryParams = { + 'device_id': opts['deviceId'], + 'property_id': opts['propertyId'], + 'show_deleted': opts['showDeleted'], + 'source_type': opts['sourceType'] + }; + let headerParams = { + 'X-Organization': opts['xOrganization'] + }; + let formParams = { + }; + + let authNames = ['oauth2']; + let contentTypes = []; + let accepts = ['application/vnd.arduino.trigger+json; type=collection', 'application/vnd.goa.error+json']; + let returnType = [ArduinoTrigger]; + return this.apiClient.callApi( + '/iot/v1/triggers', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * list triggers_v1 + * Returns the list of triggers + * @param {Object} opts Optional parameters + * @param {String} opts.deviceId The id of the device associated with the triggers (mutually exclusive with 'property_id') + * @param {String} opts.propertyId The id of the property associated with the triggers (mutually exclusive with 'device_id') + * @param {Boolean} opts.showDeleted If true, shows the soft deleted triggers (default to false) + * @param {module:model/String} opts.sourceType The source type of the trigger, could be PROPERTY, DEVICE_INCLUDE or DEVICE_EXCLUDE + * @param {String} opts.xOrganization + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + triggersV1List(opts) { + return this.triggersV1ListWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * patch triggers_v1 + * Patch a trigger + * @param {String} id The id of the trigger + * @param {module:model/Trigger} trigger + * @param {Object} opts Optional parameters + * @param {String} [xOrganization] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoTrigger} and HTTP response + */ + triggersV1PatchWithHttpInfo(id, trigger, opts) { + opts = opts || {}; + let postBody = trigger; + // verify the required parameter 'id' is set + if (id === undefined || id === null) { + throw new Error("Missing the required parameter 'id' when calling triggersV1Patch"); + } + // verify the required parameter 'trigger' is set + if (trigger === undefined || trigger === null) { + throw new Error("Missing the required parameter 'trigger' when calling triggersV1Patch"); + } + + let pathParams = { + 'id': id + }; + let queryParams = { + }; + let headerParams = { + 'X-Organization': opts['xOrganization'] + }; + let formParams = { + }; + + let authNames = ['oauth2']; + let contentTypes = ['application/json']; + let accepts = ['application/vnd.arduino.trigger+json', 'application/vnd.goa.error+json']; + let returnType = ArduinoTrigger; + return this.apiClient.callApi( + '/iot/v1/triggers/{id}', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * patch triggers_v1 + * Patch a trigger + * @param {String} id The id of the trigger + * @param {module:model/Trigger} trigger + * @param {Object} opts Optional parameters + * @param {String} opts.xOrganization + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoTrigger} + */ + triggersV1Patch(id, trigger, opts) { + return this.triggersV1PatchWithHttpInfo(id, trigger, opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * show triggers_v1 + * Returns a trigger + * @param {String} id The id of the trigger + * @param {Object} opts Optional parameters + * @param {String} [xOrganization] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoTriggerWithLinkedEntities} and HTTP response + */ + triggersV1ShowWithHttpInfo(id, opts) { + opts = opts || {}; + let postBody = null; + // verify the required parameter 'id' is set + if (id === undefined || id === null) { + throw new Error("Missing the required parameter 'id' when calling triggersV1Show"); + } + + let pathParams = { + 'id': id + }; + let queryParams = { + }; + let headerParams = { + 'X-Organization': opts['xOrganization'] + }; + let formParams = { + }; + + let authNames = ['oauth2']; + let contentTypes = []; + let accepts = ['application/vnd.arduino.trigger_with_linked_entities+json', 'application/vnd.goa.error+json']; + let returnType = ArduinoTriggerWithLinkedEntities; + return this.apiClient.callApi( + '/iot/v1/triggers/{id}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * show triggers_v1 + * Returns a trigger + * @param {String} id The id of the trigger + * @param {Object} opts Optional parameters + * @param {String} opts.xOrganization + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoTriggerWithLinkedEntities} + */ + triggersV1Show(id, opts) { + return this.triggersV1ShowWithHttpInfo(id, opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * template triggers_v1 + * Extract template from the given trigger + * @param {String} id The id of the trigger + * @param {Object} opts Optional parameters + * @param {String} [xOrganization] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoTriggerTemplate} and HTTP response + */ + triggersV1TemplateWithHttpInfo(id, opts) { + opts = opts || {}; + let postBody = null; + // verify the required parameter 'id' is set + if (id === undefined || id === null) { + throw new Error("Missing the required parameter 'id' when calling triggersV1Template"); + } + + let pathParams = { + 'id': id + }; + let queryParams = { + }; + let headerParams = { + 'X-Organization': opts['xOrganization'] + }; + let formParams = { + }; + + let authNames = ['oauth2']; + let contentTypes = []; + let accepts = ['application/vnd.arduino.trigger_template+json', 'application/vnd.goa.error+json']; + let returnType = ArduinoTriggerTemplate; + return this.apiClient.callApi( + '/iot/v1/triggers/{id}/template', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * template triggers_v1 + * Extract template from the given trigger + * @param {String} id The id of the trigger + * @param {Object} opts Optional parameters + * @param {String} opts.xOrganization + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoTriggerTemplate} + */ + triggersV1Template(id, opts) { + return this.triggersV1TemplateWithHttpInfo(id, opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * update triggers_v1 + * Updates a trigger + * @param {String} id The id of the trigger + * @param {module:model/Trigger} trigger + * @param {Object} opts Optional parameters + * @param {String} [xOrganization] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoTrigger} and HTTP response + */ + triggersV1UpdateWithHttpInfo(id, trigger, opts) { + opts = opts || {}; + let postBody = trigger; + // verify the required parameter 'id' is set + if (id === undefined || id === null) { + throw new Error("Missing the required parameter 'id' when calling triggersV1Update"); + } + // verify the required parameter 'trigger' is set + if (trigger === undefined || trigger === null) { + throw new Error("Missing the required parameter 'trigger' when calling triggersV1Update"); + } + + let pathParams = { + 'id': id + }; + let queryParams = { + }; + let headerParams = { + 'X-Organization': opts['xOrganization'] + }; + let formParams = { + }; + + let authNames = ['oauth2']; + let contentTypes = ['application/json']; + let accepts = ['application/vnd.arduino.trigger+json', 'application/vnd.goa.error+json']; + let returnType = ArduinoTrigger; + return this.apiClient.callApi( + '/iot/v1/triggers/{id}', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * update triggers_v1 + * Updates a trigger + * @param {String} id The id of the trigger + * @param {module:model/Trigger} trigger + * @param {Object} opts Optional parameters + * @param {String} opts.xOrganization + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoTrigger} + */ + triggersV1Update(id, trigger, opts) { + return this.triggersV1UpdateWithHttpInfo(id, trigger, opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + +} diff --git a/src/index.js b/src/index.js index d7b16c2..6cf0a4a 100644 --- a/src/index.js +++ b/src/index.js @@ -13,6 +13,8 @@ import ApiClient from './ApiClient'; +import ArduinoAction from './model/ArduinoAction'; +import ArduinoActionTemplate from './model/ArduinoActionTemplate'; import ArduinoCompressedv2 from './model/ArduinoCompressedv2'; import ArduinoCredentialsv1 from './model/ArduinoCredentialsv1'; import ArduinoDashboardowner from './model/ArduinoDashboardowner'; @@ -35,6 +37,10 @@ import ArduinoDevicev2propertyvalueValueStatistics from './model/ArduinoDevicev2 import ArduinoDevicev2propertyvalues from './model/ArduinoDevicev2propertyvalues'; import ArduinoDevicev2propertyvaluesLastEvaluatedKey from './model/ArduinoDevicev2propertyvaluesLastEvaluatedKey'; import ArduinoDevicev2templatedevice from './model/ArduinoDevicev2templatedevice'; +import ArduinoLinkedDevice from './model/ArduinoLinkedDevice'; +import ArduinoLinkedDeviceTemplate from './model/ArduinoLinkedDeviceTemplate'; +import ArduinoLinkedProperty from './model/ArduinoLinkedProperty'; +import ArduinoLinkedPropertyTemplate from './model/ArduinoLinkedPropertyTemplate'; import ArduinoLinkedvariable from './model/ArduinoLinkedvariable'; import ArduinoLoradevicev1 from './model/ArduinoLoradevicev1'; import ArduinoLorafreqplansv1 from './model/ArduinoLorafreqplansv1'; @@ -58,6 +64,9 @@ import ArduinoThingresult from './model/ArduinoThingresult'; import ArduinoThingtemplate from './model/ArduinoThingtemplate'; import ArduinoTimeseriesmedia from './model/ArduinoTimeseriesmedia'; import ArduinoTimezone from './model/ArduinoTimezone'; +import ArduinoTrigger from './model/ArduinoTrigger'; +import ArduinoTriggerTemplate from './model/ArduinoTriggerTemplate'; +import ArduinoTriggerWithLinkedEntities from './model/ArduinoTriggerWithLinkedEntities'; import ArduinoVariableslinks from './model/ArduinoVariableslinks'; import ArduinoWidgetv2 from './model/ArduinoWidgetv2'; import ArduinoWidgetv2template from './model/ArduinoWidgetv2template'; @@ -70,18 +79,24 @@ import BatchQueryRequestMediaV1 from './model/BatchQueryRequestMediaV1'; import BatchQueryRequestsMediaV1 from './model/BatchQueryRequestsMediaV1'; import BatchQuerySampledRequestMediaV1 from './model/BatchQuerySampledRequestMediaV1'; import BatchQuerySampledRequestsMediaV1 from './model/BatchQuerySampledRequestsMediaV1'; +import BodyExpression from './model/BodyExpression'; import CheckDevicesV2PassPayload from './model/CheckDevicesV2PassPayload'; import Clone from './model/Clone'; +import CreateAction from './model/CreateAction'; import CreateDevicesV2CertsPayload from './model/CreateDevicesV2CertsPayload'; import CreateDevicesV2Payload from './model/CreateDevicesV2Payload'; import CreateLoraDevicesV1Payload from './model/CreateLoraDevicesV1Payload'; import Dashboardshare from './model/Dashboardshare'; import Dashboardv2 from './model/Dashboardv2'; +import DeviceStatusSource from './model/DeviceStatusSource'; +import DeviceStatusSourceWithLinkedDevices from './model/DeviceStatusSourceWithLinkedDevices'; import Devicev2 from './model/Devicev2'; import Devicev2Cert from './model/Devicev2Cert'; import Devicev2Otabinaryurl from './model/Devicev2Otabinaryurl'; import Devicev2Otaurlpyalod from './model/Devicev2Otaurlpyalod'; import Devicev2Pass from './model/Devicev2Pass'; +import EmailAction from './model/EmailAction'; +import EmailDeliveryOpts from './model/EmailDeliveryOpts'; import Error from './model/Error'; import HistoricDataRequest from './model/HistoricDataRequest'; import Override from './model/Override'; @@ -89,6 +104,8 @@ import PropertiesValue from './model/PropertiesValue'; import PropertiesValues from './model/PropertiesValues'; import Property from './model/Property'; import PropertyValue from './model/PropertyValue'; +import PushAction from './model/PushAction'; +import PushDeliveryOpts from './model/PushDeliveryOpts'; import Sharerequest from './model/Sharerequest'; import Tag from './model/Tag'; import Template from './model/Template'; @@ -97,7 +114,12 @@ import ThingCreate from './model/ThingCreate'; import ThingSketch from './model/ThingSketch'; import ThingUpdate from './model/ThingUpdate'; import TimeseriesDataPoint from './model/TimeseriesDataPoint'; +import TitleExpression from './model/TitleExpression'; +import Trigger from './model/Trigger'; +import UpdateAction from './model/UpdateAction'; import UpdateSketch from './model/UpdateSketch'; +import UserRecipient from './model/UserRecipient'; +import Variable from './model/Variable'; import Widget from './model/Widget'; import Widgetlink from './model/Widgetlink'; import DashboardsV2Api from './api/DashboardsV2Api'; @@ -115,6 +137,7 @@ import SeriesV2Api from './api/SeriesV2Api'; import TemplatesApi from './api/TemplatesApi'; import ThingsV2Api from './api/ThingsV2Api'; import ThingsV2TagsApi from './api/ThingsV2TagsApi'; +import TriggersV1Api from './api/TriggersV1Api'; /** @@ -155,6 +178,18 @@ export { */ ApiClient, + /** + * The ArduinoAction model constructor. + * @property {module:model/ArduinoAction} + */ + ArduinoAction, + + /** + * The ArduinoActionTemplate model constructor. + * @property {module:model/ArduinoActionTemplate} + */ + ArduinoActionTemplate, + /** * The ArduinoCompressedv2 model constructor. * @property {module:model/ArduinoCompressedv2} @@ -287,6 +322,30 @@ export { */ ArduinoDevicev2templatedevice, + /** + * The ArduinoLinkedDevice model constructor. + * @property {module:model/ArduinoLinkedDevice} + */ + ArduinoLinkedDevice, + + /** + * The ArduinoLinkedDeviceTemplate model constructor. + * @property {module:model/ArduinoLinkedDeviceTemplate} + */ + ArduinoLinkedDeviceTemplate, + + /** + * The ArduinoLinkedProperty model constructor. + * @property {module:model/ArduinoLinkedProperty} + */ + ArduinoLinkedProperty, + + /** + * The ArduinoLinkedPropertyTemplate model constructor. + * @property {module:model/ArduinoLinkedPropertyTemplate} + */ + ArduinoLinkedPropertyTemplate, + /** * The ArduinoLinkedvariable model constructor. * @property {module:model/ArduinoLinkedvariable} @@ -425,6 +484,24 @@ export { */ ArduinoTimezone, + /** + * The ArduinoTrigger model constructor. + * @property {module:model/ArduinoTrigger} + */ + ArduinoTrigger, + + /** + * The ArduinoTriggerTemplate model constructor. + * @property {module:model/ArduinoTriggerTemplate} + */ + ArduinoTriggerTemplate, + + /** + * The ArduinoTriggerWithLinkedEntities model constructor. + * @property {module:model/ArduinoTriggerWithLinkedEntities} + */ + ArduinoTriggerWithLinkedEntities, + /** * The ArduinoVariableslinks model constructor. * @property {module:model/ArduinoVariableslinks} @@ -497,6 +574,12 @@ export { */ BatchQuerySampledRequestsMediaV1, + /** + * The BodyExpression model constructor. + * @property {module:model/BodyExpression} + */ + BodyExpression, + /** * The CheckDevicesV2PassPayload model constructor. * @property {module:model/CheckDevicesV2PassPayload} @@ -509,6 +592,12 @@ export { */ Clone, + /** + * The CreateAction model constructor. + * @property {module:model/CreateAction} + */ + CreateAction, + /** * The CreateDevicesV2CertsPayload model constructor. * @property {module:model/CreateDevicesV2CertsPayload} @@ -539,6 +628,18 @@ export { */ Dashboardv2, + /** + * The DeviceStatusSource model constructor. + * @property {module:model/DeviceStatusSource} + */ + DeviceStatusSource, + + /** + * The DeviceStatusSourceWithLinkedDevices model constructor. + * @property {module:model/DeviceStatusSourceWithLinkedDevices} + */ + DeviceStatusSourceWithLinkedDevices, + /** * The Devicev2 model constructor. * @property {module:model/Devicev2} @@ -569,6 +670,18 @@ export { */ Devicev2Pass, + /** + * The EmailAction model constructor. + * @property {module:model/EmailAction} + */ + EmailAction, + + /** + * The EmailDeliveryOpts model constructor. + * @property {module:model/EmailDeliveryOpts} + */ + EmailDeliveryOpts, + /** * The Error model constructor. * @property {module:model/Error} @@ -611,6 +724,18 @@ export { */ PropertyValue, + /** + * The PushAction model constructor. + * @property {module:model/PushAction} + */ + PushAction, + + /** + * The PushDeliveryOpts model constructor. + * @property {module:model/PushDeliveryOpts} + */ + PushDeliveryOpts, + /** * The Sharerequest model constructor. * @property {module:model/Sharerequest} @@ -659,12 +784,42 @@ export { */ TimeseriesDataPoint, + /** + * The TitleExpression model constructor. + * @property {module:model/TitleExpression} + */ + TitleExpression, + + /** + * The Trigger model constructor. + * @property {module:model/Trigger} + */ + Trigger, + + /** + * The UpdateAction model constructor. + * @property {module:model/UpdateAction} + */ + UpdateAction, + /** * The UpdateSketch model constructor. * @property {module:model/UpdateSketch} */ UpdateSketch, + /** + * The UserRecipient model constructor. + * @property {module:model/UserRecipient} + */ + UserRecipient, + + /** + * The Variable model constructor. + * @property {module:model/Variable} + */ + Variable, + /** * The Widget model constructor. * @property {module:model/Widget} @@ -765,5 +920,11 @@ export { * The ThingsV2TagsApi service constructor. * @property {module:api/ThingsV2TagsApi} */ - ThingsV2TagsApi + ThingsV2TagsApi, + + /** + * The TriggersV1Api service constructor. + * @property {module:api/TriggersV1Api} + */ + TriggersV1Api }; diff --git a/src/model/ArduinoAction.js b/src/model/ArduinoAction.js new file mode 100644 index 0000000..e3d6059 --- /dev/null +++ b/src/model/ArduinoAction.js @@ -0,0 +1,214 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import EmailAction from './EmailAction'; +import PushAction from './PushAction'; + +/** + * The ArduinoAction model module. + * @module model/ArduinoAction + * @version 3.0.0 + */ +class ArduinoAction { + /** + * Constructs a new ArduinoAction. + * ArduinoAction media type (default view) + * @alias module:model/ArduinoAction + */ + constructor() { + + ArduinoAction.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a ArduinoAction from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ArduinoAction} obj Optional instance to populate. + * @return {module:model/ArduinoAction} The populated ArduinoAction instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ArduinoAction(); + + if (data.hasOwnProperty('created_by')) { + obj['created_by'] = ApiClient.convertToType(data['created_by'], 'String'); + } + if (data.hasOwnProperty('description')) { + obj['description'] = ApiClient.convertToType(data['description'], 'String'); + } + if (data.hasOwnProperty('email')) { + obj['email'] = EmailAction.constructFromObject(data['email']); + } + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('kind')) { + obj['kind'] = ApiClient.convertToType(data['kind'], 'String'); + } + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + if (data.hasOwnProperty('organization_id')) { + obj['organization_id'] = ApiClient.convertToType(data['organization_id'], 'String'); + } + if (data.hasOwnProperty('push_notification')) { + obj['push_notification'] = PushAction.constructFromObject(data['push_notification']); + } + if (data.hasOwnProperty('trigger_id')) { + obj['trigger_id'] = ApiClient.convertToType(data['trigger_id'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to ArduinoAction. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to ArduinoAction. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['created_by'] && !(typeof data['created_by'] === 'string' || data['created_by'] instanceof String)) { + throw new Error("Expected the field `created_by` to be a primitive type in the JSON string but got " + data['created_by']); + } + // ensure the json data is a string + if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) { + throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']); + } + // validate the optional field `email` + if (data['email']) { // data not null + EmailAction.validateJSON(data['email']); + } + // ensure the json data is a string + if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { + throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); + } + // ensure the json data is a string + if (data['kind'] && !(typeof data['kind'] === 'string' || data['kind'] instanceof String)) { + throw new Error("Expected the field `kind` to be a primitive type in the JSON string but got " + data['kind']); + } + // ensure the json data is a string + if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { + throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); + } + // ensure the json data is a string + if (data['organization_id'] && !(typeof data['organization_id'] === 'string' || data['organization_id'] instanceof String)) { + throw new Error("Expected the field `organization_id` to be a primitive type in the JSON string but got " + data['organization_id']); + } + // validate the optional field `push_notification` + if (data['push_notification']) { // data not null + PushAction.validateJSON(data['push_notification']); + } + // ensure the json data is a string + if (data['trigger_id'] && !(typeof data['trigger_id'] === 'string' || data['trigger_id'] instanceof String)) { + throw new Error("Expected the field `trigger_id` to be a primitive type in the JSON string but got " + data['trigger_id']); + } + + return true; + } + + +} + + + +/** + * Id of the user who created the action + * @member {String} created_by + */ +ArduinoAction.prototype['created_by'] = undefined; + +/** + * The description of the action + * @member {String} description + */ +ArduinoAction.prototype['description'] = undefined; + +/** + * @member {module:model/EmailAction} email + */ +ArduinoAction.prototype['email'] = undefined; + +/** + * The id of the action + * @member {String} id + */ +ArduinoAction.prototype['id'] = undefined; + +/** + * The kind of the action + * @member {module:model/ArduinoAction.KindEnum} kind + */ +ArduinoAction.prototype['kind'] = undefined; + +/** + * The name of the action + * @member {String} name + */ +ArduinoAction.prototype['name'] = undefined; + +/** + * Id of the organization the trigger belongs to + * @member {String} organization_id + */ +ArduinoAction.prototype['organization_id'] = undefined; + +/** + * @member {module:model/PushAction} push_notification + */ +ArduinoAction.prototype['push_notification'] = undefined; + +/** + * Id of the trigger the action is associated to + * @member {String} trigger_id + */ +ArduinoAction.prototype['trigger_id'] = undefined; + + + + + +/** + * Allowed values for the kind property. + * @enum {String} + * @readonly + */ +ArduinoAction['KindEnum'] = { + + /** + * value: "NOTIFY-EMAIL" + * @const + */ + "EMAIL": "NOTIFY-EMAIL", + + /** + * value: "NOTIFY-PUSH" + * @const + */ + "PUSH": "NOTIFY-PUSH" +}; + + + +export default ArduinoAction; + diff --git a/src/model/ArduinoActionTemplate.js b/src/model/ArduinoActionTemplate.js new file mode 100644 index 0000000..5583884 --- /dev/null +++ b/src/model/ArduinoActionTemplate.js @@ -0,0 +1,175 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import EmailAction from './EmailAction'; +import PushAction from './PushAction'; + +/** + * The ArduinoActionTemplate model module. + * @module model/ArduinoActionTemplate + * @version 3.0.0 + */ +class ArduinoActionTemplate { + /** + * Constructs a new ArduinoActionTemplate. + * ArduinoAction_template media type (default view) + * @alias module:model/ArduinoActionTemplate + */ + constructor() { + + ArduinoActionTemplate.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a ArduinoActionTemplate from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ArduinoActionTemplate} obj Optional instance to populate. + * @return {module:model/ArduinoActionTemplate} The populated ArduinoActionTemplate instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ArduinoActionTemplate(); + + if (data.hasOwnProperty('description')) { + obj['description'] = ApiClient.convertToType(data['description'], 'String'); + } + if (data.hasOwnProperty('email')) { + obj['email'] = EmailAction.constructFromObject(data['email']); + } + if (data.hasOwnProperty('kind')) { + obj['kind'] = ApiClient.convertToType(data['kind'], 'String'); + } + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + if (data.hasOwnProperty('organization_id')) { + obj['organization_id'] = ApiClient.convertToType(data['organization_id'], 'String'); + } + if (data.hasOwnProperty('push_notification')) { + obj['push_notification'] = PushAction.constructFromObject(data['push_notification']); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to ArduinoActionTemplate. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to ArduinoActionTemplate. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) { + throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']); + } + // validate the optional field `email` + if (data['email']) { // data not null + EmailAction.validateJSON(data['email']); + } + // ensure the json data is a string + if (data['kind'] && !(typeof data['kind'] === 'string' || data['kind'] instanceof String)) { + throw new Error("Expected the field `kind` to be a primitive type in the JSON string but got " + data['kind']); + } + // ensure the json data is a string + if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { + throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); + } + // ensure the json data is a string + if (data['organization_id'] && !(typeof data['organization_id'] === 'string' || data['organization_id'] instanceof String)) { + throw new Error("Expected the field `organization_id` to be a primitive type in the JSON string but got " + data['organization_id']); + } + // validate the optional field `push_notification` + if (data['push_notification']) { // data not null + PushAction.validateJSON(data['push_notification']); + } + + return true; + } + + +} + + + +/** + * The description of the action + * @member {String} description + */ +ArduinoActionTemplate.prototype['description'] = undefined; + +/** + * @member {module:model/EmailAction} email + */ +ArduinoActionTemplate.prototype['email'] = undefined; + +/** + * The kind of the action + * @member {module:model/ArduinoActionTemplate.KindEnum} kind + */ +ArduinoActionTemplate.prototype['kind'] = undefined; + +/** + * The name of the action + * @member {String} name + */ +ArduinoActionTemplate.prototype['name'] = undefined; + +/** + * Id of the organization the trigger belongs to + * @member {String} organization_id + */ +ArduinoActionTemplate.prototype['organization_id'] = undefined; + +/** + * @member {module:model/PushAction} push_notification + */ +ArduinoActionTemplate.prototype['push_notification'] = undefined; + + + + + +/** + * Allowed values for the kind property. + * @enum {String} + * @readonly + */ +ArduinoActionTemplate['KindEnum'] = { + + /** + * value: "NOTIFY-EMAIL" + * @const + */ + "EMAIL": "NOTIFY-EMAIL", + + /** + * value: "NOTIFY-PUSH" + * @const + */ + "PUSH": "NOTIFY-PUSH" +}; + + + +export default ArduinoActionTemplate; + diff --git a/src/model/ArduinoDevicev2.js b/src/model/ArduinoDevicev2.js index 6a3d702..7dab816 100644 --- a/src/model/ArduinoDevicev2.js +++ b/src/model/ArduinoDevicev2.js @@ -71,6 +71,9 @@ class ArduinoDevicev2 { if (data.hasOwnProperty('created_at')) { obj['created_at'] = ApiClient.convertToType(data['created_at'], 'Date'); } + if (data.hasOwnProperty('deleted_at')) { + obj['deleted_at'] = ApiClient.convertToType(data['deleted_at'], 'Date'); + } if (data.hasOwnProperty('device_status')) { obj['device_status'] = ApiClient.convertToType(data['device_status'], 'String'); } @@ -128,6 +131,9 @@ class ArduinoDevicev2 { if (data.hasOwnProperty('type')) { obj['type'] = ApiClient.convertToType(data['type'], 'String'); } + if (data.hasOwnProperty('updated_at')) { + obj['updated_at'] = ApiClient.convertToType(data['updated_at'], 'Date'); + } if (data.hasOwnProperty('user_id')) { obj['user_id'] = ApiClient.convertToType(data['user_id'], 'String'); } @@ -254,6 +260,12 @@ ArduinoDevicev2.prototype['connection_type'] = undefined; */ ArduinoDevicev2.prototype['created_at'] = undefined; +/** + * Deletion date of the trigger + * @member {Date} deleted_at + */ +ArduinoDevicev2.prototype['deleted_at'] = undefined; + /** * The connection status of the device * @member {module:model/ArduinoDevicev2.DeviceStatusEnum} device_status @@ -367,6 +379,12 @@ ArduinoDevicev2.prototype['thing'] = undefined; */ ArduinoDevicev2.prototype['type'] = undefined; +/** + * Update date of the trigger + * @member {Date} updated_at + */ +ArduinoDevicev2.prototype['updated_at'] = undefined; + /** * The id of the user * @member {String} user_id diff --git a/src/model/ArduinoLinkedDevice.js b/src/model/ArduinoLinkedDevice.js new file mode 100644 index 0000000..8427eea --- /dev/null +++ b/src/model/ArduinoLinkedDevice.js @@ -0,0 +1,133 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import ArduinoDevicev2 from './ArduinoDevicev2'; + +/** + * The ArduinoLinkedDevice model module. + * @module model/ArduinoLinkedDevice + * @version 3.0.0 + */ +class ArduinoLinkedDevice { + /** + * Constructs a new ArduinoLinkedDevice. + * ArduinoLinked_device media type (default view) + * @alias module:model/ArduinoLinkedDevice + * @param device {module:model/ArduinoDevicev2} + * @param status {module:model/ArduinoLinkedDevice.StatusEnum} The status of the linked device + */ + constructor(device, status) { + + ArduinoLinkedDevice.initialize(this, device, status); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, device, status) { + obj['device'] = device; + obj['status'] = status; + } + + /** + * Constructs a ArduinoLinkedDevice from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ArduinoLinkedDevice} obj Optional instance to populate. + * @return {module:model/ArduinoLinkedDevice} The populated ArduinoLinkedDevice instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ArduinoLinkedDevice(); + + if (data.hasOwnProperty('device')) { + obj['device'] = ArduinoDevicev2.constructFromObject(data['device']); + } + if (data.hasOwnProperty('status')) { + obj['status'] = ApiClient.convertToType(data['status'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to ArduinoLinkedDevice. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to ArduinoLinkedDevice. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of ArduinoLinkedDevice.RequiredProperties) { + if (!data.hasOwnProperty(property)) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + // validate the optional field `device` + if (data['device']) { // data not null + ArduinoDevicev2.validateJSON(data['device']); + } + // ensure the json data is a string + if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) { + throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']); + } + + return true; + } + + +} + +ArduinoLinkedDevice.RequiredProperties = ["device", "status"]; + +/** + * @member {module:model/ArduinoDevicev2} device + */ +ArduinoLinkedDevice.prototype['device'] = undefined; + +/** + * The status of the linked device + * @member {module:model/ArduinoLinkedDevice.StatusEnum} status + */ +ArduinoLinkedDevice.prototype['status'] = undefined; + + + + + +/** + * Allowed values for the status property. + * @enum {String} + * @readonly + */ +ArduinoLinkedDevice['StatusEnum'] = { + + /** + * value: "OK" + * @const + */ + "OK": "OK", + + /** + * value: "DELETED" + * @const + */ + "DELETED": "DELETED" +}; + + + +export default ArduinoLinkedDevice; + diff --git a/src/model/ArduinoLinkedDeviceTemplate.js b/src/model/ArduinoLinkedDeviceTemplate.js new file mode 100644 index 0000000..b4feef3 --- /dev/null +++ b/src/model/ArduinoLinkedDeviceTemplate.js @@ -0,0 +1,97 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The ArduinoLinkedDeviceTemplate model module. + * @module model/ArduinoLinkedDeviceTemplate + * @version 3.0.0 + */ +class ArduinoLinkedDeviceTemplate { + /** + * Constructs a new ArduinoLinkedDeviceTemplate. + * ArduinoLinked_device_template media type (default view) + * @alias module:model/ArduinoLinkedDeviceTemplate + * @param thingId {String} The thing the device is associated to + */ + constructor(thingId) { + + ArduinoLinkedDeviceTemplate.initialize(this, thingId); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, thingId) { + obj['thing_id'] = thingId; + } + + /** + * Constructs a ArduinoLinkedDeviceTemplate from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ArduinoLinkedDeviceTemplate} obj Optional instance to populate. + * @return {module:model/ArduinoLinkedDeviceTemplate} The populated ArduinoLinkedDeviceTemplate instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ArduinoLinkedDeviceTemplate(); + + if (data.hasOwnProperty('thing_id')) { + obj['thing_id'] = ApiClient.convertToType(data['thing_id'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to ArduinoLinkedDeviceTemplate. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to ArduinoLinkedDeviceTemplate. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of ArduinoLinkedDeviceTemplate.RequiredProperties) { + if (!data.hasOwnProperty(property)) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + // ensure the json data is a string + if (data['thing_id'] && !(typeof data['thing_id'] === 'string' || data['thing_id'] instanceof String)) { + throw new Error("Expected the field `thing_id` to be a primitive type in the JSON string but got " + data['thing_id']); + } + + return true; + } + + +} + +ArduinoLinkedDeviceTemplate.RequiredProperties = ["thing_id"]; + +/** + * The thing the device is associated to + * @member {String} thing_id + */ +ArduinoLinkedDeviceTemplate.prototype['thing_id'] = undefined; + + + + + + +export default ArduinoLinkedDeviceTemplate; + diff --git a/src/model/ArduinoLinkedProperty.js b/src/model/ArduinoLinkedProperty.js new file mode 100644 index 0000000..aa3dc9f --- /dev/null +++ b/src/model/ArduinoLinkedProperty.js @@ -0,0 +1,139 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import ArduinoProperty from './ArduinoProperty'; + +/** + * The ArduinoLinkedProperty model module. + * @module model/ArduinoLinkedProperty + * @version 3.0.0 + */ +class ArduinoLinkedProperty { + /** + * Constructs a new ArduinoLinkedProperty. + * ArduinoLinked_property media type (default view) + * @alias module:model/ArduinoLinkedProperty + * @param property {module:model/ArduinoProperty} + * @param status {module:model/ArduinoLinkedProperty.StatusEnum} The status of the linked property + */ + constructor(property, status) { + + ArduinoLinkedProperty.initialize(this, property, status); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, property, status) { + obj['property'] = property; + obj['status'] = status; + } + + /** + * Constructs a ArduinoLinkedProperty from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ArduinoLinkedProperty} obj Optional instance to populate. + * @return {module:model/ArduinoLinkedProperty} The populated ArduinoLinkedProperty instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ArduinoLinkedProperty(); + + if (data.hasOwnProperty('property')) { + obj['property'] = ArduinoProperty.constructFromObject(data['property']); + } + if (data.hasOwnProperty('status')) { + obj['status'] = ApiClient.convertToType(data['status'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to ArduinoLinkedProperty. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to ArduinoLinkedProperty. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of ArduinoLinkedProperty.RequiredProperties) { + if (!data.hasOwnProperty(property)) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + // validate the optional field `property` + if (data['property']) { // data not null + ArduinoProperty.validateJSON(data['property']); + } + // ensure the json data is a string + if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) { + throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']); + } + + return true; + } + + +} + +ArduinoLinkedProperty.RequiredProperties = ["property", "status"]; + +/** + * @member {module:model/ArduinoProperty} property + */ +ArduinoLinkedProperty.prototype['property'] = undefined; + +/** + * The status of the linked property + * @member {module:model/ArduinoLinkedProperty.StatusEnum} status + */ +ArduinoLinkedProperty.prototype['status'] = undefined; + + + + + +/** + * Allowed values for the status property. + * @enum {String} + * @readonly + */ +ArduinoLinkedProperty['StatusEnum'] = { + + /** + * value: "OK" + * @const + */ + "OK": "OK", + + /** + * value: "WRONG_TYPE" + * @const + */ + "WRONG_TYPE": "WRONG_TYPE", + + /** + * value: "DELETED" + * @const + */ + "DELETED": "DELETED" +}; + + + +export default ArduinoLinkedProperty; + diff --git a/src/model/ArduinoLinkedPropertyTemplate.js b/src/model/ArduinoLinkedPropertyTemplate.js new file mode 100644 index 0000000..a5d482d --- /dev/null +++ b/src/model/ArduinoLinkedPropertyTemplate.js @@ -0,0 +1,112 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The ArduinoLinkedPropertyTemplate model module. + * @module model/ArduinoLinkedPropertyTemplate + * @version 3.0.0 + */ +class ArduinoLinkedPropertyTemplate { + /** + * Constructs a new ArduinoLinkedPropertyTemplate. + * ArduinoLinked_property_template media type (default view) + * @alias module:model/ArduinoLinkedPropertyTemplate + * @param propertyId {String} The property the trigger is associated to + * @param thingId {String} The thing the trigger is associated to + */ + constructor(propertyId, thingId) { + + ArduinoLinkedPropertyTemplate.initialize(this, propertyId, thingId); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, propertyId, thingId) { + obj['property_id'] = propertyId; + obj['thing_id'] = thingId; + } + + /** + * Constructs a ArduinoLinkedPropertyTemplate from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ArduinoLinkedPropertyTemplate} obj Optional instance to populate. + * @return {module:model/ArduinoLinkedPropertyTemplate} The populated ArduinoLinkedPropertyTemplate instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ArduinoLinkedPropertyTemplate(); + + if (data.hasOwnProperty('property_id')) { + obj['property_id'] = ApiClient.convertToType(data['property_id'], 'String'); + } + if (data.hasOwnProperty('thing_id')) { + obj['thing_id'] = ApiClient.convertToType(data['thing_id'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to ArduinoLinkedPropertyTemplate. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to ArduinoLinkedPropertyTemplate. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of ArduinoLinkedPropertyTemplate.RequiredProperties) { + if (!data.hasOwnProperty(property)) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + // ensure the json data is a string + if (data['property_id'] && !(typeof data['property_id'] === 'string' || data['property_id'] instanceof String)) { + throw new Error("Expected the field `property_id` to be a primitive type in the JSON string but got " + data['property_id']); + } + // ensure the json data is a string + if (data['thing_id'] && !(typeof data['thing_id'] === 'string' || data['thing_id'] instanceof String)) { + throw new Error("Expected the field `thing_id` to be a primitive type in the JSON string but got " + data['thing_id']); + } + + return true; + } + + +} + +ArduinoLinkedPropertyTemplate.RequiredProperties = ["property_id", "thing_id"]; + +/** + * The property the trigger is associated to + * @member {String} property_id + */ +ArduinoLinkedPropertyTemplate.prototype['property_id'] = undefined; + +/** + * The thing the trigger is associated to + * @member {String} thing_id + */ +ArduinoLinkedPropertyTemplate.prototype['thing_id'] = undefined; + + + + + + +export default ArduinoLinkedPropertyTemplate; + diff --git a/src/model/ArduinoTrigger.js b/src/model/ArduinoTrigger.js new file mode 100644 index 0000000..be194cb --- /dev/null +++ b/src/model/ArduinoTrigger.js @@ -0,0 +1,231 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import ArduinoAction from './ArduinoAction'; +import DeviceStatusSource from './DeviceStatusSource'; + +/** + * The ArduinoTrigger model module. + * @module model/ArduinoTrigger + * @version 3.0.0 + */ +class ArduinoTrigger { + /** + * Constructs a new ArduinoTrigger. + * ArduinoTrigger media type (default view) + * @alias module:model/ArduinoTrigger + * @param name {String} The name of the trigger + */ + constructor(name) { + + ArduinoTrigger.initialize(this, name); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, name) { + obj['name'] = name; + } + + /** + * Constructs a ArduinoTrigger from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ArduinoTrigger} obj Optional instance to populate. + * @return {module:model/ArduinoTrigger} The populated ArduinoTrigger instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ArduinoTrigger(); + + if (data.hasOwnProperty('actions')) { + obj['actions'] = ApiClient.convertToType(data['actions'], [ArduinoAction]); + } + if (data.hasOwnProperty('active')) { + obj['active'] = ApiClient.convertToType(data['active'], 'Boolean'); + } + if (data.hasOwnProperty('created_at')) { + obj['created_at'] = ApiClient.convertToType(data['created_at'], 'Date'); + } + if (data.hasOwnProperty('created_by')) { + obj['created_by'] = ApiClient.convertToType(data['created_by'], 'String'); + } + if (data.hasOwnProperty('deleted_at')) { + obj['deleted_at'] = ApiClient.convertToType(data['deleted_at'], 'Date'); + } + if (data.hasOwnProperty('description')) { + obj['description'] = ApiClient.convertToType(data['description'], 'String'); + } + if (data.hasOwnProperty('device_status_source')) { + obj['device_status_source'] = DeviceStatusSource.constructFromObject(data['device_status_source']); + } + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + if (data.hasOwnProperty('organization_id')) { + obj['organization_id'] = ApiClient.convertToType(data['organization_id'], 'String'); + } + if (data.hasOwnProperty('property_id')) { + obj['property_id'] = ApiClient.convertToType(data['property_id'], 'String'); + } + if (data.hasOwnProperty('updated_at')) { + obj['updated_at'] = ApiClient.convertToType(data['updated_at'], 'Date'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to ArduinoTrigger. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to ArduinoTrigger. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of ArduinoTrigger.RequiredProperties) { + if (!data.hasOwnProperty(property)) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + if (data['actions']) { // data not null + // ensure the json data is an array + if (!Array.isArray(data['actions'])) { + throw new Error("Expected the field `actions` to be an array in the JSON data but got " + data['actions']); + } + // validate the optional field `actions` (array) + for (const item of data['actions']) { + ArduinoAction.validateJSON(item); + }; + } + // ensure the json data is a string + if (data['created_by'] && !(typeof data['created_by'] === 'string' || data['created_by'] instanceof String)) { + throw new Error("Expected the field `created_by` to be a primitive type in the JSON string but got " + data['created_by']); + } + // ensure the json data is a string + if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) { + throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']); + } + // validate the optional field `device_status_source` + if (data['device_status_source']) { // data not null + DeviceStatusSource.validateJSON(data['device_status_source']); + } + // ensure the json data is a string + if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { + throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); + } + // ensure the json data is a string + if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { + throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); + } + // ensure the json data is a string + if (data['organization_id'] && !(typeof data['organization_id'] === 'string' || data['organization_id'] instanceof String)) { + throw new Error("Expected the field `organization_id` to be a primitive type in the JSON string but got " + data['organization_id']); + } + // ensure the json data is a string + if (data['property_id'] && !(typeof data['property_id'] === 'string' || data['property_id'] instanceof String)) { + throw new Error("Expected the field `property_id` to be a primitive type in the JSON string but got " + data['property_id']); + } + + return true; + } + + +} + +ArduinoTrigger.RequiredProperties = ["name"]; + +/** + * A list of actions associated with the trigger + * @member {Array.} actions + */ +ArduinoTrigger.prototype['actions'] = undefined; + +/** + * Is true if the trigger is enabled + * @member {Boolean} active + */ +ArduinoTrigger.prototype['active'] = undefined; + +/** + * Creation date of the trigger + * @member {Date} created_at + */ +ArduinoTrigger.prototype['created_at'] = undefined; + +/** + * Id of the user who last updated the trigger + * @member {String} created_by + */ +ArduinoTrigger.prototype['created_by'] = undefined; + +/** + * Deletion date of the trigger + * @member {Date} deleted_at + */ +ArduinoTrigger.prototype['deleted_at'] = undefined; + +/** + * The description of the trigger + * @member {String} description + */ +ArduinoTrigger.prototype['description'] = undefined; + +/** + * @member {module:model/DeviceStatusSource} device_status_source + */ +ArduinoTrigger.prototype['device_status_source'] = undefined; + +/** + * The id of the trigger + * @member {String} id + */ +ArduinoTrigger.prototype['id'] = undefined; + +/** + * The name of the trigger + * @member {String} name + */ +ArduinoTrigger.prototype['name'] = undefined; + +/** + * Id of the organization the trigger belongs to + * @member {String} organization_id + */ +ArduinoTrigger.prototype['organization_id'] = undefined; + +/** + * Id of the property the trigger is associated to (mutually exclusive with 'device_status_source') + * @member {String} property_id + */ +ArduinoTrigger.prototype['property_id'] = undefined; + +/** + * Update date of the trigger + * @member {Date} updated_at + */ +ArduinoTrigger.prototype['updated_at'] = undefined; + + + + + + +export default ArduinoTrigger; + diff --git a/src/model/ArduinoTriggerTemplate.js b/src/model/ArduinoTriggerTemplate.js new file mode 100644 index 0000000..c1aeb0d --- /dev/null +++ b/src/model/ArduinoTriggerTemplate.js @@ -0,0 +1,231 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import ArduinoActionTemplate from './ArduinoActionTemplate'; +import ArduinoLinkedDeviceTemplate from './ArduinoLinkedDeviceTemplate'; +import ArduinoLinkedPropertyTemplate from './ArduinoLinkedPropertyTemplate'; + +/** + * The ArduinoTriggerTemplate model module. + * @module model/ArduinoTriggerTemplate + * @version 3.0.0 + */ +class ArduinoTriggerTemplate { + /** + * Constructs a new ArduinoTriggerTemplate. + * ArduinoTrigger_template media type (default view) + * @alias module:model/ArduinoTriggerTemplate + * @param id {String} The id of the trigger + * @param name {String} The name of the trigger + */ + constructor(id, name) { + + ArduinoTriggerTemplate.initialize(this, id, name); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, id, name) { + obj['id'] = id; + obj['name'] = name; + } + + /** + * Constructs a ArduinoTriggerTemplate from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ArduinoTriggerTemplate} obj Optional instance to populate. + * @return {module:model/ArduinoTriggerTemplate} The populated ArduinoTriggerTemplate instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ArduinoTriggerTemplate(); + + if (data.hasOwnProperty('actions')) { + obj['actions'] = ApiClient.convertToType(data['actions'], [ArduinoActionTemplate]); + } + if (data.hasOwnProperty('active')) { + obj['active'] = ApiClient.convertToType(data['active'], 'Boolean'); + } + if (data.hasOwnProperty('criteria')) { + obj['criteria'] = ApiClient.convertToType(data['criteria'], 'String'); + } + if (data.hasOwnProperty('description')) { + obj['description'] = ApiClient.convertToType(data['description'], 'String'); + } + if (data.hasOwnProperty('grace_period_offline')) { + obj['grace_period_offline'] = ApiClient.convertToType(data['grace_period_offline'], 'Number'); + } + if (data.hasOwnProperty('grace_period_online')) { + obj['grace_period_online'] = ApiClient.convertToType(data['grace_period_online'], 'Number'); + } + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('linked_devices')) { + obj['linked_devices'] = ApiClient.convertToType(data['linked_devices'], [ArduinoLinkedDeviceTemplate]); + } + if (data.hasOwnProperty('linked_property')) { + obj['linked_property'] = ArduinoLinkedPropertyTemplate.constructFromObject(data['linked_property']); + } + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + if (data.hasOwnProperty('organization_id')) { + obj['organization_id'] = ApiClient.convertToType(data['organization_id'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to ArduinoTriggerTemplate. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to ArduinoTriggerTemplate. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of ArduinoTriggerTemplate.RequiredProperties) { + if (!data.hasOwnProperty(property)) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + if (data['actions']) { // data not null + // ensure the json data is an array + if (!Array.isArray(data['actions'])) { + throw new Error("Expected the field `actions` to be an array in the JSON data but got " + data['actions']); + } + // validate the optional field `actions` (array) + for (const item of data['actions']) { + ArduinoActionTemplate.validateJSON(item); + }; + } + // ensure the json data is a string + if (data['criteria'] && !(typeof data['criteria'] === 'string' || data['criteria'] instanceof String)) { + throw new Error("Expected the field `criteria` to be a primitive type in the JSON string but got " + data['criteria']); + } + // ensure the json data is a string + if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) { + throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']); + } + // ensure the json data is a string + if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { + throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); + } + if (data['linked_devices']) { // data not null + // ensure the json data is an array + if (!Array.isArray(data['linked_devices'])) { + throw new Error("Expected the field `linked_devices` to be an array in the JSON data but got " + data['linked_devices']); + } + // validate the optional field `linked_devices` (array) + for (const item of data['linked_devices']) { + ArduinoLinkedDeviceTemplate.validateJSON(item); + }; + } + // validate the optional field `linked_property` + if (data['linked_property']) { // data not null + ArduinoLinkedPropertyTemplate.validateJSON(data['linked_property']); + } + // ensure the json data is a string + if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { + throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); + } + // ensure the json data is a string + if (data['organization_id'] && !(typeof data['organization_id'] === 'string' || data['organization_id'] instanceof String)) { + throw new Error("Expected the field `organization_id` to be a primitive type in the JSON string but got " + data['organization_id']); + } + + return true; + } + + +} + +ArduinoTriggerTemplate.RequiredProperties = ["id", "name"]; + +/** + * A list of actions associated with the trigger + * @member {Array.} actions + */ +ArduinoTriggerTemplate.prototype['actions'] = undefined; + +/** + * Is true if the trigger is enabled + * @member {Boolean} active + */ +ArduinoTriggerTemplate.prototype['active'] = undefined; + +/** + * The criteria of the trigger, could be INCLUDE or EXCLUDE + * @member {String} criteria + */ +ArduinoTriggerTemplate.prototype['criteria'] = undefined; + +/** + * The description of the trigger + * @member {String} description + */ +ArduinoTriggerTemplate.prototype['description'] = undefined; + +/** + * The amount of seconds the trigger will wait before considering a matching device as offline + * @member {Number} grace_period_offline + */ +ArduinoTriggerTemplate.prototype['grace_period_offline'] = undefined; + +/** + * The amount of seconds the trigger will wait before considering a matching device as online + * @member {Number} grace_period_online + */ +ArduinoTriggerTemplate.prototype['grace_period_online'] = undefined; + +/** + * The id of the trigger + * @member {String} id + */ +ArduinoTriggerTemplate.prototype['id'] = undefined; + +/** + * A list of devices the trigger is associated to + * @member {Array.} linked_devices + */ +ArduinoTriggerTemplate.prototype['linked_devices'] = undefined; + +/** + * @member {module:model/ArduinoLinkedPropertyTemplate} linked_property + */ +ArduinoTriggerTemplate.prototype['linked_property'] = undefined; + +/** + * The name of the trigger + * @member {String} name + */ +ArduinoTriggerTemplate.prototype['name'] = undefined; + +/** + * Id of the organization the trigger belongs to + * @member {String} organization_id + */ +ArduinoTriggerTemplate.prototype['organization_id'] = undefined; + + + + + + +export default ArduinoTriggerTemplate; + diff --git a/src/model/ArduinoTriggerWithLinkedEntities.js b/src/model/ArduinoTriggerWithLinkedEntities.js new file mode 100644 index 0000000..22fcff5 --- /dev/null +++ b/src/model/ArduinoTriggerWithLinkedEntities.js @@ -0,0 +1,206 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import ArduinoAction from './ArduinoAction'; +import ArduinoLinkedProperty from './ArduinoLinkedProperty'; +import DeviceStatusSourceWithLinkedDevices from './DeviceStatusSourceWithLinkedDevices'; + +/** + * The ArduinoTriggerWithLinkedEntities model module. + * @module model/ArduinoTriggerWithLinkedEntities + * @version 3.0.0 + */ +class ArduinoTriggerWithLinkedEntities { + /** + * Constructs a new ArduinoTriggerWithLinkedEntities. + * ArduinoTrigger_with_linked_entities media type (default view) + * @alias module:model/ArduinoTriggerWithLinkedEntities + * @param id {String} The id of the trigger + * @param name {String} The name of the trigger + */ + constructor(id, name) { + + ArduinoTriggerWithLinkedEntities.initialize(this, id, name); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, id, name) { + obj['id'] = id; + obj['name'] = name; + } + + /** + * Constructs a ArduinoTriggerWithLinkedEntities from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ArduinoTriggerWithLinkedEntities} obj Optional instance to populate. + * @return {module:model/ArduinoTriggerWithLinkedEntities} The populated ArduinoTriggerWithLinkedEntities instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ArduinoTriggerWithLinkedEntities(); + + if (data.hasOwnProperty('actions')) { + obj['actions'] = ApiClient.convertToType(data['actions'], [ArduinoAction]); + } + if (data.hasOwnProperty('active')) { + obj['active'] = ApiClient.convertToType(data['active'], 'Boolean'); + } + if (data.hasOwnProperty('created_by')) { + obj['created_by'] = ApiClient.convertToType(data['created_by'], 'String'); + } + if (data.hasOwnProperty('description')) { + obj['description'] = ApiClient.convertToType(data['description'], 'String'); + } + if (data.hasOwnProperty('device_status_source')) { + obj['device_status_source'] = DeviceStatusSourceWithLinkedDevices.constructFromObject(data['device_status_source']); + } + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('linked_property')) { + obj['linked_property'] = ArduinoLinkedProperty.constructFromObject(data['linked_property']); + } + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + if (data.hasOwnProperty('organization_id')) { + obj['organization_id'] = ApiClient.convertToType(data['organization_id'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to ArduinoTriggerWithLinkedEntities. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to ArduinoTriggerWithLinkedEntities. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of ArduinoTriggerWithLinkedEntities.RequiredProperties) { + if (!data.hasOwnProperty(property)) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + if (data['actions']) { // data not null + // ensure the json data is an array + if (!Array.isArray(data['actions'])) { + throw new Error("Expected the field `actions` to be an array in the JSON data but got " + data['actions']); + } + // validate the optional field `actions` (array) + for (const item of data['actions']) { + ArduinoAction.validateJSON(item); + }; + } + // ensure the json data is a string + if (data['created_by'] && !(typeof data['created_by'] === 'string' || data['created_by'] instanceof String)) { + throw new Error("Expected the field `created_by` to be a primitive type in the JSON string but got " + data['created_by']); + } + // ensure the json data is a string + if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) { + throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']); + } + // validate the optional field `device_status_source` + if (data['device_status_source']) { // data not null + DeviceStatusSourceWithLinkedDevices.validateJSON(data['device_status_source']); + } + // ensure the json data is a string + if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { + throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); + } + // validate the optional field `linked_property` + if (data['linked_property']) { // data not null + ArduinoLinkedProperty.validateJSON(data['linked_property']); + } + // ensure the json data is a string + if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { + throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); + } + // ensure the json data is a string + if (data['organization_id'] && !(typeof data['organization_id'] === 'string' || data['organization_id'] instanceof String)) { + throw new Error("Expected the field `organization_id` to be a primitive type in the JSON string but got " + data['organization_id']); + } + + return true; + } + + +} + +ArduinoTriggerWithLinkedEntities.RequiredProperties = ["id", "name"]; + +/** + * A list of actions associated with the trigger + * @member {Array.} actions + */ +ArduinoTriggerWithLinkedEntities.prototype['actions'] = undefined; + +/** + * Is true if the trigger is enabled + * @member {Boolean} active + */ +ArduinoTriggerWithLinkedEntities.prototype['active'] = undefined; + +/** + * Id of the user who last updated the trigger + * @member {String} created_by + */ +ArduinoTriggerWithLinkedEntities.prototype['created_by'] = undefined; + +/** + * The description of the trigger + * @member {String} description + */ +ArduinoTriggerWithLinkedEntities.prototype['description'] = undefined; + +/** + * @member {module:model/DeviceStatusSourceWithLinkedDevices} device_status_source + */ +ArduinoTriggerWithLinkedEntities.prototype['device_status_source'] = undefined; + +/** + * The id of the trigger + * @member {String} id + */ +ArduinoTriggerWithLinkedEntities.prototype['id'] = undefined; + +/** + * @member {module:model/ArduinoLinkedProperty} linked_property + */ +ArduinoTriggerWithLinkedEntities.prototype['linked_property'] = undefined; + +/** + * The name of the trigger + * @member {String} name + */ +ArduinoTriggerWithLinkedEntities.prototype['name'] = undefined; + +/** + * Id of the organization the trigger belongs to + * @member {String} organization_id + */ +ArduinoTriggerWithLinkedEntities.prototype['organization_id'] = undefined; + + + + + + +export default ArduinoTriggerWithLinkedEntities; + diff --git a/src/model/BodyExpression.js b/src/model/BodyExpression.js new file mode 100644 index 0000000..1ec9c93 --- /dev/null +++ b/src/model/BodyExpression.js @@ -0,0 +1,116 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import Variable from './Variable'; + +/** + * The BodyExpression model module. + * @module model/BodyExpression + * @version 3.0.0 + */ +class BodyExpression { + /** + * Constructs a new BodyExpression. + * @alias module:model/BodyExpression + * @param expression {String} Content of the body of a message, variables are allowed + */ + constructor(expression) { + + BodyExpression.initialize(this, expression); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, expression) { + obj['expression'] = expression; + } + + /** + * Constructs a BodyExpression from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/BodyExpression} obj Optional instance to populate. + * @return {module:model/BodyExpression} The populated BodyExpression instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new BodyExpression(); + + if (data.hasOwnProperty('expression')) { + obj['expression'] = ApiClient.convertToType(data['expression'], 'String'); + } + if (data.hasOwnProperty('variables')) { + obj['variables'] = ApiClient.convertToType(data['variables'], [Variable]); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to BodyExpression. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to BodyExpression. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of BodyExpression.RequiredProperties) { + if (!data.hasOwnProperty(property)) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + // ensure the json data is a string + if (data['expression'] && !(typeof data['expression'] === 'string' || data['expression'] instanceof String)) { + throw new Error("Expected the field `expression` to be a primitive type in the JSON string but got " + data['expression']); + } + if (data['variables']) { // data not null + // ensure the json data is an array + if (!Array.isArray(data['variables'])) { + throw new Error("Expected the field `variables` to be an array in the JSON data but got " + data['variables']); + } + // validate the optional field `variables` (array) + for (const item of data['variables']) { + Variable.validateJSON(item); + }; + } + + return true; + } + + +} + +BodyExpression.RequiredProperties = ["expression"]; + +/** + * Content of the body of a message, variables are allowed + * @member {String} expression + */ +BodyExpression.prototype['expression'] = undefined; + +/** + * Variables used by the expression + * @member {Array.} variables + */ +BodyExpression.prototype['variables'] = undefined; + + + + + + +export default BodyExpression; + diff --git a/src/model/Clone.js b/src/model/Clone.js index 6d478f9..cb36ef8 100644 --- a/src/model/Clone.js +++ b/src/model/Clone.js @@ -22,6 +22,7 @@ import Override from './Override'; class Clone { /** * Constructs a new Clone. + * Add overrides used when performing a clone of a dashboard * @alias module:model/Clone */ constructor() { diff --git a/src/model/CreateAction.js b/src/model/CreateAction.js new file mode 100644 index 0000000..c8d0924 --- /dev/null +++ b/src/model/CreateAction.js @@ -0,0 +1,197 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import EmailAction from './EmailAction'; +import PushAction from './PushAction'; + +/** + * The CreateAction model module. + * @module model/CreateAction + * @version 3.0.0 + */ +class CreateAction { + /** + * Constructs a new CreateAction. + * @alias module:model/CreateAction + * @param kind {module:model/CreateAction.KindEnum} The kind of the action + * @param name {String} The name of the action + */ + constructor(kind, name) { + + CreateAction.initialize(this, kind, name); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, kind, name) { + obj['kind'] = kind; + obj['name'] = name; + } + + /** + * Constructs a CreateAction from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/CreateAction} obj Optional instance to populate. + * @return {module:model/CreateAction} The populated CreateAction instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new CreateAction(); + + if (data.hasOwnProperty('description')) { + obj['description'] = ApiClient.convertToType(data['description'], 'String'); + } + if (data.hasOwnProperty('email')) { + obj['email'] = EmailAction.constructFromObject(data['email']); + } + if (data.hasOwnProperty('kind')) { + obj['kind'] = ApiClient.convertToType(data['kind'], 'String'); + } + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + if (data.hasOwnProperty('organization_id')) { + obj['organization_id'] = ApiClient.convertToType(data['organization_id'], 'String'); + } + if (data.hasOwnProperty('push_notification')) { + obj['push_notification'] = PushAction.constructFromObject(data['push_notification']); + } + if (data.hasOwnProperty('trigger_id')) { + obj['trigger_id'] = ApiClient.convertToType(data['trigger_id'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to CreateAction. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to CreateAction. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of CreateAction.RequiredProperties) { + if (!data.hasOwnProperty(property)) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + // ensure the json data is a string + if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) { + throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']); + } + // validate the optional field `email` + if (data['email']) { // data not null + EmailAction.validateJSON(data['email']); + } + // ensure the json data is a string + if (data['kind'] && !(typeof data['kind'] === 'string' || data['kind'] instanceof String)) { + throw new Error("Expected the field `kind` to be a primitive type in the JSON string but got " + data['kind']); + } + // ensure the json data is a string + if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { + throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); + } + // ensure the json data is a string + if (data['organization_id'] && !(typeof data['organization_id'] === 'string' || data['organization_id'] instanceof String)) { + throw new Error("Expected the field `organization_id` to be a primitive type in the JSON string but got " + data['organization_id']); + } + // validate the optional field `push_notification` + if (data['push_notification']) { // data not null + PushAction.validateJSON(data['push_notification']); + } + // ensure the json data is a string + if (data['trigger_id'] && !(typeof data['trigger_id'] === 'string' || data['trigger_id'] instanceof String)) { + throw new Error("Expected the field `trigger_id` to be a primitive type in the JSON string but got " + data['trigger_id']); + } + + return true; + } + + +} + +CreateAction.RequiredProperties = ["kind", "name"]; + +/** + * The description of the trigger + * @member {String} description + */ +CreateAction.prototype['description'] = undefined; + +/** + * @member {module:model/EmailAction} email + */ +CreateAction.prototype['email'] = undefined; + +/** + * The kind of the action + * @member {module:model/CreateAction.KindEnum} kind + */ +CreateAction.prototype['kind'] = undefined; + +/** + * The name of the action + * @member {String} name + */ +CreateAction.prototype['name'] = undefined; + +/** + * Id of the organization the trigger belongs to + * @member {String} organization_id + */ +CreateAction.prototype['organization_id'] = undefined; + +/** + * @member {module:model/PushAction} push_notification + */ +CreateAction.prototype['push_notification'] = undefined; + +/** + * Id of the trigger the action is associated to + * @member {String} trigger_id + */ +CreateAction.prototype['trigger_id'] = undefined; + + + + + +/** + * Allowed values for the kind property. + * @enum {String} + * @readonly + */ +CreateAction['KindEnum'] = { + + /** + * value: "NOTIFY-EMAIL" + * @const + */ + "EMAIL": "NOTIFY-EMAIL", + + /** + * value: "NOTIFY-PUSH" + * @const + */ + "PUSH": "NOTIFY-PUSH" +}; + + + +export default CreateAction; + diff --git a/src/model/CreateDevicesV2Payload.js b/src/model/CreateDevicesV2Payload.js index 95d5daa..597d3f5 100644 --- a/src/model/CreateDevicesV2Payload.js +++ b/src/model/CreateDevicesV2Payload.js @@ -36,6 +36,7 @@ class CreateDevicesV2Payload { * Only for internal use. */ static initialize(obj, type) { + obj['soft_deleted'] = false; obj['type'] = type; } @@ -62,6 +63,9 @@ class CreateDevicesV2Payload { if (data.hasOwnProperty('serial')) { obj['serial'] = ApiClient.convertToType(data['serial'], 'String'); } + if (data.hasOwnProperty('soft_deleted')) { + obj['soft_deleted'] = ApiClient.convertToType(data['soft_deleted'], 'Boolean'); + } if (data.hasOwnProperty('type')) { obj['type'] = ApiClient.convertToType(data['type'], 'String'); } @@ -148,6 +152,13 @@ CreateDevicesV2Payload.prototype['name'] = undefined; */ CreateDevicesV2Payload.prototype['serial'] = undefined; +/** + * If false, restore the thing from the soft deletion + * @member {Boolean} soft_deleted + * @default false + */ +CreateDevicesV2Payload.prototype['soft_deleted'] = false; + /** * The type of the device * @member {module:model/CreateDevicesV2Payload.TypeEnum} type diff --git a/src/model/Dashboardv2.js b/src/model/Dashboardv2.js index f49156b..d2966d6 100644 --- a/src/model/Dashboardv2.js +++ b/src/model/Dashboardv2.js @@ -22,7 +22,7 @@ import Widget from './Widget'; class Dashboardv2 { /** * Constructs a new Dashboardv2. - * DashboardV2Payload describes a dashboard + * Describes a dashboard * @alias module:model/Dashboardv2 */ constructor() { @@ -36,6 +36,7 @@ class Dashboardv2 { * Only for internal use. */ static initialize(obj) { + obj['soft_deleted'] = false; } /** @@ -55,6 +56,9 @@ class Dashboardv2 { if (data.hasOwnProperty('name')) { obj['name'] = ApiClient.convertToType(data['name'], 'String'); } + if (data.hasOwnProperty('soft_deleted')) { + obj['soft_deleted'] = ApiClient.convertToType(data['soft_deleted'], 'Boolean'); + } if (data.hasOwnProperty('widgets')) { obj['widgets'] = ApiClient.convertToType(data['widgets'], [Widget]); } @@ -107,6 +111,13 @@ Dashboardv2.prototype['cover_image'] = undefined; */ Dashboardv2.prototype['name'] = undefined; +/** + * If false, restore the thing from the soft deletion + * @member {Boolean} soft_deleted + * @default false + */ +Dashboardv2.prototype['soft_deleted'] = false; + /** * Widgets attached to this dashboard * @member {Array.} widgets diff --git a/src/model/DeviceStatusSource.js b/src/model/DeviceStatusSource.js new file mode 100644 index 0000000..c07b029 --- /dev/null +++ b/src/model/DeviceStatusSource.js @@ -0,0 +1,148 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The DeviceStatusSource model module. + * @module model/DeviceStatusSource + * @version 3.0.0 + */ +class DeviceStatusSource { + /** + * Constructs a new DeviceStatusSource. + * @alias module:model/DeviceStatusSource + * @param criteria {module:model/DeviceStatusSource.CriteriaEnum} The matching criteria of the trigger, this allows to interpret device_ids as an inclusion or exclusion list + */ + constructor(criteria) { + + DeviceStatusSource.initialize(this, criteria); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, criteria) { + obj['criteria'] = criteria; + } + + /** + * Constructs a DeviceStatusSource from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/DeviceStatusSource} obj Optional instance to populate. + * @return {module:model/DeviceStatusSource} The populated DeviceStatusSource instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new DeviceStatusSource(); + + if (data.hasOwnProperty('criteria')) { + obj['criteria'] = ApiClient.convertToType(data['criteria'], 'String'); + } + if (data.hasOwnProperty('device_ids')) { + obj['device_ids'] = ApiClient.convertToType(data['device_ids'], ['String']); + } + if (data.hasOwnProperty('grace_period_offline')) { + obj['grace_period_offline'] = ApiClient.convertToType(data['grace_period_offline'], 'Number'); + } + if (data.hasOwnProperty('grace_period_online')) { + obj['grace_period_online'] = ApiClient.convertToType(data['grace_period_online'], 'Number'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to DeviceStatusSource. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to DeviceStatusSource. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of DeviceStatusSource.RequiredProperties) { + if (!data.hasOwnProperty(property)) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + // ensure the json data is a string + if (data['criteria'] && !(typeof data['criteria'] === 'string' || data['criteria'] instanceof String)) { + throw new Error("Expected the field `criteria` to be a primitive type in the JSON string but got " + data['criteria']); + } + // ensure the json data is an array + if (!Array.isArray(data['device_ids'])) { + throw new Error("Expected the field `device_ids` to be an array in the JSON data but got " + data['device_ids']); + } + + return true; + } + + +} + +DeviceStatusSource.RequiredProperties = ["criteria"]; + +/** + * The matching criteria of the trigger, this allows to interpret device_ids as an inclusion or exclusion list + * @member {module:model/DeviceStatusSource.CriteriaEnum} criteria + */ +DeviceStatusSource.prototype['criteria'] = undefined; + +/** + * A list of device IDs to be included in or excluded from the trigger (see criteria). Mutually exclusive with property_id. + * @member {Array.} device_ids + */ +DeviceStatusSource.prototype['device_ids'] = undefined; + +/** + * Amount of seconds the trigger will wait before the device will be considered disconnected (requires 'device_id') + * @member {Number} grace_period_offline + */ +DeviceStatusSource.prototype['grace_period_offline'] = undefined; + +/** + * Amount of seconds the trigger will wait before the device will be considered connected (requires 'device_id') + * @member {Number} grace_period_online + */ +DeviceStatusSource.prototype['grace_period_online'] = undefined; + + + + + +/** + * Allowed values for the criteria property. + * @enum {String} + * @readonly + */ +DeviceStatusSource['CriteriaEnum'] = { + + /** + * value: "INCLUDE" + * @const + */ + "INCLUDE": "INCLUDE", + + /** + * value: "EXCLUDE" + * @const + */ + "EXCLUDE": "EXCLUDE" +}; + + + +export default DeviceStatusSource; + diff --git a/src/model/DeviceStatusSourceWithLinkedDevices.js b/src/model/DeviceStatusSourceWithLinkedDevices.js new file mode 100644 index 0000000..a92c12f --- /dev/null +++ b/src/model/DeviceStatusSourceWithLinkedDevices.js @@ -0,0 +1,135 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import ArduinoLinkedDevice from './ArduinoLinkedDevice'; + +/** + * The DeviceStatusSourceWithLinkedDevices model module. + * @module model/DeviceStatusSourceWithLinkedDevices + * @version 3.0.0 + */ +class DeviceStatusSourceWithLinkedDevices { + /** + * Constructs a new DeviceStatusSourceWithLinkedDevices. + * Device_status_source_with_linked_devices media type (default view) + * @alias module:model/DeviceStatusSourceWithLinkedDevices + * @param criteria {String} The criteria of the trigger, could be INCLUDE or EXCLUDE + */ + constructor(criteria) { + + DeviceStatusSourceWithLinkedDevices.initialize(this, criteria); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, criteria) { + obj['criteria'] = criteria; + } + + /** + * Constructs a DeviceStatusSourceWithLinkedDevices from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/DeviceStatusSourceWithLinkedDevices} obj Optional instance to populate. + * @return {module:model/DeviceStatusSourceWithLinkedDevices} The populated DeviceStatusSourceWithLinkedDevices instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new DeviceStatusSourceWithLinkedDevices(); + + if (data.hasOwnProperty('criteria')) { + obj['criteria'] = ApiClient.convertToType(data['criteria'], 'String'); + } + if (data.hasOwnProperty('grace_period_offline')) { + obj['grace_period_offline'] = ApiClient.convertToType(data['grace_period_offline'], 'Number'); + } + if (data.hasOwnProperty('grace_period_online')) { + obj['grace_period_online'] = ApiClient.convertToType(data['grace_period_online'], 'Number'); + } + if (data.hasOwnProperty('linked_devices')) { + obj['linked_devices'] = ApiClient.convertToType(data['linked_devices'], [ArduinoLinkedDevice]); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to DeviceStatusSourceWithLinkedDevices. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to DeviceStatusSourceWithLinkedDevices. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of DeviceStatusSourceWithLinkedDevices.RequiredProperties) { + if (!data.hasOwnProperty(property)) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + // ensure the json data is a string + if (data['criteria'] && !(typeof data['criteria'] === 'string' || data['criteria'] instanceof String)) { + throw new Error("Expected the field `criteria` to be a primitive type in the JSON string but got " + data['criteria']); + } + if (data['linked_devices']) { // data not null + // ensure the json data is an array + if (!Array.isArray(data['linked_devices'])) { + throw new Error("Expected the field `linked_devices` to be an array in the JSON data but got " + data['linked_devices']); + } + // validate the optional field `linked_devices` (array) + for (const item of data['linked_devices']) { + ArduinoLinkedDevice.validateJSON(item); + }; + } + + return true; + } + + +} + +DeviceStatusSourceWithLinkedDevices.RequiredProperties = ["criteria"]; + +/** + * The criteria of the trigger, could be INCLUDE or EXCLUDE + * @member {String} criteria + */ +DeviceStatusSourceWithLinkedDevices.prototype['criteria'] = undefined; + +/** + * The amount of seconds the trigger will wait before considering a matching device as offline + * @member {Number} grace_period_offline + */ +DeviceStatusSourceWithLinkedDevices.prototype['grace_period_offline'] = undefined; + +/** + * The amount of seconds the trigger will wait before considering a matching device as online + * @member {Number} grace_period_online + */ +DeviceStatusSourceWithLinkedDevices.prototype['grace_period_online'] = undefined; + +/** + * A list of devices the trigger is associated to + * @member {Array.} linked_devices + */ +DeviceStatusSourceWithLinkedDevices.prototype['linked_devices'] = undefined; + + + + + + +export default DeviceStatusSourceWithLinkedDevices; + diff --git a/src/model/Devicev2.js b/src/model/Devicev2.js index 83896c3..a030900 100644 --- a/src/model/Devicev2.js +++ b/src/model/Devicev2.js @@ -35,6 +35,7 @@ class Devicev2 { * Only for internal use. */ static initialize(obj) { + obj['soft_deleted'] = false; } /** @@ -60,6 +61,9 @@ class Devicev2 { if (data.hasOwnProperty('serial')) { obj['serial'] = ApiClient.convertToType(data['serial'], 'String'); } + if (data.hasOwnProperty('soft_deleted')) { + obj['soft_deleted'] = ApiClient.convertToType(data['soft_deleted'], 'Boolean'); + } if (data.hasOwnProperty('type')) { obj['type'] = ApiClient.convertToType(data['type'], 'String'); } @@ -140,6 +144,13 @@ Devicev2.prototype['name'] = undefined; */ Devicev2.prototype['serial'] = undefined; +/** + * If false, restore the thing from the soft deletion + * @member {Boolean} soft_deleted + * @default false + */ +Devicev2.prototype['soft_deleted'] = false; + /** * The type of the device * @member {module:model/Devicev2.TypeEnum} type diff --git a/src/model/EmailAction.js b/src/model/EmailAction.js new file mode 100644 index 0000000..3013261 --- /dev/null +++ b/src/model/EmailAction.js @@ -0,0 +1,126 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import BodyExpression from './BodyExpression'; +import EmailDeliveryOpts from './EmailDeliveryOpts'; +import TitleExpression from './TitleExpression'; + +/** + * The EmailAction model module. + * @module model/EmailAction + * @version 3.0.0 + */ +class EmailAction { + /** + * Constructs a new EmailAction. + * @alias module:model/EmailAction + * @param body {module:model/BodyExpression} + * @param delivery {module:model/EmailDeliveryOpts} + * @param subject {module:model/TitleExpression} + */ + constructor(body, delivery, subject) { + + EmailAction.initialize(this, body, delivery, subject); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, body, delivery, subject) { + obj['body'] = body; + obj['delivery'] = delivery; + obj['subject'] = subject; + } + + /** + * Constructs a EmailAction from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/EmailAction} obj Optional instance to populate. + * @return {module:model/EmailAction} The populated EmailAction instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new EmailAction(); + + if (data.hasOwnProperty('body')) { + obj['body'] = BodyExpression.constructFromObject(data['body']); + } + if (data.hasOwnProperty('delivery')) { + obj['delivery'] = EmailDeliveryOpts.constructFromObject(data['delivery']); + } + if (data.hasOwnProperty('subject')) { + obj['subject'] = TitleExpression.constructFromObject(data['subject']); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to EmailAction. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to EmailAction. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of EmailAction.RequiredProperties) { + if (!data.hasOwnProperty(property)) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + // validate the optional field `body` + if (data['body']) { // data not null + BodyExpression.validateJSON(data['body']); + } + // validate the optional field `delivery` + if (data['delivery']) { // data not null + EmailDeliveryOpts.validateJSON(data['delivery']); + } + // validate the optional field `subject` + if (data['subject']) { // data not null + TitleExpression.validateJSON(data['subject']); + } + + return true; + } + + +} + +EmailAction.RequiredProperties = ["body", "delivery", "subject"]; + +/** + * @member {module:model/BodyExpression} body + */ +EmailAction.prototype['body'] = undefined; + +/** + * @member {module:model/EmailDeliveryOpts} delivery + */ +EmailAction.prototype['delivery'] = undefined; + +/** + * @member {module:model/TitleExpression} subject + */ +EmailAction.prototype['subject'] = undefined; + + + + + + +export default EmailAction; + diff --git a/src/model/EmailDeliveryOpts.js b/src/model/EmailDeliveryOpts.js new file mode 100644 index 0000000..b8c2dbb --- /dev/null +++ b/src/model/EmailDeliveryOpts.js @@ -0,0 +1,141 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import UserRecipient from './UserRecipient'; + +/** + * The EmailDeliveryOpts model module. + * @module model/EmailDeliveryOpts + * @version 3.0.0 + */ +class EmailDeliveryOpts { + /** + * Constructs a new EmailDeliveryOpts. + * @alias module:model/EmailDeliveryOpts + * @param to {Array.} The \"to:\" field of an e-mail + */ + constructor(to) { + + EmailDeliveryOpts.initialize(this, to); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, to) { + obj['to'] = to; + } + + /** + * Constructs a EmailDeliveryOpts from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/EmailDeliveryOpts} obj Optional instance to populate. + * @return {module:model/EmailDeliveryOpts} The populated EmailDeliveryOpts instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new EmailDeliveryOpts(); + + if (data.hasOwnProperty('bcc')) { + obj['bcc'] = ApiClient.convertToType(data['bcc'], [UserRecipient]); + } + if (data.hasOwnProperty('cc')) { + obj['cc'] = ApiClient.convertToType(data['cc'], [UserRecipient]); + } + if (data.hasOwnProperty('to')) { + obj['to'] = ApiClient.convertToType(data['to'], [UserRecipient]); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to EmailDeliveryOpts. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to EmailDeliveryOpts. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of EmailDeliveryOpts.RequiredProperties) { + if (!data.hasOwnProperty(property)) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + if (data['bcc']) { // data not null + // ensure the json data is an array + if (!Array.isArray(data['bcc'])) { + throw new Error("Expected the field `bcc` to be an array in the JSON data but got " + data['bcc']); + } + // validate the optional field `bcc` (array) + for (const item of data['bcc']) { + UserRecipient.validateJSON(item); + }; + } + if (data['cc']) { // data not null + // ensure the json data is an array + if (!Array.isArray(data['cc'])) { + throw new Error("Expected the field `cc` to be an array in the JSON data but got " + data['cc']); + } + // validate the optional field `cc` (array) + for (const item of data['cc']) { + UserRecipient.validateJSON(item); + }; + } + if (data['to']) { // data not null + // ensure the json data is an array + if (!Array.isArray(data['to'])) { + throw new Error("Expected the field `to` to be an array in the JSON data but got " + data['to']); + } + // validate the optional field `to` (array) + for (const item of data['to']) { + UserRecipient.validateJSON(item); + }; + } + + return true; + } + + +} + +EmailDeliveryOpts.RequiredProperties = ["to"]; + +/** + * The \"bcc:\" field of an e-mail + * @member {Array.} bcc + */ +EmailDeliveryOpts.prototype['bcc'] = undefined; + +/** + * The \"cc:\" field of an e-mail + * @member {Array.} cc + */ +EmailDeliveryOpts.prototype['cc'] = undefined; + +/** + * The \"to:\" field of an e-mail + * @member {Array.} to + */ +EmailDeliveryOpts.prototype['to'] = undefined; + + + + + + +export default EmailDeliveryOpts; + diff --git a/src/model/PushAction.js b/src/model/PushAction.js new file mode 100644 index 0000000..c5a13ac --- /dev/null +++ b/src/model/PushAction.js @@ -0,0 +1,126 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import BodyExpression from './BodyExpression'; +import PushDeliveryOpts from './PushDeliveryOpts'; +import TitleExpression from './TitleExpression'; + +/** + * The PushAction model module. + * @module model/PushAction + * @version 3.0.0 + */ +class PushAction { + /** + * Constructs a new PushAction. + * @alias module:model/PushAction + * @param body {module:model/BodyExpression} + * @param delivery {module:model/PushDeliveryOpts} + * @param title {module:model/TitleExpression} + */ + constructor(body, delivery, title) { + + PushAction.initialize(this, body, delivery, title); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, body, delivery, title) { + obj['body'] = body; + obj['delivery'] = delivery; + obj['title'] = title; + } + + /** + * Constructs a PushAction from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/PushAction} obj Optional instance to populate. + * @return {module:model/PushAction} The populated PushAction instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new PushAction(); + + if (data.hasOwnProperty('body')) { + obj['body'] = BodyExpression.constructFromObject(data['body']); + } + if (data.hasOwnProperty('delivery')) { + obj['delivery'] = PushDeliveryOpts.constructFromObject(data['delivery']); + } + if (data.hasOwnProperty('title')) { + obj['title'] = TitleExpression.constructFromObject(data['title']); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to PushAction. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to PushAction. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of PushAction.RequiredProperties) { + if (!data.hasOwnProperty(property)) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + // validate the optional field `body` + if (data['body']) { // data not null + BodyExpression.validateJSON(data['body']); + } + // validate the optional field `delivery` + if (data['delivery']) { // data not null + PushDeliveryOpts.validateJSON(data['delivery']); + } + // validate the optional field `title` + if (data['title']) { // data not null + TitleExpression.validateJSON(data['title']); + } + + return true; + } + + +} + +PushAction.RequiredProperties = ["body", "delivery", "title"]; + +/** + * @member {module:model/BodyExpression} body + */ +PushAction.prototype['body'] = undefined; + +/** + * @member {module:model/PushDeliveryOpts} delivery + */ +PushAction.prototype['delivery'] = undefined; + +/** + * @member {module:model/TitleExpression} title + */ +PushAction.prototype['title'] = undefined; + + + + + + +export default PushAction; + diff --git a/src/model/PushDeliveryOpts.js b/src/model/PushDeliveryOpts.js new file mode 100644 index 0000000..9b4f673 --- /dev/null +++ b/src/model/PushDeliveryOpts.js @@ -0,0 +1,103 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import UserRecipient from './UserRecipient'; + +/** + * The PushDeliveryOpts model module. + * @module model/PushDeliveryOpts + * @version 3.0.0 + */ +class PushDeliveryOpts { + /** + * Constructs a new PushDeliveryOpts. + * @alias module:model/PushDeliveryOpts + * @param to {Array.} The recipient of a push notification + */ + constructor(to) { + + PushDeliveryOpts.initialize(this, to); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, to) { + obj['to'] = to; + } + + /** + * Constructs a PushDeliveryOpts from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/PushDeliveryOpts} obj Optional instance to populate. + * @return {module:model/PushDeliveryOpts} The populated PushDeliveryOpts instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new PushDeliveryOpts(); + + if (data.hasOwnProperty('to')) { + obj['to'] = ApiClient.convertToType(data['to'], [UserRecipient]); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to PushDeliveryOpts. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to PushDeliveryOpts. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of PushDeliveryOpts.RequiredProperties) { + if (!data.hasOwnProperty(property)) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + if (data['to']) { // data not null + // ensure the json data is an array + if (!Array.isArray(data['to'])) { + throw new Error("Expected the field `to` to be an array in the JSON data but got " + data['to']); + } + // validate the optional field `to` (array) + for (const item of data['to']) { + UserRecipient.validateJSON(item); + }; + } + + return true; + } + + +} + +PushDeliveryOpts.RequiredProperties = ["to"]; + +/** + * The recipient of a push notification + * @member {Array.} to + */ +PushDeliveryOpts.prototype['to'] = undefined; + + + + + + +export default PushDeliveryOpts; + diff --git a/src/model/ThingUpdate.js b/src/model/ThingUpdate.js index 2a29488..3f2b38b 100644 --- a/src/model/ThingUpdate.js +++ b/src/model/ThingUpdate.js @@ -36,6 +36,7 @@ class ThingUpdate { * Only for internal use. */ static initialize(obj) { + obj['soft_deleted'] = false; } /** @@ -64,6 +65,9 @@ class ThingUpdate { if (data.hasOwnProperty('properties')) { obj['properties'] = ApiClient.convertToType(data['properties'], [Property]); } + if (data.hasOwnProperty('soft_deleted')) { + obj['soft_deleted'] = ApiClient.convertToType(data['soft_deleted'], 'Boolean'); + } if (data.hasOwnProperty('timezone')) { obj['timezone'] = ApiClient.convertToType(data['timezone'], 'String'); } @@ -156,6 +160,13 @@ ThingUpdate.prototype['name'] = undefined; */ ThingUpdate.prototype['properties'] = undefined; +/** + * If false, restore the thing from the soft deletion + * @member {Boolean} soft_deleted + * @default false + */ +ThingUpdate.prototype['soft_deleted'] = false; + /** * A time zone name. Check /v2/timezones for a list of valid names. * @member {String} timezone diff --git a/src/model/TitleExpression.js b/src/model/TitleExpression.js new file mode 100644 index 0000000..c7c47be --- /dev/null +++ b/src/model/TitleExpression.js @@ -0,0 +1,116 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import Variable from './Variable'; + +/** + * The TitleExpression model module. + * @module model/TitleExpression + * @version 3.0.0 + */ +class TitleExpression { + /** + * Constructs a new TitleExpression. + * @alias module:model/TitleExpression + * @param expression {String} Content of the title (or subject) of a message, variables are allowed + */ + constructor(expression) { + + TitleExpression.initialize(this, expression); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, expression) { + obj['expression'] = expression; + } + + /** + * Constructs a TitleExpression from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/TitleExpression} obj Optional instance to populate. + * @return {module:model/TitleExpression} The populated TitleExpression instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new TitleExpression(); + + if (data.hasOwnProperty('expression')) { + obj['expression'] = ApiClient.convertToType(data['expression'], 'String'); + } + if (data.hasOwnProperty('variables')) { + obj['variables'] = ApiClient.convertToType(data['variables'], [Variable]); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to TitleExpression. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to TitleExpression. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of TitleExpression.RequiredProperties) { + if (!data.hasOwnProperty(property)) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + // ensure the json data is a string + if (data['expression'] && !(typeof data['expression'] === 'string' || data['expression'] instanceof String)) { + throw new Error("Expected the field `expression` to be a primitive type in the JSON string but got " + data['expression']); + } + if (data['variables']) { // data not null + // ensure the json data is an array + if (!Array.isArray(data['variables'])) { + throw new Error("Expected the field `variables` to be an array in the JSON data but got " + data['variables']); + } + // validate the optional field `variables` (array) + for (const item of data['variables']) { + Variable.validateJSON(item); + }; + } + + return true; + } + + +} + +TitleExpression.RequiredProperties = ["expression"]; + +/** + * Content of the title (or subject) of a message, variables are allowed + * @member {String} expression + */ +TitleExpression.prototype['expression'] = undefined; + +/** + * Variables used by the expression + * @member {Array.} variables + */ +TitleExpression.prototype['variables'] = undefined; + + + + + + +export default TitleExpression; + diff --git a/src/model/Trigger.js b/src/model/Trigger.js new file mode 100644 index 0000000..9557833 --- /dev/null +++ b/src/model/Trigger.js @@ -0,0 +1,180 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import CreateAction from './CreateAction'; +import DeviceStatusSource from './DeviceStatusSource'; + +/** + * The Trigger model module. + * @module model/Trigger + * @version 3.0.0 + */ +class Trigger { + /** + * Constructs a new Trigger. + * @alias module:model/Trigger + */ + constructor() { + + Trigger.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + obj['soft_deleted'] = false; + } + + /** + * Constructs a Trigger from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/Trigger} obj Optional instance to populate. + * @return {module:model/Trigger} The populated Trigger instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new Trigger(); + + if (data.hasOwnProperty('actions')) { + obj['actions'] = ApiClient.convertToType(data['actions'], [CreateAction]); + } + if (data.hasOwnProperty('active')) { + obj['active'] = ApiClient.convertToType(data['active'], 'Boolean'); + } + if (data.hasOwnProperty('description')) { + obj['description'] = ApiClient.convertToType(data['description'], 'String'); + } + if (data.hasOwnProperty('device_status_source')) { + obj['device_status_source'] = DeviceStatusSource.constructFromObject(data['device_status_source']); + } + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + if (data.hasOwnProperty('property_id')) { + obj['property_id'] = ApiClient.convertToType(data['property_id'], 'String'); + } + if (data.hasOwnProperty('soft_deleted')) { + obj['soft_deleted'] = ApiClient.convertToType(data['soft_deleted'], 'Boolean'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to Trigger. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to Trigger. + */ + static validateJSON(data) { + if (data['actions']) { // data not null + // ensure the json data is an array + if (!Array.isArray(data['actions'])) { + throw new Error("Expected the field `actions` to be an array in the JSON data but got " + data['actions']); + } + // validate the optional field `actions` (array) + for (const item of data['actions']) { + CreateAction.validateJSON(item); + }; + } + // ensure the json data is a string + if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) { + throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']); + } + // validate the optional field `device_status_source` + if (data['device_status_source']) { // data not null + DeviceStatusSource.validateJSON(data['device_status_source']); + } + // ensure the json data is a string + if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { + throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); + } + // ensure the json data is a string + if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { + throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); + } + // ensure the json data is a string + if (data['property_id'] && !(typeof data['property_id'] === 'string' || data['property_id'] instanceof String)) { + throw new Error("Expected the field `property_id` to be a primitive type in the JSON string but got " + data['property_id']); + } + + return true; + } + + +} + + + +/** + * A list of actions to be associated with the trigger + * @member {Array.} actions + */ +Trigger.prototype['actions'] = undefined; + +/** + * Is true if the trigger is enabled + * @member {Boolean} active + */ +Trigger.prototype['active'] = undefined; + +/** + * The description of the trigger + * @member {String} description + */ +Trigger.prototype['description'] = undefined; + +/** + * @member {module:model/DeviceStatusSource} device_status_source + */ +Trigger.prototype['device_status_source'] = undefined; + +/** + * The id of the trigger + * @member {String} id + */ +Trigger.prototype['id'] = undefined; + +/** + * The name of the trigger + * @member {String} name + */ +Trigger.prototype['name'] = undefined; + +/** + * Id of the property the trigger is associated to (mutually exclusive with 'device_status_source') + * @member {String} property_id + */ +Trigger.prototype['property_id'] = undefined; + +/** + * If false, restore the thing from the soft deletion + * @member {Boolean} soft_deleted + * @default false + */ +Trigger.prototype['soft_deleted'] = false; + + + + + + +export default Trigger; + diff --git a/src/model/UpdateAction.js b/src/model/UpdateAction.js new file mode 100644 index 0000000..a921150 --- /dev/null +++ b/src/model/UpdateAction.js @@ -0,0 +1,140 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import EmailAction from './EmailAction'; +import PushAction from './PushAction'; + +/** + * The UpdateAction model module. + * @module model/UpdateAction + * @version 3.0.0 + */ +class UpdateAction { + /** + * Constructs a new UpdateAction. + * @alias module:model/UpdateAction + */ + constructor() { + + UpdateAction.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a UpdateAction from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/UpdateAction} obj Optional instance to populate. + * @return {module:model/UpdateAction} The populated UpdateAction instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new UpdateAction(); + + if (data.hasOwnProperty('description')) { + obj['description'] = ApiClient.convertToType(data['description'], 'String'); + } + if (data.hasOwnProperty('email')) { + obj['email'] = EmailAction.constructFromObject(data['email']); + } + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + if (data.hasOwnProperty('push_notification')) { + obj['push_notification'] = PushAction.constructFromObject(data['push_notification']); + } + if (data.hasOwnProperty('trigger_id')) { + obj['trigger_id'] = ApiClient.convertToType(data['trigger_id'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to UpdateAction. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to UpdateAction. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) { + throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']); + } + // validate the optional field `email` + if (data['email']) { // data not null + EmailAction.validateJSON(data['email']); + } + // ensure the json data is a string + if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { + throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); + } + // validate the optional field `push_notification` + if (data['push_notification']) { // data not null + PushAction.validateJSON(data['push_notification']); + } + // ensure the json data is a string + if (data['trigger_id'] && !(typeof data['trigger_id'] === 'string' || data['trigger_id'] instanceof String)) { + throw new Error("Expected the field `trigger_id` to be a primitive type in the JSON string but got " + data['trigger_id']); + } + + return true; + } + + +} + + + +/** + * The description of the trigger + * @member {String} description + */ +UpdateAction.prototype['description'] = undefined; + +/** + * @member {module:model/EmailAction} email + */ +UpdateAction.prototype['email'] = undefined; + +/** + * The name of the action + * @member {String} name + */ +UpdateAction.prototype['name'] = undefined; + +/** + * @member {module:model/PushAction} push_notification + */ +UpdateAction.prototype['push_notification'] = undefined; + +/** + * Id of the trigger the action is associated to + * @member {String} trigger_id + */ +UpdateAction.prototype['trigger_id'] = undefined; + + + + + + +export default UpdateAction; + diff --git a/src/model/UserRecipient.js b/src/model/UserRecipient.js new file mode 100644 index 0000000..f35e236 --- /dev/null +++ b/src/model/UserRecipient.js @@ -0,0 +1,122 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The UserRecipient model module. + * @module model/UserRecipient + * @version 3.0.0 + */ +class UserRecipient { + /** + * Constructs a new UserRecipient. + * @alias module:model/UserRecipient + * @param id {String} The id of the user + */ + constructor(id) { + + UserRecipient.initialize(this, id); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, id) { + obj['id'] = id; + } + + /** + * Constructs a UserRecipient from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/UserRecipient} obj Optional instance to populate. + * @return {module:model/UserRecipient} The populated UserRecipient instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new UserRecipient(); + + if (data.hasOwnProperty('email')) { + obj['email'] = ApiClient.convertToType(data['email'], 'String'); + } + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('username')) { + obj['username'] = ApiClient.convertToType(data['username'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to UserRecipient. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to UserRecipient. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of UserRecipient.RequiredProperties) { + if (!data.hasOwnProperty(property)) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + // ensure the json data is a string + if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) { + throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']); + } + // ensure the json data is a string + if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { + throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); + } + // ensure the json data is a string + if (data['username'] && !(typeof data['username'] === 'string' || data['username'] instanceof String)) { + throw new Error("Expected the field `username` to be a primitive type in the JSON string but got " + data['username']); + } + + return true; + } + + +} + +UserRecipient.RequiredProperties = ["id"]; + +/** + * The email address of the user + * @member {String} email + */ +UserRecipient.prototype['email'] = undefined; + +/** + * The id of the user + * @member {String} id + */ +UserRecipient.prototype['id'] = undefined; + +/** + * The username of the user + * @member {String} username + */ +UserRecipient.prototype['username'] = undefined; + + + + + + +export default UserRecipient; + diff --git a/src/model/Variable.js b/src/model/Variable.js new file mode 100644 index 0000000..f0af7b4 --- /dev/null +++ b/src/model/Variable.js @@ -0,0 +1,261 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The Variable model module. + * @module model/Variable + * @version 3.0.0 + */ +class Variable { + /** + * Constructs a new Variable. + * @alias module:model/Variable + * @param attribute {module:model/Variable.AttributeEnum} The template expression that extracts the value from the respective entity + * @param entity {module:model/Variable.EntityEnum} Type of the entity being referenced + * @param placeholder {String} Name of the variable as referenced by the expression + */ + constructor(attribute, entity, placeholder) { + + Variable.initialize(this, attribute, entity, placeholder); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, attribute, entity, placeholder) { + obj['attribute'] = attribute; + obj['entity'] = entity; + obj['placeholder'] = placeholder; + } + + /** + * Constructs a Variable from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/Variable} obj Optional instance to populate. + * @return {module:model/Variable} The populated Variable instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new Variable(); + + if (data.hasOwnProperty('attribute')) { + obj['attribute'] = ApiClient.convertToType(data['attribute'], 'String'); + } + if (data.hasOwnProperty('entity')) { + obj['entity'] = ApiClient.convertToType(data['entity'], 'String'); + } + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('placeholder')) { + obj['placeholder'] = ApiClient.convertToType(data['placeholder'], 'String'); + } + if (data.hasOwnProperty('property_id')) { + obj['property_id'] = ApiClient.convertToType(data['property_id'], 'String'); + } + if (data.hasOwnProperty('thing_id')) { + obj['thing_id'] = ApiClient.convertToType(data['thing_id'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to Variable. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to Variable. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of Variable.RequiredProperties) { + if (!data.hasOwnProperty(property)) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + // ensure the json data is a string + if (data['attribute'] && !(typeof data['attribute'] === 'string' || data['attribute'] instanceof String)) { + throw new Error("Expected the field `attribute` to be a primitive type in the JSON string but got " + data['attribute']); + } + // ensure the json data is a string + if (data['entity'] && !(typeof data['entity'] === 'string' || data['entity'] instanceof String)) { + throw new Error("Expected the field `entity` to be a primitive type in the JSON string but got " + data['entity']); + } + // ensure the json data is a string + if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { + throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); + } + // ensure the json data is a string + if (data['placeholder'] && !(typeof data['placeholder'] === 'string' || data['placeholder'] instanceof String)) { + throw new Error("Expected the field `placeholder` to be a primitive type in the JSON string but got " + data['placeholder']); + } + // ensure the json data is a string + if (data['property_id'] && !(typeof data['property_id'] === 'string' || data['property_id'] instanceof String)) { + throw new Error("Expected the field `property_id` to be a primitive type in the JSON string but got " + data['property_id']); + } + // ensure the json data is a string + if (data['thing_id'] && !(typeof data['thing_id'] === 'string' || data['thing_id'] instanceof String)) { + throw new Error("Expected the field `thing_id` to be a primitive type in the JSON string but got " + data['thing_id']); + } + + return true; + } + + +} + +Variable.RequiredProperties = ["attribute", "entity", "placeholder"]; + +/** + * The template expression that extracts the value from the respective entity + * @member {module:model/Variable.AttributeEnum} attribute + */ +Variable.prototype['attribute'] = undefined; + +/** + * Type of the entity being referenced + * @member {module:model/Variable.EntityEnum} entity + */ +Variable.prototype['entity'] = undefined; + +/** + * The ID of the referenced entity + * @member {String} id + */ +Variable.prototype['id'] = undefined; + +/** + * Name of the variable as referenced by the expression + * @member {String} placeholder + */ +Variable.prototype['placeholder'] = undefined; + +/** + * The ID of the property referenced entity + * @member {String} property_id + */ +Variable.prototype['property_id'] = undefined; + +/** + * The ID of the thing referenced entity + * @member {String} thing_id + */ +Variable.prototype['thing_id'] = undefined; + + + + + +/** + * Allowed values for the attribute property. + * @enum {String} + * @readonly + */ +Variable['AttributeEnum'] = { + + /** + * value: "ID" + * @const + */ + "ID": "ID", + + /** + * value: "NAME" + * @const + */ + "NAME": "NAME", + + /** + * value: "VALUE" + * @const + */ + "VALUE": "VALUE", + + /** + * value: "TIMESTAMP" + * @const + */ + "TIMESTAMP": "TIMESTAMP", + + /** + * value: "USERNAME" + * @const + */ + "USERNAME": "USERNAME", + + /** + * value: "EMAIL" + * @const + */ + "EMAIL": "EMAIL", + + /** + * value: "STATUS" + * @const + */ + "STATUS": "STATUS" +}; + + +/** + * Allowed values for the entity property. + * @enum {String} + * @readonly + */ +Variable['EntityEnum'] = { + + /** + * value: "RECIPIENT" + * @const + */ + "RECIPIENT": "RECIPIENT", + + /** + * value: "USER" + * @const + */ + "USER": "USER", + + /** + * value: "DEVICE" + * @const + */ + "DEVICE": "DEVICE", + + /** + * value: "THING" + * @const + */ + "THING": "THING", + + /** + * value: "PROPERTY" + * @const + */ + "PROPERTY": "PROPERTY", + + /** + * value: "TRIGGERING_DEVICE" + * @const + */ + "TRIGGERING_DEVICE": "TRIGGERING_DEVICE" +}; + + + +export default Variable; + diff --git a/test/api/TriggersV1Api.spec.js b/test/api/TriggersV1Api.spec.js new file mode 100644 index 0000000..18ac3e5 --- /dev/null +++ b/test/api/TriggersV1Api.spec.js @@ -0,0 +1,173 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.ArduinoIotClient); + } +}(this, function(expect, ArduinoIotClient) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new ArduinoIotClient.TriggersV1Api(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('TriggersV1Api', function() { + describe('actionsV1Create', function() { + it('should call actionsV1Create successfully', function(done) { + //uncomment below and update the code to test actionsV1Create + //instance.actionsV1Create(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('actionsV1Delete', function() { + it('should call actionsV1Delete successfully', function(done) { + //uncomment below and update the code to test actionsV1Delete + //instance.actionsV1Delete(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('actionsV1List', function() { + it('should call actionsV1List successfully', function(done) { + //uncomment below and update the code to test actionsV1List + //instance.actionsV1List(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('actionsV1Show', function() { + it('should call actionsV1Show successfully', function(done) { + //uncomment below and update the code to test actionsV1Show + //instance.actionsV1Show(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('actionsV1Update', function() { + it('should call actionsV1Update successfully', function(done) { + //uncomment below and update the code to test actionsV1Update + //instance.actionsV1Update(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('triggersV1Create', function() { + it('should call triggersV1Create successfully', function(done) { + //uncomment below and update the code to test triggersV1Create + //instance.triggersV1Create(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('triggersV1Delete', function() { + it('should call triggersV1Delete successfully', function(done) { + //uncomment below and update the code to test triggersV1Delete + //instance.triggersV1Delete(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('triggersV1List', function() { + it('should call triggersV1List successfully', function(done) { + //uncomment below and update the code to test triggersV1List + //instance.triggersV1List(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('triggersV1Patch', function() { + it('should call triggersV1Patch successfully', function(done) { + //uncomment below and update the code to test triggersV1Patch + //instance.triggersV1Patch(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('triggersV1Show', function() { + it('should call triggersV1Show successfully', function(done) { + //uncomment below and update the code to test triggersV1Show + //instance.triggersV1Show(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('triggersV1Template', function() { + it('should call triggersV1Template successfully', function(done) { + //uncomment below and update the code to test triggersV1Template + //instance.triggersV1Template(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('triggersV1Update', function() { + it('should call triggersV1Update successfully', function(done) { + //uncomment below and update the code to test triggersV1Update + //instance.triggersV1Update(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/test/model/ArduinoAction.spec.js b/test/model/ArduinoAction.spec.js new file mode 100644 index 0000000..e6ae098 --- /dev/null +++ b/test/model/ArduinoAction.spec.js @@ -0,0 +1,113 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.ArduinoIotClient); + } +}(this, function(expect, ArduinoIotClient) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new ArduinoIotClient.ArduinoAction(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('ArduinoAction', function() { + it('should create an instance of ArduinoAction', function() { + // uncomment below and update the code to test ArduinoAction + //var instance = new ArduinoIotClient.ArduinoAction(); + //expect(instance).to.be.a(ArduinoIotClient.ArduinoAction); + }); + + it('should have the property createdBy (base name: "created_by")', function() { + // uncomment below and update the code to test the property createdBy + //var instance = new ArduinoIotClient.ArduinoAction(); + //expect(instance).to.be(); + }); + + it('should have the property description (base name: "description")', function() { + // uncomment below and update the code to test the property description + //var instance = new ArduinoIotClient.ArduinoAction(); + //expect(instance).to.be(); + }); + + it('should have the property email (base name: "email")', function() { + // uncomment below and update the code to test the property email + //var instance = new ArduinoIotClient.ArduinoAction(); + //expect(instance).to.be(); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new ArduinoIotClient.ArduinoAction(); + //expect(instance).to.be(); + }); + + it('should have the property kind (base name: "kind")', function() { + // uncomment below and update the code to test the property kind + //var instance = new ArduinoIotClient.ArduinoAction(); + //expect(instance).to.be(); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new ArduinoIotClient.ArduinoAction(); + //expect(instance).to.be(); + }); + + it('should have the property organizationId (base name: "organization_id")', function() { + // uncomment below and update the code to test the property organizationId + //var instance = new ArduinoIotClient.ArduinoAction(); + //expect(instance).to.be(); + }); + + it('should have the property pushNotification (base name: "push_notification")', function() { + // uncomment below and update the code to test the property pushNotification + //var instance = new ArduinoIotClient.ArduinoAction(); + //expect(instance).to.be(); + }); + + it('should have the property triggerId (base name: "trigger_id")', function() { + // uncomment below and update the code to test the property triggerId + //var instance = new ArduinoIotClient.ArduinoAction(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/ArduinoActionTemplate.spec.js b/test/model/ArduinoActionTemplate.spec.js new file mode 100644 index 0000000..1bcf8de --- /dev/null +++ b/test/model/ArduinoActionTemplate.spec.js @@ -0,0 +1,95 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.ArduinoIotClient); + } +}(this, function(expect, ArduinoIotClient) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new ArduinoIotClient.ArduinoActionTemplate(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('ArduinoActionTemplate', function() { + it('should create an instance of ArduinoActionTemplate', function() { + // uncomment below and update the code to test ArduinoActionTemplate + //var instance = new ArduinoIotClient.ArduinoActionTemplate(); + //expect(instance).to.be.a(ArduinoIotClient.ArduinoActionTemplate); + }); + + it('should have the property description (base name: "description")', function() { + // uncomment below and update the code to test the property description + //var instance = new ArduinoIotClient.ArduinoActionTemplate(); + //expect(instance).to.be(); + }); + + it('should have the property email (base name: "email")', function() { + // uncomment below and update the code to test the property email + //var instance = new ArduinoIotClient.ArduinoActionTemplate(); + //expect(instance).to.be(); + }); + + it('should have the property kind (base name: "kind")', function() { + // uncomment below and update the code to test the property kind + //var instance = new ArduinoIotClient.ArduinoActionTemplate(); + //expect(instance).to.be(); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new ArduinoIotClient.ArduinoActionTemplate(); + //expect(instance).to.be(); + }); + + it('should have the property organizationId (base name: "organization_id")', function() { + // uncomment below and update the code to test the property organizationId + //var instance = new ArduinoIotClient.ArduinoActionTemplate(); + //expect(instance).to.be(); + }); + + it('should have the property pushNotification (base name: "push_notification")', function() { + // uncomment below and update the code to test the property pushNotification + //var instance = new ArduinoIotClient.ArduinoActionTemplate(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/ArduinoLinkedDevice.spec.js b/test/model/ArduinoLinkedDevice.spec.js new file mode 100644 index 0000000..07fc1e3 --- /dev/null +++ b/test/model/ArduinoLinkedDevice.spec.js @@ -0,0 +1,71 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.ArduinoIotClient); + } +}(this, function(expect, ArduinoIotClient) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new ArduinoIotClient.ArduinoLinkedDevice(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('ArduinoLinkedDevice', function() { + it('should create an instance of ArduinoLinkedDevice', function() { + // uncomment below and update the code to test ArduinoLinkedDevice + //var instance = new ArduinoIotClient.ArduinoLinkedDevice(); + //expect(instance).to.be.a(ArduinoIotClient.ArduinoLinkedDevice); + }); + + it('should have the property device (base name: "device")', function() { + // uncomment below and update the code to test the property device + //var instance = new ArduinoIotClient.ArduinoLinkedDevice(); + //expect(instance).to.be(); + }); + + it('should have the property status (base name: "status")', function() { + // uncomment below and update the code to test the property status + //var instance = new ArduinoIotClient.ArduinoLinkedDevice(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/ArduinoLinkedDeviceTemplate.spec.js b/test/model/ArduinoLinkedDeviceTemplate.spec.js new file mode 100644 index 0000000..73a2485 --- /dev/null +++ b/test/model/ArduinoLinkedDeviceTemplate.spec.js @@ -0,0 +1,65 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.ArduinoIotClient); + } +}(this, function(expect, ArduinoIotClient) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new ArduinoIotClient.ArduinoLinkedDeviceTemplate(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('ArduinoLinkedDeviceTemplate', function() { + it('should create an instance of ArduinoLinkedDeviceTemplate', function() { + // uncomment below and update the code to test ArduinoLinkedDeviceTemplate + //var instance = new ArduinoIotClient.ArduinoLinkedDeviceTemplate(); + //expect(instance).to.be.a(ArduinoIotClient.ArduinoLinkedDeviceTemplate); + }); + + it('should have the property thingId (base name: "thing_id")', function() { + // uncomment below and update the code to test the property thingId + //var instance = new ArduinoIotClient.ArduinoLinkedDeviceTemplate(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/ArduinoLinkedProperty.spec.js b/test/model/ArduinoLinkedProperty.spec.js new file mode 100644 index 0000000..fca8c77 --- /dev/null +++ b/test/model/ArduinoLinkedProperty.spec.js @@ -0,0 +1,71 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.ArduinoIotClient); + } +}(this, function(expect, ArduinoIotClient) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new ArduinoIotClient.ArduinoLinkedProperty(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('ArduinoLinkedProperty', function() { + it('should create an instance of ArduinoLinkedProperty', function() { + // uncomment below and update the code to test ArduinoLinkedProperty + //var instance = new ArduinoIotClient.ArduinoLinkedProperty(); + //expect(instance).to.be.a(ArduinoIotClient.ArduinoLinkedProperty); + }); + + it('should have the property property (base name: "property")', function() { + // uncomment below and update the code to test the property property + //var instance = new ArduinoIotClient.ArduinoLinkedProperty(); + //expect(instance).to.be(); + }); + + it('should have the property status (base name: "status")', function() { + // uncomment below and update the code to test the property status + //var instance = new ArduinoIotClient.ArduinoLinkedProperty(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/ArduinoLinkedPropertyTemplate.spec.js b/test/model/ArduinoLinkedPropertyTemplate.spec.js new file mode 100644 index 0000000..503e1e5 --- /dev/null +++ b/test/model/ArduinoLinkedPropertyTemplate.spec.js @@ -0,0 +1,71 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.ArduinoIotClient); + } +}(this, function(expect, ArduinoIotClient) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new ArduinoIotClient.ArduinoLinkedPropertyTemplate(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('ArduinoLinkedPropertyTemplate', function() { + it('should create an instance of ArduinoLinkedPropertyTemplate', function() { + // uncomment below and update the code to test ArduinoLinkedPropertyTemplate + //var instance = new ArduinoIotClient.ArduinoLinkedPropertyTemplate(); + //expect(instance).to.be.a(ArduinoIotClient.ArduinoLinkedPropertyTemplate); + }); + + it('should have the property propertyId (base name: "property_id")', function() { + // uncomment below and update the code to test the property propertyId + //var instance = new ArduinoIotClient.ArduinoLinkedPropertyTemplate(); + //expect(instance).to.be(); + }); + + it('should have the property thingId (base name: "thing_id")', function() { + // uncomment below and update the code to test the property thingId + //var instance = new ArduinoIotClient.ArduinoLinkedPropertyTemplate(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/ArduinoTrigger.spec.js b/test/model/ArduinoTrigger.spec.js new file mode 100644 index 0000000..03d603f --- /dev/null +++ b/test/model/ArduinoTrigger.spec.js @@ -0,0 +1,131 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.ArduinoIotClient); + } +}(this, function(expect, ArduinoIotClient) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new ArduinoIotClient.ArduinoTrigger(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('ArduinoTrigger', function() { + it('should create an instance of ArduinoTrigger', function() { + // uncomment below and update the code to test ArduinoTrigger + //var instance = new ArduinoIotClient.ArduinoTrigger(); + //expect(instance).to.be.a(ArduinoIotClient.ArduinoTrigger); + }); + + it('should have the property actions (base name: "actions")', function() { + // uncomment below and update the code to test the property actions + //var instance = new ArduinoIotClient.ArduinoTrigger(); + //expect(instance).to.be(); + }); + + it('should have the property active (base name: "active")', function() { + // uncomment below and update the code to test the property active + //var instance = new ArduinoIotClient.ArduinoTrigger(); + //expect(instance).to.be(); + }); + + it('should have the property createdAt (base name: "created_at")', function() { + // uncomment below and update the code to test the property createdAt + //var instance = new ArduinoIotClient.ArduinoTrigger(); + //expect(instance).to.be(); + }); + + it('should have the property createdBy (base name: "created_by")', function() { + // uncomment below and update the code to test the property createdBy + //var instance = new ArduinoIotClient.ArduinoTrigger(); + //expect(instance).to.be(); + }); + + it('should have the property deletedAt (base name: "deleted_at")', function() { + // uncomment below and update the code to test the property deletedAt + //var instance = new ArduinoIotClient.ArduinoTrigger(); + //expect(instance).to.be(); + }); + + it('should have the property description (base name: "description")', function() { + // uncomment below and update the code to test the property description + //var instance = new ArduinoIotClient.ArduinoTrigger(); + //expect(instance).to.be(); + }); + + it('should have the property deviceStatusSource (base name: "device_status_source")', function() { + // uncomment below and update the code to test the property deviceStatusSource + //var instance = new ArduinoIotClient.ArduinoTrigger(); + //expect(instance).to.be(); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new ArduinoIotClient.ArduinoTrigger(); + //expect(instance).to.be(); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new ArduinoIotClient.ArduinoTrigger(); + //expect(instance).to.be(); + }); + + it('should have the property organizationId (base name: "organization_id")', function() { + // uncomment below and update the code to test the property organizationId + //var instance = new ArduinoIotClient.ArduinoTrigger(); + //expect(instance).to.be(); + }); + + it('should have the property propertyId (base name: "property_id")', function() { + // uncomment below and update the code to test the property propertyId + //var instance = new ArduinoIotClient.ArduinoTrigger(); + //expect(instance).to.be(); + }); + + it('should have the property updatedAt (base name: "updated_at")', function() { + // uncomment below and update the code to test the property updatedAt + //var instance = new ArduinoIotClient.ArduinoTrigger(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/ArduinoTriggerTemplate.spec.js b/test/model/ArduinoTriggerTemplate.spec.js new file mode 100644 index 0000000..7689bad --- /dev/null +++ b/test/model/ArduinoTriggerTemplate.spec.js @@ -0,0 +1,125 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.ArduinoIotClient); + } +}(this, function(expect, ArduinoIotClient) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new ArduinoIotClient.ArduinoTriggerTemplate(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('ArduinoTriggerTemplate', function() { + it('should create an instance of ArduinoTriggerTemplate', function() { + // uncomment below and update the code to test ArduinoTriggerTemplate + //var instance = new ArduinoIotClient.ArduinoTriggerTemplate(); + //expect(instance).to.be.a(ArduinoIotClient.ArduinoTriggerTemplate); + }); + + it('should have the property actions (base name: "actions")', function() { + // uncomment below and update the code to test the property actions + //var instance = new ArduinoIotClient.ArduinoTriggerTemplate(); + //expect(instance).to.be(); + }); + + it('should have the property active (base name: "active")', function() { + // uncomment below and update the code to test the property active + //var instance = new ArduinoIotClient.ArduinoTriggerTemplate(); + //expect(instance).to.be(); + }); + + it('should have the property criteria (base name: "criteria")', function() { + // uncomment below and update the code to test the property criteria + //var instance = new ArduinoIotClient.ArduinoTriggerTemplate(); + //expect(instance).to.be(); + }); + + it('should have the property description (base name: "description")', function() { + // uncomment below and update the code to test the property description + //var instance = new ArduinoIotClient.ArduinoTriggerTemplate(); + //expect(instance).to.be(); + }); + + it('should have the property gracePeriodOffline (base name: "grace_period_offline")', function() { + // uncomment below and update the code to test the property gracePeriodOffline + //var instance = new ArduinoIotClient.ArduinoTriggerTemplate(); + //expect(instance).to.be(); + }); + + it('should have the property gracePeriodOnline (base name: "grace_period_online")', function() { + // uncomment below and update the code to test the property gracePeriodOnline + //var instance = new ArduinoIotClient.ArduinoTriggerTemplate(); + //expect(instance).to.be(); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new ArduinoIotClient.ArduinoTriggerTemplate(); + //expect(instance).to.be(); + }); + + it('should have the property linkedDevices (base name: "linked_devices")', function() { + // uncomment below and update the code to test the property linkedDevices + //var instance = new ArduinoIotClient.ArduinoTriggerTemplate(); + //expect(instance).to.be(); + }); + + it('should have the property linkedProperty (base name: "linked_property")', function() { + // uncomment below and update the code to test the property linkedProperty + //var instance = new ArduinoIotClient.ArduinoTriggerTemplate(); + //expect(instance).to.be(); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new ArduinoIotClient.ArduinoTriggerTemplate(); + //expect(instance).to.be(); + }); + + it('should have the property organizationId (base name: "organization_id")', function() { + // uncomment below and update the code to test the property organizationId + //var instance = new ArduinoIotClient.ArduinoTriggerTemplate(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/ArduinoTriggerWithLinkedEntities.spec.js b/test/model/ArduinoTriggerWithLinkedEntities.spec.js new file mode 100644 index 0000000..3466be8 --- /dev/null +++ b/test/model/ArduinoTriggerWithLinkedEntities.spec.js @@ -0,0 +1,113 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.ArduinoIotClient); + } +}(this, function(expect, ArduinoIotClient) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new ArduinoIotClient.ArduinoTriggerWithLinkedEntities(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('ArduinoTriggerWithLinkedEntities', function() { + it('should create an instance of ArduinoTriggerWithLinkedEntities', function() { + // uncomment below and update the code to test ArduinoTriggerWithLinkedEntities + //var instance = new ArduinoIotClient.ArduinoTriggerWithLinkedEntities(); + //expect(instance).to.be.a(ArduinoIotClient.ArduinoTriggerWithLinkedEntities); + }); + + it('should have the property actions (base name: "actions")', function() { + // uncomment below and update the code to test the property actions + //var instance = new ArduinoIotClient.ArduinoTriggerWithLinkedEntities(); + //expect(instance).to.be(); + }); + + it('should have the property active (base name: "active")', function() { + // uncomment below and update the code to test the property active + //var instance = new ArduinoIotClient.ArduinoTriggerWithLinkedEntities(); + //expect(instance).to.be(); + }); + + it('should have the property createdBy (base name: "created_by")', function() { + // uncomment below and update the code to test the property createdBy + //var instance = new ArduinoIotClient.ArduinoTriggerWithLinkedEntities(); + //expect(instance).to.be(); + }); + + it('should have the property description (base name: "description")', function() { + // uncomment below and update the code to test the property description + //var instance = new ArduinoIotClient.ArduinoTriggerWithLinkedEntities(); + //expect(instance).to.be(); + }); + + it('should have the property deviceStatusSource (base name: "device_status_source")', function() { + // uncomment below and update the code to test the property deviceStatusSource + //var instance = new ArduinoIotClient.ArduinoTriggerWithLinkedEntities(); + //expect(instance).to.be(); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new ArduinoIotClient.ArduinoTriggerWithLinkedEntities(); + //expect(instance).to.be(); + }); + + it('should have the property linkedProperty (base name: "linked_property")', function() { + // uncomment below and update the code to test the property linkedProperty + //var instance = new ArduinoIotClient.ArduinoTriggerWithLinkedEntities(); + //expect(instance).to.be(); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new ArduinoIotClient.ArduinoTriggerWithLinkedEntities(); + //expect(instance).to.be(); + }); + + it('should have the property organizationId (base name: "organization_id")', function() { + // uncomment below and update the code to test the property organizationId + //var instance = new ArduinoIotClient.ArduinoTriggerWithLinkedEntities(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/BodyExpression.spec.js b/test/model/BodyExpression.spec.js new file mode 100644 index 0000000..af1fa23 --- /dev/null +++ b/test/model/BodyExpression.spec.js @@ -0,0 +1,71 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.ArduinoIotClient); + } +}(this, function(expect, ArduinoIotClient) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new ArduinoIotClient.BodyExpression(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('BodyExpression', function() { + it('should create an instance of BodyExpression', function() { + // uncomment below and update the code to test BodyExpression + //var instance = new ArduinoIotClient.BodyExpression(); + //expect(instance).to.be.a(ArduinoIotClient.BodyExpression); + }); + + it('should have the property expression (base name: "expression")', function() { + // uncomment below and update the code to test the property expression + //var instance = new ArduinoIotClient.BodyExpression(); + //expect(instance).to.be(); + }); + + it('should have the property variables (base name: "variables")', function() { + // uncomment below and update the code to test the property variables + //var instance = new ArduinoIotClient.BodyExpression(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/CreateAction.spec.js b/test/model/CreateAction.spec.js new file mode 100644 index 0000000..44fac18 --- /dev/null +++ b/test/model/CreateAction.spec.js @@ -0,0 +1,101 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.ArduinoIotClient); + } +}(this, function(expect, ArduinoIotClient) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new ArduinoIotClient.CreateAction(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('CreateAction', function() { + it('should create an instance of CreateAction', function() { + // uncomment below and update the code to test CreateAction + //var instance = new ArduinoIotClient.CreateAction(); + //expect(instance).to.be.a(ArduinoIotClient.CreateAction); + }); + + it('should have the property description (base name: "description")', function() { + // uncomment below and update the code to test the property description + //var instance = new ArduinoIotClient.CreateAction(); + //expect(instance).to.be(); + }); + + it('should have the property email (base name: "email")', function() { + // uncomment below and update the code to test the property email + //var instance = new ArduinoIotClient.CreateAction(); + //expect(instance).to.be(); + }); + + it('should have the property kind (base name: "kind")', function() { + // uncomment below and update the code to test the property kind + //var instance = new ArduinoIotClient.CreateAction(); + //expect(instance).to.be(); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new ArduinoIotClient.CreateAction(); + //expect(instance).to.be(); + }); + + it('should have the property organizationId (base name: "organization_id")', function() { + // uncomment below and update the code to test the property organizationId + //var instance = new ArduinoIotClient.CreateAction(); + //expect(instance).to.be(); + }); + + it('should have the property pushNotification (base name: "push_notification")', function() { + // uncomment below and update the code to test the property pushNotification + //var instance = new ArduinoIotClient.CreateAction(); + //expect(instance).to.be(); + }); + + it('should have the property triggerId (base name: "trigger_id")', function() { + // uncomment below and update the code to test the property triggerId + //var instance = new ArduinoIotClient.CreateAction(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/DeviceStatusSource.spec.js b/test/model/DeviceStatusSource.spec.js new file mode 100644 index 0000000..3c635dd --- /dev/null +++ b/test/model/DeviceStatusSource.spec.js @@ -0,0 +1,83 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.ArduinoIotClient); + } +}(this, function(expect, ArduinoIotClient) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new ArduinoIotClient.DeviceStatusSource(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('DeviceStatusSource', function() { + it('should create an instance of DeviceStatusSource', function() { + // uncomment below and update the code to test DeviceStatusSource + //var instance = new ArduinoIotClient.DeviceStatusSource(); + //expect(instance).to.be.a(ArduinoIotClient.DeviceStatusSource); + }); + + it('should have the property criteria (base name: "criteria")', function() { + // uncomment below and update the code to test the property criteria + //var instance = new ArduinoIotClient.DeviceStatusSource(); + //expect(instance).to.be(); + }); + + it('should have the property deviceIds (base name: "device_ids")', function() { + // uncomment below and update the code to test the property deviceIds + //var instance = new ArduinoIotClient.DeviceStatusSource(); + //expect(instance).to.be(); + }); + + it('should have the property gracePeriodOffline (base name: "grace_period_offline")', function() { + // uncomment below and update the code to test the property gracePeriodOffline + //var instance = new ArduinoIotClient.DeviceStatusSource(); + //expect(instance).to.be(); + }); + + it('should have the property gracePeriodOnline (base name: "grace_period_online")', function() { + // uncomment below and update the code to test the property gracePeriodOnline + //var instance = new ArduinoIotClient.DeviceStatusSource(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/DeviceStatusSourceWithLinkedDevices.spec.js b/test/model/DeviceStatusSourceWithLinkedDevices.spec.js new file mode 100644 index 0000000..efd67db --- /dev/null +++ b/test/model/DeviceStatusSourceWithLinkedDevices.spec.js @@ -0,0 +1,83 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.ArduinoIotClient); + } +}(this, function(expect, ArduinoIotClient) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new ArduinoIotClient.DeviceStatusSourceWithLinkedDevices(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('DeviceStatusSourceWithLinkedDevices', function() { + it('should create an instance of DeviceStatusSourceWithLinkedDevices', function() { + // uncomment below and update the code to test DeviceStatusSourceWithLinkedDevices + //var instance = new ArduinoIotClient.DeviceStatusSourceWithLinkedDevices(); + //expect(instance).to.be.a(ArduinoIotClient.DeviceStatusSourceWithLinkedDevices); + }); + + it('should have the property criteria (base name: "criteria")', function() { + // uncomment below and update the code to test the property criteria + //var instance = new ArduinoIotClient.DeviceStatusSourceWithLinkedDevices(); + //expect(instance).to.be(); + }); + + it('should have the property gracePeriodOffline (base name: "grace_period_offline")', function() { + // uncomment below and update the code to test the property gracePeriodOffline + //var instance = new ArduinoIotClient.DeviceStatusSourceWithLinkedDevices(); + //expect(instance).to.be(); + }); + + it('should have the property gracePeriodOnline (base name: "grace_period_online")', function() { + // uncomment below and update the code to test the property gracePeriodOnline + //var instance = new ArduinoIotClient.DeviceStatusSourceWithLinkedDevices(); + //expect(instance).to.be(); + }); + + it('should have the property linkedDevices (base name: "linked_devices")', function() { + // uncomment below and update the code to test the property linkedDevices + //var instance = new ArduinoIotClient.DeviceStatusSourceWithLinkedDevices(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/EmailAction.spec.js b/test/model/EmailAction.spec.js new file mode 100644 index 0000000..4b23a1e --- /dev/null +++ b/test/model/EmailAction.spec.js @@ -0,0 +1,77 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.ArduinoIotClient); + } +}(this, function(expect, ArduinoIotClient) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new ArduinoIotClient.EmailAction(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('EmailAction', function() { + it('should create an instance of EmailAction', function() { + // uncomment below and update the code to test EmailAction + //var instance = new ArduinoIotClient.EmailAction(); + //expect(instance).to.be.a(ArduinoIotClient.EmailAction); + }); + + it('should have the property body (base name: "body")', function() { + // uncomment below and update the code to test the property body + //var instance = new ArduinoIotClient.EmailAction(); + //expect(instance).to.be(); + }); + + it('should have the property delivery (base name: "delivery")', function() { + // uncomment below and update the code to test the property delivery + //var instance = new ArduinoIotClient.EmailAction(); + //expect(instance).to.be(); + }); + + it('should have the property subject (base name: "subject")', function() { + // uncomment below and update the code to test the property subject + //var instance = new ArduinoIotClient.EmailAction(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/EmailDeliveryOpts.spec.js b/test/model/EmailDeliveryOpts.spec.js new file mode 100644 index 0000000..5e7e12e --- /dev/null +++ b/test/model/EmailDeliveryOpts.spec.js @@ -0,0 +1,77 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.ArduinoIotClient); + } +}(this, function(expect, ArduinoIotClient) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new ArduinoIotClient.EmailDeliveryOpts(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('EmailDeliveryOpts', function() { + it('should create an instance of EmailDeliveryOpts', function() { + // uncomment below and update the code to test EmailDeliveryOpts + //var instance = new ArduinoIotClient.EmailDeliveryOpts(); + //expect(instance).to.be.a(ArduinoIotClient.EmailDeliveryOpts); + }); + + it('should have the property bcc (base name: "bcc")', function() { + // uncomment below and update the code to test the property bcc + //var instance = new ArduinoIotClient.EmailDeliveryOpts(); + //expect(instance).to.be(); + }); + + it('should have the property cc (base name: "cc")', function() { + // uncomment below and update the code to test the property cc + //var instance = new ArduinoIotClient.EmailDeliveryOpts(); + //expect(instance).to.be(); + }); + + it('should have the property to (base name: "to")', function() { + // uncomment below and update the code to test the property to + //var instance = new ArduinoIotClient.EmailDeliveryOpts(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/PushAction.spec.js b/test/model/PushAction.spec.js new file mode 100644 index 0000000..4ee6587 --- /dev/null +++ b/test/model/PushAction.spec.js @@ -0,0 +1,77 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.ArduinoIotClient); + } +}(this, function(expect, ArduinoIotClient) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new ArduinoIotClient.PushAction(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('PushAction', function() { + it('should create an instance of PushAction', function() { + // uncomment below and update the code to test PushAction + //var instance = new ArduinoIotClient.PushAction(); + //expect(instance).to.be.a(ArduinoIotClient.PushAction); + }); + + it('should have the property body (base name: "body")', function() { + // uncomment below and update the code to test the property body + //var instance = new ArduinoIotClient.PushAction(); + //expect(instance).to.be(); + }); + + it('should have the property delivery (base name: "delivery")', function() { + // uncomment below and update the code to test the property delivery + //var instance = new ArduinoIotClient.PushAction(); + //expect(instance).to.be(); + }); + + it('should have the property title (base name: "title")', function() { + // uncomment below and update the code to test the property title + //var instance = new ArduinoIotClient.PushAction(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/PushDeliveryOpts.spec.js b/test/model/PushDeliveryOpts.spec.js new file mode 100644 index 0000000..c9bd6b3 --- /dev/null +++ b/test/model/PushDeliveryOpts.spec.js @@ -0,0 +1,65 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.ArduinoIotClient); + } +}(this, function(expect, ArduinoIotClient) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new ArduinoIotClient.PushDeliveryOpts(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('PushDeliveryOpts', function() { + it('should create an instance of PushDeliveryOpts', function() { + // uncomment below and update the code to test PushDeliveryOpts + //var instance = new ArduinoIotClient.PushDeliveryOpts(); + //expect(instance).to.be.a(ArduinoIotClient.PushDeliveryOpts); + }); + + it('should have the property to (base name: "to")', function() { + // uncomment below and update the code to test the property to + //var instance = new ArduinoIotClient.PushDeliveryOpts(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/TitleExpression.spec.js b/test/model/TitleExpression.spec.js new file mode 100644 index 0000000..aed383a --- /dev/null +++ b/test/model/TitleExpression.spec.js @@ -0,0 +1,71 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.ArduinoIotClient); + } +}(this, function(expect, ArduinoIotClient) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new ArduinoIotClient.TitleExpression(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('TitleExpression', function() { + it('should create an instance of TitleExpression', function() { + // uncomment below and update the code to test TitleExpression + //var instance = new ArduinoIotClient.TitleExpression(); + //expect(instance).to.be.a(ArduinoIotClient.TitleExpression); + }); + + it('should have the property expression (base name: "expression")', function() { + // uncomment below and update the code to test the property expression + //var instance = new ArduinoIotClient.TitleExpression(); + //expect(instance).to.be(); + }); + + it('should have the property variables (base name: "variables")', function() { + // uncomment below and update the code to test the property variables + //var instance = new ArduinoIotClient.TitleExpression(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/Trigger.spec.js b/test/model/Trigger.spec.js new file mode 100644 index 0000000..6588b7e --- /dev/null +++ b/test/model/Trigger.spec.js @@ -0,0 +1,107 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.ArduinoIotClient); + } +}(this, function(expect, ArduinoIotClient) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new ArduinoIotClient.Trigger(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('Trigger', function() { + it('should create an instance of Trigger', function() { + // uncomment below and update the code to test Trigger + //var instance = new ArduinoIotClient.Trigger(); + //expect(instance).to.be.a(ArduinoIotClient.Trigger); + }); + + it('should have the property actions (base name: "actions")', function() { + // uncomment below and update the code to test the property actions + //var instance = new ArduinoIotClient.Trigger(); + //expect(instance).to.be(); + }); + + it('should have the property active (base name: "active")', function() { + // uncomment below and update the code to test the property active + //var instance = new ArduinoIotClient.Trigger(); + //expect(instance).to.be(); + }); + + it('should have the property description (base name: "description")', function() { + // uncomment below and update the code to test the property description + //var instance = new ArduinoIotClient.Trigger(); + //expect(instance).to.be(); + }); + + it('should have the property deviceStatusSource (base name: "device_status_source")', function() { + // uncomment below and update the code to test the property deviceStatusSource + //var instance = new ArduinoIotClient.Trigger(); + //expect(instance).to.be(); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new ArduinoIotClient.Trigger(); + //expect(instance).to.be(); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new ArduinoIotClient.Trigger(); + //expect(instance).to.be(); + }); + + it('should have the property propertyId (base name: "property_id")', function() { + // uncomment below and update the code to test the property propertyId + //var instance = new ArduinoIotClient.Trigger(); + //expect(instance).to.be(); + }); + + it('should have the property softDeleted (base name: "soft_deleted")', function() { + // uncomment below and update the code to test the property softDeleted + //var instance = new ArduinoIotClient.Trigger(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/UpdateAction.spec.js b/test/model/UpdateAction.spec.js new file mode 100644 index 0000000..21b628d --- /dev/null +++ b/test/model/UpdateAction.spec.js @@ -0,0 +1,89 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.ArduinoIotClient); + } +}(this, function(expect, ArduinoIotClient) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new ArduinoIotClient.UpdateAction(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('UpdateAction', function() { + it('should create an instance of UpdateAction', function() { + // uncomment below and update the code to test UpdateAction + //var instance = new ArduinoIotClient.UpdateAction(); + //expect(instance).to.be.a(ArduinoIotClient.UpdateAction); + }); + + it('should have the property description (base name: "description")', function() { + // uncomment below and update the code to test the property description + //var instance = new ArduinoIotClient.UpdateAction(); + //expect(instance).to.be(); + }); + + it('should have the property email (base name: "email")', function() { + // uncomment below and update the code to test the property email + //var instance = new ArduinoIotClient.UpdateAction(); + //expect(instance).to.be(); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new ArduinoIotClient.UpdateAction(); + //expect(instance).to.be(); + }); + + it('should have the property pushNotification (base name: "push_notification")', function() { + // uncomment below and update the code to test the property pushNotification + //var instance = new ArduinoIotClient.UpdateAction(); + //expect(instance).to.be(); + }); + + it('should have the property triggerId (base name: "trigger_id")', function() { + // uncomment below and update the code to test the property triggerId + //var instance = new ArduinoIotClient.UpdateAction(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/UserRecipient.spec.js b/test/model/UserRecipient.spec.js new file mode 100644 index 0000000..253ff4b --- /dev/null +++ b/test/model/UserRecipient.spec.js @@ -0,0 +1,77 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.ArduinoIotClient); + } +}(this, function(expect, ArduinoIotClient) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new ArduinoIotClient.UserRecipient(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('UserRecipient', function() { + it('should create an instance of UserRecipient', function() { + // uncomment below and update the code to test UserRecipient + //var instance = new ArduinoIotClient.UserRecipient(); + //expect(instance).to.be.a(ArduinoIotClient.UserRecipient); + }); + + it('should have the property email (base name: "email")', function() { + // uncomment below and update the code to test the property email + //var instance = new ArduinoIotClient.UserRecipient(); + //expect(instance).to.be(); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new ArduinoIotClient.UserRecipient(); + //expect(instance).to.be(); + }); + + it('should have the property username (base name: "username")', function() { + // uncomment below and update the code to test the property username + //var instance = new ArduinoIotClient.UserRecipient(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/Variable.spec.js b/test/model/Variable.spec.js new file mode 100644 index 0000000..ae04fb3 --- /dev/null +++ b/test/model/Variable.spec.js @@ -0,0 +1,95 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.ArduinoIotClient); + } +}(this, function(expect, ArduinoIotClient) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new ArduinoIotClient.Variable(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('Variable', function() { + it('should create an instance of Variable', function() { + // uncomment below and update the code to test Variable + //var instance = new ArduinoIotClient.Variable(); + //expect(instance).to.be.a(ArduinoIotClient.Variable); + }); + + it('should have the property attribute (base name: "attribute")', function() { + // uncomment below and update the code to test the property attribute + //var instance = new ArduinoIotClient.Variable(); + //expect(instance).to.be(); + }); + + it('should have the property entity (base name: "entity")', function() { + // uncomment below and update the code to test the property entity + //var instance = new ArduinoIotClient.Variable(); + //expect(instance).to.be(); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new ArduinoIotClient.Variable(); + //expect(instance).to.be(); + }); + + it('should have the property placeholder (base name: "placeholder")', function() { + // uncomment below and update the code to test the property placeholder + //var instance = new ArduinoIotClient.Variable(); + //expect(instance).to.be(); + }); + + it('should have the property propertyId (base name: "property_id")', function() { + // uncomment below and update the code to test the property propertyId + //var instance = new ArduinoIotClient.Variable(); + //expect(instance).to.be(); + }); + + it('should have the property thingId (base name: "thing_id")', function() { + // uncomment below and update the code to test the property thingId + //var instance = new ArduinoIotClient.Variable(); + //expect(instance).to.be(); + }); + + }); + +}));