0.0.58 • Published 5 years ago

@ailo/reporting-service-client v0.0.58

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

@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

5 years ago

0.0.52

5 years ago

0.0.56

5 years ago

0.0.58

5 years ago

0.0.50

5 years ago

0.0.49

5 years ago

0.0.48

5 years ago

0.0.46

5 years ago

0.0.47

5 years ago

0.0.44

5 years ago

0.0.45

5 years ago

0.0.43

5 years ago

0.0.38

5 years ago

0.0.39

5 years ago

0.0.30

5 years ago

0.0.31

5 years ago

0.0.32

5 years ago

0.0.33

5 years ago

0.0.34

5 years ago

0.0.36

5 years ago

0.0.26

5 years ago

0.0.27

5 years ago

0.0.29

5 years ago

0.0.25

5 years ago

0.0.24

5 years ago

0.0.22

5 years ago

0.0.20

5 years ago

0.0.16

5 years ago

0.0.17

5 years ago

0.0.19

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.11

5 years ago

0.0.9

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago