directus 9.15.0 → 9.16.1

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