@cloudcannon/configuration-types 0.0.34 → 0.0.36
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/cloudcannon-config.latest.schema.json +270 -0
- package/dist/cloudcannon-config.legacy-eleventy.schema.json +270 -0
- package/dist/cloudcannon-config.legacy-hugo.schema.json +270 -0
- package/dist/cloudcannon-config.legacy-jekyll.schema.json +270 -0
- package/dist/cloudcannon-config.legacy-reader.schema.json +270 -0
- package/package.json +1 -1
- package/src/inputs.d.ts +87 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcannon/configuration-types",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.36",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Contains TypeScript declarations and generates JSONSchema files for the CloudCannon configuration file.",
|
|
6
6
|
"author": "CloudCannon <support@cloudcannon.com>",
|
package/src/inputs.d.ts
CHANGED
|
@@ -53,6 +53,13 @@ interface WithRequiredValidation {
|
|
|
53
53
|
* By default, this key is false (i.e, CloudCannon does not require this Input to have a value).
|
|
54
54
|
*/
|
|
55
55
|
required?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* This key defines the message that explains why an Input is required. This key requires you to
|
|
58
|
+
* define `options.required`.
|
|
59
|
+
*
|
|
60
|
+
* This key has no default.
|
|
61
|
+
*/
|
|
62
|
+
required_message?: string;
|
|
56
63
|
}
|
|
57
64
|
|
|
58
65
|
interface WithTextValidation {
|
|
@@ -70,6 +77,13 @@ interface WithTextValidation {
|
|
|
70
77
|
* To use this key in a Select Input, `options.allow_create` must be set to true.
|
|
71
78
|
*/
|
|
72
79
|
max_length?: number;
|
|
80
|
+
/**
|
|
81
|
+
* This key defines the message that explains which maximum string length an Input will accept.
|
|
82
|
+
* This key requires you to define `options.max_length`.
|
|
83
|
+
*
|
|
84
|
+
* This key has no default.
|
|
85
|
+
*/
|
|
86
|
+
max_length_message?: string;
|
|
73
87
|
/**
|
|
74
88
|
* This key defines the minimum string length, in characters, that CloudCannon will allow in an
|
|
75
89
|
* Input. When configured, CloudCannon will warn you when an Input value is too short. If the
|
|
@@ -84,6 +98,13 @@ interface WithTextValidation {
|
|
|
84
98
|
* To use this key in a Select Input, `options.allow_create` must be set to true.
|
|
85
99
|
*/
|
|
86
100
|
min_length?: number;
|
|
101
|
+
/**
|
|
102
|
+
* This key defines the message that explains which minimum string length an Input will accept.
|
|
103
|
+
* This key requires you to define `options.min_length`.
|
|
104
|
+
*
|
|
105
|
+
* This key has no default.
|
|
106
|
+
*/
|
|
107
|
+
min_length_message?: string;
|
|
87
108
|
/**
|
|
88
109
|
* This key defines a regular expression that the Input value must match. When configured,
|
|
89
110
|
* CloudCannon will require you to enter a value that matches the REGEX pattern. If the Input
|
|
@@ -166,6 +187,13 @@ interface WithArrayValidation {
|
|
|
166
187
|
* This key has no default.
|
|
167
188
|
*/
|
|
168
189
|
max_items?: number;
|
|
190
|
+
/**
|
|
191
|
+
* This key defines the message that explains why an Input needs to have a maximum number of
|
|
192
|
+
* items. This key requires you to define `options.max_items`.
|
|
193
|
+
*
|
|
194
|
+
* This key has no default.
|
|
195
|
+
*/
|
|
196
|
+
max_items_message?: string;
|
|
169
197
|
/**
|
|
170
198
|
* This key defines the minimum number of items CloudCannon will allow in an Input. When
|
|
171
199
|
* configured, CloudCannon will prevent you from removing items from this Input below this value.
|
|
@@ -178,6 +206,13 @@ interface WithArrayValidation {
|
|
|
178
206
|
* This key has no default.
|
|
179
207
|
*/
|
|
180
208
|
min_items?: number;
|
|
209
|
+
/**
|
|
210
|
+
* This key defines the message that explains why an Input needs to have a minimum number of
|
|
211
|
+
* items. This key requires you to define `options.min_items`.
|
|
212
|
+
*
|
|
213
|
+
* This key has no default.
|
|
214
|
+
*/
|
|
215
|
+
min_items_message?: string;
|
|
181
216
|
/**
|
|
182
217
|
* This key defines the JSON Path selector that CloudCannon should use to determine if the value
|
|
183
218
|
* of an Input is unique. When configured, CloudCannon will require the value of the Input to be
|
|
@@ -190,6 +225,13 @@ interface WithArrayValidation {
|
|
|
190
225
|
* This key has no default.
|
|
191
226
|
*/
|
|
192
227
|
unique_on?: string;
|
|
228
|
+
/**
|
|
229
|
+
* This key defines the message that explains why an Input needs to be unique. This key requires
|
|
230
|
+
* you to define `options.unique_on`.
|
|
231
|
+
*
|
|
232
|
+
* This key has no default.
|
|
233
|
+
*/
|
|
234
|
+
unique_on_message?: string;
|
|
193
235
|
}
|
|
194
236
|
|
|
195
237
|
export interface WithArrayControlOptions {
|
|
@@ -446,6 +488,13 @@ export interface NumberInputOptions extends WithEmptyTypeNumber, WithRequiredVal
|
|
|
446
488
|
* This key has no default.
|
|
447
489
|
*/
|
|
448
490
|
min?: number;
|
|
491
|
+
/**
|
|
492
|
+
* This key defines the message that explains why an Input needs to have a minimum numerical
|
|
493
|
+
* value. This key requires you to define `options.min`.
|
|
494
|
+
*
|
|
495
|
+
* This key has no default.
|
|
496
|
+
*/
|
|
497
|
+
min_message?: string;
|
|
449
498
|
/**
|
|
450
499
|
* This key defines the maximum numerical value CloudCannon will allow in an Input. When
|
|
451
500
|
* configured, CloudCannon will prevent you from entering a greater numerical value. If the Input
|
|
@@ -458,6 +507,13 @@ export interface NumberInputOptions extends WithEmptyTypeNumber, WithRequiredVal
|
|
|
458
507
|
* This key has no default.
|
|
459
508
|
*/
|
|
460
509
|
max?: number;
|
|
510
|
+
/**
|
|
511
|
+
* This key defines the message that explains why an Input needs to have a maximum numerical
|
|
512
|
+
* value. This key requires you to define `options.max`.
|
|
513
|
+
*
|
|
514
|
+
* This key has no default.
|
|
515
|
+
*/
|
|
516
|
+
max_message?: string;
|
|
461
517
|
/**
|
|
462
518
|
* A number that specifies the granularity that the value must adhere to, or the special value
|
|
463
519
|
* any, which allows any decimal value between `max` and `min`.
|
|
@@ -572,6 +628,13 @@ export interface DateInputOptions extends WithEmptyTypeText, WithRequiredValidat
|
|
|
572
628
|
* This key has no default.
|
|
573
629
|
*/
|
|
574
630
|
start_from?: Date;
|
|
631
|
+
/**
|
|
632
|
+
* This key defines the message that explains why an Input needs to have a start date. This key
|
|
633
|
+
* requires you to define `options.start_from`.
|
|
634
|
+
*
|
|
635
|
+
* This key has no default.
|
|
636
|
+
*/
|
|
637
|
+
start_from_message?: string;
|
|
575
638
|
/**
|
|
576
639
|
* This key defines the date and time, exclusive, that CloudCannon will allow in an Input. When
|
|
577
640
|
* configured, CloudCannon will prevent you from selecting a later date and time. If the Input
|
|
@@ -584,6 +647,13 @@ export interface DateInputOptions extends WithEmptyTypeText, WithRequiredValidat
|
|
|
584
647
|
* This key has no default.
|
|
585
648
|
*/
|
|
586
649
|
end_before?: Date;
|
|
650
|
+
/**
|
|
651
|
+
* This key defines the message that explains why an Input needs to have an end date. This key
|
|
652
|
+
* requires you to define `options.end_before`.
|
|
653
|
+
*
|
|
654
|
+
* This key has no default.
|
|
655
|
+
*/
|
|
656
|
+
end_before_message?: string;
|
|
587
657
|
}
|
|
588
658
|
|
|
589
659
|
export interface DateInput extends BaseInput {
|
|
@@ -620,6 +690,23 @@ export interface FileInputOptions
|
|
|
620
690
|
* accepted.
|
|
621
691
|
*/
|
|
622
692
|
accepts_mime_types?: MimeType[] | string;
|
|
693
|
+
/**
|
|
694
|
+
* This key defines the maximum file size, in kilobytes, that CloudCannon will allow in an Input.
|
|
695
|
+
* When configured, CloudCannon will prevent you from uploading a file larger than the specified
|
|
696
|
+
* size. If the Input already contains a file larger than the specified size, CloudCannon will
|
|
697
|
+
* require you to change it to a valid value to save your changes, or discard your unsaved
|
|
698
|
+
* changes.
|
|
699
|
+
*
|
|
700
|
+
* Value can be any positive integer.
|
|
701
|
+
*/
|
|
702
|
+
max_file_size?: number;
|
|
703
|
+
/**
|
|
704
|
+
* This key defines the message that explains why an Input needs to have a maximum file size. This
|
|
705
|
+
* key requires you to define `options.max_file_size`.
|
|
706
|
+
*
|
|
707
|
+
* This key has no default.
|
|
708
|
+
*/
|
|
709
|
+
max_file_size_message?: string;
|
|
623
710
|
/**
|
|
624
711
|
* If you have one or more DAMs connected to your site, you can use this key to list which asset
|
|
625
712
|
* sources can be uploaded to and selected from.
|