open-index/open-npm huggingface dataset:
npm package: @storepecker/storefront-analytics
Description: Storefront analytics client — tracks page views and e-commerce events to /spa/cad/
Latest version: 1.3.1

# @storepecker/storefront-analytics

TypeScript client for the storefront analytics API. Tracks pages and events in storefront. 


---

## Install

```bash
npm install @yourorg/storefront-analytics
```

---

## Setup

```ts
import { createAnalytics } from '@yourorg/storefront-analytics';

export const analytics = createAnalytics({
  baseUrl: 'https://mystore.com',
  token: getUserJwt(), // optional — include when the user is logged in
});
```

When `token` is provided, events are automatically linked to the customer's account (identity stitching). Pass `undefined` for anonymous visitors.

Update the token after login:

```ts
analytics.setToken(jwt);   // on login
analytics.setToken(undefined); // on logout
```

---

## Page Views

Fire on every SPA route change:

```ts
// Basic
analytics.pageView({ path: '/shop/classic-cotton-tee' });

// With UTM params (read from URL query string)
analytics.pageView({
  path: '/',
});
```

---

## Cart Events

```ts
// Add to cart
analytics.addToCart({ product_variant_id: 42, quantity: 2 });

// Remove from cart
analytics.removeFromCart({ product_variant_id: 42, quantity: 1 });
```

`quantity` defaults to `1` if omitted.

---

## Checkout Funnel

Fire these in order as the customer progresses through checkout:

```ts
// 1. User arrives on checkout page
analytics.checkoutStarted({ event_value: 2500.00, item_count: 3 });

// 2. User fills in shipping address
analytics.addressEntered({ event_value: 2500.00 });

// 3. User picks a shipping method
analytics.shippingSelected({ event_value: 2500.00, shipping_method: 'standard' });

// 4. User selects payment method
analytics.paymentSelected({ event_value: 2500.00, payment_method: 'razorpay' });

// 5. User clicks "Pay Now"
analytics.paymentInitiated({ event_value: 2500.00, payment_method: 'razorpay' });

// ✓ "Order completed" is recorded server-side — no frontend call needed.
```

All `event_value` and `item_count` fields are optional and default to `0`.

Supported `payment_method` values: `razorpay`, `phonepe`, `stripe`, `cod`.

---

## API Reference

| Method | Description |
|---|---|
| `pageView({ path, utm_params? })` | Page view on every route change |
| `addToCart({ product_variant_id, quantity? })` | Item added to cart |
| `removeFromCart({ product_variant_id, quantity? })` | Item removed from cart |
| `checkoutStarted({ event_value?, item_count? })` | Checkout page visited |
| `addressEntered({ event_value? })` | Shipping address completed |
| `shippingSelected({ event_value?, shipping_method? })` | Shipping method chosen |
| `paymentSelected({ event_value?, payment_method? })` | Payment method chosen |
| `paymentInitiated({ event_value?, payment_method? })` | "Pay Now" clicked |
| `setToken(token)` | Update JWT after login/logout |

All methods return `Promise<void>` and throw on non-2xx responses.
npm package: @stores.com/http-error
Description: Error class for non-ok HTTP responses from the Fetch API. Captures the response body as text and JSON.
Latest version: 1.0.0

# http-error

[![Test](https://github.com/stores-com/http-error/actions/workflows/test.yml/badge.svg)](https://github.com/stores-com/http-error/actions/workflows/test.yml)
[![Coverage Status](https://coveralls.io/repos/github/stores-com/http-error/badge.svg)](https://coveralls.io/github/stores-com/http-error)

Error class for non-ok HTTP responses from the Fetch API. Captures the response body as text and JSON for debugging.

## Installation

```
$ npm install @stores.com/http-error
```

## Usage

```javascript
const HttpError = require('@stores.com/http-error');

const response = await fetch('https://api.example.com/items');

if (!response.ok) {
    throw await HttpError.from(response);
}
```

Catching errors:

```javascript
try {
    const response = await fetch('https://api.example.com/items');

    if (!response.ok) {
        throw await HttpError.from(response);
    }
} catch (err) {
    console.error(err.message); // "404 Not Found"
    console.error(err.text);    // Raw response body
    console.error(err.json);    // Parsed JSON (if applicable)
    console.error(err.cause);   // Original Response object
}
```

## API

### `new HttpError(response)`

Creates an error with message `"${status} ${statusText}"` and sets `cause` to the response.

### `HttpError.from(response)`

Async factory that creates an `HttpError` and captures the response body:

- `err.text` — the response body as a string
- `err.json` — the parsed JSON (if the body is valid JSON)
- `err.cause` — the original `Response` object

The original response is not consumed (uses `response.clone()`).
npm package: @stores.com/ups
Description: The Power of UPS on Your Digital Platform. Our APIs power the data connections needed to deliver value to customers through e-commerce platforms, supply chain visibility solutions and direct integrations.
Latest version: 1.1.0

# ups

[![Test](https://github.com/stores-com/ups/actions/workflows/test.yml/badge.svg)](https://github.com/stores-com/ups/actions/workflows/test.yml)
[![Coverage Status](https://coveralls.io/repos/github/stores-com/ups/badge.svg)](https://coveralls.io/github/stores-com/ups)

The Power of UPS on Your Digital Platform. Our APIs power the data connections needed to deliver value to customers through e-commerce platforms, supply chain visibility solutions and direct integrations.

## Installation

```
$ npm install @stores.com/ups
```

## Usage

```javascript
const UPS = require('@stores.com/ups');

const ups = new UPS({
    client_id: 'your_client_id',
    client_secret: 'your_client_secret',
    environment_url: 'https://wwwcie.ups.com' // Use https://onlinetools.ups.com for production
});
```

## Documentation

- https://developer.ups.com/

## Methods

### getAccessToken()

The UPS OAuth Client Credentials API helps retrieve an OAuth Bearer token when the integration owner is also the UPS shipper. The integration owner uses their UPS login credentials, and the UPS account number, to receive a token that can be used in the authorization HTTP header of subsequent API calls to UPS APIs like the Ship API, Track API, etc.

See: https://developer.ups.com/tag/OAuth-Client-Credentials?loc=en_US

```javascript
const accessToken = await ups.getAccessToken();

console.log(accessToken);
// {
//     access_token: '...',
//     client_id: 'your_client_id',
//     expires_in: '14400',
//     token_type: 'Bearer'
// }
```

### getTracking(inquiryNumber, options)

The Track API helps retrieves current status of shipments such as Small Package 1Z, Infonotice, Mail Innovations, FGV, or UPS Freight shipments using the package number or the reference number. The tracking response data typically includes package movements/activities, destination UPS access point information, expected delivery dates/times, etc. Required parameters are the inquiryNumber, transaction ID, and transaction source. The response returns an array of shipment objects containing detailed tracking information and status for the package(s) associated with the inquiryNumber, including current status, activity history, delivery details, package details, and more.

See: https://developer.ups.com/tag/Tracking?loc=en_US

```javascript
const tracking = await ups.getTracking('1Z12345E0205271688');

console.log(tracking);
// {
//     trackResponse: {
//         shipment: [{
//             package: [{
//                 trackingNumber: '1Z12345E0205271688',
//                 activity: [...],
//                 currentStatus: { ... },
//                 deliveryDate: [...],
//                 deliveryInformation: { ... }
//             }]
//         }]
//     }
// }
```
npm package: @stores.com/usps
Description: USPS API client for tracking packages using OAuth 2.0 authentication
Latest version: 0.2.2

# usps

[![Test](https://github.com/stores-com/usps/actions/workflows/test.yml/badge.svg)](https://github.com/stores-com/usps/actions/workflows/test.yml)
[![Coverage Status](https://coveralls.io/repos/github/stores-com/usps/badge.svg)](https://coveralls.io/github/stores-com/usps)

USPS API client for tracking packages using OAuth 2.0 authentication.

## Installation

```
$ npm install @stores.com/usps
```

## Usage

```javascript
const USPS = require('@stores.com/usps');

const usps = new USPS({
    client_id: 'your_client_id',
    client_secret: 'your_client_secret',
    environment_url: 'https://apis-tem.usps.com' // Use https://apis.usps.com for production
});
```

## Documentation

- https://developers.usps.com/

## Methods

### getAccessToken()

OAuth access tokens are used to grant authorized access to USPS® APIs. Access tokens will expire, requiring applications to periodically check the expiration time and get new tokens.

See: https://developers.usps.com/Oauth

```javascript
const accessToken = await usps.getAccessToken();

console.log(accessToken);
// {
//     access_token: '...',
//     expires_in: '3600',
//     token_type: 'Bearer'
// }
```

### getTracking(trackingNumber, options)

This API allows users to retrieve either a summary or detailed information about a specific USPS® package.

See: https://developers.usps.com/trackingv3r2

```javascript
const tracking = await usps.getTracking('9434650899562092878282');

console.log(tracking);
// [{
//     trackingNumber: '9434650899562092878282',
//     statusCategory: 'Delivered',
//     statusSummary: '...',
//     ...
// }]
```

#### Options

| Name | Description |
| --- | --- |
| `destinationZIPCode` | Destination ZIP Code |
| `mailingDate` | Mailing date (e.g. `2026-01-01`) |

```javascript
const tracking = await usps.getTracking('9434650899562092878282', {
    destinationZIPCode: '20500'
});
```
npm package: @stores.com/xpo
Description: XPO LTL Shipment Tracking API client for retrieving shipment status, reference numbers, and tracking events using PRO numbers.
Latest version: 0.2.2

# xpo

[![Test](https://github.com/stores-com/xpo/actions/workflows/test.yml/badge.svg)](https://github.com/stores-com/xpo/actions/workflows/test.yml)
[![Coverage Status](https://coveralls.io/repos/github/stores-com/xpo/badge.svg)](https://coveralls.io/github/stores-com/xpo)

XPO LTL Shipment Tracking API client for retrieving shipment status, reference numbers, and tracking events using PRO numbers.

## Installation

```
$ npm install @stores.com/xpo
```

## Usage

```javascript
const XPO = require('@stores.com/xpo');

const xpo = new XPO({
    api_key: 'your_api_key',
    password: 'your_password',
    username: 'your_username'
});
```

## Documentation

- https://www.xpo.com/help-center/integration-with-customer-systems/api/

## Methods

### getAccessToken()

XPO LTL APIs use the OAuth 2.0 protocol for authentication and authorization using the password grant type.

See: https://www.xpo.com/help-center/integration-with-customer-systems/api/

```javascript
const accessToken = await xpo.getAccessToken();

console.log(accessToken);
// {
//     access_token: '...',
//     expires_in: '3600',
//     token_type: 'Bearer'
// }
```

### getShipmentStatus(referenceNumbers, options)

Retrieves status and basic details about a shipment that match the search criteria based on PRO number(s) and/or customer reference number(s).

See: https://www.xpo.com/cdn/files/s1/XPO_API_Shipment_Tracking_Guide.pdf

```javascript
const status = await xpo.getShipmentStatus('235825413');

console.log(status);
// {
//     data: [{
//         proNbr: '235825413',
//         statusCd: 'DLVD',
//         ...
//     }]
// }
```

You can also pass an array of reference numbers:

```javascript
const status = await xpo.getShipmentStatus(['235825413', '235825414']);
```
npm package: @storevent/storevent-memory
Description: In memory implementation of Storevent interfaces
Author: SachaCR
Latest version: 1.0.0

# Storevent Memory

In memory implementation of `@storevent/storevent` interfaces

It provides an event store, and advanced event store implementation.

Documentation in progress...

In the meantime you can check those links:
- [`@storevent/storevent` Package documentation](https://www.npmjs.com/package/@storevent/storevent)
- [Account Example Here](https://github.com/SachaCR/storevent/tree/main/packages/examples)
npm package: @storevent/storevent-pg
Description: Postgres implementation of storevent library interface
Author: SachaCR
Latest version: 1.0.0

# Storevent Postgres

Postgres implementation of `@storevent/storevent` interfaces

It provides an event store, a snapshot store and advanced event store implementation.

`WARNING`: This package is still under active development use it at your own risks. This warning will be removed with v1.0.0 publication where the package wille be considered stable

Documentation in progress...

In the meantime you can check those links:
- [`@storevent/storevent` Package documentation](https://www.npmjs.com/package/@storevent/storevent)
- [Account Example Here](https://github.com/SachaCR/storevent/tree/main/packages/examples)
npm package: @storinka/client
Description: Storinka JavaScript Client
Author: Davyd Kohut
Latest version: 1.6.0

# Storinka JavaScript Client

Documentation: [api.storinka.menu/docs](https://api.storinka.menu/docs)

## Installation

NPM:

```shell script
npm install @storinka/client
```

Yarn:

```
yarn add @storinka/client
```

## Example

```javascript
import StorinkaClient, { ApiError } from "@storinka/client";

const storinka = new StorinkaClient({
    clientId: "your-client-id-here",
});

storinka.invoke("getFullCafe", {
    id: "kava-gallery",
}).then(cafe => {
    console.log(cafe);
}).catch(error => {
    if (error instanceof ApiError) {
        console.log("request failed", error);
    } else {
        console.log("network error");
    }
});
```
npm package: @storinka/vue-dropdown
Description: Highly customizable, simple and modern Vue 3 dropdown component.
Latest version: 0.0.6

# Storinka Dropdown

Highly customizable, simple and modern Vue 3 dropdown component.

## Setup

#### 1. Install package via NPM or Yarn:

```shell
yarn add @storinka/vue-dropdown
```

```shell
npm i @storinka/vue-dropdown
```

#### 2. Install as Vue plugin:

```javascript
import { createApp } from "vue";
import SDropdown from "@storinka/vue-dropdown";

const app = createApp();

app.use(SDropdown);
```

## Usage

```vue

<template>
  <div class="container">
    <SDropdown>
      <template #toggle="{ id, toggle }">
        <button :id="id" @click="toggle">
          Toggle
        </button>
      </template>

      <div style="width: 200px; height: 200px; border: 1px solid #ccc;">
        dropdown content
      </div>
    </SDropdown>
  </div>
</template>
```

> **WARNING**: You must always set id provided in template props for toggle element.

## Props

### `z-index`

- Type: `number | undefined`
- Default: `1000`

Provide custom z-index for dropdown container.

### `offset`

- Type: `number | undefined`
- Default: `10`

Provide custom offset for dropdown container from toggle element.

### `align`

- Type: `string | undefined`
- Value: `"left" | "right"`
- Default: `"right"`

Provide initial dropdown align.

### `position`

- Type: `string | undefined`
- Value: `"top" | "bottom"`
- Default: `"bottom"`

Provide initial dropdown position.

## Customization

If you want to customize the dropdown, you can apply any styles to `s-dropdown` class.

```css
.s-dropdown {
    background-color: white;

    border: 1px solid #eee;
    border-radius: 10px;

    box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;
}
```
npm package: @storiny/obelisk
Description: Build isometrics elements with canvas
Author: Max Huang
Latest version: 1.1.3

# Obelisk (TS)

> Custom port of [obelisk.js](https://github.com/nosir/obelisk.js) to TypeScript, free of side effects.

Obelisk is a JavaScript library for building isometric pixel objects with a simple and flexible API, allowing you to easily add isometric pixel elements like brick, cube, pyramid and slope in HTML5 canvas. Obelisk strictly follows pixel neat pattern: lines with 1:2 pixel dot arrangement, leading to an angle of 22.6 degrees.

<img width="112" height="109" src="http://nosir.github.io/obelisk.js/images/logo.png"/>

## Installation

```sh
# NPM
npm install @storiny/obelisk

# Yarn
yarn add @storiny/obelisk
```

### CDN

```html
<!-- UNPKG -->
<script src="https://unpkg.com/@storiny/obelisk"></script>

<!-- JSDelivr -->
<script src="https://cdn.jsdelivr.net/npm/@storiny/obelisk"></script>

<script>
  // UMD module is exposed through the "obelisk" global variable.
  console.log(obelisk);
</script>
```

## Breaking changes

- Does not support canvas from jQuery.
- Requires DOM, might break on the server side with node-canvas (at least for now).

## Docs

Available at https://storiny.github.io/obelisk (TS).

## Usage

Package exports named imports (tree shaking is supported).

```ts
import {
  Point,
  PixelView,
  CubeDimension,
  ColorPattern,
  CubeColor,
  Cube
} from '@storiny/obelisk';

// Create a canvas 2D point for pixel view world
const point = new Point(200, 200);

// Create view instance to nest everything
// Canvas must be a DOM elemenet
const pixelView = new PixelView(canvas, point);

// Create cube dimension and color instance
const dimension = new CubeDimension(80, 100, 120);
const gray = ColorPattern.GRAY;
const color = new CubeColor().getByHorizontalColor(gray);

// Build cube with dimension and color instance
const cube = new Cube(dimension, color, true);

// Render cube primitive into view
pixelView.renderObject(cube);
```

View more on the original [repository](https://github.com/nosir/obelisk.js).
npm package: @storipress/eslint-plugin-block
Description: @storipress/eslint-plugin-block ===============================
Latest version: 0.3.0

@storipress/eslint-plugin-block
===============================

This is a custom [eslint](https://eslint.org) plugin for catching common errors when developing Storipress blocks

Please read the documents under [docs/rules](./docs/rules) for details of each rule

Usage
-----

Please install this package and [eslint](https://eslint.org) then add this to your eslint configuration:

```json
{
  "extends": ["plugin:@storipress/block/recommended"]
}
```

Installation
------------

Using yarn:

```shell
$ yarn add --dev @storipress/eslint-plugin-block
```

Using npm:

```shell
$ npm install --save-dev @storipress/eslint-plugin-block
```
npm package: @storis/eslint-config
Description: Eslint configurations
Latest version: 5.0.0

# @storis/eslint-config

This package contains the standard eslint configurations for TypeScript packages used by [STORIS](https://www.storis.com). It extends and relies on a number of other rulesets and packages including [eslint-config-airbnb](https://www.npmjs.com/package/eslint-config-airbnb), [@typescript/eslint](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin), and others. It then refines those rulesets to match the STORIS TypeScript style guide.

## Usage

### Peer dependencies

The package relies on the following peer dependencies which differ depending on if you are using the `@storis/eslint-config/nodejs` config, the `@storis/eslint-config/react` config, or the `@storis/eslint-config/graphql` config. You must ensure that compatible versions of the necessary peer dependencies have been installed.

#### Required for all configs

- `@typescript-eslint/eslint-plugin`
- `@typescript-eslint/parser`
- `eslint`
- `eslint-config-airbnb-typescript`
- `eslint-config-prettier`
- `eslint-plugin-import`
- `eslint-plugin-jest`

#### Required for NodeJs config

- `eslint-config-airbnb-base`

#### Required for React config

- `eslint-config-airbnb`
- `eslint-plugin-jsx-a11y`
- `eslint-plugin-react`
- `eslint-plugin-react-hooks`
- `eslint-plugin-testing-library`

#### Required for GraphQL config

- `@graphql-eslint/eslint-plugin`

### Configuration

The configuration for `@typescript-eslint` requires a `tsconfig.json` file to lint using type information. The `tsconfig.json` file closest to the source file will be used.

#### Node

Add the following to your eslint configuration file (e.g. `.eslintrc.js`):

```
{
  extends: ['@storis/eslint-config/nodejs'],
}
```

#### React

Add the following to your eslint configuration file (e.g. `.eslintrc.js`):

```
{
  extends: ['@storis/eslint-config/react'],
}
```

### GraphQL

Add the following to your eslint configuration file (e.g. `.eslintrc.js`):

```
const makeGraphqlOverrides = require('@storis/eslint-config/graphql');
const schemaPath = require.resolve(<path_to_graphql_schema>);
const graphqlOverrides = makeGraphqlOverrides(schemaPath);

{
  overrides: graphqlOverrides,
}
```

## License

This project is licensed under the terms of the [MIT license](/LICENSE).
npm package: @storis/prettier-config
Description: STORIS prettier configuration
Author: STORIS
Latest version: 1.0.0

# @storis/prettier-config

This package contains the standard prettier configurations for JavaScript and TypeScript packages used by [STORIS](https://www.storis.com).

## Installation

`@storis/prettier-config` is available as an [npm package](https://www.npmjs.org/package/@storis/prettier-config).

```sh
npm install @storis/prettier-config
```

## Usage

### Peer dependencies

The package relies on `prettier` as a peer dependency. You must ensure that a compatible version of the necessary peer dependency has been installed.

### Configuration

Add the following to `package.json`:

```
{
  "prettier": "@storis/prettier-config",
}
```

or modify the `.prettierrc.js` file:

```
const storisConfig = require('@storis/prettier-config);

module.exports = {
  ...storisConfig,
  ...
}
```

## License

This project is licensed under the terms of the [MIT license](/LICENSE).
npm package: @storis/tsconfig
Description: Typescript configuration bases
Latest version: 2.0.0

# @storis/tsconfig

This package contains the standard TypeScript configurations for packages used by [STORIS](https://www.storis.com).

## Installation

`@storis/tsconfig` is available as an [npm package](https://www.npmjs.org/package/@storis/tsconfig).

```sh
npm install @storis/tsconfig
```

## Usage

### Peer dependencies

The package relies on the following peer dependencies:

- `typescript`

### Configuration

#### Node 16

Add the following to your typescript configuration file (e.g. `tsconfig.json`):

```
{
  "extends": "@storis/tsconfig/node16/tsconfig.json",
}
```

#### Node 18 (CJS)

Add the following to your typescript configuration file (e.g. `tsconfig.json`):

```
{
  "extends": "@storis/tsconfig/node18/tsconfig.json",
}
```

#### Node 18 (ESM)

Add the following to your typescript configuration file (e.g. `tsconfig.json`):

```
{
  "extends": "@storis/tsconfig/node18-esm/tsconfig.json",
}
```

#### React

Add the following to your typescript configuration file (e.g. `tsconfig.json`):

```
{
  "extends": "@storis/tsconfig/react/tsconfig.json",
}
```

## License

This project is licensed under the terms of the [MIT license](/LICENSE).