3.5.1 • Published 1 year ago

copilot-node-sdk v3.5.1

Weekly downloads
-
License
-
Repository
-
Last release
1 year 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.

3.5.1

1 year ago

3.5.0

2 years ago

3.2.0

2 years ago

3.0.0

2 years ago

2.3.0

2 years ago

2.2.0

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.3.0

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.0.0

2 years ago

0.0.40

3 years ago

0.0.41

3 years ago

0.0.42

3 years ago

0.0.43

3 years ago

0.0.44

3 years ago

0.0.22

3 years ago

0.0.45

3 years ago

0.0.23

3 years ago

0.0.24

3 years ago

0.0.25

3 years ago

0.0.37

3 years ago

0.0.38

3 years ago

0.0.39

3 years ago

0.0.30

3 years ago

0.0.31

3 years ago

0.0.32

3 years ago

0.0.33

3 years ago

0.0.34

3 years ago

0.0.35

3 years ago

0.0.36

3 years ago

0.0.26

3 years ago

0.0.27

3 years ago

0.0.28

3 years ago

0.0.29

3 years ago

0.0.21

3 years ago

0.0.20

3 years ago

0.0.19

3 years ago

0.0.18

3 years ago

0.0.17

3 years ago

0.0.16

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.0

3 years ago