@cmssy/core 19.30.0 → 19.31.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 +1 -1
- package/dist/index.d.cts +15 -6
- package/dist/index.d.ts +15 -6
- package/dist/index.js +1 -1
- 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 +2 -2
package/dist/index.cjs
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -5,7 +5,7 @@ export { b as CMSSY_LOCALE_HEADER, C as CmssyOperationInput, f as CmssyTypedDocu
|
|
|
5
5
|
import { F as FetchLike, R as RetryOption, C as CmssyClientConfig } from './content-client-EAeHiBv2.cjs';
|
|
6
6
|
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';
|
|
7
7
|
import * as _cmssy_types from '@cmssy/types';
|
|
8
|
-
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
|
+
import { CmssyPriceSource, CmssyTaxTreatmentKind, FieldOptions, FieldValidation, TypedField, FieldTypeValueMap, ResolvedMediaValue, PageRef, BlockPropsSchema, InferBlockContent, RelationMode, CmssyModelRecord, ResolvedMedia, MediaType, BlockSchema, LayoutRegion, FieldDefinition, BlockMeta, CmssyFormField, VerifyCmssyWebhookOptions, CmssyWebhookEvent } from '@cmssy/types';
|
|
9
9
|
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, CmssyWebhookAuthoringEvent, CmssyWebhookContentChange, CmssyWebhookContentEvent, CmssyWebhookEvent, CmssyWebhookEventName, CmssyWebhookOrder, CmssyWebhookOrderEvent, CmssyWebhookOrderPayload, CmssyWebhookPricingEvent, CmssyWebhookReturn, CmssyWebhookReturnEvent, CmssyWebhookReturnPayload, CmssyWebhookShipment, CmssyWebhookShipmentEvent, CmssyWebhookShipmentPayload, CmssyWebhookSubject, 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';
|
|
10
10
|
|
|
11
11
|
declare const CMSSY_BUYER_PRICES_MAX_ITEMS = 100;
|
|
@@ -261,23 +261,32 @@ declare function maintenanceRefusal(error: unknown): CmssyMaintenanceRefusal | n
|
|
|
261
261
|
type Declared<O> = O extends {
|
|
262
262
|
required: true;
|
|
263
263
|
} ? true : false;
|
|
264
|
-
type BaseFieldOptions = Pick<FieldOptions, "label" | "defaultValue" | "helperText" | "required" | "placeholder" | "tab" | "localized"
|
|
264
|
+
type BaseFieldOptions = Pick<FieldOptions, "label" | "defaultValue" | "helperText" | "required" | "placeholder" | "tab" | "localized"> & {
|
|
265
|
+
validation?: FieldValidation;
|
|
266
|
+
};
|
|
267
|
+
type ItemCountOptions = Pick<FieldOptions, "minItems" | "maxItems">;
|
|
265
268
|
type ChoiceFieldOptions = BaseFieldOptions & Pick<FieldOptions, "options">;
|
|
269
|
+
type MultiselectFieldOptions = ChoiceFieldOptions & ItemCountOptions;
|
|
266
270
|
type MediaFieldOptions = BaseFieldOptions & Pick<FieldOptions, "multiple" | "acceptedTypes" | "accept" | "maxSize" | "aspectRatio" | "aspectRatios">;
|
|
267
271
|
type PageSelectorFieldOptions = BaseFieldOptions & Pick<FieldOptions, "multiple" | "pageType">;
|
|
268
272
|
type RepeaterFieldOptions = BaseFieldOptions & Pick<FieldOptions, "itemSchema" | "minItems" | "maxItems" | "itemLabel" | "addButtonLabel" | "collapsible">;
|
|
269
273
|
type TableFieldOptions = BaseFieldOptions & Pick<FieldOptions, "maxColumns">;
|
|
270
|
-
|
|
274
|
+
type RelationFieldOptions = BaseFieldOptions & ItemCountOptions & {
|
|
271
275
|
model: string;
|
|
272
276
|
mode?: RelationMode;
|
|
273
277
|
multiple?: boolean;
|
|
274
278
|
/** `<fieldKey>_asc` / `<fieldKey>_desc`; omit for the model's default sort. */
|
|
275
279
|
sort?: CmssyRecordSort;
|
|
276
280
|
limit?: number;
|
|
277
|
-
}
|
|
281
|
+
};
|
|
278
282
|
type Only<O, Shape, Field extends string> = Shape & {
|
|
279
283
|
[Key in Exclude<keyof O, keyof Shape>]: `fields.${Field} has no option: ${Key & string}`;
|
|
280
284
|
};
|
|
285
|
+
type MediaOnly<O> = Only<O, MediaFieldOptions & ItemCountOptions, "media"> & {
|
|
286
|
+
[Key in Extract<keyof O, keyof ItemCountOptions>]: O extends {
|
|
287
|
+
multiple: true;
|
|
288
|
+
} ? number : `fields.media counts items only with multiple: true`;
|
|
289
|
+
};
|
|
281
290
|
type OptionValue<O> = O extends {
|
|
282
291
|
options: readonly (infer Option extends string)[];
|
|
283
292
|
} ? Option : string;
|
|
@@ -318,8 +327,8 @@ declare const fields: {
|
|
|
318
327
|
table: <const O extends Only<O, TableFieldOptions, "table">>(opts?: O) => TypedField<FieldTypeValueMap["table"], Declared<O>>;
|
|
319
328
|
select: <const O extends Only<O, ChoiceFieldOptions, "select">>(opts: O) => TypedField<OptionValue<O>, Declared<O>>;
|
|
320
329
|
radio: <const O extends Only<O, ChoiceFieldOptions, "radio">>(opts: O) => TypedField<OptionValue<O>, Declared<O>>;
|
|
321
|
-
multiselect: <const O extends Only<O,
|
|
322
|
-
media: <const O extends
|
|
330
|
+
multiselect: <const O extends Only<O, MultiselectFieldOptions, "multiselect">>(opts: O) => TypedField<OptionValue<O>[], Declared<O>>;
|
|
331
|
+
media: <const O extends MediaOnly<O>>(opts?: O) => TypedField<MediaValue<O>, Declared<O>>;
|
|
323
332
|
pageSelector: <const O extends Only<O, PageSelectorFieldOptions, "pageSelector">>(opts?: O) => TypedField<PageSelectorValue<O>, Declared<O>>;
|
|
324
333
|
repeater: <const O extends Only<O, RepeaterFieldOptions, "repeater">>(opts: O) => TypedField<RepeaterValue<O>, Declared<O>>;
|
|
325
334
|
relation: <const O extends Only<O, RelationFieldOptions, "relation">>(opts: O) => TypedField<RelationValue<O>, Declared<O>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { b as CMSSY_LOCALE_HEADER, C as CmssyOperationInput, f as CmssyTypedDocu
|
|
|
5
5
|
import { F as FetchLike, R as RetryOption, C as CmssyClientConfig } from './content-client-EAeHiBv2.js';
|
|
6
6
|
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';
|
|
7
7
|
import * as _cmssy_types from '@cmssy/types';
|
|
8
|
-
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
|
+
import { CmssyPriceSource, CmssyTaxTreatmentKind, FieldOptions, FieldValidation, TypedField, FieldTypeValueMap, ResolvedMediaValue, PageRef, BlockPropsSchema, InferBlockContent, RelationMode, CmssyModelRecord, ResolvedMedia, MediaType, BlockSchema, LayoutRegion, FieldDefinition, BlockMeta, CmssyFormField, VerifyCmssyWebhookOptions, CmssyWebhookEvent } from '@cmssy/types';
|
|
9
9
|
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, CmssyWebhookAuthoringEvent, CmssyWebhookContentChange, CmssyWebhookContentEvent, CmssyWebhookEvent, CmssyWebhookEventName, CmssyWebhookOrder, CmssyWebhookOrderEvent, CmssyWebhookOrderPayload, CmssyWebhookPricingEvent, CmssyWebhookReturn, CmssyWebhookReturnEvent, CmssyWebhookReturnPayload, CmssyWebhookShipment, CmssyWebhookShipmentEvent, CmssyWebhookShipmentPayload, CmssyWebhookSubject, 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';
|
|
10
10
|
|
|
11
11
|
declare const CMSSY_BUYER_PRICES_MAX_ITEMS = 100;
|
|
@@ -261,23 +261,32 @@ declare function maintenanceRefusal(error: unknown): CmssyMaintenanceRefusal | n
|
|
|
261
261
|
type Declared<O> = O extends {
|
|
262
262
|
required: true;
|
|
263
263
|
} ? true : false;
|
|
264
|
-
type BaseFieldOptions = Pick<FieldOptions, "label" | "defaultValue" | "helperText" | "required" | "placeholder" | "tab" | "localized"
|
|
264
|
+
type BaseFieldOptions = Pick<FieldOptions, "label" | "defaultValue" | "helperText" | "required" | "placeholder" | "tab" | "localized"> & {
|
|
265
|
+
validation?: FieldValidation;
|
|
266
|
+
};
|
|
267
|
+
type ItemCountOptions = Pick<FieldOptions, "minItems" | "maxItems">;
|
|
265
268
|
type ChoiceFieldOptions = BaseFieldOptions & Pick<FieldOptions, "options">;
|
|
269
|
+
type MultiselectFieldOptions = ChoiceFieldOptions & ItemCountOptions;
|
|
266
270
|
type MediaFieldOptions = BaseFieldOptions & Pick<FieldOptions, "multiple" | "acceptedTypes" | "accept" | "maxSize" | "aspectRatio" | "aspectRatios">;
|
|
267
271
|
type PageSelectorFieldOptions = BaseFieldOptions & Pick<FieldOptions, "multiple" | "pageType">;
|
|
268
272
|
type RepeaterFieldOptions = BaseFieldOptions & Pick<FieldOptions, "itemSchema" | "minItems" | "maxItems" | "itemLabel" | "addButtonLabel" | "collapsible">;
|
|
269
273
|
type TableFieldOptions = BaseFieldOptions & Pick<FieldOptions, "maxColumns">;
|
|
270
|
-
|
|
274
|
+
type RelationFieldOptions = BaseFieldOptions & ItemCountOptions & {
|
|
271
275
|
model: string;
|
|
272
276
|
mode?: RelationMode;
|
|
273
277
|
multiple?: boolean;
|
|
274
278
|
/** `<fieldKey>_asc` / `<fieldKey>_desc`; omit for the model's default sort. */
|
|
275
279
|
sort?: CmssyRecordSort;
|
|
276
280
|
limit?: number;
|
|
277
|
-
}
|
|
281
|
+
};
|
|
278
282
|
type Only<O, Shape, Field extends string> = Shape & {
|
|
279
283
|
[Key in Exclude<keyof O, keyof Shape>]: `fields.${Field} has no option: ${Key & string}`;
|
|
280
284
|
};
|
|
285
|
+
type MediaOnly<O> = Only<O, MediaFieldOptions & ItemCountOptions, "media"> & {
|
|
286
|
+
[Key in Extract<keyof O, keyof ItemCountOptions>]: O extends {
|
|
287
|
+
multiple: true;
|
|
288
|
+
} ? number : `fields.media counts items only with multiple: true`;
|
|
289
|
+
};
|
|
281
290
|
type OptionValue<O> = O extends {
|
|
282
291
|
options: readonly (infer Option extends string)[];
|
|
283
292
|
} ? Option : string;
|
|
@@ -318,8 +327,8 @@ declare const fields: {
|
|
|
318
327
|
table: <const O extends Only<O, TableFieldOptions, "table">>(opts?: O) => TypedField<FieldTypeValueMap["table"], Declared<O>>;
|
|
319
328
|
select: <const O extends Only<O, ChoiceFieldOptions, "select">>(opts: O) => TypedField<OptionValue<O>, Declared<O>>;
|
|
320
329
|
radio: <const O extends Only<O, ChoiceFieldOptions, "radio">>(opts: O) => TypedField<OptionValue<O>, Declared<O>>;
|
|
321
|
-
multiselect: <const O extends Only<O,
|
|
322
|
-
media: <const O extends
|
|
330
|
+
multiselect: <const O extends Only<O, MultiselectFieldOptions, "multiselect">>(opts: O) => TypedField<OptionValue<O>[], Declared<O>>;
|
|
331
|
+
media: <const O extends MediaOnly<O>>(opts?: O) => TypedField<MediaValue<O>, Declared<O>>;
|
|
323
332
|
pageSelector: <const O extends Only<O, PageSelectorFieldOptions, "pageSelector">>(opts?: O) => TypedField<PageSelectorValue<O>, Declared<O>>;
|
|
324
333
|
repeater: <const O extends Only<O, RepeaterFieldOptions, "repeater">>(opts: O) => TypedField<RepeaterValue<O>, Declared<O>>;
|
|
325
334
|
relation: <const O extends Only<O, RelationFieldOptions, "relation">>(opts: O) => TypedField<RelationValue<O>, Declared<O>>;
|
package/dist/index.js
CHANGED
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.31.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.31.0" ;
|
|
154
154
|
var CMSSY_USER_AGENT = `@cmssy/core/${CMSSY_CORE_VERSION}`;
|
|
155
155
|
|
|
156
156
|
// src/content/content-client.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cmssy/core",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.31.0",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=20"
|
|
6
6
|
},
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"vitest": "^2.1.0"
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
|
-
"@cmssy/types": "0.
|
|
93
|
+
"@cmssy/types": "0.75.0",
|
|
94
94
|
"jose": "^6.2.3"
|
|
95
95
|
},
|
|
96
96
|
"scripts": {
|