@things-factory/integration-marketplace

7.0.1-alpha.57 • Public • Published

Marketplace Integration module

Integration Structure

development

TDD (Test Driven Development)

# test all tests
$ yarn test
# test specific modules test
$ DEBUG=things-factory:* NODE_ENV=development npx mocha -r ts-node/register ./test/store-api/*spec.ts
# test specific test
$ DEBUG=things-factory:* NODE_ENV=development npx mocha -r ts-node/register ./test/store-api/get-store-products-spec.ts

debug module

Platform-specific features

lazada

  • 등록된 callback 주소의 hostname 과 동일한 callback address 를 사용할 수 있다. (need to confirm)
  • accessToken이 digital sign 시에 사용된다. digital sign은 payload에 포함된다. (request header 사용안함.)
  • country-code 별로 endpoint가 다르다.
  • API별 고정 path를 사용한다.
  • get/post 를 사용한다.

shopee

  • callback address에 특별한 제한이 없다.
  • binding cancel API가 정의되어있다. (binding cancel callback으로 결과를 redirect 받을 수 있다.)
  • accessToken이 따로 발행되지 않는다. payload digital sign 만 하고 request header에 포함한다. (Authorization)
  • API별 고정 path를 사용한다.
  • post 만 사용한다.

shopify

  • country-code 를 사용하지 않는다.
  • application callback whitelist에 등록된 주소 이외는 사용할 수 없다. 대신 callback에 포함된 nonce나 hostname을 이용해서 redirect 할 수 있다.
  • request 마다 digital sign을 할 필요없이, accessToken 만 request header에 포함하면 된다. (X-Shopify-Access-Token)
  • 마지막으로 발행된 accessToken 만 유효하다.
  • restful과 graphql을 모두 지원한다.
  • restful 스타일을 비교적 철저히 따른다.
    • path에 resource id를 사용한다.
    • get/post/put/delete method를 의미에 적합하게 모두 사용한다.

zalora

  • application 등록 기능 없음. seller apiKey를 사용해야 함.
  • 따라서, oauth2 인증을 통해서 apiKey를 가져오는 방법을 발견하지 못함.
  • apiKey가 digital sign 시에 사용된다. digital sign은 payload에 포함된다. (request header 사용안함.)
  • country-code 별로 endpoint가 다르다.
  • API별 action 코드가 querystring(Action 키)에 지정된다.
  • 'get', 'post' 메쏘드 만을 사용한다.
  • post인 경우에는 query string과 request body(XML 포맷)을 동시에 사용한다.
  • response 는 XML 또는 JSON 포맷을 지정할 수 있는데, querystring(Format 키)에 지정한다.

woocommerce

  • ...ing

Readme

Keywords

none

Package Sidebar

Install

npm i @things-factory/integration-marketplace

Weekly Downloads

539

Version

7.0.1-alpha.57

License

MIT

Unpacked Size

2.08 MB

Total Files

980

Last publish

Collaborators

  • shortstop
  • nalshya113
  • woo_ram
  • jinwon_in_hatio
  • jyp220
  • heartyoh
  • horwengliang95
  • chris_lim7150
  • joekin
  • jinwon