0.0.58 • Published 4 years ago
@ailo/reporting-service-client v0.0.58
@ailo/reporting-service-client
GraphQL Client to be used in Ailo services to access Internal API of reporting-service.
Example usage
// fileServiceClient.ts
import { FileServiceClient } from "@ailo/file-service-client";
import { AccessToken } from "@ailo/events";
import { config, Logger } from "local/app/utils";
const serviceAccessToken = new AccessToken(
config.auth0.domain,
config.auth0.clientId,
config.auth0.clientSecret,
config.auth0.audience
);
export const fileServiceClient = new FileServiceClient({
baseUrl: config.fileService.url,
logger: Logger.logAs("fileServiceClient"),
getAccessToken: () => serviceAccessToken.getAccessToken(),
});
// ChatService.ts
await fileServiceClient.claimFiles({
filesIds,
ownerId: (await securityContext.authorizeUser())
.getActualUserAilorn()
.toString(),
claimerId: chatMessageId,
permittedReadEntitiesIds: getChatReadAccessEntitiesIds(chat),
});
Development
yarn
yarn start
Testing
yarn lint # prettier and eslint
yarn test # unit tests
yarn test --watch # unit tests in watch mode
Releasing
yarn release # will automatically ask you about version bump, run tests and build, and push new version to git & npm
0.0.51
4 years ago
0.0.52
4 years ago
0.0.56
4 years ago
0.0.58
4 years ago
0.0.50
4 years ago
0.0.49
4 years ago
0.0.48
4 years ago
0.0.46
4 years ago
0.0.47
4 years ago
0.0.44
4 years ago
0.0.45
4 years ago
0.0.43
4 years ago
0.0.38
4 years ago
0.0.39
4 years ago
0.0.30
4 years ago
0.0.31
4 years ago
0.0.32
4 years ago
0.0.33
4 years ago
0.0.34
4 years ago
0.0.36
4 years ago
0.0.26
4 years ago
0.0.27
4 years ago
0.0.29
4 years ago
0.0.25
4 years ago
0.0.24
4 years ago
0.0.22
4 years ago
0.0.20
4 years ago
0.0.16
4 years ago
0.0.17
4 years ago
0.0.19
4 years ago
0.0.15
4 years ago
0.0.14
4 years ago
0.0.13
4 years ago
0.0.11
4 years ago
0.0.9
4 years ago
0.0.6
4 years ago
0.0.5
4 years ago
0.0.4
4 years ago
0.0.3
4 years ago
0.0.2
4 years ago