@thorprovider/types 5.7.10 → 5.8.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/AGENTS.md +1 -1
- package/README.md +8 -0
- package/dist/index.d.mts +425 -144
- package/dist/index.d.ts +425 -144
- package/dist/index.js +0 -138
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +0 -125
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/admin/DropshippingAdmin.ts +0 -57
- package/src/cart.ts +40 -0
- package/src/catalog.ts +210 -0
- package/src/collection.ts +10 -0
- package/src/commerce-provider.ts +58 -1
- package/src/commerce.ts +88 -0
- package/src/index.ts +32 -18
- package/src/order.ts +33 -0
- package/src/product.ts +1 -0
- package/src/provider.ts +14 -178
- package/src/storefront.ts +5 -32
package/AGENTS.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!-- TYPES-AGENTS-MD-START -->[@thorprovider/types Docs]|root: ./types|
|
|
1
|
+
<!-- TYPES-AGENTS-MD-START -->[@thorprovider/types Docs]|root: ./types|Electrostore MVP: see director roadmap.|To regenerate: yarn generate:agents-index|.:{README.md}|src:{header-config.README.md}<!-- TYPES-AGENTS-MD-END -->
|
package/README.md
CHANGED
|
@@ -213,7 +213,15 @@ import type { Product, Cart, CartItem, Collection } from '@thorprovider/types';
|
|
|
213
213
|
- **Order**: Order, OrderItem, OrderStatus
|
|
214
214
|
- **Auth**: AuthProvider, LoginCredentials, RegisterData
|
|
215
215
|
- **Storefront**: StorefrontConfig, StorefrontContext
|
|
216
|
+
- **Commerce contracts**: StoreContext, ShopperIdentity, CartSession, OrderReceipt
|
|
216
217
|
- **CommerceProvider**: CommerceProvider interface (includes optional `updateShippingAddress?`)
|
|
218
|
+
- **Catalog query (E2)**: CatalogQuery, CatalogResults, FacetSupport, CatalogSortKey, CatalogAppliedFilters, CatalogFacetId, CatalogFacetDemonstrationSource — the canonical validated query shared by the URL boundary, runtime bridge, and adapters (`text`, route category scope + `categories`/`collections`, `sort` `featured`|`name`|`newest`, `page`/`pageSize`, and optional `priceMin`/`priceMax`/`inStock`/`attr.<name>`), its truthful results (`products`, optional backend `total`, `appliedFilters`, optional `facetSupport`), and the offered/held facet support descriptor with its real-endpoint demonstration source. Type-only; the Zod boundary lives in `@thorprovider/runtime/contracts`.
|
|
219
|
+
- **Catalog query adapter seam (E2 task 2.2)**: CatalogQueryOutcome, CatalogQueryFailure, CatalogQueryFailureCode, CatalogQueryFailureRepair — the discriminated outcome (`{ ok: true, results }` only when every requested filter was applied, else `{ ok: false, error: { code: 'unsupported-query', fields, repair } }`) returned by the optional `CommerceProvider.getCatalogProducts?` typed listing path. Type-only and structurally identical to the boundary's `CatalogQueryError`.
|
|
220
|
+
|
|
221
|
+
> This package is **type-only** (no runtime exports). The runtime provider
|
|
222
|
+
> registry (`SupportedProviderType`, `PROVIDER_METADATA`,
|
|
223
|
+
> `isSupportedProviderType`, `getProviderMetadata`) and `StorefrontConfigError`
|
|
224
|
+
> live in `@thorprovider/adapters`; import them from there.
|
|
217
225
|
- **Dropshipping**: DropshipperAccount, DropshipperCategory, DropshipperPromotion, DropshipperSettlement — plus all request/response types for the 53+ `DropshipperClient` methods (see `src/admin/DropshippingAdmin.ts`)
|
|
218
226
|
- **Order Notes** (part of Dropshipping): OrderNote, CreateOrderNoteBody, GetOrderNotesResponse, DeleteOrderNoteResponse — for managing notes on dropshipper orders
|
|
219
227
|
- **Provider Categories** (part of Dropshipping): ProviderCategory, GetProviderCategoriesResponse — Medusa native categories exposed via dropshipper API
|