Skip to content

Commit

Permalink
feat: Add deleteProject function to library (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
paigen11 authored Dec 5, 2023
2 parents 4867879 + 9dcc863 commit 6212ea8
Show file tree
Hide file tree
Showing 90 changed files with 220 additions and 110 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.18",
"projectVersion": "1.0.19",
"sourceFolder": "src",
"usePromises": true
}
19 changes: 19 additions & 0 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,25 @@ paths:
$ref: '#/components/schemas/Project'
default:
$ref: '#/components/responses/ErrorResponse'
delete:
tags: ["project"]
operationId: deleteProject
description: Delete a Project by ProjectUID
security:
- api_key: []
parameters:
- $ref: '#/components/parameters/projectUIDParam'
- name: db
in: query
required: false
schema:
type: boolean
default: "false"
responses:
"200":
description: Successful operation
default:
$ref: '#/components/responses/ErrorResponse'

/v1/projects/{projectUID}/products:
parameters:
Expand Down
3 changes: 2 additions & 1 deletion 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.18
- Package version: 1.0.19
- 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 @@ -190,6 +190,7 @@ All URIs are relative to *https://api.notefile.net*
| _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_ | [**deleteProject**](docs/ProjectApi.md#deleteProject) | **DELETE** /v1/projects/{projectUID} |
| _NotehubJs.ProjectApi_ | [**deleteProjectEnvironmentVariable**](docs/ProjectApi.md#deleteProjectEnvironmentVariable) | **DELETE** /v1/projects/{projectUID}/environment_variables/{key} |
| _NotehubJs.ProjectApi_ | [**disableGlobalTransformation**](docs/ProjectApi.md#disableGlobalTransformation) | **POST** /v1/projects/{projectUID}/global-transformation/disable |
| _NotehubJs.ProjectApi_ | [**enableGlobalTransformation**](docs/ProjectApi.md#enableGlobalTransformation) | **POST** /v1/projects/{projectUID}/global-transformation/enable |
Expand Down
6 changes: 1 addition & 5 deletions src/docs/EventApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,7 @@ let opts = {
'sortOrder': "'asc'", // String |
'systemFilesOnly': true, // Boolean |
'files': _health.qo, data.qo, // String |
'deviceUID': "deviceUID_example", // String | A Device UID.
'startDate': 1628631763, // Number | Unix timestamp
'endDate': 1657894210 // Number | Unix timestamp
'deviceUID': "deviceUID_example" // String | A Device UID.
};
apiInstance.getProjectEventsByCursor(projectUID, opts).then((data) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
Expand All @@ -249,8 +247,6 @@ apiInstance.getProjectEventsByCursor(projectUID, opts).then((data) => {
| **systemFilesOnly** | **Boolean** | | [optional] |
| **files** | **String** | | [optional] |
| **deviceUID** | **String** | A Device UID. | [optional] |
| **startDate** | **Number** | Unix timestamp | [optional] |
| **endDate** | **Number** | Unix timestamp | [optional] |

### Return type

Expand Down
55 changes: 50 additions & 5 deletions src/docs/ProjectApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All URIs are relative to *https://api.notefile.net*
| [**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 |
| [**deleteProject**](ProjectApi.md#deleteProject) | **DELETE** /v1/projects/{projectUID} |
| [**deleteProjectEnvironmentVariable**](ProjectApi.md#deleteProjectEnvironmentVariable) | **DELETE** /v1/projects/{projectUID}/environment_variables/{key} |
| [**disableGlobalTransformation**](ProjectApi.md#disableGlobalTransformation) | **POST** /v1/projects/{projectUID}/global-transformation/disable |
| [**enableGlobalTransformation**](ProjectApi.md#enableGlobalTransformation) | **POST** /v1/projects/{projectUID}/global-transformation/enable |
Expand Down Expand Up @@ -169,6 +170,54 @@ apiInstance.createProject(createProjectRequest).then(
- **Content-Type**: application/json
- **Accept**: application/json

## deleteProject

> deleteProject(projectUID, opts)
Delete a Project by ProjectUID

### 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 = app:2606f411-dea6-44a0-9743-1130f57d77d8; // String |
let opts = {
'db': false // Boolean |
};
apiInstance.deleteProject(projectUID, opts).then(() => {
console.log('API called successfully.');
}, (error) => {
console.error(error);
});

```

### Parameters

| Name | Type | Description | Notes |
| -------------- | ----------- | ----------- | ----------------------------- |
| **projectUID** | **String** | |
| **db** | **Boolean** | | [optional] [default to false] |

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

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

## deleteProjectEnvironmentVariable

> EnvironmentVariables deleteProjectEnvironmentVariable(projectUID, key)
Expand Down Expand Up @@ -626,9 +675,7 @@ let opts = {
'sortOrder': "'asc'", // String |
'systemFilesOnly': true, // Boolean |
'files': _health.qo, data.qo, // String |
'deviceUID': "deviceUID_example", // String | A Device UID.
'startDate': 1628631763, // Number | Unix timestamp
'endDate': 1657894210 // Number | Unix timestamp
'deviceUID': "deviceUID_example" // String | A Device UID.
};
apiInstance.getProjectEventsByCursor(projectUID, opts).then((data) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
Expand All @@ -649,8 +696,6 @@ apiInstance.getProjectEventsByCursor(projectUID, opts).then((data) => {
| **systemFilesOnly** | **Boolean** | | [optional] |
| **files** | **String** | | [optional] |
| **deviceUID** | **String** | A Device UID. | [optional] |
| **startDate** | **Number** | Unix timestamp | [optional] |
| **endDate** | **Number** | Unix timestamp | [optional] |

### Return type

Expand Down
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.18",
"version": "1.0.19",
"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.18
* @version 1.0.19
*/

/**
Expand Down Expand Up @@ -55,7 +55,7 @@ class ApiClient {
* @default {}
*/
this.defaultHeaders = {
"User-Agent": "OpenAPI-Generator/1.0.18/Javascript",
"User-Agent": "OpenAPI-Generator/1.0.19/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.18
* @version 1.0.19
*/
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.18
* @version 1.0.19
*/
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.18
* @version 1.0.19
*/
export default class DeviceApi {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/src/api/DevicesApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import PostProvisionProjectDeviceRequest from "../model/PostProvisionProjectDevi
/**
* Devices service.
* @module api/DevicesApi
* @version 1.0.18
* @version 1.0.19
*/
export default class DevicesApi {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/src/api/EnvironmentVariablesApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import GetDeviceEnvironmentVariables200Response from "../model/GetDeviceEnvironm
/**
* EnvironmentVariables service.
* @module api/EnvironmentVariablesApi
* @version 1.0.18
* @version 1.0.19
*/
export default class EnvironmentVariablesApi {
/**
Expand Down
8 changes: 1 addition & 7 deletions src/src/api/EventApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import GetProjectEventsByCursor200Response from "../model/GetProjectEventsByCurs
/**
* Event service.
* @module api/EventApi
* @version 1.0.18
* @version 1.0.19
*/
export default class EventApi {
/**
Expand Down Expand Up @@ -315,8 +315,6 @@ export default class EventApi {
* @param {Boolean} opts.systemFilesOnly
* @param {String} opts.files
* @param {String} opts.deviceUID A Device UID.
* @param {Number} opts.startDate Unix timestamp
* @param {Number} opts.endDate Unix timestamp
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetProjectEventsByCursor200Response} and HTTP response
*/
getProjectEventsByCursorWithHttpInfo(projectUID, opts) {
Expand All @@ -339,8 +337,6 @@ export default class EventApi {
systemFilesOnly: opts["systemFilesOnly"],
files: opts["files"],
deviceUID: opts["deviceUID"],
startDate: opts["startDate"],
endDate: opts["endDate"],
};
let headerParams = {};
let formParams = {};
Expand Down Expand Up @@ -375,8 +371,6 @@ export default class EventApi {
* @param {Boolean} opts.systemFilesOnly
* @param {String} opts.files
* @param {String} opts.deviceUID A Device UID.
* @param {Number} opts.startDate Unix timestamp
* @param {Number} opts.endDate Unix timestamp
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetProjectEventsByCursor200Response}
*/
getProjectEventsByCursor(projectUID, opts) {
Expand Down
2 changes: 1 addition & 1 deletion src/src/api/FilesApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import HandleNotefileDeleteRequest from "../model/HandleNotefileDeleteRequest";
/**
* Files service.
* @module api/FilesApi
* @version 1.0.18
* @version 1.0.19
*/
export default class FilesApi {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/src/api/FleetApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import UpdateFleetRequest from "../model/UpdateFleetRequest";
/**
* Fleet service.
* @module api/FleetApi
* @version 1.0.18
* @version 1.0.19
*/
export default class FleetApi {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/src/api/NotesApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import Note from "../model/Note";
/**
* Notes service.
* @module api/NotesApi
* @version 1.0.18
* @version 1.0.19
*/
export default class NotesApi {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/src/api/ProductApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import Project from "../model/Project";
/**
* Product service.
* @module api/ProductApi
* @version 1.0.18
* @version 1.0.19
*/
export default class ProductApi {
/**
Expand Down
Loading

0 comments on commit 6212ea8

Please sign in to comment.