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