@cmssy/core 19.15.0 → 19.17.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, CmssyTaxTreatmentKind, 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, CmssyTaxTreatmentKind, CmssyWebhookAccountEvent, CmssyWebhookAccountRequest, CmssyWebhookEvent, CmssyWebhookOrder, CmssyWebhookReturn, CmssyWebhookTaxTreatment, FieldCondition, FieldConditionGroup, FieldConditionLogic, FieldControl, FieldDefinition, FieldOptions, FieldType, FileFieldValue, InferBlockContent, LayoutRegion, LayoutRegionId, MediaTransform, MediaType, RawBlock, RawLayoutBlock, ResolvedMedia, SubmitFormInput, TypedField, VerifyCmssyWebhookOptions, evaluateFieldConditionGroup, mediaTypeValues, taxTreatmentKindValues } from '@cmssy/types';
9
9
 
10
10
  declare const CMSSY_BUYER_PRICES_MAX_ITEMS = 100;
11
11
  interface CmssyPriceQueryItem {
@@ -18,6 +18,17 @@ interface CmssyPriceTier {
18
18
  }
19
19
  declare const priceDisplayModeValues: readonly ["gross", "net"];
20
20
  type CmssyPriceDisplayMode = (typeof priceDisplayModeValues)[number];
21
+ declare const priceListSourceValues: readonly ["MEMBER", "COMPANY", "CHANNEL"];
22
+ type CmssyPriceListSource = (typeof priceListSourceValues)[number];
23
+
24
+ interface CmssyTaxTreatment {
25
+ kind: CmssyTaxTreatmentKind;
26
+ legalNote: string | null;
27
+ buyerVatId: string | null;
28
+ buyerVatCountry: string | null;
29
+ sellerCountry: string | null;
30
+ shipToCountry: string | null;
31
+ }
21
32
  interface CmssyTaxedAmount {
22
33
  net: number;
23
34
  tax: number;
@@ -32,12 +43,14 @@ interface CmssyBuyerPrice {
32
43
  listed: boolean;
33
44
  basePrice: number;
34
45
  source: CmssyPriceSource;
46
+ listSource: CmssyPriceListSource | null;
35
47
  minQuantity: number;
36
48
  maxQuantity: number;
37
49
  increment: number;
38
50
  tiers: CmssyPriceTier[];
39
51
  displayMode: CmssyPriceDisplayMode;
40
52
  taxRate: number;
53
+ taxTreatmentKind: CmssyTaxTreatmentKind;
41
54
  priceAmount: CmssyTaxedAmount;
42
55
  priceMaxAmount: CmssyTaxedAmount | null;
43
56
  basePriceAmount: CmssyTaxedAmount;
@@ -48,6 +61,7 @@ interface CmssyMemberPriceList {
48
61
  interface BuyerPricesVariables {
49
62
  workspaceId: string;
50
63
  items: CmssyPriceQueryItem[];
64
+ channel?: string | null;
51
65
  }
52
66
  interface BuyerPricesResult {
53
67
  account: {
@@ -58,6 +72,7 @@ declare const BUYER_PRICES_QUERY: CmssyOperation<BuyerPricesResult, BuyerPricesV
58
72
  interface GetBuyerPricesOptions {
59
73
  workspaceId: string;
60
74
  accessToken: string;
75
+ channel?: string | null;
61
76
  fetch?: FetchLike;
62
77
  signal?: AbortSignal;
63
78
  retry?: RetryOption;
@@ -72,11 +87,13 @@ interface CmssyBuyerCatalogPrice {
72
87
  listed: boolean;
73
88
  basePrice: number;
74
89
  source: CmssyPriceSource;
90
+ listSource: CmssyPriceListSource | null;
75
91
  minQuantity: number;
76
92
  maxQuantity: number;
77
93
  increment: number;
78
94
  displayMode: CmssyPriceDisplayMode;
79
95
  taxRate: number;
96
+ taxTreatmentKind: CmssyTaxTreatmentKind;
80
97
  priceAmount: CmssyTaxedAmount;
81
98
  priceMaxAmount: CmssyTaxedAmount | null;
82
99
  basePriceAmount: CmssyTaxedAmount;
@@ -86,6 +103,7 @@ interface CmssyBuyerCatalogPage {
86
103
  total: number;
87
104
  hasMore: boolean;
88
105
  displayMode: CmssyPriceDisplayMode;
106
+ taxTreatment: CmssyTaxTreatment;
89
107
  }
90
108
  interface BuyerCatalogPricesVariables {
91
109
  workspaceId: string;
@@ -100,6 +118,7 @@ interface BuyerCatalogPricesVariables {
100
118
  sort?: CmssyBuyerCatalogSort | null;
101
119
  limit?: number | null;
102
120
  offset?: number | null;
121
+ channel?: string | null;
103
122
  }
104
123
  interface BuyerCatalogPricesResult {
105
124
  account: {
@@ -107,12 +126,89 @@ interface BuyerCatalogPricesResult {
107
126
  };
108
127
  }
109
128
  declare const BUYER_CATALOG_PRICES_QUERY: CmssyOperation<BuyerCatalogPricesResult, BuyerCatalogPricesVariables>;
110
- type GetBuyerCatalogPricesQuery = Omit<BuyerCatalogPricesVariables, "workspaceId">;
129
+ type GetBuyerCatalogPricesQuery = Omit<BuyerCatalogPricesVariables, "workspaceId" | "channel">;
111
130
  declare function getBuyerCatalogPrices(config: CmssyClientConfig, query: GetBuyerCatalogPricesQuery, options: GetBuyerPricesOptions): Promise<CmssyBuyerCatalogPage>;
112
131
 
132
+ declare const CMSSY_PUBLIC_PRICES_MAX_ITEMS = 50;
133
+ declare const priceWithheldReasonValues: readonly ["MEMBERS_ONLY", "COMPANY_MEMBERS_ONLY"];
134
+ type CmssyPriceWithheldReason = (typeof priceWithheldReasonValues)[number];
135
+ interface CmssyPublicPricedRecordData {
136
+ id: string;
137
+ modelId: string;
138
+ data: Record<string, unknown>;
139
+ status: string | null;
140
+ available: number | null;
141
+ quantityIncrement: number;
142
+ variantCount: number;
143
+ createdAt: string;
144
+ updatedAt: string;
145
+ }
146
+ interface CmssyPublicPricedRecord {
147
+ record: CmssyPublicPricedRecordData;
148
+ price: CmssyBuyerPrice | null;
149
+ }
150
+ interface CmssyPublicPriceResult {
151
+ items: CmssyPublicPricedRecord[];
152
+ displayMode: CmssyPriceDisplayMode;
153
+ priceWithheld: CmssyPriceWithheldReason | null;
154
+ nextChangeAt: string | null;
155
+ }
156
+ interface CmssyPublicCatalogPage extends CmssyPublicPriceResult {
157
+ total: number;
158
+ hasMore: boolean;
159
+ }
160
+ interface PublicPricesVariables {
161
+ workspaceId: string;
162
+ channel: string;
163
+ items: CmssyPriceQueryItem[];
164
+ locale?: string | null;
165
+ }
166
+ interface PublicPricesResult {
167
+ public: {
168
+ pricing: {
169
+ prices: CmssyPublicPriceResult;
170
+ };
171
+ };
172
+ }
173
+ declare const PUBLIC_PRICES_QUERY: CmssyOperation<PublicPricesResult, PublicPricesVariables>;
174
+ interface PublicCatalogPricesVariables {
175
+ workspaceId: string;
176
+ channel: string;
177
+ modelSlug: string;
178
+ filter?: Record<string, unknown> | null;
179
+ stockState?: string | null;
180
+ sku?: string | null;
181
+ locale?: string | null;
182
+ currency?: string | null;
183
+ priceMin?: number | null;
184
+ priceMax?: number | null;
185
+ sort?: CmssyBuyerCatalogSort | null;
186
+ limit?: number | null;
187
+ offset?: number | null;
188
+ }
189
+ interface PublicCatalogPricesResult {
190
+ public: {
191
+ pricing: {
192
+ catalogPrices: CmssyPublicCatalogPage;
193
+ };
194
+ };
195
+ }
196
+ declare const PUBLIC_CATALOG_PRICES_QUERY: CmssyOperation<PublicCatalogPricesResult, PublicCatalogPricesVariables>;
197
+ interface GetPublicPricesOptions {
198
+ workspaceId: string;
199
+ channel?: string;
200
+ locale?: string | null;
201
+ fetch?: FetchLike;
202
+ signal?: AbortSignal;
203
+ retry?: RetryOption;
204
+ }
205
+ declare function getPublicPrices(config: CmssyClientConfig, items: readonly CmssyPriceQueryItem[], options: GetPublicPricesOptions): Promise<CmssyPublicPriceResult>;
206
+ type GetPublicCatalogPricesQuery = Omit<PublicCatalogPricesVariables, "workspaceId" | "channel">;
207
+ declare function getPublicCatalogPrices(config: CmssyClientConfig, query: GetPublicCatalogPricesQuery, options: Omit<GetPublicPricesOptions, "locale">): Promise<CmssyPublicCatalogPage>;
208
+
113
209
  declare const quantityRuleReasonValues: readonly ["QUANTITY_BELOW_MIN", "QUANTITY_ABOVE_MAX", "QUANTITY_NOT_ON_STEP"];
114
210
  type CmssyQuantityRuleReason = (typeof quantityRuleReasonValues)[number];
115
- declare const checkoutErrorReasonValues: readonly ["CART_REPRICED", "CART_CURRENCY_CHANGED", "BUYER_CHANGED", "PRODUCT_NOT_SOLD", "QUANTITY_BELOW_MIN", "QUANTITY_ABOVE_MAX", "QUANTITY_NOT_ON_STEP"];
211
+ declare const checkoutErrorReasonValues: readonly ["CART_REPRICED", "CART_CURRENCY_CHANGED", "BUYER_CHANGED", "PRODUCT_NOT_SOLD", "TAX_TREATMENT_CHANGED", "QUANTITY_BELOW_MIN", "QUANTITY_ABOVE_MAX", "QUANTITY_NOT_ON_STEP"];
116
212
  type CmssyCheckoutErrorReason = (typeof checkoutErrorReasonValues)[number];
117
213
  interface CmssyQuantityRuleViolation {
118
214
  reason: CmssyQuantityRuleReason;
@@ -124,6 +220,13 @@ interface CmssyQuantityRuleViolation {
124
220
  }
125
221
  declare function checkoutErrorReason(error: unknown): CmssyCheckoutErrorReason | undefined;
126
222
  declare function quantityRuleViolation(error: unknown): CmssyQuantityRuleViolation | undefined;
223
+ declare const channelRefusalReasonValues: readonly ["UNKNOWN_CHANNEL", "MEMBERS_ONLY", "COMPANY_MEMBERS_ONLY"];
224
+ type CmssyChannelRefusalReason = (typeof channelRefusalReasonValues)[number];
225
+ interface CmssyChannelRefusal {
226
+ reason: CmssyChannelRefusalReason;
227
+ channel: string;
228
+ }
229
+ declare function channelRefusal(error: unknown): CmssyChannelRefusal | undefined;
127
230
 
128
231
  /**
129
232
  * Whether the content is guaranteed to carry the field. Only `required` says
@@ -293,4 +396,4 @@ declare class CmssyWebhookError extends Error {
293
396
  }
294
397
  declare function verifyCmssyWebhook(options: VerifyCmssyWebhookOptions): Promise<CmssyWebhookEvent>;
295
398
 
296
- 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 CmssyPriceDisplayMode, type CmssyPriceQueryItem, type CmssyPriceTier, type CmssyQuantityRuleReason, type CmssyQuantityRuleViolation, type CmssyTaxedAmount, 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, priceDisplayModeValues, propsToSchema, quantityRuleReasonValues, quantityRuleViolation, registryToManifestBlocks, verifyCmssyEditToken, verifyCmssyWebhook, visibleFormFields };
399
+ 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 CmssyTaxTreatment, 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, CmssyTaxTreatmentKind, 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, CmssyTaxTreatmentKind, CmssyWebhookAccountEvent, CmssyWebhookAccountRequest, CmssyWebhookEvent, CmssyWebhookOrder, CmssyWebhookReturn, CmssyWebhookTaxTreatment, FieldCondition, FieldConditionGroup, FieldConditionLogic, FieldControl, FieldDefinition, FieldOptions, FieldType, FileFieldValue, InferBlockContent, LayoutRegion, LayoutRegionId, MediaTransform, MediaType, RawBlock, RawLayoutBlock, ResolvedMedia, SubmitFormInput, TypedField, VerifyCmssyWebhookOptions, evaluateFieldConditionGroup, mediaTypeValues, taxTreatmentKindValues } from '@cmssy/types';
9
9
 
10
10
  declare const CMSSY_BUYER_PRICES_MAX_ITEMS = 100;
11
11
  interface CmssyPriceQueryItem {
@@ -18,6 +18,17 @@ interface CmssyPriceTier {
18
18
  }
19
19
  declare const priceDisplayModeValues: readonly ["gross", "net"];
20
20
  type CmssyPriceDisplayMode = (typeof priceDisplayModeValues)[number];
21
+ declare const priceListSourceValues: readonly ["MEMBER", "COMPANY", "CHANNEL"];
22
+ type CmssyPriceListSource = (typeof priceListSourceValues)[number];
23
+
24
+ interface CmssyTaxTreatment {
25
+ kind: CmssyTaxTreatmentKind;
26
+ legalNote: string | null;
27
+ buyerVatId: string | null;
28
+ buyerVatCountry: string | null;
29
+ sellerCountry: string | null;
30
+ shipToCountry: string | null;
31
+ }
21
32
  interface CmssyTaxedAmount {
22
33
  net: number;
23
34
  tax: number;
@@ -32,12 +43,14 @@ interface CmssyBuyerPrice {
32
43
  listed: boolean;
33
44
  basePrice: number;
34
45
  source: CmssyPriceSource;
46
+ listSource: CmssyPriceListSource | null;
35
47
  minQuantity: number;
36
48
  maxQuantity: number;
37
49
  increment: number;
38
50
  tiers: CmssyPriceTier[];
39
51
  displayMode: CmssyPriceDisplayMode;
40
52
  taxRate: number;
53
+ taxTreatmentKind: CmssyTaxTreatmentKind;
41
54
  priceAmount: CmssyTaxedAmount;
42
55
  priceMaxAmount: CmssyTaxedAmount | null;
43
56
  basePriceAmount: CmssyTaxedAmount;
@@ -48,6 +61,7 @@ interface CmssyMemberPriceList {
48
61
  interface BuyerPricesVariables {
49
62
  workspaceId: string;
50
63
  items: CmssyPriceQueryItem[];
64
+ channel?: string | null;
51
65
  }
52
66
  interface BuyerPricesResult {
53
67
  account: {
@@ -58,6 +72,7 @@ declare const BUYER_PRICES_QUERY: CmssyOperation<BuyerPricesResult, BuyerPricesV
58
72
  interface GetBuyerPricesOptions {
59
73
  workspaceId: string;
60
74
  accessToken: string;
75
+ channel?: string | null;
61
76
  fetch?: FetchLike;
62
77
  signal?: AbortSignal;
63
78
  retry?: RetryOption;
@@ -72,11 +87,13 @@ interface CmssyBuyerCatalogPrice {
72
87
  listed: boolean;
73
88
  basePrice: number;
74
89
  source: CmssyPriceSource;
90
+ listSource: CmssyPriceListSource | null;
75
91
  minQuantity: number;
76
92
  maxQuantity: number;
77
93
  increment: number;
78
94
  displayMode: CmssyPriceDisplayMode;
79
95
  taxRate: number;
96
+ taxTreatmentKind: CmssyTaxTreatmentKind;
80
97
  priceAmount: CmssyTaxedAmount;
81
98
  priceMaxAmount: CmssyTaxedAmount | null;
82
99
  basePriceAmount: CmssyTaxedAmount;
@@ -86,6 +103,7 @@ interface CmssyBuyerCatalogPage {
86
103
  total: number;
87
104
  hasMore: boolean;
88
105
  displayMode: CmssyPriceDisplayMode;
106
+ taxTreatment: CmssyTaxTreatment;
89
107
  }
90
108
  interface BuyerCatalogPricesVariables {
91
109
  workspaceId: string;
@@ -100,6 +118,7 @@ interface BuyerCatalogPricesVariables {
100
118
  sort?: CmssyBuyerCatalogSort | null;
101
119
  limit?: number | null;
102
120
  offset?: number | null;
121
+ channel?: string | null;
103
122
  }
104
123
  interface BuyerCatalogPricesResult {
105
124
  account: {
@@ -107,12 +126,89 @@ interface BuyerCatalogPricesResult {
107
126
  };
108
127
  }
109
128
  declare const BUYER_CATALOG_PRICES_QUERY: CmssyOperation<BuyerCatalogPricesResult, BuyerCatalogPricesVariables>;
110
- type GetBuyerCatalogPricesQuery = Omit<BuyerCatalogPricesVariables, "workspaceId">;
129
+ type GetBuyerCatalogPricesQuery = Omit<BuyerCatalogPricesVariables, "workspaceId" | "channel">;
111
130
  declare function getBuyerCatalogPrices(config: CmssyClientConfig, query: GetBuyerCatalogPricesQuery, options: GetBuyerPricesOptions): Promise<CmssyBuyerCatalogPage>;
112
131
 
132
+ declare const CMSSY_PUBLIC_PRICES_MAX_ITEMS = 50;
133
+ declare const priceWithheldReasonValues: readonly ["MEMBERS_ONLY", "COMPANY_MEMBERS_ONLY"];
134
+ type CmssyPriceWithheldReason = (typeof priceWithheldReasonValues)[number];
135
+ interface CmssyPublicPricedRecordData {
136
+ id: string;
137
+ modelId: string;
138
+ data: Record<string, unknown>;
139
+ status: string | null;
140
+ available: number | null;
141
+ quantityIncrement: number;
142
+ variantCount: number;
143
+ createdAt: string;
144
+ updatedAt: string;
145
+ }
146
+ interface CmssyPublicPricedRecord {
147
+ record: CmssyPublicPricedRecordData;
148
+ price: CmssyBuyerPrice | null;
149
+ }
150
+ interface CmssyPublicPriceResult {
151
+ items: CmssyPublicPricedRecord[];
152
+ displayMode: CmssyPriceDisplayMode;
153
+ priceWithheld: CmssyPriceWithheldReason | null;
154
+ nextChangeAt: string | null;
155
+ }
156
+ interface CmssyPublicCatalogPage extends CmssyPublicPriceResult {
157
+ total: number;
158
+ hasMore: boolean;
159
+ }
160
+ interface PublicPricesVariables {
161
+ workspaceId: string;
162
+ channel: string;
163
+ items: CmssyPriceQueryItem[];
164
+ locale?: string | null;
165
+ }
166
+ interface PublicPricesResult {
167
+ public: {
168
+ pricing: {
169
+ prices: CmssyPublicPriceResult;
170
+ };
171
+ };
172
+ }
173
+ declare const PUBLIC_PRICES_QUERY: CmssyOperation<PublicPricesResult, PublicPricesVariables>;
174
+ interface PublicCatalogPricesVariables {
175
+ workspaceId: string;
176
+ channel: string;
177
+ modelSlug: string;
178
+ filter?: Record<string, unknown> | null;
179
+ stockState?: string | null;
180
+ sku?: string | null;
181
+ locale?: string | null;
182
+ currency?: string | null;
183
+ priceMin?: number | null;
184
+ priceMax?: number | null;
185
+ sort?: CmssyBuyerCatalogSort | null;
186
+ limit?: number | null;
187
+ offset?: number | null;
188
+ }
189
+ interface PublicCatalogPricesResult {
190
+ public: {
191
+ pricing: {
192
+ catalogPrices: CmssyPublicCatalogPage;
193
+ };
194
+ };
195
+ }
196
+ declare const PUBLIC_CATALOG_PRICES_QUERY: CmssyOperation<PublicCatalogPricesResult, PublicCatalogPricesVariables>;
197
+ interface GetPublicPricesOptions {
198
+ workspaceId: string;
199
+ channel?: string;
200
+ locale?: string | null;
201
+ fetch?: FetchLike;
202
+ signal?: AbortSignal;
203
+ retry?: RetryOption;
204
+ }
205
+ declare function getPublicPrices(config: CmssyClientConfig, items: readonly CmssyPriceQueryItem[], options: GetPublicPricesOptions): Promise<CmssyPublicPriceResult>;
206
+ type GetPublicCatalogPricesQuery = Omit<PublicCatalogPricesVariables, "workspaceId" | "channel">;
207
+ declare function getPublicCatalogPrices(config: CmssyClientConfig, query: GetPublicCatalogPricesQuery, options: Omit<GetPublicPricesOptions, "locale">): Promise<CmssyPublicCatalogPage>;
208
+
113
209
  declare const quantityRuleReasonValues: readonly ["QUANTITY_BELOW_MIN", "QUANTITY_ABOVE_MAX", "QUANTITY_NOT_ON_STEP"];
114
210
  type CmssyQuantityRuleReason = (typeof quantityRuleReasonValues)[number];
115
- declare const checkoutErrorReasonValues: readonly ["CART_REPRICED", "CART_CURRENCY_CHANGED", "BUYER_CHANGED", "PRODUCT_NOT_SOLD", "QUANTITY_BELOW_MIN", "QUANTITY_ABOVE_MAX", "QUANTITY_NOT_ON_STEP"];
211
+ declare const checkoutErrorReasonValues: readonly ["CART_REPRICED", "CART_CURRENCY_CHANGED", "BUYER_CHANGED", "PRODUCT_NOT_SOLD", "TAX_TREATMENT_CHANGED", "QUANTITY_BELOW_MIN", "QUANTITY_ABOVE_MAX", "QUANTITY_NOT_ON_STEP"];
116
212
  type CmssyCheckoutErrorReason = (typeof checkoutErrorReasonValues)[number];
117
213
  interface CmssyQuantityRuleViolation {
118
214
  reason: CmssyQuantityRuleReason;
@@ -124,6 +220,13 @@ interface CmssyQuantityRuleViolation {
124
220
  }
125
221
  declare function checkoutErrorReason(error: unknown): CmssyCheckoutErrorReason | undefined;
126
222
  declare function quantityRuleViolation(error: unknown): CmssyQuantityRuleViolation | undefined;
223
+ declare const channelRefusalReasonValues: readonly ["UNKNOWN_CHANNEL", "MEMBERS_ONLY", "COMPANY_MEMBERS_ONLY"];
224
+ type CmssyChannelRefusalReason = (typeof channelRefusalReasonValues)[number];
225
+ interface CmssyChannelRefusal {
226
+ reason: CmssyChannelRefusalReason;
227
+ channel: string;
228
+ }
229
+ declare function channelRefusal(error: unknown): CmssyChannelRefusal | undefined;
127
230
 
128
231
  /**
129
232
  * Whether the content is guaranteed to carry the field. Only `required` says
@@ -293,4 +396,4 @@ declare class CmssyWebhookError extends Error {
293
396
  }
294
397
  declare function verifyCmssyWebhook(options: VerifyCmssyWebhookOptions): Promise<CmssyWebhookEvent>;
295
398
 
296
- 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 CmssyPriceDisplayMode, type CmssyPriceQueryItem, type CmssyPriceTier, type CmssyQuantityRuleReason, type CmssyQuantityRuleViolation, type CmssyTaxedAmount, 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, priceDisplayModeValues, propsToSchema, quantityRuleReasonValues, quantityRuleViolation, registryToManifestBlocks, verifyCmssyEditToken, verifyCmssyWebhook, visibleFormFields };
399
+ 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 CmssyTaxTreatment, 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 };