2.3.0 • Published 3 days ago

copilot-node-sdk v2.3.0

Weekly downloads
-
License
-
Repository
-
Last release
3 days ago

Copilot Node.JS SDK

The Copilot Node.JS SDK provides easy to call functions written in TypeScript for interacting with the Copilot REST API. Right now this is a TypeScript only package. In the future we will have a Vanilla JS package with a corresponding @types package to go along with it.

This SDK is intended to be used on the server-side only. We do not currently offer a package for client-side development.

Setup

For Custom Apps

import { copilotApi } from 'copilot-node-sdk';

const copilot = copilotApi({ apiKey: YOUR_API_KEY_HERE });

For Marketplace Apps

If you're building a Marketplace app you should go through one additional step of fetching a query parameter that gets passed into the App URL when rendered in the Copilot dashboard: ?token=TOKEN_IS_HERE

Grab that token from the URL and pass it in to the copilotApi configuration object.

import { copilotApi } from 'copilot-node-sdk';


const copilot = copilotApi({
  apiKey: YOUR_API_KEY_HERE,
  token: searchParams.token,
});

How to develop this package internally:

  1. yarn
  2. yarn generate-api
  3. yarn test to produce a successful response
  4. yarn test:fail to product a response that fails because of a missing env variable.

For additional logging you can set the environment variable COPILOT_DEBUG to any truthy value. This is useful if you'd like to see SDK logs while developing in an application's codebase.

2.3.0

3 days ago

2.2.0

28 days ago

2.1.0

28 days ago

2.0.0

2 months ago

1.3.0

2 months ago

1.2.2

3 months ago

1.2.1

3 months ago

1.2.0

3 months ago

1.1.1

3 months ago

1.1.3

3 months ago

1.1.2

3 months ago

1.0.0

3 months ago

0.0.40

5 months ago

0.0.41

5 months ago

0.0.42

5 months ago

0.0.43

5 months ago

0.0.44

5 months ago

0.0.22

5 months ago

0.0.45

5 months ago

0.0.23

5 months ago

0.0.24

5 months ago

0.0.25

5 months ago

0.0.37

5 months ago

0.0.38

5 months ago

0.0.39

5 months ago

0.0.30

5 months ago

0.0.31

5 months ago

0.0.32

5 months ago

0.0.33

5 months ago

0.0.34

5 months ago

0.0.35

5 months ago

0.0.36

5 months ago

0.0.26

5 months ago

0.0.27

5 months ago

0.0.28

5 months ago

0.0.29

5 months ago

0.0.21

5 months ago

0.0.20

5 months ago

0.0.19

5 months ago

0.0.18

5 months ago

0.0.17

5 months ago

0.0.16

5 months ago

0.0.15

5 months ago

0.0.14

5 months ago

0.0.13

5 months ago

0.0.12

5 months ago

0.0.11

5 months ago

0.0.10

5 months ago

0.0.9

5 months ago

0.0.7

5 months ago

0.0.6

5 months ago

0.0.5

5 months ago

0.0.4

5 months ago

0.0.3

5 months ago

0.0.2

5 months ago

0.0.1

5 months ago

0.0.0

5 months ago