@redhat-cloud-services/notifications-client 0.0.40 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/dist/EventResourceV1GetEvents/index.d.ts +111 -0
- package/dist/EventResourceV1GetEvents/index.js +143 -0
- package/dist/NotificationResourceV1AppendBehaviorGroupToEventType/index.d.ts +26 -0
- package/dist/NotificationResourceV1AppendBehaviorGroupToEventType/index.js +93 -0
- package/dist/NotificationResourceV1CreateBehaviorGroup/index.d.ts +21 -0
- package/dist/NotificationResourceV1CreateBehaviorGroup/index.js +93 -0
- package/dist/NotificationResourceV1DeleteBehaviorGroup/index.d.ts +20 -0
- package/dist/NotificationResourceV1DeleteBehaviorGroup/index.js +92 -0
- package/dist/NotificationResourceV1DeleteBehaviorGroupFromEventType/index.d.ts +26 -0
- package/dist/NotificationResourceV1DeleteBehaviorGroupFromEventType/index.js +93 -0
- package/dist/NotificationResourceV1FindBehaviorGroupsByBundleId/index.d.ts +20 -0
- package/dist/NotificationResourceV1FindBehaviorGroupsByBundleId/index.js +92 -0
- package/dist/NotificationResourceV1GetApplicationByNameAndBundleName/index.d.ts +26 -0
- package/dist/NotificationResourceV1GetApplicationByNameAndBundleName/index.js +93 -0
- package/dist/NotificationResourceV1GetApplicationsFacets/index.d.ts +20 -0
- package/dist/NotificationResourceV1GetApplicationsFacets/index.js +94 -0
- package/dist/NotificationResourceV1GetBehaviorGroupsAffectedByRemovalOfEndpoint/index.d.ts +20 -0
- package/dist/NotificationResourceV1GetBehaviorGroupsAffectedByRemovalOfEndpoint/index.js +92 -0
- package/dist/NotificationResourceV1GetBundleByName/index.d.ts +20 -0
- package/dist/NotificationResourceV1GetBundleByName/index.js +92 -0
- package/dist/NotificationResourceV1GetBundleFacets/index.d.ts +20 -0
- package/dist/NotificationResourceV1GetBundleFacets/index.js +94 -0
- package/dist/NotificationResourceV1GetEventTypes/index.d.ts +62 -0
- package/dist/NotificationResourceV1GetEventTypes/index.js +115 -0
- package/dist/NotificationResourceV1GetEventTypesAffectedByRemovalOfBehaviorGroup/index.d.ts +20 -0
- package/dist/NotificationResourceV1GetEventTypesAffectedByRemovalOfBehaviorGroup/index.js +92 -0
- package/dist/NotificationResourceV1GetEventTypesByNameAndBundleAndApplicationName/index.d.ts +32 -0
- package/dist/NotificationResourceV1GetEventTypesByNameAndBundleAndApplicationName/index.js +94 -0
- package/dist/NotificationResourceV1GetLinkedBehaviorGroups/index.d.ts +50 -0
- package/dist/NotificationResourceV1GetLinkedBehaviorGroups/index.js +116 -0
- package/dist/NotificationResourceV1UpdateBehaviorGroup/index.d.ts +27 -0
- package/dist/NotificationResourceV1UpdateBehaviorGroup/index.js +94 -0
- package/dist/NotificationResourceV1UpdateBehaviorGroupActions/index.d.ts +26 -0
- package/dist/NotificationResourceV1UpdateBehaviorGroupActions/index.js +94 -0
- package/dist/NotificationResourceV1UpdateEventTypeBehaviors/index.d.ts +26 -0
- package/dist/NotificationResourceV1UpdateEventTypeBehaviors/index.js +94 -0
- package/dist/OrgConfigResourceV1GetDailyDigestTimePreference/index.d.ts +13 -0
- package/dist/OrgConfigResourceV1GetDailyDigestTimePreference/index.js +90 -0
- package/dist/OrgConfigResourceV1SaveDailyDigestTimePreference/index.d.ts +20 -0
- package/dist/OrgConfigResourceV1SaveDailyDigestTimePreference/index.js +93 -0
- package/dist/UserConfigResourceV1GetPreferences/index.d.ts +25 -0
- package/dist/UserConfigResourceV1GetPreferences/index.js +92 -0
- package/dist/UserConfigResourceV1GetSettingsSchema/index.d.ts +19 -0
- package/dist/UserConfigResourceV1GetSettingsSchema/index.js +93 -0
- package/dist/UserConfigResourceV1SaveSettings/index.d.ts +20 -0
- package/dist/UserConfigResourceV1SaveSettings/index.js +92 -0
- package/dist/api.d.ts +2536 -759
- package/dist/api.js +2833 -778
- package/dist/base.d.ts +54 -0
- package/dist/base.js +80 -0
- package/dist/common.d.ts +65 -0
- package/dist/common.js +252 -0
- package/dist/configuration.d.ts +24 -15
- package/dist/configuration.js +19 -12
- package/dist/index.d.ts +27 -13
- package/dist/index.js +89 -17
- package/dist/types/index.d.ts +1657 -0
- package/dist/types/index.js +90 -0
- package/dist/utils/base.d.ts +84 -0
- package/dist/utils/base.js +251 -0
- package/dist/utils/common.d.ts +54 -0
- package/dist/utils/common.js +241 -0
- package/dist/utils/configuration.d.ts +72 -0
- package/dist/utils/configuration.js +33 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +19 -0
- package/doc/.nojekyll +1 -0
- package/doc/README.md +11 -420
- package/doc/classes/BaseAPI.md +125 -0
- package/doc/classes/Configuration.md +194 -0
- package/doc/classes/RequiredError.md +179 -0
- package/doc/enums/EmailSubscriptionType.md +21 -0
- package/doc/enums/EndpointStatus.md +76 -0
- package/doc/enums/EndpointType.md +65 -0
- package/doc/enums/Environment.md +54 -0
- package/doc/enums/EventLogEntryActionStatus.md +65 -0
- package/doc/enums/HttpType.md +43 -0
- package/doc/enums/NotificationStatus.md +65 -0
- package/doc/enums/Status.md +32 -0
- package/doc/interfaces/AddAccessRequest.md +44 -0
- package/doc/interfaces/AddApplicationRequest.md +74 -0
- package/doc/interfaces/AggregationEmailTemplate.md +164 -0
- package/doc/interfaces/ApiConfig.md +30 -0
- package/doc/interfaces/Application.md +104 -0
- package/doc/interfaces/Application1.md +44 -0
- package/doc/interfaces/ApplicationSettingsValue.md +33 -0
- package/doc/interfaces/ApplicationSettingsValue1.md +48 -0
- package/doc/interfaces/BasicAuthentication.md +44 -0
- package/doc/interfaces/BehaviorGroup.md +149 -0
- package/doc/interfaces/BehaviorGroupAction.md +59 -0
- package/doc/interfaces/BehaviorGroupActionId.md +44 -0
- package/doc/interfaces/Bundle.md +89 -0
- package/doc/interfaces/BundleSettingsValue.md +33 -0
- package/doc/interfaces/BundleSettingsValue1.md +33 -0
- package/doc/interfaces/CamelProperties.md +93 -0
- package/doc/interfaces/ConfigurationParameters.md +89 -0
- package/doc/interfaces/CreateBehaviorGroupRequest.md +104 -0
- package/doc/interfaces/CreateBehaviorGroupResponse.md +104 -0
- package/doc/interfaces/CurrentStatus.md +59 -0
- package/doc/interfaces/DuplicateNameMigrationReport.md +44 -0
- package/doc/interfaces/Endpoint.md +179 -0
- package/doc/interfaces/EndpointPage.md +63 -0
- package/doc/interfaces/EndpointTestRequest.md +29 -0
- package/doc/interfaces/EventLogEntry.md +119 -0
- package/doc/interfaces/EventLogEntryAction.md +125 -0
- package/doc/interfaces/EventType.md +119 -0
- package/doc/interfaces/EventTypeBehavior.md +59 -0
- package/doc/interfaces/EventTypeBehaviorId.md +44 -0
- package/doc/interfaces/EventTypeSettingsValue.md +48 -0
- package/doc/interfaces/Facet.md +74 -0
- package/doc/interfaces/InstantEmailTemplate.md +149 -0
- package/doc/interfaces/InternalApplicationUserPermission.md +59 -0
- package/doc/interfaces/InternalRoleAccess.md +59 -0
- package/doc/interfaces/InternalUserPermissions.md +59 -0
- package/doc/interfaces/MessageValidationResponse.md +33 -0
- package/doc/interfaces/Meta.md +29 -0
- package/doc/interfaces/NotificationHistory.md +155 -0
- package/doc/interfaces/PageBehaviorGroup.md +63 -0
- package/doc/interfaces/PageEventLogEntry.md +63 -0
- package/doc/interfaces/PageEventType.md +63 -0
- package/doc/interfaces/PageNotificationHistory.md +63 -0
- package/doc/interfaces/RenderEmailTemplateRequest.md +44 -0
- package/doc/interfaces/RequestArgs.md +58 -0
- package/doc/interfaces/RequestDefaultBehaviorGroupPropertyList.md +44 -0
- package/doc/interfaces/RequestSystemSubscriptionProperties.md +44 -0
- package/doc/interfaces/ServerInfo.md +29 -0
- package/doc/interfaces/SettingsValues.md +33 -0
- package/doc/interfaces/SettingsValuesByEventType.md +33 -0
- package/doc/interfaces/SystemSubscriptionProperties.md +59 -0
- package/doc/interfaces/Template.md +104 -0
- package/doc/interfaces/TriggerDailyDigestRequest.md +89 -0
- package/doc/interfaces/UpdateBehaviorGroupRequest.md +74 -0
- package/doc/interfaces/UserConfigPreferences.md +44 -0
- package/doc/interfaces/WebhookProperties.md +89 -0
- package/doc/modules.md +1080 -0
- package/git_push.sh +57 -0
- package/openapitools.json +7 -0
- package/package.json +26 -31
- package/postProcess.sh +3 -11
- package/tsconfig-cjs.json +19 -0
- package/tsconfig-esm.json +21 -0
- package/tsconfig.json +18 -0
- package/doc/classes/appregistrationapi.md +0 -123
- package/doc/classes/appsapi.md +0 -149
- package/doc/classes/baseapi.md +0 -86
- package/doc/classes/configuration.md +0 -140
- package/doc/classes/endpointsapi.md +0 -255
- package/doc/classes/filtersapi.md +0 -124
- package/doc/classes/requirederror.md +0 -109
- package/doc/enums/app.typeenum.md +0 -28
- package/doc/enums/endpoint.typeenum.md +0 -28
- package/doc/enums/endpointattributes.lastdeliverystatusenum.md +0 -38
- package/doc/enums/eventtype.typeenum.md +0 -28
- package/doc/enums/inlineresponse2004data.typeenum.md +0 -28
- package/doc/enums/level.typeenum.md +0 -28
- package/doc/interfaces/appattributes.md +0 -54
- package/doc/interfaces/apprelationships.md +0 -36
- package/doc/interfaces/appsregisterapplication.md +0 -50
- package/doc/interfaces/appsregistereventtypes.md +0 -64
- package/doc/interfaces/appsregistereventtypeslevels.md +0 -50
- package/doc/interfaces/configurationparameters.md +0 -84
- package/doc/interfaces/endpointsendpoint.md +0 -78
- package/doc/interfaces/endpointsendpointfilter.md +0 -64
- package/doc/interfaces/endpointsidendpoint.md +0 -78
- package/doc/interfaces/endpointsidendpointfilter.md +0 -78
- package/doc/interfaces/errors.md +0 -36
- package/doc/interfaces/errorserrors.md +0 -120
- package/doc/interfaces/errorssource.md +0 -50
- package/doc/interfaces/eventtypeattributes.md +0 -54
- package/doc/interfaces/eventtyperelationships.md +0 -36
- package/doc/interfaces/inlineobject.md +0 -50
- package/doc/interfaces/inlineobject1.md +0 -36
- package/doc/interfaces/inlineobject2.md +0 -36
- package/doc/interfaces/inlineresponse200.md +0 -50
- package/doc/interfaces/inlineresponse2001.md +0 -36
- package/doc/interfaces/inlineresponse2002.md +0 -50
- package/doc/interfaces/inlineresponse2003.md +0 -64
- package/doc/interfaces/inlineresponse2004.md +0 -36
- package/doc/interfaces/inlineresponse2004dataattributes.md +0 -36
- package/doc/interfaces/inlineresponse2004datarelationships.md +0 -78
- package/doc/interfaces/inlineresponse201.md +0 -36
- package/doc/interfaces/levelattributes.md +0 -38
- package/doc/interfaces/links.md +0 -86
- package/doc/interfaces/metadata.md +0 -70
- package/doc/interfaces/relationship.md +0 -50
- package/doc/interfaces/relationships.md +0 -36
- package/doc/interfaces/requestargs.md +0 -42
- package/doc/modules/app.md +0 -82
- package/doc/modules/endpoint.md +0 -68
- package/doc/modules/endpointattributes.md +0 -118
- package/doc/modules/eventtype.md +0 -82
- package/doc/modules/inlineresponse2004data.md +0 -78
- package/doc/modules/level.md +0 -68
package/doc/README.md
CHANGED
|
@@ -1,59 +1,39 @@
|
|
|
1
|
+
@redhat-cloud-services/notifications-client / [Exports](modules.md)
|
|
1
2
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Javascript client for Hooks API
|
|
5
|
-
===============================
|
|
6
|
-
|
|
7
|
-
](#javascript-client-for-hooks-api)
|
|
8
|
-
|
|
3
|
+
# Javascript client for Notifications API
|
|
9
4
|
If you want to use [RedHatInsights/notifications-backend](https://github.com/RedHatInsights/notifications-backend) you shouldn't use get requests directly, but rather use this client to integrate with this service.
|
|
10
5
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Install
|
|
14
|
-
-------
|
|
15
|
-
|
|
16
|
-
](#install)
|
|
17
|
-
|
|
6
|
+
## Install
|
|
18
7
|
NPM
|
|
19
|
-
|
|
20
8
|
```bash
|
|
21
9
|
npm install --save @redhat-cloud-services/notifications-client
|
|
22
10
|
```
|
|
23
11
|
|
|
24
12
|
Or Yarn
|
|
25
|
-
|
|
26
13
|
```bash
|
|
27
14
|
yarn add @redhat-cloud-services/notifications-client
|
|
28
15
|
```
|
|
29
16
|
|
|
30
|
-
[
|
|
31
|
-
|
|
32
17
|
### Usage
|
|
33
|
-
|
|
34
|
-
](#usage)
|
|
35
|
-
|
|
36
18
|
This client is using typescript and axios. Types are distributed with this package, so no need to define or install them separately.
|
|
37
19
|
|
|
38
20
|
To correctly bootstrap this API you should use this config (no need to define it multiple times, just one config and reimport it anywhere you want to use it).
|
|
39
|
-
|
|
40
21
|
```JS
|
|
41
22
|
// api.js
|
|
42
23
|
import axios from 'axios';
|
|
43
|
-
import {
|
|
24
|
+
import { NotificationsApi } from '@redhat-cloud-services/notifications-client';
|
|
44
25
|
const instance = axios.create();
|
|
45
26
|
|
|
46
27
|
// BASE_PATH should be set in your constants file
|
|
47
|
-
const
|
|
48
|
-
export
|
|
28
|
+
const notificationsApi = new NotificationsApi(undefined, BASE_PATH, instance);
|
|
29
|
+
export notificationsApi;
|
|
49
30
|
```
|
|
50
31
|
|
|
51
32
|
If you want to add some interceptors you can use axios build in interceptors
|
|
52
|
-
|
|
53
33
|
```JS
|
|
54
34
|
// api.js
|
|
55
35
|
import axios from 'axios';
|
|
56
|
-
import {
|
|
36
|
+
import { NotificationsApi } from '@redhat-cloud-services/notifications-client';
|
|
57
37
|
const instance = axios.create();
|
|
58
38
|
|
|
59
39
|
// Request interceptor
|
|
@@ -72,399 +52,10 @@ instance.interceptors.response.use(null, (error) => {
|
|
|
72
52
|
});
|
|
73
53
|
|
|
74
54
|
// BASE_PATH should be set in your constants file
|
|
75
|
-
const
|
|
76
|
-
export
|
|
55
|
+
const notificationsApi = new NotificationsApi(undefined, BASE_PATH, instance);
|
|
56
|
+
export notificationsApi;
|
|
77
57
|
```
|
|
78
58
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
API documentation
|
|
82
|
-
-----------------
|
|
83
|
-
|
|
84
|
-
](#api-documentation)
|
|
85
|
-
|
|
86
|
-
* [README](doc/README.md)
|
|
87
|
-
|
|
88
|
-
## Index
|
|
89
|
-
|
|
90
|
-
### Modules
|
|
91
|
-
|
|
92
|
-
* [App](modules/app.md)
|
|
93
|
-
* [Endpoint](modules/endpoint.md)
|
|
94
|
-
* [EndpointAttributes](modules/endpointattributes.md)
|
|
95
|
-
* [EventType](modules/eventtype.md)
|
|
96
|
-
* [InlineResponse2004Data](modules/inlineresponse2004data.md)
|
|
97
|
-
* [Level](modules/level.md)
|
|
98
|
-
|
|
99
|
-
### Classes
|
|
100
|
-
|
|
101
|
-
* [AppRegistrationApi](classes/appregistrationapi.md)
|
|
102
|
-
* [AppsApi](classes/appsapi.md)
|
|
103
|
-
* [BaseAPI](classes/baseapi.md)
|
|
104
|
-
* [Configuration](classes/configuration.md)
|
|
105
|
-
* [EndpointsApi](classes/endpointsapi.md)
|
|
106
|
-
* [FiltersApi](classes/filtersapi.md)
|
|
107
|
-
* [RequiredError](classes/requirederror.md)
|
|
108
|
-
|
|
109
|
-
### Interfaces
|
|
110
|
-
|
|
111
|
-
* [AppAttributes](interfaces/appattributes.md)
|
|
112
|
-
* [AppRelationships](interfaces/apprelationships.md)
|
|
113
|
-
* [AppsRegisterApplication](interfaces/appsregisterapplication.md)
|
|
114
|
-
* [AppsRegisterEventTypes](interfaces/appsregistereventtypes.md)
|
|
115
|
-
* [AppsRegisterEventTypesLevels](interfaces/appsregistereventtypeslevels.md)
|
|
116
|
-
* [ConfigurationParameters](interfaces/configurationparameters.md)
|
|
117
|
-
* [EndpointsEndpoint](interfaces/endpointsendpoint.md)
|
|
118
|
-
* [EndpointsEndpointFilter](interfaces/endpointsendpointfilter.md)
|
|
119
|
-
* [EndpointsIdEndpoint](interfaces/endpointsidendpoint.md)
|
|
120
|
-
* [EndpointsIdEndpointFilter](interfaces/endpointsidendpointfilter.md)
|
|
121
|
-
* [Errors](interfaces/errors.md)
|
|
122
|
-
* [ErrorsErrors](interfaces/errorserrors.md)
|
|
123
|
-
* [ErrorsSource](interfaces/errorssource.md)
|
|
124
|
-
* [EventTypeAttributes](interfaces/eventtypeattributes.md)
|
|
125
|
-
* [EventTypeRelationships](interfaces/eventtyperelationships.md)
|
|
126
|
-
* [InlineObject](interfaces/inlineobject.md)
|
|
127
|
-
* [InlineObject1](interfaces/inlineobject1.md)
|
|
128
|
-
* [InlineObject2](interfaces/inlineobject2.md)
|
|
129
|
-
* [InlineResponse200](interfaces/inlineresponse200.md)
|
|
130
|
-
* [InlineResponse2001](interfaces/inlineresponse2001.md)
|
|
131
|
-
* [InlineResponse2002](interfaces/inlineresponse2002.md)
|
|
132
|
-
* [InlineResponse2003](interfaces/inlineresponse2003.md)
|
|
133
|
-
* [InlineResponse2004](interfaces/inlineresponse2004.md)
|
|
134
|
-
* [InlineResponse2004DataAttributes](interfaces/inlineresponse2004dataattributes.md)
|
|
135
|
-
* [InlineResponse2004DataRelationships](interfaces/inlineresponse2004datarelationships.md)
|
|
136
|
-
* [InlineResponse201](interfaces/inlineresponse201.md)
|
|
137
|
-
* [LevelAttributes](interfaces/levelattributes.md)
|
|
138
|
-
* [Links](interfaces/links.md)
|
|
139
|
-
* [Metadata](interfaces/metadata.md)
|
|
140
|
-
* [Relationship](interfaces/relationship.md)
|
|
141
|
-
* [Relationships](interfaces/relationships.md)
|
|
142
|
-
* [RequestArgs](interfaces/requestargs.md)
|
|
143
|
-
|
|
144
|
-
### Variables
|
|
145
|
-
|
|
146
|
-
* [BASE_PATH](#base_path)
|
|
147
|
-
|
|
148
|
-
### Functions
|
|
149
|
-
|
|
150
|
-
* [AppRegistrationApiAxiosParamCreator](#appregistrationapiaxiosparamcreator)
|
|
151
|
-
* [AppRegistrationApiFactory](#appregistrationapifactory)
|
|
152
|
-
* [AppRegistrationApiFp](#appregistrationapifp)
|
|
153
|
-
* [AppsApiAxiosParamCreator](#appsapiaxiosparamcreator)
|
|
154
|
-
* [AppsApiFactory](#appsapifactory)
|
|
155
|
-
* [AppsApiFp](#appsapifp)
|
|
156
|
-
* [EndpointsApiAxiosParamCreator](#endpointsapiaxiosparamcreator)
|
|
157
|
-
* [EndpointsApiFactory](#endpointsapifactory)
|
|
158
|
-
* [EndpointsApiFp](#endpointsapifp)
|
|
159
|
-
* [FiltersApiAxiosParamCreator](#filtersapiaxiosparamcreator)
|
|
160
|
-
* [FiltersApiFactory](#filtersapifactory)
|
|
161
|
-
* [FiltersApiFp](#filtersapifp)
|
|
162
|
-
|
|
163
|
-
### Object literals
|
|
164
|
-
|
|
165
|
-
* [COLLECTION_FORMATS](#collection_formats)
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
## Variables
|
|
170
|
-
|
|
171
|
-
<a id="base_path"></a>
|
|
172
|
-
|
|
173
|
-
### `<Const>` BASE_PATH
|
|
174
|
-
|
|
175
|
-
**● BASE_PATH**: *`string`* = "http://localhost".replace(/\/+$/, "")
|
|
176
|
-
|
|
177
|
-
*Defined in [api.ts:20](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/hooks/api.ts#L20)*
|
|
178
|
-
|
|
179
|
-
___
|
|
180
|
-
|
|
181
|
-
## Functions
|
|
182
|
-
|
|
183
|
-
<a id="appregistrationapiaxiosparamcreator"></a>
|
|
184
|
-
|
|
185
|
-
### `<Const>` AppRegistrationApiAxiosParamCreator
|
|
186
|
-
|
|
187
|
-
▸ **AppRegistrationApiAxiosParamCreator**(configuration?: *[Configuration](classes/configuration.md)*): `object`
|
|
188
|
-
|
|
189
|
-
*Defined in [api.ts:1002](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/hooks/api.ts#L1002)*
|
|
190
|
-
|
|
191
|
-
AppRegistrationApi - axios parameter creator
|
|
192
|
-
|
|
193
|
-
**Parameters:**
|
|
194
|
-
|
|
195
|
-
| Name | Type |
|
|
196
|
-
| ------ | ------ |
|
|
197
|
-
| `Optional` configuration | [Configuration](classes/configuration.md) |
|
|
198
|
-
|
|
199
|
-
**Returns:** `object`
|
|
200
|
-
|
|
201
|
-
___
|
|
202
|
-
<a id="appregistrationapifactory"></a>
|
|
203
|
-
|
|
204
|
-
### `<Const>` AppRegistrationApiFactory
|
|
205
|
-
|
|
206
|
-
▸ **AppRegistrationApiFactory**(configuration?: *[Configuration](classes/configuration.md)*, basePath?: *`string`*, axios?: *`AxiosInstance`*): `object`
|
|
207
|
-
|
|
208
|
-
*Defined in [api.ts:1068](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/hooks/api.ts#L1068)*
|
|
209
|
-
|
|
210
|
-
AppRegistrationApi - factory interface
|
|
211
|
-
|
|
212
|
-
**Parameters:**
|
|
213
|
-
|
|
214
|
-
| Name | Type |
|
|
215
|
-
| ------ | ------ |
|
|
216
|
-
| `Optional` configuration | [Configuration](classes/configuration.md) |
|
|
217
|
-
| `Optional` basePath | `string` |
|
|
218
|
-
| `Optional` axios | `AxiosInstance` |
|
|
219
|
-
|
|
220
|
-
**Returns:** `object`
|
|
221
|
-
|
|
222
|
-
___
|
|
223
|
-
<a id="appregistrationapifp"></a>
|
|
224
|
-
|
|
225
|
-
### `<Const>` AppRegistrationApiFp
|
|
226
|
-
|
|
227
|
-
▸ **AppRegistrationApiFp**(configuration?: *[Configuration](classes/configuration.md)*): `object`
|
|
228
|
-
|
|
229
|
-
*Defined in [api.ts:1046](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/hooks/api.ts#L1046)*
|
|
230
|
-
|
|
231
|
-
AppRegistrationApi - functional programming interface
|
|
232
|
-
|
|
233
|
-
**Parameters:**
|
|
234
|
-
|
|
235
|
-
| Name | Type |
|
|
236
|
-
| ------ | ------ |
|
|
237
|
-
| `Optional` configuration | [Configuration](classes/configuration.md) |
|
|
238
|
-
|
|
239
|
-
**Returns:** `object`
|
|
240
|
-
|
|
241
|
-
___
|
|
242
|
-
<a id="appsapiaxiosparamcreator"></a>
|
|
243
|
-
|
|
244
|
-
### `<Const>` AppsApiAxiosParamCreator
|
|
245
|
-
|
|
246
|
-
▸ **AppsApiAxiosParamCreator**(configuration?: *[Configuration](classes/configuration.md)*): `object`
|
|
247
|
-
|
|
248
|
-
*Defined in [api.ts:1106](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/hooks/api.ts#L1106)*
|
|
249
|
-
|
|
250
|
-
AppsApi - axios parameter creator
|
|
251
|
-
|
|
252
|
-
**Parameters:**
|
|
253
|
-
|
|
254
|
-
| Name | Type |
|
|
255
|
-
| ------ | ------ |
|
|
256
|
-
| `Optional` configuration | [Configuration](classes/configuration.md) |
|
|
257
|
-
|
|
258
|
-
**Returns:** `object`
|
|
259
|
-
|
|
260
|
-
___
|
|
261
|
-
<a id="appsapifactory"></a>
|
|
262
|
-
|
|
263
|
-
### `<Const>` AppsApiFactory
|
|
264
|
-
|
|
265
|
-
▸ **AppsApiFactory**(configuration?: *[Configuration](classes/configuration.md)*, basePath?: *`string`*, axios?: *`AxiosInstance`*): `object`
|
|
266
|
-
|
|
267
|
-
*Defined in [api.ts:1227](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/hooks/api.ts#L1227)*
|
|
268
|
-
|
|
269
|
-
AppsApi - factory interface
|
|
270
|
-
|
|
271
|
-
**Parameters:**
|
|
272
|
-
|
|
273
|
-
| Name | Type |
|
|
274
|
-
| ------ | ------ |
|
|
275
|
-
| `Optional` configuration | [Configuration](classes/configuration.md) |
|
|
276
|
-
| `Optional` basePath | `string` |
|
|
277
|
-
| `Optional` axios | `AxiosInstance` |
|
|
278
|
-
|
|
279
|
-
**Returns:** `object`
|
|
280
|
-
|
|
281
|
-
___
|
|
282
|
-
<a id="appsapifp"></a>
|
|
283
|
-
|
|
284
|
-
### `<Const>` AppsApiFp
|
|
285
|
-
|
|
286
|
-
▸ **AppsApiFp**(configuration?: *[Configuration](classes/configuration.md)*): `object`
|
|
287
|
-
|
|
288
|
-
*Defined in [api.ts:1191](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/hooks/api.ts#L1191)*
|
|
289
|
-
|
|
290
|
-
AppsApi - functional programming interface
|
|
291
|
-
|
|
292
|
-
**Parameters:**
|
|
293
|
-
|
|
294
|
-
| Name | Type |
|
|
295
|
-
| ------ | ------ |
|
|
296
|
-
| `Optional` configuration | [Configuration](classes/configuration.md) |
|
|
297
|
-
|
|
298
|
-
**Returns:** `object`
|
|
299
|
-
|
|
300
|
-
___
|
|
301
|
-
<a id="endpointsapiaxiosparamcreator"></a>
|
|
302
|
-
|
|
303
|
-
### `<Const>` EndpointsApiAxiosParamCreator
|
|
304
|
-
|
|
305
|
-
▸ **EndpointsApiAxiosParamCreator**(configuration?: *[Configuration](classes/configuration.md)*): `object`
|
|
306
|
-
|
|
307
|
-
*Defined in [api.ts:1287](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/hooks/api.ts#L1287)*
|
|
308
|
-
|
|
309
|
-
EndpointsApi - axios parameter creator
|
|
310
|
-
|
|
311
|
-
**Parameters:**
|
|
312
|
-
|
|
313
|
-
| Name | Type |
|
|
314
|
-
| ------ | ------ |
|
|
315
|
-
| `Optional` configuration | [Configuration](classes/configuration.md) |
|
|
316
|
-
|
|
317
|
-
**Returns:** `object`
|
|
318
|
-
|
|
319
|
-
___
|
|
320
|
-
<a id="endpointsapifactory"></a>
|
|
321
|
-
|
|
322
|
-
### `<Const>` EndpointsApiFactory
|
|
323
|
-
|
|
324
|
-
▸ **EndpointsApiFactory**(configuration?: *[Configuration](classes/configuration.md)*, basePath?: *`string`*, axios?: *`AxiosInstance`*): `object`
|
|
325
|
-
|
|
326
|
-
*Defined in [api.ts:1659](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/hooks/api.ts#L1659)*
|
|
327
|
-
|
|
328
|
-
EndpointsApi - factory interface
|
|
329
|
-
|
|
330
|
-
**Parameters:**
|
|
331
|
-
|
|
332
|
-
| Name | Type |
|
|
333
|
-
| ------ | ------ |
|
|
334
|
-
| `Optional` configuration | [Configuration](classes/configuration.md) |
|
|
335
|
-
| `Optional` basePath | `string` |
|
|
336
|
-
| `Optional` axios | `AxiosInstance` |
|
|
337
|
-
|
|
338
|
-
**Returns:** `object`
|
|
339
|
-
|
|
340
|
-
___
|
|
341
|
-
<a id="endpointsapifp"></a>
|
|
342
|
-
|
|
343
|
-
### `<Const>` EndpointsApiFp
|
|
344
|
-
|
|
345
|
-
▸ **EndpointsApiFp**(configuration?: *[Configuration](classes/configuration.md)*): `object`
|
|
346
|
-
|
|
347
|
-
*Defined in [api.ts:1563](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/hooks/api.ts#L1563)*
|
|
348
|
-
|
|
349
|
-
EndpointsApi - functional programming interface
|
|
350
|
-
|
|
351
|
-
**Parameters:**
|
|
352
|
-
|
|
353
|
-
| Name | Type |
|
|
354
|
-
| ------ | ------ |
|
|
355
|
-
| `Optional` configuration | [Configuration](classes/configuration.md) |
|
|
356
|
-
|
|
357
|
-
**Returns:** `object`
|
|
358
|
-
|
|
359
|
-
___
|
|
360
|
-
<a id="filtersapiaxiosparamcreator"></a>
|
|
361
|
-
|
|
362
|
-
### `<Const>` FiltersApiAxiosParamCreator
|
|
363
|
-
|
|
364
|
-
▸ **FiltersApiAxiosParamCreator**(configuration?: *[Configuration](classes/configuration.md)*): `object`
|
|
365
|
-
|
|
366
|
-
*Defined in [api.ts:1815](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/hooks/api.ts#L1815)*
|
|
367
|
-
|
|
368
|
-
FiltersApi - axios parameter creator
|
|
369
|
-
|
|
370
|
-
**Parameters:**
|
|
371
|
-
|
|
372
|
-
| Name | Type |
|
|
373
|
-
| ------ | ------ |
|
|
374
|
-
| `Optional` configuration | [Configuration](classes/configuration.md) |
|
|
375
|
-
|
|
376
|
-
**Returns:** `object`
|
|
377
|
-
|
|
378
|
-
___
|
|
379
|
-
<a id="filtersapifactory"></a>
|
|
380
|
-
|
|
381
|
-
### `<Const>` FiltersApiFactory
|
|
382
|
-
|
|
383
|
-
▸ **FiltersApiFactory**(configuration?: *[Configuration](classes/configuration.md)*, basePath?: *`string`*, axios?: *`AxiosInstance`*): `object`
|
|
384
|
-
|
|
385
|
-
*Defined in [api.ts:1888](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/hooks/api.ts#L1888)*
|
|
386
|
-
|
|
387
|
-
FiltersApi - factory interface
|
|
388
|
-
|
|
389
|
-
**Parameters:**
|
|
390
|
-
|
|
391
|
-
| Name | Type |
|
|
392
|
-
| ------ | ------ |
|
|
393
|
-
| `Optional` configuration | [Configuration](classes/configuration.md) |
|
|
394
|
-
| `Optional` basePath | `string` |
|
|
395
|
-
| `Optional` axios | `AxiosInstance` |
|
|
396
|
-
|
|
397
|
-
**Returns:** `object`
|
|
398
|
-
|
|
399
|
-
___
|
|
400
|
-
<a id="filtersapifp"></a>
|
|
401
|
-
|
|
402
|
-
### `<Const>` FiltersApiFp
|
|
403
|
-
|
|
404
|
-
▸ **FiltersApiFp**(configuration?: *[Configuration](classes/configuration.md)*): `object`
|
|
405
|
-
|
|
406
|
-
*Defined in [api.ts:1865](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/hooks/api.ts#L1865)*
|
|
407
|
-
|
|
408
|
-
FiltersApi - functional programming interface
|
|
409
|
-
|
|
410
|
-
**Parameters:**
|
|
411
|
-
|
|
412
|
-
| Name | Type |
|
|
413
|
-
| ------ | ------ |
|
|
414
|
-
| `Optional` configuration | [Configuration](classes/configuration.md) |
|
|
415
|
-
|
|
416
|
-
**Returns:** `object`
|
|
417
|
-
|
|
418
|
-
___
|
|
419
|
-
|
|
420
|
-
## Object literals
|
|
421
|
-
|
|
422
|
-
<a id="collection_formats"></a>
|
|
423
|
-
|
|
424
|
-
### `<Const>` COLLECTION_FORMATS
|
|
425
|
-
|
|
426
|
-
**COLLECTION_FORMATS**: *`object`*
|
|
427
|
-
|
|
428
|
-
*Defined in [api.ts:26](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/hooks/api.ts#L26)*
|
|
429
|
-
|
|
430
|
-
*__export__*:
|
|
431
|
-
|
|
432
|
-
<a id="collection_formats.csv"></a>
|
|
433
|
-
|
|
434
|
-
#### csv
|
|
435
|
-
|
|
436
|
-
**● csv**: *`string`* = ","
|
|
437
|
-
|
|
438
|
-
*Defined in [api.ts:27](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/hooks/api.ts#L27)*
|
|
439
|
-
|
|
440
|
-
___
|
|
441
|
-
<a id="collection_formats.pipes"></a>
|
|
442
|
-
|
|
443
|
-
#### pipes
|
|
444
|
-
|
|
445
|
-
**● pipes**: *`string`* = "|"
|
|
446
|
-
|
|
447
|
-
*Defined in [api.ts:30](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/hooks/api.ts#L30)*
|
|
448
|
-
|
|
449
|
-
___
|
|
450
|
-
<a id="collection_formats.ssv"></a>
|
|
451
|
-
|
|
452
|
-
#### ssv
|
|
453
|
-
|
|
454
|
-
**● ssv**: *`string`* = " "
|
|
455
|
-
|
|
456
|
-
*Defined in [api.ts:28](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/hooks/api.ts#L28)*
|
|
457
|
-
|
|
458
|
-
___
|
|
459
|
-
<a id="collection_formats.tsv"></a>
|
|
460
|
-
|
|
461
|
-
#### tsv
|
|
462
|
-
|
|
463
|
-
**● tsv**: *`string`* = " "
|
|
464
|
-
|
|
465
|
-
*Defined in [api.ts:29](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/hooks/api.ts#L29)*
|
|
466
|
-
|
|
467
|
-
___
|
|
468
|
-
|
|
469
|
-
___
|
|
59
|
+
## API documentation
|
|
470
60
|
|
|
61
|
+
* [README](doc/README.md)
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
[@redhat-cloud-services/notifications-client](../README.md) / [Exports](../modules.md) / BaseAPI
|
|
2
|
+
|
|
3
|
+
# Class: BaseAPI
|
|
4
|
+
|
|
5
|
+
Base API to store config, basepath and axios instance.
|
|
6
|
+
|
|
7
|
+
**`Export`**
|
|
8
|
+
|
|
9
|
+
## Table of contents
|
|
10
|
+
|
|
11
|
+
### Constructors
|
|
12
|
+
|
|
13
|
+
- [constructor](BaseAPI.md#constructor)
|
|
14
|
+
|
|
15
|
+
### Properties
|
|
16
|
+
|
|
17
|
+
- [axios](BaseAPI.md#axios)
|
|
18
|
+
- [basePath](BaseAPI.md#basepath)
|
|
19
|
+
- [configuration](BaseAPI.md#configuration)
|
|
20
|
+
|
|
21
|
+
### Methods
|
|
22
|
+
|
|
23
|
+
- [authConfig](BaseAPI.md#authconfig)
|
|
24
|
+
- [sendRequest](BaseAPI.md#sendrequest)
|
|
25
|
+
|
|
26
|
+
## Constructors
|
|
27
|
+
|
|
28
|
+
### constructor
|
|
29
|
+
|
|
30
|
+
• **new BaseAPI**(`basePath?`, `config?`)
|
|
31
|
+
|
|
32
|
+
Constructor to create baseAPI.
|
|
33
|
+
|
|
34
|
+
#### Parameters
|
|
35
|
+
|
|
36
|
+
| Name | Type | Default value | Description |
|
|
37
|
+
| :------ | :------ | :------ | :------ |
|
|
38
|
+
| `basePath` | `string` | `BASE_PATH` | basePath of api requests. |
|
|
39
|
+
| `config` | [`ApiConfig`](../interfaces/ApiConfig.md) | `undefined` | to be passed down to axios. |
|
|
40
|
+
|
|
41
|
+
#### Defined in
|
|
42
|
+
|
|
43
|
+
[packages/notifications/utils/base.ts:70](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/notifications/utils/base.ts#L70)
|
|
44
|
+
|
|
45
|
+
## Properties
|
|
46
|
+
|
|
47
|
+
### axios
|
|
48
|
+
|
|
49
|
+
• `Protected` **axios**: `AxiosInstance`
|
|
50
|
+
|
|
51
|
+
#### Defined in
|
|
52
|
+
|
|
53
|
+
[packages/notifications/utils/base.ts:64](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/notifications/utils/base.ts#L64)
|
|
54
|
+
|
|
55
|
+
___
|
|
56
|
+
|
|
57
|
+
### basePath
|
|
58
|
+
|
|
59
|
+
• `Protected` **basePath**: `string` = `BASE_PATH`
|
|
60
|
+
|
|
61
|
+
#### Defined in
|
|
62
|
+
|
|
63
|
+
[packages/notifications/utils/base.ts:70](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/notifications/utils/base.ts#L70)
|
|
64
|
+
|
|
65
|
+
___
|
|
66
|
+
|
|
67
|
+
### configuration
|
|
68
|
+
|
|
69
|
+
• `Protected` **configuration**: [`Configuration`](Configuration.md)
|
|
70
|
+
|
|
71
|
+
#### Defined in
|
|
72
|
+
|
|
73
|
+
[packages/notifications/utils/base.ts:63](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/notifications/utils/base.ts#L63)
|
|
74
|
+
|
|
75
|
+
## Methods
|
|
76
|
+
|
|
77
|
+
### authConfig
|
|
78
|
+
|
|
79
|
+
▸ `Private` **authConfig**(`__namedParameters`): `Promise`<`void`\>
|
|
80
|
+
|
|
81
|
+
#### Parameters
|
|
82
|
+
|
|
83
|
+
| Name | Type |
|
|
84
|
+
| :------ | :------ |
|
|
85
|
+
| `__namedParameters` | `Omit`<[`RequestArgs`](../interfaces/RequestArgs.md), ``"authType"`` \| ``"authKey"``\> & { `authKey?`: `string` \| [`string`, `string`[]] ; `authType`: [`AuthTypeEnum`](../modules.md#authtypeenum-1) } |
|
|
86
|
+
|
|
87
|
+
#### Returns
|
|
88
|
+
|
|
89
|
+
`Promise`<`void`\>
|
|
90
|
+
|
|
91
|
+
#### Defined in
|
|
92
|
+
|
|
93
|
+
[packages/notifications/utils/base.ts:83](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/notifications/utils/base.ts#L83)
|
|
94
|
+
|
|
95
|
+
___
|
|
96
|
+
|
|
97
|
+
### sendRequest
|
|
98
|
+
|
|
99
|
+
▸ **sendRequest**<`T`\>(`request`, `axios?`, `basePath?`): `Promise`<`AxiosResponse`<`T`\>\>
|
|
100
|
+
|
|
101
|
+
Send axios request
|
|
102
|
+
|
|
103
|
+
#### Type parameters
|
|
104
|
+
|
|
105
|
+
| Name |
|
|
106
|
+
| :------ |
|
|
107
|
+
| `T` |
|
|
108
|
+
|
|
109
|
+
#### Parameters
|
|
110
|
+
|
|
111
|
+
| Name | Type | Description |
|
|
112
|
+
| :------ | :------ | :------ |
|
|
113
|
+
| `request` | `Promise`<[`RequestArgs`](../interfaces/RequestArgs.md)\> | to be send trough axios. |
|
|
114
|
+
| `axios?` | `AxiosInstance` | optional axios instance. |
|
|
115
|
+
| `basePath?` | `string` | - |
|
|
116
|
+
|
|
117
|
+
#### Returns
|
|
118
|
+
|
|
119
|
+
`Promise`<`AxiosResponse`<`T`\>\>
|
|
120
|
+
|
|
121
|
+
promisable axios response.
|
|
122
|
+
|
|
123
|
+
#### Defined in
|
|
124
|
+
|
|
125
|
+
[packages/notifications/utils/base.ts:111](https://github.com/RedHatInsights/javascript-clients/blob/master/packages/notifications/utils/base.ts#L111)
|