1.6.46-add-zip-files • Published 1 year ago

@ailo/file-service-client v1.6.46-add-zip-files

Weekly downloads
33
License
MIT
Repository
github
Last release
1 year ago

@ailo/file-service-client

GraphQL Client to be used in Ailo services to access Internal API of file-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
1.6.31

1 year ago

1.6.27-PRJ-2715

2 years ago

1.6.28-PRJ-2715

2 years ago

1.6.29

2 years ago

1.6.24-PRJ-2715

2 years ago

1.6.26

2 years ago

1.6.25-PRJ-2715

2 years ago

1.6.23-PRJ-2715

2 years ago

1.6.21-PRJ-2715

2 years ago

1.6.22-PRJ-2715

2 years ago

1.6.20-PRJ-2715

2 years ago

1.6.12

2 years ago

1.6.17

2 years ago

1.6.19

2 years ago

1.6.11-PRJ-2660

2 years ago

1.6.16-set-token

2 years ago

1.6.7-MG-2713

2 years ago

1.6.9

2 years ago

1.6.8-MG-2713

2 years ago

1.6.2

2 years ago

1.6.1

2 years ago

1.6.4-tt-220

2 years ago

1.6.3-tt-220

2 years ago

1.5.41

2 years ago

1.6.2-tt-220

2 years ago

1.5.40

2 years ago

1.6.6

2 years ago

1.6.5

2 years ago

1.5.37

2 years ago

1.5.36

2 years ago

1.5.25

2 years ago

1.5.26

2 years ago

1.5.28

2 years ago

1.5.24

2 years ago

1.5.12

3 years ago

1.5.14

3 years ago

1.5.16

3 years ago

1.5.18

3 years ago

1.5.17

3 years ago

1.5.21

3 years ago

1.5.20

3 years ago

1.5.22

3 years ago

1.5.10

3 years ago

1.5.9

3 years ago

1.5.11

3 years ago

1.5.8

3 years ago

1.5.7

3 years ago

1.5.6

3 years ago

1.5.5

4 years ago

1.5.4

4 years ago

1.5.3

4 years ago

1.5.2

4 years ago

1.4.1

4 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago