@replohq/sdk 2.11.0 → 2.13.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/README.md CHANGED
@@ -101,6 +101,7 @@ Use these public loader components and keys for each configured integration:
101
101
  | Shopify Storefront | `CollectionProductsLoader` | `SHOPIFY_COLLECTION_PRODUCTS` |
102
102
  | Shopify Storefront | `MetaobjectLoader` | `SHOPIFY_METAOBJECT` |
103
103
  | Shopify Storefront | `MetaobjectsLoader` | `SHOPIFY_METAOBJECTS` |
104
+ | Shopify Storefront | `ShopLoader` | `SHOPIFY_SHOP` |
104
105
  | Okendo | `OkendoReviewsLoader` | `OKENDO_PRODUCT_REVIEWS` |
105
106
  | Okendo | `OkendoReviewAggregateLoader` | `OKENDO_PRODUCT_REVIEW_AGGREGATE` |
106
107
  | Rebuy | `RebuyRecommendationsLoader` | `REBUY_RECOMMENDATIONS` |
@@ -5,6 +5,7 @@ var DATA_LOADER_KEYS = {
5
5
  SHOPIFY_COLLECTION_PRODUCTS: "shopify_storefront.collection_products",
6
6
  SHOPIFY_METAOBJECT: "shopify_storefront.metaobject",
7
7
  SHOPIFY_METAOBJECTS: "shopify_storefront.metaobjects",
8
+ SHOPIFY_SHOP: "shopify_storefront.shop",
8
9
  SHOPIFY_KACHING_BUNDLES: "shopify_storefront.kaching_bundles",
9
10
  REPLO_PRODUCT: "replo_products.product",
10
11
  OKENDO_PRODUCT_REVIEWS: "okendo.product_reviews",
@@ -1,7 +1,7 @@
1
1
  export const BUILD_METADATA = {
2
2
  "packageName": "@replohq/sdk",
3
- "version": "2.11.0",
3
+ "version": "2.13.0",
4
4
  "branch": "HEAD",
5
- "commit": "a6f8205ab3f0f29d31f2c5f4301a1f9fd81c179f",
6
- "builtAt": "2026-10-28T03:16:19.137Z"
5
+ "commit": "7431b844d8aaadcf980cdeb6b63ecaa33fb70a49",
6
+ "builtAt": "2026-10-30T05:21:51.639Z"
7
7
  };
@@ -8,10 +8,16 @@ type JudgemeReviewsData = z.infer<typeof judgemeProductReviewsLoaderOutputSchema
8
8
  type JudgemeReviewsLoaderProps = {
9
9
  loaderKey: LoaderKeyProp<LoaderKey>;
10
10
  productId: string;
11
- perPage?: number;
12
- page?: number;
13
11
  children: (data: JudgemeReviewsData) => ReactNode;
14
12
  fallback?: ReactNode;
15
- };
16
- export declare function JudgemeReviewsLoader({ loaderKey, productId, perPage, page, children, fallback, }: JudgemeReviewsLoaderProps): import("react/jsx-runtime").JSX.Element;
13
+ } & ({
14
+ perPage?: number;
15
+ page?: number;
16
+ reviewIds?: never;
17
+ } | {
18
+ reviewIds: readonly string[];
19
+ perPage?: never;
20
+ page?: never;
21
+ });
22
+ export declare function JudgemeReviewsLoader({ loaderKey, productId, perPage, page, reviewIds, children, fallback, }: JudgemeReviewsLoaderProps): import("react/jsx-runtime").JSX.Element;
17
23
  export {};
@@ -7,12 +7,14 @@ import { LoaderErrorBoundary } from "./loader-error-boundary";
7
7
  function buildReviewsArgs({
8
8
  productId,
9
9
  perPage,
10
- page
10
+ page,
11
+ reviewIds
11
12
  }) {
12
13
  return {
13
14
  productId,
14
15
  ...perPage !== void 0 ? { perPage } : {},
15
- ...page !== void 0 ? { page } : {}
16
+ ...page !== void 0 ? { page } : {},
17
+ ...reviewIds !== void 0 ? { reviewIds: [...reviewIds] } : {}
16
18
  };
17
19
  }
18
20
  function JudgemeReviewsLoaderInner({
@@ -20,9 +22,10 @@ function JudgemeReviewsLoaderInner({
20
22
  productId,
21
23
  perPage,
22
24
  page,
25
+ reviewIds,
23
26
  children
24
27
  }) {
25
- const args = buildReviewsArgs({ productId, perPage, page });
28
+ const args = buildReviewsArgs({ productId, perPage, page, reviewIds });
26
29
  const { data } = useSuspenseQuery({
27
30
  queryKey: [loaderKey, args],
28
31
  queryFn: () => {
@@ -36,6 +39,7 @@ function JudgemeReviewsLoader({
36
39
  productId,
37
40
  perPage,
38
41
  page,
42
+ reviewIds,
39
43
  children,
40
44
  fallback
41
45
  }) {
@@ -43,7 +47,7 @@ function JudgemeReviewsLoader({
43
47
  LoaderErrorBoundary,
44
48
  {
45
49
  fallback: fallback ?? null,
46
- resetKey: `${loaderKey}:${productId}:${perPage ?? ""}:${page ?? ""}`,
50
+ resetKey: `${loaderKey}:${productId}:${perPage ?? ""}:${page ?? ""}:${reviewIds?.join(",") ?? ""}`,
47
51
  children: /* @__PURE__ */ jsx(Suspense, { fallback: fallback ?? null, children: /* @__PURE__ */ jsx(
48
52
  JudgemeReviewsLoaderInner,
49
53
  {
@@ -51,6 +55,7 @@ function JudgemeReviewsLoader({
51
55
  productId,
52
56
  perPage,
53
57
  page,
58
+ reviewIds,
54
59
  children
55
60
  }
56
61
  ) })
@@ -16,6 +16,7 @@ export declare const DATA_LOADER_KEYS: {
16
16
  readonly SHOPIFY_COLLECTION_PRODUCTS: "shopify_storefront.collection_products";
17
17
  readonly SHOPIFY_METAOBJECT: "shopify_storefront.metaobject";
18
18
  readonly SHOPIFY_METAOBJECTS: "shopify_storefront.metaobjects";
19
+ readonly SHOPIFY_SHOP: "shopify_storefront.shop";
19
20
  readonly SHOPIFY_KACHING_BUNDLES: "shopify_storefront.kaching_bundles";
20
21
  readonly REPLO_PRODUCT: "replo_products.product";
21
22
  readonly OKENDO_PRODUCT_REVIEWS: "okendo.product_reviews";
@@ -5,6 +5,7 @@ const DATA_LOADER_KEYS = {
5
5
  SHOPIFY_COLLECTION_PRODUCTS: "shopify_storefront.collection_products",
6
6
  SHOPIFY_METAOBJECT: "shopify_storefront.metaobject",
7
7
  SHOPIFY_METAOBJECTS: "shopify_storefront.metaobjects",
8
+ SHOPIFY_SHOP: "shopify_storefront.shop",
8
9
  SHOPIFY_KACHING_BUNDLES: "shopify_storefront.kaching_bundles",
9
10
  REPLO_PRODUCT: "replo_products.product",
10
11
  OKENDO_PRODUCT_REVIEWS: "okendo.product_reviews",
@@ -33,6 +33,7 @@ import {
33
33
  shopifyKachingBundlesLoaderOutputSchema,
34
34
  shopifyMetaobjectLoaderOutputSchema,
35
35
  shopifyMetaobjectsLoaderOutputSchema,
36
+ shopifyShopLoaderOutputSchema,
36
37
  statsigExperimentLoaderOutputSchema,
37
38
  yotpoProductReviewAggregateLoaderOutputSchema,
38
39
  yotpoProductReviewsLoaderOutputSchema
@@ -44,6 +45,7 @@ const LOADER_OUTPUT_SCHEMAS = {
44
45
  [DATA_LOADER_KEYS.SHOPIFY_COLLECTION_PRODUCTS]: paginatedProductsSchema,
45
46
  [DATA_LOADER_KEYS.SHOPIFY_METAOBJECT]: shopifyMetaobjectLoaderOutputSchema,
46
47
  [DATA_LOADER_KEYS.SHOPIFY_METAOBJECTS]: shopifyMetaobjectsLoaderOutputSchema,
48
+ [DATA_LOADER_KEYS.SHOPIFY_SHOP]: shopifyShopLoaderOutputSchema,
47
49
  [DATA_LOADER_KEYS.SHOPIFY_KACHING_BUNDLES]: shopifyKachingBundlesLoaderOutputSchema,
48
50
  [DATA_LOADER_KEYS.REPLO_PRODUCT]: fullProductSchema,
49
51
  [DATA_LOADER_KEYS.OKENDO_PRODUCT_REVIEWS]: okendoReviewsOutputSchema,
@@ -1,7 +1,7 @@
1
1
  import type * as z from "zod";
2
2
  import type { okendoReviewAggregateOutputSchema, okendoReviewsOutputSchema, rebuyRecommendationsOutputSchema, smileEarningRulesOutputSchema, smileRewardsOutputSchema, smileVipTiersOutputSchema } from "./integration-loader-schemas";
3
3
  import type { DATA_LOADER_KEYS, DataLoaderKey } from "./loader-keys";
4
- import type { ContentfulEntriesLoaderOutput, ContentfulEntryLoaderOutput, FullCollection, FullProduct, judgemeProductReviewAggregateLoaderOutputSchema, judgemeProductReviewsLoaderOutputSchema, junipProductReviewAggregateLoaderOutputSchema, junipProductReviewsLoaderOutputSchema, LevantaProductFull, looxProductReviewAggregateLoaderOutputSchema, looxProductReviewsLoaderOutputSchema, loyaltyLionEarningRulesLoaderOutputSchema, loyaltyLionPointsForPriceLoaderOutputSchema, loyaltyLionRewardsLoaderOutputSchema, loyaltyLionTiersLoaderOutputSchema, PaginatedProducts, reviewsIoProductReviewAggregateLoaderOutputSchema, reviewsIoProductReviewsLoaderOutputSchema, ShopifyIntegrationDetails, ShopifyKachingBundlesLoaderOutput, ShopifyMetaobjectLoaderOutput, ShopifyMetaobjectsLoaderOutput, StatsigExperimentAssignment, yotpoProductReviewAggregateLoaderOutputSchema, yotpoProductReviewsLoaderOutputSchema } from "./loader-schemas";
4
+ import type { ContentfulEntriesLoaderOutput, ContentfulEntryLoaderOutput, FullCollection, FullProduct, judgemeProductReviewAggregateLoaderOutputSchema, judgemeProductReviewsLoaderOutputSchema, junipProductReviewAggregateLoaderOutputSchema, junipProductReviewsLoaderOutputSchema, LevantaProductFull, looxProductReviewAggregateLoaderOutputSchema, looxProductReviewsLoaderOutputSchema, loyaltyLionEarningRulesLoaderOutputSchema, loyaltyLionPointsForPriceLoaderOutputSchema, loyaltyLionRewardsLoaderOutputSchema, loyaltyLionTiersLoaderOutputSchema, PaginatedProducts, reviewsIoProductReviewAggregateLoaderOutputSchema, reviewsIoProductReviewsLoaderOutputSchema, ShopifyIntegrationDetails, ShopifyKachingBundlesLoaderOutput, ShopifyMetaobjectLoaderOutput, ShopifyMetaobjectsLoaderOutput, ShopifyShopLoaderOutput, StatsigExperimentAssignment, yotpoProductReviewAggregateLoaderOutputSchema, yotpoProductReviewsLoaderOutputSchema } from "./loader-schemas";
5
5
  type LoaderOutputByKeyName = {
6
6
  SHOPIFY_INTEGRATION_DETAILS: ShopifyIntegrationDetails;
7
7
  SHOPIFY_PRODUCT: FullProduct;
@@ -9,6 +9,7 @@ type LoaderOutputByKeyName = {
9
9
  SHOPIFY_COLLECTION_PRODUCTS: PaginatedProducts;
10
10
  SHOPIFY_METAOBJECT: ShopifyMetaobjectLoaderOutput;
11
11
  SHOPIFY_METAOBJECTS: ShopifyMetaobjectsLoaderOutput;
12
+ SHOPIFY_SHOP: ShopifyShopLoaderOutput;
12
13
  SHOPIFY_KACHING_BUNDLES: ShopifyKachingBundlesLoaderOutput;
13
14
  REPLO_PRODUCT: FullProduct;
14
15
  OKENDO_PRODUCT_REVIEWS: z.infer<typeof okendoReviewsOutputSchema>;
@@ -966,6 +966,7 @@ export declare const judgemeReviewLoaderItemSchema: z.ZodObject<{
966
966
  createdAt: z.ZodNullable<z.ZodString>;
967
967
  verifiedBuyer: z.ZodBoolean;
968
968
  reviewerName: z.ZodNullable<z.ZodString>;
969
+ pinned: z.ZodBoolean;
969
970
  }, z.core.$strip>;
970
971
  export declare const judgemeProductReviewsLoaderOutputSchema: z.ZodObject<{
971
972
  reviews: z.ZodArray<z.ZodObject<{
@@ -976,6 +977,7 @@ export declare const judgemeProductReviewsLoaderOutputSchema: z.ZodObject<{
976
977
  createdAt: z.ZodNullable<z.ZodString>;
977
978
  verifiedBuyer: z.ZodBoolean;
978
979
  reviewerName: z.ZodNullable<z.ZodString>;
980
+ pinned: z.ZodBoolean;
979
981
  }, z.core.$strip>>;
980
982
  }, z.core.$strip>;
981
983
  export declare const judgemeProductReviewAggregateLoaderOutputSchema: z.ZodObject<{
@@ -1268,6 +1270,26 @@ export declare const shopifyMetaobjectsLoaderOutputSchema: z.ZodObject<{
1268
1270
  endCursor: z.ZodNullable<z.ZodString>;
1269
1271
  }, z.core.$strip>;
1270
1272
  }, z.core.$strip>;
1273
+ export declare const shopifyShopLoaderOutputSchema: z.ZodObject<{
1274
+ metafields: z.ZodArray<z.ZodObject<{
1275
+ key: z.ZodString;
1276
+ namespace: z.ZodString;
1277
+ type: z.ZodString;
1278
+ value: z.ZodString;
1279
+ reference: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
1280
+ kind: z.ZodLiteral<"image">;
1281
+ url: z.ZodNullable<z.ZodString>;
1282
+ }, z.core.$strip>, z.ZodObject<{
1283
+ kind: z.ZodLiteral<"file">;
1284
+ url: z.ZodNullable<z.ZodString>;
1285
+ }, z.core.$strip>, z.ZodObject<{
1286
+ kind: z.ZodLiteral<"video">;
1287
+ url: z.ZodNullable<z.ZodString>;
1288
+ previewUrl: z.ZodNullable<z.ZodString>;
1289
+ }, z.core.$strip>], "kind">>>;
1290
+ }, z.core.$strip>>;
1291
+ }, z.core.$strip>;
1292
+ export type ShopifyShopLoaderOutput = z.infer<typeof shopifyShopLoaderOutputSchema>;
1271
1293
  export declare const shopifyKachingBundlesLoaderOutputSchema: z.ZodObject<{
1272
1294
  bundles: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1273
1295
  }, z.core.$strip>;
@@ -318,7 +318,8 @@ const judgemeReviewLoaderItemSchema = z.object({
318
318
  score: z.number().nullable(),
319
319
  createdAt: z.string().nullable(),
320
320
  verifiedBuyer: z.boolean(),
321
- reviewerName: z.string().nullable()
321
+ reviewerName: z.string().nullable(),
322
+ pinned: z.boolean()
322
323
  });
323
324
  const judgemeProductReviewsLoaderOutputSchema = z.object({
324
325
  reviews: z.array(judgemeReviewLoaderItemSchema)
@@ -469,6 +470,9 @@ const shopifyMetaobjectsLoaderOutputSchema = z.object({
469
470
  endCursor: z.string().nullable()
470
471
  })
471
472
  }).describe("ShopifyMetaobjectsLoaderOutput");
473
+ const shopifyShopLoaderOutputSchema = z.object({
474
+ metafields: z.array(metafieldSchema)
475
+ }).describe("ShopifyShopLoaderOutput");
472
476
  const shopifyKachingBundlesLoaderOutputSchema = z.object({
473
477
  bundles: z.record(z.string(), z.unknown()).nullable()
474
478
  }).describe("ShopifyKachingBundles");
@@ -535,6 +539,7 @@ export {
535
539
  shopifyKachingBundlesLoaderOutputSchema,
536
540
  shopifyMetaobjectLoaderOutputSchema,
537
541
  shopifyMetaobjectsLoaderOutputSchema,
542
+ shopifyShopLoaderOutputSchema,
538
543
  statsigExperimentLoaderOutputSchema,
539
544
  storefrontMetaobjectSchema,
540
545
  variantSchema,
@@ -0,0 +1,17 @@
1
+ import type { ReactNode } from "react";
2
+ import type { DATA_LOADER_KEYS } from "./loader-keys";
3
+ import type { LoaderKeyProp } from "./loader-outputs";
4
+ import type { ShopifyShopLoaderOutput } from "./loader-schemas";
5
+ type LoaderKey = (typeof DATA_LOADER_KEYS)["SHOPIFY_SHOP"];
6
+ type MetafieldIdentifier = {
7
+ namespace: string;
8
+ key: string;
9
+ };
10
+ type ShopLoaderProps = {
11
+ loaderKey: LoaderKeyProp<LoaderKey>;
12
+ metafieldIdentifiers: MetafieldIdentifier[];
13
+ children: (data: ShopifyShopLoaderOutput) => ReactNode;
14
+ fallback: ReactNode;
15
+ };
16
+ export declare function ShopLoader({ loaderKey, metafieldIdentifiers, children, fallback, }: ShopLoaderProps): import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1,45 @@
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 ShopLoaderInner({
8
+ loaderKey,
9
+ metafieldIdentifiers,
10
+ children
11
+ }) {
12
+ const args = { metafieldIdentifiers };
13
+ const { data } = useSuspenseQuery({
14
+ queryKey: [loaderKey, args],
15
+ queryFn: () => {
16
+ return invokeLoader({ loaderKey, args });
17
+ }
18
+ });
19
+ return /* @__PURE__ */ jsx(Fragment, { children: children(data) });
20
+ }
21
+ function ShopLoader({
22
+ loaderKey,
23
+ metafieldIdentifiers,
24
+ children,
25
+ fallback
26
+ }) {
27
+ return /* @__PURE__ */ jsx(
28
+ LoaderErrorBoundary,
29
+ {
30
+ fallback,
31
+ resetKey: `${loaderKey}:${JSON.stringify(metafieldIdentifiers)}`,
32
+ children: /* @__PURE__ */ jsx(Suspense, { fallback, children: /* @__PURE__ */ jsx(
33
+ ShopLoaderInner,
34
+ {
35
+ loaderKey,
36
+ metafieldIdentifiers,
37
+ children
38
+ }
39
+ ) })
40
+ }
41
+ );
42
+ }
43
+ export {
44
+ ShopLoader
45
+ };
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@replohq/sdk",
3
- "version": "2.11.0",
3
+ "version": "2.13.0",
4
4
  "reploBuild": {
5
5
  "packageName": "@replohq/sdk",
6
- "version": "2.11.0",
6
+ "version": "2.13.0",
7
7
  "branch": "HEAD",
8
- "commit": "a6f8205ab3f0f29d31f2c5f4301a1f9fd81c179f",
9
- "builtAt": "2026-10-28T03:16:19.137Z"
8
+ "commit": "7431b844d8aaadcf980cdeb6b63ecaa33fb70a49",
9
+ "builtAt": "2026-10-30T05:21:51.639Z"
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",
@@ -209,6 +209,10 @@
209
209
  "types": "./loaders/reviews-io-reviews-loader.d.ts",
210
210
  "default": "./loaders/reviews-io-reviews-loader.js"
211
211
  },
212
+ "./loaders/shop-loader": {
213
+ "types": "./loaders/shop-loader.d.ts",
214
+ "default": "./loaders/shop-loader.js"
215
+ },
212
216
  "./loaders/shopify-integration-details-loader": {
213
217
  "types": "./loaders/shopify-integration-details-loader.d.ts",
214
218
  "default": "./loaders/shopify-integration-details-loader.js"