0.3.8 • Published 1 year ago

chekin-sdk v0.3.8

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Chekin SDK Client

FOR CHEKIN PRO MUST BE VERSION 0.3.2 FOR NEW GUESAPP VERSION 2.0.0 (IMPROVE)

The objective of this project, its build a sdk where our customers can connect with chekin API and implement our checkin process in their sites.

This project it's only a temporary starter project, all the files, functions, dependencies etc., could be change to improve the code and the functionality of the project

Chekin SDK is a software development kit that allows us to consume api methods for the implementation of the check-in process in third-party sites

Features

  • Get reservation info from reservation ID
  • Creation of guest in reservation
  • Get Booking Details (to develop)
  • Identity verification process (to develop)
  • Get locations
  • Creation of reservation

Dev dependencies

  • js-cookie - for storing data in cookies.
  • Babel - to transpile javascript to es6.
  • webpack - to generate builds for library usage.
  • Typescript - for development.
  • refresh-fetch - To keep a valid token authorize request (temporary, we will change the auth process)
  • dayjs - To work with dates

And of course Dillinger itself is open source with a public repository on GitHub.

Installation

Chekin sdk requires Node.js v10+ to run.

Install the dependencies and devDependencies and start the server.

cd chekin-sdk
yarn install

Project structure

|-- lib //bundles and test file
|   |-- Chekin.amd.js
|   |-- Chekin.amd.js.map
|   |-- Chekin.amd.min.js
|   |-- Chekin.amd.min.js.map
|   |-- Chekin.js
|   |-- Chekin.js.map
|   |-- Chekin.min.js
|   |-- Chekin.min.js.map
|   `-- basic.html // this file is for test the library in a plain HTML
|-- src
|   |-- auth // Whit this files we are going temporally make the authentication process
|   |   |-- index.ts
|   |   `-- refreshFetch.ts
|   |-- utils
|   |   `-- resolver.ts
|   |-- constants.ts
|   |-- index.ts //main file, there is where are the SDK methos, this could be improve
|   |-- types.ts // types of the project
|   `-- validations.ts // generic validations
|-- types // types generate with tsc
|   |-- Chekin.amd.d.ts
|   |-- Chekin.amd.min.d.ts
|   |-- Chekin.d.ts
|   `-- Chekin.min.d.ts
|-- README.md
|-- package.json
|-- tsconfig.json
|-- webpack.config.ts

Build

yarn build:production //check package json

Run and Test

IMPORTANT

before run the commands, generate token in our guestapp chekin, and paste it the class client in the index.ts, line 15

currentToken="YOUR NEW TOKEN"

this is for keep authenticated while send request from the sdk, this is temporally, the authentication process will be development with a clientId in the future for the backend

yarn build:production //build bundles 
yarn run:test // run locally the project

Build types for bundle

yarn build-type

Open localhost:3000, click lib folder, and then, click basic.html

The first time you test the project, you will need run locally the project, then, with the local server running, each time you want to test the new changes, you only have to run the build command, a reloading the page.

Run tests

Before we need to set manually TOKEN in src/constants file

CURRENT_TOKEN="YOUR NEW TOKEN"

then:

yarn test
0.3.8

1 year ago

0.3.7

1 year ago

0.3.6

1 year ago

0.3.5

1 year ago

0.3.4

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

0.3.3

1 year ago

0.3.0

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.1.10

2 years ago

0.1.11

2 years ago

0.1.12

2 years ago

0.1.13

2 years ago

0.1.14

2 years ago

0.1.15

2 years ago

0.0.70

2 years ago

0.1.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.9

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.0.62

2 years ago

0.0.63

2 years ago

0.0.64

2 years ago

0.0.65

2 years ago

0.0.66

2 years ago

0.0.67

2 years ago

0.0.68

2 years ago

0.0.69

2 years ago

0.0.60

2 years ago

0.0.61

2 years ago

0.0.59

2 years ago

0.0.56

2 years ago

0.0.57

2 years ago

0.0.58

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.16

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.5

2 years ago

0.2.4

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.45

2 years ago

0.0.47

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.20

2 years ago

0.0.21

2 years ago

0.0.22

2 years ago

0.0.23

2 years ago

0.0.24

2 years ago

0.0.25

2 years ago

0.0.18

2 years ago

0.0.19

2 years ago

0.0.51

2 years ago

0.0.52

2 years ago

0.0.53

2 years ago

0.0.54

2 years ago

0.0.55

2 years ago

0.0.50

2 years ago

0.0.48

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.8

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