@tinacms/schema-tools 1.3.2 → 1.3.3

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.
@@ -1,6 +1,667 @@
1
+ import type { FC } from 'react';
2
+ import type React from 'react';
3
+ declare type Meta = {
4
+ active?: boolean;
5
+ dirty?: boolean;
6
+ error?: any;
7
+ };
8
+ declare type Component<Type, List> = (props: {
9
+ field: TinaField & {
10
+ namespace: string[];
11
+ };
12
+ input: {
13
+ /**
14
+ * The full name of the field, for fields nested inside object
15
+ * fields, this will be the full path:
16
+ *
17
+ * `myObject.0.title`
18
+ */
19
+ name: string;
20
+ onBlur: (event?: React.FocusEvent<Type>) => void;
21
+ /**
22
+ * The value provided will be saved to the form so it
23
+ * should match the configured type:
24
+ *
25
+ * `input.onChange('some string')`
26
+ */
27
+ onChange: (event: React.ChangeEvent<Type>) => void;
28
+ onFocus: (event?: React.FocusEvent<Type>) => void;
29
+ type?: string;
30
+ value: List extends true ? Type[] : Type;
31
+ };
32
+ meta: Meta;
33
+ }) => any;
34
+ export declare type UIField<Type, List extends boolean> = {
35
+ max?: List extends true ? number : never;
36
+ min?: List extends true ? number : never;
37
+ /**
38
+ * Override the label from parent object
39
+ */
40
+ label?: string;
41
+ /**
42
+ * Override the description from parent object
43
+ */
44
+ description?: string;
45
+ /**
46
+ * A React component which will be used in the Tina form. Be sure
47
+ * to import React into the config file.
48
+ *
49
+ * Note: Any Tailwind classes provided here will be compiled as part
50
+ * of the Tina stylesheet
51
+ *
52
+ * eg:
53
+ * ```tsx
54
+ * component: (props) => {
55
+ * const { input, field } = props
56
+ * return (
57
+ * <div className="my-4">
58
+ * <label
59
+ * htmlFor={input.name}
60
+ * className="block text-sm font-medium"
61
+ * >
62
+ * {field.name}
63
+ * </label>
64
+ * <div className="mt-1">
65
+ * <input
66
+ * id={input.name}
67
+ * className="py-2 px-4 block"
68
+ * type="text"
69
+ * {...input}
70
+ * />
71
+ * </div>
72
+ * </div>
73
+ * )
74
+ * }
75
+ * ```
76
+ *
77
+ * Note: If the form has already been registered with the cms, you
78
+ * can provide it's name here (eg. `textarea`)
79
+ */
80
+ component?: Component<Type, List> | string | null;
81
+ /**
82
+ * Optional: Prepare data for use in the component. This is useful
83
+ * if you don't have access to the component directly
84
+ */
85
+ parse?: (value: List extends true ? Type[] : Type, name: string, field: Field) => List extends true ? Type[] : Type;
86
+ /**
87
+ * Optional: Prepare data for saving. This is useful
88
+ * if you don't have access to the component directly
89
+ */
90
+ format?: (value: Type, name: string, field: Field) => List extends true ? Type[] : Type;
91
+ /**
92
+ * Optional: Return undefined when valid. Return a string or an object when there are errors.
93
+ *
94
+ * ```ts
95
+ * validate: (value) => {
96
+ * if(value.length > 40){
97
+ * return 'Title cannot be more than 40 characters long'
98
+ * }
99
+ * }
100
+ * ```
101
+ */
102
+ validate?(value: List extends true ? Type[] : Type, allValues: {
103
+ [key: string]: any;
104
+ }, meta: Meta, field: UIField<Type, List>): string | undefined | void;
105
+ /**
106
+ * @deprecated use `defaultItem` at the collection level instead
107
+ */
108
+ defaultValue?: List extends true ? Type[] : Type;
109
+ };
110
+ declare type FieldGeneric<Type, List extends boolean | undefined, ExtraFieldUIProps = {}> = List extends true ? {
111
+ list: true;
112
+ ui?: UIField<Type, true> & ExtraFieldUIProps;
113
+ } : List extends false ? {
114
+ list?: false;
115
+ ui?: UIField<Type, false> & ExtraFieldUIProps;
116
+ } : {
117
+ list?: undefined;
118
+ ui?: UIField<Type, false> & ExtraFieldUIProps;
119
+ };
120
+ export interface BaseField {
121
+ label?: string | boolean;
122
+ required?: boolean;
123
+ indexed?: boolean;
124
+ name: string;
125
+ nameOverride?: string;
126
+ description?: string;
127
+ }
128
+ export declare type StringField = (FieldGeneric<string, undefined> | FieldGeneric<string, true> | FieldGeneric<string, false>) & BaseField & {
129
+ type: 'string';
130
+ isTitle?: boolean;
131
+ isBody?: boolean;
132
+ options?: Option[];
133
+ };
134
+ export declare type NumberField = (FieldGeneric<number, undefined> | FieldGeneric<number, true> | FieldGeneric<number, false>) & BaseField & {
135
+ type: 'number';
136
+ };
137
+ export declare type BooleanField = (FieldGeneric<boolean, undefined> | FieldGeneric<boolean, true> | FieldGeneric<boolean, false>) & BaseField & {
138
+ type: 'boolean';
139
+ };
140
+ declare type DateFormatProps = {
141
+ /**
142
+ * Customize the way the format is rendered
143
+ * ```
144
+ * dateFormat: 'YYYY MM DD'
145
+ * ```
146
+ */
147
+ dateFormat?: string;
148
+ timeFormat?: string;
149
+ };
150
+ export declare type DateTimeField = (FieldGeneric<string, undefined, DateFormatProps> | FieldGeneric<string, true, DateFormatProps> | FieldGeneric<string, false, DateFormatProps>) & BaseField & {
151
+ type: 'datetime';
152
+ };
153
+ export declare type ImageField = (FieldGeneric<string, undefined> | FieldGeneric<string, true> | FieldGeneric<string, false>) & BaseField & {
154
+ type: 'image';
155
+ };
156
+ export declare type ReferenceField = (FieldGeneric<string, undefined> | FieldGeneric<string, false>) & BaseField & {
157
+ type: 'reference';
158
+ /**
159
+ * The names of the collections this field can use as a reference
160
+ * ```ts
161
+ * {
162
+ * type: 'reference',
163
+ * name: 'author',
164
+ * collections: ['author'],
165
+ * }
166
+ * ```
167
+ */
168
+ collections: string[];
169
+ };
170
+ declare type RichTextAst = {
171
+ type: 'root';
172
+ children: Record<string, unknown>[];
173
+ };
174
+ export declare type RichTextField<WithNamespace extends boolean = false> = (FieldGeneric<RichTextAst, undefined> | FieldGeneric<RichTextAst, false>) & BaseField & {
175
+ type: 'rich-text';
176
+ /**
177
+ * When using Markdown or MDX formats, this field's value
178
+ * will be saved to the markdown body, while all other values
179
+ * will be stored as frontmatter
180
+ */
181
+ isBody?: boolean;
182
+ templates?: RichTextTemplate<WithNamespace>[];
183
+ /**
184
+ * By default, Tina parses markdown with MDX, this is a more strict parser
185
+ * that allows you to use structured content inside markdown (via `templates`).
186
+ *
187
+ * Specify `"markdown"` if you're having problems with Tina parsing your content.
188
+ */
189
+ parser?: {
190
+ type: 'markdown';
191
+ /**
192
+ * Tina will escape entities like `<` and `[` by default. You can choose to turn
193
+ * off all escaping, or specify HTML, so `<div>` will not be turned into `\<div>`
194
+ */
195
+ skipEscaping?: 'all' | 'html' | 'none';
196
+ } | {
197
+ type: 'mdx';
198
+ };
199
+ };
200
+ export declare type RichTextTemplate<WithNamespace extends boolean = false> = Template<WithNamespace> & {
201
+ inline?: boolean;
202
+ /**
203
+ * If you have some custom shortcode logic in your markdown,
204
+ * you can specify it in the 'match' property and Tina will
205
+ * handle it as if it were a jsx element:
206
+ *
207
+ * ```
208
+ * # This is my markdown, it uses some custom shortcode
209
+ * syntax {{ myshortcode title="hello!" }}.
210
+ *
211
+ * {
212
+ * match: {
213
+ * start: "{{"
214
+ * end: "}}"
215
+ * }
216
+ * }
217
+ * ```
218
+ */
219
+ match?: {
220
+ start: string;
221
+ end: string;
222
+ name?: string;
223
+ };
224
+ };
225
+ declare type ObjectUiProps = {
226
+ visualSelector?: boolean;
227
+ };
228
+ export declare type ObjectField<WithNamespace extends boolean = false> = (FieldGeneric<string, undefined, ObjectUiProps> | FieldGeneric<string, true, ObjectUiProps> | FieldGeneric<string, false, ObjectUiProps>) & MaybeNamespace<WithNamespace> & BaseField & ({
229
+ type: 'object';
230
+ fields: Field<WithNamespace>[];
231
+ templates?: undefined;
232
+ ui?: Template['ui'];
233
+ } | {
234
+ type: 'object';
235
+ fields?: undefined;
236
+ templates: Template<WithNamespace>[];
237
+ });
238
+ declare type Field<WithNamespace extends boolean = false> = (StringField | NumberField | BooleanField | DateTimeField | ImageField | ReferenceField | RichTextField<WithNamespace> | ObjectField<WithNamespace>) & MaybeNamespace<WithNamespace>;
239
+ export declare type TinaField<WithNamespace extends boolean = false> = Field<WithNamespace> & MaybeNamespace<WithNamespace>;
240
+ declare type MaybeNamespace<WithNamespace extends boolean = false> = WithNamespace extends true ? {
241
+ namespace: string[];
242
+ } : {};
243
+ export declare type Template<WithNamespace extends boolean = false> = {
244
+ label?: string | boolean;
245
+ name: string;
246
+ ui?: {
247
+ /**
248
+ * Override the properties passed to the field
249
+ * component. This is mostly useful for controlling
250
+ * the display value via callback on `itemProps.label`
251
+ */
252
+ itemProps?(item: Record<string, any>): {
253
+ key?: string;
254
+ /**
255
+ * Control the display value when object
256
+ * items are shown in a compact list, eg:
257
+ *
258
+ * ```ts
259
+ * itemProps: (values) => ({
260
+ * label: values?.title || 'Showcase Item',
261
+ * }),
262
+ * ```
263
+ */
264
+ label?: string | boolean;
265
+ };
266
+ defaultItem?: DefaultItem<Record<string, any>>;
267
+ /**
268
+ * When used in relation to the `visualSelector`,
269
+ * provide an image URL to be used as the preview
270
+ * in the blocks selector menu
271
+ */
272
+ previewSrc?: string;
273
+ };
274
+ fields: Field<WithNamespace>[];
275
+ } & MaybeNamespace<WithNamespace>;
276
+ declare type TokenObject = {
277
+ id_token: string;
278
+ access_token?: string;
279
+ refresh_token?: string;
280
+ };
281
+ export interface Config<CMSCallback = undefined, FormifyCallback = undefined, DocumentCreatorCallback = undefined, Store = undefined> {
282
+ contentApiUrlOverride?: string;
283
+ admin?: {
284
+ auth?: {
285
+ /**
286
+ * If you wish to use the local auth provider, set this to true
287
+ *
288
+ * This will take precedence over the customAuth option (if set to true)
289
+ *
290
+ **/
291
+ useLocalAuth?: boolean;
292
+ /**
293
+ * If you are using a custom auth provider, set this to true
294
+ **/
295
+ customAuth?: boolean;
296
+ /**
297
+ * Used for getting the token from the custom auth provider
298
+ *
299
+ * @returns {Promise<TokenObject | null>}
300
+ **/
301
+ getToken?: () => Promise<TokenObject | null>;
302
+ /**
303
+ * Used to logout from the custom auth provider
304
+ *
305
+ **/
306
+ logout?: () => Promise<void>;
307
+ /**
308
+ * Used for getting the user from the custom auth provider. If this returns a truthy value, the user will be logged in and the CMS will be enabled.
309
+ *
310
+ * If this returns a falsy value, the user will be logged out and the CMS will be disabled.
311
+ *
312
+ **/
313
+ getUser?: () => Promise<any | null>;
314
+ /**
315
+ * Used to authenticate the user with the custom auth provider. This is called when the user clicks the login button.
316
+ *
317
+ **/
318
+ authenticate?: () => Promise<any | null>;
319
+ onLogin?: (args: {
320
+ token: TokenObject;
321
+ }) => Promise<void>;
322
+ onLogout?: () => Promise<void>;
323
+ };
324
+ };
325
+ /**
326
+ * The Schema is used to define the shape of the content.
327
+ *
328
+ * https://tina.io/docs/reference/schema/
329
+ */
330
+ schema: Schema;
331
+ /**
332
+ * The base branch to pull content from. Note that this is ignored for local development
333
+ */
334
+ branch: string | null;
335
+ /**
336
+ * Your clientId from app.tina.io
337
+ */
338
+ clientId: string | null;
339
+ /**
340
+ * Your read only token from app.tina.io
341
+ */
342
+ token: string | null;
343
+ /**
344
+ * Configurations for the autogenerated GraphQL HTTP client
345
+ */
346
+ client?: {
347
+ /**
348
+ * Autogenerated queries will traverse references to a given depth
349
+ * @default 2
350
+ */
351
+ referenceDepth?: number;
352
+ };
353
+ /**
354
+ *
355
+ * Tina supports serving content from a separate Git repo. To enable this during local development, point
356
+ * this config at the root of the content repo.
357
+ *
358
+ * NOTE: Relative paths are fine to use here, but you should use an environment variable for this, as each developer on your team may have a different
359
+ * location to the path.
360
+ *
361
+ * ```ts
362
+ * localContentPath: process.env.REMOTE_ROOT_PATH // eg. '../../my-content-repo'
363
+ * ```
364
+ */
365
+ localContentPath?: string;
366
+ /**
367
+ * Tina is compiled as a single-page app and placed in the public directory
368
+ * of your application.
369
+ */
370
+ build: {
371
+ /**
372
+ * The folder where your application stores assets, eg. `"public"`
373
+ */
374
+ publicFolder: string;
375
+ /**
376
+ * The value specified here will determine the path when visiting the TinaCMS dashboard.
377
+ *
378
+ * Eg. `"admin"` will be viewable at `[your-development-url]/admin/index.html`
379
+ *
380
+ * Note that for most framworks you can omit the `index.html` portion, for Next.js see the [rewrites section](https://nextjs.org/docs/api-reference/next.config.js/rewrites)
381
+ */
382
+ outputFolder: string;
383
+ /**
384
+ *
385
+ * the host option for the vite config. This is useful when trying to run tinacms dev in a docker container.
386
+ *
387
+ * See https://vitejs.dev/config/server-options.html#server-host for more details
388
+ */
389
+ host?: string | boolean;
390
+ };
391
+ media?: {
392
+ /**
393
+ * Load a media store like Cloudinary
394
+ *
395
+ * ```ts
396
+ * loadCustomStore = async () => {
397
+ * const pack = await import("next-tinacms-cloudinary");
398
+ * return pack.TinaCloudCloudinaryMediaStore;
399
+ * }
400
+ * ```
401
+ */
402
+ loadCustomStore: () => Promise<Store>;
403
+ tina?: never;
404
+ } | {
405
+ /**
406
+ * Use Git-backed assets for media, these values will
407
+ * [Learn more](https://tina.io/docs/reference/media/repo-based/)
408
+ */
409
+ tina: {
410
+ /**
411
+ * The folder where your application stores assets, eg. `"public"`
412
+ */
413
+ publicFolder: string;
414
+ /**
415
+ * The root folder for media managed by Tina. For example, `"uploads"`
416
+ * would store content in `"<my-public-folder>/uploads"`
417
+ */
418
+ mediaRoot: string;
419
+ };
420
+ loadCustomStore?: never;
421
+ };
422
+ /**
423
+ * Used to override the default Tina Cloud API URL
424
+ *
425
+ * [mostly for internal use only]
426
+ */
427
+ tinaioConfig?: {
428
+ assetsApiUrlOverride?: string;
429
+ frontendUrlOverride?: string;
430
+ identityApiUrlOverride?: string;
431
+ contentApiUrlOverride?: string;
432
+ };
433
+ cmsCallback?: CMSCallback;
434
+ formifyCallback?: FormifyCallback;
435
+ documentCreatorCallback?: DocumentCreatorCallback;
436
+ }
437
+ export declare type TinaCMSConfig<CMSCallback = undefined, FormifyCallback = undefined, DocumentCreatorCallback = undefined, Store = undefined> = Config<CMSCallback, FormifyCallback, DocumentCreatorCallback, Store>;
438
+ export interface Schema<WithNamespace extends boolean = false> {
439
+ /**
440
+ * Collections represent a type of content (EX, blog post, page, author, etc). We recommend using singular naming in a collection (Ex: use post and not posts).
441
+ *
442
+ * https://tina.io/docs/reference/collections/
443
+ */
444
+ collections: Collection<WithNamespace>[];
445
+ /**
446
+ * @deprecated use `defineConfig` in a config.{js,ts} file instead
447
+ */
448
+ config?: Config;
449
+ }
450
+ export declare type Collection<WithNamespace extends boolean = false> = FieldCollection<WithNamespace> | TemplateCollection<WithNamespace>;
451
+ interface BaseCollection {
452
+ label?: string;
453
+ name: string;
454
+ path: string;
455
+ indexes?: IndexType[];
456
+ format?: 'json' | 'md' | 'markdown' | 'mdx' | 'yaml' | 'yml' | 'toml';
457
+ ui?: UICollection;
458
+ /**
459
+ * @deprecated - use `ui.defaultItem` on the each `template` instead
460
+ */
461
+ defaultItem?: DefaultItem<Record<string, any>>;
462
+ /**
463
+ * This format will be used to parse the markdown frontmatter
464
+ */
465
+ frontmatterFormat?: 'yaml' | 'toml' | 'json';
466
+ /**
467
+ * The delimiters used to parse the frontmatter.
468
+ */
469
+ frontmatterDelimiters?: [string, string] | string;
470
+ match?: string;
471
+ }
472
+ declare type TemplateCollection<WithNamespace extends boolean = false> = {
473
+ /**
474
+ * In most cases, just using fields is enough, however templates can be used when there are multiple variants of the same collection or object. For example in a "page" collection there might be a need for a marketing page template and a content page template, both under the collection "page".
475
+ *
476
+ * https://tina.io/docs/reference/templates/
477
+ */
478
+ templates: Template<WithNamespace>[];
479
+ fields?: undefined;
480
+ } & BaseCollection & MaybeNamespace<WithNamespace>;
481
+ declare type FieldCollection<WithNamespace extends boolean = false> = {
482
+ /**
483
+ * Fields define the shape of the content and the user input.
484
+ *
485
+ * https://tina.io/docs/reference/fields/
486
+ */
487
+ fields: TinaField<WithNamespace>[];
488
+ templates?: undefined;
489
+ } & BaseCollection & MaybeNamespace<WithNamespace>;
490
+ declare type Document = {
491
+ _sys: {
492
+ title?: string;
493
+ template: string;
494
+ breadcrumbs: string[];
495
+ path: string;
496
+ basename: string;
497
+ relativePath: string;
498
+ filename: string;
499
+ extension: string;
500
+ };
501
+ };
502
+ export interface UICollection {
503
+ /**
504
+ * Customize the way filenames are generated during content creation
505
+ */
506
+ filename?: {
507
+ /**
508
+ * A callback which receives form values as an argument. The return value
509
+ * here will be used as the filename (the extension is not necessary)
510
+ *
511
+ * eg:
512
+ * ```ts
513
+ * slugify: (values) => values.title.toLowerCase().split(" ").join("-")
514
+ * ```
515
+ */
516
+ slugify?: (values: Record<string, any>) => string;
517
+ /**
518
+ * When set to `true`, editors won't be able to modify the filename
519
+ */
520
+ readonly?: boolean;
521
+ };
522
+ /**
523
+ * Determines whether or not this collection can accept new docments
524
+ * or allow documents to be deleted from the CMS.
525
+ */
526
+ allowedActions?: {
527
+ create?: boolean;
528
+ delete?: boolean;
529
+ };
530
+ /**
531
+ * Forms for this collection will be editable from the global sidebar rather than the form panel
532
+ */
533
+ global?: boolean | {
534
+ icon?: any;
535
+ layout: 'fullscreen' | 'popup';
536
+ };
537
+ /**
538
+ * Provide the path that your document is viewable on your site
539
+ *
540
+ * eg:
541
+ * ```ts
542
+ * router: ({ document }) => {
543
+ * return `blog-posts/${document._sys.filename}`;
544
+ * }
545
+ * ```
546
+ */
547
+ router?: (args: {
548
+ document: Document;
549
+ collection: Collection<true>;
550
+ }) => string | undefined;
551
+ }
552
+ export declare type DefaultItem<ReturnType> = ReturnType | (() => ReturnType);
553
+ declare type IndexType = {
554
+ name: string;
555
+ fields: {
556
+ name: string;
557
+ }[];
558
+ };
559
+ export declare type Option = string | {
560
+ label?: string;
561
+ icon?: FC;
562
+ value: string;
563
+ };
564
+ export declare type UITemplate = {
565
+ /**
566
+ * Override the properties passed to the field
567
+ * component. This is mostly useful for controlling
568
+ * the display value via callback on `itemProps.label`
569
+ */
570
+ itemProps?(item: Record<string, any>): {
571
+ key?: string;
572
+ /**
573
+ * Control the display value when object
574
+ * items are shown in a compact list, eg:
575
+ *
576
+ * ```ts
577
+ * itemProps: (values) => ({
578
+ * label: values?.title || 'Showcase Item',
579
+ * }),
580
+ * ```
581
+ */
582
+ label?: string | boolean;
583
+ };
584
+ defaultItem?: DefaultItem<Record<string, any>>;
585
+ /**
586
+ * When used in relation to the `visualSelector`,
587
+ * provide an image URL to be used as the preview
588
+ * in the blocks selector menu
589
+ */
590
+ previewSrc?: string;
591
+ };
592
+ export declare type CollectionTemplateableUnion = {
593
+ namespace: string[];
594
+ type: 'union';
595
+ templates: Template<true>[];
596
+ };
597
+ export declare type CollectionTemplateableObject = {
598
+ namespace: string[];
599
+ type: 'object';
600
+ visualSelector?: boolean;
601
+ ui?: UIField<any, any> & {
602
+ itemProps?(item: Record<string, any>): {
603
+ key?: string;
604
+ label?: string | boolean;
605
+ };
606
+ defaultItem?: DefaultItem<Record<string, any>>;
607
+ };
608
+ required?: false;
609
+ template: Template<true>;
610
+ };
611
+ export declare type CollectionTemplateable = CollectionTemplateableUnion | CollectionTemplateableObject;
612
+ export declare type Collectable = Pick<Collection<true>, 'namespace' | 'templates' | 'fields' | 'name'> & {
613
+ label?: string | boolean;
614
+ };
1
615
  /**
2
-
3
-
4
-
5
- */
6
- export * from './SchemaTypes';
616
+ * @deprecated use Config instead
617
+ */
618
+ export declare type TinaCloudSchemaConfig<DeleteMe = undefined> = Config;
619
+ /** @deprecated use Schema instead */
620
+ export declare type TinaCloudSchema<WithNamespace extends boolean = false> = Schema<WithNamespace>;
621
+ /** @deprecated use Schema instead */
622
+ export declare type TinaCloudSchemaBase = TinaCloudSchema;
623
+ /** @deprecated use Schema instead */
624
+ export declare type TinaCloudSchemaEnriched = TinaCloudSchema<true>;
625
+ /** @deprecated use Schema instead */
626
+ export declare type TinaCloudSchemaWithNamespace = TinaCloudSchema<true>;
627
+ /** @deprecated use Collection instead */
628
+ export declare type TinaCloudCollection<WithNamespace extends boolean = false> = Collection<WithNamespace>;
629
+ /** @deprecated use Collection instead */
630
+ export declare type TinaCloudCollectionBase = TinaCloudCollection;
631
+ /** @deprecated use Collection instead */
632
+ export declare type TinaCloudCollectionEnriched = TinaCloudCollection<true>;
633
+ /** @deprecated use Template instead */
634
+ export declare type TinaTemplate = Template;
635
+ /** @deprecated use Template instead */
636
+ export declare type TinaCloudTemplateBase = Template;
637
+ /** @deprecated use Template instead */
638
+ export declare type TinaCloudTemplateEnriched = Template<true>;
639
+ /** @deprecated use Collection instead */
640
+ export declare type CollectionFieldsWithNamespace = FieldCollection<true>;
641
+ /** @deprecated use Collection instead */
642
+ export declare type CollectionTemplates = TemplateCollection;
643
+ /** @deprecated use Collection instead */
644
+ export declare type CollectionTemplatesWithNamespace = TemplateCollection<true>;
645
+ /** @deprecated use Template instead */
646
+ export declare type GlobalTemplate = Template;
647
+ /** @deprecated use TinaField instead */
648
+ export declare type TinaFieldBase = TinaField;
649
+ /** @deprecated use TinaField instead */
650
+ export declare type TinaFieldInner = TinaField;
651
+ /** @deprecated use TinaField instead */
652
+ export declare type TinaFieldEnriched = TinaField<true>;
653
+ /** @deprecated use ObjectField instead */
654
+ export declare type ObjectType<WithNamespace extends boolean = false> = ObjectField<WithNamespace>;
655
+ /** @deprecated use RichTextField instead */
656
+ export declare type RichTextType<WithNamespace extends boolean = false> = RichTextField<WithNamespace>;
657
+ /** @deprecated use ReferenceField instead */
658
+ export declare type ReferenceType<WithNamespace extends boolean = false> = ReferenceField & MaybeNamespace<WithNamespace>;
659
+ /** @deprecated use ReferenceField instead */
660
+ export declare type ReferenceTypeInner = ReferenceType;
661
+ /** @deprecated use ReferenceField instead */
662
+ export declare type ReferenceTypeWithNamespace = ReferenceType<true>;
663
+ /** @deprecated use RichTextField instead */
664
+ export declare type RichTypeWithNamespace = RichTextField<true>;
665
+ /** @deprecated use TinaField instead */
666
+ export declare type SchemaField<WithNamespace extends boolean = false> = TinaField<WithNamespace>;
667
+ export {};
@@ -2,5 +2,5 @@
2
2
 
3
3
  */
4
4
  import { z } from 'zod';
5
- import { TinaFieldInner } from '../types/SchemaTypes';
6
- export declare const TinaFieldZod: z.ZodType<TinaFieldInner<false>>;
5
+ import type { TinaField as TinaFieldType } from '../types/index';
6
+ export declare const TinaFieldZod: z.ZodType<TinaFieldType>;
@@ -1,12 +1,8 @@
1
- /**
2
-
3
- */
4
- import { Schema } from '../types';
5
- import { TinaCloudSchema } from '../types/index';
1
+ import type { Schema } from '../types/index';
6
2
  export { validateTinaCloudSchemaConfig } from './tinaCloudSchemaConfig';
7
3
  export declare class TinaSchemaValidationError extends Error {
8
4
  constructor(message: any);
9
5
  }
10
- export declare const validateSchema: ({ schema, }: {
11
- schema: Schema | TinaCloudSchema<false>;
6
+ export declare const validateSchema: ({ schema }: {
7
+ schema: Schema;
12
8
  }) => void;