@cmssy/core 19.14.0 → 19.16.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/dist/index.js CHANGED
@@ -224,7 +224,7 @@ function documentText(document2) {
224
224
  }
225
225
 
226
226
  // src/version.ts
227
- var CMSSY_CORE_VERSION = "19.14.0" ;
227
+ var CMSSY_CORE_VERSION = "19.16.0" ;
228
228
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
229
229
 
230
230
  // src/data/http.ts
@@ -451,13 +451,26 @@ function resolvePublicUrl(config) {
451
451
  // src/data/graphql-request.ts
452
452
  async function graphqlRequest(config, query, variables, options = {}, label = "request") {
453
453
  const url = options.public ? resolvePublicUrl(config) : resolveApiUrl(config.apiUrl);
454
- return postGraphql(url, query, variables, {
455
- fetch: options.fetch,
456
- signal: options.signal,
457
- headers: options.headers,
458
- retry: options.retry,
459
- label
460
- });
454
+ const text = documentText(query);
455
+ return postGraphql(
456
+ url,
457
+ text,
458
+ withConfigChannel(config, text, variables),
459
+ {
460
+ fetch: options.fetch,
461
+ signal: options.signal,
462
+ headers: options.headers,
463
+ retry: options.retry,
464
+ label
465
+ }
466
+ );
467
+ }
468
+ function withConfigChannel(config, document2, variables) {
469
+ const channel = config.channel?.trim();
470
+ if (!channel || !/\$channel\b/.test(document2)) return variables;
471
+ const current = variables ?? {};
472
+ if (current.channel !== void 0) return variables;
473
+ return { ...current, channel };
461
474
  }
462
475
  var SITE_CONFIG_QUERY = typedOperation(`query PublicSiteConfig($workspaceSlug: String!) {
463
476
  public {
@@ -572,9 +585,15 @@ function createCmssyClient(input) {
572
585
 
573
586
  // src/data/buyer-prices.ts
574
587
  var CMSSY_BUYER_PRICES_MAX_ITEMS = 100;
575
- var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices($workspaceId: ID!, $items: [PriceQueryItem!]!) {
588
+ var priceDisplayModeValues = ["gross", "net"];
589
+ var priceListSourceValues = ["MEMBER", "COMPANY", "CHANNEL"];
590
+ var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices(
591
+ $workspaceId: ID!
592
+ $items: [PriceQueryItem!]!
593
+ $channel: String
594
+ ) {
576
595
  account {
577
- prices(workspaceId: $workspaceId, items: $items) {
596
+ prices(workspaceId: $workspaceId, items: $items, channel: $channel) {
578
597
  recordId
579
598
  variantKey
580
599
  currency
@@ -583,6 +602,7 @@ var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices($workspaceId: ID!, $i
583
602
  listed
584
603
  basePrice
585
604
  source
605
+ listSource
586
606
  minQuantity
587
607
  maxQuantity
588
608
  increment
@@ -590,6 +610,23 @@ var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices($workspaceId: ID!, $i
590
610
  minQty
591
611
  price
592
612
  }
613
+ displayMode
614
+ taxRate
615
+ priceAmount {
616
+ net
617
+ tax
618
+ gross
619
+ }
620
+ priceMaxAmount {
621
+ net
622
+ tax
623
+ gross
624
+ }
625
+ basePriceAmount {
626
+ net
627
+ tax
628
+ gross
629
+ }
593
630
  }
594
631
  }
595
632
  }`);
@@ -612,7 +649,8 @@ async function getBuyerPrices(config, items, options) {
612
649
  workspaceId: options.workspaceId,
613
650
  items: items.map(
614
651
  ({ recordId, variantKey }) => variantKey ? { recordId, variantKey } : { recordId }
615
- )
652
+ ),
653
+ ...channelVariable(options.channel)
616
654
  },
617
655
  {
618
656
  public: true,
@@ -641,6 +679,7 @@ var BUYER_CATALOG_PRICES_QUERY = typedOperation(`query BuyerCatalogPrices(
641
679
  $sort: BuyerCatalogSort
642
680
  $limit: Int
643
681
  $offset: Int
682
+ $channel: String
644
683
  ) {
645
684
  account {
646
685
  catalogPrices(
@@ -656,9 +695,11 @@ var BUYER_CATALOG_PRICES_QUERY = typedOperation(`query BuyerCatalogPrices(
656
695
  sort: $sort
657
696
  limit: $limit
658
697
  offset: $offset
698
+ channel: $channel
659
699
  ) {
660
700
  total
661
701
  hasMore
702
+ displayMode
662
703
  items {
663
704
  recordId
664
705
  currency
@@ -667,9 +708,27 @@ var BUYER_CATALOG_PRICES_QUERY = typedOperation(`query BuyerCatalogPrices(
667
708
  listed
668
709
  basePrice
669
710
  source
711
+ listSource
670
712
  minQuantity
671
713
  maxQuantity
672
714
  increment
715
+ displayMode
716
+ taxRate
717
+ priceAmount {
718
+ net
719
+ tax
720
+ gross
721
+ }
722
+ priceMaxAmount {
723
+ net
724
+ tax
725
+ gross
726
+ }
727
+ basePriceAmount {
728
+ net
729
+ tax
730
+ gross
731
+ }
673
732
  }
674
733
  }
675
734
  }
@@ -683,7 +742,11 @@ async function getBuyerCatalogPrices(config, query, options) {
683
742
  const data = await graphqlRequest(
684
743
  config,
685
744
  BUYER_CATALOG_PRICES_QUERY,
686
- { ...query, workspaceId: options.workspaceId },
745
+ {
746
+ ...query,
747
+ workspaceId: options.workspaceId,
748
+ ...channelVariable(options.channel)
749
+ },
687
750
  {
688
751
  public: true,
689
752
  fetch: options.fetch,
@@ -698,6 +761,229 @@ async function getBuyerCatalogPrices(config, query, options) {
698
761
  );
699
762
  return data.account.catalogPrices;
700
763
  }
764
+ function channelVariable(channel) {
765
+ return channel === void 0 ? {} : { channel };
766
+ }
767
+
768
+ // src/data/public-prices.ts
769
+ var CMSSY_PUBLIC_PRICES_MAX_ITEMS = 50;
770
+ var priceWithheldReasonValues = [
771
+ "MEMBERS_ONLY",
772
+ "COMPANY_MEMBERS_ONLY"
773
+ ];
774
+ var PUBLIC_PRICES_QUERY = typedOperation(`query PublicPrices(
775
+ $workspaceId: String!
776
+ $channel: String!
777
+ $items: [PriceQueryItem!]!
778
+ $locale: String
779
+ ) {
780
+ public {
781
+ pricing {
782
+ prices(
783
+ workspaceId: $workspaceId
784
+ channel: $channel
785
+ items: $items
786
+ locale: $locale
787
+ ) {
788
+ displayMode
789
+ priceWithheld
790
+ nextChangeAt
791
+ items {
792
+ record {
793
+ id
794
+ modelId
795
+ data
796
+ status
797
+ available
798
+ quantityIncrement
799
+ variantCount
800
+ createdAt
801
+ updatedAt
802
+ }
803
+ price {
804
+ recordId
805
+ variantKey
806
+ currency
807
+ price
808
+ priceMax
809
+ listed
810
+ basePrice
811
+ source
812
+ listSource
813
+ minQuantity
814
+ maxQuantity
815
+ increment
816
+ tiers {
817
+ minQty
818
+ price
819
+ }
820
+ displayMode
821
+ taxRate
822
+ priceAmount {
823
+ net
824
+ tax
825
+ gross
826
+ }
827
+ priceMaxAmount {
828
+ net
829
+ tax
830
+ gross
831
+ }
832
+ basePriceAmount {
833
+ net
834
+ tax
835
+ gross
836
+ }
837
+ }
838
+ }
839
+ }
840
+ }
841
+ }
842
+ }`);
843
+ var PUBLIC_CATALOG_PRICES_QUERY = typedOperation(`query PublicCatalogPrices(
844
+ $workspaceId: String!
845
+ $channel: String!
846
+ $modelSlug: String!
847
+ $filter: JSON
848
+ $stockState: String
849
+ $sku: String
850
+ $locale: String
851
+ $currency: String
852
+ $priceMin: Int
853
+ $priceMax: Int
854
+ $sort: BuyerCatalogSort
855
+ $limit: Int
856
+ $offset: Int
857
+ ) {
858
+ public {
859
+ pricing {
860
+ catalogPrices(
861
+ workspaceId: $workspaceId
862
+ channel: $channel
863
+ modelSlug: $modelSlug
864
+ filter: $filter
865
+ stockState: $stockState
866
+ sku: $sku
867
+ locale: $locale
868
+ currency: $currency
869
+ priceMin: $priceMin
870
+ priceMax: $priceMax
871
+ sort: $sort
872
+ limit: $limit
873
+ offset: $offset
874
+ ) {
875
+ total
876
+ hasMore
877
+ displayMode
878
+ priceWithheld
879
+ nextChangeAt
880
+ items {
881
+ record {
882
+ id
883
+ modelId
884
+ data
885
+ status
886
+ available
887
+ quantityIncrement
888
+ variantCount
889
+ createdAt
890
+ updatedAt
891
+ }
892
+ price {
893
+ recordId
894
+ variantKey
895
+ currency
896
+ price
897
+ priceMax
898
+ listed
899
+ basePrice
900
+ source
901
+ listSource
902
+ minQuantity
903
+ maxQuantity
904
+ increment
905
+ tiers {
906
+ minQty
907
+ price
908
+ }
909
+ displayMode
910
+ taxRate
911
+ priceAmount {
912
+ net
913
+ tax
914
+ gross
915
+ }
916
+ priceMaxAmount {
917
+ net
918
+ tax
919
+ gross
920
+ }
921
+ basePriceAmount {
922
+ net
923
+ tax
924
+ gross
925
+ }
926
+ }
927
+ }
928
+ }
929
+ }
930
+ }
931
+ }`);
932
+ function requireChannel(config, options, helper) {
933
+ const channel = (options.channel ?? config.channel)?.trim();
934
+ if (!channel) {
935
+ throw new Error(
936
+ `cmssy: ${helper} needs a sales channel - set channel in the client config or pass it in the options`
937
+ );
938
+ }
939
+ return channel;
940
+ }
941
+ async function getPublicPrices(config, items, options) {
942
+ const channel = requireChannel(config, options, "getPublicPrices");
943
+ if (items.length > CMSSY_PUBLIC_PRICES_MAX_ITEMS) {
944
+ throw new Error(
945
+ `cmssy: getPublicPrices takes at most ${CMSSY_PUBLIC_PRICES_MAX_ITEMS} items, got ${items.length} - split the request`
946
+ );
947
+ }
948
+ const data = await graphqlRequest(
949
+ config,
950
+ PUBLIC_PRICES_QUERY,
951
+ {
952
+ workspaceId: options.workspaceId,
953
+ channel,
954
+ items: items.map(
955
+ ({ recordId, variantKey }) => variantKey ? { recordId, variantKey } : { recordId }
956
+ ),
957
+ ...options.locale ? { locale: options.locale } : {}
958
+ },
959
+ {
960
+ public: true,
961
+ fetch: options.fetch,
962
+ signal: options.signal,
963
+ retry: options.retry,
964
+ headers: { "x-workspace-id": options.workspaceId }
965
+ },
966
+ "channel prices"
967
+ );
968
+ return data.public.pricing.prices;
969
+ }
970
+ async function getPublicCatalogPrices(config, query, options) {
971
+ const channel = requireChannel(config, options, "getPublicCatalogPrices");
972
+ const data = await graphqlRequest(
973
+ config,
974
+ PUBLIC_CATALOG_PRICES_QUERY,
975
+ { ...query, workspaceId: options.workspaceId, channel },
976
+ {
977
+ public: true,
978
+ fetch: options.fetch,
979
+ signal: options.signal,
980
+ retry: options.retry,
981
+ headers: { "x-workspace-id": options.workspaceId }
982
+ },
983
+ "channel catalogue prices"
984
+ );
985
+ return data.public.pricing.catalogPrices;
986
+ }
701
987
 
702
988
  // src/data/checkout-errors.ts
703
989
  var quantityRuleReasonValues = [
@@ -708,6 +994,7 @@ var quantityRuleReasonValues = [
708
994
  var checkoutErrorReasonValues = [
709
995
  "CART_REPRICED",
710
996
  "CART_CURRENCY_CHANGED",
997
+ "BUYER_CHANGED",
711
998
  "PRODUCT_NOT_SOLD",
712
999
  ...quantityRuleReasonValues
713
1000
  ];
@@ -747,6 +1034,30 @@ function quantityRuleViolation(error) {
747
1034
  }
748
1035
  return void 0;
749
1036
  }
1037
+ var channelRefusalReasonValues = [
1038
+ "UNKNOWN_CHANNEL",
1039
+ ...priceWithheldReasonValues
1040
+ ];
1041
+ var WITHHELD_REASONS = new Set(
1042
+ priceWithheldReasonValues
1043
+ );
1044
+ function channelRefusal(error) {
1045
+ if (!(error instanceof CmssyGraphqlError)) return void 0;
1046
+ for (const entry of error.errors) {
1047
+ const ext = entry.extensions;
1048
+ if (!ext || typeof ext.channel !== "string") continue;
1049
+ if (typeof ext.reason === "string" && WITHHELD_REASONS.has(ext.reason)) {
1050
+ return {
1051
+ reason: ext.reason,
1052
+ channel: ext.channel
1053
+ };
1054
+ }
1055
+ if (ext.code === "BAD_USER_INPUT" && ext.reason === void 0) {
1056
+ return { reason: "UNKNOWN_CHANNEL", channel: ext.channel };
1057
+ }
1058
+ }
1059
+ return void 0;
1060
+ }
750
1061
 
751
1062
  // src/fields.ts
752
1063
  function build(type, opts) {
@@ -1361,4 +1672,4 @@ async function verifyCmssyWebhook(options) {
1361
1672
  return parsed;
1362
1673
  }
1363
1674
 
1364
- export { BUYER_CATALOG_PRICES_QUERY, BUYER_PRICES_QUERY, CMSSY_BUYER_PRICES_MAX_ITEMS, CMSSY_EDIT_HEADER, CMSSY_EDIT_QUERY_PARAM, CMSSY_EDIT_TOKEN_HEADER, CMSSY_LOCALE_HEADER, CMSSY_RATE_LIMIT_WINDOW_MS, CMSSY_RETRY_MODES, CMSSY_SECRET_QUERY_PARAM, CmssyGraphqlError, CmssyRequestError, CmssyWebhookError, DEFAULT_CMSSY_API_URL, DEFAULT_CMSSY_EDITOR_ORIGINS, PROTOCOL_VERSION, SHORTCUT_ACTIONS, applyCmssyCsp, blocksToMeta, blocksToSchemas, buildBlockManifest, checkoutErrorReason, checkoutErrorReasonValues, createCmssyClient, createRetryingFetch, defineCmssyConfig, defineCmssyLayout, fields, getBuyerCatalogPrices, getBuyerPrices, graphqlRequest, isFormFieldRequired, isFormFieldVisible, isProtocolCompatible, isTransientRequestError, isVerifiedEditUrl, layoutRegionsToBridge, localizeHref, mediaAlt, mediaDuration, mediaType, mediaUrl, mediaUrls, mintCmssyEditToken, normalizeOrigin, orderProgress, orderProgressValues, parseEditorMessage, postToEditor, propsToSchema, quantityRuleReasonValues, quantityRuleViolation, registryToManifestBlocks, resolveCmssyLocale, resolveEditorOrigin, typedOperation, verifyCmssyEditToken, verifyCmssyWebhook, visibleFormFields };
1675
+ export { BUYER_CATALOG_PRICES_QUERY, BUYER_PRICES_QUERY, CMSSY_BUYER_PRICES_MAX_ITEMS, CMSSY_EDIT_HEADER, CMSSY_EDIT_QUERY_PARAM, CMSSY_EDIT_TOKEN_HEADER, CMSSY_LOCALE_HEADER, CMSSY_PUBLIC_PRICES_MAX_ITEMS, CMSSY_RATE_LIMIT_WINDOW_MS, CMSSY_RETRY_MODES, CMSSY_SECRET_QUERY_PARAM, CmssyGraphqlError, CmssyRequestError, CmssyWebhookError, DEFAULT_CMSSY_API_URL, DEFAULT_CMSSY_EDITOR_ORIGINS, PROTOCOL_VERSION, PUBLIC_CATALOG_PRICES_QUERY, PUBLIC_PRICES_QUERY, SHORTCUT_ACTIONS, applyCmssyCsp, blocksToMeta, blocksToSchemas, buildBlockManifest, channelRefusal, channelRefusalReasonValues, checkoutErrorReason, checkoutErrorReasonValues, createCmssyClient, createRetryingFetch, defineCmssyConfig, defineCmssyLayout, fields, getBuyerCatalogPrices, getBuyerPrices, getPublicCatalogPrices, getPublicPrices, graphqlRequest, isFormFieldRequired, isFormFieldVisible, isProtocolCompatible, isTransientRequestError, isVerifiedEditUrl, layoutRegionsToBridge, localizeHref, mediaAlt, mediaDuration, mediaType, mediaUrl, mediaUrls, mintCmssyEditToken, normalizeOrigin, orderProgress, orderProgressValues, parseEditorMessage, postToEditor, priceDisplayModeValues, priceListSourceValues, priceWithheldReasonValues, propsToSchema, quantityRuleReasonValues, quantityRuleViolation, registryToManifestBlocks, resolveCmssyLocale, resolveEditorOrigin, typedOperation, verifyCmssyEditToken, verifyCmssyWebhook, visibleFormFields };
@@ -154,7 +154,7 @@ function documentText(document) {
154
154
  }
155
155
 
156
156
  // src/version.ts
157
- var CMSSY_CORE_VERSION = "19.14.0" ;
157
+ var CMSSY_CORE_VERSION = "19.16.0" ;
158
158
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
159
159
 
160
160
  // src/data/http.ts
@@ -368,13 +368,26 @@ function resolvePublicUrl(config) {
368
368
  // src/data/graphql-request.ts
369
369
  async function graphqlRequest(config, query, variables, options = {}, label = "request") {
370
370
  const url = options.public ? resolvePublicUrl(config) : resolveApiUrl(config.apiUrl);
371
- return postGraphql(url, query, variables, {
372
- fetch: options.fetch,
373
- signal: options.signal,
374
- headers: options.headers,
375
- retry: options.retry,
376
- label
377
- });
371
+ const text = documentText(query);
372
+ return postGraphql(
373
+ url,
374
+ text,
375
+ withConfigChannel(config, text, variables),
376
+ {
377
+ fetch: options.fetch,
378
+ signal: options.signal,
379
+ headers: options.headers,
380
+ retry: options.retry,
381
+ label
382
+ }
383
+ );
384
+ }
385
+ function withConfigChannel(config, document, variables) {
386
+ const channel = config.channel?.trim();
387
+ if (!channel || !/\$channel\b/.test(document)) return variables;
388
+ const current = variables ?? {};
389
+ if (current.channel !== void 0) return variables;
390
+ return { ...current, channel };
378
391
  }
379
392
  var SITE_CONFIG_QUERY = typedOperation(`query PublicSiteConfig($workspaceSlug: String!) {
380
393
  public {
@@ -1,6 +1,6 @@
1
- export { b as CMSSY_LOCALE_HEADER, l as localeForPath, c as localeForPathname, d as localizeHref, r as resolveSiteLocales, s as splitCmssyLocale, e as splitLocaleFromPath } from '../locale-DfW5CAIM.cjs';
1
+ export { b as CMSSY_LOCALE_HEADER, l as localeForPath, c as localeForPathname, d as localizeHref, r as resolveSiteLocales, s as splitCmssyLocale, e as splitLocaleFromPath } from '../locale-CUk6dYTo.cjs';
2
2
  export { CmssySiteLocales } from '@cmssy/types';
3
- import '../content-client-MPHJMucu.cjs';
3
+ import '../content-client-EAeHiBv2.cjs';
4
4
 
5
5
  declare function localizedPath(slug: string, locale: string, defaultLocale: string): string;
6
6
 
@@ -1,6 +1,6 @@
1
- export { b as CMSSY_LOCALE_HEADER, l as localeForPath, c as localeForPathname, d as localizeHref, r as resolveSiteLocales, s as splitCmssyLocale, e as splitLocaleFromPath } from '../locale-B3M-PFm4.js';
1
+ export { b as CMSSY_LOCALE_HEADER, l as localeForPath, c as localeForPathname, d as localizeHref, r as resolveSiteLocales, s as splitCmssyLocale, e as splitLocaleFromPath } from '../locale-Ds2uJX5V.js';
2
2
  export { CmssySiteLocales } from '@cmssy/types';
3
- import '../content-client-MPHJMucu.js';
3
+ import '../content-client-EAeHiBv2.js';
4
4
 
5
5
  declare function localizedPath(slug: string, locale: string, defaultLocale: string): string;
6
6
 
@@ -152,7 +152,7 @@ function documentText(document) {
152
152
  }
153
153
 
154
154
  // src/version.ts
155
- var CMSSY_CORE_VERSION = "19.14.0" ;
155
+ var CMSSY_CORE_VERSION = "19.16.0" ;
156
156
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
157
157
 
158
158
  // src/data/http.ts
@@ -366,13 +366,26 @@ function resolvePublicUrl(config) {
366
366
  // src/data/graphql-request.ts
367
367
  async function graphqlRequest(config, query, variables, options = {}, label = "request") {
368
368
  const url = options.public ? resolvePublicUrl(config) : resolveApiUrl(config.apiUrl);
369
- return postGraphql(url, query, variables, {
370
- fetch: options.fetch,
371
- signal: options.signal,
372
- headers: options.headers,
373
- retry: options.retry,
374
- label
375
- });
369
+ const text = documentText(query);
370
+ return postGraphql(
371
+ url,
372
+ text,
373
+ withConfigChannel(config, text, variables),
374
+ {
375
+ fetch: options.fetch,
376
+ signal: options.signal,
377
+ headers: options.headers,
378
+ retry: options.retry,
379
+ label
380
+ }
381
+ );
382
+ }
383
+ function withConfigChannel(config, document, variables) {
384
+ const channel = config.channel?.trim();
385
+ if (!channel || !/\$channel\b/.test(document)) return variables;
386
+ const current = variables ?? {};
387
+ if (current.channel !== void 0) return variables;
388
+ return { ...current, channel };
376
389
  }
377
390
  var SITE_CONFIG_QUERY = typedOperation(`query PublicSiteConfig($workspaceSlug: String!) {
378
391
  public {
package/dist/internal.cjs CHANGED
@@ -154,7 +154,7 @@ function documentText(document2) {
154
154
  }
155
155
 
156
156
  // src/version.ts
157
- var CMSSY_CORE_VERSION = "19.14.0" ;
157
+ var CMSSY_CORE_VERSION = "19.16.0" ;
158
158
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
159
159
 
160
160
  // src/data/http.ts
@@ -593,13 +593,26 @@ function asBucket(value) {
593
593
  // src/data/graphql-request.ts
594
594
  async function graphqlRequest(config, query, variables, options = {}, label = "request") {
595
595
  const url = options.public ? resolvePublicUrl(config) : resolveApiUrl(config.apiUrl);
596
- return postGraphql(url, query, variables, {
597
- fetch: options.fetch,
598
- signal: options.signal,
599
- headers: options.headers,
600
- retry: options.retry,
601
- label
602
- });
596
+ const text = documentText(query);
597
+ return postGraphql(
598
+ url,
599
+ text,
600
+ withConfigChannel(config, text, variables),
601
+ {
602
+ fetch: options.fetch,
603
+ signal: options.signal,
604
+ headers: options.headers,
605
+ retry: options.retry,
606
+ label
607
+ }
608
+ );
609
+ }
610
+ function withConfigChannel(config, document2, variables) {
611
+ const channel = config.channel?.trim();
612
+ if (!channel || !/\$channel\b/.test(document2)) return variables;
613
+ const current = variables ?? {};
614
+ if (current.channel !== void 0) return variables;
615
+ return { ...current, channel };
603
616
  }
604
617
  var SITE_CONFIG_QUERY = typedOperation(`query PublicSiteConfig($workspaceSlug: String!) {
605
618
  public {
@@ -1336,9 +1349,13 @@ function cmssyCspHeaders(options) {
1336
1349
  }
1337
1350
 
1338
1351
  // src/data/buyer-prices.ts
1339
- var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices($workspaceId: ID!, $items: [PriceQueryItem!]!) {
1352
+ var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices(
1353
+ $workspaceId: ID!
1354
+ $items: [PriceQueryItem!]!
1355
+ $channel: String
1356
+ ) {
1340
1357
  account {
1341
- prices(workspaceId: $workspaceId, items: $items) {
1358
+ prices(workspaceId: $workspaceId, items: $items, channel: $channel) {
1342
1359
  recordId
1343
1360
  variantKey
1344
1361
  currency
@@ -1347,6 +1364,7 @@ var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices($workspaceId: ID!, $i
1347
1364
  listed
1348
1365
  basePrice
1349
1366
  source
1367
+ listSource
1350
1368
  minQuantity
1351
1369
  maxQuantity
1352
1370
  increment
@@ -1354,6 +1372,23 @@ var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices($workspaceId: ID!, $i
1354
1372
  minQty
1355
1373
  price
1356
1374
  }
1375
+ displayMode
1376
+ taxRate
1377
+ priceAmount {
1378
+ net
1379
+ tax
1380
+ gross
1381
+ }
1382
+ priceMaxAmount {
1383
+ net
1384
+ tax
1385
+ gross
1386
+ }
1387
+ basePriceAmount {
1388
+ net
1389
+ tax
1390
+ gross
1391
+ }
1357
1392
  }
1358
1393
  }
1359
1394
  }`);
@@ -1,10 +1,11 @@
1
- export { f as fetchLayouts, a as fetchPage, b as fetchPageById, c as fetchPageMeta, d as fetchPages, r as resolveApiUrl } from './content-client-MPHJMucu.cjs';
2
- import { CmssyFormDefinition, CmssyModelDefinition, CmssyRecordList, CmssySiteConfig, CmssyFormSubmitResponse, SubmitFormInput, BuildBlockContextExtra, CmssyBlockContext, CmssyClientConfig, FieldDefinition, RawBlock, CmssyLayoutGroup } from '@cmssy/types';
1
+ import { C as CmssyClientConfig } from './content-client-EAeHiBv2.cjs';
2
+ export { f as fetchLayouts, a as fetchPage, b as fetchPageById, c as fetchPageMeta, d as fetchPages, r as resolveApiUrl } from './content-client-EAeHiBv2.cjs';
3
+ import { a as CmssyOperation, G as GraphqlRequestOptions } from './locale-CUk6dYTo.cjs';
4
+ export { b as CMSSY_LOCALE_HEADER, l as localeForPath, c as localeForPathname, d as localizeHref, r as resolveSiteLocales, s as splitCmssyLocale, e as splitLocaleFromPath } from './locale-CUk6dYTo.cjs';
5
+ import { CmssyFormDefinition, CmssyModelDefinition, CmssyRecordList, CmssySiteConfig, CmssyFormSubmitResponse, SubmitFormInput, BuildBlockContextExtra, CmssyBlockContext, FieldDefinition, RawBlock, CmssyLayoutGroup } from '@cmssy/types';
3
6
  export { CmssySiteLocales } from '@cmssy/types';
4
- import { a as CmssyOperation, G as GraphqlRequestOptions } from './locale-DfW5CAIM.cjs';
5
- export { b as CMSSY_LOCALE_HEADER, l as localeForPath, c as localeForPathname, d as localizeHref, r as resolveSiteLocales, s as splitCmssyLocale, e as splitLocaleFromPath } from './locale-DfW5CAIM.cjs';
6
- import { Q as QueryScopedOptions } from './csp-B7EAjPSy.cjs';
7
- export { c as cmssyCspHeaders, i as isDevelopment, l as layoutRegionIds, r as resolveInitialTarget, t as toCspOrigin } from './csp-B7EAjPSy.cjs';
7
+ import { Q as QueryScopedOptions } from './csp-CYbG4uan.cjs';
8
+ export { c as cmssyCspHeaders, i as isDevelopment, l as layoutRegionIds, r as resolveInitialTarget, t as toCspOrigin } from './csp-CYbG4uan.cjs';
8
9
  export { localizedPath } from './internal/locale.cjs';
9
10
 
10
11
  interface SiteConfigVariables {
@@ -1,10 +1,11 @@
1
- export { f as fetchLayouts, a as fetchPage, b as fetchPageById, c as fetchPageMeta, d as fetchPages, r as resolveApiUrl } from './content-client-MPHJMucu.js';
2
- import { CmssyFormDefinition, CmssyModelDefinition, CmssyRecordList, CmssySiteConfig, CmssyFormSubmitResponse, SubmitFormInput, BuildBlockContextExtra, CmssyBlockContext, CmssyClientConfig, FieldDefinition, RawBlock, CmssyLayoutGroup } from '@cmssy/types';
1
+ import { C as CmssyClientConfig } from './content-client-EAeHiBv2.js';
2
+ export { f as fetchLayouts, a as fetchPage, b as fetchPageById, c as fetchPageMeta, d as fetchPages, r as resolveApiUrl } from './content-client-EAeHiBv2.js';
3
+ import { a as CmssyOperation, G as GraphqlRequestOptions } from './locale-Ds2uJX5V.js';
4
+ export { b as CMSSY_LOCALE_HEADER, l as localeForPath, c as localeForPathname, d as localizeHref, r as resolveSiteLocales, s as splitCmssyLocale, e as splitLocaleFromPath } from './locale-Ds2uJX5V.js';
5
+ import { CmssyFormDefinition, CmssyModelDefinition, CmssyRecordList, CmssySiteConfig, CmssyFormSubmitResponse, SubmitFormInput, BuildBlockContextExtra, CmssyBlockContext, FieldDefinition, RawBlock, CmssyLayoutGroup } from '@cmssy/types';
3
6
  export { CmssySiteLocales } from '@cmssy/types';
4
- import { a as CmssyOperation, G as GraphqlRequestOptions } from './locale-B3M-PFm4.js';
5
- export { b as CMSSY_LOCALE_HEADER, l as localeForPath, c as localeForPathname, d as localizeHref, r as resolveSiteLocales, s as splitCmssyLocale, e as splitLocaleFromPath } from './locale-B3M-PFm4.js';
6
- import { Q as QueryScopedOptions } from './csp-DKvpTbqW.js';
7
- export { c as cmssyCspHeaders, i as isDevelopment, l as layoutRegionIds, r as resolveInitialTarget, t as toCspOrigin } from './csp-DKvpTbqW.js';
7
+ import { Q as QueryScopedOptions } from './csp-DE59VC7Q.js';
8
+ export { c as cmssyCspHeaders, i as isDevelopment, l as layoutRegionIds, r as resolveInitialTarget, t as toCspOrigin } from './csp-DE59VC7Q.js';
8
9
  export { localizedPath } from './internal/locale.js';
9
10
 
10
11
  interface SiteConfigVariables {