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
49
+
Refer `index.js` for the list of available wrapper functions
50
+
51
+
## Documentation for Bus API wrapper methods
52
+
53
+
All URIs are relative to **BUSAPI_URL** configuration variable.
54
+
55
+
Method | HTTP request | Description
56
+
------------- | ------------- | -------------
57
+
[**postEvent**](docs/EventsApi.md#postEvent) | **POST** /bus/events | Post event to the message bus.
58
+
[**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.
59
+
[**getHealth**](docs/HealthchecksApi.md#getHealth) | **GET** /bus/health | Check API is healthy.
60
+
[**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.
63
+
[**createServicePayload**](docs/ServiceApi.md#createServicePayload) | **POST** /bus/services/{serviceName}/payloads | Create the service payload.
64
+
[**deleteService**](docs/ServiceApi.md#deleteService) | **DELETE** /bus/services/{serviceName} | Delete the service.
65
+
[**deleteServicePayload**](docs/ServiceApi.md#deleteServicePayload) | **DELETE** /bus/services/{serviceName}/payloads/{payloadName} | Delete the service payload.
66
+
[**getService**](docs/ServiceApi.md#getService) | **GET** /bus/services/{serviceName} | Get the service.
67
+
[**getServicePayload**](docs/ServiceApi.md#getServicePayload) | **GET** /bus/services/{serviceName}/payloads/{payloadName} | Get the service payload.
68
+
[**getServicePayloads**](docs/ServiceApi.md#getServicePayloads) | **GET** /bus/services/{serviceName}/payloads | Search the service payloads.
69
+
[**getServices**](docs/ServiceApi.md#getServices) | **GET** /bus/services | Get all services.
70
+
[**headService**](docs/ServiceApi.md#headService) | **HEAD** /bus/services/{serviceName} | Get only response status and headers information but no response body for the endpoint.
71
+
[**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.
72
+
[**headServicePayloads**](docs/ServiceApi.md#headServicePayloads) | **HEAD** /bus/services/{serviceName}/payloads | Get only response status and headers information but no response body for the endpoint.
73
+
[**headServices**](docs/ServiceApi.md#headServices) | **HEAD** /bus/services | Get only response status and headers information but no response body for the endpoint.
74
+
[**patchService**](docs/ServiceApi.md#patchService) | **PATCH** /bus/services/{serviceName} | Partially update the service.
75
+
[**patchServicePayload**](docs/ServiceApi.md#patchServicePayload) | **PATCH** /bus/services/{serviceName}/payloads/{payloadName} | Partially update the payload.
76
+
[**updateService**](docs/ServiceApi.md#updateService) | **PUT** /bus/services/{serviceName} | Update the service.
77
+
[**updateServicePayload**](docs/ServiceApi.md#updateServicePayload) | **PUT** /bus/services/{serviceName}/payloads/{payloadName} | Update the service payload.
78
+
[**getTopics**](docs/TopicsApi.md#getTopics) | **GET** /bus/topics | Get topics.
79
+
[**headTopics**](docs/TopicsApi.md#headTopics) | **HEAD** /bus/topics | Get only response status and headers information but no response body for the endpoint.
80
+
81
+
## Authorization
82
+
83
+
Bus API wrapper internally generates a **JWT token using Auth0 credentials** and pass it in the `Authorization` header.
84
+
85
+
## Running tests
86
+
87
+
Following environment variables need to be set up before running the tests
88
+
89
+
```
90
+
- TEST_AUTH0_URL
91
+
- TEST_AUTH0_AUDIENCE
92
+
- TEST_AUTH0_CLIENT_ID
93
+
- TEST_AUTH0_CLIENT_SECRET
94
+
- TEST_BUS_API_URL
95
+
- TEST_KAFKA_ERROR_TOPIC
96
+
```
97
+
98
+
Refer to Step # 2 in [this section](#how-to-use-this-wrapper) to learn more about the configuration variables.
99
+
100
+
To run the tests alone, execute the command
101
+
102
+
```
103
+
npm run test
104
+
```
105
+
106
+
To run tests with coverage report, execute the command
**topic** | **String** | Topic name should be a dot separated fully qualified name i.e. domain.type.operation. |
7
+
**originator** | **String** | Service repository name, from where message is published. |
8
+
**timestamp** | **Date** | Timestamp at which message is published. The date-time notation as defined by RFC 3339, section 5.6, for example, 2018-04-13T00:00:00Z |
9
+
**mimeType** | **String** | Mime-type for 'payload'. |
10
+
**payload** | **Object** | Actual payload depending on mime-type for consumer. |
**originator** | **String** | Service repository name, from where message is published. |
7
+
**timestamp** | **Date** | Timestamp at which message is published. The date-time notation as defined by RFC 3339, section 5.6, for example, 2018-04-13T00:00:00Z |
8
+
**mimeType** | **String** | Mime-type for 'payload'. |
9
+
**payload** | **Object** | Actual payload depending on mime-type for consumer. |
All URIs are relative to **BUSAPI_URL** configuration variable.
4
+
5
+
Method | HTTP request | Description
6
+
------------- | ------------- | -------------
7
+
[**getHealth**](HealthchecksApi.md#getHealth) | **GET** /bus/health | Check if API is healthy.
8
+
[**headHealth**](HealthchecksApi.md#headHealth) | **HEAD** /bus/health | Get only response status and headers information but no response body for the endpoint.
0 commit comments