@reactionary/core 0.9.11 → 0.9.13

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.
@@ -15,6 +15,7 @@ export * from "./price.factory.js";
15
15
  export * from "./product.factory.js";
16
16
  export * from "./product-associations.factory.js";
17
17
  export * from "./product-list.factory.js";
18
+ export * from "./product-recommendations.factory.js";
18
19
  export * from "./product-reviews.factory.js";
19
20
  export * from "./product-search.factory.js";
20
21
  export * from "./profile.factory.js";
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactionary/core",
3
- "version": "0.9.11",
3
+ "version": "0.9.13",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "types": "./src/index.d.ts",
@@ -15,6 +15,7 @@ export * from './price.factory.js';
15
15
  export * from './product.factory.js';
16
16
  export * from './product-associations.factory.js';
17
17
  export * from './product-list.factory.js';
18
+ export * from './product-recommendations.factory.js';
18
19
  export * from './product-reviews.factory.js';
19
20
  export * from './product-search.factory.js';
20
21
  export * from './profile.factory.js';
@@ -0,0 +1,12 @@
1
+ import type * as z from 'zod';
2
+ import type { ProductRecommendationSchema } from '../schemas/models/product-recommendations.model.js';
3
+ import type { RequestContext } from '../schemas/session.schema.js';
4
+ export type AnyProductRecommendationSchema = z.ZodType<z.output<typeof ProductRecommendationSchema>>;
5
+ export interface ProductRecommendationsFactory<TProductRecommendationSchema extends AnyProductRecommendationSchema = AnyProductRecommendationSchema> {
6
+ productRecommendationSchema: TProductRecommendationSchema;
7
+ parseRecommendation(context: RequestContext, data: unknown): z.output<TProductRecommendationSchema>;
8
+ }
9
+ export type ProductRecommendationsFactoryOutput<TFactory extends ProductRecommendationsFactory> = ReturnType<TFactory['parseRecommendation']>;
10
+ export type ProductRecommendationsFactoryWithOutput<TFactory extends ProductRecommendationsFactory> = Omit<TFactory, 'parseRecommendation'> & {
11
+ parseRecommendation(context: RequestContext, data: unknown): ProductRecommendationsFactoryOutput<TFactory>;
12
+ };