Socket
Socket
Sign inDemoInstall

@sap_oss/alert-notification-client

Package Overview
Dependencies
2
Maintainers
12
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.1.0

.github/workflows/node.js.yml

14

dist/client.d.ts

@@ -28,3 +28,3 @@ import { AxiosRequestConfig } from 'axios';

/**
* Client used for accessing SAP Cloud Platform Alert Notification service APIs
* Client used for accessing SAP Alert Notification service for SAP BTP service APIs
*/

@@ -35,3 +35,3 @@ export default class AlertNotificationClient {

/**
* Constructs an instance of AlertNotificationClient. The instance provides an access to SAP Cloud Platform Alert Notification service APIs.
* Constructs an instance of AlertNotificationClient. The instance provides an access to SAP Alert Notification service for SAP BTP service APIs.
* Construction of the instance can throw an error in the following cases:

@@ -48,3 +48,3 @@ * - authentication and region are missing

* - authentication object - used to retrieve tha authorization header value
* - region - used to retrieve platform and url of the SAP Cloud Platform Alert Notification service
* - region - used to retrieve platform and url of the SAP Alert Notification service for SAP BTP service
* - axiosRequestConfig - request configuration different from the default provided by the client

@@ -132,3 +132,3 @@ * - retryConfig - retry configuration

*
* @param {ResourceEvent} event - resource event to be sent to SAP Cloud Platform Alert Notification
* @param {ResourceEvent} event - resource event to be sent to SAP Alert Notification service for SAP BTP
*

@@ -142,3 +142,3 @@ * @return {Promise<ResourceEvent>} - promise which contains the ingested resource event

*
* @param {ResourceEvent[]} events - resource events to be sent to SAP Cloud Platform Alert Notification
* @param {ResourceEvent[]} events - resource events to be sent to SAP Alert Notification service for SAP BTP
*

@@ -152,3 +152,3 @@ * @return {Promise<ResourceEvent>} - promise which contains the ingested resource events

*
* @param {string} eventId is the ID that was received in the response body when event was sent to SAP Cloud Platform Alert Notification
* @param {string} eventId is the ID that was received in the response body when event was sent to SAP Alert Notification service for SAP BTP
* @param {ConsumerQueryParameters} params - for filtering of all available events (those could be more than one with the same ID due to multiple matched subscriptions)

@@ -172,3 +172,3 @@ *

*
* @param {string} eventId is the ID that was received in the response body when event was sent to SAP Cloud Platform Alert Notification
* @param {string} eventId is the ID that was received in the response body when event was sent to SAP Alert Notification service for SAP BTP
* @param {CommonQueryParams} params for filtering of all available events (those could be more than one with the same ID due to multiple matched subscriptions)

@@ -175,0 +175,0 @@ *

@@ -11,7 +11,7 @@ "use strict";

/**
* Client used for accessing SAP Cloud Platform Alert Notification service APIs
* Client used for accessing SAP Alert Notification service for SAP BTP service APIs
*/
class AlertNotificationClient {
/**
* Constructs an instance of AlertNotificationClient. The instance provides an access to SAP Cloud Platform Alert Notification service APIs.
* Constructs an instance of AlertNotificationClient. The instance provides an access to SAP Alert Notification service for SAP BTP service APIs.
* Construction of the instance can throw an error in the following cases:

@@ -28,3 +28,3 @@ * - authentication and region are missing

* - authentication object - used to retrieve tha authorization header value
* - region - used to retrieve platform and url of the SAP Cloud Platform Alert Notification service
* - region - used to retrieve platform and url of the SAP Alert Notification service for SAP BTP service
* - axiosRequestConfig - request configuration different from the default provided by the client

@@ -150,3 +150,3 @@ * - retryConfig - retry configuration

*
* @param {ResourceEvent} event - resource event to be sent to SAP Cloud Platform Alert Notification
* @param {ResourceEvent} event - resource event to be sent to SAP Alert Notification service for SAP BTP
*

@@ -162,3 +162,3 @@ * @return {Promise<ResourceEvent>} - promise which contains the ingested resource event

*
* @param {ResourceEvent[]} events - resource events to be sent to SAP Cloud Platform Alert Notification
* @param {ResourceEvent[]} events - resource events to be sent to SAP Alert Notification service for SAP BTP
*

@@ -174,3 +174,3 @@ * @return {Promise<ResourceEvent>} - promise which contains the ingested resource events

*
* @param {string} eventId is the ID that was received in the response body when event was sent to SAP Cloud Platform Alert Notification
* @param {string} eventId is the ID that was received in the response body when event was sent to SAP Alert Notification service for SAP BTP
* @param {ConsumerQueryParameters} params - for filtering of all available events (those could be more than one with the same ID due to multiple matched subscriptions)

@@ -198,3 +198,3 @@ *

*
* @param {string} eventId is the ID that was received in the response body when event was sent to SAP Cloud Platform Alert Notification
* @param {string} eventId is the ID that was received in the response body when event was sent to SAP Alert Notification service for SAP BTP
* @param {CommonQueryParams} params for filtering of all available events (those could be more than one with the same ID due to multiple matched subscriptions)

@@ -201,0 +201,0 @@ *

@@ -5,3 +5,3 @@ import { AxiosResponse, AxiosInstance, AxiosPromise } from 'axios';

/**
* Class used to access SAP Cloud Platform Alert Notification Configuration API
* Class used to access SAP Alert Notification service for SAP BTP Configuration API
*/

@@ -8,0 +8,0 @@ export default class ConfigurationApiClient {

@@ -16,3 +16,3 @@ "use strict";

/**
* Class used to access SAP Cloud Platform Alert Notification Configuration API
* Class used to access SAP Alert Notification service for SAP BTP Configuration API
*/

@@ -19,0 +19,0 @@ class ConfigurationApiClient {

@@ -76,2 +76,7 @@ import { CommonQueryParams } from '../utils/common';

/**
* Time in seconds to allow the current action to be retried before being discarded.
* If 0, undefined or null the action will be retried for its maximum times.
*/
discardAfter?: number;
/**
* Action specific key-value pairs describing configuration properties.

@@ -78,0 +83,0 @@ */

import { AxiosInstance, AxiosPromise } from 'axios';
import { ResourceEvent, ConsumerRequest, ConsumerPagedResponse } from './models';
/**
* Class used to access SAP Cloud Platform Alert Notification Producer API.
* Class used to access SAP Alert Notification service for SAP BTP Producer API.
*

@@ -15,3 +15,3 @@ */

* Constructs an instance of EventsApiClient, which is used for making
* requests to SAP Cloud Platform Alert Notification Proucer API.
* requests to SAP Alert Notification service for SAP BTP Proucer API.
*

@@ -26,5 +26,5 @@ *

* Executes a request which if successful will ingest a resource event into
* SAP Cloud Platform Alert Notification and the system will start processing it.
* SAP Alert Notification service for SAP BTP and the system will start processing it.
*
* @param {ResourceEvent} event - resource event to be ingested into SAP Cloud Platform Alert Notification
* @param {ResourceEvent} event - resource event to be ingested into SAP Alert Notification service for SAP BTP
*

@@ -35,7 +35,7 @@ * @return {AxiosPromise<ResourceEvent>} promise, which contains the successfully ingested event

/**
* Executes a request of ingesting multiple resource events into SAP Cloud Platform Alert Notification.
* Executes a request of ingesting multiple resource events into SAP Alert Notification service for SAP BTP.
* If an error occurs and one of them cannot be ingested, the ingestion will be discontinued
* and an error will be returned. The error response will contain the accepted and rejected events.
*
* @param {ResourceEvent[]} events - resource events to be ingested into Alert Notifcation, note that
* @param {ResourceEvent[]} events - resource events to be ingested into SAP Alert Notification service, note that
* they will be processed in order starting from index 0

@@ -42,0 +42,0 @@ *

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Class used to access SAP Cloud Platform Alert Notification Producer API.
* Class used to access SAP Alert Notification service for SAP BTP Producer API.
*

@@ -10,3 +10,3 @@ */

* Constructs an instance of EventsApiClient, which is used for making
* requests to SAP Cloud Platform Alert Notification Proucer API.
* requests to SAP Alert Notification service for SAP BTP Proucer API.
*

@@ -27,5 +27,5 @@ *

* Executes a request which if successful will ingest a resource event into
* SAP Cloud Platform Alert Notification and the system will start processing it.
* SAP Alert Notification service for SAP BTP and the system will start processing it.
*
* @param {ResourceEvent} event - resource event to be ingested into SAP Cloud Platform Alert Notification
* @param {ResourceEvent} event - resource event to be ingested into SAP Alert Notification service for SAP BTP
*

@@ -42,7 +42,7 @@ * @return {AxiosPromise<ResourceEvent>} promise, which contains the successfully ingested event

/**
* Executes a request of ingesting multiple resource events into SAP Cloud Platform Alert Notification.
* Executes a request of ingesting multiple resource events into SAP Alert Notification service for SAP BTP.
* If an error occurs and one of them cannot be ingested, the ingestion will be discontinued
* and an error will be returned. The error response will contain the accepted and rejected events.
*
* @param {ResourceEvent[]} events - resource events to be ingested into Alert Notifcation, note that
* @param {ResourceEvent[]} events - resource events to be ingested into SAP Alert Notification service, note that
* they will be processed in order starting from index 0

@@ -49,0 +49,0 @@ *

@@ -41,3 +41,3 @@ import { CommonQueryParams, PageMetadata } from '../utils/common';

/**
* ID of the resource event, it will be populated by SAP Cloud Platform Alert Notification service and you
* ID of the resource event, it will be populated by SAP Alert Notification service for SAP BTP service and you
* will have access to it on response

@@ -71,3 +71,3 @@ */

/**
* Event timestamp, represents when it was created in the source, if missing SAP Cloud Platform Alert Notification
* Event timestamp, represents when it was created in the source, if missing SAP Alert Notification service for SAP BTP
* will populate it for you and will set the time it was ingested for processing

@@ -83,4 +83,4 @@ */

*
* Some useful known tags by SAP Cloud Platform Alert Notification are:
* - ans:sourceEventId? - generated by the source, will be used for further stateful interactions with SAP Cloud Platform Alert Notification
* Some useful known tags by SAP Alert Notification service for SAP BTP are:
* - ans:sourceEventId? - generated by the source, will be used for further stateful interactions with SAP Alert Notification service for SAP BTP
* - ans:correlationId? - generated by the source in order to correlate this event with other activities or issues

@@ -87,0 +87,0 @@ * - ans:status? - will be used for incient management systems. Possible values: 'CREATE_OR_UPDATE', 'CREATE', 'UPDATE', 'COMMENT' or 'CLOSE'

@@ -17,4 +17,4 @@ /**

*
* @param {Platform} platform - platform on which SAP Cloud Platform Alert Notification resides
* @param {string} url - base url of SAP Cloud Platform Alert Notification
* @param {Platform} platform - platform on which SAP Alert Notification service for SAP BTP resides
* @param {string} url - base url of SAP Alert Notification service for SAP BTP
*/

@@ -31,3 +31,3 @@ constructor(platform: Platform, url: string);

*
* Get SAP Cloud Platform Alert Notification's url for the Region
* Get SAP Alert Notification service for SAP BTP's url for the Region
*

@@ -39,3 +39,3 @@ * @return {string}

/**
* All regions that SAP Cloud Platform Alert Notification is available on.
* All regions that SAP Alert Notification service for SAP BTP is available on.
* Below are the aliases of those regions.

@@ -42,0 +42,0 @@ */

@@ -5,3 +5,3 @@ "use strict";

/**
* SAP Cloud Platform Alert Notification service instance urls
* SAP Alert Notification service for SAP BTP service instance urls
*/

@@ -35,4 +35,4 @@ const ANS_AP10_INSTANCE = 'https://clm-sl-ans-live-ans-service-api.cfapps.ap10.hana.ondemand.com';

*
* @param {Platform} platform - platform on which SAP Cloud Platform Alert Notification resides
* @param {string} url - base url of SAP Cloud Platform Alert Notification
* @param {Platform} platform - platform on which SAP Alert Notification service for SAP BTP resides
* @param {string} url - base url of SAP Alert Notification service for SAP BTP
*/

@@ -54,3 +54,3 @@ constructor(platform, url) {

*
* Get SAP Cloud Platform Alert Notification's url for the Region
* Get SAP Alert Notification service for SAP BTP's url for the Region
*

@@ -65,3 +65,3 @@ * @return {string}

/**
* All regions that SAP Cloud Platform Alert Notification is available on.
* All regions that SAP Alert Notification service for SAP BTP is available on.
* Below are the aliases of those regions.

@@ -68,0 +68,0 @@ */

{
"name": "@sap_oss/alert-notification-client",
"version": "1.0.1",
"description": "SAP Cloud Platform Alert Notification Node.js API client",
"version": "1.1.0",
"description": "SAP Alert Notification service for SAP BTP Node.js API client",
"main": "dist/index.js",

@@ -14,3 +14,3 @@ "types": "dist/index.d.ts",

},
"author": "SAP Cloud Platform Alert Notification Development Team",
"author": "SAP Alert Notification service for SAP BTP Development Team",
"email": "sap.cloud.platform.alert.notification@groups.sap.com",

@@ -17,0 +17,0 @@ "license": "Apache-2.0",

<img src="https://user-images.githubusercontent.com/11653294/64466233-7cd17480-d119-11e9-8965-e036c1e23c9a.png" alt="CF logo" height="150" align="left"/>
# SAP Cloud Platform Alert Notification Client
>*Promise based Node.js client library to support the usage of SAP Cloud Platform Alert Notification service*
# SAP Alert Notification service for SAP BTP Client
>*Promise based Node.js client library to support the usage of Alert Notification service*

@@ -10,5 +10,5 @@ [![Documentation](https://img.shields.io/badge/Service_Documentation-@SAP%20Help%20Portal-ff9900.svg)](https://help.sap.com/viewer/product/ALERT_NOTIFICATION/Cloud/en-US)

## About
SAP Cloud Platform Alert Notification is part of the DevOps portfolio of the SAP Cloud Platform. The service is specialized in instant delivery of events coming straight from the core platform services, e.g. database or application monitoring tools. This way you're always the first one notified whenever an issue with your dependency occurs. Additionally, Alert Notification provides means for posting real-time
Alert Notification service is part of the DevOps portfolio of the SAP Business Technology Platform. The service is specialized in instant delivery of events coming straight from the core platform services, e.g. database or application monitoring tools. This way you're always the first one notified whenever an issue with your dependency occurs. Additionally, Alert Notification service provides means for posting real-time
crucial events directly from your application. All those events altogether - either your custom events, or the platform ones, could be received on whatever channel is preferred - e-mail, Slack, custom webhook, etc.
Furthermore, events can be even stored in Alert Notification storage and pulled from it later.
Furthermore, events can be even stored in Alert Notification service storage and pulled from it later.

@@ -31,3 +31,3 @@ ### Library Features

Here is a very simple example on how to import and create your first Alert Notification client:
Here is a very simple example on how to import and create your first Alert Notification service client:

@@ -52,3 +52,3 @@ ```js

// After that you can use the provided methods from the alert notification instance
// After that you can use the provided methods from the Alert Notification service instance
```

@@ -55,0 +55,0 @@

@@ -48,3 +48,3 @@ import axios, { AxiosRequestConfig } from 'axios';

/**
* Client used for accessing SAP Cloud Platform Alert Notification service APIs
* Client used for accessing SAP Alert Notification service for SAP BTP service APIs
*/

@@ -56,3 +56,3 @@ export default class AlertNotificationClient {

/**
* Constructs an instance of AlertNotificationClient. The instance provides an access to SAP Cloud Platform Alert Notification service APIs.
* Constructs an instance of AlertNotificationClient. The instance provides an access to SAP Alert Notification service for SAP BTP service APIs.
* Construction of the instance can throw an error in the following cases:

@@ -69,3 +69,3 @@ * - authentication and region are missing

* - authentication object - used to retrieve tha authorization header value
* - region - used to retrieve platform and url of the SAP Cloud Platform Alert Notification service
* - region - used to retrieve platform and url of the SAP Alert Notification service for SAP BTP service
* - axiosRequestConfig - request configuration different from the default provided by the client

@@ -230,3 +230,3 @@ * - retryConfig - retry configuration

*
* @param {ResourceEvent} event - resource event to be sent to SAP Cloud Platform Alert Notification
* @param {ResourceEvent} event - resource event to be sent to SAP Alert Notification service for SAP BTP
*

@@ -243,3 +243,3 @@ * @return {Promise<ResourceEvent>} - promise which contains the ingested resource event

*
* @param {ResourceEvent[]} events - resource events to be sent to SAP Cloud Platform Alert Notification
* @param {ResourceEvent[]} events - resource events to be sent to SAP Alert Notification service for SAP BTP
*

@@ -256,3 +256,3 @@ * @return {Promise<ResourceEvent>} - promise which contains the ingested resource events

*
* @param {string} eventId is the ID that was received in the response body when event was sent to SAP Cloud Platform Alert Notification
* @param {string} eventId is the ID that was received in the response body when event was sent to SAP Alert Notification service for SAP BTP
* @param {ConsumerQueryParameters} params - for filtering of all available events (those could be more than one with the same ID due to multiple matched subscriptions)

@@ -289,3 +289,3 @@ *

*
* @param {string} eventId is the ID that was received in the response body when event was sent to SAP Cloud Platform Alert Notification
* @param {string} eventId is the ID that was received in the response body when event was sent to SAP Alert Notification service for SAP BTP
* @param {CommonQueryParams} params for filtering of all available events (those could be more than one with the same ID due to multiple matched subscriptions)

@@ -292,0 +292,0 @@ *

@@ -15,3 +15,3 @@ import { AxiosResponse, AxiosInstance, AxiosPromise } from 'axios';

/**
* Class used to access SAP Cloud Platform Alert Notification Configuration API
* Class used to access SAP Alert Notification service for SAP BTP Configuration API
*/

@@ -18,0 +18,0 @@ export default class ConfigurationApiClient {

@@ -79,2 +79,7 @@ import { CommonQueryParams } from '../utils/common';

/**
* Time in seconds to allow the current action to be retried before being discarded.
* If 0, undefined or null the action will be retried for its maximum times.
*/
discardAfter?: number;
/**
* Action specific key-value pairs describing configuration properties.

@@ -81,0 +86,0 @@ */

@@ -6,3 +6,3 @@ import { AxiosInstance, AxiosPromise } from 'axios';

/**
* Class used to access SAP Cloud Platform Alert Notification Producer API.
* Class used to access SAP Alert Notification service for SAP BTP Producer API.
*

@@ -19,3 +19,3 @@ */

* Constructs an instance of EventsApiClient, which is used for making
* requests to SAP Cloud Platform Alert Notification Proucer API.
* requests to SAP Alert Notification service for SAP BTP Proucer API.
*

@@ -37,5 +37,5 @@ *

* Executes a request which if successful will ingest a resource event into
* SAP Cloud Platform Alert Notification and the system will start processing it.
* SAP Alert Notification service for SAP BTP and the system will start processing it.
*
* @param {ResourceEvent} event - resource event to be ingested into SAP Cloud Platform Alert Notification
* @param {ResourceEvent} event - resource event to be ingested into SAP Alert Notification service for SAP BTP
*

@@ -53,7 +53,7 @@ * @return {AxiosPromise<ResourceEvent>} promise, which contains the successfully ingested event

/**
* Executes a request of ingesting multiple resource events into SAP Cloud Platform Alert Notification.
* Executes a request of ingesting multiple resource events into SAP Alert Notification service for SAP BTP.
* If an error occurs and one of them cannot be ingested, the ingestion will be discontinued
* and an error will be returned. The error response will contain the accepted and rejected events.
*
* @param {ResourceEvent[]} events - resource events to be ingested into Alert Notifcation, note that
* @param {ResourceEvent[]} events - resource events to be ingested into SAP Alert Notification service, note that
* they will be processed in order starting from index 0

@@ -60,0 +60,0 @@ *

@@ -45,3 +45,3 @@ import { CommonQueryParams, PageMetadata } from '../utils/common';

/**
* ID of the resource event, it will be populated by SAP Cloud Platform Alert Notification service and you
* ID of the resource event, it will be populated by SAP Alert Notification service for SAP BTP service and you
* will have access to it on response

@@ -75,3 +75,3 @@ */

/**
* Event timestamp, represents when it was created in the source, if missing SAP Cloud Platform Alert Notification
* Event timestamp, represents when it was created in the source, if missing SAP Alert Notification service for SAP BTP
* will populate it for you and will set the time it was ingested for processing

@@ -87,4 +87,4 @@ */

*
* Some useful known tags by SAP Cloud Platform Alert Notification are:
* - ans:sourceEventId? - generated by the source, will be used for further stateful interactions with SAP Cloud Platform Alert Notification
* Some useful known tags by SAP Alert Notification service for SAP BTP are:
* - ans:sourceEventId? - generated by the source, will be used for further stateful interactions with SAP Alert Notification service for SAP BTP
* - ans:correlationId? - generated by the source in order to correlate this event with other activities or issues

@@ -91,0 +91,0 @@ * - ans:status? - will be used for incient management systems. Possible values: 'CREATE_OR_UPDATE', 'CREATE', 'UPDATE', 'COMMENT' or 'CLOSE'

/**
* SAP Cloud Platform Alert Notification service instance urls
* SAP Alert Notification service for SAP BTP service instance urls
*/

@@ -35,4 +35,4 @@ const ANS_AP10_INSTANCE = 'https://clm-sl-ans-live-ans-service-api.cfapps.ap10.hana.ondemand.com';

*
* @param {Platform} platform - platform on which SAP Cloud Platform Alert Notification resides
* @param {string} url - base url of SAP Cloud Platform Alert Notification
* @param {Platform} platform - platform on which SAP Alert Notification service for SAP BTP resides
* @param {string} url - base url of SAP Alert Notification service for SAP BTP
*/

@@ -56,3 +56,3 @@ constructor(platform: Platform, url: string) {

*
* Get SAP Cloud Platform Alert Notification's url for the Region
* Get SAP Alert Notification service for SAP BTP's url for the Region
*

@@ -67,3 +67,3 @@ * @return {string}

/**
* All regions that SAP Cloud Platform Alert Notification is available on.
* All regions that SAP Alert Notification service for SAP BTP is available on.
* Below are the aliases of those regions.

@@ -70,0 +70,0 @@ */

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc