@thorprovider/adapters 4.2.0 → 4.2.2
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/.turbo/turbo-build.log +18 -18
- package/.turbo/turbo-test.log +1 -0
- package/.turbo/turbo-type-check.log +0 -0
- package/AGENTS.md +1 -1
- package/CHANGELOG.md +12 -0
- package/PROVIDER_IMPLEMENTATION_ANALYSIS.md +659 -0
- package/README.md +22 -3
- package/dist/.tsbuildinfo +1 -1
- package/dist/index.d.mts +140 -2
- package/dist/index.d.ts +140 -2
- package/dist/index.js +1075 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1070 -0
- package/dist/index.mjs.map +1 -1
- package/docs/RETRY_SOLUTION_SUMMARY.md +26 -11
- package/docs/authentication.md +89 -62
- package/docs/capabilities-system.md +100 -38
- package/docs/category-customization.md +37 -29
- package/docs/fetch-reliability-solution.md +127 -278
- package/docs/getting-started.md +43 -29
- package/docs/profile-management.md +68 -38
- package/docs/providers-overview.md +14 -0
- package/docs/services-overview.md +20 -2
- package/docs/update-documentation.md +10 -8
- package/package.json +11 -6
- package/publish.log +93 -0
- package/quick-reference.md +1 -0
- package/src/factory/index.ts +4 -0
- package/src/index.ts +7 -0
- package/src/providers/index.ts +3 -0
- package/src/providers/medusa/admin.test.ts +404 -0
- package/src/providers/medusa/admin.ts +442 -0
- package/src/providers/medusa/auth.test.ts +95 -0
- package/src/providers/medusa/index.test.ts +392 -0
- package/src/providers/medusa/live-smoke.test.ts +412 -0
- package/src/providers/stelorder/client.test-helpers.ts +3 -0
- package/src/providers/stelorder/client.test.ts +58 -0
- package/src/providers/stelorder/client.ts +326 -0
- package/src/providers/stelorder/index.test.ts +48 -0
- package/src/providers/stelorder/index.ts +685 -0
- package/src/providers/stelorder/live-smoke.test.ts +54 -0
- package/src/providers/stelorder/transforms.test.ts +103 -0
- package/src/providers/stelorder/transforms.ts +631 -0
- package/src/resilience/README.md +70 -48
- package/src/types/capabilities.types.ts +51 -0
- package/vitest.config.ts +13 -0
- package/vitest.live.config.ts +18 -0
- package/vitest.setup.ts +6 -0
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ purpose: "Explain the adapter package, its value proposition, and how to use the
|
|
|
4
4
|
lastReviewed: "2026-05-01"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# @thorprovider/adapters
|
|
7
|
+
# @thorprovider/adapters v4.2.1
|
|
8
8
|
|
|
9
9
|
**Unified commerce adapters for Thor Commerce ecosystem**
|
|
10
10
|
|
|
@@ -133,6 +133,7 @@ Need e-commerce backend integration?
|
|
|
133
133
|
Currently implemented:
|
|
134
134
|
- ✅ **Mock** — Fixture-backed provider for local development, previews, and backend-optional storefront bootstrapping
|
|
135
135
|
- ✅ **Medusa JS** (v2) — Full implementation with multi-tenant support
|
|
136
|
+
- ✅ **Stel Order** — ERP adapter (v1): catalog, categories, inventory, customers, orders, payment/delivery listing. No cart/checkout/auth (single-company ERP).
|
|
136
137
|
|
|
137
138
|
Planned (Phase 2–3):
|
|
138
139
|
- 🟡 **Shopify** — In progress
|
|
@@ -162,6 +163,17 @@ const commerce = createProvider({
|
|
|
162
163
|
}
|
|
163
164
|
});
|
|
164
165
|
|
|
166
|
+
// Stel Order ERP (catalog + CRM read/write, no cart/checkout)
|
|
167
|
+
const stelCommerce = createProvider({
|
|
168
|
+
provider: 'stelorder',
|
|
169
|
+
config: {
|
|
170
|
+
baseUrl: 'https://your-company.stelorder.com/app',
|
|
171
|
+
apiKey: process.env.STEL_ORDER_API_KEY,
|
|
172
|
+
currencyCode: 'EUR',
|
|
173
|
+
companyName: 'My Company',
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
|
|
165
177
|
const products = await commerce.getProducts();
|
|
166
178
|
```
|
|
167
179
|
|
|
@@ -438,6 +450,7 @@ if (commerce.capabilities.updateEmail) {
|
|
|
438
450
|
| Platform | Status | Documentation |
|
|
439
451
|
|----------|--------|---------------|
|
|
440
452
|
| **Medusa v2** | ✅ Production Ready | [Medusa Docs](https://docs.medusajs.com/) |
|
|
453
|
+
| **Stel Order** | ✅ ERP Adapter (v1) | Catalog, CRM, orders — no cart/checkout/auth |
|
|
441
454
|
| **Shopify** | 🚧 Planned | [Shopify API](https://shopify.dev/api/storefront) |
|
|
442
455
|
| **WooCommerce** | 🗓️ Roadmap | [WooCommerce API](https://woocommerce.github.io/woocommerce-rest-api-docs/) |
|
|
443
456
|
| **BigCommerce** | 🗓️ Roadmap | [BigCommerce API](https://developer.bigcommerce.com/) |
|
|
@@ -465,6 +478,11 @@ if (commerce.capabilities.updateEmail) {
|
|
|
465
478
|
- [Add New Service](../../docs/workflows/legacy/add-adapter-service.md) - Service workflow
|
|
466
479
|
- [Type Definitions](./src/types/) - Full TypeScript types
|
|
467
480
|
|
|
481
|
+
### Testing
|
|
482
|
+
- Unit/integration tests: `yarn workspace @thorprovider/adapters test`
|
|
483
|
+
- Optional live Stel smoke test: `STEL_ORDER_SMOKE_TEST=1 STEL_ORDER_BASE_URL=... STEL_ORDER_API_KEY=... yarn workspace @thorprovider/adapters test:live`
|
|
484
|
+
- Live smoke stays read-only unless `STEL_ORDER_TEST_CUSTOMER_ID` is explicitly set
|
|
485
|
+
|
|
468
486
|
---
|
|
469
487
|
|
|
470
488
|
## Examples
|
|
@@ -584,6 +602,7 @@ const products = await commerce.getProducts();
|
|
|
584
602
|
├── types/ # Unified types (Product, Cart, etc.)
|
|
585
603
|
├── providers/ # Provider implementations
|
|
586
604
|
│ ├── medusa/ # Medusa v2 provider
|
|
605
|
+
│ ├── stelorder/ # Stel Order ERP adapter
|
|
587
606
|
│ └── shopify/ # (coming soon)
|
|
588
607
|
├── core/ # Core utilities (errors, logger)
|
|
589
608
|
└── factory/ # Provider factory
|
|
@@ -622,9 +641,9 @@ Contributions welcome! See [CONTRIBUTING.md](../../CONTRIBUTING.md).
|
|
|
622
641
|
|
|
623
642
|
## Version
|
|
624
643
|
|
|
625
|
-
**Current**:
|
|
644
|
+
**Current**: v4.2.1 - Production Ready ✅
|
|
626
645
|
|
|
627
|
-
**
|
|
646
|
+
**Latest Features**:
|
|
628
647
|
- ✅ Capabilities system (21 backend capabilities)
|
|
629
648
|
- ✅ Profile management with capability awareness
|
|
630
649
|
- ✅ Auto token refresh
|