3.5.1 • Published 11 months ago

copilot-node-sdk v3.5.1

Weekly downloads
-
License
-
Repository
-
Last release
11 months 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

11 months ago

3.5.0

1 year 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

2 years ago

0.0.41

2 years ago

0.0.42

2 years ago

0.0.43

2 years ago

0.0.44

2 years ago

0.0.22

2 years ago

0.0.45

2 years ago

0.0.23

2 years ago

0.0.24

2 years ago

0.0.25

2 years ago

0.0.37

2 years ago

0.0.38

2 years ago

0.0.39

2 years ago

0.0.30

2 years ago

0.0.31

2 years ago

0.0.32

2 years ago

0.0.33

2 years ago

0.0.34

2 years ago

0.0.35

2 years ago

0.0.36

2 years ago

0.0.26

2 years ago

0.0.27

2 years ago

0.0.28

2 years ago

0.0.29

2 years ago

0.0.21

2 years ago

0.0.20

2 years ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago