You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refer `index.js` for the list of available wrapper functions
48
+
49
+
## Documentation for Bus API wrapper methods
50
+
51
+
All URIs are relative to **BUSAPI_URL** configuration variable.
52
+
53
+
Method | HTTP request | Description
54
+
------------- | ------------- | -------------
55
+
[**postEvent**](docs/EventsApi.md#postEvent) | **POST** /bus/events | Post event to the message bus.
56
+
[**postError**](docs/EventsApi.md#postError) | **POST** /bus/events | Post error event to the message bus. This method is same as postEvent except that topic will be set by the wrapper itself.
57
+
[**getHealth**](docs/HealthchecksApi.md#getHealth) | **GET** /bus/health | Check API is healthy.
58
+
[**headHealth**](docs/HealthchecksApi.md#headHealth) | **HEAD** /bus/health | Get only response status and headers information but no response body for the endpoint.
[**createService**](docs/ServiceApi.md#createService) | **POST** /bus/services | Create a service.
61
+
[**createServicePayload**](docs/ServiceApi.md#createServicePayload) | **POST** /bus/services/{serviceName}/payloads | Create the service payload.
62
+
[**deleteService**](docs/ServiceApi.md#deleteService) | **DELETE** /bus/services/{serviceName} | Delete the service.
63
+
[**deleteServicePayload**](docs/ServiceApi.md#deleteServicePayload) | **DELETE** /bus/services/{serviceName}/payloads/{payloadName} | Delete the service payload.
64
+
[**getService**](docs/ServiceApi.md#getService) | **GET** /bus/services/{serviceName} | Get the service.
65
+
[**getServicePayload**](docs/ServiceApi.md#getServicePayload) | **GET** /bus/services/{serviceName}/payloads/{payloadName} | Get the service payload.
66
+
[**getServicePayloads**](docs/ServiceApi.md#getServicePayloads) | **GET** /bus/services/{serviceName}/payloads | Search the service payloads.
67
+
[**getServices**](docs/ServiceApi.md#getServices) | **GET** /bus/services | Get all services.
68
+
[**headService**](docs/ServiceApi.md#headService) | **HEAD** /bus/services/{serviceName} | Get only response status and headers information but no response body for the endpoint.
69
+
[**headServicePayload**](docs/ServiceApi.md#headServicePayload) | **HEAD** /bus/services/{serviceName}/payloads/{payloadName} | Get only response status and headers information but no response body for the endpoint.
70
+
[**headServicePayloads**](docs/ServiceApi.md#headServicePayloads) | **HEAD** /bus/services/{serviceName}/payloads | Get only response status and headers information but no response body for the endpoint.
71
+
[**headServices**](docs/ServiceApi.md#headServices) | **HEAD** /bus/services | Get only response status and headers information but no response body for the endpoint.
72
+
[**patchService**](docs/ServiceApi.md#patchService) | **PATCH** /bus/services/{serviceName} | Partially update the service.
73
+
[**patchServicePayload**](docs/ServiceApi.md#patchServicePayload) | **PATCH** /bus/services/{serviceName}/payloads/{payloadName} | Partially update the payload.
74
+
[**updateService**](docs/ServiceApi.md#updateService) | **PUT** /bus/services/{serviceName} | Update the service.
75
+
[**updateServicePayload**](docs/ServiceApi.md#updateServicePayload) | **PUT** /bus/services/{serviceName}/payloads/{payloadName} | Update the service payload.
76
+
[**getTopics**](docs/TopicsApi.md#getTopics) | **GET** /bus/topics | Get topics.
77
+
[**headTopics**](docs/TopicsApi.md#headTopics) | **HEAD** /bus/topics | Get only response status and headers information but no response body for the endpoint.
78
+
79
+
## Authorization
80
+
81
+
Bus API wrapper internally generates a **JWT token using Auth0 credentials** and pass it in the `Authorization` header.
82
+
83
+
## Running tests
84
+
85
+
Following environment variables need to be set up before running the tests
86
+
87
+
```
88
+
- TEST_AUTH0_URL
89
+
- TEST_AUTH0_AUDIENCE
90
+
- TEST_AUTH0_CLIENT_ID
91
+
- TEST_AUTH0_CLIENT_SECRET
92
+
- TEST_BUS_API_URL
93
+
- TEST_KAFKA_ERROR_TOPIC
94
+
```
95
+
96
+
Refer to Step # 2 in [this section](#how-to-use-this-wrapper) to learn more about the configuration variables.
97
+
98
+
To run the tests alone, execute the command
99
+
100
+
```
101
+
npm run test
102
+
```
103
+
104
+
To run tests with coverage report, execute the command
0 commit comments