@cmssy/core 19.26.3 → 19.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +36 -1
- package/dist/index.d.cts +20 -3
- package/dist/index.d.ts +20 -3
- package/dist/index.js +34 -2
- package/dist/internal/locale.cjs +1 -1
- package/dist/internal/locale.js +1 -1
- package/dist/internal.cjs +1 -1
- package/dist/internal.js +1 -1
- package/dist/preflight.cjs +1 -1
- package/dist/preflight.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -225,7 +225,7 @@ function documentText(document2) {
|
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
// src/version.ts
|
|
228
|
-
var CMSSY_CORE_VERSION = "19.
|
|
228
|
+
var CMSSY_CORE_VERSION = "19.27.0" ;
|
|
229
229
|
var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
|
|
230
230
|
|
|
231
231
|
// src/data/http.ts
|
|
@@ -1102,6 +1102,38 @@ function channelRefusal(error) {
|
|
|
1102
1102
|
return void 0;
|
|
1103
1103
|
}
|
|
1104
1104
|
|
|
1105
|
+
// src/data/maintenance.ts
|
|
1106
|
+
var MAINTENANCE_QUERY = typedOperation(`query Maintenance {
|
|
1107
|
+
public {
|
|
1108
|
+
maintenance {
|
|
1109
|
+
startsAt
|
|
1110
|
+
endsAt
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
}`);
|
|
1114
|
+
async function getMaintenance(config, options = {}) {
|
|
1115
|
+
const data = await graphqlRequest(
|
|
1116
|
+
config,
|
|
1117
|
+
MAINTENANCE_QUERY,
|
|
1118
|
+
{},
|
|
1119
|
+
{ ...options, public: true },
|
|
1120
|
+
"maintenance query"
|
|
1121
|
+
);
|
|
1122
|
+
return data.public?.maintenance ?? null;
|
|
1123
|
+
}
|
|
1124
|
+
function maintenanceRefusal(error) {
|
|
1125
|
+
if (!(error instanceof CmssyGraphqlError)) return null;
|
|
1126
|
+
for (const entry of error.errors) {
|
|
1127
|
+
const ext = entry.extensions;
|
|
1128
|
+
if (ext?.code !== "MAINTENANCE") continue;
|
|
1129
|
+
return {
|
|
1130
|
+
endsAt: typeof ext.endsAt === "string" ? ext.endsAt : null,
|
|
1131
|
+
retryAfter: typeof ext.retryAfter === "number" ? ext.retryAfter : null
|
|
1132
|
+
};
|
|
1133
|
+
}
|
|
1134
|
+
return null;
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1105
1137
|
// src/fields.ts
|
|
1106
1138
|
function build(type, opts) {
|
|
1107
1139
|
return { type, label: opts.label ?? "", ...opts };
|
|
@@ -1755,6 +1787,7 @@ exports.CmssyRequestError = CmssyRequestError;
|
|
|
1755
1787
|
exports.CmssyWebhookError = CmssyWebhookError;
|
|
1756
1788
|
exports.DEFAULT_CMSSY_API_URL = DEFAULT_CMSSY_API_URL;
|
|
1757
1789
|
exports.DEFAULT_CMSSY_EDITOR_ORIGINS = DEFAULT_CMSSY_EDITOR_ORIGINS;
|
|
1790
|
+
exports.MAINTENANCE_QUERY = MAINTENANCE_QUERY;
|
|
1758
1791
|
exports.PROTOCOL_VERSION = PROTOCOL_VERSION;
|
|
1759
1792
|
exports.PUBLIC_CATALOG_PRICES_QUERY = PUBLIC_CATALOG_PRICES_QUERY;
|
|
1760
1793
|
exports.PUBLIC_PRICES_QUERY = PUBLIC_PRICES_QUERY;
|
|
@@ -1775,6 +1808,7 @@ exports.defineCmssyLayout = defineCmssyLayout;
|
|
|
1775
1808
|
exports.fields = fields;
|
|
1776
1809
|
exports.getBuyerCatalogPrices = getBuyerCatalogPrices;
|
|
1777
1810
|
exports.getBuyerPrices = getBuyerPrices;
|
|
1811
|
+
exports.getMaintenance = getMaintenance;
|
|
1778
1812
|
exports.getPublicCatalogPrices = getPublicCatalogPrices;
|
|
1779
1813
|
exports.getPublicPrices = getPublicPrices;
|
|
1780
1814
|
exports.graphqlRequest = graphqlRequest;
|
|
@@ -1785,6 +1819,7 @@ exports.isTransientRequestError = isTransientRequestError;
|
|
|
1785
1819
|
exports.isVerifiedEditUrl = isVerifiedEditUrl;
|
|
1786
1820
|
exports.layoutRegionsToBridge = layoutRegionsToBridge;
|
|
1787
1821
|
exports.localizeHref = localizeHref;
|
|
1822
|
+
exports.maintenanceRefusal = maintenanceRefusal;
|
|
1788
1823
|
exports.mediaAlt = mediaAlt;
|
|
1789
1824
|
exports.mediaDuration = mediaDuration;
|
|
1790
1825
|
exports.mediaType = mediaType;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
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,
|
|
2
|
+
import { a as CmssyOperation, G as GraphqlRequestOptions } from './locale-CUk6dYTo.cjs';
|
|
3
|
+
export { b as CMSSY_LOCALE_HEADER, C as CmssyOperationInput, f as CmssyTypedDocument, g as graphqlRequest, d as localizeHref, h as resolveCmssyLocale, t as typedOperation } from './locale-CUk6dYTo.cjs';
|
|
4
4
|
import { F as FetchLike, R as RetryOption, C as CmssyClientConfig } from './content-client-EAeHiBv2.cjs';
|
|
5
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';
|
|
@@ -235,6 +235,23 @@ interface CmssyChannelRefusal {
|
|
|
235
235
|
}
|
|
236
236
|
declare function channelRefusal(error: unknown): CmssyChannelRefusal | undefined;
|
|
237
237
|
|
|
238
|
+
interface CmssyMaintenance {
|
|
239
|
+
startsAt: string;
|
|
240
|
+
endsAt: string;
|
|
241
|
+
}
|
|
242
|
+
interface MaintenanceResult {
|
|
243
|
+
public: {
|
|
244
|
+
maintenance: CmssyMaintenance | null;
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
declare const MAINTENANCE_QUERY: CmssyOperation<MaintenanceResult, Record<string, never>>;
|
|
248
|
+
declare function getMaintenance(config: CmssyClientConfig, options?: GraphqlRequestOptions): Promise<CmssyMaintenance | null>;
|
|
249
|
+
interface CmssyMaintenanceRefusal {
|
|
250
|
+
endsAt: string | null;
|
|
251
|
+
retryAfter: number | null;
|
|
252
|
+
}
|
|
253
|
+
declare function maintenanceRefusal(error: unknown): CmssyMaintenanceRefusal | null;
|
|
254
|
+
|
|
238
255
|
/**
|
|
239
256
|
* Whether the content is guaranteed to carry the field. Only `required` says
|
|
240
257
|
* so: a declared `defaultValue` seeds the editor and is not put in place at
|
|
@@ -403,4 +420,4 @@ declare class CmssyWebhookError extends Error {
|
|
|
403
420
|
}
|
|
404
421
|
declare function verifyCmssyWebhook(options: VerifyCmssyWebhookOptions): Promise<CmssyWebhookEvent>;
|
|
405
422
|
|
|
406
|
-
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, checkoutErrorItemId, 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 };
|
|
423
|
+
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 CmssyMaintenance, type CmssyMaintenanceRefusal, 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, GraphqlRequestOptions, MAINTENANCE_QUERY, 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, checkoutErrorItemId, checkoutErrorReason, checkoutErrorReasonValues, fields, getBuyerCatalogPrices, getBuyerPrices, getMaintenance, getPublicCatalogPrices, getPublicPrices, isFormFieldRequired, isFormFieldVisible, isVerifiedEditUrl, layoutRegionsToBridge, maintenanceRefusal, 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,6 +1,6 @@
|
|
|
1
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,
|
|
2
|
+
import { a as CmssyOperation, G as GraphqlRequestOptions } from './locale-Ds2uJX5V.js';
|
|
3
|
+
export { b as CMSSY_LOCALE_HEADER, C as CmssyOperationInput, f as CmssyTypedDocument, g as graphqlRequest, d as localizeHref, h as resolveCmssyLocale, t as typedOperation } from './locale-Ds2uJX5V.js';
|
|
4
4
|
import { F as FetchLike, R as RetryOption, C as CmssyClientConfig } from './content-client-EAeHiBv2.js';
|
|
5
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';
|
|
@@ -235,6 +235,23 @@ interface CmssyChannelRefusal {
|
|
|
235
235
|
}
|
|
236
236
|
declare function channelRefusal(error: unknown): CmssyChannelRefusal | undefined;
|
|
237
237
|
|
|
238
|
+
interface CmssyMaintenance {
|
|
239
|
+
startsAt: string;
|
|
240
|
+
endsAt: string;
|
|
241
|
+
}
|
|
242
|
+
interface MaintenanceResult {
|
|
243
|
+
public: {
|
|
244
|
+
maintenance: CmssyMaintenance | null;
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
declare const MAINTENANCE_QUERY: CmssyOperation<MaintenanceResult, Record<string, never>>;
|
|
248
|
+
declare function getMaintenance(config: CmssyClientConfig, options?: GraphqlRequestOptions): Promise<CmssyMaintenance | null>;
|
|
249
|
+
interface CmssyMaintenanceRefusal {
|
|
250
|
+
endsAt: string | null;
|
|
251
|
+
retryAfter: number | null;
|
|
252
|
+
}
|
|
253
|
+
declare function maintenanceRefusal(error: unknown): CmssyMaintenanceRefusal | null;
|
|
254
|
+
|
|
238
255
|
/**
|
|
239
256
|
* Whether the content is guaranteed to carry the field. Only `required` says
|
|
240
257
|
* so: a declared `defaultValue` seeds the editor and is not put in place at
|
|
@@ -403,4 +420,4 @@ declare class CmssyWebhookError extends Error {
|
|
|
403
420
|
}
|
|
404
421
|
declare function verifyCmssyWebhook(options: VerifyCmssyWebhookOptions): Promise<CmssyWebhookEvent>;
|
|
405
422
|
|
|
406
|
-
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, checkoutErrorItemId, 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 };
|
|
423
|
+
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 CmssyMaintenance, type CmssyMaintenanceRefusal, 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, GraphqlRequestOptions, MAINTENANCE_QUERY, 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, checkoutErrorItemId, checkoutErrorReason, checkoutErrorReasonValues, fields, getBuyerCatalogPrices, getBuyerPrices, getMaintenance, getPublicCatalogPrices, getPublicPrices, isFormFieldRequired, isFormFieldVisible, isVerifiedEditUrl, layoutRegionsToBridge, maintenanceRefusal, mediaAlt, mediaDuration, mediaType, mediaUrl, mediaUrls, mintCmssyEditToken, orderProgress, orderProgressValues, priceDisplayModeValues, priceListSourceValues, priceWithheldReasonValues, propsToSchema, quantityRuleReasonValues, quantityRuleViolation, registryToManifestBlocks, verifyCmssyEditToken, verifyCmssyWebhook, visibleFormFields };
|
package/dist/index.js
CHANGED
|
@@ -224,7 +224,7 @@ function documentText(document2) {
|
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
// src/version.ts
|
|
227
|
-
var CMSSY_CORE_VERSION = "19.
|
|
227
|
+
var CMSSY_CORE_VERSION = "19.27.0" ;
|
|
228
228
|
var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
|
|
229
229
|
|
|
230
230
|
// src/data/http.ts
|
|
@@ -1101,6 +1101,38 @@ function channelRefusal(error) {
|
|
|
1101
1101
|
return void 0;
|
|
1102
1102
|
}
|
|
1103
1103
|
|
|
1104
|
+
// src/data/maintenance.ts
|
|
1105
|
+
var MAINTENANCE_QUERY = typedOperation(`query Maintenance {
|
|
1106
|
+
public {
|
|
1107
|
+
maintenance {
|
|
1108
|
+
startsAt
|
|
1109
|
+
endsAt
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
}`);
|
|
1113
|
+
async function getMaintenance(config, options = {}) {
|
|
1114
|
+
const data = await graphqlRequest(
|
|
1115
|
+
config,
|
|
1116
|
+
MAINTENANCE_QUERY,
|
|
1117
|
+
{},
|
|
1118
|
+
{ ...options, public: true },
|
|
1119
|
+
"maintenance query"
|
|
1120
|
+
);
|
|
1121
|
+
return data.public?.maintenance ?? null;
|
|
1122
|
+
}
|
|
1123
|
+
function maintenanceRefusal(error) {
|
|
1124
|
+
if (!(error instanceof CmssyGraphqlError)) return null;
|
|
1125
|
+
for (const entry of error.errors) {
|
|
1126
|
+
const ext = entry.extensions;
|
|
1127
|
+
if (ext?.code !== "MAINTENANCE") continue;
|
|
1128
|
+
return {
|
|
1129
|
+
endsAt: typeof ext.endsAt === "string" ? ext.endsAt : null,
|
|
1130
|
+
retryAfter: typeof ext.retryAfter === "number" ? ext.retryAfter : null
|
|
1131
|
+
};
|
|
1132
|
+
}
|
|
1133
|
+
return null;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1104
1136
|
// src/fields.ts
|
|
1105
1137
|
function build(type, opts) {
|
|
1106
1138
|
return { type, label: opts.label ?? "", ...opts };
|
|
@@ -1714,4 +1746,4 @@ async function verifyCmssyWebhook(options) {
|
|
|
1714
1746
|
return parsed;
|
|
1715
1747
|
}
|
|
1716
1748
|
|
|
1717
|
-
export { BUYER_CATALOG_PRICES_QUERY, BUYER_PRICES_QUERY, CMSSY_BUYER_PRICES_MAX_ITEMS, CMSSY_EDIT_HEADER, CMSSY_EDIT_QUERY_PARAM, CMSSY_EDIT_TOKEN_HEADER, CMSSY_LOCALE_HEADER, CMSSY_PUBLIC_PRICES_MAX_ITEMS, CMSSY_RATE_LIMIT_WINDOW_MS, CMSSY_RETRY_MODES, CMSSY_SECRET_QUERY_PARAM, CmssyGraphqlError, CmssyRequestError, CmssyWebhookError, DEFAULT_CMSSY_API_URL, DEFAULT_CMSSY_EDITOR_ORIGINS, PROTOCOL_VERSION, PUBLIC_CATALOG_PRICES_QUERY, PUBLIC_PRICES_QUERY, SHORTCUT_ACTIONS, applyCmssyCsp, blocksToMeta, blocksToSchemas, buildBlockManifest, channelRefusal, channelRefusalReasonValues, checkoutErrorItemId, checkoutErrorReason, checkoutErrorReasonValues, createCmssyClient, createRetryingFetch, defineCmssyConfig, defineCmssyLayout, fields, getBuyerCatalogPrices, getBuyerPrices, getPublicCatalogPrices, getPublicPrices, graphqlRequest, isFormFieldRequired, isFormFieldVisible, isProtocolCompatible, isTransientRequestError, isVerifiedEditUrl, layoutRegionsToBridge, localizeHref, mediaAlt, mediaDuration, mediaType, mediaUrl, mediaUrls, mintCmssyEditToken, normalizeOrigin, orderProgress, orderProgressValues, parseEditorMessage, postToEditor, priceDisplayModeValues, priceListSourceValues, priceWithheldReasonValues, propsToSchema, quantityRuleReasonValues, quantityRuleViolation, registryToManifestBlocks, resolveCmssyLocale, resolveEditorOrigin, typedOperation, verifyCmssyEditToken, verifyCmssyWebhook, visibleFormFields };
|
|
1749
|
+
export { BUYER_CATALOG_PRICES_QUERY, BUYER_PRICES_QUERY, CMSSY_BUYER_PRICES_MAX_ITEMS, CMSSY_EDIT_HEADER, CMSSY_EDIT_QUERY_PARAM, CMSSY_EDIT_TOKEN_HEADER, CMSSY_LOCALE_HEADER, CMSSY_PUBLIC_PRICES_MAX_ITEMS, CMSSY_RATE_LIMIT_WINDOW_MS, CMSSY_RETRY_MODES, CMSSY_SECRET_QUERY_PARAM, CmssyGraphqlError, CmssyRequestError, CmssyWebhookError, DEFAULT_CMSSY_API_URL, DEFAULT_CMSSY_EDITOR_ORIGINS, MAINTENANCE_QUERY, PROTOCOL_VERSION, PUBLIC_CATALOG_PRICES_QUERY, PUBLIC_PRICES_QUERY, SHORTCUT_ACTIONS, applyCmssyCsp, blocksToMeta, blocksToSchemas, buildBlockManifest, channelRefusal, channelRefusalReasonValues, checkoutErrorItemId, checkoutErrorReason, checkoutErrorReasonValues, createCmssyClient, createRetryingFetch, defineCmssyConfig, defineCmssyLayout, fields, getBuyerCatalogPrices, getBuyerPrices, getMaintenance, getPublicCatalogPrices, getPublicPrices, graphqlRequest, isFormFieldRequired, isFormFieldVisible, isProtocolCompatible, isTransientRequestError, isVerifiedEditUrl, layoutRegionsToBridge, localizeHref, maintenanceRefusal, mediaAlt, mediaDuration, mediaType, mediaUrl, mediaUrls, mintCmssyEditToken, normalizeOrigin, orderProgress, orderProgressValues, parseEditorMessage, postToEditor, priceDisplayModeValues, priceListSourceValues, priceWithheldReasonValues, propsToSchema, quantityRuleReasonValues, quantityRuleViolation, registryToManifestBlocks, resolveCmssyLocale, resolveEditorOrigin, typedOperation, verifyCmssyEditToken, verifyCmssyWebhook, visibleFormFields };
|
package/dist/internal/locale.cjs
CHANGED
package/dist/internal/locale.js
CHANGED
package/dist/internal.cjs
CHANGED
package/dist/internal.js
CHANGED
package/dist/preflight.cjs
CHANGED
|
@@ -152,7 +152,7 @@ function documentText(document) {
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
// src/version.ts
|
|
155
|
-
var CMSSY_CORE_VERSION = "19.
|
|
155
|
+
var CMSSY_CORE_VERSION = "19.27.0" ;
|
|
156
156
|
var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
|
|
157
157
|
|
|
158
158
|
// src/content/content-client.ts
|
package/dist/preflight.js
CHANGED
|
@@ -150,7 +150,7 @@ function documentText(document) {
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
// src/version.ts
|
|
153
|
-
var CMSSY_CORE_VERSION = "19.
|
|
153
|
+
var CMSSY_CORE_VERSION = "19.27.0" ;
|
|
154
154
|
var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
|
|
155
155
|
|
|
156
156
|
// src/content/content-client.ts
|