@directus/api 10.0.0 → 10.2.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 (113) hide show
  1. package/dist/__mocks__/cache.d.mts +5 -0
  2. package/dist/__mocks__/cache.mjs +7 -0
  3. package/dist/__utils__/items-utils.d.ts +2 -0
  4. package/dist/__utils__/items-utils.js +31 -0
  5. package/dist/__utils__/schemas.d.ts +13 -0
  6. package/dist/__utils__/schemas.js +301 -0
  7. package/dist/__utils__/snapshots.d.ts +5 -0
  8. package/dist/__utils__/snapshots.js +894 -0
  9. package/dist/app.js +17 -0
  10. package/dist/auth/drivers/oauth2.js +1 -1
  11. package/dist/auth/drivers/openid.js +1 -1
  12. package/dist/cli/commands/bootstrap/index.js +1 -0
  13. package/dist/cli/utils/create-env/env-stub.liquid +4 -0
  14. package/dist/controllers/assets.js +6 -10
  15. package/dist/controllers/flows.js +4 -1
  16. package/dist/controllers/schema.js +20 -16
  17. package/dist/controllers/utils.js +4 -2
  18. package/dist/database/migrations/run.js +3 -2
  19. package/dist/database/run-ast.js +3 -3
  20. package/dist/env.js +10 -0
  21. package/dist/extensions.js +4 -5
  22. package/dist/flows.d.ts +4 -1
  23. package/dist/flows.js +12 -10
  24. package/dist/services/assets.d.ts +2 -2
  25. package/dist/services/collections.js +2 -1
  26. package/dist/services/fields.js +3 -1
  27. package/dist/services/graphql/index.js +13 -2
  28. package/dist/services/items.js +1 -1
  29. package/dist/services/permissions.js +18 -0
  30. package/dist/services/server.js +4 -0
  31. package/dist/types/assets.d.ts +6 -1
  32. package/dist/utils/apply-query.js +14 -4
  33. package/dist/utils/sanitize-error.d.ts +1 -0
  34. package/dist/utils/sanitize-error.js +7 -0
  35. package/dist/utils/sanitize-query.js +11 -2
  36. package/dist/utils/transformations.d.ts +2 -2
  37. package/dist/utils/transformations.js +29 -10
  38. package/dist/utils/validate-query.js +3 -1
  39. package/package.json +22 -23
  40. package/dist/app.test.d.ts +0 -1
  41. package/dist/controllers/files.test.d.ts +0 -1
  42. package/dist/database/migrations/run.test.d.ts +0 -1
  43. package/dist/env.test.d.ts +0 -1
  44. package/dist/logger.test.d.ts +0 -1
  45. package/dist/middleware/authenticate.test.d.ts +0 -1
  46. package/dist/middleware/extract-token.test.d.ts +0 -1
  47. package/dist/middleware/validate-batch.test.d.ts +0 -1
  48. package/dist/operations/condition/index.test.d.ts +0 -1
  49. package/dist/operations/exec/index.test.d.ts +0 -1
  50. package/dist/operations/item-create/index.test.d.ts +0 -1
  51. package/dist/operations/item-delete/index.test.d.ts +0 -1
  52. package/dist/operations/item-read/index.test.d.ts +0 -1
  53. package/dist/operations/item-update/index.test.d.ts +0 -1
  54. package/dist/operations/log/index.test.d.ts +0 -1
  55. package/dist/operations/mail/index.test.d.ts +0 -1
  56. package/dist/operations/notification/index.test.d.ts +0 -1
  57. package/dist/operations/request/index.test.d.ts +0 -1
  58. package/dist/operations/sleep/index.test.d.ts +0 -1
  59. package/dist/operations/transform/index.test.d.ts +0 -1
  60. package/dist/operations/trigger/index.test.d.ts +0 -1
  61. package/dist/request/index.test.d.ts +0 -1
  62. package/dist/request/request-interceptor.test.d.ts +0 -1
  63. package/dist/request/response-interceptor.test.d.ts +0 -1
  64. package/dist/request/validate-ip.test.d.ts +0 -1
  65. package/dist/services/files.test.d.ts +0 -1
  66. package/dist/services/graphql/utils/process-error.test.d.ts +0 -1
  67. package/dist/services/items.test.d.ts +0 -1
  68. package/dist/services/payload.test.d.ts +0 -1
  69. package/dist/services/roles.test.d.ts +0 -1
  70. package/dist/services/schema.test.d.ts +0 -1
  71. package/dist/services/specifications.test.d.ts +0 -1
  72. package/dist/services/users.test.d.ts +0 -1
  73. package/dist/services/webhooks.test.d.ts +0 -1
  74. package/dist/storage/get-storage-driver.test.d.ts +0 -1
  75. package/dist/storage/index.test.d.ts +0 -1
  76. package/dist/storage/register-drivers.test.d.ts +0 -1
  77. package/dist/storage/register-locations.test.d.ts +0 -1
  78. package/dist/utils/apply-diff.test.d.ts +0 -1
  79. package/dist/utils/apply-function-to-column-name.test.d.ts +0 -1
  80. package/dist/utils/apply-snapshot.test.d.ts +0 -1
  81. package/dist/utils/async-handler.test.d.ts +0 -1
  82. package/dist/utils/calculate-field-depth.test.d.ts +0 -1
  83. package/dist/utils/filter-items.test.d.ts +0 -1
  84. package/dist/utils/get-auth-providers.test.d.ts +0 -1
  85. package/dist/utils/get-cache-headers.test.d.ts +0 -1
  86. package/dist/utils/get-cache-key.test.d.ts +0 -1
  87. package/dist/utils/get-collection-from-alias.test.d.ts +0 -1
  88. package/dist/utils/get-column-path.test.d.ts +0 -1
  89. package/dist/utils/get-config-from-env.test.d.ts +0 -1
  90. package/dist/utils/get-date-formatted.test.d.ts +0 -1
  91. package/dist/utils/get-graphql-query-and-variables.test.d.ts +0 -1
  92. package/dist/utils/get-milliseconds.test.d.ts +0 -1
  93. package/dist/utils/get-relation-info.test.d.ts +0 -1
  94. package/dist/utils/get-relation-type.test.d.ts +0 -1
  95. package/dist/utils/get-string-byte-size.test.d.ts +0 -1
  96. package/dist/utils/get-versioned-hash.test.d.ts +0 -1
  97. package/dist/utils/is-directus-jwt.test.d.ts +0 -1
  98. package/dist/utils/jwt.test.d.ts +0 -1
  99. package/dist/utils/map-values-deep.test.d.ts +0 -1
  100. package/dist/utils/md.test.d.ts +0 -1
  101. package/dist/utils/merge-permissions.test.d.ts +0 -1
  102. package/dist/utils/sanitize-query.test.d.ts +0 -1
  103. package/dist/utils/sanitize-schema.test.d.ts +0 -1
  104. package/dist/utils/should-skip-cache.test.d.ts +0 -1
  105. package/dist/utils/stall.test.d.ts +0 -1
  106. package/dist/utils/strip-function.test.d.ts +0 -1
  107. package/dist/utils/url.test.d.ts +0 -1
  108. package/dist/utils/user-name.test.d.ts +0 -1
  109. package/dist/utils/validate-diff.test.d.ts +0 -1
  110. package/dist/utils/validate-env.test.d.ts +0 -1
  111. package/dist/utils/validate-keys.test.d.ts +0 -1
  112. package/dist/utils/validate-query.test.d.ts +0 -1
  113. package/dist/utils/validate-snapshot.test.d.ts +0 -1
@@ -0,0 +1,894 @@
1
+ export const snapshotBeforeCreateCollection = {
2
+ version: 1,
3
+ directus: '0.0.0',
4
+ collections: [
5
+ {
6
+ collection: 'test_table',
7
+ meta: {
8
+ accountability: 'all',
9
+ collection: 'test_table',
10
+ group: null,
11
+ hidden: true,
12
+ icon: 'import_export',
13
+ item_duplication_fields: null,
14
+ note: null,
15
+ singleton: false,
16
+ translations: {},
17
+ },
18
+ schema: {
19
+ comment: null,
20
+ name: 'test_table',
21
+ schema: 'public',
22
+ },
23
+ },
24
+ ],
25
+ fields: [
26
+ {
27
+ collection: 'test_table',
28
+ field: 'id',
29
+ meta: {
30
+ collection: 'test_table',
31
+ conditions: null,
32
+ display: null,
33
+ display_options: null,
34
+ field: 'id',
35
+ group: null,
36
+ hidden: true,
37
+ interface: null,
38
+ note: null,
39
+ options: null,
40
+ readonly: false,
41
+ required: false,
42
+ sort: null,
43
+ special: null,
44
+ translations: {},
45
+ validation: null,
46
+ validation_message: null,
47
+ width: 'full',
48
+ },
49
+ schema: {
50
+ comment: null,
51
+ data_type: 'uuid',
52
+ default_value: null,
53
+ foreign_key_column: null,
54
+ foreign_key_schema: null,
55
+ foreign_key_table: null,
56
+ generation_expression: null,
57
+ has_auto_increment: false,
58
+ is_generated: false,
59
+ is_nullable: false,
60
+ is_primary_key: true,
61
+ is_unique: true,
62
+ max_length: null,
63
+ name: 'id',
64
+ numeric_precision: null,
65
+ numeric_scale: null,
66
+ schema: 'public',
67
+ table: 'test_table',
68
+ },
69
+ type: 'uuid',
70
+ },
71
+ ],
72
+ relations: [],
73
+ };
74
+ export const snapshotCreateCollection = {
75
+ version: 1,
76
+ directus: '0.0.0',
77
+ collections: [
78
+ {
79
+ collection: 'test_table',
80
+ meta: {
81
+ accountability: 'all',
82
+ collection: 'test_table',
83
+ group: null,
84
+ hidden: true,
85
+ icon: 'import_export',
86
+ item_duplication_fields: null,
87
+ note: null,
88
+ singleton: false,
89
+ translations: {},
90
+ },
91
+ schema: {
92
+ comment: null,
93
+ name: 'test_table',
94
+ schema: 'public',
95
+ },
96
+ },
97
+ {
98
+ collection: 'test_table_2',
99
+ meta: {
100
+ accountability: 'all',
101
+ collection: 'test_table_2',
102
+ group: 'test_table',
103
+ hidden: true,
104
+ icon: 'import_export',
105
+ item_duplication_fields: null,
106
+ note: null,
107
+ singleton: false,
108
+ translations: {},
109
+ },
110
+ schema: {
111
+ comment: null,
112
+ name: 'test_table_2',
113
+ schema: 'public',
114
+ },
115
+ },
116
+ {
117
+ collection: 'test_table_3',
118
+ meta: {
119
+ accountability: 'all',
120
+ collection: 'test_table_3',
121
+ group: 'test_table_2',
122
+ hidden: true,
123
+ icon: 'import_export',
124
+ item_duplication_fields: null,
125
+ note: null,
126
+ singleton: false,
127
+ translations: {},
128
+ },
129
+ schema: {
130
+ comment: null,
131
+ name: 'test_table_3',
132
+ schema: 'public',
133
+ },
134
+ },
135
+ ],
136
+ fields: [
137
+ {
138
+ collection: 'test_table',
139
+ field: 'id',
140
+ meta: {
141
+ collection: 'test_table',
142
+ conditions: null,
143
+ display: null,
144
+ display_options: null,
145
+ field: 'id',
146
+ group: null,
147
+ hidden: true,
148
+ interface: null,
149
+ note: null,
150
+ options: null,
151
+ readonly: false,
152
+ required: false,
153
+ sort: null,
154
+ special: null,
155
+ translations: {},
156
+ validation: null,
157
+ validation_message: null,
158
+ width: 'full',
159
+ },
160
+ schema: {
161
+ comment: null,
162
+ data_type: 'uuid',
163
+ default_value: null,
164
+ foreign_key_column: null,
165
+ foreign_key_schema: null,
166
+ foreign_key_table: null,
167
+ generation_expression: null,
168
+ has_auto_increment: false,
169
+ is_generated: false,
170
+ is_nullable: false,
171
+ is_primary_key: true,
172
+ is_unique: true,
173
+ max_length: null,
174
+ name: 'id',
175
+ numeric_precision: null,
176
+ numeric_scale: null,
177
+ schema: 'public',
178
+ table: 'test_table',
179
+ },
180
+ type: 'uuid',
181
+ },
182
+ {
183
+ collection: 'test_table_2',
184
+ field: 'id',
185
+ meta: {
186
+ collection: 'test_table_2',
187
+ conditions: null,
188
+ display: null,
189
+ display_options: null,
190
+ field: 'id',
191
+ group: null,
192
+ hidden: true,
193
+ interface: null,
194
+ note: null,
195
+ options: null,
196
+ readonly: false,
197
+ required: false,
198
+ sort: null,
199
+ special: null,
200
+ translations: {},
201
+ validation: null,
202
+ validation_message: null,
203
+ width: 'full',
204
+ },
205
+ schema: {
206
+ comment: null,
207
+ data_type: 'uuid',
208
+ default_value: null,
209
+ foreign_key_column: null,
210
+ foreign_key_schema: null,
211
+ foreign_key_table: null,
212
+ generation_expression: null,
213
+ has_auto_increment: false,
214
+ is_generated: false,
215
+ is_nullable: false,
216
+ is_primary_key: true,
217
+ is_unique: true,
218
+ max_length: null,
219
+ name: 'id',
220
+ numeric_precision: null,
221
+ numeric_scale: null,
222
+ schema: 'public',
223
+ table: 'test_table_2',
224
+ },
225
+ type: 'uuid',
226
+ },
227
+ {
228
+ collection: 'test_table_3',
229
+ field: 'id',
230
+ meta: {
231
+ collection: 'test_table_3',
232
+ conditions: null,
233
+ display: null,
234
+ display_options: null,
235
+ field: 'id',
236
+ group: null,
237
+ hidden: true,
238
+ interface: null,
239
+ note: null,
240
+ options: null,
241
+ readonly: false,
242
+ required: false,
243
+ sort: null,
244
+ special: null,
245
+ translations: {},
246
+ validation: null,
247
+ validation_message: null,
248
+ width: 'full',
249
+ },
250
+ schema: {
251
+ comment: null,
252
+ data_type: 'uuid',
253
+ default_value: null,
254
+ foreign_key_column: null,
255
+ foreign_key_schema: null,
256
+ foreign_key_table: null,
257
+ generation_expression: null,
258
+ has_auto_increment: false,
259
+ is_generated: false,
260
+ is_nullable: false,
261
+ is_primary_key: true,
262
+ is_unique: true,
263
+ max_length: null,
264
+ name: 'id',
265
+ numeric_precision: null,
266
+ numeric_scale: null,
267
+ schema: 'public',
268
+ table: 'test_table_3',
269
+ },
270
+ type: 'uuid',
271
+ },
272
+ ],
273
+ relations: [],
274
+ };
275
+ export const snapshotCreateCollectionNotNested = {
276
+ version: 1,
277
+ directus: '0.0.0',
278
+ collections: [
279
+ {
280
+ collection: 'test_table',
281
+ meta: {
282
+ accountability: 'all',
283
+ collection: 'test_table',
284
+ group: null,
285
+ hidden: true,
286
+ icon: 'import_export',
287
+ item_duplication_fields: null,
288
+ note: null,
289
+ singleton: false,
290
+ translations: {},
291
+ },
292
+ schema: {
293
+ comment: null,
294
+ name: 'test_table',
295
+ schema: 'public',
296
+ },
297
+ },
298
+ {
299
+ collection: 'test_table_2',
300
+ meta: {
301
+ accountability: 'all',
302
+ collection: 'test_table_2',
303
+ group: null,
304
+ hidden: true,
305
+ icon: 'import_export',
306
+ item_duplication_fields: null,
307
+ note: null,
308
+ singleton: false,
309
+ translations: {},
310
+ },
311
+ schema: {
312
+ comment: null,
313
+ name: 'test_table_2',
314
+ schema: 'public',
315
+ },
316
+ },
317
+ ],
318
+ fields: [
319
+ {
320
+ collection: 'test_table',
321
+ field: 'id',
322
+ meta: {
323
+ collection: 'test_table',
324
+ conditions: null,
325
+ display: null,
326
+ display_options: null,
327
+ field: 'id',
328
+ group: null,
329
+ hidden: true,
330
+ interface: null,
331
+ note: null,
332
+ options: null,
333
+ readonly: false,
334
+ required: false,
335
+ sort: null,
336
+ special: null,
337
+ translations: {},
338
+ validation: null,
339
+ validation_message: null,
340
+ width: 'full',
341
+ },
342
+ schema: {
343
+ comment: null,
344
+ data_type: 'uuid',
345
+ default_value: null,
346
+ foreign_key_column: null,
347
+ foreign_key_schema: null,
348
+ foreign_key_table: null,
349
+ generation_expression: null,
350
+ has_auto_increment: false,
351
+ is_generated: false,
352
+ is_nullable: false,
353
+ is_primary_key: true,
354
+ is_unique: true,
355
+ max_length: null,
356
+ name: 'id',
357
+ numeric_precision: null,
358
+ numeric_scale: null,
359
+ schema: 'public',
360
+ table: 'test_table',
361
+ },
362
+ type: 'uuid',
363
+ },
364
+ {
365
+ collection: 'test_table_2',
366
+ field: 'id',
367
+ meta: {
368
+ collection: 'test_table_2',
369
+ conditions: null,
370
+ display: null,
371
+ display_options: null,
372
+ field: 'id',
373
+ group: null,
374
+ hidden: true,
375
+ interface: null,
376
+ note: null,
377
+ options: null,
378
+ readonly: false,
379
+ required: false,
380
+ sort: null,
381
+ special: null,
382
+ translations: {},
383
+ validation: null,
384
+ validation_message: null,
385
+ width: 'full',
386
+ },
387
+ schema: {
388
+ comment: null,
389
+ data_type: 'uuid',
390
+ default_value: null,
391
+ foreign_key_column: null,
392
+ foreign_key_schema: null,
393
+ foreign_key_table: null,
394
+ generation_expression: null,
395
+ has_auto_increment: false,
396
+ is_generated: false,
397
+ is_nullable: false,
398
+ is_primary_key: true,
399
+ is_unique: true,
400
+ max_length: null,
401
+ name: 'id',
402
+ numeric_precision: null,
403
+ numeric_scale: null,
404
+ schema: 'public',
405
+ table: 'test_table_2',
406
+ },
407
+ type: 'uuid',
408
+ },
409
+ ],
410
+ relations: [],
411
+ };
412
+ export const snapshotBeforeDeleteCollection = {
413
+ version: 1,
414
+ directus: '0.0.0',
415
+ collections: [
416
+ {
417
+ collection: 'articles',
418
+ meta: {
419
+ accountability: 'all',
420
+ collection: 'articles',
421
+ group: null,
422
+ hidden: false,
423
+ icon: null,
424
+ item_duplication_fields: null,
425
+ note: null,
426
+ singleton: false,
427
+ translations: {},
428
+ },
429
+ schema: {
430
+ comment: null,
431
+ name: 'articles',
432
+ schema: 'public',
433
+ },
434
+ },
435
+ {
436
+ collection: 'articles_translations',
437
+ meta: {
438
+ accountability: 'all',
439
+ collection: 'articles_translations',
440
+ group: null,
441
+ hidden: true,
442
+ icon: 'import_export',
443
+ item_duplication_fields: null,
444
+ note: null,
445
+ singleton: false,
446
+ translations: {},
447
+ },
448
+ schema: {
449
+ comment: null,
450
+ name: 'articles_translations',
451
+ schema: 'public',
452
+ },
453
+ },
454
+ {
455
+ collection: 'languages',
456
+ meta: {
457
+ accountability: 'all',
458
+ collection: 'languages',
459
+ group: null,
460
+ hidden: false,
461
+ icon: null,
462
+ item_duplication_fields: null,
463
+ note: null,
464
+ singleton: false,
465
+ translations: {},
466
+ },
467
+ schema: {
468
+ comment: null,
469
+ name: 'languages',
470
+ schema: 'public',
471
+ },
472
+ },
473
+ ],
474
+ fields: [
475
+ {
476
+ collection: 'articles',
477
+ field: 'id',
478
+ meta: {
479
+ collection: 'articles',
480
+ conditions: null,
481
+ display: null,
482
+ display_options: null,
483
+ field: 'id',
484
+ group: null,
485
+ hidden: true,
486
+ interface: 'input',
487
+ note: null,
488
+ options: null,
489
+ readonly: true,
490
+ required: false,
491
+ sort: null,
492
+ special: null,
493
+ translations: [],
494
+ validation: null,
495
+ validation_message: null,
496
+ width: 'full',
497
+ },
498
+ schema: {
499
+ comment: null,
500
+ data_type: 'integer',
501
+ default_value: "nextval('articles_id_seq'::regclass)",
502
+ foreign_key_column: null,
503
+ foreign_key_schema: null,
504
+ foreign_key_table: null,
505
+ generation_expression: null,
506
+ has_auto_increment: true,
507
+ is_generated: false,
508
+ is_nullable: false,
509
+ is_primary_key: true,
510
+ is_unique: true,
511
+ max_length: null,
512
+ name: 'id',
513
+ numeric_precision: 32,
514
+ numeric_scale: 0,
515
+ schema: 'public',
516
+ table: 'articles',
517
+ },
518
+ type: 'integer',
519
+ },
520
+ {
521
+ collection: 'articles',
522
+ field: 'translations',
523
+ meta: {
524
+ collection: 'articles',
525
+ conditions: null,
526
+ display: null,
527
+ display_options: null,
528
+ field: 'translations',
529
+ group: null,
530
+ hidden: false,
531
+ interface: 'translations',
532
+ note: null,
533
+ options: null,
534
+ readonly: false,
535
+ required: false,
536
+ sort: null,
537
+ special: ['translations'],
538
+ translations: [],
539
+ validation: null,
540
+ validation_message: null,
541
+ width: 'full',
542
+ },
543
+ schema: null,
544
+ type: 'alias',
545
+ },
546
+ {
547
+ collection: 'articles_translations',
548
+ field: 'articles_id',
549
+ meta: {
550
+ collection: 'articles_translations',
551
+ conditions: null,
552
+ display: null,
553
+ display_options: null,
554
+ field: 'articles_id',
555
+ group: null,
556
+ hidden: true,
557
+ interface: null,
558
+ note: null,
559
+ options: null,
560
+ readonly: false,
561
+ required: false,
562
+ sort: null,
563
+ special: null,
564
+ translations: [],
565
+ validation: null,
566
+ validation_message: null,
567
+ width: 'full',
568
+ },
569
+ schema: {
570
+ comment: null,
571
+ data_type: 'integer',
572
+ default_value: null,
573
+ foreign_key_column: 'id',
574
+ foreign_key_schema: 'public',
575
+ foreign_key_table: 'articles',
576
+ generation_expression: null,
577
+ has_auto_increment: false,
578
+ is_generated: false,
579
+ is_nullable: true,
580
+ is_primary_key: false,
581
+ is_unique: false,
582
+ max_length: null,
583
+ name: 'articles_id',
584
+ numeric_precision: 32,
585
+ numeric_scale: 0,
586
+ schema: 'public',
587
+ table: 'articles_translations',
588
+ },
589
+ type: 'integer',
590
+ },
591
+ {
592
+ collection: 'articles_translations',
593
+ field: 'id',
594
+ meta: {
595
+ collection: 'articles_translations',
596
+ conditions: null,
597
+ display: null,
598
+ display_options: null,
599
+ field: 'id',
600
+ group: null,
601
+ hidden: true,
602
+ interface: null,
603
+ note: null,
604
+ options: null,
605
+ readonly: false,
606
+ required: false,
607
+ sort: null,
608
+ special: null,
609
+ translations: [],
610
+ validation: null,
611
+ validation_message: null,
612
+ width: 'full',
613
+ },
614
+ schema: {
615
+ comment: null,
616
+ data_type: 'integer',
617
+ default_value: "nextval('articles_translations_id_seq'::regclass)",
618
+ foreign_key_column: null,
619
+ foreign_key_schema: null,
620
+ foreign_key_table: null,
621
+ generation_expression: null,
622
+ has_auto_increment: true,
623
+ is_generated: false,
624
+ is_nullable: false,
625
+ is_primary_key: true,
626
+ is_unique: true,
627
+ max_length: null,
628
+ name: 'id',
629
+ numeric_precision: 32,
630
+ numeric_scale: 0,
631
+ schema: 'public',
632
+ table: 'articles_translations',
633
+ },
634
+ type: 'integer',
635
+ },
636
+ {
637
+ collection: 'articles_translations',
638
+ field: 'languages_id',
639
+ meta: {
640
+ collection: 'articles_translations',
641
+ conditions: null,
642
+ display: null,
643
+ display_options: null,
644
+ field: 'languages_id',
645
+ group: null,
646
+ hidden: true,
647
+ interface: null,
648
+ note: null,
649
+ options: null,
650
+ readonly: false,
651
+ required: false,
652
+ sort: null,
653
+ special: null,
654
+ translations: [],
655
+ validation: null,
656
+ validation_message: null,
657
+ width: 'full',
658
+ },
659
+ schema: {
660
+ comment: null,
661
+ data_type: 'character varying',
662
+ default_value: null,
663
+ foreign_key_column: 'code',
664
+ foreign_key_schema: 'public',
665
+ foreign_key_table: 'languages',
666
+ generation_expression: null,
667
+ has_auto_increment: false,
668
+ is_generated: false,
669
+ is_nullable: true,
670
+ is_primary_key: false,
671
+ is_unique: false,
672
+ max_length: 255,
673
+ name: 'languages_id',
674
+ numeric_precision: null,
675
+ numeric_scale: null,
676
+ schema: 'public',
677
+ table: 'articles_translations',
678
+ },
679
+ type: 'string',
680
+ },
681
+ {
682
+ collection: 'languages',
683
+ field: 'code',
684
+ meta: {
685
+ collection: 'languages',
686
+ conditions: null,
687
+ display: null,
688
+ display_options: null,
689
+ field: 'code',
690
+ group: null,
691
+ hidden: false,
692
+ interface: null,
693
+ note: null,
694
+ options: null,
695
+ readonly: false,
696
+ required: false,
697
+ sort: null,
698
+ special: null,
699
+ translations: [],
700
+ validation: null,
701
+ validation_message: null,
702
+ width: 'full',
703
+ },
704
+ schema: {
705
+ comment: null,
706
+ data_type: 'character varying',
707
+ default_value: null,
708
+ foreign_key_column: null,
709
+ foreign_key_schema: null,
710
+ foreign_key_table: null,
711
+ generation_expression: null,
712
+ has_auto_increment: false,
713
+ is_generated: false,
714
+ is_nullable: false,
715
+ is_primary_key: true,
716
+ is_unique: true,
717
+ max_length: 255,
718
+ name: 'code',
719
+ numeric_precision: null,
720
+ numeric_scale: null,
721
+ schema: 'public',
722
+ table: 'languages',
723
+ },
724
+ type: 'string',
725
+ },
726
+ {
727
+ collection: 'languages',
728
+ field: 'direction',
729
+ meta: {
730
+ collection: 'languages',
731
+ conditions: null,
732
+ display: 'labels',
733
+ display_options: {
734
+ choices: [
735
+ {
736
+ text: '$t:left_to_right',
737
+ value: 'ltr',
738
+ },
739
+ {
740
+ text: '$t:right_to_left',
741
+ value: 'rtl',
742
+ },
743
+ ],
744
+ format: false,
745
+ },
746
+ field: 'direction',
747
+ group: null,
748
+ hidden: false,
749
+ interface: 'select-dropdown',
750
+ note: null,
751
+ options: {
752
+ choices: [
753
+ {
754
+ text: '$t:left_to_right',
755
+ value: 'ltr',
756
+ },
757
+ {
758
+ text: '$t:right_to_left',
759
+ value: 'rtl',
760
+ },
761
+ ],
762
+ },
763
+ readonly: false,
764
+ required: false,
765
+ sort: null,
766
+ special: null,
767
+ translations: [],
768
+ validation: null,
769
+ validation_message: null,
770
+ width: 'full',
771
+ },
772
+ schema: {
773
+ comment: null,
774
+ data_type: 'character varying',
775
+ default_value: 'ltr',
776
+ foreign_key_column: null,
777
+ foreign_key_schema: null,
778
+ foreign_key_table: null,
779
+ generation_expression: null,
780
+ has_auto_increment: false,
781
+ is_generated: false,
782
+ is_nullable: true,
783
+ is_primary_key: false,
784
+ is_unique: false,
785
+ max_length: 255,
786
+ name: 'direction',
787
+ numeric_precision: null,
788
+ numeric_scale: null,
789
+ schema: 'public',
790
+ table: 'languages',
791
+ },
792
+ type: 'string',
793
+ },
794
+ {
795
+ collection: 'languages',
796
+ field: 'name',
797
+ meta: {
798
+ collection: 'languages',
799
+ conditions: null,
800
+ display: null,
801
+ display_options: null,
802
+ field: 'name',
803
+ group: null,
804
+ hidden: false,
805
+ interface: null,
806
+ note: null,
807
+ options: null,
808
+ readonly: false,
809
+ required: false,
810
+ sort: null,
811
+ special: null,
812
+ translations: [],
813
+ validation: null,
814
+ validation_message: null,
815
+ width: 'full',
816
+ },
817
+ schema: {
818
+ comment: null,
819
+ data_type: 'character varying',
820
+ default_value: null,
821
+ foreign_key_column: null,
822
+ foreign_key_schema: null,
823
+ foreign_key_table: null,
824
+ generation_expression: null,
825
+ has_auto_increment: false,
826
+ is_generated: false,
827
+ is_nullable: true,
828
+ is_primary_key: false,
829
+ is_unique: false,
830
+ max_length: 255,
831
+ name: 'name',
832
+ numeric_precision: null,
833
+ numeric_scale: null,
834
+ schema: 'public',
835
+ table: 'languages',
836
+ },
837
+ type: 'string',
838
+ },
839
+ ],
840
+ relations: [
841
+ {
842
+ collection: 'articles_translations',
843
+ field: 'articles_id',
844
+ meta: {
845
+ junction_field: 'languages_id',
846
+ many_collection: 'articles_translations',
847
+ many_field: 'articles_id',
848
+ one_allowed_collections: null,
849
+ one_collection: 'articles',
850
+ one_collection_field: null,
851
+ one_deselect_action: 'nullify',
852
+ one_field: 'translations',
853
+ sort_field: null,
854
+ },
855
+ related_collection: 'articles',
856
+ schema: {
857
+ column: 'articles_id',
858
+ constraint_name: 'articles_translations_articles_id_foreign',
859
+ foreign_key_column: 'id',
860
+ foreign_key_schema: 'public',
861
+ foreign_key_table: 'articles',
862
+ on_delete: 'SET NULL',
863
+ on_update: 'NO ACTION',
864
+ table: 'articles_translations',
865
+ },
866
+ },
867
+ {
868
+ collection: 'articles_translations',
869
+ field: 'languages_id',
870
+ meta: {
871
+ junction_field: 'articles_id',
872
+ many_collection: 'articles_translations',
873
+ many_field: 'languages_id',
874
+ one_allowed_collections: null,
875
+ one_collection: 'languages',
876
+ one_collection_field: null,
877
+ one_deselect_action: 'nullify',
878
+ one_field: null,
879
+ sort_field: null,
880
+ },
881
+ related_collection: 'languages',
882
+ schema: {
883
+ column: 'languages_id',
884
+ constraint_name: 'articles_translations_languages_id_foreign',
885
+ foreign_key_column: 'code',
886
+ foreign_key_schema: 'public',
887
+ foreign_key_table: 'languages',
888
+ on_delete: 'SET NULL',
889
+ on_update: 'NO ACTION',
890
+ table: 'articles_translations',
891
+ },
892
+ },
893
+ ],
894
+ };