@directus/app 9.0.1 → 9.2.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/@directus_extensions-sdk.bfcbcdb2.js +1 -0
- package/dist/assets/{active-line.1e85080e.js → active-line.26c5b22c.js} +1 -1
- package/dist/assets/{activity-log.f0b81785.js → activity-log.5e4655fe.js} +1 -1
- package/dist/assets/{activity.848efa17.js → activity.d1dc970c.js} +5 -5
- package/dist/assets/af-ZA.e55141de.js +1 -0
- package/dist/assets/{api-endpoints.6b2f9a0a.js → api-endpoints.8828b972.js} +2 -2
- package/dist/assets/{apl.81a36d94.js → apl.81ad0f83.js} +1 -1
- package/dist/assets/{app-overview.9d9e9cee.svg → app-overview.1d041c7b.svg} +2 -1
- package/dist/assets/{ar-SA.3368322c.js → ar-SA.c14aed74.js} +1 -1
- package/dist/assets/{asciiarmor.41807b38.js → asciiarmor.76e6426d.js} +1 -1
- package/dist/assets/{asn.1.2fb547c7.js → asn.1.71a91aed.js} +1 -1
- package/dist/assets/{asterisk.f25d8cae.js → asterisk.80f8502f.js} +1 -1
- package/dist/assets/{authentication.595f862f.js → authentication.2cacaeb9.js} +10 -9
- package/dist/assets/{autorefresh.47068160.js → autorefresh.b4c043fd.js} +1 -1
- package/dist/assets/{aws.684d8f17.js → aws.80878698.js} +1 -1
- package/dist/assets/{backing-directus.75b705d8.js → backing-directus.61d6e724.js} +1 -1
- package/dist/assets/bg-BG.2ccc4340.js +2 -0
- package/dist/assets/{br-FR.7a926846.js → br-FR.ac76f3c4.js} +1 -1
- package/dist/assets/{brainfuck.0eb32d6a.js → brainfuck.9cb7bbc7.js} +1 -1
- package/dist/assets/{ca-ES.2e706764.js → ca-ES.bb7c5b19.js} +1 -1
- package/dist/assets/{cli.6bc58792.js → cli.5550afc3.js} +2 -2
- package/dist/assets/cli.63d72df5.js +10 -0
- package/dist/assets/{clike.8a91e766.js → clike.e00b6fc0.js} +1 -1
- package/dist/assets/{clojure.680b2086.js → clojure.809a239a.js} +1 -1
- package/dist/assets/cloudron.faaaab54.js +1 -0
- package/dist/assets/cmake.9e2c3af3.js +1 -0
- package/dist/assets/{cobol.11746877.js → cobol.34952893.js} +1 -1
- package/dist/assets/{codebase-overview.bec34b38.js → codebase-overview.e1e8f010.js} +1 -1
- package/dist/assets/{coffeescript.cc7b12bb.js → coffeescript.961bb7e7.js} +1 -1
- package/dist/assets/{collections.fb0eff5f.js → collections.2a7f6562.js} +4 -4
- package/dist/assets/{commonlisp.81cf66cf.js → commonlisp.55bc3390.js} +1 -1
- package/dist/assets/{config-options.5ba591a6.js → config-options.7faffebc.js} +12 -12
- package/dist/assets/{content-collections.b24311e4.js → content-collections.a7de45b5.js} +1 -1
- package/dist/assets/{content-items.16fafd36.js → content-items.e9d9529c.js} +1 -1
- package/dist/assets/{content.31f08958.js → content.557c9218.js} +1 -1
- package/dist/assets/{crystal.88773be1.js → crystal.d7313cde.js} +1 -1
- package/dist/assets/css.17df7ad1.js +1 -0
- package/dist/assets/{cypher.62d62091.js → cypher.b89065cc.js} +1 -1
- package/dist/assets/{d.235b72e5.js → d.174a69ec.js} +1 -1
- package/dist/assets/{da-DK.0bec4b59.js → da-DK.3bcf884c.js} +1 -1
- package/dist/assets/{dart.d5e0dc33.js → dart.d0eb6182.js} +1 -1
- package/dist/assets/data-model.6fb88bd6.js +1 -0
- package/dist/assets/{de-DE.4b4b8e70.js → de-DE.cdcb9600.js} +1 -1
- package/dist/assets/{diff.236ec957.js → diff.b7a4963f.js} +1 -1
- package/dist/assets/digitalocean-app-platform.bf1a04c0.js +3 -0
- package/dist/assets/{displays.c55af3d6.js → displays.add8fe2c.js} +5 -5
- package/dist/assets/{django.b7dc3aae.js → django.da7ed745.js} +1 -1
- package/dist/assets/{docker.d76fac42.js → docker.1b49ec74.js} +1 -1
- package/dist/assets/{dockerfile.1019efd6.js → dockerfile.d6d3e269.js} +1 -1
- package/dist/assets/{documentation.1092ea83.js → documentation.7336014f.js} +1 -1
- package/dist/assets/{dtd.2a851c5f.js → dtd.45e86e6d.js} +1 -1
- package/dist/assets/{dylan.9bb2cd36.js → dylan.ec84c04e.js} +1 -1
- package/dist/assets/{ebnf.276406d3.js → ebnf.085fa852.js} +1 -1
- package/dist/assets/{ecl.11564c5b.js → ecl.270e9abf.js} +1 -1
- package/dist/assets/{eiffel.be49a681.js → eiffel.336802c1.js} +1 -1
- package/dist/assets/{elm.5c8852f7.js → elm.da8b96b6.js} +1 -1
- package/dist/assets/{email-templates.3c6a781e.js → email-templates.bf41e36a.js} +2 -2
- package/dist/assets/en-GB.361d696e.js +1 -0
- package/dist/assets/{erlang.ead9639d.js → erlang.b2f5e3ff.js} +1 -1
- package/dist/assets/es-419.994854a0.js +1 -0
- package/dist/assets/es-CL.3bf346ef.js +1 -0
- package/dist/assets/es-ES.5be51e8b.js +1 -0
- package/dist/assets/{et-EE.8aa32a45.js → et-EE.da648eba.js} +1 -1
- package/dist/assets/{extensions.b76bdde3.js → extensions.b3034cc8.js} +2 -2
- package/dist/assets/{factor.eed233f0.js → factor.5f1bd905.js} +1 -1
- package/dist/assets/faq.7223b3ed.js +1 -0
- package/dist/assets/{fcl.271814f0.js → fcl.fdd412a4.js} +1 -1
- package/dist/assets/fi-FI.64bf9412.js +1 -0
- package/dist/assets/{fields.238d924d.js → fields.a2b84f49.js} +2 -2
- package/dist/assets/{file-library.d7ca55fc.js → file-library.5f224a0d.js} +1 -1
- package/dist/assets/{files.92988e46.js → files.89714327.js} +1 -1
- package/dist/assets/{filter-rules.339629f8.js → filter-rules.b16f33ad.js} +2 -2
- package/dist/assets/{folders.54e223af.js → folders.964cb698.js} +4 -4
- package/dist/assets/{forth.5c226e69.js → forth.5e4a638c.js} +1 -1
- package/dist/assets/{fortran.a1e621fd.js → fortran.d037a8e9.js} +1 -1
- package/dist/assets/fr-FR.2b742996.js +1 -0
- package/dist/assets/{gas.249ccc95.js → gas.c1fb542a.js} +1 -1
- package/dist/assets/{gfm.392719b7.js → gfm.ef15b019.js} +1 -1
- package/dist/assets/{gherkin.f1c57004.js → gherkin.f2284a3d.js} +1 -1
- package/dist/assets/{github-ci.0ba5d515.js → github-ci.1993f260.js} +2 -2
- package/dist/assets/{glossary.4258b82f.js → glossary.53f5ccae.js} +1 -1
- package/dist/assets/{go.55fe2209.js → go.ee521b37.js} +1 -1
- package/dist/assets/{groovy.49803548.js → groovy.ff223850.js} +1 -1
- package/dist/assets/{haml.00447402.js → haml.dfd3a15e.js} +1 -1
- package/dist/assets/{handlebars.2c2675b3.js → handlebars.ee000b2a.js} +1 -1
- package/dist/assets/{haskell-literate.f95e4126.js → haskell-literate.7be3e5e8.js} +1 -1
- package/dist/assets/{haskell.613e1328.js → haskell.f0f6d0b5.js} +1 -1
- package/dist/assets/{haxe.e363e2e2.js → haxe.d7974a6e.js} +1 -1
- package/dist/assets/hi-IN.f686e98f.js +1 -0
- package/dist/assets/hooks.995bf7f1.js +72 -0
- package/dist/assets/{htmlembedded.5a5f0ffe.js → htmlembedded.fbe7b06d.js} +1 -1
- package/dist/assets/{htmlmixed.05e7a4e9.js → htmlmixed.8b21831b.js} +1 -1
- package/dist/assets/{http.36bf71f5.js → http.e1dcc6a6.js} +1 -1
- package/dist/assets/{hu-HU.1043806e.js → hu-HU.fc2083ad.js} +1 -1
- package/dist/assets/{id-ID.42c8e6ba.js → id-ID.06f8c7ad.js} +1 -1
- package/dist/assets/{idl.369d3687.js → idl.182ee0a1.js} +1 -1
- package/dist/assets/{iis.61b90801.js → iis.751d4784.js} +3 -2
- package/dist/assets/{index.53d7b4b1.js → index.00342ce9.js} +1 -1
- package/dist/assets/{index.7cb6c8da.js → index.06705dee.js} +1 -1
- package/dist/assets/{index.1fd33265.js → index.0aaf58e2.js} +1 -1
- package/dist/assets/{index.49fe7bbe.js → index.0b37920b.js} +1 -1
- package/dist/assets/{index.255ac1ac.js → index.0e9f9cdb.js} +1 -1
- package/dist/assets/{index.376099f6.js → index.10fa61dd.js} +1 -1
- package/dist/assets/{index.bd34bd8b.js → index.170c9aef.js} +1 -1
- package/dist/assets/{index.65c5205d.js → index.195486a9.js} +1 -1
- package/dist/assets/{index.bd506b24.js → index.1bd2ce1d.js} +1 -1
- package/dist/assets/{index.d03ceb16.js → index.1cb1c89c.js} +1 -1
- package/dist/assets/{index.aa99cd2b.js → index.1ef64264.js} +1 -1
- package/dist/assets/{index.f8360683.js → index.24dc2b50.js} +1 -1
- package/dist/assets/index.2603f9b4.css +1 -0
- package/dist/assets/{index.5ef6863e.js → index.2a532c34.js} +1 -1
- package/dist/assets/{index.e713a183.js → index.2c7690b7.js} +1 -1
- package/dist/assets/index.2ca0b263.css +1 -0
- package/dist/assets/{index.40abc1ae.js → index.2f09b0ab.js} +1 -1
- package/dist/assets/{index.6690c511.js → index.31d6290e.js} +1 -1
- package/dist/assets/{index.e65c230c.js → index.35b3227d.js} +1 -1
- package/dist/assets/{index.e68f5a19.js → index.3a55cb7a.js} +1 -1
- package/dist/assets/{index.f526c37a.js → index.3cdbbf75.js} +1 -1
- package/dist/assets/{index.7e86f332.js → index.3e7346f6.js} +1 -1
- package/dist/assets/{index.15d4ddd7.js → index.42b5c185.js} +1 -1
- package/dist/assets/{index.9597bb18.js → index.48b2303e.js} +1 -1
- package/dist/assets/{index.64b8816b.js → index.48e8585e.js} +1 -1
- package/dist/assets/{index.bba3d752.js → index.4b7ce3d9.js} +1 -1
- package/dist/assets/{index.31d1f296.js → index.50e58393.js} +1 -1
- package/dist/assets/{index.8fbbb686.js → index.570f038e.js} +1 -1
- package/dist/assets/{index.900f92f9.js → index.5ae5f490.js} +1 -1
- package/dist/assets/{index.19d9989e.js → index.5e1fa0bf.js} +1 -1
- package/dist/assets/{index.5caafb3d.js → index.609e713c.js} +1 -1
- package/dist/assets/{index.87946fe5.js → index.60c625fe.js} +1 -1
- package/dist/assets/{index.c36b50cf.js → index.63f139be.js} +1 -1
- package/dist/assets/{index.216b6328.js → index.640dd223.js} +1 -1
- package/dist/assets/{index.bee706b8.js → index.64591ec8.js} +1 -1
- package/dist/assets/{index.54a202be.js → index.65f3fbd9.js} +1 -1
- package/dist/assets/{index.5e175966.js → index.6df3a744.js} +1 -1
- package/dist/assets/{index.0caa5421.js → index.7250277a.js} +1 -1
- package/dist/assets/{index.0bd18bfd.js → index.72b20962.js} +1 -1
- package/dist/assets/{index.3c3c9275.js → index.777a345b.js} +1 -1
- package/dist/assets/{index.5d4c645c.js → index.7a4b3279.js} +1 -1
- package/dist/assets/{index.1d3c8b76.js → index.7b7bd2bb.js} +1 -1
- package/dist/assets/{index.1d2a8b64.js → index.7bd8fa33.js} +1 -1
- package/dist/assets/{index.f07bb8da.js → index.7f11024e.js} +1 -1
- package/dist/assets/{index.15f9b058.js → index.825757de.js} +1 -1
- package/dist/assets/{index.8e104536.js → index.85487066.js} +1 -1
- package/dist/assets/{index.83459924.js → index.91f9a8ea.js} +1 -1
- package/dist/assets/{index.550c7d98.js → index.9a34d0ad.js} +1 -1
- package/dist/assets/{index.d6eb48fd.js → index.9be0af27.js} +1 -1
- package/dist/assets/{index.266ef2c9.js → index.9df68447.js} +1 -1
- package/dist/assets/{index.0ed888d7.js → index.a142ec45.js} +1 -1
- package/dist/assets/{index.c2ece3ef.js → index.a3746c49.js} +1 -1
- package/dist/assets/{index.14bae658.js → index.aae790c3.js} +1 -1
- package/dist/assets/{index.b7e06d7c.js → index.ac5309a7.js} +1 -1
- package/dist/assets/{index.29fa87ff.js → index.adcd313e.js} +1 -1
- package/dist/assets/{index.b73273e0.js → index.af1f4431.js} +1 -1
- package/dist/assets/{index.61b86afb.js → index.b24bf29e.js} +1 -1
- package/dist/assets/{index.77f16025.js → index.b4db14a9.js} +1 -1
- package/dist/assets/{index.0b9941e1.js → index.b7968e56.js} +1 -1
- package/dist/assets/{index.0fb52a97.js → index.b803b5c0.js} +1 -1
- package/dist/assets/{index.94db319d.js → index.b94dcef9.js} +1 -1
- package/dist/assets/{index.5a304363.js → index.bb294572.js} +1 -1
- package/dist/assets/{index.59451527.js → index.bc07556a.js} +1 -1
- package/dist/assets/{index.aa7706f9.js → index.bdce1888.js} +1 -1
- package/dist/assets/{index.7a811ff8.js → index.be10baeb.js} +1 -1
- package/dist/assets/{index.b2adcd91.js → index.c046a8fd.js} +1 -1
- package/dist/assets/{index.1fb6fed8.js → index.c242e7b6.js} +1 -1
- package/dist/assets/{index.0ba5b42a.js → index.c5418cbb.js} +1 -1
- package/dist/assets/{index.6da8ed8b.js → index.c875d5a1.js} +1 -1
- package/dist/assets/{index.544fc3f4.js → index.cc291dcf.js} +1 -1
- package/dist/assets/{index.11bd8819.js → index.d15bff6b.js} +1 -1
- package/dist/assets/{index.1a242848.js → index.dd5da334.js} +1 -1
- package/dist/assets/{index.b75dc5c2.js → index.de5fa400.js} +1 -1
- package/dist/assets/{index.2ffae100.js → index.e59eb90f.js} +1 -1
- package/dist/assets/{index.8c729bf2.js → index.e8e78fe0.js} +1 -1
- package/dist/assets/{index.5286e9da.js → index.ee87082d.js} +1 -1
- package/dist/assets/index.eeba3fe9.js +26 -0
- package/dist/assets/{index.5c71b9bf.js → index.f2468536.js} +1 -1
- package/dist/assets/{index.9c37c372.js → index.f2f83988.js} +1 -1
- package/dist/assets/{index.750b633c.js → index.f650bdd2.js} +1 -1
- package/dist/assets/{index.dc1688d8.js → index.f992167b.js} +1 -1
- package/dist/assets/{index.19ae9f48.js → index.fc0d2b63.js} +1 -1
- package/dist/assets/{index.fefbb129.js → index.fd87d3cb.js} +1 -1
- package/dist/assets/{input-rich-text-html.67ebfae2.css → input-rich-text-html.01165183.css} +1 -1
- package/dist/assets/{input-rich-text-html.8fe88ffb.js → input-rich-text-html.c2f628ae.js} +43 -43
- package/dist/assets/{insights.fe74fe29.js → insights.35419fea.js} +1 -1
- package/dist/assets/installation.eae7bc78.js +1 -0
- package/dist/assets/{interfaces.23229e78.js → interfaces.106447a6.js} +7 -7
- package/dist/assets/{introduction.16f8f0b0.js → introduction.775bd94e.js} +1 -1
- package/dist/assets/introduction.8f825d90.js +1 -0
- package/dist/assets/{introduction.e29b10c2.js → introduction.9780c035.js} +7 -7
- package/dist/assets/{introduction.02e3c2a7.js → introduction.b9bb6e01.js} +2 -2
- package/dist/assets/it-IT.14bfc0b6.js +1 -0
- package/dist/assets/{items.4227ac2d.js → items.50d09d96.js} +6 -6
- package/dist/assets/ja-JP.ba312533.js +1 -0
- package/dist/assets/{javascript-hint.747ac6fc.js → javascript-hint.ef0fe16e.js} +1 -1
- package/dist/assets/{javascript.84e4549d.js → javascript.38e2ca1a.js} +1 -1
- package/dist/assets/{jinja2.a9a0ddb1.js → jinja2.8648ef63.js} +1 -1
- package/dist/assets/{jsx.5d18b001.js → jsx.9a8d51d6.js} +1 -1
- package/dist/assets/{julia.12cc2a8c.js → julia.c4e037f7.js} +1 -1
- package/dist/assets/ku-TR.3322375c.js +1 -0
- package/dist/assets/{layouts.1bd78154.js → layouts.ba122738.js} +5 -5
- package/dist/assets/{livescript.f585b533.js → livescript.d673b991.js} +1 -1
- package/dist/assets/{localization.a73190dd.js → localization.47f8e7e5.js} +1 -1
- package/dist/assets/logo-light.7a327cdd.svg +3 -0
- package/dist/assets/{lt-LT.69b9046b.js → lt-LT.497afd55.js} +1 -1
- package/dist/assets/{lua.a656cb84.js → lua.7cfb30be.js} +1 -1
- package/dist/assets/{manual.794bb884.js → manual.6d92664d.js} +4 -4
- package/dist/assets/{mark-selection.98a1b6fc.js → mark-selection.665c33af.js} +1 -1
- package/dist/assets/{match-highlighter.e1444e0b.js → match-highlighter.ffb4832f.js} +1 -1
- package/dist/assets/{mathematica.448ae8b5.js → mathematica.93a46a1f.js} +1 -1
- package/dist/assets/{mbox.977764b6.js → mbox.deb92f82.js} +1 -1
- package/dist/assets/migrations.ca569233.js +19 -0
- package/dist/assets/{mirc.ac98dd7b.js → mirc.96b69659.js} +1 -1
- package/dist/assets/{mllike.ee7c202f.js → mllike.2604471e.js} +1 -1
- package/dist/assets/{modelica.0e691287.js → modelica.07417903.js} +1 -1
- package/dist/assets/{modules.116e46b4.js → modules.3f25c2ca.js} +6 -6
- package/dist/assets/{mscgen.4c9c356e.js → mscgen.ce94fb84.js} +1 -1
- package/dist/assets/{multiplex.91d67c6e.js → multiplex.553fdcf6.js} +1 -1
- package/dist/assets/{mumps.c8a6b66b.js → mumps.6d4f6a77.js} +1 -1
- package/dist/assets/{nginx.048f88c1.js → nginx.1b1b7a85.js} +1 -1
- package/dist/assets/{nl-NL.bff34791.js → nl-NL.edb61cc3.js} +1 -1
- package/dist/assets/no-NO.ebaacb8a.js +1 -0
- package/dist/assets/notifications.7d5b4018.js +153 -0
- package/dist/assets/{nsis.1830f129.js → nsis.800b8ecf.js} +1 -1
- package/dist/assets/{ntriples.dff164ff.js → ntriples.5b70253c.js} +1 -1
- package/dist/assets/{octave.27aaa450.js → octave.d674345b.js} +1 -1
- package/dist/assets/{overlay.ff3e2ac4.js → overlay.aaae46c1.js} +1 -1
- package/dist/assets/{overview.c3721f80.js → overview.391169f1.js} +1 -1
- package/dist/assets/overview.b3257d1a.js +1 -0
- package/dist/assets/{oz.c625131c.js → oz.a57cd6c6.js} +1 -1
- package/dist/assets/{panels.c9913c4b.js → panels.3d54322a.js} +1 -1
- package/dist/assets/{pascal.2c02faa8.js → pascal.bd6858f9.js} +1 -1
- package/dist/assets/{pegjs.0854aa70.js → pegjs.094d5776.js} +1 -1
- package/dist/assets/{perl.6bf3c050.js → perl.3aa60c3c.js} +1 -1
- package/dist/assets/{permissions.83661a53.js → permissions.564eb072.js} +4 -4
- package/dist/assets/php.aad9a05c.js +1 -0
- package/dist/assets/{pig.f6acccd0.js → pig.60e1b8d9.js} +1 -1
- package/dist/assets/pl-PL.fcac44cc.js +1 -0
- package/dist/assets/{plesk.20b032fb.js → plesk.938ab777.js} +6 -6
- package/dist/assets/{powershell.3fe72e38.js → powershell.bff1f89c.js} +1 -1
- package/dist/assets/{presets-bookmarks.dfa9b52f.js → presets-bookmarks.b268b023.js} +1 -1
- package/dist/assets/{presets.7e0c88ae.js → presets.cff54053.js} +1 -1
- package/dist/assets/project-settings.c887fbea.js +1 -0
- package/dist/assets/{properties.8c3f631c.js → properties.0698e9c9.js} +1 -1
- package/dist/assets/{protobuf.ff5609be.js → protobuf.3cefb795.js} +1 -1
- package/dist/assets/pt-BR.eff6bc85.js +1 -0
- package/dist/assets/{pt-PT.b923e241.js → pt-PT.33683147.js} +1 -1
- package/dist/assets/{pug.e66669ae.js → pug.2823ac37.js} +1 -1
- package/dist/assets/{puppet.8585cc4d.js → puppet.6b5f8999.js} +1 -1
- package/dist/assets/{python.ce0163fc.js → python.f0335e64.js} +1 -1
- package/dist/assets/{q.4a99aff9.js → q.ab5b1dd7.js} +1 -1
- package/dist/assets/{query.998e770c.js → query.065bc71e.js} +3 -3
- package/dist/assets/{quickstart.1aa6ffca.js → quickstart.cdf47561.js} +3 -3
- package/dist/assets/{r.d0ae744a.js → r.cc002fd5.js} +1 -1
- package/dist/assets/{relations.7edadd3b.js → relations.028171dc.js} +4 -4
- package/dist/assets/{relationships.b6ef88eb.js → relationships.dc4de6fe.js} +14 -17
- package/dist/assets/{revisions.9a70b1ec.js → revisions.9c06a6cd.js} +3 -3
- package/dist/assets/{roles.f017240c.js → roles.05aa20d3.js} +7 -7
- package/dist/assets/{rpm.f0a7ad70.js → rpm.16e37784.js} +1 -1
- package/dist/assets/rst.bc8cd4f0.js +1 -0
- package/dist/assets/ru-RU.2e06b3ed.js +1 -0
- package/dist/assets/{ruby.4d15c7d1.js → ruby.207c3c8d.js} +1 -1
- package/dist/assets/{running-locally.bd69d8dc.js → running-locally.74954cf8.js} +5 -5
- package/dist/assets/{rust.e4dfe0d4.js → rust.e5e8db34.js} +1 -1
- package/dist/assets/{sas.709abdd1.js → sas.732c1fb5.js} +1 -1
- package/dist/assets/{sass.2505dd07.js → sass.a6d54759.js} +1 -1
- package/dist/assets/{scheme.897fc126.js → scheme.bf86a054.js} +1 -1
- package/dist/assets/sdk.027e1905.js +300 -0
- package/dist/assets/{security.548b2b76.js → security.3ecda9dd.js} +1 -1
- package/dist/assets/{server.d6f5abdc.js → server.2f493acf.js} +4 -4
- package/dist/assets/{settings.4b550f79.js → settings.5730c27d.js} +1 -1
- package/dist/assets/{settings.5c0f889e.js → settings.9e861c3c.js} +9 -5
- package/dist/assets/{shell.19de1cf8.js → shell.29cd4035.js} +1 -1
- package/dist/assets/{show-hint.0412391d.js → show-hint.23eb7a45.js} +1 -1
- package/dist/assets/{sieve.da5795e7.js → sieve.d831b5ce.js} +1 -1
- package/dist/assets/{simple.ab4d8d4b.js → simple.312a5b01.js} +1 -1
- package/dist/assets/{sl-SI.bfbe276b.js → sl-SI.41305ef8.js} +1 -1
- package/dist/assets/{slim.2805b872.js → slim.cab15ca2.js} +1 -1
- package/dist/assets/{smalltalk.ee9f0dd3.js → smalltalk.4f6a7ed7.js} +1 -1
- package/dist/assets/{smarty.08c649b4.js → smarty.a78117f3.js} +1 -1
- package/dist/assets/{solr.36ddf5d2.js → solr.f90334b7.js} +1 -1
- package/dist/assets/soy.d1e38e2c.js +1 -0
- package/dist/assets/{sparql.e90ce227.js → sparql.3d8087d4.js} +1 -1
- package/dist/assets/{spreadsheet.812bc4c1.js → spreadsheet.3b78c411.js} +1 -1
- package/dist/assets/sql.5f7a694e.js +1 -0
- package/dist/assets/{sr-CS.b4de8472.js → sr-CS.0b70ed56.js} +1 -1
- package/dist/assets/sso.2a03ed28.js +22 -0
- package/dist/assets/{stex.8fe110b6.js → stex.d0d6fa5e.js} +1 -1
- package/dist/assets/stylus.bb6171bb.js +1 -0
- package/dist/assets/{support.618bb824.js → support.f442955d.js} +1 -1
- package/dist/assets/sv-SE.07c9dbad.js +1 -0
- package/dist/assets/{swift.a963a96b.js → swift.599d450c.js} +1 -1
- package/dist/assets/{tcl.c00f0ec5.js → tcl.30b6bd0a.js} +1 -1
- package/dist/assets/{textile.431d240b.js → textile.2aaadb71.js} +1 -1
- package/dist/assets/{th-TH.81e128af.js → th-TH.51bd50db.js} +1 -1
- package/dist/assets/{themes.ec95c8cb.js → themes.7af7ef21.js} +2 -2
- package/dist/assets/{tiddlywiki.1b4d0a22.js → tiddlywiki.6c21f5fe.js} +1 -1
- package/dist/assets/{tiki.d37bbabb.js → tiki.f7b3b608.js} +1 -1
- package/dist/assets/{toml.1475fc5c.js → toml.70cd3de1.js} +1 -1
- package/dist/assets/{tornado.e812c41b.js → tornado.da87f7ab.js} +1 -1
- package/dist/assets/{tr-TR.0be85b79.js → tr-TR.fea3a7da.js} +1 -1
- package/dist/assets/{translations.8406cfe3.js → translations.c313e520.js} +1 -1
- package/dist/assets/{troff.52251200.js → troff.057eadf9.js} +1 -1
- package/dist/assets/{ttcn-cfg.4e31c9ce.js → ttcn-cfg.0acb6ffd.js} +1 -1
- package/dist/assets/{ttcn.3ea9f7e4.js → ttcn.5cb1c005.js} +1 -1
- package/dist/assets/{turtle.7f166fc9.js → turtle.f8cfe16f.js} +1 -1
- package/dist/assets/{twig.7c77b8f7.js → twig.bbb4c257.js} +1 -1
- package/dist/assets/ubuntu.195a12bc.js +11 -0
- package/dist/assets/uk-UA.b339fbea.js +1 -0
- package/dist/assets/{upgrades-migrations.df5c4042.js → upgrades-migrations.4262de4c.js} +1 -1
- package/dist/assets/use-sync.df5f0627.js +1 -0
- package/dist/assets/{user-directory.63d4d638.js → user-directory.315e2e53.js} +1 -1
- package/dist/assets/{users-roles-permissions.68584449.js → users-roles-permissions.1d02ef32.js} +1 -1
- package/dist/assets/{users.c3c87007.js → users.850440e1.js} +19 -19
- package/dist/assets/{utilities.e7ef40fc.js → utilities.a706557a.js} +3 -3
- package/dist/assets/{vb.1551d2a2.js → vb.227d7bae.js} +1 -1
- package/dist/assets/{vbscript.0c1ac8ad.js → vbscript.b4c906c8.js} +1 -1
- package/dist/assets/{velocity.63a0cbb3.js → velocity.1dc1dd7a.js} +1 -1
- package/dist/assets/vendor.327371af.js +2039 -0
- package/dist/assets/{verilog.37081dae.js → verilog.00006420.js} +1 -1
- package/dist/assets/{vhdl.8c76cefa.js → vhdl.7ea928c0.js} +1 -1
- package/dist/assets/{vi-VN.14101822.js → vi-VN.12000d52.js} +1 -1
- package/dist/assets/{vue.2098315b.js → vue.06dc381f.js} +1 -1
- package/dist/assets/{wast.b90e42f3.js → wast.9ebd9127.js} +1 -1
- package/dist/assets/{webhooks.2dd2256f.js → webhooks.27290345.js} +5 -5
- package/dist/assets/{webhooks.59b09c0d.js → webhooks.40c7a452.js} +1 -1
- package/dist/assets/{webidl.76dda28b.js → webidl.91787b9d.js} +1 -1
- package/dist/assets/{xquery.5d4fe342.js → xquery.8f2f2640.js} +1 -1
- package/dist/assets/{yacas.b1b2324d.js → yacas.e74d7b64.js} +1 -1
- package/dist/assets/{yaml-frontmatter.6a71ce09.js → yaml-frontmatter.09f551ca.js} +1 -1
- package/dist/assets/{yaml.ca3ba26d.js → yaml.6c188844.js} +1 -1
- package/dist/assets/{z80.a23bb6d3.js → z80.2ec7da50.js} +1 -1
- package/dist/assets/zh-CN.7e212f77.js +1 -0
- package/dist/assets/{zh-TW.3efec3f7.js → zh-TW.ef28a778.js} +1 -1
- package/dist/index.0b1b074c.js +351 -0
- package/dist/index.html +4 -4
- package/dist/vue-i18n.9dd4f933.js +1 -0
- package/dist/vue-router.1ce019c2.js +1 -0
- package/dist/vue.6e63c09e.js +1 -0
- package/package.json +18 -17
- package/dist/@directus_extensions-sdk.8dd2238a.js +0 -1
- package/dist/assets/af-ZA.5bc87dbc.js +0 -1
- package/dist/assets/bg-BG.9212fbf7.js +0 -2
- package/dist/assets/cli.9c35ba03.js +0 -10
- package/dist/assets/cmake.59d9f97d.js +0 -1
- package/dist/assets/css.f0a27894.js +0 -1
- package/dist/assets/data-model.66f7e0e4.js +0 -1
- package/dist/assets/digitalocean-app-platform.d8054fb4.js +0 -3
- package/dist/assets/es-419.f8a62d18.js +0 -1
- package/dist/assets/es-CL.76c7e2d1.js +0 -1
- package/dist/assets/es-ES.f23f1053.js +0 -1
- package/dist/assets/faq.e629faf1.js +0 -1
- package/dist/assets/fi-FI.26f5b2cc.js +0 -1
- package/dist/assets/fr-FR.e2625f19.js +0 -1
- package/dist/assets/hi-IN.d224762a.js +0 -1
- package/dist/assets/hooks.9441eb32.js +0 -75
- package/dist/assets/index.570f6759.js +0 -26
- package/dist/assets/index.9fb5b610.css +0 -1
- package/dist/assets/index.a49dcfb2.css +0 -1
- package/dist/assets/installation.24a44faf.js +0 -1
- package/dist/assets/introduction.25a5119e.js +0 -1
- package/dist/assets/it-IT.3c8c35dd.js +0 -1
- package/dist/assets/ja-JP.1e745c98.js +0 -1
- package/dist/assets/ku-TR.62749d99.js +0 -1
- package/dist/assets/logo-light.1a93a59d.svg +0 -3
- package/dist/assets/migrations.992a23b0.js +0 -15
- package/dist/assets/no-NO.66c87fac.js +0 -1
- package/dist/assets/overview.b56593b7.js +0 -1
- package/dist/assets/php.7f583bfa.js +0 -1
- package/dist/assets/pl-PL.8f26d744.js +0 -1
- package/dist/assets/project-settings.31256b54.js +0 -1
- package/dist/assets/pt-BR.e623fc8a.js +0 -1
- package/dist/assets/rst.f0464fbc.js +0 -1
- package/dist/assets/ru-RU.fec4e20e.js +0 -1
- package/dist/assets/sdk.b41be838.js +0 -282
- package/dist/assets/soy.2c180864.js +0 -1
- package/dist/assets/sql.f222e1b8.js +0 -1
- package/dist/assets/stylus.02531228.js +0 -1
- package/dist/assets/sv-SE.1739ab58.js +0 -1
- package/dist/assets/ubuntu.67ddbadb.js +0 -11
- package/dist/assets/uk-UA.46578a03.js +0 -1
- package/dist/assets/use-sync.da76e524.js +0 -1
- package/dist/assets/vendor.299bc11c.js +0 -2039
- package/dist/assets/zh-CN.355da8e5.js +0 -1
- package/dist/index.0f7650cb.js +0 -340
- package/dist/vue-i18n.b2a4a29c.js +0 -1
- package/dist/vue-router.cd2fde56.js +0 -1
- package/dist/vue.642980f3.js +0 -1
|
@@ -1,282 +0,0 @@
|
|
|
1
|
-
import{p as t,q as r,C as o,v as c,M as s,D as e}from"./vendor.299bc11c.js";const i=s("div",{class:"markdown-body"},[s("blockquote",null,[s("p",null,[e("The JS SDK provides an intuitive interface for the Directus API from within a JavaScript-powered project (browsers and Node.js). The default implementation uses "),s("a",{href:"https://npmjs.com/axios",target:"_blank",rel:"noopener noreferrer"},"Axios"),e(" for transport and "),s("code",null,"localStorage"),e(" for storing state.")])]),s("p",null,[s("div",{class:"table-of-contents"},[s("ul",null,[s("li",null,[s("a",{href:"#installation"},"Installation")]),s("li",null,[s("a",{href:"#usage"},"Usage")]),s("li",null,[s("a",{href:"#typescript"},"TypeScript")]),s("li",null,[s("a",{href:"#reference"},"Reference")]),s("li",null,[s("a",{href:"#auth"},"Auth")]),s("li",null,[s("a",{href:"#transport"},"Transport")]),s("li",null,[s("a",{href:"#storage"},"Storage")]),s("li",null,[s("a",{href:"#items"},"Items")]),s("li",null,[s("a",{href:"#activity"},"Activity")]),s("li",null,[s("a",{href:"#comments"},"Comments")]),s("li",null,[s("a",{href:"#collections"},"Collections")]),s("li",null,[s("a",{href:"#fields"},"Fields")]),s("li",null,[s("a",{href:"#files"},"Files")]),s("li",null,[s("a",{href:"#folders"},"Folders")]),s("li",null,[s("a",{href:"#permissions"},"Permissions")]),s("li",null,[s("a",{href:"#presets"},"Presets")]),s("li",null,[s("a",{href:"#relations"},"Relations")]),s("li",null,[s("a",{href:"#revisions"},"Revisions")]),s("li",null,[s("a",{href:"#roles"},"Roles")]),s("li",null,[s("a",{href:"#settings"},"Settings")]),s("li",null,[s("a",{href:"#server"},"Server")]),s("li",null,[s("a",{href:"#users"},"Users")]),s("li",null,[s("a",{href:"#utils"},"Utils")])])])]),s("h2",{id:"installation"},[e("Installation "),s("a",{class:"header-anchor",href:"#installation"},"#")]),s("pre",null,[s("code",{class:"language-bash"},`npm install @directus/sdk
|
|
2
|
-
`)]),s("h2",{id:"usage"},[e("Usage "),s("a",{class:"header-anchor",href:"#usage"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"import"),e(" { Directus } "),s("span",{class:"hljs-keyword"},"from"),e(),s("span",{class:"hljs-string"},"'@directus/sdk'"),e(`;
|
|
3
|
-
|
|
4
|
-
`),s("span",{class:"hljs-keyword"},"const"),e(" directus = "),s("span",{class:"hljs-keyword"},"new"),e(" Directus("),s("span",{class:"hljs-string"},"'http://directus.example.com'"),e(`);
|
|
5
|
-
|
|
6
|
-
`),s("span",{class:"hljs-keyword"},"async"),e(),s("span",{class:"hljs-function"},[s("span",{class:"hljs-keyword"},"function"),e(),s("span",{class:"hljs-title"},"start"),e("("),s("span",{class:"hljs-params"}),e(") ")]),e(`{
|
|
7
|
-
`),s("span",{class:"hljs-comment"},"// Wait for login to be done..."),e(`
|
|
8
|
-
`),s("span",{class:"hljs-keyword"},"await"),e(` directus.auth.login({
|
|
9
|
-
`),s("span",{class:"hljs-attr"},"email"),e(": "),s("span",{class:"hljs-string"},"'admin@example.com'"),e(`,
|
|
10
|
-
`),s("span",{class:"hljs-attr"},"password"),e(": "),s("span",{class:"hljs-string"},"'password'"),e(`,
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
`),s("span",{class:"hljs-comment"},"// ... before fetching items"),e(`
|
|
14
|
-
`),s("span",{class:"hljs-keyword"},"const"),e(" articles = "),s("span",{class:"hljs-keyword"},"await"),e(" directus.items("),s("span",{class:"hljs-string"},"'articles'"),e(`).readMany();
|
|
15
|
-
|
|
16
|
-
`),s("span",{class:"hljs-built_in"},"console"),e(`.log({
|
|
17
|
-
`),s("span",{class:"hljs-attr"},"items"),e(`: articles.data,
|
|
18
|
-
`),s("span",{class:"hljs-attr"},"total"),e(`: articles.meta.total_count,
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
start();
|
|
23
|
-
`)])]),s("h2",{id:"typescript"},[e("TypeScript "),s("a",{class:"header-anchor",href:"#typescript"},"#")]),s("p",null,"Version >= 4.1"),s("p",null,"Although it\u2019s not required, it is recommended to use Typescript to have an easy development experience. This allows more detailed IDE suggestions for return types, sorting, filtering, etc."),s("p",null,"To feed the SDK with your current schema, you need to pass it on the constructor."),s("pre",null,[s("code",{class:"language-ts"},[s("span",{class:"hljs-keyword"},"type"),e(` BlogPost = {
|
|
24
|
-
`),s("span",{class:"hljs-attr"},"id"),e(`: ID;
|
|
25
|
-
title: `),s("span",{class:"hljs-built_in"},"string"),e(`;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
`),s("span",{class:"hljs-keyword"},"type"),e(` BlogSettings = {
|
|
29
|
-
`),s("span",{class:"hljs-attr"},"display_promotions"),e(": "),s("span",{class:"hljs-built_in"},"boolean"),e(`;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
`),s("span",{class:"hljs-keyword"},"type"),e(` MyCollections = {
|
|
33
|
-
`),s("span",{class:"hljs-attr"},"posts"),e(`: BlogPost;
|
|
34
|
-
settings: BlogSettings;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
`),s("span",{class:"hljs-comment"},"// This is how you feed custom type information to Directus."),e(`
|
|
38
|
-
`),s("span",{class:"hljs-keyword"},"const"),e(" directus = "),s("span",{class:"hljs-keyword"},"new"),e(" Directus<MyCollections>("),s("span",{class:"hljs-string"},"'http://url'"),e(`);
|
|
39
|
-
|
|
40
|
-
`),s("span",{class:"hljs-comment"},"// ..."),e(`
|
|
41
|
-
|
|
42
|
-
`),s("span",{class:"hljs-keyword"},"const"),e(" post = "),s("span",{class:"hljs-keyword"},"await"),e(" directus.items("),s("span",{class:"hljs-string"},"'posts'"),e(").readOne("),s("span",{class:"hljs-number"},"1"),e(`);
|
|
43
|
-
`),s("span",{class:"hljs-comment"},"// typeof(post) is a partial BlogPost object"),e(`
|
|
44
|
-
|
|
45
|
-
`),s("span",{class:"hljs-keyword"},"const"),e(" settings = "),s("span",{class:"hljs-keyword"},"await"),e(" posts.singleton("),s("span",{class:"hljs-string"},"'settings'"),e(`).read();
|
|
46
|
-
`),s("span",{class:"hljs-comment"},"// typeof(settings) is a partial BlogSettings object"),e(`
|
|
47
|
-
`)])]),s("p",null,"You can also extend the Directus system type information by providing type information for system collections as well."),s("pre",null,[s("code",{class:"language-ts"},[s("span",{class:"hljs-keyword"},"import"),e(" { Directus } "),s("span",{class:"hljs-keyword"},"from"),e(),s("span",{class:"hljs-string"},"'@directus/sdk'"),e(`;
|
|
48
|
-
|
|
49
|
-
`),s("span",{class:"hljs-comment"},"// Custom fields added to Directus user collection."),e(`
|
|
50
|
-
`),s("span",{class:"hljs-keyword"},"type"),e(` UserType = {
|
|
51
|
-
`),s("span",{class:"hljs-attr"},"level"),e(": "),s("span",{class:"hljs-built_in"},"number"),e(`;
|
|
52
|
-
experience: `),s("span",{class:"hljs-built_in"},"number"),e(`;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
`),s("span",{class:"hljs-keyword"},"type"),e(` CustomTypes = {
|
|
56
|
-
`),s("span",{class:"hljs-comment"},`/*
|
|
57
|
-
This type will be merged with Directus user type.
|
|
58
|
-
It's important that the naming matches a directus
|
|
59
|
-
collection name exactly. Typos won't get caught here
|
|
60
|
-
since SDK will assume it's a custom user collection.
|
|
61
|
-
*/`),e(`
|
|
62
|
-
`),s("span",{class:"hljs-attr"},"directus_users"),e(`: UserType;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
`),s("span",{class:"hljs-keyword"},"const"),e(" directus = "),s("span",{class:"hljs-keyword"},"new"),e(" Directus<CustomTypes>("),s("span",{class:"hljs-string"},"'https://api.example.com'"),e(`);
|
|
66
|
-
|
|
67
|
-
`),s("span",{class:"hljs-keyword"},"await"),e(` directus.auth.login({
|
|
68
|
-
`),s("span",{class:"hljs-attr"},"email"),e(": "),s("span",{class:"hljs-string"},"'admin@example.com'"),e(`,
|
|
69
|
-
`),s("span",{class:"hljs-attr"},"password"),e(": "),s("span",{class:"hljs-string"},"'password'"),e(`,
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
`),s("span",{class:"hljs-keyword"},"const"),e(" me = "),s("span",{class:"hljs-keyword"},"await"),e(` directus.users.me.read();
|
|
73
|
-
`),s("span",{class:"hljs-comment"},"// typeof me = partial DirectusUser & UserType;"),e(`
|
|
74
|
-
|
|
75
|
-
`),s("span",{class:"hljs-comment"},"// OK"),e(`
|
|
76
|
-
me.level = `),s("span",{class:"hljs-number"},"42"),e(`;
|
|
77
|
-
|
|
78
|
-
`),s("span",{class:"hljs-comment"},'// Error TS2322: Type "string" is not assignable to type "number".'),e(`
|
|
79
|
-
me.experience = `),s("span",{class:"hljs-string"},"'high'"),e(`;
|
|
80
|
-
`)])]),s("h2",{id:"reference"},[e("Reference "),s("a",{class:"header-anchor",href:"#reference"},"#")]),s("h3",{id:"constructor"},[e("Constructor "),s("a",{class:"header-anchor",href:"#constructor"},"#")]),s("p",null,[e("This is the starting point to use the SDK. You need to create an instance and invoke methods from it. In most cases a single instance is sufficient, but in case you need more, you need to define "),s("a",{href:"#options.storage.prefix"},[s("code",null,"options.storage.prefix")]),e(".")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"import"),e(" { Directus } "),s("span",{class:"hljs-keyword"},"from"),e(),s("span",{class:"hljs-string"},"'@directus/sdk'"),e(`;
|
|
81
|
-
|
|
82
|
-
`),s("span",{class:"hljs-keyword"},"const"),e(" directus = "),s("span",{class:"hljs-keyword"},"new"),e(` Directus(url, init);
|
|
83
|
-
`)])]),s("ul",null,[s("li",null,[s("p",null,[s("code",null,"url"),e(" [required] "),s("em",null,"String"),e(" - A string pointing to your Directus instance. E.g. "),s("code",null,"https://admin.directus.io")]),s("p",null,[s("a",{name:"options"})])]),s("li",null,[s("p",null,[s("code",null,"init"),e(" [optional] "),s("em",null,"Object"),e(" - Define settings that you want to customize .The possible options are:")]),s("p",null,[s("a",{name:"options.auth"})]),s("ul",null,[s("li",null,[s("p",null,[s("code",null,"auth"),e(" [optional] "),s("em",null,"Object"),e(" - Defines settings you want to customize regarding "),s("a",{href:"#auth"},"authentication"),e(". The possible options are:")]),s("ul",null,[s("li",null,[s("p",null,[s("code",null,"mode"),e(" [optional] "),s("em",null,"String"),e(" - Defines the mode you want to use for authentication. It can be "),s("code",null,"'cookie'"),e(" for cookies or "),s("code",null,"'json'"),e(" for JWT. Defaults to "),s("code",null,"'cookie'"),e(" on browsers and "),s("code",null,"'json'"),e(" otherwise. We recommend using cookies when possible to prevent any kind of attacks, mostly XSS.")]),s("p",null,[s("a",{name:"options.auth.autoRefresh"})])]),s("li",null,[s("p",null,[s("code",null,"autoRefresh"),e(" [optional] "),s("em",null,"Boolean"),e(" - Tells SDK if it should handle refresh tokens automatically. Defaults to "),s("code",null,"true"),e(".")])]),s("li",null,[s("p",null,[s("code",null,"msRefreshBeforeExpires"),e(" [optional] "),s("em",null,"Number"),e(" - When "),s("code",null,"autoRefresh"),e(" is enabled, this tells how many milliseconds before the refresh token expires and needs to be refreshed. Defaults to "),s("code",null,"30000"),e(".")])]),s("li",null,[s("p",null,[s("code",null,"staticToken"),e(" [optional] "),s("em",null,"String"),e(" - Defines the static token to use. It is not compatible with the options above since it does not refresh. Defaults to "),s("code",null,"''"),e(" (no static token).")])])])])]),s("p",null,[s("a",{name:"options.storage"})]),s("ul",null,[s("li",null,[s("p",null,[s("code",null,"storage"),e(" [optional] "),s("em",null,"Object"),e(" - Defines settings you want to customize regarding "),s("a",{href:"#storage"},"storage"),e(".")]),s("p",null,[s("a",{name:"options.storage.prefix"})]),s("ul",null,[s("li",null,[s("code",null,"prefix"),e(" [optional] "),s("em",null,"String"),e(" - Defines the tokens prefix tokens that are saved. This should be fulfilled with different values when using multiple instances of SDK. Defaults to "),s("code",null,"''"),e(" (no prefix).")]),s("li",null,[s("code",null,"mode"),e(" [optional] "),s("em",null,"String"),e(" - Defines the storage location to be used to save tokens. Allowed values are "),s("code",null,"LocalStorage"),e(" and "),s("code",null,"MemoryStorage"),e(". Defaults to "),s("code",null,"LocalStorage"),e(" on browsers and "),s("code",null,"MemoryStorage"),e(" on Node.js. The mode "),s("code",null,"LocalStorage"),e(" is not compatible with Node.js.")])])])]),s("p",null,[s("a",{name:"options.transport"})]),s("ul",null,[s("li",null,[s("code",null,"transport"),e(" [optional] "),s("em",null,"Object"),e(" - Defines settings you want to customize regarding "),s("a",{href:"#transport"},"transport"),e(". "),s("ul",null,[s("li",null,[s("code",null,"params"),e(" [optional] "),s("em",null,"Object"),e(" - Defines an object with keys and values to be passed as additional query string.")]),s("li",null,[s("code",null,"headers"),e(" [optional] "),s("em",null,"Object"),e(" - Defines an object with keys and values to be passed as additional headers.")]),s("li",null,[s("code",null,"onUploadProgress"),e(" [optional] "),s("em",null,[e("(event: "),s("a",{href:"https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent",target:"_blank",rel:"noopener noreferrer"},"ProgressEvent"),e(" => void)")]),e(" - Defines a callback function to indicate the upload progress.")])])])])])]),s("h2",{id:"auth"},[e("Auth "),s("a",{class:"header-anchor",href:"#auth"},"#")]),s("p",null,"Defines how authentication is handled by the SDK."),s("h3",{id:"custom-implementation"},[e("Custom Implementation "),s("a",{class:"header-anchor",href:"#custom-implementation"},"#")]),s("p",null,[e("It is possible to provide a custom implementation by extending "),s("code",null,"IAuth"),e(". While this could be useful for advanced usage, most use-cases do not need it.")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"import"),e(" { IAuth, Directus } "),s("span",{class:"hljs-keyword"},"from"),e(),s("span",{class:"hljs-string"},"'@directus/sdk'"),e(`;
|
|
84
|
-
|
|
85
|
-
`),s("span",{class:"hljs-class"},[s("span",{class:"hljs-keyword"},"class"),e(),s("span",{class:"hljs-title"},"MyAuth"),e(),s("span",{class:"hljs-keyword"},"extends"),e(),s("span",{class:"hljs-title"},"IAuth"),e()]),e(`{
|
|
86
|
-
`),s("span",{class:"hljs-keyword"},"async"),e(),s("span",{class:"hljs-function"},[s("span",{class:"hljs-title"},"login"),e("("),s("span",{class:"hljs-params"}),e(")")]),e(` {
|
|
87
|
-
`),s("span",{class:"hljs-keyword"},"return"),e(" { "),s("span",{class:"hljs-attr"},"access_token"),e(": "),s("span",{class:"hljs-string"},"''"),e(", "),s("span",{class:"hljs-attr"},"expires"),e(": "),s("span",{class:"hljs-number"},"0"),e(` };
|
|
88
|
-
}
|
|
89
|
-
`),s("span",{class:"hljs-keyword"},"async"),e(),s("span",{class:"hljs-function"},[s("span",{class:"hljs-title"},"logout"),e("("),s("span",{class:"hljs-params"}),e(")")]),e(` {}
|
|
90
|
-
`),s("span",{class:"hljs-keyword"},"async"),e(),s("span",{class:"hljs-function"},[s("span",{class:"hljs-title"},"refresh"),e("("),s("span",{class:"hljs-params"}),e(")")]),e(` {
|
|
91
|
-
`),s("span",{class:"hljs-keyword"},"return"),e(" { "),s("span",{class:"hljs-attr"},"access_token"),e(": "),s("span",{class:"hljs-string"},"''"),e(", "),s("span",{class:"hljs-attr"},"expires"),e(": "),s("span",{class:"hljs-number"},"0"),e(` };
|
|
92
|
-
}
|
|
93
|
-
`),s("span",{class:"hljs-keyword"},"async"),e(),s("span",{class:"hljs-function"},[s("span",{class:"hljs-title"},"static"),e("("),s("span",{class:"hljs-params"}),e(")")]),e(` {
|
|
94
|
-
`),s("span",{class:"hljs-keyword"},"return"),e(),s("span",{class:"hljs-literal"},"true"),e(`;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
`),s("span",{class:"hljs-keyword"},"const"),e(" directus = "),s("span",{class:"hljs-keyword"},"new"),e(" Directus("),s("span",{class:"hljs-string"},"'http://directus.example.com'"),e(", { "),s("span",{class:"hljs-attr"},"auth"),e(": "),s("span",{class:"hljs-keyword"},"new"),e(` MyAuth() });
|
|
99
|
-
`)])]),s("h3",{id:"directus-implementation"},[e("Directus Implementation "),s("a",{class:"header-anchor",href:"#directus-implementation"},"#")]),s("p",null,[e("By default, Directus creates an instance of "),s("code",null,"Auth"),e(" which handles refresh tokens automatically. Check "),s("a",{href:"#options.auth"},[s("code",null,"options.auth")]),e(" to see the available settings.")]),s("h3",{id:"get-current-token"},[e("Get current token "),s("a",{class:"header-anchor",href:"#get-current-token"},"#")]),s("pre",null,[s("code",{class:"language-ts"},[s("span",{class:"hljs-keyword"},"const"),e(` token = directus.auth.token;
|
|
100
|
-
`)])]),s("h3",{id:"login"},[e("Login "),s("a",{class:"header-anchor",href:"#login"},"#")]),s("h4",{id:"with-credentials"},[e("With credentials "),s("a",{class:"header-anchor",href:"#with-credentials"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(` directus.auth.login({
|
|
101
|
-
`),s("span",{class:"hljs-attr"},"email"),e(": "),s("span",{class:"hljs-string"},"'admin@example.com'"),e(`,
|
|
102
|
-
`),s("span",{class:"hljs-attr"},"password"),e(": "),s("span",{class:"hljs-string"},"'d1r3ctu5'"),e(`,
|
|
103
|
-
});
|
|
104
|
-
`)])]),s("h4",{id:"with-static-tokens"},[e("With static tokens "),s("a",{class:"header-anchor",href:"#with-static-tokens"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(" directus.auth.static("),s("span",{class:"hljs-string"},"'static_token'"),e(`);
|
|
105
|
-
`)])]),s("h3",{id:"refresh-auth-token"},[e("Refresh Auth Token "),s("a",{class:"header-anchor",href:"#refresh-auth-token"},"#")]),s("p",null,[e("By default, Directus will handle token refreshes. Although, you can handle this behaviour manually by setting "),s("a",{href:"#options.auth.autoRefresh"},[s("code",null,"autoRefresh")]),e(" to "),s("code",null,"false"),e(".")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(` directus.auth.refresh();
|
|
106
|
-
`)])]),s("h3",{id:"logout"},[e("Logout "),s("a",{class:"header-anchor",href:"#logout"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(` directus.auth.logout();
|
|
107
|
-
`)])]),s("h3",{id:"request-a-password-reset"},[e("Request a Password Reset "),s("a",{class:"header-anchor",href:"#request-a-password-reset"},"#")]),s("p",null,[e("By default, the address defined in "),s("code",null,"PUBLIC_URL"),e(" on "),s("code",null,".env"),e(" file is used for the link to the reset password page sent in the email:")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(" directus.auth.password.request("),s("span",{class:"hljs-string"},"'admin@example.com'"),e(`);
|
|
108
|
-
`)])]),s("p",null,"But a custom address can be passed as second argument:"),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(` directus.auth.password.request(
|
|
109
|
-
`),s("span",{class:"hljs-string"},"'admin@example.com'"),e(`,
|
|
110
|
-
`),s("span",{class:"hljs-string"},"'https://myapp.com'"),e(),s("span",{class:"hljs-comment"},"// In this case, the link will be https://myapp.com?token=FEE0A..."),e(`
|
|
111
|
-
);
|
|
112
|
-
`)])]),s("h3",{id:"reset-a-password"},[e("Reset a Password "),s("a",{class:"header-anchor",href:"#reset-a-password"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(" directus.auth.password.reset("),s("span",{class:"hljs-string"},"'abc.def.ghi'"),e(", "),s("span",{class:"hljs-string"},"'n3w-p455w0rd'"),e(`);
|
|
113
|
-
`)])]),s("p",null,[e("Note: The token passed in the first parameter is sent in an email to the user when using "),s("code",null,"request()")]),s("h2",{id:"transport"},[e("Transport "),s("a",{class:"header-anchor",href:"#transport"},"#")]),s("p",null,"The transport object abstracts how you communicate with Directus. Transports can be customized to use different HTTP libraries for example."),s("h3",{id:"custom-implementation-2"},[e("Custom Implementation "),s("a",{class:"header-anchor",href:"#custom-implementation-2"},"#")]),s("p",null,[e("It is possible to provide a custom implementation by extending "),s("code",null,"ITransport"),e(". While, this could be useful for advanced usage, it is not needed for most use-cases.")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"import"),e(" { ITransport, Directus } "),s("span",{class:"hljs-keyword"},"from"),e(),s("span",{class:"hljs-string"},"'@directus/sdk'"),e(`;
|
|
114
|
-
|
|
115
|
-
`),s("span",{class:"hljs-class"},[s("span",{class:"hljs-keyword"},"class"),e(),s("span",{class:"hljs-title"},"MyTransport"),e(),s("span",{class:"hljs-keyword"},"extends"),e(),s("span",{class:"hljs-title"},"ITransport"),e()]),e(`{
|
|
116
|
-
`),s("span",{class:"hljs-function"},[s("span",{class:"hljs-title"},"buildResponse"),e("("),s("span",{class:"hljs-params"}),e(")")]),e(` {
|
|
117
|
-
`),s("span",{class:"hljs-keyword"},"return"),e(` {
|
|
118
|
-
`),s("span",{class:"hljs-attr"},"raw"),e(": "),s("span",{class:"hljs-string"},"''"),e(`,
|
|
119
|
-
`),s("span",{class:"hljs-attr"},"data"),e(`: {},
|
|
120
|
-
`),s("span",{class:"hljs-attr"},"status"),e(": "),s("span",{class:"hljs-number"},"0"),e(`,
|
|
121
|
-
`),s("span",{class:"hljs-attr"},"headers"),e(`: {},
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
`),s("span",{class:"hljs-keyword"},"async"),e(),s("span",{class:"hljs-function"},[s("span",{class:"hljs-title"},"get"),e("("),s("span",{class:"hljs-params"},"path, options"),e(")")]),e(` {
|
|
126
|
-
`),s("span",{class:"hljs-keyword"},"return"),e(),s("span",{class:"hljs-built_in"},"this"),e(`.buildResponse();
|
|
127
|
-
}
|
|
128
|
-
`),s("span",{class:"hljs-keyword"},"async"),e(),s("span",{class:"hljs-function"},[s("span",{class:"hljs-title"},"head"),e("("),s("span",{class:"hljs-params"},"path, options"),e(")")]),e(` {
|
|
129
|
-
`),s("span",{class:"hljs-keyword"},"return"),e(),s("span",{class:"hljs-built_in"},"this"),e(`.buildResponse();
|
|
130
|
-
}
|
|
131
|
-
`),s("span",{class:"hljs-keyword"},"async"),e(),s("span",{class:"hljs-function"},[s("span",{class:"hljs-title"},"options"),e("("),s("span",{class:"hljs-params"},"path, options"),e(")")]),e(` {
|
|
132
|
-
`),s("span",{class:"hljs-keyword"},"return"),e(),s("span",{class:"hljs-built_in"},"this"),e(`.buildResponse();
|
|
133
|
-
}
|
|
134
|
-
`),s("span",{class:"hljs-keyword"},"async"),e(),s("span",{class:"hljs-function"},[s("span",{class:"hljs-title"},"delete"),e("("),s("span",{class:"hljs-params"},"path, data, options"),e(")")]),e(` {
|
|
135
|
-
`),s("span",{class:"hljs-keyword"},"return"),e(),s("span",{class:"hljs-built_in"},"this"),e(`.buildResponse();
|
|
136
|
-
}
|
|
137
|
-
`),s("span",{class:"hljs-keyword"},"async"),e(),s("span",{class:"hljs-function"},[s("span",{class:"hljs-title"},"post"),e("("),s("span",{class:"hljs-params"},"path, data, options"),e(")")]),e(` {
|
|
138
|
-
`),s("span",{class:"hljs-keyword"},"return"),e(),s("span",{class:"hljs-built_in"},"this"),e(`.buildResponse();
|
|
139
|
-
}
|
|
140
|
-
`),s("span",{class:"hljs-keyword"},"async"),e(),s("span",{class:"hljs-function"},[s("span",{class:"hljs-title"},"put"),e("("),s("span",{class:"hljs-params"},"path, data, options"),e(")")]),e(` {
|
|
141
|
-
`),s("span",{class:"hljs-keyword"},"return"),e(),s("span",{class:"hljs-built_in"},"this"),e(`.buildResponse();
|
|
142
|
-
}
|
|
143
|
-
`),s("span",{class:"hljs-keyword"},"async"),e(),s("span",{class:"hljs-function"},[s("span",{class:"hljs-title"},"patch"),e("("),s("span",{class:"hljs-params"},"path, data, options"),e(")")]),e(` {
|
|
144
|
-
`),s("span",{class:"hljs-keyword"},"return"),e(),s("span",{class:"hljs-built_in"},"this"),e(`.buildResponse();
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
`),s("span",{class:"hljs-keyword"},"const"),e(" directus = "),s("span",{class:"hljs-keyword"},"new"),e(" Directus("),s("span",{class:"hljs-string"},"'http://directus.example.com'"),e(", { "),s("span",{class:"hljs-attr"},"transport"),e(": "),s("span",{class:"hljs-keyword"},"new"),e(` MyTransport() });
|
|
149
|
-
`)])]),s("h3",{id:"directus-implementation-2"},[e("Directus Implementation "),s("a",{class:"header-anchor",href:"#directus-implementation-2"},"#")]),s("p",null,[e("By default, Directus creates an instance of "),s("code",null,"Transport"),e(" which handles requests automatically. Check "),s("a",{href:"#options.transport"},[s("code",null,"options.transport")]),e(" to see the available settings.")]),s("p",null,[e("To make HTTP requests SDK uses "),s("code",null,"axios"),e(" so it is compatible in both browsers and Node.js. Also, it is possible to handle upload progress (a downside of "),s("code",null,"fetch"),e(").")]),s("h2",{id:"storage"},[e("Storage "),s("a",{class:"header-anchor",href:"#storage"},"#")]),s("p",null,"The storage is used to load and save token information."),s("h3",{id:"custom-implementation-3"},[e("Custom Implementation "),s("a",{class:"header-anchor",href:"#custom-implementation-3"},"#")]),s("p",null,[e("It is possible to provide a custom implementation by extending "),s("code",null,"IStorage"),e(". While, this could be useful for advanced usage, it is not needed for most use-cases.")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"import"),e(" { IStorage, Directus } "),s("span",{class:"hljs-keyword"},"from"),e(),s("span",{class:"hljs-string"},"'@directus/sdk'"),e(`;
|
|
150
|
-
|
|
151
|
-
`),s("span",{class:"hljs-class"},[s("span",{class:"hljs-keyword"},"class"),e(),s("span",{class:"hljs-title"},"MyStorage"),e(),s("span",{class:"hljs-keyword"},"extends"),e(),s("span",{class:"hljs-title"},"IStorage"),e()]),e(`{
|
|
152
|
-
`),s("span",{class:"hljs-keyword"},"get"),e(),s("span",{class:"hljs-title"},"auth_token"),e(`() {
|
|
153
|
-
`),s("span",{class:"hljs-keyword"},"return"),e(),s("span",{class:"hljs-built_in"},"this"),e(".get("),s("span",{class:"hljs-string"},"'auth_token'"),e(`);
|
|
154
|
-
}
|
|
155
|
-
`),s("span",{class:"hljs-keyword"},"get"),e(),s("span",{class:"hljs-title"},"auth_expires"),e(`() {
|
|
156
|
-
`),s("span",{class:"hljs-keyword"},"return"),e(),s("span",{class:"hljs-built_in"},"Number"),e("("),s("span",{class:"hljs-built_in"},"this"),e(".get("),s("span",{class:"hljs-string"},"'auth_expires'"),e(`));
|
|
157
|
-
}
|
|
158
|
-
`),s("span",{class:"hljs-keyword"},"get"),e(),s("span",{class:"hljs-title"},"auth_refresh_token"),e(`() {
|
|
159
|
-
`),s("span",{class:"hljs-keyword"},"return"),e(),s("span",{class:"hljs-built_in"},"this"),e(".get("),s("span",{class:"hljs-string"},"'auth_refresh_token'"),e(`);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
`),s("span",{class:"hljs-function"},[s("span",{class:"hljs-title"},"get"),e("("),s("span",{class:"hljs-params"},"key"),e(")")]),e(` {
|
|
163
|
-
`),s("span",{class:"hljs-keyword"},"return"),e(),s("span",{class:"hljs-string"},"''"),e(`;
|
|
164
|
-
}
|
|
165
|
-
`),s("span",{class:"hljs-function"},[s("span",{class:"hljs-title"},"set"),e("("),s("span",{class:"hljs-params"},"key, value"),e(")")]),e(` {
|
|
166
|
-
`),s("span",{class:"hljs-keyword"},"return"),e(` value;
|
|
167
|
-
}
|
|
168
|
-
`),s("span",{class:"hljs-function"},[s("span",{class:"hljs-title"},"delete"),e("("),s("span",{class:"hljs-params"},"key"),e(")")]),e(` {
|
|
169
|
-
`),s("span",{class:"hljs-keyword"},"return"),e(),s("span",{class:"hljs-literal"},"null"),e(`;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
`),s("span",{class:"hljs-keyword"},"const"),e(" directus = "),s("span",{class:"hljs-keyword"},"new"),e(" Directus("),s("span",{class:"hljs-string"},"'http://directus.example.com'"),e(", { "),s("span",{class:"hljs-attr"},"storage"),e(": "),s("span",{class:"hljs-keyword"},"new"),e(` MyStorage() });
|
|
174
|
-
`)])]),s("h3",{id:"directus-implementation-3"},[e("Directus Implementation "),s("a",{class:"header-anchor",href:"#directus-implementation-3"},"#")]),s("p",null,[e("By default, Directus creates an instance of "),s("code",null,"Storage"),e(" which handles store information automatically. Check "),s("a",{href:"#options.storage"},[s("code",null,"options.storage")]),e(" to see the available settings.")]),s("p",null,[e("SDK uses "),s("code",null,"localStorage"),e(" on browsers and the memory itself on Node.js to save tokens. This behavior can be configured in "),s("a",{href:"#options.storage.mode"},[s("code",null,"options.storage.mode")]),e(". The "),s("code",null,"LocalStorage"),e(" is only available on browsers and the "),s("code",null,"MemoryStorage"),e(" is not persistent, i.e., once you leave the tab or quit the process, you will need to authenticate again.")]),s("p",null,[e("If you want to use multiple instances of the SDK you should set a different "),s("a",{href:"#options.storage.prefix"},[s("code",null,"prefix")]),e(" for each one.")]),s("p",null,"When using"),s("h2",{id:"items"},[e("Items "),s("a",{class:"header-anchor",href:"#items"},"#")]),s("p",null,[e("You can get an instance of the item handler by providing the collection (and type, in the case of TypeScript) to the "),s("code",null,"items"),e(" function. The following examples will use the "),s("code",null,"Article"),e(" type.")]),s("blockquote",null,[s("p",null,"JavaScript")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-comment"},"// import { Directus, ID } from '@directus/sdk';"),e(`
|
|
175
|
-
`),s("span",{class:"hljs-keyword"},"const"),e(" { Directus } = "),s("span",{class:"hljs-built_in"},"require"),e("("),s("span",{class:"hljs-string"},"'@directus/sdk'"),e(`);
|
|
176
|
-
|
|
177
|
-
`),s("span",{class:"hljs-keyword"},"const"),e(" directus = "),s("span",{class:"hljs-keyword"},"new"),e(" Directus("),s("span",{class:"hljs-string"},"'http://directus.example.com'"),e(`);
|
|
178
|
-
|
|
179
|
-
`),s("span",{class:"hljs-keyword"},"const"),e(" articles = directus.items("),s("span",{class:"hljs-string"},"'articles'"),e(`);
|
|
180
|
-
`)])]),s("blockquote",null,[s("p",null,"TypeScript")]),s("pre",null,[s("code",{class:"language-ts"},[s("span",{class:"hljs-keyword"},"import"),e(" { Directus, ID } "),s("span",{class:"hljs-keyword"},"from"),e(),s("span",{class:"hljs-string"},"'@directus/sdk'"),e(`;
|
|
181
|
-
|
|
182
|
-
`),s("span",{class:"hljs-comment"},"// Map your collection structure based on its fields."),e(`
|
|
183
|
-
`),s("span",{class:"hljs-keyword"},"type"),e(` Article = {
|
|
184
|
-
`),s("span",{class:"hljs-attr"},"id"),e(`: ID;
|
|
185
|
-
title: `),s("span",{class:"hljs-built_in"},"string"),e(`;
|
|
186
|
-
body: `),s("span",{class:"hljs-built_in"},"string"),e(`;
|
|
187
|
-
published: `),s("span",{class:"hljs-built_in"},"boolean"),e(`;
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
`),s("span",{class:"hljs-comment"},"// Map your collections to its respective types. The SDK will"),e(`
|
|
191
|
-
`),s("span",{class:"hljs-comment"},"// infer its types based on usage later."),e(`
|
|
192
|
-
`),s("span",{class:"hljs-keyword"},"type"),e(` MyBlog = {
|
|
193
|
-
`),s("span",{class:"hljs-comment"},"// [collection_name]: typescript_type"),e(`
|
|
194
|
-
`),s("span",{class:"hljs-attr"},"articles"),e(`: Article;
|
|
195
|
-
|
|
196
|
-
`),s("span",{class:"hljs-comment"},"// You can also extend Directus collection. The naming has"),e(`
|
|
197
|
-
`),s("span",{class:"hljs-comment"},"// to match a Directus system collection and it will be merged"),e(`
|
|
198
|
-
`),s("span",{class:"hljs-comment"},"// into the system spec."),e(`
|
|
199
|
-
directus_users: {
|
|
200
|
-
`),s("span",{class:"hljs-attr"},"bio"),e(": "),s("span",{class:"hljs-built_in"},"string"),e(`;
|
|
201
|
-
};
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
`),s("span",{class:"hljs-comment"},"// Let the SDK know about your collection types."),e(`
|
|
205
|
-
`),s("span",{class:"hljs-keyword"},"const"),e(" directus = "),s("span",{class:"hljs-keyword"},"new"),e(" Directus<MyBlog>("),s("span",{class:"hljs-string"},"'https://directus.myblog.com'"),e(`);
|
|
206
|
-
|
|
207
|
-
`),s("span",{class:"hljs-comment"},'// typeof(article) is a partial "Article"'),e(`
|
|
208
|
-
`),s("span",{class:"hljs-keyword"},"const"),e(" article = "),s("span",{class:"hljs-keyword"},"await"),e(" directus.items("),s("span",{class:"hljs-string"},"'articles'"),e(").readOne("),s("span",{class:"hljs-number"},"10"),e(`);
|
|
209
|
-
|
|
210
|
-
`),s("span",{class:"hljs-comment"},'// Error TS2322: "hello" is not assignable to type "boolean".'),e(`
|
|
211
|
-
`),s("span",{class:"hljs-comment"},"// post.published = 'hello';"),e(`
|
|
212
|
-
`)])]),s("h3",{id:"create-single-item"},[e("Create Single Item "),s("a",{class:"header-anchor",href:"#create-single-item"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(` articles.createOne({
|
|
213
|
-
`),s("span",{class:"hljs-attr"},"title"),e(": "),s("span",{class:"hljs-string"},"'My New Article'"),e(`,
|
|
214
|
-
});
|
|
215
|
-
`)])]),s("h3",{id:"create-multiple-items"},[e("Create Multiple Items "),s("a",{class:"header-anchor",href:"#create-multiple-items"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(` articles.createMany([
|
|
216
|
-
{
|
|
217
|
-
`),s("span",{class:"hljs-attr"},"title"),e(": "),s("span",{class:"hljs-string"},"'My First Article'"),e(`,
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
`),s("span",{class:"hljs-attr"},"title"),e(": "),s("span",{class:"hljs-string"},"'My Second Article'"),e(`,
|
|
221
|
-
},
|
|
222
|
-
]);
|
|
223
|
-
`)])]),s("h3",{id:"read-all"},[e("Read All "),s("a",{class:"header-anchor",href:"#read-all"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(` articles.readMany();
|
|
224
|
-
`)])]),s("h3",{id:"read-by-query"},[e("Read By Query "),s("a",{class:"header-anchor",href:"#read-by-query"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(` articles.readMany({
|
|
225
|
-
`),s("span",{class:"hljs-attr"},"search"),e(": "),s("span",{class:"hljs-string"},"'Directus'"),e(`,
|
|
226
|
-
`),s("span",{class:"hljs-attr"},"filter"),e(`: {
|
|
227
|
-
`),s("span",{class:"hljs-attr"},"date_published"),e(`: {
|
|
228
|
-
`),s("span",{class:"hljs-attr"},"_gte"),e(": "),s("span",{class:"hljs-string"},"'$NOW'"),e(`,
|
|
229
|
-
},
|
|
230
|
-
},
|
|
231
|
-
});
|
|
232
|
-
`)])]),s("h3",{id:"read-by-primary-key(s)"},[e("Read By Primary Key(s) "),s("a",{class:"header-anchor",href:"#read-by-primary-key(s)"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(" articles.readOne("),s("span",{class:"hljs-number"},"15"),e(`);
|
|
233
|
-
`)])]),s("p",null,"Supports optional query:"),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(" articles.readOne("),s("span",{class:"hljs-number"},"15"),e(", { "),s("span",{class:"hljs-attr"},"fields"),e(": ["),s("span",{class:"hljs-string"},"'title'"),e(`] });
|
|
234
|
-
`)])]),s("h3",{id:"update-multiple-items"},[e("Update Multiple Items "),s("a",{class:"header-anchor",href:"#update-multiple-items"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(" articles.updateMany(["),s("span",{class:"hljs-number"},"15"),e(", "),s("span",{class:"hljs-number"},"42"),e(`], {
|
|
235
|
-
`),s("span",{class:"hljs-attr"},"title"),e(": "),s("span",{class:"hljs-string"},"'Both articles now have the same title'"),e(`,
|
|
236
|
-
});
|
|
237
|
-
`)])]),s("p",null,"Supports optional query:"),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(` articles.updateMany(
|
|
238
|
-
[`),s("span",{class:"hljs-number"},"15"),e(", "),s("span",{class:"hljs-number"},"42"),e(`],
|
|
239
|
-
{
|
|
240
|
-
`),s("span",{class:"hljs-attr"},"title"),e(": "),s("span",{class:"hljs-string"},"'Both articles now have the same title'"),e(`,
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
`),s("span",{class:"hljs-attr"},"fields"),e(": ["),s("span",{class:"hljs-string"},"'title'"),e(`],
|
|
244
|
-
}
|
|
245
|
-
);
|
|
246
|
-
`)])]),s("h3",{id:"delete"},[e("Delete "),s("a",{class:"header-anchor",href:"#delete"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-comment"},"// One"),e(`
|
|
247
|
-
`),s("span",{class:"hljs-keyword"},"await"),e(" articles.deleteOne("),s("span",{class:"hljs-number"},"15"),e(`);
|
|
248
|
-
|
|
249
|
-
`),s("span",{class:"hljs-comment"},"// Multiple"),e(`
|
|
250
|
-
`),s("span",{class:"hljs-keyword"},"await"),e(" articles.deleteMany(["),s("span",{class:"hljs-number"},"15"),e(", "),s("span",{class:"hljs-number"},"42"),e(`]);
|
|
251
|
-
`)])]),s("h2",{id:"activity"},[e("Activity "),s("a",{class:"header-anchor",href:"#activity"},"#")]),s("pre",null,[s("code",{class:"language-js"},`directus.activity;
|
|
252
|
-
`)]),s("p",null,[e("Same methods as "),s("code",null,'directus.items("directus_activity")'),e(".")]),s("h2",{id:"comments"},[e("Comments "),s("a",{class:"header-anchor",href:"#comments"},"#")]),s("pre",null,[s("code",{class:"language-js"},`directus.comments;
|
|
253
|
-
`)]),s("p",null,[e("Same methods as "),s("code",null,'directus.items("directus_comments")'),e(".")]),s("h2",{id:"collections"},[e("Collections "),s("a",{class:"header-anchor",href:"#collections"},"#")]),s("pre",null,[s("code",{class:"language-js"},`directus.collections;
|
|
254
|
-
`)]),s("p",null,[e("Same methods as "),s("code",null,'directus.items("directus_collections")'),e(".")]),s("h2",{id:"fields"},[e("Fields "),s("a",{class:"header-anchor",href:"#fields"},"#")]),s("pre",null,[s("code",{class:"language-js"},`directus.fields;
|
|
255
|
-
`)]),s("p",null,[e("Same methods as "),s("code",null,'directus.items("directus_fields")'),e(".")]),s("h2",{id:"files"},[e("Files "),s("a",{class:"header-anchor",href:"#files"},"#")]),s("pre",null,[s("code",{class:"language-js"},`directus.files;
|
|
256
|
-
`)]),s("p",null,[e("Same methods as "),s("code",null,'directus.items("directus_files")'),e(".")]),s("h2",{id:"folders"},[e("Folders "),s("a",{class:"header-anchor",href:"#folders"},"#")]),s("pre",null,[s("code",{class:"language-js"},`directus.folders;
|
|
257
|
-
`)]),s("p",null,[e("Same methods as "),s("code",null,'directus.items("directus_folders")'),e(".")]),s("h2",{id:"permissions"},[e("Permissions "),s("a",{class:"header-anchor",href:"#permissions"},"#")]),s("pre",null,[s("code",{class:"language-js"},`directus.permissions;
|
|
258
|
-
`)]),s("p",null,[e("Same methods as "),s("code",null,'directus.items("directus_permissions")'),e(".")]),s("h2",{id:"presets"},[e("Presets "),s("a",{class:"header-anchor",href:"#presets"},"#")]),s("pre",null,[s("code",{class:"language-js"},`directus.presets;
|
|
259
|
-
`)]),s("p",null,[e("Same methods as "),s("code",null,'directus.items("directus_presets")'),e(".")]),s("h2",{id:"relations"},[e("Relations "),s("a",{class:"header-anchor",href:"#relations"},"#")]),s("pre",null,[s("code",{class:"language-js"},`directus.relations;
|
|
260
|
-
`)]),s("p",null,[e("Same methods as "),s("code",null,'directus.items("directus_relations")'),e(".")]),s("h2",{id:"revisions"},[e("Revisions "),s("a",{class:"header-anchor",href:"#revisions"},"#")]),s("pre",null,[s("code",{class:"language-js"},`directus.revisions;
|
|
261
|
-
`)]),s("p",null,[e("Same methods as "),s("code",null,'directus.items("directus_revisions")'),e(".")]),s("h2",{id:"roles"},[e("Roles "),s("a",{class:"header-anchor",href:"#roles"},"#")]),s("pre",null,[s("code",{class:"language-js"},`directus.roles;
|
|
262
|
-
`)]),s("p",null,[e("Same methods as "),s("code",null,'directus.items("directus_roles")'),e(".")]),s("h2",{id:"settings"},[e("Settings "),s("a",{class:"header-anchor",href:"#settings"},"#")]),s("pre",null,[s("code",{class:"language-js"},`directus.settings;
|
|
263
|
-
`)]),s("p",null,[e("Same methods as "),s("code",null,'directus.items("directus_settings")'),e(".")]),s("h2",{id:"server"},[e("Server "),s("a",{class:"header-anchor",href:"#server"},"#")]),s("h3",{id:"ping-the-server"},[e("Ping the Server "),s("a",{class:"header-anchor",href:"#ping-the-server"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(` directus.server.ping();
|
|
264
|
-
`)])]),s("h3",{id:"get-server%2Fproject-info"},[e("Get Server/Project Info "),s("a",{class:"header-anchor",href:"#get-server%2Fproject-info"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(` directus.server.info();
|
|
265
|
-
`)])]),s("h2",{id:"users"},[e("Users "),s("a",{class:"header-anchor",href:"#users"},"#")]),s("pre",null,[s("code",{class:"language-js"},`directus.users;
|
|
266
|
-
`)]),s("p",null,[e("Same methods as "),s("code",null,'directus.items("directus_users")'),e(", and:")]),s("h3",{id:"invite-a-new-user"},[e("Invite a New User "),s("a",{class:"header-anchor",href:"#invite-a-new-user"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(" directus.users.invites.send("),s("span",{class:"hljs-string"},"'admin@example.com'"),e(", "),s("span",{class:"hljs-string"},"'fe38136e-52f7-4622-8498-112b8a32a1e2'"),e(`);
|
|
267
|
-
`)])]),s("p",null,"The second parameter is the role of the user"),s("h3",{id:"accept-a-user-invite"},[e("Accept a User Invite "),s("a",{class:"header-anchor",href:"#accept-a-user-invite"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(" directus.users.invites.accept("),s("span",{class:"hljs-string"},"'<accept-token>'"),e(", "),s("span",{class:"hljs-string"},"'n3w-p455w0rd'"),e(`);
|
|
268
|
-
`)])]),s("p",null,"The provided token is sent to the user\u2019s email"),s("h3",{id:"enable-two-factor-authentication"},[e("Enable Two-Factor Authentication "),s("a",{class:"header-anchor",href:"#enable-two-factor-authentication"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(" directus.users.tfa.enable("),s("span",{class:"hljs-string"},"'my-password'"),e(`);
|
|
269
|
-
`)])]),s("h3",{id:"disable-two-factor-authentication"},[e("Disable Two-Factor Authentication "),s("a",{class:"header-anchor",href:"#disable-two-factor-authentication"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(" directus.users.tfa.disable("),s("span",{class:"hljs-string"},"'691402'"),e(`);
|
|
270
|
-
`)])]),s("h3",{id:"get-the-current-user"},[e("Get the Current User "),s("a",{class:"header-anchor",href:"#get-the-current-user"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(` directus.users.me.read();
|
|
271
|
-
`)])]),s("p",null,"Supports optional query:"),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(` directus.users.me.read({
|
|
272
|
-
`),s("span",{class:"hljs-attr"},"fields"),e(": ["),s("span",{class:"hljs-string"},"'last_access'"),e(`],
|
|
273
|
-
});
|
|
274
|
-
`)])]),s("h3",{id:"update-the-current-users"},[e("Update the Current Users "),s("a",{class:"header-anchor",href:"#update-the-current-users"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(" directus.users.me.update({ "),s("span",{class:"hljs-attr"},"first_name"),e(": "),s("span",{class:"hljs-string"},"'Admin'"),e(` });
|
|
275
|
-
`)])]),s("p",null,"Supports optional query:"),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(" directus.users.me.update({ "),s("span",{class:"hljs-attr"},"first_name"),e(": "),s("span",{class:"hljs-string"},"'Admin'"),e(" }, { "),s("span",{class:"hljs-attr"},"fields"),e(": ["),s("span",{class:"hljs-string"},"'last_access'"),e(`] });
|
|
276
|
-
`)])]),s("h2",{id:"utils"},[e("Utils "),s("a",{class:"header-anchor",href:"#utils"},"#")]),s("h3",{id:"get-a-random-string"},[e("Get a Random String "),s("a",{class:"header-anchor",href:"#get-a-random-string"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(` directus.utils.random.string();
|
|
277
|
-
`)])]),s("p",null,[e("Supports an optional "),s("code",null,"length"),e(" (defaults to 32):")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(" directus.utils.random.string("),s("span",{class:"hljs-number"},"50"),e(`);
|
|
278
|
-
`)])]),s("h3",{id:"generate-a-hash-for-a-given-value"},[e("Generate a Hash for a Given Value "),s("a",{class:"header-anchor",href:"#generate-a-hash-for-a-given-value"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(" directus.utils.hash.generate("),s("span",{class:"hljs-string"},"'My String'"),e(`);
|
|
279
|
-
`)])]),s("h3",{id:"verify-if-a-hash-is-valid"},[e("Verify if a Hash is Valid "),s("a",{class:"header-anchor",href:"#verify-if-a-hash-is-valid"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(" directus.utils.hash.verify("),s("span",{class:"hljs-string"},"'My String'"),e(", "),s("span",{class:"hljs-string"},"'$argon2i$v=19$m=4096,t=3,p=1$A5uogJh'"),e(`);
|
|
280
|
-
`)])]),s("h3",{id:"sort-items-in-a-collection"},[e("Sort Items in a Collection "),s("a",{class:"header-anchor",href:"#sort-items-in-a-collection"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(" directus.utils.sort("),s("span",{class:"hljs-string"},"'articles'"),e(", "),s("span",{class:"hljs-number"},"15"),e(", "),s("span",{class:"hljs-number"},"42"),e(`);
|
|
281
|
-
`)])]),s("p",null,[e("This will move item "),s("code",null,"15"),e(" to the position of item "),s("code",null,"42"),e(", and move everything in between one \u201Cslot\u201D up.")]),s("h3",{id:"revert-to-a-previous-revision"},[e("Revert to a Previous Revision "),s("a",{class:"header-anchor",href:"#revert-to-a-previous-revision"},"#")]),s("pre",null,[s("code",{class:"language-js"},[s("span",{class:"hljs-keyword"},"await"),e(" directus.utils.revert("),s("span",{class:"hljs-number"},"451"),e(`);
|
|
282
|
-
`)])]),s("p",null,"Note: The key passed is the primary key of the revision you\u2019d like to apply."),s("hr")],-1),m={setup(h,{expose:l}){const a={title:"JavaScript SDK",modularExtension:!1};return l({frontmatter:a}),(p,u)=>{const n=t("DocsWrapper");return r(),o(n,{frontmatter:a},{default:c(()=>[i]),_:1})}}};export{m as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bF as z}from"./vendor.299bc11c.js";import{a as F}from"./htmlmixed.05e7a4e9.js";function P(m,k){return k.forEach(function(r){r&&typeof r!="string"&&!Array.isArray(r)&&Object.keys(r).forEach(function(o){if(o!=="default"&&!(o in m)){var c=Object.getOwnPropertyDescriptor(r,o);Object.defineProperty(m,o,c.get?c:{enumerable:!0,get:function(){return r[o]}})}})}),Object.freeze(m)}var O={exports:{}};(function(m,k){(function(r){r(z.exports,F.exports)})(function(r){var o={noEndTag:!0,soyState:"param-def"},c={alias:{noEndTag:!0},delpackage:{noEndTag:!0},namespace:{noEndTag:!0,soyState:"namespace-def"},"@attribute":o,"@attribute?":o,"@param":o,"@param?":o,"@inject":o,"@inject?":o,"@state":o,template:{soyState:"templ-def",variableScope:!0},extern:{soyState:"param-def"},export:{soyState:"export"},literal:{},msg:{},fallbackmsg:{noEndTag:!0,reduceIndent:!0},select:{},plural:{},let:{soyState:"var-def"},if:{},javaimpl:{},jsimpl:{},elseif:{noEndTag:!0,reduceIndent:!0},else:{noEndTag:!0,reduceIndent:!0},switch:{},case:{noEndTag:!0,reduceIndent:!0},default:{noEndTag:!0,reduceIndent:!0},foreach:{variableScope:!0,soyState:"for-loop"},ifempty:{noEndTag:!0,reduceIndent:!0},for:{variableScope:!0,soyState:"for-loop"},call:{soyState:"templ-ref"},param:{soyState:"param-ref"},print:{noEndTag:!0},deltemplate:{soyState:"templ-def",variableScope:!0},delcall:{soyState:"templ-ref"},log:{},element:{variableScope:!0},velog:{},const:{soyState:"const-def"}},$=Object.keys(c).filter(function(l){return!c[l].noEndTag||c[l].reduceIndent});r.defineMode("soy",function(l){var v=r.getMode(l,"text/plain"),x={html:r.getMode(l,{name:"text/html",multilineTagIndentFactor:2,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),attributes:v,text:v,uri:v,trusted_resource_uri:v,css:r.getMode(l,"text/css"),js:r.getMode(l,{name:"text/javascript",statementIndent:2*l.indentUnit})};function f(n){return n[n.length-1]}function T(n,e,t){if(n.sol()){for(var i=0;i<e.indent&&n.eat(/\s/);i++);if(i)return null}var d=n.string,u=t.exec(d.substr(n.pos));u&&(n.string=d.substr(0,n.pos+u.index));var a=n.hideFirstChars(e.indent,function(){var p=f(e.localStates);return p.mode.token(n,p.state)});return n.string=d,a}function _(n,e){for(;n;){if(n.element===e)return!0;n=n.next}return!1}function s(n,e){return{element:e,next:n}}function b(n){!n.context||(n.context.scope&&(n.variables=n.context.scope),n.context=n.context.previousContext)}function j(n,e,t){return _(n,e)?"variable-2":t?"variable":"variable-2 error"}function g(n,e,t){this.previousContext=n,this.tag=e,this.kind=null,this.scope=t}function S(n,e){var t;return n.match(/[[]/)?(e.soyState.push("list-literal"),e.context=new g(e.context,"list-literal",e.variables),e.lookupVariables=!1,null):n.match(/map\b/)?(e.soyState.push("map-literal"),"keyword"):n.match(/record\b/)?(e.soyState.push("record-literal"),"keyword"):n.match(/([\w]+)(?=\()/)?"variable callee":(t=n.match(/^["']/))?(e.soyState.push("string"),e.quoteKind=t[0],"string"):n.match(/^[(]/)?(e.soyState.push("open-parentheses"),null):n.match(/(null|true|false)(?!\w)/)||n.match(/0x([0-9a-fA-F]{2,})/)||n.match(/-?([0-9]*[.])?[0-9]+(e[0-9]*)?/)?"atom":n.match(/(\||[+\-*\/%]|[=!]=|\?:|[<>]=?)/)?"operator":(t=n.match(/^\$([\w]+)/))?j(e.variables,t[1],!e.lookupVariables):(t=n.match(/^\w+/))?/^(?:as|and|or|not|in|if)$/.test(t[0])?"keyword":null:(n.next(),null)}return{startState:function(){return{soyState:[],variables:s(null,"ij"),scopes:null,indent:0,quoteKind:null,context:null,lookupVariables:!0,localStates:[{mode:x.html,state:r.startState(x.html)}]}},copyState:function(n){return{tag:n.tag,soyState:n.soyState.concat([]),variables:n.variables,context:n.context,indent:n.indent,quoteKind:n.quoteKind,lookupVariables:n.lookupVariables,localStates:n.localStates.map(function(e){return{mode:e.mode,state:r.copyState(e.mode,e.state)}})}},token:function(n,e){var t;switch(f(e.soyState)){case"comment":if(n.match(/^.*?\*\//)?e.soyState.pop():n.skipToEnd(),!e.context||!e.context.scope)for(var i=/@param\??\s+(\S+)/g,d=n.current(),t;t=i.exec(d);)e.variables=s(e.variables,t[1]);return"comment";case"string":var t=n.match(/^.*?(["']|\\[\s\S])/);return t?t[1]==e.quoteKind&&(e.quoteKind=null,e.soyState.pop()):n.skipToEnd(),"string"}if(!e.soyState.length||f(e.soyState)!="literal"){if(n.match(/^\/\*/))return e.soyState.push("comment"),"comment";if(n.match(n.sol()?/^\s*\/\/.*/:/^\s+\/\/.*/))return"comment"}switch(f(e.soyState)){case"templ-def":return(t=n.match(/^\.?([\w]+(?!\.[\w]+)*)/))?(e.soyState.pop(),"def"):(n.next(),null);case"templ-ref":return(t=n.match(/(\.?[a-zA-Z_][a-zA-Z_0-9]+)+/))?(e.soyState.pop(),t[0][0]=="."?"variable-2":"variable"):(t=n.match(/^\$([\w]+)/))?(e.soyState.pop(),j(e.variables,t[1],!e.lookupVariables)):(n.next(),null);case"namespace-def":return(t=n.match(/^\.?([\w\.]+)/))?(e.soyState.pop(),"variable"):(n.next(),null);case"param-def":return(t=n.match(/^\*/))?(e.soyState.pop(),e.soyState.push("param-type"),"type"):(t=n.match(/^\w+/))?(e.variables=s(e.variables,t[0]),e.soyState.pop(),e.soyState.push("param-type"),"def"):(n.next(),null);case"param-ref":return(t=n.match(/^\w+/))?(e.soyState.pop(),"property"):(n.next(),null);case"open-parentheses":return n.match(/[)]/)?(e.soyState.pop(),null):S(n,e);case"param-type":var u=n.peek();return"}]=>,".indexOf(u)!=-1?(e.soyState.pop(),null):u=="["?(e.soyState.push("param-type-record"),null):u=="("?(e.soyState.push("param-type-template"),null):u=="<"?(e.soyState.push("param-type-parameter"),null):(t=n.match(/^([\w]+|[?])/))?"type":(n.next(),null);case"param-type-record":var u=n.peek();return u=="]"?(e.soyState.pop(),null):n.match(/^\w+/)?(e.soyState.push("param-type"),"property"):(n.next(),null);case"param-type-parameter":return n.match(/^[>]/)?(e.soyState.pop(),null):n.match(/^[<,]/)?(e.soyState.push("param-type"),null):(n.next(),null);case"param-type-template":return n.match(/[>]/)?(e.soyState.pop(),e.soyState.push("param-type"),null):n.match(/^\w+/)?(e.soyState.push("param-type"),"def"):(n.next(),null);case"var-def":return(t=n.match(/^\$([\w]+)/))?(e.variables=s(e.variables,t[1]),e.soyState.pop(),"def"):(n.next(),null);case"for-loop":return n.match(/\bin\b/)?(e.soyState.pop(),"keyword"):n.peek()=="$"?(e.soyState.push("var-def"),null):(n.next(),null);case"record-literal":return n.match(/^[)]/)?(e.soyState.pop(),null):n.match(/[(,]/)?(e.soyState.push("map-value"),e.soyState.push("record-key"),null):(n.next(),null);case"map-literal":return n.match(/^[)]/)?(e.soyState.pop(),null):n.match(/[(,]/)?(e.soyState.push("map-value"),e.soyState.push("map-value"),null):(n.next(),null);case"list-literal":return n.match("]")?(e.soyState.pop(),e.lookupVariables=!0,b(e),null):n.match(/\bfor\b/)?(e.lookupVariables=!0,e.soyState.push("for-loop"),"keyword"):S(n,e);case"record-key":return n.match(/[\w]+/)?"property":n.match(/^[:]/)?(e.soyState.pop(),null):(n.next(),null);case"map-value":return n.peek()==")"||n.peek()==","||n.match(/^[:)]/)?(e.soyState.pop(),null):S(n,e);case"import":return n.eat(";")?(e.soyState.pop(),e.indent-=2*l.indentUnit,null):n.match(/\w+(?=\s+as)/)?"variable":(t=n.match(/\w+/))?/(from|as)/.test(t[0])?"keyword":"def":(t=n.match(/^["']/))?(e.soyState.push("string"),e.quoteKind=t[0],"string"):(n.next(),null);case"tag":var a,p;e.tag===void 0?(a=!0,p=""):(a=e.tag[0]=="/",p=a?e.tag.substring(1):e.tag);var y=c[p];if(n.match(/^\/?}/)){var E=n.current()=="/}";return E&&!a&&b(e),e.tag=="/template"||e.tag=="/deltemplate"?(e.variables=s(null,"ij"),e.indent=0):e.indent-=l.indentUnit*(E||$.indexOf(e.tag)==-1?2:1),e.soyState.pop(),"keyword"}else if(n.match(/^([\w?]+)(?==)/)){if(e.context&&e.context.tag==p&&n.current()=="kind"&&(t=n.match(/^="([^"]+)/,!1))){var I=t[1];e.context.kind=I;var U=x[I]||x.html,h=f(e.localStates);h.mode.indent&&(e.indent+=h.mode.indent(h.state,"","")),e.localStates.push({mode:U,state:r.startState(U)})}return"attribute"}return S(n,e);case"template-call-expression":return n.match(/^([\w-?]+)(?==)/)?"attribute":n.eat(">")||n.eat("/>")?(e.soyState.pop(),"keyword"):S(n,e);case"literal":return n.match("{/literal}",!1)?(e.soyState.pop(),this.token(n,e)):T(n,e,/\{\/literal}/);case"export":if(t=n.match(/\w+/)){if(e.soyState.pop(),t=="const")return e.soyState.push("const-def"),"keyword";if(t=="extern")return e.soyState.push("param-def"),"keyword"}else n.next();return null;case"const-def":return n.match(/^\w+/)?(e.soyState.pop(),"def"):(n.next(),null)}if(n.match("{literal}"))return e.indent+=l.indentUnit,e.soyState.push("literal"),e.context=new g(e.context,"literal",e.variables),"keyword";if(t=n.match(/^\{([/@\\]?\w+\??)(?=$|[\s}]|\/[/*])/)){var V=e.tag;e.tag=t[1];var a=e.tag[0]=="/",q=!!c[e.tag],p=a?e.tag.substring(1):e.tag,y=c[p];e.tag!="/switch"&&(e.indent+=((a||y&&y.reduceIndent)&&V!="switch"?1:2)*l.indentUnit),e.soyState.push("tag");var w=!1;if(y){if(a||y.soyState&&e.soyState.push(y.soyState),!y.noEndTag&&(q||!a))e.context=new g(e.context,e.tag,y.variableScope?e.variables:null);else if(a){var K=p=="extern"&&e.context&&e.context.tag=="export";if(!e.context||e.context.tag!=p&&!K)w=!0;else if(e.context){if(e.context.kind){e.localStates.pop();var h=f(e.localStates);h.mode.indent&&(e.indent-=h.mode.indent(h.state,"",""))}b(e)}}}else a&&(w=!0);return(w?"error ":"")+"keyword"}else{if(n.eat("{"))return e.tag="print",e.indent+=2*l.indentUnit,e.soyState.push("tag"),"keyword";if(!e.context&&n.match(/\bimport\b/))return e.soyState.push("import"),e.indent+=2*l.indentUnit,"keyword";if(t=n.match("<{"))return e.soyState.push("template-call-expression"),e.indent+=2*l.indentUnit,e.soyState.push("tag"),"keyword";if(t=n.match("</>"))return e.indent-=1*l.indentUnit,"keyword"}return T(n,e,/\{|\s+\/\/|\/\*/)},indent:function(n,e,t){var i=n.indent,d=f(n.soyState);if(d=="comment")return r.Pass;if(d=="literal")/^\{\/literal}/.test(e)&&(i-=l.indentUnit);else{if(/^\s*\{\/(template|deltemplate)\b/.test(e))return 0;/^\{(\/|(fallbackmsg|elseif|else|ifempty)\b)/.test(e)&&(i-=l.indentUnit),n.tag!="switch"&&/^\{(case|default)\b/.test(e)&&(i-=l.indentUnit),/^\{\/switch\b/.test(e)&&(i-=l.indentUnit)}var u=f(n.localStates);return i&&u.mode.indent&&(i+=u.mode.indent(u.state,e,t)),i},innerMode:function(n){return n.soyState.length&&f(n.soyState)!="literal"?null:f(n.localStates)},electricInput:/^\s*\{(\/|\/template|\/deltemplate|\/switch|fallbackmsg|elseif|else|case|default|ifempty|\/literal\})$/,lineComment:"//",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",useInnerComments:!1,fold:"indent"}},"htmlmixed"),r.registerHelper("wordChars","soy",/[\w$]/),r.registerHelper("hintWords","soy",Object.keys(c).concat(["css","debugger"])),r.defineMIME("text/x-soy","soy")})})();var D=O.exports,W=Object.freeze(P({__proto__:null,[Symbol.toStringTag]:"Module",default:D},[O.exports]));export{W as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bF as I}from"./vendor.299bc11c.js";function M(h,v){return v.forEach(function(i){i&&typeof i!="string"&&!Array.isArray(i)&&Object.keys(i).forEach(function(c){if(c!=="default"&&!(c in h)){var g=Object.getOwnPropertyDescriptor(i,c);Object.defineProperty(h,c,g.get?g:{enumerable:!0,get:function(){return i[c]}})}})}),Object.freeze(h)}var E={exports:{}};(function(h,v){(function(i){i(I.exports)})(function(i){i.defineMode("sql",function(n,o){var f=o.client||{},b=o.atoms||{false:!0,true:!0,null:!0},N=o.builtin||e(w),Q=o.keywords||e(m),k=o.operatorChars||/^[*+\-%<>!=&|~^\/]/,s=o.support||{},q=o.hooks||{},F=o.dateSQL||{date:!0,time:!0,timestamp:!0},O=o.backslashStringEscapes!==!1,L=o.brackets||/^[\{}\(\)\[\]]/,z=o.punctuation||/^[;.,:]/;function _(t,a){var r=t.next();if(q[r]){var l=q[r](t,a);if(l!==!1)return l}if(s.hexNumber&&(r=="0"&&t.match(/^[xX][0-9a-fA-F]+/)||(r=="x"||r=="X")&&t.match(/^'[0-9a-fA-F]+'/)))return"number";if(s.binaryNumber&&((r=="b"||r=="B")&&t.match(/^'[01]+'/)||r=="0"&&t.match(/^b[01]+/)))return"number";if(r.charCodeAt(0)>47&&r.charCodeAt(0)<58)return t.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),s.decimallessFloat&&t.match(/^\.(?!\.)/),"number";if(r=="?"&&(t.eatSpace()||t.eol()||t.eat(";")))return"variable-3";if(r=="'"||r=='"'&&s.doubleQuote)return a.tokenize=S(r),a.tokenize(t,a);if((s.nCharCast&&(r=="n"||r=="N")||s.charsetCast&&r=="_"&&t.match(/[a-z][a-z0-9]*/i))&&(t.peek()=="'"||t.peek()=='"'))return"keyword";if(s.escapeConstant&&(r=="e"||r=="E")&&(t.peek()=="'"||t.peek()=='"'&&s.doubleQuote))return a.tokenize=function(p,C){return(C.tokenize=S(p.next(),!0))(p,C)},"keyword";if(s.commentSlashSlash&&r=="/"&&t.eat("/"))return t.skipToEnd(),"comment";if(s.commentHash&&r=="#"||r=="-"&&t.eat("-")&&(!s.commentSpaceRequired||t.eat(" ")))return t.skipToEnd(),"comment";if(r=="/"&&t.eat("*"))return a.tokenize=y(1),a.tokenize(t,a);if(r=="."){if(s.zerolessFloat&&t.match(/^(?:\d+(?:e[+-]?\d+)?)/i))return"number";if(t.match(/^\.+/))return null;if(s.ODBCdotTable&&t.match(/^[\w\d_$#]+/))return"variable-2"}else{if(k.test(r))return t.eatWhile(k),"operator";if(L.test(r))return"bracket";if(z.test(r))return t.eatWhile(z),"punctuation";if(r=="{"&&(t.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||t.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";t.eatWhile(/^[_\w\d]/);var u=t.current().toLowerCase();return F.hasOwnProperty(u)&&(t.match(/^( )+'[^']*'/)||t.match(/^( )+"[^"]*"/))?"number":b.hasOwnProperty(u)?"atom":N.hasOwnProperty(u)?"builtin":Q.hasOwnProperty(u)?"keyword":f.hasOwnProperty(u)?"string-2":null}}function S(t,a){return function(r,l){for(var u=!1,p;(p=r.next())!=null;){if(p==t&&!u){l.tokenize=_;break}u=(O||a)&&!u&&p=="\\"}return"string"}}function y(t){return function(a,r){var l=a.match(/^.*?(\/\*|\*\/)/);return l?l[1]=="/*"?r.tokenize=y(t+1):t>1?r.tokenize=y(t-1):r.tokenize=_:a.skipToEnd(),"comment"}}function j(t,a,r){a.context={prev:a.context,indent:t.indentation(),col:t.column(),type:r}}function T(t){t.indent=t.context.indent,t.context=t.context.prev}return{startState:function(){return{tokenize:_,context:null}},token:function(t,a){if(t.sol()&&a.context&&a.context.align==null&&(a.context.align=!1),a.tokenize==_&&t.eatSpace())return null;var r=a.tokenize(t,a);if(r=="comment")return r;a.context&&a.context.align==null&&(a.context.align=!0);var l=t.current();return l=="("?j(t,a,")"):l=="["?j(t,a,"]"):a.context&&a.context.type==l&&T(a),r},indent:function(t,a){var r=t.context;if(!r)return i.Pass;var l=a.charAt(0)==r.type;return r.align?r.col+(l?0:1):r.indent+(l?0:n.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:s.commentSlashSlash?"//":s.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``"}});function c(n){for(var o;(o=n.next())!=null;)if(o=="`"&&!n.eat("`"))return"variable-2";return n.backUp(n.current().length-1),n.eatWhile(/\w/)?"variable-2":null}function g(n){for(var o;(o=n.next())!=null;)if(o=='"'&&!n.eat('"'))return"variable-2";return n.backUp(n.current().length-1),n.eatWhile(/\w/)?"variable-2":null}function d(n){return n.eat("@")&&(n.match("session."),n.match("local."),n.match("global.")),n.eat("'")?(n.match(/^.*'/),"variable-2"):n.eat('"')?(n.match(/^.*"/),"variable-2"):n.eat("`")?(n.match(/^.*`/),"variable-2"):n.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function x(n){return n.eat("N")?"atom":n.match(/^[a-zA-Z.#!?]/)?"variable-2":null}var m="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function e(n){for(var o={},f=n.split(" "),b=0;b<f.length;++b)o[f[b]]=!0;return o}var w="bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric";i.defineMIME("text/x-sql",{name:"sql",keywords:e(m+"begin"),builtin:e(w),atoms:e("false true null unknown"),dateSQL:e("date time timestamp"),support:e("ODBCdotTable doubleQuote binaryNumber hexNumber")}),i.defineMIME("text/x-mssql",{name:"sql",client:e("$partition binary_checksum checksum connectionproperty context_info current_request_id error_line error_message error_number error_procedure error_severity error_state formatmessage get_filestream_transaction_context getansinull host_id host_name isnull isnumeric min_active_rowversion newid newsequentialid rowcount_big xact_state object_id"),keywords:e(m+"begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec go if use index holdlock nolock nowait paglock readcommitted readcommittedlock readpast readuncommitted repeatableread rowlock serializable snapshot tablock tablockx updlock with"),builtin:e("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "),atoms:e("is not null like and or in left right between inner outer join all any some cross unpivot pivot exists"),operatorChars:/^[*+\-%<>!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:e("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":d}}),i.defineMIME("text/x-mysql",{name:"sql",client:e("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:e(m+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:e("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:e("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:e("date time timestamp"),support:e("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":d,"`":c,"\\":x}}),i.defineMIME("text/x-mariadb",{name:"sql",client:e("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:e(m+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group groupby_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:e("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:e("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:e("date time timestamp"),support:e("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":d,"`":c,"\\":x}}),i.defineMIME("text/x-sqlite",{name:"sql",client:e("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:e(m+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:e("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:e("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:e("date time timestamp datetime"),support:e("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":d,":":d,"?":d,$:d,'"':g,"`":c}}),i.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:e("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:e("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:e("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:e("commentSlashSlash decimallessFloat"),hooks:{}}),i.defineMIME("text/x-plsql",{name:"sql",client:e("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:e("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:e("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:e("date time timestamp"),support:e("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),i.defineMIME("text/x-hive",{name:"sql",keywords:e("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:e("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:e("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:e("date timestamp"),support:e("ODBCdotTable doubleQuote binaryNumber hexNumber")}),i.defineMIME("text/x-pgsql",{name:"sql",client:e("source"),keywords:e(m+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:e("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:e("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:e("date time timestamp"),support:e("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),i.defineMIME("text/x-gql",{name:"sql",keywords:e("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:e("false true"),builtin:e("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),i.defineMIME("text/x-gpsql",{name:"sql",client:e("source"),keywords:e("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:e("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:e("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:e("date time timestamp"),support:e("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),i.defineMIME("text/x-sparksql",{name:"sql",keywords:e("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:e("tinyint smallint int bigint boolean float double string binary timestamp decimal array map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat"),atoms:e("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:e("date time timestamp"),support:e("ODBCdotTable doubleQuote zerolessFloat")}),i.defineMIME("text/x-esper",{name:"sql",client:e("source"),keywords:e("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:e("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:e("time"),support:e("decimallessFloat zerolessFloat binaryNumber hexNumber")})})})();var B=E.exports,$=Object.freeze(M({__proto__:null,[Symbol.toStringTag]:"Module",default:B},[E.exports]));export{$ as s};
|