@replohq/sdk 1.9.0 → 1.9.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.
Files changed (49) hide show
  1. package/_vendor/replo-utils/lib/json.mjs +5 -2
  2. package/_vendor/replo-utils/lib/misc.mjs +3 -2
  3. package/_vendor/replo-utils/lib/object.mjs +5 -0
  4. package/_vendor/schemas/contentEntry.mjs +3 -1
  5. package/_vendor/schemas/contentManifest.mjs +6 -3
  6. package/_vendor/schemas/money.mjs +3 -2
  7. package/_vendor/schemas/routing/locale.d.ts +1 -1
  8. package/_vendor/schemas/routing/locale.mjs +3 -2
  9. package/_vendor/schemas/routing/rules.mjs +3 -2
  10. package/analytics/sinks/converge-event-mapper.js +4 -10
  11. package/cart/buy-now-action.d.ts +0 -2
  12. package/cart/buy-now-action.js +0 -1
  13. package/cart/cart-actions.d.ts +1 -5
  14. package/cart/cart-actions.js +5 -21
  15. package/cart/cart-loader.d.ts +1 -4
  16. package/cart/cart-loader.js +2 -5
  17. package/cart/cart-provider.d.ts +1 -3
  18. package/cart/cart-provider.js +14 -34
  19. package/cart/cart-schema.d.ts +0 -3
  20. package/cart/cart-schema.js +1 -2
  21. package/cart/cart-types.d.ts +0 -12
  22. package/cart/gateways/cart-gateway.d.ts +2 -10
  23. package/cart/gateways/cookie-cart-gateway.d.ts +2 -10
  24. package/cart/gateways/cookie-cart-gateway.js +1 -8
  25. package/cart/gateways/resolver-cart-gateway.js +2 -25
  26. package/cart/hooks/use-buy-now.js +1 -4
  27. package/chunk-ACQS4AG5.mjs +592 -0
  28. package/{chunk-VKO7P3ED.mjs → chunk-C37TXOGI.mjs} +3 -10
  29. package/chunk-EUIVDITZ.mjs +15 -0
  30. package/{chunk-7OPH5UFQ.mjs → chunk-GZWV5XKV.mjs} +4 -5
  31. package/chunk-SSBIMQES.mjs +755 -0
  32. package/chunk-VVB7BEDE.mjs +84 -0
  33. package/chunk-ZKAX2FW3.mjs +703 -0
  34. package/gateways/canopy-api.d.ts +0 -6
  35. package/gateways/canopy-api.js +1 -8
  36. package/lib/buildMetadata.js +3 -3
  37. package/loaders/collection-loader-args.d.ts +1 -2
  38. package/loaders/collection-products-loader-args.d.ts +1 -2
  39. package/loaders/product-loader-args.d.ts +1 -2
  40. package/package.json +4 -8
  41. package/providers/replo-provider.d.ts +1 -5
  42. package/providers/replo-provider.js +2 -5
  43. package/_vendor/schemas/generated/storefrontCountryCode.d.ts +0 -10
  44. package/cart/cart-country-context.d.ts +0 -2
  45. package/cart/cart-country-context.js +0 -6
  46. package/chunk-AL3F36PH.mjs +0 -1392
  47. package/chunk-GV5FY7ZZ.mjs +0 -78
  48. package/loaders/markets.d.ts +0 -1
  49. package/loaders/markets.js +0 -0
@@ -1,5 +1,4 @@
1
1
  import type { Cart } from "../cart/cart-schema";
2
- import type { StorefrontCountryCode } from "../loaders/markets";
3
2
  import { z } from "zod";
4
3
  import { CanopyError } from "../lib/canopy-error";
5
4
  type CanopyApiGatewayErrorConfig = {
@@ -72,7 +71,6 @@ declare class CanopyApiGateway {
72
71
  sellingPlanId?: string | null;
73
72
  }[];
74
73
  discountCodes?: string[];
75
- country?: StorefrontCountryCode;
76
74
  }): Promise<Cart>;
77
75
  cartAddLines({ cartId, lines, }: {
78
76
  cartId: string;
@@ -106,10 +104,6 @@ declare class CanopyApiGateway {
106
104
  cartId: string;
107
105
  discountCodes: string[];
108
106
  }): Promise<Cart>;
109
- cartUpdateBuyerIdentity({ cartId, country, }: {
110
- cartId: string;
111
- country: StorefrontCountryCode;
112
- }): Promise<Cart>;
113
107
  }
114
108
  export declare function getCanopyApiGateway(): Promise<CanopyApiGateway>;
115
109
  export {};
@@ -194,8 +194,7 @@ If you're running locally, make sure the canopy-api cloudflare worker is running
194
194
  async cartCreate(options) {
195
195
  return this._cartPost("/create", {
196
196
  lines: options?.lines,
197
- discountCodes: options?.discountCodes,
198
- country: options?.country
197
+ discountCodes: options?.discountCodes
199
198
  });
200
199
  }
201
200
  async cartAddLines({
@@ -222,12 +221,6 @@ If you're running locally, make sure the canopy-api cloudflare worker is running
222
221
  }) {
223
222
  return this._cartPost("/update-discount-codes", { cartId, discountCodes });
224
223
  }
225
- async cartUpdateBuyerIdentity({
226
- cartId,
227
- country
228
- }) {
229
- return this._cartPost("/update-buyer-identity", { cartId, country });
230
- }
231
224
  }
232
225
  async function getCanopyApiGateway() {
233
226
  return CanopyApiGateway.setup();
@@ -1,7 +1,7 @@
1
1
  export const BUILD_METADATA = {
2
2
  "packageName": "@replohq/sdk",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "branch": "HEAD",
5
- "commit": "15175142db92c4442b5d7b01c58066252212e15a",
6
- "builtAt": "2026-09-16T23:18:41.925Z"
5
+ "commit": "dadbeffde02243998e85250ba4b2a21565c0b804",
6
+ "builtAt": "2026-09-17T18:18:44.111Z"
7
7
  };
@@ -1,9 +1,8 @@
1
- import type { StorefrontCountryCode } from "./markets";
2
1
  export type CollectionLoaderArgs = {
3
2
  handle?: string;
4
3
  collectionGid?: string;
5
4
  language?: string;
6
- country?: StorefrontCountryCode;
5
+ country?: string;
7
6
  };
8
7
  /**
9
8
  * Builds the single object used as BOTH the React Query key and the loader
@@ -1,10 +1,9 @@
1
- import type { StorefrontCountryCode } from "./markets";
2
1
  export type CollectionProductsLoaderArgs = {
3
2
  collectionGid: string;
4
3
  first?: number;
5
4
  after?: string;
6
5
  language?: string;
7
- country?: StorefrontCountryCode;
6
+ country?: string;
8
7
  };
9
8
  /**
10
9
  * Builds the single object used as BOTH the React Query key and the loader
@@ -1,4 +1,3 @@
1
- import type { StorefrontCountryCode } from "./markets";
2
1
  export type MetafieldIdentifier = {
3
2
  namespace: string;
4
3
  key: string;
@@ -9,7 +8,7 @@ export type ProductLoaderArgs = {
9
8
  productMetafieldIdentifiers?: MetafieldIdentifier[];
10
9
  variantMetafieldIdentifiers?: MetafieldIdentifier[];
11
10
  language?: string;
12
- country?: StorefrontCountryCode;
11
+ country?: string;
13
12
  };
14
13
  /**
15
14
  * Builds the single object used as BOTH the React Query key and the loader
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@replohq/sdk",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "reploBuild": {
5
5
  "packageName": "@replohq/sdk",
6
- "version": "1.9.0",
6
+ "version": "1.9.1",
7
7
  "branch": "HEAD",
8
- "commit": "15175142db92c4442b5d7b01c58066252212e15a",
9
- "builtAt": "2026-09-16T23:18:41.925Z"
8
+ "commit": "dadbeffde02243998e85250ba4b2a21565c0b804",
9
+ "builtAt": "2026-09-17T18:18:44.111Z"
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",
@@ -213,10 +213,6 @@
213
213
  "types": "./loaders/collection-products-loader-args.d.ts",
214
214
  "default": "./loaders/collection-products-loader-args.js"
215
215
  },
216
- "./loaders/markets": {
217
- "types": "./loaders/markets.d.ts",
218
- "default": "./loaders/markets.js"
219
- },
220
216
  "./orders/order-status": {
221
217
  "types": "./orders/order-status.d.ts",
222
218
  "default": "./orders/order-status.js"
@@ -1,4 +1,3 @@
1
- import type { Markets } from "../loaders/markets";
2
1
  /**
3
2
  * Root provider for a Replo site. Mount it once in `app/layout.tsx`, wrapping
4
3
  * the whole app. It sets up the React Query client every data loader reads
@@ -18,7 +17,4 @@ import type { Markets } from "../loaders/markets";
18
17
  * }
19
18
  * ```
20
19
  */
21
- export declare function ReploProvider({ children, markets, }: React.PropsWithChildren<{
22
- /** Nested so Shopify and later Replo-product markets do not share one `country`. */
23
- markets?: Markets;
24
- }>): Promise<import("react/jsx-runtime").JSX.Element>;
20
+ export declare function ReploProvider({ children }: React.PropsWithChildren): Promise<import("react/jsx-runtime").JSX.Element>;
@@ -6,10 +6,7 @@ import { getCheckoutProvider } from "../lib/integration-utils";
6
6
  import { LoaderErrorDetailsProvider } from "../loaders/loader-error-boundary";
7
7
  import { shouldShowLoaderErrorDetails } from "../loaders/loader-error-details";
8
8
  import { QueryProvider } from "./query-provider";
9
- async function ReploProvider({
10
- children,
11
- markets
12
- }) {
9
+ async function ReploProvider({ children }) {
13
10
  let checkoutProvider = "none";
14
11
  try {
15
12
  checkoutProvider = await getCheckoutProvider();
@@ -18,7 +15,7 @@ async function ReploProvider({
18
15
  }
19
16
  return /* @__PURE__ */ jsx(QueryProvider, { children: /* @__PURE__ */ jsx(LoaderErrorDetailsProvider, { enabled: shouldShowLoaderErrorDetails(), children: /* @__PURE__ */ jsxs(AnalyticsProvider, { checkoutProvider, children: [
20
17
  /* @__PURE__ */ jsx(ReploFirstPartyPixel, {}),
21
- /* @__PURE__ */ jsx(CartLoader, { country: markets?.shopify?.country, children })
18
+ /* @__PURE__ */ jsx(CartLoader, { children })
22
19
  ] }) }) });
23
20
  }
24
21
  export {
@@ -1,10 +0,0 @@
1
- export type StorefrontCountryCode = "AC" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AN" | "AO" | "AR" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MK" | "ML" | "MM" | "MN" | "MO" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PS" | "PT" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TA" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VN" | "VU" | "WF" | "WS" | "XK" | "YE" | "YT" | "ZA" | "ZM" | "ZW" | "ZZ";
2
- export type ShopifyMarket = {
3
- country?: StorefrontCountryCode;
4
- };
5
- export type Markets = {
6
- shopify?: Partial<ShopifyMarket>;
7
- };
8
- export type CartBuyerIdentity = {
9
- country: StorefrontCountryCode;
10
- };
@@ -1,2 +0,0 @@
1
- import type { StorefrontCountryCode } from "../loaders/markets";
2
- export declare const CartCountryContext: import("react").Context<StorefrontCountryCode | undefined>;
@@ -1,6 +0,0 @@
1
- "use client";
2
- import { createContext } from "react";
3
- const CartCountryContext = createContext(void 0);
4
- export {
5
- CartCountryContext
6
- };