1.13.26 • Published 3 years ago

@cheapreats/ts-sdk v1.13.26

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

3 years ago

1.13.25

3 years ago

1.13.23

3 years ago

1.13.22

3 years ago

1.13.20

3 years ago

1.13.19

3 years ago

1.13.18

3 years ago

1.13.17

3 years ago

1.13.16

3 years ago

1.13.15

3 years ago

1.13.13

3 years ago

1.13.14

3 years ago

1.13.12

3 years ago

1.13.11

3 years ago

1.13.10

3 years ago

1.13.8

3 years ago

1.13.7

3 years ago

1.13.6

3 years ago

1.13.5

3 years ago

1.13.4

3 years ago

1.13.3

3 years ago

1.13.2

3 years ago

1.12.18

3 years ago

1.13.1

3 years ago

1.12.17

3 years ago

1.12.16

3 years ago

1.12.15

4 years ago

1.12.14

4 years ago

1.12.12

4 years ago

1.12.9

4 years ago

1.12.10

4 years ago

1.12.11

4 years ago

1.12.8

4 years ago

1.12.7

4 years ago

1.12.6

4 years ago

1.12.5

4 years ago

1.12.4

4 years ago

1.12.3

4 years ago

1.12.2

4 years ago

1.12.1

4 years ago

1.12.0

4 years ago

1.11.4

4 years ago

1.11.3

4 years ago

1.11.5

4 years ago

1.11.0

4 years ago

1.11.1

4 years ago

1.10.56

4 years ago

1.10.55

4 years ago

1.10.54

4 years ago

1.10.53

4 years ago

1.10.52

4 years ago

1.10.51

4 years ago

1.10.48

4 years ago

1.10.49

4 years ago

1.10.46

4 years ago

1.10.47

4 years ago

1.10.45

4 years ago

1.10.50

4 years ago

1.10.43

4 years ago

1.10.41

4 years ago

1.10.42

4 years ago

1.10.40

4 years ago

1.10.39

4 years ago

1.10.38

4 years ago

1.10.37

4 years ago

1.10.35

4 years ago

1.10.36

4 years ago

1.10.34

4 years ago

1.10.33

4 years ago

1.10.32

4 years ago

1.10.31

4 years ago

1.10.30

4 years ago

1.10.29

4 years ago

1.10.28

4 years ago

1.10.26

4 years ago

1.10.27

4 years ago

1.10.25

4 years ago

1.10.24

4 years ago

1.10.23

4 years ago

1.10.22

4 years ago

1.10.21

4 years ago

1.10.20

4 years ago

1.10.19

4 years ago

1.10.18

4 years ago

1.10.17

4 years ago

1.10.16

4 years ago

1.10.15

4 years ago

1.10.14

4 years ago

1.10.13

4 years ago

1.10.12

4 years ago

1.10.11

4 years ago

1.10.10

4 years ago

1.10.9

4 years ago

1.10.8

4 years ago