⚠️ DISCLAIMER!The epilot SDK is in
beta. Missing features, incomplete documentation and breaking API changes are to be expected!
npm install --save epilot-sdkimport { authorizeWithToken } from 'epilot-sdk/auth'; import entityClient from 'epilot-sdk/entity-client'; // authorize client using an access token authorizeWithToken(entityClient, '<my_access_token>'); // use epilot client await entityClient.createEntity('contact', { first_name: 'Example', last_name: 'Contact' });To update a client package with a new API definition, you should have made the changes already on the current API repo.
openapi.json directly, such approach will most certainly lead to you losing your changes on a future release.
## navigate into you client folder cd clients/entity-client ## update openapi.json with the new API spec (if already deployed to prod) npm run openapi ## shortcut: if the desired openapi spec is still deploying, but will be in prod soon. npm run openapi <path/to/local/openapi.yml> ## build and generate new types npm run typegen && npm run build ## commit your changes git commit -am 'chore(entity-client): update client with new spec'This monorepo uses Changesets for version management and publishing.
# Create a changeset (interactive prompt) pnpm changeset # Apply version bumps pnpm version-packages # Publish to npm (requires 2FA) pnpm publish-packagesTo bump and publish all client packages at once:
# 1. Create a changeset file manually or use the changeset command # Example: .changeset/minor-bump-all-clients.md with all client packages listed # 2. Apply version bumps to all packages pnpm version-packages # 3. Publish all updated packages (requires 2FA authentication) pnpm publish-packages # NOTE: you may need to run this multiple times due to NPM rate limitingFor bulk updates, create a file in .changeset/ directory:
--- "@epilot/entity-client": minor "@epilot/file-client": patch --- Description of changespnpm changeset- Create a new changesetpnpm version-packages- Apply version bumps based on changesetspnpm publish-packages- Publish updated packages to npm
The epilot Javascript SDK is free and open source software. PRs welcome!
🚀
