@directus/app 9.20.3 → 9.21.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 (500) hide show
  1. package/dist/assets/@directus_extensions-sdk.7480601b.entry.js +1 -0
  2. package/dist/assets/{accounts.8d02a534.js → accounts.6f69dc83.js} +1 -1
  3. package/dist/assets/active-line.f3bab3a5.js +1 -0
  4. package/dist/assets/{activity-log.957853bb.js → activity-log.2e944bfa.js} +1 -1
  5. package/dist/assets/{activity.58bbe1c2.js → activity.dda3417f.js} +1 -1
  6. package/dist/assets/apl.1805b26f.js +1 -0
  7. package/dist/assets/{ar-SA.3a51ad1e.js → ar-SA.c5ee16de.js} +1 -1
  8. package/dist/assets/{architecture.0ded5b28.js → architecture.e66cc597.js} +1 -1
  9. package/dist/assets/asciiarmor.ffaf0f62.js +1 -0
  10. package/dist/assets/asn.1.cd62dee4.js +1 -0
  11. package/dist/assets/asterisk.07d1e4af.js +1 -0
  12. package/dist/assets/{authentication.5b7d5fa7.js → authentication.8a718856.js} +5 -5
  13. package/dist/assets/autorefresh.e63fec5a.js +1 -0
  14. package/dist/assets/{aws.890dfda5.js → aws.99d49c74.js} +1 -1
  15. package/dist/assets/{backing-directus.7f54a4af.js → backing-directus.23aeddff.js} +1 -1
  16. package/dist/assets/brainfuck.587235ad.js +1 -0
  17. package/dist/assets/{cli.4e995657.js → cli.8e7d9b17.js} +4 -4
  18. package/dist/assets/{cli.bf0b2442.js → cli.ce3a6393.js} +2 -2
  19. package/dist/assets/clike.8df07672.js +1 -0
  20. package/dist/assets/clojure.7ed940f7.js +1 -0
  21. package/dist/assets/{cloudron.0a16f34b.js → cloudron.0cf18005.js} +1 -1
  22. package/dist/assets/cmake.8058664d.js +1 -0
  23. package/dist/assets/cobol.7925af76.js +1 -0
  24. package/dist/assets/{codebase-overview.2ba91a80.js → codebase-overview.4707b17a.js} +1 -1
  25. package/dist/assets/coffeescript.36666708.js +1 -0
  26. package/dist/assets/{collections.7fa07fe7.js → collections.30500b8b.js} +2 -2
  27. package/dist/assets/{collections.2a61805a.js → collections.88058903.js} +2 -2
  28. package/dist/assets/{collections.ea858bf6.js → collections.b74ab838.js} +3 -3
  29. package/dist/assets/commonlisp.ce672eb5.js +1 -0
  30. package/dist/assets/{conditions.32339903.js → conditions.db9bebfc.js} +1 -1
  31. package/dist/assets/{config-options.53449c2c.js → config-options.48260929.js} +12 -12
  32. package/dist/assets/{content.18716bf7.js → content.647b054c.js} +1 -1
  33. package/dist/assets/{creating-extensions.0a6d6d3b.js → creating-extensions.e032c2f0.js} +3 -3
  34. package/dist/assets/crystal.3c7c09cc.js +1 -0
  35. package/dist/assets/css.b68c041b.js +1 -0
  36. package/dist/assets/cypher.3b38874c.js +4 -0
  37. package/dist/assets/d.0460be39.js +1 -0
  38. package/dist/assets/dart.680bdb1d.js +1 -0
  39. package/dist/assets/{data-model.b5eb7565.js → data-model.63af932c.js} +3 -3
  40. package/dist/assets/de-DE.590d3c70.js +1 -0
  41. package/dist/assets/diff.11dadb16.js +1 -0
  42. package/dist/assets/{digitalocean-app-platform.4063d6cc.js → digitalocean-app-platform.adb9fc63.js} +2 -2
  43. package/dist/assets/{display-templates.65a9b519.js → display-templates.7c1dae6d.js} +1 -1
  44. package/dist/assets/display.87df21d6.js +1 -0
  45. package/dist/assets/{displays.b72d546c.js → displays.c0024804.js} +5 -5
  46. package/dist/assets/django.c5c2bb33.js +1 -0
  47. package/dist/assets/{docker.ae6227ab.js → docker.a790e063.js} +1 -1
  48. package/dist/assets/dockerfile.cb57c90a.js +1 -0
  49. package/dist/assets/{documentation.6628aaac.js → documentation.1783cd53.js} +1 -1
  50. package/dist/assets/dtd.4bdd906a.js +1 -0
  51. package/dist/assets/dylan.af09e3f8.js +1 -0
  52. package/dist/assets/ebnf.0ec983c0.js +1 -0
  53. package/dist/assets/ecl.eeba0610.js +1 -0
  54. package/dist/assets/eiffel.d9fec659.js +1 -0
  55. package/dist/assets/elm.c3ce2b54.js +1 -0
  56. package/dist/assets/{email-templates.5e1b5472.js → email-templates.ed708d89.js} +1 -1
  57. package/dist/assets/{endpoints.44874916.js → endpoints.10a1484a.js} +1 -1
  58. package/dist/assets/erlang.d00fab30.js +1 -0
  59. package/dist/assets/es-419.37d0e1bd.js +1 -0
  60. package/dist/assets/{extensions.9790f6ff.js → extensions.d542042f.js} +1 -1
  61. package/dist/assets/factor.a6dddf2c.js +1 -0
  62. package/dist/assets/{faq.0fd5ca6e.js → faq.8904941c.js} +2 -2
  63. package/dist/assets/fcl.0c78a020.js +1 -0
  64. package/dist/assets/{field-types.e5bd5900.js → field-types.e3e041fc.js} +1 -1
  65. package/dist/assets/{field.b9b55fc2.js → field.64c29e0b.js} +1 -1
  66. package/dist/assets/{fields.fc8af154.js → fields.1597bfad.js} +1 -1
  67. package/dist/assets/{fields.7df6f624.js → fields.c76c2d8b.js} +1 -1
  68. package/dist/assets/{file-library.7a11d866.js → file-library.8fb3da43.js} +1 -1
  69. package/dist/assets/{files.84b41f2f.js → files.d8e3acf4.js} +2 -2
  70. package/dist/assets/{filter-rules.099e9689.js → filter-rules.edb18765.js} +4 -4
  71. package/dist/assets/{filters.98d31bd5.js → filters.26e88a50.js} +1 -1
  72. package/dist/assets/{flows.b6ebb4b6.js → flows.8c6f69bb.js} +6 -6
  73. package/dist/assets/{flows.2646c3ae.js → flows.f014b9cc.js} +2 -2
  74. package/dist/assets/{folders.35cfde90.js → folders.8aec87f5.js} +5 -5
  75. package/dist/assets/forth.fbb63d06.js +1 -0
  76. package/dist/assets/fortran.cbc14824.js +1 -0
  77. package/dist/assets/fr-FR.d8dbf5de.js +1 -0
  78. package/dist/assets/gas.3e3eaaa0.js +1 -0
  79. package/dist/assets/{gcp.ce76381f.js → gcp.97542e88.js} +5 -5
  80. package/dist/assets/gfm.a5597fec.js +1 -0
  81. package/dist/assets/gherkin.9cfc1ed7.js +1 -0
  82. package/dist/assets/{github-ci.b4dde47f.js → github-ci.e7d15770.js} +2 -2
  83. package/dist/assets/{glossary.3b14c64d.js → glossary.beaf358c.js} +1 -1
  84. package/dist/assets/{glossary.930fe38e.js → glossary.c972e836.js} +1 -1
  85. package/dist/assets/go.f180871e.js +1 -0
  86. package/dist/assets/groovy.4db995a9.js +1 -0
  87. package/dist/assets/haml.ed77ce51.js +1 -0
  88. package/dist/assets/handlebars.81504d91.js +1 -0
  89. package/dist/assets/haskell-literate.d54dc9c7.js +1 -0
  90. package/dist/assets/haskell.f21c4399.js +1 -0
  91. package/dist/assets/haxe.50f0db0c.js +1 -0
  92. package/dist/assets/{hooks.b9909639.js → hooks.feaad058.js} +1 -1
  93. package/dist/assets/htmlembedded.5ff69a18.js +1 -0
  94. package/dist/assets/htmlmixed.5efed62b.js +1 -0
  95. package/dist/assets/{htmlmixed.bca09a1b.js → htmlmixed.f69cc072.js} +1 -1
  96. package/dist/assets/http.6b260d22.js +1 -0
  97. package/dist/assets/hu-HU.b086156a.js +1 -0
  98. package/dist/assets/idl.617214c8.js +1 -0
  99. package/dist/assets/{iis.63d75601.js → iis.0358929d.js} +1 -1
  100. package/dist/assets/{import-export.fe680598.js → import-export.391b74e0.js} +2 -2
  101. package/dist/assets/{index.ffcfdc79.js → index.04b73e2f.js} +1 -1
  102. package/dist/assets/{index.3ccb1a62.js → index.09845961.js} +1 -1
  103. package/dist/assets/{index.671547c3.js → index.130287f6.js} +1 -1
  104. package/dist/assets/{index.3d4f0091.css → index.19e6c20c.css} +1 -1
  105. package/dist/assets/{index.20179e31.js → index.1ba23fe5.js} +1 -1
  106. package/dist/assets/{index.f19e5b18.js → index.1f330fc3.js} +1 -1
  107. package/dist/assets/{index.7f210d25.js → index.24999c03.js} +1 -1
  108. package/dist/assets/{index.06aaef91.entry.js → index.312f2c91.entry.js} +2693 -2687
  109. package/dist/assets/{index.b242e4b8.js → index.31f6e6f2.js} +3 -3
  110. package/dist/assets/{index.7c5199ad.js → index.330c3aee.js} +1 -1
  111. package/dist/assets/{index.549a82a6.js → index.3470f134.js} +1 -1
  112. package/dist/assets/index.38d152bf.js +1 -0
  113. package/dist/assets/{index.a6c65314.js → index.4044e5c7.js} +1 -1
  114. package/dist/assets/{index.764b9d6e.js → index.4706b3f5.js} +1 -1
  115. package/dist/assets/{index.875a771b.js → index.4b24f075.js} +1 -1
  116. package/dist/assets/{index.6949d989.js → index.4c6e76b7.js} +1 -1
  117. package/dist/assets/{index.0d7f4d79.js → index.522f44b0.js} +1 -1
  118. package/dist/assets/{index.1c9cfeb8.js → index.525d8fd8.js} +1 -1
  119. package/dist/assets/{index.d8e4727e.js → index.528e4b54.js} +1 -1
  120. package/dist/assets/{index.d9e48160.js → index.52a4297c.js} +1 -1
  121. package/dist/assets/{index.34c47fcf.js → index.530fd584.js} +1 -1
  122. package/dist/assets/{index.91e98759.js → index.546018df.js} +1 -1
  123. package/dist/assets/{index.d557b36c.js → index.57542755.js} +1 -1
  124. package/dist/assets/{index.425c965c.js → index.5a8952da.js} +1 -1
  125. package/dist/assets/{index.9b6db0de.js → index.5cf97c2b.js} +1 -1
  126. package/dist/assets/index.65e5d28f.css +1 -0
  127. package/dist/assets/{index.08c5d5a2.js → index.6b77e807.js} +1 -1
  128. package/dist/assets/{index.393b7fd6.js → index.6bf3a163.js} +1 -1
  129. package/dist/assets/{index.fe4bc374.js → index.6c07a132.js} +1 -1
  130. package/dist/assets/{index.1f99dc82.js → index.6c4fabf1.js} +1 -1
  131. package/dist/assets/{index.7468a23c.js → index.6fa71870.js} +1 -1
  132. package/dist/assets/{index.8fb3c07f.js → index.7045dfad.js} +1 -1
  133. package/dist/assets/{index.aa66a39f.js → index.75ef0473.js} +1 -1
  134. package/dist/assets/{index.c3959367.js → index.77b8f02e.js} +1 -1
  135. package/dist/assets/{index.62e48e8e.js → index.7943fd38.js} +1 -1
  136. package/dist/assets/{index.ac96f5b3.js → index.7c5b74dc.js} +1 -1
  137. package/dist/assets/{index.f32d0fbe.js → index.7de5db57.js} +1 -1
  138. package/dist/assets/{index.8aa50b59.js → index.7e90d361.js} +1 -1
  139. package/dist/assets/{index.2399ffb8.js → index.7edb8b15.js} +1 -1
  140. package/dist/assets/{index.d370fafd.js → index.7fcf2b86.js} +1 -1
  141. package/dist/assets/{index.5c5acddc.js → index.80106d2d.js} +1 -1
  142. package/dist/assets/{index.8b8e6073.js → index.804b3c9b.js} +1 -1
  143. package/dist/assets/{index.5264aa26.js → index.8063dc25.js} +1 -1
  144. package/dist/assets/{index.eb772cab.js → index.81a02f8c.js} +1 -1
  145. package/dist/assets/{index.38e5dfc6.js → index.81d5b763.js} +1 -1
  146. package/dist/assets/{index.7269b9b7.js → index.8200528c.js} +1 -1
  147. package/dist/assets/{index.00acb7aa.js → index.82939b3a.js} +1 -1
  148. package/dist/assets/{index.d024a491.js → index.8446e18c.js} +1 -1
  149. package/dist/assets/index.87afb869.js +1 -0
  150. package/dist/assets/{index.7e37814b.js → index.92f59a75.js} +1 -1
  151. package/dist/assets/{index.3abfd687.js → index.98cb4ee1.js} +1 -1
  152. package/dist/assets/{index.486669b9.js → index.9d2fbf00.js} +1 -1
  153. package/dist/assets/{index.ec87e7f6.js → index.9dfe292c.js} +1 -1
  154. package/dist/assets/{index.4ce96101.js → index.a1b7be9b.js} +1 -1
  155. package/dist/assets/{index.1b594a21.js → index.a5356d91.js} +1 -1
  156. package/dist/assets/{index.b67fb5fc.js → index.ab4e5ca3.js} +1 -1
  157. package/dist/assets/{index.f511aff3.js → index.ab7b6cba.js} +1 -1
  158. package/dist/assets/{index.578c30ec.js → index.ac6c3fe9.js} +1 -1
  159. package/dist/assets/{index.5062f951.js → index.adc560cb.js} +1 -1
  160. package/dist/assets/{index.045e97f0.js → index.ae4bf6ea.js} +1 -1
  161. package/dist/assets/{index.9f69b190.js → index.aeaa0aa9.js} +1 -1
  162. package/dist/assets/{index.8b9e43f4.js → index.afc6b30e.js} +1 -1
  163. package/dist/assets/{index.23def130.js → index.b02dbd39.js} +1 -1
  164. package/dist/assets/{index.3cb24d7f.js → index.b391672d.js} +1 -1
  165. package/dist/assets/{index.19a506a0.js → index.b503f187.js} +1 -1
  166. package/dist/assets/{index.a88d2d0b.js → index.b7113e87.js} +1 -1
  167. package/dist/assets/{index.7bb84aa5.js → index.c156c46e.js} +1 -1
  168. package/dist/assets/{index.68337c85.js → index.c5e16ef6.js} +1 -1
  169. package/dist/assets/{index.45686201.js → index.c85c3f77.js} +1 -1
  170. package/dist/assets/{index.03886e4a.js → index.cb7799d1.js} +1 -1
  171. package/dist/assets/{index.eb4d5cbc.js → index.cb93c1e8.js} +1 -1
  172. package/dist/assets/{index.dc4d9b6a.js → index.d0d998a0.js} +1 -1
  173. package/dist/assets/{index.c2858d95.js → index.d790d684.js} +1 -1
  174. package/dist/assets/{index.a264494d.js → index.dc9006a1.js} +1 -1
  175. package/dist/assets/{index.8130aabc.js → index.e3619b04.js} +1 -1
  176. package/dist/assets/{index.ab5ebdc3.js → index.e4224764.js} +1 -1
  177. package/dist/assets/{index.426d219b.js → index.e5079c3a.js} +1 -1
  178. package/dist/assets/{index.90ecf353.js → index.e6971ab1.js} +1 -1
  179. package/dist/assets/{index.b2e447e3.js → index.e85bc569.js} +1 -1
  180. package/dist/assets/{index.42614221.js → index.e95b7e4b.js} +1 -1
  181. package/dist/assets/{index.0608a502.js → index.ec8cfaac.js} +1 -1
  182. package/dist/assets/{index.b0e3c55c.js → index.f2e26d1f.js} +1 -1
  183. package/dist/assets/{index.eecb0d4b.js → index.f60d22d0.js} +1 -1
  184. package/dist/assets/{index.a8b94b31.js → index.f828781f.js} +1 -1
  185. package/dist/assets/{index.2b61f9fb.js → index.fb6b1657.js} +1 -1
  186. package/dist/assets/{index.9c4a7f65.js → index.fb8023b0.js} +1 -1
  187. package/dist/assets/{index.79264a03.js → index.fe536421.js} +1 -1
  188. package/dist/assets/{input-rich-text-html.9a04a626.js → input-rich-text-html.b1656039.js} +30 -30
  189. package/dist/assets/{insights.bb6e6dd9.js → insights.8a1beae6.js} +2 -2
  190. package/dist/assets/{installation.a80b7bdd.js → installation.2db8d0e1.js} +1 -1
  191. package/dist/assets/{interface.6b3d318d.js → interface.8e4a64f0.js} +1 -1
  192. package/dist/assets/{interfaces.9c9cb203.js → interfaces.8e88b01f.js} +4 -4
  193. package/dist/assets/{introduction.17ce0958.js → introduction.2a0882fe.js} +4 -4
  194. package/dist/assets/{introduction.74d5f276.js → introduction.42a2136e.js} +1 -1
  195. package/dist/assets/{introduction.2b473cdb.js → introduction.4f0ccbaf.js} +1 -1
  196. package/dist/assets/{introduction.23bcca02.js → introduction.dbd85d4e.js} +1 -1
  197. package/dist/assets/it-IT.53711e9b.js +1 -0
  198. package/dist/assets/{items.a200a734.js → items.9f358fa7.js} +5 -5
  199. package/dist/assets/{items.d9558b12.js → items.abb8d314.js} +1 -1
  200. package/dist/assets/javascript-hint.bd3c0fcf.js +1 -0
  201. package/dist/assets/javascript.7eff1543.js +1 -0
  202. package/dist/assets/jinja2.eec1b998.js +1 -0
  203. package/dist/assets/jsx.8808ecb1.js +1 -0
  204. package/dist/assets/julia.56479fbf.js +1 -0
  205. package/dist/assets/{layouts.71139077.js → layouts.9c64beac.js} +3 -3
  206. package/dist/assets/{layouts.67e010c3.js → layouts.b4771384.js} +1 -1
  207. package/dist/assets/livescript.37040ed1.js +1 -0
  208. package/dist/assets/lua.7730f9fd.js +1 -0
  209. package/dist/assets/{manual.be26c257.js → manual.4a53ccfe.js} +4 -4
  210. package/dist/assets/mark-selection.c1a5d4e1.js +1 -0
  211. package/dist/assets/match-highlighter.ed7a2467.js +1 -0
  212. package/dist/assets/{matchbrackets.9e20b864.js → matchbrackets.ebc48bf8.js} +1 -1
  213. package/dist/assets/mathematica.1dbfb6f4.js +1 -0
  214. package/dist/assets/mbox.0ac8a216.js +1 -0
  215. package/dist/assets/{migrations.58c8fd96.js → migrations.2969a369.js} +1 -1
  216. package/dist/assets/mirc.1cc06f67.js +1 -0
  217. package/dist/assets/mllike.cee4eaf7.js +1 -0
  218. package/dist/assets/modelica.2292d0b8.js +1 -0
  219. package/dist/assets/{modules.0cfbe882.js → modules.f057fcd0.js} +3 -3
  220. package/dist/assets/mscgen.38b6bb11.js +1 -0
  221. package/dist/assets/multiplex.1d92e024.js +3 -0
  222. package/dist/assets/mumps.f37c25cb.js +1 -0
  223. package/dist/assets/nginx.39e016a3.js +1 -0
  224. package/dist/assets/{notifications.7b442623.js → notifications.ca876814.js} +11 -11
  225. package/dist/assets/nsis.1cf932c7.js +1 -0
  226. package/dist/assets/ntriples.e6c37d71.js +1 -0
  227. package/dist/assets/octave.2bec4045.js +1 -0
  228. package/dist/assets/{operations.bd173669.js → operations.246298bc.js} +11 -11
  229. package/dist/assets/{operations.6fcceb98.js → operations.64af444f.js} +3 -3
  230. package/dist/assets/{operations.30bbad94.js → operations.b4042de2.js} +2 -2
  231. package/dist/assets/overlay.16f98fb6.js +1 -0
  232. package/dist/assets/{overview.cb1196c4.js → overview.0b4ab371.js} +1 -1
  233. package/dist/assets/{overview.4c1683c3.js → overview.359f9713.js} +1 -1
  234. package/dist/assets/{overview.23ad824a.js → overview.40893677.js} +1 -1
  235. package/dist/assets/oz.8955a131.js +1 -0
  236. package/dist/assets/{panels.187b8f0d.js → panels.3969b423.js} +2 -2
  237. package/dist/assets/pascal.7213d964.js +1 -0
  238. package/dist/assets/pegjs.6877c220.js +1 -0
  239. package/dist/assets/perl.7f37e0c4.js +1 -0
  240. package/dist/assets/{permissions.2ad2e118.js → permissions.0712320e.js} +4 -4
  241. package/dist/assets/php.b63c0c50.js +1 -0
  242. package/dist/assets/pig.1cddd148.js +1 -0
  243. package/dist/assets/{pinia.24c7b35a.entry.js → pinia.0d44ec62.entry.js} +2 -2
  244. package/dist/assets/{plesk.279941fc.js → plesk.e3ea514c.js} +5 -5
  245. package/dist/assets/powershell.3aecbe91.js +1 -0
  246. package/dist/assets/{presets-bookmarks.62ac9314.js → presets-bookmarks.0baf10eb.js} +1 -1
  247. package/dist/assets/{presets.0390ff92.js → presets.0de7849a.js} +8 -8
  248. package/dist/assets/{project-settings.8b91aa04.js → project-settings.6e5956c8.js} +1 -1
  249. package/dist/assets/{projects.97bc15fa.js → projects.12d7a177.js} +1 -1
  250. package/dist/assets/properties.db539b03.js +1 -0
  251. package/dist/assets/protobuf.0fa0e9b4.js +1 -0
  252. package/dist/assets/pt-BR.2c2e8c4f.js +1 -0
  253. package/dist/assets/pug.e6d33f3a.js +1 -0
  254. package/dist/assets/puppet.18346b43.js +1 -0
  255. package/dist/assets/python.065d28e0.js +1 -0
  256. package/dist/assets/q.ed3c142c.js +1 -0
  257. package/dist/assets/{query.19ee7756.js → query.6dcece55.js} +1 -1
  258. package/dist/assets/{quickstart.96d7fa17.js → quickstart.f1c431cf.js} +3 -3
  259. package/dist/assets/{quickstart.7f55e26e.js → quickstart.fd328631.js} +2 -2
  260. package/dist/assets/r.f2ad8682.js +1 -0
  261. package/dist/assets/{readme.abb2691e.js → readme.c063616b.js} +1 -1
  262. package/dist/assets/{relations.1409faa0.js → relations.c92ebc4e.js} +6 -6
  263. package/dist/assets/{relationship.8e3bc45d.js → relationship.0344c790.js} +1 -1
  264. package/dist/assets/{relationships.2449eed5.js → relationships.ad2ee267.js} +7 -7
  265. package/dist/assets/{resources.f9b64d6f.js → resources.84b84252.js} +1 -1
  266. package/dist/assets/{revisions.7ffa76fe.js → revisions.39f423d0.js} +4 -4
  267. package/dist/assets/ro-RO.4c33f715.js +1 -0
  268. package/dist/assets/{roles.ce6518a4.js → roles.89c51107.js} +7 -7
  269. package/dist/assets/rpm.1674f668.js +1 -0
  270. package/dist/assets/rst.0a69f626.js +1 -0
  271. package/dist/assets/ruby.02498746.js +1 -0
  272. package/dist/assets/{ruby.514cda97.js → ruby.d805273a.js} +1 -1
  273. package/dist/assets/{running-locally.8b135453.js → running-locally.24e1b4bf.js} +6 -6
  274. package/dist/assets/runtime-core.esm-bundler.22ec0346.js +1 -0
  275. package/dist/assets/rust.90ce6688.js +1 -0
  276. package/dist/assets/sas.3b045c8d.js +1 -0
  277. package/dist/assets/sass.4fcb9b12.js +1 -0
  278. package/dist/assets/{schema.6649576e.js → schema.c326d911.js} +1 -1
  279. package/dist/assets/scheme.eb7abc5c.js +1 -0
  280. package/dist/assets/{sdk.33dcc072.js → sdk.2fdc3788.js} +17 -17
  281. package/dist/assets/{security.acb2be94.js → security.a0326c54.js} +1 -1
  282. package/dist/assets/{server.60bfa539.js → server.5b19042c.js} +1 -1
  283. package/dist/assets/{settings.6ac3895b.js → settings.2195b191.js} +1 -1
  284. package/dist/assets/{settings.a00aa4fa.js → settings.2553780f.js} +1 -1
  285. package/dist/assets/{shares.9a7ea736.js → shares.a17e644c.js} +1 -1
  286. package/dist/assets/shell.09d717f3.js +1 -0
  287. package/dist/assets/show-hint.4fc17cec.js +1 -0
  288. package/dist/assets/sieve.fe87517f.js +1 -0
  289. package/dist/assets/slim.76f6114d.js +1 -0
  290. package/dist/assets/smalltalk.eaf13594.js +1 -0
  291. package/dist/assets/smarty.abf4421d.js +1 -0
  292. package/dist/assets/solr.62208f30.js +1 -0
  293. package/dist/assets/soy.b2db807b.js +1 -0
  294. package/dist/assets/sparql.7042a2b3.js +1 -0
  295. package/dist/assets/spreadsheet.ca1422ad.js +1 -0
  296. package/dist/assets/sql.fcb976c5.js +1 -0
  297. package/dist/assets/{sso-examples.eb3ba478.js → sso-examples.8a36c968.js} +2 -2
  298. package/dist/assets/{sso.29d67116.js → sso.92e5b5f1.js} +4 -4
  299. package/dist/assets/stex.30c4dc01.js +1 -0
  300. package/dist/assets/{stex.dd8072e9.js → stex.a5fe2e4a.js} +1 -1
  301. package/dist/assets/stylus.f7fcee76.js +1 -0
  302. package/dist/assets/{support.e9e535b3.js → support.f153d4ae.js} +1 -1
  303. package/dist/assets/swift.116cdb17.js +1 -0
  304. package/dist/assets/tcl.42613799.js +1 -0
  305. package/dist/assets/{teams.347f0563.js → teams.c564c81f.js} +1 -1
  306. package/dist/assets/textile.4285b886.js +1 -0
  307. package/dist/assets/{themes.32a50b86.js → themes.6c5c943f.js} +2 -2
  308. package/dist/assets/tiddlywiki.eb66e0c7.js +1 -0
  309. package/dist/assets/tiki.c796e616.js +1 -0
  310. package/dist/assets/toml.3b8b1e04.js +1 -0
  311. package/dist/assets/tornado.89f4bce8.js +1 -0
  312. package/dist/assets/tr-TR.328a2546.js +1 -0
  313. package/dist/assets/{translation-strings.285d6bb2.js → translation-strings.326a2741.js} +1 -1
  314. package/dist/assets/translations.4c0efc6a.js +1 -0
  315. package/dist/assets/{translations.f87a601e.js → translations.645f8c9c.js} +1 -1
  316. package/dist/assets/{triggers.325e50d8.js → triggers.44703cf0.js} +1 -1
  317. package/dist/assets/troff.51ba9964.js +1 -0
  318. package/dist/assets/ttcn-cfg.62ff9e40.js +1 -0
  319. package/dist/assets/ttcn.08f34f21.js +1 -0
  320. package/dist/assets/turtle.2efc3e1b.js +1 -0
  321. package/dist/assets/twig.bd0ee3cd.js +1 -0
  322. package/dist/assets/{ubuntu.3ba252fe.js → ubuntu.47e06de3.js} +2 -2
  323. package/dist/assets/uk-UA.fe247137.js +1 -0
  324. package/dist/assets/{upgrades-migrations.a091b8af.js → upgrades-migrations.a23cace7.js} +1 -1
  325. package/dist/assets/{use-sync.d9160f34.js → use-sync.e83d9ab3.js} +3 -3
  326. package/dist/assets/{user-directory.9ca05985.js → user-directory.e1f15d1a.js} +1 -1
  327. package/dist/assets/{users-roles-permissions.bb71f6c9.js → users-roles-permissions.14757490.js} +1 -1
  328. package/dist/assets/{users.a44125e3.js → users.0ea4e372.js} +1 -1
  329. package/dist/assets/{utilities.0380c496.js → utilities.c76e17ac.js} +7 -7
  330. package/dist/assets/validation.99c6fcd4.js +1 -0
  331. package/dist/assets/vb.e77c04f4.js +1 -0
  332. package/dist/assets/vbscript.b1155c12.js +1 -0
  333. package/dist/assets/velocity.5f33a92c.js +1 -0
  334. package/dist/assets/verilog.064306e8.js +1 -0
  335. package/dist/assets/vhdl.c71b4d0c.js +1 -0
  336. package/dist/assets/{vue-i18n.df8d89e7.entry.js → vue-i18n.fbc77449.entry.js} +1 -1
  337. package/dist/assets/vue-router.3a828e63.entry.js +5 -0
  338. package/dist/assets/vue.1a8f18be.js +1 -0
  339. package/dist/assets/vue.486f3e62.entry.js +1 -0
  340. package/dist/assets/vue.runtime.esm-bundler.f6138180.js +1 -0
  341. package/dist/assets/wast.7970d24f.js +1 -0
  342. package/dist/assets/{webhooks.2d23be4c.js → webhooks.105c0454.js} +1 -1
  343. package/dist/assets/{webhooks.40d9a7a3.js → webhooks.d7f419fe.js} +4 -4
  344. package/dist/assets/webidl.f56d782e.js +1 -0
  345. package/dist/assets/{xml.6c641966.js → xml.c9106c48.js} +1 -1
  346. package/dist/assets/xquery.d326f7d2.js +1 -0
  347. package/dist/assets/yacas.aab21d14.js +1 -0
  348. package/dist/assets/yaml-frontmatter.c4684bee.js +1 -0
  349. package/dist/assets/yaml.02beca9a.js +1 -0
  350. package/dist/assets/z80.2c343a72.js +1 -0
  351. package/dist/assets/{zh-CN.a9e8d795.js → zh-CN.a8f9e881.js} +1 -1
  352. package/dist/index.html +8 -8
  353. package/package.json +61 -61
  354. package/dist/assets/@directus_extensions-sdk.fd0e4213.entry.js +0 -1
  355. package/dist/assets/active-line.6ad3cc1b.js +0 -1
  356. package/dist/assets/apl.c686918c.js +0 -1
  357. package/dist/assets/asciiarmor.461dfa97.js +0 -1
  358. package/dist/assets/asn.1.edf36206.js +0 -1
  359. package/dist/assets/asterisk.ec604180.js +0 -1
  360. package/dist/assets/autorefresh.12942f0a.js +0 -1
  361. package/dist/assets/brainfuck.f0a9ac27.js +0 -1
  362. package/dist/assets/clike.6813c8af.js +0 -1
  363. package/dist/assets/clojure.282c98e9.js +0 -1
  364. package/dist/assets/cmake.3a19ac2e.js +0 -1
  365. package/dist/assets/cobol.1a968dc2.js +0 -1
  366. package/dist/assets/coffeescript.f4d04eff.js +0 -1
  367. package/dist/assets/commonlisp.b6ce4697.js +0 -1
  368. package/dist/assets/crystal.c82fbe0e.js +0 -1
  369. package/dist/assets/css.f5233cc9.js +0 -1
  370. package/dist/assets/cypher.039d2c7c.js +0 -4
  371. package/dist/assets/d.9a180f99.js +0 -1
  372. package/dist/assets/dart.6eb5ddde.js +0 -1
  373. package/dist/assets/de-DE.ae6e5ffb.js +0 -1
  374. package/dist/assets/diff.5b316696.js +0 -1
  375. package/dist/assets/display.4a967445.js +0 -1
  376. package/dist/assets/django.6c78c8f8.js +0 -1
  377. package/dist/assets/dockerfile.99dfeb4b.js +0 -1
  378. package/dist/assets/dtd.0634c33c.js +0 -1
  379. package/dist/assets/dylan.8694ba80.js +0 -1
  380. package/dist/assets/ebnf.462b292d.js +0 -1
  381. package/dist/assets/ecl.3dbd76a1.js +0 -1
  382. package/dist/assets/eiffel.4ec3277b.js +0 -1
  383. package/dist/assets/elm.04561af7.js +0 -1
  384. package/dist/assets/erlang.4826206d.js +0 -1
  385. package/dist/assets/es-419.582d398a.js +0 -1
  386. package/dist/assets/factor.bc3247f5.js +0 -1
  387. package/dist/assets/fcl.9f2d1e59.js +0 -1
  388. package/dist/assets/forth.bd08c7e3.js +0 -1
  389. package/dist/assets/fortran.2ae538b0.js +0 -1
  390. package/dist/assets/fr-FR.fa3f9dfa.js +0 -1
  391. package/dist/assets/gas.01960520.js +0 -1
  392. package/dist/assets/gfm.8e7c0694.js +0 -1
  393. package/dist/assets/gherkin.c6599791.js +0 -1
  394. package/dist/assets/go.f623c1d3.js +0 -1
  395. package/dist/assets/groovy.b5a3df5c.js +0 -1
  396. package/dist/assets/haml.6302e530.js +0 -1
  397. package/dist/assets/handlebars.698c31d7.js +0 -1
  398. package/dist/assets/haskell-literate.d3ee41f3.js +0 -1
  399. package/dist/assets/haskell.e4bd92a1.js +0 -1
  400. package/dist/assets/haxe.db74ea0a.js +0 -1
  401. package/dist/assets/htmlembedded.67d9d54e.js +0 -1
  402. package/dist/assets/htmlmixed.f95449b1.js +0 -1
  403. package/dist/assets/http.16e0eb29.js +0 -1
  404. package/dist/assets/hu-HU.ff4d97e1.js +0 -1
  405. package/dist/assets/idl.fb34fd03.js +0 -1
  406. package/dist/assets/index.4ce1e26c.js +0 -1
  407. package/dist/assets/index.90515a60.css +0 -1
  408. package/dist/assets/index.a36c94c4.js +0 -1
  409. package/dist/assets/it-IT.5db21711.js +0 -1
  410. package/dist/assets/javascript-hint.835011a8.js +0 -1
  411. package/dist/assets/javascript.098ad3f4.js +0 -1
  412. package/dist/assets/jinja2.5d6e4ebc.js +0 -1
  413. package/dist/assets/jsx.9e86f9c1.js +0 -1
  414. package/dist/assets/julia.3d7819b8.js +0 -1
  415. package/dist/assets/livescript.d3e3ffd7.js +0 -1
  416. package/dist/assets/lua.dcc90e1a.js +0 -1
  417. package/dist/assets/mark-selection.555804b8.js +0 -1
  418. package/dist/assets/match-highlighter.d280d567.js +0 -1
  419. package/dist/assets/mathematica.a4cf7905.js +0 -1
  420. package/dist/assets/mbox.0118ba5e.js +0 -1
  421. package/dist/assets/mirc.f16a416b.js +0 -1
  422. package/dist/assets/mllike.8af83228.js +0 -1
  423. package/dist/assets/modelica.fff0e69c.js +0 -1
  424. package/dist/assets/mscgen.4f351ed7.js +0 -1
  425. package/dist/assets/multiplex.24637d75.js +0 -3
  426. package/dist/assets/mumps.b29547a0.js +0 -1
  427. package/dist/assets/nginx.0b30c51b.js +0 -1
  428. package/dist/assets/nsis.931674c1.js +0 -1
  429. package/dist/assets/ntriples.b3ee92f7.js +0 -1
  430. package/dist/assets/octave.9fa134a4.js +0 -1
  431. package/dist/assets/overlay.7325085f.js +0 -1
  432. package/dist/assets/oz.418a19b3.js +0 -1
  433. package/dist/assets/pascal.abc2efea.js +0 -1
  434. package/dist/assets/pegjs.533a8931.js +0 -1
  435. package/dist/assets/perl.b0843cce.js +0 -1
  436. package/dist/assets/php.c4294507.js +0 -1
  437. package/dist/assets/pig.9e076d83.js +0 -1
  438. package/dist/assets/powershell.9163521a.js +0 -1
  439. package/dist/assets/properties.7389537c.js +0 -1
  440. package/dist/assets/protobuf.3ba8f801.js +0 -1
  441. package/dist/assets/pt-BR.c51763f3.js +0 -1
  442. package/dist/assets/pug.b98726b9.js +0 -1
  443. package/dist/assets/puppet.c2c7aecb.js +0 -1
  444. package/dist/assets/python.672ad786.js +0 -1
  445. package/dist/assets/q.58e35d92.js +0 -1
  446. package/dist/assets/r.86a12cf3.js +0 -1
  447. package/dist/assets/ro-RO.52802a17.js +0 -1
  448. package/dist/assets/rpm.057276c6.js +0 -1
  449. package/dist/assets/rst.3911d824.js +0 -1
  450. package/dist/assets/ruby.4ca30934.js +0 -1
  451. package/dist/assets/runtime-core.esm-bundler.fe249c5c.js +0 -4
  452. package/dist/assets/rust.f8f204a0.js +0 -1
  453. package/dist/assets/sas.b027b508.js +0 -1
  454. package/dist/assets/sass.6778645c.js +0 -1
  455. package/dist/assets/scheme.7d2fc5ef.js +0 -1
  456. package/dist/assets/shell.586a365e.js +0 -1
  457. package/dist/assets/show-hint.294aed89.js +0 -1
  458. package/dist/assets/sieve.76492164.js +0 -1
  459. package/dist/assets/slim.b75d75fc.js +0 -1
  460. package/dist/assets/smalltalk.c3811c1d.js +0 -1
  461. package/dist/assets/smarty.7ad51fee.js +0 -1
  462. package/dist/assets/solr.bc858702.js +0 -1
  463. package/dist/assets/soy.3523b082.js +0 -1
  464. package/dist/assets/sparql.23f67405.js +0 -1
  465. package/dist/assets/spreadsheet.fa0c4509.js +0 -1
  466. package/dist/assets/sql.e5dcae4e.js +0 -1
  467. package/dist/assets/stex.9edbeb3d.js +0 -1
  468. package/dist/assets/stylus.71868f10.js +0 -1
  469. package/dist/assets/swift.141c772a.js +0 -1
  470. package/dist/assets/tcl.e5b16da9.js +0 -1
  471. package/dist/assets/textile.0ba58239.js +0 -1
  472. package/dist/assets/tiddlywiki.cd3e074b.js +0 -1
  473. package/dist/assets/tiki.8884b81d.js +0 -1
  474. package/dist/assets/toml.0b104a38.js +0 -1
  475. package/dist/assets/tornado.ca0dd624.js +0 -1
  476. package/dist/assets/tr-TR.1dcfd6d4.js +0 -1
  477. package/dist/assets/translations.074feb87.js +0 -1
  478. package/dist/assets/troff.ceff2948.js +0 -1
  479. package/dist/assets/ttcn-cfg.20ce326a.js +0 -1
  480. package/dist/assets/ttcn.348a5af1.js +0 -1
  481. package/dist/assets/turtle.a74dd24d.js +0 -1
  482. package/dist/assets/twig.103f6c63.js +0 -1
  483. package/dist/assets/uk-UA.99a7a7a6.js +0 -1
  484. package/dist/assets/validation.cb080608.js +0 -1
  485. package/dist/assets/vb.9bd07f67.js +0 -1
  486. package/dist/assets/vbscript.f266487f.js +0 -1
  487. package/dist/assets/velocity.b63b2da2.js +0 -1
  488. package/dist/assets/verilog.94262bc9.js +0 -1
  489. package/dist/assets/vhdl.89bc6c80.js +0 -1
  490. package/dist/assets/vue-router.805cb517.entry.js +0 -5
  491. package/dist/assets/vue.c7dd8317.entry.js +0 -1
  492. package/dist/assets/vue.e839556b.js +0 -1
  493. package/dist/assets/vue.runtime.esm-bundler.eb605ed6.js +0 -1
  494. package/dist/assets/wast.077750a6.js +0 -1
  495. package/dist/assets/webidl.4f90cc6b.js +0 -1
  496. package/dist/assets/xquery.1f517ebf.js +0 -1
  497. package/dist/assets/yacas.5d349152.js +0 -1
  498. package/dist/assets/yaml-frontmatter.744c0030.js +0 -1
  499. package/dist/assets/yaml.41d6e7e9.js +0 -1
  500. package/dist/assets/z80.7e67c12c.js +0 -1
@@ -1,4 +1,4 @@
1
- import{a,o as r,b as h,w as t,l as s,E as e,e as i}from"./runtime-core.esm-bundler.fe249c5c.js";const d={class:"markdown-body"},p=s("hr",null,null,-1),u=s("h2",{id:"the-field-object",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#the-field-object"},"#"),e(" The Field Object")],-1),_=s("p",null,[s("code",null,"collection"),e(),s("strong",null,"string"),s("br"),e(" Name of the collection the field resides in.")],-1),f=s("p",null,[s("code",null,"field"),e(),s("strong",null,"string"),s("br"),e(" The identifier of the field. This matches the table column name.")],-1),j=s("code",null,"type",-1),g=s("strong",null,"string",-1),m=s("br",null,null,-1),y=s("h4",{id:"meta",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#meta"},"#"),e(" Meta")],-1),b=s("p",null,"Directus metadata, primarily used in the Admin App. Meta is optional.",-1),x=s("p",null,[s("code",null,"id"),e(),s("strong",null,"integer"),s("br"),e(" Primary key of the metadata row in "),s("code",null,"directus_fields"),e(".")],-1),q=s("p",null,[s("code",null,"collection"),e(),s("strong",null,"string"),s("br"),e(" The name of the collection this field resides in.")],-1),T=s("p",null,[s("code",null,"field"),e(),s("strong",null,"string"),s("br"),e(" Identifier of the field. Matches the column name in the database.")],-1),w=s("p",null,[s("code",null,"special"),e(),s("strong",null,"string"),s("br"),e(" Any special transform flags that apply to this field.")],-1),k=s("p",null,[s("code",null,"interface"),e(),s("strong",null,"string"),s("br"),e(" The interface used for this field.")],-1),v=s("p",null,[s("code",null,"options"),e(),s("strong",null,"object"),s("br"),e(" The interface options configured for this field. The structure is based on the interface used.")],-1),A=s("p",null,[s("code",null,"display"),e(),s("strong",null,"string"),s("br"),e(" The display used for this field.")],-1),E=s("p",null,[s("code",null,"display_options"),e(),s("strong",null,"string"),s("br"),e(" The configured options for the used display.")],-1),S=s("p",null,[s("code",null,"readonly"),e(),s("strong",null,"boolean"),s("br"),e(" If the field is considered readonly in the Admin App.")],-1),P=s("p",null,[s("code",null,"hidden"),e(),s("strong",null,"boolean"),s("br"),e(" If the field is hidden from the edit page in the Admin App.")],-1),R=s("p",null,[s("code",null,"sort"),e(),s("strong",null,"integer"),s("br"),e(" Where this field is shown on the edit page in the Admin App.")],-1),Q=s("p",null,[s("code",null,"width"),e(),s("strong",null,"string"),s("br"),e(" How wide the interface is rendered on the edit page in the Admin App. One of "),s("code",null,"half"),e(", "),s("code",null,"half-left"),e(", "),s("code",null,"half-right"),e(", "),s("code",null,"half-space"),e(", "),s("code",null,"full"),e(", "),s("code",null,"fill"),e(".")],-1),I=s("p",null,[s("code",null,"translations"),e(),s("strong",null,"array"),s("br"),e(" How this field\u2019s name is displayed in the different languages in the Admin App.")],-1),L=s("p",null,[s("code",null,"note"),e(),s("strong",null,"string"),s("br"),e(" Short description displayed in the Admin App.")],-1),F=s("h4",{id:"schema",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#schema"},"#"),e(" Schema")],-1),G=s("p",null,"\u201CRaw\u201D database information. Based on the database vendor used, different information might be returned. The following are available for all drivers. Note: schema is optional. If a field exist in directus_fields, but not in the database, it\u2019s an alias commonly used for relational (O2M) or presentation purposes in the Admin App.",-1),C=s("p",null,[s("code",null,"name"),e(),s("strong",null,"string"),s("br"),e(" Identifier of the field. Matches the column name in the database.")],-1),O=s("p",null,[s("code",null,"table"),e(),s("strong",null,"string"),s("br"),e(" Name of the table the column resides in.")],-1),D=s("p",null,[s("code",null,"data_type"),e(),s("strong",null,"string"),s("br"),e(" The datatype as used in the database. Note: this value is database vendor specific.")],-1),H=s("p",null,[s("code",null,"default_value"),e(),s("strong",null,"any"),s("br"),e(" The configured default value for the column.")],-1),M=s("p",null,[s("code",null,"max_length"),e(),s("strong",null,"integer"),s("br"),e(" Configured length for varchar type columns.")],-1),B=s("p",null,[s("code",null,"numeric_precision"),e(),s("strong",null,"integer"),s("br"),e(" Precision for integer/float/decimal type fields.")],-1),N=s("p",null,[s("code",null,"numeric_scale"),e(),s("strong",null,"integer"),s("br"),e(" Scale for integer/float/decimal type fields.")],-1),W=s("p",null,[s("code",null,"is_nullable"),e(),s("strong",null,"boolean"),s("br"),e(" Whether or not the column is nullable. This is what is used as the \u201Crequired\u201D state in Directus.")],-1),U=s("p",null,[s("code",null,"is_primary_key"),e(),s("strong",null,"boolean"),s("br"),e(" Whether or not the field is the primary key of the table.")],-1),V=s("p",null,[s("code",null,"foreign_key_column"),e(),s("strong",null,"string"),s("br"),e(" If the current column has a foreign key constraint, this points to the related column.")],-1),z=s("p",null,[s("code",null,"foreign_key_table"),e(),s("strong",null,"string"),s("br"),e(" If the current column has a foreign key constraint, this points to the related table.")],-1),J=s("p",null,[s("code",null,"comment"),e(),s("strong",null,"string"),s("br"),e(" Comment as stored in the database.")],-1),K=s("pre",null,[s("code",{class:"language-json"},[s("span",{class:"hljs-punctuation"},"{"),e(`
1
+ import{a,o as r,e as h,y as t,u as s,q as e,z as i}from"./runtime-core.esm-bundler.22ec0346.js";const d={class:"markdown-body"},p=s("hr",null,null,-1),u=s("h2",{id:"the-field-object",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#the-field-object"},"#"),e(" The Field Object")],-1),_=s("p",null,[s("code",null,"collection"),e(),s("strong",null,"string"),s("br"),e(" Name of the collection the field resides in.")],-1),f=s("p",null,[s("code",null,"field"),e(),s("strong",null,"string"),s("br"),e(" The identifier of the field. This matches the table column name.")],-1),j=s("code",null,"type",-1),g=s("strong",null,"string",-1),m=s("br",null,null,-1),y=s("h4",{id:"meta",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#meta"},"#"),e(" Meta")],-1),b=s("p",null,"Directus metadata, primarily used in the Admin App. Meta is optional.",-1),x=s("p",null,[s("code",null,"id"),e(),s("strong",null,"integer"),s("br"),e(" Primary key of the metadata row in "),s("code",null,"directus_fields"),e(".")],-1),q=s("p",null,[s("code",null,"collection"),e(),s("strong",null,"string"),s("br"),e(" The name of the collection this field resides in.")],-1),T=s("p",null,[s("code",null,"field"),e(),s("strong",null,"string"),s("br"),e(" Identifier of the field. Matches the column name in the database.")],-1),w=s("p",null,[s("code",null,"special"),e(),s("strong",null,"string"),s("br"),e(" Any special transform flags that apply to this field.")],-1),k=s("p",null,[s("code",null,"interface"),e(),s("strong",null,"string"),s("br"),e(" The interface used for this field.")],-1),v=s("p",null,[s("code",null,"options"),e(),s("strong",null,"object"),s("br"),e(" The interface options configured for this field. The structure is based on the interface used.")],-1),A=s("p",null,[s("code",null,"display"),e(),s("strong",null,"string"),s("br"),e(" The display used for this field.")],-1),E=s("p",null,[s("code",null,"display_options"),e(),s("strong",null,"string"),s("br"),e(" The configured options for the used display.")],-1),S=s("p",null,[s("code",null,"readonly"),e(),s("strong",null,"boolean"),s("br"),e(" If the field is considered readonly in the Admin App.")],-1),P=s("p",null,[s("code",null,"hidden"),e(),s("strong",null,"boolean"),s("br"),e(" If the field is hidden from the edit page in the Admin App.")],-1),R=s("p",null,[s("code",null,"sort"),e(),s("strong",null,"integer"),s("br"),e(" Where this field is shown on the edit page in the Admin App.")],-1),Q=s("p",null,[s("code",null,"width"),e(),s("strong",null,"string"),s("br"),e(" How wide the interface is rendered on the edit page in the Admin App. One of "),s("code",null,"half"),e(", "),s("code",null,"half-left"),e(", "),s("code",null,"half-right"),e(", "),s("code",null,"half-space"),e(", "),s("code",null,"full"),e(", "),s("code",null,"fill"),e(".")],-1),I=s("p",null,[s("code",null,"translations"),e(),s("strong",null,"array"),s("br"),e(" How this field\u2019s name is displayed in the different languages in the Admin App.")],-1),L=s("p",null,[s("code",null,"note"),e(),s("strong",null,"string"),s("br"),e(" Short description displayed in the Admin App.")],-1),F=s("h4",{id:"schema",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#schema"},"#"),e(" Schema")],-1),G=s("p",null,"\u201CRaw\u201D database information. Based on the database vendor used, different information might be returned. The following are available for all drivers. Note: schema is optional. If a field exist in directus_fields, but not in the database, it\u2019s an alias commonly used for relational (O2M) or presentation purposes in the Admin App.",-1),C=s("p",null,[s("code",null,"name"),e(),s("strong",null,"string"),s("br"),e(" Identifier of the field. Matches the column name in the database.")],-1),O=s("p",null,[s("code",null,"table"),e(),s("strong",null,"string"),s("br"),e(" Name of the table the column resides in.")],-1),D=s("p",null,[s("code",null,"data_type"),e(),s("strong",null,"string"),s("br"),e(" The datatype as used in the database. Note: this value is database vendor specific.")],-1),H=s("p",null,[s("code",null,"default_value"),e(),s("strong",null,"any"),s("br"),e(" The configured default value for the column.")],-1),M=s("p",null,[s("code",null,"max_length"),e(),s("strong",null,"integer"),s("br"),e(" Configured length for varchar type columns.")],-1),B=s("p",null,[s("code",null,"numeric_precision"),e(),s("strong",null,"integer"),s("br"),e(" Precision for integer/float/decimal type fields.")],-1),N=s("p",null,[s("code",null,"numeric_scale"),e(),s("strong",null,"integer"),s("br"),e(" Scale for integer/float/decimal type fields.")],-1),W=s("p",null,[s("code",null,"is_nullable"),e(),s("strong",null,"boolean"),s("br"),e(" Whether or not the column is nullable. This is what is used as the \u201Crequired\u201D state in Directus.")],-1),U=s("p",null,[s("code",null,"is_primary_key"),e(),s("strong",null,"boolean"),s("br"),e(" Whether or not the field is the primary key of the table.")],-1),V=s("p",null,[s("code",null,"foreign_key_column"),e(),s("strong",null,"string"),s("br"),e(" If the current column has a foreign key constraint, this points to the related column.")],-1),z=s("p",null,[s("code",null,"foreign_key_table"),e(),s("strong",null,"string"),s("br"),e(" If the current column has a foreign key constraint, this points to the related table.")],-1),J=s("p",null,[s("code",null,"comment"),e(),s("strong",null,"string"),s("br"),e(" Comment as stored in the database.")],-1),K=s("pre",null,[s("code",{class:"language-json"},[s("span",{class:"hljs-punctuation"},"{"),e(`
2
2
  `),s("span",{class:"hljs-attr"},'"collection"'),s("span",{class:"hljs-punctuation"},":"),e(),s("span",{class:"hljs-string"},'"articles"'),s("span",{class:"hljs-punctuation"},","),e(`
3
3
  `),s("span",{class:"hljs-attr"},'"field"'),s("span",{class:"hljs-punctuation"},":"),e(),s("span",{class:"hljs-string"},'"id"'),s("span",{class:"hljs-punctuation"},","),e(`
4
4
  `),s("span",{class:"hljs-attr"},'"type"'),s("span",{class:"hljs-punctuation"},":"),e(),s("span",{class:"hljs-string"},'"integer"'),s("span",{class:"hljs-punctuation"},","),e(`
@@ -1 +1 @@
1
- import{a as n,o as d,b as c,w as t,l as e,E as l,e as o}from"./runtime-core.esm-bundler.fe249c5c.js";const h={class:"markdown-body"},u=e("blockquote",null,[e("p",null,"The File Library Module aggregates all files within the Directus Project into one consolidated library. It is a full-featured Digital Asset Management (DAM) system for storing, organizing, browsing, and transforming your various files and assets.")],-1),p=e("p",null,[e("img",{src:"https://cdn.directus.io/docs/v9/app-guide/file-library/file-library-20220305A/file-library-20220307A.webp",alt:"File Library"})],-1),f={class:"warning hint"},m=e("div",{class:"hint-title"},"More Documents on Folder and File Management",-1),g=e("h2",{id:"how-it-works",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#how-it-works"},"#"),l(" How it Works")],-1),_={class:"tip hint"},y=e("div",{class:"hint-title"},"Required Knowledge",-1),b=e("a",{href:"#folders"},"Folder",-1),F=e("a",{href:"#files"},"Files",-1),v=e("em",null,"not just images",-1),w=e("a",{href:"#folders"},"File Listing Page",-1),k=e("video",{title:"How the File Library Works",autoplay:"",playsinline:"",muted:"",loop:"",controls:""},[e("source",{src:"https://cdn.directus.io/docs/v9/app-guide/file-library/file-library-20220305A/how-it-works-20220305A.mp4",type:"video/mp4"}),e("p",null,[l(" Your browser is not displaying the video for some reason. Here's a "),e("a",{href:""},"link to the video"),l(" instead. ")])],-1),A=e("ol",null,[e("li",null,[l("Select a Folder. There are two options: "),e("ul",null,[e("li",null,"Choose desired Folder from the Navigation Bar."),e("li",null,[l("Click "),e("span",{mi:"",btn:"",sec:""},"create_new_folder"),l(" in the Page Header, name your folder, and click "),e("strong",null,"\u201CSave\u201D"),l(".")])])]),e("li",null,[l("Click "),e("span",{mi:"",btn:""},"add"),l(" in the Page Header. A popover will appear.")]),e("li",null,[l("Upload your file. You have 3 options: "),e("ul",null,[e("li",null,"Drag a file from your desktop to the popup."),e("li",null,"Click the popup area to manually select a file from your device."),e("li",null,[l("Click "),e("span",{mi:"",icon:""},"more_vert"),l(" in the popover and choose "),e("strong",null,"\u201CImport from URL\u201D"),l(".")])])]),e("li",null,"Optional: Click the File Display to open the File Details Page and fill in information as desired.")],-1),C=e("h2",{id:"files",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#files"},"#"),l(" Files")],-1),T=e("p",null,[e("img",{src:"https://cdn.directus.io/docs/v9/app-guide/file-library/file-library-20220305A/files-20220305A.webp",alt:"Files"})],-1),D=e("h3",{id:"action-buttons",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#action-buttons"},"#"),l(" Action Buttons")],-1),L=e("p",null,"Notice the following Buttons in the Header:",-1),P=e("ul",null,[e("li",null,[e("span",{mi:"",btn:""},"check"),l(" \u2013 Saves any edits made to the file.")]),e("li",null,[e("span",{mi:"",btn:"",sec:""},"tune"),l(" \u2013 Please see "),e("a",{href:"#edit-an-image"},"Edit an Image"),l(" to learn more.")]),e("li",null,[e("span",{mi:"",btn:"",sec:""},"save_alt"),l(" \u2013 Downloads the file to your current device.")]),e("li",null,[e("span",{mi:"",btn:"",sec:""},"drive_file_move"),l(" \u2013 Moves selected File(s) to another Folder.")]),e("li",null,[e("span",{mi:"",btn:"",dngr:""},"delete"),l(" \u2013 Permanently removes the File and its metadata. This action is permanent and cannot be undone.")])],-1),I=e("div",{class:"tip hint"},[e("div",{class:"hint-title"},"Deleting Files Linked to Items"),e("p",null,[l("By default, Directus will not allow you to delete a File until you remove it from any and all related Items. However, this behavior can be reconfigured so that Files automatically update when the image is deleted by setting the relational constraint of your File Field to "),e("code",null,"SET NULL"),l(" or "),e("code",null,"CASCADE"),l(" when the File is deleted.")])],-1),x=e("h3",{id:"file-details",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#file-details"},"#"),l(" File Details")],-1),M=e("p",null,[l("The Files Collection comes pre-configured with the following Fields out of the box. New Fields can be created and customized as needed in "),e("strong",null,"Settings > Data Model"),l(". However the pre-configured Fields cannot be changed or deleted.")],-1),S=e("p",null,[e("img",{src:"https://cdn.directus.io/docs/v9/app-guide/file-library/file-library-20220305A/file-details-20220305A.webp",alt:"File Details"})],-1),E=e("ul",null,[e("li",null,[e("strong",null,"Preview"),l(" \u2013 A preview of the image or file.")]),e("li",null,[e("strong",null,"Title"),l(" \u2013 A title for the File.")]),e("li",null,[e("strong",null,"Description"),l(" \u2013 A description of the File.")]),e("li",null,[e("strong",null,"Tags"),l(" \u2013 Keywords used for search-ability.")]),e("li",null,[e("strong",null,"Location"),l(" \u2013 An optional location "),e("em",null,"(e.g. where a photo was taken)"),l(".")]),e("li",null,[e("strong",null,"Storage"),l(" \u2013 Which storage adapter is used to store the file asset.")]),e("li",null,[e("strong",null,"Filename (Disk)"),l(" \u2013 LOCKED. This is the actual name of the file in storage.")]),e("li",null,[e("strong",null,"Filename (Download)"),l(" \u2013 Allows you to set the name of the file when it is downloaded.")])],-1),U=e("h3",{id:"file-sidebar",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#file-sidebar"},"#"),l(" File Sidebar")],-1),H=e("p",null,"The file sidebar also includes the following details, which are not editable and serve as metadata.",-1),B=e("p",null,[e("img",{src:"https://cdn.directus.io/docs/v9/app-guide/file-library/file-library-20220305A/file-sidebar-20220305A.webp",alt:"File Sidebar"})],-1),N=e("ul",null,[e("li",null,[e("strong",null,"Type"),l(" \u2013 The MIME type of the file, displayed in the App as a formatted media type.")]),e("li",null,[e("strong",null,"Dimensions"),l(" \u2013 "),e("em",null,"Images only"),l(". The width and height of the image in pixels.")]),e("li",null,[e("strong",null,"Size"),l(" \u2013 The file-size the asset takes up in the storage adapter.")]),e("li",null,[e("strong",null,"Created"),l(" \u2013 The timestamp of when the file was uploaded to the Project.")]),e("li",null,[e("strong",null,"Owner"),l(" \u2013 The User that uploaded the file to the Project.")]),e("li",null,[e("strong",null,"Modified"),l(" \u2013 The timestamp of when the file was last modified.")]),e("li",null,[e("strong",null,"Edited By"),l(" \u2013 The User that modified the File.")]),e("li",null,[e("strong",null,"Folder"),l(" \u2013 The current parent folder that contains the File.")]),e("li",null,[e("strong",null,"Metadata"),l(" \u2013 Metadata JSON dump of the File\u2019s EXIF, IPTC, and ICC information.")])],-1),R=e("h2",{id:"edit-an-image",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#edit-an-image"},"#"),l(" Edit an Image")],-1),W=e("p",null,"Rotate, crop, flip, or adjust aspect ratios of an image.",-1),j=e("video",{alt:"Edit an Image",loop:"",muted:"",controls:"",autoplay:"",playsinline:""},[e("source",{src:"https://cdn.directus.io/docs/v9/app-guide/file-library/file-library-20220516A/edit-an-image-20220516A.mp4",type:"video/mp4"})],-1),z=e("ol",null,[e("li",null,[l("From the "),e("strong",null,"File Library"),l(", click a file to open its detail page.")]),e("li",null,[l("Click the "),e("span",{mi:"",btn:"",sec:""},"tune"),l(" button in the top right to open the image editor.")]),e("li",null,[l("Make your changes and click "),e("span",{mi:"",btn:""},"check"),l(" in the top right to save the updates.")])],-1),O=e("div",{class:"danger hint"},[e("div",{class:"hint-title"},"Irreversible Change"),e("p",null,"Edits overwrite the original file on disk. This can\u2019t be reversed.")],-1),K=e("h2",{id:"upload-a-file",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#upload-a-file"},"#"),l(" Upload a File")],-1),V=e("a",{href:"#how-it-works"},"How it Works",-1),Y=e("h2",{id:"replace-a-file",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#replace-a-file"},"#"),l(" Replace a File")],-1),q=e("p",null,"When a file is replaced, its existing info and all relationships are kept.",-1),J=e("video",{alt:"Replace a File",loop:"",muted:"",controls:"",autoplay:"",playsinline:""},[e("source",{src:"https://cdn.directus.io/docs/v9/app-guide/file-library/file-library-20220608A/replace-a-file-20220608A.mp4",type:"video/mp4"})],-1),X=e("ol",null,[e("li",null,"Click the Image Preview on the File Detail page. A popup will appear."),e("li",null,[l("Upload your file. You have 3 options: "),e("ul",null,[e("li",null,"Drag a file from your desktop to the popup."),e("li",null,"Click the popup area to manually select a file from your device."),e("li",null,[l("Click "),e("span",{mi:"",icon:""},"more_vert"),l(" in the popover and choose "),e("strong",null,"\u201CImport from URL\u201D"),l(".")])])])],-1),G=e("h2",{id:"folders",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#folders"},"#"),l(" Folders")],-1),Q=e("p",null,"Folders provide the organization system for Files.",-1),Z=e("p",null,[e("img",{src:"https://cdn.directus.io/docs/v9/app-guide/file-library/file-library-20220305A/folders-20220305A.webp",alt:"Folders"})],-1),$=e("h2",{id:"create-a-folder",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#create-a-folder"},"#"),l(" Create a Folder")],-1),ee=e("video",{alt:"Create a Folder",loop:"",muted:"",controls:"",autoplay:"",playsinline:""},[e("source",{src:"https://cdn.directus.io/docs/v9/app-guide/file-library/file-library-20220305A/create-a-folder-20220305A.mp4",type:"video/mp4"})],-1),le=e("ol",null,[e("li",null,[l("From the "),e("strong",null,"File Library"),l(", click on the "),e("span",{mi:"",btn:"",sec:""},"create_new_folder"),l(" button located in the Header.")]),e("li",null,"Fill in a Folder name as desired."),e("li",null,[l("Click "),e("strong",null,"\u201CSave\u201D"),l(".")])],-1),te=e("h2",{id:"rename-a-folder",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#rename-a-folder"},"#"),l(" Rename a Folder")],-1),ie=e("video",{alt:"Renaming a Folder",loop:"",muted:"",controls:"",autoplay:"",playsinline:""},[e("source",{src:"https://cdn.directus.io/docs/v9/app-guide/file-library/rename-a-folder-20220215A.mp4",type:"video/mp4"})],-1),oe=e("ol",null,[e("li",null,[l("From the "),e("strong",null,"File Library"),l(", right-click on the Folder you wish to rename and select \u201CRename Folder\u201D.")]),e("li",null,"Update the Folder name as desired."),e("li",null,[l("Click "),e("strong",null,"\u201CSave\u201D"),l(".")])],-1),ae=e("h2",{id:"move-a-folder",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#move-a-folder"},"#"),l(" Move a Folder")],-1),ne=e("video",{alt:"Moving a Folder",loop:"",muted:"",controls:"",autoplay:"",playsinline:""},[e("source",{src:"https://cdn.directus.io/docs/v9/app-guide/file-library/file-library-20220305A/move-a-folder20220305A.mp4",type:"video/mp4"})],-1),se=e("ol",null,[e("li",null,[l("From the "),e("strong",null,"File Library"),l(", right-click on the folder you wish to move and select "),e("strong",null,"\u201CMove to Folder\u201D"),l(". A popup will appear.")]),e("li",null,"Select a Folder to serve as the new Parent Folder."),e("li",null,[l("Click "),e("strong",null,"\u201CSave\u201D"),l(".")])],-1),re=e("h2",{id:"delete-a-folder",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#delete-a-folder"},"#"),l(" Delete a Folder")],-1),de=e("video",{alt:"Deleting a Folder",loop:"",muted:"",controls:"",autoplay:"",playsinline:""},[e("source",{src:"https://cdn.directus.io/docs/v9/app-guide/file-library/delete-a-folder-20220215A.mp4",type:"video/mp4"})],-1),ce=e("ol",null,[e("li",null,[l("From the "),e("strong",null,"File Library"),l(", right-click on the Folder you wish to delete and select "),e("strong",null,"\u201CDelete Folder\u201D"),l(".")]),e("li",null,[l("Click "),e("strong",null,"\u201CDelete\u201D"),l(".")])],-1),he=e("div",{class:"tip hint"},[e("p",null,"When you delete a Folder, any nested Files and Folders will be moved one level up.")],-1),ue=e("h2",{id:"more-help",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#more-help"},"#"),l(" More Help")],-1),pe=e("p",null,[l("Looking for technical support for your non-enterprise project? Chat with thousands of engineers within our growing "),e("a",{href:"https://discord.com/invite/directus",target:"_blank",rel:"noopener noreferrer"},"Community on Discord")],-1),ye="File Library",be=!1,Fe="The File Library Module aggregates all files within the Directus Project into one consolidated library.",ve="7 min read",we={__name:"file-library",setup(fe,{expose:s}){const a={title:"File Library",modularExtension:!1,description:"The File Library Module aggregates all files within the Directus Project into one consolidated library.",readTime:"7 min read"};return s({frontmatter:a}),(me,ge)=>{const i=n("router-link"),r=n("docs-wrapper");return d(),c(r,{frontmatter:a},{default:t(()=>[e("div",h,[u,p,e("div",f,[m,e("p",null,[l("This is a non-technical, no-code guide to the File Library Module. Please note there is documentation on programmatic "),o(i,{to:"/docs/reference/system/folders"},{default:t(()=>[l("Folder")]),_:1}),l(" and "),o(i,{to:"/docs/reference/files"},{default:t(()=>[l("File")]),_:1}),l(" management via the API.")])]),g,e("div",_,[y,e("p",null,[l("Familiarity with the "),o(i,{to:"/docs/app/content/collections"},{default:t(()=>[l("Collections Page")]),_:1}),l(" will be helpful but not necessary.")])]),e("p",null,[l("The File Library acts as one big "),b,l(" to store all uploaded "),F,l(". Sub-folders can be created within the File Library to help Files stay organized. Folders and File information are stored in regular Collections, which means "),o(i,{to:"/docs/configuration/users-roles-permissions.md"},{default:t(()=>[l("User and Role access permissions")]),_:1}),l(" are fully configurable and granular on both Folders and Files. Multiple files can be uploaded at once through the app and also programmatically via the API. Any type of file can be uploaded, "),v,l(". When a Folder is selected from the Navigation Bar, the "),w,l(" is presented. This page has all the same features and functionalities as the "),o(i,{to:"/docs/app/content/collections"},{default:t(()=>[l("Collections Page")]),_:1}),l(".")]),k,A,C,e("p",null,[l("When a file is clicked in the File Listing Page, the File Details Page appears. This is a custom form for viewing assets and embeds, with core Fields included out-of-the-box (see below), and the ability for Administrators to add additional custom Fields. This page has the same features and functionality as the "),o(i,{to:"/docs/getting-started/glossary#items"},{default:t(()=>[l("Item Page")]),_:1}),l(".")]),T,D,L,P,I,x,M,S,E,U,H,B,N,R,W,j,z,O,K,e("p",null,[l("We covered the File Library\u2019s three upload methods in "),V,l(". Keep in mind that files can also be added through different Interfaces as well. For example, Users can upload an Avatar image when they fill in their User Details. Similarly, Items with an Image Field will have a file upload Interface on the Item Detail page. Files can also be "),o(i,{to:"/docs/reference/files"},{default:t(()=>[l("uploaded programmatically via the API")]),_:1}),l(".")]),Y,q,J,X,G,Q,Z,e("p",null,[l("They can be named, renamed, and nested as sub-folders anywhere in the Folder hierarchy. Once a Folder is selected from the Navigation Bar, File Listing Page opens. The File Listing Page displays all Files within a Folder. It also enables all other features and functionalities from the "),o(i,{to:"/docs/app/content/collections"},{default:t(()=>[l("Collections Page")]),_:1}),l(" such as batch editing, batch deleting, sorting, filtering, searching, etc. Folders can also be managed "),o(i,{to:"/docs/reference/system/folders"},{default:t(()=>[l("programmatically via the API")]),_:1}),l(".")]),$,ee,le,te,ie,oe,ae,ne,se,re,de,ce,he,ue,pe])]),_:1})}}};export{we as default,Fe as description,be as modularExtension,ve as readTime,ye as title};
1
+ import{a as n,o as d,e as c,y as t,u as e,q as l,z as o}from"./runtime-core.esm-bundler.22ec0346.js";const h={class:"markdown-body"},u=e("blockquote",null,[e("p",null,"The File Library Module aggregates all files within the Directus Project into one consolidated library. It is a full-featured Digital Asset Management (DAM) system for storing, organizing, browsing, and transforming your various files and assets.")],-1),p=e("p",null,[e("img",{src:"https://cdn.directus.io/docs/v9/app-guide/file-library/file-library-20220305A/file-library-20220307A.webp",alt:"File Library"})],-1),f={class:"warning hint"},m=e("div",{class:"hint-title"},"More Documents on Folder and File Management",-1),g=e("h2",{id:"how-it-works",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#how-it-works"},"#"),l(" How it Works")],-1),_={class:"tip hint"},y=e("div",{class:"hint-title"},"Required Knowledge",-1),b=e("a",{href:"#folders"},"Folder",-1),F=e("a",{href:"#files"},"Files",-1),v=e("em",null,"not just images",-1),w=e("a",{href:"#folders"},"File Listing Page",-1),k=e("video",{title:"How the File Library Works",autoplay:"",playsinline:"",muted:"",loop:"",controls:""},[e("source",{src:"https://cdn.directus.io/docs/v9/app-guide/file-library/file-library-20220305A/how-it-works-20220305A.mp4",type:"video/mp4"}),e("p",null,[l(" Your browser is not displaying the video for some reason. Here's a "),e("a",{href:""},"link to the video"),l(" instead. ")])],-1),A=e("ol",null,[e("li",null,[l("Select a Folder. There are two options: "),e("ul",null,[e("li",null,"Choose desired Folder from the Navigation Bar."),e("li",null,[l("Click "),e("span",{mi:"",btn:"",sec:""},"create_new_folder"),l(" in the Page Header, name your folder, and click "),e("strong",null,"\u201CSave\u201D"),l(".")])])]),e("li",null,[l("Click "),e("span",{mi:"",btn:""},"add"),l(" in the Page Header. A popover will appear.")]),e("li",null,[l("Upload your file. You have 3 options: "),e("ul",null,[e("li",null,"Drag a file from your desktop to the popup."),e("li",null,"Click the popup area to manually select a file from your device."),e("li",null,[l("Click "),e("span",{mi:"",icon:""},"more_vert"),l(" in the popover and choose "),e("strong",null,"\u201CImport from URL\u201D"),l(".")])])]),e("li",null,"Optional: Click the File Display to open the File Details Page and fill in information as desired.")],-1),C=e("h2",{id:"files",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#files"},"#"),l(" Files")],-1),T=e("p",null,[e("img",{src:"https://cdn.directus.io/docs/v9/app-guide/file-library/file-library-20220305A/files-20220305A.webp",alt:"Files"})],-1),D=e("h3",{id:"action-buttons",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#action-buttons"},"#"),l(" Action Buttons")],-1),L=e("p",null,"Notice the following Buttons in the Header:",-1),P=e("ul",null,[e("li",null,[e("span",{mi:"",btn:""},"check"),l(" \u2013 Saves any edits made to the file.")]),e("li",null,[e("span",{mi:"",btn:"",sec:""},"tune"),l(" \u2013 Please see "),e("a",{href:"#edit-an-image"},"Edit an Image"),l(" to learn more.")]),e("li",null,[e("span",{mi:"",btn:"",sec:""},"save_alt"),l(" \u2013 Downloads the file to your current device.")]),e("li",null,[e("span",{mi:"",btn:"",sec:""},"drive_file_move"),l(" \u2013 Moves selected File(s) to another Folder.")]),e("li",null,[e("span",{mi:"",btn:"",dngr:""},"delete"),l(" \u2013 Permanently removes the File and its metadata. This action is permanent and cannot be undone.")])],-1),I=e("div",{class:"tip hint"},[e("div",{class:"hint-title"},"Deleting Files Linked to Items"),e("p",null,[l("By default, Directus will not allow you to delete a File until you remove it from any and all related Items. However, this behavior can be reconfigured so that Files automatically update when the image is deleted by setting the relational constraint of your File Field to "),e("code",null,"SET NULL"),l(" or "),e("code",null,"CASCADE"),l(" when the File is deleted.")])],-1),x=e("h3",{id:"file-details",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#file-details"},"#"),l(" File Details")],-1),M=e("p",null,[l("The Files Collection comes pre-configured with the following Fields out of the box. New Fields can be created and customized as needed in "),e("strong",null,"Settings > Data Model"),l(". However the pre-configured Fields cannot be changed or deleted.")],-1),S=e("p",null,[e("img",{src:"https://cdn.directus.io/docs/v9/app-guide/file-library/file-library-20220305A/file-details-20220305A.webp",alt:"File Details"})],-1),E=e("ul",null,[e("li",null,[e("strong",null,"Preview"),l(" \u2013 A preview of the image or file.")]),e("li",null,[e("strong",null,"Title"),l(" \u2013 A title for the File.")]),e("li",null,[e("strong",null,"Description"),l(" \u2013 A description of the File.")]),e("li",null,[e("strong",null,"Tags"),l(" \u2013 Keywords used for search-ability.")]),e("li",null,[e("strong",null,"Location"),l(" \u2013 An optional location "),e("em",null,"(e.g. where a photo was taken)"),l(".")]),e("li",null,[e("strong",null,"Storage"),l(" \u2013 Which storage adapter is used to store the file asset.")]),e("li",null,[e("strong",null,"Filename (Disk)"),l(" \u2013 LOCKED. This is the actual name of the file in storage.")]),e("li",null,[e("strong",null,"Filename (Download)"),l(" \u2013 Allows you to set the name of the file when it is downloaded.")])],-1),U=e("h3",{id:"file-sidebar",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#file-sidebar"},"#"),l(" File Sidebar")],-1),H=e("p",null,"The file sidebar also includes the following details, which are not editable and serve as metadata.",-1),B=e("p",null,[e("img",{src:"https://cdn.directus.io/docs/v9/app-guide/file-library/file-library-20220305A/file-sidebar-20220305A.webp",alt:"File Sidebar"})],-1),N=e("ul",null,[e("li",null,[e("strong",null,"Type"),l(" \u2013 The MIME type of the file, displayed in the App as a formatted media type.")]),e("li",null,[e("strong",null,"Dimensions"),l(" \u2013 "),e("em",null,"Images only"),l(". The width and height of the image in pixels.")]),e("li",null,[e("strong",null,"Size"),l(" \u2013 The file-size the asset takes up in the storage adapter.")]),e("li",null,[e("strong",null,"Created"),l(" \u2013 The timestamp of when the file was uploaded to the Project.")]),e("li",null,[e("strong",null,"Owner"),l(" \u2013 The User that uploaded the file to the Project.")]),e("li",null,[e("strong",null,"Modified"),l(" \u2013 The timestamp of when the file was last modified.")]),e("li",null,[e("strong",null,"Edited By"),l(" \u2013 The User that modified the File.")]),e("li",null,[e("strong",null,"Folder"),l(" \u2013 The current parent folder that contains the File.")]),e("li",null,[e("strong",null,"Metadata"),l(" \u2013 Metadata JSON dump of the File\u2019s EXIF, IPTC, and ICC information.")])],-1),R=e("h2",{id:"edit-an-image",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#edit-an-image"},"#"),l(" Edit an Image")],-1),W=e("p",null,"Rotate, crop, flip, or adjust aspect ratios of an image.",-1),j=e("video",{alt:"Edit an Image",loop:"",muted:"",controls:"",autoplay:"",playsinline:""},[e("source",{src:"https://cdn.directus.io/docs/v9/app-guide/file-library/file-library-20220516A/edit-an-image-20220516A.mp4",type:"video/mp4"})],-1),z=e("ol",null,[e("li",null,[l("From the "),e("strong",null,"File Library"),l(", click a file to open its detail page.")]),e("li",null,[l("Click the "),e("span",{mi:"",btn:"",sec:""},"tune"),l(" button in the top right to open the image editor.")]),e("li",null,[l("Make your changes and click "),e("span",{mi:"",btn:""},"check"),l(" in the top right to save the updates.")])],-1),O=e("div",{class:"danger hint"},[e("div",{class:"hint-title"},"Irreversible Change"),e("p",null,"Edits overwrite the original file on disk. This can\u2019t be reversed.")],-1),K=e("h2",{id:"upload-a-file",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#upload-a-file"},"#"),l(" Upload a File")],-1),q=e("a",{href:"#how-it-works"},"How it Works",-1),V=e("h2",{id:"replace-a-file",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#replace-a-file"},"#"),l(" Replace a File")],-1),Y=e("p",null,"When a file is replaced, its existing info and all relationships are kept.",-1),J=e("video",{alt:"Replace a File",loop:"",muted:"",controls:"",autoplay:"",playsinline:""},[e("source",{src:"https://cdn.directus.io/docs/v9/app-guide/file-library/file-library-20220608A/replace-a-file-20220608A.mp4",type:"video/mp4"})],-1),X=e("ol",null,[e("li",null,"Click the Image Preview on the File Detail page. A popup will appear."),e("li",null,[l("Upload your file. You have 3 options: "),e("ul",null,[e("li",null,"Drag a file from your desktop to the popup."),e("li",null,"Click the popup area to manually select a file from your device."),e("li",null,[l("Click "),e("span",{mi:"",icon:""},"more_vert"),l(" in the popover and choose "),e("strong",null,"\u201CImport from URL\u201D"),l(".")])])])],-1),G=e("h2",{id:"folders",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#folders"},"#"),l(" Folders")],-1),Q=e("p",null,"Folders provide the organization system for Files.",-1),Z=e("p",null,[e("img",{src:"https://cdn.directus.io/docs/v9/app-guide/file-library/file-library-20220305A/folders-20220305A.webp",alt:"Folders"})],-1),$=e("h2",{id:"create-a-folder",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#create-a-folder"},"#"),l(" Create a Folder")],-1),ee=e("video",{alt:"Create a Folder",loop:"",muted:"",controls:"",autoplay:"",playsinline:""},[e("source",{src:"https://cdn.directus.io/docs/v9/app-guide/file-library/file-library-20220305A/create-a-folder-20220305A.mp4",type:"video/mp4"})],-1),le=e("ol",null,[e("li",null,[l("From the "),e("strong",null,"File Library"),l(", click on the "),e("span",{mi:"",btn:"",sec:""},"create_new_folder"),l(" button located in the Header.")]),e("li",null,"Fill in a Folder name as desired."),e("li",null,[l("Click "),e("strong",null,"\u201CSave\u201D"),l(".")])],-1),te=e("h2",{id:"rename-a-folder",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#rename-a-folder"},"#"),l(" Rename a Folder")],-1),ie=e("video",{alt:"Renaming a Folder",loop:"",muted:"",controls:"",autoplay:"",playsinline:""},[e("source",{src:"https://cdn.directus.io/docs/v9/app-guide/file-library/rename-a-folder-20220215A.mp4",type:"video/mp4"})],-1),oe=e("ol",null,[e("li",null,[l("From the "),e("strong",null,"File Library"),l(", right-click on the Folder you wish to rename and select \u201CRename Folder\u201D.")]),e("li",null,"Update the Folder name as desired."),e("li",null,[l("Click "),e("strong",null,"\u201CSave\u201D"),l(".")])],-1),ae=e("h2",{id:"move-a-folder",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#move-a-folder"},"#"),l(" Move a Folder")],-1),ne=e("video",{alt:"Moving a Folder",loop:"",muted:"",controls:"",autoplay:"",playsinline:""},[e("source",{src:"https://cdn.directus.io/docs/v9/app-guide/file-library/file-library-20220305A/move-a-folder20220305A.mp4",type:"video/mp4"})],-1),se=e("ol",null,[e("li",null,[l("From the "),e("strong",null,"File Library"),l(", right-click on the folder you wish to move and select "),e("strong",null,"\u201CMove to Folder\u201D"),l(". A popup will appear.")]),e("li",null,"Select a Folder to serve as the new Parent Folder."),e("li",null,[l("Click "),e("strong",null,"\u201CSave\u201D"),l(".")])],-1),re=e("h2",{id:"delete-a-folder",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#delete-a-folder"},"#"),l(" Delete a Folder")],-1),de=e("video",{alt:"Deleting a Folder",loop:"",muted:"",controls:"",autoplay:"",playsinline:""},[e("source",{src:"https://cdn.directus.io/docs/v9/app-guide/file-library/delete-a-folder-20220215A.mp4",type:"video/mp4"})],-1),ce=e("ol",null,[e("li",null,[l("From the "),e("strong",null,"File Library"),l(", right-click on the Folder you wish to delete and select "),e("strong",null,"\u201CDelete Folder\u201D"),l(".")]),e("li",null,[l("Click "),e("strong",null,"\u201CDelete\u201D"),l(".")])],-1),he=e("div",{class:"tip hint"},[e("p",null,"When you delete a Folder, any nested Files and Folders will be moved one level up.")],-1),ue=e("h2",{id:"more-help",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#more-help"},"#"),l(" More Help")],-1),pe=e("p",null,[l("Looking for technical support for your non-enterprise project? Chat with thousands of engineers within our growing "),e("a",{href:"https://discord.com/invite/directus",target:"_blank",rel:"noopener noreferrer"},"Community on Discord")],-1),ye="File Library",be=!1,Fe="The File Library Module aggregates all files within the Directus Project into one consolidated library.",ve="7 min read",we={__name:"file-library",setup(fe,{expose:s}){const a={title:"File Library",modularExtension:!1,description:"The File Library Module aggregates all files within the Directus Project into one consolidated library.",readTime:"7 min read"};return s({frontmatter:a}),(me,ge)=>{const i=n("router-link"),r=n("docs-wrapper");return d(),c(r,{frontmatter:a},{default:t(()=>[e("div",h,[u,p,e("div",f,[m,e("p",null,[l("This is a non-technical, no-code guide to the File Library Module. Please note there is documentation on programmatic "),o(i,{to:"/docs/reference/system/folders"},{default:t(()=>[l("Folder")]),_:1}),l(" and "),o(i,{to:"/docs/reference/files"},{default:t(()=>[l("File")]),_:1}),l(" management via the API.")])]),g,e("div",_,[y,e("p",null,[l("Familiarity with the "),o(i,{to:"/docs/app/content/collections"},{default:t(()=>[l("Collections Page")]),_:1}),l(" will be helpful but not necessary.")])]),e("p",null,[l("The File Library acts as one big "),b,l(" to store all uploaded "),F,l(". Sub-folders can be created within the File Library to help Files stay organized. Folders and File information are stored in regular Collections, which means "),o(i,{to:"/docs/configuration/users-roles-permissions.md"},{default:t(()=>[l("User and Role access permissions")]),_:1}),l(" are fully configurable and granular on both Folders and Files. Multiple files can be uploaded at once through the app and also programmatically via the API. Any type of file can be uploaded, "),v,l(". When a Folder is selected from the Navigation Bar, the "),w,l(" is presented. This page has all the same features and functionalities as the "),o(i,{to:"/docs/app/content/collections"},{default:t(()=>[l("Collections Page")]),_:1}),l(".")]),k,A,C,e("p",null,[l("When a file is clicked in the File Listing Page, the File Details Page appears. This is a custom form for viewing assets and embeds, with core Fields included out-of-the-box (see below), and the ability for Administrators to add additional custom Fields. This page has the same features and functionality as the "),o(i,{to:"/docs/getting-started/glossary#items"},{default:t(()=>[l("Item Page")]),_:1}),l(".")]),T,D,L,P,I,x,M,S,E,U,H,B,N,R,W,j,z,O,K,e("p",null,[l("We covered the File Library\u2019s three upload methods in "),q,l(". Keep in mind that files can also be added through different Interfaces as well. For example, Users can upload an Avatar image when they fill in their User Details. Similarly, Items with an Image Field will have a file upload Interface on the Item Detail page. Files can also be "),o(i,{to:"/docs/reference/files"},{default:t(()=>[l("uploaded programmatically via the API")]),_:1}),l(".")]),V,Y,J,X,G,Q,Z,e("p",null,[l("They can be named, renamed, and nested as sub-folders anywhere in the Folder hierarchy. Once a Folder is selected from the Navigation Bar, File Listing Page opens. The File Listing Page displays all Files within a Folder. It also enables all other features and functionalities from the "),o(i,{to:"/docs/app/content/collections"},{default:t(()=>[l("Collections Page")]),_:1}),l(" such as batch editing, batch deleting, sorting, filtering, searching, etc. Folders can also be managed "),o(i,{to:"/docs/reference/system/folders"},{default:t(()=>[l("programmatically via the API")]),_:1}),l(".")]),$,ee,le,te,ie,oe,ae,ne,se,re,de,ce,he,ue,pe])]),_:1})}}};export{we as default,Fe as description,be as modularExtension,ve as readTime,ye as title};
@@ -1,4 +1,4 @@
1
- import{a as o,o as c,b as h,w as a,l as s,E as e,e as n}from"./runtime-core.esm-bundler.fe249c5c.js";const d={class:"markdown-body"},u=s("blockquote",null,[s("p",null,[e("Every file managed by the platform is uploaded to the configured storage adapter, and its associated metadata is tracked within the "),s("code",null,"directus_files"),e(" system collection. Any requested file transformations are handled on the fly, and are only saved to storage.")])],-1),p=s("hr",null,null,-1),_=s("h2",{id:"accessing-a-file",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#accessing-a-file"},"#"),e(" Accessing a File")],-1),f=s("p",null,"The location of your actual file originals is based on the project\u2019s configuration, but you can consistently access them via the API using the following URL.",-1),m=s("pre",null,[s("code",{class:"language-txt"},`example.com/assets/<file-id>
1
+ import{a as o,o as c,e as h,y as a,u as s,q as e,z as n}from"./runtime-core.esm-bundler.22ec0346.js";const d={class:"markdown-body"},u=s("blockquote",null,[s("p",null,[e("Every file managed by the platform is uploaded to the configured storage adapter, and its associated metadata is tracked within the "),s("code",null,"directus_files"),e(" system collection. Any requested file transformations are handled on the fly, and are only saved to storage.")])],-1),p=s("hr",null,null,-1),_=s("h2",{id:"accessing-a-file",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#accessing-a-file"},"#"),e(" Accessing a File")],-1),f=s("p",null,"The location of your actual file originals is based on the project\u2019s configuration, but you can consistently access them via the API using the following URL.",-1),m=s("pre",null,[s("code",{class:"language-txt"},`example.com/assets/<file-id>
2
2
  example.com/assets/1ac73658-8b62-4dea-b6da-529fbc9d01a4
3
3
  `)],-1),g=s("div",{class:"tip hint"},[s("div",{class:"hint-title"},"SEO"),s("p",null,"You can provide an optional filename after the UUID to optimize for SEO, for example:"),s("pre",null,[s("code",{class:"language-txt"},`example.com/assets/<file-id>/<filename>
4
4
  example.com/assets/1ac73658-8b62-4dea-b6da-529fbc9d01a4/directus-logo.png
@@ -69,7 +69,7 @@ SEARCH /files
69
69
  filename_disk
70
70
  }
71
71
  }
72
- `)])],-1),Ns=s("h2",{id:"upload-a-file",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#upload-a-file"},"#"),e(" Upload a File")],-1),Zs=s("p",null,"Upload/create a new file.",-1),Hs=s("p",null,[e("To upload a file, use "),s("code",null,"multipart/form-data"),e(" as the encoding type, instead of JSON.")],-1),Ws=s("p",null,[e("The file contents has to be provided in a part called "),s("code",null,"file"),e(". All other properties of "),s("a",{href:"#the-file-object"},"the file object"),e(" can be provided as parts as well, except "),s("code",null,"filename_disk"),e(" and "),s("code",null,"filename_download"),e(".")],-1),Ks=s("div",{class:"tip hint"},[s("div",{class:"hint-title"},"Order Matters"),s("p",null,[e("Make sure to define the non-file properties "),s("em",null,"first"),e(". This ensures that the file metadata is associated with the correct file.")])],-1),Js=s("p",null,"You can upload multiple files at a time by repeating the payload with different contents, for example:",-1),Vs=s("pre",null,[s("code",null,`--__X_BOUNDARY__
72
+ `)])],-1),Ns=s("h2",{id:"upload-a-file",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#upload-a-file"},"#"),e(" Upload a File")],-1),Zs=s("p",null,"Upload/create a new file.",-1),Hs=s("p",null,[e("To upload a file, use "),s("code",null,"multipart/form-data"),e(" as the encoding type. The file contents has to be provided in a part called "),s("code",null,"file"),e(". All other properties of "),s("a",{href:"#the-file-object"},"the file object"),e(" can be provided as parts as well, except "),s("code",null,"filename_disk"),e(" and "),s("code",null,"filename_download"),e(".")],-1),Ws=s("p",null,[e("Alternatively, you can use "),s("code",null,"application/json"),e(" with JSON request body to associate metadata to a file that already exists in the storage. The "),s("code",null,"type"),e(" property will be required to specify the mimetype of that file.")],-1),Ks=s("div",{class:"tip hint"},[s("div",{class:"hint-title"},"Order Matters"),s("p",null,[e("Make sure to define the non-file properties "),s("em",null,"first"),e(". This ensures that the file metadata is associated with the correct file.")])],-1),Js=s("p",null,"You can upload multiple files at a time by repeating the payload with different contents, for example:",-1),Vs=s("pre",null,[s("code",null,`--__X_BOUNDARY__
73
73
  Content-Disposition: form-data; name="title"
74
74
 
75
75
  Example
@@ -1,4 +1,4 @@
1
- import{a as l,o as c,b as i,w as a,l as t,E as n,e as r}from"./runtime-core.esm-bundler.fe249c5c.js";const p={class:"markdown-body"},h=t("blockquote",null,[t("p",null,[n("Permissions, validation, and the API\u2019s "),t("code",null,"filter"),n(" parameter all rely on a specific JSON structure to define their rules. This page describes the syntax for creating flat, relational, or complex filter rules.")])],-1),d=t("h2",{id:"syntax",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#syntax"},"#"),n(" Syntax")],-1),j=t("ul",null,[t("li",null,[t("strong",null,"Field"),n(" \u2014 Any valid root field, "),t("a",{href:"#relational"},"relational field"),n(", or "),t("a",{href:"#logical-operators"},"logical operator")]),t("li",null,[t("strong",null,"Operator"),n(" \u2014 Any valid "),t("a",{href:"#filter-operators"},"filter operator")]),t("li",null,[t("strong",null,"Value"),n(" \u2014 Any valid static value, or "),t("a",{href:"#dynamic-variables"},"dynamic variable")])],-1),_=t("pre",null,[t("code",null,`{
1
+ import{a as l,o as c,e as i,y as a,u as t,q as n,z as r}from"./runtime-core.esm-bundler.22ec0346.js";const p={class:"markdown-body"},h=t("blockquote",null,[t("p",null,[n("Permissions, validation, and the API\u2019s "),t("code",null,"filter"),n(" parameter all rely on a specific JSON structure to define their rules. This page describes the syntax for creating flat, relational, or complex filter rules.")])],-1),d=t("h2",{id:"syntax",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#syntax"},"#"),n(" Syntax")],-1),j=t("ul",null,[t("li",null,[t("strong",null,"Field"),n(" \u2014 Any valid root field, "),t("a",{href:"#relational"},"relational field"),n(", or "),t("a",{href:"#logical-operators"},"logical operator")]),t("li",null,[t("strong",null,"Operator"),n(" \u2014 Any valid "),t("a",{href:"#filter-operators"},"filter operator")]),t("li",null,[t("strong",null,"Value"),n(" \u2014 Any valid static value, or "),t("a",{href:"#dynamic-variables"},"dynamic variable")])],-1),_=t("pre",null,[t("code",null,`{
2
2
  <field>: {
3
3
  <operator>: <value>
4
4
  }
@@ -25,7 +25,7 @@ import{a as l,o as c,b as i,w as a,l as t,E as n,e as r}from"./runtime-core.esm-
25
25
  `),t("span",{class:"hljs-punctuation"},"}"),n(`
26
26
  `),t("span",{class:"hljs-punctuation"},"}"),n(`
27
27
  `),t("span",{class:"hljs-punctuation"},"}"),n(`
28
- `)])],-1),N=t("p",null,[n("When using M2M relationships, a junction table will be created and the filter applies to the junction table itself. For example, if you have a "),t("code",null,"books"),n(" collection, with a M2M relationship to authors of each book, the junction collection will probably be named "),t("code",null,"books_authors"),n(" and have 3 fields : "),t("code",null,"id"),n(", "),t("code",null,"books_id"),n(" and "),t("code",null,"authors_id"),n(". To filter specific books depending on their authors you must go through the junction table and the "),t("code",null,"authors_id"),n(" field :")],-1),O=t("pre",null,[t("code",{class:"language-json"},[t("span",{class:"hljs-punctuation"},"{"),n(`
28
+ `)])],-1),N=t("p",null,[n("When using M2M relationships, a junction table will be created and the filter applies to the junction table itself. For example, if you have a "),t("code",null,"books"),n(" collection, with a M2M relationship to authors of each book, the junction collection will probably be named "),t("code",null,"books_authors"),n(" and have 3 fields : "),t("code",null,"id"),n(", "),t("code",null,"books_id"),n(" and "),t("code",null,"authors_id"),n(". To filter specific books depending on their authors you must go through the junction table and the "),t("code",null,"authors_id"),n(" field :")],-1),q=t("pre",null,[t("code",{class:"language-json"},[t("span",{class:"hljs-punctuation"},"{"),n(`
29
29
  `),t("span",{class:"hljs-attr"},'"authors"'),t("span",{class:"hljs-punctuation"},":"),n(),t("span",{class:"hljs-punctuation"},"{"),n(`
30
30
  `),t("span",{class:"hljs-attr"},'"authors_id"'),t("span",{class:"hljs-punctuation"},":"),n(),t("span",{class:"hljs-punctuation"},"{"),n(`
31
31
  `),t("span",{class:"hljs-attr"},'"name"'),t("span",{class:"hljs-punctuation"},":"),n(),t("span",{class:"hljs-punctuation"},"{"),n(`
@@ -34,7 +34,7 @@ import{a as l,o as c,b as i,w as a,l as t,E as n,e as r}from"./runtime-core.esm-
34
34
  `),t("span",{class:"hljs-punctuation"},"}"),n(`
35
35
  `),t("span",{class:"hljs-punctuation"},"}"),n(`
36
36
  `),t("span",{class:"hljs-punctuation"},"}"),n(`
37
- `)])],-1),q=t("h2",{id:"logical-operators",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#logical-operators"},"#"),n(" Logical Operators")],-1),D=t("p",null,[n("You can nest or group multiple rules using the "),t("code",null,"_and"),n(" or "),t("code",null,"_or"),n(" logical operators. Each logical operator holds an array of Filter Rules, allowing for more complex filtering. Also note in the example that Logical Operators can be sub-nested into Logical Operators. However, they cannot be sub-nested into Filter Rules.")],-1),k=t("pre",null,[t("code",{class:"language-json"},[t("span",{class:"hljs-punctuation"},"{"),n(`
37
+ `)])],-1),O=t("h2",{id:"logical-operators",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#logical-operators"},"#"),n(" Logical Operators")],-1),D=t("p",null,[n("You can nest or group multiple rules using the "),t("code",null,"_and"),n(" or "),t("code",null,"_or"),n(" logical operators. Each logical operator holds an array of Filter Rules, allowing for more complex filtering. Also note in the example that Logical Operators can be sub-nested into Logical Operators. However, they cannot be sub-nested into Filter Rules.")],-1),k=t("pre",null,[t("code",{class:"language-json"},[t("span",{class:"hljs-punctuation"},"{"),n(`
38
38
  `),t("span",{class:"hljs-attr"},'"_or"'),t("span",{class:"hljs-punctuation"},":"),n(),t("span",{class:"hljs-punctuation"},"["),n(`
39
39
  `),t("span",{class:"hljs-punctuation"},"{"),n(`
40
40
  `),t("span",{class:"hljs-attr"},'"_and"'),t("span",{class:"hljs-punctuation"},":"),n(),t("span",{class:"hljs-punctuation"},"["),n(`
@@ -82,4 +82,4 @@ import{a as l,o as c,b as i,w as a,l as t,E as n,e as r}from"./runtime-core.esm-
82
82
  `),t("span",{class:"hljs-punctuation"},"}"),n(`
83
83
  `),t("span",{class:"hljs-punctuation"},"}"),n(`
84
84
  `),t("span",{class:"hljs-punctuation"},"}"),n(`
85
- `)])],-1),L=t("p",null,"will fetch all parent items that don\u2019t have the category \u201CRecipe\u201D",-1),V=t("h2",{id:"dynamic-variables",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#dynamic-variables"},"#"),n(" Dynamic Variables")],-1),M=t("p",null,[n("In addition to static values, you can also filter against "),t("em",null,"dynamic"),n(" values using the following variables.")],-1),W=t("ul",null,[t("li",null,[t("code",null,"$CURRENT_USER"),n(" \u2014 The primary key of the currently authenticated user")]),t("li",null,[t("code",null,"$CURRENT_ROLE"),n(" \u2014 The primary key of the role for the currently authenticated user")]),t("li",null,[t("code",null,"$NOW"),n(" \u2014 The current timestamp")]),t("li",null,[t("code",null,"$NOW(<adjustment>)"),n(" - The current timestamp plus/minus a given distance, for example "),t("code",null,"$NOW(-1 year)"),n(", "),t("code",null,"$NOW(+2 hours)")])],-1),A={class:"tip hint"},G=t("div",{class:"hint-title"},"Functions",-1),P=t("div",{class:"tip hint"},[t("div",{class:"hint-title"},"Nested User / Role variables in Permissions"),t("p",null,[n("When configuring permissions, "),t("code",null,"$CURRENT_USER"),n(" and "),t("code",null,"$CURRENT_ROLE"),n(" allow you to specify any (nested) field under the current user/role as well as the root ID. For example: "),t("code",null,"$CURRENT_ROLE.name"),n(" or "),t("code",null,"$CURRENT_USER.avatar.filesize"),n(". This includes custom fields that were added to the directus_users/directus_roles tables.")]),t("p",null,"Note: This feature is only available for permissions, validation, and presets. Regular filters and conditional fields currently only support the root ID.")],-1),Z="Filter Rules",z=!1,H="REST and GraphQL API documentation for filter rules in Directus.",K="5 min read",X={__name:"filter-rules",setup(B,{expose:e}){const s={title:"Filter Rules",modularExtension:!1,description:"REST and GraphQL API documentation for filter rules in Directus.",readTime:"5 min read"};return e({frontmatter:s}),(Y,J)=>{const u=l("router-link"),o=l("docs-wrapper");return c(),i(o,{frontmatter:s},{default:a(()=>[t("div",p,[h,d,j,_,f,m,g,b,y,v,R,w,x,E,T,I,N,O,q,D,k,U,F,S,$,C,L,V,M,W,t("div",A,[G,t("p",null,[n("You can also use "),r(u,{to:"/docs/reference/query#functions"},{default:a(()=>[n("Function Parameters")]),_:1}),n(" when building Filters.")])]),P])]),_:1})}}};export{X as default,H as description,z as modularExtension,K as readTime,Z as title};
85
+ `)])],-1),L=t("p",null,"will fetch all parent items that don\u2019t have the category \u201CRecipe\u201D",-1),V=t("h2",{id:"dynamic-variables",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#dynamic-variables"},"#"),n(" Dynamic Variables")],-1),M=t("p",null,[n("In addition to static values, you can also filter against "),t("em",null,"dynamic"),n(" values using the following variables.")],-1),W=t("ul",null,[t("li",null,[t("code",null,"$CURRENT_USER"),n(" \u2014 The primary key of the currently authenticated user")]),t("li",null,[t("code",null,"$CURRENT_ROLE"),n(" \u2014 The primary key of the role for the currently authenticated user")]),t("li",null,[t("code",null,"$NOW"),n(" \u2014 The current timestamp")]),t("li",null,[t("code",null,"$NOW(<adjustment>)"),n(" - The current timestamp plus/minus a given distance, for example "),t("code",null,"$NOW(-1 year)"),n(", "),t("code",null,"$NOW(+2 hours)")])],-1),A={class:"tip hint"},G=t("div",{class:"hint-title"},"Functions",-1),P=t("div",{class:"tip hint"},[t("div",{class:"hint-title"},"Nested User / Role variables in Permissions"),t("p",null,[n("When configuring permissions, "),t("code",null,"$CURRENT_USER"),n(" and "),t("code",null,"$CURRENT_ROLE"),n(" allow you to specify any (nested) field under the current user/role as well as the root ID. For example: "),t("code",null,"$CURRENT_ROLE.name"),n(" or "),t("code",null,"$CURRENT_USER.avatar.filesize"),n(". This includes custom fields that were added to the directus_users/directus_roles tables.")]),t("p",null,"Note: This feature is only available for permissions, validation, and presets. Regular filters and conditional fields currently only support the root ID.")],-1),Q="Filter Rules",Z=!1,H="REST and GraphQL API documentation for filter rules in Directus.",K="5 min read",X={__name:"filter-rules",setup(B,{expose:e}){const s={title:"Filter Rules",modularExtension:!1,description:"REST and GraphQL API documentation for filter rules in Directus.",readTime:"5 min read"};return e({frontmatter:s}),(Y,z)=>{const u=l("router-link"),o=l("docs-wrapper");return c(),i(o,{frontmatter:s},{default:a(()=>[t("div",p,[h,d,j,_,f,m,g,b,y,v,R,w,x,E,T,I,N,q,O,D,k,U,F,S,$,C,L,V,M,W,t("div",A,[G,t("p",null,[n("You can also use "),r(u,{to:"/docs/reference/query#functions"},{default:a(()=>[n("Function Parameters")]),_:1}),n(" when building Filters.")])]),P])]),_:1})}}};export{X as default,H as description,Z as modularExtension,K as readTime,Q as title};
@@ -1 +1 @@
1
- import{a as n,o as d,b as c,w as o,l as e,E as t,e as i}from"./runtime-core.esm-bundler.fe249c5c.js";const u={class:"markdown-body"},h=e("blockquote",null,[e("p",null,"Filters allow you to conditionally select Items from a Collection. Use-cases include customizing Item search results, restricting Item access permissions for specific Users or Roles, building dashboard analytics with the Insights module, and more.")],-1),p=e("p",null,[e("img",{src:"https://cdn.directus.io/docs/v9/app-guide/filters/filters-20220303A/filters-20220303A.webp",alt:"Filters"})],-1),f={class:"warning hint"},m=e("div",{class:"hint-title"},"There Are Two Filters Documents",-1),_=e("h2",{id:"how-it-works",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#how-it-works"},"#"),t(" How it Works")],-1),g={class:"tip hint"},y=e("div",{class:"hint-title"},"Assumed Knowledge",-1),b=e("strong",null,"Field",-1),w=e("strong",null,"Value",-1),F=e("video",{autoplay:"",playsinline:"",muted:"",loop:"",controls:"",title:"How Filters Work"},[e("source",{src:"https://cdn.directus.io/docs/v9/app-guide/filters/filters-20220303A/how-filters-work-20220303A.mp4",type:"video/mp4"})],-1),v=e("ol",{start:"2"},[e("li",null,[t("Click "),e("span",{mi:"",icon:""},"filter_list"),t(" or "),e("strong",null,"\u201CAdd Filter\u201D"),t(".")]),e("li",null,"Select the Field to filter by."),e("li",null,"Select the Operator as desired."),e("li",null,"Define the Value to filter for.")],-1),C=e("p",null,[t("From here, you can set multiple Filters at once, filter by "),e("a",{href:"#filtering-by-related-collections"},"Fields in related Collections"),t(", set Values with "),e("a",{href:"#dynamic-variables"},"Dynamic Variables"),t(", as well as apply "),e("a",{href:"#and-or-groups"},"AND/OR Groups"),t(".")],-1),A={class:"tip hint"},k=e("div",{class:"hint-title"},"Operators",-1),x=e("a",{href:"#unfilterable-fields"},"Unfilterable Fields",-1),R=e("h2",{id:"and%2For-groups",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#and%2For-groups"},"#"),t(" AND/OR Groups")],-1),O=e("p",null,[e("code",null,"AND"),t(" Groups give the option to filter for Items that meet "),e("em",null,"all of several criteria"),t(". On the other hand, "),e("code",null,"OR"),t(" Groups filter for Items that meet "),e("em",null,"any one of several criteria"),t(".")],-1),I=e("p",null,[e("img",{src:"https://cdn.directus.io/docs/v9/app-guide/filters/filters-20220303A/and-or-groups-20220303A.webp",alt:"AND/OR Groups"})],-1),D=e("ol",null,[e("li",null,"Click \u201CAdd Filter\u201D."),e("li",null,"Click \u201CAnd/OR Group\u201D at the very top of the dropdown menu."),e("li",null,[t("Click the AND/OR text to toggle: "),e("ul",null,[e("li",null,[e("code",null,"AND"),t(" \u2013 Selects Items that meet every single criteria.")]),e("li",null,[e("code",null,"OR"),t(" \u2013 Selects Items that meet one of several criteria.")])])]),e("li",null,"Click \u201CAdd Filter\u201D again."),e("li",null,"Configure the Field, Operator, and Value as desired."),e("li",null,[t("Click and hold "),e("span",{mi:"",icon:""},"drag_indicator"),t(" to drag a Filter and nest it under an AND/OR Group.")])],-1),N=e("div",{class:"tip hint"},[e("div",{class:"hint-title"},"Why do we need AND Groups?"),e("p",null,[t("Filters actually default to "),e("code",null,"AND"),t(" Group behavior automatically. However, when Filters are nested inside of an OR Group, they of course switch to "),e("code",null,"OR"),t(" Group behavior. So an AND Group is necessary in cases where you want to meet multiple conditions inside of OR Groups.")])],-1),G=e("h2",{id:"dynamic-variables",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#dynamic-variables"},"#"),t(" Dynamic Variables")],-1),T=e("p",null,"The following video shows how to filter for Blog posts written within the past 60 days.",-1),U=e("video",{autoplay:"",playsinline:"",muted:"",loop:"",controls:"",title:"How Filters Work"},[e("source",{src:"https://cdn.directus.io/docs/v9/app-guide/filters/filters-20220303A/dynamic-variables-20220307A.mp4",type:"video/mp4"})],-1),E=e("code",null,"$CURRENT_USER",-1),V=e("code",null,"$CURRENT_ROLE",-1),H=e("code",null,"$NOW",-1),S=e("code",null,"$NOW(<adjustment>)",-1),W=e("h2",{id:"filtering-by-related-collections",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#filtering-by-related-collections"},"#"),t(" Filtering by Related Collections")],-1),B=e("p",null,[t("You may need to run filters on one Collection "),e("em",null,"based on information in another related Collection"),t(". Here are a few examples of when that might happen:")],-1),$=e("ul",null,[e("li",null,[t("Book authors that also wrote screenplays (filters "),e("code",null,"authors"),t(", uses "),e("code",null,"screenplays"),t(").")]),e("li",null,[t("Products with a 5 star customer review (filters "),e("code",null,"products"),t(", uses "),e("code",null,"reviews"),t(").")]),e("li",null,[t("Accounts with active user login within the last 12 months (filters "),e("code",null,"accounts"),t(", uses "),e("code",null,"logins"),t(").")])],-1),j=e("p",null,[t("This can span across any number of relationally linked Collections. For example, you could filter for customers that bought rock songs, where the "),e("code",null,"customers"),t(" and "),e("code",null,"genres"),t(" Collections are linked by "),e("code",null,"customers"),t(" -> "),e("code",null,"invoices"),t(" -> "),e("code",null,"invoice-items"),t(" -> "),e("code",null,"tracks"),t(" -> "),e("code",null,"genres"),t(".")],-1),z=e("span",{mi:"",icon:""},"chevron_right",-1),P=e("p",null,"Here are step-by-step instructions on how to filter by Fields in other Collections:",-1),q=e("video",{autoplay:"",playsinline:"",muted:"",loop:"",controls:"",title:"How Filters Work"},[e("source",{src:"https://cdn.directus.io/docs/v9/app-guide/filters/filters-20220303A/filtering-by-related-collections-20220303A.mp4",type:"video/mp4"})],-1),L=e("ol",null,[e("li",null,"Click \u201CAdd Filter\u201D."),e("li",null,"Click the desired relational Field. This will pop down and display the related Collection Fields."),e("li",null,"Select a Field from this related Collection."),e("li",null,"Set the Operator and Value as desired.")],-1),Y=e("h2",{id:"unfilterable-fields",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#unfilterable-fields"},"#"),t(" Unfilterable Fields")],-1),K=e("p",null,[e("img",{src:"https://cdn.directus.io/docs/v9/app-guide/filters/filters-20220303A/unfilterable-fields-20220303A.webp",alt:"Unfilterable Fields"})],-1),M=e("p",null,[t("Not all Fields can be filtered. As seen above in "),e("a",{href:"#filtering-by-related-collections"},"Filtering by Related Collections"),t(", Alias Fields cannot be filtered; they instead provide a dropdown menu to access Fields from a related Collection. Additionally, the \u201CPresentation\u201D and \u201CGroup\u201D Fields cannot be filtered at all and will not appear as an option in Filters.")],-1),J=e("h2",{id:"extensibility-options",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#extensibility-options"},"#"),t(" Extensibility Options")],-1),Q=e("p",null,"Directus Core is completely open-source, modular and extensible. Extensions allow you to expand or modify any part of Directus to fit your needs. Here are some great resources to get started down that track.",-1),X=e("div",{class:"tip hint"},[e("div",{class:"hint-title"},"Accelerated Development"),e("p",null,[t("Working on an enterprise project and looking to outsource or financially sponsor the development of a Shares extension? Contact "),e("a",{href:"https://directus.io/contact",target:"_blank",rel:"noopener noreferrer"},"our team")])],-1),Z=e("h2",{id:"more-help",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#more-help"},"#"),t(" More Help")],-1),ee=e("p",null,[t("Looking for technical support for your non-enterprise project? Chat with thousands of engineers within our growing "),e("a",{href:"https://discord.com/invite/directus",target:"_blank",rel:"noopener noreferrer"},"Community on Discord")],-1),se="Filters",ne=!1,re="Filters allow you to conditionally select Items from a Collection. Use-cases include customizing Item search results restricting Item access permissions for specific Users or Roles, building dashboard analytics with the Insights module, and more.",ae="5 min read",de={__name:"filters",setup(te,{expose:r}){const s={title:"Filters",modularExtension:!1,description:"Filters allow you to conditionally select Items from a Collection. Use-cases include customizing Item search results restricting Item access permissions for specific Users or Roles, building dashboard analytics with the Insights module, and more.",readTime:"5 min read"};return r({frontmatter:s}),(oe,le)=>{const l=n("router-link"),a=n("docs-wrapper");return d(),c(a,{frontmatter:s},{default:o(()=>[e("div",u,[h,p,e("div",f,[m,e("p",null,[t("This page is a non-technical guide to using Filters. For more technical info, see "),i(l,{to:"/docs/reference/filter-rules"},{default:o(()=>[t("Filter-Rules")]),_:1}),t(".")])]),_,e("div",g,[y,e("p",null,[t("Filters are intuitive to use, but get quite nuanced as complexity increases. In order to use Filters effectively, you will need to understand the Field "),e("em",null,[t("(aka "),i(l,{to:"/docs/configuration/data-model"},{default:o(()=>[t("data model")]),_:1}),t(")")]),t(" being filtered as well as any relevant "),i(l,{to:"/docs/configuration/users-roles-permissions.md"},{default:o(()=>[t("Users, Roles and Permissions")]),_:1}),t(".")])]),e("p",null,[t("A basic filter is composed of 3 parts: A "),b,t(" from the Collection being Filtered, a logical "),i(l,{to:"/docs/reference/filter-rules#filter-operators"},{default:o(()=>[t("Operator")]),_:1}),t(", and some specified "),w,t(" to filter for within each Item\u2019s Field.")]),F,v,C,e("div",A,[k,e("p",null,[t("The Field type will determine the kinds of Operators that can be used on it. In fact, some Fields cannot be filtered at all (read more in "),x,t("). Once a Field is selected, the permitted operators will automatically display. An exhaustive list of Operators and what they do can be found in the more technical "),i(l,{to:"/docs/reference/filter-rules#filter-operators"},{default:o(()=>[t("Filter Rules")]),_:1}),t(" document.")])]),R,O,I,D,N,G,T,U,e("p",null,[t("The following Dynamic Variables are built into Directus to make Filtering easier: "),E,t(", "),V,t(", "),H,t(" and "),S,t(". For more information, please see the Dynamic Variables section in "),i(l,{to:"/docs/reference/filter-rules"},{default:o(()=>[t("Filter Rules")]),_:1}),t(".")]),W,B,$,j,e("p",null,[t("You will notice a "),z,t(" icon beside relational Fields. When you click on any "),i(l,{to:"/docs/getting-started/glossary#alias"},{default:o(()=>[t("Alias")]),_:1}),t(" Field, all the Fields for that associated Collection pop down. If you select one of these Fields, you can run Filters on the current Collection by Field values in a related Collection.")]),P,q,L,Y,K,M,J,Q,e("ul",null,[e("li",null,[i(l,{to:"/docs/extensions/introduction"},{default:o(()=>[t("Extensions > Introduction")]),_:1})]),e("li",null,[i(l,{to:"/docs/extensions/creating-extensions"},{default:o(()=>[t("Extensions > Creating Extensions")]),_:1})]),e("li",null,[i(l,{to:"/docs/contributing/introduction"},{default:o(()=>[t("Contributing > Introduction")]),_:1})]),e("li",null,[i(l,{to:"/docs/contributing/codebase-overview"},{default:o(()=>[t("Contributing > Codebase Overview")]),_:1})])]),X,Z,ee])]),_:1})}}};export{de as default,re as description,ne as modularExtension,ae as readTime,se as title};
1
+ import{a as n,o as d,e as c,y as o,u as e,q as t,z as i}from"./runtime-core.esm-bundler.22ec0346.js";const u={class:"markdown-body"},h=e("blockquote",null,[e("p",null,"Filters allow you to conditionally select Items from a Collection. Use-cases include customizing Item search results, restricting Item access permissions for specific Users or Roles, building dashboard analytics with the Insights module, and more.")],-1),p=e("p",null,[e("img",{src:"https://cdn.directus.io/docs/v9/app-guide/filters/filters-20220303A/filters-20220303A.webp",alt:"Filters"})],-1),f={class:"warning hint"},m=e("div",{class:"hint-title"},"There Are Two Filters Documents",-1),_=e("h2",{id:"how-it-works",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#how-it-works"},"#"),t(" How it Works")],-1),y={class:"tip hint"},g=e("div",{class:"hint-title"},"Assumed Knowledge",-1),b=e("strong",null,"Field",-1),w=e("strong",null,"Value",-1),F=e("video",{autoplay:"",playsinline:"",muted:"",loop:"",controls:"",title:"How Filters Work"},[e("source",{src:"https://cdn.directus.io/docs/v9/app-guide/filters/filters-20220303A/how-filters-work-20220303A.mp4",type:"video/mp4"})],-1),v=e("ol",{start:"2"},[e("li",null,[t("Click "),e("span",{mi:"",icon:""},"filter_list"),t(" or "),e("strong",null,"\u201CAdd Filter\u201D"),t(".")]),e("li",null,"Select the Field to filter by."),e("li",null,"Select the Operator as desired."),e("li",null,"Define the Value to filter for.")],-1),C=e("p",null,[t("From here, you can set multiple Filters at once, filter by "),e("a",{href:"#filtering-by-related-collections"},"Fields in related Collections"),t(", set Values with "),e("a",{href:"#dynamic-variables"},"Dynamic Variables"),t(", as well as apply "),e("a",{href:"#and-or-groups"},"AND/OR Groups"),t(".")],-1),A={class:"tip hint"},k=e("div",{class:"hint-title"},"Operators",-1),x=e("a",{href:"#unfilterable-fields"},"Unfilterable Fields",-1),R=e("h2",{id:"and%2For-groups",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#and%2For-groups"},"#"),t(" AND/OR Groups")],-1),O=e("p",null,[e("code",null,"AND"),t(" Groups give the option to filter for Items that meet "),e("em",null,"all of several criteria"),t(". On the other hand, "),e("code",null,"OR"),t(" Groups filter for Items that meet "),e("em",null,"any one of several criteria"),t(".")],-1),I=e("p",null,[e("img",{src:"https://cdn.directus.io/docs/v9/app-guide/filters/filters-20220303A/and-or-groups-20220303A.webp",alt:"AND/OR Groups"})],-1),D=e("ol",null,[e("li",null,"Click \u201CAdd Filter\u201D."),e("li",null,"Click \u201CAnd/OR Group\u201D at the very top of the dropdown menu."),e("li",null,[t("Click the AND/OR text to toggle: "),e("ul",null,[e("li",null,[e("code",null,"AND"),t(" \u2013 Selects Items that meet every single criteria.")]),e("li",null,[e("code",null,"OR"),t(" \u2013 Selects Items that meet one of several criteria.")])])]),e("li",null,"Click \u201CAdd Filter\u201D again."),e("li",null,"Configure the Field, Operator, and Value as desired."),e("li",null,[t("Click and hold "),e("span",{mi:"",icon:""},"drag_indicator"),t(" to drag a Filter and nest it under an AND/OR Group.")])],-1),N=e("div",{class:"tip hint"},[e("div",{class:"hint-title"},"Why do we need AND Groups?"),e("p",null,[t("Filters actually default to "),e("code",null,"AND"),t(" Group behavior automatically. However, when Filters are nested inside of an OR Group, they of course switch to "),e("code",null,"OR"),t(" Group behavior. So an AND Group is necessary in cases where you want to meet multiple conditions inside of OR Groups.")])],-1),G=e("h2",{id:"dynamic-variables",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#dynamic-variables"},"#"),t(" Dynamic Variables")],-1),T=e("p",null,"The following video shows how to filter for Blog posts written within the past 60 days.",-1),U=e("video",{autoplay:"",playsinline:"",muted:"",loop:"",controls:"",title:"How Filters Work"},[e("source",{src:"https://cdn.directus.io/docs/v9/app-guide/filters/filters-20220303A/dynamic-variables-20220307A.mp4",type:"video/mp4"})],-1),V=e("code",null,"$CURRENT_USER",-1),E=e("code",null,"$CURRENT_ROLE",-1),H=e("code",null,"$NOW",-1),S=e("code",null,"$NOW(<adjustment>)",-1),W=e("h2",{id:"filtering-by-related-collections",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#filtering-by-related-collections"},"#"),t(" Filtering by Related Collections")],-1),B=e("p",null,[t("You may need to run filters on one Collection "),e("em",null,"based on information in another related Collection"),t(". Here are a few examples of when that might happen:")],-1),z=e("ul",null,[e("li",null,[t("Book authors that also wrote screenplays (filters "),e("code",null,"authors"),t(", uses "),e("code",null,"screenplays"),t(").")]),e("li",null,[t("Products with a 5 star customer review (filters "),e("code",null,"products"),t(", uses "),e("code",null,"reviews"),t(").")]),e("li",null,[t("Accounts with active user login within the last 12 months (filters "),e("code",null,"accounts"),t(", uses "),e("code",null,"logins"),t(").")])],-1),$=e("p",null,[t("This can span across any number of relationally linked Collections. For example, you could filter for customers that bought rock songs, where the "),e("code",null,"customers"),t(" and "),e("code",null,"genres"),t(" Collections are linked by "),e("code",null,"customers"),t(" -> "),e("code",null,"invoices"),t(" -> "),e("code",null,"invoice-items"),t(" -> "),e("code",null,"tracks"),t(" -> "),e("code",null,"genres"),t(".")],-1),j=e("span",{mi:"",icon:""},"chevron_right",-1),q=e("p",null,"Here are step-by-step instructions on how to filter by Fields in other Collections:",-1),P=e("video",{autoplay:"",playsinline:"",muted:"",loop:"",controls:"",title:"How Filters Work"},[e("source",{src:"https://cdn.directus.io/docs/v9/app-guide/filters/filters-20220303A/filtering-by-related-collections-20220303A.mp4",type:"video/mp4"})],-1),L=e("ol",null,[e("li",null,"Click \u201CAdd Filter\u201D."),e("li",null,"Click the desired relational Field. This will pop down and display the related Collection Fields."),e("li",null,"Select a Field from this related Collection."),e("li",null,"Set the Operator and Value as desired.")],-1),Y=e("h2",{id:"unfilterable-fields",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#unfilterable-fields"},"#"),t(" Unfilterable Fields")],-1),K=e("p",null,[e("img",{src:"https://cdn.directus.io/docs/v9/app-guide/filters/filters-20220303A/unfilterable-fields-20220303A.webp",alt:"Unfilterable Fields"})],-1),M=e("p",null,[t("Not all Fields can be filtered. As seen above in "),e("a",{href:"#filtering-by-related-collections"},"Filtering by Related Collections"),t(", Alias Fields cannot be filtered; they instead provide a dropdown menu to access Fields from a related Collection. Additionally, the \u201CPresentation\u201D and \u201CGroup\u201D Fields cannot be filtered at all and will not appear as an option in Filters.")],-1),J=e("h2",{id:"extensibility-options",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#extensibility-options"},"#"),t(" Extensibility Options")],-1),Q=e("p",null,"Directus Core is completely open-source, modular and extensible. Extensions allow you to expand or modify any part of Directus to fit your needs. Here are some great resources to get started down that track.",-1),X=e("div",{class:"tip hint"},[e("div",{class:"hint-title"},"Accelerated Development"),e("p",null,[t("Working on an enterprise project and looking to outsource or financially sponsor the development of a Shares extension? Contact "),e("a",{href:"https://directus.io/contact",target:"_blank",rel:"noopener noreferrer"},"our team")])],-1),Z=e("h2",{id:"more-help",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#more-help"},"#"),t(" More Help")],-1),ee=e("p",null,[t("Looking for technical support for your non-enterprise project? Chat with thousands of engineers within our growing "),e("a",{href:"https://discord.com/invite/directus",target:"_blank",rel:"noopener noreferrer"},"Community on Discord")],-1),se="Filters",ne=!1,re="Filters allow you to conditionally select Items from a Collection. Use-cases include customizing Item search results restricting Item access permissions for specific Users or Roles, building dashboard analytics with the Insights module, and more.",ae="5 min read",de={__name:"filters",setup(te,{expose:r}){const s={title:"Filters",modularExtension:!1,description:"Filters allow you to conditionally select Items from a Collection. Use-cases include customizing Item search results restricting Item access permissions for specific Users or Roles, building dashboard analytics with the Insights module, and more.",readTime:"5 min read"};return r({frontmatter:s}),(oe,le)=>{const l=n("router-link"),a=n("docs-wrapper");return d(),c(a,{frontmatter:s},{default:o(()=>[e("div",u,[h,p,e("div",f,[m,e("p",null,[t("This page is a non-technical guide to using Filters. For more technical info, see "),i(l,{to:"/docs/reference/filter-rules"},{default:o(()=>[t("Filter-Rules")]),_:1}),t(".")])]),_,e("div",y,[g,e("p",null,[t("Filters are intuitive to use, but get quite nuanced as complexity increases. In order to use Filters effectively, you will need to understand the Field "),e("em",null,[t("(aka "),i(l,{to:"/docs/configuration/data-model"},{default:o(()=>[t("data model")]),_:1}),t(")")]),t(" being filtered as well as any relevant "),i(l,{to:"/docs/configuration/users-roles-permissions.md"},{default:o(()=>[t("Users, Roles and Permissions")]),_:1}),t(".")])]),e("p",null,[t("A basic filter is composed of 3 parts: A "),b,t(" from the Collection being Filtered, a logical "),i(l,{to:"/docs/reference/filter-rules#filter-operators"},{default:o(()=>[t("Operator")]),_:1}),t(", and some specified "),w,t(" to filter for within each Item\u2019s Field.")]),F,v,C,e("div",A,[k,e("p",null,[t("The Field type will determine the kinds of Operators that can be used on it. In fact, some Fields cannot be filtered at all (read more in "),x,t("). Once a Field is selected, the permitted operators will automatically display. An exhaustive list of Operators and what they do can be found in the more technical "),i(l,{to:"/docs/reference/filter-rules#filter-operators"},{default:o(()=>[t("Filter Rules")]),_:1}),t(" document.")])]),R,O,I,D,N,G,T,U,e("p",null,[t("The following Dynamic Variables are built into Directus to make Filtering easier: "),V,t(", "),E,t(", "),H,t(" and "),S,t(". For more information, please see the Dynamic Variables section in "),i(l,{to:"/docs/reference/filter-rules"},{default:o(()=>[t("Filter Rules")]),_:1}),t(".")]),W,B,z,$,e("p",null,[t("You will notice a "),j,t(" icon beside relational Fields. When you click on any "),i(l,{to:"/docs/getting-started/glossary#alias"},{default:o(()=>[t("Alias")]),_:1}),t(" Field, all the Fields for that associated Collection pop down. If you select one of these Fields, you can run Filters on the current Collection by Field values in a related Collection.")]),q,P,L,Y,K,M,J,Q,e("ul",null,[e("li",null,[i(l,{to:"/docs/extensions/introduction"},{default:o(()=>[t("Extensions > Introduction")]),_:1})]),e("li",null,[i(l,{to:"/docs/extensions/creating-extensions"},{default:o(()=>[t("Extensions > Creating Extensions")]),_:1})]),e("li",null,[i(l,{to:"/docs/contributing/introduction"},{default:o(()=>[t("Contributing > Introduction")]),_:1})]),e("li",null,[i(l,{to:"/docs/contributing/codebase-overview"},{default:o(()=>[t("Contributing > Codebase Overview")]),_:1})])]),X,Z,ee])]),_:1})}}};export{de as default,re as description,ne as modularExtension,ae as readTime,se as title};
@@ -1,4 +1,4 @@
1
- import{a as o,o as h,b as i,w as e,l as s,E as a,e as n}from"./runtime-core.esm-bundler.fe249c5c.js";const d={class:"markdown-body"},p=s("blockquote",null,[s("p",null,"Flows enable custom, event-driven data processing and task automation within Directus.")],-1),u=s("hr",null,null,-1),_=s("h2",{id:"the-data-chain",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#the-data-chain"},"#"),a(" The Data Chain")],-1),f=s("p",null,[s("code",null,"id"),a(),s("strong",null,"uuid"),s("br"),a(" Primary key of the flow.")],-1),g=s("p",null,[s("code",null,"name"),a(),s("strong",null,"string"),s("br"),a(" Name for the flow.")],-1),m=s("p",null,[s("code",null,"icon"),a(),s("strong",null,"string"),s("br"),a(" Icon displayed in the Admin App for the flow.")],-1),j=s("p",null,[s("code",null,"color"),a(),s("strong",null,"string"),s("br"),a(" Color of the icon displayed in the Admin App for the flow.")],-1),w=s("p",null,[s("code",null,"note"),a(),s("strong",null,"text"),s("br"),a(" Short description displayed in the Admin App.")],-1),b=s("p",null,[s("code",null,"status"),a(),s("strong",null,"string"),s("br"),a(" Current status of the flow. One of "),s("code",null,"active"),a(", "),s("code",null,"inactive"),a(". Defaults to "),s("code",null,"active"),a(" when not specified.")],-1),y=s("p",null,[s("code",null,"trigger"),a(),s("strong",null,"string"),s("br"),a(" Type of trigger for the flow. One of "),s("code",null,"hook"),a(", "),s("code",null,"webhook"),a(", "),s("code",null,"operation"),a(", "),s("code",null,"schedule"),a(", "),s("code",null,"manual"),a(".")],-1),x=s("p",null,[s("code",null,"options"),a(),s("strong",null,"json"),s("br"),a(" Options of the selected trigger for the flow.")],-1),q=s("p",null,[s("code",null,"accountability"),a(),s("strong",null,"string"),s("br"),a(" The permission used during the flow. One of "),s("code",null,"$public"),a(", "),s("code",null,"$trigger"),a(", "),s("code",null,"$full"),a(", or UUID of a role.")],-1),E=s("p",null,[s("code",null,"date_created"),a(),s("strong",null,"timestamp"),s("br"),a(" Timestamp in ISO8601 when the flow was created.")],-1),T=s("code",null,"user_created",-1),P=s("strong",null,"many-to-one",-1),k=s("br",null,null,-1),S=s("p",null,[s("code",null,"operation"),a(),s("strong",null,"string"),s("br"),a(" UUID of the operation connected to the trigger in the flow.")],-1),R=s("pre",null,[s("code",{class:"language-json"},[s("span",{class:"hljs-punctuation"},"{"),a(`
1
+ import{a as o,o as h,e as i,y as e,u as s,q as a,z as n}from"./runtime-core.esm-bundler.22ec0346.js";const d={class:"markdown-body"},p=s("blockquote",null,[s("p",null,"Flows enable custom, event-driven data processing and task automation within Directus.")],-1),u=s("hr",null,null,-1),_=s("h2",{id:"the-data-chain",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#the-data-chain"},"#"),a(" The Data Chain")],-1),f=s("p",null,[s("code",null,"id"),a(),s("strong",null,"uuid"),s("br"),a(" Primary key of the flow.")],-1),g=s("p",null,[s("code",null,"name"),a(),s("strong",null,"string"),s("br"),a(" Name for the flow.")],-1),m=s("p",null,[s("code",null,"icon"),a(),s("strong",null,"string"),s("br"),a(" Icon displayed in the Admin App for the flow.")],-1),j=s("p",null,[s("code",null,"color"),a(),s("strong",null,"string"),s("br"),a(" Color of the icon displayed in the Admin App for the flow.")],-1),w=s("p",null,[s("code",null,"note"),a(),s("strong",null,"text"),s("br"),a(" Short description displayed in the Admin App.")],-1),b=s("p",null,[s("code",null,"status"),a(),s("strong",null,"string"),s("br"),a(" Current status of the flow. One of "),s("code",null,"active"),a(", "),s("code",null,"inactive"),a(". Defaults to "),s("code",null,"active"),a(" when not specified.")],-1),y=s("p",null,[s("code",null,"trigger"),a(),s("strong",null,"string"),s("br"),a(" Type of trigger for the flow. One of "),s("code",null,"hook"),a(", "),s("code",null,"webhook"),a(", "),s("code",null,"operation"),a(", "),s("code",null,"schedule"),a(", "),s("code",null,"manual"),a(".")],-1),x=s("p",null,[s("code",null,"options"),a(),s("strong",null,"json"),s("br"),a(" Options of the selected trigger for the flow.")],-1),q=s("p",null,[s("code",null,"accountability"),a(),s("strong",null,"string"),s("br"),a(" The permission used during the flow. One of "),s("code",null,"$public"),a(", "),s("code",null,"$trigger"),a(", "),s("code",null,"$full"),a(", or UUID of a role.")],-1),E=s("p",null,[s("code",null,"date_created"),a(),s("strong",null,"timestamp"),s("br"),a(" Timestamp in ISO8601 when the flow was created.")],-1),T=s("code",null,"user_created",-1),P=s("strong",null,"many-to-one",-1),k=s("br",null,null,-1),S=s("p",null,[s("code",null,"operation"),a(),s("strong",null,"string"),s("br"),a(" UUID of the operation connected to the trigger in the flow.")],-1),R=s("pre",null,[s("code",{class:"language-json"},[s("span",{class:"hljs-punctuation"},"{"),a(`
2
2
  `),s("span",{class:"hljs-attr"},'"id"'),s("span",{class:"hljs-punctuation"},":"),a(),s("span",{class:"hljs-string"},'"2fab3b9d-0543-4b87-8a30-3c5ee66fedf1"'),s("span",{class:"hljs-punctuation"},","),a(`
3
3
  `),s("span",{class:"hljs-attr"},'"name"'),s("span",{class:"hljs-punctuation"},":"),a(),s("span",{class:"hljs-string"},'"My Flow"'),s("span",{class:"hljs-punctuation"},","),a(`
4
4
  `),s("span",{class:"hljs-attr"},'"icon"'),s("span",{class:"hljs-punctuation"},":"),a(),s("span",{class:"hljs-string"},'"bolt"'),s("span",{class:"hljs-punctuation"},","),a(`
@@ -24,7 +24,7 @@ SEARCH /flows
24
24
  status
25
25
  }
26
26
  }
27
- `)])],-1),H=s("hr",null,null,-1),N=s("h2",{id:"retrieve-a-flow",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#retrieve-a-flow"},"#"),a(" Retrieve a flow")],-1),$=s("p",null,"List an existing flow by primary key.",-1),V=s("h3",{id:"query-parameters-1",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#query-parameters-1"},"#"),a(" Query Parameters")],-1),Z=s("h3",{id:"returns-1",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#returns-1"},"#"),a(" Returns")],-1),z=s("p",null,[a("Returns the requested "),s("a",{href:"#the-data-chain"},"data chain"),a(".")],-1),J=s("h3",{id:"rest-api-1",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#rest-api-1"},"#"),a(" REST API")],-1),K=s("pre",null,[s("code",null,`GET /flows/:id
27
+ `)])],-1),H=s("hr",null,null,-1),N=s("h2",{id:"retrieve-a-flow",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#retrieve-a-flow"},"#"),a(" Retrieve a flow")],-1),$=s("p",null,"List an existing flow by primary key.",-1),V=s("h3",{id:"query-parameters-1",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#query-parameters-1"},"#"),a(" Query Parameters")],-1),z=s("h3",{id:"returns-1",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#returns-1"},"#"),a(" Returns")],-1),Z=s("p",null,[a("Returns the requested "),s("a",{href:"#the-data-chain"},"data chain"),a(".")],-1),J=s("h3",{id:"rest-api-1",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#rest-api-1"},"#"),a(" REST API")],-1),K=s("pre",null,[s("code",null,`GET /flows/:id
28
28
  `)],-1),W=s("h5",{id:"example-1",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#example-1"},"#"),a(" Example")],-1),X=s("pre",null,[s("code",null,`GET /flows/2fc325fb-299b-4d20-a9e7-a34349dee8b2
29
29
  `)],-1),Y=s("h3",{id:"graphql-1",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#graphql-1"},"#"),a(" GraphQL")],-1),ss=s("pre",null,[s("code",null,`POST /graphql/system
30
30
  `)],-1),as=s("pre",null,[s("code",{class:"language-graphql"},[s("span",{class:"hljs-keyword"},"type"),s("span",{class:"hljs-type"}," Query"),a(` {
@@ -95,8 +95,8 @@ SEARCH /flows
95
95
  status
96
96
  }
97
97
  }
98
- `)])],-1),Cs=s("hr",null,null,-1),Gs=s("h2",{id:"update-a-flow",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#update-a-flow"},"#"),a(" Update a Flow")],-1),Ms=s("p",null,"Update an existing flow.",-1),Us=s("h3",{id:"query-parameters-4",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#query-parameters-4"},"#"),a(" Query Parameters")],-1),Bs=s("h3",{id:"request-body-2",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#request-body-2"},"#"),a(" Request Body")],-1),Hs=s("p",null,[a("A partial "),s("a",{href:"#the-data-chain"},"data chain"),a(".")],-1),Ns=s("h3",{id:"returns-4",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#returns-4"},"#"),a(" Returns")],-1),$s=s("p",null,[a("Returns the "),s("a",{href:"#the-data-chain"},"data chain"),a(" for the updated flow.")],-1),Vs=s("h3",{id:"rest-api-4",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#rest-api-4"},"#"),a(" REST API")],-1),Zs=s("pre",null,[s("code",null,`PATCH /flows/:id
99
- `)],-1),zs=s("h5",{id:"example-7",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#example-7"},"#"),a(" Example")],-1),Js=s("pre",null,[s("code",{class:"language-json"},[s("span",{class:"hljs-comment"},"// PATCH /flows/2fc325fb-299b-4d20-a9e7-a34349dee8b2"),a(`
98
+ `)])],-1),Cs=s("hr",null,null,-1),Gs=s("h2",{id:"update-a-flow",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#update-a-flow"},"#"),a(" Update a Flow")],-1),Ms=s("p",null,"Update an existing flow.",-1),Us=s("h3",{id:"query-parameters-4",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#query-parameters-4"},"#"),a(" Query Parameters")],-1),Bs=s("h3",{id:"request-body-2",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#request-body-2"},"#"),a(" Request Body")],-1),Hs=s("p",null,[a("A partial "),s("a",{href:"#the-data-chain"},"data chain"),a(".")],-1),Ns=s("h3",{id:"returns-4",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#returns-4"},"#"),a(" Returns")],-1),$s=s("p",null,[a("Returns the "),s("a",{href:"#the-data-chain"},"data chain"),a(" for the updated flow.")],-1),Vs=s("h3",{id:"rest-api-4",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#rest-api-4"},"#"),a(" REST API")],-1),zs=s("pre",null,[s("code",null,`PATCH /flows/:id
99
+ `)],-1),Zs=s("h5",{id:"example-7",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#example-7"},"#"),a(" Example")],-1),Js=s("pre",null,[s("code",{class:"language-json"},[s("span",{class:"hljs-comment"},"// PATCH /flows/2fc325fb-299b-4d20-a9e7-a34349dee8b2"),a(`
100
100
 
101
101
  `),s("span",{class:"hljs-punctuation"},"{"),a(`
102
102
  `),s("span",{class:"hljs-attr"},'"name"'),s("span",{class:"hljs-punctuation"},":"),a(),s("span",{class:"hljs-string"},'"My Updated Flow"'),a(`
@@ -152,7 +152,7 @@ SEARCH /flows
152
152
  `)],-1),Va=s("pre",null,[s("code",{class:"language-graphql"},[s("span",{class:"hljs-keyword"},"type"),s("span",{class:"hljs-type"}," Mutation"),a(` {
153
153
  delete_flows_items(ids: `),s("span",{class:"hljs-literal"},"[ID"),a(`!]!): delete_many
154
154
  }
155
- `)])],-1),Za=s("h5",{id:"example-14",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#example-14"},"#"),a(" Example")],-1),za=s("pre",null,[s("code",{class:"language-graphql"},[s("span",{class:"hljs-keyword"},"mutation"),a(` {
155
+ `)])],-1),za=s("h5",{id:"example-14",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#example-14"},"#"),a(" Example")],-1),Za=s("pre",null,[s("code",{class:"language-graphql"},[s("span",{class:"hljs-keyword"},"mutation"),a(` {
156
156
  delete_flows_items(
157
157
  ids: [
158
158
  `),s("span",{class:"hljs-string"},'"25821236-8c2a-4f89-8fdc-c7d01f35877d"'),a(`
@@ -169,4 +169,4 @@ SEARCH /flows
169
169
  `)])],-1),te=s("h2",{id:"flow-with-post-webhook-trigger",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#flow-with-post-webhook-trigger"},"#"),a(" Flow with POST webhook trigger")],-1),ne=s("p",null,"Start a flow with POST webhook trigger.",-1),le=s("h3",{id:"request-body-5",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#request-body-5"},"#"),a(" Request Body")],-1),oe=s("p",null,"Payload for the POST request.",-1),re=s("h3",{id:"returns-9",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#returns-9"},"#"),a(" Returns")],-1),ce=s("p",null,"Result of the flow, if any.",-1),he=s("h3",{id:"rest-api-9",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#rest-api-9"},"#"),a(" REST API")],-1),ie=s("pre",null,[s("code",null,`POST /flows/trigger/:flow_uuid
170
170
  `)],-1),de=s("h5",{id:"example-16",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#example-16"},"#"),a(" Example")],-1),pe=s("pre",null,[s("code",{class:"language-json"},[s("span",{class:"hljs-comment"},"// POST /flows/trigger/202a940b-a00b-47df-b832-369c53f13122"),a(`
171
171
  `),s("span",{class:"hljs-comment"},"// Payload here"),a(`
172
- `)])],-1),me="Flows",je=!1,we="REST and GraphQL API documentation on the Flows collection in Directus.",be="5 min read",ye="page-reference",xe={__name:"flows",setup(ue,{expose:r}){const l={title:"Flows",modularExtension:!1,description:"REST and GraphQL API documentation on the Flows collection in Directus.",readTime:"5 min read",pageClass:"page-reference"};return r({frontmatter:l}),(_e,fe)=>{const t=o("router-link"),c=o("docs-wrapper");return h(),i(c,{frontmatter:l},{default:e(()=>[s("div",d,[p,u,_,f,g,m,j,w,b,y,x,q,E,s("p",null,[T,a(),P,k,a(" The user who created the flow. Many-to-one to "),n(t,{to:"/docs/reference/system/users#the-users-object"},{default:e(()=>[a("users")]),_:1}),a(".")]),S,R,A,F,I,O,s("p",null,[a("Supports all "),n(t,{to:"/docs/reference/query"},{default:e(()=>[a("global query parameters")]),_:1}),a(".")]),D,s("p",null,[a("An array of up to "),n(t,{to:"/docs/reference/query#limit"},{default:e(()=>[a("limit")]),_:1}),a(),v,a(". If no items are available, data will be an empty array.")]),L,Q,s("p",null,[n(t,{to:"/docs/reference/introduction#search-http-method"},{default:e(()=>[a("Learn more about SEARCH ->")]),_:1})]),C,G,M,U,B,H,N,$,V,s("p",null,[a("Supports all "),n(t,{to:"/docs/reference/query"},{default:e(()=>[a("global query parameters")]),_:1}),a(".")]),Z,z,J,K,W,X,Y,ss,as,es,ts,ns,ls,os,rs,s("p",null,[a("Supports all "),n(t,{to:"/docs/reference/query"},{default:e(()=>[a("global query parameters")]),_:1}),a(".")]),cs,hs,is,ds,ps,us,_s,fs,gs,ms,js,ws,bs,ys,xs,qs,Es,s("p",null,[a("Supports all "),n(t,{to:"/docs/reference/query"},{default:e(()=>[a("global query parameters")]),_:1}),a(".")]),Ts,Ps,ks,Ss,Rs,As,Fs,Is,Os,Ds,vs,Ls,Qs,Cs,Gs,Ms,Us,s("p",null,[a("Supports all "),n(t,{to:"/docs/reference/query"},{default:e(()=>[a("global query parameters")]),_:1}),a(".")]),Bs,Hs,Ns,$s,Vs,Zs,zs,Js,Ks,Ws,Xs,Ys,sa,aa,ea,ta,na,s("p",null,[a("Supports all "),n(t,{to:"/docs/reference/query"},{default:e(()=>[a("global query parameters")]),_:1}),a(".")]),la,oa,ra,ca,ha,ia,da,pa,ua,_a,fa,ga,ma,ja,wa,ba,ya,xa,qa,Ea,Ta,Pa,ka,Sa,Ra,Aa,Fa,Ia,Oa,Da,va,La,Qa,Ca,Ga,Ma,Ua,Ba,Ha,Na,$a,Va,Za,za,Ja,Ka,Wa,Xa,Ya,se,ae,ee,te,ne,le,oe,re,ce,he,ie,de,pe])]),_:1})}}};export{xe as default,we as description,je as modularExtension,ye as pageClass,be as readTime,me as title};
172
+ `)])],-1),me="Flows",je=!1,we="REST and GraphQL API documentation on the Flows collection in Directus.",be="5 min read",ye="page-reference",xe={__name:"flows",setup(ue,{expose:r}){const l={title:"Flows",modularExtension:!1,description:"REST and GraphQL API documentation on the Flows collection in Directus.",readTime:"5 min read",pageClass:"page-reference"};return r({frontmatter:l}),(_e,fe)=>{const t=o("router-link"),c=o("docs-wrapper");return h(),i(c,{frontmatter:l},{default:e(()=>[s("div",d,[p,u,_,f,g,m,j,w,b,y,x,q,E,s("p",null,[T,a(),P,k,a(" The user who created the flow. Many-to-one to "),n(t,{to:"/docs/reference/system/users#the-users-object"},{default:e(()=>[a("users")]),_:1}),a(".")]),S,R,A,F,I,O,s("p",null,[a("Supports all "),n(t,{to:"/docs/reference/query"},{default:e(()=>[a("global query parameters")]),_:1}),a(".")]),D,s("p",null,[a("An array of up to "),n(t,{to:"/docs/reference/query#limit"},{default:e(()=>[a("limit")]),_:1}),a(),v,a(". If no items are available, data will be an empty array.")]),L,Q,s("p",null,[n(t,{to:"/docs/reference/introduction#search-http-method"},{default:e(()=>[a("Learn more about SEARCH ->")]),_:1})]),C,G,M,U,B,H,N,$,V,s("p",null,[a("Supports all "),n(t,{to:"/docs/reference/query"},{default:e(()=>[a("global query parameters")]),_:1}),a(".")]),z,Z,J,K,W,X,Y,ss,as,es,ts,ns,ls,os,rs,s("p",null,[a("Supports all "),n(t,{to:"/docs/reference/query"},{default:e(()=>[a("global query parameters")]),_:1}),a(".")]),cs,hs,is,ds,ps,us,_s,fs,gs,ms,js,ws,bs,ys,xs,qs,Es,s("p",null,[a("Supports all "),n(t,{to:"/docs/reference/query"},{default:e(()=>[a("global query parameters")]),_:1}),a(".")]),Ts,Ps,ks,Ss,Rs,As,Fs,Is,Os,Ds,vs,Ls,Qs,Cs,Gs,Ms,Us,s("p",null,[a("Supports all "),n(t,{to:"/docs/reference/query"},{default:e(()=>[a("global query parameters")]),_:1}),a(".")]),Bs,Hs,Ns,$s,Vs,zs,Zs,Js,Ks,Ws,Xs,Ys,sa,aa,ea,ta,na,s("p",null,[a("Supports all "),n(t,{to:"/docs/reference/query"},{default:e(()=>[a("global query parameters")]),_:1}),a(".")]),la,oa,ra,ca,ha,ia,da,pa,ua,_a,fa,ga,ma,ja,wa,ba,ya,xa,qa,Ea,Ta,Pa,ka,Sa,Ra,Aa,Fa,Ia,Oa,Da,va,La,Qa,Ca,Ga,Ma,Ua,Ba,Ha,Na,$a,Va,za,Za,Ja,Ka,Wa,Xa,Ya,se,ae,ee,te,ne,le,oe,re,ce,he,ie,de,pe])]),_:1})}}};export{xe as default,we as description,je as modularExtension,ye as pageClass,be as readTime,me as title};
@@ -1,4 +1,4 @@
1
- import{a as l,o as r,b as d,w as n,l as t,E as e,e as s}from"./runtime-core.esm-bundler.fe249c5c.js";const u={class:"markdown-body"},h=t("blockquote",null,[t("p",null,"Flows enable custom, event-driven data processing and task automation within Directus. Each flow is composed of one trigger, followed by a series of operations.")],-1),p={class:"tip hint"},g=t("div",{class:"hint-title"},"Before You Begin",-1),f={class:"tip hint"},w=t("div",{class:"hint-title"},"Learn More",-1),_=t("h2",{id:"what%E2%80%99s-a-flow%3F",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#what%E2%80%99s-a-flow%3F"},"#"),e(" What\u2019s a Flow?")],-1),m=t("p",null,[t("img",{src:"https://cdn.directus.io/docs/v9/configuration/flows/flows/flows-20220603A/whats-a-flow-20220603A.webp",alt:"What's a Flow?"})],-1),y=t("p",null,"Each flow is made up of three elements: A trigger, operations, and a data chain.",-1),b=t("h3",{id:"triggers",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#triggers"},"#"),e(),t("strong",null,"Triggers")],-1),v=t("h3",{id:"operations",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#operations"},"#"),e(" Operations")],-1),j=t("em",null,"send off emails, push in-app notifications, send webhooks, and beyond",-1),k=t("p",null,"To put it in conceptual terms, operations do three things:",-1),x=t("ul",null,[t("li",null,[t("strong",null,"Get data"),e(" from Directus or another outside service.")]),t("li",null,[t("strong",null,"Process data"),e(" a.k.a. transform it, validate it, or whatever.")]),t("li",null,[t("strong",null,"Send data"),e(" to Directus or another outside service.")])],-1),T={class:"tip hint"},C=t("div",{class:"hint-title"},"Developers",-1),F=t("h3",{id:"data-chains",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#data-chains"},"#"),e(" Data Chains")],-1),A=t("p",null,[e("In order for a flow\u2019s operations to track and access the same data, each flow creates its own "),t("a",{href:"#the-data-chain"},"data chain"),e(". Every operation has access to this data chain and each operation appends some value onto this object after it runs. This means you can dynamically access data from a previous operation in the current operation with "),t("a",{href:"#data-chain-variables"},"data chain variables"),e(".")],-1),$=t("h3",{id:"control-flow",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#control-flow"},"#"),e(" Control Flow")],-1),D=t("em",null,"fails by design",-1),E=t("p",null,[e("These kinds of failed operations do not immediately stop your flow. Instead, flows let you implement "),t("a",{href:"https://en.wikipedia.org/wiki/Control_flow",target:"_blank",rel:"noopener noreferrer"},"control flow"),e(", by providing "),t("strong",null,"success paths"),e(" and "),t("strong",null,"failure paths"),e(" within a flow:")],-1),N=t("ul",null,[t("li",null,[t("strong",null,"Success"),e(" \u2014 If "),t("code",null,"operation1"),e(" executes successfully, then "),t("code",null,"operation2"),e(" executes.")]),t("li",null,[t("strong",null,"Failure"),e(" \u2014 Else if "),t("code",null,"operation1"),e(" fails on execution, then "),t("code",null,"operation3"),e(" executes.")])],-1),O=t("p",null,[t("em",null,"And there we have it!"),e(" These are the conceptual cornerstones of any flow. Now you\u2019ll need to know how to actually create a flow, which we discuss in the next section.")],-1),S=t("h2",{id:"configure-a-flow",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#configure-a-flow"},"#"),e(" Configure A Flow")],-1),I=t("video",{autoplay:"",playsinline:"",muted:"",loop:"",controls:"",title:"Create a Flow"},[t("source",{src:"https://cdn.directus.io/docs/v9/configuration/flows/flows/flows-20220603A/create-a-flow-20220603A.mp4",type:"video/mp4"})],-1),L=t("h3",{id:"create-a-flow",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#create-a-flow"},"#"),e(" Create a Flow")],-1),Y=t("ol",null,[t("li",null,[e("Navigate to "),t("strong",null,"Settings > Flows"),e(" and click "),t("span",{mi:"",btn:""},"add"),e(" in the page header. A drawer will open.")]),t("li",null,[e("Under "),t("strong",null,"Flow Setup"),e(", fill in a "),t("strong",null,"Name"),e(" for the flow and the following "),t("em",null,"optional"),e(" details: "),t("ul",null,[t("li",null,[t("strong",null,"Status"),e(" \u2014 Sets the flow to active or inactive.")]),t("li",null,[t("strong",null,"Icon"),e(" \u2014 Adds an icon to help quickly identify the flow.")]),t("li",null,[t("strong",null,"Description"),e(" \u2014 Sets a brief verbal description of the flow.")]),t("li",null,[t("strong",null,"Color"),e(" \u2014 Sets a color to help identify the flow.")]),t("li",null,[t("strong",null,"Activity and Logs Tracking"),e(" \u2014 Lets you "),t("strong",null,"Track Activity and Logs"),e(", "),t("strong",null,"Activity"),e(", or "),t("strong",null,"Neither"),e(".")])])])],-1),K={class:"tip hint"},q=t("a",{href:"#logs"},"Logs",-1),R=t("h3",{id:"configure-a-trigger",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#configure-a-trigger"},"#"),e(" Configure a Trigger")],-1),P={start:"3"},W=t("span",{mi:"",btn:""},"arrow_forward",-1),B=t("strong",null,"Trigger Setup",-1),V=t("li",null,[e("Click "),t("span",{mi:"",btn:""},"done"),e(" in the menu header to confirm.")],-1),H=t("p",null,"You\u2019ll now see your trigger in an empty grid area. Its time to start adding operations.",-1),J=t("h3",{id:"configure-an-operation",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#configure-an-operation"},"#"),e(" Configure an Operation")],-1),G={start:"5"},M=t("li",null,[e("On the trigger panel, click "),t("span",{mi:""},"add"),e(" and the "),t("strong",null,"Create Operation"),e(" side drawer will open.")],-1),U=t("strong",null,"Name",-1),z=t("br",null,null,-1),Q=t("a",{href:"#the-data-chain"},"data chain",-1),X=t("br",null,null,-1),Z=t("li",null,[e("Next, click "),t("span",{mi:"",btn:""},"done"),e(" in the page header to confirm and return to the flow grid area.")],-1),tt=t("li",null,[e("From here, you can make the following optional configurations: "),t("ul",null,[t("li",null,[t("strong",null,"Reposition"),e(" \u2014 You can drag and drop panels to reposition as desired.")]),t("li",null,[t("strong",null,"Unlink/Relink"),e(" \u2014 Click and drag "),t("span",{mi:"",icon:"",prmry:""},"adjust"),e(" or "),t("span",{mi:"",icon:"",prmry:""},"arrow_forward"),e(" to unlink/relink flows.")]),t("li",null,[t("strong",null,"Duplicate an Operation"),e(" \u2014 To duplicate an operation, click "),t("span",{mi:"",icon:""},"more_vert"),e(" to open its context menu. Click "),t("span",{mi:"",icon:""},"control_point_duplicate"),e(" and a duplicate of the operation (and its configuration details) will be created.")]),t("li",null,[t("strong",null,"Copy an Operation"),e(" \u2014 To copy and paste an operation into another flow, click "),t("span",{mi:"",icon:""},"more_vert"),e(" to open its context menu. Click "),t("span",{mi:"",icon:""},"input"),e(" and a popup menu will open. Choose the desired flow from the dropdown and click "),t("strong",null,"Copy"),e(".")]),t("li",null,[t("strong",null,[t("span",{mi:"",icon:""},"data_object"),e(" Toggle Raw Editor")]),e(" \u2014 Click "),t("span",{mi:"",icon:""},"data_object"),e(" on an operations\u2019 form input fields to toggle the input type between standard and raw value. This is allows you to add a raw value or "),t("a",{href:"#data-chain-variables"},"Data Chain Variables"),e(" within any type of configuration option, even dropdown menus, checkboxes, and radio buttons.")]),t("li",null,[t("strong",null,"Delete an Operation"),e(" \u2014 To delete an operation, click "),t("span",{mi:"",icon:""},"more_vert"),e(" then "),t("span",{mi:"",icon:"",dngr:""},"delete"),e(". A popup menu will appear. Click "),t("strong",null,"Delete"),e(" to confirm.")])])],-1),et=t("li",null,[e("On the newly created operation panel: "),t("ul",null,[t("li",null,[e("Click "),t("span",{mi:"",icon:""},"add"),e(" to add an operation to the "),t("strong",null,"success path"),e(".")]),t("li",null,[e("Click "),t("span",{mi:"",icon:""},"remove"),e(" to add an operation to the "),t("strong",null,"failure path"),e(".")])])],-1),nt=t("li",null,"Repeat steps 5-10 to build out your flow as desired.",-1),ot=t("li",null,[e("Click "),t("span",{mi:"",btn:""},"done"),e(" to confirm and create your flow.")],-1),st=t("li",null,[e("Click "),t("span",{mi:"",btn:""},"arrow_back"),e(" to return to the flows list.")],-1),at=t("li",null,"Once created, you may need to re-edit your flow, toggle it to inactive, or delete it.",-1),lt=t("h3",{id:"edit-a-flow",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#edit-a-flow"},"#"),e(" Edit a Flow")],-1),it=t("ol",null,[t("li",null,"Navigate to the desired flow."),t("li",null,[e("Click "),t("span",{mi:"",btn:"",muted:""},"edit"),e(" in the flow page header and make reconfigurations as desired.")]),t("li",null,[e("Click "),t("span",{mi:"",btn:""},"done"),e(" to confirm.")])],-1),ct=t("h3",{id:"toggle-a-flow-to-inactive",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#toggle-a-flow-to-inactive"},"#"),e(" Toggle a Flow to Inactive")],-1),rt=t("ol",null,[t("li",null,[e("Navigate to "),t("strong",null,"Settings > Flows"),e(" and click "),t("span",{mi:"",icon:""},"more_vert"),e(" on the desired flow.")]),t("li",null,[e("Click "),t("strong",null,[t("span",{mi:"",icon:""},"check"),e(" Set Flow to Active")]),e(" or "),t("strong",null,[t("span",{mi:"",icon:""},"block"),e(" Set Flow to Inactive")]),e(".")])],-1),dt=t("h3",{id:"delete-a-flow",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#delete-a-flow"},"#"),e(" Delete a Flow")],-1),ut=t("ol",null,[t("li",null,[e("Click "),t("span",{mi:"",icon:""},"more_vert"),e(" on the desired flow to open its context menu.")]),t("li",null,[e("Click "),t("span",{mi:"",icon:"",dngr:""},"delete"),e(" and a popup menu will appear. Click "),t("strong",null,"Delete"),e(" to confirm.")])],-1),ht=t("p",null,"Now that we know how to create and configure a flow, it\u2019s time to get a firmer understanding of the data chain.",-1),pt=t("h2",{id:"the-data-chain",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#the-data-chain"},"#"),e(" The Data Chain")],-1),gt=t("p",null,"Remember, each flow creates its own JSON object to store any data generated.",-1),ft=t("p",null,[e("When the flow begins, three keys are appended to the data chain: "),t("code",null,"$trigger"),e(", "),t("code",null,"$accountability"),e(", and "),t("code",null,"$last"),e(". Then, as each operation runs, it has access to this data chain. Once an operation finishes, its data is appended under its "),t("code",null,"<operationKey>"),e(". When the operation doesn\u2019t generate data, "),t("code",null,"null"),e(" is appended under its key.")],-1),wt=t("p",null,"The following is a highly generic example of a data chain.",-1),_t=t("pre",null,[t("code",{class:"language-json"},[t("span",{class:"hljs-punctuation"},"{"),e(`
1
+ import{a as l,o as r,e as d,y as n,u as t,q as e,z as s}from"./runtime-core.esm-bundler.22ec0346.js";const u={class:"markdown-body"},h=t("blockquote",null,[t("p",null,"Flows enable custom, event-driven data processing and task automation within Directus. Each flow is composed of one trigger, followed by a series of operations.")],-1),p={class:"tip hint"},g=t("div",{class:"hint-title"},"Before You Begin",-1),f={class:"tip hint"},w=t("div",{class:"hint-title"},"Learn More",-1),_=t("h2",{id:"what%E2%80%99s-a-flow%3F",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#what%E2%80%99s-a-flow%3F"},"#"),e(" What\u2019s a Flow?")],-1),m=t("p",null,[t("img",{src:"https://cdn.directus.io/docs/v9/configuration/flows/flows/flows-20220603A/whats-a-flow-20220603A.webp",alt:"What's a Flow?"})],-1),y=t("p",null,"Each flow is made up of three elements: A trigger, operations, and a data chain.",-1),b=t("h3",{id:"triggers",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#triggers"},"#"),e(),t("strong",null,"Triggers")],-1),v=t("h3",{id:"operations",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#operations"},"#"),e(" Operations")],-1),j=t("em",null,"send off emails, push in-app notifications, send webhooks, and beyond",-1),k=t("p",null,"To put it in conceptual terms, operations do three things:",-1),x=t("ul",null,[t("li",null,[t("strong",null,"Get data"),e(" from Directus or another outside service.")]),t("li",null,[t("strong",null,"Process data"),e(" a.k.a. transform it, validate it, or whatever.")]),t("li",null,[t("strong",null,"Send data"),e(" to Directus or another outside service.")])],-1),T={class:"tip hint"},C=t("div",{class:"hint-title"},"Developers",-1),F=t("h3",{id:"data-chains",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#data-chains"},"#"),e(" Data Chains")],-1),A=t("p",null,[e("In order for a flow\u2019s operations to track and access the same data, each flow creates its own "),t("a",{href:"#the-data-chain"},"data chain"),e(". Every operation has access to this data chain and each operation appends some value onto this object after it runs. This means you can dynamically access data from a previous operation in the current operation with "),t("a",{href:"#data-chain-variables"},"data chain variables"),e(".")],-1),$=t("h3",{id:"control-flow",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#control-flow"},"#"),e(" Control Flow")],-1),D=t("em",null,"fails by design",-1),E=t("p",null,[e("These kinds of failed operations do not immediately stop your flow. Instead, flows let you implement "),t("a",{href:"https://en.wikipedia.org/wiki/Control_flow",target:"_blank",rel:"noopener noreferrer"},"control flow"),e(", by providing "),t("strong",null,"success paths"),e(" and "),t("strong",null,"failure paths"),e(" within a flow:")],-1),N=t("ul",null,[t("li",null,[t("strong",null,"Success"),e(" \u2014 If "),t("code",null,"operation1"),e(" executes successfully, then "),t("code",null,"operation2"),e(" executes.")]),t("li",null,[t("strong",null,"Failure"),e(" \u2014 Else if "),t("code",null,"operation1"),e(" fails on execution, then "),t("code",null,"operation3"),e(" executes.")])],-1),O=t("p",null,[t("em",null,"And there we have it!"),e(" These are the conceptual cornerstones of any flow. Now you\u2019ll need to know how to actually create a flow, which we discuss in the next section.")],-1),S=t("h2",{id:"configure-a-flow",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#configure-a-flow"},"#"),e(" Configure A Flow")],-1),I=t("video",{autoplay:"",playsinline:"",muted:"",loop:"",controls:"",title:"Create a Flow"},[t("source",{src:"https://cdn.directus.io/docs/v9/configuration/flows/flows/flows-20220603A/create-a-flow-20220603A.mp4",type:"video/mp4"})],-1),L=t("h3",{id:"create-a-flow",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#create-a-flow"},"#"),e(" Create a Flow")],-1),Y=t("ol",null,[t("li",null,[e("Navigate to "),t("strong",null,"Settings > Flows"),e(" and click "),t("span",{mi:"",btn:""},"add"),e(" in the page header. A drawer will open.")]),t("li",null,[e("Under "),t("strong",null,"Flow Setup"),e(", fill in a "),t("strong",null,"Name"),e(" for the flow and the following "),t("em",null,"optional"),e(" details: "),t("ul",null,[t("li",null,[t("strong",null,"Status"),e(" \u2014 Sets the flow to active or inactive.")]),t("li",null,[t("strong",null,"Icon"),e(" \u2014 Adds an icon to help quickly identify the flow.")]),t("li",null,[t("strong",null,"Description"),e(" \u2014 Sets a brief verbal description of the flow.")]),t("li",null,[t("strong",null,"Color"),e(" \u2014 Sets a color to help identify the flow.")]),t("li",null,[t("strong",null,"Activity and Logs Tracking"),e(" \u2014 Lets you "),t("strong",null,"Track Activity and Logs"),e(", "),t("strong",null,"Activity"),e(", or "),t("strong",null,"Neither"),e(".")])])])],-1),K={class:"tip hint"},q=t("a",{href:"#logs"},"Logs",-1),R=t("h3",{id:"configure-a-trigger",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#configure-a-trigger"},"#"),e(" Configure a Trigger")],-1),P={start:"3"},W=t("span",{mi:"",btn:""},"arrow_forward",-1),B=t("strong",null,"Trigger Setup",-1),V=t("li",null,[e("Click "),t("span",{mi:"",btn:""},"done"),e(" in the menu header to confirm.")],-1),H=t("p",null,"You\u2019ll now see your trigger in an empty grid area. Its time to start adding operations.",-1),J=t("h3",{id:"configure-an-operation",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#configure-an-operation"},"#"),e(" Configure an Operation")],-1),z={start:"5"},G=t("li",null,[e("On the trigger panel, click "),t("span",{mi:""},"add"),e(" and the "),t("strong",null,"Create Operation"),e(" side drawer will open.")],-1),M=t("strong",null,"Name",-1),U=t("br",null,null,-1),Q=t("a",{href:"#the-data-chain"},"data chain",-1),X=t("br",null,null,-1),Z=t("li",null,[e("Next, click "),t("span",{mi:"",btn:""},"done"),e(" in the page header to confirm and return to the flow grid area.")],-1),tt=t("li",null,[e("From here, you can make the following optional configurations: "),t("ul",null,[t("li",null,[t("strong",null,"Reposition"),e(" \u2014 You can drag and drop panels to reposition as desired.")]),t("li",null,[t("strong",null,"Unlink/Relink"),e(" \u2014 Click and drag "),t("span",{mi:"",icon:"",prmry:""},"adjust"),e(" or "),t("span",{mi:"",icon:"",prmry:""},"arrow_forward"),e(" to unlink/relink flows.")]),t("li",null,[t("strong",null,"Duplicate an Operation"),e(" \u2014 To duplicate an operation, click "),t("span",{mi:"",icon:""},"more_vert"),e(" to open its context menu. Click "),t("span",{mi:"",icon:""},"control_point_duplicate"),e(" and a duplicate of the operation (and its configuration details) will be created.")]),t("li",null,[t("strong",null,"Copy an Operation"),e(" \u2014 To copy and paste an operation into another flow, click "),t("span",{mi:"",icon:""},"more_vert"),e(" to open its context menu. Click "),t("span",{mi:"",icon:""},"input"),e(" and a popup menu will open. Choose the desired flow from the dropdown and click "),t("strong",null,"Copy"),e(".")]),t("li",null,[t("strong",null,[t("span",{mi:"",icon:""},"data_object"),e(" Toggle Raw Editor")]),e(" \u2014 Click "),t("span",{mi:"",icon:""},"data_object"),e(" on an operations\u2019 form input fields to toggle the input type between standard and raw value. This is allows you to add a raw value or "),t("a",{href:"#data-chain-variables"},"Data Chain Variables"),e(" within any type of configuration option, even dropdown menus, checkboxes, and radio buttons.")]),t("li",null,[t("strong",null,"Delete an Operation"),e(" \u2014 To delete an operation, click "),t("span",{mi:"",icon:""},"more_vert"),e(" then "),t("span",{mi:"",icon:"",dngr:""},"delete"),e(". A popup menu will appear. Click "),t("strong",null,"Delete"),e(" to confirm.")])])],-1),et=t("li",null,[e("On the newly created operation panel: "),t("ul",null,[t("li",null,[e("Click "),t("span",{mi:"",icon:""},"add"),e(" to add an operation to the "),t("strong",null,"success path"),e(".")]),t("li",null,[e("Click "),t("span",{mi:"",icon:""},"remove"),e(" to add an operation to the "),t("strong",null,"failure path"),e(".")])])],-1),nt=t("li",null,"Repeat steps 5-10 to build out your flow as desired.",-1),ot=t("li",null,[e("Click "),t("span",{mi:"",btn:""},"done"),e(" to confirm and create your flow.")],-1),st=t("li",null,[e("Click "),t("span",{mi:"",btn:""},"arrow_back"),e(" to return to the flows list.")],-1),at=t("li",null,"Once created, you may need to re-edit your flow, toggle it to inactive, or delete it.",-1),lt=t("h3",{id:"edit-a-flow",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#edit-a-flow"},"#"),e(" Edit a Flow")],-1),it=t("ol",null,[t("li",null,"Navigate to the desired flow."),t("li",null,[e("Click "),t("span",{mi:"",btn:"",muted:""},"edit"),e(" in the flow page header and make reconfigurations as desired.")]),t("li",null,[e("Click "),t("span",{mi:"",btn:""},"done"),e(" to confirm.")])],-1),ct=t("h3",{id:"toggle-a-flow-to-inactive",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#toggle-a-flow-to-inactive"},"#"),e(" Toggle a Flow to Inactive")],-1),rt=t("ol",null,[t("li",null,[e("Navigate to "),t("strong",null,"Settings > Flows"),e(" and click "),t("span",{mi:"",icon:""},"more_vert"),e(" on the desired flow.")]),t("li",null,[e("Click "),t("strong",null,[t("span",{mi:"",icon:""},"check"),e(" Set Flow to Active")]),e(" or "),t("strong",null,[t("span",{mi:"",icon:""},"block"),e(" Set Flow to Inactive")]),e(".")])],-1),dt=t("h3",{id:"delete-a-flow",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#delete-a-flow"},"#"),e(" Delete a Flow")],-1),ut=t("ol",null,[t("li",null,[e("Click "),t("span",{mi:"",icon:""},"more_vert"),e(" on the desired flow to open its context menu.")]),t("li",null,[e("Click "),t("span",{mi:"",icon:"",dngr:""},"delete"),e(" and a popup menu will appear. Click "),t("strong",null,"Delete"),e(" to confirm.")])],-1),ht=t("p",null,"Now that we know how to create and configure a flow, it\u2019s time to get a firmer understanding of the data chain.",-1),pt=t("h2",{id:"the-data-chain",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#the-data-chain"},"#"),e(" The Data Chain")],-1),gt=t("p",null,"Remember, each flow creates its own JSON object to store any data generated.",-1),ft=t("p",null,[e("When the flow begins, three keys are appended to the data chain: "),t("code",null,"$trigger"),e(", "),t("code",null,"$accountability"),e(", and "),t("code",null,"$last"),e(". Then, as each operation runs, it has access to this data chain. Once an operation finishes, its data is appended under its "),t("code",null,"<operationKey>"),e(". When the operation doesn\u2019t generate data, "),t("code",null,"null"),e(" is appended under its key.")],-1),wt=t("p",null,"The following is a highly generic example of a data chain.",-1),_t=t("pre",null,[t("code",{class:"language-json"},[t("span",{class:"hljs-punctuation"},"{"),e(`
2
2
  `),t("span",{class:"hljs-attr"},'"$trigger"'),t("span",{class:"hljs-punctuation"},":"),e(),t("span",{class:"hljs-punctuation"},"{"),e(`
3
3
  `),t("span",{class:"hljs-comment"},"// Contains data generated by the flow's trigger."),e(`
4
4
  `),t("span",{class:"hljs-comment"},"// This could include headers, access tokens, payloads, etc."),e(`
@@ -43,4 +43,4 @@ import{a as l,o as r,b as d,w as n,l as t,E as e,e as s}from"./runtime-core.esm-
43
43
  `)])],-1),Dt={class:"tip hint"},Et=t("p",null,[e("Certain operations use dropdowns, toggles, checkboxes, and other input options. However, you can bypass this entirely to input raw values directly with "),t("a",{href:"#configure-an-operation"},"Toggle to Raw Editor"),e(". You can use double-moustache syntax to access data dynamically in these input options as well.")],-1),Nt=t("h2",{id:"logs",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#logs"},"#"),e(" Logs")],-1),Ot=t("video",{autoplay:"",playsinline:"",muted:"",loop:"",controls:"",title:""},[t("source",{src:"https://cdn.directus.io/docs/v9/configuration/flows/flows/flows-20220603A/logs-20220603A.mp4",type:"video/mp4"})],-1),St=t("p",null,"Accessible from the sidebar, logs store information for each flow execution. Each log will display information from triggers as well as each operation in the flow. To access a flow\u2019s logs, follow these steps.",-1),It=t("ol",null,[t("li",null,[e("Navigate to "),t("strong",null,"Settings > Flows"),e(" and click the desired flow.")]),t("li",null,[e("Click "),t("strong",null,[t("span",{mi:"",icon:"",prmry:""},"fact_check"),e(" Logs")]),e(" in the sidebar. A side drawer will open, displaying the flow\u2019s logs.")]),t("li",null,"Click a log and another side drawer will open, allowing you to peer through its data."),t("li",null,[e("When finished, click "),t("span",{mi:"",btn:"",muted:""},"close"),e(" to close the drawer.")])],-1),Lt=t("p",null,"Logs are not a 1:1 mapping to the data chain. Each trigger and operation gets its own dropdown, which stores its relevant data. Here\u2019s what you\u2019ll get from each of these:",-1),Yt=t("p",null,[t("strong",null,"Trigger")],-1),Kt=t("ul",null,[t("li",null,[t("strong",null,"Options"),e(" \u2014 The values you input when you configured the trigger."),t("br"),t("em",null,"(These configuration options are not stored on the data chain)"),e(".")]),t("li",null,[t("strong",null,"Payload"),e(" \u2014 Displays the data appended under "),t("code",null,"$trigger"),e(".")]),t("li",null,[t("strong",null,"Accountability"),e(" \u2014 Displays data appended under "),t("code",null,"$accountability"),e(".")])],-1),qt=t("p",null,[e("Note that "),t("code",null,"$accountability"),e(" is not nested under the "),t("code",null,"$trigger"),e(" key. However, it is listed under the Trigger in the Log because "),t("code",null,"$accountability"),e(" is generated by the trigger.")],-1),Rt=t("p",null,[t("strong",null,[t("code",null,"<OperationKey>")])],-1),Pt=t("ul",null,[t("li",null,[t("strong",null,"Options"),e(" \u2014 The values you input when you configured the operation."),t("br"),t("em",null,"(These configuration options are not stored on the data chain)"),e(".")]),t("li",null,[t("strong",null,"Payload"),e(" \u2014 Displays the data appended under this "),t("code",null,"<operationKey>"),e(".")])],-1),Wt=t("strong",null,"Options",-1),Bt=t("code",null,"message",-1),Vt=t("code",null,'"The last operation was a success"',-1),Ht=t("pre",null,[t("code",null,`{
44
44
  "message": "The last operation was a success"
45
45
  }
46
- `)],-1),Jt=t("div",{class:"warning hint"},[t("div",{class:"hint-title"},"Logs are stored in the database"),t("p",null,"Keep in mind that if you\u2019ve configured a flow to track logs, all this information is stored in the database. You may need to periodically delete this data.")],-1),Gt=t("div",{class:"tip hint"},[t("div",{class:"hint-title"},"Where is `$last`?"),t("p",null,[e("You may notice "),t("code",null,"$last"),e(" is not in the Logs. Remember, "),t("code",null,"$last"),e(" constantly updates to store the data of the most recently executed operation. The log shows the results of the entire flow. Therefore "),t("code",null,"$last"),e(" would simply be the very last operation in the flow.")])],-1),Mt=t("div",{class:"tip hint"},[t("div",{class:"hint-title"},"More on Debugging"),t("p",null,[e("You may find a tool like "),t("a",{href:"https://www.postman.com/",target:"_blank",rel:"noopener noreferrer"},"Postman"),e(" quite helpful for viewing data and debugging flows.")])],-1),Zt="Flows",te=!1,ee="Flows enable custom, event-driven data processing and task automation within Directus. Each flow is composed of one trigger, followed by a series of operations.",ne="5 min read",oe={__name:"flows",setup(Ut,{expose:i}){const a={title:"Flows",modularExtension:!1,description:"Flows enable custom, event-driven data processing and task automation within Directus. Each flow is composed of one trigger, followed by a series of operations.",readTime:"5 min read"};return i({frontmatter:a}),(zt,Qt)=>{const o=l("router-link"),c=l("docs-wrapper");return r(),d(c,{frontmatter:a},{default:n(()=>[t("div",u,[h,t("div",p,[g,t("p",null,[e("Please be sure to see the "),s(o,{to:"/docs/getting-started/quickstart.md"},{default:n(()=>[e("Quickstart Guide")]),_:1}),e(" to get a basic overview of the platform.")])]),t("div",f,[w,t("p",null,[e("There is also dedicated API documentation on "),s(o,{to:"/docs/reference/system/flows"},{default:n(()=>[e("Flows")]),_:1}),e(" and "),s(o,{to:"/docs/reference/system/operations"},{default:n(()=>[e("Operations")]),_:1}),e(".")])]),_,m,y,b,t("p",null,[e("Each flow begins with a "),s(o,{to:"/docs/configuration/flows/triggers"},{default:n(()=>[e("trigger")]),_:1}),e(", which defines the action or event that starts the Flow. This action or event could be some type of transaction within the app, an incoming webhook, a cron job, etc.")]),v,t("p",null,[e("An "),s(o,{to:"/docs/configuration/flows/operations"},{default:n(()=>[e("operation")]),_:1}),e(" is an action or process performed within the flow. These enable you to manage data: "),j,e(".")]),k,x,t("div",T,[C,t("p",null,[e("You can even develop your own "),s(o,{to:"/docs/extensions/operations.md"},{default:n(()=>[e("custom operations")]),_:1}),e(" to fit any use-case.")])]),F,A,$,t("p",null,[e("Not every operation that executes in a flow does so successfully. In some cases, your operations are going to fail. Perhaps an operation tried to access data that doesn\u2019t exist, or a webhook operation fails for some reason, or perhaps you set a "),s(o,{to:"/docs/configuration/flows/operations.md#condition"},{default:n(()=>[e("condition")]),_:1}),e(" operation, which "),D,e(" when its condition is not met.")]),E,N,O,S,I,L,Y,t("div",K,[t("p",null,[e("To learn more, see the section below on "),q,e(" as well as the "),s(o,{to:"/docs/configuration/activity-log.html"},{default:n(()=>[e("Activity Log")]),_:1}),e(" documentation.")])]),R,t("ol",P,[t("li",null,[e("Click "),W,e(" to navigate to "),B,e(". Select a "),s(o,{to:"/docs/configuration/flows/triggers"},{default:n(()=>[e("trigger")]),_:1}),e(" type and configure as desired.")]),V]),H,J,t("ol",G,[M,t("li",null,[e("Choose a "),U,e(", an "),s(o,{to:"/docs/configuration/flows/operations"},{default:n(()=>[e("operation")]),_:1}),e(" type, and configure as desired."),z,e(" Directus will convert the name into a unique operation key, used on the "),Q,e("."),X,e(" If you don\u2019t choose a name, the system will auto-generate a name and key for you.")]),Z,tt,et,nt,ot,st,at]),lt,it,ct,rt,dt,ut,ht,pt,gt,ft,wt,_t,mt,yt,bt,vt,jt,kt,xt,Tt,Ct,Ft,At,$t,t("div",Dt,[t("p",null,[e("To perform computations on flow data, use the "),s(o,{to:"/docs/configuration/flows/operations.md#script"},{default:n(()=>[e("script operation")]),_:1}),e(" or a "),s(o,{to:"/docs/configuration/flows/operations.md#webhook"},{default:n(()=>[e("webhook")]),_:1}),e(".")])]),Et,Nt,Ot,St,It,Lt,Yt,Kt,qt,Rt,Pt,t("p",null,[e("Remember, the "),s(o,{to:"/docs/configuration/flows/operations.md#log-to-console"},{default:n(()=>[e("Log to Console")]),_:1}),e(" operation is a key debugging tool. It does not append data to the data chain. You will view your log message under "),Wt,e(". Therefore, anything you log will always be displayed as nested under a "),Bt,e(" key. For example, if you decide to log "),Vt,e(", it will be displayed as:")]),Ht,Jt,Gt,Mt])]),_:1})}}};export{oe as default,ee as description,te as modularExtension,ne as readTime,Zt as title};
46
+ `)],-1),Jt=t("div",{class:"warning hint"},[t("div",{class:"hint-title"},"Logs are stored in the database"),t("p",null,"Keep in mind that if you\u2019ve configured a flow to track logs, all this information is stored in the database. You may need to periodically delete this data.")],-1),zt=t("div",{class:"tip hint"},[t("div",{class:"hint-title"},"Where is `$last`?"),t("p",null,[e("You may notice "),t("code",null,"$last"),e(" is not in the Logs. Remember, "),t("code",null,"$last"),e(" constantly updates to store the data of the most recently executed operation. The log shows the results of the entire flow. Therefore "),t("code",null,"$last"),e(" would simply be the very last operation in the flow.")])],-1),Gt=t("div",{class:"tip hint"},[t("div",{class:"hint-title"},"More on Debugging"),t("p",null,[e("You may find a tool like "),t("a",{href:"https://www.postman.com/",target:"_blank",rel:"noopener noreferrer"},"Postman"),e(" quite helpful for viewing data and debugging flows.")])],-1),Zt="Flows",te=!1,ee="Flows enable custom, event-driven data processing and task automation within Directus. Each flow is composed of one trigger, followed by a series of operations.",ne="5 min read",oe={__name:"flows",setup(Mt,{expose:i}){const a={title:"Flows",modularExtension:!1,description:"Flows enable custom, event-driven data processing and task automation within Directus. Each flow is composed of one trigger, followed by a series of operations.",readTime:"5 min read"};return i({frontmatter:a}),(Ut,Qt)=>{const o=l("router-link"),c=l("docs-wrapper");return r(),d(c,{frontmatter:a},{default:n(()=>[t("div",u,[h,t("div",p,[g,t("p",null,[e("Please be sure to see the "),s(o,{to:"/docs/getting-started/quickstart.md"},{default:n(()=>[e("Quickstart Guide")]),_:1}),e(" to get a basic overview of the platform.")])]),t("div",f,[w,t("p",null,[e("There is also dedicated API documentation on "),s(o,{to:"/docs/reference/system/flows"},{default:n(()=>[e("Flows")]),_:1}),e(" and "),s(o,{to:"/docs/reference/system/operations"},{default:n(()=>[e("Operations")]),_:1}),e(".")])]),_,m,y,b,t("p",null,[e("Each flow begins with a "),s(o,{to:"/docs/configuration/flows/triggers"},{default:n(()=>[e("trigger")]),_:1}),e(", which defines the action or event that starts the Flow. This action or event could be some type of transaction within the app, an incoming webhook, a cron job, etc.")]),v,t("p",null,[e("An "),s(o,{to:"/docs/configuration/flows/operations"},{default:n(()=>[e("operation")]),_:1}),e(" is an action or process performed within the flow. These enable you to manage data: "),j,e(".")]),k,x,t("div",T,[C,t("p",null,[e("You can even develop your own "),s(o,{to:"/docs/extensions/operations.md"},{default:n(()=>[e("custom operations")]),_:1}),e(" to fit any use-case.")])]),F,A,$,t("p",null,[e("Not every operation that executes in a flow does so successfully. In some cases, your operations are going to fail. Perhaps an operation tried to access data that doesn\u2019t exist, or a webhook operation fails for some reason, or perhaps you set a "),s(o,{to:"/docs/configuration/flows/operations.md#condition"},{default:n(()=>[e("condition")]),_:1}),e(" operation, which "),D,e(" when its condition is not met.")]),E,N,O,S,I,L,Y,t("div",K,[t("p",null,[e("To learn more, see the section below on "),q,e(" as well as the "),s(o,{to:"/docs/configuration/activity-log.html"},{default:n(()=>[e("Activity Log")]),_:1}),e(" documentation.")])]),R,t("ol",P,[t("li",null,[e("Click "),W,e(" to navigate to "),B,e(". Select a "),s(o,{to:"/docs/configuration/flows/triggers"},{default:n(()=>[e("trigger")]),_:1}),e(" type and configure as desired.")]),V]),H,J,t("ol",z,[G,t("li",null,[e("Choose a "),M,e(", an "),s(o,{to:"/docs/configuration/flows/operations"},{default:n(()=>[e("operation")]),_:1}),e(" type, and configure as desired."),U,e(" Directus will convert the name into a unique operation key, used on the "),Q,e("."),X,e(" If you don\u2019t choose a name, the system will auto-generate a name and key for you.")]),Z,tt,et,nt,ot,st,at]),lt,it,ct,rt,dt,ut,ht,pt,gt,ft,wt,_t,mt,yt,bt,vt,jt,kt,xt,Tt,Ct,Ft,At,$t,t("div",Dt,[t("p",null,[e("To perform computations on flow data, use the "),s(o,{to:"/docs/configuration/flows/operations.md#script"},{default:n(()=>[e("script operation")]),_:1}),e(" or a "),s(o,{to:"/docs/configuration/flows/operations.md#webhook"},{default:n(()=>[e("webhook")]),_:1}),e(".")])]),Et,Nt,Ot,St,It,Lt,Yt,Kt,qt,Rt,Pt,t("p",null,[e("Remember, the "),s(o,{to:"/docs/configuration/flows/operations.md#log-to-console"},{default:n(()=>[e("Log to Console")]),_:1}),e(" operation is a key debugging tool. It does not append data to the data chain. You will view your log message under "),Wt,e(". Therefore, anything you log will always be displayed as nested under a "),Bt,e(" key. For example, if you decide to log "),Vt,e(", it will be displayed as:")]),Ht,Jt,zt,Gt])]),_:1})}}};export{oe as default,ee as description,te as modularExtension,ne as readTime,Zt as title};