npm package: @p7m/alarm-backend
Description: ## API for generating and tracking alarms  This is the API of what P7M mainly uses within the Telfas service.
Latest version: 0.3.0

# @p7m/alarm-backend

AlarmBackend - JavaScript client for @p7m/alarm-backend
## API for generating and tracking alarms

This is the API of what P7M mainly uses within the Telfas service.
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 0.3.0
- Package version: 0.3.0
- Generator version: 7.13.0-SNAPSHOT
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

## Installation

### For [Node.js](https://nodejs.org/)

#### npm

To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).

Then install it via:

```shell
npm install @p7m/alarm-backend --save
```

Finally, you need to build the module:

```shell
npm run build
```

##### Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run:

```shell
npm install
```

Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:

```shell
npm link
```

To use the link you just defined in your project, switch to the directory you want to use your @p7m/alarm-backend from, and run:

```shell
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
```

Finally, you need to build the module:

```shell
npm run build
```

#### git

If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID
then install it via:

```shell
    npm install GIT_USER_ID/GIT_REPO_ID --save
```

### For browser

The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following
the above steps with Node.js and installing browserify with `npm install -g browserify`,
perform the following (assuming *main.js* is your entry file):

```shell
browserify main.js > bundle.js
```

Then include *bundle.js* in the HTML pages.

### Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error:
Cannot resolve module", most certainly you should disable AMD loader. Add/merge
the following section to your webpack config:

```javascript
module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}
```

## Getting Started

Please follow the [installation](#installation) instruction and execute the following JS code:

```javascript
var AlarmBackend = require('@p7m/alarm-backend');

var defaultClient = AlarmBackend.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth
var oauth = defaultClient.authentications['oauth'];
oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new AlarmBackend.AlarmApi()
var alarmId = "alarmId_example"; // {String} ID of the alarm
api.deleteAlarmsId(alarmId).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});


```

## Documentation for API Endpoints

All URIs are relative to *https://alarm.api.p7m.de/v1*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AlarmBackend.AlarmApi* | [**deleteAlarmsId**](docs/AlarmApi.md#deleteAlarmsId) | **DELETE** /alarms/{alarm_id} | Delete an alarm by its ID
*AlarmBackend.AlarmApi* | [**deleteAlarmsRecipientsId**](docs/AlarmApi.md#deleteAlarmsRecipientsId) | **DELETE** /alarms/{alarm_id}/recipients/{alarm_recipient_id} | Delete a single alarm recipient by its ID
*AlarmBackend.AlarmApi* | [**getAlarms**](docs/AlarmApi.md#getAlarms) | **GET** /alarms | Get a list of all alarms
*AlarmBackend.AlarmApi* | [**getAlarmsId**](docs/AlarmApi.md#getAlarmsId) | **GET** /alarms/{alarm_id} | Get a single alarm by its ID
*AlarmBackend.AlarmApi* | [**getAlarmsRecipients**](docs/AlarmApi.md#getAlarmsRecipients) | **GET** /alarms/{alarm_id}/recipients | Get the list of receipients of an alarm
*AlarmBackend.AlarmApi* | [**getAlarmsRecipientsId**](docs/AlarmApi.md#getAlarmsRecipientsId) | **GET** /alarms/{alarm_id}/recipients/{alarm_recipient_id} | Get a single recipient of an alarm by its ID
*AlarmBackend.AlarmApi* | [**postAlarm**](docs/AlarmApi.md#postAlarm) | **POST** /alarms | Create a new alarm and by that trigger signalling
*AlarmBackend.AlarmApi* | [**postAlarmRecipients**](docs/AlarmApi.md#postAlarmRecipients) | **POST** /alarms/{alarm_id}/recipients | Add a new recipient to an existing alarm
*AlarmBackend.AlarmApi* | [**putAlarmsId**](docs/AlarmApi.md#putAlarmsId) | **PUT** /alarms/{alarm_id} | Update an existing alarm
*AlarmBackend.AlarmApi* | [**putAlarmsRecipientsId**](docs/AlarmApi.md#putAlarmsRecipientsId) | **PUT** /alarms/{alarm_id}/recipients/{alarm_recipient_id} | Update an existing recipient of an alarm
*AlarmBackend.AlarmTypeApi* | [**deleteAlarmTypes**](docs/AlarmTypeApi.md#deleteAlarmTypes) | **DELETE** /alarmtypes/{id} | Delete a single alarm type by its ID
*AlarmBackend.AlarmTypeApi* | [**getAlarmTypes**](docs/AlarmTypeApi.md#getAlarmTypes) | **GET** /alarmtypes | Get list of all alarm types
*AlarmBackend.AlarmTypeApi* | [**getAlarmTypesId**](docs/AlarmTypeApi.md#getAlarmTypesId) | **GET** /alarmtypes/{id} | Get a single alarm type by its ID
*AlarmBackend.AlarmTypeApi* | [**postAlarmTypes**](docs/AlarmTypeApi.md#postAlarmTypes) | **POST** /alarmtypes | Create a new alarm type
*AlarmBackend.AlarmTypeApi* | [**putAlarmTypes**](docs/AlarmTypeApi.md#putAlarmTypes) | **PUT** /alarmtypes/{id} | Update an existing alarm type
*AlarmBackend.RecipientApi* | [**deleteRecipientsRecipientId**](docs/RecipientApi.md#deleteRecipientsRecipientId) | **DELETE** /recipients/{recipient_id} | Delete a single recipient by its ID
*AlarmBackend.RecipientApi* | [**getRecipients**](docs/RecipientApi.md#getRecipients) | **GET** /recipients | Get the list of all recipients
*AlarmBackend.RecipientApi* | [**getRecipientsRecipientId**](docs/RecipientApi.md#getRecipientsRecipientId) | **GET** /recipients/{recipient_id} | Get a single recipient by its ID
*AlarmBackend.RecipientApi* | [**postRecipients**](docs/RecipientApi.md#postRecipients) | **POST** /recipients | Create a new recipient
*AlarmBackend.RecipientApi* | [**putRecipientsRecipientId**](docs/RecipientApi.md#putRecipientsRecipientId) | **PUT** /recipients/{recipient_id} | Update an existing recipient


## Documentation for Models

 - [AlarmBackend.Alarm](docs/Alarm.md)
 - [AlarmBackend.AlarmConfirmation](docs/AlarmConfirmation.md)
 - [AlarmBackend.AlarmGuidance](docs/AlarmGuidance.md)
 - [AlarmBackend.AlarmMedium](docs/AlarmMedium.md)
 - [AlarmBackend.AlarmRecipient](docs/AlarmRecipient.md)
 - [AlarmBackend.AlarmType](docs/AlarmType.md)
 - [AlarmBackend.ListWrapperAlarm](docs/ListWrapperAlarm.md)
 - [AlarmBackend.ListWrapperAlarmDataInner](docs/ListWrapperAlarmDataInner.md)
 - [AlarmBackend.ListWrapperAlarmRecipient](docs/ListWrapperAlarmRecipient.md)
 - [AlarmBackend.ListWrapperAlarmRecipientDataInner](docs/ListWrapperAlarmRecipientDataInner.md)
 - [AlarmBackend.ListWrapperAlarmType](docs/ListWrapperAlarmType.md)
 - [AlarmBackend.ListWrapperAlarmTypeDataInner](docs/ListWrapperAlarmTypeDataInner.md)
 - [AlarmBackend.ListWrapperRecipient](docs/ListWrapperRecipient.md)
 - [AlarmBackend.ListWrapperRecipientDataInner](docs/ListWrapperRecipientDataInner.md)
 - [AlarmBackend.NewAlarm](docs/NewAlarm.md)
 - [AlarmBackend.NewAlarmRecipient](docs/NewAlarmRecipient.md)
 - [AlarmBackend.NewAlarmType](docs/NewAlarmType.md)
 - [AlarmBackend.NewRecipient](docs/NewRecipient.md)
 - [AlarmBackend.Recipient](docs/Recipient.md)


## Documentation for Authorization


Authentication schemes defined for the API:
### oauth


- **Type**: OAuth
- **Flow**: accessCode
- **Authorization URL**: https://login.p7m.de/auth/authorize
- **Scopes**: N/A