@40rty/ams-sdk 0.5.26 → 0.5.27

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/dist/index.js CHANGED
@@ -391,6 +391,7 @@ __export(src_exports3, {
391
391
  clearProductFieldReaders: () => clearProductFieldReaders,
392
392
  clearProductNameLookups: () => clearProductNameLookups,
393
393
  clearProductSectionReaders: () => clearProductSectionReaders,
394
+ clearSellerProfileLookups: () => clearSellerProfileLookups,
394
395
  clearShopCheckouts: () => clearShopCheckouts,
395
396
  clearStoreArticleLookups: () => clearStoreArticleLookups,
396
397
  clearStoreThemeSources: () => clearStoreThemeSources,
@@ -560,6 +561,7 @@ __export(src_exports3, {
560
561
  registerProductFieldSource: () => registerProductFieldSource,
561
562
  registerProductNameLookup: () => registerProductNameLookup,
562
563
  registerProductSectionReader: () => registerProductSectionReader,
564
+ registerSellerProfileLookup: () => registerSellerProfileLookup,
563
565
  registerServiceHydrators: () => registerServiceHydrators,
564
566
  registerSessionScopedClear: () => registerSessionScopedClear,
565
567
  registerShopCheckout: () => registerShopCheckout,
@@ -589,6 +591,7 @@ __export(src_exports3, {
589
591
  resolveProductSectionReader: () => resolveProductSectionReader,
590
592
  resolveProductVariant: () => resolveProductVariant,
591
593
  resolveScope: () => resolveScope,
594
+ resolveSellerProfileLookup: () => resolveSellerProfileLookup,
592
595
  resolveServiceHydrators: () => resolveServiceHydrators,
593
596
  resolveShopCheckout: () => resolveShopCheckout,
594
597
  resolveStanding: () => resolveStanding,
@@ -780,6 +783,7 @@ __export(src_exports3, {
780
783
  useScrollHasMoreBelow: () => useScrollHasMoreBelow,
781
784
  useSeedLayout: () => useSeedLayout,
782
785
  useSelectMessage: () => useSelectMessage,
786
+ useSellerProfile: () => useSellerProfile,
783
787
  useSessionId: () => useSessionId,
784
788
  useSessionMessages: () => useSessionMessages,
785
789
  useSessionState: () => useSessionState,
@@ -5389,6 +5393,7 @@ __export(src_exports2, {
5389
5393
  clearProductFieldReaders: () => clearProductFieldReaders,
5390
5394
  clearProductNameLookups: () => clearProductNameLookups,
5391
5395
  clearProductSectionReaders: () => clearProductSectionReaders,
5396
+ clearSellerProfileLookups: () => clearSellerProfileLookups,
5392
5397
  clearShopCheckouts: () => clearShopCheckouts,
5393
5398
  clearStoreArticleLookups: () => clearStoreArticleLookups,
5394
5399
  clearStoreThemeSources: () => clearStoreThemeSources,
@@ -5420,6 +5425,7 @@ __export(src_exports2, {
5420
5425
  registerProductFieldSource: () => registerProductFieldSource,
5421
5426
  registerProductNameLookup: () => registerProductNameLookup,
5422
5427
  registerProductSectionReader: () => registerProductSectionReader,
5428
+ registerSellerProfileLookup: () => registerSellerProfileLookup,
5423
5429
  registerShopCheckout: () => registerShopCheckout,
5424
5430
  registerStoreArticleLookup: () => registerStoreArticleLookup,
5425
5431
  registerStoreThemeSource: () => registerStoreThemeSource,
@@ -5430,6 +5436,7 @@ __export(src_exports2, {
5430
5436
  resolveProductFieldSource: () => resolveProductFieldSource,
5431
5437
  resolveProductNameLookup: () => resolveProductNameLookup,
5432
5438
  resolveProductSectionReader: () => resolveProductSectionReader,
5439
+ resolveSellerProfileLookup: () => resolveSellerProfileLookup,
5433
5440
  resolveShopCheckout: () => resolveShopCheckout,
5434
5441
  resolveStoreArticleLookup: () => resolveStoreArticleLookup,
5435
5442
  resolveStoreThemeSource: () => resolveStoreThemeSource,
@@ -5595,7 +5602,23 @@ var ProductSchema = z46.object({
5595
5602
  * Set exclusively by `createUnavailableProduct()` — never by the
5596
5603
  * Storefront mapper.
5597
5604
  */
5598
- unavailable: z46.boolean().default(false)
5605
+ unavailable: z46.boolean().default(false),
5606
+ /**
5607
+ * Who sells it, as a marketplace or cross-store catalog names them: the store's name, its own storefront, and its
5608
+ * policies (returns, shipping, privacy, terms), each a link. Absent for a single store's own products — the space IS
5609
+ * the seller there.
5610
+ */
5611
+ seller: z46.object({
5612
+ name: z46.string(),
5613
+ url: z46.string().optional(),
5614
+ policies: z46.array(z46.object({ kind: z46.string(), url: z46.string() })).default([])
5615
+ }).optional(),
5616
+ /** What the product is known for, in the seller's or catalog's own words (top features, selling points). */
5617
+ highlights: z46.array(z46.string()).optional(),
5618
+ /** Its specifications, one line each. */
5619
+ specs: z46.array(z46.string()).optional(),
5620
+ /** The product's own page on the seller's site. */
5621
+ productUrl: z46.string().optional()
5599
5622
  });
5600
5623
  function createUnavailableProduct(gid) {
5601
5624
  return {
@@ -6289,68 +6312,84 @@ function clearStoreArticleLookups() {
6289
6312
  factories4.length = 0;
6290
6313
  }
6291
6314
 
6292
- // ../ecommerce/src/catalog-search.ts
6315
+ // ../ecommerce/src/seller-profile.ts
6293
6316
  var factories5 = [];
6294
- function registerCatalogSearch(factory) {
6317
+ function registerSellerProfileLookup(factory) {
6295
6318
  factories5.push(factory);
6296
6319
  }
6297
- function resolveCatalogSearch(platformConfig) {
6320
+ function resolveSellerProfileLookup(platformConfig) {
6298
6321
  for (const factory of factories5) {
6322
+ const lookup = factory(platformConfig);
6323
+ if (lookup !== void 0) return lookup;
6324
+ }
6325
+ return void 0;
6326
+ }
6327
+ function clearSellerProfileLookups() {
6328
+ factories5.length = 0;
6329
+ }
6330
+
6331
+ // ../ecommerce/src/catalog-search.ts
6332
+ var factories6 = [];
6333
+ function registerCatalogSearch(factory) {
6334
+ factories6.push(factory);
6335
+ }
6336
+ function resolveCatalogSearch(platformConfig) {
6337
+ for (const factory of factories6) {
6299
6338
  const search = factory(platformConfig);
6300
6339
  if (search !== void 0) return search;
6301
6340
  }
6302
6341
  return void 0;
6303
6342
  }
6304
6343
  function clearCatalogSearches() {
6305
- factories5.length = 0;
6344
+ factories6.length = 0;
6306
6345
  }
6307
6346
 
6308
6347
  // ../ecommerce/src/shop-checkout.ts
6309
- var factories6 = [];
6348
+ var factories7 = [];
6310
6349
  function registerShopCheckout(factory) {
6311
- factories6.push(factory);
6350
+ factories7.push(factory);
6312
6351
  }
6313
6352
  function resolveShopCheckout(platformConfig) {
6314
- for (const factory of factories6) {
6353
+ for (const factory of factories7) {
6315
6354
  const maker = factory(platformConfig);
6316
6355
  if (maker !== void 0) return maker;
6317
6356
  }
6318
6357
  return void 0;
6319
6358
  }
6320
6359
  function clearShopCheckouts() {
6321
- factories6.length = 0;
6360
+ factories7.length = 0;
6322
6361
  }
6323
6362
 
6324
6363
  // ../ecommerce/src/buyer-sign-in.ts
6325
- var factories7 = [];
6364
+ var factories8 = [];
6326
6365
  function registerBuyerSignIn(factory) {
6327
- factories7.push(factory);
6366
+ factories8.push(factory);
6328
6367
  }
6329
6368
  function resolveBuyerSignIn(platformConfig) {
6330
- for (const factory of factories7) {
6369
+ for (const factory of factories8) {
6331
6370
  const provider = factory(platformConfig);
6332
6371
  if (provider !== void 0) return provider;
6333
6372
  }
6334
6373
  return void 0;
6335
6374
  }
6336
6375
  function clearBuyerSignIns() {
6337
- factories7.length = 0;
6376
+ factories8.length = 0;
6338
6377
  }
6339
6378
 
6340
6379
  // ../ecommerce/src/code-discounts.ts
6341
- var factories8 = [];
6380
+ var factories9 = [];
6342
6381
  function registerCodeDiscountSource(factory) {
6343
- factories8.push(factory);
6382
+ factories9.push(factory);
6344
6383
  }
6345
6384
  function resolveCodeDiscountSource(options) {
6346
- for (const factory of factories8) {
6385
+ for (const factory of factories9) {
6347
6386
  const source = factory(options);
6348
6387
  if (source !== void 0) return source;
6349
6388
  }
6350
6389
  return void 0;
6351
6390
  }
6352
6391
  function clearCodeDiscountSources() {
6353
- factories8.length = 0;
6392
+ factories9.length = 0;
6354
6393
  }
6355
6394
 
6356
6395
  // ../ecommerce/src/store-theme.ts
@@ -6360,19 +6399,19 @@ var StoreThemeAccessError = class extends Error {
6360
6399
  this.name = "StoreThemeAccessError";
6361
6400
  }
6362
6401
  };
6363
- var factories9 = [];
6402
+ var factories10 = [];
6364
6403
  function registerStoreThemeSource(factory) {
6365
- factories9.push(factory);
6404
+ factories10.push(factory);
6366
6405
  }
6367
6406
  function resolveStoreThemeSource(options) {
6368
- for (const factory of factories9) {
6407
+ for (const factory of factories10) {
6369
6408
  const source = factory(options);
6370
6409
  if (source !== void 0) return source;
6371
6410
  }
6372
6411
  return void 0;
6373
6412
  }
6374
6413
  function clearStoreThemeSources() {
6375
- factories9.length = 0;
6414
+ factories10.length = 0;
6376
6415
  }
6377
6416
 
6378
6417
  // ../ecommerce/src/installment-offer.ts
@@ -11622,6 +11661,7 @@ __export(commerce_exports, {
11622
11661
  useProducts: () => useProducts,
11623
11662
  useQueuedDiscountCodes: () => useQueuedDiscountCodes,
11624
11663
  useSafeCart: () => useSafeCart,
11664
+ useSellerProfile: () => useSellerProfile,
11625
11665
  useShopCheckout: () => useShopCheckout,
11626
11666
  useStoreArticles: () => useStoreArticles,
11627
11667
  useStoreCheckouts: () => useStoreCheckouts,
@@ -11725,6 +11765,7 @@ var INERT_COMMERCE_RUNTIME = {
11725
11765
  }),
11726
11766
  // No commerce, no stores whose articles to read.
11727
11767
  useStoreArticles: () => ({ available: false, articles: [], isLoading: false }),
11768
+ useSellerProfile: () => ({ available: false, profile: null, isLoading: false }),
11728
11769
  // No commerce, no store to read the field from.
11729
11770
  useProductField: () => ({ value: void 0, status: "error" }),
11730
11771
  // No commerce, no store page to read the section from.
@@ -11781,6 +11822,9 @@ function useAskStore() {
11781
11822
  function useStoreArticles(productIds, topic) {
11782
11823
  return useCommerceRuntime().useStoreArticles(productIds, topic);
11783
11824
  }
11825
+ function useSellerProfile(productId) {
11826
+ return useCommerceRuntime().useSellerProfile(productId);
11827
+ }
11784
11828
  function useShopCheckout() {
11785
11829
  return useCommerceRuntime().useShopCheckout();
11786
11830
  }
@@ -13522,7 +13566,7 @@ function useContentActions() {
13522
13566
  import { useEffect as useEffect19, useState as useState19 } from "react";
13523
13567
 
13524
13568
  // package.json
13525
- var version = "0.5.26";
13569
+ var version = "0.5.27";
13526
13570
 
13527
13571
  // src/host/host-modules.ts
13528
13572
  import * as react from "react";
@@ -13995,6 +14039,7 @@ export {
13995
14039
  clearProductFieldReaders,
13996
14040
  clearProductNameLookups,
13997
14041
  clearProductSectionReaders,
14042
+ clearSellerProfileLookups,
13998
14043
  clearShopCheckouts,
13999
14044
  clearStoreArticleLookups,
14000
14045
  clearStoreThemeSources,
@@ -14165,6 +14210,7 @@ export {
14165
14210
  registerProductFieldSource,
14166
14211
  registerProductNameLookup,
14167
14212
  registerProductSectionReader,
14213
+ registerSellerProfileLookup,
14168
14214
  registerServiceHydrators,
14169
14215
  registerSessionScopedClear,
14170
14216
  registerShopCheckout,
@@ -14194,6 +14240,7 @@ export {
14194
14240
  resolveProductSectionReader,
14195
14241
  resolveProductVariant,
14196
14242
  resolveScope,
14243
+ resolveSellerProfileLookup,
14197
14244
  resolveServiceHydrators,
14198
14245
  resolveShopCheckout,
14199
14246
  resolveStanding,
@@ -14385,6 +14432,7 @@ export {
14385
14432
  useScrollHasMoreBelow,
14386
14433
  useSeedLayout,
14387
14434
  useSelectMessage,
14435
+ useSellerProfile,
14388
14436
  useSessionId,
14389
14437
  useSessionMessages,
14390
14438
  useSessionState,
@@ -798,6 +798,45 @@ export declare const ProductSchema: z.ZodObject<{
798
798
  * Storefront mapper.
799
799
  */
800
800
  unavailable: z.ZodDefault<z.ZodBoolean>;
801
+ /**
802
+ * Who sells it, as a marketplace or cross-store catalog names them: the store's name, its own storefront, and its
803
+ * policies (returns, shipping, privacy, terms), each a link. Absent for a single store's own products — the space IS
804
+ * the seller there.
805
+ */
806
+ seller: z.ZodOptional<z.ZodObject<{
807
+ name: z.ZodString;
808
+ url: z.ZodOptional<z.ZodString>;
809
+ policies: z.ZodDefault<z.ZodArray<z.ZodObject<{
810
+ kind: z.ZodString;
811
+ url: z.ZodString;
812
+ }, "strip", z.ZodTypeAny, {
813
+ kind: string;
814
+ url: string;
815
+ }, {
816
+ kind: string;
817
+ url: string;
818
+ }>, "many">>;
819
+ }, "strip", z.ZodTypeAny, {
820
+ name: string;
821
+ policies: {
822
+ kind: string;
823
+ url: string;
824
+ }[];
825
+ url?: string | undefined;
826
+ }, {
827
+ name: string;
828
+ url?: string | undefined;
829
+ policies?: {
830
+ kind: string;
831
+ url: string;
832
+ }[] | undefined;
833
+ }>>;
834
+ /** What the product is known for, in the seller's or catalog's own words (top features, selling points). */
835
+ highlights: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
836
+ /** Its specifications, one line each. */
837
+ specs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
838
+ /** The product's own page on the seller's site. */
839
+ productUrl: z.ZodOptional<z.ZodString>;
801
840
  }, "strip", z.ZodTypeAny, {
802
841
  id: string;
803
842
  title: string;
@@ -900,6 +939,17 @@ export declare const ProductSchema: z.ZodObject<{
900
939
  value: number;
901
940
  count: number;
902
941
  } | undefined;
942
+ seller?: {
943
+ name: string;
944
+ policies: {
945
+ kind: string;
946
+ url: string;
947
+ }[];
948
+ url?: string | undefined;
949
+ } | undefined;
950
+ highlights?: string[] | undefined;
951
+ specs?: string[] | undefined;
952
+ productUrl?: string | undefined;
903
953
  }, {
904
954
  id: string;
905
955
  title: string;
@@ -1002,6 +1052,17 @@ export declare const ProductSchema: z.ZodObject<{
1002
1052
  value: number;
1003
1053
  count: number;
1004
1054
  } | undefined;
1055
+ seller?: {
1056
+ name: string;
1057
+ url?: string | undefined;
1058
+ policies?: {
1059
+ kind: string;
1060
+ url: string;
1061
+ }[] | undefined;
1062
+ } | undefined;
1063
+ highlights?: string[] | undefined;
1064
+ specs?: string[] | undefined;
1065
+ productUrl?: string | undefined;
1005
1066
  }>;
1006
1067
  export type Product = z.infer<typeof ProductSchema>;
1007
1068
  /**
@@ -1888,13 +1949,13 @@ export declare const StoreCheckoutSchema: z.ZodUnion<[z.ZodObject<{
1888
1949
  checkoutUrl: z.ZodString;
1889
1950
  }, "strip", z.ZodTypeAny, {
1890
1951
  status: "ready";
1891
- checkoutUrl: string;
1892
1952
  seller: string;
1953
+ checkoutUrl: string;
1893
1954
  lineIds: string[];
1894
1955
  }, {
1895
1956
  status: "ready";
1896
- checkoutUrl: string;
1897
1957
  seller: string;
1958
+ checkoutUrl: string;
1898
1959
  lineIds: string[];
1899
1960
  }>, z.ZodObject<{
1900
1961
  status: z.ZodLiteral<"failed">;
@@ -1942,13 +2003,13 @@ export declare const ShopCheckoutResultSchema: z.ZodUnion<[z.ZodObject<{
1942
2003
  checkoutUrl: z.ZodString;
1943
2004
  }, "strip", z.ZodTypeAny, {
1944
2005
  status: "ready";
1945
- checkoutUrl: string;
1946
2006
  seller: string;
2007
+ checkoutUrl: string;
1947
2008
  lineIds: string[];
1948
2009
  }, {
1949
2010
  status: "ready";
1950
- checkoutUrl: string;
1951
2011
  seller: string;
2012
+ checkoutUrl: string;
1952
2013
  lineIds: string[];
1953
2014
  }>, z.ZodObject<{
1954
2015
  status: z.ZodLiteral<"failed">;
@@ -1971,8 +2032,8 @@ export declare const ShopCheckoutResultSchema: z.ZodUnion<[z.ZodObject<{
1971
2032
  continueUrl: string;
1972
2033
  stores: ({
1973
2034
  status: "ready";
1974
- checkoutUrl: string;
1975
2035
  seller: string;
2036
+ checkoutUrl: string;
1976
2037
  lineIds: string[];
1977
2038
  } | {
1978
2039
  status: "failed";
@@ -1985,8 +2046,8 @@ export declare const ShopCheckoutResultSchema: z.ZodUnion<[z.ZodObject<{
1985
2046
  continueUrl: string;
1986
2047
  stores: ({
1987
2048
  status: "ready";
1988
- checkoutUrl: string;
1989
2049
  seller: string;
2050
+ checkoutUrl: string;
1990
2051
  lineIds: string[];
1991
2052
  } | {
1992
2053
  status: "failed";
@@ -2004,13 +2065,13 @@ export declare const ShopCheckoutResultSchema: z.ZodUnion<[z.ZodObject<{
2004
2065
  checkoutUrl: z.ZodString;
2005
2066
  }, "strip", z.ZodTypeAny, {
2006
2067
  status: "ready";
2007
- checkoutUrl: string;
2008
2068
  seller: string;
2069
+ checkoutUrl: string;
2009
2070
  lineIds: string[];
2010
2071
  }, {
2011
2072
  status: "ready";
2012
- checkoutUrl: string;
2013
2073
  seller: string;
2074
+ checkoutUrl: string;
2014
2075
  lineIds: string[];
2015
2076
  }>, z.ZodObject<{
2016
2077
  status: z.ZodLiteral<"failed">;
@@ -2033,8 +2094,8 @@ export declare const ShopCheckoutResultSchema: z.ZodUnion<[z.ZodObject<{
2033
2094
  reason: string;
2034
2095
  stores: ({
2035
2096
  status: "ready";
2036
- checkoutUrl: string;
2037
2097
  seller: string;
2098
+ checkoutUrl: string;
2038
2099
  lineIds: string[];
2039
2100
  } | {
2040
2101
  status: "failed";
@@ -2047,8 +2108,8 @@ export declare const ShopCheckoutResultSchema: z.ZodUnion<[z.ZodObject<{
2047
2108
  reason: string;
2048
2109
  stores: ({
2049
2110
  status: "ready";
2050
- checkoutUrl: string;
2051
2111
  seller: string;
2112
+ checkoutUrl: string;
2052
2113
  lineIds: string[];
2053
2114
  } | {
2054
2115
  status: "failed";
@@ -2077,13 +2138,13 @@ export declare const ShopCheckoutAnswerSchema: z.ZodUnion<[z.ZodObject<{
2077
2138
  checkoutUrl: z.ZodString;
2078
2139
  }, "strip", z.ZodTypeAny, {
2079
2140
  status: "ready";
2080
- checkoutUrl: string;
2081
2141
  seller: string;
2142
+ checkoutUrl: string;
2082
2143
  lineIds: string[];
2083
2144
  }, {
2084
2145
  status: "ready";
2085
- checkoutUrl: string;
2086
2146
  seller: string;
2147
+ checkoutUrl: string;
2087
2148
  lineIds: string[];
2088
2149
  }>, z.ZodObject<{
2089
2150
  status: z.ZodLiteral<"failed">;
@@ -2106,8 +2167,8 @@ export declare const ShopCheckoutAnswerSchema: z.ZodUnion<[z.ZodObject<{
2106
2167
  continueUrl: string;
2107
2168
  stores: ({
2108
2169
  status: "ready";
2109
- checkoutUrl: string;
2110
2170
  seller: string;
2171
+ checkoutUrl: string;
2111
2172
  lineIds: string[];
2112
2173
  } | {
2113
2174
  status: "failed";
@@ -2120,8 +2181,8 @@ export declare const ShopCheckoutAnswerSchema: z.ZodUnion<[z.ZodObject<{
2120
2181
  continueUrl: string;
2121
2182
  stores: ({
2122
2183
  status: "ready";
2123
- checkoutUrl: string;
2124
2184
  seller: string;
2185
+ checkoutUrl: string;
2125
2186
  lineIds: string[];
2126
2187
  } | {
2127
2188
  status: "failed";
@@ -2139,13 +2200,13 @@ export declare const ShopCheckoutAnswerSchema: z.ZodUnion<[z.ZodObject<{
2139
2200
  checkoutUrl: z.ZodString;
2140
2201
  }, "strip", z.ZodTypeAny, {
2141
2202
  status: "ready";
2142
- checkoutUrl: string;
2143
2203
  seller: string;
2204
+ checkoutUrl: string;
2144
2205
  lineIds: string[];
2145
2206
  }, {
2146
2207
  status: "ready";
2147
- checkoutUrl: string;
2148
2208
  seller: string;
2209
+ checkoutUrl: string;
2149
2210
  lineIds: string[];
2150
2211
  }>, z.ZodObject<{
2151
2212
  status: z.ZodLiteral<"failed">;
@@ -2168,8 +2229,8 @@ export declare const ShopCheckoutAnswerSchema: z.ZodUnion<[z.ZodObject<{
2168
2229
  reason: string;
2169
2230
  stores: ({
2170
2231
  status: "ready";
2171
- checkoutUrl: string;
2172
2232
  seller: string;
2233
+ checkoutUrl: string;
2173
2234
  lineIds: string[];
2174
2235
  } | {
2175
2236
  status: "failed";
@@ -2182,8 +2243,8 @@ export declare const ShopCheckoutAnswerSchema: z.ZodUnion<[z.ZodObject<{
2182
2243
  reason: string;
2183
2244
  stores: ({
2184
2245
  status: "ready";
2185
- checkoutUrl: string;
2186
2246
  seller: string;
2247
+ checkoutUrl: string;
2187
2248
  lineIds: string[];
2188
2249
  } | {
2189
2250
  status: "failed";
@@ -2199,8 +2260,8 @@ export declare const ShopCheckoutAnswerSchema: z.ZodUnion<[z.ZodObject<{
2199
2260
  continueUrl: string;
2200
2261
  stores: ({
2201
2262
  status: "ready";
2202
- checkoutUrl: string;
2203
2263
  seller: string;
2264
+ checkoutUrl: string;
2204
2265
  lineIds: string[];
2205
2266
  } | {
2206
2267
  status: "failed";
@@ -2213,8 +2274,8 @@ export declare const ShopCheckoutAnswerSchema: z.ZodUnion<[z.ZodObject<{
2213
2274
  reason: string;
2214
2275
  stores: ({
2215
2276
  status: "ready";
2216
- checkoutUrl: string;
2217
2277
  seller: string;
2278
+ checkoutUrl: string;
2218
2279
  lineIds: string[];
2219
2280
  } | {
2220
2281
  status: "failed";
@@ -2230,8 +2291,8 @@ export declare const ShopCheckoutAnswerSchema: z.ZodUnion<[z.ZodObject<{
2230
2291
  continueUrl: string;
2231
2292
  stores: ({
2232
2293
  status: "ready";
2233
- checkoutUrl: string;
2234
2294
  seller: string;
2295
+ checkoutUrl: string;
2235
2296
  lineIds: string[];
2236
2297
  } | {
2237
2298
  status: "failed";
@@ -2244,8 +2305,8 @@ export declare const ShopCheckoutAnswerSchema: z.ZodUnion<[z.ZodObject<{
2244
2305
  reason: string;
2245
2306
  stores: ({
2246
2307
  status: "ready";
2247
- checkoutUrl: string;
2248
2308
  seller: string;
2309
+ checkoutUrl: string;
2249
2310
  lineIds: string[];
2250
2311
  } | {
2251
2312
  status: "failed";
@@ -14,6 +14,7 @@ export { registerProductNameLookup, resolveProductNameLookup, clearProductNameLo
14
14
  export { buildProductFieldsConfig, readProductFieldsConfig, isDeclaredProductField, ProductFieldIdError, registerProductFieldReader, resolveProductFieldReader, registerProductFieldSource, resolveProductFieldSource, clearProductFieldReaders, type ProductFieldRef, type ProductFieldReader, type ProductFieldReaderFactory, type ProductFieldSourceFactory, } from './product-fields';
15
15
  export { buildProductSectionsConfig, readProductSectionsConfig, registerProductSectionReader, resolveProductSectionReader, clearProductSectionReaders, PRODUCT_SECTION_MAX_CHARS, PRODUCT_SECTION_ID_PATTERN, type ProductSectionReader, type ProductSectionReaderFactory, } from './product-sections';
16
16
  export { registerStoreArticleLookup, resolveStoreArticleLookup, clearStoreArticleLookups, type StoreArticle, type StoreArticleLookup, type StoreArticleLookupFactory, } from './store-articles';
17
+ export { registerSellerProfileLookup, resolveSellerProfileLookup, clearSellerProfileLookups, type SellerProfile, type SellerProfileLookup, type SellerProfileLookupFactory, } from './seller-profile';
17
18
  export { registerCatalogSearch, resolveCatalogSearch, clearCatalogSearches, type CatalogSearch, type CatalogSearchFactory, type CatalogSearchInput, type CatalogSearchPage, } from './catalog-search';
18
19
  export { registerShopCheckout, resolveShopCheckout, clearShopCheckouts, type ShopCheckoutLine, type ShopCheckoutMaker, type ShopCheckoutFactory, } from './shop-checkout';
19
20
  export { registerBuyerSignIn, resolveBuyerSignIn, clearBuyerSignIns, type BuyerSignIn, type BuyerSignInFactory, type BuyerSignInProvider, type SignedInBuyer, } from './buyer-sign-in';
@@ -251,11 +251,6 @@ export declare const ProductReviewDataSchema: z.ZodObject<{
251
251
  verified?: boolean | undefined;
252
252
  writtenFor?: string | undefined;
253
253
  }[];
254
- aggregate: {
255
- value: number;
256
- count: number;
257
- };
258
- distribution: number[];
259
254
  highlights: {
260
255
  date: string;
261
256
  content: string;
@@ -267,6 +262,11 @@ export declare const ProductReviewDataSchema: z.ZodObject<{
267
262
  writtenFor?: string | undefined;
268
263
  highlight?: string | undefined;
269
264
  }[];
265
+ aggregate: {
266
+ value: number;
267
+ count: number;
268
+ };
269
+ distribution: number[];
270
270
  unavailable?: boolean | undefined;
271
271
  }, {
272
272
  id: string;
@@ -280,11 +280,6 @@ export declare const ProductReviewDataSchema: z.ZodObject<{
280
280
  verified?: boolean | undefined;
281
281
  writtenFor?: string | undefined;
282
282
  }[] | undefined;
283
- aggregate?: {
284
- value: number;
285
- count: number;
286
- } | undefined;
287
- distribution?: number[] | undefined;
288
283
  highlights?: {
289
284
  date: string;
290
285
  content: string;
@@ -296,6 +291,11 @@ export declare const ProductReviewDataSchema: z.ZodObject<{
296
291
  writtenFor?: string | undefined;
297
292
  highlight?: string | undefined;
298
293
  }[] | undefined;
294
+ aggregate?: {
295
+ value: number;
296
+ count: number;
297
+ } | undefined;
298
+ distribution?: number[] | undefined;
299
299
  }>;
300
300
  export type ProductReviewData = z.infer<typeof ProductReviewDataSchema>;
301
301
  /**
@@ -423,11 +423,6 @@ export declare const ProductReviewPayloadSchema: z.ZodObject<Omit<{
423
423
  verified?: boolean | undefined;
424
424
  writtenFor?: string | undefined;
425
425
  }[];
426
- aggregate: {
427
- value: number;
428
- count: number;
429
- };
430
- distribution: number[];
431
426
  highlights: {
432
427
  date: string;
433
428
  content: string;
@@ -439,6 +434,11 @@ export declare const ProductReviewPayloadSchema: z.ZodObject<Omit<{
439
434
  writtenFor?: string | undefined;
440
435
  highlight?: string | undefined;
441
436
  }[];
437
+ aggregate: {
438
+ value: number;
439
+ count: number;
440
+ };
441
+ distribution: number[];
442
442
  unavailable?: boolean | undefined;
443
443
  }, {
444
444
  unavailable?: boolean | undefined;
@@ -451,11 +451,6 @@ export declare const ProductReviewPayloadSchema: z.ZodObject<Omit<{
451
451
  verified?: boolean | undefined;
452
452
  writtenFor?: string | undefined;
453
453
  }[] | undefined;
454
- aggregate?: {
455
- value: number;
456
- count: number;
457
- } | undefined;
458
- distribution?: number[] | undefined;
459
454
  highlights?: {
460
455
  date: string;
461
456
  content: string;
@@ -467,5 +462,10 @@ export declare const ProductReviewPayloadSchema: z.ZodObject<Omit<{
467
462
  writtenFor?: string | undefined;
468
463
  highlight?: string | undefined;
469
464
  }[] | undefined;
465
+ aggregate?: {
466
+ value: number;
467
+ count: number;
468
+ } | undefined;
469
+ distribution?: number[] | undefined;
470
470
  }>;
471
471
  export type ProductReviewPayload = z.infer<typeof ProductReviewPayloadSchema>;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Who sells a product, as their own site and storefront say — for a space whose products come from many stores, so a
3
+ * product's page can show its brand beside it: the brand's mark, its own line about itself, its colour, and whether its
4
+ * store answers agents (a Storefront MCP endpoint).
5
+ *
6
+ * The lookup is INJECTED (§IX), like the store-article lookup: the platform binding that knows where a product's store
7
+ * lives registers one, and the route that serves it never names a platform. A space whose options no factory claims has
8
+ * no seller profiles.
9
+ */
10
+ export interface SellerProfile {
11
+ /** The store's name. */
12
+ name: string;
13
+ /** Its storefront. */
14
+ url: string;
15
+ /** Its mark (touch icon, else favicon), from its own site; null when it publishes none. */
16
+ icon: string | null;
17
+ /** Its own line about itself (the site's description); null when it sets none. */
18
+ description: string | null;
19
+ /** Its colour (`theme-color`); null when it sets none. */
20
+ color: string | null;
21
+ /** Whether its storefront answers agents over MCP, and where. */
22
+ mcp: {
23
+ available: boolean;
24
+ endpoint: string | null;
25
+ };
26
+ }
27
+ /** The profile of the store selling `productId`, or null when the product or its store cannot be read. */
28
+ export type SellerProfileLookup = (productId: string) => Promise<SellerProfile | null>;
29
+ /** A lookup for a space's platform config, or `undefined` when the platform is not this factory's. */
30
+ export type SellerProfileLookupFactory = (platformConfig: unknown) => SellerProfileLookup | undefined;
31
+ export declare function registerSellerProfileLookup(factory: SellerProfileLookupFactory): void;
32
+ /** First registered factory that claims this platform config. */
33
+ export declare function resolveSellerProfileLookup(platformConfig: unknown): SellerProfileLookup | undefined;
34
+ /** Test seam: drops every registration. */
35
+ export declare function clearSellerProfileLookups(): void;
@@ -394,6 +394,7 @@ export declare const HOST_MODULES: {
394
394
  useStoreCheckouts: typeof sdk.useStoreCheckouts;
395
395
  useAskStore: typeof sdk.useAskStore;
396
396
  useStoreArticles: typeof sdk.useStoreArticles;
397
+ useSellerProfile: typeof sdk.useSellerProfile;
397
398
  useShopCheckout: typeof sdk.useShopCheckout;
398
399
  useProductSearch: typeof sdk.useProductSearch;
399
400
  useCommerceRuntime: typeof sdk.useCommerceRuntime;
@@ -5533,6 +5534,9 @@ export declare const HOST_MODULES: {
5533
5534
  registerStoreArticleLookup: typeof ecommerce.registerStoreArticleLookup;
5534
5535
  resolveStoreArticleLookup: typeof ecommerce.resolveStoreArticleLookup;
5535
5536
  clearStoreArticleLookups: typeof ecommerce.clearStoreArticleLookups;
5537
+ registerSellerProfileLookup: typeof ecommerce.registerSellerProfileLookup;
5538
+ resolveSellerProfileLookup: typeof ecommerce.resolveSellerProfileLookup;
5539
+ clearSellerProfileLookups: typeof ecommerce.clearSellerProfileLookups;
5536
5540
  registerCatalogSearch: typeof ecommerce.registerCatalogSearch;
5537
5541
  resolveCatalogSearch: typeof ecommerce.resolveCatalogSearch;
5538
5542
  clearCatalogSearches: typeof ecommerce.clearCatalogSearches;
@@ -6192,6 +6196,37 @@ export declare const HOST_MODULES: {
6192
6196
  verified?: boolean | undefined;
6193
6197
  }>, "many">>;
6194
6198
  unavailable: zod.ZodDefault<zod.ZodBoolean>;
6199
+ seller: zod.ZodOptional<zod.ZodObject<{
6200
+ name: zod.ZodString;
6201
+ url: zod.ZodOptional<zod.ZodString>;
6202
+ policies: zod.ZodDefault<zod.ZodArray<zod.ZodObject<{
6203
+ kind: zod.ZodString;
6204
+ url: zod.ZodString;
6205
+ }, "strip", zod.ZodTypeAny, {
6206
+ kind: string;
6207
+ url: string;
6208
+ }, {
6209
+ kind: string;
6210
+ url: string;
6211
+ }>, "many">>;
6212
+ }, "strip", zod.ZodTypeAny, {
6213
+ name: string;
6214
+ policies: {
6215
+ kind: string;
6216
+ url: string;
6217
+ }[];
6218
+ url?: string | undefined;
6219
+ }, {
6220
+ name: string;
6221
+ url?: string | undefined;
6222
+ policies?: {
6223
+ kind: string;
6224
+ url: string;
6225
+ }[] | undefined;
6226
+ }>>;
6227
+ highlights: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
6228
+ specs: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
6229
+ productUrl: zod.ZodOptional<zod.ZodString>;
6195
6230
  }, "strip", zod.ZodTypeAny, {
6196
6231
  id: string;
6197
6232
  title: string;
@@ -6294,6 +6329,17 @@ export declare const HOST_MODULES: {
6294
6329
  value: number;
6295
6330
  count: number;
6296
6331
  } | undefined;
6332
+ seller?: {
6333
+ name: string;
6334
+ policies: {
6335
+ kind: string;
6336
+ url: string;
6337
+ }[];
6338
+ url?: string | undefined;
6339
+ } | undefined;
6340
+ highlights?: string[] | undefined;
6341
+ specs?: string[] | undefined;
6342
+ productUrl?: string | undefined;
6297
6343
  }, {
6298
6344
  id: string;
6299
6345
  title: string;
@@ -6396,6 +6442,17 @@ export declare const HOST_MODULES: {
6396
6442
  value: number;
6397
6443
  count: number;
6398
6444
  } | undefined;
6445
+ seller?: {
6446
+ name: string;
6447
+ url?: string | undefined;
6448
+ policies?: {
6449
+ kind: string;
6450
+ url: string;
6451
+ }[] | undefined;
6452
+ } | undefined;
6453
+ highlights?: string[] | undefined;
6454
+ specs?: string[] | undefined;
6455
+ productUrl?: string | undefined;
6399
6456
  }>;
6400
6457
  ReviewSchema: zod.ZodObject<{
6401
6458
  id: zod.ZodString;
@@ -7066,13 +7123,13 @@ export declare const HOST_MODULES: {
7066
7123
  checkoutUrl: zod.ZodString;
7067
7124
  }, "strip", zod.ZodTypeAny, {
7068
7125
  status: "ready";
7069
- checkoutUrl: string;
7070
7126
  seller: string;
7127
+ checkoutUrl: string;
7071
7128
  lineIds: string[];
7072
7129
  }, {
7073
7130
  status: "ready";
7074
- checkoutUrl: string;
7075
7131
  seller: string;
7132
+ checkoutUrl: string;
7076
7133
  lineIds: string[];
7077
7134
  }>, zod.ZodObject<{
7078
7135
  status: zod.ZodLiteral<"failed">;
@@ -7100,13 +7157,13 @@ export declare const HOST_MODULES: {
7100
7157
  checkoutUrl: zod.ZodString;
7101
7158
  }, "strip", zod.ZodTypeAny, {
7102
7159
  status: "ready";
7103
- checkoutUrl: string;
7104
7160
  seller: string;
7161
+ checkoutUrl: string;
7105
7162
  lineIds: string[];
7106
7163
  }, {
7107
7164
  status: "ready";
7108
- checkoutUrl: string;
7109
7165
  seller: string;
7166
+ checkoutUrl: string;
7110
7167
  lineIds: string[];
7111
7168
  }>, zod.ZodObject<{
7112
7169
  status: zod.ZodLiteral<"failed">;
@@ -7129,8 +7186,8 @@ export declare const HOST_MODULES: {
7129
7186
  continueUrl: string;
7130
7187
  stores: ({
7131
7188
  status: "ready";
7132
- checkoutUrl: string;
7133
7189
  seller: string;
7190
+ checkoutUrl: string;
7134
7191
  lineIds: string[];
7135
7192
  } | {
7136
7193
  status: "failed";
@@ -7143,8 +7200,8 @@ export declare const HOST_MODULES: {
7143
7200
  continueUrl: string;
7144
7201
  stores: ({
7145
7202
  status: "ready";
7146
- checkoutUrl: string;
7147
7203
  seller: string;
7204
+ checkoutUrl: string;
7148
7205
  lineIds: string[];
7149
7206
  } | {
7150
7207
  status: "failed";
@@ -7162,13 +7219,13 @@ export declare const HOST_MODULES: {
7162
7219
  checkoutUrl: zod.ZodString;
7163
7220
  }, "strip", zod.ZodTypeAny, {
7164
7221
  status: "ready";
7165
- checkoutUrl: string;
7166
7222
  seller: string;
7223
+ checkoutUrl: string;
7167
7224
  lineIds: string[];
7168
7225
  }, {
7169
7226
  status: "ready";
7170
- checkoutUrl: string;
7171
7227
  seller: string;
7228
+ checkoutUrl: string;
7172
7229
  lineIds: string[];
7173
7230
  }>, zod.ZodObject<{
7174
7231
  status: zod.ZodLiteral<"failed">;
@@ -7191,8 +7248,8 @@ export declare const HOST_MODULES: {
7191
7248
  reason: string;
7192
7249
  stores: ({
7193
7250
  status: "ready";
7194
- checkoutUrl: string;
7195
7251
  seller: string;
7252
+ checkoutUrl: string;
7196
7253
  lineIds: string[];
7197
7254
  } | {
7198
7255
  status: "failed";
@@ -7205,8 +7262,8 @@ export declare const HOST_MODULES: {
7205
7262
  reason: string;
7206
7263
  stores: ({
7207
7264
  status: "ready";
7208
- checkoutUrl: string;
7209
7265
  seller: string;
7266
+ checkoutUrl: string;
7210
7267
  lineIds: string[];
7211
7268
  } | {
7212
7269
  status: "failed";
@@ -7233,13 +7290,13 @@ export declare const HOST_MODULES: {
7233
7290
  checkoutUrl: zod.ZodString;
7234
7291
  }, "strip", zod.ZodTypeAny, {
7235
7292
  status: "ready";
7236
- checkoutUrl: string;
7237
7293
  seller: string;
7294
+ checkoutUrl: string;
7238
7295
  lineIds: string[];
7239
7296
  }, {
7240
7297
  status: "ready";
7241
- checkoutUrl: string;
7242
7298
  seller: string;
7299
+ checkoutUrl: string;
7243
7300
  lineIds: string[];
7244
7301
  }>, zod.ZodObject<{
7245
7302
  status: zod.ZodLiteral<"failed">;
@@ -7262,8 +7319,8 @@ export declare const HOST_MODULES: {
7262
7319
  continueUrl: string;
7263
7320
  stores: ({
7264
7321
  status: "ready";
7265
- checkoutUrl: string;
7266
7322
  seller: string;
7323
+ checkoutUrl: string;
7267
7324
  lineIds: string[];
7268
7325
  } | {
7269
7326
  status: "failed";
@@ -7276,8 +7333,8 @@ export declare const HOST_MODULES: {
7276
7333
  continueUrl: string;
7277
7334
  stores: ({
7278
7335
  status: "ready";
7279
- checkoutUrl: string;
7280
7336
  seller: string;
7337
+ checkoutUrl: string;
7281
7338
  lineIds: string[];
7282
7339
  } | {
7283
7340
  status: "failed";
@@ -7295,13 +7352,13 @@ export declare const HOST_MODULES: {
7295
7352
  checkoutUrl: zod.ZodString;
7296
7353
  }, "strip", zod.ZodTypeAny, {
7297
7354
  status: "ready";
7298
- checkoutUrl: string;
7299
7355
  seller: string;
7356
+ checkoutUrl: string;
7300
7357
  lineIds: string[];
7301
7358
  }, {
7302
7359
  status: "ready";
7303
- checkoutUrl: string;
7304
7360
  seller: string;
7361
+ checkoutUrl: string;
7305
7362
  lineIds: string[];
7306
7363
  }>, zod.ZodObject<{
7307
7364
  status: zod.ZodLiteral<"failed">;
@@ -7324,8 +7381,8 @@ export declare const HOST_MODULES: {
7324
7381
  reason: string;
7325
7382
  stores: ({
7326
7383
  status: "ready";
7327
- checkoutUrl: string;
7328
7384
  seller: string;
7385
+ checkoutUrl: string;
7329
7386
  lineIds: string[];
7330
7387
  } | {
7331
7388
  status: "failed";
@@ -7338,8 +7395,8 @@ export declare const HOST_MODULES: {
7338
7395
  reason: string;
7339
7396
  stores: ({
7340
7397
  status: "ready";
7341
- checkoutUrl: string;
7342
7398
  seller: string;
7399
+ checkoutUrl: string;
7343
7400
  lineIds: string[];
7344
7401
  } | {
7345
7402
  status: "failed";
@@ -7355,8 +7412,8 @@ export declare const HOST_MODULES: {
7355
7412
  continueUrl: string;
7356
7413
  stores: ({
7357
7414
  status: "ready";
7358
- checkoutUrl: string;
7359
7415
  seller: string;
7416
+ checkoutUrl: string;
7360
7417
  lineIds: string[];
7361
7418
  } | {
7362
7419
  status: "failed";
@@ -7369,8 +7426,8 @@ export declare const HOST_MODULES: {
7369
7426
  reason: string;
7370
7427
  stores: ({
7371
7428
  status: "ready";
7372
- checkoutUrl: string;
7373
7429
  seller: string;
7430
+ checkoutUrl: string;
7374
7431
  lineIds: string[];
7375
7432
  } | {
7376
7433
  status: "failed";
@@ -7386,8 +7443,8 @@ export declare const HOST_MODULES: {
7386
7443
  continueUrl: string;
7387
7444
  stores: ({
7388
7445
  status: "ready";
7389
- checkoutUrl: string;
7390
7446
  seller: string;
7447
+ checkoutUrl: string;
7391
7448
  lineIds: string[];
7392
7449
  } | {
7393
7450
  status: "failed";
@@ -7400,8 +7457,8 @@ export declare const HOST_MODULES: {
7400
7457
  reason: string;
7401
7458
  stores: ({
7402
7459
  status: "ready";
7403
- checkoutUrl: string;
7404
7460
  seller: string;
7461
+ checkoutUrl: string;
7405
7462
  lineIds: string[];
7406
7463
  } | {
7407
7464
  status: "failed";
@@ -7561,11 +7618,6 @@ export declare const HOST_MODULES: {
7561
7618
  verified?: boolean | undefined;
7562
7619
  writtenFor?: string | undefined;
7563
7620
  }[];
7564
- aggregate: {
7565
- value: number;
7566
- count: number;
7567
- };
7568
- distribution: number[];
7569
7621
  highlights: {
7570
7622
  date: string;
7571
7623
  content: string;
@@ -7577,6 +7629,11 @@ export declare const HOST_MODULES: {
7577
7629
  writtenFor?: string | undefined;
7578
7630
  highlight?: string | undefined;
7579
7631
  }[];
7632
+ aggregate: {
7633
+ value: number;
7634
+ count: number;
7635
+ };
7636
+ distribution: number[];
7580
7637
  unavailable?: boolean | undefined;
7581
7638
  }, {
7582
7639
  id: string;
@@ -7590,11 +7647,6 @@ export declare const HOST_MODULES: {
7590
7647
  verified?: boolean | undefined;
7591
7648
  writtenFor?: string | undefined;
7592
7649
  }[] | undefined;
7593
- aggregate?: {
7594
- value: number;
7595
- count: number;
7596
- } | undefined;
7597
- distribution?: number[] | undefined;
7598
7650
  highlights?: {
7599
7651
  date: string;
7600
7652
  content: string;
@@ -7606,6 +7658,11 @@ export declare const HOST_MODULES: {
7606
7658
  writtenFor?: string | undefined;
7607
7659
  highlight?: string | undefined;
7608
7660
  }[] | undefined;
7661
+ aggregate?: {
7662
+ value: number;
7663
+ count: number;
7664
+ } | undefined;
7665
+ distribution?: number[] | undefined;
7609
7666
  }>;
7610
7667
  ProductReviewPayloadSchema: zod.ZodObject<Omit<{
7611
7668
  id: zod.ZodString;
@@ -7688,11 +7745,6 @@ export declare const HOST_MODULES: {
7688
7745
  verified?: boolean | undefined;
7689
7746
  writtenFor?: string | undefined;
7690
7747
  }[];
7691
- aggregate: {
7692
- value: number;
7693
- count: number;
7694
- };
7695
- distribution: number[];
7696
7748
  highlights: {
7697
7749
  date: string;
7698
7750
  content: string;
@@ -7704,6 +7756,11 @@ export declare const HOST_MODULES: {
7704
7756
  writtenFor?: string | undefined;
7705
7757
  highlight?: string | undefined;
7706
7758
  }[];
7759
+ aggregate: {
7760
+ value: number;
7761
+ count: number;
7762
+ };
7763
+ distribution: number[];
7707
7764
  unavailable?: boolean | undefined;
7708
7765
  }, {
7709
7766
  unavailable?: boolean | undefined;
@@ -7716,11 +7773,6 @@ export declare const HOST_MODULES: {
7716
7773
  verified?: boolean | undefined;
7717
7774
  writtenFor?: string | undefined;
7718
7775
  }[] | undefined;
7719
- aggregate?: {
7720
- value: number;
7721
- count: number;
7722
- } | undefined;
7723
- distribution?: number[] | undefined;
7724
7776
  highlights?: {
7725
7777
  date: string;
7726
7778
  content: string;
@@ -7732,6 +7784,11 @@ export declare const HOST_MODULES: {
7732
7784
  writtenFor?: string | undefined;
7733
7785
  highlight?: string | undefined;
7734
7786
  }[] | undefined;
7787
+ aggregate?: {
7788
+ value: number;
7789
+ count: number;
7790
+ } | undefined;
7791
+ distribution?: number[] | undefined;
7735
7792
  }>;
7736
7793
  };
7737
7794
  '@fourty/sdk/analytics': typeof sdkAnalytics;
@@ -1,6 +1,8 @@
1
1
  import type { InstallmentOffer, Money, Product } from '../../../../ecommerce/src/index';
2
- export type { AddToCartApi, CartAddHints, CartAddOptions, CartApi, CustomerAccountApi, StoreCheckoutsApi, AskStoreApi, StoreArticlesApi, ProductFieldApi, ProductSectionApi, ShopCheckoutApi, ProductSearchApi, ProductSearchOptions, ProductReviewHighlight, ProductReviewItem, ProductReviewsResult, ProductsQuery, ToggleWishlistApi, WishlistApi, WishlistState, } from './commerce-shapes';
3
- import type { AddToCartApi, CartAddHints, CartApi, CustomerAccountApi, StoreCheckoutsApi, AskStoreApi, StoreArticlesApi, ProductFieldApi, ProductSectionApi, ShopCheckoutApi, ProductSearchApi, ProductSearchOptions, ProductReviewsResult, ProductsQuery, ToggleWishlistApi, WishlistApi } from './commerce-shapes';
2
+ export type { AddToCartApi, CartAddHints, CartAddOptions, CartApi, CustomerAccountApi, ProductFieldApi, ProductSectionApi, ShopCheckoutApi, ProductSearchApi, ProductSearchOptions, ProductReviewHighlight, ProductReviewItem, ProductReviewsResult, ProductsQuery, ToggleWishlistApi, WishlistApi, WishlistState, } from './commerce-shapes';
3
+ export type { StoreCheckoutsApi, AskStoreApi, StoreArticlesApi, SellerProfileApi } from './store-shapes';
4
+ import type { AddToCartApi, CartAddHints, CartApi, CustomerAccountApi, ProductFieldApi, ProductSectionApi, ShopCheckoutApi, ProductSearchApi, ProductSearchOptions, ProductReviewsResult, ProductsQuery, ToggleWishlistApi, WishlistApi } from './commerce-shapes';
5
+ import type { StoreCheckoutsApi, AskStoreApi, StoreArticlesApi, SellerProfileApi } from './store-shapes';
4
6
  /**
5
7
  * FourtyCommerceRuntime — the commerce-hook surface the catalog
6
8
  * consumes. Same dependency-inversion pattern as `FourtyRuntime`: these
@@ -37,6 +39,7 @@ export interface FourtyCommerceRuntime {
37
39
  useAskStore: () => AskStoreApi;
38
40
  /** The selling stores' own articles for an ask. */
39
41
  useStoreArticles: (productIds: ReadonlyArray<string>, topic: string) => StoreArticlesApi;
42
+ useSellerProfile: (productId: string | null) => SellerProfileApi;
40
43
  /** One store product field the brand declared, read on the server. */
41
44
  useProductField: (productId: string | undefined, namespace: string, key: string) => ProductFieldApi;
42
45
  /** One section of a product's store page the brand declared, fetched on the server. */
@@ -98,6 +101,8 @@ export declare function useAskStore(): AskStoreApi;
98
101
  * to `topic`. Not available (empty) on a single store's space or without a
99
102
  * `<CommerceProvider>`. */
100
103
  export declare function useStoreArticles(productIds: ReadonlyArray<string>, topic: string): StoreArticlesApi;
104
+ /** The store selling a product (a many-store space): its mark, its own line, its colour, whether it answers MCP. */
105
+ export declare function useSellerProfile(productId: string | null): SellerProfileApi;
101
106
  /** The whole bag in ONE checkout through Shop, even across several stores
102
107
  * (`combined`), or each store separately with the reason (`separate`). Not
103
108
  * available (and `create` rejects) on a single-store backend, without a bag,
@@ -12,7 +12,7 @@
12
12
  */
13
13
  import type { CartOrigin } from '../../../../spacestation/src/analytics/ecommerce/index';
14
14
  import type { CartLineAttribute } from '../../../../spacestation/src/index';
15
- import type { Cart, OptimisticCartLine, Product, ProductReviewItem, ProductReviewHighlight, StoreAnswer, StoreArticle, StoreCheckout, ShopCheckoutResult } from '../../../../ecommerce/src/index';
15
+ import type { Cart, OptimisticCartLine, Product, ProductReviewItem, ProductReviewHighlight, ShopCheckoutResult } from '../../../../ecommerce/src/index';
16
16
  /**
17
17
  * One review / one intent-matched review. Both are `z.infer` of the review
18
18
  * schemas in `@fourty/ecommerce` — the single source of truth for the shape,
@@ -195,36 +195,6 @@ export interface CustomerAccountApi {
195
195
  * as in a console preview. */
196
196
  available: boolean;
197
197
  }
198
- /** Return shape of `useStoreCheckouts` — a cart that spans several stores,
199
- * checked out one store at a time (`CommerceAdapter.createStoreCheckouts`). */
200
- export interface StoreCheckoutsApi {
201
- /** False where the backend's cart belongs to one store — that cart exits
202
- * through `cart.checkoutUrl` (`useCartView().handleCheckout`) instead. */
203
- available: boolean;
204
- /** Make one checkout per store in the cart. Places no order; each `ready`
205
- * entry's `checkoutUrl` is where the visitor pays for that store's lines. */
206
- create: () => Promise<StoreCheckout[]>;
207
- /** True while `create` is in flight. */
208
- pending: boolean;
209
- }
210
- /** Return shape of `useAskStore` — a question put to the store that sells a
211
- * product (`CommerceAdapter.askStore`). The answer is that store's own
212
- * statement, so a surface credits it to `seller`. */
213
- export interface AskStoreApi {
214
- /** False where the space is the only store — there is no one else to ask. */
215
- available: boolean;
216
- ask: (productId: string, question: string) => Promise<StoreAnswer>;
217
- /** True while `ask` is in flight. */
218
- pending: boolean;
219
- }
220
- /** Return shape of `useStoreArticles`: the articles the selling stores published
221
- * themselves that speak to an ask (their own blogs), best first. */
222
- export interface StoreArticlesApi {
223
- /** False where the space has no store articles to read (a single store's space). */
224
- available: boolean;
225
- articles: StoreArticle[];
226
- isLoading: boolean;
227
- }
228
198
  /** Return shape of `useProductField`: one declared store product field. */
229
199
  export interface ProductFieldApi {
230
200
  /** The field's value as the store holds it; undefined until `ready`, or when the product has no such field. */
@@ -1,7 +1,7 @@
1
1
  import './chip-relevance';
2
- export { useCart, useAddToCart, useWishlist, useToggleWishlist, useProducts, useCollectionByHandle, useProductReviews, useCustomerAccount, useInstallmentOffer, useStoreCheckouts, useAskStore, useStoreArticles, useShopCheckout, useProductSearch, useCommerceRuntime, FourtyCommerceRuntimeProvider, } from './commerce-context';
2
+ export { useCart, useAddToCart, useWishlist, useToggleWishlist, useProducts, useCollectionByHandle, useProductReviews, useCustomerAccount, useInstallmentOffer, useStoreCheckouts, useAskStore, useStoreArticles, useSellerProfile, useShopCheckout, useProductSearch, useCommerceRuntime, FourtyCommerceRuntimeProvider, } from './commerce-context';
3
3
  export { useProductField, useProductSection } from './product-data-hooks';
4
- export type { FourtyCommerceRuntime, CartApi, AddToCartApi, WishlistApi, ToggleWishlistApi, ProductsQuery, ProductReviewItem, ProductReviewHighlight, ProductReviewsResult, CustomerAccountApi, StoreCheckoutsApi, AskStoreApi, StoreArticlesApi, ProductFieldApi, ProductSectionApi, ShopCheckoutApi, ProductSearchApi, ProductSearchOptions, CartAddOptions, CartAddHints, WishlistState, } from './commerce-context';
4
+ export type { FourtyCommerceRuntime, CartApi, AddToCartApi, WishlistApi, ToggleWishlistApi, ProductsQuery, ProductReviewItem, ProductReviewHighlight, ProductReviewsResult, CustomerAccountApi, StoreCheckoutsApi, AskStoreApi, StoreArticlesApi, SellerProfileApi, ProductFieldApi, ProductSectionApi, ShopCheckoutApi, ProductSearchApi, ProductSearchOptions, CartAddOptions, CartAddHints, WishlistState, } from './commerce-context';
5
5
  export { navigateToExternalCommerceUrl } from './checkout/external-navigation';
6
6
  export type { ExternalNavigationResult } from './checkout/external-navigation';
7
7
  export { recordVariantSelection, getVariantSelection, useVariantSelections, } from './variant/variant-selection-store';
@@ -0,0 +1,48 @@
1
+ /**
2
+ * The shapes of the hooks that reach the STORES behind a space over a marketplace of stores (Shopify's catalog): a
3
+ * checkout per store, a question put to a store, the stores' own articles, the profile of the store selling a product.
4
+ * A single store's space answers each with `available: false` — it is the only store.
5
+ *
6
+ * Kept apart from `commerce-shapes.ts` (the one-store contract: cart, wishlist, products) because these grow with the
7
+ * marketplace and that file sits under the enforced 300-line ceiling. Re-exported from `@fourty/sdk/commerce` through
8
+ * `commerce-context.tsx`; nothing imports this path from outside the SDK.
9
+ */
10
+ import type { SellerProfile, StoreAnswer, StoreArticle, StoreCheckout } from '../../../../ecommerce/src/index';
11
+ /** Return shape of `useStoreCheckouts` — a cart that spans several stores,
12
+ * checked out one store at a time (`CommerceAdapter.createStoreCheckouts`). */
13
+ export interface StoreCheckoutsApi {
14
+ /** False where the backend's cart belongs to one store — that cart exits
15
+ * through `cart.checkoutUrl` (`useCartView().handleCheckout`) instead. */
16
+ available: boolean;
17
+ /** Make one checkout per store in the cart. Places no order; each `ready`
18
+ * entry's `checkoutUrl` is where the visitor pays for that store's lines. */
19
+ create: () => Promise<StoreCheckout[]>;
20
+ /** True while `create` is in flight. */
21
+ pending: boolean;
22
+ }
23
+ /** Return shape of `useAskStore` — a question put to the store that sells a
24
+ * product (`CommerceAdapter.askStore`). The answer is that store's own
25
+ * statement, so a surface credits it to `seller`. */
26
+ export interface AskStoreApi {
27
+ /** False where the space is the only store — there is no one else to ask. */
28
+ available: boolean;
29
+ ask: (productId: string, question: string) => Promise<StoreAnswer>;
30
+ /** True while `ask` is in flight. */
31
+ pending: boolean;
32
+ }
33
+ /** Return shape of `useStoreArticles`: the articles the selling stores published
34
+ * themselves that speak to an ask (their own blogs), best first. */
35
+ export interface StoreArticlesApi {
36
+ /** False where the space has no store articles to read (a single store's space). */
37
+ available: boolean;
38
+ articles: StoreArticle[];
39
+ isLoading: boolean;
40
+ }
41
+ /** Return shape of `useSellerProfile`: the store selling a product, as its own site and storefront say. */
42
+ export interface SellerProfileApi {
43
+ /** False where the space has no seller profiles (a single store's space: it IS the seller). */
44
+ available: boolean;
45
+ /** Null until it lands, and when the product or its store cannot be read. */
46
+ profile: SellerProfile | null;
47
+ isLoading: boolean;
48
+ }
package/package.json CHANGED
@@ -26,7 +26,7 @@
26
26
  "react": "^18.3.0 || ^19.0.0",
27
27
  "react-dom": "^18.3.0 || ^19.0.0"
28
28
  },
29
- "version": "0.5.26",
29
+ "version": "0.5.27",
30
30
  "homepage": "https://docs.40rty.ai",
31
31
  "license": "UNLICENSED",
32
32
  "engines": {