Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some final adjustments: #6

Merged
merged 1 commit into from
Jan 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ docs/
node_modules/
jest.config.js
tsconfig.json
.eslintrc.json
.eslintrc.json
.prettierrc.json
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Furthermore, events can be even stored in Alert Notification storage and pulled
### Installation

```bash
$ npm i alert-notification-client
$ npm i @sap_oss/alert-notification-client
```

## Getting Started
Expand All @@ -37,7 +37,7 @@ import {
RegionUtils,
Severity,
Category
} from 'alert-notification-node-client';
} from '@sap_oss/alert-notification-client';

const client = new AlertNotificationClient({
authentication: new BasicAuthentication({
Expand Down
2 changes: 1 addition & 1 deletion docs/authentication/basic-authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ BasicAuthentication is a class in the context of Alert Notification's node clien
## @Example

```js
import { BasicAuthentication } from 'alert-notification-client';
import { BasicAuthentication } from '@sap_oss/alert-notification-client';

const basicAuthentication = new BasicAuthentication({
username: 'test-username',
Expand Down
2 changes: 1 addition & 1 deletion docs/authentication/oauth-authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ _**Note**_: Grant type query parameter will be added automatically by the client
## @Example

```js
import { OAuthAuthentication } from 'alert-notification-client';
import { OAuthAuthentication } from '@sap_oss/alert-notification-client';

const oAuthAuthentication = new OAuthAuthentication({
username: 'test-username',
Expand Down
4 changes: 2 additions & 2 deletions docs/common-objects/region-utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Platform is an enum representing the environment on which Alert Notification is
### @Example

```js
import { RegionUtils } from 'alert-notification-client';
import { RegionUtils } from '@sap_oss/alert-notification-client';

console.log(RegionUtils.Platform.CF); // will print 'CF'
console.log(RegionUtils.Platform.NEO); // will print 'NEO'
Expand Down Expand Up @@ -140,7 +140,7 @@ RegionUtils contains exported constants which represent predefined regions, on w
### @Example

```js
import { RegionUtils } from 'alert-notification-client';
import { RegionUtils } from '@sap_oss/alert-notification-client';

console.log(RegionUtils.EU10); // will print EU10 region instance
```
2 changes: 1 addition & 1 deletion docs/configuration-api/action.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Action is an entity which represents the destination on which Alert Notification

_**@Example:**_
```js
import { State } from 'alert-notification-client';
import { State } from '@sap_oss/alert-notification-client';

const action = {
name: 'to-my-email',
Expand Down
4 changes: 2 additions & 2 deletions docs/configuration-api/condition.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Condition is an entity which defines a condition in the context of the Alert Not

## Example
```js
import { Predicate } from 'alert-notification-client';
import { Predicate } from '@sap_oss/alert-notification-client';

const condition = {
name: 'event-type-contains-HighCpu',
Expand Down Expand Up @@ -70,7 +70,7 @@ Predicate is an enum value representing a matching criteria for a condition.

#### Example
```js
import { Predicate } from 'alert-notification-client';
import { Predicate } from '@sap_oss/alert-notification-client';

console.log(Predicate.CONTAINS); // will print 'CONTAINS'
```
2 changes: 1 addition & 1 deletion docs/configuration-api/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Configuration represents the assembly of actions, conditions and subscriptions

_**@Example:**_
```js
import { State, Predicate } from 'alert-notification-client';
import { State, Predicate } from '@sap_oss/alert-notification-client';

const configuration =
{
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration-api/entity-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ EntityType is an enum which helps deduce what type of entity you are trying to m
## @Example

```js
import { EntityType } from 'alert-notification-client';
import { EntityType } from '@sap_oss/alert-notification-client';

console.log(EntityType.ACTION); // will print 'ACTION'
console.log(EntityType.CONDITION); // will print 'CONDITION'
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration-api/state.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ State is an enum holding a value for enablement and disablement of an entity
## Example

```js
import { State } from 'alert-notification-client';
import { State } from '@sap_oss/alert-notification-client';

console.log(State.ENABLED); // will print ENABLED
console.log(State.DISABLED); // will print DISABLED
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration-api/subscription.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Subscription is the aggregation of actions and conditions. When an event is rece

## Example
```js
import { State } from 'alert-notification-client';
import { State } from '@sap_oss/alert-notification-client';

const subscription = {
name: 'event-with-eventType-HighCpu-to-mail',
Expand Down
2 changes: 1 addition & 1 deletion docs/event-api-objects/category.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Represents the category of the event.
## @Example

```js
import { Category } from 'alert-notification-client';
import { Category } from '@sap_oss/alert-notification-client';

console.log(Category.ALERT); // will print 'ALERT'
console.log(Category.EXCEPTION); // will print 'EXCEPTION'
Expand Down
4 changes: 2 additions & 2 deletions docs/event-api-objects/consumer-event.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Received when requesting Undelivered or Matched APIs. Represents a stored event

_**@Example:**_
```js
import { Severity, Category } from 'alert-notification-client';
import { Severity, Category } from '@sap_oss/alert-notification-client';

const consumerEvent = {
id: 'matched-or-undelivered-event-id',
Expand Down Expand Up @@ -106,7 +106,7 @@ An enum which shows the status of an event. If the event was not delivered its s
#### @Example

```js
import { DeliveryStatus } from 'alert-notification-client';
import { DeliveryStatus } from '@sap_oss/alert-notification-client';

console.log(DeliveryStatus.UNDELIVERED); // will print 'UNDELIVERED'
console.log(DeliveryStatus.MATCHED); // will print 'MATCHED'
Expand Down
2 changes: 1 addition & 1 deletion docs/event-api-objects/resource-event.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Object to use when you want to ingest an event in Alert Notification to alert/no

## @Example
```js
import { Severity, Category } from 'alert-notification-client';
import { Severity, Category } from '@sap_oss/alert-notification-client';

const resourceEvent = {
body: 'Your test-resource has been',
Expand Down
2 changes: 1 addition & 1 deletion docs/event-api-objects/severity.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Represents the event impact in the context of the affected resource.
## @Example

```js
import { Severity } from 'alert-notification-client';
import { Severity } from '@sap_oss/alert-notification-client';

console.log(Severity.NOTICE); // will print 'NOTICE'
```
2 changes: 1 addition & 1 deletion docs/examples/create-and-get.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
BasicAuthentication,
RegionUtils,
State
} from 'alert-notification-client';
} from '@sap_oss/alert-notification-client';

const client = new AlertNotificationClient({
authentication: new BasicAuthentication({
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/exporting-and-importing-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
EntityType,
BasicAuthentication,
RegionUtils
} from 'alert-notification-client';
} from '@sap_oss/alert-notification-client';

const eu10Client = new AlertNotificationClient({
authentication: new BasicAuthentication({
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/import-configuration-and-send.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import {
Category,
State,
Predicate
} from 'alert-notification-client';
} from '@sap_oss/alert-notification-client';

const client = new AlertNotificationClient({
authentication: new BasicAuthentication({
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/send-event-and-consume.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
RegionUtils,
State,
Predicate
} from 'alert-notification-client';
} from '@sap_oss/alert-notification-client';

const client = new AlertNotificationClient({
authentication: new BasicAuthentication({
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/setup-authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
AlertNotificationClient,
BasicAuthentication,
RegionUtils
} from 'alert-notification-client';
} from '@sap_oss/alert-notification-client';

const client = new AlertNotificationClient({
authentication: new BasicAuthentication({
Expand All @@ -54,7 +54,7 @@ import {
AlertNotificationClient,
OAuthAuthentication,
RegionUtils
} from 'alert-notification-client';
} from '@sap_oss/alert-notification-client';

const client = new AlertNotificationClient({
authentication: new OAuthAuthentication({
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/setup-retriability.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
AlertNotificationClient,
BasicAuthentication,
RegionUtils
} from 'alert-notification-client';
} from '@sap_oss/alert-notification-client';

const client = new AlertNotificationClient({
authentication: new BasicAuthentication({
Expand Down
4 changes: 2 additions & 2 deletions docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ Furthermore, events can even be stored in Alert Notification storage and pulled
Node package manager will be used in order to install SAP Cloud Platform Alert Notification client:

```bash
$ npm i alert-notification-client
$ npm i @sap_oss/alert-notification-client
```

## Usage

In order to use the client you will first have to import it and create an instance:

```js
import { AlertNotificationClient, RegionUtils, BasicAuthentication } from 'alert-notification-client';
import { AlertNotificationClient, RegionUtils, BasicAuthentication } from '@sap_oss/alert-notification-client';

const client = new AlertNotificationClient({
authentication: new BasicAuthentication({
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "alert-notification-client",
"name": "@sap_oss/alert-notification-client",
"version": "1.0.0",
"description": "SAP Cloud Platform Alert Notification Node.js API client",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"test": "jest",
"test:watch": "jest --watch",
"prepublishOnly": "npm run test && tsc",
"prepublishOnly": "npm run test && npm run lint && tsc",
"lint": "eslint --ext .ts src/**",
"lint:fix": "eslint --ext .ts --fix src/**"
},
Expand All @@ -20,7 +20,7 @@
}
},
"dependencies": {
"axios": "^0.20.0"
"axios": "^0.21.1"
},
"devDependencies": {
"@types/jest": "^26.0.14",
Expand Down