@replohq/sdk 2.9.0 → 2.10.1
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/replo-utils/lib/json.mjs +0 -1
- package/_vendor/replo-utils/lib/misc.mjs +0 -1
- package/_vendor/replo-utils/lib/object.mjs +0 -1
- package/_vendor/replo-utils/lib/url.d.ts +10 -3
- package/_vendor/schemas/contentCollection.mjs +0 -1
- package/_vendor/schemas/contentEntry.mjs +0 -1
- package/_vendor/schemas/contentManifest.mjs +0 -1
- package/_vendor/schemas/loaderKeys.mjs +0 -2
- package/_vendor/schemas/moneyFormat.mjs +42 -1853
- package/_vendor/schemas/routing/locale.mjs +0 -1
- package/_vendor/schemas/routing/localeNegotiation.mjs +0 -1
- package/_vendor/schemas/routing/match.mjs +0 -1
- package/_vendor/schemas/routing/rules.mjs +0 -1
- package/lib/buildMetadata.js +3 -3
- package/loaders/collection-loader.d.ts +4 -1
- package/loaders/collection-loader.js +5 -9
- package/loaders/collection-products-loader.d.ts +4 -1
- package/loaders/collection-products-loader.js +5 -9
- package/loaders/contentful-entries-loader.d.ts +4 -1
- package/loaders/contentful-entries-loader.js +2 -6
- package/loaders/contentful-entry-loader.d.ts +4 -1
- package/loaders/contentful-entry-loader.js +2 -6
- package/loaders/invoke-loader-action.d.ts +2 -1
- package/loaders/invoke-loader-action.js +2 -4
- package/loaders/invoke-loader-server.js +8 -4
- package/loaders/invoke-loader.d.ts +11 -3
- package/loaders/invoke-loader.js +6 -5
- package/loaders/judgeme-review-aggregate-loader.d.ts +4 -1
- package/loaders/judgeme-review-aggregate-loader.js +5 -11
- package/loaders/judgeme-reviews-loader.d.ts +4 -1
- package/loaders/judgeme-reviews-loader.js +2 -6
- package/loaders/junip-review-aggregate-loader.d.ts +4 -1
- package/loaders/junip-review-aggregate-loader.js +5 -11
- package/loaders/junip-reviews-loader.d.ts +4 -1
- package/loaders/junip-reviews-loader.js +2 -6
- package/loaders/kaching-bundles-loader.d.ts +4 -1
- package/loaders/kaching-bundles-loader.js +5 -6
- package/loaders/levanta-product-loader.d.ts +4 -1
- package/loaders/levanta-product-loader.js +5 -9
- package/loaders/loader-output.d.ts +28 -0
- package/loaders/loader-output.js +122 -0
- package/loaders/loader-outputs.d.ts +55 -0
- package/loaders/loader-outputs.js +0 -0
- package/loaders/loox-review-aggregate-loader.d.ts +4 -1
- package/loaders/loox-review-aggregate-loader.js +5 -11
- package/loaders/loox-reviews-loader.d.ts +4 -1
- package/loaders/loox-reviews-loader.js +5 -9
- package/loaders/loyaltylion-earning-rules-loader.js +5 -11
- package/loaders/loyaltylion-points-for-price-loader.js +5 -11
- package/loaders/loyaltylion-rewards-loader.js +5 -9
- package/loaders/loyaltylion-tiers-loader.js +5 -9
- package/loaders/metaobject-loader.d.ts +4 -1
- package/loaders/metaobject-loader.js +2 -6
- package/loaders/metaobjects-loader.d.ts +4 -1
- package/loaders/metaobjects-loader.js +2 -6
- package/loaders/okendo-review-aggregate-loader.d.ts +4 -1
- package/loaders/okendo-review-aggregate-loader.js +5 -9
- package/loaders/okendo-reviews-loader.d.ts +4 -1
- package/loaders/okendo-reviews-loader.js +2 -6
- package/loaders/product-loader.d.ts +4 -1
- package/loaders/product-loader.js +2 -6
- package/loaders/rebuy-recommendations-loader.d.ts +4 -1
- package/loaders/rebuy-recommendations-loader.js +5 -9
- package/loaders/reviews-io-review-aggregate-loader.d.ts +4 -1
- package/loaders/reviews-io-review-aggregate-loader.js +2 -8
- package/loaders/reviews-io-reviews-loader.d.ts +4 -1
- package/loaders/reviews-io-reviews-loader.js +2 -8
- package/loaders/shopify-integration-details-loader.d.ts +4 -1
- package/loaders/shopify-integration-details-loader.js +5 -11
- package/loaders/smile-earning-rules-loader.d.ts +4 -1
- package/loaders/smile-earning-rules-loader.js +5 -9
- package/loaders/smile-rewards-loader.d.ts +4 -1
- package/loaders/smile-rewards-loader.js +5 -9
- package/loaders/smile-vip-tiers-loader.d.ts +4 -1
- package/loaders/smile-vip-tiers-loader.js +5 -9
- package/loaders/statsig-experiment-loader.d.ts +4 -1
- package/loaders/statsig-experiment-loader.js +2 -6
- package/loaders/yotpo-review-aggregate-loader.d.ts +4 -1
- package/loaders/yotpo-review-aggregate-loader.js +5 -11
- package/loaders/yotpo-reviews-loader.d.ts +4 -1
- package/loaders/yotpo-reviews-loader.js +2 -6
- package/package.json +4 -4
- package/size-budget/fixture/app/fixture-pdp/page.d.ts +1 -1
- package/size-budget/fixture/app/fixture-pdp/product-details.d.ts +1 -0
- package/chunk-UJCSKKID.mjs +0 -23
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
+
import type { DATA_LOADER_KEYS } from "./loader-keys";
|
|
3
|
+
import type { LoaderKeyProp } from "./loader-outputs";
|
|
2
4
|
import type { StatsigExperimentAssignment } from "./loader-schemas";
|
|
5
|
+
type LoaderKey = (typeof DATA_LOADER_KEYS)["STATSIG_EXPERIMENT"];
|
|
3
6
|
type StatsigVisitorIds = {
|
|
4
7
|
/**
|
|
5
8
|
* Shorthand for `customIds.stableID`. Use it only when the experiment's ID
|
|
@@ -23,7 +26,7 @@ type AtLeastOneVisitorId = (StatsigVisitorIds & {
|
|
|
23
26
|
customIds: Record<string, string>;
|
|
24
27
|
});
|
|
25
28
|
type StatsigExperimentLoaderProps = AtLeastOneVisitorId & {
|
|
26
|
-
loaderKey:
|
|
29
|
+
loaderKey: LoaderKeyProp<LoaderKey>;
|
|
27
30
|
experimentName: string;
|
|
28
31
|
environmentTier?: string;
|
|
29
32
|
customAttributes?: Record<string, string>;
|
|
@@ -41,12 +41,8 @@ function StatsigExperimentLoaderInner({
|
|
|
41
41
|
});
|
|
42
42
|
const { data } = useSuspenseQuery({
|
|
43
43
|
queryKey: [loaderKey, args],
|
|
44
|
-
queryFn:
|
|
45
|
-
|
|
46
|
-
invokeLoader({ loaderKey, args }),
|
|
47
|
-
import("./loader-schemas")
|
|
48
|
-
]);
|
|
49
|
-
return schemas.statsigExperimentLoaderOutputSchema.parse(loadedData);
|
|
44
|
+
queryFn: () => {
|
|
45
|
+
return invokeLoader({ loaderKey, args });
|
|
50
46
|
}
|
|
51
47
|
});
|
|
52
48
|
return /* @__PURE__ */ jsx(Fragment, { children: children(data) });
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import type { z } from "zod";
|
|
3
|
+
import type { DATA_LOADER_KEYS } from "./loader-keys";
|
|
4
|
+
import type { LoaderKeyProp } from "./loader-outputs";
|
|
3
5
|
import type { yotpoProductReviewAggregateLoaderOutputSchema } from "./loader-schemas";
|
|
6
|
+
type LoaderKey = (typeof DATA_LOADER_KEYS)["YOTPO_PRODUCT_REVIEW_AGGREGATE"];
|
|
4
7
|
type YotpoReviewAggregateData = z.infer<typeof yotpoProductReviewAggregateLoaderOutputSchema>;
|
|
5
8
|
type YotpoReviewAggregateLoaderProps = {
|
|
6
|
-
loaderKey:
|
|
9
|
+
loaderKey: LoaderKeyProp<LoaderKey>;
|
|
7
10
|
productId: string;
|
|
8
11
|
children: (data: YotpoReviewAggregateData) => ReactNode;
|
|
9
12
|
fallback?: ReactNode;
|
|
@@ -11,17 +11,11 @@ function YotpoReviewAggregateLoaderInner({
|
|
|
11
11
|
}) {
|
|
12
12
|
const queryResult = useSuspenseQuery({
|
|
13
13
|
queryKey: [loaderKey, { productId }],
|
|
14
|
-
queryFn:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}),
|
|
20
|
-
import("./loader-schemas")
|
|
21
|
-
]);
|
|
22
|
-
return schemas.yotpoProductReviewAggregateLoaderOutputSchema.parse(
|
|
23
|
-
loadedData
|
|
24
|
-
);
|
|
14
|
+
queryFn: () => {
|
|
15
|
+
return invokeLoader({
|
|
16
|
+
loaderKey,
|
|
17
|
+
args: { productId }
|
|
18
|
+
});
|
|
25
19
|
}
|
|
26
20
|
});
|
|
27
21
|
return /* @__PURE__ */ jsx(Fragment, { children: children(queryResult.data) });
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import type { z } from "zod";
|
|
3
|
+
import type { DATA_LOADER_KEYS } from "./loader-keys";
|
|
4
|
+
import type { LoaderKeyProp } from "./loader-outputs";
|
|
3
5
|
import type { yotpoProductReviewsLoaderOutputSchema } from "./loader-schemas";
|
|
6
|
+
type LoaderKey = (typeof DATA_LOADER_KEYS)["YOTPO_PRODUCT_REVIEWS"];
|
|
4
7
|
type YotpoReviewsData = z.infer<typeof yotpoProductReviewsLoaderOutputSchema>;
|
|
5
8
|
type YotpoReviewsLoaderProps = {
|
|
6
|
-
loaderKey:
|
|
9
|
+
loaderKey: LoaderKeyProp<LoaderKey>;
|
|
7
10
|
productId: string;
|
|
8
11
|
perPage?: number;
|
|
9
12
|
page?: number;
|
|
@@ -25,12 +25,8 @@ function YotpoReviewsLoaderInner({
|
|
|
25
25
|
const args = buildReviewsArgs({ productId, perPage, page });
|
|
26
26
|
const queryResult = useSuspenseQuery({
|
|
27
27
|
queryKey: [loaderKey, args],
|
|
28
|
-
queryFn:
|
|
29
|
-
|
|
30
|
-
invokeLoader({ loaderKey, args }),
|
|
31
|
-
import("./loader-schemas")
|
|
32
|
-
]);
|
|
33
|
-
return schemas.yotpoProductReviewsLoaderOutputSchema.parse(loadedData);
|
|
28
|
+
queryFn: () => {
|
|
29
|
+
return invokeLoader({ loaderKey, args });
|
|
34
30
|
}
|
|
35
31
|
});
|
|
36
32
|
return /* @__PURE__ */ jsx(Fragment, { children: children(queryResult.data) });
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@replohq/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.1",
|
|
4
4
|
"reploBuild": {
|
|
5
5
|
"packageName": "@replohq/sdk",
|
|
6
|
-
"version": "2.
|
|
6
|
+
"version": "2.10.1",
|
|
7
7
|
"branch": "HEAD",
|
|
8
|
-
"commit": "
|
|
9
|
-
"builtAt": "2026-10-
|
|
8
|
+
"commit": "65e727be083f9c9b51cc9aa247d471777050f32c",
|
|
9
|
+
"builtAt": "2026-10-26T23:28:14.346Z"
|
|
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",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function FixtureProductPage(): import("react/jsx-runtime").JSX.Element
|
|
1
|
+
export default function FixtureProductPage(): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ProductDetails(): import("react/jsx-runtime").JSX.Element;
|
package/chunk-UJCSKKID.mjs
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
20
|
-
mod
|
|
21
|
-
));
|
|
22
|
-
|
|
23
|
-
export { __commonJS, __toESM };
|