@reactionary/core 0.3.8 → 0.3.10
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/decorators/reactionary.decorator.js +1 -1
- package/package.json +1 -1
- package/schemas/capabilities.schema.js +1 -1
- package/schemas/errors/generic.error.js +1 -1
- package/schemas/errors/invalid-input.error.js +1 -1
- package/schemas/errors/invalid-output.error.js +1 -1
- package/schemas/errors/not-found.error.js +1 -1
- package/schemas/models/base.model.js +11 -11
- package/schemas/models/cart.model.js +1 -1
- package/schemas/models/category.model.js +1 -1
- package/schemas/models/checkout.model.js +2 -2
- package/schemas/models/cost.model.js +1 -1
- package/schemas/models/currency.model.js +1 -1
- package/schemas/models/identifiers.model.js +16 -16
- package/schemas/models/identity.model.js +1 -1
- package/schemas/models/inventory.model.js +1 -1
- package/schemas/models/order-search.model.js +1 -1
- package/schemas/models/order.model.js +1 -1
- package/schemas/models/payment.model.js +2 -2
- package/schemas/models/price.model.js +3 -3
- package/schemas/models/product-recommendations.model.js +5 -4
- package/schemas/models/product-search.model.js +2 -2
- package/schemas/models/product.model.js +24 -24
- package/schemas/models/profile.model.js +1 -1
- package/schemas/models/shipping-method.model.js +8 -8
- package/schemas/models/store.model.js +1 -1
- package/schemas/mutations/analytics/index.js +1 -1
- package/schemas/mutations/analytics/product-add-to-cart.mutation.js +1 -1
- package/schemas/mutations/analytics/product-details-view.mutation.js +1 -1
- package/schemas/mutations/analytics/product-summary-click.mutation.js +1 -1
- package/schemas/mutations/analytics/product-summary-view.mutation.js +1 -1
- package/schemas/mutations/analytics/purchase.mutation.js +1 -1
- package/schemas/mutations/base.mutation.js +1 -1
- package/schemas/mutations/cart.mutation.js +1 -1
- package/schemas/mutations/checkout.mutation.js +1 -1
- package/schemas/mutations/identity.mutation.js +1 -1
- package/schemas/mutations/inventory.mutation.js +1 -1
- package/schemas/mutations/price.mutation.js +1 -1
- package/schemas/mutations/product.mutation.js +1 -1
- package/schemas/mutations/profile.mutation.js +3 -3
- package/schemas/mutations/search.mutation.js +1 -1
- package/schemas/queries/analytics.query.js +1 -1
- package/schemas/queries/base.query.js +1 -1
- package/schemas/queries/category.query.js +1 -1
- package/schemas/queries/product-associations.query.js +2 -2
- package/schemas/queries/product-recommendations.query.js +12 -12
- package/schemas/queries/product-search.query.js +3 -3
- package/schemas/queries/product.query.js +1 -1
- package/schemas/queries/store.query.js +1 -1
- package/schemas/session.schema.js +6 -6
- package/src/cache/cache.interface.d.ts +1 -1
- package/src/cache/memory-cache.d.ts +1 -1
- package/src/cache/noop-cache.d.ts +1 -1
- package/src/cache/redis-cache.d.ts +1 -1
- package/src/decorators/reactionary.decorator.d.ts +1 -1
- package/src/schemas/capabilities.schema.d.ts +1 -1
- package/src/schemas/errors/generic.error.d.ts +1 -1
- package/src/schemas/errors/invalid-input.error.d.ts +1 -1
- package/src/schemas/errors/invalid-output.error.d.ts +1 -1
- package/src/schemas/errors/not-found.error.d.ts +1 -1
- package/src/schemas/models/analytics.model.d.ts +1 -1
- package/src/schemas/models/base.model.d.ts +1 -1
- package/src/schemas/models/cart.model.d.ts +1 -1
- package/src/schemas/models/category.model.d.ts +1 -1
- package/src/schemas/models/checkout.model.d.ts +1 -1
- package/src/schemas/models/cost.model.d.ts +1 -1
- package/src/schemas/models/currency.model.d.ts +1 -1
- package/src/schemas/models/identifiers.model.d.ts +1 -1
- package/src/schemas/models/identity.model.d.ts +1 -1
- package/src/schemas/models/inventory.model.d.ts +1 -1
- package/src/schemas/models/order-search.model.d.ts +17 -17
- package/src/schemas/models/order.model.d.ts +1 -1
- package/src/schemas/models/payment.model.d.ts +1 -1
- package/src/schemas/models/price.model.d.ts +1 -1
- package/src/schemas/models/product-recommendations.model.d.ts +37 -36
- package/src/schemas/models/product-search.model.d.ts +1 -1
- package/src/schemas/models/product.model.d.ts +1 -1
- package/src/schemas/models/profile.model.d.ts +1 -1
- package/src/schemas/models/shipping-method.model.d.ts +1 -1
- package/src/schemas/models/store.model.d.ts +1 -1
- package/src/schemas/mutations/analytics/index.d.ts +63 -63
- package/src/schemas/mutations/analytics/product-add-to-cart.mutation.d.ts +10 -10
- package/src/schemas/mutations/analytics/product-details-view.mutation.d.ts +3 -3
- package/src/schemas/mutations/analytics/product-summary-click.mutation.d.ts +1 -1
- package/src/schemas/mutations/analytics/product-summary-view.mutation.d.ts +1 -1
- package/src/schemas/mutations/analytics/purchase.mutation.d.ts +34 -34
- package/src/schemas/mutations/base.mutation.d.ts +1 -1
- package/src/schemas/mutations/cart.mutation.d.ts +1 -1
- package/src/schemas/mutations/checkout.mutation.d.ts +1 -1
- package/src/schemas/mutations/identity.mutation.d.ts +1 -1
- package/src/schemas/mutations/profile.mutation.d.ts +1 -1
- package/src/schemas/queries/base.query.d.ts +1 -1
- package/src/schemas/queries/category.query.d.ts +1 -1
- package/src/schemas/queries/checkout.query.d.ts +1 -1
- package/src/schemas/queries/identity.query.d.ts +1 -1
- package/src/schemas/queries/inventory.query.d.ts +1 -1
- package/src/schemas/queries/order.query.d.ts +1 -1
- package/src/schemas/queries/price.query.d.ts +1 -1
- package/src/schemas/queries/product-associations.query.d.ts +7 -7
- package/src/schemas/queries/product-recommendations.query.d.ts +31 -31
- package/src/schemas/queries/product-search.query.d.ts +1 -1
- package/src/schemas/queries/product.query.d.ts +1 -1
- package/src/schemas/queries/profile.query.d.ts +1 -1
- package/src/schemas/queries/store.query.d.ts +1 -1
- package/src/schemas/session.schema.d.ts +1 -1
- package/src/zod-utils.d.ts +1 -1
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import z from "zod";
|
|
1
|
+
import * as z from "zod";
|
|
2
2
|
import { CategoryIdentifierSchema, ProductIdentifierSchema } from "../models/identifiers.model.js";
|
|
3
3
|
import { BaseQuerySchema } from "./base.query.js";
|
|
4
4
|
const ProductRecommendationBaseQuerySchema = BaseQuerySchema.extend({
|
|
5
|
-
numberOfRecommendations: z.number().min(1).max(12).
|
|
6
|
-
labels: z.array(z.string()).optional().
|
|
5
|
+
numberOfRecommendations: z.number().min(1).max(12).meta({ description: "The number of recommendations requested. The provider may return fewer than this number, but should not return more." }),
|
|
6
|
+
labels: z.array(z.string()).optional().meta({ description: "The customer segments, quirks, chirps or other labels to which the recommendations can optimize themselves to be relevant. This can be used by the provider to personalize the recommendations based on the preferences and behaviors of users in these segments." })
|
|
7
7
|
});
|
|
8
8
|
const ProductRecommendationsByCollectionQuerySchema = ProductRecommendationBaseQuerySchema.extend({
|
|
9
|
-
collectionName: z.string().
|
|
10
|
-
sourceProduct: z.array(ProductIdentifierSchema).optional().
|
|
9
|
+
collectionName: z.string().meta({ description: "The name of the collection for which to get product recommendations. This is to access either manually curated lists, or interface marketing rules engines that define zones by name" }),
|
|
10
|
+
sourceProduct: z.array(ProductIdentifierSchema).optional().meta({ description: "The products on screen or in the context you are asking for the recommendations. Could be all the variants from the current cart (resolved into their products), or just the variant of the PDP, or the 4 first products of a category." }),
|
|
11
11
|
sourceCategory: CategoryIdentifierSchema.optional().describe("The category identifier to use as a seed for the recommendations. The provider should return recommendations that are relevant to this category, e.g., products that are frequently bought together, products that are similar in style or category, or products that are popular among users with similar preferences. This is optional, as the collection may already be curated to be relevant to a specific product or category, but it can be used by the provider to further personalize the recommendations based on the preferences and behaviors of users who have interacted with this category.")
|
|
12
12
|
});
|
|
13
13
|
const ProductRecommendationProductBasedBaseQuerySchema = ProductRecommendationBaseQuerySchema.extend({
|
|
14
14
|
sourceProduct: ProductIdentifierSchema.describe("The product identifiers for which to get recommendations. The provider should return recommendations that are relevant to these products, e.g., products that are frequently bought together, products that are similar in style or category, or products that are popular among users with similar preferences.")
|
|
15
15
|
});
|
|
16
16
|
const ProductRecommendationAlgorithmFrequentlyBoughtTogetherQuerySchema = ProductRecommendationProductBasedBaseQuerySchema.extend({
|
|
17
|
-
algorithm: z.literal("frequentlyBoughtTogether").
|
|
17
|
+
algorithm: z.literal("frequentlyBoughtTogether").meta({ description: "The provider should return recommendations based on products that are frequently bought together with the source products. The provider should leverage the Request Context to personalize the recommendations as much as possible, taking into account factors such as the user's browsing history, purchase history, and demographic information." })
|
|
18
18
|
});
|
|
19
19
|
const ProductRecommendationAlgorithmSimilarProductsQuerySchema = ProductRecommendationProductBasedBaseQuerySchema.extend({
|
|
20
|
-
algorithm: z.literal("similar").
|
|
20
|
+
algorithm: z.literal("similar").meta({ description: "The provider should return recommendations based on products that are similar to the source products either visually or data wise" })
|
|
21
21
|
});
|
|
22
22
|
const ProductRecommendationAlgorithmRelatedProductsQuerySchema = ProductRecommendationProductBasedBaseQuerySchema.extend({
|
|
23
|
-
algorithm: z.literal("related").
|
|
23
|
+
algorithm: z.literal("related").meta({ description: "The provider should return recommendations based on products that are related to the source products. " })
|
|
24
24
|
});
|
|
25
25
|
const ProductRecommendationAlgorithmTrendingInCategoryQuerySchema = ProductRecommendationBaseQuerySchema.extend({
|
|
26
|
-
algorithm: z.literal("trendingInCategory").
|
|
26
|
+
algorithm: z.literal("trendingInCategory").meta({ description: "The provider should return recommendations based on products that are trending in the specified category. The provider should leverage the Request Context to personalize the recommendations as much as possible, taking into account factors such as the user's browsing history, purchase history, and demographic information." }),
|
|
27
27
|
sourceCategory: CategoryIdentifierSchema.describe("The category identifier for which to get trending product recommendations. The provider should return recommendations that are relevant to this category, e.g., products that are frequently bought together, products that are similar in style or category, or products that are popular among users with similar preferences.")
|
|
28
28
|
});
|
|
29
29
|
const ProductRecommendationAlgorithmPopuplarProductsQuerySchema = ProductRecommendationBaseQuerySchema.extend({
|
|
30
|
-
algorithm: z.literal("popular").
|
|
30
|
+
algorithm: z.literal("popular").meta({ description: "The provider should return recommendations based on products that are popular among users. The provider should leverage the Request Context to personalize the recommendations as much as possible, taking into account factors such as the user's browsing history, purchase history, and demographic information." })
|
|
31
31
|
});
|
|
32
32
|
const ProductRecommendationAlgorithmTopPicksProductsQuerySchema = ProductRecommendationBaseQuerySchema.extend({
|
|
33
|
-
algorithm: z.literal("topPicks").
|
|
33
|
+
algorithm: z.literal("topPicks").meta({ description: "The provider should return recommendations based on products that are top picks among users. The provider should leverage the Request Context to personalize the recommendations as much as possible, taking into account factors such as the user's browsing history, purchase history, and demographic information." })
|
|
34
34
|
});
|
|
35
35
|
const ProductRecommendationAlgorithmAlsoViewedProductsQuerySchema = ProductRecommendationProductBasedBaseQuerySchema.extend({
|
|
36
|
-
algorithm: z.literal("alsoViewed").
|
|
36
|
+
algorithm: z.literal("alsoViewed").meta({ description: "The provider should return recommendations based on products that are also viewed by users. The provider should leverage the Request Context to personalize the recommendations as much as possible, taking into account factors such as the user's browsing history, purchase history, and demographic information." })
|
|
37
37
|
});
|
|
38
38
|
const ProductRecommendationsQuerySchema = z.discriminatedUnion("algorithm", [
|
|
39
39
|
ProductRecommendationAlgorithmFrequentlyBoughtTogetherQuerySchema,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as z from "zod";
|
|
2
2
|
import { CategorySchema } from "../models/category.model.js";
|
|
3
3
|
import { ProductSearchIdentifierSchema } from "../models/identifiers.model.js";
|
|
4
4
|
import { BaseQuerySchema } from "./base.query.js";
|
|
@@ -6,8 +6,8 @@ const ProductSearchQueryByTermSchema = BaseQuerySchema.extend({
|
|
|
6
6
|
search: ProductSearchIdentifierSchema
|
|
7
7
|
});
|
|
8
8
|
const ProductSearchQueryCreateNavigationFilterSchema = z.looseObject({
|
|
9
|
-
categoryPath: z.array(CategorySchema).
|
|
10
|
-
}).
|
|
9
|
+
categoryPath: z.array(CategorySchema).meta({ description: "An array representing the breadcrumb path to a category, from root to the specific category." })
|
|
10
|
+
}).meta({ description: "Payload to create a category navigation filter from a breadcrumb path." });
|
|
11
11
|
export {
|
|
12
12
|
ProductSearchQueryByTermSchema,
|
|
13
13
|
ProductSearchQueryCreateNavigationFilterSchema
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as z from "zod";
|
|
2
2
|
import { BaseQuerySchema } from "./base.query.js";
|
|
3
3
|
import { PaginationOptionsSchema, ProductIdentifierSchema, ProductVariantIdentifierSchema } from "../models/index.js";
|
|
4
4
|
const ProductQueryBySlugSchema = BaseQuerySchema.extend({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as z from "zod";
|
|
2
2
|
import { WebStoreIdentifierSchema } from "./models/identifiers.model.js";
|
|
3
3
|
import { CurrencySchema } from "./models/currency.model.js";
|
|
4
4
|
import { IdentitySchema } from "./models/identity.model.js";
|
|
@@ -25,11 +25,11 @@ const RequestContextSchema = z.looseObject({
|
|
|
25
25
|
languageContext: LanguageContextSchema.default(() => LanguageContextSchema.parse({})).describe("ReadOnly. The language and locale context for the current request."),
|
|
26
26
|
storeIdentifier: WebStoreIdentifierSchema.default(() => WebStoreIdentifierSchema.parse({})).describe("ReadOnly. The identifier of the current web store making the request."),
|
|
27
27
|
taxJurisdiction: TaxJurisdictionSchema.default(() => TaxJurisdictionSchema.parse({})).describe("ReadOnly. The tax jurisdiction for the current request, typically derived from the store location or carts billing address"),
|
|
28
|
-
correlationId: z.string().default("").
|
|
29
|
-
isBot: z.boolean().default(false).
|
|
30
|
-
clientIp: z.string().default("").
|
|
31
|
-
userAgent: z.string().default("").
|
|
32
|
-
referrer: z.string().default("").
|
|
28
|
+
correlationId: z.string().default("").meta({ description: "A unique identifier for the request, can be used for tracing and logging purposes." }),
|
|
29
|
+
isBot: z.boolean().default(false).meta({ description: "Indicates if the request is made by a bot or crawler." }),
|
|
30
|
+
clientIp: z.string().default("").meta({ description: "The IP address of the client making the request, if available. Mostly for logging purposes" }),
|
|
31
|
+
userAgent: z.string().default("").meta({ description: "The user agent string of the client making the request, if available." }),
|
|
32
|
+
referrer: z.string().default("").meta({ description: "The referrer URL, if available." })
|
|
33
33
|
});
|
|
34
34
|
export {
|
|
35
35
|
IdentityContextSchema,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BaseModel } from '../schemas/models/index.js';
|
|
2
2
|
import type { Result } from '../schemas/result.js';
|
|
3
3
|
import type { Cache, CacheEntryOptions } from './cache.interface.js';
|
|
4
|
-
import type z from 'zod';
|
|
4
|
+
import type * as z from 'zod';
|
|
5
5
|
/**
|
|
6
6
|
* Memory version of the cache. Primarily useful for local development.
|
|
7
7
|
* This is NOT suited for production use.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Redis } from '@upstash/redis';
|
|
2
2
|
import type { Cache, CacheEntryOptions } from './cache.interface.js';
|
|
3
|
-
import type z from 'zod';
|
|
3
|
+
import type * as z from 'zod';
|
|
4
4
|
export declare class RedisCache implements Cache {
|
|
5
5
|
protected redis: Redis;
|
|
6
6
|
protected meter: import("../metrics/metrics.js").ReactionaryCacheMetrics;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import z from "zod";
|
|
1
|
+
import * as z from "zod";
|
|
2
2
|
import type { InferType } from "../../zod-utils.js";
|
|
3
3
|
export declare const OrderSearchResultItemSchema: z.ZodObject<{
|
|
4
4
|
identifier: z.ZodObject<{
|
|
5
5
|
key: z.ZodString;
|
|
6
|
-
}, z.
|
|
6
|
+
}, z.core.$loose>;
|
|
7
7
|
userId: z.ZodObject<{
|
|
8
8
|
userId: z.ZodString;
|
|
9
|
-
}, z.
|
|
9
|
+
}, z.core.$loose>;
|
|
10
10
|
customerName: z.ZodString;
|
|
11
11
|
shippingAddress: z.ZodOptional<z.ZodObject<{
|
|
12
12
|
identifier: z.ZodDefault<z.ZodObject<{
|
|
13
13
|
nickName: z.ZodString;
|
|
14
|
-
}, z.
|
|
14
|
+
}, z.core.$loose>>;
|
|
15
15
|
firstName: z.ZodString;
|
|
16
16
|
lastName: z.ZodString;
|
|
17
17
|
streetAddress: z.ZodString;
|
|
@@ -20,7 +20,7 @@ export declare const OrderSearchResultItemSchema: z.ZodObject<{
|
|
|
20
20
|
region: z.ZodString;
|
|
21
21
|
postalCode: z.ZodString;
|
|
22
22
|
countryCode: z.ZodString;
|
|
23
|
-
}, z.
|
|
23
|
+
}, z.core.$loose>>;
|
|
24
24
|
orderDate: z.ZodString;
|
|
25
25
|
orderStatus: z.ZodEnum<{
|
|
26
26
|
AwaitingPayment: "AwaitingPayment";
|
|
@@ -219,8 +219,8 @@ export declare const OrderSearchResultItemSchema: z.ZodObject<{
|
|
|
219
219
|
ZMW: "ZMW";
|
|
220
220
|
ZWL: "ZWL";
|
|
221
221
|
}>;
|
|
222
|
-
}, z.
|
|
223
|
-
}, z.
|
|
222
|
+
}, z.core.$loose>;
|
|
223
|
+
}, z.core.$loose>;
|
|
224
224
|
export declare const OrderSearchResultSchema: z.ZodObject<{
|
|
225
225
|
pageNumber: z.ZodNumber;
|
|
226
226
|
pageSize: z.ZodNumber;
|
|
@@ -229,15 +229,15 @@ export declare const OrderSearchResultSchema: z.ZodObject<{
|
|
|
229
229
|
items: z.ZodArray<z.ZodObject<{
|
|
230
230
|
identifier: z.ZodObject<{
|
|
231
231
|
key: z.ZodString;
|
|
232
|
-
}, z.
|
|
232
|
+
}, z.core.$loose>;
|
|
233
233
|
userId: z.ZodObject<{
|
|
234
234
|
userId: z.ZodString;
|
|
235
|
-
}, z.
|
|
235
|
+
}, z.core.$loose>;
|
|
236
236
|
customerName: z.ZodString;
|
|
237
237
|
shippingAddress: z.ZodOptional<z.ZodObject<{
|
|
238
238
|
identifier: z.ZodDefault<z.ZodObject<{
|
|
239
239
|
nickName: z.ZodString;
|
|
240
|
-
}, z.
|
|
240
|
+
}, z.core.$loose>>;
|
|
241
241
|
firstName: z.ZodString;
|
|
242
242
|
lastName: z.ZodString;
|
|
243
243
|
streetAddress: z.ZodString;
|
|
@@ -246,7 +246,7 @@ export declare const OrderSearchResultSchema: z.ZodObject<{
|
|
|
246
246
|
region: z.ZodString;
|
|
247
247
|
postalCode: z.ZodString;
|
|
248
248
|
countryCode: z.ZodString;
|
|
249
|
-
}, z.
|
|
249
|
+
}, z.core.$loose>>;
|
|
250
250
|
orderDate: z.ZodString;
|
|
251
251
|
orderStatus: z.ZodEnum<{
|
|
252
252
|
AwaitingPayment: "AwaitingPayment";
|
|
@@ -445,8 +445,8 @@ export declare const OrderSearchResultSchema: z.ZodObject<{
|
|
|
445
445
|
ZMW: "ZMW";
|
|
446
446
|
ZWL: "ZWL";
|
|
447
447
|
}>;
|
|
448
|
-
}, z.
|
|
449
|
-
}, z.
|
|
448
|
+
}, z.core.$loose>;
|
|
449
|
+
}, z.core.$loose>>;
|
|
450
450
|
identifier: z.ZodObject<{
|
|
451
451
|
term: z.ZodString;
|
|
452
452
|
partNumber: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -458,15 +458,15 @@ export declare const OrderSearchResultSchema: z.ZodObject<{
|
|
|
458
458
|
}>>>;
|
|
459
459
|
user: z.ZodOptional<z.ZodObject<{
|
|
460
460
|
userId: z.ZodString;
|
|
461
|
-
}, z.
|
|
461
|
+
}, z.core.$loose>>;
|
|
462
462
|
startDate: z.ZodOptional<z.ZodString>;
|
|
463
463
|
endDate: z.ZodOptional<z.ZodString>;
|
|
464
464
|
filters: z.ZodArray<z.ZodString>;
|
|
465
465
|
paginationOptions: z.ZodObject<{
|
|
466
466
|
pageNumber: z.ZodDefault<z.ZodNumber>;
|
|
467
467
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
468
|
-
}, z.
|
|
469
|
-
}, z.
|
|
470
|
-
}, z.
|
|
468
|
+
}, z.core.$loose>;
|
|
469
|
+
}, z.core.$loose>;
|
|
470
|
+
}, z.core.$strip>;
|
|
471
471
|
export type OrderSearchResult = InferType<typeof OrderSearchResultSchema>;
|
|
472
472
|
export type OrderSearchResultItem = InferType<typeof OrderSearchResultItemSchema>;
|
|
@@ -1,109 +1,110 @@
|
|
|
1
|
-
import z from "zod";
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import type { InferType } from "../../zod-utils.js";
|
|
2
3
|
export declare const BaseProductRecommendationSchema: z.ZodObject<{
|
|
3
4
|
recommendationIdentifier: z.ZodObject<{
|
|
4
5
|
key: z.ZodString;
|
|
5
6
|
algorithm: z.ZodString;
|
|
6
|
-
}, z.
|
|
7
|
-
}, z.
|
|
7
|
+
}, z.core.$loose>;
|
|
8
|
+
}, z.core.$loose>;
|
|
8
9
|
export declare const ProductRecommendationIdOnlySchema: z.ZodObject<{
|
|
9
10
|
recommendationIdentifier: z.ZodObject<{
|
|
10
11
|
key: z.ZodString;
|
|
11
12
|
algorithm: z.ZodString;
|
|
12
|
-
}, z.
|
|
13
|
+
}, z.core.$loose>;
|
|
13
14
|
recommendationReturnType: z.ZodLiteral<"idOnly">;
|
|
14
15
|
product: z.ZodObject<{
|
|
15
16
|
key: z.ZodString;
|
|
16
|
-
}, z.
|
|
17
|
-
}, z.
|
|
17
|
+
}, z.core.$loose>;
|
|
18
|
+
}, z.core.$loose>;
|
|
18
19
|
export declare const ProductRecommendationProductSearchResultItemSchema: z.ZodObject<{
|
|
19
20
|
recommendationIdentifier: z.ZodObject<{
|
|
20
21
|
key: z.ZodString;
|
|
21
22
|
algorithm: z.ZodString;
|
|
22
|
-
}, z.
|
|
23
|
+
}, z.core.$loose>;
|
|
23
24
|
recommendationReturnType: z.ZodLiteral<"productSearchResultItem">;
|
|
24
25
|
product: z.ZodObject<{
|
|
25
26
|
identifier: z.ZodObject<{
|
|
26
27
|
key: z.ZodString;
|
|
27
|
-
}, z.
|
|
28
|
+
}, z.core.$loose>;
|
|
28
29
|
name: z.ZodString;
|
|
29
30
|
slug: z.ZodString;
|
|
30
31
|
variants: z.ZodArray<z.ZodObject<{
|
|
31
32
|
variant: z.ZodObject<{
|
|
32
33
|
sku: z.ZodString;
|
|
33
|
-
}, z.
|
|
34
|
+
}, z.core.$loose>;
|
|
34
35
|
image: z.ZodObject<{
|
|
35
36
|
sourceUrl: z.ZodDefault<z.ZodString>;
|
|
36
37
|
altText: z.ZodDefault<z.ZodString>;
|
|
37
38
|
width: z.ZodOptional<z.ZodNumber>;
|
|
38
39
|
height: z.ZodOptional<z.ZodNumber>;
|
|
39
|
-
}, z.
|
|
40
|
+
}, z.core.$loose>;
|
|
40
41
|
options: z.ZodOptional<z.ZodObject<{
|
|
41
42
|
identifier: z.ZodObject<{
|
|
42
43
|
key: z.ZodString;
|
|
43
|
-
}, z.
|
|
44
|
+
}, z.core.$loose>;
|
|
44
45
|
name: z.ZodString;
|
|
45
46
|
value: z.ZodObject<{
|
|
46
47
|
identifier: z.ZodObject<{
|
|
47
48
|
option: z.ZodObject<{
|
|
48
49
|
key: z.ZodString;
|
|
49
|
-
}, z.
|
|
50
|
+
}, z.core.$loose>;
|
|
50
51
|
key: z.ZodString;
|
|
51
|
-
}, z.
|
|
52
|
+
}, z.core.$loose>;
|
|
52
53
|
label: z.ZodString;
|
|
53
|
-
}, z.
|
|
54
|
-
}, z.
|
|
55
|
-
}, z.
|
|
56
|
-
}, z.
|
|
57
|
-
}, z.
|
|
54
|
+
}, z.core.$loose>;
|
|
55
|
+
}, z.core.$loose>>;
|
|
56
|
+
}, z.core.$loose>>;
|
|
57
|
+
}, z.core.$loose>;
|
|
58
|
+
}, z.core.$loose>;
|
|
58
59
|
export declare const ProductRecommendationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
59
60
|
recommendationIdentifier: z.ZodObject<{
|
|
60
61
|
key: z.ZodString;
|
|
61
62
|
algorithm: z.ZodString;
|
|
62
|
-
}, z.
|
|
63
|
+
}, z.core.$loose>;
|
|
63
64
|
recommendationReturnType: z.ZodLiteral<"idOnly">;
|
|
64
65
|
product: z.ZodObject<{
|
|
65
66
|
key: z.ZodString;
|
|
66
|
-
}, z.
|
|
67
|
-
}, z.
|
|
67
|
+
}, z.core.$loose>;
|
|
68
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
68
69
|
recommendationIdentifier: z.ZodObject<{
|
|
69
70
|
key: z.ZodString;
|
|
70
71
|
algorithm: z.ZodString;
|
|
71
|
-
}, z.
|
|
72
|
+
}, z.core.$loose>;
|
|
72
73
|
recommendationReturnType: z.ZodLiteral<"productSearchResultItem">;
|
|
73
74
|
product: z.ZodObject<{
|
|
74
75
|
identifier: z.ZodObject<{
|
|
75
76
|
key: z.ZodString;
|
|
76
|
-
}, z.
|
|
77
|
+
}, z.core.$loose>;
|
|
77
78
|
name: z.ZodString;
|
|
78
79
|
slug: z.ZodString;
|
|
79
80
|
variants: z.ZodArray<z.ZodObject<{
|
|
80
81
|
variant: z.ZodObject<{
|
|
81
82
|
sku: z.ZodString;
|
|
82
|
-
}, z.
|
|
83
|
+
}, z.core.$loose>;
|
|
83
84
|
image: z.ZodObject<{
|
|
84
85
|
sourceUrl: z.ZodDefault<z.ZodString>;
|
|
85
86
|
altText: z.ZodDefault<z.ZodString>;
|
|
86
87
|
width: z.ZodOptional<z.ZodNumber>;
|
|
87
88
|
height: z.ZodOptional<z.ZodNumber>;
|
|
88
|
-
}, z.
|
|
89
|
+
}, z.core.$loose>;
|
|
89
90
|
options: z.ZodOptional<z.ZodObject<{
|
|
90
91
|
identifier: z.ZodObject<{
|
|
91
92
|
key: z.ZodString;
|
|
92
|
-
}, z.
|
|
93
|
+
}, z.core.$loose>;
|
|
93
94
|
name: z.ZodString;
|
|
94
95
|
value: z.ZodObject<{
|
|
95
96
|
identifier: z.ZodObject<{
|
|
96
97
|
option: z.ZodObject<{
|
|
97
98
|
key: z.ZodString;
|
|
98
|
-
}, z.
|
|
99
|
+
}, z.core.$loose>;
|
|
99
100
|
key: z.ZodString;
|
|
100
|
-
}, z.
|
|
101
|
+
}, z.core.$loose>;
|
|
101
102
|
label: z.ZodString;
|
|
102
|
-
}, z.
|
|
103
|
-
}, z.
|
|
104
|
-
}, z.
|
|
105
|
-
}, z.
|
|
106
|
-
}, z.
|
|
107
|
-
export type ProductRecommendationIdOnly =
|
|
108
|
-
export type ProductRecommendationSearchItem =
|
|
109
|
-
export type ProductRecommendation =
|
|
103
|
+
}, z.core.$loose>;
|
|
104
|
+
}, z.core.$loose>>;
|
|
105
|
+
}, z.core.$loose>>;
|
|
106
|
+
}, z.core.$loose>;
|
|
107
|
+
}, z.core.$loose>], "recommendationReturnType">;
|
|
108
|
+
export type ProductRecommendationIdOnly = InferType<typeof ProductRecommendationIdOnlySchema>;
|
|
109
|
+
export type ProductRecommendationSearchItem = InferType<typeof ProductRecommendationProductSearchResultItemSchema>;
|
|
110
|
+
export type ProductRecommendation = InferType<typeof ProductRecommendationSchema>;
|