Registry / ecommerce / groupby-api

groupby-api

JSON →
library2.7.0jsnpmunverified

JavaScript/TypeScript client for the GroupBy Searchandiser API, version 2.7.0. Provides CloudBridge, Query, and Results classes for building ecommerce search and discovery experiences. Ships TypeScript type definitions. Uses promises and callbacks. Depends on the CJS module system; ESM support is not provided. Requires a client key and customer ID. No longer actively developed (last release 2019).

npm install groupby-api
INSTALL
IMPORT
SIG · GROUPBY-API
G
groupby-api
ecommercejavascriptv2.7.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CloudBridge
import { CloudBridge } from 'groupby-api'
const CloudBridge = require('groupby-api').CloudBridge
TypeScript/ESM projects should use named import. CommonJS uses destructured require.
Query
import { Query } from 'groupby-api'
import Query from 'groupby-api'
Query is a named export, not default.
Results
import { Results } from 'groupby-api'
const Results = require('groupby-api').Results
Named export. CJS requires destructuring.

Demonstrates searching the GroupBy API using CloudBridge, Query, and Results with promises.

import { CloudBridge, Query, Results } from 'groupby-api'; const bridge = new CloudBridge('your-client-key', 'your-customer-id'); const query = new Query('dvd'); bridge.search(query) .then((results: Results) => { console.log(results); }) .catch((err: any) => { console.error(err); });
Debug
Known issues
deprecatedPackage last published in 2019 and appears unmaintained. Consider alternatives or self-hosting.
fix
Migrate to a supported ecommerce search SDK or GroupBy's newer API.
affects: >=2.0.0
gotchaUses CommonJS; TypeScript projects require 'esModuleInterop' or 'allowSyntheticDefaultImports' for named imports.
fix
Set 'esModuleInterop': true in tsconfig.json or use import * as groupby from 'groupby-api'.
affects: >=2.0.0
gotchaCloudBridge constructor expects two arguments: client key and customer ID. Missing or wrong order causes 401 errors.
fix
Pass (clientKey, customerId) as strings. Obtain from GroupBy admin.
affects: >=2.0.0
breakingThe search method returns a Promise, but also accepts a callback as the second argument. Using both can cause double execution.
fix
Use either promise or callback, not both.
affects: >=2.0.0
Errors
Common errors & fixes
TypeError: Cannot read property 'search' of undefined
Import failure: CloudBridge was imported incorrectly, e.g., import CloudBridge from 'groupby-api' instead of named import.
fix
Use import { CloudBridge } from 'groupby-api' for TypeScript/ESM, or const { CloudBridge } = require('groupby-api') for CJS.
Error: Request failed with status code 401
Invalid or missing client key or customer ID in CloudBridge constructor.
fix
Verify credentials from GroupBy admin and pass them correctly: new CloudBridge('clientKey', 'customerId').
Cannot find module 'groupby-api'
Package not installed or not in node_modules.
fix
Run 'npm install groupby-api'.
Upgrade
Version history
2.7.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
36 hits · last 30 days
node
32
OpenAI (training)
1
Resources
groupby-api — npm install groupby-api · libregistry