open-index/open-npm huggingface dataset:
npm package: @furog18/shopify-admin-shared
Description: Shared constants and types for Shopify Admin App
Latest version: 1.0.23

# @furog18/shopify-admin-shared

This package contains shared constants and types that are used by both the backend and frontend of the Shopify Admin App.

## What's Included

### Constants
- `ORDER_STATUS` - Order status constants (new, cancelled, fulfilled, rejected, in_progress)
- `ORDER_FULFILLMENT_STATUS` - Order fulfillment status constants (in_progress, ready_to_pack, ready_to_ship, courier_assigned, shipped)

### Types
- `OrderStatus` - TypeScript type for order status values
- `OrderFulfillmentStatus` - TypeScript type for fulfillment status values

## Usage

### In Backend (Node.js/TypeScript)
```typescript
import { ORDER_STATUS, ORDER_FULFILLMENT_STATUS, type OrderStatus } from '@furog18/shopify-admin-shared';

// Use constants
if (order.status === ORDER_STATUS.NEW) {
  // Handle new order
}

// Use types
function processOrder(status: OrderStatus) {
  // Type-safe status handling
}
```

### In Frontend (React/TypeScript)
```typescript
import { ORDER_STATUS, ORDER_FULFILLMENT_STATUS, type OrderStatus } from '@furog18/shopify-admin-shared';

// Use constants
const isNewOrder = order.status === ORDER_STATUS.NEW;

// Use types
interface Order {
  status: OrderStatus;
  fulfillment_status?: OrderFulfillmentStatus;
}
```

## Development

### Building
```bash
npm run build
```

### Watch Mode
```bash
npm run dev
```

## Adding New Constants

1. Add your constants to `src/constants.ts`
2. Export them from `src/index.ts`
3. Run `npm run build` to compile
4. Update both backend and frontend to use the new constants

## Benefits

- **Single Source of Truth**: Constants are defined in one place
- **Type Safety**: Full TypeScript support across the entire application
- **Consistency**: Backend and frontend always use the same values
- **Maintainability**: Changes only need to be made in one location
- **No Duplication**: Eliminates the need to maintain separate constant files