@relyio/sdk 0.12.0 → 0.13.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/dist/{chunk-3DRDHXLY.js → chunk-3NPPMGB6.js} +435 -23
  3. package/dist/{chunk-FRJEUAAF.js → chunk-6NGJXLOR.js} +22 -11
  4. package/dist/{chunk-DXCVO6M5.cjs → chunk-DEDIJKHY.cjs} +22 -11
  5. package/dist/{chunk-POEEDYFM.js → chunk-EW23SZPX.js} +7 -2
  6. package/dist/{chunk-3MSFWXQL.cjs → chunk-FOSM4LMM.cjs} +7 -2
  7. package/dist/{chunk-FI5VIF4M.cjs → chunk-Z6GLWSSD.cjs} +442 -22
  8. package/dist/client/index.cjs +3 -3
  9. package/dist/client/index.d.cts +4 -5
  10. package/dist/client/index.d.ts +4 -5
  11. package/dist/client/index.js +1 -1
  12. package/dist/{define-schema-mrEZbY1h.d.ts → define-schema-UHViXKiv.d.ts} +2 -219
  13. package/dist/{define-schema-DgctHlI2.d.cts → define-schema-sWJ8Zn7C.d.cts} +2 -219
  14. package/dist/{include-paths-CL4gHv6I.d.cts → include-paths-Bs5FhNw2.d.cts} +2191 -108
  15. package/dist/{include-paths-CrJNTsMl.d.ts → include-paths-Cb7iPCW2.d.ts} +2191 -108
  16. package/dist/index--_u1nPHv.d.cts +507 -0
  17. package/dist/index-8DozAWsA.d.ts +507 -0
  18. package/dist/{index-BrvEg6-A.d.cts → index-BT0L8xJj.d.cts} +41 -53
  19. package/dist/{index-Pw0onkJe.d.ts → index-CPjJ25R4.d.ts} +41 -53
  20. package/dist/index.cjs +119 -112
  21. package/dist/index.d.cts +39 -70
  22. package/dist/index.d.ts +39 -70
  23. package/dist/index.js +5 -29
  24. package/dist/markdown/index.cjs +13750 -0
  25. package/dist/markdown/index.d.cts +111 -0
  26. package/dist/markdown/index.d.ts +111 -0
  27. package/dist/markdown/index.js +13742 -0
  28. package/dist/rich-text/index.cjs +26 -6
  29. package/dist/rich-text/index.d.cts +3 -148
  30. package/dist/rich-text/index.d.ts +3 -148
  31. package/dist/rich-text/index.js +1 -1
  32. package/dist/rich-text.d-BWc-5gX1.d.cts +326 -0
  33. package/dist/rich-text.d-BWc-5gX1.d.ts +326 -0
  34. package/dist/schema/index.cjs +34 -34
  35. package/dist/schema/index.d.cts +9 -178
  36. package/dist/schema/index.d.ts +9 -178
  37. package/dist/schema/index.js +1 -1
  38. package/dist/types/index.d.cts +2 -3
  39. package/dist/types/index.d.ts +2 -3
  40. package/package.json +14 -3
  41. package/dist/index-B9RfZVF1.d.ts +0 -861
  42. package/dist/index-b-AkfTUv.d.cts +0 -861
  43. package/dist/rich-text.d-rKmpgdGd.d.cts +0 -200
  44. package/dist/rich-text.d-rKmpgdGd.d.ts +0 -200
@@ -1,141 +1,141 @@
1
1
  'use strict';
2
2
 
3
- var chunk3MSFWXQL_cjs = require('../chunk-3MSFWXQL.cjs');
3
+ var chunkFOSM4LMM_cjs = require('../chunk-FOSM4LMM.cjs');
4
4
  require('../chunk-MWMSFIWN.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "BUILT_IN_ROLES", {
9
9
  enumerable: true,
10
- get: function () { return chunk3MSFWXQL_cjs.BUILT_IN_ROLES; }
10
+ get: function () { return chunkFOSM4LMM_cjs.BUILT_IN_ROLES; }
11
11
  });
12
12
  Object.defineProperty(exports, "BUILT_IN_ROLE_ACTIONS", {
13
13
  enumerable: true,
14
- get: function () { return chunk3MSFWXQL_cjs.BUILT_IN_ROLE_ACTIONS; }
14
+ get: function () { return chunkFOSM4LMM_cjs.BUILT_IN_ROLE_ACTIONS; }
15
15
  });
16
16
  Object.defineProperty(exports, "ROLE_ACTIONS", {
17
17
  enumerable: true,
18
- get: function () { return chunk3MSFWXQL_cjs.ROLE_ACTIONS; }
18
+ get: function () { return chunkFOSM4LMM_cjs.ROLE_ACTIONS; }
19
19
  });
20
20
  Object.defineProperty(exports, "buildFallbackChain", {
21
21
  enumerable: true,
22
- get: function () { return chunk3MSFWXQL_cjs.buildFallbackChain; }
22
+ get: function () { return chunkFOSM4LMM_cjs.buildFallbackChain; }
23
23
  });
24
24
  Object.defineProperty(exports, "defineAssetType", {
25
25
  enumerable: true,
26
- get: function () { return chunk3MSFWXQL_cjs.defineAssetType; }
26
+ get: function () { return chunkFOSM4LMM_cjs.defineAssetType; }
27
27
  });
28
28
  Object.defineProperty(exports, "defineContentType", {
29
29
  enumerable: true,
30
- get: function () { return chunk3MSFWXQL_cjs.defineContentType; }
30
+ get: function () { return chunkFOSM4LMM_cjs.defineContentType; }
31
31
  });
32
32
  Object.defineProperty(exports, "defineContentTypeWorkflow", {
33
33
  enumerable: true,
34
- get: function () { return chunk3MSFWXQL_cjs.defineContentTypeWorkflow; }
34
+ get: function () { return chunkFOSM4LMM_cjs.defineContentTypeWorkflow; }
35
35
  });
36
36
  Object.defineProperty(exports, "defineLocale", {
37
37
  enumerable: true,
38
- get: function () { return chunk3MSFWXQL_cjs.defineLocale; }
38
+ get: function () { return chunkFOSM4LMM_cjs.defineLocale; }
39
39
  });
40
40
  Object.defineProperty(exports, "defineQuery", {
41
41
  enumerable: true,
42
- get: function () { return chunk3MSFWXQL_cjs.defineQuery; }
42
+ get: function () { return chunkFOSM4LMM_cjs.defineQuery; }
43
43
  });
44
44
  Object.defineProperty(exports, "defineRole", {
45
45
  enumerable: true,
46
- get: function () { return chunk3MSFWXQL_cjs.defineRole; }
46
+ get: function () { return chunkFOSM4LMM_cjs.defineRole; }
47
47
  });
48
48
  Object.defineProperty(exports, "defineSchema", {
49
49
  enumerable: true,
50
- get: function () { return chunk3MSFWXQL_cjs.defineSchema; }
50
+ get: function () { return chunkFOSM4LMM_cjs.defineSchema; }
51
51
  });
52
52
  Object.defineProperty(exports, "defineSettingsGroup", {
53
53
  enumerable: true,
54
- get: function () { return chunk3MSFWXQL_cjs.defineSettingsGroup; }
54
+ get: function () { return chunkFOSM4LMM_cjs.defineSettingsGroup; }
55
55
  });
56
56
  Object.defineProperty(exports, "defineSingleton", {
57
57
  enumerable: true,
58
- get: function () { return chunk3MSFWXQL_cjs.defineSingleton; }
58
+ get: function () { return chunkFOSM4LMM_cjs.defineSingleton; }
59
59
  });
60
60
  Object.defineProperty(exports, "defineSingletonContentType", {
61
61
  enumerable: true,
62
- get: function () { return chunk3MSFWXQL_cjs.defineSingletonContentType; }
62
+ get: function () { return chunkFOSM4LMM_cjs.defineSingletonContentType; }
63
63
  });
64
64
  Object.defineProperty(exports, "defineView", {
65
65
  enumerable: true,
66
- get: function () { return chunk3MSFWXQL_cjs.defineView; }
66
+ get: function () { return chunkFOSM4LMM_cjs.defineView; }
67
67
  });
68
68
  Object.defineProperty(exports, "defineWorkflow", {
69
69
  enumerable: true,
70
- get: function () { return chunk3MSFWXQL_cjs.defineWorkflow; }
70
+ get: function () { return chunkFOSM4LMM_cjs.defineWorkflow; }
71
71
  });
72
72
  Object.defineProperty(exports, "defineWorkflowStage", {
73
73
  enumerable: true,
74
- get: function () { return chunk3MSFWXQL_cjs.defineWorkflowStage; }
74
+ get: function () { return chunkFOSM4LMM_cjs.defineWorkflowStage; }
75
75
  });
76
76
  Object.defineProperty(exports, "fields", {
77
77
  enumerable: true,
78
- get: function () { return chunk3MSFWXQL_cjs.fields; }
78
+ get: function () { return chunkFOSM4LMM_cjs.fields; }
79
79
  });
80
80
  Object.defineProperty(exports, "fieldset", {
81
81
  enumerable: true,
82
- get: function () { return chunk3MSFWXQL_cjs.fieldset; }
82
+ get: function () { return chunkFOSM4LMM_cjs.fieldset; }
83
83
  });
84
84
  Object.defineProperty(exports, "findDefaultLocale", {
85
85
  enumerable: true,
86
- get: function () { return chunk3MSFWXQL_cjs.findDefaultLocale; }
86
+ get: function () { return chunkFOSM4LMM_cjs.findDefaultLocale; }
87
87
  });
88
88
  Object.defineProperty(exports, "findWorkflowStage", {
89
89
  enumerable: true,
90
- get: function () { return chunk3MSFWXQL_cjs.findWorkflowStage; }
90
+ get: function () { return chunkFOSM4LMM_cjs.findWorkflowStage; }
91
91
  });
92
92
  Object.defineProperty(exports, "getActiveLocales", {
93
93
  enumerable: true,
94
- get: function () { return chunk3MSFWXQL_cjs.getActiveLocales; }
94
+ get: function () { return chunkFOSM4LMM_cjs.getActiveLocales; }
95
95
  });
96
96
  Object.defineProperty(exports, "getBuiltInRoleActions", {
97
97
  enumerable: true,
98
- get: function () { return chunk3MSFWXQL_cjs.getBuiltInRoleActions; }
98
+ get: function () { return chunkFOSM4LMM_cjs.getBuiltInRoleActions; }
99
99
  });
100
100
  Object.defineProperty(exports, "getFirstWorkflowStage", {
101
101
  enumerable: true,
102
- get: function () { return chunk3MSFWXQL_cjs.getFirstWorkflowStage; }
102
+ get: function () { return chunkFOSM4LMM_cjs.getFirstWorkflowStage; }
103
103
  });
104
104
  Object.defineProperty(exports, "getLocaleCodes", {
105
105
  enumerable: true,
106
- get: function () { return chunk3MSFWXQL_cjs.getLocaleCodes; }
106
+ get: function () { return chunkFOSM4LMM_cjs.getLocaleCodes; }
107
107
  });
108
108
  Object.defineProperty(exports, "getNextWorkflowStage", {
109
109
  enumerable: true,
110
- get: function () { return chunk3MSFWXQL_cjs.getNextWorkflowStage; }
110
+ get: function () { return chunkFOSM4LMM_cjs.getNextWorkflowStage; }
111
111
  });
112
112
  Object.defineProperty(exports, "getWorkflowStageIds", {
113
113
  enumerable: true,
114
- get: function () { return chunk3MSFWXQL_cjs.getWorkflowStageIds; }
114
+ get: function () { return chunkFOSM4LMM_cjs.getWorkflowStageIds; }
115
115
  });
116
116
  Object.defineProperty(exports, "isBuiltInRole", {
117
117
  enumerable: true,
118
- get: function () { return chunk3MSFWXQL_cjs.isBuiltInRole; }
118
+ get: function () { return chunkFOSM4LMM_cjs.isBuiltInRole; }
119
119
  });
120
120
  Object.defineProperty(exports, "isFinalWorkflowStage", {
121
121
  enumerable: true,
122
- get: function () { return chunk3MSFWXQL_cjs.isFinalWorkflowStage; }
122
+ get: function () { return chunkFOSM4LMM_cjs.isFinalWorkflowStage; }
123
123
  });
124
124
  Object.defineProperty(exports, "isLocaleDefinition", {
125
125
  enumerable: true,
126
- get: function () { return chunk3MSFWXQL_cjs.isLocaleDefinition; }
126
+ get: function () { return chunkFOSM4LMM_cjs.isLocaleDefinition; }
127
127
  });
128
128
  Object.defineProperty(exports, "isRoleDefinition", {
129
129
  enumerable: true,
130
- get: function () { return chunk3MSFWXQL_cjs.isRoleDefinition; }
130
+ get: function () { return chunkFOSM4LMM_cjs.isRoleDefinition; }
131
131
  });
132
132
  Object.defineProperty(exports, "isWorkflowDefinition", {
133
133
  enumerable: true,
134
- get: function () { return chunk3MSFWXQL_cjs.isWorkflowDefinition; }
134
+ get: function () { return chunkFOSM4LMM_cjs.isWorkflowDefinition; }
135
135
  });
136
136
  Object.defineProperty(exports, "isWorkflowStageDefinition", {
137
137
  enumerable: true,
138
- get: function () { return chunk3MSFWXQL_cjs.isWorkflowStageDefinition; }
138
+ get: function () { return chunkFOSM4LMM_cjs.isWorkflowStageDefinition; }
139
139
  });
140
140
  //# sourceMappingURL=index.cjs.map
141
141
  //# sourceMappingURL=index.cjs.map
@@ -1,179 +1,7 @@
1
- export { _ as AggregateBlock, H as AllScopeConfig, B as BUILT_IN_ROLES, v as BUILT_IN_ROLE_ACTIONS, w as BuiltInRole, ab as CachePolicy, ac as CachePolicyObject, D as ContentTypeScopeConfig, E as ContentTypesScopeConfig, G as EntryTypeScopeConfig, Z as FetchBlock, F as FieldVisibility, aa as FilterDefinition, Y as FullTextSearch, a3 as HavingOperator, a7 as IncludeDefinition, a8 as IncludeRelationship, ae as IncludeSubQueries, ad as IncludeSubQuery, ak as InferQueryParams, aj as InferQueryResponse, q as LocaleDefinition, L as LocaleOptions, af as Parameterizable, ai as QueryCardinality, U as QueryConfig, W as QueryDefinition, ag as QueryParameter, ah as QueryParameterType, a4 as QueryScalar, X as QueryType, R as ROLE_ACTIONS, y as ResourcePermission, x as RoleAction, z as RoleConfig, A as RoleDefinition, h as SchemaAssetTypeNames, S as SchemaConfig, b as SchemaContentTypeNames, a as SchemaDefinition, i as SchemaEntry, j as SchemaEntryOf, f as SchemaLocaleCodes, e as SchemaQueryNames, g as SchemaSettingsGroupNames, c as SchemaSingletonNames, $ as SearchBlock, a9 as SelectMapping, a5 as SortCondition, a6 as SortDirection, T as TextDirection, O as ViewConfig, P as ViewDefinition, N as ViewFilter, M as ViewFilterCondition, I as ViewFilterOperator, K as ViewFilterRelativeDate, J as ViewFilterValue, V as ViewScopeConfig, a0 as WhereCondition, a2 as WhereOperator, a1 as WhereValue, p as buildFallbackChain, k as defineLocale, Q as defineQuery, r as defineRole, d as defineSchema, C as defineView, n as findDefaultLocale, o as getActiveLocales, u as getBuiltInRoleActions, m as getLocaleCodes, t as isBuiltInRole, l as isLocaleDefinition, s as isRoleDefinition } from '../define-schema-DgctHlI2.cjs';
2
- import { F as FieldUIConfig, a as FieldAIConfig, b as FieldRule, L as LocalizationConfig, S as ShortTextConfig, c as FieldDefinition, d as LongTextConfig, R as RichTextConfig, T as TableConfig, C as CodeConfig, e as SlugConfig, U as UrlConfig, E as EmailConfig, I as IntegerConfig, D as DecimalConfig, B as BooleanConfig, f as EnumConfig, g as DateConfig, h as DateTimeConfig, i as ReferenceConfig, j as TagsConfig, A as AnyFieldset, k as ListConfig, O as ObjectConfig, l as AIConfig, m as AnyFieldDefinition, n as AssetAIConfig, o as BaseFieldConfig, p as FieldType, q as ReadOnlyRule, r as RequirementRule, s as RuleCondition, t as RuleConditions, V as ValidationRule, u as VisibilityRule } from '../include-paths-CL4gHv6I.cjs';
3
- export { J as AssetReading, al as AssetTypeConfig, am as AssetTypeDefinition, G as BlockOf, N as CheckInclude, M as CheckedIncludes, P as ContentReading, a3 as ContentTypeConfig, a4 as ContentTypeDefinition, aV as ContentTypeWorkflowConfig, y as DeclaredFields, a5 as EntryMetadata, a2 as FieldMember, v as FieldSchemaContext, w as FieldValue, x as FieldValues, a1 as Fieldset, aq as FileKindConfig, aE as FileScanConfig, aD as FileUploadConfig, aw as ImageExifConfig, as as ImageFitMode, ao as ImageKindConfig, at as ImageOutputFormat, av as ImageSourceConfig, ar as ImageTransform, au as ImageUploadConfig, Q as IncludablePaths, an as InferAssetType, a6 as InferContentType, aj as InferSettingsGroup, ae as InferSingleton, ad as InferSingletonContentType, K as Keyed, a7 as LocalePublicationFields, X as ReadWith, W as Reading, ag as SettingsGroupConfig, ah as SettingsGroupDefinition, ai as SettingsGroupMetadata, Y as SettingsReading, H as ShapeValue, aa as SingletonConfig, ab as SingletonContentTypeDefinition, ac as SingletonMetadata, Z as SingletonReading, z as UnresolvedEntry, _ as UntypedReading, ax as VariantDefinition, aA as VideoCaptionsConfig, aB as VideoDownloadConfig, ap as VideoKindConfig, az as VideoPosterConfig, ay as VideoUploadConfig, aC as VideoWatermarkConfig, aQ as WorkflowAutoAssign, aT as WorkflowConfig, aU as WorkflowDefinition, aP as WorkflowEscalation, aR as WorkflowStageConfig, aS as WorkflowStageDefinition, ak as defineAssetType, $ as defineContentType, aH as defineContentTypeWorkflow, af as defineSettingsGroup, a9 as defineSingleton, a8 as defineSingletonContentType, aF as defineWorkflow, aG as defineWorkflowStage, a0 as fieldset, aL as findWorkflowStage, aN as getFirstWorkflowStage, aM as getNextWorkflowStage, aK as getWorkflowStageIds, aO as isFinalWorkflowStage, aI as isWorkflowDefinition, aJ as isWorkflowStageDefinition } from '../include-paths-CL4gHv6I.cjs';
4
- import '../rich-text.d-rKmpgdGd.cjs';
5
-
6
- /**
7
- * Field builders for defining schema fields
8
- * Matches the @relyio/schema FieldSchema structure
9
- *
10
- * All builders are generic over the ID to preserve literal types for type inference. `enum`,
11
- * `reference` and `list` are generic over the parts of their config a read's type depends on too —
12
- * the option values, the targets, `multi` and the list's shape — each through a type parameter with a
13
- * primitive or field constraint, which is what keeps a literal from widening without a `const`
14
- * type parameter (the package supports TypeScript 4.9, which has none).
15
- */
16
-
17
- interface FieldOptions<TConfig> {
18
- /** Type-specific configuration */
19
- config?: TConfig;
20
- /** UI display configuration */
21
- ui?: FieldUIConfig;
22
- /** AI configuration: generation/review guidance (`instructions`) for this field. */
23
- ai?: FieldAIConfig;
24
- /** Dynamic field rules */
25
- rules?: FieldRule[];
26
- /** Localization settings */
27
- localization?: LocalizationConfig;
28
- /** Fallback value */
29
- fallback?: unknown;
30
- /** Whether this field is deprecated */
31
- deprecated?: boolean;
32
- }
33
- /**
34
- * `required`, kept as the literal it was written as, so a read's type knows which fields are always
35
- * present (`schema/infer-fields.ts`, REL-1795) — through a type parameter with a primitive
36
- * constraint, as `multi` is, so `true` does not widen to `boolean`.
37
- */
38
- type RequiredAs<TRequired extends boolean> = {
39
- required?: TRequired;
40
- };
41
- /**
42
- * Short text field (single line)
43
- * @example fields.shortText('title', { config: { required: true, maxLength: 200 } })
44
- */
45
- declare function shortText<TId extends string, TRequired extends boolean = false>(id: TId, options?: FieldOptions<ShortTextConfig & RequiredAs<TRequired>>): FieldDefinition<TId, 'shortText', ShortTextConfig & RequiredAs<TRequired>>;
46
- /**
47
- * Long text field (multi-line textarea)
48
- * @example fields.longText('description', { config: { maxLength: 5000 } })
49
- */
50
- declare function longText<TId extends string, TRequired extends boolean = false>(id: TId, options?: FieldOptions<LongTextConfig & RequiredAs<TRequired>>): FieldDefinition<TId, 'longText', LongTextConfig & RequiredAs<TRequired>>;
51
- /**
52
- * Rich text: the docs set of built-ins, narrowed by `structure`, `marks` and `multiline`
53
- * @example fields.richText('content', { config: { structure: ['heading', 'bulletList'], marks: ['bold', 'italic', 'link'] } })
54
- */
55
- declare function richText<TId extends string, TRequired extends boolean = false>(id: TId, options?: FieldOptions<RichTextConfig & RequiredAs<TRequired>>): FieldDefinition<TId, 'richText', RichTextConfig & RequiredAs<TRequired>>;
56
- /**
57
- * A table: exactly a rich-text table block's value — rows of formatted cells, an optional header row
58
- * and per-cell alignment — so a comparison table on a page and a table in a doc are one thing
59
- * (REL-1806). Read as `RichTextTable`; `<RichText>` and `richTextToHtml` render it.
60
- * @example fields.table('comparison', { config: { required: true } })
61
- */
62
- declare function table<TId extends string, TRequired extends boolean = false>(id: TId, options?: FieldOptions<TableConfig & RequiredAs<TRequired>>): FieldDefinition<TId, 'table', TableConfig & RequiredAs<TRequired>>;
63
- /**
64
- * Code with tabs: exactly a rich-text code group's value — one tab or more, each with its label,
65
- * language, filename and line range (REL-1806). Read as `RichTextCodeGroup`; `<RichText>` and
66
- * `richTextToHtml` render it.
67
- * @example fields.code('snippet', { config: { languages: ['typescript', 'bash'], maxTabs: 4 } })
68
- */
69
- declare function code<TId extends string, TRequired extends boolean = false>(id: TId, options?: FieldOptions<CodeConfig & RequiredAs<TRequired>>): FieldDefinition<TId, 'code', CodeConfig & RequiredAs<TRequired>>;
70
- /**
71
- * Slug field (URL-friendly identifier)
72
- * @example fields.slug('slug', { config: { sourceField: 'title' } })
73
- */
74
- declare function slug<TId extends string, TRequired extends boolean = false>(id: TId, options?: FieldOptions<SlugConfig & RequiredAs<TRequired>>): FieldDefinition<TId, 'slug', SlugConfig & RequiredAs<TRequired>>;
75
- /**
76
- * URL field with validation
77
- * @example fields.url('website', { config: { allowedProtocols: ['https'] } })
78
- */
79
- declare function url<TId extends string, TRequired extends boolean = false>(id: TId, options?: FieldOptions<UrlConfig & RequiredAs<TRequired>>): FieldDefinition<TId, 'url', UrlConfig & RequiredAs<TRequired>>;
80
- /**
81
- * Email field with validation
82
- * @example fields.email('contactEmail', { config: { required: true } })
83
- */
84
- declare function email<TId extends string, TRequired extends boolean = false>(id: TId, options?: FieldOptions<EmailConfig & RequiredAs<TRequired>>): FieldDefinition<TId, 'email', EmailConfig & RequiredAs<TRequired>>;
85
- /**
86
- * Integer field
87
- * @example fields.integer('quantity', { config: { min: 0, max: 100 } })
88
- */
89
- declare function integer<TId extends string, TRequired extends boolean = false>(id: TId, options?: FieldOptions<IntegerConfig & RequiredAs<TRequired>>): FieldDefinition<TId, 'integer', IntegerConfig & RequiredAs<TRequired>>;
90
- /**
91
- * Decimal field with precision
92
- * @example fields.decimal('weight', { config: { decimalPlaces: 2, min: 0 } })
93
- */
94
- declare function decimal<TId extends string, TRequired extends boolean = false>(id: TId, options?: FieldOptions<DecimalConfig & RequiredAs<TRequired>>): FieldDefinition<TId, 'decimal', DecimalConfig & RequiredAs<TRequired>>;
95
- /**
96
- * Boolean field (true/false toggle)
97
- * @example fields.boolean('isActive', { config: { defaultValue: false } })
98
- */
99
- declare function boolean<TId extends string, TRequired extends boolean = false>(id: TId, options?: FieldOptions<BooleanConfig & RequiredAs<TRequired>>): FieldDefinition<TId, 'boolean', BooleanConfig & RequiredAs<TRequired>>;
100
- /**
101
- * Enum field with predefined options
102
- * @example fields.enum('status', {
103
- * config: {
104
- * options: [
105
- * { value: 'draft', label: 'Draft' },
106
- * { value: 'published', label: 'Published' },
107
- * ]
108
- * }
109
- * })
110
- */
111
- declare function enumField<TId extends string, TValue extends string = string, TMulti extends boolean = false, TRequired extends boolean = false>(id: TId, options?: FieldOptions<EnumConfig<TValue, TMulti> & RequiredAs<TRequired>>): FieldDefinition<TId, 'enum', EnumConfig<TValue, TMulti> & RequiredAs<TRequired>>;
112
- /**
113
- * Date field (no time)
114
- * @example fields.date('publishDate', { config: { minDate: '2024-01-01' } })
115
- */
116
- declare function date<TId extends string, TRequired extends boolean = false>(id: TId, options?: FieldOptions<DateConfig & RequiredAs<TRequired>>): FieldDefinition<TId, 'date', DateConfig & RequiredAs<TRequired>>;
117
- /**
118
- * DateTime field: an instant, stored and read back in UTC whatever offset it is written in.
119
- * `timeZoneHandling` says whether the editor shows it in UTC or in the author's local time.
120
- * @example fields.dateTime('createdAt', { config: { timeZoneHandling: 'UTC' } })
121
- */
122
- declare function dateTime<TId extends string, TRequired extends boolean = false>(id: TId, options?: FieldOptions<DateTimeConfig & RequiredAs<TRequired>>): FieldDefinition<TId, 'dateTime', DateTimeConfig & RequiredAs<TRequired>>;
123
- /**
124
- * Reference to other entries (content types or asset types)
125
- * @example fields.reference('category', { config: { to: 'category' } })
126
- * @example fields.reference('relatedItems', { config: { to: ['product', 'service'], multi: true } })
127
- * @example fields.reference('heroImage', { config: { to: 'productPhoto' } })
128
- */
129
- declare function reference<TId extends string, TTo extends string = string, TMulti extends boolean = false, TRequired extends boolean = false>(id: TId, options?: FieldOptions<ReferenceConfig<TTo, TMulti> & RequiredAs<TRequired>>): FieldDefinition<TId, 'reference', ReferenceConfig<TTo, TMulti> & RequiredAs<TRequired>>;
130
- /**
131
- * Tags field (array of strings with autocomplete)
132
- * @example fields.tags('keywords', { config: { predefinedTags: ['featured', 'sale'], maxTags: 10 } })
133
- */
134
- declare function tags<TId extends string, TRequired extends boolean = false>(id: TId, options?: FieldOptions<TagsConfig & RequiredAs<TRequired>>): FieldDefinition<TId, 'tags', TagsConfig & RequiredAs<TRequired>>;
135
- /**
136
- * List field: a repeatable group of one shape. Each item holds the fields of the fieldset `of`
137
- * names — usually a `fieldset()` value, declared once and passed wherever it is wanted — plus
138
- * `_type` (that fieldset's id) and `_key` (its item key). Without `of`, a list of strings.
139
- * @example fields.list('specifications', {
140
- * config: {
141
- * minItems: 1,
142
- * maxItems: 20,
143
- * of: {
144
- * id: 'spec',
145
- * displayName: 'Specification',
146
- * fields: [
147
- * fields.shortText('name', { config: { required: true } }),
148
- * fields.shortText('value', { config: { required: true } }),
149
- * ],
150
- * },
151
- * },
152
- * })
153
- */
154
- declare function list<TId extends string, TShape extends AnyFieldset = never, TRequired extends boolean = false>(id: TId, options?: FieldOptions<ListConfig<TShape> & RequiredAs<TRequired>>): FieldDefinition<TId, 'list', ListConfig<TShape> & RequiredAs<TRequired>>;
155
- /**
156
- * Object field: one value of a shape. It holds the fields of the fieldset `of` names — usually a
157
- * `fieldset()` value, declared once and passed wherever it is wanted — plus `_type` (that
158
- * fieldset's id) and `_key`. Or of one of several shapes, `_type` saying which (REL-1799).
159
- * @example fields.object('seo', {
160
- * config: {
161
- * of: { id: 'seo', displayName: 'SEO', fields: [fields.shortText('metaTitle')] },
162
- * },
163
- * })
164
- * @example fields.object('media', {
165
- * config: {
166
- * required: true,
167
- * of: [
168
- * { id: 'screenshot', displayName: 'Screenshot', fields: [fields.reference('image', { config: { to: 'image' } })] },
169
- * { id: 'video', displayName: 'Video', fields: [fields.url('src', { config: { required: true } })] },
170
- * ],
171
- * },
172
- * })
173
- */
174
- declare function object<TId extends string, TShape extends AnyFieldset, TRequired extends boolean = false>(id: TId, options: Omit<FieldOptions<ObjectConfig<TShape> & RequiredAs<TRequired>>, 'config'> & {
175
- config: ObjectConfig<TShape> & RequiredAs<TRequired>;
176
- }): FieldDefinition<TId, 'object', ObjectConfig<TShape> & RequiredAs<TRequired>>;
1
+ export { I as AggregateBlock, B as BUILT_IN_ROLES, v as BUILT_IN_ROLE_ACTIONS, w as BuiltInRole, _ as CachePolicy, $ as CachePolicyObject, H as FetchBlock, F as FieldVisibility, Z as FilterDefinition, G as FullTextSearch, N as HavingOperator, V as IncludeDefinition, X as IncludeRelationship, a1 as IncludeSubQueries, a0 as IncludeSubQuery, a7 as InferQueryParams, a6 as InferQueryResponse, q as LocaleDefinition, L as LocaleOptions, a2 as Parameterizable, a5 as QueryCardinality, Q as QueryConfig, D as QueryDefinition, a3 as QueryParameter, a4 as QueryParameterType, O as QueryScalar, E as QueryType, R as ROLE_ACTIONS, y as ResourcePermission, x as RoleAction, z as RoleConfig, A as RoleDefinition, h as SchemaAssetTypeNames, S as SchemaConfig, b as SchemaContentTypeNames, a as SchemaDefinition, i as SchemaEntry, j as SchemaEntryOf, f as SchemaLocaleCodes, e as SchemaQueryNames, g as SchemaSettingsGroupNames, c as SchemaSingletonNames, J as SearchBlock, Y as SelectMapping, P as SortCondition, U as SortDirection, T as TextDirection, W as WhereCondition, M as WhereOperator, K as WhereValue, p as buildFallbackChain, k as defineLocale, C as defineQuery, r as defineRole, d as defineSchema, n as findDefaultLocale, o as getActiveLocales, u as getBuiltInRoleActions, m as getLocaleCodes, t as isBuiltInRole, l as isLocaleDefinition, s as isRoleDefinition } from '../define-schema-sWJ8Zn7C.cjs';
2
+ import { A as AIConfig, a as AnyFieldDefinition, b as AssetAIConfig, B as BaseFieldConfig, c as BooleanConfig, C as CodeConfig, D as DateConfig, d as DateTimeConfig, e as DecimalConfig, E as EmailConfig, f as EnumConfig, F as FieldAIConfig, g as FieldDefinition, h as FieldRule, i as FieldType, j as FieldUIConfig, I as IntegerConfig, J as JsonConfig, L as ListConfig, k as LocalizationConfig, l as LongTextConfig, O as ObjectConfig, R as ReadOnlyRule, m as ReferenceConfig, n as RequirementRule, o as RichTextConfig, p as RichTextLinks, q as RuleCondition, r as RuleConditions, S as ShortTextConfig, s as SlugConfig, T as TableConfig, t as TagsConfig, U as UrlConfig, V as ValidationRule, u as VisibilityRule, v as boolean, w as code, x as date, y as dateTime, z as decimal, G as email, H as enumField, K as integer, M as json, N as list, P as longText, Q as object, W as reference, X as richText, Y as shortText, Z as slug, _ as table, $ as tags, a0 as url } from '../include-paths-Bs5FhNw2.cjs';
3
+ export { bl as AllScopeConfig, a9 as AssetReading, aJ as AssetServedBlocks, aF as AssetTypeConfig, aG as AssetTypeDefinition, a7 as BlockOf, ab as CheckInclude, aa as CheckedIncludes, ac as ContentReading, an as ContentTypeConfig, ao as ContentTypeDefinition, bi as ContentTypeScopeConfig, bf as ContentTypeWorkflowConfig, bj as ContentTypesScopeConfig, a4 as DeclaredFields, ap as EntryMetadata, bk as EntryTypeScopeConfig, am as FieldMember, a1 as FieldSchemaContext, a2 as FieldValue, a3 as FieldValues, al as Fieldset, aM as FileKindConfig, a_ as FileScanConfig, aZ as FileUploadConfig, aS as ImageExifConfig, aO as ImageFitMode, aK as ImageKindConfig, aP as ImageOutputFormat, aR as ImageSourceConfig, aN as ImageTransform, aQ as ImageUploadConfig, ad as IncludablePaths, aI as InferAssetEntry, aH as InferAssetType, aq as InferContentType, bt as InferJsonSchema, aD as InferSettingsGroup, ay as InferSingleton, ax as InferSingletonContentType, bu as JsonFieldValue, bv as JsonSchema, bw as JsonValue, a6 as Keyed, ar as LocalePublicationFields, af as ReadWith, ae as Reading, aA as SettingsGroupConfig, aB as SettingsGroupDefinition, aC as SettingsGroupMetadata, ag as SettingsReading, a8 as ShapeValue, au as SingletonConfig, av as SingletonContentTypeDefinition, aw as SingletonMetadata, ah as SingletonReading, a5 as UnresolvedEntry, ai as UntypedReading, aT as VariantDefinition, aW as VideoCaptionsConfig, aX as VideoDownloadConfig, aL as VideoKindConfig, aV as VideoPosterConfig, aU as VideoUploadConfig, aY as VideoWatermarkConfig, br as ViewConfig, bs as ViewDefinition, bq as ViewFilter, bp as ViewFilterCondition, bm as ViewFilterOperator, bo as ViewFilterRelativeDate, bn as ViewFilterValue, bh as ViewScopeConfig, ba as WorkflowAutoAssign, bd as WorkflowConfig, be as WorkflowDefinition, b9 as WorkflowEscalation, bb as WorkflowStageConfig, bc as WorkflowStageDefinition, aE as defineAssetType, aj as defineContentType, b1 as defineContentTypeWorkflow, az as defineSettingsGroup, at as defineSingleton, as as defineSingletonContentType, bg as defineView, a$ as defineWorkflow, b0 as defineWorkflowStage, ak as fieldset, b5 as findWorkflowStage, b7 as getFirstWorkflowStage, b6 as getNextWorkflowStage, b4 as getWorkflowStageIds, b8 as isFinalWorkflowStage, b2 as isWorkflowDefinition, b3 as isWorkflowStageDefinition } from '../include-paths-Bs5FhNw2.cjs';
4
+ import '../rich-text.d-BWc-5gX1.cjs';
177
5
 
178
6
  /**
179
7
  * Field builders for defining schema fields
@@ -206,6 +34,7 @@ declare const fieldBuilders_FieldRule: typeof FieldRule;
206
34
  declare const fieldBuilders_FieldType: typeof FieldType;
207
35
  declare const fieldBuilders_FieldUIConfig: typeof FieldUIConfig;
208
36
  declare const fieldBuilders_IntegerConfig: typeof IntegerConfig;
37
+ declare const fieldBuilders_JsonConfig: typeof JsonConfig;
209
38
  declare const fieldBuilders_ListConfig: typeof ListConfig;
210
39
  declare const fieldBuilders_LocalizationConfig: typeof LocalizationConfig;
211
40
  declare const fieldBuilders_LongTextConfig: typeof LongTextConfig;
@@ -214,6 +43,7 @@ declare const fieldBuilders_ReadOnlyRule: typeof ReadOnlyRule;
214
43
  declare const fieldBuilders_ReferenceConfig: typeof ReferenceConfig;
215
44
  declare const fieldBuilders_RequirementRule: typeof RequirementRule;
216
45
  declare const fieldBuilders_RichTextConfig: typeof RichTextConfig;
46
+ declare const fieldBuilders_RichTextLinks: typeof RichTextLinks;
217
47
  declare const fieldBuilders_RuleCondition: typeof RuleCondition;
218
48
  declare const fieldBuilders_RuleConditions: typeof RuleConditions;
219
49
  declare const fieldBuilders_ShortTextConfig: typeof ShortTextConfig;
@@ -230,6 +60,7 @@ declare const fieldBuilders_dateTime: typeof dateTime;
230
60
  declare const fieldBuilders_decimal: typeof decimal;
231
61
  declare const fieldBuilders_email: typeof email;
232
62
  declare const fieldBuilders_integer: typeof integer;
63
+ declare const fieldBuilders_json: typeof json;
233
64
  declare const fieldBuilders_list: typeof list;
234
65
  declare const fieldBuilders_longText: typeof longText;
235
66
  declare const fieldBuilders_object: typeof object;
@@ -241,7 +72,7 @@ declare const fieldBuilders_table: typeof table;
241
72
  declare const fieldBuilders_tags: typeof tags;
242
73
  declare const fieldBuilders_url: typeof url;
243
74
  declare namespace fieldBuilders {
244
- export { fieldBuilders_AIConfig as AIConfig, fieldBuilders_AnyFieldDefinition as AnyFieldDefinition, fieldBuilders_AssetAIConfig as AssetAIConfig, fieldBuilders_BaseFieldConfig as BaseFieldConfig, fieldBuilders_BooleanConfig as BooleanConfig, fieldBuilders_CodeConfig as CodeConfig, fieldBuilders_DateConfig as DateConfig, fieldBuilders_DateTimeConfig as DateTimeConfig, fieldBuilders_DecimalConfig as DecimalConfig, fieldBuilders_EmailConfig as EmailConfig, fieldBuilders_EnumConfig as EnumConfig, fieldBuilders_FieldAIConfig as FieldAIConfig, fieldBuilders_FieldDefinition as FieldDefinition, fieldBuilders_FieldRule as FieldRule, fieldBuilders_FieldType as FieldType, fieldBuilders_FieldUIConfig as FieldUIConfig, fieldBuilders_IntegerConfig as IntegerConfig, fieldBuilders_ListConfig as ListConfig, fieldBuilders_LocalizationConfig as LocalizationConfig, fieldBuilders_LongTextConfig as LongTextConfig, fieldBuilders_ObjectConfig as ObjectConfig, fieldBuilders_ReadOnlyRule as ReadOnlyRule, fieldBuilders_ReferenceConfig as ReferenceConfig, fieldBuilders_RequirementRule as RequirementRule, fieldBuilders_RichTextConfig as RichTextConfig, fieldBuilders_RuleCondition as RuleCondition, fieldBuilders_RuleConditions as RuleConditions, fieldBuilders_ShortTextConfig as ShortTextConfig, fieldBuilders_SlugConfig as SlugConfig, fieldBuilders_TableConfig as TableConfig, fieldBuilders_TagsConfig as TagsConfig, fieldBuilders_UrlConfig as UrlConfig, fieldBuilders_ValidationRule as ValidationRule, fieldBuilders_VisibilityRule as VisibilityRule, fieldBuilders_boolean as boolean, fieldBuilders_code as code, fieldBuilders_date as date, fieldBuilders_dateTime as dateTime, fieldBuilders_decimal as decimal, fieldBuilders_email as email, enumField as enum, fieldBuilders_integer as integer, fieldBuilders_list as list, fieldBuilders_longText as longText, fieldBuilders_object as object, fieldBuilders_reference as reference, fieldBuilders_richText as richText, fieldBuilders_shortText as shortText, fieldBuilders_slug as slug, fieldBuilders_table as table, fieldBuilders_tags as tags, fieldBuilders_url as url };
75
+ export { fieldBuilders_AIConfig as AIConfig, fieldBuilders_AnyFieldDefinition as AnyFieldDefinition, fieldBuilders_AssetAIConfig as AssetAIConfig, fieldBuilders_BaseFieldConfig as BaseFieldConfig, fieldBuilders_BooleanConfig as BooleanConfig, fieldBuilders_CodeConfig as CodeConfig, fieldBuilders_DateConfig as DateConfig, fieldBuilders_DateTimeConfig as DateTimeConfig, fieldBuilders_DecimalConfig as DecimalConfig, fieldBuilders_EmailConfig as EmailConfig, fieldBuilders_EnumConfig as EnumConfig, fieldBuilders_FieldAIConfig as FieldAIConfig, fieldBuilders_FieldDefinition as FieldDefinition, fieldBuilders_FieldRule as FieldRule, fieldBuilders_FieldType as FieldType, fieldBuilders_FieldUIConfig as FieldUIConfig, fieldBuilders_IntegerConfig as IntegerConfig, fieldBuilders_JsonConfig as JsonConfig, fieldBuilders_ListConfig as ListConfig, fieldBuilders_LocalizationConfig as LocalizationConfig, fieldBuilders_LongTextConfig as LongTextConfig, fieldBuilders_ObjectConfig as ObjectConfig, fieldBuilders_ReadOnlyRule as ReadOnlyRule, fieldBuilders_ReferenceConfig as ReferenceConfig, fieldBuilders_RequirementRule as RequirementRule, fieldBuilders_RichTextConfig as RichTextConfig, fieldBuilders_RichTextLinks as RichTextLinks, fieldBuilders_RuleCondition as RuleCondition, fieldBuilders_RuleConditions as RuleConditions, fieldBuilders_ShortTextConfig as ShortTextConfig, fieldBuilders_SlugConfig as SlugConfig, fieldBuilders_TableConfig as TableConfig, fieldBuilders_TagsConfig as TagsConfig, fieldBuilders_UrlConfig as UrlConfig, fieldBuilders_ValidationRule as ValidationRule, fieldBuilders_VisibilityRule as VisibilityRule, fieldBuilders_boolean as boolean, fieldBuilders_code as code, fieldBuilders_date as date, fieldBuilders_dateTime as dateTime, fieldBuilders_decimal as decimal, fieldBuilders_email as email, enumField as enum, fieldBuilders_integer as integer, fieldBuilders_json as json, fieldBuilders_list as list, fieldBuilders_longText as longText, fieldBuilders_object as object, fieldBuilders_reference as reference, fieldBuilders_richText as richText, fieldBuilders_shortText as shortText, fieldBuilders_slug as slug, fieldBuilders_table as table, fieldBuilders_tags as tags, fieldBuilders_url as url };
245
76
  }
246
77
 
247
78
  /**
@@ -275,4 +106,4 @@ declare namespace fieldBuilders {
275
106
 
276
107
  declare const fields: typeof fieldBuilders;
277
108
 
278
- export { AIConfig, AssetAIConfig, BaseFieldConfig, BooleanConfig, CodeConfig, DateConfig, DateTimeConfig, DecimalConfig, EmailConfig, EnumConfig, FieldAIConfig, FieldDefinition, FieldRule, FieldType, FieldUIConfig, IntegerConfig, ListConfig, LocalizationConfig, LongTextConfig, ObjectConfig, ReadOnlyRule, ReferenceConfig, RequirementRule, RichTextConfig, RuleCondition, RuleConditions, ShortTextConfig, SlugConfig, TableConfig, TagsConfig, UrlConfig, ValidationRule, VisibilityRule, fields };
109
+ export { AIConfig, AssetAIConfig, BaseFieldConfig, BooleanConfig, CodeConfig, DateConfig, DateTimeConfig, DecimalConfig, EmailConfig, EnumConfig, FieldAIConfig, FieldDefinition, FieldRule, FieldType, FieldUIConfig, IntegerConfig, JsonConfig, ListConfig, LocalizationConfig, LongTextConfig, ObjectConfig, ReadOnlyRule, ReferenceConfig, RequirementRule, RichTextConfig, RichTextLinks, RuleCondition, RuleConditions, ShortTextConfig, SlugConfig, TableConfig, TagsConfig, UrlConfig, ValidationRule, VisibilityRule, fields };