@commercengine/pos 0.4.6 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -464,18 +464,22 @@ const pos = new PosSDK({
464
464
 
465
465
  The SDK is written in TypeScript and provides full type safety with advanced schema handling:
466
466
 
467
- ### Schema-Specific Typing
468
- The POS SDK handles both regular storefront operations and admin operations with proper type safety. When both schemas define the same endpoint (like `/pos/orders`), the SDK automatically uses the appropriate schema based on the operation:
467
+ ### Single-Spec Typing
468
+ The SDK is generated from the dedicated POS OpenAPI spec, which describes the
469
+ full surface — storefront-backed and admin-proxied operations alike — in one
470
+ document. Every method is typed from the same `paths` schema:
469
471
 
470
472
  ```typescript
471
- // Regular POS operation (POST) - uses storefront schema
473
+ // Storefront-backed POS operation
472
474
  await pos.createOrder({ cart_id: "cart-123" });
473
475
 
474
- // Admin POS operation (GET) - uses admin schema
476
+ // Admin-proxied POS operation, same client, same schema
475
477
  await pos.listOrders({ page: 1, limit: 10 });
476
478
  ```
477
479
 
478
- This ensures you get proper TypeScript autocompletion and validation for each operation without any type conflicts.
480
+ Where an admin operation's schema shares a name with a different storefront
481
+ definition, the admin one carries an `Admin` prefix (`AdminOrder`,
482
+ `AdminPagination`, …), so there are no type conflicts.
479
483
 
480
484
  ```typescript
481
485
  import type {