1.13.26 • Published 5 years ago

@cheapreats/ts-sdk v1.13.26

Weekly downloads
150
License
MIT
Repository
github
Last release
5 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

5 years ago

1.13.25

5 years ago

1.13.23

5 years ago

1.13.22

5 years ago

1.13.20

5 years ago

1.13.19

5 years ago

1.13.18

5 years ago

1.13.17

5 years ago

1.13.16

5 years ago

1.13.15

5 years ago

1.13.13

5 years ago

1.13.14

5 years ago

1.13.12

5 years ago

1.13.11

5 years ago

1.13.10

5 years ago

1.13.8

5 years ago

1.13.7

5 years ago

1.13.6

5 years ago

1.13.5

5 years ago

1.13.4

5 years ago

1.13.3

5 years ago

1.13.2

5 years ago

1.12.18

5 years ago

1.13.1

5 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

6 years ago

1.11.4

6 years ago

1.11.3

6 years ago

1.11.5

6 years ago

1.11.0

6 years ago

1.11.1

6 years ago

1.10.56

6 years ago

1.10.55

6 years ago

1.10.54

6 years ago

1.10.53

6 years ago

1.10.52

6 years ago

1.10.51

6 years ago

1.10.48

6 years ago

1.10.49

6 years ago

1.10.46

6 years ago

1.10.47

6 years ago

1.10.45

6 years ago

1.10.50

6 years ago

1.10.43

6 years ago

1.10.41

6 years ago

1.10.42

6 years ago

1.10.40

6 years ago

1.10.39

6 years ago

1.10.38

6 years ago

1.10.37

6 years ago

1.10.35

6 years ago

1.10.36

6 years ago

1.10.34

6 years ago

1.10.33

6 years ago

1.10.32

6 years ago

1.10.31

6 years ago

1.10.30

6 years ago

1.10.29

6 years ago

1.10.28

6 years ago

1.10.26

6 years ago

1.10.27

6 years ago

1.10.25

6 years ago

1.10.24

6 years ago

1.10.23

6 years ago

1.10.22

6 years ago

1.10.21

6 years ago

1.10.20

6 years ago

1.10.19

6 years ago

1.10.18

6 years ago

1.10.17

6 years ago

1.10.16

6 years ago

1.10.15

6 years ago

1.10.14

6 years ago

1.10.13

6 years ago

1.10.12

6 years ago

1.10.11

6 years ago

1.10.10

6 years ago

1.10.9

6 years ago

1.10.8

6 years ago