Skip to content

Commit

Permalink
feat: add clone project route and remove edge impulse route (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
paigen11 authored Sep 8, 2023
2 parents 18891b3 + 6f01b66 commit 188d0f3
Show file tree
Hide file tree
Showing 97 changed files with 454 additions and 710 deletions.
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"licenseName": "MIT",
"moduleName": "NotehubJs",
"npmRepository": "https://registry.npmjs.org",
"projectVersion": "1.0.15",
"projectVersion": "1.0.16",
"sourceFolder": "src",
"usePromises": true
}
116 changes: 53 additions & 63 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,58 @@ paths:
returned.
required:
- label
- billing_account_uid
responses:
"201":
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Project'
default:
$ref: '#/components/responses/ErrorResponse'

/v1/projects/{projectUID}/clone:
post:
tags: ["project"]
operationId: cloneProject
description: Clone a Project
security:
- api_key: []
parameters:
- name: projectUID
in: path
required: true
schema:
type: string
description: The project UID to be cloned.
requestBody:
description: Project to be cloned
required: true
content:
application/json:
schema:
type: object
properties:
label:
type: string
description: The label for the project.
billing_account_uid:
type: string
description:
The billing account UID for the project.
The caller of the API must be able to create projects
within the billing account, otherwise an error will be
returned.
disable_clone_routes:
type: boolean
description: Whether to disallow the cloning of the routes from the parent project. Default is false if not specified.
disable_clone_fleets:
type: boolean
description: Whether to disallow the cloning of the fleets from the parent project. Default is false if not specified.
required:
- label
- billing_account_uid
responses:
"201":
description: Successful operation
Expand Down Expand Up @@ -2847,7 +2899,6 @@ components:
type: number
description: Number of triangulation points


DeviceSession:
type: object
properties:
Expand Down Expand Up @@ -3000,7 +3051,7 @@ components:
description: Type of route.
enum: ["http", "proxy", "google-function", "mqtt", "aws-lambda", "aws-lambda-with-access-key", "aws-sqs", "aws-sqs-with-access-key", "aws-sqs-fifo",
"aws-sqs-fifo-with-access-key", "aws-iot-analytics", "radnote-radresp-fixed-survey", "radnote-radresp-mobile-survey", "azure-function",
"azure-function-with-key", "azure-service-bus-with-sas-token", "thingworx", "snowflake", "edgeimpulse"]
"azure-function-with-key", "azure-service-bus-with-sas-token", "thingworx", "snowflake"]
modified:
type: string
description: Last Modified
Expand Down Expand Up @@ -3539,67 +3590,6 @@ components:
throttle_ms:
type: integer

edgeimpulse:
description: Route settings specific to edgeimpulse routes. Only used for edgeimpulse route types
type: object
properties:
fleets:
type: array
items:
type: string
minItems: 0
description: list of Fleet UIDs to apply route to, if any. If empty, applies to all Fleets
filter:
type: object
properties:
type:
type: string
description: What notefiles this route applies to.
enum: ["all", "include", "exclude"]
system_notefiles:
type: boolean
description: Whether system notefiles should be affected by this route
files:
type: array
items:
type: string
description: list of notefiles to filter. For instance, if 'type' is set to "include", will only affect files listed here
minItems: 0
description: Route filtering settings
timeout:
type: integer
default: 15
description: Timeout in seconds for each request
api_key:
type: string
description: EdgeImpulse API Key
filename:
type: string
description: An identifier the collection of data points
device_type:
type: string
description: An identifier for the type of device generating the data
interval_ms:
type: integer
description: Frequency of data in miliseconds
device_name:
type: string
description: An identifier for the device generating the data
label:
type: string
description: A label for the data point
sensors:
type: array
items:
type: object
properties:
name:
type: string
units:
type: string
value:
type: string

EnvironmentVariables:
type: object
properties:
Expand Down
6 changes: 2 additions & 4 deletions src/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ docs/BillingAccount.md
docs/BillingAccountApi.md
docs/BillingAccountRole.md
docs/Body.md
docs/CloneProjectRequest.md
docs/Contact.md
docs/CreateFleetRequest.md
docs/CreateProductRequest.md
Expand All @@ -22,8 +23,6 @@ docs/DeviceSession.md
docs/DeviceTowerInfo.md
docs/DeviceUsage.md
docs/DevicesApi.md
docs/Edgeimpulse.md
docs/EdgeimpulseSensorsInner.md
docs/EnvironmentVariables.md
docs/EnvironmentVariablesApi.md
docs/Error.md
Expand Down Expand Up @@ -108,6 +107,7 @@ src/model/Azure.js
src/model/BillingAccount.js
src/model/BillingAccountRole.js
src/model/Body.js
src/model/CloneProjectRequest.js
src/model/Contact.js
src/model/CreateFleetRequest.js
src/model/CreateProductRequest.js
Expand All @@ -119,8 +119,6 @@ src/model/Device.js
src/model/DeviceSession.js
src/model/DeviceTowerInfo.js
src/model/DeviceUsage.js
src/model/Edgeimpulse.js
src/model/EdgeimpulseSensorsInner.js
src/model/EnvironmentVariables.js
src/model/Error.js
src/model/Event.js
Expand Down
6 changes: 3 additions & 3 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The OpenAPI definition for the Notehub.io API.
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.0.0
- Package version: 1.0.15
- Package version: 1.0.16
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
For more information, please visit [https://dev.blues.io/support/](https://dev.blues.io/support/)

Expand Down Expand Up @@ -186,6 +186,7 @@ All URIs are relative to *https://api.notefile.net*
| _NotehubJs.ProductApi_ | [**createProduct**](docs/ProductApi.md#createProduct) | **POST** /v1/projects/{projectUID}/products |
| _NotehubJs.ProductApi_ | [**getProjectByProduct**](docs/ProductApi.md#getProjectByProduct) | **GET** /v1/products/{productUID}/project |
| _NotehubJs.ProductApi_ | [**getProjectProducts**](docs/ProductApi.md#getProjectProducts) | **GET** /v1/projects/{projectUID}/products |
| _NotehubJs.ProjectApi_ | [**cloneProject**](docs/ProjectApi.md#cloneProject) | **POST** /v1/projects/{projectUID}/clone |
| _NotehubJs.ProjectApi_ | [**createProduct**](docs/ProjectApi.md#createProduct) | **POST** /v1/projects/{projectUID}/products |
| _NotehubJs.ProjectApi_ | [**createProject**](docs/ProjectApi.md#createProject) | **POST** /v1/projects |
| _NotehubJs.ProjectApi_ | [**deleteProjectEnvironmentVariable**](docs/ProjectApi.md#deleteProjectEnvironmentVariable) | **DELETE** /v1/projects/{projectUID}/environment_variables/{key} |
Expand Down Expand Up @@ -219,6 +220,7 @@ All URIs are relative to *https://api.notefile.net*
- [NotehubJs.BillingAccount](docs/BillingAccount.md)
- [NotehubJs.BillingAccountRole](docs/BillingAccountRole.md)
- [NotehubJs.Body](docs/Body.md)
- [NotehubJs.CloneProjectRequest](docs/CloneProjectRequest.md)
- [NotehubJs.Contact](docs/Contact.md)
- [NotehubJs.CreateFleetRequest](docs/CreateFleetRequest.md)
- [NotehubJs.CreateProductRequest](docs/CreateProductRequest.md)
Expand All @@ -230,8 +232,6 @@ All URIs are relative to *https://api.notefile.net*
- [NotehubJs.DeviceSession](docs/DeviceSession.md)
- [NotehubJs.DeviceTowerInfo](docs/DeviceTowerInfo.md)
- [NotehubJs.DeviceUsage](docs/DeviceUsage.md)
- [NotehubJs.Edgeimpulse](docs/Edgeimpulse.md)
- [NotehubJs.EdgeimpulseSensorsInner](docs/EdgeimpulseSensorsInner.md)
- [NotehubJs.EnvironmentVariables](docs/EnvironmentVariables.md)
- [NotehubJs.Error](docs/Error.md)
- [NotehubJs.Event](docs/Event.md)
Expand Down
10 changes: 10 additions & 0 deletions src/docs/CloneProjectRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# NotehubJs.CloneProjectRequest

## Properties

| Name | Type | Description | Notes |
| ---------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
| **label** | **String** | The label for the project. |
| **billingAccountUid** | **String** | The billing account UID for the project. The caller of the API must be able to create projects within the billing account, otherwise an error will be returned. |
| **disableCloneRoutes** | **Boolean** | Whether to disallow the cloning of the routes from the parent project. Default is false if not specified. | [optional] |
| **disableCloneFleets** | **Boolean** | Whether to disallow the cloning of the fleets from the parent project. Default is false if not specified. | [optional] |
6 changes: 3 additions & 3 deletions src/docs/CreateProjectRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Properties

| Name | Type | Description | Notes |
| --------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
| Name | Type | Description | Notes |
| --------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| **label** | **String** | The label for the project. |
| **billingAccountUid** | **String** | The billing account UID for the project. The caller of the API must be able to create projects within the billing account, otherwise an error will be returned. | [optional] |
| **billingAccountUid** | **String** | The billing account UID for the project. The caller of the API must be able to create projects within the billing account, otherwise an error will be returned. |
16 changes: 0 additions & 16 deletions src/docs/Edgeimpulse.md

This file was deleted.

9 changes: 0 additions & 9 deletions src/docs/EdgeimpulseSensorsInner.md

This file was deleted.

51 changes: 51 additions & 0 deletions src/docs/ProjectApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ All URIs are relative to *https://api.notefile.net*

| Method | HTTP request | Description |
| -------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | ----------- |
| [**cloneProject**](ProjectApi.md#cloneProject) | **POST** /v1/projects/{projectUID}/clone |
| [**createProduct**](ProjectApi.md#createProduct) | **POST** /v1/projects/{projectUID}/products |
| [**createProject**](ProjectApi.md#createProject) | **POST** /v1/projects |
| [**deleteProjectEnvironmentVariable**](ProjectApi.md#deleteProjectEnvironmentVariable) | **DELETE** /v1/projects/{projectUID}/environment_variables/{key} |
Expand All @@ -23,6 +24,56 @@ All URIs are relative to *https://api.notefile.net*
| [**putProjectEnvironmentVariables**](ProjectApi.md#putProjectEnvironmentVariables) | **PUT** /v1/projects/{projectUID}/environment_variables |
| [**setGlobalTransformation**](ProjectApi.md#setGlobalTransformation) | **POST** /v1/projects/{projectUID}/global-transformation |

## cloneProject

> Project cloneProject(projectUID, cloneProjectRequest)
Clone a Project

### Example

```javascript
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";

let apiInstance = new NotehubJs.ProjectApi();
let projectUID = "projectUID_example"; // String | The project UID to be cloned.
let cloneProjectRequest = new NotehubJs.CloneProjectRequest(); // CloneProjectRequest | Project to be cloned
apiInstance.cloneProject(projectUID, cloneProjectRequest).then(
(data) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
},
(error) => {
console.error(error);
}
);
```

### Parameters

| Name | Type | Description | Notes |
| ----------------------- | ------------------------------------------------- | ----------------------------- | ----- |
| **projectUID** | **String** | The project UID to be cloned. |
| **cloneProjectRequest** | [**CloneProjectRequest**](CloneProjectRequest.md) | Project to be cloned |

### Return type

[**Project**](Project.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

## createProduct

> Product createProduct(projectUID, createProductRequest)
Expand Down
2 changes: 0 additions & 2 deletions src/docs/Route.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,3 @@
- `thingworx` (value: `"thingworx"`)

- `snowflake` (value: `"snowflake"`)

- `edgeimpulse` (value: `"edgeimpulse"`)
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@blues-inc/notehub-js",
"version": "1.0.15",
"version": "1.0.16",
"description": "The OpenAPI definition for the Notehub.io API. ",
"license": "MIT",
"main": "dist/index.js",
Expand Down
4 changes: 2 additions & 2 deletions src/src/ApiClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import querystring from "querystring";

/**
* @module ApiClient
* @version 1.0.15
* @version 1.0.16
*/

/**
Expand Down Expand Up @@ -55,7 +55,7 @@ class ApiClient {
* @default {}
*/
this.defaultHeaders = {
"User-Agent": "OpenAPI-Generator/1.0.15/Javascript",
"User-Agent": "OpenAPI-Generator/1.0.16/Javascript",
};

/**
Expand Down
2 changes: 1 addition & 1 deletion src/src/api/AuthorizationApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import LoginRequest from "../model/LoginRequest";
/**
* Authorization service.
* @module api/AuthorizationApi
* @version 1.0.15
* @version 1.0.16
*/
export default class AuthorizationApi {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/src/api/BillingAccountApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import GetBillingAccounts200Response from "../model/GetBillingAccounts200Respons
/**
* BillingAccount service.
* @module api/BillingAccountApi
* @version 1.0.15
* @version 1.0.16
*/
export default class BillingAccountApi {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/src/api/DeviceApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import PutDeviceFleetsRequest from "../model/PutDeviceFleetsRequest";
/**
* Device service.
* @module api/DeviceApi
* @version 1.0.15
* @version 1.0.16
*/
export default class DeviceApi {
/**
Expand Down
Loading

0 comments on commit 188d0f3

Please sign in to comment.