@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.
- package/dist/assets/@directus_extensions-sdk.7480601b.entry.js +1 -0
- package/dist/assets/{accounts.8d02a534.js → accounts.6f69dc83.js} +1 -1
- package/dist/assets/active-line.f3bab3a5.js +1 -0
- package/dist/assets/{activity-log.957853bb.js → activity-log.2e944bfa.js} +1 -1
- package/dist/assets/{activity.58bbe1c2.js → activity.dda3417f.js} +1 -1
- package/dist/assets/apl.1805b26f.js +1 -0
- package/dist/assets/{ar-SA.3a51ad1e.js → ar-SA.c5ee16de.js} +1 -1
- package/dist/assets/{architecture.0ded5b28.js → architecture.e66cc597.js} +1 -1
- package/dist/assets/asciiarmor.ffaf0f62.js +1 -0
- package/dist/assets/asn.1.cd62dee4.js +1 -0
- package/dist/assets/asterisk.07d1e4af.js +1 -0
- package/dist/assets/{authentication.5b7d5fa7.js → authentication.8a718856.js} +5 -5
- package/dist/assets/autorefresh.e63fec5a.js +1 -0
- package/dist/assets/{aws.890dfda5.js → aws.99d49c74.js} +1 -1
- package/dist/assets/{backing-directus.7f54a4af.js → backing-directus.23aeddff.js} +1 -1
- package/dist/assets/brainfuck.587235ad.js +1 -0
- package/dist/assets/{cli.4e995657.js → cli.8e7d9b17.js} +4 -4
- package/dist/assets/{cli.bf0b2442.js → cli.ce3a6393.js} +2 -2
- package/dist/assets/clike.8df07672.js +1 -0
- package/dist/assets/clojure.7ed940f7.js +1 -0
- package/dist/assets/{cloudron.0a16f34b.js → cloudron.0cf18005.js} +1 -1
- package/dist/assets/cmake.8058664d.js +1 -0
- package/dist/assets/cobol.7925af76.js +1 -0
- package/dist/assets/{codebase-overview.2ba91a80.js → codebase-overview.4707b17a.js} +1 -1
- package/dist/assets/coffeescript.36666708.js +1 -0
- package/dist/assets/{collections.7fa07fe7.js → collections.30500b8b.js} +2 -2
- package/dist/assets/{collections.2a61805a.js → collections.88058903.js} +2 -2
- package/dist/assets/{collections.ea858bf6.js → collections.b74ab838.js} +3 -3
- package/dist/assets/commonlisp.ce672eb5.js +1 -0
- package/dist/assets/{conditions.32339903.js → conditions.db9bebfc.js} +1 -1
- package/dist/assets/{config-options.53449c2c.js → config-options.48260929.js} +12 -12
- package/dist/assets/{content.18716bf7.js → content.647b054c.js} +1 -1
- package/dist/assets/{creating-extensions.0a6d6d3b.js → creating-extensions.e032c2f0.js} +3 -3
- package/dist/assets/crystal.3c7c09cc.js +1 -0
- package/dist/assets/css.b68c041b.js +1 -0
- package/dist/assets/cypher.3b38874c.js +4 -0
- package/dist/assets/d.0460be39.js +1 -0
- package/dist/assets/dart.680bdb1d.js +1 -0
- package/dist/assets/{data-model.b5eb7565.js → data-model.63af932c.js} +3 -3
- package/dist/assets/de-DE.590d3c70.js +1 -0
- package/dist/assets/diff.11dadb16.js +1 -0
- package/dist/assets/{digitalocean-app-platform.4063d6cc.js → digitalocean-app-platform.adb9fc63.js} +2 -2
- package/dist/assets/{display-templates.65a9b519.js → display-templates.7c1dae6d.js} +1 -1
- package/dist/assets/display.87df21d6.js +1 -0
- package/dist/assets/{displays.b72d546c.js → displays.c0024804.js} +5 -5
- package/dist/assets/django.c5c2bb33.js +1 -0
- package/dist/assets/{docker.ae6227ab.js → docker.a790e063.js} +1 -1
- package/dist/assets/dockerfile.cb57c90a.js +1 -0
- package/dist/assets/{documentation.6628aaac.js → documentation.1783cd53.js} +1 -1
- package/dist/assets/dtd.4bdd906a.js +1 -0
- package/dist/assets/dylan.af09e3f8.js +1 -0
- package/dist/assets/ebnf.0ec983c0.js +1 -0
- package/dist/assets/ecl.eeba0610.js +1 -0
- package/dist/assets/eiffel.d9fec659.js +1 -0
- package/dist/assets/elm.c3ce2b54.js +1 -0
- package/dist/assets/{email-templates.5e1b5472.js → email-templates.ed708d89.js} +1 -1
- package/dist/assets/{endpoints.44874916.js → endpoints.10a1484a.js} +1 -1
- package/dist/assets/erlang.d00fab30.js +1 -0
- package/dist/assets/es-419.37d0e1bd.js +1 -0
- package/dist/assets/{extensions.9790f6ff.js → extensions.d542042f.js} +1 -1
- package/dist/assets/factor.a6dddf2c.js +1 -0
- package/dist/assets/{faq.0fd5ca6e.js → faq.8904941c.js} +2 -2
- package/dist/assets/fcl.0c78a020.js +1 -0
- package/dist/assets/{field-types.e5bd5900.js → field-types.e3e041fc.js} +1 -1
- package/dist/assets/{field.b9b55fc2.js → field.64c29e0b.js} +1 -1
- package/dist/assets/{fields.fc8af154.js → fields.1597bfad.js} +1 -1
- package/dist/assets/{fields.7df6f624.js → fields.c76c2d8b.js} +1 -1
- package/dist/assets/{file-library.7a11d866.js → file-library.8fb3da43.js} +1 -1
- package/dist/assets/{files.84b41f2f.js → files.d8e3acf4.js} +2 -2
- package/dist/assets/{filter-rules.099e9689.js → filter-rules.edb18765.js} +4 -4
- package/dist/assets/{filters.98d31bd5.js → filters.26e88a50.js} +1 -1
- package/dist/assets/{flows.b6ebb4b6.js → flows.8c6f69bb.js} +6 -6
- package/dist/assets/{flows.2646c3ae.js → flows.f014b9cc.js} +2 -2
- package/dist/assets/{folders.35cfde90.js → folders.8aec87f5.js} +5 -5
- package/dist/assets/forth.fbb63d06.js +1 -0
- package/dist/assets/fortran.cbc14824.js +1 -0
- package/dist/assets/fr-FR.d8dbf5de.js +1 -0
- package/dist/assets/gas.3e3eaaa0.js +1 -0
- package/dist/assets/{gcp.ce76381f.js → gcp.97542e88.js} +5 -5
- package/dist/assets/gfm.a5597fec.js +1 -0
- package/dist/assets/gherkin.9cfc1ed7.js +1 -0
- package/dist/assets/{github-ci.b4dde47f.js → github-ci.e7d15770.js} +2 -2
- package/dist/assets/{glossary.3b14c64d.js → glossary.beaf358c.js} +1 -1
- package/dist/assets/{glossary.930fe38e.js → glossary.c972e836.js} +1 -1
- package/dist/assets/go.f180871e.js +1 -0
- package/dist/assets/groovy.4db995a9.js +1 -0
- package/dist/assets/haml.ed77ce51.js +1 -0
- package/dist/assets/handlebars.81504d91.js +1 -0
- package/dist/assets/haskell-literate.d54dc9c7.js +1 -0
- package/dist/assets/haskell.f21c4399.js +1 -0
- package/dist/assets/haxe.50f0db0c.js +1 -0
- package/dist/assets/{hooks.b9909639.js → hooks.feaad058.js} +1 -1
- package/dist/assets/htmlembedded.5ff69a18.js +1 -0
- package/dist/assets/htmlmixed.5efed62b.js +1 -0
- package/dist/assets/{htmlmixed.bca09a1b.js → htmlmixed.f69cc072.js} +1 -1
- package/dist/assets/http.6b260d22.js +1 -0
- package/dist/assets/hu-HU.b086156a.js +1 -0
- package/dist/assets/idl.617214c8.js +1 -0
- package/dist/assets/{iis.63d75601.js → iis.0358929d.js} +1 -1
- package/dist/assets/{import-export.fe680598.js → import-export.391b74e0.js} +2 -2
- package/dist/assets/{index.ffcfdc79.js → index.04b73e2f.js} +1 -1
- package/dist/assets/{index.3ccb1a62.js → index.09845961.js} +1 -1
- package/dist/assets/{index.671547c3.js → index.130287f6.js} +1 -1
- package/dist/assets/{index.3d4f0091.css → index.19e6c20c.css} +1 -1
- package/dist/assets/{index.20179e31.js → index.1ba23fe5.js} +1 -1
- package/dist/assets/{index.f19e5b18.js → index.1f330fc3.js} +1 -1
- package/dist/assets/{index.7f210d25.js → index.24999c03.js} +1 -1
- package/dist/assets/{index.06aaef91.entry.js → index.312f2c91.entry.js} +2693 -2687
- package/dist/assets/{index.b242e4b8.js → index.31f6e6f2.js} +3 -3
- package/dist/assets/{index.7c5199ad.js → index.330c3aee.js} +1 -1
- package/dist/assets/{index.549a82a6.js → index.3470f134.js} +1 -1
- package/dist/assets/index.38d152bf.js +1 -0
- package/dist/assets/{index.a6c65314.js → index.4044e5c7.js} +1 -1
- package/dist/assets/{index.764b9d6e.js → index.4706b3f5.js} +1 -1
- package/dist/assets/{index.875a771b.js → index.4b24f075.js} +1 -1
- package/dist/assets/{index.6949d989.js → index.4c6e76b7.js} +1 -1
- package/dist/assets/{index.0d7f4d79.js → index.522f44b0.js} +1 -1
- package/dist/assets/{index.1c9cfeb8.js → index.525d8fd8.js} +1 -1
- package/dist/assets/{index.d8e4727e.js → index.528e4b54.js} +1 -1
- package/dist/assets/{index.d9e48160.js → index.52a4297c.js} +1 -1
- package/dist/assets/{index.34c47fcf.js → index.530fd584.js} +1 -1
- package/dist/assets/{index.91e98759.js → index.546018df.js} +1 -1
- package/dist/assets/{index.d557b36c.js → index.57542755.js} +1 -1
- package/dist/assets/{index.425c965c.js → index.5a8952da.js} +1 -1
- package/dist/assets/{index.9b6db0de.js → index.5cf97c2b.js} +1 -1
- package/dist/assets/index.65e5d28f.css +1 -0
- package/dist/assets/{index.08c5d5a2.js → index.6b77e807.js} +1 -1
- package/dist/assets/{index.393b7fd6.js → index.6bf3a163.js} +1 -1
- package/dist/assets/{index.fe4bc374.js → index.6c07a132.js} +1 -1
- package/dist/assets/{index.1f99dc82.js → index.6c4fabf1.js} +1 -1
- package/dist/assets/{index.7468a23c.js → index.6fa71870.js} +1 -1
- package/dist/assets/{index.8fb3c07f.js → index.7045dfad.js} +1 -1
- package/dist/assets/{index.aa66a39f.js → index.75ef0473.js} +1 -1
- package/dist/assets/{index.c3959367.js → index.77b8f02e.js} +1 -1
- package/dist/assets/{index.62e48e8e.js → index.7943fd38.js} +1 -1
- package/dist/assets/{index.ac96f5b3.js → index.7c5b74dc.js} +1 -1
- package/dist/assets/{index.f32d0fbe.js → index.7de5db57.js} +1 -1
- package/dist/assets/{index.8aa50b59.js → index.7e90d361.js} +1 -1
- package/dist/assets/{index.2399ffb8.js → index.7edb8b15.js} +1 -1
- package/dist/assets/{index.d370fafd.js → index.7fcf2b86.js} +1 -1
- package/dist/assets/{index.5c5acddc.js → index.80106d2d.js} +1 -1
- package/dist/assets/{index.8b8e6073.js → index.804b3c9b.js} +1 -1
- package/dist/assets/{index.5264aa26.js → index.8063dc25.js} +1 -1
- package/dist/assets/{index.eb772cab.js → index.81a02f8c.js} +1 -1
- package/dist/assets/{index.38e5dfc6.js → index.81d5b763.js} +1 -1
- package/dist/assets/{index.7269b9b7.js → index.8200528c.js} +1 -1
- package/dist/assets/{index.00acb7aa.js → index.82939b3a.js} +1 -1
- package/dist/assets/{index.d024a491.js → index.8446e18c.js} +1 -1
- package/dist/assets/index.87afb869.js +1 -0
- package/dist/assets/{index.7e37814b.js → index.92f59a75.js} +1 -1
- package/dist/assets/{index.3abfd687.js → index.98cb4ee1.js} +1 -1
- package/dist/assets/{index.486669b9.js → index.9d2fbf00.js} +1 -1
- package/dist/assets/{index.ec87e7f6.js → index.9dfe292c.js} +1 -1
- package/dist/assets/{index.4ce96101.js → index.a1b7be9b.js} +1 -1
- package/dist/assets/{index.1b594a21.js → index.a5356d91.js} +1 -1
- package/dist/assets/{index.b67fb5fc.js → index.ab4e5ca3.js} +1 -1
- package/dist/assets/{index.f511aff3.js → index.ab7b6cba.js} +1 -1
- package/dist/assets/{index.578c30ec.js → index.ac6c3fe9.js} +1 -1
- package/dist/assets/{index.5062f951.js → index.adc560cb.js} +1 -1
- package/dist/assets/{index.045e97f0.js → index.ae4bf6ea.js} +1 -1
- package/dist/assets/{index.9f69b190.js → index.aeaa0aa9.js} +1 -1
- package/dist/assets/{index.8b9e43f4.js → index.afc6b30e.js} +1 -1
- package/dist/assets/{index.23def130.js → index.b02dbd39.js} +1 -1
- package/dist/assets/{index.3cb24d7f.js → index.b391672d.js} +1 -1
- package/dist/assets/{index.19a506a0.js → index.b503f187.js} +1 -1
- package/dist/assets/{index.a88d2d0b.js → index.b7113e87.js} +1 -1
- package/dist/assets/{index.7bb84aa5.js → index.c156c46e.js} +1 -1
- package/dist/assets/{index.68337c85.js → index.c5e16ef6.js} +1 -1
- package/dist/assets/{index.45686201.js → index.c85c3f77.js} +1 -1
- package/dist/assets/{index.03886e4a.js → index.cb7799d1.js} +1 -1
- package/dist/assets/{index.eb4d5cbc.js → index.cb93c1e8.js} +1 -1
- package/dist/assets/{index.dc4d9b6a.js → index.d0d998a0.js} +1 -1
- package/dist/assets/{index.c2858d95.js → index.d790d684.js} +1 -1
- package/dist/assets/{index.a264494d.js → index.dc9006a1.js} +1 -1
- package/dist/assets/{index.8130aabc.js → index.e3619b04.js} +1 -1
- package/dist/assets/{index.ab5ebdc3.js → index.e4224764.js} +1 -1
- package/dist/assets/{index.426d219b.js → index.e5079c3a.js} +1 -1
- package/dist/assets/{index.90ecf353.js → index.e6971ab1.js} +1 -1
- package/dist/assets/{index.b2e447e3.js → index.e85bc569.js} +1 -1
- package/dist/assets/{index.42614221.js → index.e95b7e4b.js} +1 -1
- package/dist/assets/{index.0608a502.js → index.ec8cfaac.js} +1 -1
- package/dist/assets/{index.b0e3c55c.js → index.f2e26d1f.js} +1 -1
- package/dist/assets/{index.eecb0d4b.js → index.f60d22d0.js} +1 -1
- package/dist/assets/{index.a8b94b31.js → index.f828781f.js} +1 -1
- package/dist/assets/{index.2b61f9fb.js → index.fb6b1657.js} +1 -1
- package/dist/assets/{index.9c4a7f65.js → index.fb8023b0.js} +1 -1
- package/dist/assets/{index.79264a03.js → index.fe536421.js} +1 -1
- package/dist/assets/{input-rich-text-html.9a04a626.js → input-rich-text-html.b1656039.js} +30 -30
- package/dist/assets/{insights.bb6e6dd9.js → insights.8a1beae6.js} +2 -2
- package/dist/assets/{installation.a80b7bdd.js → installation.2db8d0e1.js} +1 -1
- package/dist/assets/{interface.6b3d318d.js → interface.8e4a64f0.js} +1 -1
- package/dist/assets/{interfaces.9c9cb203.js → interfaces.8e88b01f.js} +4 -4
- package/dist/assets/{introduction.17ce0958.js → introduction.2a0882fe.js} +4 -4
- package/dist/assets/{introduction.74d5f276.js → introduction.42a2136e.js} +1 -1
- package/dist/assets/{introduction.2b473cdb.js → introduction.4f0ccbaf.js} +1 -1
- package/dist/assets/{introduction.23bcca02.js → introduction.dbd85d4e.js} +1 -1
- package/dist/assets/it-IT.53711e9b.js +1 -0
- package/dist/assets/{items.a200a734.js → items.9f358fa7.js} +5 -5
- package/dist/assets/{items.d9558b12.js → items.abb8d314.js} +1 -1
- package/dist/assets/javascript-hint.bd3c0fcf.js +1 -0
- package/dist/assets/javascript.7eff1543.js +1 -0
- package/dist/assets/jinja2.eec1b998.js +1 -0
- package/dist/assets/jsx.8808ecb1.js +1 -0
- package/dist/assets/julia.56479fbf.js +1 -0
- package/dist/assets/{layouts.71139077.js → layouts.9c64beac.js} +3 -3
- package/dist/assets/{layouts.67e010c3.js → layouts.b4771384.js} +1 -1
- package/dist/assets/livescript.37040ed1.js +1 -0
- package/dist/assets/lua.7730f9fd.js +1 -0
- package/dist/assets/{manual.be26c257.js → manual.4a53ccfe.js} +4 -4
- package/dist/assets/mark-selection.c1a5d4e1.js +1 -0
- package/dist/assets/match-highlighter.ed7a2467.js +1 -0
- package/dist/assets/{matchbrackets.9e20b864.js → matchbrackets.ebc48bf8.js} +1 -1
- package/dist/assets/mathematica.1dbfb6f4.js +1 -0
- package/dist/assets/mbox.0ac8a216.js +1 -0
- package/dist/assets/{migrations.58c8fd96.js → migrations.2969a369.js} +1 -1
- package/dist/assets/mirc.1cc06f67.js +1 -0
- package/dist/assets/mllike.cee4eaf7.js +1 -0
- package/dist/assets/modelica.2292d0b8.js +1 -0
- package/dist/assets/{modules.0cfbe882.js → modules.f057fcd0.js} +3 -3
- package/dist/assets/mscgen.38b6bb11.js +1 -0
- package/dist/assets/multiplex.1d92e024.js +3 -0
- package/dist/assets/mumps.f37c25cb.js +1 -0
- package/dist/assets/nginx.39e016a3.js +1 -0
- package/dist/assets/{notifications.7b442623.js → notifications.ca876814.js} +11 -11
- package/dist/assets/nsis.1cf932c7.js +1 -0
- package/dist/assets/ntriples.e6c37d71.js +1 -0
- package/dist/assets/octave.2bec4045.js +1 -0
- package/dist/assets/{operations.bd173669.js → operations.246298bc.js} +11 -11
- package/dist/assets/{operations.6fcceb98.js → operations.64af444f.js} +3 -3
- package/dist/assets/{operations.30bbad94.js → operations.b4042de2.js} +2 -2
- package/dist/assets/overlay.16f98fb6.js +1 -0
- package/dist/assets/{overview.cb1196c4.js → overview.0b4ab371.js} +1 -1
- package/dist/assets/{overview.4c1683c3.js → overview.359f9713.js} +1 -1
- package/dist/assets/{overview.23ad824a.js → overview.40893677.js} +1 -1
- package/dist/assets/oz.8955a131.js +1 -0
- package/dist/assets/{panels.187b8f0d.js → panels.3969b423.js} +2 -2
- package/dist/assets/pascal.7213d964.js +1 -0
- package/dist/assets/pegjs.6877c220.js +1 -0
- package/dist/assets/perl.7f37e0c4.js +1 -0
- package/dist/assets/{permissions.2ad2e118.js → permissions.0712320e.js} +4 -4
- package/dist/assets/php.b63c0c50.js +1 -0
- package/dist/assets/pig.1cddd148.js +1 -0
- package/dist/assets/{pinia.24c7b35a.entry.js → pinia.0d44ec62.entry.js} +2 -2
- package/dist/assets/{plesk.279941fc.js → plesk.e3ea514c.js} +5 -5
- package/dist/assets/powershell.3aecbe91.js +1 -0
- package/dist/assets/{presets-bookmarks.62ac9314.js → presets-bookmarks.0baf10eb.js} +1 -1
- package/dist/assets/{presets.0390ff92.js → presets.0de7849a.js} +8 -8
- package/dist/assets/{project-settings.8b91aa04.js → project-settings.6e5956c8.js} +1 -1
- package/dist/assets/{projects.97bc15fa.js → projects.12d7a177.js} +1 -1
- package/dist/assets/properties.db539b03.js +1 -0
- package/dist/assets/protobuf.0fa0e9b4.js +1 -0
- package/dist/assets/pt-BR.2c2e8c4f.js +1 -0
- package/dist/assets/pug.e6d33f3a.js +1 -0
- package/dist/assets/puppet.18346b43.js +1 -0
- package/dist/assets/python.065d28e0.js +1 -0
- package/dist/assets/q.ed3c142c.js +1 -0
- package/dist/assets/{query.19ee7756.js → query.6dcece55.js} +1 -1
- package/dist/assets/{quickstart.96d7fa17.js → quickstart.f1c431cf.js} +3 -3
- package/dist/assets/{quickstart.7f55e26e.js → quickstart.fd328631.js} +2 -2
- package/dist/assets/r.f2ad8682.js +1 -0
- package/dist/assets/{readme.abb2691e.js → readme.c063616b.js} +1 -1
- package/dist/assets/{relations.1409faa0.js → relations.c92ebc4e.js} +6 -6
- package/dist/assets/{relationship.8e3bc45d.js → relationship.0344c790.js} +1 -1
- package/dist/assets/{relationships.2449eed5.js → relationships.ad2ee267.js} +7 -7
- package/dist/assets/{resources.f9b64d6f.js → resources.84b84252.js} +1 -1
- package/dist/assets/{revisions.7ffa76fe.js → revisions.39f423d0.js} +4 -4
- package/dist/assets/ro-RO.4c33f715.js +1 -0
- package/dist/assets/{roles.ce6518a4.js → roles.89c51107.js} +7 -7
- package/dist/assets/rpm.1674f668.js +1 -0
- package/dist/assets/rst.0a69f626.js +1 -0
- package/dist/assets/ruby.02498746.js +1 -0
- package/dist/assets/{ruby.514cda97.js → ruby.d805273a.js} +1 -1
- package/dist/assets/{running-locally.8b135453.js → running-locally.24e1b4bf.js} +6 -6
- package/dist/assets/runtime-core.esm-bundler.22ec0346.js +1 -0
- package/dist/assets/rust.90ce6688.js +1 -0
- package/dist/assets/sas.3b045c8d.js +1 -0
- package/dist/assets/sass.4fcb9b12.js +1 -0
- package/dist/assets/{schema.6649576e.js → schema.c326d911.js} +1 -1
- package/dist/assets/scheme.eb7abc5c.js +1 -0
- package/dist/assets/{sdk.33dcc072.js → sdk.2fdc3788.js} +17 -17
- package/dist/assets/{security.acb2be94.js → security.a0326c54.js} +1 -1
- package/dist/assets/{server.60bfa539.js → server.5b19042c.js} +1 -1
- package/dist/assets/{settings.6ac3895b.js → settings.2195b191.js} +1 -1
- package/dist/assets/{settings.a00aa4fa.js → settings.2553780f.js} +1 -1
- package/dist/assets/{shares.9a7ea736.js → shares.a17e644c.js} +1 -1
- package/dist/assets/shell.09d717f3.js +1 -0
- package/dist/assets/show-hint.4fc17cec.js +1 -0
- package/dist/assets/sieve.fe87517f.js +1 -0
- package/dist/assets/slim.76f6114d.js +1 -0
- package/dist/assets/smalltalk.eaf13594.js +1 -0
- package/dist/assets/smarty.abf4421d.js +1 -0
- package/dist/assets/solr.62208f30.js +1 -0
- package/dist/assets/soy.b2db807b.js +1 -0
- package/dist/assets/sparql.7042a2b3.js +1 -0
- package/dist/assets/spreadsheet.ca1422ad.js +1 -0
- package/dist/assets/sql.fcb976c5.js +1 -0
- package/dist/assets/{sso-examples.eb3ba478.js → sso-examples.8a36c968.js} +2 -2
- package/dist/assets/{sso.29d67116.js → sso.92e5b5f1.js} +4 -4
- package/dist/assets/stex.30c4dc01.js +1 -0
- package/dist/assets/{stex.dd8072e9.js → stex.a5fe2e4a.js} +1 -1
- package/dist/assets/stylus.f7fcee76.js +1 -0
- package/dist/assets/{support.e9e535b3.js → support.f153d4ae.js} +1 -1
- package/dist/assets/swift.116cdb17.js +1 -0
- package/dist/assets/tcl.42613799.js +1 -0
- package/dist/assets/{teams.347f0563.js → teams.c564c81f.js} +1 -1
- package/dist/assets/textile.4285b886.js +1 -0
- package/dist/assets/{themes.32a50b86.js → themes.6c5c943f.js} +2 -2
- package/dist/assets/tiddlywiki.eb66e0c7.js +1 -0
- package/dist/assets/tiki.c796e616.js +1 -0
- package/dist/assets/toml.3b8b1e04.js +1 -0
- package/dist/assets/tornado.89f4bce8.js +1 -0
- package/dist/assets/tr-TR.328a2546.js +1 -0
- package/dist/assets/{translation-strings.285d6bb2.js → translation-strings.326a2741.js} +1 -1
- package/dist/assets/translations.4c0efc6a.js +1 -0
- package/dist/assets/{translations.f87a601e.js → translations.645f8c9c.js} +1 -1
- package/dist/assets/{triggers.325e50d8.js → triggers.44703cf0.js} +1 -1
- package/dist/assets/troff.51ba9964.js +1 -0
- package/dist/assets/ttcn-cfg.62ff9e40.js +1 -0
- package/dist/assets/ttcn.08f34f21.js +1 -0
- package/dist/assets/turtle.2efc3e1b.js +1 -0
- package/dist/assets/twig.bd0ee3cd.js +1 -0
- package/dist/assets/{ubuntu.3ba252fe.js → ubuntu.47e06de3.js} +2 -2
- package/dist/assets/uk-UA.fe247137.js +1 -0
- package/dist/assets/{upgrades-migrations.a091b8af.js → upgrades-migrations.a23cace7.js} +1 -1
- package/dist/assets/{use-sync.d9160f34.js → use-sync.e83d9ab3.js} +3 -3
- package/dist/assets/{user-directory.9ca05985.js → user-directory.e1f15d1a.js} +1 -1
- package/dist/assets/{users-roles-permissions.bb71f6c9.js → users-roles-permissions.14757490.js} +1 -1
- package/dist/assets/{users.a44125e3.js → users.0ea4e372.js} +1 -1
- package/dist/assets/{utilities.0380c496.js → utilities.c76e17ac.js} +7 -7
- package/dist/assets/validation.99c6fcd4.js +1 -0
- package/dist/assets/vb.e77c04f4.js +1 -0
- package/dist/assets/vbscript.b1155c12.js +1 -0
- package/dist/assets/velocity.5f33a92c.js +1 -0
- package/dist/assets/verilog.064306e8.js +1 -0
- package/dist/assets/vhdl.c71b4d0c.js +1 -0
- package/dist/assets/{vue-i18n.df8d89e7.entry.js → vue-i18n.fbc77449.entry.js} +1 -1
- package/dist/assets/vue-router.3a828e63.entry.js +5 -0
- package/dist/assets/vue.1a8f18be.js +1 -0
- package/dist/assets/vue.486f3e62.entry.js +1 -0
- package/dist/assets/vue.runtime.esm-bundler.f6138180.js +1 -0
- package/dist/assets/wast.7970d24f.js +1 -0
- package/dist/assets/{webhooks.2d23be4c.js → webhooks.105c0454.js} +1 -1
- package/dist/assets/{webhooks.40d9a7a3.js → webhooks.d7f419fe.js} +4 -4
- package/dist/assets/webidl.f56d782e.js +1 -0
- package/dist/assets/{xml.6c641966.js → xml.c9106c48.js} +1 -1
- package/dist/assets/xquery.d326f7d2.js +1 -0
- package/dist/assets/yacas.aab21d14.js +1 -0
- package/dist/assets/yaml-frontmatter.c4684bee.js +1 -0
- package/dist/assets/yaml.02beca9a.js +1 -0
- package/dist/assets/z80.2c343a72.js +1 -0
- package/dist/assets/{zh-CN.a9e8d795.js → zh-CN.a8f9e881.js} +1 -1
- package/dist/index.html +8 -8
- package/package.json +61 -61
- package/dist/assets/@directus_extensions-sdk.fd0e4213.entry.js +0 -1
- package/dist/assets/active-line.6ad3cc1b.js +0 -1
- package/dist/assets/apl.c686918c.js +0 -1
- package/dist/assets/asciiarmor.461dfa97.js +0 -1
- package/dist/assets/asn.1.edf36206.js +0 -1
- package/dist/assets/asterisk.ec604180.js +0 -1
- package/dist/assets/autorefresh.12942f0a.js +0 -1
- package/dist/assets/brainfuck.f0a9ac27.js +0 -1
- package/dist/assets/clike.6813c8af.js +0 -1
- package/dist/assets/clojure.282c98e9.js +0 -1
- package/dist/assets/cmake.3a19ac2e.js +0 -1
- package/dist/assets/cobol.1a968dc2.js +0 -1
- package/dist/assets/coffeescript.f4d04eff.js +0 -1
- package/dist/assets/commonlisp.b6ce4697.js +0 -1
- package/dist/assets/crystal.c82fbe0e.js +0 -1
- package/dist/assets/css.f5233cc9.js +0 -1
- package/dist/assets/cypher.039d2c7c.js +0 -4
- package/dist/assets/d.9a180f99.js +0 -1
- package/dist/assets/dart.6eb5ddde.js +0 -1
- package/dist/assets/de-DE.ae6e5ffb.js +0 -1
- package/dist/assets/diff.5b316696.js +0 -1
- package/dist/assets/display.4a967445.js +0 -1
- package/dist/assets/django.6c78c8f8.js +0 -1
- package/dist/assets/dockerfile.99dfeb4b.js +0 -1
- package/dist/assets/dtd.0634c33c.js +0 -1
- package/dist/assets/dylan.8694ba80.js +0 -1
- package/dist/assets/ebnf.462b292d.js +0 -1
- package/dist/assets/ecl.3dbd76a1.js +0 -1
- package/dist/assets/eiffel.4ec3277b.js +0 -1
- package/dist/assets/elm.04561af7.js +0 -1
- package/dist/assets/erlang.4826206d.js +0 -1
- package/dist/assets/es-419.582d398a.js +0 -1
- package/dist/assets/factor.bc3247f5.js +0 -1
- package/dist/assets/fcl.9f2d1e59.js +0 -1
- package/dist/assets/forth.bd08c7e3.js +0 -1
- package/dist/assets/fortran.2ae538b0.js +0 -1
- package/dist/assets/fr-FR.fa3f9dfa.js +0 -1
- package/dist/assets/gas.01960520.js +0 -1
- package/dist/assets/gfm.8e7c0694.js +0 -1
- package/dist/assets/gherkin.c6599791.js +0 -1
- package/dist/assets/go.f623c1d3.js +0 -1
- package/dist/assets/groovy.b5a3df5c.js +0 -1
- package/dist/assets/haml.6302e530.js +0 -1
- package/dist/assets/handlebars.698c31d7.js +0 -1
- package/dist/assets/haskell-literate.d3ee41f3.js +0 -1
- package/dist/assets/haskell.e4bd92a1.js +0 -1
- package/dist/assets/haxe.db74ea0a.js +0 -1
- package/dist/assets/htmlembedded.67d9d54e.js +0 -1
- package/dist/assets/htmlmixed.f95449b1.js +0 -1
- package/dist/assets/http.16e0eb29.js +0 -1
- package/dist/assets/hu-HU.ff4d97e1.js +0 -1
- package/dist/assets/idl.fb34fd03.js +0 -1
- package/dist/assets/index.4ce1e26c.js +0 -1
- package/dist/assets/index.90515a60.css +0 -1
- package/dist/assets/index.a36c94c4.js +0 -1
- package/dist/assets/it-IT.5db21711.js +0 -1
- package/dist/assets/javascript-hint.835011a8.js +0 -1
- package/dist/assets/javascript.098ad3f4.js +0 -1
- package/dist/assets/jinja2.5d6e4ebc.js +0 -1
- package/dist/assets/jsx.9e86f9c1.js +0 -1
- package/dist/assets/julia.3d7819b8.js +0 -1
- package/dist/assets/livescript.d3e3ffd7.js +0 -1
- package/dist/assets/lua.dcc90e1a.js +0 -1
- package/dist/assets/mark-selection.555804b8.js +0 -1
- package/dist/assets/match-highlighter.d280d567.js +0 -1
- package/dist/assets/mathematica.a4cf7905.js +0 -1
- package/dist/assets/mbox.0118ba5e.js +0 -1
- package/dist/assets/mirc.f16a416b.js +0 -1
- package/dist/assets/mllike.8af83228.js +0 -1
- package/dist/assets/modelica.fff0e69c.js +0 -1
- package/dist/assets/mscgen.4f351ed7.js +0 -1
- package/dist/assets/multiplex.24637d75.js +0 -3
- package/dist/assets/mumps.b29547a0.js +0 -1
- package/dist/assets/nginx.0b30c51b.js +0 -1
- package/dist/assets/nsis.931674c1.js +0 -1
- package/dist/assets/ntriples.b3ee92f7.js +0 -1
- package/dist/assets/octave.9fa134a4.js +0 -1
- package/dist/assets/overlay.7325085f.js +0 -1
- package/dist/assets/oz.418a19b3.js +0 -1
- package/dist/assets/pascal.abc2efea.js +0 -1
- package/dist/assets/pegjs.533a8931.js +0 -1
- package/dist/assets/perl.b0843cce.js +0 -1
- package/dist/assets/php.c4294507.js +0 -1
- package/dist/assets/pig.9e076d83.js +0 -1
- package/dist/assets/powershell.9163521a.js +0 -1
- package/dist/assets/properties.7389537c.js +0 -1
- package/dist/assets/protobuf.3ba8f801.js +0 -1
- package/dist/assets/pt-BR.c51763f3.js +0 -1
- package/dist/assets/pug.b98726b9.js +0 -1
- package/dist/assets/puppet.c2c7aecb.js +0 -1
- package/dist/assets/python.672ad786.js +0 -1
- package/dist/assets/q.58e35d92.js +0 -1
- package/dist/assets/r.86a12cf3.js +0 -1
- package/dist/assets/ro-RO.52802a17.js +0 -1
- package/dist/assets/rpm.057276c6.js +0 -1
- package/dist/assets/rst.3911d824.js +0 -1
- package/dist/assets/ruby.4ca30934.js +0 -1
- package/dist/assets/runtime-core.esm-bundler.fe249c5c.js +0 -4
- package/dist/assets/rust.f8f204a0.js +0 -1
- package/dist/assets/sas.b027b508.js +0 -1
- package/dist/assets/sass.6778645c.js +0 -1
- package/dist/assets/scheme.7d2fc5ef.js +0 -1
- package/dist/assets/shell.586a365e.js +0 -1
- package/dist/assets/show-hint.294aed89.js +0 -1
- package/dist/assets/sieve.76492164.js +0 -1
- package/dist/assets/slim.b75d75fc.js +0 -1
- package/dist/assets/smalltalk.c3811c1d.js +0 -1
- package/dist/assets/smarty.7ad51fee.js +0 -1
- package/dist/assets/solr.bc858702.js +0 -1
- package/dist/assets/soy.3523b082.js +0 -1
- package/dist/assets/sparql.23f67405.js +0 -1
- package/dist/assets/spreadsheet.fa0c4509.js +0 -1
- package/dist/assets/sql.e5dcae4e.js +0 -1
- package/dist/assets/stex.9edbeb3d.js +0 -1
- package/dist/assets/stylus.71868f10.js +0 -1
- package/dist/assets/swift.141c772a.js +0 -1
- package/dist/assets/tcl.e5b16da9.js +0 -1
- package/dist/assets/textile.0ba58239.js +0 -1
- package/dist/assets/tiddlywiki.cd3e074b.js +0 -1
- package/dist/assets/tiki.8884b81d.js +0 -1
- package/dist/assets/toml.0b104a38.js +0 -1
- package/dist/assets/tornado.ca0dd624.js +0 -1
- package/dist/assets/tr-TR.1dcfd6d4.js +0 -1
- package/dist/assets/translations.074feb87.js +0 -1
- package/dist/assets/troff.ceff2948.js +0 -1
- package/dist/assets/ttcn-cfg.20ce326a.js +0 -1
- package/dist/assets/ttcn.348a5af1.js +0 -1
- package/dist/assets/turtle.a74dd24d.js +0 -1
- package/dist/assets/twig.103f6c63.js +0 -1
- package/dist/assets/uk-UA.99a7a7a6.js +0 -1
- package/dist/assets/validation.cb080608.js +0 -1
- package/dist/assets/vb.9bd07f67.js +0 -1
- package/dist/assets/vbscript.f266487f.js +0 -1
- package/dist/assets/velocity.b63b2da2.js +0 -1
- package/dist/assets/verilog.94262bc9.js +0 -1
- package/dist/assets/vhdl.89bc6c80.js +0 -1
- package/dist/assets/vue-router.805cb517.entry.js +0 -5
- package/dist/assets/vue.c7dd8317.entry.js +0 -1
- package/dist/assets/vue.e839556b.js +0 -1
- package/dist/assets/vue.runtime.esm-bundler.eb605ed6.js +0 -1
- package/dist/assets/wast.077750a6.js +0 -1
- package/dist/assets/webidl.4f90cc6b.js +0 -1
- package/dist/assets/xquery.1f517ebf.js +0 -1
- package/dist/assets/yacas.5d349152.js +0 -1
- package/dist/assets/yaml-frontmatter.744c0030.js +0 -1
- package/dist/assets/yaml.41d6e7e9.js +0 -1
- package/dist/assets/z80.7e67c12c.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{y as w}from"./index.312f2c91.entry.js";function z(f,x){for(var c=0;c<x.length;c++){const l=x[c];if(typeof l!="string"&&!Array.isArray(l)){for(const u in l)if(u!=="default"&&!(u in f)){const i=Object.getOwnPropertyDescriptor(l,u);i&&Object.defineProperty(f,u,i.get?i:{enumerable:!0,get:()=>l[u]})}}}return Object.freeze(Object.defineProperty(f,Symbol.toStringTag,{value:"Module"}))}var v={exports:{}};(function(f,x){(function(c){c(w.exports)})(function(c){c.defineMode("q",function(l){var u=l.indentUnit,i,a=m(["abs","acos","aj","aj0","all","and","any","asc","asin","asof","atan","attr","avg","avgs","bin","by","ceiling","cols","cor","cos","count","cov","cross","csv","cut","delete","deltas","desc","dev","differ","distinct","div","do","each","ej","enlist","eval","except","exec","exit","exp","fby","fills","first","fkeys","flip","floor","from","get","getenv","group","gtime","hclose","hcount","hdel","hopen","hsym","iasc","idesc","if","ij","in","insert","inter","inv","key","keys","last","like","list","lj","load","log","lower","lsq","ltime","ltrim","mavg","max","maxs","mcount","md5","mdev","med","meta","min","mins","mmax","mmin","mmu","mod","msum","neg","next","not","null","or","over","parse","peach","pj","plist","prd","prds","prev","prior","rand","rank","ratios","raze","read0","read1","reciprocal","reverse","rload","rotate","rsave","rtrim","save","scan","select","set","setenv","show","signum","sin","sqrt","ss","ssr","string","sublist","sum","sums","sv","system","tables","tan","til","trim","txf","type","uj","ungroup","union","update","upper","upsert","value","var","view","views","vs","wavg","where","where","while","within","wj","wj1","wsum","xasc","xbar","xcol","xcols","xdesc","xexp","xgroup","xkey","xlog","xprev","xrank"]),k=/[|/&^!+:\\\-*%$=~#;@><,?_\'\"\[\(\]\)\s{}]/;function m(e){return new RegExp("^("+e.join("|")+")$")}function d(e,n){var o=e.sol(),t=e.next();if(i=null,o){if(t=="/")return(n.tokenize=g)(e,n);if(t=="\\")return e.eol()||/\s/.test(e.peek())?(e.skipToEnd(),/^\\\s*$/.test(e.current())?(n.tokenize=y)(e):n.tokenize=d,"comment"):(n.tokenize=d,"builtin")}if(/\s/.test(t))return e.peek()=="/"?(e.skipToEnd(),"comment"):"whitespace";if(t=='"')return(n.tokenize=b)(e,n);if(t=="`")return e.eatWhile(/[A-Za-z\d_:\/.]/),"symbol";if(t=="."&&/\d/.test(e.peek())||/\d/.test(t)){var r=null;return e.backUp(1),e.match(/^\d{4}\.\d{2}(m|\.\d{2}([DT](\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)?)?)/)||e.match(/^\d+D(\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)/)||e.match(/^\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?/)||e.match(/^\d+[ptuv]{1}/)?r="temporal":(e.match(/^0[NwW]{1}/)||e.match(/^0x[\da-fA-F]*/)||e.match(/^[01]+[b]{1}/)||e.match(/^\d+[chijn]{1}/)||e.match(/-?\d*(\.\d*)?(e[+\-]?\d+)?(e|f)?/))&&(r="number"),r&&(!(t=e.peek())||k.test(t))?r:(e.next(),"error")}return/[A-Za-z]|\./.test(t)?(e.eatWhile(/[A-Za-z._\d]/),a.test(e.current())?"keyword":"variable"):/[|/&^!+:\\\-*%$=~#;@><\.,?_\']/.test(t)||/[{}\(\[\]\)]/.test(t)?null:"error"}function g(e,n){return e.skipToEnd(),/\/\s*$/.test(e.current())?(n.tokenize=h)(e,n):n.tokenize=d,"comment"}function h(e,n){var o=e.sol()&&e.peek()=="\\";return e.skipToEnd(),o&&/^\\\s*$/.test(e.current())&&(n.tokenize=d),"comment"}function y(e){return e.skipToEnd(),"comment"}function b(e,n){for(var o=!1,t,r=!1;t=e.next();){if(t=='"'&&!o){r=!0;break}o=!o&&t=="\\"}return r&&(n.tokenize=d),"string"}function p(e,n,o){e.context={prev:e.context,indent:e.indent,col:o,type:n}}function s(e){e.indent=e.context.indent,e.context=e.context.prev}return{startState:function(){return{tokenize:d,context:null,indent:0,col:0}},token:function(e,n){e.sol()&&(n.context&&n.context.align==null&&(n.context.align=!1),n.indent=e.indentation());var o=n.tokenize(e,n);if(o!="comment"&&n.context&&n.context.align==null&&n.context.type!="pattern"&&(n.context.align=!0),i=="(")p(n,")",e.column());else if(i=="[")p(n,"]",e.column());else if(i=="{")p(n,"}",e.column());else if(/[\]\}\)]/.test(i)){for(;n.context&&n.context.type=="pattern";)s(n);n.context&&i==n.context.type&&s(n)}else i=="."&&n.context&&n.context.type=="pattern"?s(n):/atom|string|variable/.test(o)&&n.context&&(/[\}\]]/.test(n.context.type)?p(n,"pattern",e.column()):n.context.type=="pattern"&&!n.context.align&&(n.context.align=!0,n.context.col=e.column()));return o},indent:function(e,n){var o=n&&n.charAt(0),t=e.context;if(/[\]\}]/.test(o))for(;t&&t.type=="pattern";)t=t.prev;var r=t&&o==t.type;return t?t.type=="pattern"?t.col:t.align?t.col+(r?0:1):t.indent+(r?0:u):0}}}),c.defineMIME("text/x-q","q")})})();const j=v.exports,q=z({__proto__:null,default:j},[v.exports]);export{q};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as s,o as r,
|
|
1
|
+
import{a as s,o as r,e as d,y as l,u as e,q as t,z as c}from"./runtime-core.esm-bundler.22ec0346.js";const h={class:"markdown-body"},u=e("blockquote",null,[e("p",null,"Most Directus API Endpoint operations can be manipulated with the following parameters. It is important to understand them to get the most out of the platform.")],-1),p=e("ul",null,[e("li",null,[e("a",{href:"#fields"},"Fields")]),e("li",null,[e("a",{href:"#filter"},"Filter")]),e("li",null,[e("a",{href:"#search"},"Search")]),e("li",null,[e("a",{href:"#sort"},"Sort")]),e("li",null,[e("a",{href:"#limit"},"Limit")]),e("li",null,[e("a",{href:"#offset"},"Offset"),t(" / "),e("a",{href:"#page"},"Page")]),e("li",null,[e("a",{href:"#aggregation-grouping"},"Aggregation & Grouping")]),e("li",null,[e("a",{href:"#deep"},"Deep")]),e("li",null,[e("a",{href:"#aliases"},"Aliases")]),e("li",null,[e("a",{href:"#export"},"Export")]),e("li",null,[e("a",{href:"#functions"},"Functions")]),e("li",null,[e("a",{href:"#metadata"},"Metadata"),e("ul",null,[e("li",null,[e("a",{href:"#total-count"},"Total Count")]),e("li",null,[e("a",{href:"#filter-count"},"Filter Count")])])])],-1),_=e("hr",null,null,-1),f=e("h2",{id:"fields",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#fields"},"#"),t(" Fields")],-1),m=e("p",null,"Choose the fields that are returned in the current dataset. This parameter supports dot notation to request nested relational fields. You can also use a wildcard (*) to include all fields at a specific depth.",-1),g=e("h3",{id:"examples",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#examples"},"#"),t(" Examples")],-1),b=e("p",null,[t("Get all top-level fields"),e("br"),e("code",null,"*")],-1),y=e("p",null,[t("Get all top-level fields and all second-level relational fields"),e("br"),e("code",null,"*.*")],-1),j=e("div",{class:"tip hint"},[e("div",{class:"hint-title"},"Performance & Size"),e("p",null,[t("While the fields wildcard is very useful for debugging purposes, we recommend only requesting "),e("em",null,"specific"),t(" fields for production use. By only requesting the fields you really need, you can speed up the request, and reduce the overall output size.")])],-1),x=e("p",null,[t("Get all top-level fields and second-level relational fields within images"),e("br"),e("code",null,"*,images.*")],-1),v=e("p",null,[t("Get only the first_name and last_name fields"),e("br"),e("code",null,"first_name,last_name")],-1),w=e("p",null,[t("Get all top-level and second-level relational fields, and third-level fields within images.thumbnails"),e("br"),e("code",null,"*.*,images.thumbnails.*")],-1),q=e("h3",{id:"many-to-any-(union-types)",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#many-to-any-(union-types)"},"#"),t(" Many-To-Any (Union Types)")],-1),k=e("p",null,[t("Seeing that Many-to-Any (M2A) fields have nested data from multiple collections, it\u2019s not always safe / wanted to fetch the same field from every related collection. In M2A fields, you can use the following syntax to specify what fields to fetch from which related nested collection type:"),e("br"),e("code",null,"?fields=<m2a-field>:<collection-scope>.<field>"),t(".")],-1),G=e("p",null,[t("Lets say we have a collection "),e("code",null,"pages"),t(" with a many-to-any field called "),e("code",null,"sections"),t(" that points to "),e("code",null,"headings"),t(", "),e("code",null,"paragraphs"),t(", and "),e("code",null,"videos"),t(". We only want to fetch "),e("code",null,"title"),t(" and "),e("code",null,"level"),t(" from "),e("code",null,"headings"),t(", "),e("code",null,"body"),t(" from "),e("code",null,"paragraphs"),t(" and "),e("code",null,"source"),t(" from "),e("code",null,"videos"),t(". We can achieve that by using:")],-1),A=e("pre",null,[e("code",null,`sections.item:headings.title
|
|
2
2
|
sections.item:headings.level
|
|
3
3
|
sections.item:paragraphs.body
|
|
4
4
|
sections.item:videos.source
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as i,o as c,
|
|
1
|
+
import{a as i,o as c,e as d,y as s,u as t,q as e,z as n}from"./runtime-core.esm-bundler.22ec0346.js";const u={class:"markdown-body"},h=t("blockquote",null,[t("p",null,"If you\u2019re looking for the fastest way to get up-and-running with Directus, this guide will walk you through getting things installed, configured, and modeled.")],-1),p=t("h2",{id:"1.-installation",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#1.-installation"},"#"),e(" 1. Installation")],-1),_=t("p",null,[e("Make sure you have the latest LTS version or newer of "),t("a",{href:"https://nodejs.dev",target:"_blank",rel:"noopener noreferrer"},"Node.js"),e(" installed, and have a running database ready to connect to.")],-1),g=t("p",null,"Run the following command in your terminal and follow the prompts.",-1),m=t("pre",null,[t("code",{class:"language-bash"},`npm init directus-project example-project
|
|
2
2
|
`)],-1),f=t("p",null,"Choose SQLite from the list. Use up/down arrow keys to select the SQL type.",-1),b=t("pre",null,[t("code",{class:"language-bash"},`? Choose your database client SQLite
|
|
3
3
|
`)],-1),y=t("p",null,[e("After that a file path for "),t("code",null,"data.db"),e(", your database, will be suggested. Hit the enter key to stick with the default path.")],-1),w=t("pre",null,[t("code",{class:"language-bash"},`? Database File Path: <file-path>/example-project/data.db
|
|
4
4
|
`)],-1),v=t("p",null,"Next you\u2019ll set your username/email and password.",-1),k=t("pre",null,[t("code",{class:"language-bash"},`Create your first admin user:
|
|
@@ -9,7 +9,7 @@ import{a as i,o as c,b as d,w as s,l as t,E as e,e as n}from"./runtime-core.esm-
|
|
|
9
9
|
The configuration can be found in <file-path>/example-project/.env
|
|
10
10
|
`)],-1),I=t("p",null,[e("Once the installation is complete, you can start Directus by navigating to your project folder "),t("em",null,[e("(in this case "),t("code",null,"example-project"),e(")")]),e(" and running:")],-1),P=t("pre",null,[t("code",{class:"language-bash"},`npx directus start
|
|
11
11
|
`)],-1),C=t("p",null,"After that, you will see this message:",-1),D=t("pre",null,[t("code",{class:"language-bash"},`\u2728 Server started at http://localhost:8055
|
|
12
|
-
`)],-1),A=t("h4",{id:"other-options",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#other-options"},"#"),e(" Other Options")],-1),S=t("p",null,"When you link other types of SQL to Directus, you may have additional prompts:",-1),T=t("ul",null,[t("li",null,[t("strong",null,"Database Host"),e(" \u2013 IP address for your database.")]),t("li",null,[t("strong",null,"Port"),e(" \u2013 Port number your database is running on.")]),t("li",null,[t("strong",null,"Database Name"),e(" \u2013 Name of your existing database.")]),t("li",null,[t("strong",null,"Database User"),e(" \u2013 Name of existing user in database.")]),t("li",null,[t("strong",null,"Database Password"),e(" \u2013 Password to enter database.")]),t("li",null,[t("strong",null,"Enable SSL"),e(" \u2013 Select "),t("code",null,"Y"),e(" for yes or "),t("code",null,"N"),e(" for no.")]),t("li",null,[t("strong",null,"Root"),e(" \u2013 Provide the root name.")])],-1),N=t("p",null,"Simply configure these according to your project\u2019s needs.",-1),
|
|
12
|
+
`)],-1),A=t("h4",{id:"other-options",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#other-options"},"#"),e(" Other Options")],-1),S=t("p",null,"When you link other types of SQL to Directus, you may have additional prompts:",-1),T=t("ul",null,[t("li",null,[t("strong",null,"Database Host"),e(" \u2013 IP address for your database.")]),t("li",null,[t("strong",null,"Port"),e(" \u2013 Port number your database is running on.")]),t("li",null,[t("strong",null,"Database Name"),e(" \u2013 Name of your existing database.")]),t("li",null,[t("strong",null,"Database User"),e(" \u2013 Name of existing user in database.")]),t("li",null,[t("strong",null,"Database Password"),e(" \u2013 Password to enter database.")]),t("li",null,[t("strong",null,"Enable SSL"),e(" \u2013 Select "),t("code",null,"Y"),e(" for yes or "),t("code",null,"N"),e(" for no.")]),t("li",null,[t("strong",null,"Root"),e(" \u2013 Provide the root name.")])],-1),N=t("p",null,"Simply configure these according to your project\u2019s needs.",-1),q=t("div",{class:"warning hint"},[t("div",{class:"hint-title"},"Directus seeds your database"),t("p",null,"Directus installs a few dozen tables into the database it is linked to. However, this will not alter the pre-existing data tables.")],-1),F=t("h2",{id:"2.-login-to-app",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#2.-login-to-app"},"#"),e(" 2. Login to App")],-1),R=t("p",null,"With the server running, you\u2019re now able to login to your new Directus project and start using it.",-1),L=t("p",null,[e("Our start command stated that the server started at port "),t("code",null,"8055"),e(", which means we can navigate to "),t("code",null,"http://localhost:8055"),e(" to open Directus in the browser.")],-1),E=t("p",null,"Login using the admin credentials you configured during the installation in Step 1.",-1),M=t("h2",{id:"3.-create-a-collection",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#3.-create-a-collection"},"#"),e(" 3. Create a Collection")],-1),O=t("p",null,"Once logged in, you\u2019re greeted with the option to create your first Collection:",-1),Q=t("p",null,[t("img",{src:"https://cdn.directus.io/docs/v9/getting-started/quickstart/quickstart-20220217A/empty-state-20220217A.webp",alt:"Directus Empty State"})],-1),W=t("p",null,[e("Follow the prompts and create a Collection. For the sake of this demo, we\u2019ll be calling ours "),t("code",null,"articles"),e(", but feel free to make it your own!")],-1),B={class:"tip hint"},H=t("div",{class:"hint-title"},"More Info on Collections",-1),z=t("h2",{id:"4.-create-a-field",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#4.-create-a-field"},"#"),e(" 4. Create a Field")],-1),G=t("p",null,[e("With the Collection created, it\u2019s time to start adding some Fields. Click the "),t("strong",null,"\u201CCreate Field\u201D"),e(" button, and select "),t("strong",null,"\u201CInput\u201D"),e(":")],-1),U=t("video",{autoplay:"",playsinline:"",muted:"",loop:"",controls:""},[t("source",{src:"https://cdn.directus.io/docs/v9/getting-started/quickstart/quickstart-20220217A/add-field-20220217A.mp4",type:"video/mp4"})],-1),V=t("p",null,[e("We\u2019ll be calling our Field "),t("code",null,"title"),e(". While Directus offers a range of powerful field customization options, we\u2019ll be sticking to the defaults for now. These defaults use the \u201CString\u201D datatype.")],-1),Y={class:"tip hint"},J=t("div",{class:"hint-title"},"More Info on Fields",-1),K=t("h2",{id:"5.-create-an-item",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#5.-create-an-item"},"#"),e(" 5. Create an Item")],-1),X=t("p",null,[e("Now that we have a Collection with a Field configured, it\u2019s time to start adding some content. Navigate to the Content Module (top left), and click "),t("span",{mi:"",btn:""},"add"),e(" in the top-right to get started. This will take you to the Create/Edit Item page:")],-1),Z=t("p",null,[t("img",{src:"https://cdn.directus.io/docs/v9/getting-started/quickstart/quickstart-20220217A/create-item-20220217A.webp",alt:"Directus Create Item"})],-1),$=t("p",null,[e("Once you\u2019re happy with your creation, click "),t("span",{mi:"",btn:""},"check"),e(" in the top-right to save your Item to the database.")],-1),tt={class:"tip hint"},et=t("div",{class:"hint-title"},"More Info on Items",-1),st=t("h2",{id:"6.-set-role%2Fpublic-permissions",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#6.-set-role%2Fpublic-permissions"},"#"),e(" 6. Set Role/Public Permissions")],-1),ot=t("p",null,[e("By default, all content entered into Directus is considered private. This means that no data will be returned by the API, unless requested by an authenticated user that has the correct permissions. In order to have the API return our items, we\u2019ll have to setup some permissions. Navigate to "),t("strong",null,[e("Settings Module "),t("span",{mi:"",icon:"",dark:""},"chevron_right"),e(" Roles & Permissions")]),e(".")],-1),nt=t("p",null,[e("Directus ships with a special "),t("strong",null,"\u201CPublic\u201D"),e(" role that controls what data is returned to non-authenticated users. Select the Public Role, find your Collection, and click the icon under the "),t("span",{mi:"",icon:""},"visibility"),e(" icon (read/view permission) to allow the Public Role to read the Items in your Collection.")],-1),at=t("p",null,[t("img",{src:"https://cdn.directus.io/docs/v9/getting-started/quickstart/quickstart-20220217A/permissions-20220217A.webp",alt:"Directus Permissions"})],-1),it={class:"tip hint"},lt=t("div",{class:"hint-title"},"More Info on Roles & Permissions",-1),rt=t("h2",{id:"7.-connect-to-the-api",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#7.-connect-to-the-api"},"#"),e(" 7. Connect to the API")],-1),ct=t("code",null,"/items/",-1),dt=t("p",null,[e("Use your browser or an API tool like "),t("a",{href:"http://postman.com",target:"_blank",rel:"noopener noreferrer"},"Postman"),e(" or "),t("a",{href:"https://paw.cloud",target:"_blank",rel:"noopener noreferrer"},"Paw"),e(" to open "),t("code",null,"http://localhost:8055/items/articles"),e(".")],-1),ut=t("p",null,"And there it is! The Article Item you just created is being served in beautiful JSON, ready to be used anywhere and everywhere!",-1),ht=t("pre",null,[t("code",{class:"language-json"},[t("span",{class:"hljs-punctuation"},"{"),e(`
|
|
13
13
|
`),t("span",{class:"hljs-attr"},'"data"'),t("span",{class:"hljs-punctuation"},":"),e(),t("span",{class:"hljs-punctuation"},"["),e(`
|
|
14
14
|
`),t("span",{class:"hljs-punctuation"},"{"),e(`
|
|
15
15
|
`),t("span",{class:"hljs-attr"},'"id"'),t("span",{class:"hljs-punctuation"},":"),e(),t("span",{class:"hljs-number"},"1"),t("span",{class:"hljs-punctuation"},","),e(`
|
|
@@ -17,4 +17,4 @@ The configuration can be found in <file-path>/example-project/.env
|
|
|
17
17
|
`),t("span",{class:"hljs-punctuation"},"}"),e(`
|
|
18
18
|
`),t("span",{class:"hljs-punctuation"},"]"),e(`
|
|
19
19
|
`),t("span",{class:"hljs-punctuation"},"}"),e(`
|
|
20
|
-
`)])],-1),ft="Quickstart Guide",bt=!1,yt="If you're looking for the fastest way to get up-and-running with Directus, this guide will walk you through getting things installed, configured, and modeled.",wt="5 min read",vt={__name:"quickstart",setup(pt,{expose:l}){const a={title:"Quickstart Guide",modularExtension:!1,description:"If you're looking for the fastest way to get up-and-running with Directus, this guide will walk you through getting things installed, configured, and modeled.",readTime:"5 min read"};return l({frontmatter:a}),(_t,gt)=>{const o=i("router-link"),r=i("docs-wrapper");return c(),d(r,{frontmatter:a},{default:s(()=>[t("div",u,[h,p,_,g,m,f,b,y,w,v,k,j,x,I,P,C,D,A,S,T,N,F,
|
|
20
|
+
`)])],-1),ft="Quickstart Guide",bt=!1,yt="If you're looking for the fastest way to get up-and-running with Directus, this guide will walk you through getting things installed, configured, and modeled.",wt="5 min read",vt={__name:"quickstart",setup(pt,{expose:l}){const a={title:"Quickstart Guide",modularExtension:!1,description:"If you're looking for the fastest way to get up-and-running with Directus, this guide will walk you through getting things installed, configured, and modeled.",readTime:"5 min read"};return l({frontmatter:a}),(_t,gt)=>{const o=i("router-link"),r=i("docs-wrapper");return c(),d(r,{frontmatter:a},{default:s(()=>[t("div",u,[h,p,_,g,m,f,b,y,w,v,k,j,x,I,P,C,D,A,S,T,N,q,F,R,L,E,M,O,Q,W,t("div",B,[H,t("p",null,[e("To learn more, see our documentation "),n(o,{to:"/docs/app/content/collections"},{default:s(()=>[e("Collections")]),_:1}),e(".")])]),z,G,U,V,t("div",Y,[J,t("p",null,[e("To learn more, see our documentation on "),n(o,{to:"/docs/getting-started/glossary#fields"},{default:s(()=>[e("Fields")]),_:1}),e(".")])]),K,X,Z,$,t("div",tt,[et,t("p",null,[e("To learn more, see our documentation on "),n(o,{to:"/docs/app/content/items"},{default:s(()=>[e("Items")]),_:1}),e(".")])]),st,ot,nt,at,t("div",it,[lt,t("p",null,[e("Roles & Permissions are extremely powerful and can get pretty in-depth. To learn all about the nuances in setting these up, see "),n(o,{to:"/docs/reference/system/roles"},{default:s(()=>[e("Roles")]),_:1}),e(" & "),n(o,{to:"/docs/reference/system/permissions"},{default:s(()=>[e("Permissions")]),_:1}),e(".")])]),rt,t("p",null,[e("Now that your project has some content in it, it\u2019s time to start using this content externally. Data can be accessed in a number of ways, including the REST API, GraphQL, the CLI, or even straight from the database. In this case, we\u2019ll use "),n(o,{to:"/docs/reference/items"},{default:s(()=>[e("the "),ct,e(" REST API endpoint")]),_:1}),e(" to retrieve the item we just created.")]),dt,ut,ht])]),_:1})}}};export{vt as default,yt as description,bt as modularExtension,wt as readTime,ft as title};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as i,o as r,
|
|
1
|
+
import{a as i,o as r,e as d,y as o,u as e,q as t,z as l}from"./runtime-core.esm-bundler.22ec0346.js";const u={class:"markdown-body"},h=e("blockquote",null,[e("p",null,[t("This quickstart guide is designed to get you up and running with a Directus Cloud Project in a snap. Along the way, you will better understand what Directus is, setup your free Directus Cloud Account, get a "),e("em",null,"hands-on introduction"),t(" to the App and API, and find more resources to deep-dive into.")])],-1),p=e("h2",{id:"1.-create-cloud-account-and-login",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#1.-create-cloud-account-and-login"},"#"),t(" 1. Create Cloud Account and Login")],-1),m=e("video",{autoplay:"",playsinline:"",muted:"",loop:"",controls:""},[e("source",{src:"https://cdn.directus.io/docs/v9/getting-started/quickstart/quickstart-20220427A/create-account-and-login-20220427.mp4",type:"video/mp4"})],-1),_=e("a",{href:"https://directus.cloud/login",target:"_blank",rel:"noopener noreferrer"},"Directus Cloud",-1),g=e("p",null,"Your Directus Cloud Account allows you to create and manage any number of Community and Standard Projects. We\u2019ve made life easier by giving you the option to create and log in to your free Cloud Account automatically with GitHub. If you don\u2019t have a GitHub account or prefer not to use this login method, email-and-password login is available as well.",-1),f=e("p",null,"The very first time you log in to your cloud account, you will be prompted to create a Team. Teams are totally free to create. Each Directus Cloud Project exists within the scope of one Team. They allow you to organize Team Members, Projects and Project Billing as desired.",-1),y=e("p",null,"Once your Team is created, it\u2019s time to create your free Community Cloud Project!",-1),b={class:"tip hint"},w=e("div",{class:"hint-title"},"Learn More About Cloud",-1),v=e("h2",{id:"2.-create-and-access-project",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#2.-create-and-access-project"},"#"),t(" 2. Create and Access Project")],-1),C=e("video",{autoplay:"",playsinline:"",muted:"",loop:"",controls:""},[e("source",{src:"https://cdn.directus.io/docs/v9/getting-started/quickstart/quickstart-20220427A/create-and-access-project-20220427A.mp4",type:"video/mp4"})],-1),A=e("p",null,"To create a Community Project, follow the steps below:",-1),k=e("li",null,[t("Navigate to "),e("strong",null,"\u201CProjects\u201D"),t(" and click "),e("strong",null,"\u201CCreate Project\u201D"),t(".")],-1),P=e("li",null,"Set the Project Name.",-1),j=e("li",null,"Select the Community tier.",-1),I=e("li",null,[t("Scroll to the bottom of the screen and choose the "),e("strong",null,"\u201CEmpty Project\u201D"),t(" Starting Template."),e("br"),t(" Note: The "),e("strong",null,"\u201CDemo Project\u201D"),t(" adds in dummy data for in-depth feature demonstrations.")],-1),T=e("li",null,[t("Click "),e("strong",null,"\u201CCreate Project\u201D"),t(".")],-1),x=e("p",null,[e("em",null,"It should take around 90 seconds for the Cloud Project to build out. During this time, a link will be sent to the email associated with your Cloud Account. The email will contain your Project URL as well as an email and password to login. If you used GitHub to create your account, this will be your GitHub email. Once the build is complete, it\u2019s time log in!")],-1),D={start:"7"},S=e("li",null,"Log in with your username and password from the email.",-1),F=e("div",{class:"tip hint"},[e("div",{class:"hint-title"},"Check All Inbox Folders"),e("p",null,"Due to the algorithms used by some email providers, it is possible the email containing your Project login information will end up in another folder like \u201CSocial\u201D or \u201CPromotions\u201D.")],-1),M={class:"tip hint"},q=e("div",{class:"hint-title"},"Learn More About Cloud Projects",-1),L=e("h2",{id:"3.-create-a-collection",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#3.-create-a-collection"},"#"),t(" 3. Create a Collection")],-1),N=e("video",{autoplay:"",playsinline:"",muted:"",loop:"",controls:""},[e("source",{src:"https://cdn.directus.io/docs/v9/getting-started/quickstart/quickstart-20220427A/create-a-collection-20220427A.mp4",type:"video/mp4"})],-1),R=e("ol",null,[e("li",null,"Navigate into the Content Module."),e("li",null,[t("Click "),e("strong",null,"\u201CCreate Collection\u201D"),t(" and a side menu will appear.")]),e("li",null,[t("Fill in a "),e("strong",null,"Name"),t("."),e("br"),t(" For the sake of this demo, we\u2019ll call ours "),e("code",null,"articles"),t(", but feel free to make it your own!")]),e("li",null,[t("Leave the other options at default. Click "),e("span",{mi:"",btn:""},"arrow_forward"),t(" and the "),e("strong",null,"\u201COptional System Fields\u201D"),t(" menu will open."),e("br"),t(" Keep the values in this menu at the default, toggled off, for now. You can adjust them later.")]),e("li",null,[t("Click "),e("span",{mi:"",btn:""},"check"),t(" in the menu header.")])],-1),G={class:"tip hint"},O=e("div",{class:"hint-title"},"Learn More About Collections",-1),B=e("h2",{id:"4.-create-a-field",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#4.-create-a-field"},"#"),t(" 4. Create a Field")],-1),E=e("video",{autoplay:"",playsinline:"",muted:"",loop:"",controls:""},[e("source",{src:"https://cdn.directus.io/docs/v9/getting-started/quickstart/quickstart-20220427A/create-a-field-20220427A.mp4",type:"video/mp4"})],-1),H=e("ol",null,[e("li",null,[t("Navigate to "),e("strong",null,[t("Settings Module > Data Model > "),e("code",null,"Collection-Name")]),t(".")]),e("li",null,[t("Click the "),e("strong",null,"\u201CCreate Field\u201D"),t(" button and select the "),e("strong",null,"\u201CInput\u201D"),t(" Field type.")]),e("li",null,[t("Fill in a Field name under "),e("strong",null,"Key"),t(". We\u2019ll be calling our Field "),e("code",null,"title"),t("."),e("br"),t(" Directus offers powerful Field customization options, but let\u2019s stick to the defaults for now.")]),e("li",null,[t("Select "),e("strong",null,"\u201CSave\u201D"),t(".")])],-1),U={class:"tip hint"},z=e("div",{class:"hint-title"},"Learn More About Fields",-1),Q=e("h2",{id:"5.-create-an-item",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#5.-create-an-item"},"#"),t(" 5. Create an Item")],-1),V=e("video",{autoplay:"",playsinline:"",muted:"",loop:"",controls:""},[e("source",{src:"https://cdn.directus.io/docs/v9/getting-started/quickstart/quickstart-20220427A/create-an-item-20220427B.mp4",type:"video/mp4"})],-1),W=e("ol",null,[e("li",null,"Navigate to the Content Module."),e("li",null,[t("Click "),e("span",{mi:"",btn:""},"add"),t(" in the page header to open the Item Page.")]),e("li",null,"Fill in the Field Value(s) as desired."),e("li",null,[t("Click "),e("span",{mi:"",btn:""},"check"),t(" in the top-right to save your Item.")])],-1),Y={class:"tip hint"},K=e("div",{class:"hint-title"},"Learn More About Items",-1),J=e("h2",{id:"6.-set-roles-%26-permissions",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#6.-set-roles-%26-permissions"},"#"),t(" 6. Set Roles & Permissions")],-1),X=e("video",{autoplay:"",playsinline:"",muted:"",loop:"",controls:""},[e("source",{src:"https://cdn.directus.io/docs/v9/getting-started/quickstart/quickstart-20220427A/set-read-permissions-20220427A.mp4",type:"video/mp4"})],-1),Z=e("p",null,"Directus comes with two built-in roles: Public and Admin. The Public Role determines what data is returned to non-authenticated users. Public comes with all permissions turned off and can be reconfigured with fully granular control to expose exactly what you want unauthenticated Users to see. The Admin role has full permissions and this cannot be changed. Aside from these built-in Roles, any number of new Roles can be created, all with fully customized, granular permissions.",-1),$=e("p",null,[t("By Default, content entered into Directus will be considered private. So permissions always start off set to the default of "),e("span",{mi:"",icon:"",dngr:""},"block"),t(),e("strong",null,"No Access"),t(", with full ability to reconfigure as desired. So, in order to have the API return our Items, let\u2019s add some read permissions. For simplicity\u2019s sake, we\u2019ll do this on the Public Role, instead of creating a new Role.")],-1),ee=e("ol",null,[e("li",null,[t("Navigate to "),e("strong",null,"Settings Module > Roles & Permissions > Public"),t(".")]),e("li",null,[t("Click "),e("span",{mi:"",icon:"",dngr:""},"block"),t(" under the "),e("span",{mi:"",icon:""},"visibility"),t(" icon on the desired Collection."),e("br"),t(" In our case, the Collection name is "),e("code",null,"article"),t(".")]),e("li",null,[t("Click "),e("strong",null,"\u201CAll Access\u201D"),t(" to give the Public Role full read permissions to the Items in this Collection.")])],-1),te={class:"tip hint"},oe=e("div",{class:"hint-title"},"Learn More About Roles & Permissions",-1),ne=e("h2",{id:"7.-connect-to-the-api",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#7.-connect-to-the-api"},"#"),t(" 7. Connect to the API")],-1),le=e("code",null,"/items/",-1),se=e("ol",null,[e("li",null,[t("Open "),e("code",null,"http://your-project-url.directus.app/items/articles"),t("."),e("br"),t(" You can use the browser or an API tool like "),e("a",{href:"http://postman.com",target:"_blank",rel:"noopener noreferrer"},"Postman"),t(" or "),e("a",{href:"https://paw.cloud",target:"_blank",rel:"noopener noreferrer"},"Paw")])],-1),ie=e("p",null,[e("em",null,"And there it is! The Article Item you just created is being served in beautiful JSON, ready to be used anywhere and everywhere!")],-1),ae=e("pre",null,[e("code",{class:"language-json"},[e("span",{class:"hljs-punctuation"},"{"),t(`
|
|
2
2
|
`),e("span",{class:"hljs-attr"},'"data"'),e("span",{class:"hljs-punctuation"},":"),t(),e("span",{class:"hljs-punctuation"},"["),t(`
|
|
3
3
|
`),e("span",{class:"hljs-punctuation"},"{"),t(`
|
|
4
4
|
`),e("span",{class:"hljs-attr"},'"id"'),e("span",{class:"hljs-punctuation"},":"),t(),e("span",{class:"hljs-number"},"1"),e("span",{class:"hljs-punctuation"},","),t(`
|
|
@@ -6,4 +6,4 @@ import{a as i,o as r,b as d,w as o,l as e,E as t,e as l}from"./runtime-core.esm-
|
|
|
6
6
|
`),e("span",{class:"hljs-punctuation"},"}"),t(`
|
|
7
7
|
`),e("span",{class:"hljs-punctuation"},"]"),t(`
|
|
8
8
|
`),e("span",{class:"hljs-punctuation"},"}"),t(`
|
|
9
|
-
`)])],-1),ce=e("p",null,[e("em",null,"In this example, we made a super-simple read request with the API, but there\u2019s more! The REST and GraphQL APIs provide exhaustive endpoints for the data model and every single action that you can do in the App can be done via the API. In fact, the App is just a GUI powered by the API.")],-1),re={class:"tip hint"},de=e("div",{class:"hint-title"},"Learn More About The API",-1),_e="Quickstart Guide",ge=!1,fe="Get up and running with Directus Cloud in minutes. Learn the basics of building your data model and managing permissions.",ye="7 min read",be={__name:"quickstart",setup(ue,{expose:a}){const s={title:"Quickstart Guide",modularExtension:!1,description:"Get up and running with Directus Cloud in minutes. Learn the basics of building your data model and managing permissions.",readTime:"7 min read"};return a({frontmatter:s}),(he,pe)=>{const n=i("router-link"),c=i("docs-wrapper");return r(),d(c,{frontmatter:s},{default:o(()=>[e("div",u,[h,p,m,e("p",null,[t("First, you\u2019ll need to "),l(n,{to:"/docs/cloud/accounts#create-account-and-login"},{default:o(()=>[t("create an Account and log in")]),_:1}),t(" on "),_]),g,f,y,e("div",b,[w,e("ul",null,[e("li",null,[l(n,{to:"/docs/cloud/overview"},{default:o(()=>[t("Overview")]),_:1})]),e("li",null,[l(n,{to:"/docs/cloud/accounts"},{default:o(()=>[t("Cloud Accounts")]),_:1})]),e("li",null,[l(n,{to:"/docs/cloud/teams"},{default:o(()=>[t("Cloud Teams")]),_:1})])])]),v,C,A,e("ol",null,[e("li",null,[t("Open the Team Menu in the Dashboard Header and select or "),l(n,{to:"/docs/cloud/teams#create-a-team"},{default:o(()=>[t("create")]),_:1}),t(" the desired Team.")]),k,P,j,I,T]),x,e("ol",D,[e("li",null,[t("You can "),l(n,{to:"/docs/cloud/projects#access-a-project"},{default:o(()=>[t("access a Project")]),_:1}),t(" from within the Cloud Dashboard or type the URL into your browser.")]),S]),F,e("div",M,[q,e("ul",null,[e("li",null,[l(n,{to:"/docs/cloud/overview"},{default:o(()=>[t("Overview")]),_:1})]),e("li",null,[l(n,{to:"/docs/cloud/projects"},{default:o(()=>[t("Cloud Projects")]),_:1})])])]),L,N,e("p",null,[t("Once logged in, you\u2019re greeted with the option to create your first "),l(n,{to:"/docs/getting-started/glossary#collections"},{default:o(()=>[t("Collection")]),_:1}),t(".")]),R,e("div",G,[O,e("ul",null,[e("li",null,[l(n,{to:"/docs/app/content"},{default:o(()=>[t("The Content Module")]),_:1})]),e("li",null,[l(n,{to:"/docs/configuration/data-model/collections.md"},{default:o(()=>[t("Create and Manage a Collection")]),_:1})]),e("li",null,[l(n,{to:"/docs/configuration/data-model/relationships"},{default:o(()=>[t("Build Relationships Between Collections")]),_:1})])])]),B,E,e("p",null,[t("With your first Collection created, it\u2019s time to start adding some "),l(n,{to:"/docs/getting-started/glossary#fields"},{default:o(()=>[t("Fields")]),_:1}),t(".")]),H,e("div",U,[
|
|
9
|
+
`)])],-1),ce=e("p",null,[e("em",null,"In this example, we made a super-simple read request with the API, but there\u2019s more! The REST and GraphQL APIs provide exhaustive endpoints for the data model and every single action that you can do in the App can be done via the API. In fact, the App is just a GUI powered by the API.")],-1),re={class:"tip hint"},de=e("div",{class:"hint-title"},"Learn More About The API",-1),_e="Quickstart Guide",ge=!1,fe="Get up and running with Directus Cloud in minutes. Learn the basics of building your data model and managing permissions.",ye="7 min read",be={__name:"quickstart",setup(ue,{expose:a}){const s={title:"Quickstart Guide",modularExtension:!1,description:"Get up and running with Directus Cloud in minutes. Learn the basics of building your data model and managing permissions.",readTime:"7 min read"};return a({frontmatter:s}),(he,pe)=>{const n=i("router-link"),c=i("docs-wrapper");return r(),d(c,{frontmatter:s},{default:o(()=>[e("div",u,[h,p,m,e("p",null,[t("First, you\u2019ll need to "),l(n,{to:"/docs/cloud/accounts#create-account-and-login"},{default:o(()=>[t("create an Account and log in")]),_:1}),t(" on "),_]),g,f,y,e("div",b,[w,e("ul",null,[e("li",null,[l(n,{to:"/docs/cloud/overview"},{default:o(()=>[t("Overview")]),_:1})]),e("li",null,[l(n,{to:"/docs/cloud/accounts"},{default:o(()=>[t("Cloud Accounts")]),_:1})]),e("li",null,[l(n,{to:"/docs/cloud/teams"},{default:o(()=>[t("Cloud Teams")]),_:1})])])]),v,C,A,e("ol",null,[e("li",null,[t("Open the Team Menu in the Dashboard Header and select or "),l(n,{to:"/docs/cloud/teams#create-a-team"},{default:o(()=>[t("create")]),_:1}),t(" the desired Team.")]),k,P,j,I,T]),x,e("ol",D,[e("li",null,[t("You can "),l(n,{to:"/docs/cloud/projects#access-a-project"},{default:o(()=>[t("access a Project")]),_:1}),t(" from within the Cloud Dashboard or type the URL into your browser.")]),S]),F,e("div",M,[q,e("ul",null,[e("li",null,[l(n,{to:"/docs/cloud/overview"},{default:o(()=>[t("Overview")]),_:1})]),e("li",null,[l(n,{to:"/docs/cloud/projects"},{default:o(()=>[t("Cloud Projects")]),_:1})])])]),L,N,e("p",null,[t("Once logged in, you\u2019re greeted with the option to create your first "),l(n,{to:"/docs/getting-started/glossary#collections"},{default:o(()=>[t("Collection")]),_:1}),t(".")]),R,e("div",G,[O,e("ul",null,[e("li",null,[l(n,{to:"/docs/app/content"},{default:o(()=>[t("The Content Module")]),_:1})]),e("li",null,[l(n,{to:"/docs/configuration/data-model/collections.md"},{default:o(()=>[t("Create and Manage a Collection")]),_:1})]),e("li",null,[l(n,{to:"/docs/configuration/data-model/relationships"},{default:o(()=>[t("Build Relationships Between Collections")]),_:1})])])]),B,E,e("p",null,[t("With your first Collection created, it\u2019s time to start adding some "),l(n,{to:"/docs/getting-started/glossary#fields"},{default:o(()=>[t("Fields")]),_:1}),t(".")]),H,e("div",U,[z,e("ul",null,[e("li",null,[l(n,{to:"/docs/configuration/data-model"},{default:o(()=>[t("Create and Manage Fields in the App")]),_:1})])])]),Q,V,e("p",null,[t("Now that we have a Collection with a Field configured, it\u2019s time to add an "),l(n,{to:"/docs/getting-started/glossary#"},{default:o(()=>[t("Item")]),_:1}),t(".")]),W,e("div",Y,[K,e("ul",null,[e("li",null,[l(n,{to:"/docs/app/content"},{default:o(()=>[t("The Content Module")]),_:1})]),e("li",null,[l(n,{to:"/docs/app/content/items"},{default:o(()=>[t("The Item Page")]),_:1})])])]),J,X,Z,$,ee,e("div",te,[oe,e("ul",null,[e("li",null,[l(n,{to:"/docs/configuration/users-roles-permissions"},{default:o(()=>[t("Users, Roles and Permissions")]),_:1}),t(".")])])]),ne,e("p",null,[t("Now that your Project has some content in it which is exposed to the Public, it\u2019s time to start using this content externally! Data can be accessed in a number of ways, including the REST and GraphQL API endpoints. In this case, we\u2019ll use the "),le,t(),l(n,{to:"/docs/reference/items"},{default:o(()=>[t("REST API endpoint")]),_:1}),t(" to retrieve the Item we just created.")]),se,ie,ae,ce,e("div",re,[de,e("ul",null,[e("li",null,[l(n,{to:"/docs/reference/introduction"},{default:o(()=>[t("Intro to the API")]),_:1})]),e("li",null,[l(n,{to:"/docs/reference/sdk"},{default:o(()=>[t("JS SDK")]),_:1})])])])])]),_:1})}}};export{be as default,fe as description,ge as modularExtension,ye as readTime,_e as title};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{y as S}from"./index.312f2c91.entry.js";function U(a,d){for(var o=0;o<d.length;o++){const f=d[o];if(typeof f!="string"&&!Array.isArray(f)){for(const l in f)if(l!=="default"&&!(l in a)){const c=Object.getOwnPropertyDescriptor(f,l);c&&Object.defineProperty(a,l,c.get?c:{enumerable:!0,get:()=>f[l]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var _={exports:{}};(function(a,d){(function(o){o(S.exports)})(function(o){o.registerHelper("wordChars","r",/[\w.]/),o.defineMode("r",function(f){function l(e){for(var n={},r=0;r<e.length;++r)n[e[r]]=!0;return n}var c=["NULL","NA","Inf","NaN","NA_integer_","NA_real_","NA_complex_","NA_character_","TRUE","FALSE"],g=["list","quote","bquote","eval","return","call","parse","deparse"],k=["if","else","repeat","while","function","for","in","next","break"],A=["if","else","repeat","while","function","for"];o.registerHelper("hintWords","r",c.concat(g,k));var w=l(c),N=l(g),E=l(k),I=l(A),y=/[+\-*\/^<>=!&|~$:]/,t;function s(e,n){t=null;var r=e.next();if(r=="#")return e.skipToEnd(),"comment";if(r=="0"&&e.eat("x"))return e.eatWhile(/[\da-f]/i),"number";if(r=="."&&e.eat(/\d/))return e.match(/\d*(?:e[+\-]?\d+)?/),"number";if(/\d/.test(r))return e.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/),"number";if(r=="'"||r=='"')return n.tokenize=L(r),"string";if(r=="`")return e.match(/[^`]+`/),"variable-3";if(r=="."&&e.match(/.(?:[.]|\d+)/))return"keyword";if(/[a-zA-Z\.]/.test(r)){e.eatWhile(/[\w\.]/);var i=e.current();return w.propertyIsEnumerable(i)?"atom":E.propertyIsEnumerable(i)?(I.propertyIsEnumerable(i)&&!e.match(/\s*if(\s+|$)/,!1)&&(t="block"),"keyword"):N.propertyIsEnumerable(i)?"builtin":"variable"}else return r=="%"?(e.skipTo("%")&&e.next(),"operator variable-2"):r=="<"&&e.eat("-")||r=="<"&&e.match("<-")||r=="-"&&e.match(/>>?/)?"operator arrow":r=="="&&n.ctx.argList?"arg-is":y.test(r)?r=="$"?"operator dollar":(e.eatWhile(y),"operator"):/[\(\){}\[\];]/.test(r)?(t=r,r==";"?"semi":null):null}function L(e){return function(n,r){if(n.eat("\\")){var i=n.next();return i=="x"?n.match(/^[a-f0-9]{2}/i):(i=="u"||i=="U")&&n.eat("{")&&n.skipTo("}")?n.next():i=="u"?n.match(/^[a-f0-9]{4}/i):i=="U"?n.match(/^[a-f0-9]{8}/i):/[0-7]/.test(i)&&n.match(/^[0-7]{1,2}/),"string-2"}else{for(var u;(u=n.next())!=null;){if(u==e){r.tokenize=s;break}if(u=="\\"){n.backUp(1);break}}return"string"}}}var h=1,x=2,v=4;function p(e,n,r){e.ctx={type:n,indent:e.indent,flags:0,column:r.column(),prev:e.ctx}}function m(e,n){var r=e.ctx;e.ctx={type:r.type,indent:r.indent,flags:r.flags|n,column:r.column,prev:r.prev}}function b(e){e.indent=e.ctx.indent,e.ctx=e.ctx.prev}return{startState:function(){return{tokenize:s,ctx:{type:"top",indent:-f.indentUnit,flags:x},indent:0,afterIdent:!1}},token:function(e,n){if(e.sol()&&((n.ctx.flags&3)==0&&(n.ctx.flags|=x),n.ctx.flags&v&&b(n),n.indent=e.indentation()),e.eatSpace())return null;var r=n.tokenize(e,n);return r!="comment"&&(n.ctx.flags&x)==0&&m(n,h),(t==";"||t=="{"||t=="}")&&n.ctx.type=="block"&&b(n),t=="{"?p(n,"}",e):t=="("?(p(n,")",e),n.afterIdent&&(n.ctx.argList=!0)):t=="["?p(n,"]",e):t=="block"?p(n,"block",e):t==n.ctx.type?b(n):n.ctx.type=="block"&&r!="comment"&&m(n,v),n.afterIdent=r=="variable"||r=="keyword",r},indent:function(e,n){if(e.tokenize!=s)return 0;var r=n&&n.charAt(0),i=e.ctx,u=r==i.type;return i.flags&v&&(i=i.prev),i.type=="block"?i.indent+(r=="{"?0:f.indentUnit):i.flags&h?i.column+(u?0:1):i.indent+(u?0:f.indentUnit)},lineComment:"#"}}),o.defineMIME("text/x-rsrc","r")})})();const z=_.exports,j=U({__proto__:null,default:z},[_.exports]);export{j as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as l,o as s,
|
|
1
|
+
import{a as l,o as s,e as a,y as i,u as e,q as r}from"./runtime-core.esm-bundler.22ec0346.js";const u=e("div",{class:"markdown-body"},[e("p",{align:"center"},[e("img",{alt:"Directus Logo",src:"https://user-images.githubusercontent.com/522079/158864859-0fbeae62-9d7a-4619-b35e-f8fa5f68e0c8.png"})]),e("br"),e("h2",{id:"%F0%9F%90%B0-introduction",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#%F0%9F%90%B0-introduction"},"#"),r(" \u{1F430} Introduction")]),e("p",null,[r("This is the official documentation for the Directus data platform. These docs are also available via "),e("a",{href:"https://docs.directus.io",target:"_blank",rel:"noopener noreferrer"},"a public website"),r(".")]),e("p",null,[e("strong",null,[e("a",{href:"https://directus.io",target:"_blank",rel:"noopener noreferrer"},"Learn more about Directus")]),e("br"),r(),e("strong",null,[e("a",{href:"https://directus.cloud",target:"_blank",rel:"noopener noreferrer"},"Create your Free Project")])]),e("br"),e("h2",{id:"%F0%9F%A4%94-community-help",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#%F0%9F%A4%94-community-help"},"#"),r(" \u{1F914} Community Help")]),e("p",null,[e("a",{href:"https://docs.directus.io",target:"_blank",rel:"noopener noreferrer"},"The Directus Documentation"),r(" is a great place to start, or explore these other channels:")]),e("ul",null,[e("li",null,[e("a",{href:"https://directus.chat",target:"_blank",rel:"noopener noreferrer"},"Discord"),r(" (Live Discussions)")]),e("li",null,[e("a",{href:"https://github.com/directus/directus/issues",target:"_blank",rel:"noopener noreferrer"},"GitHub Issues"),r(" (Report Bugs)")]),e("li",null,[e("a",{href:"https://github.com/directus/directus/discussions",target:"_blank",rel:"noopener noreferrer"},"GitHub Discussions"),r(" (Questions, Feature Requests)")]),e("li",null,[e("a",{href:"https://twitter.com/directus",target:"_blank",rel:"noopener noreferrer"},"Twitter"),r(" (Latest News)")]),e("li",null,[e("a",{href:"https://www.youtube.com/c/DirectusVideos/featured",target:"_blank",rel:"noopener noreferrer"},"YouTube"),r(" (Video Tutorials)")])]),e("br"),e("h2",{id:"contributing",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#contributing"},"#"),r(" Contributing")]),e("blockquote",null,[e("p",null,[e("strong",null,"Note")]),e("p",null,[r("This project uses "),e("a",{href:"https://pnpm.io",target:"_blank",rel:"noopener noreferrer"},[e("code",null,"pnpm")]),r(" to manage the dependencies, install it if you haven\u2019t via "),e("code",null,"npm i -g pnpm"),r(".")])]),e("ol",null,[e("li",null,"Fork and clone the repo"),e("li",null,[r("Install the dependencies through "),e("code",null,"pnpm install")]),e("li",null,[r("Run the docs website by running "),e("code",null,"pnpm dev")])])],-1),f="null",b=!1,m={__name:"readme",setup(c,{expose:n}){const t={title:"null",modularExtension:!1};return n({frontmatter:t}),(p,d)=>{const o=l("docs-wrapper");return s(),a(o,{frontmatter:t},{default:i(()=>[u]),_:1})}}};export{m as default,b as modularExtension,f as title};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as n,o as c,
|
|
1
|
+
import{a as n,o as c,e as i,y as a,u as s,q as e,z as h}from"./runtime-core.esm-bundler.22ec0346.js";const d={class:"markdown-body"},p=s("hr",null,null,-1),u=s("h2",{id:"the-relation-object",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#the-relation-object"},"#"),e(" The Relation Object")],-1),_=s("p",null,[s("code",null,"collection"),e(),s("strong",null,"string"),s("br"),e(" Name of the collection. This matches the table name in the database.")],-1),j=s("p",null,[s("code",null,"field"),e(),s("strong",null,"string"),s("br"),e(" Name of the field that holds the related primary key. This matches the column name in the database.")],-1),g=s("p",null,[s("code",null,"related_collection"),e(),s("strong",null,"string"),s("br"),e(" Name of the related collection. This matches the table name in the database.")],-1),m=s("h4",{id:"meta",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#meta"},"#"),e(" Meta")],-1),f=s("p",null,"Directus metadata. Used to enable non-database relationship types",-1),b=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_relations"),e(".")],-1),y=s("p",null,[s("code",null,"many_collection"),e(),s("strong",null,"string"),s("br"),e(" Name of the collection. Matches the top level "),s("code",null,"collection"),e(" field.")],-1),x=s("p",null,[s("code",null,"many_field"),e(),s("strong",null,"string"),s("br"),e(" Name of the field. Matches the top level "),s("code",null,"field"),e(" field.")],-1),q=s("p",null,[s("code",null,"one_collection"),e(),s("strong",null,"string"),s("br"),e(" Name of the related collection. Matches the top level "),s("code",null,"related_collection"),e(" field.")],-1),T=s("p",null,[s("code",null,"one_field"),e(),s("strong",null,"string"),s("br"),e(" Name of the one to many field on the other side of the relation.")],-1),w=s("p",null,[s("code",null,"one_allowed_collections"),e(),s("strong",null,"string"),s("br"),e(" What collections are allowed to be used in a many-to-any context.")],-1),k=s("p",null,[s("code",null,"one_collection_field"),e(),s("strong",null,"string"),s("br"),e(" Field that holds the collection name in a many-to-any context.")],-1),E=s("p",null,[s("code",null,"one_deselect_action"),e(),s("strong",null,"nullify | delete"),s("br"),e(" Whether to nullify or delete related one-to-many records.")],-1),R=s("p",null,[s("code",null,"sort_field"),e(),s("strong",null,"string"),s("br"),e(" What field is used to hold the sort field.")],-1),P=s("p",null,[s("code",null,"junction_field"),e(),s("strong",null,"string"),s("br"),e(" What field connects two relations in a many-to-many (O2M-M2O) context.")],-1),S=s("h4",{id:"schema",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#schema"},"#"),e(" Schema")],-1),v=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.",-1),L=s("p",null,[s("code",null,"table"),e(),s("strong",null,"string"),s("br"),e(" The table name.")],-1),A=s("p",null,[s("code",null,"column"),e(),s("strong",null,"string"),s("br"),e(" The column name.")],-1),Q=s("p",null,[s("code",null,"foreign_key_table"),e(),s("strong",null,"string"),s("br"),e(" Related table name.")],-1),D=s("p",null,[s("code",null,"foreign_key_column"),e(),s("strong",null,"string"),s("br"),e(" Related column name.")],-1),N=s("p",null,[s("code",null,"constraint_name"),e(),s("strong",null,"string"),s("br"),e(" Name for the foreign key constraint.")],-1),G=s("p",null,[s("code",null,"on_update"),e(),s("strong",null,"string"),s("br"),e(" Update trigger for the foreign key constraint.")],-1),O=s("p",null,[s("code",null,"on_delete"),e(),s("strong",null,"string"),s("br"),e(" Delete trigger for the foreign key constraint.")],-1),I=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"},'"about_us"'),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"},'"logo"'),s("span",{class:"hljs-punctuation"},","),e(`
|
|
4
4
|
`),s("span",{class:"hljs-attr"},'"related_collection"'),s("span",{class:"hljs-punctuation"},":"),e(),s("span",{class:"hljs-string"},'"directus_files"'),s("span",{class:"hljs-punctuation"},","),e(`
|
|
@@ -47,8 +47,8 @@ import{a as n,o as c,b as i,w as a,l as s,E as e,e as h}from"./runtime-core.esm-
|
|
|
47
47
|
field
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
`)])],-1),ms=s("hr",null,null,-1),fs=s("h2",{id:"retrieve-a-relation",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#retrieve-a-relation"},"#"),e(" Retrieve a relation")],-1),bs=s("p",null,"List an existing relation by collection/field name.",-1),ys=s("h3",{id:"query-parameters-2",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#query-parameters-2"},"#"),e(" Query Parameters")],-1),xs=s("p",null,"Doesn\u2019t support any query parameters.",-1),qs=s("h3",{id:"returns-2",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#returns-2"},"#"),e(" Returns")],-1),Ts=s("p",null,[e("Returns the requested "),s("a",{href:"#the-relation-object"},"relation object"),e(".")],-1),ws=s("h3",{id:"rest-api-2",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#rest-api-2"},"#"),e(" REST API")],-1),
|
|
51
|
-
`)],-1),
|
|
50
|
+
`)])],-1),ms=s("hr",null,null,-1),fs=s("h2",{id:"retrieve-a-relation",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#retrieve-a-relation"},"#"),e(" Retrieve a relation")],-1),bs=s("p",null,"List an existing relation by collection/field name.",-1),ys=s("h3",{id:"query-parameters-2",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#query-parameters-2"},"#"),e(" Query Parameters")],-1),xs=s("p",null,"Doesn\u2019t support any query parameters.",-1),qs=s("h3",{id:"returns-2",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#returns-2"},"#"),e(" Returns")],-1),Ts=s("p",null,[e("Returns the requested "),s("a",{href:"#the-relation-object"},"relation object"),e(".")],-1),ws=s("h3",{id:"rest-api-2",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#rest-api-2"},"#"),e(" REST API")],-1),ks=s("pre",null,[s("code",null,`GET /relations/:collection/:field
|
|
51
|
+
`)],-1),Es=s("h5",{id:"example-3",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#example-3"},"#"),e(" Example")],-1),Rs=s("pre",null,[s("code",null,`GET /relations/articles/featured_image
|
|
52
52
|
`)],-1),Ps=s("h3",{id:"graphql-2",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#graphql-2"},"#"),e(" GraphQL")],-1),Ss=s("pre",null,[s("code",null,`POST /graphql/system
|
|
53
53
|
`)],-1),vs=s("pre",null,[s("code",{class:"language-graphql"},[s("span",{class:"hljs-keyword"},"type"),s("span",{class:"hljs-type"}," Query"),e(` {
|
|
54
54
|
relations_by_name(collection:`),s("span",{class:"hljs-type"}," String"),e("!, field:"),s("span",{class:"hljs-type"}," String"),e(`!): directus_relations
|
|
@@ -102,8 +102,8 @@ import{a as n,o as c,b as i,w as a,l as s,E as e,e as h}from"./runtime-core.esm-
|
|
|
102
102
|
}
|
|
103
103
|
`)])],-1),je=s("hr",null,null,-1),ge=s("h2",{id:"delete-a-relation",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#delete-a-relation"},"#"),e(" Delete a Relation")],-1),me=s("p",null,"Delete an existing relation.",-1),fe=s("h3",{id:"returns-5",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#returns-5"},"#"),e(" Returns")],-1),be=s("p",null,"Empty body.",-1),ye=s("h3",{id:"rest-api-5",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#rest-api-5"},"#"),e(" REST API")],-1),xe=s("pre",null,[s("code",null,`DELETE /relations/:collection/:field
|
|
104
104
|
`)],-1),qe=s("h5",{id:"example-9",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#example-9"},"#"),e(" Example")],-1),Te=s("pre",null,[s("code",null,`DELETE /relations/articles/author
|
|
105
|
-
`)],-1),we=s("h3",{id:"graphql-5",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#graphql-5"},"#"),e(" GraphQL")],-1),
|
|
106
|
-
`)],-1),
|
|
105
|
+
`)],-1),we=s("h3",{id:"graphql-5",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#graphql-5"},"#"),e(" GraphQL")],-1),ke=s("pre",null,[s("code",null,`POST /graphql/system
|
|
106
|
+
`)],-1),Ee=s("pre",null,[s("code",{class:"language-graphql"},[s("span",{class:"hljs-keyword"},"type"),s("span",{class:"hljs-type"}," Mutation"),e(` {
|
|
107
107
|
delete_relations_item(collection:`),s("span",{class:"hljs-type"}," String"),e("!, field:"),s("span",{class:"hljs-type"}," String"),e(`!): delete_one
|
|
108
108
|
}
|
|
109
109
|
`)])],-1),Re=s("h5",{id:"example-10",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#example-10"},"#"),e(" Example")],-1),Pe=s("pre",null,[s("code",{class:"language-graphql"},[s("span",{class:"hljs-keyword"},"mutation"),e(` {
|
|
@@ -112,4 +112,4 @@ import{a as n,o as c,b as i,w as a,l as s,E as e,e as h}from"./runtime-core.esm-
|
|
|
112
112
|
field
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
`)])],-1),Qe="Relations",De=!1,Ne="REST and GraphQL API documentation on the Relations collection in Directus.",Ge="5 min read",Oe="page-reference",Ie={__name:"relations",setup(Se,{expose:l}){const t={title:"Relations",modularExtension:!1,description:"REST and GraphQL API documentation on the Relations collection in Directus.",readTime:"5 min read",pageClass:"page-reference"};return l({frontmatter:t}),(ve,Le)=>{const o=n("router-link"),r=n("docs-wrapper");return c(),i(r,{frontmatter:t},{default:a(()=>[s("div",d,[s("blockquote",null,[s("p",null,[e("What data is linked to what other data. Allows you to assign authors to articles, products to sales, and whatever other structures you can think of. "),h(o,{to:"/docs/getting-started/glossary#relationships"},{default:a(()=>[e("Learn more about Relationships")]),_:1}),e(".")])]),p,u,_,j,g,m,f,b,y,x,q,T,w,E,
|
|
115
|
+
`)])],-1),Qe="Relations",De=!1,Ne="REST and GraphQL API documentation on the Relations collection in Directus.",Ge="5 min read",Oe="page-reference",Ie={__name:"relations",setup(Se,{expose:l}){const t={title:"Relations",modularExtension:!1,description:"REST and GraphQL API documentation on the Relations collection in Directus.",readTime:"5 min read",pageClass:"page-reference"};return l({frontmatter:t}),(ve,Le)=>{const o=n("router-link"),r=n("docs-wrapper");return c(),i(r,{frontmatter:t},{default:a(()=>[s("div",d,[s("blockquote",null,[s("p",null,[e("What data is linked to what other data. Allows you to assign authors to articles, products to sales, and whatever other structures you can think of. "),h(o,{to:"/docs/getting-started/glossary#relationships"},{default:a(()=>[e("Learn more about Relationships")]),_:1}),e(".")])]),p,u,_,j,g,m,f,b,y,x,q,T,w,k,E,R,P,S,v,L,A,Q,D,N,G,O,I,C,M,B,U,W,F,V,H,z,J,K,X,Y,Z,$,ss,es,ts,ns,as,ls,os,rs,cs,is,hs,ds,ps,us,_s,js,gs,ms,fs,bs,ys,xs,qs,Ts,ws,ks,Es,Rs,Ps,Ss,vs,Ls,As,Qs,Ds,Ns,Gs,Os,Is,Cs,Ms,Bs,Us,Ws,Fs,Vs,Hs,zs,Js,Ks,Xs,Ys,Zs,$s,se,ee,te,ne,ae,le,oe,re,ce,ie,he,de,pe,ue,_e,je,ge,me,fe,be,ye,xe,qe,Te,we,ke,Ee,Re,Pe])]),_:1})}}};export{Ie as default,Ne as description,De as modularExtension,Oe as pageClass,Ge as readTime,Qe as title};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as s,o as d,e as c,y as t,u as o,z as a,q as n}from"./runtime-core.esm-bundler.22ec0346.js";const u={class:"markdown-body"},p=o("p",null,"This pane is only shown when configuring relational fields (including images and translations). Depending on the type of relationship, you\u2019ll be presented with one of the following set of options:",-1),m=o("li",null,"One-to-One",-1),_={class:"tip hint"},h=o("div",{class:"hint-title"},"Corresponding Field",-1),x="Relationship",k=!1,v={__name:"relationship",setup(f,{expose:l}){const i={title:"Relationship",modularExtension:!1};return l({frontmatter:i}),(y,g)=>{const e=s("router-link"),r=s("docs-wrapper");return d(),c(r,{frontmatter:i},{default:t(()=>[o("div",u,[p,o("ul",null,[o("li",null,[a(e,{to:"/docs/configuration/data-model/relationships#many-to-one-m2o"},{default:t(()=>[n("Many-to-One")]),_:1})]),o("li",null,[a(e,{to:"/docs/configuration/data-model/relationships#one-to-many-o2m"},{default:t(()=>[n("One-to-Many")]),_:1})]),o("li",null,[a(e,{to:"/docs/configuration/data-model/relationships#many-to-many-m2m"},{default:t(()=>[n("Many-to-Many")]),_:1})]),o("li",null,[a(e,{to:"/docs/configuration/data-model/relationships#many-to-many-m2m"},{default:t(()=>[n("Many-to-Any")]),_:1})]),o("li",null,[a(e,{to:"/docs/configuration/data-model/relationships#translations-o2m"},{default:t(()=>[n("Translations")]),_:1})]),m]),o("div",_,[h,o("p",null,[a(e,{to:"/docs/configuration/data-model/relationships#perspective-matters"},{default:t(()=>[n("Relationships go both ways")]),_:1}),n(", so when creating a new relation Field, Directus offers to automatically create the corresponding Field on the related Collection.")])])])]),_:1})}}};export{v as default,k as modularExtension,x as title};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{a as l,o as d,
|
|
1
|
+
import{a as l,o as d,e as r,y as n,u as e,q as t,z as i}from"./runtime-core.esm-bundler.22ec0346.js";const h={class:"markdown-body"},u=e("blockquote",null,[e("p",null,[t("Relationships are a crucial part of any relational database. Directus supports all standard relationship types, as well as a few more of its own "),e("em",null,"compound"),t(" types, which are custom-tailored to make certain "),e("em",null,"common but complex"),t(" tasks a breeze.")])],-1),m=e("div",{class:"tip hint"},[e("div",{class:"hint-title"},"Before You Begin"),e("p",null,"Regardless of the relationship you want to configure, we recommend you read every section of this document, in order, at least once. This is because you must understand how M2Os work in Directus to understand O2Ms, you must understand M2Os and O2Ms to understand M2Ms, etc.")],-1),f=e("h2",{id:"overview",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#overview"},"#"),t(" Overview")],-1),p=e("p",null,[t("The Data Studio makes "),e("em",null,"the process"),t(" of configuring relational data models easier, faster, and more intuitive by offering no-code configuration. Directus "),e("em",null,"does not"),t(" enforce opinionated schemas, rule systems, or other arbitrary limitations to your data models. Therefore, aside from any technical limitations of your project\u2019s infrastructure or core requirements for any relational data model, "),e("em",null,"like having a primary key field for every collection or a data type assigned to every field,"),t(" you are free to build the data model as you want.")],-1),_=e("p",null,"In this guide, we will go over the following topics:",-1),g=e("ul",null,[e("li",null,"What kinds of relationships exist within Directus."),e("li",null,"How to configure a desired relationship within the Data Studio."),e("li",null,"How relationships are implemented in the data model and displayed in the Data Studio."),e("li",null,"When it might be appropriate to use a given type of relationship.")],-1),y=e("p",null,"By the end, you\u2019ll understand everything needed to start building data models in Directus, even if relational data model concepts are a new concept to you.",-1),w=e("h3",{id:"directus-vs-classic-data-model-terms",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#directus-vs-classic-data-model-terms"},"#"),t(" Directus vs Classic Data Model Terms")],-1),M=e("p",null,[t("When we use classic data model terms, "),e("em",null,"such as data table, column, row, etc\u2026"),t(" this signals that the explanation is focused strictly on what happens in the database. When Directus terminology is used, "),e("em",null,"such as collection, field, item, etc\u2026"),t(" this signals that the explanation includes Directus logic and functionality.")],-1),O=e("h2",{id:"many-to-one-(m2o)",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#many-to-one-(m2o)"},"#"),t(" Many-to-One (M2O)")],-1),b=e("p",null,"In an M2O relationship, multiple items from the parent collection are linked to one item in a related collection. For example, there are many cities in a country, but a city can only be in one country.",-1),v=e("p",null,[t("To create an M2O relationship, we add a foreign key field to the parent collection, which links items from the parent collection to items in the related collection. If we have two tables, "),e("code",null,"cities"),t(" and "),e("code",null,"countries"),t(", we can create a "),e("code",null,"cities.country_id"),t(" foreign key field.")],-1),k=e("p",null,[e("img",{src:"https://cdn.directus.io/docs/v9/configuration/data-model/relationships/relations-20221026/m2o-20221026A.webp",alt:"Many-to-One Relational Diagram"})],-1),x=e("p",null,"Let\u2019s take a look at the schema.",-1),A=e("pre",null,[e("code",null,`cities
|
|
2
2
|
- id
|
|
3
3
|
- name
|
|
4
4
|
- country_id (a foreign key field, stores a key from countries.id)
|
|
5
5
|
`)],-1),T=e("pre",null,[e("code",null,`countries
|
|
6
6
|
- id
|
|
7
7
|
- name
|
|
8
|
-
`)],-1),D=e("p",null,"Note the following things from the schema above:",-1),I=e("ul",null,[e("li",null,"An M2O relationship requires just one column within the parent table."),e("li",null,[t("When an M2O relational field is configured in Directus, an Item Page on the parent collection will enable access to the item from the related collection. So in our example above, an Item Page in "),e("code",null,"cities"),t(" will enable access to the related country from the "),e("code",null,"countries"),t(" table.")])],-1),S=e("p",null,[t("However, in the Directus Data Studio, an M2O field does not automatically provide access to the parent collection\u2019s items within the related collection. In our example, this means that when you open an Item Page in "),e("code",null,"countries"),t(", you will not see related cities.")],-1),j=e("p",null,"This is where O2M fields come in to play.",-1),
|
|
8
|
+
`)],-1),D=e("p",null,"Note the following things from the schema above:",-1),I=e("ul",null,[e("li",null,"An M2O relationship requires just one column within the parent table."),e("li",null,[t("When an M2O relational field is configured in Directus, an Item Page on the parent collection will enable access to the item from the related collection. So in our example above, an Item Page in "),e("code",null,"cities"),t(" will enable access to the related country from the "),e("code",null,"countries"),t(" table.")])],-1),S=e("p",null,[t("However, in the Directus Data Studio, an M2O field does not automatically provide access to the parent collection\u2019s items within the related collection. In our example, this means that when you open an Item Page in "),e("code",null,"countries"),t(", you will not see related cities.")],-1),j=e("p",null,"This is where O2M fields come in to play.",-1),q={class:"tip hint"},W=e("div",{class:"hint-title"},"Configure an M2O",-1),C=e("h2",{id:"one-to-many-(o2m)",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#one-to-many-(o2m)"},"#"),t(" One-to-Many (O2M)")],-1),R=e("a",{href:"#many-to-one-m2o"},"M2O",-1),N=e("code",null,"cities",-1),B=e("code",null,"countries",-1),L=e("p",null,[e("img",{src:"https://cdn.directus.io/docs/v9/configuration/data-model/relationships/relations-20221026/o2m-20221026A.webp",alt:"One-to-Many Relational Diagram"})],-1),H=e("p",null,"Let\u2019s take a look at the schema.",-1),z=e("pre",null,[e("code",null,`countries
|
|
9
9
|
- id
|
|
10
10
|
- name
|
|
11
11
|
- cities (the O2M alias field, does not exist in the data table. Allows access to all cities linked to a country.)
|
|
@@ -13,7 +13,7 @@ import{a as l,o as d,b as r,w as n,l as e,E as t,e as i}from"./runtime-core.esm-
|
|
|
13
13
|
- id
|
|
14
14
|
- name
|
|
15
15
|
- country_id (the M2O field)
|
|
16
|
-
`)],-1),
|
|
16
|
+
`)],-1),Y=e("p",null,"Note the following points from the schema above. When we create an O2M in Directus:",-1),E=e("ul",null,[e("li",null,[t("Since the perspective is flipped, we now consider "),e("code",null,"countries"),t(" to be the parent collection.")]),e("li",null,"It isn\u2019t always necessary to create an O2M. In some cases, you won\u2019t want or need to access items from both sides."),e("li",null,[t("At first glance, this O2M alias field might make it "),e("em",null,"look and feel"),t(" like a new column was created, but the O2M field is purely "),e("em",null,"virtual"),t(". It creates an Interface within the Data Studio to access items from an O2M perspective. In other words, the O2M alias field allows us to access any related items from "),e("code",null,"cities"),t(" within an Item Details Page in the "),e("code",null,"countries"),t(" collection.")])],-1),U={class:"tip hint"},V=e("div",{class:"hint-title"},"Configure an O2M",-1),F=e("h2",{id:"one-to-one-(o2o)",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#one-to-one-(o2o)"},"#"),t(" One-to-One (O2O)")],-1),J=e("p",null,[t("Directus does not include a dedicated One-to-One (O2O) relationship type or Interface. However, in the database, O2O is almost exactly the same as an M2O. The only difference is that an O2O enforces "),e("em",null,"cardinality"),t(". In other words, one item from the parent collection can be linked with one item on the related collection, and vice-versa.")],-1),G=e("p",null,[t("For example, each country has one capital city, and vice versa. This is an O2O. To demonstrate how it works, let\u2019s add this O2O to the "),e("code",null,"cities"),t(" and "),e("code",null,"countries"),t(" example relationship used in the previous sections.")],-1),K=e("code",null,"capital_city",-1),Q=e("code",null,"countries",-1),X=e("code",null,"countries.capital_city",-1),Z=e("code",null,"cities.name",-1),$=e("em",null,"avoid duplicate data!",-1),ee=e("p",null,[e("img",{src:"https://cdn.directus.io/docs/v9/configuration/data-model/relationships/relations-20221026/o2o-duplicate-20221026A.webp",alt:"Duplicate Data from Capital Cities"})],-1),te=e("p",null,[t("Instead, we want to use an O2O relationship. Let\u2019s try adding a "),e("code",null,"cities.capital_of"),t(" field.")],-1),ne=e("p",null,[e("img",{src:"https://cdn.directus.io/docs/v9/configuration/data-model/relationships/relations-20221026/o2o-inefficient-20221026A.webp",alt:"An inefficient One-to-One Relationship"})],-1),oe=e("p",null,"Let\u2019s take a look at the schema.",-1),ie=e("pre",null,[e("code",null,`cities
|
|
17
17
|
- id
|
|
18
18
|
- name
|
|
19
19
|
- country_id
|
|
@@ -47,16 +47,16 @@ import{a as l,o as d,b as r,w as n,l as e,E as t,e as i}from"./runtime-core.esm-
|
|
|
47
47
|
- id
|
|
48
48
|
- name
|
|
49
49
|
- recipes (an O2M alias field, does not exist in the database, enables access to all the recipes related to an ingredient)
|
|
50
|
-
`)],-1),Ie=e("ul",null,[e("li",null,[t("Notice that the junction collection also has a "),e("code",null,"quantity"),t(" field, which tracks how much of each ingredient is needed for the recipe. This is called a "),e("em",null,"contextual field"),t(". The Data Studio provides full access to the junction collection, so you can add any number of contextual fields needed to the junction collection.")]),e("li",null,[t("You can also have a self-referencing M2M relationship that connects items in the "),e("em",null,"same collection"),t(". One example is \u201CRelated Articles\u201D, where each article relates to many other articles.")])],-1),Se={class:"tip hint"},je=e("div",{class:"hint-title"},"Configure an M2M",-1),
|
|
50
|
+
`)],-1),Ie=e("ul",null,[e("li",null,[t("Notice that the junction collection also has a "),e("code",null,"quantity"),t(" field, which tracks how much of each ingredient is needed for the recipe. This is called a "),e("em",null,"contextual field"),t(". The Data Studio provides full access to the junction collection, so you can add any number of contextual fields needed to the junction collection.")]),e("li",null,[t("You can also have a self-referencing M2M relationship that connects items in the "),e("em",null,"same collection"),t(". One example is \u201CRelated Articles\u201D, where each article relates to many other articles.")])],-1),Se={class:"tip hint"},je=e("div",{class:"hint-title"},"Configure an M2M",-1),qe=e("strong",null,"Many to Many",-1),We=e("h2",{id:"many-to-any-(m2a)",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#many-to-any-(m2a)"},"#"),t(" Many-to-Any (M2A)")],-1),Ce=e("em",null,"matrix field",-1),Re=e("em",null,"replicator",-1),Ne=e("strong",null,"collection key",-1),Be=e("em",null,"(the name of the collection)",-1),Le=e("p",null,[t("One common example of when M2As are used is for "),e("em",null,"page builders"),t(", which have a "),e("code",null,"pages"),t(" collection that combines multiple collections for each type of page section, such as "),e("code",null,"heading"),t(", "),e("code",null,"text_bodies"),t(", "),e("code",null,"image"),t(", "),e("code",null,"video"),t(", "),e("em",null,"etc"),t(".")],-1),He=e("p",null,[e("img",{src:"https://cdn.directus.io/docs/v9/configuration/data-model/relationships/relationships-20220805/m2a-20220805A.webp",alt:"Many-to-Any Relational Diagram"})],-1),ze=e("p",null,"Let\u2019s take a look at the schema:",-1),Pe=e("pre",null,[e("code",null,`pages
|
|
51
51
|
- id
|
|
52
52
|
- name
|
|
53
53
|
- sections (An M2A alias field, does not exist in the database. Provides access to items from page_sections.)
|
|
54
|
-
`)],-1),
|
|
54
|
+
`)],-1),Ye=e("pre",null,[e("code",null,`page_sections (junction collection)
|
|
55
55
|
- id
|
|
56
56
|
- pages_id (An M2O, stores foreign keys from pages.id)
|
|
57
57
|
- collection (An M2O, stores name of the related collection, for example headings, text_bodies, or images.)
|
|
58
58
|
- item (An M2O, stores foreign keys from headings.id, text.id, images.id, etc.)
|
|
59
|
-
`)],-1),
|
|
59
|
+
`)],-1),Ee=e("pre",null,[e("code",null,`headings
|
|
60
60
|
- id
|
|
61
61
|
- title
|
|
62
62
|
`)],-1),Ue=e("pre",null,[e("code",null,`text_bodies
|
|
@@ -79,4 +79,4 @@ import{a as l,o as d,b as r,w as n,l as e,E as t,e as i}from"./runtime-core.esm-
|
|
|
79
79
|
`)],-1),it=e("pre",null,[e("code",null,`languages
|
|
80
80
|
- language_code (A primary key. A manually typed language code, e.g., "en-US")
|
|
81
81
|
- name (Stores the language name, e.g., "English")
|
|
82
|
-
`)],-1),at=e("p",null,"Note the following points from the schema above. When we create a Translations O2M:",-1),lt=e("li",null,[t("As demonstrated by "),e("code",null,"article_translations.title"),t(" and "),e("code",null,"article_translations.text"),t(", any "),e("em",null,"translated"),t(" fields should be added as context fields on the junction collection.")],-1),st=e("li",null,[t("You are not bound to use this for translations. You can build your data model as desired. You could create individual fields for each translation, such as "),e("code",null,"title_english"),t(", "),e("code",null,"title_german"),t(", "),e("code",null,"title_french"),t(", and so on. However, this is not easily extensible and it creates a sub-optimal experience to have every single translation of every field on the item details page. The Translations O2M alias field is designed specifically to make the translation process easier.")],-1),ct=e("em",null,"not",-1),dt={class:"tip hint"},rt=e("div",{class:"hint-title"},"Configure a Translations O2M",-1),ht=e("strong",null,"Translations O2M",-1),_t="Relationships",gt=!1,yt={__name:"relationships",setup(ut,{expose:s}){const a={title:"Relationships",modularExtension:!1};return s({frontmatter:a}),(mt,ft)=>{const o=l("router-link"),c=l("docs-wrapper");return d(),r(c,{frontmatter:a},{default:n(()=>[e("div",h,[u,m,f,p,_,g,y,w,M,O,b,v,k,x,A,T,D,I,S,j,e("div",
|
|
82
|
+
`)],-1),at=e("p",null,"Note the following points from the schema above. When we create a Translations O2M:",-1),lt=e("li",null,[t("As demonstrated by "),e("code",null,"article_translations.title"),t(" and "),e("code",null,"article_translations.text"),t(", any "),e("em",null,"translated"),t(" fields should be added as context fields on the junction collection.")],-1),st=e("li",null,[t("You are not bound to use this for translations. You can build your data model as desired. You could create individual fields for each translation, such as "),e("code",null,"title_english"),t(", "),e("code",null,"title_german"),t(", "),e("code",null,"title_french"),t(", and so on. However, this is not easily extensible and it creates a sub-optimal experience to have every single translation of every field on the item details page. The Translations O2M alias field is designed specifically to make the translation process easier.")],-1),ct=e("em",null,"not",-1),dt={class:"tip hint"},rt=e("div",{class:"hint-title"},"Configure a Translations O2M",-1),ht=e("strong",null,"Translations O2M",-1),_t="Relationships",gt=!1,yt={__name:"relationships",setup(ut,{expose:s}){const a={title:"Relationships",modularExtension:!1};return s({frontmatter:a}),(mt,ft)=>{const o=l("router-link"),c=l("docs-wrapper");return d(),r(c,{frontmatter:a},{default:n(()=>[e("div",h,[u,m,f,p,_,g,y,w,M,O,b,v,k,x,A,T,D,I,S,j,e("div",q,[W,e("p",null,[t("The easiest way to configure an M2O field is to follow the guide on how to "),i(o,{to:"/docs/configuration/data-model/fields/#create-a-field-standard"},{default:n(()=>[t("create a field (standard)")]),_:1}),t(" and select the M2O Interface from the template wizard.")])]),C,e("p",null,[t("Within a relational database, an O2M relationship is the exact same type of relationship as an M2O. Remember, at the end of the "),R,t(" section, we learned that configuring an M2O in Directus does not let us access related items within an Item Page on the related collection. In Directus, configuring an O2M creates an "),i(o,{to:"/docs/getting-started/glossary#alias"},{default:n(()=>[t("Alias")]),_:1}),t(" field, which lets us access related items. To demonstrate this, let\u2019s continue with the "),N,t(" and "),B,t(" example relationship used in the M2O section.")]),L,H,z,P,Y,E,e("div",U,[V,e("p",null,[t("The easiest way to configure an O2M is to follow the guide on how to "),i(o,{to:"/docs/configuration/data-model/fields/#create-a-field-standard"},{default:n(()=>[t("create a field (standard)")]),_:1}),t(" and select the O2M alias field type from the template wizard.")])]),F,J,G,e("p",null,[t("The first strategy you may think of it to add a new "),K,t(" field on the "),Q,t(" collection, storing the name of the capital city directly. But this would create "),i(o,{to:"/docs/configuration/data-model#avoid-data-duplication"},{default:n(()=>[t("duplicate data")]),_:1}),t(", because the same city would exist in both "),X,t(" as well as "),Z,t(". But remember, we want to "),$]),ee,te,ne,oe,ie,ae,le,se,ce,de,re,he,ue,e("div",me,[fe,e("p",null,[t("The easiest way to configure an O2O is to follow the guide on how to "),i(o,{to:"/docs/configuration/data-model/fields/#create-a-field-standard"},{default:n(()=>[t("create a field (standard)")]),_:1}),t(" and select the "),pe,t(" field type from the template wizard. Then, "),i(o,{to:"/docs/configuration/data-model/fields/schema"},{default:n(()=>[t("configure the field\u2019s schema")]),_:1}),t(", toggling on "),_e,t(" so that each value in the M2O field is unique, resulting in an O2O relationship.")])]),ge,ye,we,Me,Oe,be,ve,ke,xe,Ae,Te,De,Ie,e("div",Se,[je,e("p",null,[t("The easiest way to configure an M2M is to follow the guide on how to "),i(o,{to:"/docs/configuration/data-model/fields/#create-a-field-standard"},{default:n(()=>[t("create a field (standard)")]),_:1}),t(" and select "),qe,t(" from the template wizard.")])]),We,e("p",null,[t("Sometimes called a "),Ce,t(" or "),Re,t(", an M2A relationship allows you to link items from the parent collection to any item in any collection in the database. When you configure an M2A in Directus, an M2A "),i(o,{to:"/docs/getting-started/glossary#alias"},{default:n(()=>[t("Alias")]),_:1}),t(" field is created as well as a junction collection, like we saw on M2M relationships. The difference is that the junction collection on an M2A also has a field to store the "),Ne,Be,t(" for related collections.")]),Le,He,ze,Pe,Ye,Ee,Ue,Ve,Fe,Je,e("div",Ge,[Ke,e("p",null,[t("The easiest way to configure an M2A is to follow the guide on how to "),i(o,{to:"/docs/configuration/data-model/fields/#create-a-field-standard"},{default:n(()=>[t("create a field (standard)")]),_:1}),t(" and select the "),Qe,t(" Interface from the template wizard.")])]),Xe,Ze,$e,et,tt,nt,ot,it,at,e("ul",null,[lt,st,e("li",null,[t("There may come a time when you want to make a pre-existing parent field translatable. To do this, you can "),i(o,{to:"/docs/configuration/data-model/fields/#duplicate-a-field"},{default:n(()=>[t("duplicate a field")]),_:1}),t(", move it to the translation collection, and then delete the parent field. However, be aware that duplicating a field does "),ct,t(" duplicate any existing field values.")])]),e("div",dt,[rt,e("p",null,[t("The easiest way to configure a Translations relationship is to follow the guide on how to "),i(o,{to:"/docs/configuration/data-model/fields/#create-a-field-standard"},{default:n(()=>[t("create a field (standard)")]),_:1}),t(" and select the "),ht,t(" Interface from the template wizard.")])])])]),_:1})}}};export{yt as default,gt as modularExtension,_t as title};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t,o as i,
|
|
1
|
+
import{a as t,o as i,e as u,y as n,u as e,z as c,q as r}from"./runtime-core.esm-bundler.22ec0346.js";const d={class:"markdown-body"},h=e("h2",{id:"cloud",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#cloud"},"#"),r(" Cloud")],-1),p=e("li",null,[e("strong",null,[e("a",{href:"https://directus.cloud",target:"_blank",rel:"noopener noreferrer"},"Directus Cloud")]),r(" \u2014 The best way to get your Project up and running.")],-1),f=e("li",null,[e("strong",null,[e("a",{href:"https://directus.io/contact",target:"_blank",rel:"noopener noreferrer"},"Enterprise Cloud")]),r(" \u2014 Custom-tailored solutions for industrial scale projects.")],-1),m=e("li",null,[e("strong",null,[e("a",{href:"https://status.directus.cloud",target:"_blank",rel:"noopener noreferrer"},"System Status")]),r(" \u2014 Up-to-date information on our various cloud systems.")],-1),_=e("h2",{id:"developer-resources",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#developer-resources"},"#"),r(" Developer Resources")],-1),g=e("ul",null,[e("li",null,[e("strong",null,[e("a",{href:"https://github.com/directus/directus",target:"_blank",rel:"noopener noreferrer"},"GitHub")]),r(" \u2014 The open-source repository and version control.")]),e("li",null,[e("strong",null,[e("a",{href:"https://www.npmjs.com/package/directus",target:"_blank",rel:"noopener noreferrer"},"NPM Package")]),r(" \u2014 The official Directus node package.")]),e("li",null,[e("strong",null,[e("a",{href:"https://hub.docker.com/r/directus/directus",target:"_blank",rel:"noopener noreferrer"},"Docker Image")]),r(" \u2014 The official Directus docker image.")]),e("li",null,[e("strong",null,[e("a",{href:"https://docs.directus.io",target:"_blank",rel:"noopener noreferrer"},"Documentation")]),r(" \u2014 Docs for the most recent version of Directus.")]),e("li",null,[e("strong",null,[e("a",{href:"https://locales.directus.io",target:"_blank",rel:"noopener noreferrer"},"Crowdin")]),r(" \u2014 Service for managing the App\u2019s many language translations.")])],-1),k=e("h2",{id:"community",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#community"},"#"),r(" Community")],-1),b=e("ul",null,[e("li",null,[e("strong",null,[e("a",{href:"https://www.youtube.com/c/DirectusVideos",target:"_blank",rel:"noopener noreferrer"},"YouTube")]),r(" \u2014 Checkout our channel with video tutorials and feature overviews.")]),e("li",null,[e("strong",null,[e("a",{href:"https://directus.chat",target:"_blank",rel:"noopener noreferrer"},"Discord")]),r(" \u2014 A growing community of 4K+ developers.")]),e("li",null,[e("strong",null,[e("a",{href:"https://twitter.com/directus",target:"_blank",rel:"noopener noreferrer"},"Twitter")]),r(" \u2014 The latest product info and sneak-peeks.")]),e("li",null,[e("strong",null,[e("a",{href:"https://directus.io",target:"_blank",rel:"noopener noreferrer"},"Website")]),r(" \u2014 General information, resources, and team info.")]),e("li",null,[e("strong",null,[e("a",{href:"https://github.com/directus-community/awesome-directus",target:"_blank",rel:"noopener noreferrer"},"Awesome List")]),r(" \u2014 A list of awesome things related Directus.")])],-1),C="Resources",T=!1,x="Additional resources to the Directus community.",A="1 min read",N={__name:"resources",setup(w,{expose:s}){const o={title:"Resources",modularExtension:!1,description:"Additional resources to the Directus community.",readTime:"1 min read"};return s({frontmatter:o}),(y,D)=>{const l=t("router-link"),a=t("docs-wrapper");return i(),u(a,{frontmatter:o},{default:n(()=>[e("div",d,[h,e("ul",null,[p,f,e("li",null,[e("strong",null,[c(l,{to:"/docs/cloud/overview"},{default:n(()=>[r("Cloud Documentation")]),_:1})]),r(" \u2014 Docs for Directus cloud.")]),m]),_,g,k,b])]),_:1})}}};export{N as default,x as description,T as modularExtension,A as readTime,C as title};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as o,o as c,
|
|
1
|
+
import{a as o,o as c,e as h,y as t,u as s,q as e,z as a}from"./runtime-core.esm-bundler.22ec0346.js";const d={class:"markdown-body"},p=s("hr",null,null,-1),u=s("h2",{id:"the-revision-object",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#the-revision-object"},"#"),e(" The Revision Object")],-1),_=s("p",null,[s("code",null,"id"),e(),s("strong",null,"integer"),s("br"),e(" Primary key of the revision.")],-1),m=s("code",null,"activity",-1),v=s("strong",null,"many-to-one",-1),j=s("br",null,null,-1),y=s("p",null,[s("code",null,"collection"),e(),s("strong",null,"string"),s("br"),e(" Collection in which this revision happened.")],-1),g=s("p",null,[s("code",null,"item"),e(),s("strong",null,"string"),s("br"),e(" Primary key of the item that was changed.")],-1),b=s("p",null,[s("code",null,"data"),e(),s("strong",null,"object"),s("br"),e(" Snapshot of the top-level item data.")],-1),f=s("p",null,[s("code",null,"delta"),e(),s("strong",null,"object"),s("br"),e(" Snapshot of the changes made in this revision.")],-1),x=s("p",null,[s("code",null,"parent"),e(),s("strong",null,"many-to-one"),s("br"),e(" Parent revision that triggered this revision. Many-to-one to revisions (recursive).")],-1),q=s("pre",null,[s("code",{class:"language-json"},[s("span",{class:"hljs-punctuation"},"{"),e(`
|
|
2
2
|
`),s("span",{class:"hljs-attr"},'"id"'),s("span",{class:"hljs-punctuation"},":"),e(),s("span",{class:"hljs-number"},"368"),s("span",{class:"hljs-punctuation"},","),e(`
|
|
3
3
|
`),s("span",{class:"hljs-attr"},'"activity"'),s("span",{class:"hljs-punctuation"},":"),e(),s("span",{class:"hljs-number"},"438"),s("span",{class:"hljs-punctuation"},","),e(`
|
|
4
4
|
`),s("span",{class:"hljs-attr"},'"collection"'),s("span",{class:"hljs-punctuation"},":"),e(),s("span",{class:"hljs-string"},'"articles"'),s("span",{class:"hljs-punctuation"},","),e(`
|
|
@@ -24,8 +24,8 @@ SEARCH /revisions
|
|
|
24
24
|
delta
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
`)])],-1),H=s("hr",null,null,-1),B=s("h2",{id:"retrieve-a-revision",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#retrieve-a-revision"},"#"),e(" Retrieve a revision")],-1),N=s("p",null,"List an existing revision by primary key.",-1),O=s("h3",{id:"query-parameters-1",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#query-parameters-1"},"#"),e(" Query Parameters")],-1),V=s("h3",{id:"returns-1",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#returns-1"},"#"),e(" Returns")],-1),M=s("p",null,[e("Returns the requested "),s("a",{href:"#the-revision-object"},"revision object"),e(".")],-1),
|
|
28
|
-
`)],-1),
|
|
27
|
+
`)])],-1),H=s("hr",null,null,-1),B=s("h2",{id:"retrieve-a-revision",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#retrieve-a-revision"},"#"),e(" Retrieve a revision")],-1),N=s("p",null,"List an existing revision by primary key.",-1),O=s("h3",{id:"query-parameters-1",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#query-parameters-1"},"#"),e(" Query Parameters")],-1),V=s("h3",{id:"returns-1",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#returns-1"},"#"),e(" Returns")],-1),M=s("p",null,[e("Returns the requested "),s("a",{href:"#the-revision-object"},"revision object"),e(".")],-1),z=s("h3",{id:"rest-api-1",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#rest-api-1"},"#"),e(" REST API")],-1),F=s("pre",null,[s("code",null,`GET /revisions/:id
|
|
28
|
+
`)],-1),W=s("h5",{id:"example",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#example"},"#"),e(" Example")],-1),J=s("pre",null,[s("code",null,`GET /revisions/322
|
|
29
29
|
`)],-1),K=s("h3",{id:"graphql-1",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#graphql-1"},"#"),e(" GraphQL")],-1),U=s("pre",null,[s("code",null,`POST /graphql/system
|
|
30
30
|
`)],-1),X=s("pre",null,[s("code",{class:"language-graphql"},[s("span",{class:"hljs-keyword"},"type"),s("span",{class:"hljs-type"}," Query"),e(` {
|
|
31
31
|
revisions_by_id(id:`),s("span",{class:"hljs-literal"}," ID"),e(`!): directus_revisions
|
|
@@ -37,4 +37,4 @@ SEARCH /revisions
|
|
|
37
37
|
delta
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
`)])],-1),ns="Revisions",as=!1,ls="REST and GraphQL API documentation on the Revisions collection in Directus.",os="2 min read",rs="page-reference",is={__name:"revisions",setup($,{expose:r}){const l={title:"Revisions",modularExtension:!1,description:"REST and GraphQL API documentation on the Revisions collection in Directus.",readTime:"2 min read",pageClass:"page-reference"};return r({frontmatter:l}),(ss,es)=>{const n=o("router-link"),i=o("docs-wrapper");return c(),h(i,{frontmatter:l},{default:t(()=>[s("div",d,[s("blockquote",null,[s("p",null,[e("Revisions are individual changes to items made. Directus keeps track of changes made, so you\u2019re able to revert to a previous state at will. "),a(n,{to:"/docs/getting-started/glossary#revisions"},{default:t(()=>[e("Learn more about Revisions")]),_:1}),e(".")])]),p,u,_,s("p",null,[m,e(),v,j,e(" Related activity record. Many-to-one to "),a(n,{to:"/docs/reference/system/activity"},{default:t(()=>[e("activity")]),_:1}),e(".")]),y,g,b,f,x,q,R,k,w,E,T,s("p",null,[e("Supports all "),a(n,{to:"/docs/reference/query"},{default:t(()=>[e("global query parameters")]),_:1}),e(".")]),P,s("p",null,[e("An array of up to "),a(n,{to:"/docs/reference/query#limit"},{default:t(()=>[e("limit")]),_:1}),e(),S,e(". If no items are available, data will be an empty array.")]),L,Q,s("p",null,[a(n,{to:"/docs/reference/introduction#search-http-method"},{default:t(()=>[e("Learn more about SEARCH ->")]),_:1})]),A,C,G,D,I,H,B,N,O,s("p",null,[e("Supports all "),a(n,{to:"/docs/reference/query"},{default:t(()=>[e("global query parameters")]),_:1}),e(".")]),V,M,F,W,
|
|
40
|
+
`)])],-1),ns="Revisions",as=!1,ls="REST and GraphQL API documentation on the Revisions collection in Directus.",os="2 min read",rs="page-reference",is={__name:"revisions",setup($,{expose:r}){const l={title:"Revisions",modularExtension:!1,description:"REST and GraphQL API documentation on the Revisions collection in Directus.",readTime:"2 min read",pageClass:"page-reference"};return r({frontmatter:l}),(ss,es)=>{const n=o("router-link"),i=o("docs-wrapper");return c(),h(i,{frontmatter:l},{default:t(()=>[s("div",d,[s("blockquote",null,[s("p",null,[e("Revisions are individual changes to items made. Directus keeps track of changes made, so you\u2019re able to revert to a previous state at will. "),a(n,{to:"/docs/getting-started/glossary#revisions"},{default:t(()=>[e("Learn more about Revisions")]),_:1}),e(".")])]),p,u,_,s("p",null,[m,e(),v,j,e(" Related activity record. Many-to-one to "),a(n,{to:"/docs/reference/system/activity"},{default:t(()=>[e("activity")]),_:1}),e(".")]),y,g,b,f,x,q,R,k,w,E,T,s("p",null,[e("Supports all "),a(n,{to:"/docs/reference/query"},{default:t(()=>[e("global query parameters")]),_:1}),e(".")]),P,s("p",null,[e("An array of up to "),a(n,{to:"/docs/reference/query#limit"},{default:t(()=>[e("limit")]),_:1}),e(),S,e(". If no items are available, data will be an empty array.")]),L,Q,s("p",null,[a(n,{to:"/docs/reference/introduction#search-http-method"},{default:t(()=>[e("Learn more about SEARCH ->")]),_:1})]),A,C,G,D,I,H,B,N,O,s("p",null,[e("Supports all "),a(n,{to:"/docs/reference/query"},{default:t(()=>[e("global query parameters")]),_:1}),e(".")]),V,M,z,F,W,J,K,U,X,Y,Z])]),_:1})}}};export{is as default,ls as description,as as modularExtension,rs as pageClass,os as readTime,ns as title};
|