1.8.1 • Published 1 year ago

ecommersys v1.8.1

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

SDK ECOMMERCE B2B E B2C

_UNDER DEVELOPMENT_

(Will not work until March, please wait the Release)

HOW WILL WORK

First we will import and Initialize the sdk package
  1. importing the package
  import ecommersys from "ecommersys"
  1. initialize the class
  const SDK = new ecommersys()
  // you can use new sdk(`YOUR-APP-TOKEN`) to connect right on the class creation
  1. connect your app token (if you dont use your token on class creation)
  const connectSDK = await SDK.connect( {apptoken: { `YOUR-APP-TOKEN` } } )

  if(connectSDK.isError) throw new Error(connectSDK.isError.message)

  console.log(connectSDK.isSuccess)
        // Do what you need with the data... (connectSDK.isSuccess)
  1. than set your application context to use all the individual classes

User Example

  import { User } from "ecommersys"

  let myUser;

  const userAuth = await User.account.auth("USER_USERNAME", "USER_PASSWORD");

  if(userAuth.isError) throw new Error(userAuth.isError.message)

  const getMyUser = await User.account.getMyUser()

  if(getMyUser.isError) throw new Error(getMyUser.isError.message)

  myUser = getMyUser.isSuccess
        // Do what you need with the data... (getMyUser.isSuccess)

In this example:

- Retun of any Promise is {isSuccess:AuthReturnType,isError:ErrorHandlingType}
- If successed on User.auth method (like the SDK.connect example too),
the sdk will abstract and will handle properly with the token for you,
the token will be automatic joined into axios instance header
- ErrorHandling type { code: number, message: string | Object }
- On the exemple, we are using "throw new Error" on every ErrorHandling to
stop and handle it on a simple way, but u can work at your way like
returning an alert using some alert lib like toastfy for the user.

Click on Ecommersys for more information.

(The link will be avalible soon)
All Rights Reserved for Ikiradev
1.8.1

1 year ago

1.8.0

1 year ago

1.7.9

1 year ago

1.7.7

1 year ago

1.7.6

1 year ago

1.7.5

1 year ago

1.7.4

1 year ago

1.7.3

1 year ago

1.7.2

1 year ago

1.7.1

1 year ago

1.7.0

1 year ago

1.4.6

1 year ago

1.6.3

1 year ago

1.4.5

1 year ago

1.6.2

1 year ago

1.4.4

1 year ago

1.6.1

1 year ago

1.6.0

1 year ago

1.4.0

1 year ago

1.5.9

1 year ago

1.5.8

1 year ago

1.5.7

1 year ago

1.3.9

1 year ago

1.5.6

1 year ago

1.5.191

1 year ago

1.5.5

1 year ago

1.5.4

1 year ago

1.5.3

1 year ago

1.5.2

1 year ago

1.5.1

1 year ago

1.5.0

1 year ago

1.5.12

1 year ago

1.5.11

1 year ago

1.5.14

1 year ago

1.5.13

1 year ago

1.5.16

1 year ago

1.5.15

1 year ago

1.5.18

1 year ago

1.5.17

1 year ago

1.5.19

1 year ago

1.6.9

1 year ago

1.6.8

1 year ago

1.6.7

1 year ago

1.4.9

1 year ago

1.6.6

1 year ago

1.4.8

1 year ago

1.6.5

1 year ago

1.4.7

1 year ago

1.3.8

1 year ago

1.3.7

1 year ago

1.3.6

1 year ago

1.3.5

1 year ago

1.3.4

1 year ago

1.3.3

1 year ago

1.3.2

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.9

1 year ago

1.2.8

1 year ago

1.2.7

1 year ago

1.2.6

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.1

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago