1.13.26 • Published 4 years ago

@cheapreats/ts-sdk v1.13.26

Weekly downloads
150
License
MIT
Repository
github
Last release
4 years ago

CheaprEats TypeScript SDK

npm version Documentation

CheaprEats TypeScript SDK

$ npm install @cheapreats/ts-sdk

Using the Published SDK Version

import CE, { Enums } from '@cheapreats/ts-sdk';

Using the SDK Locally

Locally importing is used typically while testing new SDK method implementations.

First build the package npm run build

Make sure src/enums.ts exists. If it does not, run npm run transpile (must be logged in to Github package registry)

import CE, { Enums } from 'path/to/ts-sdk/root';

Root folder is fine, it is not necessary to add /dist

When updating type definitions, please use src/enums rather than handcrafting your own enums when possible

If enum is not in src/enums, consider adding it to graphql-api if it would benefit backend

Example Usage

import CE, { Enums } from '@cheapreats/ts-sdk';

CE.setAuthenticationToken('YOUR_TOKEN');

CE.Verification.sendSms(12508574718)
.then(verification_request_id => console.log("SMS Sent", verification_request_id))
.catch(e => console.log(e));

console.log(Enums.ResetCodeSendMethod.SMS);

Auto-generating code for New Mutation

The npm run add:mutation <Object>.<methodName> command auto-generates code for the Object and methodName passed.

For example - npm run add:mutation Category.batchArchive

Publishing to NPM

Ensure that package version in feature branch is ahead of master branch, otherwise publish will fail

Automatic:

By default package is automatically published anytime a change is made on master

Manual:

If package is to be published manually, execute following commands:

  • npm install
  • npm run build
  • npm publish
1.13.26

4 years ago

1.13.25

4 years ago

1.13.23

4 years ago

1.13.22

4 years ago

1.13.20

4 years ago

1.13.19

4 years ago

1.13.18

4 years ago

1.13.17

4 years ago

1.13.16

4 years ago

1.13.15

4 years ago

1.13.13

4 years ago

1.13.14

4 years ago

1.13.12

4 years ago

1.13.11

4 years ago

1.13.10

4 years ago

1.13.8

4 years ago

1.13.7

4 years ago

1.13.6

4 years ago

1.13.5

4 years ago

1.13.4

4 years ago

1.13.3

4 years ago

1.13.2

4 years ago

1.12.18

4 years ago

1.13.1

4 years ago

1.12.17

5 years ago

1.12.16

5 years ago

1.12.15

5 years ago

1.12.14

5 years ago

1.12.12

5 years ago

1.12.9

5 years ago

1.12.10

5 years ago

1.12.11

5 years ago

1.12.8

5 years ago

1.12.7

5 years ago

1.12.6

5 years ago

1.12.5

5 years ago

1.12.4

5 years ago

1.12.3

5 years ago

1.12.2

5 years ago

1.12.1

5 years ago

1.12.0

5 years ago

1.11.4

5 years ago

1.11.3

5 years ago

1.11.5

5 years ago

1.11.0

5 years ago

1.11.1

5 years ago

1.10.56

5 years ago

1.10.55

5 years ago

1.10.54

5 years ago

1.10.53

5 years ago

1.10.52

5 years ago

1.10.51

5 years ago

1.10.48

5 years ago

1.10.49

5 years ago

1.10.46

5 years ago

1.10.47

5 years ago

1.10.45

5 years ago

1.10.50

5 years ago

1.10.43

5 years ago

1.10.41

5 years ago

1.10.42

5 years ago

1.10.40

5 years ago

1.10.39

5 years ago

1.10.38

5 years ago

1.10.37

5 years ago

1.10.35

5 years ago

1.10.36

5 years ago

1.10.34

5 years ago

1.10.33

5 years ago

1.10.32

5 years ago

1.10.31

5 years ago

1.10.30

5 years ago

1.10.29

5 years ago

1.10.28

5 years ago

1.10.26

5 years ago

1.10.27

5 years ago

1.10.25

5 years ago

1.10.24

5 years ago

1.10.23

5 years ago

1.10.22

5 years ago

1.10.21

5 years ago

1.10.20

5 years ago

1.10.19

5 years ago

1.10.18

5 years ago

1.10.17

5 years ago

1.10.16

5 years ago

1.10.15

5 years ago

1.10.14

5 years ago

1.10.13

5 years ago

1.10.12

5 years ago

1.10.11

5 years ago

1.10.10

5 years ago

1.10.9

5 years ago

1.10.8

5 years ago