@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.d.cts CHANGED
@@ -1,11 +1,11 @@
1
- export { A as AppToEditorMessage, B as BoundsMessage, C as ClickMessage, a as CmssyClient, b as CmssyConfig, d as CmssyCspOptions, e as CmssyEnvConfig, f as CmssyLayout, g as CmssyRegion, h as CmssyRegionOf, j as CmssyRegionSettings, k as CmssyRegionSettingsOf, D as DEFAULT_CMSSY_EDITOR_ORIGINS, E as EditorToAppMessage, I as InvisibleBlock, m as InvisibleBlocksMessage, P as PROTOCOL_VERSION, n as ParentReadyMessage, o as PatchMessage, p as PostTarget, Q as QueryScopedOptions, R as ReadyMessage, S as SHORTCUT_ACTIONS, q as ScopedVariables, s as SelectMessage, u as ShortcutAction, v as ShortcutMessage, V as VariablesParameter, w as ViewportMessage, x as applyCmssyCsp, y as createCmssyClient, z as defineCmssyConfig, F as defineCmssyLayout, G as isProtocolCompatible, H as normalizeOrigin, J as parseEditorMessage, K as postToEditor, L as resolveEditorOrigin } from './csp-B7EAjPSy.cjs';
2
- import { a as CmssyOperation } from './locale-DfW5CAIM.cjs';
3
- export { b as CMSSY_LOCALE_HEADER, C as CmssyOperationInput, f as CmssyTypedDocument, G as GraphqlRequestOptions, g as graphqlRequest, d as localizeHref, h as resolveCmssyLocale, t as typedOperation } from './locale-DfW5CAIM.cjs';
4
- import { F as FetchLike, R as RetryOption } from './content-client-MPHJMucu.cjs';
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';
1
+ export { A as AppToEditorMessage, B as BoundsMessage, C as ClickMessage, a as CmssyClient, b as CmssyConfig, d as CmssyCspOptions, e as CmssyEnvConfig, f as CmssyLayout, g as CmssyRegion, h as CmssyRegionOf, j as CmssyRegionSettings, k as CmssyRegionSettingsOf, D as DEFAULT_CMSSY_EDITOR_ORIGINS, E as EditorToAppMessage, I as InvisibleBlock, m as InvisibleBlocksMessage, P as PROTOCOL_VERSION, n as ParentReadyMessage, o as PatchMessage, p as PostTarget, Q as QueryScopedOptions, R as ReadyMessage, S as SHORTCUT_ACTIONS, q as ScopedVariables, s as SelectMessage, u as ShortcutAction, v as ShortcutMessage, V as VariablesParameter, w as ViewportMessage, x as applyCmssyCsp, y as createCmssyClient, z as defineCmssyConfig, F as defineCmssyLayout, G as isProtocolCompatible, H as normalizeOrigin, J as parseEditorMessage, K as postToEditor, L as resolveEditorOrigin } from './csp-CYbG4uan.cjs';
2
+ import { a as CmssyOperation } from './locale-CUk6dYTo.cjs';
3
+ export { b as CMSSY_LOCALE_HEADER, C as CmssyOperationInput, f as CmssyTypedDocument, G as GraphqlRequestOptions, g as graphqlRequest, d as localizeHref, h as resolveCmssyLocale, t as typedOperation } from './locale-CUk6dYTo.cjs';
4
+ import { F as FetchLike, R as RetryOption, C as CmssyClientConfig } from './content-client-EAeHiBv2.cjs';
5
+ export { e as CMSSY_RATE_LIMIT_WINDOW_MS, g as CMSSY_RETRY_MODES, h as CmssyGraphqlError, i as CmssyGraphqlErrorEntry, j as CmssyRequestError, k as CmssyRetryMode, D as DEFAULT_CMSSY_API_URL, l as FetchLikeResponse, m as FetchPageOptions, n as RetryPolicy, o as createRetryingFetch, p as isTransientRequestError } from './content-client-EAeHiBv2.cjs';
6
6
  import * as _cmssy_types 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
- 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';
7
+ import { CmssyPriceSource, FieldOptions, TypedField, FieldTypeValueMap, ResolvedMediaValue, PageRef, BlockPropsSchema, InferBlockContent, RelationMode, CmssyModelRecord, ResolvedMedia, MediaType, BlockSchema, LayoutRegion, FieldDefinition, BlockMeta, CmssyFormField, VerifyCmssyWebhookOptions, CmssyWebhookEvent } from '@cmssy/types';
8
+ export { API_TOKEN_HEADER_NAME, BlockMeta, BlockPropsSchema, BlockRect, BlockSchema, BuildBlockContextExtra, CLIENT_IP_HEADER_NAME, CmssyBlockAuthContext, CmssyBlockContext, CmssyBlockMember, CmssyBlockPage, CmssyBlockWorkspace, CmssyBranding, 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;
11
11
  interface CmssyPriceQueryItem {
@@ -16,6 +16,15 @@ interface CmssyPriceTier {
16
16
  minQty: number;
17
17
  price: number;
18
18
  }
19
+ declare const priceDisplayModeValues: readonly ["gross", "net"];
20
+ type CmssyPriceDisplayMode = (typeof priceDisplayModeValues)[number];
21
+ declare const priceListSourceValues: readonly ["MEMBER", "COMPANY", "CHANNEL"];
22
+ type CmssyPriceListSource = (typeof priceListSourceValues)[number];
23
+ interface CmssyTaxedAmount {
24
+ net: number;
25
+ tax: number;
26
+ gross: number;
27
+ }
19
28
  interface CmssyBuyerPrice {
20
29
  recordId: string;
21
30
  variantKey: string | null;
@@ -25,10 +34,16 @@ interface CmssyBuyerPrice {
25
34
  listed: boolean;
26
35
  basePrice: number;
27
36
  source: CmssyPriceSource;
37
+ listSource: CmssyPriceListSource | null;
28
38
  minQuantity: number;
29
39
  maxQuantity: number;
30
40
  increment: number;
31
41
  tiers: CmssyPriceTier[];
42
+ displayMode: CmssyPriceDisplayMode;
43
+ taxRate: number;
44
+ priceAmount: CmssyTaxedAmount;
45
+ priceMaxAmount: CmssyTaxedAmount | null;
46
+ basePriceAmount: CmssyTaxedAmount;
32
47
  }
33
48
  interface CmssyMemberPriceList {
34
49
  name: string;
@@ -36,6 +51,7 @@ interface CmssyMemberPriceList {
36
51
  interface BuyerPricesVariables {
37
52
  workspaceId: string;
38
53
  items: CmssyPriceQueryItem[];
54
+ channel?: string | null;
39
55
  }
40
56
  interface BuyerPricesResult {
41
57
  account: {
@@ -46,6 +62,7 @@ declare const BUYER_PRICES_QUERY: CmssyOperation<BuyerPricesResult, BuyerPricesV
46
62
  interface GetBuyerPricesOptions {
47
63
  workspaceId: string;
48
64
  accessToken: string;
65
+ channel?: string | null;
49
66
  fetch?: FetchLike;
50
67
  signal?: AbortSignal;
51
68
  retry?: RetryOption;
@@ -60,14 +77,21 @@ interface CmssyBuyerCatalogPrice {
60
77
  listed: boolean;
61
78
  basePrice: number;
62
79
  source: CmssyPriceSource;
80
+ listSource: CmssyPriceListSource | null;
63
81
  minQuantity: number;
64
82
  maxQuantity: number;
65
83
  increment: number;
84
+ displayMode: CmssyPriceDisplayMode;
85
+ taxRate: number;
86
+ priceAmount: CmssyTaxedAmount;
87
+ priceMaxAmount: CmssyTaxedAmount | null;
88
+ basePriceAmount: CmssyTaxedAmount;
66
89
  }
67
90
  interface CmssyBuyerCatalogPage {
68
91
  items: CmssyBuyerCatalogPrice[];
69
92
  total: number;
70
93
  hasMore: boolean;
94
+ displayMode: CmssyPriceDisplayMode;
71
95
  }
72
96
  interface BuyerCatalogPricesVariables {
73
97
  workspaceId: string;
@@ -82,6 +106,7 @@ interface BuyerCatalogPricesVariables {
82
106
  sort?: CmssyBuyerCatalogSort | null;
83
107
  limit?: number | null;
84
108
  offset?: number | null;
109
+ channel?: string | null;
85
110
  }
86
111
  interface BuyerCatalogPricesResult {
87
112
  account: {
@@ -89,12 +114,89 @@ interface BuyerCatalogPricesResult {
89
114
  };
90
115
  }
91
116
  declare const BUYER_CATALOG_PRICES_QUERY: CmssyOperation<BuyerCatalogPricesResult, BuyerCatalogPricesVariables>;
92
- type GetBuyerCatalogPricesQuery = Omit<BuyerCatalogPricesVariables, "workspaceId">;
117
+ type GetBuyerCatalogPricesQuery = Omit<BuyerCatalogPricesVariables, "workspaceId" | "channel">;
93
118
  declare function getBuyerCatalogPrices(config: CmssyClientConfig, query: GetBuyerCatalogPricesQuery, options: GetBuyerPricesOptions): Promise<CmssyBuyerCatalogPage>;
94
119
 
120
+ declare const CMSSY_PUBLIC_PRICES_MAX_ITEMS = 50;
121
+ declare const priceWithheldReasonValues: readonly ["MEMBERS_ONLY", "COMPANY_MEMBERS_ONLY"];
122
+ type CmssyPriceWithheldReason = (typeof priceWithheldReasonValues)[number];
123
+ interface CmssyPublicPricedRecordData {
124
+ id: string;
125
+ modelId: string;
126
+ data: Record<string, unknown>;
127
+ status: string | null;
128
+ available: number | null;
129
+ quantityIncrement: number;
130
+ variantCount: number;
131
+ createdAt: string;
132
+ updatedAt: string;
133
+ }
134
+ interface CmssyPublicPricedRecord {
135
+ record: CmssyPublicPricedRecordData;
136
+ price: CmssyBuyerPrice | null;
137
+ }
138
+ interface CmssyPublicPriceResult {
139
+ items: CmssyPublicPricedRecord[];
140
+ displayMode: CmssyPriceDisplayMode;
141
+ priceWithheld: CmssyPriceWithheldReason | null;
142
+ nextChangeAt: string | null;
143
+ }
144
+ interface CmssyPublicCatalogPage extends CmssyPublicPriceResult {
145
+ total: number;
146
+ hasMore: boolean;
147
+ }
148
+ interface PublicPricesVariables {
149
+ workspaceId: string;
150
+ channel: string;
151
+ items: CmssyPriceQueryItem[];
152
+ locale?: string | null;
153
+ }
154
+ interface PublicPricesResult {
155
+ public: {
156
+ pricing: {
157
+ prices: CmssyPublicPriceResult;
158
+ };
159
+ };
160
+ }
161
+ declare const PUBLIC_PRICES_QUERY: CmssyOperation<PublicPricesResult, PublicPricesVariables>;
162
+ interface PublicCatalogPricesVariables {
163
+ workspaceId: string;
164
+ channel: string;
165
+ modelSlug: string;
166
+ filter?: Record<string, unknown> | null;
167
+ stockState?: string | null;
168
+ sku?: string | null;
169
+ locale?: string | null;
170
+ currency?: string | null;
171
+ priceMin?: number | null;
172
+ priceMax?: number | null;
173
+ sort?: CmssyBuyerCatalogSort | null;
174
+ limit?: number | null;
175
+ offset?: number | null;
176
+ }
177
+ interface PublicCatalogPricesResult {
178
+ public: {
179
+ pricing: {
180
+ catalogPrices: CmssyPublicCatalogPage;
181
+ };
182
+ };
183
+ }
184
+ declare const PUBLIC_CATALOG_PRICES_QUERY: CmssyOperation<PublicCatalogPricesResult, PublicCatalogPricesVariables>;
185
+ interface GetPublicPricesOptions {
186
+ workspaceId: string;
187
+ channel?: string;
188
+ locale?: string | null;
189
+ fetch?: FetchLike;
190
+ signal?: AbortSignal;
191
+ retry?: RetryOption;
192
+ }
193
+ declare function getPublicPrices(config: CmssyClientConfig, items: readonly CmssyPriceQueryItem[], options: GetPublicPricesOptions): Promise<CmssyPublicPriceResult>;
194
+ type GetPublicCatalogPricesQuery = Omit<PublicCatalogPricesVariables, "workspaceId" | "channel">;
195
+ declare function getPublicCatalogPrices(config: CmssyClientConfig, query: GetPublicCatalogPricesQuery, options: Omit<GetPublicPricesOptions, "locale">): Promise<CmssyPublicCatalogPage>;
196
+
95
197
  declare const quantityRuleReasonValues: readonly ["QUANTITY_BELOW_MIN", "QUANTITY_ABOVE_MAX", "QUANTITY_NOT_ON_STEP"];
96
198
  type CmssyQuantityRuleReason = (typeof quantityRuleReasonValues)[number];
97
- declare const checkoutErrorReasonValues: readonly ["CART_REPRICED", "CART_CURRENCY_CHANGED", "PRODUCT_NOT_SOLD", "QUANTITY_BELOW_MIN", "QUANTITY_ABOVE_MAX", "QUANTITY_NOT_ON_STEP"];
199
+ declare const checkoutErrorReasonValues: readonly ["CART_REPRICED", "CART_CURRENCY_CHANGED", "BUYER_CHANGED", "PRODUCT_NOT_SOLD", "QUANTITY_BELOW_MIN", "QUANTITY_ABOVE_MAX", "QUANTITY_NOT_ON_STEP"];
98
200
  type CmssyCheckoutErrorReason = (typeof checkoutErrorReasonValues)[number];
99
201
  interface CmssyQuantityRuleViolation {
100
202
  reason: CmssyQuantityRuleReason;
@@ -106,6 +208,13 @@ interface CmssyQuantityRuleViolation {
106
208
  }
107
209
  declare function checkoutErrorReason(error: unknown): CmssyCheckoutErrorReason | undefined;
108
210
  declare function quantityRuleViolation(error: unknown): CmssyQuantityRuleViolation | undefined;
211
+ declare const channelRefusalReasonValues: readonly ["UNKNOWN_CHANNEL", "MEMBERS_ONLY", "COMPANY_MEMBERS_ONLY"];
212
+ type CmssyChannelRefusalReason = (typeof channelRefusalReasonValues)[number];
213
+ interface CmssyChannelRefusal {
214
+ reason: CmssyChannelRefusalReason;
215
+ channel: string;
216
+ }
217
+ declare function channelRefusal(error: unknown): CmssyChannelRefusal | undefined;
109
218
 
110
219
  /**
111
220
  * Whether the content is guaranteed to carry the field. Only `required` says
@@ -275,4 +384,4 @@ declare class CmssyWebhookError extends Error {
275
384
  }
276
385
  declare function verifyCmssyWebhook(options: VerifyCmssyWebhookOptions): Promise<CmssyWebhookEvent>;
277
386
 
278
- 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, type CmssyQuantityRuleReason, type CmssyQuantityRuleViolation, 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, quantityRuleReasonValues, quantityRuleViolation, registryToManifestBlocks, verifyCmssyEditToken, verifyCmssyWebhook, visibleFormFields };
387
+ 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_PUBLIC_PRICES_MAX_ITEMS, CMSSY_SECRET_QUERY_PARAM, type CmssyBuyerCatalogPage, type CmssyBuyerCatalogPrice, type CmssyBuyerCatalogSort, type CmssyBuyerPrice, type CmssyChannelRefusal, type CmssyChannelRefusalReason, type CmssyCheckoutErrorReason, CmssyClientConfig, type CmssyMemberPriceList, CmssyOperation, type CmssyOrderProgress, type CmssyOrderProgressInput, type CmssyPriceDisplayMode, type CmssyPriceListSource, type CmssyPriceQueryItem, type CmssyPriceTier, type CmssyPriceWithheldReason, type CmssyPublicCatalogPage, type CmssyPublicPriceResult, type CmssyPublicPricedRecord, type CmssyPublicPricedRecordData, type CmssyQuantityRuleReason, type CmssyQuantityRuleViolation, type CmssyTaxedAmount, CmssyWebhookError, type ConditionalFormField, FetchLike, type GetBuyerCatalogPricesQuery, type GetBuyerPricesOptions, type GetPublicCatalogPricesQuery, type GetPublicPricesOptions, type MediaLike, type MintCmssyEditTokenOptions, PUBLIC_CATALOG_PRICES_QUERY, PUBLIC_PRICES_QUERY, type PublicCatalogPricesResult, type PublicCatalogPricesVariables, type PublicPricesResult, type PublicPricesVariables, RetryOption, type VerifyCmssyEditTokenOptions, blocksToMeta, blocksToSchemas, buildBlockManifest, channelRefusal, channelRefusalReasonValues, checkoutErrorReason, checkoutErrorReasonValues, fields, getBuyerCatalogPrices, getBuyerPrices, getPublicCatalogPrices, getPublicPrices, isFormFieldRequired, isFormFieldVisible, isVerifiedEditUrl, layoutRegionsToBridge, mediaAlt, mediaDuration, mediaType, mediaUrl, mediaUrls, mintCmssyEditToken, orderProgress, orderProgressValues, priceDisplayModeValues, priceListSourceValues, priceWithheldReasonValues, propsToSchema, quantityRuleReasonValues, quantityRuleViolation, registryToManifestBlocks, verifyCmssyEditToken, verifyCmssyWebhook, visibleFormFields };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- export { A as AppToEditorMessage, B as BoundsMessage, C as ClickMessage, a as CmssyClient, b as CmssyConfig, d as CmssyCspOptions, e as CmssyEnvConfig, f as CmssyLayout, g as CmssyRegion, h as CmssyRegionOf, j as CmssyRegionSettings, k as CmssyRegionSettingsOf, D as DEFAULT_CMSSY_EDITOR_ORIGINS, E as EditorToAppMessage, I as InvisibleBlock, m as InvisibleBlocksMessage, P as PROTOCOL_VERSION, n as ParentReadyMessage, o as PatchMessage, p as PostTarget, Q as QueryScopedOptions, R as ReadyMessage, S as SHORTCUT_ACTIONS, q as ScopedVariables, s as SelectMessage, u as ShortcutAction, v as ShortcutMessage, V as VariablesParameter, w as ViewportMessage, x as applyCmssyCsp, y as createCmssyClient, z as defineCmssyConfig, F as defineCmssyLayout, G as isProtocolCompatible, H as normalizeOrigin, J as parseEditorMessage, K as postToEditor, L as resolveEditorOrigin } from './csp-DKvpTbqW.js';
2
- import { a as CmssyOperation } from './locale-B3M-PFm4.js';
3
- export { b as CMSSY_LOCALE_HEADER, C as CmssyOperationInput, f as CmssyTypedDocument, G as GraphqlRequestOptions, g as graphqlRequest, d as localizeHref, h as resolveCmssyLocale, t as typedOperation } from './locale-B3M-PFm4.js';
4
- import { F as FetchLike, R as RetryOption } from './content-client-MPHJMucu.js';
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';
1
+ export { A as AppToEditorMessage, B as BoundsMessage, C as ClickMessage, a as CmssyClient, b as CmssyConfig, d as CmssyCspOptions, e as CmssyEnvConfig, f as CmssyLayout, g as CmssyRegion, h as CmssyRegionOf, j as CmssyRegionSettings, k as CmssyRegionSettingsOf, D as DEFAULT_CMSSY_EDITOR_ORIGINS, E as EditorToAppMessage, I as InvisibleBlock, m as InvisibleBlocksMessage, P as PROTOCOL_VERSION, n as ParentReadyMessage, o as PatchMessage, p as PostTarget, Q as QueryScopedOptions, R as ReadyMessage, S as SHORTCUT_ACTIONS, q as ScopedVariables, s as SelectMessage, u as ShortcutAction, v as ShortcutMessage, V as VariablesParameter, w as ViewportMessage, x as applyCmssyCsp, y as createCmssyClient, z as defineCmssyConfig, F as defineCmssyLayout, G as isProtocolCompatible, H as normalizeOrigin, J as parseEditorMessage, K as postToEditor, L as resolveEditorOrigin } from './csp-DE59VC7Q.js';
2
+ import { a as CmssyOperation } from './locale-Ds2uJX5V.js';
3
+ export { b as CMSSY_LOCALE_HEADER, C as CmssyOperationInput, f as CmssyTypedDocument, G as GraphqlRequestOptions, g as graphqlRequest, d as localizeHref, h as resolveCmssyLocale, t as typedOperation } from './locale-Ds2uJX5V.js';
4
+ import { F as FetchLike, R as RetryOption, C as CmssyClientConfig } from './content-client-EAeHiBv2.js';
5
+ export { e as CMSSY_RATE_LIMIT_WINDOW_MS, g as CMSSY_RETRY_MODES, h as CmssyGraphqlError, i as CmssyGraphqlErrorEntry, j as CmssyRequestError, k as CmssyRetryMode, D as DEFAULT_CMSSY_API_URL, l as FetchLikeResponse, m as FetchPageOptions, n as RetryPolicy, o as createRetryingFetch, p as isTransientRequestError } from './content-client-EAeHiBv2.js';
6
6
  import * as _cmssy_types 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
- 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';
7
+ import { CmssyPriceSource, FieldOptions, TypedField, FieldTypeValueMap, ResolvedMediaValue, PageRef, BlockPropsSchema, InferBlockContent, RelationMode, CmssyModelRecord, ResolvedMedia, MediaType, BlockSchema, LayoutRegion, FieldDefinition, BlockMeta, CmssyFormField, VerifyCmssyWebhookOptions, CmssyWebhookEvent } from '@cmssy/types';
8
+ export { API_TOKEN_HEADER_NAME, BlockMeta, BlockPropsSchema, BlockRect, BlockSchema, BuildBlockContextExtra, CLIENT_IP_HEADER_NAME, CmssyBlockAuthContext, CmssyBlockContext, CmssyBlockMember, CmssyBlockPage, CmssyBlockWorkspace, CmssyBranding, 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;
11
11
  interface CmssyPriceQueryItem {
@@ -16,6 +16,15 @@ interface CmssyPriceTier {
16
16
  minQty: number;
17
17
  price: number;
18
18
  }
19
+ declare const priceDisplayModeValues: readonly ["gross", "net"];
20
+ type CmssyPriceDisplayMode = (typeof priceDisplayModeValues)[number];
21
+ declare const priceListSourceValues: readonly ["MEMBER", "COMPANY", "CHANNEL"];
22
+ type CmssyPriceListSource = (typeof priceListSourceValues)[number];
23
+ interface CmssyTaxedAmount {
24
+ net: number;
25
+ tax: number;
26
+ gross: number;
27
+ }
19
28
  interface CmssyBuyerPrice {
20
29
  recordId: string;
21
30
  variantKey: string | null;
@@ -25,10 +34,16 @@ interface CmssyBuyerPrice {
25
34
  listed: boolean;
26
35
  basePrice: number;
27
36
  source: CmssyPriceSource;
37
+ listSource: CmssyPriceListSource | null;
28
38
  minQuantity: number;
29
39
  maxQuantity: number;
30
40
  increment: number;
31
41
  tiers: CmssyPriceTier[];
42
+ displayMode: CmssyPriceDisplayMode;
43
+ taxRate: number;
44
+ priceAmount: CmssyTaxedAmount;
45
+ priceMaxAmount: CmssyTaxedAmount | null;
46
+ basePriceAmount: CmssyTaxedAmount;
32
47
  }
33
48
  interface CmssyMemberPriceList {
34
49
  name: string;
@@ -36,6 +51,7 @@ interface CmssyMemberPriceList {
36
51
  interface BuyerPricesVariables {
37
52
  workspaceId: string;
38
53
  items: CmssyPriceQueryItem[];
54
+ channel?: string | null;
39
55
  }
40
56
  interface BuyerPricesResult {
41
57
  account: {
@@ -46,6 +62,7 @@ declare const BUYER_PRICES_QUERY: CmssyOperation<BuyerPricesResult, BuyerPricesV
46
62
  interface GetBuyerPricesOptions {
47
63
  workspaceId: string;
48
64
  accessToken: string;
65
+ channel?: string | null;
49
66
  fetch?: FetchLike;
50
67
  signal?: AbortSignal;
51
68
  retry?: RetryOption;
@@ -60,14 +77,21 @@ interface CmssyBuyerCatalogPrice {
60
77
  listed: boolean;
61
78
  basePrice: number;
62
79
  source: CmssyPriceSource;
80
+ listSource: CmssyPriceListSource | null;
63
81
  minQuantity: number;
64
82
  maxQuantity: number;
65
83
  increment: number;
84
+ displayMode: CmssyPriceDisplayMode;
85
+ taxRate: number;
86
+ priceAmount: CmssyTaxedAmount;
87
+ priceMaxAmount: CmssyTaxedAmount | null;
88
+ basePriceAmount: CmssyTaxedAmount;
66
89
  }
67
90
  interface CmssyBuyerCatalogPage {
68
91
  items: CmssyBuyerCatalogPrice[];
69
92
  total: number;
70
93
  hasMore: boolean;
94
+ displayMode: CmssyPriceDisplayMode;
71
95
  }
72
96
  interface BuyerCatalogPricesVariables {
73
97
  workspaceId: string;
@@ -82,6 +106,7 @@ interface BuyerCatalogPricesVariables {
82
106
  sort?: CmssyBuyerCatalogSort | null;
83
107
  limit?: number | null;
84
108
  offset?: number | null;
109
+ channel?: string | null;
85
110
  }
86
111
  interface BuyerCatalogPricesResult {
87
112
  account: {
@@ -89,12 +114,89 @@ interface BuyerCatalogPricesResult {
89
114
  };
90
115
  }
91
116
  declare const BUYER_CATALOG_PRICES_QUERY: CmssyOperation<BuyerCatalogPricesResult, BuyerCatalogPricesVariables>;
92
- type GetBuyerCatalogPricesQuery = Omit<BuyerCatalogPricesVariables, "workspaceId">;
117
+ type GetBuyerCatalogPricesQuery = Omit<BuyerCatalogPricesVariables, "workspaceId" | "channel">;
93
118
  declare function getBuyerCatalogPrices(config: CmssyClientConfig, query: GetBuyerCatalogPricesQuery, options: GetBuyerPricesOptions): Promise<CmssyBuyerCatalogPage>;
94
119
 
120
+ declare const CMSSY_PUBLIC_PRICES_MAX_ITEMS = 50;
121
+ declare const priceWithheldReasonValues: readonly ["MEMBERS_ONLY", "COMPANY_MEMBERS_ONLY"];
122
+ type CmssyPriceWithheldReason = (typeof priceWithheldReasonValues)[number];
123
+ interface CmssyPublicPricedRecordData {
124
+ id: string;
125
+ modelId: string;
126
+ data: Record<string, unknown>;
127
+ status: string | null;
128
+ available: number | null;
129
+ quantityIncrement: number;
130
+ variantCount: number;
131
+ createdAt: string;
132
+ updatedAt: string;
133
+ }
134
+ interface CmssyPublicPricedRecord {
135
+ record: CmssyPublicPricedRecordData;
136
+ price: CmssyBuyerPrice | null;
137
+ }
138
+ interface CmssyPublicPriceResult {
139
+ items: CmssyPublicPricedRecord[];
140
+ displayMode: CmssyPriceDisplayMode;
141
+ priceWithheld: CmssyPriceWithheldReason | null;
142
+ nextChangeAt: string | null;
143
+ }
144
+ interface CmssyPublicCatalogPage extends CmssyPublicPriceResult {
145
+ total: number;
146
+ hasMore: boolean;
147
+ }
148
+ interface PublicPricesVariables {
149
+ workspaceId: string;
150
+ channel: string;
151
+ items: CmssyPriceQueryItem[];
152
+ locale?: string | null;
153
+ }
154
+ interface PublicPricesResult {
155
+ public: {
156
+ pricing: {
157
+ prices: CmssyPublicPriceResult;
158
+ };
159
+ };
160
+ }
161
+ declare const PUBLIC_PRICES_QUERY: CmssyOperation<PublicPricesResult, PublicPricesVariables>;
162
+ interface PublicCatalogPricesVariables {
163
+ workspaceId: string;
164
+ channel: string;
165
+ modelSlug: string;
166
+ filter?: Record<string, unknown> | null;
167
+ stockState?: string | null;
168
+ sku?: string | null;
169
+ locale?: string | null;
170
+ currency?: string | null;
171
+ priceMin?: number | null;
172
+ priceMax?: number | null;
173
+ sort?: CmssyBuyerCatalogSort | null;
174
+ limit?: number | null;
175
+ offset?: number | null;
176
+ }
177
+ interface PublicCatalogPricesResult {
178
+ public: {
179
+ pricing: {
180
+ catalogPrices: CmssyPublicCatalogPage;
181
+ };
182
+ };
183
+ }
184
+ declare const PUBLIC_CATALOG_PRICES_QUERY: CmssyOperation<PublicCatalogPricesResult, PublicCatalogPricesVariables>;
185
+ interface GetPublicPricesOptions {
186
+ workspaceId: string;
187
+ channel?: string;
188
+ locale?: string | null;
189
+ fetch?: FetchLike;
190
+ signal?: AbortSignal;
191
+ retry?: RetryOption;
192
+ }
193
+ declare function getPublicPrices(config: CmssyClientConfig, items: readonly CmssyPriceQueryItem[], options: GetPublicPricesOptions): Promise<CmssyPublicPriceResult>;
194
+ type GetPublicCatalogPricesQuery = Omit<PublicCatalogPricesVariables, "workspaceId" | "channel">;
195
+ declare function getPublicCatalogPrices(config: CmssyClientConfig, query: GetPublicCatalogPricesQuery, options: Omit<GetPublicPricesOptions, "locale">): Promise<CmssyPublicCatalogPage>;
196
+
95
197
  declare const quantityRuleReasonValues: readonly ["QUANTITY_BELOW_MIN", "QUANTITY_ABOVE_MAX", "QUANTITY_NOT_ON_STEP"];
96
198
  type CmssyQuantityRuleReason = (typeof quantityRuleReasonValues)[number];
97
- declare const checkoutErrorReasonValues: readonly ["CART_REPRICED", "CART_CURRENCY_CHANGED", "PRODUCT_NOT_SOLD", "QUANTITY_BELOW_MIN", "QUANTITY_ABOVE_MAX", "QUANTITY_NOT_ON_STEP"];
199
+ declare const checkoutErrorReasonValues: readonly ["CART_REPRICED", "CART_CURRENCY_CHANGED", "BUYER_CHANGED", "PRODUCT_NOT_SOLD", "QUANTITY_BELOW_MIN", "QUANTITY_ABOVE_MAX", "QUANTITY_NOT_ON_STEP"];
98
200
  type CmssyCheckoutErrorReason = (typeof checkoutErrorReasonValues)[number];
99
201
  interface CmssyQuantityRuleViolation {
100
202
  reason: CmssyQuantityRuleReason;
@@ -106,6 +208,13 @@ interface CmssyQuantityRuleViolation {
106
208
  }
107
209
  declare function checkoutErrorReason(error: unknown): CmssyCheckoutErrorReason | undefined;
108
210
  declare function quantityRuleViolation(error: unknown): CmssyQuantityRuleViolation | undefined;
211
+ declare const channelRefusalReasonValues: readonly ["UNKNOWN_CHANNEL", "MEMBERS_ONLY", "COMPANY_MEMBERS_ONLY"];
212
+ type CmssyChannelRefusalReason = (typeof channelRefusalReasonValues)[number];
213
+ interface CmssyChannelRefusal {
214
+ reason: CmssyChannelRefusalReason;
215
+ channel: string;
216
+ }
217
+ declare function channelRefusal(error: unknown): CmssyChannelRefusal | undefined;
109
218
 
110
219
  /**
111
220
  * Whether the content is guaranteed to carry the field. Only `required` says
@@ -275,4 +384,4 @@ declare class CmssyWebhookError extends Error {
275
384
  }
276
385
  declare function verifyCmssyWebhook(options: VerifyCmssyWebhookOptions): Promise<CmssyWebhookEvent>;
277
386
 
278
- 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, type CmssyQuantityRuleReason, type CmssyQuantityRuleViolation, 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, quantityRuleReasonValues, quantityRuleViolation, registryToManifestBlocks, verifyCmssyEditToken, verifyCmssyWebhook, visibleFormFields };
387
+ 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_PUBLIC_PRICES_MAX_ITEMS, CMSSY_SECRET_QUERY_PARAM, type CmssyBuyerCatalogPage, type CmssyBuyerCatalogPrice, type CmssyBuyerCatalogSort, type CmssyBuyerPrice, type CmssyChannelRefusal, type CmssyChannelRefusalReason, type CmssyCheckoutErrorReason, CmssyClientConfig, type CmssyMemberPriceList, CmssyOperation, type CmssyOrderProgress, type CmssyOrderProgressInput, type CmssyPriceDisplayMode, type CmssyPriceListSource, type CmssyPriceQueryItem, type CmssyPriceTier, type CmssyPriceWithheldReason, type CmssyPublicCatalogPage, type CmssyPublicPriceResult, type CmssyPublicPricedRecord, type CmssyPublicPricedRecordData, type CmssyQuantityRuleReason, type CmssyQuantityRuleViolation, type CmssyTaxedAmount, CmssyWebhookError, type ConditionalFormField, FetchLike, type GetBuyerCatalogPricesQuery, type GetBuyerPricesOptions, type GetPublicCatalogPricesQuery, type GetPublicPricesOptions, type MediaLike, type MintCmssyEditTokenOptions, PUBLIC_CATALOG_PRICES_QUERY, PUBLIC_PRICES_QUERY, type PublicCatalogPricesResult, type PublicCatalogPricesVariables, type PublicPricesResult, type PublicPricesVariables, RetryOption, type VerifyCmssyEditTokenOptions, blocksToMeta, blocksToSchemas, buildBlockManifest, channelRefusal, channelRefusalReasonValues, checkoutErrorReason, checkoutErrorReasonValues, fields, getBuyerCatalogPrices, getBuyerPrices, getPublicCatalogPrices, getPublicPrices, isFormFieldRequired, isFormFieldVisible, isVerifiedEditUrl, layoutRegionsToBridge, mediaAlt, mediaDuration, mediaType, mediaUrl, mediaUrls, mintCmssyEditToken, orderProgress, orderProgressValues, priceDisplayModeValues, priceListSourceValues, priceWithheldReasonValues, propsToSchema, quantityRuleReasonValues, quantityRuleViolation, registryToManifestBlocks, verifyCmssyEditToken, verifyCmssyWebhook, visibleFormFields };