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
Copy file name to clipboardExpand all lines: README.md
+15-6Lines changed: 15 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@
18
18
# Description
19
19
This library provides some of the most common component development functionality in a simple, reusable way.
20
20
21
-
To install, type
21
+
To install, type
22
22
23
23
```
24
24
npm install @elastic.io/component-commons-library
@@ -32,7 +32,7 @@ A number of REST Client classes are available to use and extend to create Client
32
32
Each of the REST Clients extends from the `NoAuthRestClient`, overriding the relevant methods.
33
33
34
34
### NoAuthRestClient
35
-
[NoAuthRestClient](https://github.com/elasticio/component-commons-library/blob/master/lib/authentication/NoAuthRestClient.ts) class to make rest requests no no auth APIs by provided options.
35
+
[NoAuthRestClient](https://github.com/elasticio/component-commons-library/blob/master/lib/authentication/NoAuthRestClient.ts) class to make rest requests no no auth APIs by provided options.
36
36
37
37
#### constructor(emitter, cfg)
38
38
- emitter - EIO emitting context.
@@ -123,12 +123,12 @@ This class can handle, refresh and emit oauth2 EIO configuration.
class extends [NoAuthRestClient](#NoAuthRestClient) class.
126
-
Makes requests to resource with [NTLM authentication](https://en.wikipedia.org/wiki/NT_LAN_Manager).
127
-
Falls back to basic authentication if NTLM authentication fails.
126
+
Makes requests to resource with [NTLM authentication](https://en.wikipedia.org/wiki/NT_LAN_Manager).
127
+
Falls back to basic authentication if NTLM authentication fails.
128
128
Handles both V1 and V2 of the NTLM Protocol.
129
129
130
130
#### constructor(emitter, cfg)
131
-
- cfg.username - mandatory cfg parameter contains username for authorization. Domain information should be combined with this field. (e.g. `SOMEDOMAIN\SomeUser`)
131
+
- cfg.username - mandatory cfg parameter contains username for authorization. Domain information should be combined with this field. (e.g. `SOMEDOMAIN\SomeUser`)
132
132
- cfg.password - mandatory cfg parameter contains password for authorization.
133
133
134
134
```
@@ -150,7 +150,9 @@ Contains functions to transform platform data that contains JSONata expressions
150
150
The attachment processor function can be used to store attachments on the platform. It exposes the following functions
151
151
152
152
-`uploadAttachment(streamContent)`, which will upload an attachment to the platform and return the result and file url
153
-
-`getAttachment(url, contentType)`, which will retrieve an attachment from the platform
153
+
-`getAttachment(url, contentType)`, which will retrieve an attachment from `steward` or `maester` storage. To specify the storage - query parameter
154
+
`storage_type` must be provided. To get items from `maester` storage - `?storage_type=maester` should added to the `url` argument. By default attachments are retrieved from `steward` storage, so `?storage_type=steward` is not obligated to be added to the `url` argument. `contentType` -
155
+
one of [`stream`, `arraybuffer`]
154
156
155
157
Example:
156
158
@@ -162,6 +164,13 @@ const result = await new AttachmentProcessor().uploadAttachment(stream);
The built in logger uses Bunyan Logger as its base implementation. The available logger methods can be found [here](https://github.com/elasticio/component-commons-library/blob/master/lib/logger/logger.ts#L19).
0 commit comments