@replohq/sdk 0.9.0 → 0.11.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/_vendor/schemas/loaderKeys.mjs +2 -0
- package/_vendor/schemas/routing/locale.d.ts +1 -1
- package/cart/buy-now-action.js +8 -12
- package/cart/buy-now-action.js.map +2 -2
- package/cart/storefront-urls.d.ts +10 -0
- package/cart/storefront-urls.js +44 -0
- package/cart/storefront-urls.js.map +7 -0
- package/lib/buildMetadata.js +3 -3
- package/loaders/collection-loader-args.d.ts +15 -0
- package/loaders/collection-loader-args.js +15 -0
- package/loaders/collection-loader-args.js.map +7 -0
- package/loaders/collection-loader.d.ts +3 -4
- package/loaders/collection-loader.js +12 -14
- package/loaders/collection-loader.js.map +2 -2
- package/loaders/collection-products-loader-args.d.ts +16 -0
- package/loaders/collection-products-loader-args.js +17 -0
- package/loaders/collection-products-loader-args.js.map +7 -0
- package/loaders/collection-products-loader.d.ts +3 -5
- package/loaders/collection-products-loader.js +13 -16
- package/loaders/collection-products-loader.js.map +2 -2
- package/loaders/loader-keys.d.ts +2 -0
- package/loaders/loader-keys.js +2 -0
- package/loaders/loader-keys.js.map +2 -2
- package/loaders/loader-schemas.d.ts +40 -0
- package/loaders/loader-schemas.js +27 -0
- package/loaders/loader-schemas.js.map +2 -2
- package/loaders/loox-review-aggregate-loader.d.ts +12 -0
- package/loaders/loox-review-aggregate-loader.js +50 -0
- package/loaders/loox-review-aggregate-loader.js.map +7 -0
- package/loaders/loox-reviews-loader.d.ts +12 -0
- package/loaders/loox-reviews-loader.js +50 -0
- package/loaders/loox-reviews-loader.js.map +7 -0
- package/loaders/product-loader-args.d.ts +2 -1
- package/loaders/product-loader-args.js +4 -2
- package/loaders/product-loader-args.js.map +2 -2
- package/loaders/product-loader.d.ts +1 -1
- package/loaders/product-loader.js +3 -1
- package/loaders/product-loader.js.map +2 -2
- package/package.json +20 -4
|
@@ -19,6 +19,8 @@ var DATA_LOADER_KEYS = {
|
|
|
19
19
|
YOTPO_PRODUCT_REVIEW_AGGREGATE: "yotpo.product_review_aggregate",
|
|
20
20
|
REVIEWS_IO_PRODUCT_REVIEWS: "reviews_io.product_reviews",
|
|
21
21
|
REVIEWS_IO_PRODUCT_REVIEW_AGGREGATE: "reviews_io.product_review_aggregate",
|
|
22
|
+
LOOX_PRODUCT_REVIEWS: "loox.product_reviews",
|
|
23
|
+
LOOX_PRODUCT_REVIEW_AGGREGATE: "loox.product_review_aggregate",
|
|
22
24
|
STATSIG_EXPERIMENT: "statsig.experiment",
|
|
23
25
|
CONTENTFUL_ENTRY: "contentful.entry",
|
|
24
26
|
CONTENTFUL_ENTRIES: "contentful.entries"
|
|
@@ -21,8 +21,8 @@ export declare const localeRoutingConfigSchema: z.ZodObject<{
|
|
|
21
21
|
locales: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
22
22
|
defaultLocale: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
23
23
|
detection: z.ZodDefault<z.ZodEnum<{
|
|
24
|
-
country: "country";
|
|
25
24
|
language: "language";
|
|
25
|
+
country: "country";
|
|
26
26
|
}>>;
|
|
27
27
|
urlMode: z.ZodDefault<z.ZodEnum<{
|
|
28
28
|
prefixed: "prefixed";
|
package/cart/buy-now-action.js
CHANGED
|
@@ -8,6 +8,7 @@ import { getCheckoutProvider } from "../lib/integration-utils";
|
|
|
8
8
|
import { buildBaseUrl } from "../lib/url-utils";
|
|
9
9
|
import { createCartAction } from "./cart-actions";
|
|
10
10
|
import { REPLO_ATTRIBUTION_PROPERTY } from "./cart-types";
|
|
11
|
+
import { getStorefrontUrls } from "./storefront-urls";
|
|
11
12
|
class BuyNowError extends CanopyError {
|
|
12
13
|
}
|
|
13
14
|
class BuyNowCartCreationError extends CanopyError {
|
|
@@ -19,9 +20,13 @@ async function buyNowAction(input) {
|
|
|
19
20
|
if (!host) {
|
|
20
21
|
throw new BuyNowError({ message: "Missing host header" });
|
|
21
22
|
}
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
const { origin, cancelUrl } = getStorefrontUrls({
|
|
24
|
+
host,
|
|
25
|
+
forwardedHost: headersList.get("x-forwarded-host"),
|
|
26
|
+
forwardedProto: headersList.get("x-forwarded-proto"),
|
|
27
|
+
requestOrigin: headersList.get("origin"),
|
|
28
|
+
pageUrl
|
|
29
|
+
});
|
|
25
30
|
const checkoutProvider = await getCheckoutProvider();
|
|
26
31
|
const cartLines = lineItems.map((item) => {
|
|
27
32
|
const hasReploAttribution = item.properties.some(
|
|
@@ -37,15 +42,6 @@ async function buyNowAction(input) {
|
|
|
37
42
|
});
|
|
38
43
|
if (checkoutProvider === "stripe") {
|
|
39
44
|
const env = await getEnv();
|
|
40
|
-
const isSameOrigin = (() => {
|
|
41
|
-
try {
|
|
42
|
-
return Boolean(pageUrl) && new URL(pageUrl).origin === origin;
|
|
43
|
-
} catch {
|
|
44
|
-
return false;
|
|
45
|
-
}
|
|
46
|
-
})();
|
|
47
|
-
const safePageUrl = isSameOrigin ? pageUrl : origin;
|
|
48
|
-
const cancelUrl = safePageUrl;
|
|
49
45
|
const temporaryCartId = uuidv4();
|
|
50
46
|
const body = {
|
|
51
47
|
cartId: temporaryCartId,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../cart/buy-now-action.ts"],
|
|
4
|
-
"sourcesContent": ["\"use server\";\n\nimport type { CartLineAttribute } from \"./cart-types\";\n\nimport { headers } from \"next/headers\";\n\nimport { v4 as uuidv4 } from \"uuid\";\nimport { z } from \"zod\";\n\nimport { getEnv } from \"../env\";\nimport { CanopyError } from \"../lib/canopy-error\";\nimport { getCheckoutProvider } from \"../lib/integration-utils\";\nimport { buildBaseUrl } from \"../lib/url-utils\";\nimport { createCartAction } from \"./cart-actions\";\nimport { REPLO_ATTRIBUTION_PROPERTY } from \"./cart-types\";\n\nclass BuyNowError extends CanopyError {}\nclass BuyNowCartCreationError extends CanopyError {}\n\n/**\n * Server action that handles the full buy-now flow:\n * 1. For Shopify: creates a cart via the canopy-api-backed gateway, returns checkoutUrl.\n * 2. For Stripe: creates a Stripe checkout session via canopy-api, returns session URL.\n *\n * Variant IDs are expected to already be Storefront GIDs (from data loader output).\n * No internal\u2192external ID mapping is needed.\n */\nexport async function buyNowAction(input: {\n lineItems: {\n variantId: string;\n quantity: number;\n sellingPlanId: string | null;\n properties: CartLineAttribute[];\n }[];\n discountCodes: string[];\n pageUrl: string;\n}): Promise<{ redirectUrl: string }> {\n const { lineItems, discountCodes, pageUrl } = input;\n\n const headersList = await headers();\n const host = headersList.get(\"host\");\n if (!host) {\n throw new BuyNowError({ message: \"Missing host header\" });\n }\n const
|
|
5
|
-
"mappings": ";AAIA,SAAS,eAAe;AAExB,SAAS,MAAM,cAAc;AAC7B,SAAS,SAAS;AAElB,SAAS,cAAc;AACvB,SAAS,mBAAmB;AAC5B,SAAS,2BAA2B;AACpC,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC,SAAS,kCAAkC;
|
|
4
|
+
"sourcesContent": ["\"use server\";\n\nimport type { CartLineAttribute } from \"./cart-types\";\n\nimport { headers } from \"next/headers\";\n\nimport { v4 as uuidv4 } from \"uuid\";\nimport { z } from \"zod\";\n\nimport { getEnv } from \"../env\";\nimport { CanopyError } from \"../lib/canopy-error\";\nimport { getCheckoutProvider } from \"../lib/integration-utils\";\nimport { buildBaseUrl } from \"../lib/url-utils\";\nimport { createCartAction } from \"./cart-actions\";\nimport { REPLO_ATTRIBUTION_PROPERTY } from \"./cart-types\";\nimport { getStorefrontUrls } from \"./storefront-urls\";\n\nclass BuyNowError extends CanopyError {}\nclass BuyNowCartCreationError extends CanopyError {}\n\n/**\n * Server action that handles the full buy-now flow:\n * 1. For Shopify: creates a cart via the canopy-api-backed gateway, returns checkoutUrl.\n * 2. For Stripe: creates a Stripe checkout session via canopy-api, returns session URL.\n *\n * Variant IDs are expected to already be Storefront GIDs (from data loader output).\n * No internal\u2192external ID mapping is needed.\n */\nexport async function buyNowAction(input: {\n lineItems: {\n variantId: string;\n quantity: number;\n sellingPlanId: string | null;\n properties: CartLineAttribute[];\n }[];\n discountCodes: string[];\n pageUrl: string;\n}): Promise<{ redirectUrl: string }> {\n const { lineItems, discountCodes, pageUrl } = input;\n\n const headersList = await headers();\n const host = headersList.get(\"host\");\n if (!host) {\n throw new BuyNowError({ message: \"Missing host header\" });\n }\n const { origin, cancelUrl } = getStorefrontUrls({\n host,\n forwardedHost: headersList.get(\"x-forwarded-host\"),\n forwardedProto: headersList.get(\"x-forwarded-proto\"),\n requestOrigin: headersList.get(\"origin\"),\n pageUrl,\n });\n\n const checkoutProvider = await getCheckoutProvider();\n\n const cartLines = lineItems.map((item) => {\n const hasReploAttribution = item.properties.some(\n (prop) => prop.key === REPLO_ATTRIBUTION_PROPERTY.key,\n );\n const properties = hasReploAttribution\n ? item.properties\n : [REPLO_ATTRIBUTION_PROPERTY, ...item.properties];\n\n return {\n id: item.variantId,\n quantity: item.quantity,\n sellingPlanId: item.sellingPlanId,\n properties,\n };\n });\n\n if (checkoutProvider === \"stripe\") {\n const env = await getEnv();\n const temporaryCartId = uuidv4();\n\n const body = {\n cartId: temporaryCartId,\n lines: cartLines.map((line) => ({\n variantId: line.id,\n quantity: line.quantity,\n properties: line.properties,\n })),\n projectId: env.PROJECT_ID,\n // canopy appends session_id={CHECKOUT_SESSION_ID} at session creation;\n // the success route resolves it into the order status page.\n successUrl: `${origin}/checkout/success`,\n cancelUrl,\n };\n\n const canopyApiUrl = `${buildBaseUrl(env.CANOPY_API_HOST)}/api/v1/stripe-checkout/create-session`;\n const response = await fetch(canopyApiUrl, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(body),\n });\n\n if (!response.ok) {\n throw new BuyNowCartCreationError({\n message: \"Failed to create Stripe checkout session for buy now\",\n additionalData: {\n status: response.status,\n statusText: response.statusText,\n },\n });\n }\n\n const data = z.object({ url: z.string() }).safeParse(await response.json());\n if (!data.success) {\n throw new BuyNowCartCreationError({\n message: \"Stripe checkout session response missing redirect URL\",\n cause: data.error,\n });\n }\n return { redirectUrl: data.data.url };\n }\n\n // Shopify and other integrations: create cart via canopy-api-backed gateway\n const cart = await createCartAction({\n lines: cartLines,\n skipStoringCart: true,\n discountCodes: discountCodes.length > 0 ? discountCodes : undefined,\n });\n\n if (!cart?.checkoutUrl) {\n throw new BuyNowCartCreationError({\n message: \"Failed to create cart or get checkout URL\",\n additionalData: { lineItems, discountCodes },\n });\n }\n\n const checkoutUrl = new URL(cart.checkoutUrl, origin);\n return { redirectUrl: checkoutUrl.toString() };\n}\n"],
|
|
5
|
+
"mappings": ";AAIA,SAAS,eAAe;AAExB,SAAS,MAAM,cAAc;AAC7B,SAAS,SAAS;AAElB,SAAS,cAAc;AACvB,SAAS,mBAAmB;AAC5B,SAAS,2BAA2B;AACpC,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC,SAAS,kCAAkC;AAC3C,SAAS,yBAAyB;AAElC,MAAM,oBAAoB,YAAY;AAAC;AACvC,MAAM,gCAAgC,YAAY;AAAC;AAUnD,eAAsB,aAAa,OASE;AACnC,QAAM,EAAE,WAAW,eAAe,QAAQ,IAAI;AAE9C,QAAM,cAAc,MAAM,QAAQ;AAClC,QAAM,OAAO,YAAY,IAAI,MAAM;AACnC,MAAI,CAAC,MAAM;AACT,UAAM,IAAI,YAAY,EAAE,SAAS,sBAAsB,CAAC;AAAA,EAC1D;AACA,QAAM,EAAE,QAAQ,UAAU,IAAI,kBAAkB;AAAA,IAC9C;AAAA,IACA,eAAe,YAAY,IAAI,kBAAkB;AAAA,IACjD,gBAAgB,YAAY,IAAI,mBAAmB;AAAA,IACnD,eAAe,YAAY,IAAI,QAAQ;AAAA,IACvC;AAAA,EACF,CAAC;AAED,QAAM,mBAAmB,MAAM,oBAAoB;AAEnD,QAAM,YAAY,UAAU,IAAI,CAAC,SA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A,WAAO,EAAE,aAAa,KAAK,KAAK,IAAI;AAAA,EACtC;AAGA,QAAM,OAAO,MAAM,iBAAiB;AAAA,IAClC,OAAO;AAAA,IACP,iBAAiB;AAAA,IACjB,eAAe,cAAc,SAAS,IAAI,gBAAgB;AAAA,EAC5D,CAAC;AAED,MAAI,CAAC,MAAM,aAAa;AACtB,UAAM,IAAI,wBAAwB;AAAA,MAChC,SAAS;AAAA,MACT,gBAAgB,EAAE,WAAW,cAAc;AAAA,IAC7C,CAAC;AAAA,EACH;AAEA,QAAM,cAAc,IAAI,IAAI,KAAK,aAAa,MAAM;AACpD,SAAO,EAAE,aAAa,YAAY,SAAS,EAAE;AAC/C;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function getStorefrontUrls({ host, forwardedHost, forwardedProto, requestOrigin, pageUrl, }: {
|
|
2
|
+
host: string;
|
|
3
|
+
forwardedHost: string | null;
|
|
4
|
+
forwardedProto: string | null;
|
|
5
|
+
requestOrigin: string | null;
|
|
6
|
+
pageUrl: string;
|
|
7
|
+
}): {
|
|
8
|
+
origin: string;
|
|
9
|
+
cancelUrl: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
function firstHeaderValue(value) {
|
|
2
|
+
const firstValue = value?.split(",")[0]?.trim();
|
|
3
|
+
return firstValue ? firstValue : null;
|
|
4
|
+
}
|
|
5
|
+
function parseOrigin(value) {
|
|
6
|
+
if (!value) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
try {
|
|
10
|
+
return new URL(value).origin;
|
|
11
|
+
} catch {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function getStorefrontUrls({
|
|
16
|
+
host,
|
|
17
|
+
forwardedHost,
|
|
18
|
+
forwardedProto,
|
|
19
|
+
requestOrigin,
|
|
20
|
+
pageUrl
|
|
21
|
+
}) {
|
|
22
|
+
const protocol = firstHeaderValue(forwardedProto) === "http" ? "http" : "https";
|
|
23
|
+
const proxyHost = firstHeaderValue(forwardedHost) ?? host;
|
|
24
|
+
const fallbackOrigin = `${protocol}://${proxyHost}`;
|
|
25
|
+
const trustedOrigins = /* @__PURE__ */ new Set([
|
|
26
|
+
fallbackOrigin,
|
|
27
|
+
parseOrigin(firstHeaderValue(requestOrigin))
|
|
28
|
+
]);
|
|
29
|
+
try {
|
|
30
|
+
const parsedPageUrl = new URL(pageUrl);
|
|
31
|
+
if (trustedOrigins.has(parsedPageUrl.origin)) {
|
|
32
|
+
return {
|
|
33
|
+
origin: parsedPageUrl.origin,
|
|
34
|
+
cancelUrl: parsedPageUrl.toString()
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
} catch {
|
|
38
|
+
}
|
|
39
|
+
return { origin: fallbackOrigin, cancelUrl: fallbackOrigin };
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
getStorefrontUrls
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=storefront-urls.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../cart/storefront-urls.ts"],
|
|
4
|
+
"sourcesContent": ["function firstHeaderValue(value: string | null) {\n const firstValue = value?.split(\",\")[0]?.trim();\n return firstValue ? firstValue : null;\n}\n\nfunction parseOrigin(value: string | null) {\n if (!value) {\n return null;\n }\n\n try {\n return new URL(value).origin;\n } catch {\n return null;\n }\n}\n\nexport function getStorefrontUrls({\n host,\n forwardedHost,\n forwardedProto,\n requestOrigin,\n pageUrl,\n}: {\n host: string;\n forwardedHost: string | null;\n forwardedProto: string | null;\n requestOrigin: string | null;\n pageUrl: string;\n}) {\n const protocol =\n firstHeaderValue(forwardedProto) === \"http\" ? \"http\" : \"https\";\n const proxyHost = firstHeaderValue(forwardedHost) ?? host;\n const fallbackOrigin = `${protocol}://${proxyHost}`;\n const trustedOrigins = new Set([\n fallbackOrigin,\n parseOrigin(firstHeaderValue(requestOrigin)),\n ]);\n\n try {\n const parsedPageUrl = new URL(pageUrl);\n if (trustedOrigins.has(parsedPageUrl.origin)) {\n return {\n origin: parsedPageUrl.origin,\n cancelUrl: parsedPageUrl.toString(),\n };\n }\n } catch {\n // The server-derived fallback below remains the only trusted destination.\n }\n\n return { origin: fallbackOrigin, cancelUrl: fallbackOrigin };\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,iBAAiB,OAAsB;AAC9C,QAAM,aAAa,OAAO,MAAM,GAAG,EAAE,CAAC,GAAG,KAAK;AAC9C,SAAO,aAAa,aAAa;AACnC;AAEA,SAAS,YAAY,OAAsB;AACzC,MAAI,CAAC,OAAO;AACV,WAAO;AAAA,EACT;AAEA,MAAI;AACF,WAAO,IAAI,IAAI,KAAK,EAAE;AAAA,EACxB,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEO,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAMG;AACD,QAAM,WACJ,iBAAiB,cAAc,MAAM,SAAS,SAAS;AACzD,QAAM,YAAY,iBAAiB,aAAa,KAAK;AACrD,QAAM,iBAAiB,GAAG,QAAQ,MAAM,SAAS;AACjD,QAAM,iBAAiB,oBAAI,IAAI;AAAA,IAC7B;AAAA,IACA,YAAY,iBAAiB,aAAa,CAAC;AAAA,EAC7C,CAAC;AAED,MAAI;AACF,UAAM,gBAAgB,IAAI,IAAI,OAAO;AACrC,QAAI,eAAe,IAAI,cAAc,MAAM,GAAG;AAC5C,aAAO;AAAA,QACL,QAAQ,cAAc;AAAA,QACtB,WAAW,cAAc,SAAS;AAAA,MACpC;AAAA,IACF;AAAA,EACF,QAAQ;AAAA,EAER;AAEA,SAAO,EAAE,QAAQ,gBAAgB,WAAW,eAAe;AAC7D;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/lib/buildMetadata.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const BUILD_METADATA = {
|
|
2
2
|
"packageName": "@replohq/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"branch": "HEAD",
|
|
5
|
-
"commit": "
|
|
6
|
-
"builtAt": "2026-08-
|
|
5
|
+
"commit": "7a8afc1864c3ceac29503c76844f95206e43d1f4",
|
|
6
|
+
"builtAt": "2026-08-26T19:11:20.910Z"
|
|
7
7
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type CollectionLoaderArgs = {
|
|
2
|
+
handle?: string;
|
|
3
|
+
collectionGid?: string;
|
|
4
|
+
language?: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Builds the single object used as BOTH the React Query key and the loader
|
|
8
|
+
* payload. They must stay identical: `PrefetchedLoaders` seeds the cache under
|
|
9
|
+
* `[loaderKey, args]`, so an arg sent to the loader but missing from the key
|
|
10
|
+
* (or vice versa) silently misses the prefetch.
|
|
11
|
+
*
|
|
12
|
+
* Keys left `undefined` drop out of React Query's key hash, so omitting a field
|
|
13
|
+
* here hashes the same as a prefetch that never passed it.
|
|
14
|
+
*/
|
|
15
|
+
export declare function buildCollectionLoaderArgs({ handle, collectionGid, language, }: CollectionLoaderArgs): CollectionLoaderArgs;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../loaders/collection-loader-args.ts"],
|
|
4
|
+
"sourcesContent": ["export type CollectionLoaderArgs = {\n handle?: string;\n collectionGid?: string;\n language?: string;\n};\n\n/**\n * Builds the single object used as BOTH the React Query key and the loader\n * payload. They must stay identical: `PrefetchedLoaders` seeds the cache under\n * `[loaderKey, args]`, so an arg sent to the loader but missing from the key\n * (or vice versa) silently misses the prefetch.\n *\n * Keys left `undefined` drop out of React Query's key hash, so omitting a field\n * here hashes the same as a prefetch that never passed it.\n */\nexport function buildCollectionLoaderArgs({\n handle,\n collectionGid,\n language,\n}: CollectionLoaderArgs): CollectionLoaderArgs {\n return {\n handle,\n collectionGid,\n language,\n };\n}\n"],
|
|
5
|
+
"mappings": "AAeO,SAAS,0BAA0B;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AACF,GAA+C;AAC7C,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
+
import type { CollectionLoaderArgs } from "./collection-loader-args";
|
|
2
3
|
import type { FullCollection } from "./loader-schemas";
|
|
3
|
-
type CollectionLoaderProps = {
|
|
4
|
+
type CollectionLoaderProps = CollectionLoaderArgs & {
|
|
4
5
|
loaderKey: string;
|
|
5
|
-
handle?: string;
|
|
6
|
-
collectionGid?: string;
|
|
7
6
|
children: (data: FullCollection) => ReactNode;
|
|
8
7
|
fallback?: ReactNode;
|
|
9
8
|
};
|
|
10
|
-
export declare function CollectionLoader({ loaderKey, handle, collectionGid, children, fallback, }: CollectionLoaderProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function CollectionLoader({ loaderKey, handle, collectionGid, language, children, fallback, }: CollectionLoaderProps): import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
export {};
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Suspense } from "react";
|
|
4
4
|
import { useSuspenseQuery } from "@tanstack/react-query";
|
|
5
|
+
import { buildCollectionLoaderArgs } from "./collection-loader-args";
|
|
5
6
|
import { invokeLoader } from "./invoke-loader";
|
|
6
7
|
import { LoaderErrorBoundary } from "./loader-error-boundary";
|
|
7
8
|
import { fullCollectionSchema } from "./loader-schemas";
|
|
8
9
|
import { useReportPreviewPlaceholderRender } from "./preview-placeholder";
|
|
9
10
|
function CollectionLoaderInner({
|
|
10
11
|
loaderKey,
|
|
11
|
-
|
|
12
|
-
collectionGid,
|
|
12
|
+
args,
|
|
13
13
|
children
|
|
14
14
|
}) {
|
|
15
15
|
const queryResult = useSuspenseQuery({
|
|
16
|
-
queryKey: [loaderKey,
|
|
16
|
+
queryKey: [loaderKey, args],
|
|
17
17
|
queryFn: async () => {
|
|
18
18
|
const loadedData = await invokeLoader({
|
|
19
19
|
loaderKey,
|
|
20
|
-
args
|
|
20
|
+
args
|
|
21
21
|
});
|
|
22
22
|
return fullCollectionSchema.parse(loadedData);
|
|
23
23
|
}
|
|
@@ -29,23 +29,21 @@ function CollectionLoader({
|
|
|
29
29
|
loaderKey,
|
|
30
30
|
handle,
|
|
31
31
|
collectionGid,
|
|
32
|
+
language,
|
|
32
33
|
children,
|
|
33
34
|
fallback
|
|
34
35
|
}) {
|
|
36
|
+
const args = buildCollectionLoaderArgs({
|
|
37
|
+
handle,
|
|
38
|
+
collectionGid,
|
|
39
|
+
language
|
|
40
|
+
});
|
|
35
41
|
return /* @__PURE__ */ jsx(
|
|
36
42
|
LoaderErrorBoundary,
|
|
37
43
|
{
|
|
38
44
|
fallback: fallback ?? null,
|
|
39
|
-
resetKey: `${loaderKey}:${
|
|
40
|
-
children: /* @__PURE__ */ jsx(Suspense, { fallback: fallback ?? null, children: /* @__PURE__ */ jsx(
|
|
41
|
-
CollectionLoaderInner,
|
|
42
|
-
{
|
|
43
|
-
loaderKey,
|
|
44
|
-
handle,
|
|
45
|
-
collectionGid,
|
|
46
|
-
children
|
|
47
|
-
}
|
|
48
|
-
) })
|
|
45
|
+
resetKey: `${loaderKey}:${JSON.stringify(args)}`,
|
|
46
|
+
children: /* @__PURE__ */ jsx(Suspense, { fallback: fallback ?? null, children: /* @__PURE__ */ jsx(CollectionLoaderInner, { loaderKey, args, children }) })
|
|
49
47
|
}
|
|
50
48
|
);
|
|
51
49
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../loaders/collection-loader.tsx"],
|
|
4
|
-
"sourcesContent": ["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport type { FullCollection } from \"./loader-schemas\";\n\nimport { Suspense } from \"react\";\n\nimport { useSuspenseQuery } from \"@tanstack/react-query\";\n\nimport { invokeLoader } from \"./invoke-loader\";\nimport { LoaderErrorBoundary } from \"./loader-error-boundary\";\nimport { fullCollectionSchema } from \"./loader-schemas\";\nimport { useReportPreviewPlaceholderRender } from \"./preview-placeholder\";\n\ntype CollectionLoaderProps = {\n loaderKey: string;\n
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport type { CollectionLoaderArgs } from \"./collection-loader-args\";\nimport type { FullCollection } from \"./loader-schemas\";\n\nimport { Suspense } from \"react\";\n\nimport { useSuspenseQuery } from \"@tanstack/react-query\";\n\nimport { buildCollectionLoaderArgs } from \"./collection-loader-args\";\nimport { invokeLoader } from \"./invoke-loader\";\nimport { LoaderErrorBoundary } from \"./loader-error-boundary\";\nimport { fullCollectionSchema } from \"./loader-schemas\";\nimport { useReportPreviewPlaceholderRender } from \"./preview-placeholder\";\n\ntype CollectionLoaderProps = CollectionLoaderArgs & {\n loaderKey: string;\n children: (data: FullCollection) => ReactNode;\n fallback?: ReactNode;\n};\n\nfunction CollectionLoaderInner({\n loaderKey,\n args,\n children,\n}: {\n loaderKey: string;\n args: CollectionLoaderArgs;\n children: (data: FullCollection) => ReactNode;\n}) {\n const queryResult = useSuspenseQuery({\n queryKey: [loaderKey, args],\n queryFn: async () => {\n const loadedData = await invokeLoader({\n loaderKey,\n args,\n });\n return fullCollectionSchema.parse(loadedData);\n },\n });\n useReportPreviewPlaceholderRender(queryResult.data);\n\n return <>{children(queryResult.data)}</>;\n}\n\nexport function CollectionLoader({\n loaderKey,\n handle,\n collectionGid,\n language,\n children,\n fallback,\n}: CollectionLoaderProps) {\n const args = buildCollectionLoaderArgs({\n handle,\n collectionGid,\n language,\n });\n\n return (\n <LoaderErrorBoundary\n fallback={fallback ?? null}\n resetKey={`${loaderKey}:${JSON.stringify(args)}`}\n >\n <Suspense fallback={fallback ?? null}>\n <CollectionLoaderInner loaderKey={loaderKey} args={args}>\n {children}\n </CollectionLoaderInner>\n </Suspense>\n </LoaderErrorBoundary>\n );\n}\n"],
|
|
5
|
+
"mappings": ";AA2CS;AArCT,SAAS,gBAAgB;AAEzB,SAAS,wBAAwB;AAEjC,SAAS,iCAAiC;AAC1C,SAAS,oBAAoB;AAC7B,SAAS,2BAA2B;AACpC,SAAS,4BAA4B;AACrC,SAAS,yCAAyC;AAQlD,SAAS,sBAAsB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AACF,GAIG;AACD,QAAM,cAAc,iBAAiB;AAAA,IACnC,UAAU,CAAC,WAAW,IAAI;AAAA,IAC1B,SAAS,YAAY;AACnB,YAAM,aAAa,MAAM,aAAa;AAAA,QACpC;AAAA,QACA;AAAA,MACF,CAAC;AACD,aAAO,qBAAqB,MAAM,UAAU;AAAA,IAC9C;AAAA,EACF,CAAC;AACD,oCAAkC,YAAY,IAAI;AAElD,SAAO,gCAAG,mBAAS,YAAY,IAAI,GAAE;AACvC;AAEO,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA0B;AACxB,QAAM,OAAO,0BAA0B;AAAA,IACrC;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,YAAY;AAAA,MACtB,UAAU,GAAG,SAAS,IAAI,KAAK,UAAU,IAAI,CAAC;AAAA,MAE9C,8BAAC,YAAS,UAAU,YAAY,MAC9B,8BAAC,yBAAsB,WAAsB,MAC1C,UACH,GACF;AAAA;AAAA,EACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type CollectionProductsLoaderArgs = {
|
|
2
|
+
collectionGid: string;
|
|
3
|
+
first?: number;
|
|
4
|
+
after?: string;
|
|
5
|
+
language?: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Builds the single object used as BOTH the React Query key and the loader
|
|
9
|
+
* payload. They must stay identical: `PrefetchedLoaders` seeds the cache under
|
|
10
|
+
* `[loaderKey, args]`, so an arg sent to the loader but missing from the key
|
|
11
|
+
* (or vice versa) silently misses the prefetch.
|
|
12
|
+
*
|
|
13
|
+
* Keys left `undefined` drop out of React Query's key hash, so omitting a field
|
|
14
|
+
* here hashes the same as a prefetch that never passed it.
|
|
15
|
+
*/
|
|
16
|
+
export declare function buildCollectionProductsLoaderArgs({ collectionGid, first, after, language, }: CollectionProductsLoaderArgs): CollectionProductsLoaderArgs;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function buildCollectionProductsLoaderArgs({
|
|
2
|
+
collectionGid,
|
|
3
|
+
first,
|
|
4
|
+
after,
|
|
5
|
+
language
|
|
6
|
+
}) {
|
|
7
|
+
return {
|
|
8
|
+
collectionGid,
|
|
9
|
+
first,
|
|
10
|
+
after,
|
|
11
|
+
language
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
buildCollectionProductsLoaderArgs
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=collection-products-loader-args.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../loaders/collection-products-loader-args.ts"],
|
|
4
|
+
"sourcesContent": ["export type CollectionProductsLoaderArgs = {\n collectionGid: string;\n first?: number;\n after?: string;\n language?: string;\n};\n\n/**\n * Builds the single object used as BOTH the React Query key and the loader\n * payload. They must stay identical: `PrefetchedLoaders` seeds the cache under\n * `[loaderKey, args]`, so an arg sent to the loader but missing from the key\n * (or vice versa) silently misses the prefetch.\n *\n * Keys left `undefined` drop out of React Query's key hash, so omitting a field\n * here hashes the same as a prefetch that never passed it.\n */\nexport function buildCollectionProductsLoaderArgs({\n collectionGid,\n first,\n after,\n language,\n}: CollectionProductsLoaderArgs): CollectionProductsLoaderArgs {\n return {\n collectionGid,\n first,\n after,\n language,\n };\n}\n"],
|
|
5
|
+
"mappings": "AAgBO,SAAS,kCAAkC;AAAA,EAChD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA+D;AAC7D,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
+
import type { CollectionProductsLoaderArgs } from "./collection-products-loader-args";
|
|
2
3
|
import type { PaginatedProducts } from "./loader-schemas";
|
|
3
|
-
type CollectionProductsLoaderProps = {
|
|
4
|
+
type CollectionProductsLoaderProps = CollectionProductsLoaderArgs & {
|
|
4
5
|
loaderKey: string;
|
|
5
|
-
collectionGid: string;
|
|
6
|
-
first?: number;
|
|
7
|
-
after?: string;
|
|
8
6
|
children: (data: PaginatedProducts) => ReactNode;
|
|
9
7
|
fallback?: ReactNode;
|
|
10
8
|
};
|
|
11
|
-
export declare function CollectionProductsLoader({ loaderKey, collectionGid, first, after, children, fallback, }: CollectionProductsLoaderProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function CollectionProductsLoader({ loaderKey, collectionGid, first, after, language, children, fallback, }: CollectionProductsLoaderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
10
|
export {};
|
|
@@ -2,23 +2,22 @@
|
|
|
2
2
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Suspense } from "react";
|
|
4
4
|
import { useSuspenseQuery } from "@tanstack/react-query";
|
|
5
|
+
import { buildCollectionProductsLoaderArgs } from "./collection-products-loader-args";
|
|
5
6
|
import { invokeLoader } from "./invoke-loader";
|
|
6
7
|
import { LoaderErrorBoundary } from "./loader-error-boundary";
|
|
7
8
|
import { paginatedProductsSchema } from "./loader-schemas";
|
|
8
9
|
import { useReportPreviewPlaceholderRender } from "./preview-placeholder";
|
|
9
10
|
function CollectionProductsLoaderInner({
|
|
10
11
|
loaderKey,
|
|
11
|
-
|
|
12
|
-
first,
|
|
13
|
-
after,
|
|
12
|
+
args,
|
|
14
13
|
children
|
|
15
14
|
}) {
|
|
16
15
|
const queryResult = useSuspenseQuery({
|
|
17
|
-
queryKey: [loaderKey,
|
|
16
|
+
queryKey: [loaderKey, args],
|
|
18
17
|
queryFn: async () => {
|
|
19
18
|
const loadedData = await invokeLoader({
|
|
20
19
|
loaderKey,
|
|
21
|
-
args
|
|
20
|
+
args
|
|
22
21
|
});
|
|
23
22
|
return paginatedProductsSchema.parse(loadedData);
|
|
24
23
|
}
|
|
@@ -31,24 +30,22 @@ function CollectionProductsLoader({
|
|
|
31
30
|
collectionGid,
|
|
32
31
|
first,
|
|
33
32
|
after,
|
|
33
|
+
language,
|
|
34
34
|
children,
|
|
35
35
|
fallback
|
|
36
36
|
}) {
|
|
37
|
+
const args = buildCollectionProductsLoaderArgs({
|
|
38
|
+
collectionGid,
|
|
39
|
+
first,
|
|
40
|
+
after,
|
|
41
|
+
language
|
|
42
|
+
});
|
|
37
43
|
return /* @__PURE__ */ jsx(
|
|
38
44
|
LoaderErrorBoundary,
|
|
39
45
|
{
|
|
40
46
|
fallback: fallback ?? null,
|
|
41
|
-
resetKey: `${loaderKey}:${
|
|
42
|
-
children: /* @__PURE__ */ jsx(Suspense, { fallback: fallback ?? null, children: /* @__PURE__ */ jsx(
|
|
43
|
-
CollectionProductsLoaderInner,
|
|
44
|
-
{
|
|
45
|
-
loaderKey,
|
|
46
|
-
collectionGid,
|
|
47
|
-
first,
|
|
48
|
-
after,
|
|
49
|
-
children
|
|
50
|
-
}
|
|
51
|
-
) })
|
|
47
|
+
resetKey: `${loaderKey}:${JSON.stringify(args)}`,
|
|
48
|
+
children: /* @__PURE__ */ jsx(Suspense, { fallback: fallback ?? null, children: /* @__PURE__ */ jsx(CollectionProductsLoaderInner, { loaderKey, args, children }) })
|
|
52
49
|
}
|
|
53
50
|
);
|
|
54
51
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../loaders/collection-products-loader.tsx"],
|
|
4
|
-
"sourcesContent": ["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport type { PaginatedProducts } from \"./loader-schemas\";\n\nimport { Suspense } from \"react\";\n\nimport { useSuspenseQuery } from \"@tanstack/react-query\";\n\nimport { invokeLoader } from \"./invoke-loader\";\nimport { LoaderErrorBoundary } from \"./loader-error-boundary\";\nimport { paginatedProductsSchema } from \"./loader-schemas\";\nimport { useReportPreviewPlaceholderRender } from \"./preview-placeholder\";\n\ntype CollectionProductsLoaderProps = {\n loaderKey: string;\n
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport type { CollectionProductsLoaderArgs } from \"./collection-products-loader-args\";\nimport type { PaginatedProducts } from \"./loader-schemas\";\n\nimport { Suspense } from \"react\";\n\nimport { useSuspenseQuery } from \"@tanstack/react-query\";\n\nimport { buildCollectionProductsLoaderArgs } from \"./collection-products-loader-args\";\nimport { invokeLoader } from \"./invoke-loader\";\nimport { LoaderErrorBoundary } from \"./loader-error-boundary\";\nimport { paginatedProductsSchema } from \"./loader-schemas\";\nimport { useReportPreviewPlaceholderRender } from \"./preview-placeholder\";\n\ntype CollectionProductsLoaderProps = CollectionProductsLoaderArgs & {\n loaderKey: string;\n children: (data: PaginatedProducts) => ReactNode;\n fallback?: ReactNode;\n};\n\nfunction CollectionProductsLoaderInner({\n loaderKey,\n args,\n children,\n}: {\n loaderKey: string;\n args: CollectionProductsLoaderArgs;\n children: (data: PaginatedProducts) => ReactNode;\n}) {\n const queryResult = useSuspenseQuery({\n queryKey: [loaderKey, args],\n queryFn: async () => {\n const loadedData = await invokeLoader({\n loaderKey,\n args,\n });\n return paginatedProductsSchema.parse(loadedData);\n },\n });\n useReportPreviewPlaceholderRender(queryResult.data);\n\n return <>{children(queryResult.data)}</>;\n}\n\nexport function CollectionProductsLoader({\n loaderKey,\n collectionGid,\n first,\n after,\n language,\n children,\n fallback,\n}: CollectionProductsLoaderProps) {\n const args = buildCollectionProductsLoaderArgs({\n collectionGid,\n first,\n after,\n language,\n });\n\n return (\n <LoaderErrorBoundary\n fallback={fallback ?? null}\n resetKey={`${loaderKey}:${JSON.stringify(args)}`}\n >\n <Suspense fallback={fallback ?? null}>\n <CollectionProductsLoaderInner loaderKey={loaderKey} args={args}>\n {children}\n </CollectionProductsLoaderInner>\n </Suspense>\n </LoaderErrorBoundary>\n );\n}\n"],
|
|
5
|
+
"mappings": ";AA2CS;AArCT,SAAS,gBAAgB;AAEzB,SAAS,wBAAwB;AAEjC,SAAS,yCAAyC;AAClD,SAAS,oBAAoB;AAC7B,SAAS,2BAA2B;AACpC,SAAS,+BAA+B;AACxC,SAAS,yCAAyC;AAQlD,SAAS,8BAA8B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AACF,GAIG;AACD,QAAM,cAAc,iBAAiB;AAAA,IACnC,UAAU,CAAC,WAAW,IAAI;AAAA,IAC1B,SAAS,YAAY;AACnB,YAAM,aAAa,MAAM,aAAa;AAAA,QACpC;AAAA,QACA;AAAA,MACF,CAAC;AACD,aAAO,wBAAwB,MAAM,UAAU;AAAA,IACjD;AAAA,EACF,CAAC;AACD,oCAAkC,YAAY,IAAI;AAElD,SAAO,gCAAG,mBAAS,YAAY,IAAI,GAAE;AACvC;AAEO,SAAS,yBAAyB;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAkC;AAChC,QAAM,OAAO,kCAAkC;AAAA,IAC7C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,YAAY;AAAA,MACtB,UAAU,GAAG,SAAS,IAAI,KAAK,UAAU,IAAI,CAAC;AAAA,MAE9C,8BAAC,YAAS,UAAU,YAAY,MAC9B,8BAAC,iCAA8B,WAAsB,MAClD,UACH,GACF;AAAA;AAAA,EACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/loaders/loader-keys.d.ts
CHANGED
|
@@ -27,6 +27,8 @@ export declare const DATA_LOADER_KEYS: {
|
|
|
27
27
|
readonly YOTPO_PRODUCT_REVIEW_AGGREGATE: "yotpo.product_review_aggregate";
|
|
28
28
|
readonly REVIEWS_IO_PRODUCT_REVIEWS: "reviews_io.product_reviews";
|
|
29
29
|
readonly REVIEWS_IO_PRODUCT_REVIEW_AGGREGATE: "reviews_io.product_review_aggregate";
|
|
30
|
+
readonly LOOX_PRODUCT_REVIEWS: "loox.product_reviews";
|
|
31
|
+
readonly LOOX_PRODUCT_REVIEW_AGGREGATE: "loox.product_review_aggregate";
|
|
30
32
|
readonly STATSIG_EXPERIMENT: "statsig.experiment";
|
|
31
33
|
readonly CONTENTFUL_ENTRY: "contentful.entry";
|
|
32
34
|
readonly CONTENTFUL_ENTRIES: "contentful.entries";
|
package/loaders/loader-keys.js
CHANGED
|
@@ -16,6 +16,8 @@ const DATA_LOADER_KEYS = {
|
|
|
16
16
|
YOTPO_PRODUCT_REVIEW_AGGREGATE: "yotpo.product_review_aggregate",
|
|
17
17
|
REVIEWS_IO_PRODUCT_REVIEWS: "reviews_io.product_reviews",
|
|
18
18
|
REVIEWS_IO_PRODUCT_REVIEW_AGGREGATE: "reviews_io.product_review_aggregate",
|
|
19
|
+
LOOX_PRODUCT_REVIEWS: "loox.product_reviews",
|
|
20
|
+
LOOX_PRODUCT_REVIEW_AGGREGATE: "loox.product_review_aggregate",
|
|
19
21
|
STATSIG_EXPERIMENT: "statsig.experiment",
|
|
20
22
|
CONTENTFUL_ENTRY: "contentful.entry",
|
|
21
23
|
CONTENTFUL_ENTRIES: "contentful.entries"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../loaders/loader-keys.ts"],
|
|
4
|
-
"sourcesContent": ["// NOTE (Ryan, 2026-07-23, REPL-27611): Canonical loader-key constants for the\n// published-page surface. the SDK owns this copy so nothing shipped to a\n// generated site imports from `schemas`. The backend keeps its own copy in\n// `schemas/loaderKeys.ts` (consumed by the integration registry + tool\n// metadata, which cannot depend on the SDK without a cycle); the two are\n// kept in lockstep by the drift guard in `loader-keys.spec.ts`.\n\n/**\n * Shared data-loader key constants. Loader components and prefetch queries\n * import from here so the strings are never duplicated across a generated site.\n *\n * These keys serve double duty: they identify which backend loader to invoke\n * AND are used as React Query cache key prefixes. Loader components internally\n * construct queryKey as `[loaderKey, args]`.\n *\n * Naming convention: `<integration>.<objectType>` or\n * `<integration>.<objectType>_<qualifier>`.\n */\nexport const DATA_LOADER_KEYS = {\n SHOPIFY_PRODUCT: \"shopify_storefront.product\",\n SHOPIFY_COLLECTION: \"shopify_storefront.collection\",\n SHOPIFY_COLLECTION_PRODUCTS: \"shopify_storefront.collection_products\",\n SHOPIFY_METAOBJECT: \"shopify_storefront.metaobject\",\n SHOPIFY_METAOBJECTS: \"shopify_storefront.metaobjects\",\n REPLO_PRODUCT: \"replo_products.product\",\n OKENDO_PRODUCT_REVIEWS: \"okendo.product_reviews\",\n OKENDO_PRODUCT_REVIEW_AGGREGATE: \"okendo.product_review_aggregate\",\n REBUY_RECOMMENDATIONS: \"rebuy.recommendations\",\n LEVANTA_PRODUCT: \"levanta_products.product\",\n SMILE_IO_VIP_TIERS: \"smile_io.vip_tiers\",\n SMILE_IO_EARNING_RULES: \"smile_io.earning_rules\",\n SMILE_IO_REWARDS: \"smile_io.rewards\",\n YOTPO_PRODUCT_REVIEWS: \"yotpo.product_reviews\",\n YOTPO_PRODUCT_REVIEW_AGGREGATE: \"yotpo.product_review_aggregate\",\n REVIEWS_IO_PRODUCT_REVIEWS: \"reviews_io.product_reviews\",\n REVIEWS_IO_PRODUCT_REVIEW_AGGREGATE: \"reviews_io.product_review_aggregate\",\n STATSIG_EXPERIMENT: \"statsig.experiment\",\n CONTENTFUL_ENTRY: \"contentful.entry\",\n CONTENTFUL_ENTRIES: \"contentful.entries\",\n} as const;\n\nexport type DataLoaderKey =\n (typeof DATA_LOADER_KEYS)[keyof typeof DATA_LOADER_KEYS];\n"],
|
|
5
|
-
"mappings": "AAkBO,MAAM,mBAAmB;AAAA,EAC9B,iBAAiB;AAAA,EACjB,oBAAoB;AAAA,EACpB,6BAA6B;AAAA,EAC7B,oBAAoB;AAAA,EACpB,qBAAqB;AAAA,EACrB,eAAe;AAAA,EACf,wBAAwB;AAAA,EACxB,iCAAiC;AAAA,EACjC,uBAAuB;AAAA,EACvB,iBAAiB;AAAA,EACjB,oBAAoB;AAAA,EACpB,wBAAwB;AAAA,EACxB,kBAAkB;AAAA,EAClB,uBAAuB;AAAA,EACvB,gCAAgC;AAAA,EAChC,4BAA4B;AAAA,EAC5B,qCAAqC;AAAA,EACrC,oBAAoB;AAAA,EACpB,kBAAkB;AAAA,EAClB,oBAAoB;AACtB;",
|
|
4
|
+
"sourcesContent": ["// NOTE (Ryan, 2026-07-23, REPL-27611): Canonical loader-key constants for the\n// published-page surface. the SDK owns this copy so nothing shipped to a\n// generated site imports from `schemas`. The backend keeps its own copy in\n// `schemas/loaderKeys.ts` (consumed by the integration registry + tool\n// metadata, which cannot depend on the SDK without a cycle); the two are\n// kept in lockstep by the drift guard in `loader-keys.spec.ts`.\n\n/**\n * Shared data-loader key constants. Loader components and prefetch queries\n * import from here so the strings are never duplicated across a generated site.\n *\n * These keys serve double duty: they identify which backend loader to invoke\n * AND are used as React Query cache key prefixes. Loader components internally\n * construct queryKey as `[loaderKey, args]`.\n *\n * Naming convention: `<integration>.<objectType>` or\n * `<integration>.<objectType>_<qualifier>`.\n */\nexport const DATA_LOADER_KEYS = {\n SHOPIFY_PRODUCT: \"shopify_storefront.product\",\n SHOPIFY_COLLECTION: \"shopify_storefront.collection\",\n SHOPIFY_COLLECTION_PRODUCTS: \"shopify_storefront.collection_products\",\n SHOPIFY_METAOBJECT: \"shopify_storefront.metaobject\",\n SHOPIFY_METAOBJECTS: \"shopify_storefront.metaobjects\",\n REPLO_PRODUCT: \"replo_products.product\",\n OKENDO_PRODUCT_REVIEWS: \"okendo.product_reviews\",\n OKENDO_PRODUCT_REVIEW_AGGREGATE: \"okendo.product_review_aggregate\",\n REBUY_RECOMMENDATIONS: \"rebuy.recommendations\",\n LEVANTA_PRODUCT: \"levanta_products.product\",\n SMILE_IO_VIP_TIERS: \"smile_io.vip_tiers\",\n SMILE_IO_EARNING_RULES: \"smile_io.earning_rules\",\n SMILE_IO_REWARDS: \"smile_io.rewards\",\n YOTPO_PRODUCT_REVIEWS: \"yotpo.product_reviews\",\n YOTPO_PRODUCT_REVIEW_AGGREGATE: \"yotpo.product_review_aggregate\",\n REVIEWS_IO_PRODUCT_REVIEWS: \"reviews_io.product_reviews\",\n REVIEWS_IO_PRODUCT_REVIEW_AGGREGATE: \"reviews_io.product_review_aggregate\",\n LOOX_PRODUCT_REVIEWS: \"loox.product_reviews\",\n LOOX_PRODUCT_REVIEW_AGGREGATE: \"loox.product_review_aggregate\",\n STATSIG_EXPERIMENT: \"statsig.experiment\",\n CONTENTFUL_ENTRY: \"contentful.entry\",\n CONTENTFUL_ENTRIES: \"contentful.entries\",\n} as const;\n\nexport type DataLoaderKey =\n (typeof DATA_LOADER_KEYS)[keyof typeof DATA_LOADER_KEYS];\n"],
|
|
5
|
+
"mappings": "AAkBO,MAAM,mBAAmB;AAAA,EAC9B,iBAAiB;AAAA,EACjB,oBAAoB;AAAA,EACpB,6BAA6B;AAAA,EAC7B,oBAAoB;AAAA,EACpB,qBAAqB;AAAA,EACrB,eAAe;AAAA,EACf,wBAAwB;AAAA,EACxB,iCAAiC;AAAA,EACjC,uBAAuB;AAAA,EACvB,iBAAiB;AAAA,EACjB,oBAAoB;AAAA,EACpB,wBAAwB;AAAA,EACxB,kBAAkB;AAAA,EAClB,uBAAuB;AAAA,EACvB,gCAAgC;AAAA,EAChC,4BAA4B;AAAA,EAC5B,qCAAqC;AAAA,EACrC,sBAAsB;AAAA,EACtB,+BAA+B;AAAA,EAC/B,oBAAoB;AAAA,EACpB,kBAAkB;AAAA,EAClB,oBAAoB;AACtB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -795,6 +795,46 @@ export declare const reviewsIoProductReviewAggregateLoaderOutputSchema: z.ZodObj
|
|
|
795
795
|
reviewCount: z.ZodNumber;
|
|
796
796
|
reviewAverageValue: z.ZodNumber;
|
|
797
797
|
}, z.core.$strip>;
|
|
798
|
+
export declare const looxReviewMediaSchema: z.ZodObject<{
|
|
799
|
+
type: z.ZodNullable<z.ZodString>;
|
|
800
|
+
url: z.ZodString;
|
|
801
|
+
thumbnailUrl: z.ZodNullable<z.ZodString>;
|
|
802
|
+
}, z.core.$strip>;
|
|
803
|
+
export declare const looxReviewLoaderItemSchema: z.ZodObject<{
|
|
804
|
+
id: z.ZodString;
|
|
805
|
+
rating: z.ZodNullable<z.ZodNumber>;
|
|
806
|
+
body: z.ZodNullable<z.ZodString>;
|
|
807
|
+
createdAt: z.ZodNullable<z.ZodString>;
|
|
808
|
+
verified: z.ZodBoolean;
|
|
809
|
+
reviewerName: z.ZodNullable<z.ZodString>;
|
|
810
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
811
|
+
media: z.ZodArray<z.ZodObject<{
|
|
812
|
+
type: z.ZodNullable<z.ZodString>;
|
|
813
|
+
url: z.ZodString;
|
|
814
|
+
thumbnailUrl: z.ZodNullable<z.ZodString>;
|
|
815
|
+
}, z.core.$strip>>;
|
|
816
|
+
}, z.core.$strip>;
|
|
817
|
+
export declare const looxProductReviewsLoaderOutputSchema: z.ZodObject<{
|
|
818
|
+
reviews: z.ZodArray<z.ZodObject<{
|
|
819
|
+
id: z.ZodString;
|
|
820
|
+
rating: z.ZodNullable<z.ZodNumber>;
|
|
821
|
+
body: z.ZodNullable<z.ZodString>;
|
|
822
|
+
createdAt: z.ZodNullable<z.ZodString>;
|
|
823
|
+
verified: z.ZodBoolean;
|
|
824
|
+
reviewerName: z.ZodNullable<z.ZodString>;
|
|
825
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
826
|
+
media: z.ZodArray<z.ZodObject<{
|
|
827
|
+
type: z.ZodNullable<z.ZodString>;
|
|
828
|
+
url: z.ZodString;
|
|
829
|
+
thumbnailUrl: z.ZodNullable<z.ZodString>;
|
|
830
|
+
}, z.core.$strip>>;
|
|
831
|
+
}, z.core.$strip>>;
|
|
832
|
+
}, z.core.$strip>;
|
|
833
|
+
export declare const looxProductReviewAggregateLoaderOutputSchema: z.ZodObject<{
|
|
834
|
+
totalReviews: z.ZodNumber;
|
|
835
|
+
averageRating: z.ZodNumber;
|
|
836
|
+
ratingDistribution: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
837
|
+
}, z.core.$strip>;
|
|
798
838
|
export declare const statsigExperimentLoaderOutputSchema: z.ZodObject<{
|
|
799
839
|
experimentName: z.ZodString;
|
|
800
840
|
groupName: z.ZodNullable<z.ZodString>;
|
|
@@ -248,6 +248,29 @@ const reviewsIoProductReviewAggregateLoaderOutputSchema = z.object({
|
|
|
248
248
|
reviewCount: z.number(),
|
|
249
249
|
reviewAverageValue: z.number()
|
|
250
250
|
});
|
|
251
|
+
const looxReviewMediaSchema = z.object({
|
|
252
|
+
type: z.string().nullable(),
|
|
253
|
+
url: z.string(),
|
|
254
|
+
thumbnailUrl: z.string().nullable()
|
|
255
|
+
});
|
|
256
|
+
const looxReviewLoaderItemSchema = z.object({
|
|
257
|
+
id: z.string(),
|
|
258
|
+
rating: z.number().nullable(),
|
|
259
|
+
body: z.string().nullable(),
|
|
260
|
+
createdAt: z.string().nullable(),
|
|
261
|
+
verified: z.boolean(),
|
|
262
|
+
reviewerName: z.string().nullable(),
|
|
263
|
+
productName: z.string().nullable(),
|
|
264
|
+
media: z.array(looxReviewMediaSchema)
|
|
265
|
+
});
|
|
266
|
+
const looxProductReviewsLoaderOutputSchema = z.object({
|
|
267
|
+
reviews: z.array(looxReviewLoaderItemSchema)
|
|
268
|
+
});
|
|
269
|
+
const looxProductReviewAggregateLoaderOutputSchema = z.object({
|
|
270
|
+
totalReviews: z.number(),
|
|
271
|
+
averageRating: z.number(),
|
|
272
|
+
ratingDistribution: z.record(z.string(), z.number())
|
|
273
|
+
});
|
|
251
274
|
const statsigExperimentLoaderOutputSchema = z.object({
|
|
252
275
|
experimentName: z.string(),
|
|
253
276
|
groupName: z.string().nullable().describe("The assigned variant group name (e.g. Control, Test)."),
|
|
@@ -320,6 +343,10 @@ export {
|
|
|
320
343
|
fullVariantSchema,
|
|
321
344
|
imageSchema,
|
|
322
345
|
levantaProductFullSchema,
|
|
346
|
+
looxProductReviewAggregateLoaderOutputSchema,
|
|
347
|
+
looxProductReviewsLoaderOutputSchema,
|
|
348
|
+
looxReviewLoaderItemSchema,
|
|
349
|
+
looxReviewMediaSchema,
|
|
323
350
|
mediaImageSchema,
|
|
324
351
|
mediaSchema,
|
|
325
352
|
metafieldSchema,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../loaders/loader-schemas.ts"],
|
|
4
|
-
"sourcesContent": ["import { z } from \"zod\";\n\n// NOTE (Ryan, 2026-07-23, REPL-27611): Self-contained copies of the loader\n// output contracts (and the `objectType` / `sellingPlan` sub-schemas they\n// compose) that the SDK validates on published pages. These live here \u2014 not\n// imported from `schemas` \u2014 so nothing shipped to a generated site depends on\n// the `schemas` workspace package. The backend keeps the canonical definitions\n// in `schemas` because its integration registry + tool-metadata generation\n// consume them and cannot depend on the SDK without an import cycle. The two\n// sides are kept structurally in lockstep by `loader-schemas.spec.ts`.\n\n// ---------------------------------------------------------------------------\n// Shared sub-schemas (mirrors of schemas/objectType.ts)\n// ---------------------------------------------------------------------------\n\nexport const imageSchema = z.object({\n url: z.string(),\n altText: z.string().nullable(),\n width: z.number().nullable(),\n height: z.number().nullable(),\n});\n\nexport const mediaImageSchema = z.object({\n type: z.literal(\"image\"),\n alt: z.string().nullable(),\n url: z.string(),\n width: z.number().nullable(),\n height: z.number().nullable(),\n});\n\nexport const videoSourceSchema = z.object({\n url: z.string(),\n mimeType: z.string(),\n format: z.string(),\n width: z.number().nullable(),\n height: z.number().nullable(),\n});\n\nexport const previewImageSchema = z.object({\n alt: z.string().nullable(),\n url: z.string(),\n width: z.number().nullable(),\n height: z.number().nullable(),\n});\n\nexport const videoSchema = z.object({\n type: z.literal(\"video\"),\n alt: z.string().nullable(),\n sources: z.array(videoSourceSchema),\n previewImage: previewImageSchema.nullable(),\n});\n\nexport const externalVideoSchema = z.object({\n type: z.literal(\"externalVideo\"),\n alt: z.string().nullable(),\n embedUrl: z.string(),\n host: z.string(),\n originUrl: z.string(),\n previewImage: previewImageSchema.nullable(),\n});\n\nexport const mediaSchema = z.discriminatedUnion(\"type\", [\n mediaImageSchema,\n videoSchema,\n externalVideoSchema,\n]);\n\nexport const priceSchema = z.object({\n amount: z.string(),\n currencyCode: z.string(),\n});\n\nexport const selectedOptionSchema = z.object({\n name: z.string(),\n value: z.string(),\n});\n\nexport const optionValueSwatchSchema = z.object({\n color: z.string().nullable(),\n imageUrl: z.string().nullable(),\n});\n\nexport const optionValueSchema = z.object({\n id: z.string(),\n value: z.string(),\n swatch: optionValueSwatchSchema.nullable(),\n});\n\nexport const productOptionSchema = z.object({\n id: z.string().optional(),\n name: z.string(),\n values: z.array(z.string()),\n optionValues: z.array(optionValueSchema).optional(),\n});\n\nexport const metafieldSchema = z.object({\n key: z.string(),\n namespace: z.string(),\n type: z.string(),\n value: z.string(),\n});\n\n// ---------------------------------------------------------------------------\n// Selling plan schemas (mirror of schemas/sellingPlan.ts)\n// ---------------------------------------------------------------------------\n\nexport const sellingPlanPriceAdjustmentSchema = z.object({\n value: z.number(),\n valueType: z.enum([\"percentage\", \"fixedAmount\", \"price\"]),\n});\n\nexport const sellingPlanOptionValueSchema = z.object({\n name: z.string().optional(),\n value: z.string(),\n});\n\nexport const sellingPlanSchema = z.object({\n id: z.string(),\n name: z.string(),\n description: z.string().nullable(),\n optionValues: z.array(sellingPlanOptionValueSchema),\n priceAdjustments: z.array(sellingPlanPriceAdjustmentSchema),\n appId: z.string().nullish(),\n price: z.string().optional(),\n externalId: z.string().nullable(),\n});\n\nexport const sellingPlanGroupSchema = z\n .object({\n appId: z.string().nullable(),\n options: z.array(\n z.object({\n name: z.string(),\n values: z.array(z.union([z.string(), z.null()])),\n }),\n ),\n sellingPlans: z.array(sellingPlanSchema),\n })\n .describe(\"SellingPlanGroup\");\n\nexport type SellingPlanGroup = z.infer<typeof sellingPlanGroupSchema>;\n\n// ---------------------------------------------------------------------------\n// Canonical Product / Variant (mostly-optional; mirror of objectType.ts).\n// Used by the collection-products (paginated) and rebuy loaders, and as the\n// cart's cache-resolution product shape.\n// ---------------------------------------------------------------------------\n\nexport const variantSchema = z.object({\n id: z.string(),\n title: z.string().optional(),\n availableForSale: z.boolean().optional(),\n sku: z.string().nullish(),\n selectedOptions: z.array(selectedOptionSchema).optional(),\n image: imageSchema.nullish(),\n price: priceSchema.optional(),\n compareAtPrice: priceSchema.nullish(),\n sellingPlanIds: z.array(z.string()).optional(),\n});\n\nexport const productSchema = z.object({\n id: z.string(),\n handle: z.string().optional(),\n title: z.string().optional(),\n description: z.string().nullish(),\n descriptionHtml: z.string().nullish(),\n availableForSale: z.boolean().optional(),\n // NOTE (Berkley, 2026-07-30): Admin-sourced status; Storefront loader data\n // never includes it. Kept in lockstep with `schemas/objectType` by the\n // drift-guard spec.\n status: z.enum([\"ACTIVE\", \"DRAFT\", \"ARCHIVED\", \"UNLISTED\"]).optional(),\n featuredImage: imageSchema.nullish(),\n options: z.array(productOptionSchema).optional(),\n variants: z.array(variantSchema).optional(),\n minPrice: priceSchema.optional(),\n maxPrice: priceSchema.optional(),\n compareAtMinPrice: priceSchema.optional(),\n compareAtMaxPrice: priceSchema.optional(),\n images: z.array(imageSchema).optional(),\n media: z.array(mediaSchema).optional(),\n vendor: z.string().nullish(),\n productType: z.string().nullish(),\n tags: z.array(z.string()).optional(),\n sellingPlanGroups: z.array(sellingPlanGroupSchema).optional(),\n metafields: z.array(metafieldSchema).optional(),\n});\n\nexport type Product = z.infer<typeof productSchema>;\n\nexport const okendoReviewSchema = z\n .object({\n id: z.string(),\n title: z.string().optional(),\n body: z.string().optional(),\n rating: z.number().optional(),\n productName: z.string().optional(),\n reviewerName: z.string().optional(),\n dateCreated: z.string().optional(),\n status: z.string().optional(),\n })\n .describe(\"OkendoReview\");\n\n// ---------------------------------------------------------------------------\n// Full loader outputs (mirror of\n// schemas/agentTools/customIntegrations/loaders/product.ts)\n// ---------------------------------------------------------------------------\n\nexport const fullVariantSchema = z.object({\n id: z.string(),\n title: z.string(),\n availableForSale: z.boolean(),\n sku: z.string().nullable(),\n selectedOptions: z.array(selectedOptionSchema),\n image: imageSchema.nullable(),\n price: priceSchema,\n compareAtPrice: priceSchema.nullable(),\n sellingPlanIds: z.array(z.string()),\n metafields: z.array(metafieldSchema).optional(),\n});\n\nexport const fullProductSchema = z.object({\n id: z.string(),\n handle: z.string(),\n title: z.string(),\n description: z.string().nullable(),\n descriptionHtml: z.string().nullable(),\n availableForSale: z.boolean(),\n featuredImage: imageSchema.nullable(),\n options: z.array(productOptionSchema),\n variants: z.array(fullVariantSchema),\n images: z.array(imageSchema),\n media: z.array(mediaSchema),\n vendor: z.string().nullable(),\n productType: z.string().nullable(),\n tags: z.array(z.string()),\n sellingPlanGroups: z.array(sellingPlanGroupSchema),\n metafields: z.array(metafieldSchema),\n});\n\nexport const fullCollectionSchema = z.object({\n id: z.string(),\n handle: z.string(),\n title: z.string(),\n descriptionHtml: z.string().nullable(),\n image: imageSchema.nullable(),\n metafields: z.array(metafieldSchema).optional(),\n});\n\nexport const paginatedProductsSchema = z.object({\n products: z.array(productSchema),\n pageInfo: z.object({\n hasNextPage: z.boolean(),\n endCursor: z.string().nullable(),\n }),\n});\n\nexport type FullProduct = z.infer<typeof fullProductSchema>;\nexport type FullCollection = z.infer<typeof fullCollectionSchema>;\nexport type FullVariant = z.infer<typeof fullVariantSchema>;\nexport type PaginatedProducts = z.infer<typeof paginatedProductsSchema>;\n\n// ---------------------------------------------------------------------------\n// Levanta loader output (mirror of\n// schemas/agentTools/customIntegrations/loaders/levanta.ts)\n// ---------------------------------------------------------------------------\n\nconst levantaAffiliateLinkSchema = z.object({\n linkId: z.string(),\n url: z.string(),\n});\n\nexport const levantaProductFullSchema = z\n .object({\n id: z.string(),\n asin: z.string(),\n title: z.string(),\n price: z\n .string()\n .describe('Product price as a decimal string in USD (e.g. \"34.99\").'),\n commission: z\n .string()\n .describe(\n 'Creator commission rate as a decimal string percentage (e.g. \"8.5\" meaning 8.5%).',\n ),\n imageUrl: z.string().nullable(),\n brand: z.object({ id: z.string(), name: z.string() }).nullable(),\n inStock: z.boolean(),\n marketplace: z.string(),\n affiliateLink: levantaAffiliateLinkSchema.nullable(),\n })\n .describe(\"LevantaProductFull\");\n\nexport type LevantaProductFull = z.infer<typeof levantaProductFullSchema>;\n\n// ---------------------------------------------------------------------------\n// Yotpo loader outputs (mirror of\n// schemas/agentTools/customIntegrations/loaders/yotpo.ts)\n// ---------------------------------------------------------------------------\n\nexport const yotpoReviewLoaderItemSchema = z.object({\n id: z.string(),\n title: z.string().nullable(),\n content: z.string().nullable(),\n score: z.number().nullable(),\n createdAt: z.string().nullable(),\n verifiedBuyer: z.boolean(),\n reviewerName: z.string().nullable(),\n});\n\nexport const yotpoProductReviewsLoaderOutputSchema = z.object({\n reviews: z.array(yotpoReviewLoaderItemSchema),\n});\n\nexport const yotpoProductReviewAggregateLoaderOutputSchema = z.object({\n averageScore: z.number(),\n totalReviews: z.number(),\n starDistribution: z.record(z.string(), z.number()),\n});\n\n// ---------------------------------------------------------------------------\n// Reviews.io loader outputs (mirror of\n// schemas/agentTools/customIntegrations/loaders/reviewsIo.ts)\n// ---------------------------------------------------------------------------\n\nexport const reviewsIoReviewLoaderItemSchema = z.object({\n id: z.string(),\n title: z.string().nullable(),\n body: z.string().nullable(),\n rating: z.number().nullable(),\n createdAt: z.string().nullable(),\n verifiedBuyer: z.boolean(),\n reviewerName: z.string().nullable(),\n productName: z.string().nullable(),\n sku: z.string().nullable(),\n});\n\nexport const reviewsIoProductReviewsLoaderOutputSchema = z.object({\n reviews: z.array(reviewsIoReviewLoaderItemSchema),\n reviewCount: z.number(),\n reviewAverageValue: z.number(),\n});\n\nexport const reviewsIoProductReviewAggregateLoaderOutputSchema = z.object({\n reviewCount: z.number(),\n reviewAverageValue: z.number(),\n});\n\n// ---------------------------------------------------------------------------\n// Statsig loader outputs (mirror of\n// schemas/agentTools/customIntegrations/loaders/statsig.ts)\n// ---------------------------------------------------------------------------\n\nexport const statsigExperimentLoaderOutputSchema = z.object({\n experimentName: z.string(),\n groupName: z\n .string()\n .nullable()\n .describe(\"The assigned variant group name (e.g. Control, Test).\"),\n ruleId: z\n .string()\n .nullable()\n .describe(\"The Statsig rule ID that produced this assignment.\"),\n value: z\n .record(z.string(), z.unknown())\n .describe(\"The parameter values for the assigned group.\"),\n reason: z\n .string()\n .describe(\"The evaluation reason reported by Statsig (for debugging).\"),\n});\n\nexport type StatsigExperimentAssignment = z.infer<\n typeof statsigExperimentLoaderOutputSchema\n>;\n\n// ---------------------------------------------------------------------------\n// Contentful loader outputs (mirror of\n// schemas/agentTools/customIntegrations/loaders/contentful.ts)\n// ---------------------------------------------------------------------------\n\nexport const contentfulEntryObjectSchema = z\n .object({\n id: z.string(),\n contentTypeId: z.string().nullable(),\n createdAt: z.string().nullable(),\n updatedAt: z.string().nullable(),\n fields: z.record(z.string(), z.unknown()),\n })\n .describe(\"ContentfulEntryObject\");\n\nexport const contentfulAssetObjectSchema = z\n .object({\n id: z.string(),\n title: z.string().nullable(),\n description: z.string().nullable(),\n fileName: z.string().nullable(),\n contentType: z.string().nullable(),\n url: z.string().nullable(),\n width: z.number().nullable(),\n height: z.number().nullable(),\n })\n .describe(\"ContentfulAssetObject\");\n\nexport const contentfulIncludesSchema = z\n .object({\n entries: z.array(contentfulEntryObjectSchema),\n assets: z.array(contentfulAssetObjectSchema),\n })\n .describe(\"ContentfulIncludes\");\n\nexport const contentfulEntryLoaderOutputSchema = z\n .object({\n entry: contentfulEntryObjectSchema,\n includes: contentfulIncludesSchema,\n })\n .describe(\"ContentfulEntryLoaderOutput\");\n\nexport const contentfulEntriesLoaderOutputSchema = z\n .object({\n items: z.array(contentfulEntryObjectSchema),\n includes: contentfulIncludesSchema,\n total: z.number(),\n skip: z.number(),\n limit: z.number(),\n })\n .describe(\"ContentfulEntriesLoaderOutput\");\n\nexport type ContentfulEntryObject = z.infer<typeof contentfulEntryObjectSchema>;\nexport type ContentfulAssetObject = z.infer<typeof contentfulAssetObjectSchema>;\nexport type ContentfulEntryLoaderOutput = z.infer<\n typeof contentfulEntryLoaderOutputSchema\n>;\nexport type ContentfulEntriesLoaderOutput = z.infer<\n typeof contentfulEntriesLoaderOutputSchema\n>;\n\n// ---------------------------------------------------------------------------\n// Shopify metaobjects (mirror of\n// schemas/agentTools/customIntegrations/loaders/shopify.ts)\n// ---------------------------------------------------------------------------\n\nexport const storefrontMetaobjectSchema = z\n .object({\n id: z.string(),\n type: z.string(),\n handle: z.string(),\n updatedAt: z.string().nullable(),\n fields: z.array(\n z.object({\n key: z.string(),\n type: z.string(),\n value: z.string().nullable(),\n }),\n ),\n })\n .describe(\"StorefrontMetaobject\");\n\nexport const shopifyMetaobjectLoaderOutputSchema = storefrontMetaobjectSchema;\n\nexport const shopifyMetaobjectsLoaderOutputSchema = z\n .object({\n metaobjects: z.array(storefrontMetaobjectSchema),\n pageInfo: z.object({\n hasNextPage: z.boolean(),\n endCursor: z.string().nullable(),\n }),\n })\n .describe(\"ShopifyMetaobjectsLoaderOutput\");\n\nexport type StorefrontMetaobject = z.infer<typeof storefrontMetaobjectSchema>;\nexport type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AO;AAAA,EACN,OAAO,EAAE,MAAM,2BAA2B;AAAA,EAC1C,UAAU;AAAA,EACV,OAAO,EAAE,OAAO;AAAA,EAChB,MAAM,EAAE,OAAO;AAAA,EACf,OAAO,EAAE,OAAO;AAClB,CAAC,EACA,SAAS,+BAA+B;AAgBpC,MAAM,6BAA6B,EACvC,OAAO;AAAA,EACN,IAAI,EAAE,OAAO;AAAA,EACb,MAAM,EAAE,OAAO;AAAA,EACf,QAAQ,EAAE,OAAO;AAAA,EACjB,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA,EAC/B,QAAQ,EAAE;AAAA,IACR,EAAE,OAAO;AAAA,MACP,KAAK,EAAE,OAAO;AAAA,MACd,MAAM,EAAE,OAAO;AAAA,MACf,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA,IAC7B,CAAC;AAAA,EACH;AACF,CAAC,EACA,SAAS,sBAAsB;AAE3B,MAAM,sCAAsC;AAE5C,MAAM,uCAAuC,EACjD,OAAO;AAAA,EACN,aAAa,EAAE,MAAM,0BAA0B;AAAA,EAC/C,UAAU,EAAE,OAAO;AAAA,IACjB,aAAa,EAAE,QAAQ;AAAA,IACvB,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA,EACjC,CAAC;AACH,CAAC,EACA,SAAS,gCAAgC;",
|
|
4
|
+
"sourcesContent": ["import { z } from \"zod\";\n\n// NOTE (Ryan, 2026-07-23, REPL-27611): Self-contained copies of the loader\n// output contracts (and the `objectType` / `sellingPlan` sub-schemas they\n// compose) that the SDK validates on published pages. These live here \u2014 not\n// imported from `schemas` \u2014 so nothing shipped to a generated site depends on\n// the `schemas` workspace package. The backend keeps the canonical definitions\n// in `schemas` because its integration registry + tool-metadata generation\n// consume them and cannot depend on the SDK without an import cycle. The two\n// sides are kept structurally in lockstep by `loader-schemas.spec.ts`.\n\n// ---------------------------------------------------------------------------\n// Shared sub-schemas (mirrors of schemas/objectType.ts)\n// ---------------------------------------------------------------------------\n\nexport const imageSchema = z.object({\n url: z.string(),\n altText: z.string().nullable(),\n width: z.number().nullable(),\n height: z.number().nullable(),\n});\n\nexport const mediaImageSchema = z.object({\n type: z.literal(\"image\"),\n alt: z.string().nullable(),\n url: z.string(),\n width: z.number().nullable(),\n height: z.number().nullable(),\n});\n\nexport const videoSourceSchema = z.object({\n url: z.string(),\n mimeType: z.string(),\n format: z.string(),\n width: z.number().nullable(),\n height: z.number().nullable(),\n});\n\nexport const previewImageSchema = z.object({\n alt: z.string().nullable(),\n url: z.string(),\n width: z.number().nullable(),\n height: z.number().nullable(),\n});\n\nexport const videoSchema = z.object({\n type: z.literal(\"video\"),\n alt: z.string().nullable(),\n sources: z.array(videoSourceSchema),\n previewImage: previewImageSchema.nullable(),\n});\n\nexport const externalVideoSchema = z.object({\n type: z.literal(\"externalVideo\"),\n alt: z.string().nullable(),\n embedUrl: z.string(),\n host: z.string(),\n originUrl: z.string(),\n previewImage: previewImageSchema.nullable(),\n});\n\nexport const mediaSchema = z.discriminatedUnion(\"type\", [\n mediaImageSchema,\n videoSchema,\n externalVideoSchema,\n]);\n\nexport const priceSchema = z.object({\n amount: z.string(),\n currencyCode: z.string(),\n});\n\nexport const selectedOptionSchema = z.object({\n name: z.string(),\n value: z.string(),\n});\n\nexport const optionValueSwatchSchema = z.object({\n color: z.string().nullable(),\n imageUrl: z.string().nullable(),\n});\n\nexport const optionValueSchema = z.object({\n id: z.string(),\n value: z.string(),\n swatch: optionValueSwatchSchema.nullable(),\n});\n\nexport const productOptionSchema = z.object({\n id: z.string().optional(),\n name: z.string(),\n values: z.array(z.string()),\n optionValues: z.array(optionValueSchema).optional(),\n});\n\nexport const metafieldSchema = z.object({\n key: z.string(),\n namespace: z.string(),\n type: z.string(),\n value: z.string(),\n});\n\n// ---------------------------------------------------------------------------\n// Selling plan schemas (mirror of schemas/sellingPlan.ts)\n// ---------------------------------------------------------------------------\n\nexport const sellingPlanPriceAdjustmentSchema = z.object({\n value: z.number(),\n valueType: z.enum([\"percentage\", \"fixedAmount\", \"price\"]),\n});\n\nexport const sellingPlanOptionValueSchema = z.object({\n name: z.string().optional(),\n value: z.string(),\n});\n\nexport const sellingPlanSchema = z.object({\n id: z.string(),\n name: z.string(),\n description: z.string().nullable(),\n optionValues: z.array(sellingPlanOptionValueSchema),\n priceAdjustments: z.array(sellingPlanPriceAdjustmentSchema),\n appId: z.string().nullish(),\n price: z.string().optional(),\n externalId: z.string().nullable(),\n});\n\nexport const sellingPlanGroupSchema = z\n .object({\n appId: z.string().nullable(),\n options: z.array(\n z.object({\n name: z.string(),\n values: z.array(z.union([z.string(), z.null()])),\n }),\n ),\n sellingPlans: z.array(sellingPlanSchema),\n })\n .describe(\"SellingPlanGroup\");\n\nexport type SellingPlanGroup = z.infer<typeof sellingPlanGroupSchema>;\n\n// ---------------------------------------------------------------------------\n// Canonical Product / Variant (mostly-optional; mirror of objectType.ts).\n// Used by the collection-products (paginated) and rebuy loaders, and as the\n// cart's cache-resolution product shape.\n// ---------------------------------------------------------------------------\n\nexport const variantSchema = z.object({\n id: z.string(),\n title: z.string().optional(),\n availableForSale: z.boolean().optional(),\n sku: z.string().nullish(),\n selectedOptions: z.array(selectedOptionSchema).optional(),\n image: imageSchema.nullish(),\n price: priceSchema.optional(),\n compareAtPrice: priceSchema.nullish(),\n sellingPlanIds: z.array(z.string()).optional(),\n});\n\nexport const productSchema = z.object({\n id: z.string(),\n handle: z.string().optional(),\n title: z.string().optional(),\n description: z.string().nullish(),\n descriptionHtml: z.string().nullish(),\n availableForSale: z.boolean().optional(),\n // NOTE (Berkley, 2026-07-30): Admin-sourced status; Storefront loader data\n // never includes it. Kept in lockstep with `schemas/objectType` by the\n // drift-guard spec.\n status: z.enum([\"ACTIVE\", \"DRAFT\", \"ARCHIVED\", \"UNLISTED\"]).optional(),\n featuredImage: imageSchema.nullish(),\n options: z.array(productOptionSchema).optional(),\n variants: z.array(variantSchema).optional(),\n minPrice: priceSchema.optional(),\n maxPrice: priceSchema.optional(),\n compareAtMinPrice: priceSchema.optional(),\n compareAtMaxPrice: priceSchema.optional(),\n images: z.array(imageSchema).optional(),\n media: z.array(mediaSchema).optional(),\n vendor: z.string().nullish(),\n productType: z.string().nullish(),\n tags: z.array(z.string()).optional(),\n sellingPlanGroups: z.array(sellingPlanGroupSchema).optional(),\n metafields: z.array(metafieldSchema).optional(),\n});\n\nexport type Product = z.infer<typeof productSchema>;\n\nexport const okendoReviewSchema = z\n .object({\n id: z.string(),\n title: z.string().optional(),\n body: z.string().optional(),\n rating: z.number().optional(),\n productName: z.string().optional(),\n reviewerName: z.string().optional(),\n dateCreated: z.string().optional(),\n status: z.string().optional(),\n })\n .describe(\"OkendoReview\");\n\n// ---------------------------------------------------------------------------\n// Full loader outputs (mirror of\n// schemas/agentTools/customIntegrations/loaders/product.ts)\n// ---------------------------------------------------------------------------\n\nexport const fullVariantSchema = z.object({\n id: z.string(),\n title: z.string(),\n availableForSale: z.boolean(),\n sku: z.string().nullable(),\n selectedOptions: z.array(selectedOptionSchema),\n image: imageSchema.nullable(),\n price: priceSchema,\n compareAtPrice: priceSchema.nullable(),\n sellingPlanIds: z.array(z.string()),\n metafields: z.array(metafieldSchema).optional(),\n});\n\nexport const fullProductSchema = z.object({\n id: z.string(),\n handle: z.string(),\n title: z.string(),\n description: z.string().nullable(),\n descriptionHtml: z.string().nullable(),\n availableForSale: z.boolean(),\n featuredImage: imageSchema.nullable(),\n options: z.array(productOptionSchema),\n variants: z.array(fullVariantSchema),\n images: z.array(imageSchema),\n media: z.array(mediaSchema),\n vendor: z.string().nullable(),\n productType: z.string().nullable(),\n tags: z.array(z.string()),\n sellingPlanGroups: z.array(sellingPlanGroupSchema),\n metafields: z.array(metafieldSchema),\n});\n\nexport const fullCollectionSchema = z.object({\n id: z.string(),\n handle: z.string(),\n title: z.string(),\n descriptionHtml: z.string().nullable(),\n image: imageSchema.nullable(),\n metafields: z.array(metafieldSchema).optional(),\n});\n\nexport const paginatedProductsSchema = z.object({\n products: z.array(productSchema),\n pageInfo: z.object({\n hasNextPage: z.boolean(),\n endCursor: z.string().nullable(),\n }),\n});\n\nexport type FullProduct = z.infer<typeof fullProductSchema>;\nexport type FullCollection = z.infer<typeof fullCollectionSchema>;\nexport type FullVariant = z.infer<typeof fullVariantSchema>;\nexport type PaginatedProducts = z.infer<typeof paginatedProductsSchema>;\n\n// ---------------------------------------------------------------------------\n// Levanta loader output (mirror of\n// schemas/agentTools/customIntegrations/loaders/levanta.ts)\n// ---------------------------------------------------------------------------\n\nconst levantaAffiliateLinkSchema = z.object({\n linkId: z.string(),\n url: z.string(),\n});\n\nexport const levantaProductFullSchema = z\n .object({\n id: z.string(),\n asin: z.string(),\n title: z.string(),\n price: z\n .string()\n .describe('Product price as a decimal string in USD (e.g. \"34.99\").'),\n commission: z\n .string()\n .describe(\n 'Creator commission rate as a decimal string percentage (e.g. \"8.5\" meaning 8.5%).',\n ),\n imageUrl: z.string().nullable(),\n brand: z.object({ id: z.string(), name: z.string() }).nullable(),\n inStock: z.boolean(),\n marketplace: z.string(),\n affiliateLink: levantaAffiliateLinkSchema.nullable(),\n })\n .describe(\"LevantaProductFull\");\n\nexport type LevantaProductFull = z.infer<typeof levantaProductFullSchema>;\n\n// ---------------------------------------------------------------------------\n// Yotpo loader outputs (mirror of\n// schemas/agentTools/customIntegrations/loaders/yotpo.ts)\n// ---------------------------------------------------------------------------\n\nexport const yotpoReviewLoaderItemSchema = z.object({\n id: z.string(),\n title: z.string().nullable(),\n content: z.string().nullable(),\n score: z.number().nullable(),\n createdAt: z.string().nullable(),\n verifiedBuyer: z.boolean(),\n reviewerName: z.string().nullable(),\n});\n\nexport const yotpoProductReviewsLoaderOutputSchema = z.object({\n reviews: z.array(yotpoReviewLoaderItemSchema),\n});\n\nexport const yotpoProductReviewAggregateLoaderOutputSchema = z.object({\n averageScore: z.number(),\n totalReviews: z.number(),\n starDistribution: z.record(z.string(), z.number()),\n});\n\n// ---------------------------------------------------------------------------\n// Reviews.io loader outputs (mirror of\n// schemas/agentTools/customIntegrations/loaders/reviewsIo.ts)\n// ---------------------------------------------------------------------------\n\nexport const reviewsIoReviewLoaderItemSchema = z.object({\n id: z.string(),\n title: z.string().nullable(),\n body: z.string().nullable(),\n rating: z.number().nullable(),\n createdAt: z.string().nullable(),\n verifiedBuyer: z.boolean(),\n reviewerName: z.string().nullable(),\n productName: z.string().nullable(),\n sku: z.string().nullable(),\n});\n\nexport const reviewsIoProductReviewsLoaderOutputSchema = z.object({\n reviews: z.array(reviewsIoReviewLoaderItemSchema),\n reviewCount: z.number(),\n reviewAverageValue: z.number(),\n});\n\nexport const reviewsIoProductReviewAggregateLoaderOutputSchema = z.object({\n reviewCount: z.number(),\n reviewAverageValue: z.number(),\n});\n\n// ---------------------------------------------------------------------------\n// Loox loader outputs (mirror of\n// schemas/agentTools/customIntegrations/loaders/loox.ts)\n// ---------------------------------------------------------------------------\n\nexport const looxReviewMediaSchema = z.object({\n type: z.string().nullable(),\n url: z.string(),\n thumbnailUrl: z.string().nullable(),\n});\n\nexport const looxReviewLoaderItemSchema = z.object({\n id: z.string(),\n rating: z.number().nullable(),\n body: z.string().nullable(),\n createdAt: z.string().nullable(),\n verified: z.boolean(),\n reviewerName: z.string().nullable(),\n productName: z.string().nullable(),\n media: z.array(looxReviewMediaSchema),\n});\n\nexport const looxProductReviewsLoaderOutputSchema = z.object({\n reviews: z.array(looxReviewLoaderItemSchema),\n});\n\nexport const looxProductReviewAggregateLoaderOutputSchema = z.object({\n totalReviews: z.number(),\n averageRating: z.number(),\n ratingDistribution: z.record(z.string(), z.number()),\n});\n\n// ---------------------------------------------------------------------------\n// Statsig loader outputs (mirror of\n// schemas/agentTools/customIntegrations/loaders/statsig.ts)\n// ---------------------------------------------------------------------------\n\nexport const statsigExperimentLoaderOutputSchema = z.object({\n experimentName: z.string(),\n groupName: z\n .string()\n .nullable()\n .describe(\"The assigned variant group name (e.g. Control, Test).\"),\n ruleId: z\n .string()\n .nullable()\n .describe(\"The Statsig rule ID that produced this assignment.\"),\n value: z\n .record(z.string(), z.unknown())\n .describe(\"The parameter values for the assigned group.\"),\n reason: z\n .string()\n .describe(\"The evaluation reason reported by Statsig (for debugging).\"),\n});\n\nexport type StatsigExperimentAssignment = z.infer<\n typeof statsigExperimentLoaderOutputSchema\n>;\n\n// ---------------------------------------------------------------------------\n// Contentful loader outputs (mirror of\n// schemas/agentTools/customIntegrations/loaders/contentful.ts)\n// ---------------------------------------------------------------------------\n\nexport const contentfulEntryObjectSchema = z\n .object({\n id: z.string(),\n contentTypeId: z.string().nullable(),\n createdAt: z.string().nullable(),\n updatedAt: z.string().nullable(),\n fields: z.record(z.string(), z.unknown()),\n })\n .describe(\"ContentfulEntryObject\");\n\nexport const contentfulAssetObjectSchema = z\n .object({\n id: z.string(),\n title: z.string().nullable(),\n description: z.string().nullable(),\n fileName: z.string().nullable(),\n contentType: z.string().nullable(),\n url: z.string().nullable(),\n width: z.number().nullable(),\n height: z.number().nullable(),\n })\n .describe(\"ContentfulAssetObject\");\n\nexport const contentfulIncludesSchema = z\n .object({\n entries: z.array(contentfulEntryObjectSchema),\n assets: z.array(contentfulAssetObjectSchema),\n })\n .describe(\"ContentfulIncludes\");\n\nexport const contentfulEntryLoaderOutputSchema = z\n .object({\n entry: contentfulEntryObjectSchema,\n includes: contentfulIncludesSchema,\n })\n .describe(\"ContentfulEntryLoaderOutput\");\n\nexport const contentfulEntriesLoaderOutputSchema = z\n .object({\n items: z.array(contentfulEntryObjectSchema),\n includes: contentfulIncludesSchema,\n total: z.number(),\n skip: z.number(),\n limit: z.number(),\n })\n .describe(\"ContentfulEntriesLoaderOutput\");\n\nexport type ContentfulEntryObject = z.infer<typeof contentfulEntryObjectSchema>;\nexport type ContentfulAssetObject = z.infer<typeof contentfulAssetObjectSchema>;\nexport type ContentfulEntryLoaderOutput = z.infer<\n typeof contentfulEntryLoaderOutputSchema\n>;\nexport type ContentfulEntriesLoaderOutput = z.infer<\n typeof contentfulEntriesLoaderOutputSchema\n>;\n\n// ---------------------------------------------------------------------------\n// Shopify metaobjects (mirror of\n// schemas/agentTools/customIntegrations/loaders/shopify.ts)\n// ---------------------------------------------------------------------------\n\nexport const storefrontMetaobjectSchema = z\n .object({\n id: z.string(),\n type: z.string(),\n handle: z.string(),\n updatedAt: z.string().nullable(),\n fields: z.array(\n z.object({\n key: z.string(),\n type: z.string(),\n value: z.string().nullable(),\n }),\n ),\n })\n .describe(\"StorefrontMetaobject\");\n\nexport const shopifyMetaobjectLoaderOutputSchema = storefrontMetaobjectSchema;\n\nexport const shopifyMetaobjectsLoaderOutputSchema = z\n .object({\n metaobjects: z.array(storefrontMetaobjectSchema),\n pageInfo: z.object({\n hasNextPage: z.boolean(),\n endCursor: z.string().nullable(),\n }),\n })\n .describe(\"ShopifyMetaobjectsLoaderOutput\");\n\nexport type StorefrontMetaobject = z.infer<typeof storefrontMetaobjectSchema>;\nexport type ShopifyMetaobjectLoaderOutput = z.infer<\n typeof shopifyMetaobjectLoaderOutputSchema\n>;\nexport type ShopifyMetaobjectsLoaderOutput = z.infer<\n typeof shopifyMetaobjectsLoaderOutputSchema\n>;\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,SAAS;AAeX,MAAM,cAAc,EAAE,OAAO;AAAA,EAClC,KAAK,EAAE,OAAO;AAAA,EACd,SAAS,EAAE,OAAO,EAAE,SAAS;AAAA,EAC7B,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA,EAC3B,QAAQ,EAAE,OAAO,EAAE,SAAS;AAC9B,CAAC;AAEM,MAAM,mBAAmB,EAAE,OAAO;AAAA,EACvC,MAAM,EAAE,QAAQ,OAAO;AAAA,EACvB,KAAK,EAAE,OAAO,EAAE,SAAS;AAAA,EACzB,KAAK,EAAE,OAAO;AAAA,EACd,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA,EAC3B,QAAQ,EAAE,OAAO,EAAE,SAAS;AAC9B,CAAC;AAEM,MAAM,oBAAoB,EAAE,OAAO;AAAA,EACxC,KAAK,EAAE,OAAO;AAAA,EACd,UAAU,EAAE,OAAO;AA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;AACZ,CAAC,EACA,SAAS,6BAA6B;AAElC,MAAM,sCAAsC,EAChD,OAAO;AAAA,EACN,OAAO,EAAE,MAAM,2BAA2B;AAAA,EAC1C,UAAU;AAAA,EACV,OAAO,EAAE,OAAO;AAAA,EAChB,MAAM,EAAE,OAAO;AAAA,EACf,OAAO,EAAE,OAAO;AAClB,CAAC,EACA,SAAS,+BAA+B;AAgBpC,MAAM,6BAA6B,EACvC,OAAO;AAAA,EACN,IAAI,EAAE,OAAO;AAAA,EACb,MAAM,EAAE,OAAO;AAAA,EACf,QAAQ,EAAE,OAAO;AAAA,EACjB,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA,EAC/B,QAAQ,EAAE;AAAA,IACR,EAAE,OAAO;AAAA,MACP,KAAK,EAAE,OAAO;AAAA,MACd,MAAM,EAAE,OAAO;AAAA,MACf,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA,IAC7B,CAAC;AAAA,EACH;AACF,CAAC,EACA,SAAS,sBAAsB;AAE3B,MAAM,sCAAsC;AAE5C,MAAM,uCAAuC,EACjD,OAAO;AAAA,EACN,aAAa,EAAE,MAAM,0BAA0B;AAAA,EAC/C,UAAU,EAAE,OAAO;AAAA,IACjB,aAAa,EAAE,QAAQ;AAAA,IACvB,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA,EACjC,CAAC;AACH,CAAC,EACA,SAAS,gCAAgC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { looxProductReviewAggregateLoaderOutputSchema } from "./loader-schemas";
|
|
4
|
+
type LooxReviewAggregateData = z.infer<typeof looxProductReviewAggregateLoaderOutputSchema>;
|
|
5
|
+
type LooxReviewAggregateLoaderProps = {
|
|
6
|
+
loaderKey: string;
|
|
7
|
+
shopifyProductId: string;
|
|
8
|
+
children: (data: LooxReviewAggregateData) => ReactNode;
|
|
9
|
+
fallback?: ReactNode;
|
|
10
|
+
};
|
|
11
|
+
export declare function LooxReviewAggregateLoader({ loaderKey, shopifyProductId, children, fallback, }: LooxReviewAggregateLoaderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Suspense } from "react";
|
|
4
|
+
import { useSuspenseQuery } from "@tanstack/react-query";
|
|
5
|
+
import { invokeLoader } from "./invoke-loader";
|
|
6
|
+
import { LoaderErrorBoundary } from "./loader-error-boundary";
|
|
7
|
+
import { looxProductReviewAggregateLoaderOutputSchema } from "./loader-schemas";
|
|
8
|
+
function LooxReviewAggregateLoaderInner({
|
|
9
|
+
loaderKey,
|
|
10
|
+
shopifyProductId,
|
|
11
|
+
children
|
|
12
|
+
}) {
|
|
13
|
+
const queryResult = useSuspenseQuery({
|
|
14
|
+
queryKey: [loaderKey, { shopifyProductId }],
|
|
15
|
+
queryFn: async () => {
|
|
16
|
+
const loadedData = await invokeLoader({
|
|
17
|
+
loaderKey,
|
|
18
|
+
args: { shopifyProductId }
|
|
19
|
+
});
|
|
20
|
+
return looxProductReviewAggregateLoaderOutputSchema.parse(loadedData);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
return /* @__PURE__ */ jsx(Fragment, { children: children(queryResult.data) });
|
|
24
|
+
}
|
|
25
|
+
function LooxReviewAggregateLoader({
|
|
26
|
+
loaderKey,
|
|
27
|
+
shopifyProductId,
|
|
28
|
+
children,
|
|
29
|
+
fallback
|
|
30
|
+
}) {
|
|
31
|
+
return /* @__PURE__ */ jsx(
|
|
32
|
+
LoaderErrorBoundary,
|
|
33
|
+
{
|
|
34
|
+
fallback: fallback ?? null,
|
|
35
|
+
resetKey: `${loaderKey}:${shopifyProductId}`,
|
|
36
|
+
children: /* @__PURE__ */ jsx(Suspense, { fallback: fallback ?? null, children: /* @__PURE__ */ jsx(
|
|
37
|
+
LooxReviewAggregateLoaderInner,
|
|
38
|
+
{
|
|
39
|
+
loaderKey,
|
|
40
|
+
shopifyProductId,
|
|
41
|
+
children
|
|
42
|
+
}
|
|
43
|
+
) })
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
LooxReviewAggregateLoader
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=loox-review-aggregate-loader.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../loaders/loox-review-aggregate-loader.tsx"],
|
|
4
|
+
"sourcesContent": ["\"use client\";\n\nimport type { ReactNode } from \"react\";\n\nimport { Suspense } from \"react\";\n\nimport { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { z } from \"zod\";\n\nimport { invokeLoader } from \"./invoke-loader\";\nimport { LoaderErrorBoundary } from \"./loader-error-boundary\";\nimport { looxProductReviewAggregateLoaderOutputSchema } from \"./loader-schemas\";\n\ntype LooxReviewAggregateData = z.infer<\n typeof looxProductReviewAggregateLoaderOutputSchema\n>;\n\ntype LooxReviewAggregateLoaderProps = {\n loaderKey: string;\n shopifyProductId: string;\n children: (data: LooxReviewAggregateData) => ReactNode;\n fallback?: ReactNode;\n};\n\nfunction LooxReviewAggregateLoaderInner({\n loaderKey,\n shopifyProductId,\n children,\n}: Omit<LooxReviewAggregateLoaderProps, \"fallback\">) {\n const queryResult = useSuspenseQuery({\n queryKey: [loaderKey, { shopifyProductId }],\n queryFn: async () => {\n const loadedData = await invokeLoader({\n loaderKey,\n args: { shopifyProductId },\n });\n return looxProductReviewAggregateLoaderOutputSchema.parse(loadedData);\n },\n });\n\n return <>{children(queryResult.data)}</>;\n}\n\nexport function LooxReviewAggregateLoader({\n loaderKey,\n shopifyProductId,\n children,\n fallback,\n}: LooxReviewAggregateLoaderProps) {\n return (\n <LoaderErrorBoundary\n fallback={fallback ?? null}\n resetKey={`${loaderKey}:${shopifyProductId}`}\n >\n <Suspense fallback={fallback ?? null}>\n <LooxReviewAggregateLoaderInner\n loaderKey={loaderKey}\n shopifyProductId={shopifyProductId}\n >\n {children}\n </LooxReviewAggregateLoaderInner>\n </Suspense>\n </LoaderErrorBoundary>\n );\n}\n"],
|
|
5
|
+
"mappings": ";AAwCS;AApCT,SAAS,gBAAgB;AAEzB,SAAS,wBAAwB;AAGjC,SAAS,oBAAoB;AAC7B,SAAS,2BAA2B;AACpC,SAAS,oDAAoD;AAa7D,SAAS,+BAA+B;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AACF,GAAqD;AACnD,QAAM,cAAc,iBAAiB;AAAA,IACnC,UAAU,CAAC,WAAW,EAAE,iBAAiB,CAAC;AAAA,IAC1C,SAAS,YAAY;AACnB,YAAM,aAAa,MAAM,aAAa;AAAA,QACpC;AAAA,QACA,MAAM,EAAE,iBAAiB;AAAA,MAC3B,CAAC;AACD,aAAO,6CAA6C,MAAM,UAAU;AAAA,IACtE;AAAA,EACF,CAAC;AAED,SAAO,gCAAG,mBAAS,YAAY,IAAI,GAAE;AACvC;AAEO,SAAS,0BAA0B;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAmC;AACjC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,YAAY;AAAA,MACtB,UAAU,GAAG,SAAS,IAAI,gBAAgB;AAAA,MAE1C,8BAAC,YAAS,UAAU,YAAY,MAC9B;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UAEC;AAAA;AAAA,MACH,GACF;AAAA;AAAA,EACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { looxProductReviewsLoaderOutputSchema } from "./loader-schemas";
|
|
4
|
+
type LooxReviewsData = z.infer<typeof looxProductReviewsLoaderOutputSchema>;
|
|
5
|
+
type LooxReviewsLoaderProps = {
|
|
6
|
+
loaderKey: string;
|
|
7
|
+
shopifyProductId: string;
|
|
8
|
+
children: (data: LooxReviewsData) => ReactNode;
|
|
9
|
+
fallback?: ReactNode;
|
|
10
|
+
};
|
|
11
|
+
export declare function LooxReviewsLoader({ loaderKey, shopifyProductId, children, fallback, }: LooxReviewsLoaderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Suspense } from "react";
|
|
4
|
+
import { useSuspenseQuery } from "@tanstack/react-query";
|
|
5
|
+
import { invokeLoader } from "./invoke-loader";
|
|
6
|
+
import { LoaderErrorBoundary } from "./loader-error-boundary";
|
|
7
|
+
import { looxProductReviewsLoaderOutputSchema } from "./loader-schemas";
|
|
8
|
+
function LooxReviewsLoaderInner({
|
|
9
|
+
loaderKey,
|
|
10
|
+
shopifyProductId,
|
|
11
|
+
children
|
|
12
|
+
}) {
|
|
13
|
+
const queryResult = useSuspenseQuery({
|
|
14
|
+
queryKey: [loaderKey, { shopifyProductId }],
|
|
15
|
+
queryFn: async () => {
|
|
16
|
+
const loadedData = await invokeLoader({
|
|
17
|
+
loaderKey,
|
|
18
|
+
args: { shopifyProductId }
|
|
19
|
+
});
|
|
20
|
+
return looxProductReviewsLoaderOutputSchema.parse(loadedData);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
return /* @__PURE__ */ jsx(Fragment, { children: children(queryResult.data) });
|
|
24
|
+
}
|
|
25
|
+
function LooxReviewsLoader({
|
|
26
|
+
loaderKey,
|
|
27
|
+
shopifyProductId,
|
|
28
|
+
children,
|
|
29
|
+
fallback
|
|
30
|
+
}) {
|
|
31
|
+
return /* @__PURE__ */ jsx(
|
|
32
|
+
LoaderErrorBoundary,
|
|
33
|
+
{
|
|
34
|
+
fallback: fallback ?? null,
|
|
35
|
+
resetKey: `${loaderKey}:${shopifyProductId}`,
|
|
36
|
+
children: /* @__PURE__ */ jsx(Suspense, { fallback: fallback ?? null, children: /* @__PURE__ */ jsx(
|
|
37
|
+
LooxReviewsLoaderInner,
|
|
38
|
+
{
|
|
39
|
+
loaderKey,
|
|
40
|
+
shopifyProductId,
|
|
41
|
+
children
|
|
42
|
+
}
|
|
43
|
+
) })
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
LooxReviewsLoader
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=loox-reviews-loader.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../loaders/loox-reviews-loader.tsx"],
|
|
4
|
+
"sourcesContent": ["\"use client\";\n\nimport type { ReactNode } from \"react\";\n\nimport { Suspense } from \"react\";\n\nimport { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { z } from \"zod\";\n\nimport { invokeLoader } from \"./invoke-loader\";\nimport { LoaderErrorBoundary } from \"./loader-error-boundary\";\nimport { looxProductReviewsLoaderOutputSchema } from \"./loader-schemas\";\n\ntype LooxReviewsData = z.infer<typeof looxProductReviewsLoaderOutputSchema>;\n\ntype LooxReviewsLoaderProps = {\n loaderKey: string;\n shopifyProductId: string;\n children: (data: LooxReviewsData) => ReactNode;\n fallback?: ReactNode;\n};\n\nfunction LooxReviewsLoaderInner({\n loaderKey,\n shopifyProductId,\n children,\n}: Omit<LooxReviewsLoaderProps, \"fallback\">) {\n const queryResult = useSuspenseQuery({\n queryKey: [loaderKey, { shopifyProductId }],\n queryFn: async () => {\n const loadedData = await invokeLoader({\n loaderKey,\n args: { shopifyProductId },\n });\n return looxProductReviewsLoaderOutputSchema.parse(loadedData);\n },\n });\n\n return <>{children(queryResult.data)}</>;\n}\n\nexport function LooxReviewsLoader({\n loaderKey,\n shopifyProductId,\n children,\n fallback,\n}: LooxReviewsLoaderProps) {\n return (\n <LoaderErrorBoundary\n fallback={fallback ?? null}\n resetKey={`${loaderKey}:${shopifyProductId}`}\n >\n <Suspense fallback={fallback ?? null}>\n <LooxReviewsLoaderInner\n loaderKey={loaderKey}\n shopifyProductId={shopifyProductId}\n >\n {children}\n </LooxReviewsLoaderInner>\n </Suspense>\n </LoaderErrorBoundary>\n );\n}\n"],
|
|
5
|
+
"mappings": ";AAsCS;AAlCT,SAAS,gBAAgB;AAEzB,SAAS,wBAAwB;AAGjC,SAAS,oBAAoB;AAC7B,SAAS,2BAA2B;AACpC,SAAS,4CAA4C;AAWrD,SAAS,uBAAuB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AACF,GAA6C;AAC3C,QAAM,cAAc,iBAAiB;AAAA,IACnC,UAAU,CAAC,WAAW,EAAE,iBAAiB,CAAC;AAAA,IAC1C,SAAS,YAAY;AACnB,YAAM,aAAa,MAAM,aAAa;AAAA,QACpC;AAAA,QACA,MAAM,EAAE,iBAAiB;AAAA,MAC3B,CAAC;AACD,aAAO,qCAAqC,MAAM,UAAU;AAAA,IAC9D;AAAA,EACF,CAAC;AAED,SAAO,gCAAG,mBAAS,YAAY,IAAI,GAAE;AACvC;AAEO,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA2B;AACzB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,YAAY;AAAA,MACtB,UAAU,GAAG,SAAS,IAAI,gBAAgB;AAAA,MAE1C,8BAAC,YAAS,UAAU,YAAY,MAC9B;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UAEC;AAAA;AAAA,MACH,GACF;AAAA;AAAA,EACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -7,6 +7,7 @@ export type ProductLoaderArgs = {
|
|
|
7
7
|
productId?: string;
|
|
8
8
|
productMetafieldIdentifiers?: MetafieldIdentifier[];
|
|
9
9
|
variantMetafieldIdentifiers?: MetafieldIdentifier[];
|
|
10
|
+
language?: string;
|
|
10
11
|
};
|
|
11
12
|
/**
|
|
12
13
|
* Builds the single object used as BOTH the React Query key and the loader
|
|
@@ -18,4 +19,4 @@ export type ProductLoaderArgs = {
|
|
|
18
19
|
* Keys left `undefined` drop out of React Query's key hash, so omitting a field
|
|
19
20
|
* here hashes the same as a prefetch that never passed it.
|
|
20
21
|
*/
|
|
21
|
-
export declare function buildProductLoaderArgs({ handle, productId, productMetafieldIdentifiers, variantMetafieldIdentifiers, }: ProductLoaderArgs): ProductLoaderArgs;
|
|
22
|
+
export declare function buildProductLoaderArgs({ handle, productId, productMetafieldIdentifiers, variantMetafieldIdentifiers, language, }: ProductLoaderArgs): ProductLoaderArgs;
|
|
@@ -2,13 +2,15 @@ function buildProductLoaderArgs({
|
|
|
2
2
|
handle,
|
|
3
3
|
productId,
|
|
4
4
|
productMetafieldIdentifiers,
|
|
5
|
-
variantMetafieldIdentifiers
|
|
5
|
+
variantMetafieldIdentifiers,
|
|
6
|
+
language
|
|
6
7
|
}) {
|
|
7
8
|
return {
|
|
8
9
|
handle,
|
|
9
10
|
productId,
|
|
10
11
|
productMetafieldIdentifiers,
|
|
11
|
-
variantMetafieldIdentifiers
|
|
12
|
+
variantMetafieldIdentifiers,
|
|
13
|
+
language
|
|
12
14
|
};
|
|
13
15
|
}
|
|
14
16
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../loaders/product-loader-args.ts"],
|
|
4
|
-
"sourcesContent": ["export type MetafieldIdentifier = {\n namespace: string;\n key: string;\n};\n\nexport type ProductLoaderArgs = {\n handle?: string;\n productId?: string;\n productMetafieldIdentifiers?: MetafieldIdentifier[];\n variantMetafieldIdentifiers?: MetafieldIdentifier[];\n};\n\n/**\n * Builds the single object used as BOTH the React Query key and the loader\n * payload. They must stay identical: `PrefetchedLoaders` seeds the cache under\n * `[loaderKey, args]`, so an arg sent to the loader but missing from the key\n * (or vice versa) silently misses the prefetch \u2014 the client refetches without\n * it and the page renders incomplete data instead of erroring.\n *\n * Keys left `undefined` drop out of React Query's key hash, so omitting a field\n * here hashes the same as a prefetch that never passed it.\n */\nexport function buildProductLoaderArgs({\n handle,\n productId,\n productMetafieldIdentifiers,\n variantMetafieldIdentifiers,\n}: ProductLoaderArgs): ProductLoaderArgs {\n return {\n handle,\n productId,\n productMetafieldIdentifiers,\n variantMetafieldIdentifiers,\n };\n}\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["export type MetafieldIdentifier = {\n namespace: string;\n key: string;\n};\n\nexport type ProductLoaderArgs = {\n handle?: string;\n productId?: string;\n productMetafieldIdentifiers?: MetafieldIdentifier[];\n variantMetafieldIdentifiers?: MetafieldIdentifier[];\n language?: string;\n};\n\n/**\n * Builds the single object used as BOTH the React Query key and the loader\n * payload. They must stay identical: `PrefetchedLoaders` seeds the cache under\n * `[loaderKey, args]`, so an arg sent to the loader but missing from the key\n * (or vice versa) silently misses the prefetch \u2014 the client refetches without\n * it and the page renders incomplete data instead of erroring.\n *\n * Keys left `undefined` drop out of React Query's key hash, so omitting a field\n * here hashes the same as a prefetch that never passed it.\n */\nexport function buildProductLoaderArgs({\n handle,\n productId,\n productMetafieldIdentifiers,\n variantMetafieldIdentifiers,\n language,\n}: ProductLoaderArgs): ProductLoaderArgs {\n return {\n handle,\n productId,\n productMetafieldIdentifiers,\n variantMetafieldIdentifiers,\n language,\n };\n}\n"],
|
|
5
|
+
"mappings": "AAuBO,SAAS,uBAAuB;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAyC;AACvC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -6,5 +6,5 @@ type ProductLoaderProps = ProductLoaderArgs & {
|
|
|
6
6
|
children: (data: FullProduct) => ReactNode;
|
|
7
7
|
fallback?: ReactNode;
|
|
8
8
|
};
|
|
9
|
-
export declare function ProductLoader({ loaderKey, handle, productId, productMetafieldIdentifiers, variantMetafieldIdentifiers, children, fallback, }: ProductLoaderProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function ProductLoader({ loaderKey, handle, productId, productMetafieldIdentifiers, variantMetafieldIdentifiers, language, children, fallback, }: ProductLoaderProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -28,6 +28,7 @@ function ProductLoader({
|
|
|
28
28
|
productId,
|
|
29
29
|
productMetafieldIdentifiers,
|
|
30
30
|
variantMetafieldIdentifiers,
|
|
31
|
+
language,
|
|
31
32
|
children,
|
|
32
33
|
fallback
|
|
33
34
|
}) {
|
|
@@ -35,7 +36,8 @@ function ProductLoader({
|
|
|
35
36
|
handle,
|
|
36
37
|
productId,
|
|
37
38
|
productMetafieldIdentifiers,
|
|
38
|
-
variantMetafieldIdentifiers
|
|
39
|
+
variantMetafieldIdentifiers,
|
|
40
|
+
language
|
|
39
41
|
});
|
|
40
42
|
return /* @__PURE__ */ jsx(
|
|
41
43
|
LoaderErrorBoundary,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../loaders/product-loader.tsx"],
|
|
4
|
-
"sourcesContent": ["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport type { FullProduct } from \"./loader-schemas\";\nimport type { ProductLoaderArgs } from \"./product-loader-args\";\n\nimport { Suspense } from \"react\";\n\nimport { useSuspenseQuery } from \"@tanstack/react-query\";\n\nimport { invokeLoader } from \"./invoke-loader\";\nimport { LoaderErrorBoundary } from \"./loader-error-boundary\";\nimport { fullProductSchema } from \"./loader-schemas\";\nimport { useReportPreviewPlaceholderRender } from \"./preview-placeholder\";\nimport { buildProductLoaderArgs } from \"./product-loader-args\";\n\ntype ProductLoaderProps = ProductLoaderArgs & {\n loaderKey: string;\n children: (data: FullProduct) => ReactNode;\n fallback?: ReactNode;\n};\n\nfunction ProductLoaderInner({\n loaderKey,\n args,\n children,\n}: {\n loaderKey: string;\n args: ProductLoaderArgs;\n children: (data: FullProduct) => ReactNode;\n}) {\n const queryResult = useSuspenseQuery({\n queryKey: [loaderKey, args],\n queryFn: async () => {\n const loadedData = await invokeLoader({ loaderKey, args });\n return fullProductSchema.parse(loadedData);\n },\n });\n useReportPreviewPlaceholderRender(queryResult.data);\n\n return <>{children(queryResult.data)}</>;\n}\n\nexport function ProductLoader({\n loaderKey,\n handle,\n productId,\n productMetafieldIdentifiers,\n variantMetafieldIdentifiers,\n children,\n fallback,\n}: ProductLoaderProps) {\n const args = buildProductLoaderArgs({\n handle,\n productId,\n productMetafieldIdentifiers,\n variantMetafieldIdentifiers,\n });\n\n return (\n <LoaderErrorBoundary\n fallback={fallback ?? null}\n resetKey={`${loaderKey}:${JSON.stringify(args)}`}\n >\n <Suspense fallback={fallback ?? null}>\n <ProductLoaderInner loaderKey={loaderKey} args={args}>\n {children}\n </ProductLoaderInner>\n </Suspense>\n </LoaderErrorBoundary>\n );\n}\n"],
|
|
5
|
-
"mappings": ";AAwCS;AAlCT,SAAS,gBAAgB;AAEzB,SAAS,wBAAwB;AAEjC,SAAS,oBAAoB;AAC7B,SAAS,2BAA2B;AACpC,SAAS,yBAAyB;AAClC,SAAS,yCAAyC;AAClD,SAAS,8BAA8B;AAQvC,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AACF,GAIG;AACD,QAAM,cAAc,iBAAiB;AAAA,IACnC,UAAU,CAAC,WAAW,IAAI;AAAA,IAC1B,SAAS,YAAY;AACnB,YAAM,aAAa,MAAM,aAAa,EAAE,WAAW,KAAK,CAAC;AACzD,aAAO,kBAAkB,MAAM,UAAU;AAAA,IAC3C;AAAA,EACF,CAAC;AACD,oCAAkC,YAAY,IAAI;AAElD,SAAO,gCAAG,mBAAS,YAAY,IAAI,GAAE;AACvC;AAEO,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAuB;AACrB,QAAM,OAAO,uBAAuB;AAAA,IAClC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,YAAY;AAAA,MACtB,UAAU,GAAG,SAAS,IAAI,KAAK,UAAU,IAAI,CAAC;AAAA,MAE9C,8BAAC,YAAS,UAAU,YAAY,MAC9B,8BAAC,sBAAmB,WAAsB,MACvC,UACH,GACF;AAAA;AAAA,EACF;AAEJ;",
|
|
4
|
+
"sourcesContent": ["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport type { FullProduct } from \"./loader-schemas\";\nimport type { ProductLoaderArgs } from \"./product-loader-args\";\n\nimport { Suspense } from \"react\";\n\nimport { useSuspenseQuery } from \"@tanstack/react-query\";\n\nimport { invokeLoader } from \"./invoke-loader\";\nimport { LoaderErrorBoundary } from \"./loader-error-boundary\";\nimport { fullProductSchema } from \"./loader-schemas\";\nimport { useReportPreviewPlaceholderRender } from \"./preview-placeholder\";\nimport { buildProductLoaderArgs } from \"./product-loader-args\";\n\ntype ProductLoaderProps = ProductLoaderArgs & {\n loaderKey: string;\n children: (data: FullProduct) => ReactNode;\n fallback?: ReactNode;\n};\n\nfunction ProductLoaderInner({\n loaderKey,\n args,\n children,\n}: {\n loaderKey: string;\n args: ProductLoaderArgs;\n children: (data: FullProduct) => ReactNode;\n}) {\n const queryResult = useSuspenseQuery({\n queryKey: [loaderKey, args],\n queryFn: async () => {\n const loadedData = await invokeLoader({ loaderKey, args });\n return fullProductSchema.parse(loadedData);\n },\n });\n useReportPreviewPlaceholderRender(queryResult.data);\n\n return <>{children(queryResult.data)}</>;\n}\n\nexport function ProductLoader({\n loaderKey,\n handle,\n productId,\n productMetafieldIdentifiers,\n variantMetafieldIdentifiers,\n language,\n children,\n fallback,\n}: ProductLoaderProps) {\n const args = buildProductLoaderArgs({\n handle,\n productId,\n productMetafieldIdentifiers,\n variantMetafieldIdentifiers,\n language,\n });\n\n return (\n <LoaderErrorBoundary\n fallback={fallback ?? null}\n resetKey={`${loaderKey}:${JSON.stringify(args)}`}\n >\n <Suspense fallback={fallback ?? null}>\n <ProductLoaderInner loaderKey={loaderKey} args={args}>\n {children}\n </ProductLoaderInner>\n </Suspense>\n </LoaderErrorBoundary>\n );\n}\n"],
|
|
5
|
+
"mappings": ";AAwCS;AAlCT,SAAS,gBAAgB;AAEzB,SAAS,wBAAwB;AAEjC,SAAS,oBAAoB;AAC7B,SAAS,2BAA2B;AACpC,SAAS,yBAAyB;AAClC,SAAS,yCAAyC;AAClD,SAAS,8BAA8B;AAQvC,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AACF,GAIG;AACD,QAAM,cAAc,iBAAiB;AAAA,IACnC,UAAU,CAAC,WAAW,IAAI;AAAA,IAC1B,SAAS,YAAY;AACnB,YAAM,aAAa,MAAM,aAAa,EAAE,WAAW,KAAK,CAAC;AACzD,aAAO,kBAAkB,MAAM,UAAU;AAAA,IAC3C;AAAA,EACF,CAAC;AACD,oCAAkC,YAAY,IAAI;AAElD,SAAO,gCAAG,mBAAS,YAAY,IAAI,GAAE;AACvC;AAEO,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAuB;AACrB,QAAM,OAAO,uBAAuB;AAAA,IAClC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,YAAY;AAAA,MACtB,UAAU,GAAG,SAAS,IAAI,KAAK,UAAU,IAAI,CAAC;AAAA,MAE9C,8BAAC,YAAS,UAAU,YAAY,MAC9B,8BAAC,sBAAmB,WAAsB,MACvC,UACH,GACF;AAAA;AAAA,EACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@replohq/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"reploBuild": {
|
|
5
5
|
"packageName": "@replohq/sdk",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.11.0",
|
|
7
7
|
"branch": "HEAD",
|
|
8
|
-
"commit": "
|
|
9
|
-
"builtAt": "2026-08-
|
|
8
|
+
"commit": "7a8afc1864c3ceac29503c76844f95206e43d1f4",
|
|
9
|
+
"builtAt": "2026-08-26T19:11:20.910Z"
|
|
10
10
|
},
|
|
11
11
|
"description": "Replo SDK — cart, analytics, and data loaders for agent-built Next.js sites.",
|
|
12
12
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -105,6 +105,14 @@
|
|
|
105
105
|
"types": "./loaders/levanta-product-loader.d.ts",
|
|
106
106
|
"default": "./loaders/levanta-product-loader.js"
|
|
107
107
|
},
|
|
108
|
+
"./loaders/loox-review-aggregate-loader": {
|
|
109
|
+
"types": "./loaders/loox-review-aggregate-loader.d.ts",
|
|
110
|
+
"default": "./loaders/loox-review-aggregate-loader.js"
|
|
111
|
+
},
|
|
112
|
+
"./loaders/loox-reviews-loader": {
|
|
113
|
+
"types": "./loaders/loox-reviews-loader.d.ts",
|
|
114
|
+
"default": "./loaders/loox-reviews-loader.js"
|
|
115
|
+
},
|
|
108
116
|
"./loaders/metaobject-loader": {
|
|
109
117
|
"types": "./loaders/metaobject-loader.d.ts",
|
|
110
118
|
"default": "./loaders/metaobject-loader.js"
|
|
@@ -181,6 +189,14 @@
|
|
|
181
189
|
"types": "./loaders/product-loader-args.d.ts",
|
|
182
190
|
"default": "./loaders/product-loader-args.js"
|
|
183
191
|
},
|
|
192
|
+
"./loaders/collection-loader-args": {
|
|
193
|
+
"types": "./loaders/collection-loader-args.d.ts",
|
|
194
|
+
"default": "./loaders/collection-loader-args.js"
|
|
195
|
+
},
|
|
196
|
+
"./loaders/collection-products-loader-args": {
|
|
197
|
+
"types": "./loaders/collection-products-loader-args.d.ts",
|
|
198
|
+
"default": "./loaders/collection-products-loader-args.js"
|
|
199
|
+
},
|
|
184
200
|
"./orders/order-status": {
|
|
185
201
|
"types": "./orders/order-status.d.ts",
|
|
186
202
|
"default": "./orders/order-status.js"
|