@relyio/sdk 0.11.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.
- package/CHANGELOG.md +172 -0
- package/dist/chunk-3NPPMGB6.js +1092 -0
- package/dist/{chunk-7GLDVHIH.js → chunk-6NGJXLOR.js} +65 -67
- package/dist/{chunk-4HTIU5YE.cjs → chunk-DEDIJKHY.cjs} +65 -67
- package/dist/{chunk-2TIJLV2X.js → chunk-EW23SZPX.js} +43 -65
- package/dist/{chunk-PO7CUR5U.cjs → chunk-FOSM4LMM.cjs} +42 -65
- package/dist/chunk-Z6GLWSSD.cjs +1106 -0
- package/dist/client/index.cjs +3 -3
- package/dist/client/index.d.cts +4 -4
- package/dist/client/index.d.ts +4 -4
- package/dist/client/index.js +1 -1
- package/dist/{define-schema-CVi8nwc7.d.ts → define-schema-UHViXKiv.d.ts} +33 -435
- package/dist/{define-schema-DqpipEHv.d.cts → define-schema-sWJ8Zn7C.d.cts} +33 -435
- package/dist/{define-content-type-ENAod5Ve.d.cts → include-paths-Bs5FhNw2.d.cts} +3505 -483
- package/dist/{define-content-type-ENAod5Ve.d.ts → include-paths-Cb7iPCW2.d.ts} +3505 -483
- package/dist/index--_u1nPHv.d.cts +507 -0
- package/dist/index-8DozAWsA.d.ts +507 -0
- package/dist/{index-MLAFUuco.d.cts → index-BT0L8xJj.d.cts} +139 -90
- package/dist/{index-BKEAYvvz.d.ts → index-CPjJ25R4.d.ts} +139 -90
- package/dist/index.cjs +134 -110
- package/dist/index.d.cts +44 -71
- package/dist/index.d.ts +44 -71
- package/dist/index.js +5 -28
- package/dist/markdown/index.cjs +13750 -0
- package/dist/markdown/index.d.cts +111 -0
- package/dist/markdown/index.d.ts +111 -0
- package/dist/markdown/index.js +13742 -0
- package/dist/rich-text/index.cjs +49 -0
- package/dist/rich-text/index.d.cts +3 -0
- package/dist/rich-text/index.d.ts +3 -0
- package/dist/rich-text/index.js +4 -0
- package/dist/rich-text.d-BWc-5gX1.d.cts +326 -0
- package/dist/rich-text.d-BWc-5gX1.d.ts +326 -0
- package/dist/schema/index.cjs +34 -38
- package/dist/schema/index.d.cts +15 -137
- package/dist/schema/index.d.ts +15 -137
- package/dist/schema/index.js +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/package.json +19 -2
- package/dist/.tsbuildinfo +0 -1
- package/dist/index-BM42r4yg.d.cts +0 -860
- package/dist/index-C73cK2Tt.d.ts +0 -860
package/dist/schema/index.d.cts
CHANGED
|
@@ -1,134 +1,7 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Field builders for defining schema fields
|
|
7
|
-
* Matches the @relyio/schema FieldSchema structure
|
|
8
|
-
*
|
|
9
|
-
* All builders are generic over the ID to preserve literal types for type inference. `enum`,
|
|
10
|
-
* `reference` and `list` are generic over the parts of their config a read's type depends on too —
|
|
11
|
-
* the option values, the targets, `multi` and the subfields — each through a type parameter with a
|
|
12
|
-
* primitive or field constraint, which is what keeps a literal from widening without a `const`
|
|
13
|
-
* type parameter (the package supports TypeScript 4.9, which has none).
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
interface FieldOptions<TConfig> {
|
|
17
|
-
/** Type-specific configuration */
|
|
18
|
-
config?: TConfig;
|
|
19
|
-
/** UI display configuration */
|
|
20
|
-
ui?: FieldUIConfig;
|
|
21
|
-
/** AI configuration: generation/review guidance (`instructions`) for this field. */
|
|
22
|
-
ai?: FieldAIConfig;
|
|
23
|
-
/** Dynamic field rules */
|
|
24
|
-
rules?: FieldRule[];
|
|
25
|
-
/** Localization settings */
|
|
26
|
-
localization?: LocalizationConfig;
|
|
27
|
-
/** Fallback value */
|
|
28
|
-
fallback?: unknown;
|
|
29
|
-
/** Whether this field is deprecated */
|
|
30
|
-
deprecated?: boolean;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Short text field (single line)
|
|
34
|
-
* @example fields.shortText('title', { config: { required: true, maxLength: 200 } })
|
|
35
|
-
*/
|
|
36
|
-
declare function shortText<TId extends string>(id: TId, options?: FieldOptions<ShortTextConfig>): FieldDefinition<TId, 'shortText', ShortTextConfig>;
|
|
37
|
-
/**
|
|
38
|
-
* Long text field (multi-line textarea)
|
|
39
|
-
* @example fields.longText('description', { config: { maxLength: 5000 } })
|
|
40
|
-
*/
|
|
41
|
-
declare function longText<TId extends string>(id: TId, options?: FieldOptions<LongTextConfig>): FieldDefinition<TId, 'longText', LongTextConfig>;
|
|
42
|
-
/**
|
|
43
|
-
* Rich text field with formatting
|
|
44
|
-
* @example fields.richText('content', { config: { allowedFormats: ['bold', 'italic'] } })
|
|
45
|
-
*/
|
|
46
|
-
declare function richText<TId extends string>(id: TId, options?: FieldOptions<RichTextConfig>): FieldDefinition<TId, 'richText', RichTextConfig>;
|
|
47
|
-
/**
|
|
48
|
-
* Slug field (URL-friendly identifier)
|
|
49
|
-
* @example fields.slug('slug', { config: { sourceField: 'title' } })
|
|
50
|
-
*/
|
|
51
|
-
declare function slug<TId extends string>(id: TId, options?: FieldOptions<SlugConfig>): FieldDefinition<TId, 'slug', SlugConfig>;
|
|
52
|
-
/**
|
|
53
|
-
* URL field with validation
|
|
54
|
-
* @example fields.url('website', { config: { allowedProtocols: ['https'] } })
|
|
55
|
-
*/
|
|
56
|
-
declare function url<TId extends string>(id: TId, options?: FieldOptions<UrlConfig>): FieldDefinition<TId, 'url', UrlConfig>;
|
|
57
|
-
/**
|
|
58
|
-
* Email field with validation
|
|
59
|
-
* @example fields.email('contactEmail', { config: { required: true } })
|
|
60
|
-
*/
|
|
61
|
-
declare function email<TId extends string>(id: TId, options?: FieldOptions<EmailConfig>): FieldDefinition<TId, 'email', EmailConfig>;
|
|
62
|
-
/**
|
|
63
|
-
* Integer field
|
|
64
|
-
* @example fields.integer('quantity', { config: { min: 0, max: 100 } })
|
|
65
|
-
*/
|
|
66
|
-
declare function integer<TId extends string>(id: TId, options?: FieldOptions<IntegerConfig>): FieldDefinition<TId, 'integer', IntegerConfig>;
|
|
67
|
-
/**
|
|
68
|
-
* Decimal field with precision
|
|
69
|
-
* @example fields.decimal('weight', { config: { decimalPlaces: 2, min: 0 } })
|
|
70
|
-
*/
|
|
71
|
-
declare function decimal<TId extends string>(id: TId, options?: FieldOptions<DecimalConfig>): FieldDefinition<TId, 'decimal', DecimalConfig>;
|
|
72
|
-
/**
|
|
73
|
-
* Boolean field (true/false toggle)
|
|
74
|
-
* @example fields.boolean('isActive', { config: { defaultValue: false } })
|
|
75
|
-
*/
|
|
76
|
-
declare function boolean<TId extends string>(id: TId, options?: FieldOptions<BooleanConfig>): FieldDefinition<TId, 'boolean', BooleanConfig>;
|
|
77
|
-
/**
|
|
78
|
-
* Enum field with predefined options
|
|
79
|
-
* @example fields.enum('status', {
|
|
80
|
-
* config: {
|
|
81
|
-
* options: [
|
|
82
|
-
* { value: 'draft', label: 'Draft' },
|
|
83
|
-
* { value: 'published', label: 'Published' },
|
|
84
|
-
* ]
|
|
85
|
-
* }
|
|
86
|
-
* })
|
|
87
|
-
*/
|
|
88
|
-
declare function enumField<TId extends string, TValue extends string = string, TMulti extends boolean = false>(id: TId, options?: FieldOptions<EnumConfig<TValue, TMulti>>): FieldDefinition<TId, 'enum', EnumConfig<TValue, TMulti>>;
|
|
89
|
-
/**
|
|
90
|
-
* Date field (no time)
|
|
91
|
-
* @example fields.date('publishDate', { config: { minDate: '2024-01-01' } })
|
|
92
|
-
*/
|
|
93
|
-
declare function date<TId extends string>(id: TId, options?: FieldOptions<DateConfig>): FieldDefinition<TId, 'date', DateConfig>;
|
|
94
|
-
/**
|
|
95
|
-
* DateTime field: an instant, stored and read back in UTC whatever offset it is written in.
|
|
96
|
-
* `timeZoneHandling` says whether the editor shows it in UTC or in the author's local time.
|
|
97
|
-
* @example fields.dateTime('createdAt', { config: { timeZoneHandling: 'UTC' } })
|
|
98
|
-
*/
|
|
99
|
-
declare function dateTime<TId extends string>(id: TId, options?: FieldOptions<DateTimeConfig>): FieldDefinition<TId, 'dateTime', DateTimeConfig>;
|
|
100
|
-
/**
|
|
101
|
-
* Reference to other entries (content types or asset types)
|
|
102
|
-
* @example fields.reference('category', { config: { to: 'category' } })
|
|
103
|
-
* @example fields.reference('relatedItems', { config: { to: ['product', 'service'], multi: true } })
|
|
104
|
-
* @example fields.reference('heroImage', { config: { to: 'productPhoto' } })
|
|
105
|
-
*/
|
|
106
|
-
declare function reference<TId extends string, TTo extends string = string, TMulti extends boolean = false>(id: TId, options?: FieldOptions<ReferenceConfig<TTo, TMulti>>): FieldDefinition<TId, 'reference', ReferenceConfig<TTo, TMulti>>;
|
|
107
|
-
/**
|
|
108
|
-
* Tags field (array of strings with autocomplete)
|
|
109
|
-
* @example fields.tags('keywords', { config: { predefinedTags: ['featured', 'sale'], maxTags: 10 } })
|
|
110
|
-
*/
|
|
111
|
-
declare function tags<TId extends string>(id: TId, options?: FieldOptions<TagsConfig>): FieldDefinition<TId, 'tags', TagsConfig>;
|
|
112
|
-
/**
|
|
113
|
-
* List field (array of complex items)
|
|
114
|
-
* @example fields.list('specifications', {
|
|
115
|
-
* config: {
|
|
116
|
-
* minItems: 1,
|
|
117
|
-
* maxItems: 20,
|
|
118
|
-
* subfields: [
|
|
119
|
-
* fields.shortText('name', { config: { required: true } }),
|
|
120
|
-
* fields.shortText('value', { config: { required: true } }),
|
|
121
|
-
* ]
|
|
122
|
-
* }
|
|
123
|
-
* })
|
|
124
|
-
*/
|
|
125
|
-
declare function list<TId extends string, TSubfields extends readonly AnyFieldDefinition[] = readonly []>(id: TId, options?: FieldOptions<ListConfig<TSubfields>>): FieldDefinition<TId, 'list', ListConfig<TSubfields>>;
|
|
126
|
-
/**
|
|
127
|
-
* Component field (reusable field group)
|
|
128
|
-
* @example fields.component('seo', 'seoMetadata')
|
|
129
|
-
* @example fields.component('seo', 'seoMetadata', { config: { required: true } })
|
|
130
|
-
*/
|
|
131
|
-
declare function component<TId extends string, TComponentId extends string>(id: TId, componentId: TComponentId, options?: FieldOptions<ComponentFieldConfig>): FieldDefinition<TId, `component(${TComponentId})`, ComponentFieldConfig>;
|
|
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';
|
|
132
5
|
|
|
133
6
|
/**
|
|
134
7
|
* Field builders for defining schema fields
|
|
@@ -145,13 +18,11 @@ declare function component<TId extends string, TComponentId extends string>(id:
|
|
|
145
18
|
*/
|
|
146
19
|
|
|
147
20
|
declare const fieldBuilders_AIConfig: typeof AIConfig;
|
|
148
|
-
declare const fieldBuilders_AllFieldTypes: typeof AllFieldTypes;
|
|
149
21
|
declare const fieldBuilders_AnyFieldDefinition: typeof AnyFieldDefinition;
|
|
150
22
|
declare const fieldBuilders_AssetAIConfig: typeof AssetAIConfig;
|
|
151
23
|
declare const fieldBuilders_BaseFieldConfig: typeof BaseFieldConfig;
|
|
152
24
|
declare const fieldBuilders_BooleanConfig: typeof BooleanConfig;
|
|
153
|
-
declare const
|
|
154
|
-
declare const fieldBuilders_ComponentFieldType: typeof ComponentFieldType;
|
|
25
|
+
declare const fieldBuilders_CodeConfig: typeof CodeConfig;
|
|
155
26
|
declare const fieldBuilders_DateConfig: typeof DateConfig;
|
|
156
27
|
declare const fieldBuilders_DateTimeConfig: typeof DateTimeConfig;
|
|
157
28
|
declare const fieldBuilders_DecimalConfig: typeof DecimalConfig;
|
|
@@ -163,38 +34,45 @@ declare const fieldBuilders_FieldRule: typeof FieldRule;
|
|
|
163
34
|
declare const fieldBuilders_FieldType: typeof FieldType;
|
|
164
35
|
declare const fieldBuilders_FieldUIConfig: typeof FieldUIConfig;
|
|
165
36
|
declare const fieldBuilders_IntegerConfig: typeof IntegerConfig;
|
|
37
|
+
declare const fieldBuilders_JsonConfig: typeof JsonConfig;
|
|
166
38
|
declare const fieldBuilders_ListConfig: typeof ListConfig;
|
|
167
39
|
declare const fieldBuilders_LocalizationConfig: typeof LocalizationConfig;
|
|
168
40
|
declare const fieldBuilders_LongTextConfig: typeof LongTextConfig;
|
|
41
|
+
declare const fieldBuilders_ObjectConfig: typeof ObjectConfig;
|
|
169
42
|
declare const fieldBuilders_ReadOnlyRule: typeof ReadOnlyRule;
|
|
170
43
|
declare const fieldBuilders_ReferenceConfig: typeof ReferenceConfig;
|
|
171
44
|
declare const fieldBuilders_RequirementRule: typeof RequirementRule;
|
|
172
45
|
declare const fieldBuilders_RichTextConfig: typeof RichTextConfig;
|
|
46
|
+
declare const fieldBuilders_RichTextLinks: typeof RichTextLinks;
|
|
173
47
|
declare const fieldBuilders_RuleCondition: typeof RuleCondition;
|
|
174
48
|
declare const fieldBuilders_RuleConditions: typeof RuleConditions;
|
|
175
49
|
declare const fieldBuilders_ShortTextConfig: typeof ShortTextConfig;
|
|
176
50
|
declare const fieldBuilders_SlugConfig: typeof SlugConfig;
|
|
51
|
+
declare const fieldBuilders_TableConfig: typeof TableConfig;
|
|
177
52
|
declare const fieldBuilders_TagsConfig: typeof TagsConfig;
|
|
178
53
|
declare const fieldBuilders_UrlConfig: typeof UrlConfig;
|
|
179
54
|
declare const fieldBuilders_ValidationRule: typeof ValidationRule;
|
|
180
55
|
declare const fieldBuilders_VisibilityRule: typeof VisibilityRule;
|
|
181
56
|
declare const fieldBuilders_boolean: typeof boolean;
|
|
182
|
-
declare const
|
|
57
|
+
declare const fieldBuilders_code: typeof code;
|
|
183
58
|
declare const fieldBuilders_date: typeof date;
|
|
184
59
|
declare const fieldBuilders_dateTime: typeof dateTime;
|
|
185
60
|
declare const fieldBuilders_decimal: typeof decimal;
|
|
186
61
|
declare const fieldBuilders_email: typeof email;
|
|
187
62
|
declare const fieldBuilders_integer: typeof integer;
|
|
63
|
+
declare const fieldBuilders_json: typeof json;
|
|
188
64
|
declare const fieldBuilders_list: typeof list;
|
|
189
65
|
declare const fieldBuilders_longText: typeof longText;
|
|
66
|
+
declare const fieldBuilders_object: typeof object;
|
|
190
67
|
declare const fieldBuilders_reference: typeof reference;
|
|
191
68
|
declare const fieldBuilders_richText: typeof richText;
|
|
192
69
|
declare const fieldBuilders_shortText: typeof shortText;
|
|
193
70
|
declare const fieldBuilders_slug: typeof slug;
|
|
71
|
+
declare const fieldBuilders_table: typeof table;
|
|
194
72
|
declare const fieldBuilders_tags: typeof tags;
|
|
195
73
|
declare const fieldBuilders_url: typeof url;
|
|
196
74
|
declare namespace fieldBuilders {
|
|
197
|
-
export { fieldBuilders_AIConfig as AIConfig,
|
|
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 };
|
|
198
76
|
}
|
|
199
77
|
|
|
200
78
|
/**
|
|
@@ -228,4 +106,4 @@ declare namespace fieldBuilders {
|
|
|
228
106
|
|
|
229
107
|
declare const fields: typeof fieldBuilders;
|
|
230
108
|
|
|
231
|
-
export { AIConfig,
|
|
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 };
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -1,134 +1,7 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Field builders for defining schema fields
|
|
7
|
-
* Matches the @relyio/schema FieldSchema structure
|
|
8
|
-
*
|
|
9
|
-
* All builders are generic over the ID to preserve literal types for type inference. `enum`,
|
|
10
|
-
* `reference` and `list` are generic over the parts of their config a read's type depends on too —
|
|
11
|
-
* the option values, the targets, `multi` and the subfields — each through a type parameter with a
|
|
12
|
-
* primitive or field constraint, which is what keeps a literal from widening without a `const`
|
|
13
|
-
* type parameter (the package supports TypeScript 4.9, which has none).
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
interface FieldOptions<TConfig> {
|
|
17
|
-
/** Type-specific configuration */
|
|
18
|
-
config?: TConfig;
|
|
19
|
-
/** UI display configuration */
|
|
20
|
-
ui?: FieldUIConfig;
|
|
21
|
-
/** AI configuration: generation/review guidance (`instructions`) for this field. */
|
|
22
|
-
ai?: FieldAIConfig;
|
|
23
|
-
/** Dynamic field rules */
|
|
24
|
-
rules?: FieldRule[];
|
|
25
|
-
/** Localization settings */
|
|
26
|
-
localization?: LocalizationConfig;
|
|
27
|
-
/** Fallback value */
|
|
28
|
-
fallback?: unknown;
|
|
29
|
-
/** Whether this field is deprecated */
|
|
30
|
-
deprecated?: boolean;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Short text field (single line)
|
|
34
|
-
* @example fields.shortText('title', { config: { required: true, maxLength: 200 } })
|
|
35
|
-
*/
|
|
36
|
-
declare function shortText<TId extends string>(id: TId, options?: FieldOptions<ShortTextConfig>): FieldDefinition<TId, 'shortText', ShortTextConfig>;
|
|
37
|
-
/**
|
|
38
|
-
* Long text field (multi-line textarea)
|
|
39
|
-
* @example fields.longText('description', { config: { maxLength: 5000 } })
|
|
40
|
-
*/
|
|
41
|
-
declare function longText<TId extends string>(id: TId, options?: FieldOptions<LongTextConfig>): FieldDefinition<TId, 'longText', LongTextConfig>;
|
|
42
|
-
/**
|
|
43
|
-
* Rich text field with formatting
|
|
44
|
-
* @example fields.richText('content', { config: { allowedFormats: ['bold', 'italic'] } })
|
|
45
|
-
*/
|
|
46
|
-
declare function richText<TId extends string>(id: TId, options?: FieldOptions<RichTextConfig>): FieldDefinition<TId, 'richText', RichTextConfig>;
|
|
47
|
-
/**
|
|
48
|
-
* Slug field (URL-friendly identifier)
|
|
49
|
-
* @example fields.slug('slug', { config: { sourceField: 'title' } })
|
|
50
|
-
*/
|
|
51
|
-
declare function slug<TId extends string>(id: TId, options?: FieldOptions<SlugConfig>): FieldDefinition<TId, 'slug', SlugConfig>;
|
|
52
|
-
/**
|
|
53
|
-
* URL field with validation
|
|
54
|
-
* @example fields.url('website', { config: { allowedProtocols: ['https'] } })
|
|
55
|
-
*/
|
|
56
|
-
declare function url<TId extends string>(id: TId, options?: FieldOptions<UrlConfig>): FieldDefinition<TId, 'url', UrlConfig>;
|
|
57
|
-
/**
|
|
58
|
-
* Email field with validation
|
|
59
|
-
* @example fields.email('contactEmail', { config: { required: true } })
|
|
60
|
-
*/
|
|
61
|
-
declare function email<TId extends string>(id: TId, options?: FieldOptions<EmailConfig>): FieldDefinition<TId, 'email', EmailConfig>;
|
|
62
|
-
/**
|
|
63
|
-
* Integer field
|
|
64
|
-
* @example fields.integer('quantity', { config: { min: 0, max: 100 } })
|
|
65
|
-
*/
|
|
66
|
-
declare function integer<TId extends string>(id: TId, options?: FieldOptions<IntegerConfig>): FieldDefinition<TId, 'integer', IntegerConfig>;
|
|
67
|
-
/**
|
|
68
|
-
* Decimal field with precision
|
|
69
|
-
* @example fields.decimal('weight', { config: { decimalPlaces: 2, min: 0 } })
|
|
70
|
-
*/
|
|
71
|
-
declare function decimal<TId extends string>(id: TId, options?: FieldOptions<DecimalConfig>): FieldDefinition<TId, 'decimal', DecimalConfig>;
|
|
72
|
-
/**
|
|
73
|
-
* Boolean field (true/false toggle)
|
|
74
|
-
* @example fields.boolean('isActive', { config: { defaultValue: false } })
|
|
75
|
-
*/
|
|
76
|
-
declare function boolean<TId extends string>(id: TId, options?: FieldOptions<BooleanConfig>): FieldDefinition<TId, 'boolean', BooleanConfig>;
|
|
77
|
-
/**
|
|
78
|
-
* Enum field with predefined options
|
|
79
|
-
* @example fields.enum('status', {
|
|
80
|
-
* config: {
|
|
81
|
-
* options: [
|
|
82
|
-
* { value: 'draft', label: 'Draft' },
|
|
83
|
-
* { value: 'published', label: 'Published' },
|
|
84
|
-
* ]
|
|
85
|
-
* }
|
|
86
|
-
* })
|
|
87
|
-
*/
|
|
88
|
-
declare function enumField<TId extends string, TValue extends string = string, TMulti extends boolean = false>(id: TId, options?: FieldOptions<EnumConfig<TValue, TMulti>>): FieldDefinition<TId, 'enum', EnumConfig<TValue, TMulti>>;
|
|
89
|
-
/**
|
|
90
|
-
* Date field (no time)
|
|
91
|
-
* @example fields.date('publishDate', { config: { minDate: '2024-01-01' } })
|
|
92
|
-
*/
|
|
93
|
-
declare function date<TId extends string>(id: TId, options?: FieldOptions<DateConfig>): FieldDefinition<TId, 'date', DateConfig>;
|
|
94
|
-
/**
|
|
95
|
-
* DateTime field: an instant, stored and read back in UTC whatever offset it is written in.
|
|
96
|
-
* `timeZoneHandling` says whether the editor shows it in UTC or in the author's local time.
|
|
97
|
-
* @example fields.dateTime('createdAt', { config: { timeZoneHandling: 'UTC' } })
|
|
98
|
-
*/
|
|
99
|
-
declare function dateTime<TId extends string>(id: TId, options?: FieldOptions<DateTimeConfig>): FieldDefinition<TId, 'dateTime', DateTimeConfig>;
|
|
100
|
-
/**
|
|
101
|
-
* Reference to other entries (content types or asset types)
|
|
102
|
-
* @example fields.reference('category', { config: { to: 'category' } })
|
|
103
|
-
* @example fields.reference('relatedItems', { config: { to: ['product', 'service'], multi: true } })
|
|
104
|
-
* @example fields.reference('heroImage', { config: { to: 'productPhoto' } })
|
|
105
|
-
*/
|
|
106
|
-
declare function reference<TId extends string, TTo extends string = string, TMulti extends boolean = false>(id: TId, options?: FieldOptions<ReferenceConfig<TTo, TMulti>>): FieldDefinition<TId, 'reference', ReferenceConfig<TTo, TMulti>>;
|
|
107
|
-
/**
|
|
108
|
-
* Tags field (array of strings with autocomplete)
|
|
109
|
-
* @example fields.tags('keywords', { config: { predefinedTags: ['featured', 'sale'], maxTags: 10 } })
|
|
110
|
-
*/
|
|
111
|
-
declare function tags<TId extends string>(id: TId, options?: FieldOptions<TagsConfig>): FieldDefinition<TId, 'tags', TagsConfig>;
|
|
112
|
-
/**
|
|
113
|
-
* List field (array of complex items)
|
|
114
|
-
* @example fields.list('specifications', {
|
|
115
|
-
* config: {
|
|
116
|
-
* minItems: 1,
|
|
117
|
-
* maxItems: 20,
|
|
118
|
-
* subfields: [
|
|
119
|
-
* fields.shortText('name', { config: { required: true } }),
|
|
120
|
-
* fields.shortText('value', { config: { required: true } }),
|
|
121
|
-
* ]
|
|
122
|
-
* }
|
|
123
|
-
* })
|
|
124
|
-
*/
|
|
125
|
-
declare function list<TId extends string, TSubfields extends readonly AnyFieldDefinition[] = readonly []>(id: TId, options?: FieldOptions<ListConfig<TSubfields>>): FieldDefinition<TId, 'list', ListConfig<TSubfields>>;
|
|
126
|
-
/**
|
|
127
|
-
* Component field (reusable field group)
|
|
128
|
-
* @example fields.component('seo', 'seoMetadata')
|
|
129
|
-
* @example fields.component('seo', 'seoMetadata', { config: { required: true } })
|
|
130
|
-
*/
|
|
131
|
-
declare function component<TId extends string, TComponentId extends string>(id: TId, componentId: TComponentId, options?: FieldOptions<ComponentFieldConfig>): FieldDefinition<TId, `component(${TComponentId})`, ComponentFieldConfig>;
|
|
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-UHViXKiv.js';
|
|
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-Cb7iPCW2.js';
|
|
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-Cb7iPCW2.js';
|
|
4
|
+
import '../rich-text.d-BWc-5gX1.js';
|
|
132
5
|
|
|
133
6
|
/**
|
|
134
7
|
* Field builders for defining schema fields
|
|
@@ -145,13 +18,11 @@ declare function component<TId extends string, TComponentId extends string>(id:
|
|
|
145
18
|
*/
|
|
146
19
|
|
|
147
20
|
declare const fieldBuilders_AIConfig: typeof AIConfig;
|
|
148
|
-
declare const fieldBuilders_AllFieldTypes: typeof AllFieldTypes;
|
|
149
21
|
declare const fieldBuilders_AnyFieldDefinition: typeof AnyFieldDefinition;
|
|
150
22
|
declare const fieldBuilders_AssetAIConfig: typeof AssetAIConfig;
|
|
151
23
|
declare const fieldBuilders_BaseFieldConfig: typeof BaseFieldConfig;
|
|
152
24
|
declare const fieldBuilders_BooleanConfig: typeof BooleanConfig;
|
|
153
|
-
declare const
|
|
154
|
-
declare const fieldBuilders_ComponentFieldType: typeof ComponentFieldType;
|
|
25
|
+
declare const fieldBuilders_CodeConfig: typeof CodeConfig;
|
|
155
26
|
declare const fieldBuilders_DateConfig: typeof DateConfig;
|
|
156
27
|
declare const fieldBuilders_DateTimeConfig: typeof DateTimeConfig;
|
|
157
28
|
declare const fieldBuilders_DecimalConfig: typeof DecimalConfig;
|
|
@@ -163,38 +34,45 @@ declare const fieldBuilders_FieldRule: typeof FieldRule;
|
|
|
163
34
|
declare const fieldBuilders_FieldType: typeof FieldType;
|
|
164
35
|
declare const fieldBuilders_FieldUIConfig: typeof FieldUIConfig;
|
|
165
36
|
declare const fieldBuilders_IntegerConfig: typeof IntegerConfig;
|
|
37
|
+
declare const fieldBuilders_JsonConfig: typeof JsonConfig;
|
|
166
38
|
declare const fieldBuilders_ListConfig: typeof ListConfig;
|
|
167
39
|
declare const fieldBuilders_LocalizationConfig: typeof LocalizationConfig;
|
|
168
40
|
declare const fieldBuilders_LongTextConfig: typeof LongTextConfig;
|
|
41
|
+
declare const fieldBuilders_ObjectConfig: typeof ObjectConfig;
|
|
169
42
|
declare const fieldBuilders_ReadOnlyRule: typeof ReadOnlyRule;
|
|
170
43
|
declare const fieldBuilders_ReferenceConfig: typeof ReferenceConfig;
|
|
171
44
|
declare const fieldBuilders_RequirementRule: typeof RequirementRule;
|
|
172
45
|
declare const fieldBuilders_RichTextConfig: typeof RichTextConfig;
|
|
46
|
+
declare const fieldBuilders_RichTextLinks: typeof RichTextLinks;
|
|
173
47
|
declare const fieldBuilders_RuleCondition: typeof RuleCondition;
|
|
174
48
|
declare const fieldBuilders_RuleConditions: typeof RuleConditions;
|
|
175
49
|
declare const fieldBuilders_ShortTextConfig: typeof ShortTextConfig;
|
|
176
50
|
declare const fieldBuilders_SlugConfig: typeof SlugConfig;
|
|
51
|
+
declare const fieldBuilders_TableConfig: typeof TableConfig;
|
|
177
52
|
declare const fieldBuilders_TagsConfig: typeof TagsConfig;
|
|
178
53
|
declare const fieldBuilders_UrlConfig: typeof UrlConfig;
|
|
179
54
|
declare const fieldBuilders_ValidationRule: typeof ValidationRule;
|
|
180
55
|
declare const fieldBuilders_VisibilityRule: typeof VisibilityRule;
|
|
181
56
|
declare const fieldBuilders_boolean: typeof boolean;
|
|
182
|
-
declare const
|
|
57
|
+
declare const fieldBuilders_code: typeof code;
|
|
183
58
|
declare const fieldBuilders_date: typeof date;
|
|
184
59
|
declare const fieldBuilders_dateTime: typeof dateTime;
|
|
185
60
|
declare const fieldBuilders_decimal: typeof decimal;
|
|
186
61
|
declare const fieldBuilders_email: typeof email;
|
|
187
62
|
declare const fieldBuilders_integer: typeof integer;
|
|
63
|
+
declare const fieldBuilders_json: typeof json;
|
|
188
64
|
declare const fieldBuilders_list: typeof list;
|
|
189
65
|
declare const fieldBuilders_longText: typeof longText;
|
|
66
|
+
declare const fieldBuilders_object: typeof object;
|
|
190
67
|
declare const fieldBuilders_reference: typeof reference;
|
|
191
68
|
declare const fieldBuilders_richText: typeof richText;
|
|
192
69
|
declare const fieldBuilders_shortText: typeof shortText;
|
|
193
70
|
declare const fieldBuilders_slug: typeof slug;
|
|
71
|
+
declare const fieldBuilders_table: typeof table;
|
|
194
72
|
declare const fieldBuilders_tags: typeof tags;
|
|
195
73
|
declare const fieldBuilders_url: typeof url;
|
|
196
74
|
declare namespace fieldBuilders {
|
|
197
|
-
export { fieldBuilders_AIConfig as AIConfig,
|
|
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 };
|
|
198
76
|
}
|
|
199
77
|
|
|
200
78
|
/**
|
|
@@ -228,4 +106,4 @@ declare namespace fieldBuilders {
|
|
|
228
106
|
|
|
229
107
|
declare const fields: typeof fieldBuilders;
|
|
230
108
|
|
|
231
|
-
export { AIConfig,
|
|
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 };
|
package/dist/schema/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { BUILT_IN_ROLES, BUILT_IN_ROLE_ACTIONS, ROLE_ACTIONS, buildFallbackChain, defineAssetType,
|
|
1
|
+
export { BUILT_IN_ROLES, BUILT_IN_ROLE_ACTIONS, ROLE_ACTIONS, buildFallbackChain, defineAssetType, defineContentType, defineContentTypeWorkflow, defineLocale, defineQuery, defineRole, defineSchema, defineSettingsGroup, defineSingleton, defineSingletonContentType, defineView, defineWorkflow, defineWorkflowStage, fields, fieldset, findDefaultLocale, findWorkflowStage, getActiveLocales, getBuiltInRoleActions, getFirstWorkflowStage, getLocaleCodes, getNextWorkflowStage, getWorkflowStageIds, isBuiltInRole, isFinalWorkflowStage, isLocaleDefinition, isRoleDefinition, isWorkflowDefinition, isWorkflowStageDefinition } from '../chunk-EW23SZPX.js';
|
|
2
2
|
import '../chunk-XQ4QHWZE.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
1
|
+
export { ca as ApiResponse, bL as BaseContent, c6 as CacheConfig, cc as CacheStrategy, bX as ContentQueryResult, b_ as ContentTypeSchema, bT as CreateInput, bZ as CustomQuery, bQ as DateOnlyOperator, c8 as DebugConfig, ce as Environment, cp as FieldDefinition, c1 as FieldOptions, b$ as FieldTypeName, cd as LogLevel, c5 as PerformanceMetrics, bS as QueryOptions, c7 as RealtimeConfig, c3 as RealtimeEvent, c2 as RealtimeEventType, by as RelyIOConfig, c9 as RequestConfig, bV as RestoredContent, cb as RetryConfig, bU as RevisedContent, bY as SingletonContent, bR as SortOptions, c4 as SubscriptionOptions, bW as UpdateInput, c0 as ValidationRule, cf as ValidationViolation, bO as WhereClause, bN as WhereFieldCondition, bP as WhereOperator, bM as WhereScalar } from '../include-paths-Bs5FhNw2.cjs';
|
|
2
|
+
export { e as RichTextBlock, f as RichTextCellAlignment, g as RichTextCodeBlock, h as RichTextCodeGroup, i as RichTextCodeLines, j as RichTextDivider, d as RichTextEntryLinkMark, k as RichTextHeading, l as RichTextInline, m as RichTextLineBreak, n as RichTextLinkMark, o as RichTextList, p as RichTextListItem, q as RichTextListStyle, r as RichTextMark, s as RichTextMarkType, t as RichTextNode, u as RichTextParagraph, v as RichTextQuote, w as RichTextSpan, x as RichTextStructure, y as RichTextTable, z as RichTextTableCell, B as RichTextTableRow, b as RichTextValue } from '../rich-text.d-BWc-5gX1.cjs';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
1
|
+
export { ca as ApiResponse, bL as BaseContent, c6 as CacheConfig, cc as CacheStrategy, bX as ContentQueryResult, b_ as ContentTypeSchema, bT as CreateInput, bZ as CustomQuery, bQ as DateOnlyOperator, c8 as DebugConfig, ce as Environment, cp as FieldDefinition, c1 as FieldOptions, b$ as FieldTypeName, cd as LogLevel, c5 as PerformanceMetrics, bS as QueryOptions, c7 as RealtimeConfig, c3 as RealtimeEvent, c2 as RealtimeEventType, by as RelyIOConfig, c9 as RequestConfig, bV as RestoredContent, cb as RetryConfig, bU as RevisedContent, bY as SingletonContent, bR as SortOptions, c4 as SubscriptionOptions, bW as UpdateInput, c0 as ValidationRule, cf as ValidationViolation, bO as WhereClause, bN as WhereFieldCondition, bP as WhereOperator, bM as WhereScalar } from '../include-paths-Cb7iPCW2.js';
|
|
2
|
+
export { e as RichTextBlock, f as RichTextCellAlignment, g as RichTextCodeBlock, h as RichTextCodeGroup, i as RichTextCodeLines, j as RichTextDivider, d as RichTextEntryLinkMark, k as RichTextHeading, l as RichTextInline, m as RichTextLineBreak, n as RichTextLinkMark, o as RichTextList, p as RichTextListItem, q as RichTextListStyle, r as RichTextMark, s as RichTextMarkType, t as RichTextNode, u as RichTextParagraph, v as RichTextQuote, w as RichTextSpan, x as RichTextStructure, y as RichTextTable, z as RichTextTableCell, B as RichTextTableRow, b as RichTextValue } from '../rich-text.d-BWc-5gX1.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@relyio/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "RelyIO is coming soon — this package is not ready for general use yet.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"relyio"
|
|
@@ -51,6 +51,16 @@
|
|
|
51
51
|
"types": "./dist/utils/index.d.ts",
|
|
52
52
|
"import": "./dist/utils/index.js",
|
|
53
53
|
"require": "./dist/utils/index.cjs"
|
|
54
|
+
},
|
|
55
|
+
"./rich-text": {
|
|
56
|
+
"types": "./dist/rich-text/index.d.ts",
|
|
57
|
+
"import": "./dist/rich-text/index.js",
|
|
58
|
+
"require": "./dist/rich-text/index.cjs"
|
|
59
|
+
},
|
|
60
|
+
"./markdown": {
|
|
61
|
+
"types": "./dist/markdown/index.d.ts",
|
|
62
|
+
"import": "./dist/markdown/index.js",
|
|
63
|
+
"require": "./dist/markdown/index.cjs"
|
|
54
64
|
}
|
|
55
65
|
},
|
|
56
66
|
"files": [
|
|
@@ -86,7 +96,9 @@
|
|
|
86
96
|
"typescript": "npm:@typescript/typescript6@6.0.2",
|
|
87
97
|
"vitest": "4.1.11",
|
|
88
98
|
"@relyio/eslint-config": "0.0.0",
|
|
89
|
-
"@relyio/api-contract": "0.1.0"
|
|
99
|
+
"@relyio/api-contract": "0.1.0",
|
|
100
|
+
"@relyio/schema": "0.0.1",
|
|
101
|
+
"@relyio/rich-text-markdown": "0.0.0"
|
|
90
102
|
},
|
|
91
103
|
"peerDependencies": {
|
|
92
104
|
"typescript": ">=4.9.0"
|
|
@@ -116,6 +128,11 @@
|
|
|
116
128
|
"path": "./dist/utils.js",
|
|
117
129
|
"maxSize": "8kb",
|
|
118
130
|
"compression": "gzip"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"path": "./dist/markdown/index.js",
|
|
134
|
+
"maxSize": "90kb",
|
|
135
|
+
"compression": "gzip"
|
|
119
136
|
}
|
|
120
137
|
],
|
|
121
138
|
"publishConfig": {
|