@tinacms/schema-tools 0.0.0-ecea7ac-20241011043815 → 0.0.0-ed6025e-20251201040055
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +234 -176
- package/dist/index.mjs +234 -176
- package/dist/schema/TinaSchema.d.ts +21 -1
- package/dist/schema/addNamespaceToSchema.d.ts +8 -4
- package/dist/types/index.d.ts +73 -25
- package/dist/util/normalizePath.d.ts +8 -0
- package/dist/validate/fields.d.ts +0 -3
- package/dist/validate/schema.d.ts +101 -39
- package/dist/validate/tinaCloudSchemaConfig.d.ts +37 -0
- package/dist/validate/util.d.ts +3 -0
- package/package.json +8 -9
|
@@ -28,6 +28,7 @@ export declare class TinaSchema {
|
|
|
28
28
|
} & Schema);
|
|
29
29
|
getIsTitleFieldName: (collection: string) => string;
|
|
30
30
|
getCollectionsByName: (collectionNames: string[]) => Collection<true>[];
|
|
31
|
+
findReferencesFromCollection(name: string): Record<string, string[]>;
|
|
31
32
|
getCollection: (collectionName: string) => Collection<true>;
|
|
32
33
|
getCollections: () => Collection<true>[];
|
|
33
34
|
getCollectionByFullPath: (filepath: string) => Collection<true>;
|
|
@@ -59,7 +60,26 @@ export declare class TinaSchema {
|
|
|
59
60
|
*
|
|
60
61
|
*/
|
|
61
62
|
getTemplatesForCollectable: (collection: Collectable) => CollectionTemplateable;
|
|
62
|
-
|
|
63
|
+
/**
|
|
64
|
+
* Walk all fields in tina schema
|
|
65
|
+
*
|
|
66
|
+
* @param cb callback function invoked for each field
|
|
67
|
+
*/
|
|
68
|
+
walkFields(cb: (args: {
|
|
69
|
+
field: any;
|
|
70
|
+
collection: any;
|
|
71
|
+
path: string;
|
|
72
|
+
isListItem?: boolean;
|
|
73
|
+
}) => void): void;
|
|
74
|
+
/**
|
|
75
|
+
* Walk all fields in Tina Schema
|
|
76
|
+
*
|
|
77
|
+
* This is a legacy version to preserve backwards compatibility for the tina generated schema. It does not
|
|
78
|
+
* traverse fields in object lists in rich-text templates.
|
|
79
|
+
*
|
|
80
|
+
* @param cb callback function invoked for each field
|
|
81
|
+
*/
|
|
82
|
+
legacyWalkFields: (cb: (args: {
|
|
63
83
|
field: TinaField;
|
|
64
84
|
collection: Collection;
|
|
65
85
|
path: string[];
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
type Node = {
|
|
2
|
+
name?: string;
|
|
3
|
+
value?: string;
|
|
4
|
+
namespace?: string[];
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
};
|
|
7
|
+
export declare function addNamespaceToSchema<T extends Node | string>(maybeNode: T, namespace?: string[]): T;
|
|
8
|
+
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
import type React from 'react';
|
|
3
|
+
export declare const CONTENT_FORMATS: readonly ["mdx", "md", "markdown", "json", "yaml", "yml", "toml"];
|
|
4
|
+
export type ContentFormat = (typeof CONTENT_FORMATS)[number];
|
|
5
|
+
export type ContentFrontmatterFormat = 'yaml' | 'toml' | 'json';
|
|
6
|
+
export type Parser = {
|
|
7
|
+
type: 'mdx';
|
|
8
|
+
} | {
|
|
9
|
+
type: 'markdown';
|
|
10
|
+
/**
|
|
11
|
+
* Tina will escape entities like `<` and `[` by default. You can choose to turn
|
|
12
|
+
* off all escaping, or specify HTML, so `<div>` will not be turned into `\<div>`
|
|
13
|
+
*/
|
|
14
|
+
skipEscaping?: 'all' | 'html' | 'none';
|
|
15
|
+
} | {
|
|
16
|
+
/**
|
|
17
|
+
* Experimental: Returns the native Slate.js document as JSON. Ideal to retain the pure editor content structure.
|
|
18
|
+
*/
|
|
19
|
+
type: 'slatejson';
|
|
20
|
+
};
|
|
3
21
|
type Meta = {
|
|
4
22
|
active?: boolean;
|
|
5
23
|
dirty?: boolean;
|
|
@@ -111,6 +129,11 @@ export type UIField<Type, List extends boolean> = {
|
|
|
111
129
|
type FieldGeneric<Type, List extends boolean | undefined, ExtraFieldUIProps = {}> = List extends true ? {
|
|
112
130
|
list: true;
|
|
113
131
|
ui?: UIField<Type, true> & ExtraFieldUIProps;
|
|
132
|
+
/**
|
|
133
|
+
* Defines where new items will be added in the list.
|
|
134
|
+
* If not specified, defaults to `append`.
|
|
135
|
+
*/
|
|
136
|
+
addItemBehavior?: 'append' | 'prepend';
|
|
114
137
|
} : List extends false ? {
|
|
115
138
|
list?: false;
|
|
116
139
|
ui?: UIField<Type, false> & ExtraFieldUIProps;
|
|
@@ -150,14 +173,24 @@ type DateFormatProps = {
|
|
|
150
173
|
* dateFormat: 'YYYY MM DD'
|
|
151
174
|
* ```
|
|
152
175
|
*/
|
|
153
|
-
dateFormat?: string;
|
|
154
|
-
timeFormat?: string;
|
|
176
|
+
dateFormat?: string | boolean;
|
|
177
|
+
timeFormat?: string | boolean;
|
|
155
178
|
};
|
|
156
179
|
export type DateTimeField = (FieldGeneric<string, undefined, DateFormatProps> | FieldGeneric<string, true, DateFormatProps> | FieldGeneric<string, false, DateFormatProps>) & BaseField & {
|
|
157
180
|
type: 'datetime';
|
|
158
181
|
};
|
|
159
182
|
export type ImageField = (FieldGeneric<string, undefined> | FieldGeneric<string, true> | FieldGeneric<string, false>) & BaseField & {
|
|
160
183
|
type: 'image';
|
|
184
|
+
/**
|
|
185
|
+
* A function that returns the upload directory path based on the form values.
|
|
186
|
+
* This is used to organize uploaded images into specific folders.
|
|
187
|
+
*
|
|
188
|
+
* @example
|
|
189
|
+
* ```ts
|
|
190
|
+
* uploadDir: (formValues) => `uploads/${formValues.category}`
|
|
191
|
+
* ```
|
|
192
|
+
*/
|
|
193
|
+
uploadDir?: (formValues: Record<string, any>) => string;
|
|
161
194
|
};
|
|
162
195
|
type ReferenceFieldOptions = {
|
|
163
196
|
optionComponent?: OptionComponent;
|
|
@@ -185,7 +218,7 @@ export type ReferenceField = (FieldGeneric<string, undefined, ReferenceFieldOpti
|
|
|
185
218
|
export type PasswordField = (FieldGeneric<string, undefined> | FieldGeneric<string, false>) & BaseField & {
|
|
186
219
|
type: 'password';
|
|
187
220
|
};
|
|
188
|
-
type
|
|
221
|
+
type ToolbarOverrideType = 'heading' | 'link' | 'image' | 'quote' | 'ul' | 'ol' | 'code' | 'codeBlock' | 'bold' | 'italic' | 'raw' | 'embed' | 'mermaid' | 'table';
|
|
189
222
|
type RichTextAst = {
|
|
190
223
|
type: 'root';
|
|
191
224
|
children: Record<string, unknown>[];
|
|
@@ -198,24 +231,21 @@ export type RichTextField<WithNamespace extends boolean = false> = (FieldGeneric
|
|
|
198
231
|
* will be stored as frontmatter
|
|
199
232
|
*/
|
|
200
233
|
isBody?: boolean;
|
|
201
|
-
|
|
234
|
+
/**@deprecated use overrides.toolbar */
|
|
235
|
+
toolbarOverride?: ToolbarOverrideType[];
|
|
202
236
|
templates?: RichTextTemplate<WithNamespace>[];
|
|
237
|
+
overrides?: {
|
|
238
|
+
toolbar?: ToolbarOverrideType[];
|
|
239
|
+
/**Default set to true */
|
|
240
|
+
showFloatingToolbar?: boolean;
|
|
241
|
+
};
|
|
203
242
|
/**
|
|
204
243
|
* By default, Tina parses markdown with MDX, this is a more strict parser
|
|
205
244
|
* that allows you to use structured content inside markdown (via `templates`).
|
|
206
245
|
*
|
|
207
246
|
* Specify `"markdown"` if you're having problems with Tina parsing your content.
|
|
208
247
|
*/
|
|
209
|
-
parser?:
|
|
210
|
-
type: 'markdown';
|
|
211
|
-
/**
|
|
212
|
-
* Tina will escape entities like `<` and `[` by default. You can choose to turn
|
|
213
|
-
* off all escaping, or specify HTML, so `<div>` will not be turned into `\<div>`
|
|
214
|
-
*/
|
|
215
|
-
skipEscaping?: 'all' | 'html' | 'none';
|
|
216
|
-
} | {
|
|
217
|
-
type: 'mdx';
|
|
218
|
-
};
|
|
248
|
+
parser?: Parser;
|
|
219
249
|
};
|
|
220
250
|
export type RichTextTemplate<WithNamespace extends boolean = false> = Template<WithNamespace> & {
|
|
221
251
|
inline?: boolean;
|
|
@@ -371,7 +401,7 @@ export interface Config<CMSCallback = undefined, FormifyCallback = undefined, Do
|
|
|
371
401
|
/**
|
|
372
402
|
* The Schema is used to define the shape of the content.
|
|
373
403
|
*
|
|
374
|
-
* https://tina.io/docs/
|
|
404
|
+
* https://tina.io/docs/r/the-config-file/
|
|
375
405
|
*/
|
|
376
406
|
schema: Schema;
|
|
377
407
|
/**
|
|
@@ -394,7 +424,7 @@ export interface Config<CMSCallback = undefined, FormifyCallback = undefined, Do
|
|
|
394
424
|
token?: string | null;
|
|
395
425
|
ui?: {
|
|
396
426
|
/**
|
|
397
|
-
* When using
|
|
427
|
+
* When using TinaCloud's branching feature, provide the URL for your given branch
|
|
398
428
|
*
|
|
399
429
|
* Eg. If you're deplying to Vercel, and your repo name is 'my-app',
|
|
400
430
|
* Vercel's preview URL would be based on the branch:
|
|
@@ -408,11 +438,27 @@ export interface Config<CMSCallback = undefined, FormifyCallback = undefined, Do
|
|
|
408
438
|
* ```
|
|
409
439
|
* [more info](https://vercel.com/docs/concepts/deployments/generated-urls#url-with-git-branch)
|
|
410
440
|
*/
|
|
411
|
-
previewUrl
|
|
441
|
+
previewUrl?: (context: {
|
|
412
442
|
branch: string;
|
|
413
443
|
}) => {
|
|
414
444
|
url: string;
|
|
415
445
|
};
|
|
446
|
+
/**
|
|
447
|
+
* Opt out of update checks - this will prevent the CMS for checking for new versions
|
|
448
|
+
* If true, the CMS will not check for updates.
|
|
449
|
+
* Defaults to false if not specified.
|
|
450
|
+
*/
|
|
451
|
+
optOutOfUpdateCheck?: boolean;
|
|
452
|
+
/**
|
|
453
|
+
* Regular expression pattern that folder names must match when creating new folders.
|
|
454
|
+
* Only applies to newly created folders, not existing ones.
|
|
455
|
+
*
|
|
456
|
+
* @example "^[a-z0-9-]+$" - allows lowercase letters, numbers, and hyphens only
|
|
457
|
+
* @example "^[A-Za-z0-9_-]+$" - allows letters, numbers, underscores, and hyphens
|
|
458
|
+
*/
|
|
459
|
+
regexValidation?: {
|
|
460
|
+
folderNameRegex?: string;
|
|
461
|
+
};
|
|
416
462
|
};
|
|
417
463
|
/**
|
|
418
464
|
* Configurations for the autogenerated GraphQL HTTP client
|
|
@@ -492,7 +538,7 @@ export interface Config<CMSCallback = undefined, FormifyCallback = undefined, Do
|
|
|
492
538
|
} | {
|
|
493
539
|
/**
|
|
494
540
|
* Use Git-backed assets for media, these values will
|
|
495
|
-
* [Learn more](https://tina.io/docs/
|
|
541
|
+
* [Learn more](https://tina.io/docs/r/repo-based-media/)
|
|
496
542
|
*/
|
|
497
543
|
tina: {
|
|
498
544
|
/**
|
|
@@ -521,7 +567,7 @@ export interface Config<CMSCallback = undefined, FormifyCallback = undefined, Do
|
|
|
521
567
|
} | {
|
|
522
568
|
searchClient?: never;
|
|
523
569
|
/**
|
|
524
|
-
* Use the
|
|
570
|
+
* Use the TinaCloud search index
|
|
525
571
|
*/
|
|
526
572
|
tina: {
|
|
527
573
|
/**
|
|
@@ -548,7 +594,7 @@ export interface Config<CMSCallback = undefined, FormifyCallback = undefined, Do
|
|
|
548
594
|
maxSearchIndexFieldLength?: number;
|
|
549
595
|
};
|
|
550
596
|
/**
|
|
551
|
-
* Used to override the default
|
|
597
|
+
* Used to override the default TinaCloud API URL
|
|
552
598
|
*
|
|
553
599
|
* [mostly for internal use only]
|
|
554
600
|
*/
|
|
@@ -567,7 +613,7 @@ export interface Schema<WithNamespace extends boolean = false> {
|
|
|
567
613
|
/**
|
|
568
614
|
* 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).
|
|
569
615
|
*
|
|
570
|
-
* https://tina.io/docs/
|
|
616
|
+
* https://tina.io/docs/r/content-modelling-collections/
|
|
571
617
|
*/
|
|
572
618
|
collections: Collection<WithNamespace>[];
|
|
573
619
|
/**
|
|
@@ -581,7 +627,7 @@ interface BaseCollection {
|
|
|
581
627
|
name: string;
|
|
582
628
|
path: string;
|
|
583
629
|
indexes?: IndexType[];
|
|
584
|
-
format?:
|
|
630
|
+
format?: ContentFormat;
|
|
585
631
|
ui?: UICollection;
|
|
586
632
|
/**
|
|
587
633
|
* @deprecated - use `ui.defaultItem` on the each `template` instead
|
|
@@ -590,7 +636,7 @@ interface BaseCollection {
|
|
|
590
636
|
/**
|
|
591
637
|
* This format will be used to parse the markdown frontmatter
|
|
592
638
|
*/
|
|
593
|
-
frontmatterFormat?:
|
|
639
|
+
frontmatterFormat?: ContentFrontmatterFormat;
|
|
594
640
|
/**
|
|
595
641
|
* The delimiters used to parse the frontmatter.
|
|
596
642
|
*/
|
|
@@ -606,7 +652,7 @@ type TemplateCollection<WithNamespace extends boolean = false> = {
|
|
|
606
652
|
/**
|
|
607
653
|
* 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".
|
|
608
654
|
*
|
|
609
|
-
* https://tina.io/docs/
|
|
655
|
+
* https://tina.io/docs/r/content-modelling-templates/
|
|
610
656
|
*/
|
|
611
657
|
templates: Template<WithNamespace>[];
|
|
612
658
|
fields?: undefined;
|
|
@@ -615,7 +661,7 @@ type FieldCollection<WithNamespace extends boolean = false> = {
|
|
|
615
661
|
/**
|
|
616
662
|
* Fields define the shape of the content and the user input.
|
|
617
663
|
*
|
|
618
|
-
* https://tina.io/docs/
|
|
664
|
+
* https://tina.io/docs/r/string-fields/
|
|
619
665
|
*/
|
|
620
666
|
fields: TinaField<WithNamespace>[];
|
|
621
667
|
templates?: undefined;
|
|
@@ -630,6 +676,7 @@ type Document = {
|
|
|
630
676
|
relativePath: string;
|
|
631
677
|
filename: string;
|
|
632
678
|
extension: string;
|
|
679
|
+
hasReferences?: boolean;
|
|
633
680
|
};
|
|
634
681
|
};
|
|
635
682
|
export interface UICollection<Form = any, CMS = any, TinaForm = any> {
|
|
@@ -671,6 +718,7 @@ export interface UICollection<Form = any, CMS = any, TinaForm = any> {
|
|
|
671
718
|
allowedActions?: {
|
|
672
719
|
create?: boolean;
|
|
673
720
|
delete?: boolean;
|
|
721
|
+
createFolder?: boolean;
|
|
674
722
|
createNestedFolder?: boolean;
|
|
675
723
|
};
|
|
676
724
|
/**
|
|
@@ -1 +1,9 @@
|
|
|
1
1
|
export declare const normalizePath: (filepath: string) => string;
|
|
2
|
+
/**
|
|
3
|
+
* Returns the given path such that:
|
|
4
|
+
* - The path separator is converted from '\' to '/' if necessary.
|
|
5
|
+
* - Duplicate '/' are removed
|
|
6
|
+
* - Leading and trailing '/' are cleared
|
|
7
|
+
* @param filepath Filepath to convert to its canonical form
|
|
8
|
+
*/
|
|
9
|
+
export declare const canonicalPath: (filepath: string) => string;
|
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
*/
|
|
4
1
|
import { z } from 'zod';
|
|
5
2
|
export declare const CollectionBaseSchema: z.ZodObject<{
|
|
6
3
|
label: z.ZodOptional<z.ZodString>;
|
|
7
4
|
name: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
8
5
|
path: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
9
|
-
format: z.ZodOptional<z.ZodEnum<["
|
|
6
|
+
format: z.ZodOptional<z.ZodEnum<["mdx", "md", "markdown", "json", "yaml", "yml", "toml"]>>;
|
|
10
7
|
isAuthCollection: z.ZodOptional<z.ZodBoolean>;
|
|
11
8
|
isDetached: z.ZodOptional<z.ZodBoolean>;
|
|
12
9
|
}, "strip", z.ZodTypeAny, {
|
|
13
10
|
name?: string;
|
|
14
11
|
label?: string;
|
|
15
12
|
path?: string;
|
|
16
|
-
format?: "
|
|
13
|
+
format?: "mdx" | "md" | "markdown" | "json" | "yaml" | "yml" | "toml";
|
|
17
14
|
isDetached?: boolean;
|
|
18
15
|
isAuthCollection?: boolean;
|
|
19
16
|
}, {
|
|
20
17
|
name?: string;
|
|
21
18
|
label?: string;
|
|
22
19
|
path?: string;
|
|
23
|
-
format?: "
|
|
20
|
+
format?: "mdx" | "md" | "markdown" | "json" | "yaml" | "yml" | "toml";
|
|
24
21
|
isDetached?: boolean;
|
|
25
22
|
isAuthCollection?: boolean;
|
|
26
23
|
}>;
|
|
@@ -29,90 +26,90 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
|
|
|
29
26
|
label: z.ZodOptional<z.ZodString>;
|
|
30
27
|
name: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
31
28
|
path: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
32
|
-
format: z.ZodOptional<z.ZodEnum<["
|
|
29
|
+
format: z.ZodOptional<z.ZodEnum<["mdx", "md", "markdown", "json", "yaml", "yml", "toml"]>>;
|
|
33
30
|
isAuthCollection: z.ZodOptional<z.ZodBoolean>;
|
|
34
31
|
isDetached: z.ZodOptional<z.ZodBoolean>;
|
|
35
32
|
}, {
|
|
36
|
-
fields: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodType<import("
|
|
33
|
+
fields: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodType<import("../types/index").TinaField, z.ZodTypeDef, import("../types/index").TinaField>, "many">>, import("../types/index").TinaField[], import("../types/index").TinaField[]>, import("../types/index").TinaField[], import("../types/index").TinaField[]>, import("../types/index").TinaField[], import("../types/index").TinaField[]>, import("../types/index").TinaField[], import("../types/index").TinaField[]>;
|
|
37
34
|
templates: z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
38
35
|
label: z.ZodString;
|
|
39
36
|
name: z.ZodEffects<z.ZodString, string, string>;
|
|
40
|
-
fields: z.ZodArray<z.ZodType<import("
|
|
37
|
+
fields: z.ZodArray<z.ZodType<import("../types/index").TinaField, z.ZodTypeDef, import("../types/index").TinaField>, "many">;
|
|
41
38
|
}, "strip", z.ZodTypeAny, {
|
|
42
39
|
name?: string;
|
|
43
|
-
fields?: import("
|
|
40
|
+
fields?: import("../types/index").TinaField[];
|
|
44
41
|
label?: string;
|
|
45
42
|
}, {
|
|
46
43
|
name?: string;
|
|
47
|
-
fields?: import("
|
|
44
|
+
fields?: import("../types/index").TinaField[];
|
|
48
45
|
label?: string;
|
|
49
46
|
}>, {
|
|
50
47
|
name?: string;
|
|
51
|
-
fields?: import("
|
|
48
|
+
fields?: import("../types/index").TinaField[];
|
|
52
49
|
label?: string;
|
|
53
50
|
}, {
|
|
54
51
|
name?: string;
|
|
55
|
-
fields?: import("
|
|
52
|
+
fields?: import("../types/index").TinaField[];
|
|
56
53
|
label?: string;
|
|
57
54
|
}>, "many">>, {
|
|
58
55
|
name?: string;
|
|
59
|
-
fields?: import("
|
|
56
|
+
fields?: import("../types/index").TinaField[];
|
|
60
57
|
label?: string;
|
|
61
58
|
}[], {
|
|
62
59
|
name?: string;
|
|
63
|
-
fields?: import("
|
|
60
|
+
fields?: import("../types/index").TinaField[];
|
|
64
61
|
label?: string;
|
|
65
62
|
}[]>;
|
|
66
63
|
}>, "strip", z.ZodTypeAny, {
|
|
67
64
|
name?: string;
|
|
68
65
|
templates?: {
|
|
69
66
|
name?: string;
|
|
70
|
-
fields?: import("
|
|
67
|
+
fields?: import("../types/index").TinaField[];
|
|
71
68
|
label?: string;
|
|
72
69
|
}[];
|
|
73
|
-
fields?: import("
|
|
70
|
+
fields?: import("../types/index").TinaField[];
|
|
74
71
|
label?: string;
|
|
75
72
|
path?: string;
|
|
76
|
-
format?: "
|
|
73
|
+
format?: "mdx" | "md" | "markdown" | "json" | "yaml" | "yml" | "toml";
|
|
77
74
|
isDetached?: boolean;
|
|
78
75
|
isAuthCollection?: boolean;
|
|
79
76
|
}, {
|
|
80
77
|
name?: string;
|
|
81
78
|
templates?: {
|
|
82
79
|
name?: string;
|
|
83
|
-
fields?: import("
|
|
80
|
+
fields?: import("../types/index").TinaField[];
|
|
84
81
|
label?: string;
|
|
85
82
|
}[];
|
|
86
|
-
fields?: import("
|
|
83
|
+
fields?: import("../types/index").TinaField[];
|
|
87
84
|
label?: string;
|
|
88
85
|
path?: string;
|
|
89
|
-
format?: "
|
|
86
|
+
format?: "mdx" | "md" | "markdown" | "json" | "yaml" | "yml" | "toml";
|
|
90
87
|
isDetached?: boolean;
|
|
91
88
|
isAuthCollection?: boolean;
|
|
92
89
|
}>, {
|
|
93
90
|
name?: string;
|
|
94
91
|
templates?: {
|
|
95
92
|
name?: string;
|
|
96
|
-
fields?: import("
|
|
93
|
+
fields?: import("../types/index").TinaField[];
|
|
97
94
|
label?: string;
|
|
98
95
|
}[];
|
|
99
|
-
fields?: import("
|
|
96
|
+
fields?: import("../types/index").TinaField[];
|
|
100
97
|
label?: string;
|
|
101
98
|
path?: string;
|
|
102
|
-
format?: "
|
|
99
|
+
format?: "mdx" | "md" | "markdown" | "json" | "yaml" | "yml" | "toml";
|
|
103
100
|
isDetached?: boolean;
|
|
104
101
|
isAuthCollection?: boolean;
|
|
105
102
|
}, {
|
|
106
103
|
name?: string;
|
|
107
104
|
templates?: {
|
|
108
105
|
name?: string;
|
|
109
|
-
fields?: import("
|
|
106
|
+
fields?: import("../types/index").TinaField[];
|
|
110
107
|
label?: string;
|
|
111
108
|
}[];
|
|
112
|
-
fields?: import("
|
|
109
|
+
fields?: import("../types/index").TinaField[];
|
|
113
110
|
label?: string;
|
|
114
111
|
path?: string;
|
|
115
|
-
format?: "
|
|
112
|
+
format?: "mdx" | "md" | "markdown" | "json" | "yaml" | "yml" | "toml";
|
|
116
113
|
isDetached?: boolean;
|
|
117
114
|
isAuthCollection?: boolean;
|
|
118
115
|
}>, "many">;
|
|
@@ -190,6 +187,29 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
|
|
|
190
187
|
searchClient?: any;
|
|
191
188
|
indexBatchSize?: number;
|
|
192
189
|
}>>;
|
|
190
|
+
ui: z.ZodOptional<z.ZodObject<{
|
|
191
|
+
previewUrl: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>>;
|
|
192
|
+
optOutOfUpdateCheck: z.ZodOptional<z.ZodBoolean>;
|
|
193
|
+
regexValidation: z.ZodOptional<z.ZodObject<{
|
|
194
|
+
folderNameRegex: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
195
|
+
}, "strip", z.ZodTypeAny, {
|
|
196
|
+
folderNameRegex?: string;
|
|
197
|
+
}, {
|
|
198
|
+
folderNameRegex?: string;
|
|
199
|
+
}>>;
|
|
200
|
+
}, "strip", z.ZodTypeAny, {
|
|
201
|
+
previewUrl?: (...args: unknown[]) => unknown;
|
|
202
|
+
optOutOfUpdateCheck?: boolean;
|
|
203
|
+
regexValidation?: {
|
|
204
|
+
folderNameRegex?: string;
|
|
205
|
+
};
|
|
206
|
+
}, {
|
|
207
|
+
previewUrl?: (...args: unknown[]) => unknown;
|
|
208
|
+
optOutOfUpdateCheck?: boolean;
|
|
209
|
+
regexValidation?: {
|
|
210
|
+
folderNameRegex?: string;
|
|
211
|
+
};
|
|
212
|
+
}>>;
|
|
193
213
|
}, "strip", z.ZodTypeAny, {
|
|
194
214
|
search?: {
|
|
195
215
|
maxSearchIndexFieldLength?: number;
|
|
@@ -201,6 +221,13 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
|
|
|
201
221
|
searchClient?: any;
|
|
202
222
|
indexBatchSize?: number;
|
|
203
223
|
};
|
|
224
|
+
ui?: {
|
|
225
|
+
previewUrl?: (...args: unknown[]) => unknown;
|
|
226
|
+
optOutOfUpdateCheck?: boolean;
|
|
227
|
+
regexValidation?: {
|
|
228
|
+
folderNameRegex?: string;
|
|
229
|
+
};
|
|
230
|
+
};
|
|
204
231
|
client?: {
|
|
205
232
|
referenceDepth?: number;
|
|
206
233
|
};
|
|
@@ -223,6 +250,13 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
|
|
|
223
250
|
searchClient?: any;
|
|
224
251
|
indexBatchSize?: number;
|
|
225
252
|
};
|
|
253
|
+
ui?: {
|
|
254
|
+
previewUrl?: (...args: unknown[]) => unknown;
|
|
255
|
+
optOutOfUpdateCheck?: boolean;
|
|
256
|
+
regexValidation?: {
|
|
257
|
+
folderNameRegex?: string;
|
|
258
|
+
};
|
|
259
|
+
};
|
|
226
260
|
client?: {
|
|
227
261
|
referenceDepth?: number;
|
|
228
262
|
};
|
|
@@ -240,13 +274,13 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
|
|
|
240
274
|
name?: string;
|
|
241
275
|
templates?: {
|
|
242
276
|
name?: string;
|
|
243
|
-
fields?: import("
|
|
277
|
+
fields?: import("../types/index").TinaField[];
|
|
244
278
|
label?: string;
|
|
245
279
|
}[];
|
|
246
|
-
fields?: import("
|
|
280
|
+
fields?: import("../types/index").TinaField[];
|
|
247
281
|
label?: string;
|
|
248
282
|
path?: string;
|
|
249
|
-
format?: "
|
|
283
|
+
format?: "mdx" | "md" | "markdown" | "json" | "yaml" | "yml" | "toml";
|
|
250
284
|
isDetached?: boolean;
|
|
251
285
|
isAuthCollection?: boolean;
|
|
252
286
|
}[];
|
|
@@ -261,6 +295,13 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
|
|
|
261
295
|
searchClient?: any;
|
|
262
296
|
indexBatchSize?: number;
|
|
263
297
|
};
|
|
298
|
+
ui?: {
|
|
299
|
+
previewUrl?: (...args: unknown[]) => unknown;
|
|
300
|
+
optOutOfUpdateCheck?: boolean;
|
|
301
|
+
regexValidation?: {
|
|
302
|
+
folderNameRegex?: string;
|
|
303
|
+
};
|
|
304
|
+
};
|
|
264
305
|
client?: {
|
|
265
306
|
referenceDepth?: number;
|
|
266
307
|
};
|
|
@@ -278,13 +319,13 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
|
|
|
278
319
|
name?: string;
|
|
279
320
|
templates?: {
|
|
280
321
|
name?: string;
|
|
281
|
-
fields?: import("
|
|
322
|
+
fields?: import("../types/index").TinaField[];
|
|
282
323
|
label?: string;
|
|
283
324
|
}[];
|
|
284
|
-
fields?: import("
|
|
325
|
+
fields?: import("../types/index").TinaField[];
|
|
285
326
|
label?: string;
|
|
286
327
|
path?: string;
|
|
287
|
-
format?: "
|
|
328
|
+
format?: "mdx" | "md" | "markdown" | "json" | "yaml" | "yml" | "toml";
|
|
288
329
|
isDetached?: boolean;
|
|
289
330
|
isAuthCollection?: boolean;
|
|
290
331
|
}[];
|
|
@@ -299,6 +340,13 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
|
|
|
299
340
|
searchClient?: any;
|
|
300
341
|
indexBatchSize?: number;
|
|
301
342
|
};
|
|
343
|
+
ui?: {
|
|
344
|
+
previewUrl?: (...args: unknown[]) => unknown;
|
|
345
|
+
optOutOfUpdateCheck?: boolean;
|
|
346
|
+
regexValidation?: {
|
|
347
|
+
folderNameRegex?: string;
|
|
348
|
+
};
|
|
349
|
+
};
|
|
302
350
|
client?: {
|
|
303
351
|
referenceDepth?: number;
|
|
304
352
|
};
|
|
@@ -316,13 +364,13 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
|
|
|
316
364
|
name?: string;
|
|
317
365
|
templates?: {
|
|
318
366
|
name?: string;
|
|
319
|
-
fields?: import("
|
|
367
|
+
fields?: import("../types/index").TinaField[];
|
|
320
368
|
label?: string;
|
|
321
369
|
}[];
|
|
322
|
-
fields?: import("
|
|
370
|
+
fields?: import("../types/index").TinaField[];
|
|
323
371
|
label?: string;
|
|
324
372
|
path?: string;
|
|
325
|
-
format?: "
|
|
373
|
+
format?: "mdx" | "md" | "markdown" | "json" | "yaml" | "yml" | "toml";
|
|
326
374
|
isDetached?: boolean;
|
|
327
375
|
isAuthCollection?: boolean;
|
|
328
376
|
}[];
|
|
@@ -337,6 +385,13 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
|
|
|
337
385
|
searchClient?: any;
|
|
338
386
|
indexBatchSize?: number;
|
|
339
387
|
};
|
|
388
|
+
ui?: {
|
|
389
|
+
previewUrl?: (...args: unknown[]) => unknown;
|
|
390
|
+
optOutOfUpdateCheck?: boolean;
|
|
391
|
+
regexValidation?: {
|
|
392
|
+
folderNameRegex?: string;
|
|
393
|
+
};
|
|
394
|
+
};
|
|
340
395
|
client?: {
|
|
341
396
|
referenceDepth?: number;
|
|
342
397
|
};
|
|
@@ -354,13 +409,13 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
|
|
|
354
409
|
name?: string;
|
|
355
410
|
templates?: {
|
|
356
411
|
name?: string;
|
|
357
|
-
fields?: import("
|
|
412
|
+
fields?: import("../types/index").TinaField[];
|
|
358
413
|
label?: string;
|
|
359
414
|
}[];
|
|
360
|
-
fields?: import("
|
|
415
|
+
fields?: import("../types/index").TinaField[];
|
|
361
416
|
label?: string;
|
|
362
417
|
path?: string;
|
|
363
|
-
format?: "
|
|
418
|
+
format?: "mdx" | "md" | "markdown" | "json" | "yaml" | "yml" | "toml";
|
|
364
419
|
isDetached?: boolean;
|
|
365
420
|
isAuthCollection?: boolean;
|
|
366
421
|
}[];
|
|
@@ -375,6 +430,13 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
|
|
|
375
430
|
searchClient?: any;
|
|
376
431
|
indexBatchSize?: number;
|
|
377
432
|
};
|
|
433
|
+
ui?: {
|
|
434
|
+
previewUrl?: (...args: unknown[]) => unknown;
|
|
435
|
+
optOutOfUpdateCheck?: boolean;
|
|
436
|
+
regexValidation?: {
|
|
437
|
+
folderNameRegex?: string;
|
|
438
|
+
};
|
|
439
|
+
};
|
|
378
440
|
client?: {
|
|
379
441
|
referenceDepth?: number;
|
|
380
442
|
};
|