@replohq/sdk 2.7.0 → 2.8.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.
@@ -28,6 +28,8 @@ var DATA_LOADER_KEYS = {
28
28
  LOOX_PRODUCT_REVIEW_AGGREGATE: "loox.product_review_aggregate",
29
29
  JUDGEME_PRODUCT_REVIEWS: "judgeme.product_reviews",
30
30
  JUDGEME_PRODUCT_REVIEW_AGGREGATE: "judgeme.product_review_aggregate",
31
+ JUNIP_PRODUCT_REVIEWS: "junip.product_reviews",
32
+ JUNIP_PRODUCT_REVIEW_AGGREGATE: "junip.product_review_aggregate",
31
33
  STATSIG_EXPERIMENT: "statsig.experiment",
32
34
  CONTENTFUL_ENTRY: "contentful.entry",
33
35
  CONTENTFUL_ENTRIES: "contentful.entries"
@@ -1,7 +1,7 @@
1
1
  export const BUILD_METADATA = {
2
2
  "packageName": "@replohq/sdk",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "branch": "HEAD",
5
- "commit": "1aa1f09e1dd141b243b7bb3b1ff1bc947fa01371",
6
- "builtAt": "2026-10-23T05:44:46.035Z"
5
+ "commit": "419304cd8a77ac16dd72b88ad09b17f58b805e11",
6
+ "builtAt": "2026-10-24T18:15:19.700Z"
7
7
  };
@@ -0,0 +1,12 @@
1
+ import type { ReactNode } from "react";
2
+ import type { z } from "zod";
3
+ import type { junipProductReviewAggregateLoaderOutputSchema } from "./loader-schemas";
4
+ type JunipReviewAggregateData = z.infer<typeof junipProductReviewAggregateLoaderOutputSchema>;
5
+ type JunipReviewAggregateLoaderProps = {
6
+ loaderKey: string;
7
+ productId: string;
8
+ children: (data: JunipReviewAggregateData) => ReactNode;
9
+ fallback?: ReactNode;
10
+ };
11
+ export declare function JunipReviewAggregateLoader({ loaderKey, productId, children, fallback, }: JunipReviewAggregateLoaderProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,53 @@
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
+ function JunipReviewAggregateLoaderInner({
8
+ loaderKey,
9
+ productId,
10
+ children
11
+ }) {
12
+ const { data } = useSuspenseQuery({
13
+ queryKey: [loaderKey, { productId }],
14
+ queryFn: async () => {
15
+ const [loadedData, schemas] = await Promise.all([
16
+ invokeLoader({
17
+ loaderKey,
18
+ args: { productId }
19
+ }),
20
+ import("./loader-schemas")
21
+ ]);
22
+ return schemas.junipProductReviewAggregateLoaderOutputSchema.parse(
23
+ loadedData
24
+ );
25
+ }
26
+ });
27
+ return /* @__PURE__ */ jsx(Fragment, { children: children(data) });
28
+ }
29
+ function JunipReviewAggregateLoader({
30
+ loaderKey,
31
+ productId,
32
+ children,
33
+ fallback
34
+ }) {
35
+ return /* @__PURE__ */ jsx(
36
+ LoaderErrorBoundary,
37
+ {
38
+ fallback: fallback ?? null,
39
+ resetKey: `${loaderKey}:${productId}`,
40
+ children: /* @__PURE__ */ jsx(Suspense, { fallback: fallback ?? null, children: /* @__PURE__ */ jsx(
41
+ JunipReviewAggregateLoaderInner,
42
+ {
43
+ loaderKey,
44
+ productId,
45
+ children
46
+ }
47
+ ) })
48
+ }
49
+ );
50
+ }
51
+ export {
52
+ JunipReviewAggregateLoader
53
+ };
@@ -0,0 +1,13 @@
1
+ import type { ReactNode } from "react";
2
+ import type { z } from "zod";
3
+ import type { junipProductReviewsLoaderOutputSchema } from "./loader-schemas";
4
+ type JunipReviewsData = z.infer<typeof junipProductReviewsLoaderOutputSchema>;
5
+ type JunipReviewsLoaderProps = {
6
+ loaderKey: string;
7
+ productId: string;
8
+ perPage?: number;
9
+ children: (data: JunipReviewsData) => ReactNode;
10
+ fallback?: ReactNode;
11
+ };
12
+ export declare function JunipReviewsLoader({ loaderKey, productId, perPage, children, fallback, }: JunipReviewsLoaderProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,58 @@
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
+ function buildReviewsArgs({
8
+ productId,
9
+ perPage
10
+ }) {
11
+ return { productId, ...perPage !== void 0 ? { perPage } : {} };
12
+ }
13
+ function JunipReviewsLoaderInner({
14
+ loaderKey,
15
+ productId,
16
+ perPage,
17
+ children
18
+ }) {
19
+ const args = buildReviewsArgs({ productId, perPage });
20
+ const { data } = useSuspenseQuery({
21
+ queryKey: [loaderKey, args],
22
+ queryFn: async () => {
23
+ const [loadedData, schemas] = await Promise.all([
24
+ invokeLoader({ loaderKey, args }),
25
+ import("./loader-schemas")
26
+ ]);
27
+ return schemas.junipProductReviewsLoaderOutputSchema.parse(loadedData);
28
+ }
29
+ });
30
+ return /* @__PURE__ */ jsx(Fragment, { children: children(data) });
31
+ }
32
+ function JunipReviewsLoader({
33
+ loaderKey,
34
+ productId,
35
+ perPage,
36
+ children,
37
+ fallback
38
+ }) {
39
+ return /* @__PURE__ */ jsx(
40
+ LoaderErrorBoundary,
41
+ {
42
+ fallback: fallback ?? null,
43
+ resetKey: `${loaderKey}:${productId}:${perPage ?? ""}`,
44
+ children: /* @__PURE__ */ jsx(Suspense, { fallback: fallback ?? null, children: /* @__PURE__ */ jsx(
45
+ JunipReviewsLoaderInner,
46
+ {
47
+ loaderKey,
48
+ productId,
49
+ perPage,
50
+ children
51
+ }
52
+ ) })
53
+ }
54
+ );
55
+ }
56
+ export {
57
+ JunipReviewsLoader
58
+ };
@@ -37,6 +37,8 @@ export declare const DATA_LOADER_KEYS: {
37
37
  readonly LOOX_PRODUCT_REVIEW_AGGREGATE: "loox.product_review_aggregate";
38
38
  readonly JUDGEME_PRODUCT_REVIEWS: "judgeme.product_reviews";
39
39
  readonly JUDGEME_PRODUCT_REVIEW_AGGREGATE: "judgeme.product_review_aggregate";
40
+ readonly JUNIP_PRODUCT_REVIEWS: "junip.product_reviews";
41
+ readonly JUNIP_PRODUCT_REVIEW_AGGREGATE: "junip.product_review_aggregate";
40
42
  readonly STATSIG_EXPERIMENT: "statsig.experiment";
41
43
  readonly CONTENTFUL_ENTRY: "contentful.entry";
42
44
  readonly CONTENTFUL_ENTRIES: "contentful.entries";
@@ -26,6 +26,8 @@ const DATA_LOADER_KEYS = {
26
26
  LOOX_PRODUCT_REVIEW_AGGREGATE: "loox.product_review_aggregate",
27
27
  JUDGEME_PRODUCT_REVIEWS: "judgeme.product_reviews",
28
28
  JUDGEME_PRODUCT_REVIEW_AGGREGATE: "judgeme.product_review_aggregate",
29
+ JUNIP_PRODUCT_REVIEWS: "junip.product_reviews",
30
+ JUNIP_PRODUCT_REVIEW_AGGREGATE: "junip.product_review_aggregate",
29
31
  STATSIG_EXPERIMENT: "statsig.experiment",
30
32
  CONTENTFUL_ENTRY: "contentful.entry",
31
33
  CONTENTFUL_ENTRIES: "contentful.entries"
@@ -983,6 +983,33 @@ export declare const judgemeProductReviewAggregateLoaderOutputSchema: z.ZodObjec
983
983
  totalReviews: z.ZodNumber;
984
984
  starDistribution: z.ZodRecord<z.ZodString, z.ZodNumber>;
985
985
  }, z.core.$strip>;
986
+ export declare const junipReviewLoaderItemSchema: z.ZodObject<{
987
+ id: z.ZodString;
988
+ title: z.ZodNullable<z.ZodString>;
989
+ content: z.ZodNullable<z.ZodString>;
990
+ score: z.ZodNumber;
991
+ createdAt: z.ZodString;
992
+ verifiedBuyer: z.ZodBoolean;
993
+ reviewerName: z.ZodNullable<z.ZodString>;
994
+ photoUrls: z.ZodArray<z.ZodString>;
995
+ }, z.core.$strip>;
996
+ export declare const junipProductReviewsLoaderOutputSchema: z.ZodObject<{
997
+ reviews: z.ZodArray<z.ZodObject<{
998
+ id: z.ZodString;
999
+ title: z.ZodNullable<z.ZodString>;
1000
+ content: z.ZodNullable<z.ZodString>;
1001
+ score: z.ZodNumber;
1002
+ createdAt: z.ZodString;
1003
+ verifiedBuyer: z.ZodBoolean;
1004
+ reviewerName: z.ZodNullable<z.ZodString>;
1005
+ photoUrls: z.ZodArray<z.ZodString>;
1006
+ }, z.core.$strip>>;
1007
+ }, z.core.$strip>;
1008
+ export declare const junipProductReviewAggregateLoaderOutputSchema: z.ZodObject<{
1009
+ averageScore: z.ZodNumber;
1010
+ totalReviews: z.ZodNumber;
1011
+ starDistribution: z.ZodRecord<z.ZodString, z.ZodNumber>;
1012
+ }, z.core.$strip>;
986
1013
  export declare const loyaltyLionEarningRuleVariantSchema: z.ZodObject<{
987
1014
  tierId: z.ZodNullable<z.ZodNumber>;
988
1015
  title: z.ZodString;
@@ -328,6 +328,24 @@ const judgemeProductReviewAggregateLoaderOutputSchema = z.object({
328
328
  totalReviews: z.number(),
329
329
  starDistribution: z.record(z.string(), z.number())
330
330
  });
331
+ const junipReviewLoaderItemSchema = z.object({
332
+ id: z.string(),
333
+ title: z.string().nullable(),
334
+ content: z.string().nullable(),
335
+ score: z.number(),
336
+ createdAt: z.string(),
337
+ verifiedBuyer: z.boolean(),
338
+ reviewerName: z.string().nullable(),
339
+ photoUrls: z.array(z.string())
340
+ });
341
+ const junipProductReviewsLoaderOutputSchema = z.object({
342
+ reviews: z.array(junipReviewLoaderItemSchema)
343
+ });
344
+ const junipProductReviewAggregateLoaderOutputSchema = z.object({
345
+ averageScore: z.number(),
346
+ totalReviews: z.number(),
347
+ starDistribution: z.record(z.string(), z.number())
348
+ });
331
349
  const loyaltyLionEarningRuleVariantSchema = z.object({
332
350
  tierId: z.number().nullable(),
333
351
  title: z.string(),
@@ -476,6 +494,9 @@ export {
476
494
  judgemeProductReviewAggregateLoaderOutputSchema,
477
495
  judgemeProductReviewsLoaderOutputSchema,
478
496
  judgemeReviewLoaderItemSchema,
497
+ junipProductReviewAggregateLoaderOutputSchema,
498
+ junipProductReviewsLoaderOutputSchema,
499
+ junipReviewLoaderItemSchema,
479
500
  levantaProductFullSchema,
480
501
  looxProductReviewAggregateLoaderOutputSchema,
481
502
  looxProductReviewsLoaderOutputSchema,
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@replohq/sdk",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "reploBuild": {
5
5
  "packageName": "@replohq/sdk",
6
- "version": "2.7.0",
6
+ "version": "2.8.0",
7
7
  "branch": "HEAD",
8
- "commit": "1aa1f09e1dd141b243b7bb3b1ff1bc947fa01371",
9
- "builtAt": "2026-10-23T05:44:46.035Z"
8
+ "commit": "419304cd8a77ac16dd72b88ad09b17f58b805e11",
9
+ "builtAt": "2026-10-24T18:15:19.700Z"
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",
@@ -137,6 +137,14 @@
137
137
  "types": "./loaders/judgeme-reviews-loader.d.ts",
138
138
  "default": "./loaders/judgeme-reviews-loader.js"
139
139
  },
140
+ "./loaders/junip-review-aggregate-loader": {
141
+ "types": "./loaders/junip-review-aggregate-loader.d.ts",
142
+ "default": "./loaders/junip-review-aggregate-loader.js"
143
+ },
144
+ "./loaders/junip-reviews-loader": {
145
+ "types": "./loaders/junip-reviews-loader.d.ts",
146
+ "default": "./loaders/junip-reviews-loader.js"
147
+ },
140
148
  "./loaders/kaching-bundles-loader": {
141
149
  "types": "./loaders/kaching-bundles-loader.d.ts",
142
150
  "default": "./loaders/kaching-bundles-loader.js"