@cmssy/core 19.15.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 {
@@ -18,6 +18,8 @@ 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];
21
23
  interface CmssyTaxedAmount {
22
24
  net: number;
23
25
  tax: number;
@@ -32,6 +34,7 @@ interface CmssyBuyerPrice {
32
34
  listed: boolean;
33
35
  basePrice: number;
34
36
  source: CmssyPriceSource;
37
+ listSource: CmssyPriceListSource | null;
35
38
  minQuantity: number;
36
39
  maxQuantity: number;
37
40
  increment: number;
@@ -48,6 +51,7 @@ interface CmssyMemberPriceList {
48
51
  interface BuyerPricesVariables {
49
52
  workspaceId: string;
50
53
  items: CmssyPriceQueryItem[];
54
+ channel?: string | null;
51
55
  }
52
56
  interface BuyerPricesResult {
53
57
  account: {
@@ -58,6 +62,7 @@ declare const BUYER_PRICES_QUERY: CmssyOperation<BuyerPricesResult, BuyerPricesV
58
62
  interface GetBuyerPricesOptions {
59
63
  workspaceId: string;
60
64
  accessToken: string;
65
+ channel?: string | null;
61
66
  fetch?: FetchLike;
62
67
  signal?: AbortSignal;
63
68
  retry?: RetryOption;
@@ -72,6 +77,7 @@ interface CmssyBuyerCatalogPrice {
72
77
  listed: boolean;
73
78
  basePrice: number;
74
79
  source: CmssyPriceSource;
80
+ listSource: CmssyPriceListSource | null;
75
81
  minQuantity: number;
76
82
  maxQuantity: number;
77
83
  increment: number;
@@ -100,6 +106,7 @@ interface BuyerCatalogPricesVariables {
100
106
  sort?: CmssyBuyerCatalogSort | null;
101
107
  limit?: number | null;
102
108
  offset?: number | null;
109
+ channel?: string | null;
103
110
  }
104
111
  interface BuyerCatalogPricesResult {
105
112
  account: {
@@ -107,9 +114,86 @@ interface BuyerCatalogPricesResult {
107
114
  };
108
115
  }
109
116
  declare const BUYER_CATALOG_PRICES_QUERY: CmssyOperation<BuyerCatalogPricesResult, BuyerCatalogPricesVariables>;
110
- type GetBuyerCatalogPricesQuery = Omit<BuyerCatalogPricesVariables, "workspaceId">;
117
+ type GetBuyerCatalogPricesQuery = Omit<BuyerCatalogPricesVariables, "workspaceId" | "channel">;
111
118
  declare function getBuyerCatalogPrices(config: CmssyClientConfig, query: GetBuyerCatalogPricesQuery, options: GetBuyerPricesOptions): Promise<CmssyBuyerCatalogPage>;
112
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
+
113
197
  declare const quantityRuleReasonValues: readonly ["QUANTITY_BELOW_MIN", "QUANTITY_ABOVE_MAX", "QUANTITY_NOT_ON_STEP"];
114
198
  type CmssyQuantityRuleReason = (typeof quantityRuleReasonValues)[number];
115
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"];
@@ -124,6 +208,13 @@ interface CmssyQuantityRuleViolation {
124
208
  }
125
209
  declare function checkoutErrorReason(error: unknown): CmssyCheckoutErrorReason | undefined;
126
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;
127
218
 
128
219
  /**
129
220
  * Whether the content is guaranteed to carry the field. Only `required` says
@@ -293,4 +384,4 @@ declare class CmssyWebhookError extends Error {
293
384
  }
294
385
  declare function verifyCmssyWebhook(options: VerifyCmssyWebhookOptions): Promise<CmssyWebhookEvent>;
295
386
 
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 };
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 {
@@ -18,6 +18,8 @@ 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];
21
23
  interface CmssyTaxedAmount {
22
24
  net: number;
23
25
  tax: number;
@@ -32,6 +34,7 @@ interface CmssyBuyerPrice {
32
34
  listed: boolean;
33
35
  basePrice: number;
34
36
  source: CmssyPriceSource;
37
+ listSource: CmssyPriceListSource | null;
35
38
  minQuantity: number;
36
39
  maxQuantity: number;
37
40
  increment: number;
@@ -48,6 +51,7 @@ interface CmssyMemberPriceList {
48
51
  interface BuyerPricesVariables {
49
52
  workspaceId: string;
50
53
  items: CmssyPriceQueryItem[];
54
+ channel?: string | null;
51
55
  }
52
56
  interface BuyerPricesResult {
53
57
  account: {
@@ -58,6 +62,7 @@ declare const BUYER_PRICES_QUERY: CmssyOperation<BuyerPricesResult, BuyerPricesV
58
62
  interface GetBuyerPricesOptions {
59
63
  workspaceId: string;
60
64
  accessToken: string;
65
+ channel?: string | null;
61
66
  fetch?: FetchLike;
62
67
  signal?: AbortSignal;
63
68
  retry?: RetryOption;
@@ -72,6 +77,7 @@ interface CmssyBuyerCatalogPrice {
72
77
  listed: boolean;
73
78
  basePrice: number;
74
79
  source: CmssyPriceSource;
80
+ listSource: CmssyPriceListSource | null;
75
81
  minQuantity: number;
76
82
  maxQuantity: number;
77
83
  increment: number;
@@ -100,6 +106,7 @@ interface BuyerCatalogPricesVariables {
100
106
  sort?: CmssyBuyerCatalogSort | null;
101
107
  limit?: number | null;
102
108
  offset?: number | null;
109
+ channel?: string | null;
103
110
  }
104
111
  interface BuyerCatalogPricesResult {
105
112
  account: {
@@ -107,9 +114,86 @@ interface BuyerCatalogPricesResult {
107
114
  };
108
115
  }
109
116
  declare const BUYER_CATALOG_PRICES_QUERY: CmssyOperation<BuyerCatalogPricesResult, BuyerCatalogPricesVariables>;
110
- type GetBuyerCatalogPricesQuery = Omit<BuyerCatalogPricesVariables, "workspaceId">;
117
+ type GetBuyerCatalogPricesQuery = Omit<BuyerCatalogPricesVariables, "workspaceId" | "channel">;
111
118
  declare function getBuyerCatalogPrices(config: CmssyClientConfig, query: GetBuyerCatalogPricesQuery, options: GetBuyerPricesOptions): Promise<CmssyBuyerCatalogPage>;
112
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
+
113
197
  declare const quantityRuleReasonValues: readonly ["QUANTITY_BELOW_MIN", "QUANTITY_ABOVE_MAX", "QUANTITY_NOT_ON_STEP"];
114
198
  type CmssyQuantityRuleReason = (typeof quantityRuleReasonValues)[number];
115
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"];
@@ -124,6 +208,13 @@ interface CmssyQuantityRuleViolation {
124
208
  }
125
209
  declare function checkoutErrorReason(error: unknown): CmssyCheckoutErrorReason | undefined;
126
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;
127
218
 
128
219
  /**
129
220
  * Whether the content is guaranteed to carry the field. Only `required` says
@@ -293,4 +384,4 @@ declare class CmssyWebhookError extends Error {
293
384
  }
294
385
  declare function verifyCmssyWebhook(options: VerifyCmssyWebhookOptions): Promise<CmssyWebhookEvent>;
295
386
 
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 };
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 };