@lokalise/file-storage-service-sdk
v11.0.0
Published
SDK for file-storage-service
Downloads
6,564
Readme
file-storage-service-sdk
Sdk for file-storage-service - FSS.
Usage
Sdk exposes FileStorageClient which can be injected via DI or created directly.
Authorization
Authorization will require a valid jwtToken.
For FileStorageClient token should contain 2 claims - ownerId and tenant.
Tenant is a string which represents who is calling the api, supported values are expert and autopilot.
Error handling
All functions return Either<L, R>, where L is an error and R is a result.
Exactly one of them is present in each response.
The API consumer is responsible for handling both cases.
Error reporting
You can pass an {errorReporter: ErrorReporter} field inside the config argument.
The error reporter will then be called in all cases when an error response is returned for a request to file storage
service API.
