directus 9.20.4 → 9.21.2

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 (143) hide show
  1. package/dist/auth/drivers/openid.js +3 -1
  2. package/dist/cli/commands/schema/apply.js +0 -2
  3. package/dist/cli/commands/schema/snapshot.js +0 -2
  4. package/dist/cli/utils/create-db-connection.d.ts +1 -1
  5. package/dist/controllers/extensions.js +4 -13
  6. package/dist/database/helpers/date/dialects/sqlite.d.ts +1 -1
  7. package/dist/database/helpers/date/dialects/sqlite.js +4 -0
  8. package/dist/database/helpers/date/types.d.ts +1 -1
  9. package/dist/database/helpers/date/types.js +4 -0
  10. package/dist/database/helpers/fn/dialects/mssql.d.ts +8 -8
  11. package/dist/database/helpers/fn/dialects/mssql.js +22 -16
  12. package/dist/database/helpers/fn/dialects/mysql.d.ts +8 -8
  13. package/dist/database/helpers/fn/dialects/mysql.js +22 -16
  14. package/dist/database/helpers/fn/dialects/postgres.d.ts +8 -8
  15. package/dist/database/helpers/fn/dialects/postgres.js +22 -16
  16. package/dist/database/helpers/fn/types.d.ts +1 -1
  17. package/dist/database/helpers/index.d.ts +1 -1
  18. package/dist/database/helpers/schema/dialects/cockroachdb.d.ts +1 -0
  19. package/dist/database/helpers/schema/dialects/cockroachdb.js +11 -0
  20. package/dist/database/helpers/schema/types.d.ts +3 -2
  21. package/dist/database/helpers/schema/types.js +5 -0
  22. package/dist/database/migrations/run.js +29 -3
  23. package/dist/database/run-ast.d.ts +1 -1
  24. package/dist/database/run-ast.js +1 -1
  25. package/dist/env.d.ts +4 -0
  26. package/dist/env.js +9 -4
  27. package/dist/env.test.d.ts +1 -8
  28. package/dist/exceptions/database/contains-null-values.d.ts +1 -1
  29. package/dist/exceptions/database/dialects/types.d.ts +6 -6
  30. package/dist/exceptions/database/invalid-foreign-key.d.ts +1 -1
  31. package/dist/exceptions/database/not-null-violation.d.ts +1 -1
  32. package/dist/exceptions/database/record-not-unique.d.ts +1 -1
  33. package/dist/exceptions/database/value-out-of-range.d.ts +1 -1
  34. package/dist/exceptions/database/value-too-long.d.ts +1 -1
  35. package/dist/exceptions/hit-rate-limit.d.ts +1 -1
  36. package/dist/exceptions/method-not-allowed.d.ts +1 -1
  37. package/dist/exceptions/service-unavailable.d.ts +1 -1
  38. package/dist/extensions.d.ts +7 -7
  39. package/dist/extensions.js +92 -89
  40. package/dist/logger.d.ts +1 -0
  41. package/dist/messenger.d.ts +1 -1
  42. package/dist/middleware/authenticate.d.ts +1 -0
  43. package/dist/middleware/schema.js +1 -1
  44. package/dist/middleware/validate-batch.d.ts +2 -0
  45. package/dist/operations/condition/index.d.ts +1 -1
  46. package/dist/operations/condition/index.js +1 -1
  47. package/dist/operations/condition/index.test.d.ts +1 -0
  48. package/dist/operations/exec/index.d.ts +1 -1
  49. package/dist/operations/item-create/index.d.ts +1 -1
  50. package/dist/operations/item-delete/index.d.ts +1 -1
  51. package/dist/operations/item-read/index.d.ts +1 -1
  52. package/dist/operations/item-update/index.d.ts +1 -1
  53. package/dist/operations/log/index.d.ts +1 -1
  54. package/dist/operations/mail/index.d.ts +1 -1
  55. package/dist/operations/notification/index.d.ts +1 -1
  56. package/dist/operations/request/index.d.ts +1 -1
  57. package/dist/operations/sleep/index.d.ts +1 -1
  58. package/dist/operations/transform/index.d.ts +1 -1
  59. package/dist/operations/trigger/index.d.ts +1 -1
  60. package/dist/operations/trigger/index.js +5 -2
  61. package/dist/rate-limiter.d.ts +1 -1
  62. package/dist/services/authorization.js +7 -3
  63. package/dist/services/collections.d.ts +1 -1
  64. package/dist/services/collections.js +112 -13
  65. package/dist/services/fields.d.ts +5 -4
  66. package/dist/services/fields.js +118 -50
  67. package/dist/services/fields.test.d.ts +1 -0
  68. package/dist/services/graphql/index.js +4 -1
  69. package/dist/services/graphql/utils/process-error.d.ts +4 -0
  70. package/dist/services/graphql/utils/process-error.js +26 -0
  71. package/dist/services/graphql/utils/process-error.test.d.ts +1 -0
  72. package/dist/services/items.d.ts +1 -1
  73. package/dist/services/items.js +39 -13
  74. package/dist/services/mail/index.d.ts +2 -2
  75. package/dist/services/mail/index.js +2 -1
  76. package/dist/services/mail/templates/base.liquid +4 -4
  77. package/dist/services/notifications.js +9 -4
  78. package/dist/services/notifications.test.d.ts +1 -0
  79. package/dist/services/payload.d.ts +2 -2
  80. package/dist/services/payload.js +14 -12
  81. package/dist/services/relations.d.ts +4 -4
  82. package/dist/services/relations.js +66 -8
  83. package/dist/services/users.js +8 -2
  84. package/dist/services/users.test.d.ts +1 -0
  85. package/dist/types/assets.d.ts +7 -7
  86. package/dist/types/ast.d.ts +7 -7
  87. package/dist/types/auth.d.ts +4 -4
  88. package/dist/types/collection.d.ts +2 -2
  89. package/dist/types/events.d.ts +1 -1
  90. package/dist/types/files.d.ts +2 -2
  91. package/dist/types/items.d.ts +5 -5
  92. package/dist/types/migration.d.ts +1 -1
  93. package/dist/types/revision.d.ts +1 -1
  94. package/dist/types/services.d.ts +1 -1
  95. package/dist/types/snapshot.d.ts +4 -4
  96. package/dist/types/webhooks.d.ts +2 -2
  97. package/dist/utils/apply-snapshot.js +32 -13
  98. package/dist/utils/get-ast-from-query.d.ts +1 -1
  99. package/dist/utils/get-column-path.d.ts +2 -2
  100. package/dist/utils/get-module-default.d.ts +1 -1
  101. package/dist/utils/get-relation-info.d.ts +1 -1
  102. package/dist/utils/get-schema.d.ts +6 -2
  103. package/dist/utils/get-schema.js +1 -1
  104. package/dist/utils/get-snapshot.js +1 -1
  105. package/dist/utils/job-queue.d.ts +1 -1
  106. package/dist/utils/merge-permissions.d.ts +1 -0
  107. package/dist/utils/reduce-schema.js +3 -1
  108. package/package.json +69 -80
  109. package/dist/__mocks__/cache.d.ts +0 -5
  110. package/dist/__mocks__/cache.js +0 -7
  111. package/dist/__utils__/items-utils.d.ts +0 -2
  112. package/dist/__utils__/items-utils.js +0 -36
  113. package/dist/__utils__/schemas.d.ts +0 -13
  114. package/dist/__utils__/schemas.js +0 -304
  115. package/dist/__utils__/snapshots.d.ts +0 -5
  116. package/dist/__utils__/snapshots.js +0 -897
  117. package/dist/cli/index.test.js +0 -63
  118. package/dist/controllers/files.test.js +0 -49
  119. package/dist/database/migrations/run.test.js +0 -92
  120. package/dist/env.test.js +0 -40
  121. package/dist/middleware/authenticate.test.js +0 -214
  122. package/dist/middleware/extract-token.test.js +0 -60
  123. package/dist/middleware/validate-batch.test.js +0 -82
  124. package/dist/operations/exec/index.test.js +0 -95
  125. package/dist/services/files.test.js +0 -89
  126. package/dist/services/items.test.js +0 -765
  127. package/dist/services/payload.test.js +0 -196
  128. package/dist/services/specifications.test.js +0 -96
  129. package/dist/utils/apply-snapshot.test.js +0 -305
  130. package/dist/utils/async-handler.test.js +0 -18
  131. package/dist/utils/calculate-field-depth.test.js +0 -76
  132. package/dist/utils/filter-items.test.js +0 -60
  133. package/dist/utils/get-auth-providers.test.js +0 -72
  134. package/dist/utils/get-cache-key.test.js +0 -74
  135. package/dist/utils/get-column-path.test.js +0 -136
  136. package/dist/utils/get-config-from-env.test.js +0 -19
  137. package/dist/utils/get-relation-info.test.js +0 -88
  138. package/dist/utils/get-relation-type.test.js +0 -69
  139. package/dist/utils/get-string-byte-size.test.js +0 -8
  140. package/dist/utils/is-directus-jwt.test.js +0 -26
  141. package/dist/utils/jwt.test.js +0 -36
  142. package/dist/utils/merge-permissions.test.js +0 -80
  143. package/dist/utils/validate-keys.test.js +0 -97
@@ -1,897 +0,0 @@
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
- };