@directus/api 17.0.0 → 17.1.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.
Files changed (79) hide show
  1. package/dist/controllers/fields.js +0 -3
  2. package/dist/controllers/items.js +8 -7
  3. package/dist/extensions/lib/sandbox/generate-api-extensions-sandbox-entrypoint.d.ts +1 -1
  4. package/dist/flows.js +2 -1
  5. package/dist/middleware/collection-exists.js +6 -6
  6. package/dist/operations/item-update/index.js +4 -1
  7. package/dist/operations/request/index.js +5 -5
  8. package/dist/request/agent-with-ip-validation.d.ts +11 -0
  9. package/dist/request/agent-with-ip-validation.js +34 -0
  10. package/dist/request/index.js +6 -5
  11. package/dist/request/is-denied-ip.d.ts +1 -0
  12. package/dist/request/{validate-ip.js → is-denied-ip.js} +10 -12
  13. package/dist/services/collections.d.ts +3 -2
  14. package/dist/services/collections.js +1 -1
  15. package/dist/services/fields.js +8 -1
  16. package/dist/services/files.js +4 -3
  17. package/dist/services/graphql/index.js +3 -2
  18. package/dist/services/import-export.js +62 -26
  19. package/dist/services/items.js +2 -1
  20. package/dist/services/permissions.js +1 -1
  21. package/dist/services/relations.js +1 -1
  22. package/dist/services/roles.d.ts +9 -4
  23. package/dist/services/roles.js +50 -2
  24. package/dist/services/specifications.js +4 -3
  25. package/dist/services/utils.js +1 -1
  26. package/dist/telemetry/utils/get-user-item-count.js +2 -1
  27. package/dist/types/collection.d.ts +2 -13
  28. package/dist/utils/get-field-system-rows.d.ts +2 -0
  29. package/dist/utils/get-field-system-rows.js +17 -0
  30. package/dist/utils/get-permissions.js +1 -1
  31. package/dist/utils/get-schema.js +3 -2
  32. package/dist/utils/merge-permissions-for-share.js +1 -1
  33. package/dist/utils/should-skip-cache.js +1 -1
  34. package/dist/websocket/controllers/hooks.js +1 -1
  35. package/dist/websocket/handlers/items.js +2 -1
  36. package/dist/websocket/messages.d.ts +18 -18
  37. package/package.json +42 -41
  38. package/dist/database/system-data/app-access-permissions/app-access-permissions.yaml +0 -107
  39. package/dist/database/system-data/app-access-permissions/index.d.ts +0 -3
  40. package/dist/database/system-data/app-access-permissions/index.js +0 -17
  41. package/dist/database/system-data/app-access-permissions/schema-access-permissions.yaml +0 -17
  42. package/dist/database/system-data/collections/collections.yaml +0 -103
  43. package/dist/database/system-data/collections/index.d.ts +0 -2
  44. package/dist/database/system-data/collections/index.js +0 -9
  45. package/dist/database/system-data/fields/_defaults.yaml +0 -16
  46. package/dist/database/system-data/fields/activity.yaml +0 -83
  47. package/dist/database/system-data/fields/collections.yaml +0 -249
  48. package/dist/database/system-data/fields/dashboards.yaml +0 -20
  49. package/dist/database/system-data/fields/extensions.yaml +0 -10
  50. package/dist/database/system-data/fields/fields.yaml +0 -104
  51. package/dist/database/system-data/fields/files.yaml +0 -160
  52. package/dist/database/system-data/fields/flows.yaml +0 -26
  53. package/dist/database/system-data/fields/folders.yaml +0 -14
  54. package/dist/database/system-data/fields/index.d.ts +0 -2
  55. package/dist/database/system-data/fields/index.js +0 -33
  56. package/dist/database/system-data/fields/migrations.yaml +0 -10
  57. package/dist/database/system-data/fields/notifications.yaml +0 -15
  58. package/dist/database/system-data/fields/operations.yaml +0 -23
  59. package/dist/database/system-data/fields/panels.yaml +0 -29
  60. package/dist/database/system-data/fields/permissions.yaml +0 -37
  61. package/dist/database/system-data/fields/presets.yaml +0 -56
  62. package/dist/database/system-data/fields/relations.yaml +0 -34
  63. package/dist/database/system-data/fields/revisions.yaml +0 -30
  64. package/dist/database/system-data/fields/roles.yaml +0 -61
  65. package/dist/database/system-data/fields/sessions.yaml +0 -16
  66. package/dist/database/system-data/fields/settings.yaml +0 -471
  67. package/dist/database/system-data/fields/shares.yaml +0 -83
  68. package/dist/database/system-data/fields/translations.yaml +0 -27
  69. package/dist/database/system-data/fields/users.yaml +0 -224
  70. package/dist/database/system-data/fields/versions.yaml +0 -38
  71. package/dist/database/system-data/fields/webhooks.yaml +0 -141
  72. package/dist/database/system-data/relations/index.d.ts +0 -2
  73. package/dist/database/system-data/relations/index.js +0 -9
  74. package/dist/database/system-data/relations/relations.yaml +0 -197
  75. package/dist/request/request-interceptor.d.ts +0 -2
  76. package/dist/request/request-interceptor.js +0 -28
  77. package/dist/request/response-interceptor.d.ts +0 -2
  78. package/dist/request/response-interceptor.js +0 -5
  79. package/dist/request/validate-ip.d.ts +0 -1
@@ -1,471 +0,0 @@
1
- table: directus_settings
2
-
3
- fields:
4
- - field: id
5
- hidden: true
6
-
7
- - field: project_name
8
- interface: input
9
- options:
10
- iconRight: title
11
- placeholder: $t:field_options.directus_settings.project_name_placeholder
12
- width: half
13
-
14
- - field: project_descriptor
15
- interface: input
16
- options:
17
- iconRight: title
18
- placeholder: $t:field_options.directus_settings.project_name_placeholder
19
- width: half
20
-
21
- - field: project_url
22
- interface: input
23
- options:
24
- iconRight: link
25
- placeholder: https://example.com
26
- width: half
27
-
28
- - field: default_language
29
- interface: system-language
30
- options:
31
- iconRight: language
32
- placeholder: en-US
33
- width: half
34
-
35
- - field: theming_group
36
- interface: group-raw
37
- special:
38
- - alias
39
- - no-data
40
- - group
41
-
42
- - field: branding_divider
43
- interface: presentation-divider
44
- options:
45
- icon: palette
46
- title: $t:fields.directus_settings.branding
47
- special:
48
- - alias
49
- - no-data
50
- width: full
51
- group: theming_group
52
-
53
- - field: project_color
54
- interface: select-color
55
- note: $t:field_options.directus_settings.project_color_note
56
- width: half
57
- group: theming_group
58
-
59
- - field: project_logo
60
- interface: file
61
- note: $t:field_options.directus_settings.project_logo_note
62
- width: half
63
- group: theming_group
64
-
65
- - field: public_foreground
66
- interface: file
67
- width: half
68
- group: theming_group
69
-
70
- - field: public_background
71
- interface: file
72
- width: half
73
- group: theming_group
74
-
75
- - field: public_favicon
76
- interface: file
77
- note: $t:field_options.directus_settings.project_favicon_note
78
- width: half
79
- group: theming_group
80
-
81
- - field: public_note
82
- interface: input
83
- options:
84
- placeholder: $t:field_options.directus_settings.public_note_placeholder
85
- iconRight: info
86
- width: half
87
- group: theming_group
88
-
89
- - field: theming_divider
90
- interface: presentation-divider
91
- options:
92
- icon: palette
93
- title: $t:fields.directus_settings.theming
94
- special:
95
- - alias
96
- - no-data
97
- width: full
98
- group: theming_group
99
-
100
- - field: default_appearance
101
- interface: select-dropdown
102
- width: half
103
- options:
104
- choices:
105
- - value: auto
106
- text: $t:appearance_auto
107
- - value: light
108
- text: $t:appearance_light
109
- - value: dark
110
- text: $t:appearance_dark
111
- group: theming_group
112
-
113
- - field: default_theme_light
114
- width: full
115
- interface: system-theme
116
- options:
117
- appearance: light
118
- group: theming_group
119
-
120
- - field: theme_light_overrides
121
- width: full
122
- interface: system-theme-overrides
123
- options:
124
- appearance: light
125
- group: theming_group
126
- special:
127
- - cast-json
128
-
129
- - field: default_theme_dark
130
- width: full
131
- interface: system-theme
132
- options:
133
- appearance: dark
134
- group: theming_group
135
-
136
- - field: theme_dark_overrides
137
- width: full
138
- interface: system-theme-overrides
139
- options:
140
- appearance: dark
141
- group: theming_group
142
- special:
143
- - cast-json
144
-
145
- - field: custom_css
146
- interface: input-code
147
- options:
148
- language: css
149
- lineNumber: true
150
- template: |
151
- #app, #main-content, body {
152
- --v-button-background-color: #6644FF !important;
153
- --v-button-background-color-hover: #5E41EC !important;
154
- }
155
- width: full
156
- group: theming_group
157
-
158
- - field: modules_divider
159
- interface: presentation-divider
160
- options:
161
- icon: menu_open
162
- title: $t:modules
163
- special:
164
- - alias
165
- - no-data
166
- width: full
167
-
168
- - field: module_bar
169
- interface: system-modules
170
- special:
171
- - cast-json
172
-
173
- - field: security_divider
174
- interface: presentation-divider
175
- options:
176
- icon: shield
177
- title: $t:security
178
- special:
179
- - alias
180
- - no-data
181
- width: full
182
-
183
- - field: auth_password_policy
184
- interface: select-dropdown
185
- options:
186
- choices:
187
- - value: null
188
- text: $t:field_options.directus_settings.auth_password_policy.none_text
189
- - value: '/^.{8,}$/'
190
- text: $t:field_options.directus_settings.auth_password_policy.weak_text
191
- - value: "/(?=^.{8,}$)(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()_+}{';'?>.<,])(?!.*\\s).*$/"
192
- text: $t:field_options.directus_settings.auth_password_policy.strong_text
193
- allowOther: true
194
- width: half
195
-
196
- - field: auth_login_attempts
197
- interface: input
198
- options:
199
- iconRight: lock
200
- placeholder: $t:unlimited
201
- width: half
202
-
203
- - field: files_divider
204
- interface: presentation-divider
205
- options:
206
- icon: folder
207
- title: $t:fields.directus_settings.files_and_thumbnails
208
- special:
209
- - alias
210
- - no-data
211
- width: full
212
-
213
- - field: storage_asset_transform
214
- interface: select-dropdown
215
- options:
216
- choices:
217
- - value: all
218
- text: $t:fields.directus_settings.transformations_all
219
- - value: none
220
- text: $t:fields.directus_settings.transformations_none
221
- - value: presets
222
- text: $t:fields.directus_settings.transformations_presets
223
- width: half
224
-
225
- - field: storage_default_folder
226
- interface: system-folder
227
- width: half
228
- note: $t:interfaces.system-folder.field_hint
229
-
230
- - field: storage_asset_presets
231
- interface: list
232
- options:
233
- fields:
234
- - field: key
235
- name: $t:key
236
- type: string
237
- schema:
238
- is_nullable: false
239
- meta:
240
- interface: input
241
- options:
242
- slug: true
243
- onlyOnCreate: false
244
- width: full
245
- required: true
246
- - field: fit
247
- name: $t:field_options.directus_settings.storage_asset_presets.fit_label
248
- type: string
249
- schema:
250
- is_nullable: false
251
- meta:
252
- interface: select-dropdown
253
- options:
254
- choices:
255
- - value: contain
256
- text: $t:field_options.directus_settings.storage_asset_presets.fit.contain_text
257
- - value: cover
258
- text: $t:field_options.directus_settings.storage_asset_presets.fit.cover_text
259
- - value: inside
260
- text: $t:field_options.directus_settings.storage_asset_presets.fit.fit_text
261
- - value: outside
262
- text: $t:field_options.directus_settings.storage_asset_presets.fit.outside_text
263
- width: half
264
- - field: width
265
- name: $t:width
266
- type: integer
267
- schema:
268
- is_nullable: false
269
- meta:
270
- interface: input
271
- width: half
272
- - field: height
273
- name: $t:height
274
- type: integer
275
- schema:
276
- is_nullable: false
277
- meta:
278
- interface: input
279
- width: half
280
- - field: quality
281
- type: integer
282
- name: $t:quality
283
- schema:
284
- default_value: 80
285
- is_nullable: false
286
- meta:
287
- interface: slider
288
- options:
289
- max: 100
290
- min: 0
291
- step: 1
292
- width: half
293
- - field: withoutEnlargement
294
- name: $t:field_options.directus_settings.storage_asset_presets.upscaling
295
- type: boolean
296
- schema:
297
- default_value: false
298
- meta:
299
- interface: boolean
300
- width: half
301
- options:
302
- label: $t:no_upscale
303
- - field: format
304
- name: $t:format
305
- type: string
306
- schema:
307
- is_nullable: false
308
- default_value: ''
309
- meta:
310
- interface: select-dropdown
311
- options:
312
- allowNone: true
313
- choices:
314
- - value: 'auto'
315
- text: 'Auto'
316
- - value: jpeg
317
- text: JPEG
318
- - value: png
319
- text: PNG
320
- - value: webp
321
- text: WebP
322
- - value: tiff
323
- text: Tiff
324
- - value: avif
325
- text: AVIF
326
- width: half
327
- - field: transforms
328
- name: $t:field_options.directus_settings.additional_transforms
329
- type: json
330
- schema:
331
- is_nullable: false
332
- default_value: []
333
- meta:
334
- note: $t:field_options.directus_settings.transforms_note
335
-
336
- interface: json
337
- options:
338
- template: >
339
- [
340
- ["blur", 45],
341
- ["grayscale"],
342
- ["extend", { "right": 500, "background": "rgb(255, 0, 0)" }]
343
- ]
344
- placeholder: >
345
- [
346
- ["blur", 45],
347
- ["grayscale"],
348
- ["extend", { "right": 500, "background": "rgb(255, 0, 0)" }]
349
- ]
350
- width: full
351
- template: '{{key}}'
352
- special:
353
- - cast-json
354
- width: full
355
-
356
- - field: map_divider
357
- interface: presentation-divider
358
- options:
359
- icon: map
360
- title: $t:fields.directus_settings.mapping
361
- special:
362
- - alias
363
- - no-data
364
- width: full
365
-
366
- - field: mapbox_key
367
- interface: input
368
- options:
369
- icon: key
370
- title: $t:field_options.directus_settings.mapbox_key
371
- placeholder: $t:field_options.directus_settings.mapbox_placeholder
372
- iconLeft: vpn_key
373
- font: monospace
374
- width: full
375
-
376
- - field: basemaps
377
- interface: list
378
- special:
379
- - cast-json
380
- options:
381
- template: '{{name}}'
382
- fields:
383
- - field: name
384
- name: $t:name
385
- schema:
386
- is_nullable: false
387
- meta:
388
- interface: text-input
389
- required: true
390
- options:
391
- placeholder: $t:field_options.directus_settings.basemaps_name_placeholder
392
- - field: type
393
- name: $t:type
394
- meta:
395
- interface: select-dropdown
396
- options:
397
- choices:
398
- - value: raster
399
- text: $t:field_options.directus_settings.basemaps_raster
400
- - value: tile
401
- text: $t:field_options.directus_settings.basemaps_tile
402
- - value: style
403
- text: $t:field_options.directus_settings.basemaps_style
404
- - field: url
405
- name: $t:url
406
- schema:
407
- is_nullable: false
408
- meta:
409
- interface: text-input
410
- options:
411
- placeholder: http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png
412
- - field: tileSize
413
- name: $t:tile_size
414
- type: integer
415
- schema:
416
- is_nullable: true
417
- meta:
418
- interface: input
419
- options:
420
- placeholder: '512'
421
- conditions:
422
- - name: typeNeqRaster
423
- rule:
424
- type:
425
- _neq: 'raster'
426
- hidden: true
427
- - field: attribution
428
- name: $t:fields.directus_settings.attribution
429
- type: string
430
- schema:
431
- is_nullable: true
432
- meta:
433
- interface: input
434
- options:
435
- placeholder: $t:fields.directus_settings.attribution_placeholder
436
-
437
- - field: image_editor
438
- interface: presentation-divider
439
- options:
440
- icon: image
441
- title: $t:fields.directus_settings.image_editor
442
- special:
443
- - alias
444
- - no-data
445
- width: full
446
-
447
- - field: custom_aspect_ratios
448
- interface: list
449
- special:
450
- - cast-json
451
- options:
452
- template: '{{text}}'
453
- fields:
454
- - field: text
455
- name: $t:text
456
- type: string
457
- meta:
458
- interface: text-input
459
- width: half
460
- required: true
461
- options:
462
- placeholder: $t:text
463
- - field: value
464
- name: $t:value
465
- type: float
466
- meta:
467
- interface: input
468
- width: half
469
- required: true
470
- options:
471
- placeholder: $t:value
@@ -1,83 +0,0 @@
1
- table: directus_shares
2
-
3
- fields:
4
- - field: id
5
- special:
6
- - uuid
7
- readonly: true
8
- hidden: true
9
-
10
- - field: name
11
-
12
- - field: collection
13
- width: half
14
- hidden: true
15
-
16
- - field: item
17
- width: half
18
- hidden: true
19
-
20
- - field: role
21
- interface: select-dropdown-m2o
22
- width: half
23
- options:
24
- template: '{{name}}'
25
- filter:
26
- admin_access:
27
- _eq: false
28
-
29
- - field: password
30
- special:
31
- - hash
32
- - conceal
33
- interface: input-hash
34
- options:
35
- iconRight: lock
36
- masked: true
37
- width: half
38
- note: $t:shared_leave_blank_for_passwordless_access
39
-
40
- - field: date_start
41
- width: half
42
- note: $t:shared_leave_blank_for_unlimited
43
-
44
- - field: date_end
45
- width: half
46
- note: $t:shared_leave_blank_for_unlimited
47
-
48
- - field: max_uses
49
- width: half
50
- note: $t:shared_leave_blank_for_unlimited
51
-
52
- - field: times_used
53
- width: half
54
- readonly: true
55
-
56
- - field: date_created
57
- special:
58
- - date-created
59
- - cast-timestamp
60
- width: half
61
- readonly: true
62
- conditions:
63
- - name: notCreatedYet
64
- rule:
65
- id:
66
- _null: true
67
- hidden: true
68
-
69
- - field: user_created
70
- special:
71
- - user-created
72
- interface: select-dropdown-m2o
73
- width: half
74
- display: user
75
- options:
76
- template: '{{avatar.$thumbnail}} {{first_name}} {{last_name}}'
77
- readonly: true
78
- conditions:
79
- - name: notCreatedYet
80
- rule:
81
- id:
82
- _null: true
83
- hidden: true
@@ -1,27 +0,0 @@
1
- table: directus_translations
2
-
3
- fields:
4
- - field: id
5
- hidden: true
6
- sort: 1
7
- special:
8
- - uuid
9
- - field: key
10
- width: half
11
- sort: 2
12
- required: true
13
- interface: input
14
- options:
15
- font: monospace
16
- placeholder: '$t:translation_key_placeholder'
17
- - field: language
18
- interface: system-language
19
- width: half
20
- sort: 3
21
- required: true
22
- - field: value
23
- interface: input-multiline
24
- sort: 4
25
- required: true
26
- options:
27
- placeholder: '$t:enter_a_value'