@strapi/content-type-builder 5.0.5 → 5.0.6

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.
@@ -8,247 +8,7 @@ export declare const formatAttributes: (model: any) => any;
8
8
  /**
9
9
  * Formats a component attribute
10
10
  */
11
- export declare const formatAttribute: (attribute: Schema.Attribute.AnyAttribute & Record<string, any>) => ({
12
- type: "biginteger";
13
- pluginOptions?: object | undefined;
14
- searchable?: boolean | undefined;
15
- configurable?: boolean | undefined;
16
- default?: string | (() => string) | undefined;
17
- min?: string | undefined;
18
- max?: string | undefined;
19
- private?: boolean | undefined;
20
- required?: boolean | undefined;
21
- writable?: boolean | undefined;
22
- visible?: boolean | undefined;
23
- unique?: boolean | undefined;
24
- } & Record<string, any>) | ({
25
- type: "boolean";
26
- pluginOptions?: object | undefined;
27
- searchable?: boolean | undefined;
28
- configurable?: boolean | undefined;
29
- default?: boolean | (() => boolean) | undefined;
30
- private?: boolean | undefined;
31
- required?: boolean | undefined;
32
- writable?: boolean | undefined;
33
- visible?: boolean | undefined;
34
- } & Record<string, any>) | ({
35
- type: "blocks";
36
- pluginOptions?: object | undefined;
37
- searchable?: boolean | undefined;
38
- configurable?: boolean | undefined;
39
- private?: boolean | undefined;
40
- required?: boolean | undefined;
41
- writable?: boolean | undefined;
42
- visible?: boolean | undefined;
43
- } & Record<string, any>) | ({
44
- type: "component";
45
- pluginOptions?: object | undefined;
46
- searchable?: boolean | undefined;
47
- component: `${string}.${string}`;
48
- repeatable?: boolean | undefined;
49
- configurable?: boolean | undefined;
50
- min?: number | undefined;
51
- max?: number | undefined;
52
- private?: boolean | undefined;
53
- required?: boolean | undefined;
54
- writable?: boolean | undefined;
55
- visible?: boolean | undefined;
56
- } & Record<string, any>) | ({
57
- type: "datetime";
58
- pluginOptions?: object | undefined;
59
- searchable?: boolean | undefined;
60
- configurable?: boolean | undefined;
61
- default?: Schema.Attribute.DateTimeValue | (() => Schema.Attribute.DateTimeValue) | undefined;
62
- private?: boolean | undefined;
63
- required?: boolean | undefined;
64
- unique?: boolean | undefined;
65
- writable?: boolean | undefined;
66
- visible?: boolean | undefined;
67
- } & Record<string, any>) | ({
68
- type: "date";
69
- pluginOptions?: object | undefined;
70
- searchable?: boolean | undefined;
71
- configurable?: boolean | undefined;
72
- default?: Schema.Attribute.DateValue | (() => Schema.Attribute.DateValue) | undefined;
73
- private?: boolean | undefined;
74
- required?: boolean | undefined;
75
- unique?: boolean | undefined;
76
- writable?: boolean | undefined;
77
- visible?: boolean | undefined;
78
- } & Record<string, any>) | ({
79
- type: "decimal";
80
- pluginOptions?: object | undefined;
81
- searchable?: boolean | undefined;
82
- configurable?: boolean | undefined;
83
- default?: number | (() => number) | undefined;
84
- min?: number | undefined;
85
- max?: number | undefined;
86
- private?: boolean | undefined;
87
- required?: boolean | undefined;
88
- writable?: boolean | undefined;
89
- visible?: boolean | undefined;
90
- unique?: boolean | undefined;
91
- } & Record<string, any>) | ({
92
- type: "dynamiczone";
93
- pluginOptions?: object | undefined;
94
- searchable?: boolean | undefined;
95
- components: `${string}.${string}`[];
96
- configurable?: boolean | undefined;
97
- min?: number | undefined;
98
- max?: number | undefined;
99
- required?: boolean | undefined;
100
- writable?: boolean | undefined;
101
- visible?: boolean | undefined;
102
- } & Record<string, any>) | ({
103
- type: "email";
104
- pluginOptions?: object | undefined;
105
- searchable?: boolean | undefined;
106
- configurable?: boolean | undefined;
107
- default?: string | (() => string) | undefined;
108
- minLength?: number | undefined;
109
- maxLength?: number | undefined;
110
- private?: boolean | undefined;
111
- required?: boolean | undefined;
112
- unique?: boolean | undefined;
113
- writable?: boolean | undefined;
114
- visible?: boolean | undefined;
115
- } & Record<string, any>) | ({
116
- type: "enumeration";
117
- pluginOptions?: object | undefined;
118
- searchable?: boolean | undefined;
119
- enum: string[];
120
- enumName?: string | undefined;
121
- configurable?: boolean | undefined;
122
- default?: string | (() => string) | undefined;
123
- private?: boolean | undefined;
124
- required?: boolean | undefined;
125
- writable?: boolean | undefined;
126
- visible?: boolean | undefined;
127
- } & Record<string, any>) | ({
128
- type: "float";
129
- pluginOptions?: object | undefined;
130
- searchable?: boolean | undefined;
131
- configurable?: boolean | undefined;
132
- default?: number | (() => number) | undefined;
133
- min?: number | undefined;
134
- max?: number | undefined;
135
- private?: boolean | undefined;
136
- required?: boolean | undefined;
137
- writable?: boolean | undefined;
138
- visible?: boolean | undefined;
139
- unique?: boolean | undefined;
140
- } & Record<string, any>) | ({
141
- type: "integer";
142
- pluginOptions?: object | undefined;
143
- searchable?: boolean | undefined;
144
- configurable?: boolean | undefined;
145
- default?: number | (() => number) | undefined;
146
- min?: number | undefined;
147
- max?: number | undefined;
148
- private?: boolean | undefined;
149
- required?: boolean | undefined;
150
- writable?: boolean | undefined;
151
- visible?: boolean | undefined;
152
- unique?: boolean | undefined;
153
- } & Record<string, any>) | ({
154
- type: "json";
155
- pluginOptions?: object | undefined;
156
- searchable?: boolean | undefined;
157
- configurable?: boolean | undefined;
158
- required?: boolean | undefined;
159
- private?: boolean | undefined;
160
- writable?: boolean | undefined;
161
- visible?: boolean | undefined;
162
- default?: import("@strapi/types/dist/utils").JSONPrimitive | (() => import("@strapi/types/dist/utils").JSONPrimitive) | undefined;
163
- } & Record<string, any>) | ({
164
- type: "password";
165
- pluginOptions?: object | undefined;
166
- searchable?: boolean | undefined;
167
- configurable?: boolean | undefined;
168
- default?: string | (() => string) | undefined;
169
- minLength?: number | undefined;
170
- maxLength?: number | undefined;
171
- private?: boolean | undefined;
172
- required?: boolean | undefined;
173
- writable?: boolean | undefined;
174
- visible?: boolean | undefined;
175
- } & Record<string, any>) | ({
176
- type: "richtext";
177
- pluginOptions?: object | undefined;
178
- searchable?: boolean | undefined;
179
- configurable?: boolean | undefined;
180
- default?: string | (() => string) | undefined;
181
- minLength?: number | undefined;
182
- maxLength?: number | undefined;
183
- private?: boolean | undefined;
184
- required?: boolean | undefined;
185
- writable?: boolean | undefined;
186
- visible?: boolean | undefined;
187
- } & Record<string, any>) | ({
188
- type: "string";
189
- pluginOptions?: object | undefined;
190
- searchable?: boolean | undefined;
191
- regex?: RegExp | undefined;
192
- configurable?: boolean | undefined;
193
- default?: string | (() => string) | undefined;
194
- minLength?: number | undefined;
195
- maxLength?: number | undefined;
196
- private?: boolean | undefined;
197
- unique?: boolean | undefined;
198
- required?: boolean | undefined;
199
- writable?: boolean | undefined;
200
- visible?: boolean | undefined;
201
- } & Record<string, any>) | ({
202
- type: "text";
203
- pluginOptions?: object | undefined;
204
- searchable?: boolean | undefined;
205
- regex?: RegExp | undefined;
206
- configurable?: boolean | undefined;
207
- default?: string | (() => string) | undefined;
208
- minLength?: number | undefined;
209
- maxLength?: number | undefined;
210
- private?: boolean | undefined;
211
- unique?: boolean | undefined;
212
- required?: boolean | undefined;
213
- writable?: boolean | undefined;
214
- visible?: boolean | undefined;
215
- } & Record<string, any>) | ({
216
- type: "time";
217
- pluginOptions?: object | undefined;
218
- searchable?: boolean | undefined;
219
- configurable?: boolean | undefined;
220
- default?: Schema.Attribute.TimeValue | (() => Schema.Attribute.TimeValue) | undefined;
221
- private?: boolean | undefined;
222
- required?: boolean | undefined;
223
- unique?: boolean | undefined;
224
- writable?: boolean | undefined;
225
- visible?: boolean | undefined;
226
- } & Record<string, any>) | ({
227
- type: "timestamp";
228
- pluginOptions?: object | undefined;
229
- searchable?: boolean | undefined;
230
- configurable?: boolean | undefined;
231
- default?: Schema.Attribute.TimestampValue | (() => Schema.Attribute.TimestampValue) | undefined;
232
- private?: boolean | undefined;
233
- required?: boolean | undefined;
234
- unique?: boolean | undefined;
235
- writable?: boolean | undefined;
236
- visible?: boolean | undefined;
237
- } & Record<string, any>) | ({
238
- type: "uid";
239
- pluginOptions?: object | undefined;
240
- searchable?: boolean | undefined;
241
- targetField?: string | undefined;
242
- options?: Schema.Attribute.UIDOptions | undefined;
243
- configurable?: boolean | undefined;
244
- default?: string | (() => string) | undefined;
245
- minLength?: number | undefined;
246
- maxLength?: number | undefined;
247
- private?: boolean | undefined;
248
- required?: boolean | undefined;
249
- writable?: boolean | undefined;
250
- visible?: boolean | undefined;
251
- } & Record<string, any>) | {
11
+ export declare const formatAttribute: (attribute: Schema.Attribute.AnyAttribute & Record<string, any>) => (Schema.Attribute.OfType<"biginteger"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<string> & Schema.Attribute.MinMaxOption<string> & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Schema.Attribute.UniqueOption & Record<string, any>) | (Schema.Attribute.OfType<"boolean"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<boolean> & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Record<string, any>) | (Schema.Attribute.OfType<"blocks"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Record<string, any>) | (Schema.Attribute.OfType<"component"> & Schema.Attribute.ComponentProperties<`${string}.${string}`, boolean> & Schema.Attribute.ConfigurableOption & Schema.Attribute.MinMaxOption<number> & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Record<string, any>) | (Schema.Attribute.OfType<"datetime"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<Schema.Attribute.DateTimeValue> & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.UniqueOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Record<string, any>) | (Schema.Attribute.OfType<"date"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<Schema.Attribute.DateValue> & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.UniqueOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Record<string, any>) | (Schema.Attribute.OfType<"decimal"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<number> & Schema.Attribute.MinMaxOption<number> & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Schema.Attribute.UniqueOption & Record<string, any>) | (Schema.Attribute.OfType<"dynamiczone"> & Schema.Attribute.DynamicZoneProperties<`${string}.${string}`[]> & Schema.Attribute.ConfigurableOption & Schema.Attribute.MinMaxOption<number> & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Record<string, any>) | (Schema.Attribute.OfType<"email"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<string> & Schema.Attribute.MinMaxLengthOption & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.UniqueOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Record<string, any>) | (Schema.Attribute.OfType<"enumeration"> & Schema.Attribute.EnumerationProperties<string[]> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<string> & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Record<string, any>) | (Schema.Attribute.OfType<"float"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<number> & Schema.Attribute.MinMaxOption<number> & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Schema.Attribute.UniqueOption & Record<string, any>) | (Schema.Attribute.OfType<"integer"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<number> & Schema.Attribute.MinMaxOption<number> & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Schema.Attribute.UniqueOption & Record<string, any>) | (Schema.Attribute.OfType<"json"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.RequiredOption & Schema.Attribute.PrivateOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Schema.Attribute.DefaultOption<import("@strapi/types/dist/utils").JSONPrimitive> & Record<string, any>) | (Schema.Attribute.OfType<"password"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<string> & Schema.Attribute.MinMaxLengthOption & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Record<string, any>) | (Schema.Attribute.OfType<"richtext"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<string> & Schema.Attribute.MinMaxLengthOption & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Record<string, any>) | (Schema.Attribute.OfType<"string"> & Schema.Attribute.StringProperties & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<string> & Schema.Attribute.MinMaxLengthOption & Schema.Attribute.PrivateOption & Schema.Attribute.UniqueOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Record<string, any>) | (Schema.Attribute.OfType<"text"> & Schema.Attribute.TextProperties & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<string> & Schema.Attribute.MinMaxLengthOption & Schema.Attribute.PrivateOption & Schema.Attribute.UniqueOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Record<string, any>) | (Schema.Attribute.OfType<"time"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<Schema.Attribute.TimeValue> & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.UniqueOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Record<string, any>) | (Schema.Attribute.OfType<"timestamp"> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<Schema.Attribute.TimestampValue> & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.UniqueOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Record<string, any>) | (Schema.Attribute.OfType<"uid"> & Schema.Attribute.UIDProperties<string, Schema.Attribute.UIDOptions> & Schema.Attribute.ConfigurableOption & Schema.Attribute.DefaultOption<string> & Schema.Attribute.MinMaxLengthOption & Schema.Attribute.PrivateOption & Schema.Attribute.RequiredOption & Schema.Attribute.WritableOption & Schema.Attribute.VisibleOption & Record<string, any>) | {
252
12
  type: string;
253
13
  multiple: boolean;
254
14
  required: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../../server/src/utils/attributes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAI5C,eAAO,MAAM,cAAc,cAAe,OAAO,SAAS,CAAC,YAAY,YAC/B,CAAC;AAEzC,eAAO,MAAM,UAAU,cAAe,OAAO,SAAS,CAAC,YAAY,YACpC,CAAC;AAEhC;;GAEG;AACH,eAAO,MAAM,gBAAgB,UAAW,GAAG,QAQ1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,cAAe,OAAO,SAAS,CAAC,YAAY,GAAG,OAAO,MAAM,EAAE,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B7F,CAAC;AAGF,eAAO,MAAM,oBAAoB,WAAY,GAAG,cAAc,GAAG,QA4ChE,CAAC"}
1
+ {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../../server/src/utils/attributes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAI5C,eAAO,MAAM,cAAc,cAAe,OAAO,SAAS,CAAC,YAAY,YAC/B,CAAC;AAEzC,eAAO,MAAM,UAAU,cAAe,OAAO,SAAS,CAAC,YAAY,YACpC,CAAC;AAEhC;;GAEG;AACH,eAAO,MAAM,gBAAgB,UAAW,GAAG,QAQ1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,cAAe,OAAO,SAAS,CAAC,YAAY,GAAG,OAAO,MAAM,EAAE,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B7F,CAAC;AAGF,eAAO,MAAM,oBAAoB,WAAY,GAAG,cAAc,GAAG,QA4ChE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/content-type-builder",
3
- "version": "5.0.5",
3
+ "version": "5.0.6",
4
4
  "description": "Create and manage content types",
5
5
  "repository": {
6
6
  "type": "git",
@@ -59,9 +59,9 @@
59
59
  "@reduxjs/toolkit": "1.9.7",
60
60
  "@sindresorhus/slugify": "1.1.0",
61
61
  "@strapi/design-system": "2.0.0-rc.11",
62
- "@strapi/generators": "5.0.5",
62
+ "@strapi/generators": "5.0.6",
63
63
  "@strapi/icons": "2.0.0-rc.11",
64
- "@strapi/utils": "5.0.5",
64
+ "@strapi/utils": "5.0.6",
65
65
  "date-fns": "2.30.0",
66
66
  "fs-extra": "11.2.0",
67
67
  "immer": "9.0.21",
@@ -73,9 +73,9 @@
73
73
  "yup": "0.32.9"
74
74
  },
75
75
  "devDependencies": {
76
- "@strapi/admin": "5.0.5",
76
+ "@strapi/admin": "5.0.6",
77
77
  "@strapi/pack-up": "5.0.0",
78
- "@strapi/types": "5.0.5",
78
+ "@strapi/types": "5.0.6",
79
79
  "@testing-library/dom": "10.1.0",
80
80
  "@testing-library/react": "15.0.7",
81
81
  "@testing-library/user-event": "14.5.2",
@@ -107,5 +107,5 @@
107
107
  "kind": "plugin",
108
108
  "required": true
109
109
  },
110
- "gitHead": "9cbf0e65dc4979f0db4355c05a03917f21448367"
110
+ "gitHead": "a281e06e9e1520e3f86e18c4ff78b8daa7a33356"
111
111
  }