@reactionary/provider-fake 0.1.9 → 0.1.11

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/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@reactionary/provider-fake",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "main": "index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "dependencies": {
7
- "@reactionary/core": "0.1.9",
7
+ "@reactionary/core": "0.1.11",
8
8
  "zod": "4.1.9",
9
9
  "@faker-js/faker": "^9.8.0"
10
10
  },
@@ -1,22 +1,4 @@
1
- import type { Cache as ReactinaryCache, ProductProvider, ProductSearchProvider, IdentityProvider, CategoryProvider, CartProvider, InventoryProvider, StoreProvider, PriceProvider, RequestContext } from '@reactionary/core';
1
+ import type { Cache as ReactinaryCache, RequestContext, ClientFromCapabilities } from '@reactionary/core';
2
2
  import type { FakeConfiguration } from '../schema/configuration.schema.js';
3
3
  import type { FakeCapabilities } from '../schema/capabilities.schema.js';
4
- type FakeClient<T extends FakeCapabilities> = (T['cart'] extends true ? {
5
- cart: CartProvider;
6
- } : object) & (T['product'] extends true ? {
7
- product: ProductProvider;
8
- } : object) & (T['productSearch'] extends true ? {
9
- productSearch: ProductSearchProvider;
10
- } : object) & (T['identity'] extends true ? {
11
- identity: IdentityProvider;
12
- } : object) & (T['category'] extends true ? {
13
- category: CategoryProvider;
14
- } : object) & (T['inventory'] extends true ? {
15
- inventory: InventoryProvider;
16
- } : object) & (T['store'] extends true ? {
17
- store: StoreProvider;
18
- } : object) & (T['price'] extends true ? {
19
- price: PriceProvider;
20
- } : object);
21
- export declare function withFakeCapabilities<T extends FakeCapabilities>(configuration: FakeConfiguration, capabilities: T): (cache: ReactinaryCache, context: RequestContext) => FakeClient<T>;
22
- export {};
4
+ export declare function withFakeCapabilities<T extends FakeCapabilities>(configuration: FakeConfiguration, capabilities: T): (cache: ReactinaryCache, context: RequestContext) => ClientFromCapabilities<T>;