Socket
Socket
Sign inDemoInstall

@field123/client-shopper

Package Overview
Dependencies
19
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @field123/client-shopper

<!-- generated file, do not edit directly -->


Version published
Weekly downloads
2
Maintainers
1
Created
Weekly downloads
 

Readme

Source

@field123/client-shopper

NPM version NPM downloads

Description

EPCC for JavaScript shopper Client for Node.js, Browser and React Native.

Installing

To install the this package, simply type add or install @field123/client-shopper using your favorite package manager:

  • npm install @field123/client-shopper
  • yarn add @field123/client-shopper
  • pnpm add @field123/client-shopper

Getting Started

Module imports

The EPCC SDK uses clients and commands. To send a request, you only need to import the client creator function createShopperClient and the command creator functions you need, for example createGetAllHierarchiesCommand:

Syntax
// ES5 example
const {
  createShopperClient,
  createGetAllHierarchiesCommand
} = require('@field123/client-shopper')
// ES6+ example
import {
  createShopperClient,
  createGetAllHierarchiesCommand
} from '@field123/client-shopper'

Usage

To send a request, you:

  • Create a client with configuration (e.g. credentials).
  • Create a command with any required input parameters.
  • Call send operation on client with command object as the first argument.
// a client can be shared by different commands.
// example using fromKeys credential provider
const client = createShopperClient({
  credentials: fromKeys({
    clientId: '...'
  })
})

const params = {
  /** commands input parameters */
}
const command = createGetAllHierarchiesCommand(params)
Sending command
try {
  const data = await client.send(command)
  // do something with response data.
} catch (error) {
  // handle any errors.
}

Support command creators for ShopperClient

  • createGetAllHierarchiesCommand
  • createGetAllNodesCommand
  • createGetAllProductsCommand
  • createGetHierarchyByIdCommand
  • createGetHierarchyChildNodesCommand
  • createGetHierarchyNodesCommand
  • createGetHierarchyProductsCommand
  • createGetNodeByIdCommand
  • createGetNodeChildNodesCommand
  • createGetNodeProductsCommand
  • createGetProductByIdCommand
  • createGetShopperCatalogCommand

FAQs

Last updated on 08 May 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc