@cmssy/core 19.11.2 → 19.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/dist/index.cjs CHANGED
@@ -225,7 +225,7 @@ function documentText(document2) {
225
225
  }
226
226
 
227
227
  // src/version.ts
228
- var CMSSY_CORE_VERSION = "19.11.2" ;
228
+ var CMSSY_CORE_VERSION = "19.13.0" ;
229
229
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
230
230
 
231
231
  // src/data/http.ts
@@ -582,6 +582,8 @@ var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices($workspaceId: ID!, $i
582
582
  price
583
583
  priceMax
584
584
  listed
585
+ basePrice
586
+ source
585
587
  tiers {
586
588
  minQty
587
589
  price
@@ -624,6 +626,73 @@ async function getBuyerPrices(config, items, options) {
624
626
  );
625
627
  return data.account.prices;
626
628
  }
629
+ var BUYER_CATALOG_PRICES_QUERY = typedOperation(`query BuyerCatalogPrices(
630
+ $workspaceId: ID!
631
+ $modelSlug: String!
632
+ $filter: JSON
633
+ $stockState: String
634
+ $sku: String
635
+ $locale: String
636
+ $currency: String
637
+ $priceMin: Int
638
+ $priceMax: Int
639
+ $sort: BuyerCatalogSort
640
+ $limit: Int
641
+ $offset: Int
642
+ ) {
643
+ account {
644
+ catalogPrices(
645
+ workspaceId: $workspaceId
646
+ modelSlug: $modelSlug
647
+ filter: $filter
648
+ stockState: $stockState
649
+ sku: $sku
650
+ locale: $locale
651
+ currency: $currency
652
+ priceMin: $priceMin
653
+ priceMax: $priceMax
654
+ sort: $sort
655
+ limit: $limit
656
+ offset: $offset
657
+ ) {
658
+ total
659
+ hasMore
660
+ items {
661
+ recordId
662
+ currency
663
+ price
664
+ priceMax
665
+ listed
666
+ basePrice
667
+ source
668
+ }
669
+ }
670
+ }
671
+ }`);
672
+ async function getBuyerCatalogPrices(config, query, options) {
673
+ if (!options.accessToken) {
674
+ throw new Error(
675
+ "cmssy: getBuyerCatalogPrices needs the signed-in member's accessToken - an anonymous visitor reads the catalogue"
676
+ );
677
+ }
678
+ const data = await graphqlRequest(
679
+ config,
680
+ BUYER_CATALOG_PRICES_QUERY,
681
+ { ...query, workspaceId: options.workspaceId },
682
+ {
683
+ public: true,
684
+ fetch: options.fetch,
685
+ signal: options.signal,
686
+ retry: options.retry,
687
+ headers: {
688
+ "x-workspace-id": options.workspaceId,
689
+ authorization: `Bearer ${options.accessToken}`
690
+ }
691
+ },
692
+ "buyer catalogue prices"
693
+ );
694
+ return data.account.catalogPrices;
695
+ }
627
696
 
628
697
  // src/data/checkout-errors.ts
629
698
  var checkoutErrorReasonValues = [
@@ -1275,6 +1344,7 @@ Object.defineProperty(exports, "mediaTypeValues", {
1275
1344
  enumerable: true,
1276
1345
  get: function () { return types.mediaTypeValues; }
1277
1346
  });
1347
+ exports.BUYER_CATALOG_PRICES_QUERY = BUYER_CATALOG_PRICES_QUERY;
1278
1348
  exports.BUYER_PRICES_QUERY = BUYER_PRICES_QUERY;
1279
1349
  exports.CMSSY_BUYER_PRICES_MAX_ITEMS = CMSSY_BUYER_PRICES_MAX_ITEMS;
1280
1350
  exports.CMSSY_EDIT_HEADER = CMSSY_EDIT_HEADER;
@@ -1302,6 +1372,7 @@ exports.createRetryingFetch = createRetryingFetch;
1302
1372
  exports.defineCmssyConfig = defineCmssyConfig;
1303
1373
  exports.defineCmssyLayout = defineCmssyLayout;
1304
1374
  exports.fields = fields;
1375
+ exports.getBuyerCatalogPrices = getBuyerCatalogPrices;
1305
1376
  exports.getBuyerPrices = getBuyerPrices;
1306
1377
  exports.graphqlRequest = graphqlRequest;
1307
1378
  exports.isFormFieldRequired = isFormFieldRequired;
package/dist/index.d.cts CHANGED
@@ -4,7 +4,7 @@ export { b as CMSSY_LOCALE_HEADER, C as CmssyOperationInput, f as CmssyTypedDocu
4
4
  import { F as FetchLike, R as RetryOption } from './content-client-MPHJMucu.cjs';
5
5
  export { C as CMSSY_RATE_LIMIT_WINDOW_MS, e as CMSSY_RETRY_MODES, g as CmssyGraphqlError, h as CmssyGraphqlErrorEntry, i as CmssyRequestError, j as CmssyRetryMode, D as DEFAULT_CMSSY_API_URL, k as FetchLikeResponse, l as FetchPageOptions, m as RetryPolicy, n as createRetryingFetch, o as isTransientRequestError } from './content-client-MPHJMucu.cjs';
6
6
  import * as _cmssy_types from '@cmssy/types';
7
- import { CmssyClientConfig, FieldOptions, TypedField, FieldTypeValueMap, ResolvedMediaValue, PageRef, BlockPropsSchema, InferBlockContent, RelationMode, CmssyModelRecord, ResolvedMedia, MediaType, BlockSchema, LayoutRegion, FieldDefinition, BlockMeta, CmssyFormField, VerifyCmssyWebhookOptions, CmssyWebhookEvent } from '@cmssy/types';
7
+ import { CmssyPriceSource, CmssyClientConfig, FieldOptions, TypedField, FieldTypeValueMap, ResolvedMediaValue, PageRef, BlockPropsSchema, InferBlockContent, RelationMode, CmssyModelRecord, ResolvedMedia, MediaType, BlockSchema, LayoutRegion, FieldDefinition, BlockMeta, CmssyFormField, VerifyCmssyWebhookOptions, CmssyWebhookEvent } from '@cmssy/types';
8
8
  export { API_TOKEN_HEADER_NAME, BlockMeta, BlockPropsSchema, BlockRect, BlockSchema, BuildBlockContextExtra, CLIENT_IP_HEADER_NAME, CmssyBlockAuthContext, CmssyBlockContext, CmssyBlockMember, CmssyBlockPage, CmssyBlockWorkspace, CmssyBranding, CmssyClientConfig, CmssyFormDefinition, CmssyFormField, CmssyFormSettings, CmssyFormSubmitResponse, CmssyLayoutGroup, CmssyLocaleContext, CmssyLocalizedValue, CmssyModelDefinition, CmssyModelRecord, CmssyPageData, CmssyPageMeta, CmssyPageSummary, CmssyRecordList, CmssySiteConfig, CmssyWebhookAccountEvent, CmssyWebhookAccountRequest, CmssyWebhookEvent, CmssyWebhookOrder, CmssyWebhookReturn, FieldCondition, FieldConditionGroup, FieldConditionLogic, FieldControl, FieldDefinition, FieldOptions, FieldType, FileFieldValue, InferBlockContent, LayoutRegion, LayoutRegionId, MediaTransform, MediaType, RawBlock, RawLayoutBlock, ResolvedMedia, SubmitFormInput, TypedField, VerifyCmssyWebhookOptions, evaluateFieldConditionGroup, mediaTypeValues } from '@cmssy/types';
9
9
 
10
10
  declare const CMSSY_BUYER_PRICES_MAX_ITEMS = 100;
@@ -23,6 +23,8 @@ interface CmssyBuyerPrice {
23
23
  price: number;
24
24
  priceMax: number | null;
25
25
  listed: boolean;
26
+ basePrice: number;
27
+ source: CmssyPriceSource;
26
28
  tiers: CmssyPriceTier[];
27
29
  }
28
30
  interface CmssyMemberPriceList {
@@ -46,6 +48,43 @@ interface GetBuyerPricesOptions {
46
48
  retry?: RetryOption;
47
49
  }
48
50
  declare function getBuyerPrices(config: CmssyClientConfig, items: readonly CmssyPriceQueryItem[], options: GetBuyerPricesOptions): Promise<CmssyBuyerPrice[]>;
51
+ type CmssyBuyerCatalogSort = "PRICE_ASC" | "PRICE_DESC";
52
+ interface CmssyBuyerCatalogPrice {
53
+ recordId: string;
54
+ currency: string;
55
+ price: number;
56
+ priceMax: number | null;
57
+ listed: boolean;
58
+ basePrice: number;
59
+ source: CmssyPriceSource;
60
+ }
61
+ interface CmssyBuyerCatalogPage {
62
+ items: CmssyBuyerCatalogPrice[];
63
+ total: number;
64
+ hasMore: boolean;
65
+ }
66
+ interface BuyerCatalogPricesVariables {
67
+ workspaceId: string;
68
+ modelSlug: string;
69
+ filter?: Record<string, unknown> | null;
70
+ stockState?: string | null;
71
+ sku?: string | null;
72
+ locale?: string | null;
73
+ currency?: string | null;
74
+ priceMin?: number | null;
75
+ priceMax?: number | null;
76
+ sort?: CmssyBuyerCatalogSort | null;
77
+ limit?: number | null;
78
+ offset?: number | null;
79
+ }
80
+ interface BuyerCatalogPricesResult {
81
+ account: {
82
+ catalogPrices: CmssyBuyerCatalogPage;
83
+ };
84
+ }
85
+ declare const BUYER_CATALOG_PRICES_QUERY: CmssyOperation<BuyerCatalogPricesResult, BuyerCatalogPricesVariables>;
86
+ type GetBuyerCatalogPricesQuery = Omit<BuyerCatalogPricesVariables, "workspaceId">;
87
+ declare function getBuyerCatalogPrices(config: CmssyClientConfig, query: GetBuyerCatalogPricesQuery, options: GetBuyerPricesOptions): Promise<CmssyBuyerCatalogPage>;
49
88
 
50
89
  declare const checkoutErrorReasonValues: readonly ["CART_REPRICED", "CART_CURRENCY_CHANGED"];
51
90
  type CmssyCheckoutErrorReason = (typeof checkoutErrorReasonValues)[number];
@@ -219,4 +258,4 @@ declare class CmssyWebhookError extends Error {
219
258
  }
220
259
  declare function verifyCmssyWebhook(options: VerifyCmssyWebhookOptions): Promise<CmssyWebhookEvent>;
221
260
 
222
- export { BUYER_PRICES_QUERY, type BlockManifest, type BlockManifestBlock, type BlockManifestSource, type BuyerPricesResult, type BuyerPricesVariables, CMSSY_BUYER_PRICES_MAX_ITEMS, CMSSY_EDIT_HEADER, CMSSY_EDIT_QUERY_PARAM, CMSSY_EDIT_TOKEN_HEADER, CMSSY_SECRET_QUERY_PARAM, type CmssyBuyerPrice, type CmssyCheckoutErrorReason, type CmssyMemberPriceList, CmssyOperation, type CmssyOrderProgress, type CmssyOrderProgressInput, type CmssyPriceQueryItem, type CmssyPriceTier, CmssyWebhookError, type ConditionalFormField, FetchLike, type GetBuyerPricesOptions, type MediaLike, type MintCmssyEditTokenOptions, RetryOption, type VerifyCmssyEditTokenOptions, blocksToMeta, blocksToSchemas, buildBlockManifest, checkoutErrorReason, checkoutErrorReasonValues, fields, getBuyerPrices, isFormFieldRequired, isFormFieldVisible, isVerifiedEditUrl, layoutRegionsToBridge, mediaAlt, mediaDuration, mediaType, mediaUrl, mediaUrls, mintCmssyEditToken, orderProgress, orderProgressValues, propsToSchema, registryToManifestBlocks, verifyCmssyEditToken, verifyCmssyWebhook, visibleFormFields };
261
+ export { BUYER_CATALOG_PRICES_QUERY, BUYER_PRICES_QUERY, type BlockManifest, type BlockManifestBlock, type BlockManifestSource, type BuyerCatalogPricesResult, type BuyerCatalogPricesVariables, type BuyerPricesResult, type BuyerPricesVariables, CMSSY_BUYER_PRICES_MAX_ITEMS, CMSSY_EDIT_HEADER, CMSSY_EDIT_QUERY_PARAM, CMSSY_EDIT_TOKEN_HEADER, CMSSY_SECRET_QUERY_PARAM, type CmssyBuyerCatalogPage, type CmssyBuyerCatalogPrice, type CmssyBuyerCatalogSort, type CmssyBuyerPrice, type CmssyCheckoutErrorReason, type CmssyMemberPriceList, CmssyOperation, type CmssyOrderProgress, type CmssyOrderProgressInput, type CmssyPriceQueryItem, type CmssyPriceTier, CmssyWebhookError, type ConditionalFormField, FetchLike, type GetBuyerCatalogPricesQuery, type GetBuyerPricesOptions, type MediaLike, type MintCmssyEditTokenOptions, RetryOption, type VerifyCmssyEditTokenOptions, blocksToMeta, blocksToSchemas, buildBlockManifest, checkoutErrorReason, checkoutErrorReasonValues, fields, getBuyerCatalogPrices, getBuyerPrices, isFormFieldRequired, isFormFieldVisible, isVerifiedEditUrl, layoutRegionsToBridge, mediaAlt, mediaDuration, mediaType, mediaUrl, mediaUrls, mintCmssyEditToken, orderProgress, orderProgressValues, propsToSchema, registryToManifestBlocks, verifyCmssyEditToken, verifyCmssyWebhook, visibleFormFields };
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ export { b as CMSSY_LOCALE_HEADER, C as CmssyOperationInput, f as CmssyTypedDocu
4
4
  import { F as FetchLike, R as RetryOption } from './content-client-MPHJMucu.js';
5
5
  export { C as CMSSY_RATE_LIMIT_WINDOW_MS, e as CMSSY_RETRY_MODES, g as CmssyGraphqlError, h as CmssyGraphqlErrorEntry, i as CmssyRequestError, j as CmssyRetryMode, D as DEFAULT_CMSSY_API_URL, k as FetchLikeResponse, l as FetchPageOptions, m as RetryPolicy, n as createRetryingFetch, o as isTransientRequestError } from './content-client-MPHJMucu.js';
6
6
  import * as _cmssy_types from '@cmssy/types';
7
- import { CmssyClientConfig, FieldOptions, TypedField, FieldTypeValueMap, ResolvedMediaValue, PageRef, BlockPropsSchema, InferBlockContent, RelationMode, CmssyModelRecord, ResolvedMedia, MediaType, BlockSchema, LayoutRegion, FieldDefinition, BlockMeta, CmssyFormField, VerifyCmssyWebhookOptions, CmssyWebhookEvent } from '@cmssy/types';
7
+ import { CmssyPriceSource, CmssyClientConfig, FieldOptions, TypedField, FieldTypeValueMap, ResolvedMediaValue, PageRef, BlockPropsSchema, InferBlockContent, RelationMode, CmssyModelRecord, ResolvedMedia, MediaType, BlockSchema, LayoutRegion, FieldDefinition, BlockMeta, CmssyFormField, VerifyCmssyWebhookOptions, CmssyWebhookEvent } from '@cmssy/types';
8
8
  export { API_TOKEN_HEADER_NAME, BlockMeta, BlockPropsSchema, BlockRect, BlockSchema, BuildBlockContextExtra, CLIENT_IP_HEADER_NAME, CmssyBlockAuthContext, CmssyBlockContext, CmssyBlockMember, CmssyBlockPage, CmssyBlockWorkspace, CmssyBranding, CmssyClientConfig, CmssyFormDefinition, CmssyFormField, CmssyFormSettings, CmssyFormSubmitResponse, CmssyLayoutGroup, CmssyLocaleContext, CmssyLocalizedValue, CmssyModelDefinition, CmssyModelRecord, CmssyPageData, CmssyPageMeta, CmssyPageSummary, CmssyRecordList, CmssySiteConfig, CmssyWebhookAccountEvent, CmssyWebhookAccountRequest, CmssyWebhookEvent, CmssyWebhookOrder, CmssyWebhookReturn, FieldCondition, FieldConditionGroup, FieldConditionLogic, FieldControl, FieldDefinition, FieldOptions, FieldType, FileFieldValue, InferBlockContent, LayoutRegion, LayoutRegionId, MediaTransform, MediaType, RawBlock, RawLayoutBlock, ResolvedMedia, SubmitFormInput, TypedField, VerifyCmssyWebhookOptions, evaluateFieldConditionGroup, mediaTypeValues } from '@cmssy/types';
9
9
 
10
10
  declare const CMSSY_BUYER_PRICES_MAX_ITEMS = 100;
@@ -23,6 +23,8 @@ interface CmssyBuyerPrice {
23
23
  price: number;
24
24
  priceMax: number | null;
25
25
  listed: boolean;
26
+ basePrice: number;
27
+ source: CmssyPriceSource;
26
28
  tiers: CmssyPriceTier[];
27
29
  }
28
30
  interface CmssyMemberPriceList {
@@ -46,6 +48,43 @@ interface GetBuyerPricesOptions {
46
48
  retry?: RetryOption;
47
49
  }
48
50
  declare function getBuyerPrices(config: CmssyClientConfig, items: readonly CmssyPriceQueryItem[], options: GetBuyerPricesOptions): Promise<CmssyBuyerPrice[]>;
51
+ type CmssyBuyerCatalogSort = "PRICE_ASC" | "PRICE_DESC";
52
+ interface CmssyBuyerCatalogPrice {
53
+ recordId: string;
54
+ currency: string;
55
+ price: number;
56
+ priceMax: number | null;
57
+ listed: boolean;
58
+ basePrice: number;
59
+ source: CmssyPriceSource;
60
+ }
61
+ interface CmssyBuyerCatalogPage {
62
+ items: CmssyBuyerCatalogPrice[];
63
+ total: number;
64
+ hasMore: boolean;
65
+ }
66
+ interface BuyerCatalogPricesVariables {
67
+ workspaceId: string;
68
+ modelSlug: string;
69
+ filter?: Record<string, unknown> | null;
70
+ stockState?: string | null;
71
+ sku?: string | null;
72
+ locale?: string | null;
73
+ currency?: string | null;
74
+ priceMin?: number | null;
75
+ priceMax?: number | null;
76
+ sort?: CmssyBuyerCatalogSort | null;
77
+ limit?: number | null;
78
+ offset?: number | null;
79
+ }
80
+ interface BuyerCatalogPricesResult {
81
+ account: {
82
+ catalogPrices: CmssyBuyerCatalogPage;
83
+ };
84
+ }
85
+ declare const BUYER_CATALOG_PRICES_QUERY: CmssyOperation<BuyerCatalogPricesResult, BuyerCatalogPricesVariables>;
86
+ type GetBuyerCatalogPricesQuery = Omit<BuyerCatalogPricesVariables, "workspaceId">;
87
+ declare function getBuyerCatalogPrices(config: CmssyClientConfig, query: GetBuyerCatalogPricesQuery, options: GetBuyerPricesOptions): Promise<CmssyBuyerCatalogPage>;
49
88
 
50
89
  declare const checkoutErrorReasonValues: readonly ["CART_REPRICED", "CART_CURRENCY_CHANGED"];
51
90
  type CmssyCheckoutErrorReason = (typeof checkoutErrorReasonValues)[number];
@@ -219,4 +258,4 @@ declare class CmssyWebhookError extends Error {
219
258
  }
220
259
  declare function verifyCmssyWebhook(options: VerifyCmssyWebhookOptions): Promise<CmssyWebhookEvent>;
221
260
 
222
- export { BUYER_PRICES_QUERY, type BlockManifest, type BlockManifestBlock, type BlockManifestSource, type BuyerPricesResult, type BuyerPricesVariables, CMSSY_BUYER_PRICES_MAX_ITEMS, CMSSY_EDIT_HEADER, CMSSY_EDIT_QUERY_PARAM, CMSSY_EDIT_TOKEN_HEADER, CMSSY_SECRET_QUERY_PARAM, type CmssyBuyerPrice, type CmssyCheckoutErrorReason, type CmssyMemberPriceList, CmssyOperation, type CmssyOrderProgress, type CmssyOrderProgressInput, type CmssyPriceQueryItem, type CmssyPriceTier, CmssyWebhookError, type ConditionalFormField, FetchLike, type GetBuyerPricesOptions, type MediaLike, type MintCmssyEditTokenOptions, RetryOption, type VerifyCmssyEditTokenOptions, blocksToMeta, blocksToSchemas, buildBlockManifest, checkoutErrorReason, checkoutErrorReasonValues, fields, getBuyerPrices, isFormFieldRequired, isFormFieldVisible, isVerifiedEditUrl, layoutRegionsToBridge, mediaAlt, mediaDuration, mediaType, mediaUrl, mediaUrls, mintCmssyEditToken, orderProgress, orderProgressValues, propsToSchema, registryToManifestBlocks, verifyCmssyEditToken, verifyCmssyWebhook, visibleFormFields };
261
+ export { BUYER_CATALOG_PRICES_QUERY, BUYER_PRICES_QUERY, type BlockManifest, type BlockManifestBlock, type BlockManifestSource, type BuyerCatalogPricesResult, type BuyerCatalogPricesVariables, type BuyerPricesResult, type BuyerPricesVariables, CMSSY_BUYER_PRICES_MAX_ITEMS, CMSSY_EDIT_HEADER, CMSSY_EDIT_QUERY_PARAM, CMSSY_EDIT_TOKEN_HEADER, CMSSY_SECRET_QUERY_PARAM, type CmssyBuyerCatalogPage, type CmssyBuyerCatalogPrice, type CmssyBuyerCatalogSort, type CmssyBuyerPrice, type CmssyCheckoutErrorReason, type CmssyMemberPriceList, CmssyOperation, type CmssyOrderProgress, type CmssyOrderProgressInput, type CmssyPriceQueryItem, type CmssyPriceTier, CmssyWebhookError, type ConditionalFormField, FetchLike, type GetBuyerCatalogPricesQuery, type GetBuyerPricesOptions, type MediaLike, type MintCmssyEditTokenOptions, RetryOption, type VerifyCmssyEditTokenOptions, blocksToMeta, blocksToSchemas, buildBlockManifest, checkoutErrorReason, checkoutErrorReasonValues, fields, getBuyerCatalogPrices, getBuyerPrices, isFormFieldRequired, isFormFieldVisible, isVerifiedEditUrl, layoutRegionsToBridge, mediaAlt, mediaDuration, mediaType, mediaUrl, mediaUrls, mintCmssyEditToken, orderProgress, orderProgressValues, propsToSchema, registryToManifestBlocks, verifyCmssyEditToken, verifyCmssyWebhook, visibleFormFields };
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.11.2" ;
227
+ var CMSSY_CORE_VERSION = "19.13.0" ;
228
228
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
229
229
 
230
230
  // src/data/http.ts
@@ -581,6 +581,8 @@ var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices($workspaceId: ID!, $i
581
581
  price
582
582
  priceMax
583
583
  listed
584
+ basePrice
585
+ source
584
586
  tiers {
585
587
  minQty
586
588
  price
@@ -623,6 +625,73 @@ async function getBuyerPrices(config, items, options) {
623
625
  );
624
626
  return data.account.prices;
625
627
  }
628
+ var BUYER_CATALOG_PRICES_QUERY = typedOperation(`query BuyerCatalogPrices(
629
+ $workspaceId: ID!
630
+ $modelSlug: String!
631
+ $filter: JSON
632
+ $stockState: String
633
+ $sku: String
634
+ $locale: String
635
+ $currency: String
636
+ $priceMin: Int
637
+ $priceMax: Int
638
+ $sort: BuyerCatalogSort
639
+ $limit: Int
640
+ $offset: Int
641
+ ) {
642
+ account {
643
+ catalogPrices(
644
+ workspaceId: $workspaceId
645
+ modelSlug: $modelSlug
646
+ filter: $filter
647
+ stockState: $stockState
648
+ sku: $sku
649
+ locale: $locale
650
+ currency: $currency
651
+ priceMin: $priceMin
652
+ priceMax: $priceMax
653
+ sort: $sort
654
+ limit: $limit
655
+ offset: $offset
656
+ ) {
657
+ total
658
+ hasMore
659
+ items {
660
+ recordId
661
+ currency
662
+ price
663
+ priceMax
664
+ listed
665
+ basePrice
666
+ source
667
+ }
668
+ }
669
+ }
670
+ }`);
671
+ async function getBuyerCatalogPrices(config, query, options) {
672
+ if (!options.accessToken) {
673
+ throw new Error(
674
+ "cmssy: getBuyerCatalogPrices needs the signed-in member's accessToken - an anonymous visitor reads the catalogue"
675
+ );
676
+ }
677
+ const data = await graphqlRequest(
678
+ config,
679
+ BUYER_CATALOG_PRICES_QUERY,
680
+ { ...query, workspaceId: options.workspaceId },
681
+ {
682
+ public: true,
683
+ fetch: options.fetch,
684
+ signal: options.signal,
685
+ retry: options.retry,
686
+ headers: {
687
+ "x-workspace-id": options.workspaceId,
688
+ authorization: `Bearer ${options.accessToken}`
689
+ }
690
+ },
691
+ "buyer catalogue prices"
692
+ );
693
+ return data.account.catalogPrices;
694
+ }
626
695
 
627
696
  // src/data/checkout-errors.ts
628
697
  var checkoutErrorReasonValues = [
@@ -1254,4 +1323,4 @@ async function verifyCmssyWebhook(options) {
1254
1323
  return parsed;
1255
1324
  }
1256
1325
 
1257
- export { 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, getBuyerPrices, graphqlRequest, isFormFieldRequired, isFormFieldVisible, isProtocolCompatible, isTransientRequestError, isVerifiedEditUrl, layoutRegionsToBridge, localizeHref, mediaAlt, mediaDuration, mediaType, mediaUrl, mediaUrls, mintCmssyEditToken, normalizeOrigin, orderProgress, orderProgressValues, parseEditorMessage, postToEditor, propsToSchema, registryToManifestBlocks, resolveCmssyLocale, resolveEditorOrigin, typedOperation, verifyCmssyEditToken, verifyCmssyWebhook, visibleFormFields };
1326
+ 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, 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.11.2" ;
157
+ var CMSSY_CORE_VERSION = "19.13.0" ;
158
158
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
159
159
 
160
160
  // src/data/http.ts
@@ -152,7 +152,7 @@ function documentText(document) {
152
152
  }
153
153
 
154
154
  // src/version.ts
155
- var CMSSY_CORE_VERSION = "19.11.2" ;
155
+ var CMSSY_CORE_VERSION = "19.13.0" ;
156
156
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
157
157
 
158
158
  // src/data/http.ts
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.11.2" ;
157
+ var CMSSY_CORE_VERSION = "19.13.0" ;
158
158
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
159
159
 
160
160
  // src/data/http.ts
@@ -1345,6 +1345,8 @@ var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices($workspaceId: ID!, $i
1345
1345
  price
1346
1346
  priceMax
1347
1347
  listed
1348
+ basePrice
1349
+ source
1348
1350
  tiers {
1349
1351
  minQty
1350
1352
  price
package/dist/internal.js CHANGED
@@ -152,7 +152,7 @@ function documentText(document2) {
152
152
  }
153
153
 
154
154
  // src/version.ts
155
- var CMSSY_CORE_VERSION = "19.11.2" ;
155
+ var CMSSY_CORE_VERSION = "19.13.0" ;
156
156
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
157
157
 
158
158
  // src/data/http.ts
@@ -1343,6 +1343,8 @@ var BUYER_PRICES_QUERY = typedOperation(`query BuyerPrices($workspaceId: ID!, $i
1343
1343
  price
1344
1344
  priceMax
1345
1345
  listed
1346
+ basePrice
1347
+ source
1346
1348
  tiers {
1347
1349
  minQty
1348
1350
  price
@@ -152,7 +152,7 @@ function documentText(document) {
152
152
  }
153
153
 
154
154
  // src/version.ts
155
- var CMSSY_CORE_VERSION = "19.11.2" ;
155
+ var CMSSY_CORE_VERSION = "19.13.0" ;
156
156
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
157
157
 
158
158
  // src/content/content-client.ts
package/dist/preflight.js CHANGED
@@ -150,7 +150,7 @@ function documentText(document) {
150
150
  }
151
151
 
152
152
  // src/version.ts
153
- var CMSSY_CORE_VERSION = "19.11.2" ;
153
+ var CMSSY_CORE_VERSION = "19.13.0" ;
154
154
  var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
155
155
 
156
156
  // src/content/content-client.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmssy/core",
3
- "version": "19.11.2",
3
+ "version": "19.13.0",
4
4
  "description": "Framework-agnostic cmssy gateway: GraphQL client, block/field system, editor protocol. No React, no Next.",
5
5
  "keywords": [
6
6
  "cmssy",