aboutsummaryrefslogtreecommitdiffstats
path: root/apps/cloud_federation_api
diff options
context:
space:
mode:
Diffstat (limited to 'apps/cloud_federation_api')
-rw-r--r--apps/cloud_federation_api/LICENSE661
-rw-r--r--apps/cloud_federation_api/README.md6
-rw-r--r--apps/cloud_federation_api/appinfo/info.xml24
-rw-r--r--apps/cloud_federation_api/appinfo/routes.php30
-rw-r--r--apps/cloud_federation_api/composer/autoload.php25
-rw-r--r--apps/cloud_federation_api/composer/composer.json13
-rw-r--r--apps/cloud_federation_api/composer/composer.lock18
-rw-r--r--apps/cloud_federation_api/composer/composer/ClassLoader.php579
-rw-r--r--apps/cloud_federation_api/composer/composer/InstalledVersions.php359
-rw-r--r--apps/cloud_federation_api/composer/composer/LICENSE21
-rw-r--r--apps/cloud_federation_api/composer/composer/autoload_classmap.php19
-rw-r--r--apps/cloud_federation_api/composer/composer/autoload_namespaces.php9
-rw-r--r--apps/cloud_federation_api/composer/composer/autoload_psr4.php10
-rw-r--r--apps/cloud_federation_api/composer/composer/autoload_real.php37
-rw-r--r--apps/cloud_federation_api/composer/composer/autoload_static.php45
-rw-r--r--apps/cloud_federation_api/composer/composer/installed.json5
-rw-r--r--apps/cloud_federation_api/composer/composer/installed.php23
-rw-r--r--apps/cloud_federation_api/l10n/.gitkeep0
-rw-r--r--apps/cloud_federation_api/l10n/ar.js8
-rw-r--r--apps/cloud_federation_api/l10n/ar.json6
-rw-r--r--apps/cloud_federation_api/l10n/ast.js8
-rw-r--r--apps/cloud_federation_api/l10n/ast.json6
-rw-r--r--apps/cloud_federation_api/l10n/bg.js8
-rw-r--r--apps/cloud_federation_api/l10n/bg.json6
-rw-r--r--apps/cloud_federation_api/l10n/ca.js8
-rw-r--r--apps/cloud_federation_api/l10n/ca.json6
-rw-r--r--apps/cloud_federation_api/l10n/cs.js8
-rw-r--r--apps/cloud_federation_api/l10n/cs.json6
-rw-r--r--apps/cloud_federation_api/l10n/da.js8
-rw-r--r--apps/cloud_federation_api/l10n/da.json6
-rw-r--r--apps/cloud_federation_api/l10n/de.js8
-rw-r--r--apps/cloud_federation_api/l10n/de.json6
-rw-r--r--apps/cloud_federation_api/l10n/de_DE.js8
-rw-r--r--apps/cloud_federation_api/l10n/de_DE.json6
-rw-r--r--apps/cloud_federation_api/l10n/el.js8
-rw-r--r--apps/cloud_federation_api/l10n/el.json6
-rw-r--r--apps/cloud_federation_api/l10n/en_GB.js8
-rw-r--r--apps/cloud_federation_api/l10n/en_GB.json6
-rw-r--r--apps/cloud_federation_api/l10n/eo.js8
-rw-r--r--apps/cloud_federation_api/l10n/eo.json6
-rw-r--r--apps/cloud_federation_api/l10n/es.js8
-rw-r--r--apps/cloud_federation_api/l10n/es.json6
-rw-r--r--apps/cloud_federation_api/l10n/es_CL.js8
-rw-r--r--apps/cloud_federation_api/l10n/es_CL.json6
-rw-r--r--apps/cloud_federation_api/l10n/es_EC.js8
-rw-r--r--apps/cloud_federation_api/l10n/es_EC.json6
-rw-r--r--apps/cloud_federation_api/l10n/es_MX.js8
-rw-r--r--apps/cloud_federation_api/l10n/es_MX.json6
-rw-r--r--apps/cloud_federation_api/l10n/et_EE.js8
-rw-r--r--apps/cloud_federation_api/l10n/et_EE.json6
-rw-r--r--apps/cloud_federation_api/l10n/eu.js8
-rw-r--r--apps/cloud_federation_api/l10n/eu.json6
-rw-r--r--apps/cloud_federation_api/l10n/fa.js8
-rw-r--r--apps/cloud_federation_api/l10n/fa.json6
-rw-r--r--apps/cloud_federation_api/l10n/fi.js7
-rw-r--r--apps/cloud_federation_api/l10n/fi.json5
-rw-r--r--apps/cloud_federation_api/l10n/fr.js8
-rw-r--r--apps/cloud_federation_api/l10n/fr.json6
-rw-r--r--apps/cloud_federation_api/l10n/ga.js8
-rw-r--r--apps/cloud_federation_api/l10n/ga.json6
-rw-r--r--apps/cloud_federation_api/l10n/gl.js8
-rw-r--r--apps/cloud_federation_api/l10n/gl.json6
-rw-r--r--apps/cloud_federation_api/l10n/hr.js8
-rw-r--r--apps/cloud_federation_api/l10n/hr.json6
-rw-r--r--apps/cloud_federation_api/l10n/hu.js8
-rw-r--r--apps/cloud_federation_api/l10n/hu.json6
-rw-r--r--apps/cloud_federation_api/l10n/is.js8
-rw-r--r--apps/cloud_federation_api/l10n/is.json6
-rw-r--r--apps/cloud_federation_api/l10n/it.js8
-rw-r--r--apps/cloud_federation_api/l10n/it.json6
-rw-r--r--apps/cloud_federation_api/l10n/ja.js8
-rw-r--r--apps/cloud_federation_api/l10n/ja.json6
-rw-r--r--apps/cloud_federation_api/l10n/ko.js8
-rw-r--r--apps/cloud_federation_api/l10n/ko.json6
-rw-r--r--apps/cloud_federation_api/l10n/lt_LT.js8
-rw-r--r--apps/cloud_federation_api/l10n/lt_LT.json6
-rw-r--r--apps/cloud_federation_api/l10n/mk.js8
-rw-r--r--apps/cloud_federation_api/l10n/mk.json6
-rw-r--r--apps/cloud_federation_api/l10n/my.js7
-rw-r--r--apps/cloud_federation_api/l10n/my.json5
-rw-r--r--apps/cloud_federation_api/l10n/nb.js8
-rw-r--r--apps/cloud_federation_api/l10n/nb.json6
-rw-r--r--apps/cloud_federation_api/l10n/nl.js8
-rw-r--r--apps/cloud_federation_api/l10n/nl.json6
-rw-r--r--apps/cloud_federation_api/l10n/pl.js8
-rw-r--r--apps/cloud_federation_api/l10n/pl.json6
-rw-r--r--apps/cloud_federation_api/l10n/pt_BR.js8
-rw-r--r--apps/cloud_federation_api/l10n/pt_BR.json6
-rw-r--r--apps/cloud_federation_api/l10n/pt_PT.js8
-rw-r--r--apps/cloud_federation_api/l10n/pt_PT.json6
-rw-r--r--apps/cloud_federation_api/l10n/ro.js8
-rw-r--r--apps/cloud_federation_api/l10n/ro.json6
-rw-r--r--apps/cloud_federation_api/l10n/ru.js8
-rw-r--r--apps/cloud_federation_api/l10n/ru.json6
-rw-r--r--apps/cloud_federation_api/l10n/sc.js8
-rw-r--r--apps/cloud_federation_api/l10n/sc.json6
-rw-r--r--apps/cloud_federation_api/l10n/sk.js8
-rw-r--r--apps/cloud_federation_api/l10n/sk.json6
-rw-r--r--apps/cloud_federation_api/l10n/sl.js8
-rw-r--r--apps/cloud_federation_api/l10n/sl.json6
-rw-r--r--apps/cloud_federation_api/l10n/sr.js8
-rw-r--r--apps/cloud_federation_api/l10n/sr.json6
-rw-r--r--apps/cloud_federation_api/l10n/sv.js8
-rw-r--r--apps/cloud_federation_api/l10n/sv.json6
-rw-r--r--apps/cloud_federation_api/l10n/sw.js8
-rw-r--r--apps/cloud_federation_api/l10n/sw.json6
-rw-r--r--apps/cloud_federation_api/l10n/tr.js8
-rw-r--r--apps/cloud_federation_api/l10n/tr.json6
-rw-r--r--apps/cloud_federation_api/l10n/ug.js8
-rw-r--r--apps/cloud_federation_api/l10n/ug.json6
-rw-r--r--apps/cloud_federation_api/l10n/uk.js8
-rw-r--r--apps/cloud_federation_api/l10n/uk.json6
-rw-r--r--apps/cloud_federation_api/l10n/uz.js8
-rw-r--r--apps/cloud_federation_api/l10n/uz.json6
-rw-r--r--apps/cloud_federation_api/l10n/vi.js8
-rw-r--r--apps/cloud_federation_api/l10n/vi.json6
-rw-r--r--apps/cloud_federation_api/l10n/zh_CN.js8
-rw-r--r--apps/cloud_federation_api/l10n/zh_CN.json6
-rw-r--r--apps/cloud_federation_api/l10n/zh_HK.js8
-rw-r--r--apps/cloud_federation_api/l10n/zh_HK.json6
-rw-r--r--apps/cloud_federation_api/l10n/zh_TW.js8
-rw-r--r--apps/cloud_federation_api/l10n/zh_TW.json6
-rw-r--r--apps/cloud_federation_api/lib/AppInfo/Application.php30
-rw-r--r--apps/cloud_federation_api/lib/Capabilities.php78
-rw-r--r--apps/cloud_federation_api/lib/Config.php42
-rw-r--r--apps/cloud_federation_api/lib/Controller/RequestHandlerController.php574
-rw-r--r--apps/cloud_federation_api/lib/Db/FederatedInvite.php62
-rw-r--r--apps/cloud_federation_api/lib/Db/FederatedInviteMapper.php33
-rw-r--r--apps/cloud_federation_api/lib/Events/FederatedInviteAcceptedEvent.php24
-rw-r--r--apps/cloud_federation_api/lib/Migration/Version1016Date202502262004.php89
-rw-r--r--apps/cloud_federation_api/lib/ResponseDefinitions.php30
-rw-r--r--apps/cloud_federation_api/openapi.json499
-rw-r--r--apps/cloud_federation_api/openapi.json.license2
-rw-r--r--apps/cloud_federation_api/tests/RequestHandlerControllerTest.php136
134 files changed, 4207 insertions, 0 deletions
diff --git a/apps/cloud_federation_api/LICENSE b/apps/cloud_federation_api/LICENSE
new file mode 100644
index 00000000000..dbbe3558157
--- /dev/null
+++ b/apps/cloud_federation_api/LICENSE
@@ -0,0 +1,661 @@
+ GNU AFFERO GENERAL PUBLIC LICENSE
+ Version 3, 19 November 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU Affero General Public License is a free, copyleft license for
+software and other kinds of works, specifically designed to ensure
+cooperation with the community in the case of network server software.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+our General Public Licenses are intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ Developers that use our General Public Licenses protect your rights
+with two steps: (1) assert copyright on the software, and (2) offer
+you this License which gives you legal permission to copy, distribute
+and/or modify the software.
+
+ A secondary benefit of defending all users' freedom is that
+improvements made in alternate versions of the program, if they
+receive widespread use, become available for other developers to
+incorporate. Many developers of free software are heartened and
+encouraged by the resulting cooperation. However, in the case of
+software used on network servers, this result may fail to come about.
+The GNU General Public License permits making a modified version and
+letting the public access it on a server without ever releasing its
+source code to the public.
+
+ The GNU Affero General Public License is designed specifically to
+ensure that, in such cases, the modified source code becomes available
+to the community. It requires the operator of a network server to
+provide the source code of the modified version running there to the
+users of that server. Therefore, public use of a modified version, on
+a publicly accessible server, gives the public access to the source
+code of the modified version.
+
+ An older license, called the Affero General Public License and
+published by Affero, was designed to accomplish similar goals. This is
+a different license, not a version of the Affero GPL, but Affero has
+released a new version of the Affero GPL which permits relicensing under
+this license.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU Affero General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Remote Network Interaction; Use with the GNU General Public License.
+
+ Notwithstanding any other provision of this License, if you modify the
+Program, your modified version must prominently offer all users
+interacting with it remotely through a computer network (if your version
+supports such interaction) an opportunity to receive the Corresponding
+Source of your version by providing access to the Corresponding Source
+from a network server at no charge, through some standard or customary
+means of facilitating copying of software. This Corresponding Source
+shall include the Corresponding Source for any work covered by version 3
+of the GNU General Public License that is incorporated pursuant to the
+following paragraph.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the work with which it is combined will remain governed by version
+3 of the GNU General Public License.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU Affero General Public License from time to time. Such new versions
+will be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU Affero General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU Affero General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU Affero General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If your software can interact with users remotely through a computer
+network, you should also make sure that it provides a way for users to
+get its source. For example, if your program is a web application, its
+interface could display a "Source" link that leads users to an archive
+of the code. There are many ways you could offer source, and different
+solutions will be better for different programs; see section 13 for the
+specific requirements.
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU AGPL, see
+<http://www.gnu.org/licenses/>.
diff --git a/apps/cloud_federation_api/README.md b/apps/cloud_federation_api/README.md
new file mode 100644
index 00000000000..4597269da43
--- /dev/null
+++ b/apps/cloud_federation_api/README.md
@@ -0,0 +1,6 @@
+<!--
+ - SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
+ - SPDX-License-Identifier: AGPL-3.0-or-later
+-->
+# cloud_federation_api
+The cloud federation API allows to share information like files, contacts, calendars, incoming calls, etc across Nextcloud instances
diff --git a/apps/cloud_federation_api/appinfo/info.xml b/apps/cloud_federation_api/appinfo/info.xml
new file mode 100644
index 00000000000..81343cb49bf
--- /dev/null
+++ b/apps/cloud_federation_api/appinfo/info.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!--
+ - SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
+ - SPDX-License-Identifier: AGPL-3.0-or-later
+-->
+<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
+ <id>cloud_federation_api</id>
+ <name>Cloud Federation API</name>
+ <summary>Enable clouds to communicate with each other and exchange data</summary>
+ <description>The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data.</description>
+ <version>1.16.0</version>
+ <licence>agpl</licence>
+ <author>Bjoern Schiessle</author>
+ <namespace>CloudFederationAPI</namespace>
+ <types>
+ <filesystem/>
+ </types>
+ <category>integration</category>
+ <bugs>https://github.com/nextcloud/server/issues</bugs>
+ <dependencies>
+ <nextcloud min-version="32" max-version="32"/>
+ </dependencies>
+</info>
diff --git a/apps/cloud_federation_api/appinfo/routes.php b/apps/cloud_federation_api/appinfo/routes.php
new file mode 100644
index 00000000000..6467005e21b
--- /dev/null
+++ b/apps/cloud_federation_api/appinfo/routes.php
@@ -0,0 +1,30 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+return [
+ 'routes' => [
+ [
+ 'name' => 'RequestHandler#addShare',
+ 'url' => '/shares',
+ 'verb' => 'POST',
+ 'root' => '/ocm',
+ ],
+ [
+ 'name' => 'RequestHandler#receiveNotification',
+ 'url' => '/notifications',
+ 'verb' => 'POST',
+ 'root' => '/ocm',
+ ],
+ [
+ 'name' => 'RequestHandler#inviteAccepted',
+ 'url' => '/invite-accepted',
+ 'verb' => 'POST',
+ 'root' => '/ocm',
+ ]
+ ],
+];
diff --git a/apps/cloud_federation_api/composer/autoload.php b/apps/cloud_federation_api/composer/autoload.php
new file mode 100644
index 00000000000..0c261b9233d
--- /dev/null
+++ b/apps/cloud_federation_api/composer/autoload.php
@@ -0,0 +1,25 @@
+<?php
+
+// autoload.php @generated by Composer
+
+if (PHP_VERSION_ID < 50600) {
+ if (!headers_sent()) {
+ header('HTTP/1.1 500 Internal Server Error');
+ }
+ $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
+ if (!ini_get('display_errors')) {
+ if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
+ fwrite(STDERR, $err);
+ } elseif (!headers_sent()) {
+ echo $err;
+ }
+ }
+ trigger_error(
+ $err,
+ E_USER_ERROR
+ );
+}
+
+require_once __DIR__ . '/composer/autoload_real.php';
+
+return ComposerAutoloaderInitCloudFederationAPI::getLoader();
diff --git a/apps/cloud_federation_api/composer/composer.json b/apps/cloud_federation_api/composer/composer.json
new file mode 100644
index 00000000000..f8ca919ad58
--- /dev/null
+++ b/apps/cloud_federation_api/composer/composer.json
@@ -0,0 +1,13 @@
+{
+ "config" : {
+ "vendor-dir": ".",
+ "optimize-autoloader": true,
+ "classmap-authoritative": true,
+ "autoloader-suffix": "CloudFederationAPI"
+ },
+ "autoload" : {
+ "psr-4": {
+ "OCA\\CloudFederationAPI\\": "../lib/"
+ }
+ }
+}
diff --git a/apps/cloud_federation_api/composer/composer.lock b/apps/cloud_federation_api/composer/composer.lock
new file mode 100644
index 00000000000..fd0bcbcb753
--- /dev/null
+++ b/apps/cloud_federation_api/composer/composer.lock
@@ -0,0 +1,18 @@
+{
+ "_readme": [
+ "This file locks the dependencies of your project to a known state",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
+ "This file is @generated automatically"
+ ],
+ "content-hash": "d751713988987e9331980363e24189ce",
+ "packages": [],
+ "packages-dev": [],
+ "aliases": [],
+ "minimum-stability": "stable",
+ "stability-flags": [],
+ "prefer-stable": false,
+ "prefer-lowest": false,
+ "platform": [],
+ "platform-dev": [],
+ "plugin-api-version": "2.1.0"
+}
diff --git a/apps/cloud_federation_api/composer/composer/ClassLoader.php b/apps/cloud_federation_api/composer/composer/ClassLoader.php
new file mode 100644
index 00000000000..7824d8f7eaf
--- /dev/null
+++ b/apps/cloud_federation_api/composer/composer/ClassLoader.php
@@ -0,0 +1,579 @@
+<?php
+
+/*
+ * This file is part of Composer.
+ *
+ * (c) Nils Adermann <naderman@naderman.de>
+ * Jordi Boggiano <j.boggiano@seld.be>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Composer\Autoload;
+
+/**
+ * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
+ *
+ * $loader = new \Composer\Autoload\ClassLoader();
+ *
+ * // register classes with namespaces
+ * $loader->add('Symfony\Component', __DIR__.'/component');
+ * $loader->add('Symfony', __DIR__.'/framework');
+ *
+ * // activate the autoloader
+ * $loader->register();
+ *
+ * // to enable searching the include path (eg. for PEAR packages)
+ * $loader->setUseIncludePath(true);
+ *
+ * In this example, if you try to use a class in the Symfony\Component
+ * namespace or one of its children (Symfony\Component\Console for instance),
+ * the autoloader will first look for the class under the component/
+ * directory, and it will then fallback to the framework/ directory if not
+ * found before giving up.
+ *
+ * This class is loosely based on the Symfony UniversalClassLoader.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Jordi Boggiano <j.boggiano@seld.be>
+ * @see https://www.php-fig.org/psr/psr-0/
+ * @see https://www.php-fig.org/psr/psr-4/
+ */
+class ClassLoader
+{
+ /** @var \Closure(string):void */
+ private static $includeFile;
+
+ /** @var string|null */
+ private $vendorDir;
+
+ // PSR-4
+ /**
+ * @var array<string, array<string, int>>
+ */
+ private $prefixLengthsPsr4 = array();
+ /**
+ * @var array<string, list<string>>
+ */
+ private $prefixDirsPsr4 = array();
+ /**
+ * @var list<string>
+ */
+ private $fallbackDirsPsr4 = array();
+
+ // PSR-0
+ /**
+ * List of PSR-0 prefixes
+ *
+ * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
+ *
+ * @var array<string, array<string, list<string>>>
+ */
+ private $prefixesPsr0 = array();
+ /**
+ * @var list<string>
+ */
+ private $fallbackDirsPsr0 = array();
+
+ /** @var bool */
+ private $useIncludePath = false;
+
+ /**
+ * @var array<string, string>
+ */
+ private $classMap = array();
+
+ /** @var bool */
+ private $classMapAuthoritative = false;
+
+ /**
+ * @var array<string, bool>
+ */
+ private $missingClasses = array();
+
+ /** @var string|null */
+ private $apcuPrefix;
+
+ /**
+ * @var array<string, self>
+ */
+ private static $registeredLoaders = array();
+
+ /**
+ * @param string|null $vendorDir
+ */
+ public function __construct($vendorDir = null)
+ {
+ $this->vendorDir = $vendorDir;
+ self::initializeIncludeClosure();
+ }
+
+ /**
+ * @return array<string, list<string>>
+ */
+ public function getPrefixes()
+ {
+ if (!empty($this->prefixesPsr0)) {
+ return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
+ }
+
+ return array();
+ }
+
+ /**
+ * @return array<string, list<string>>
+ */
+ public function getPrefixesPsr4()
+ {
+ return $this->prefixDirsPsr4;
+ }
+
+ /**
+ * @return list<string>
+ */
+ public function getFallbackDirs()
+ {
+ return $this->fallbackDirsPsr0;
+ }
+
+ /**
+ * @return list<string>
+ */
+ public function getFallbackDirsPsr4()
+ {
+ return $this->fallbackDirsPsr4;
+ }
+
+ /**
+ * @return array<string, string> Array of classname => path
+ */
+ public function getClassMap()
+ {
+ return $this->classMap;
+ }
+
+ /**
+ * @param array<string, string> $classMap Class to filename map
+ *
+ * @return void
+ */
+ public function addClassMap(array $classMap)
+ {
+ if ($this->classMap) {
+ $this->classMap = array_merge($this->classMap, $classMap);
+ } else {
+ $this->classMap = $classMap;
+ }
+ }
+
+ /**
+ * Registers a set of PSR-0 directories for a given prefix, either
+ * appending or prepending to the ones previously set for this prefix.
+ *
+ * @param string $prefix The prefix
+ * @param list<string>|string $paths The PSR-0 root directories
+ * @param bool $prepend Whether to prepend the directories
+ *
+ * @return void
+ */
+ public function add($prefix, $paths, $prepend = false)
+ {
+ $paths = (array) $paths;
+ if (!$prefix) {
+ if ($prepend) {
+ $this->fallbackDirsPsr0 = array_merge(
+ $paths,
+ $this->fallbackDirsPsr0
+ );
+ } else {
+ $this->fallbackDirsPsr0 = array_merge(
+ $this->fallbackDirsPsr0,
+ $paths
+ );
+ }
+
+ return;
+ }
+
+ $first = $prefix[0];
+ if (!isset($this->prefixesPsr0[$first][$prefix])) {
+ $this->prefixesPsr0[$first][$prefix] = $paths;
+
+ return;
+ }
+ if ($prepend) {
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
+ $paths,
+ $this->prefixesPsr0[$first][$prefix]
+ );
+ } else {
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
+ $this->prefixesPsr0[$first][$prefix],
+ $paths
+ );
+ }
+ }
+
+ /**
+ * Registers a set of PSR-4 directories for a given namespace, either
+ * appending or prepending to the ones previously set for this namespace.
+ *
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param list<string>|string $paths The PSR-4 base directories
+ * @param bool $prepend Whether to prepend the directories
+ *
+ * @throws \InvalidArgumentException
+ *
+ * @return void
+ */
+ public function addPsr4($prefix, $paths, $prepend = false)
+ {
+ $paths = (array) $paths;
+ if (!$prefix) {
+ // Register directories for the root namespace.
+ if ($prepend) {
+ $this->fallbackDirsPsr4 = array_merge(
+ $paths,
+ $this->fallbackDirsPsr4
+ );
+ } else {
+ $this->fallbackDirsPsr4 = array_merge(
+ $this->fallbackDirsPsr4,
+ $paths
+ );
+ }
+ } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
+ // Register directories for a new namespace.
+ $length = strlen($prefix);
+ if ('\\' !== $prefix[$length - 1]) {
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
+ }
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
+ $this->prefixDirsPsr4[$prefix] = $paths;
+ } elseif ($prepend) {
+ // Prepend directories for an already registered namespace.
+ $this->prefixDirsPsr4[$prefix] = array_merge(
+ $paths,
+ $this->prefixDirsPsr4[$prefix]
+ );
+ } else {
+ // Append directories for an already registered namespace.
+ $this->prefixDirsPsr4[$prefix] = array_merge(
+ $this->prefixDirsPsr4[$prefix],
+ $paths
+ );
+ }
+ }
+
+ /**
+ * Registers a set of PSR-0 directories for a given prefix,
+ * replacing any others previously set for this prefix.
+ *
+ * @param string $prefix The prefix
+ * @param list<string>|string $paths The PSR-0 base directories
+ *
+ * @return void
+ */
+ public function set($prefix, $paths)
+ {
+ if (!$prefix) {
+ $this->fallbackDirsPsr0 = (array) $paths;
+ } else {
+ $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
+ }
+ }
+
+ /**
+ * Registers a set of PSR-4 directories for a given namespace,
+ * replacing any others previously set for this namespace.
+ *
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param list<string>|string $paths The PSR-4 base directories
+ *
+ * @throws \InvalidArgumentException
+ *
+ * @return void
+ */
+ public function setPsr4($prefix, $paths)
+ {
+ if (!$prefix) {
+ $this->fallbackDirsPsr4 = (array) $paths;
+ } else {
+ $length = strlen($prefix);
+ if ('\\' !== $prefix[$length - 1]) {
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
+ }
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
+ }
+ }
+
+ /**
+ * Turns on searching the include path for class files.
+ *
+ * @param bool $useIncludePath
+ *
+ * @return void
+ */
+ public function setUseIncludePath($useIncludePath)
+ {
+ $this->useIncludePath = $useIncludePath;
+ }
+
+ /**
+ * Can be used to check if the autoloader uses the include path to check
+ * for classes.
+ *
+ * @return bool
+ */
+ public function getUseIncludePath()
+ {
+ return $this->useIncludePath;
+ }
+
+ /**
+ * Turns off searching the prefix and fallback directories for classes
+ * that have not been registered with the class map.
+ *
+ * @param bool $classMapAuthoritative
+ *
+ * @return void
+ */
+ public function setClassMapAuthoritative($classMapAuthoritative)
+ {
+ $this->classMapAuthoritative = $classMapAuthoritative;
+ }
+
+ /**
+ * Should class lookup fail if not found in the current class map?
+ *
+ * @return bool
+ */
+ public function isClassMapAuthoritative()
+ {
+ return $this->classMapAuthoritative;
+ }
+
+ /**
+ * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
+ *
+ * @param string|null $apcuPrefix
+ *
+ * @return void
+ */
+ public function setApcuPrefix($apcuPrefix)
+ {
+ $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
+ }
+
+ /**
+ * The APCu prefix in use, or null if APCu caching is not enabled.
+ *
+ * @return string|null
+ */
+ public function getApcuPrefix()
+ {
+ return $this->apcuPrefix;
+ }
+
+ /**
+ * Registers this instance as an autoloader.
+ *
+ * @param bool $prepend Whether to prepend the autoloader or not
+ *
+ * @return void
+ */
+ public function register($prepend = false)
+ {
+ spl_autoload_register(array($this, 'loadClass'), true, $prepend);
+
+ if (null === $this->vendorDir) {
+ return;
+ }
+
+ if ($prepend) {
+ self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
+ } else {
+ unset(self::$registeredLoaders[$this->vendorDir]);
+ self::$registeredLoaders[$this->vendorDir] = $this;
+ }
+ }
+
+ /**
+ * Unregisters this instance as an autoloader.
+ *
+ * @return void
+ */
+ public function unregister()
+ {
+ spl_autoload_unregister(array($this, 'loadClass'));
+
+ if (null !== $this->vendorDir) {
+ unset(self::$registeredLoaders[$this->vendorDir]);
+ }
+ }
+
+ /**
+ * Loads the given class or interface.
+ *
+ * @param string $class The name of the class
+ * @return true|null True if loaded, null otherwise
+ */
+ public function loadClass($class)
+ {
+ if ($file = $this->findFile($class)) {
+ $includeFile = self::$includeFile;
+ $includeFile($file);
+
+ return true;
+ }
+
+ return null;
+ }
+
+ /**
+ * Finds the path to the file where the class is defined.
+ *
+ * @param string $class The name of the class
+ *
+ * @return string|false The path if found, false otherwise
+ */
+ public function findFile($class)
+ {
+ // class map lookup
+ if (isset($this->classMap[$class])) {
+ return $this->classMap[$class];
+ }
+ if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
+ return false;
+ }
+ if (null !== $this->apcuPrefix) {
+ $file = apcu_fetch($this->apcuPrefix.$class, $hit);
+ if ($hit) {
+ return $file;
+ }
+ }
+
+ $file = $this->findFileWithExtension($class, '.php');
+
+ // Search for Hack files if we are running on HHVM
+ if (false === $file && defined('HHVM_VERSION')) {
+ $file = $this->findFileWithExtension($class, '.hh');
+ }
+
+ if (null !== $this->apcuPrefix) {
+ apcu_add($this->apcuPrefix.$class, $file);
+ }
+
+ if (false === $file) {
+ // Remember that this class does not exist.
+ $this->missingClasses[$class] = true;
+ }
+
+ return $file;
+ }
+
+ /**
+ * Returns the currently registered loaders keyed by their corresponding vendor directories.
+ *
+ * @return array<string, self>
+ */
+ public static function getRegisteredLoaders()
+ {
+ return self::$registeredLoaders;
+ }
+
+ /**
+ * @param string $class
+ * @param string $ext
+ * @return string|false
+ */
+ private function findFileWithExtension($class, $ext)
+ {
+ // PSR-4 lookup
+ $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
+
+ $first = $class[0];
+ if (isset($this->prefixLengthsPsr4[$first])) {
+ $subPath = $class;
+ while (false !== $lastPos = strrpos($subPath, '\\')) {
+ $subPath = substr($subPath, 0, $lastPos);
+ $search = $subPath . '\\';
+ if (isset($this->prefixDirsPsr4[$search])) {
+ $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
+ foreach ($this->prefixDirsPsr4[$search] as $dir) {
+ if (file_exists($file = $dir . $pathEnd)) {
+ return $file;
+ }
+ }
+ }
+ }
+ }
+
+ // PSR-4 fallback dirs
+ foreach ($this->fallbackDirsPsr4 as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
+ return $file;
+ }
+ }
+
+ // PSR-0 lookup
+ if (false !== $pos = strrpos($class, '\\')) {
+ // namespaced class name
+ $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
+ . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
+ } else {
+ // PEAR-like class name
+ $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
+ }
+
+ if (isset($this->prefixesPsr0[$first])) {
+ foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
+ if (0 === strpos($class, $prefix)) {
+ foreach ($dirs as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
+ return $file;
+ }
+ }
+ }
+ }
+ }
+
+ // PSR-0 fallback dirs
+ foreach ($this->fallbackDirsPsr0 as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
+ return $file;
+ }
+ }
+
+ // PSR-0 include paths.
+ if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
+ return $file;
+ }
+
+ return false;
+ }
+
+ /**
+ * @return void
+ */
+ private static function initializeIncludeClosure()
+ {
+ if (self::$includeFile !== null) {
+ return;
+ }
+
+ /**
+ * Scope isolated include.
+ *
+ * Prevents access to $this/self from included files.
+ *
+ * @param string $file
+ * @return void
+ */
+ self::$includeFile = \Closure::bind(static function($file) {
+ include $file;
+ }, null, null);
+ }
+}
diff --git a/apps/cloud_federation_api/composer/composer/InstalledVersions.php b/apps/cloud_federation_api/composer/composer/InstalledVersions.php
new file mode 100644
index 00000000000..51e734a774b
--- /dev/null
+++ b/apps/cloud_federation_api/composer/composer/InstalledVersions.php
@@ -0,0 +1,359 @@
+<?php
+
+/*
+ * This file is part of Composer.
+ *
+ * (c) Nils Adermann <naderman@naderman.de>
+ * Jordi Boggiano <j.boggiano@seld.be>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Composer;
+
+use Composer\Autoload\ClassLoader;
+use Composer\Semver\VersionParser;
+
+/**
+ * This class is copied in every Composer installed project and available to all
+ *
+ * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
+ *
+ * To require its presence, you can require `composer-runtime-api ^2.0`
+ *
+ * @final
+ */
+class InstalledVersions
+{
+ /**
+ * @var mixed[]|null
+ * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
+ */
+ private static $installed;
+
+ /**
+ * @var bool|null
+ */
+ private static $canGetVendors;
+
+ /**
+ * @var array[]
+ * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
+ */
+ private static $installedByVendor = array();
+
+ /**
+ * Returns a list of all package names which are present, either by being installed, replaced or provided
+ *
+ * @return string[]
+ * @psalm-return list<string>
+ */
+ public static function getInstalledPackages()
+ {
+ $packages = array();
+ foreach (self::getInstalled() as $installed) {
+ $packages[] = array_keys($installed['versions']);
+ }
+
+ if (1 === \count($packages)) {
+ return $packages[0];
+ }
+
+ return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
+ }
+
+ /**
+ * Returns a list of all package names with a specific type e.g. 'library'
+ *
+ * @param string $type
+ * @return string[]
+ * @psalm-return list<string>
+ */
+ public static function getInstalledPackagesByType($type)
+ {
+ $packagesByType = array();
+
+ foreach (self::getInstalled() as $installed) {
+ foreach ($installed['versions'] as $name => $package) {
+ if (isset($package['type']) && $package['type'] === $type) {
+ $packagesByType[] = $name;
+ }
+ }
+ }
+
+ return $packagesByType;
+ }
+
+ /**
+ * Checks whether the given package is installed
+ *
+ * This also returns true if the package name is provided or replaced by another package
+ *
+ * @param string $packageName
+ * @param bool $includeDevRequirements
+ * @return bool
+ */
+ public static function isInstalled($packageName, $includeDevRequirements = true)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (isset($installed['versions'][$packageName])) {
+ return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks whether the given package satisfies a version constraint
+ *
+ * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
+ *
+ * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
+ *
+ * @param VersionParser $parser Install composer/semver to have access to this class and functionality
+ * @param string $packageName
+ * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
+ * @return bool
+ */
+ public static function satisfies(VersionParser $parser, $packageName, $constraint)
+ {
+ $constraint = $parser->parseConstraints((string) $constraint);
+ $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
+
+ return $provided->matches($constraint);
+ }
+
+ /**
+ * Returns a version constraint representing all the range(s) which are installed for a given package
+ *
+ * It is easier to use this via isInstalled() with the $constraint argument if you need to check
+ * whether a given version of a package is installed, and not just whether it exists
+ *
+ * @param string $packageName
+ * @return string Version constraint usable with composer/semver
+ */
+ public static function getVersionRanges($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ $ranges = array();
+ if (isset($installed['versions'][$packageName]['pretty_version'])) {
+ $ranges[] = $installed['versions'][$packageName]['pretty_version'];
+ }
+ if (array_key_exists('aliases', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
+ }
+ if (array_key_exists('replaced', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
+ }
+ if (array_key_exists('provided', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
+ }
+
+ return implode(' || ', $ranges);
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
+ */
+ public static function getVersion($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['version'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['version'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
+ */
+ public static function getPrettyVersion($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['pretty_version'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['pretty_version'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
+ */
+ public static function getReference($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['reference'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['reference'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
+ */
+ public static function getInstallPath($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @return array
+ * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
+ */
+ public static function getRootPackage()
+ {
+ $installed = self::getInstalled();
+
+ return $installed[0]['root'];
+ }
+
+ /**
+ * Returns the raw installed.php data for custom implementations
+ *
+ * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
+ * @return array[]
+ * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
+ */
+ public static function getRawData()
+ {
+ @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
+
+ if (null === self::$installed) {
+ // only require the installed.php file if this file is loaded from its dumped location,
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
+ if (substr(__DIR__, -8, 1) !== 'C') {
+ self::$installed = include __DIR__ . '/installed.php';
+ } else {
+ self::$installed = array();
+ }
+ }
+
+ return self::$installed;
+ }
+
+ /**
+ * Returns the raw data of all installed.php which are currently loaded for custom implementations
+ *
+ * @return array[]
+ * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
+ */
+ public static function getAllRawData()
+ {
+ return self::getInstalled();
+ }
+
+ /**
+ * Lets you reload the static array from another file
+ *
+ * This is only useful for complex integrations in which a project needs to use
+ * this class but then also needs to execute another project's autoloader in process,
+ * and wants to ensure both projects have access to their version of installed.php.
+ *
+ * A typical case would be PHPUnit, where it would need to make sure it reads all
+ * the data it needs from this class, then call reload() with
+ * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
+ * the project in which it runs can then also use this class safely, without
+ * interference between PHPUnit's dependencies and the project's dependencies.
+ *
+ * @param array[] $data A vendor/composer/installed.php data set
+ * @return void
+ *
+ * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
+ */
+ public static function reload($data)
+ {
+ self::$installed = $data;
+ self::$installedByVendor = array();
+ }
+
+ /**
+ * @return array[]
+ * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
+ */
+ private static function getInstalled()
+ {
+ if (null === self::$canGetVendors) {
+ self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
+ }
+
+ $installed = array();
+
+ if (self::$canGetVendors) {
+ foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
+ if (isset(self::$installedByVendor[$vendorDir])) {
+ $installed[] = self::$installedByVendor[$vendorDir];
+ } elseif (is_file($vendorDir.'/composer/installed.php')) {
+ /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
+ $required = require $vendorDir.'/composer/installed.php';
+ $installed[] = self::$installedByVendor[$vendorDir] = $required;
+ if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
+ self::$installed = $installed[count($installed) - 1];
+ }
+ }
+ }
+ }
+
+ if (null === self::$installed) {
+ // only require the installed.php file if this file is loaded from its dumped location,
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
+ if (substr(__DIR__, -8, 1) !== 'C') {
+ /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
+ $required = require __DIR__ . '/installed.php';
+ self::$installed = $required;
+ } else {
+ self::$installed = array();
+ }
+ }
+
+ if (self::$installed !== array()) {
+ $installed[] = self::$installed;
+ }
+
+ return $installed;
+ }
+}
diff --git a/apps/cloud_federation_api/composer/composer/LICENSE b/apps/cloud_federation_api/composer/composer/LICENSE
new file mode 100644
index 00000000000..f27399a042d
--- /dev/null
+++ b/apps/cloud_federation_api/composer/composer/LICENSE
@@ -0,0 +1,21 @@
+
+Copyright (c) Nils Adermann, Jordi Boggiano
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
diff --git a/apps/cloud_federation_api/composer/composer/autoload_classmap.php b/apps/cloud_federation_api/composer/composer/autoload_classmap.php
new file mode 100644
index 00000000000..3cadc540c88
--- /dev/null
+++ b/apps/cloud_federation_api/composer/composer/autoload_classmap.php
@@ -0,0 +1,19 @@
+<?php
+
+// autoload_classmap.php @generated by Composer
+
+$vendorDir = dirname(__DIR__);
+$baseDir = $vendorDir;
+
+return array(
+ 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
+ 'OCA\\CloudFederationAPI\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php',
+ 'OCA\\CloudFederationAPI\\Capabilities' => $baseDir . '/../lib/Capabilities.php',
+ 'OCA\\CloudFederationAPI\\Config' => $baseDir . '/../lib/Config.php',
+ 'OCA\\CloudFederationAPI\\Controller\\RequestHandlerController' => $baseDir . '/../lib/Controller/RequestHandlerController.php',
+ 'OCA\\CloudFederationAPI\\Db\\FederatedInvite' => $baseDir . '/../lib/Db/FederatedInvite.php',
+ 'OCA\\CloudFederationAPI\\Db\\FederatedInviteMapper' => $baseDir . '/../lib/Db/FederatedInviteMapper.php',
+ 'OCA\\CloudFederationAPI\\Events\\FederatedInviteAcceptedEvent' => $baseDir . '/../lib/Events/FederatedInviteAcceptedEvent.php',
+ 'OCA\\CloudFederationAPI\\Migration\\Version1016Date202502262004' => $baseDir . '/../lib/Migration/Version1016Date202502262004.php',
+ 'OCA\\CloudFederationAPI\\ResponseDefinitions' => $baseDir . '/../lib/ResponseDefinitions.php',
+);
diff --git a/apps/cloud_federation_api/composer/composer/autoload_namespaces.php b/apps/cloud_federation_api/composer/composer/autoload_namespaces.php
new file mode 100644
index 00000000000..3f5c9296251
--- /dev/null
+++ b/apps/cloud_federation_api/composer/composer/autoload_namespaces.php
@@ -0,0 +1,9 @@
+<?php
+
+// autoload_namespaces.php @generated by Composer
+
+$vendorDir = dirname(__DIR__);
+$baseDir = $vendorDir;
+
+return array(
+);
diff --git a/apps/cloud_federation_api/composer/composer/autoload_psr4.php b/apps/cloud_federation_api/composer/composer/autoload_psr4.php
new file mode 100644
index 00000000000..de1b8cee1e9
--- /dev/null
+++ b/apps/cloud_federation_api/composer/composer/autoload_psr4.php
@@ -0,0 +1,10 @@
+<?php
+
+// autoload_psr4.php @generated by Composer
+
+$vendorDir = dirname(__DIR__);
+$baseDir = $vendorDir;
+
+return array(
+ 'OCA\\CloudFederationAPI\\' => array($baseDir . '/../lib'),
+);
diff --git a/apps/cloud_federation_api/composer/composer/autoload_real.php b/apps/cloud_federation_api/composer/composer/autoload_real.php
new file mode 100644
index 00000000000..53093c129e3
--- /dev/null
+++ b/apps/cloud_federation_api/composer/composer/autoload_real.php
@@ -0,0 +1,37 @@
+<?php
+
+// autoload_real.php @generated by Composer
+
+class ComposerAutoloaderInitCloudFederationAPI
+{
+ private static $loader;
+
+ public static function loadClassLoader($class)
+ {
+ if ('Composer\Autoload\ClassLoader' === $class) {
+ require __DIR__ . '/ClassLoader.php';
+ }
+ }
+
+ /**
+ * @return \Composer\Autoload\ClassLoader
+ */
+ public static function getLoader()
+ {
+ if (null !== self::$loader) {
+ return self::$loader;
+ }
+
+ spl_autoload_register(array('ComposerAutoloaderInitCloudFederationAPI', 'loadClassLoader'), true, true);
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
+ spl_autoload_unregister(array('ComposerAutoloaderInitCloudFederationAPI', 'loadClassLoader'));
+
+ require __DIR__ . '/autoload_static.php';
+ call_user_func(\Composer\Autoload\ComposerStaticInitCloudFederationAPI::getInitializer($loader));
+
+ $loader->setClassMapAuthoritative(true);
+ $loader->register(true);
+
+ return $loader;
+ }
+}
diff --git a/apps/cloud_federation_api/composer/composer/autoload_static.php b/apps/cloud_federation_api/composer/composer/autoload_static.php
new file mode 100644
index 00000000000..849b755cd2f
--- /dev/null
+++ b/apps/cloud_federation_api/composer/composer/autoload_static.php
@@ -0,0 +1,45 @@
+<?php
+
+// autoload_static.php @generated by Composer
+
+namespace Composer\Autoload;
+
+class ComposerStaticInitCloudFederationAPI
+{
+ public static $prefixLengthsPsr4 = array (
+ 'O' =>
+ array (
+ 'OCA\\CloudFederationAPI\\' => 23,
+ ),
+ );
+
+ public static $prefixDirsPsr4 = array (
+ 'OCA\\CloudFederationAPI\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/../lib',
+ ),
+ );
+
+ public static $classMap = array (
+ 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
+ 'OCA\\CloudFederationAPI\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php',
+ 'OCA\\CloudFederationAPI\\Capabilities' => __DIR__ . '/..' . '/../lib/Capabilities.php',
+ 'OCA\\CloudFederationAPI\\Config' => __DIR__ . '/..' . '/../lib/Config.php',
+ 'OCA\\CloudFederationAPI\\Controller\\RequestHandlerController' => __DIR__ . '/..' . '/../lib/Controller/RequestHandlerController.php',
+ 'OCA\\CloudFederationAPI\\Db\\FederatedInvite' => __DIR__ . '/..' . '/../lib/Db/FederatedInvite.php',
+ 'OCA\\CloudFederationAPI\\Db\\FederatedInviteMapper' => __DIR__ . '/..' . '/../lib/Db/FederatedInviteMapper.php',
+ 'OCA\\CloudFederationAPI\\Events\\FederatedInviteAcceptedEvent' => __DIR__ . '/..' . '/../lib/Events/FederatedInviteAcceptedEvent.php',
+ 'OCA\\CloudFederationAPI\\Migration\\Version1016Date202502262004' => __DIR__ . '/..' . '/../lib/Migration/Version1016Date202502262004.php',
+ 'OCA\\CloudFederationAPI\\ResponseDefinitions' => __DIR__ . '/..' . '/../lib/ResponseDefinitions.php',
+ );
+
+ public static function getInitializer(ClassLoader $loader)
+ {
+ return \Closure::bind(function () use ($loader) {
+ $loader->prefixLengthsPsr4 = ComposerStaticInitCloudFederationAPI::$prefixLengthsPsr4;
+ $loader->prefixDirsPsr4 = ComposerStaticInitCloudFederationAPI::$prefixDirsPsr4;
+ $loader->classMap = ComposerStaticInitCloudFederationAPI::$classMap;
+
+ }, null, ClassLoader::class);
+ }
+}
diff --git a/apps/cloud_federation_api/composer/composer/installed.json b/apps/cloud_federation_api/composer/composer/installed.json
new file mode 100644
index 00000000000..f20a6c47c6d
--- /dev/null
+++ b/apps/cloud_federation_api/composer/composer/installed.json
@@ -0,0 +1,5 @@
+{
+ "packages": [],
+ "dev": false,
+ "dev-package-names": []
+}
diff --git a/apps/cloud_federation_api/composer/composer/installed.php b/apps/cloud_federation_api/composer/composer/installed.php
new file mode 100644
index 00000000000..1a66c7f2416
--- /dev/null
+++ b/apps/cloud_federation_api/composer/composer/installed.php
@@ -0,0 +1,23 @@
+<?php return array(
+ 'root' => array(
+ 'name' => '__root__',
+ 'pretty_version' => 'dev-master',
+ 'version' => 'dev-master',
+ 'reference' => 'b1797842784b250fb01ed5e3bf130705eb94751b',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../',
+ 'aliases' => array(),
+ 'dev' => false,
+ ),
+ 'versions' => array(
+ '__root__' => array(
+ 'pretty_version' => 'dev-master',
+ 'version' => 'dev-master',
+ 'reference' => 'b1797842784b250fb01ed5e3bf130705eb94751b',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../',
+ 'aliases' => array(),
+ 'dev_requirement' => false,
+ ),
+ ),
+);
diff --git a/apps/cloud_federation_api/l10n/.gitkeep b/apps/cloud_federation_api/l10n/.gitkeep
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/.gitkeep
diff --git a/apps/cloud_federation_api/l10n/ar.js b/apps/cloud_federation_api/l10n/ar.js
new file mode 100644
index 00000000000..45df0372089
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/ar.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "واجهة برمجة التطبيقات API للاتحاد السحابي Cloud Federation",
+ "Enable clouds to communicate with each other and exchange data" : "يسمح للسحابات أن تتراسل فيما بينها و تتبادل البيانات",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "واجهة برمجة التطبيقات API للاتحاد السحابي Cloud Federation تسمح لخوادم نكست كلاود بالاتصال ببعضها البعض و تبادل البيانات."
+},
+"nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;");
diff --git a/apps/cloud_federation_api/l10n/ar.json b/apps/cloud_federation_api/l10n/ar.json
new file mode 100644
index 00000000000..29aaedaca6d
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/ar.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "واجهة برمجة التطبيقات API للاتحاد السحابي Cloud Federation",
+ "Enable clouds to communicate with each other and exchange data" : "يسمح للسحابات أن تتراسل فيما بينها و تتبادل البيانات",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "واجهة برمجة التطبيقات API للاتحاد السحابي Cloud Federation تسمح لخوادم نكست كلاود بالاتصال ببعضها البعض و تبادل البيانات."
+},"pluralForm" :"nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/ast.js b/apps/cloud_federation_api/l10n/ast.js
new file mode 100644
index 00000000000..a8de145df5a
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/ast.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "API de la federación na nube",
+ "Enable clouds to communicate with each other and exchange data" : "Permite que les nubes se comuniquen ente elles ya intercambien datos",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "L'API de la federación na nube permite que delles instancies de Nextcloud se comuniquen ente elles ya intercambien datos."
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/cloud_federation_api/l10n/ast.json b/apps/cloud_federation_api/l10n/ast.json
new file mode 100644
index 00000000000..a5d8651f720
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/ast.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "API de la federación na nube",
+ "Enable clouds to communicate with each other and exchange data" : "Permite que les nubes se comuniquen ente elles ya intercambien datos",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "L'API de la federación na nube permite que delles instancies de Nextcloud se comuniquen ente elles ya intercambien datos."
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/bg.js b/apps/cloud_federation_api/l10n/bg.js
new file mode 100644
index 00000000000..0c431162e51
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/bg.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "API на Cloud Federation/федериране на облак/",
+ "Enable clouds to communicate with each other and exchange data" : "Активиране на облаците да комуникират помежду си и да обменят данни",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "API на Cloud Federation/федериране на облак/, позволява на различни екземпляри на Nextcloud да комуникират помежду си и да обменят данни. "
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/cloud_federation_api/l10n/bg.json b/apps/cloud_federation_api/l10n/bg.json
new file mode 100644
index 00000000000..57d73cd0ab2
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/bg.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "API на Cloud Federation/федериране на облак/",
+ "Enable clouds to communicate with each other and exchange data" : "Активиране на облаците да комуникират помежду си и да обменят данни",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "API на Cloud Federation/федериране на облак/, позволява на различни екземпляри на Nextcloud да комуникират помежду си и да обменят данни. "
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/ca.js b/apps/cloud_federation_api/l10n/ca.js
new file mode 100644
index 00000000000..80abccba99e
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/ca.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "API de federació de núvols",
+ "Enable clouds to communicate with each other and exchange data" : "Permeteu que els núvols es comuniquin entre si i intercanviïn dades",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "L'API de federació de núvols permet que diverses instàncies del Nextcloud es comuniquin entre si i intercanviïn dades."
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/cloud_federation_api/l10n/ca.json b/apps/cloud_federation_api/l10n/ca.json
new file mode 100644
index 00000000000..fae66aea62a
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/ca.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "API de federació de núvols",
+ "Enable clouds to communicate with each other and exchange data" : "Permeteu que els núvols es comuniquin entre si i intercanviïn dades",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "L'API de federació de núvols permet que diverses instàncies del Nextcloud es comuniquin entre si i intercanviïn dades."
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/cs.js b/apps/cloud_federation_api/l10n/cs.js
new file mode 100644
index 00000000000..f6176d5447d
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/cs.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "API pro federovaný cloud",
+ "Enable clouds to communicate with each other and exchange data" : "Umožňuje cloudům vzájemně komunikovat a vyměňovat si data",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "API pro federovaný cloud umožňuje různým instancím Nextcloud vzájemně komunikovat a vyměňovat si data."
+},
+"nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;");
diff --git a/apps/cloud_federation_api/l10n/cs.json b/apps/cloud_federation_api/l10n/cs.json
new file mode 100644
index 00000000000..f7a47c5f27f
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/cs.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "API pro federovaný cloud",
+ "Enable clouds to communicate with each other and exchange data" : "Umožňuje cloudům vzájemně komunikovat a vyměňovat si data",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "API pro federovaný cloud umožňuje různým instancím Nextcloud vzájemně komunikovat a vyměňovat si data."
+},"pluralForm" :"nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/da.js b/apps/cloud_federation_api/l10n/da.js
new file mode 100644
index 00000000000..a3a8d6a2303
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/da.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Cloud sammenkoblings API",
+ "Enable clouds to communicate with each other and exchange data" : "Gør det muligt for skyer at kommunikere med hinanden og udveksle data",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Cloud sammenkoblings API gør det muligt for forskellige Nextcloud-instanser at kommunikere med hinanden og udveksle data."
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/cloud_federation_api/l10n/da.json b/apps/cloud_federation_api/l10n/da.json
new file mode 100644
index 00000000000..fc26d6c54d6
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/da.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "Cloud sammenkoblings API",
+ "Enable clouds to communicate with each other and exchange data" : "Gør det muligt for skyer at kommunikere med hinanden og udveksle data",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Cloud sammenkoblings API gør det muligt for forskellige Nextcloud-instanser at kommunikere med hinanden og udveksle data."
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/de.js b/apps/cloud_federation_api/l10n/de.js
new file mode 100644
index 00000000000..62f81ba77ac
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/de.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Cloud Federation API",
+ "Enable clouds to communicate with each other and exchange data" : "Erlaubt es, dass Server miteinander kommunizieren und Daten austauschen",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Die Cloud Federation API ermöglicht es Nextcloud-Instanzen miteinander zu kommunizieren und Daten auszutauschen."
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/cloud_federation_api/l10n/de.json b/apps/cloud_federation_api/l10n/de.json
new file mode 100644
index 00000000000..08c4ad7ae0e
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/de.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "Cloud Federation API",
+ "Enable clouds to communicate with each other and exchange data" : "Erlaubt es, dass Server miteinander kommunizieren und Daten austauschen",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Die Cloud Federation API ermöglicht es Nextcloud-Instanzen miteinander zu kommunizieren und Daten auszutauschen."
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/de_DE.js b/apps/cloud_federation_api/l10n/de_DE.js
new file mode 100644
index 00000000000..7f0df974ac4
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/de_DE.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Cloud-Federation-API",
+ "Enable clouds to communicate with each other and exchange data" : "Erlaubt es, dass Server miteinander kommunizieren und Daten austauschen",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Die Cloud-Federation-API ermöglicht es Nextcloud-Instanzen miteinander zu kommunizieren und Daten auszutauschen."
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/cloud_federation_api/l10n/de_DE.json b/apps/cloud_federation_api/l10n/de_DE.json
new file mode 100644
index 00000000000..98d772c755a
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/de_DE.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "Cloud-Federation-API",
+ "Enable clouds to communicate with each other and exchange data" : "Erlaubt es, dass Server miteinander kommunizieren und Daten austauschen",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Die Cloud-Federation-API ermöglicht es Nextcloud-Instanzen miteinander zu kommunizieren und Daten auszutauschen."
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/el.js b/apps/cloud_federation_api/l10n/el.js
new file mode 100644
index 00000000000..6c8ef55fe34
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/el.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Cloud Federation API",
+ "Enable clouds to communicate with each other and exchange data" : "Ενεργοποιήστε τις εγκαταστάσεις clouds για επικοινωνία μεταξύ τους και ανταλλαγή δεδομένων",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Το Cloud Federation API επιτρέπει σε διάφορες εγκαταστάσεις Nextcloud να επικοινωνούν μεταξύ τους και να ανταλλάσσουν δεδομένα."
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/cloud_federation_api/l10n/el.json b/apps/cloud_federation_api/l10n/el.json
new file mode 100644
index 00000000000..a482e2ea2a0
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/el.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "Cloud Federation API",
+ "Enable clouds to communicate with each other and exchange data" : "Ενεργοποιήστε τις εγκαταστάσεις clouds για επικοινωνία μεταξύ τους και ανταλλαγή δεδομένων",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Το Cloud Federation API επιτρέπει σε διάφορες εγκαταστάσεις Nextcloud να επικοινωνούν μεταξύ τους και να ανταλλάσσουν δεδομένα."
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/en_GB.js b/apps/cloud_federation_api/l10n/en_GB.js
new file mode 100644
index 00000000000..9876aa4b953
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/en_GB.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Cloud Federation API",
+ "Enable clouds to communicate with each other and exchange data" : "Enable clouds to communicate with each other and exchange data",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data."
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/cloud_federation_api/l10n/en_GB.json b/apps/cloud_federation_api/l10n/en_GB.json
new file mode 100644
index 00000000000..85cb7986481
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/en_GB.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "Cloud Federation API",
+ "Enable clouds to communicate with each other and exchange data" : "Enable clouds to communicate with each other and exchange data",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data."
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/eo.js b/apps/cloud_federation_api/l10n/eo.js
new file mode 100644
index 00000000000..d01810bba74
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/eo.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "API de Nuba Federacio",
+ "Enable clouds to communicate with each other and exchange data" : "Ebligi interkomunikadon inter diversaj nuboj kaj la interŝanĝon de datumoj",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "La API de Nuba Federacio ebligas diversajn instancojn de Nextcloud interkomuniki kaj interŝanĝi datumojn inter si."
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/cloud_federation_api/l10n/eo.json b/apps/cloud_federation_api/l10n/eo.json
new file mode 100644
index 00000000000..17dd80538d8
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/eo.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "API de Nuba Federacio",
+ "Enable clouds to communicate with each other and exchange data" : "Ebligi interkomunikadon inter diversaj nuboj kaj la interŝanĝon de datumoj",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "La API de Nuba Federacio ebligas diversajn instancojn de Nextcloud interkomuniki kaj interŝanĝi datumojn inter si."
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/es.js b/apps/cloud_federation_api/l10n/es.js
new file mode 100644
index 00000000000..26b6df89cea
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/es.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Cloud Federation API",
+ "Enable clouds to communicate with each other and exchange data" : "Permitir que las nubes se comuniquen entre ellas e intercambien datos",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "La API Cloud Federation permite que varias instancias de Nextcloud se comuniquen entre ellas e intercambien datos."
+},
+"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/cloud_federation_api/l10n/es.json b/apps/cloud_federation_api/l10n/es.json
new file mode 100644
index 00000000000..8bf650e7c41
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/es.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "Cloud Federation API",
+ "Enable clouds to communicate with each other and exchange data" : "Permitir que las nubes se comuniquen entre ellas e intercambien datos",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "La API Cloud Federation permite que varias instancias de Nextcloud se comuniquen entre ellas e intercambien datos."
+},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/es_CL.js b/apps/cloud_federation_api/l10n/es_CL.js
new file mode 100644
index 00000000000..5f223cbf59c
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/es_CL.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "API de Federación en la Nube",
+ "Enable clouds to communicate with each other and exchange data" : "Permitir que las nubes se comuniquen entre sí e intercambien datos",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "La API de Federación de Nubes permite que varias instancias de Nextcloud se comuniquen entre sí y intercambien datos."
+},
+"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/cloud_federation_api/l10n/es_CL.json b/apps/cloud_federation_api/l10n/es_CL.json
new file mode 100644
index 00000000000..32f7e283911
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/es_CL.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "API de Federación en la Nube",
+ "Enable clouds to communicate with each other and exchange data" : "Permitir que las nubes se comuniquen entre sí e intercambien datos",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "La API de Federación de Nubes permite que varias instancias de Nextcloud se comuniquen entre sí y intercambien datos."
+},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/es_EC.js b/apps/cloud_federation_api/l10n/es_EC.js
new file mode 100644
index 00000000000..5f223cbf59c
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/es_EC.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "API de Federación en la Nube",
+ "Enable clouds to communicate with each other and exchange data" : "Permitir que las nubes se comuniquen entre sí e intercambien datos",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "La API de Federación de Nubes permite que varias instancias de Nextcloud se comuniquen entre sí y intercambien datos."
+},
+"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/cloud_federation_api/l10n/es_EC.json b/apps/cloud_federation_api/l10n/es_EC.json
new file mode 100644
index 00000000000..32f7e283911
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/es_EC.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "API de Federación en la Nube",
+ "Enable clouds to communicate with each other and exchange data" : "Permitir que las nubes se comuniquen entre sí e intercambien datos",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "La API de Federación de Nubes permite que varias instancias de Nextcloud se comuniquen entre sí y intercambien datos."
+},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/es_MX.js b/apps/cloud_federation_api/l10n/es_MX.js
new file mode 100644
index 00000000000..9022bd89dfb
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/es_MX.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "API de la federación en la nube",
+ "Enable clouds to communicate with each other and exchange data" : "Permitir que las nubes se comuniquen entre sí e intercambien datos",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "La API de la federación en la nube permite que varias instancias de Nextcloud se comuniquen entre sí e intercambien datos."
+},
+"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/cloud_federation_api/l10n/es_MX.json b/apps/cloud_federation_api/l10n/es_MX.json
new file mode 100644
index 00000000000..8726b94be1c
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/es_MX.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "API de la federación en la nube",
+ "Enable clouds to communicate with each other and exchange data" : "Permitir que las nubes se comuniquen entre sí e intercambien datos",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "La API de la federación en la nube permite que varias instancias de Nextcloud se comuniquen entre sí e intercambien datos."
+},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/et_EE.js b/apps/cloud_federation_api/l10n/et_EE.js
new file mode 100644
index 00000000000..67ae7128738
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/et_EE.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Pilve Liit API",
+ "Enable clouds to communicate with each other and exchange data" : "Luba pilvedel suhelda omavahel ja vahetada andmeid",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Pilve Liit API lubab erinevad Nextcloud'i osadel suhelda omavahel ja vahetada andmeid"
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/cloud_federation_api/l10n/et_EE.json b/apps/cloud_federation_api/l10n/et_EE.json
new file mode 100644
index 00000000000..5fbc024b957
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/et_EE.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "Pilve Liit API",
+ "Enable clouds to communicate with each other and exchange data" : "Luba pilvedel suhelda omavahel ja vahetada andmeid",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Pilve Liit API lubab erinevad Nextcloud'i osadel suhelda omavahel ja vahetada andmeid"
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/eu.js b/apps/cloud_federation_api/l10n/eu.js
new file mode 100644
index 00000000000..ea05a6a6c89
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/eu.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Cloud Federation APIa",
+ "Enable clouds to communicate with each other and exchange data" : "Aukera ematen du beste hodeiekin komunikatzeko eta datuak trukatzeko.",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Cloud Federation APIak aukera ematen du hainbat Nextcloud instantziaren artean komunikatzeko eta datuak trukatzeko. "
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/cloud_federation_api/l10n/eu.json b/apps/cloud_federation_api/l10n/eu.json
new file mode 100644
index 00000000000..2452339c097
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/eu.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "Cloud Federation APIa",
+ "Enable clouds to communicate with each other and exchange data" : "Aukera ematen du beste hodeiekin komunikatzeko eta datuak trukatzeko.",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Cloud Federation APIak aukera ematen du hainbat Nextcloud instantziaren artean komunikatzeko eta datuak trukatzeko. "
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/fa.js b/apps/cloud_federation_api/l10n/fa.js
new file mode 100644
index 00000000000..2ef5db15303
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/fa.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "API فدراسیون ابری",
+ "Enable clouds to communicate with each other and exchange data" : "ابرها را فعال کنید تا با یکدیگر ارتباط برقرار کنند و داده ها را مبادله کنند",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Cloud Federation API نمونه های مختلف Nextcloud را قادر می سازد تا با یکدیگر ارتباط برقرار کرده و داده ها را مبادله کنند."
+},
+"nplurals=2; plural=(n > 1);");
diff --git a/apps/cloud_federation_api/l10n/fa.json b/apps/cloud_federation_api/l10n/fa.json
new file mode 100644
index 00000000000..c34928e1d85
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/fa.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "API فدراسیون ابری",
+ "Enable clouds to communicate with each other and exchange data" : "ابرها را فعال کنید تا با یکدیگر ارتباط برقرار کنند و داده ها را مبادله کنند",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Cloud Federation API نمونه های مختلف Nextcloud را قادر می سازد تا با یکدیگر ارتباط برقرار کرده و داده ها را مبادله کنند."
+},"pluralForm" :"nplurals=2; plural=(n > 1);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/fi.js b/apps/cloud_federation_api/l10n/fi.js
new file mode 100644
index 00000000000..036c4c9a5a3
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/fi.js
@@ -0,0 +1,7 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Pilvifederaation rajapinta",
+ "Enable clouds to communicate with each other and exchange data" : "Mahdollistaa pilvien viestiä ja vaihtaa dataa toistensa kanssa"
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/cloud_federation_api/l10n/fi.json b/apps/cloud_federation_api/l10n/fi.json
new file mode 100644
index 00000000000..81dd7adc596
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/fi.json
@@ -0,0 +1,5 @@
+{ "translations": {
+ "Cloud Federation API" : "Pilvifederaation rajapinta",
+ "Enable clouds to communicate with each other and exchange data" : "Mahdollistaa pilvien viestiä ja vaihtaa dataa toistensa kanssa"
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/fr.js b/apps/cloud_federation_api/l10n/fr.js
new file mode 100644
index 00000000000..05421436df0
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/fr.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "API de fédération Cloud",
+ "Enable clouds to communicate with each other and exchange data" : "Permettre aux clouds de communiquer entre eux et d'échanger des données",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "L’API de fédération cloud permet à différentes instances de Nextcloud de communiquer entre elles et d’échanger des données."
+},
+"nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/cloud_federation_api/l10n/fr.json b/apps/cloud_federation_api/l10n/fr.json
new file mode 100644
index 00000000000..5a2a2a07617
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/fr.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "API de fédération Cloud",
+ "Enable clouds to communicate with each other and exchange data" : "Permettre aux clouds de communiquer entre eux et d'échanger des données",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "L’API de fédération cloud permet à différentes instances de Nextcloud de communiquer entre elles et d’échanger des données."
+},"pluralForm" :"nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/ga.js b/apps/cloud_federation_api/l10n/ga.js
new file mode 100644
index 00000000000..a6e46e561c9
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/ga.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Ligeann API Comhdhéanta na Scamaill",
+ "Enable clouds to communicate with each other and exchange data" : "Cumasaigh scamaill cumarsáid a dhéanamh lena chéile agus sonraí a mhalartú",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Cuireann API Cloud Federation ar chumas cásanna éagsúla Nextcloud cumarsáid a dhéanamh lena chéile agus sonraí a mhalartú."
+},
+"nplurals=5; plural=(n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n<11 ? 3 : 4);");
diff --git a/apps/cloud_federation_api/l10n/ga.json b/apps/cloud_federation_api/l10n/ga.json
new file mode 100644
index 00000000000..5c3d361aef4
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/ga.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "Ligeann API Comhdhéanta na Scamaill",
+ "Enable clouds to communicate with each other and exchange data" : "Cumasaigh scamaill cumarsáid a dhéanamh lena chéile agus sonraí a mhalartú",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Cuireann API Cloud Federation ar chumas cásanna éagsúla Nextcloud cumarsáid a dhéanamh lena chéile agus sonraí a mhalartú."
+},"pluralForm" :"nplurals=5; plural=(n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n<11 ? 3 : 4);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/gl.js b/apps/cloud_federation_api/l10n/gl.js
new file mode 100644
index 00000000000..06b753a1f0b
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/gl.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "API da Nube federada",
+ "Enable clouds to communicate with each other and exchange data" : "Permite que as nubes se comuniquen entre elas e intercambien datos",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "A API de Nube federada permite que varias instancias de Nextcloud se comuniquen entre elas e intercambien datos."
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/cloud_federation_api/l10n/gl.json b/apps/cloud_federation_api/l10n/gl.json
new file mode 100644
index 00000000000..17c51a3d7b2
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/gl.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "API da Nube federada",
+ "Enable clouds to communicate with each other and exchange data" : "Permite que as nubes se comuniquen entre elas e intercambien datos",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "A API de Nube federada permite que varias instancias de Nextcloud se comuniquen entre elas e intercambien datos."
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/hr.js b/apps/cloud_federation_api/l10n/hr.js
new file mode 100644
index 00000000000..c8b773abb8b
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/hr.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "API udruženog oblaka",
+ "Enable clouds to communicate with each other and exchange data" : "Omogućite međusobnu komunikaciju i razmjenu podataka među oblacima",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "API udruženog oblaka omogućuje raznim instancama Nextclouda da međusobno komuniciraju i razmjenjuju podatke."
+},
+"nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;");
diff --git a/apps/cloud_federation_api/l10n/hr.json b/apps/cloud_federation_api/l10n/hr.json
new file mode 100644
index 00000000000..d9bb04cf9be
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/hr.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "API udruženog oblaka",
+ "Enable clouds to communicate with each other and exchange data" : "Omogućite međusobnu komunikaciju i razmjenu podataka među oblacima",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "API udruženog oblaka omogućuje raznim instancama Nextclouda da međusobno komuniciraju i razmjenjuju podatke."
+},"pluralForm" :"nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/hu.js b/apps/cloud_federation_api/l10n/hu.js
new file mode 100644
index 00000000000..a0176bd8b3c
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/hu.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Felhő föderációs API",
+ "Enable clouds to communicate with each other and exchange data" : "A felhőszolgáltatások egymás közti kommunikációjának és adatcseréjének lehetővé tétele",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "A felhő föderációs API segítségével a különféle Nextcloud példányok képesek lesznek egymás között kommunikálni és adatokat cserélni."
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/cloud_federation_api/l10n/hu.json b/apps/cloud_federation_api/l10n/hu.json
new file mode 100644
index 00000000000..717ea7337ac
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/hu.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "Felhő föderációs API",
+ "Enable clouds to communicate with each other and exchange data" : "A felhőszolgáltatások egymás közti kommunikációjának és adatcseréjének lehetővé tétele",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "A felhő föderációs API segítségével a különféle Nextcloud példányok képesek lesznek egymás között kommunikálni és adatokat cserélni."
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/is.js b/apps/cloud_federation_api/l10n/is.js
new file mode 100644
index 00000000000..4667b774d88
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/is.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "API-forritsviðmót fyrir skýjasambandsveitur",
+ "Enable clouds to communicate with each other and exchange data" : "Gerir gagnaskýjum kleift að hafa samskipti við hvert annað og skiptast á gögnum",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "API-forritsviðmót fyrir skýjasambandsveitur (Cloud Federation API) gerir Nextcloud-gagnaskýjum kleift að hafa samskipti við hvert annað og skiptast á gögnum."
+},
+"nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);");
diff --git a/apps/cloud_federation_api/l10n/is.json b/apps/cloud_federation_api/l10n/is.json
new file mode 100644
index 00000000000..f0e4072ee4c
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/is.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "API-forritsviðmót fyrir skýjasambandsveitur",
+ "Enable clouds to communicate with each other and exchange data" : "Gerir gagnaskýjum kleift að hafa samskipti við hvert annað og skiptast á gögnum",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "API-forritsviðmót fyrir skýjasambandsveitur (Cloud Federation API) gerir Nextcloud-gagnaskýjum kleift að hafa samskipti við hvert annað og skiptast á gögnum."
+},"pluralForm" :"nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/it.js b/apps/cloud_federation_api/l10n/it.js
new file mode 100644
index 00000000000..a8db86e9ee9
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/it.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "API Federazione Cloud",
+ "Enable clouds to communicate with each other and exchange data" : "Consenti ai cloud di comunicare tra loro e di scambiare dati",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "L'API Federazione Cloud consente a varie istanze di Nextcloud di comunicare tra loro e scambiare dati."
+},
+"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/cloud_federation_api/l10n/it.json b/apps/cloud_federation_api/l10n/it.json
new file mode 100644
index 00000000000..f55b725d7ee
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/it.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "API Federazione Cloud",
+ "Enable clouds to communicate with each other and exchange data" : "Consenti ai cloud di comunicare tra loro e di scambiare dati",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "L'API Federazione Cloud consente a varie istanze di Nextcloud di comunicare tra loro e scambiare dati."
+},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/ja.js b/apps/cloud_federation_api/l10n/ja.js
new file mode 100644
index 00000000000..19a8d910c47
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/ja.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "クラウドフェデレーションAPI",
+ "Enable clouds to communicate with each other and exchange data" : "クラウドが相互に通信し、データを交換できるようにします",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Cloud Federation APIにより、さまざまなNextcloudインスタンスが相互に通信し、データを交換することができるようになります。"
+},
+"nplurals=1; plural=0;");
diff --git a/apps/cloud_federation_api/l10n/ja.json b/apps/cloud_federation_api/l10n/ja.json
new file mode 100644
index 00000000000..5d522b23fe3
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/ja.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "クラウドフェデレーションAPI",
+ "Enable clouds to communicate with each other and exchange data" : "クラウドが相互に通信し、データを交換できるようにします",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Cloud Federation APIにより、さまざまなNextcloudインスタンスが相互に通信し、データを交換することができるようになります。"
+},"pluralForm" :"nplurals=1; plural=0;"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/ko.js b/apps/cloud_federation_api/l10n/ko.js
new file mode 100644
index 00000000000..09af58b662e
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/ko.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Cloud Federation API",
+ "Enable clouds to communicate with each other and exchange data" : "클라우드 간 소통과 데이터 교환을 가능케 합니다.",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Cloud Federation API는 다양한 Nextcloud 인스턴스가 서로 소통하거나 데이터를 교환할 수 있도록 합니다."
+},
+"nplurals=1; plural=0;");
diff --git a/apps/cloud_federation_api/l10n/ko.json b/apps/cloud_federation_api/l10n/ko.json
new file mode 100644
index 00000000000..aa9e0642e29
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/ko.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "Cloud Federation API",
+ "Enable clouds to communicate with each other and exchange data" : "클라우드 간 소통과 데이터 교환을 가능케 합니다.",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Cloud Federation API는 다양한 Nextcloud 인스턴스가 서로 소통하거나 데이터를 교환할 수 있도록 합니다."
+},"pluralForm" :"nplurals=1; plural=0;"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/lt_LT.js b/apps/cloud_federation_api/l10n/lt_LT.js
new file mode 100644
index 00000000000..991f0c3335a
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/lt_LT.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Cloud Federation įskiepis",
+ "Enable clouds to communicate with each other and exchange data" : "Leisti debesų technologijoms jungtis ir keistis duomenimis tarpusavyje",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Cloud Federation įskiepis leidžia atskiriems Nextcloud serveriams jungtis ir keistis duomenimis tarpusavyje."
+},
+"nplurals=4; plural=(n % 10 == 1 && (n % 100 > 19 || n % 100 < 11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < 11) ? 1 : n % 1 != 0 ? 2: 3);");
diff --git a/apps/cloud_federation_api/l10n/lt_LT.json b/apps/cloud_federation_api/l10n/lt_LT.json
new file mode 100644
index 00000000000..37bbcccdc91
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/lt_LT.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "Cloud Federation įskiepis",
+ "Enable clouds to communicate with each other and exchange data" : "Leisti debesų technologijoms jungtis ir keistis duomenimis tarpusavyje",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Cloud Federation įskiepis leidžia atskiriems Nextcloud serveriams jungtis ir keistis duomenimis tarpusavyje."
+},"pluralForm" :"nplurals=4; plural=(n % 10 == 1 && (n % 100 > 19 || n % 100 < 11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < 11) ? 1 : n % 1 != 0 ? 2: 3);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/mk.js b/apps/cloud_federation_api/l10n/mk.js
new file mode 100644
index 00000000000..41c254d46f9
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/mk.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Федерален Cloud API",
+ "Enable clouds to communicate with each other and exchange data" : "Овозможете на Cloud-от да комуницира со сите други и да разменува податоци",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Федерален Cloud API овозможува различни истанци да комуницираат помеѓу себе и да разменуваат податоци."
+},
+"nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;");
diff --git a/apps/cloud_federation_api/l10n/mk.json b/apps/cloud_federation_api/l10n/mk.json
new file mode 100644
index 00000000000..60560263a3c
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/mk.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "Федерален Cloud API",
+ "Enable clouds to communicate with each other and exchange data" : "Овозможете на Cloud-от да комуницира со сите други и да разменува податоци",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Федерален Cloud API овозможува различни истанци да комуницираат помеѓу себе и да разменуваат податоци."
+},"pluralForm" :"nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/my.js b/apps/cloud_federation_api/l10n/my.js
new file mode 100644
index 00000000000..e07f0f71a4e
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/my.js
@@ -0,0 +1,7 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Cloud ဖွဲ့စည်းမှု API ",
+ "Enable clouds to communicate with each other and exchange data" : "Cloud များကို တစ်ခုခုနှင့်တစ်ခု ဆက်သွယ်ခြင်း၊ သတင်းအချက်အလက်ဖလှယ်ခြင်းကို ပြုလုပ်နိုင်ရန် ဖွင့်ပေးပါ။"
+},
+"nplurals=1; plural=0;");
diff --git a/apps/cloud_federation_api/l10n/my.json b/apps/cloud_federation_api/l10n/my.json
new file mode 100644
index 00000000000..8c1425e659f
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/my.json
@@ -0,0 +1,5 @@
+{ "translations": {
+ "Cloud Federation API" : "Cloud ဖွဲ့စည်းမှု API ",
+ "Enable clouds to communicate with each other and exchange data" : "Cloud များကို တစ်ခုခုနှင့်တစ်ခု ဆက်သွယ်ခြင်း၊ သတင်းအချက်အလက်ဖလှယ်ခြင်းကို ပြုလုပ်နိုင်ရန် ဖွင့်ပေးပါ။"
+},"pluralForm" :"nplurals=1; plural=0;"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/nb.js b/apps/cloud_federation_api/l10n/nb.js
new file mode 100644
index 00000000000..4757827f1d1
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/nb.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Cloud Federation API",
+ "Enable clouds to communicate with each other and exchange data" : "Lar nettskyer kommunisere med hverandre og utveksle data.",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Cloud Federation APIet lar flere instanser av Nextcloud kommunisere med hverandre og utveksle data."
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/cloud_federation_api/l10n/nb.json b/apps/cloud_federation_api/l10n/nb.json
new file mode 100644
index 00000000000..03c593cb888
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/nb.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "Cloud Federation API",
+ "Enable clouds to communicate with each other and exchange data" : "Lar nettskyer kommunisere med hverandre og utveksle data.",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Cloud Federation APIet lar flere instanser av Nextcloud kommunisere med hverandre og utveksle data."
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/nl.js b/apps/cloud_federation_api/l10n/nl.js
new file mode 100644
index 00000000000..fac75360059
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/nl.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Cloud Federation API",
+ "Enable clouds to communicate with each other and exchange data" : "Laat clouds met elkaar communiceren en gegevens uitwisselen",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "De Cloud Federation API stelt verschillende Nextcloud-servers in staat met elkaar te communiceren en gegevens uit te wisselen."
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/cloud_federation_api/l10n/nl.json b/apps/cloud_federation_api/l10n/nl.json
new file mode 100644
index 00000000000..8eb66877614
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/nl.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "Cloud Federation API",
+ "Enable clouds to communicate with each other and exchange data" : "Laat clouds met elkaar communiceren en gegevens uitwisselen",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "De Cloud Federation API stelt verschillende Nextcloud-servers in staat met elkaar te communiceren en gegevens uit te wisselen."
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/pl.js b/apps/cloud_federation_api/l10n/pl.js
new file mode 100644
index 00000000000..a6b74945afe
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/pl.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "API Chmury Federacyjnej",
+ "Enable clouds to communicate with each other and exchange data" : "Umożliwia chmurom komunikację między sobą i wymianę danych",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "API Chmury Federacyjnej umożliwia różnym instancjom Nextcloud komunikowanie się ze sobą i wymianę danych."
+},
+"nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);");
diff --git a/apps/cloud_federation_api/l10n/pl.json b/apps/cloud_federation_api/l10n/pl.json
new file mode 100644
index 00000000000..842d502e8e8
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/pl.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "API Chmury Federacyjnej",
+ "Enable clouds to communicate with each other and exchange data" : "Umożliwia chmurom komunikację między sobą i wymianę danych",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "API Chmury Federacyjnej umożliwia różnym instancjom Nextcloud komunikowanie się ze sobą i wymianę danych."
+},"pluralForm" :"nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/pt_BR.js b/apps/cloud_federation_api/l10n/pt_BR.js
new file mode 100644
index 00000000000..210c2d16cbd
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/pt_BR.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "API de Nuvem Federada",
+ "Enable clouds to communicate with each other and exchange data" : "Permitir que as nuvens se comuniquem entre si e troquem dados",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "A API de Nuvem Federada permite que várias instâncias do Nextcloud se comuniquem entre si e troquem dados."
+},
+"nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/cloud_federation_api/l10n/pt_BR.json b/apps/cloud_federation_api/l10n/pt_BR.json
new file mode 100644
index 00000000000..56091c2b9d6
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/pt_BR.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "API de Nuvem Federada",
+ "Enable clouds to communicate with each other and exchange data" : "Permitir que as nuvens se comuniquem entre si e troquem dados",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "A API de Nuvem Federada permite que várias instâncias do Nextcloud se comuniquem entre si e troquem dados."
+},"pluralForm" :"nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/pt_PT.js b/apps/cloud_federation_api/l10n/pt_PT.js
new file mode 100644
index 00000000000..db0fadb64f8
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/pt_PT.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "API de Federação Cloud",
+ "Enable clouds to communicate with each other and exchange data" : "Enable clouds to communicate with each other and exchange data",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data."
+},
+"nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
diff --git a/apps/cloud_federation_api/l10n/pt_PT.json b/apps/cloud_federation_api/l10n/pt_PT.json
new file mode 100644
index 00000000000..78fdf12910a
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/pt_PT.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "API de Federação Cloud",
+ "Enable clouds to communicate with each other and exchange data" : "Enable clouds to communicate with each other and exchange data",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data."
+},"pluralForm" :"nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/ro.js b/apps/cloud_federation_api/l10n/ro.js
new file mode 100644
index 00000000000..c880232b710
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/ro.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "API-ul Cloud Federation",
+ "Enable clouds to communicate with each other and exchange data" : "Permiteți serviciilor de cloud să comunice între ele și să facă schimb de date",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "API-ul Cloud Federation permite diferitelor instanțe Nextcloud să comunice între ele și să facă schimb de date."
+},
+"nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));");
diff --git a/apps/cloud_federation_api/l10n/ro.json b/apps/cloud_federation_api/l10n/ro.json
new file mode 100644
index 00000000000..0d544d29dab
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/ro.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "API-ul Cloud Federation",
+ "Enable clouds to communicate with each other and exchange data" : "Permiteți serviciilor de cloud să comunice între ele și să facă schimb de date",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "API-ul Cloud Federation permite diferitelor instanțe Nextcloud să comunice între ele și să facă schimb de date."
+},"pluralForm" :"nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/ru.js b/apps/cloud_federation_api/l10n/ru.js
new file mode 100644
index 00000000000..c615fc0384e
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/ru.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "API облачной федерации",
+ "Enable clouds to communicate with each other and exchange data" : "Позволяют облакам связываться друг с другом и обмениваться данными",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "API облачной федерации позволяет разным экземплярам Nextcloud связываться друг с другом и обмениваться данными."
+},
+"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);");
diff --git a/apps/cloud_federation_api/l10n/ru.json b/apps/cloud_federation_api/l10n/ru.json
new file mode 100644
index 00000000000..c09724aa6f0
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/ru.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "API облачной федерации",
+ "Enable clouds to communicate with each other and exchange data" : "Позволяют облакам связываться друг с другом и обмениваться данными",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "API облачной федерации позволяет разным экземплярам Nextcloud связываться друг с другом и обмениваться данными."
+},"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/sc.js b/apps/cloud_federation_api/l10n/sc.js
new file mode 100644
index 00000000000..f17f0a7c9f9
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/sc.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Federatzione Cloud API",
+ "Enable clouds to communicate with each other and exchange data" : "Permite a is nues informàticas de comunicare a pares e iscambiare datos",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Sa Federatzione Cloud API permitit a vàrias istàntzias de Nextocloud de comunicare a pares e iscambiare datos."
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/cloud_federation_api/l10n/sc.json b/apps/cloud_federation_api/l10n/sc.json
new file mode 100644
index 00000000000..240b1843991
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/sc.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "Federatzione Cloud API",
+ "Enable clouds to communicate with each other and exchange data" : "Permite a is nues informàticas de comunicare a pares e iscambiare datos",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Sa Federatzione Cloud API permitit a vàrias istàntzias de Nextocloud de comunicare a pares e iscambiare datos."
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/sk.js b/apps/cloud_federation_api/l10n/sk.js
new file mode 100644
index 00000000000..29fd7ca1ee3
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/sk.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "API združovania cloudu",
+ "Enable clouds to communicate with each other and exchange data" : "Umožňuje cloudom navzájom komunikovať a vymieňať si údaje",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "API združovania cloudov umožňuje rôznym inštanciám NextCloudu navzájom komunikovať a vymieňať si údaje."
+},
+"nplurals=4; plural=(n % 1 == 0 && n == 1 ? 0 : n % 1 == 0 && n >= 2 && n <= 4 ? 1 : n % 1 != 0 ? 2: 3);");
diff --git a/apps/cloud_federation_api/l10n/sk.json b/apps/cloud_federation_api/l10n/sk.json
new file mode 100644
index 00000000000..bc57052793c
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/sk.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "API združovania cloudu",
+ "Enable clouds to communicate with each other and exchange data" : "Umožňuje cloudom navzájom komunikovať a vymieňať si údaje",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "API združovania cloudov umožňuje rôznym inštanciám NextCloudu navzájom komunikovať a vymieňať si údaje."
+},"pluralForm" :"nplurals=4; plural=(n % 1 == 0 && n == 1 ? 0 : n % 1 == 0 && n >= 2 && n <= 4 ? 1 : n % 1 != 0 ? 2: 3);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/sl.js b/apps/cloud_federation_api/l10n/sl.js
new file mode 100644
index 00000000000..0ea7cb49e20
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/sl.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Vmesnik API zveznega oblaka",
+ "Enable clouds to communicate with each other and exchange data" : "Omogoči povezovanje različnih oblakov in varno izmenjavo podatkov",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Vmesnik API zveznega oblaka omogoča povezovanje različnih okolij Nextcloud na različnih strežnikih za varno izmenjavo podatkov."
+},
+"nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);");
diff --git a/apps/cloud_federation_api/l10n/sl.json b/apps/cloud_federation_api/l10n/sl.json
new file mode 100644
index 00000000000..ea979e89b9e
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/sl.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "Vmesnik API zveznega oblaka",
+ "Enable clouds to communicate with each other and exchange data" : "Omogoči povezovanje različnih oblakov in varno izmenjavo podatkov",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Vmesnik API zveznega oblaka omogoča povezovanje različnih okolij Nextcloud na različnih strežnikih za varno izmenjavo podatkov."
+},"pluralForm" :"nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/sr.js b/apps/cloud_federation_api/l10n/sr.js
new file mode 100644
index 00000000000..fcf925bfd86
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/sr.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Cloud Federation API",
+ "Enable clouds to communicate with each other and exchange data" : "Омогућава различитим облацима да причају међусобно и да размењују податке",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "The Cloud Federation API омогућава различитим Некстклауд инстанцама да причају међусобно и да размењују податке између себе."
+},
+"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);");
diff --git a/apps/cloud_federation_api/l10n/sr.json b/apps/cloud_federation_api/l10n/sr.json
new file mode 100644
index 00000000000..fe4fb391131
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/sr.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "Cloud Federation API",
+ "Enable clouds to communicate with each other and exchange data" : "Омогућава различитим облацима да причају међусобно и да размењују податке",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "The Cloud Federation API омогућава различитим Некстклауд инстанцама да причају међусобно и да размењују податке између себе."
+},"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/sv.js b/apps/cloud_federation_api/l10n/sv.js
new file mode 100644
index 00000000000..e0bef8449b6
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/sv.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Moln-federations API",
+ "Enable clouds to communicate with each other and exchange data" : "Tillåter olika moln att kommunicera med varandra samt utbyta data",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Moln-federations API:et tillåter olika Nextcloud-instanser att kommunicera med varandra samt utbyta data."
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/cloud_federation_api/l10n/sv.json b/apps/cloud_federation_api/l10n/sv.json
new file mode 100644
index 00000000000..c2e408362f4
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/sv.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "Moln-federations API",
+ "Enable clouds to communicate with each other and exchange data" : "Tillåter olika moln att kommunicera med varandra samt utbyta data",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Moln-federations API:et tillåter olika Nextcloud-instanser att kommunicera med varandra samt utbyta data."
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/sw.js b/apps/cloud_federation_api/l10n/sw.js
new file mode 100644
index 00000000000..c58c7d2b6f8
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/sw.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "API ya Shirikisho la Cloud",
+ "Enable clouds to communicate with each other and exchange data" : "Washa clouds kuwasiliana na kubadilishana data",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "API ya Shirikisho la Cloud huwezesha matukio mbalimbali ya Nextcloud kuwasiliana na kubadilishana data."
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/cloud_federation_api/l10n/sw.json b/apps/cloud_federation_api/l10n/sw.json
new file mode 100644
index 00000000000..622453561cb
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/sw.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "API ya Shirikisho la Cloud",
+ "Enable clouds to communicate with each other and exchange data" : "Washa clouds kuwasiliana na kubadilishana data",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "API ya Shirikisho la Cloud huwezesha matukio mbalimbali ya Nextcloud kuwasiliana na kubadilishana data."
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/tr.js b/apps/cloud_federation_api/l10n/tr.js
new file mode 100644
index 00000000000..1ab230f68e1
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/tr.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Birleşik Bulut API",
+ "Enable clouds to communicate with each other and exchange data" : "Karşılıklı iletişim kurmak için bulut hizmetlerini kullanın",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Birleşik Bulut API, farklı Nextcloud kopyalarının birbiri ile iletişim kurarak karşılıklı veri aktarmasını sağlar."
+},
+"nplurals=2; plural=(n > 1);");
diff --git a/apps/cloud_federation_api/l10n/tr.json b/apps/cloud_federation_api/l10n/tr.json
new file mode 100644
index 00000000000..17d28152fc6
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/tr.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "Birleşik Bulut API",
+ "Enable clouds to communicate with each other and exchange data" : "Karşılıklı iletişim kurmak için bulut hizmetlerini kullanın",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Birleşik Bulut API, farklı Nextcloud kopyalarının birbiri ile iletişim kurarak karşılıklı veri aktarmasını sağlar."
+},"pluralForm" :"nplurals=2; plural=(n > 1);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/ug.js b/apps/cloud_federation_api/l10n/ug.js
new file mode 100644
index 00000000000..7428c9eb203
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/ug.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "بۇلۇت فېدېراتسىيەسى API",
+ "Enable clouds to communicate with each other and exchange data" : "بۇلۇتلارنىڭ ئۆز-ئارا ئالاقە قىلىشى ۋە سانلىق مەلۇمات ئالماشتۇرۇشىنى قوزغىتىڭ",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "بۇلۇت فېدېراتسىيەسى API ھەر خىل Nextcloud مىساللىرىنى ئۆز-ئارا ئالاقە قىلىش ۋە سانلىق مەلۇمات ئالماشتۇرۇش ئىمكانىيىتىگە ئىگە قىلىدۇ."
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/cloud_federation_api/l10n/ug.json b/apps/cloud_federation_api/l10n/ug.json
new file mode 100644
index 00000000000..d7c588468fa
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/ug.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "بۇلۇت فېدېراتسىيەسى API",
+ "Enable clouds to communicate with each other and exchange data" : "بۇلۇتلارنىڭ ئۆز-ئارا ئالاقە قىلىشى ۋە سانلىق مەلۇمات ئالماشتۇرۇشىنى قوزغىتىڭ",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "بۇلۇت فېدېراتسىيەسى API ھەر خىل Nextcloud مىساللىرىنى ئۆز-ئارا ئالاقە قىلىش ۋە سانلىق مەلۇمات ئالماشتۇرۇش ئىمكانىيىتىگە ئىگە قىلىدۇ."
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/uk.js b/apps/cloud_federation_api/l10n/uk.js
new file mode 100644
index 00000000000..83a05116dca
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/uk.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Cloud Federation API",
+ "Enable clouds to communicate with each other and exchange data" : "Увімкніть хмари аби спілкуватися один з одним і обмінюватися даними",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Cloud Federation API дозволяє різним примірникам серверу хмари Nextcloud спілкуватися між собою та обмінюватися даними."
+},
+"nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);");
diff --git a/apps/cloud_federation_api/l10n/uk.json b/apps/cloud_federation_api/l10n/uk.json
new file mode 100644
index 00000000000..fdea9b33c38
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/uk.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "Cloud Federation API",
+ "Enable clouds to communicate with each other and exchange data" : "Увімкніть хмари аби спілкуватися один з одним і обмінюватися даними",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Cloud Federation API дозволяє різним примірникам серверу хмари Nextcloud спілкуватися між собою та обмінюватися даними."
+},"pluralForm" :"nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/uz.js b/apps/cloud_federation_api/l10n/uz.js
new file mode 100644
index 00000000000..cec1c75f757
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/uz.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Asl faylni o'chirishda kutilmagan xatolik yuz berdi.",
+ "Enable clouds to communicate with each other and exchange data" : "Bulutlar bir-biri bilan aloqa qilish va ma'lumot almashish imkonini beradi",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Cloud Federation API turli xil Nextcloud misollariga bir-biri bilan muloqot qilish va ma'lumotlarni almashish imkonini beradi."
+},
+"nplurals=1; plural=0;");
diff --git a/apps/cloud_federation_api/l10n/uz.json b/apps/cloud_federation_api/l10n/uz.json
new file mode 100644
index 00000000000..fdab2842db9
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/uz.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "Asl faylni o'chirishda kutilmagan xatolik yuz berdi.",
+ "Enable clouds to communicate with each other and exchange data" : "Bulutlar bir-biri bilan aloqa qilish va ma'lumot almashish imkonini beradi",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "Cloud Federation API turli xil Nextcloud misollariga bir-biri bilan muloqot qilish va ma'lumotlarni almashish imkonini beradi."
+},"pluralForm" :"nplurals=1; plural=0;"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/vi.js b/apps/cloud_federation_api/l10n/vi.js
new file mode 100644
index 00000000000..50b76cf0e0e
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/vi.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "Cloud Federation API",
+ "Enable clouds to communicate with each other and exchange data" : "Cho phép các đám mây giao tiếp với nhau và trao đổi dữ liệu",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "API Cloud Federation cho phép các phiên bản Nextcloud khác nhau giao tiếp với nhau và trao đổi dữ liệu."
+},
+"nplurals=1; plural=0;");
diff --git a/apps/cloud_federation_api/l10n/vi.json b/apps/cloud_federation_api/l10n/vi.json
new file mode 100644
index 00000000000..c7244873d68
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/vi.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "Cloud Federation API",
+ "Enable clouds to communicate with each other and exchange data" : "Cho phép các đám mây giao tiếp với nhau và trao đổi dữ liệu",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "API Cloud Federation cho phép các phiên bản Nextcloud khác nhau giao tiếp với nhau và trao đổi dữ liệu."
+},"pluralForm" :"nplurals=1; plural=0;"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/zh_CN.js b/apps/cloud_federation_api/l10n/zh_CN.js
new file mode 100644
index 00000000000..90684ddca9d
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/zh_CN.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "联合云API",
+ "Enable clouds to communicate with each other and exchange data" : "使云能够相互通信并交换数据",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "联合云API使各种 Nextcloud 实例可以相互通信并交换数据。"
+},
+"nplurals=1; plural=0;");
diff --git a/apps/cloud_federation_api/l10n/zh_CN.json b/apps/cloud_federation_api/l10n/zh_CN.json
new file mode 100644
index 00000000000..491d0494c0e
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/zh_CN.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "联合云API",
+ "Enable clouds to communicate with each other and exchange data" : "使云能够相互通信并交换数据",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "联合云API使各种 Nextcloud 实例可以相互通信并交换数据。"
+},"pluralForm" :"nplurals=1; plural=0;"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/zh_HK.js b/apps/cloud_federation_api/l10n/zh_HK.js
new file mode 100644
index 00000000000..99b56dc3587
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/zh_HK.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "雲端聯盟 API",
+ "Enable clouds to communicate with each other and exchange data" : "讓雲端可互相通訊並交換資料",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "雲端聯盟 API 讓多個 Nextcloud 站台可以互相通訊並交換資料。"
+},
+"nplurals=1; plural=0;");
diff --git a/apps/cloud_federation_api/l10n/zh_HK.json b/apps/cloud_federation_api/l10n/zh_HK.json
new file mode 100644
index 00000000000..5850a7f8f91
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/zh_HK.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "雲端聯盟 API",
+ "Enable clouds to communicate with each other and exchange data" : "讓雲端可互相通訊並交換資料",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "雲端聯盟 API 讓多個 Nextcloud 站台可以互相通訊並交換資料。"
+},"pluralForm" :"nplurals=1; plural=0;"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/l10n/zh_TW.js b/apps/cloud_federation_api/l10n/zh_TW.js
new file mode 100644
index 00000000000..8f997c9aff0
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/zh_TW.js
@@ -0,0 +1,8 @@
+OC.L10N.register(
+ "cloud_federation_api",
+ {
+ "Cloud Federation API" : "雲端聯邦 API",
+ "Enable clouds to communicate with each other and exchange data" : "讓雲端可互相通訊並交換資料",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "雲端聯邦 API 能讓多個 Nextcloud 實體之間,可以互相通訊並交換資料。"
+},
+"nplurals=1; plural=0;");
diff --git a/apps/cloud_federation_api/l10n/zh_TW.json b/apps/cloud_federation_api/l10n/zh_TW.json
new file mode 100644
index 00000000000..785e7515484
--- /dev/null
+++ b/apps/cloud_federation_api/l10n/zh_TW.json
@@ -0,0 +1,6 @@
+{ "translations": {
+ "Cloud Federation API" : "雲端聯邦 API",
+ "Enable clouds to communicate with each other and exchange data" : "讓雲端可互相通訊並交換資料",
+ "The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "雲端聯邦 API 能讓多個 Nextcloud 實體之間,可以互相通訊並交換資料。"
+},"pluralForm" :"nplurals=1; plural=0;"
+} \ No newline at end of file
diff --git a/apps/cloud_federation_api/lib/AppInfo/Application.php b/apps/cloud_federation_api/lib/AppInfo/Application.php
new file mode 100644
index 00000000000..e34b2f2dc3d
--- /dev/null
+++ b/apps/cloud_federation_api/lib/AppInfo/Application.php
@@ -0,0 +1,30 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+namespace OCA\CloudFederationAPI\AppInfo;
+
+use OCA\CloudFederationAPI\Capabilities;
+use OCP\AppFramework\App;
+use OCP\AppFramework\Bootstrap\IBootContext;
+use OCP\AppFramework\Bootstrap\IBootstrap;
+use OCP\AppFramework\Bootstrap\IRegistrationContext;
+
+class Application extends App implements IBootstrap {
+ public const APP_ID = 'cloud_federation_api';
+
+ public function __construct() {
+ parent::__construct(self::APP_ID);
+ }
+
+ public function register(IRegistrationContext $context): void {
+ $context->registerCapability(Capabilities::class);
+ }
+
+ public function boot(IBootContext $context): void {
+ }
+}
diff --git a/apps/cloud_federation_api/lib/Capabilities.php b/apps/cloud_federation_api/lib/Capabilities.php
new file mode 100644
index 00000000000..599733123b3
--- /dev/null
+++ b/apps/cloud_federation_api/lib/Capabilities.php
@@ -0,0 +1,78 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+namespace OCA\CloudFederationAPI;
+
+use NCU\Security\Signature\Exceptions\IdentityNotFoundException;
+use NCU\Security\Signature\Exceptions\SignatoryException;
+use OC\OCM\OCMSignatoryManager;
+use OCP\Capabilities\ICapability;
+use OCP\Capabilities\IInitialStateExcludedCapability;
+use OCP\IAppConfig;
+use OCP\IURLGenerator;
+use OCP\OCM\Exceptions\OCMArgumentException;
+use OCP\OCM\ICapabilityAwareOCMProvider;
+use Psr\Log\LoggerInterface;
+
+class Capabilities implements ICapability, IInitialStateExcludedCapability {
+ public const API_VERSION = '1.1.0';
+
+ public function __construct(
+ private IURLGenerator $urlGenerator,
+ private IAppConfig $appConfig,
+ private ICapabilityAwareOCMProvider $provider,
+ private readonly OCMSignatoryManager $ocmSignatoryManager,
+ private readonly LoggerInterface $logger,
+ ) {
+ }
+
+ /**
+ * Function an app uses to return the capabilities
+ *
+ * @return array<string, array<string, mixed>>
+ * @throws OCMArgumentException
+ */
+ public function getCapabilities() {
+ $url = $this->urlGenerator->linkToRouteAbsolute('cloud_federation_api.requesthandlercontroller.addShare');
+ $pos = strrpos($url, '/');
+ if ($pos === false) {
+ throw new OCMArgumentException('generated route should contain a slash character');
+ }
+
+ $this->provider->setEnabled(true);
+ $this->provider->setApiVersion(self::API_VERSION);
+ $this->provider->setCapabilities(['/invite-accepted', '/notifications', '/shares']);
+
+ $this->provider->setEndPoint(substr($url, 0, $pos));
+
+ $resource = $this->provider->createNewResourceType();
+ $resource->setName('file')
+ ->setShareTypes(['user', 'group'])
+ ->setProtocols(['webdav' => '/public.php/webdav/']);
+
+ $this->provider->addResourceType($resource);
+
+ // Adding a public key to the ocm discovery
+ try {
+ if (!$this->appConfig->getValueBool('core', OCMSignatoryManager::APPCONFIG_SIGN_DISABLED, lazy: true)) {
+ /**
+ * @experimental 31.0.0
+ * @psalm-suppress UndefinedInterfaceMethod
+ */
+ $this->provider->setSignatory($this->ocmSignatoryManager->getLocalSignatory());
+ } else {
+ $this->logger->debug('ocm public key feature disabled');
+ }
+ } catch (SignatoryException|IdentityNotFoundException $e) {
+ $this->logger->warning('cannot generate local signatory', ['exception' => $e]);
+ }
+
+ return ['ocm' => $this->provider->jsonSerialize()];
+ }
+}
diff --git a/apps/cloud_federation_api/lib/Config.php b/apps/cloud_federation_api/lib/Config.php
new file mode 100644
index 00000000000..23788c26dc9
--- /dev/null
+++ b/apps/cloud_federation_api/lib/Config.php
@@ -0,0 +1,42 @@
+<?php
+
+/**
+ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+namespace OCA\CloudFederationAPI;
+
+use OCP\Federation\ICloudFederationProviderManager;
+use Psr\Log\LoggerInterface;
+
+/**
+ * Class config
+ *
+ * handles all the config parameters
+ *
+ * @package OCA\CloudFederationAPI
+ */
+class Config {
+
+ public function __construct(
+ private ICloudFederationProviderManager $cloudFederationProviderManager,
+ private LoggerInterface $logger,
+ ) {
+ }
+
+ /**
+ * get a list of supported share types
+ *
+ * @param string $resourceType
+ * @return array
+ */
+ public function getSupportedShareTypes($resourceType) {
+ try {
+ $provider = $this->cloudFederationProviderManager->getCloudFederationProvider($resourceType);
+ return $provider->getSupportedShareTypes();
+ } catch (\Exception $e) {
+ $this->logger->error('Failed to create federation provider', ['exception' => $e]);
+ return [];
+ }
+ }
+}
diff --git a/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php b/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php
new file mode 100644
index 00000000000..a76b1884a0b
--- /dev/null
+++ b/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php
@@ -0,0 +1,574 @@
+<?php
+
+/**
+ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+namespace OCA\CloudFederationAPI\Controller;
+
+use NCU\Federation\ISignedCloudFederationProvider;
+use NCU\Security\Signature\Exceptions\IdentityNotFoundException;
+use NCU\Security\Signature\Exceptions\IncomingRequestException;
+use NCU\Security\Signature\Exceptions\SignatoryNotFoundException;
+use NCU\Security\Signature\Exceptions\SignatureException;
+use NCU\Security\Signature\Exceptions\SignatureNotFoundException;
+use NCU\Security\Signature\IIncomingSignedRequest;
+use NCU\Security\Signature\ISignatureManager;
+use OC\OCM\OCMSignatoryManager;
+use OCA\CloudFederationAPI\Config;
+use OCA\CloudFederationAPI\Db\FederatedInviteMapper;
+use OCA\CloudFederationAPI\Events\FederatedInviteAcceptedEvent;
+use OCA\CloudFederationAPI\ResponseDefinitions;
+use OCA\FederatedFileSharing\AddressHandler;
+use OCP\AppFramework\Controller;
+use OCP\AppFramework\Db\DoesNotExistException;
+use OCP\AppFramework\Http;
+use OCP\AppFramework\Http\Attribute\BruteForceProtection;
+use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
+use OCP\AppFramework\Http\Attribute\OpenAPI;
+use OCP\AppFramework\Http\Attribute\PublicPage;
+use OCP\AppFramework\Http\JSONResponse;
+use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\EventDispatcher\IEventDispatcher;
+use OCP\Federation\Exceptions\ActionNotSupportedException;
+use OCP\Federation\Exceptions\AuthenticationFailedException;
+use OCP\Federation\Exceptions\BadRequestException;
+use OCP\Federation\Exceptions\ProviderCouldNotAddShareException;
+use OCP\Federation\Exceptions\ProviderDoesNotExistsException;
+use OCP\Federation\ICloudFederationFactory;
+use OCP\Federation\ICloudFederationProviderManager;
+use OCP\Federation\ICloudIdManager;
+use OCP\IAppConfig;
+use OCP\IGroupManager;
+use OCP\IRequest;
+use OCP\IURLGenerator;
+use OCP\IUserManager;
+use OCP\Share\Exceptions\ShareNotFound;
+use OCP\Util;
+use Psr\Log\LoggerInterface;
+
+/**
+ * Open-Cloud-Mesh-API
+ *
+ * @package OCA\CloudFederationAPI\Controller
+ *
+ * @psalm-import-type CloudFederationAPIAddShare from ResponseDefinitions
+ * @psalm-import-type CloudFederationAPIValidationError from ResponseDefinitions
+ * @psalm-import-type CloudFederationAPIError from ResponseDefinitions
+ */
+#[OpenAPI(scope: OpenAPI::SCOPE_FEDERATION)]
+class RequestHandlerController extends Controller {
+ public function __construct(
+ string $appName,
+ IRequest $request,
+ private LoggerInterface $logger,
+ private IUserManager $userManager,
+ private IGroupManager $groupManager,
+ private IURLGenerator $urlGenerator,
+ private ICloudFederationProviderManager $cloudFederationProviderManager,
+ private Config $config,
+ private IEventDispatcher $dispatcher,
+ private FederatedInviteMapper $federatedInviteMapper,
+ private readonly AddressHandler $addressHandler,
+ private readonly IAppConfig $appConfig,
+ private ICloudFederationFactory $factory,
+ private ICloudIdManager $cloudIdManager,
+ private readonly ISignatureManager $signatureManager,
+ private readonly OCMSignatoryManager $signatoryManager,
+ private ITimeFactory $timeFactory,
+ ) {
+ parent::__construct($appName, $request);
+ }
+
+ /**
+ * Add share
+ *
+ * @param string $shareWith The user who the share will be shared with
+ * @param string $name The resource name (e.g. document.odt)
+ * @param string|null $description Share description
+ * @param string $providerId Resource UID on the provider side
+ * @param string $owner Provider specific UID of the user who owns the resource
+ * @param string|null $ownerDisplayName Display name of the user who shared the item
+ * @param string|null $sharedBy Provider specific UID of the user who shared the resource
+ * @param string|null $sharedByDisplayName Display name of the user who shared the resource
+ * @param array{name: list<string>, options: array<string, mixed>} $protocol e,.g. ['name' => 'webdav', 'options' => ['username' => 'john', 'permissions' => 31]]
+ * @param string $shareType 'group' or 'user' share
+ * @param string $resourceType 'file', 'calendar',...
+ *
+ * @return JSONResponse<Http::STATUS_CREATED, CloudFederationAPIAddShare, array{}>|JSONResponse<Http::STATUS_BAD_REQUEST, CloudFederationAPIValidationError, array{}>|JSONResponse<Http::STATUS_NOT_IMPLEMENTED, CloudFederationAPIError, array{}>
+ *
+ * 201: The notification was successfully received. The display name of the recipient might be returned in the body
+ * 400: Bad request due to invalid parameters, e.g. when `shareWith` is not found or required properties are missing
+ * 501: Share type or the resource type is not supported
+ */
+ #[PublicPage]
+ #[NoCSRFRequired]
+ #[BruteForceProtection(action: 'receiveFederatedShare')]
+ public function addShare($shareWith, $name, $description, $providerId, $owner, $ownerDisplayName, $sharedBy, $sharedByDisplayName, $protocol, $shareType, $resourceType) {
+ try {
+ // if request is signed and well signed, no exception are thrown
+ // if request is not signed and host is known for not supporting signed request, no exception are thrown
+ $signedRequest = $this->getSignedRequest();
+ $this->confirmSignedOrigin($signedRequest, 'owner', $owner);
+ } catch (IncomingRequestException $e) {
+ $this->logger->warning('incoming request exception', ['exception' => $e]);
+ return new JSONResponse(['message' => $e->getMessage(), 'validationErrors' => []], Http::STATUS_BAD_REQUEST);
+ }
+
+ // check if all required parameters are set
+ if (
+ $shareWith === null
+ || $name === null
+ || $providerId === null
+ || $resourceType === null
+ || $shareType === null
+ || !is_array($protocol)
+ || !isset($protocol['name'])
+ || !isset($protocol['options'])
+ || !is_array($protocol['options'])
+ || !isset($protocol['options']['sharedSecret'])
+ ) {
+ return new JSONResponse(
+ [
+ 'message' => 'Missing arguments',
+ 'validationErrors' => [],
+ ],
+ Http::STATUS_BAD_REQUEST
+ );
+ }
+
+ $supportedShareTypes = $this->config->getSupportedShareTypes($resourceType);
+ if (!in_array($shareType, $supportedShareTypes)) {
+ return new JSONResponse(
+ ['message' => 'Share type "' . $shareType . '" not implemented'],
+ Http::STATUS_NOT_IMPLEMENTED
+ );
+ }
+
+ $cloudId = $this->cloudIdManager->resolveCloudId($shareWith);
+ $shareWith = $cloudId->getUser();
+
+ if ($shareType === 'user') {
+ $shareWith = $this->mapUid($shareWith);
+
+ if (!$this->userManager->userExists($shareWith)) {
+ $response = new JSONResponse(
+ [
+ 'message' => 'User "' . $shareWith . '" does not exists at ' . $this->urlGenerator->getBaseUrl(),
+ 'validationErrors' => [],
+ ],
+ Http::STATUS_BAD_REQUEST
+ );
+ $response->throttle();
+ return $response;
+ }
+ }
+
+ if ($shareType === 'group') {
+ if (!$this->groupManager->groupExists($shareWith)) {
+ $response = new JSONResponse(
+ [
+ 'message' => 'Group "' . $shareWith . '" does not exists at ' . $this->urlGenerator->getBaseUrl(),
+ 'validationErrors' => [],
+ ],
+ Http::STATUS_BAD_REQUEST
+ );
+ $response->throttle();
+ return $response;
+ }
+ }
+
+ // if no explicit display name is given, we use the uid as display name
+ $ownerDisplayName = $ownerDisplayName === null ? $owner : $ownerDisplayName;
+ $sharedByDisplayName = $sharedByDisplayName === null ? $sharedBy : $sharedByDisplayName;
+
+ // sharedBy* parameter is optional, if nothing is set we assume that it is the same user as the owner
+ if ($sharedBy === null) {
+ $sharedBy = $owner;
+ $sharedByDisplayName = $ownerDisplayName;
+ }
+
+ try {
+ $provider = $this->cloudFederationProviderManager->getCloudFederationProvider($resourceType);
+ $share = $this->factory->getCloudFederationShare($shareWith, $name, $description, $providerId, $owner, $ownerDisplayName, $sharedBy, $sharedByDisplayName, '', $shareType, $resourceType);
+ $share->setProtocol($protocol);
+ $provider->shareReceived($share);
+ } catch (ProviderDoesNotExistsException|ProviderCouldNotAddShareException $e) {
+ return new JSONResponse(
+ ['message' => $e->getMessage()],
+ Http::STATUS_NOT_IMPLEMENTED
+ );
+ } catch (\Exception $e) {
+ $this->logger->error($e->getMessage(), ['exception' => $e]);
+ return new JSONResponse(
+ [
+ 'message' => 'Internal error at ' . $this->urlGenerator->getBaseUrl(),
+ 'validationErrors' => [],
+ ],
+ Http::STATUS_BAD_REQUEST
+ );
+ }
+
+ $responseData = ['recipientDisplayName' => ''];
+ if ($shareType === 'user') {
+ $user = $this->userManager->get($shareWith);
+ if ($user) {
+ $responseData = [
+ 'recipientDisplayName' => $user->getDisplayName(),
+ 'recipientUserId' => $user->getUID(),
+ ];
+ }
+ }
+
+ return new JSONResponse($responseData, Http::STATUS_CREATED);
+ }
+
+ /**
+ * Inform the sender that an invitation was accepted to start sharing
+ *
+ * Inform about an accepted invitation so the user on the sender provider's side
+ * can initiate the OCM share creation. To protect the identity of the parties,
+ * for shares created following an OCM invitation, the user id MAY be hashed,
+ * and recipients implementing the OCM invitation workflow MAY refuse to process
+ * shares coming from unknown parties.
+ * @link https://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1invite-accepted/post
+ *
+ * @param string $recipientProvider The address of the recipent's provider
+ * @param string $token The token used for the invitation
+ * @param string $userId The userId of the recipient at the recipient's provider
+ * @param string $email The email address of the recipient
+ * @param string $name The display name of the recipient
+ *
+ * @return JSONResponse<Http::STATUS_OK, array{userID: string, email: string, name: string}, array{}>|JSONResponse<Http::STATUS_FORBIDDEN|Http::STATUS_BAD_REQUEST|Http::STATUS_CONFLICT, array{message: string, error: true}, array{}>
+ *
+ * Note: Not implementing 404 Invitation token does not exist, instead using 400
+ * 200: Invitation accepted
+ * 400: Invalid token
+ * 403: Invitation token does not exist
+ * 409: User is already known by the OCM provider
+ */
+ #[PublicPage]
+ #[NoCSRFRequired]
+ #[BruteForceProtection(action: 'inviteAccepted')]
+ public function inviteAccepted(string $recipientProvider, string $token, string $userId, string $email, string $name): JSONResponse {
+ $this->logger->debug('Processing share invitation for ' . $userId . ' with token ' . $token . ' and email ' . $email . ' and name ' . $name);
+
+ $updated = $this->timeFactory->getTime();
+
+ if ($token === '') {
+ $response = new JSONResponse(['message' => 'Invalid or non existing token', 'error' => true], Http::STATUS_BAD_REQUEST);
+ $response->throttle();
+ return $response;
+ }
+
+ try {
+ $invitation = $this->federatedInviteMapper->findByToken($token);
+ } catch (DoesNotExistException) {
+ $response = ['message' => 'Invalid or non existing token', 'error' => true];
+ $status = Http::STATUS_BAD_REQUEST;
+ $response = new JSONResponse($response, $status);
+ $response->throttle();
+ return $response;
+ }
+
+ if ($invitation->isAccepted() === true) {
+ $response = ['message' => 'Invite already accepted', 'error' => true];
+ $status = Http::STATUS_CONFLICT;
+ return new JSONResponse($response, $status);
+ }
+
+ if ($invitation->getExpiredAt() !== null && $updated > $invitation->getExpiredAt()) {
+ $response = ['message' => 'Invitation expired', 'error' => true];
+ $status = Http::STATUS_BAD_REQUEST;
+ return new JSONResponse($response, $status);
+ }
+ $localUser = $this->userManager->get($invitation->getUserId());
+ if ($localUser === null) {
+ $response = ['message' => 'Invalid or non existing token', 'error' => true];
+ $status = Http::STATUS_BAD_REQUEST;
+ $response = new JSONResponse($response, $status);
+ $response->throttle();
+ return $response;
+ }
+
+ $sharedFromEmail = $localUser->getEMailAddress();
+ if ($sharedFromEmail === null) {
+ $response = ['message' => 'Invalid or non existing token', 'error' => true];
+ $status = Http::STATUS_BAD_REQUEST;
+ $response = new JSONResponse($response, $status);
+ $response->throttle();
+ return $response;
+ }
+ $sharedFromDisplayName = $localUser->getDisplayName();
+
+ $response = ['userID' => $localUser->getUID(), 'email' => $sharedFromEmail, 'name' => $sharedFromDisplayName];
+ $status = Http::STATUS_OK;
+
+ $invitation->setAccepted(true);
+ $invitation->setRecipientEmail($email);
+ $invitation->setRecipientName($name);
+ $invitation->setRecipientProvider($recipientProvider);
+ $invitation->setRecipientUserId($userId);
+ $invitation->setAcceptedAt($updated);
+ $invitation = $this->federatedInviteMapper->update($invitation);
+
+ $event = new FederatedInviteAcceptedEvent($invitation);
+ $this->dispatcher->dispatchTyped($event);
+
+ return new JSONResponse($response, $status);
+ }
+
+ /**
+ * Send a notification about an existing share
+ *
+ * @param string $notificationType Notification type, e.g. SHARE_ACCEPTED
+ * @param string $resourceType calendar, file, contact,...
+ * @param string|null $providerId ID of the share
+ * @param array<string, mixed>|null $notification The actual payload of the notification
+ *
+ * @return JSONResponse<Http::STATUS_CREATED, array<string, mixed>, array{}>|JSONResponse<Http::STATUS_BAD_REQUEST, CloudFederationAPIValidationError, array{}>|JSONResponse<Http::STATUS_FORBIDDEN|Http::STATUS_NOT_IMPLEMENTED, CloudFederationAPIError, array{}>
+ *
+ * 201: The notification was successfully received
+ * 400: Bad request due to invalid parameters, e.g. when `type` is invalid or missing
+ * 403: Getting resource is not allowed
+ * 501: The resource type is not supported
+ */
+ #[NoCSRFRequired]
+ #[PublicPage]
+ #[BruteForceProtection(action: 'receiveFederatedShareNotification')]
+ public function receiveNotification($notificationType, $resourceType, $providerId, ?array $notification) {
+ // check if all required parameters are set
+ if (
+ $notificationType === null
+ || $resourceType === null
+ || $providerId === null
+ || !is_array($notification)
+ ) {
+ return new JSONResponse(
+ [
+ 'message' => 'Missing arguments',
+ 'validationErrors' => [],
+ ],
+ Http::STATUS_BAD_REQUEST
+ );
+ }
+
+ try {
+ // if request is signed and well signed, no exception are thrown
+ // if request is not signed and host is known for not supporting signed request, no exception are thrown
+ $signedRequest = $this->getSignedRequest();
+ $this->confirmNotificationIdentity($signedRequest, $resourceType, $notification);
+ } catch (IncomingRequestException $e) {
+ $this->logger->warning('incoming request exception', ['exception' => $e]);
+ return new JSONResponse(['message' => $e->getMessage(), 'validationErrors' => []], Http::STATUS_BAD_REQUEST);
+ }
+
+ try {
+ $provider = $this->cloudFederationProviderManager->getCloudFederationProvider($resourceType);
+ $result = $provider->notificationReceived($notificationType, $providerId, $notification);
+ } catch (ProviderDoesNotExistsException $e) {
+ return new JSONResponse(
+ [
+ 'message' => $e->getMessage(),
+ 'validationErrors' => [],
+ ],
+ Http::STATUS_BAD_REQUEST
+ );
+ } catch (ShareNotFound $e) {
+ $response = new JSONResponse(
+ [
+ 'message' => $e->getMessage(),
+ 'validationErrors' => [],
+ ],
+ Http::STATUS_BAD_REQUEST
+ );
+ $response->throttle();
+ return $response;
+ } catch (ActionNotSupportedException $e) {
+ return new JSONResponse(
+ ['message' => $e->getMessage()],
+ Http::STATUS_NOT_IMPLEMENTED
+ );
+ } catch (BadRequestException $e) {
+ return new JSONResponse($e->getReturnMessage(), Http::STATUS_BAD_REQUEST);
+ } catch (AuthenticationFailedException $e) {
+ $response = new JSONResponse(['message' => 'RESOURCE_NOT_FOUND'], Http::STATUS_FORBIDDEN);
+ $response->throttle();
+ return $response;
+ } catch (\Exception $e) {
+ $this->logger->warning('incoming notification exception', ['exception' => $e]);
+ return new JSONResponse(
+ [
+ 'message' => 'Internal error at ' . $this->urlGenerator->getBaseUrl(),
+ 'validationErrors' => [],
+ ],
+ Http::STATUS_BAD_REQUEST
+ );
+ }
+
+ return new JSONResponse($result, Http::STATUS_CREATED);
+ }
+
+ /**
+ * map login name to internal LDAP UID if a LDAP backend is in use
+ *
+ * @param string $uid
+ * @return string mixed
+ */
+ private function mapUid($uid) {
+ // FIXME this should be a method in the user management instead
+ $this->logger->debug('shareWith before, ' . $uid, ['app' => $this->appName]);
+ Util::emitHook(
+ '\OCA\Files_Sharing\API\Server2Server',
+ 'preLoginNameUsedAsUserName',
+ ['uid' => &$uid]
+ );
+ $this->logger->debug('shareWith after, ' . $uid, ['app' => $this->appName]);
+
+ return $uid;
+ }
+
+
+ /**
+ * returns signed request if available.
+ * throw an exception:
+ * - if request is signed, but wrongly signed
+ * - if request is not signed but instance is configured to only accept signed ocm request
+ *
+ * @return IIncomingSignedRequest|null null if remote does not (and never did) support signed request
+ * @throws IncomingRequestException
+ */
+ private function getSignedRequest(): ?IIncomingSignedRequest {
+ try {
+ $signedRequest = $this->signatureManager->getIncomingSignedRequest($this->signatoryManager);
+ $this->logger->debug('signed request available', ['signedRequest' => $signedRequest]);
+ return $signedRequest;
+ } catch (SignatureNotFoundException|SignatoryNotFoundException $e) {
+ $this->logger->debug('remote does not support signed request', ['exception' => $e]);
+ // remote does not support signed request.
+ // currently we still accept unsigned request until lazy appconfig
+ // core.enforce_signed_ocm_request is set to true (default: false)
+ if ($this->appConfig->getValueBool('core', OCMSignatoryManager::APPCONFIG_SIGN_ENFORCED, lazy: true)) {
+ $this->logger->notice('ignored unsigned request', ['exception' => $e]);
+ throw new IncomingRequestException('Unsigned request');
+ }
+ } catch (SignatureException $e) {
+ $this->logger->warning('wrongly signed request', ['exception' => $e]);
+ throw new IncomingRequestException('Invalid signature');
+ }
+ return null;
+ }
+
+
+ /**
+ * confirm that the value related to $key entry from the payload is in format userid@hostname
+ * and compare hostname with the origin of the signed request.
+ *
+ * If request is not signed, we still verify that the hostname from the extracted value does,
+ * actually, not support signed request
+ *
+ * @param IIncomingSignedRequest|null $signedRequest
+ * @param string $key entry from data available in data
+ * @param string $value value itself used in case request is not signed
+ *
+ * @throws IncomingRequestException
+ */
+ private function confirmSignedOrigin(?IIncomingSignedRequest $signedRequest, string $key, string $value): void {
+ if ($signedRequest === null) {
+ $instance = $this->getHostFromFederationId($value);
+ try {
+ $this->signatureManager->getSignatory($instance);
+ throw new IncomingRequestException('instance is supposed to sign its request');
+ } catch (SignatoryNotFoundException) {
+ return;
+ }
+ }
+
+ $body = json_decode($signedRequest->getBody(), true) ?? [];
+ $entry = trim($body[$key] ?? '', '@');
+ if ($this->getHostFromFederationId($entry) !== $signedRequest->getOrigin()) {
+ throw new IncomingRequestException('share initiation (' . $signedRequest->getOrigin() . ') from different instance (' . $entry . ') [key=' . $key . ']');
+ }
+ }
+
+ /**
+ * confirm identity of the remote instance on notification, based on the share token.
+ *
+ * If request is not signed, we still verify that the hostname from the extracted value does,
+ * actually, not support signed request
+ *
+ * @param IIncomingSignedRequest|null $signedRequest
+ * @param string $resourceType
+ * @param string $sharedSecret
+ *
+ * @throws IncomingRequestException
+ * @throws BadRequestException
+ */
+ private function confirmNotificationIdentity(
+ ?IIncomingSignedRequest $signedRequest,
+ string $resourceType,
+ array $notification,
+ ): void {
+ $sharedSecret = $notification['sharedSecret'] ?? '';
+ if ($sharedSecret === '') {
+ throw new BadRequestException(['sharedSecret']);
+ }
+
+ try {
+ $provider = $this->cloudFederationProviderManager->getCloudFederationProvider($resourceType);
+ if ($provider instanceof ISignedCloudFederationProvider) {
+ $identity = $provider->getFederationIdFromSharedSecret($sharedSecret, $notification);
+ } else {
+ $this->logger->debug('cloud federation provider {provider} does not implements ISignedCloudFederationProvider', ['provider' => $provider::class]);
+ return;
+ }
+ } catch (\Exception $e) {
+ throw new IncomingRequestException($e->getMessage());
+ }
+
+ $this->confirmNotificationEntry($signedRequest, $identity);
+ }
+
+
+ /**
+ * @param IIncomingSignedRequest|null $signedRequest
+ * @param string $entry
+ *
+ * @return void
+ * @throws IncomingRequestException
+ */
+ private function confirmNotificationEntry(?IIncomingSignedRequest $signedRequest, string $entry): void {
+ $instance = $this->getHostFromFederationId($entry);
+ if ($signedRequest === null) {
+ try {
+ $this->signatureManager->getSignatory($instance);
+ throw new IncomingRequestException('instance is supposed to sign its request');
+ } catch (SignatoryNotFoundException) {
+ return;
+ }
+ } elseif ($instance !== $signedRequest->getOrigin()) {
+ throw new IncomingRequestException('remote instance ' . $instance . ' not linked to origin ' . $signedRequest->getOrigin());
+ }
+ }
+
+ /**
+ * @param string $entry
+ * @return string
+ * @throws IncomingRequestException
+ */
+ private function getHostFromFederationId(string $entry): string {
+ if (!str_contains($entry, '@')) {
+ throw new IncomingRequestException('entry ' . $entry . ' does not contain @');
+ }
+ $rightPart = substr($entry, strrpos($entry, '@') + 1);
+
+ // in case the full scheme is sent; getting rid of it
+ $rightPart = $this->addressHandler->removeProtocolFromUrl($rightPart);
+ try {
+ return $this->signatureManager->extractIdentityFromUri('https://' . $rightPart);
+ } catch (IdentityNotFoundException) {
+ throw new IncomingRequestException('invalid host within federation id: ' . $entry);
+ }
+ }
+}
diff --git a/apps/cloud_federation_api/lib/Db/FederatedInvite.php b/apps/cloud_federation_api/lib/Db/FederatedInvite.php
new file mode 100644
index 00000000000..b2447ff4e23
--- /dev/null
+++ b/apps/cloud_federation_api/lib/Db/FederatedInvite.php
@@ -0,0 +1,62 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+namespace OCA\CloudFederationAPI\Db;
+
+use OCP\AppFramework\Db\Entity;
+use OCP\DB\Types;
+
+/**
+ * @method bool isAccepted()
+ * @method void setAccepted(bool $accepted)
+ * @method int|null getAcceptedAt()
+ * @method void setAcceptedAt(int $acceptedAt)
+ * @method int|null getCreatedAt()
+ * @method void setCreatedAt(int $createdAt)
+ * @method int|null getExpiredAt()
+ * @method void setExpiredAt(int $expiredAt)
+ * @method string|null getRecipientEmail()
+ * @method void setRecipientEmail(string $recipientEmail)
+ * @method string|null getRecipientName()
+ * @method void setRecipientName(string $recipientName)
+ * @method string|null getRecipientProvider()
+ * @method void setRecipientProvider(string $recipientProvider)
+ * @method string|null getRecipientUserId()
+ * @method void setRecipientUserId(string $recipientUserId)
+ * @method string getToken()
+ * @method void setToken(string $token)
+ * @method string|null getUserId()
+ * @method void setUserId(string $userId)
+ */
+
+class FederatedInvite extends Entity {
+ protected bool $accepted = false;
+ protected ?int $acceptedAt = 0;
+ protected int $createdAt = 0;
+ protected ?int $expiredAt = 0;
+ protected ?string $recipientEmail = null;
+ protected ?string $recipientName = null;
+ protected ?string $recipientProvider = null;
+ protected ?string $recipientUserId = null;
+ protected string $token = '';
+ protected string $userId = '';
+
+ public function __construct() {
+ $this->addType('accepted', Types::BOOLEAN);
+ $this->addType('acceptedAt', Types::BIGINT);
+ $this->addType('createdAt', Types::BIGINT);
+ $this->addType('expiredAt', Types::BIGINT);
+ $this->addType('recipientEmail', Types::STRING);
+ $this->addType('recipientName', Types::STRING);
+ $this->addType('recipientProvider', Types::STRING);
+ $this->addType('recipientUserId', Types::STRING);
+ $this->addType('token', Types::STRING);
+ $this->addType('userId', Types::STRING);
+ }
+}
diff --git a/apps/cloud_federation_api/lib/Db/FederatedInviteMapper.php b/apps/cloud_federation_api/lib/Db/FederatedInviteMapper.php
new file mode 100644
index 00000000000..5feb08b2c7f
--- /dev/null
+++ b/apps/cloud_federation_api/lib/Db/FederatedInviteMapper.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+namespace OCA\CloudFederationAPI\Db;
+
+use OCP\AppFramework\Db\QBMapper;
+use OCP\IDBConnection;
+
+/**
+ * @template-extends QBMapper<FederatedInvite>
+ */
+class FederatedInviteMapper extends QBMapper {
+ public const TABLE_NAME = 'federated_invites';
+
+ public function __construct(IDBConnection $db) {
+ parent::__construct($db, self::TABLE_NAME);
+ }
+
+ public function findByToken(string $token): FederatedInvite {
+ $qb = $this->db->getQueryBuilder();
+ $qb->select('*')
+ ->from('federated_invites')
+ ->where($qb->expr()->eq('token', $qb->createNamedParameter($token)));
+ return $this->findEntity($qb);
+ }
+
+}
diff --git a/apps/cloud_federation_api/lib/Events/FederatedInviteAcceptedEvent.php b/apps/cloud_federation_api/lib/Events/FederatedInviteAcceptedEvent.php
new file mode 100644
index 00000000000..c4d079d083e
--- /dev/null
+++ b/apps/cloud_federation_api/lib/Events/FederatedInviteAcceptedEvent.php
@@ -0,0 +1,24 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+namespace OCA\CloudFederationAPI\Events;
+
+use OCA\CloudFederationAPI\Db\FederatedInvite;
+use OCP\EventDispatcher\Event;
+
+class FederatedInviteAcceptedEvent extends Event {
+ public function __construct(
+ private FederatedInvite $invitation,
+ ) {
+ parent::__construct();
+ }
+
+ public function getInvitation(): FederatedInvite {
+ return $this->invitation;
+ }
+}
diff --git a/apps/cloud_federation_api/lib/Migration/Version1016Date202502262004.php b/apps/cloud_federation_api/lib/Migration/Version1016Date202502262004.php
new file mode 100644
index 00000000000..a3523d45e38
--- /dev/null
+++ b/apps/cloud_federation_api/lib/Migration/Version1016Date202502262004.php
@@ -0,0 +1,89 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+namespace OCA\CloudFederationAPI\Migration;
+
+use Closure;
+use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
+use OCP\Migration\IOutput;
+use OCP\Migration\SimpleMigrationStep;
+
+class Version1016Date202502262004 extends SimpleMigrationStep {
+ /**
+ * @param IOutput $output
+ * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
+ * @param array $options
+ * @return null|ISchemaWrapper
+ */
+ public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
+ /** @var ISchemaWrapper $schema */
+ $schema = $schemaClosure();
+ $table_name = 'federated_invites';
+
+ if (!$schema->hasTable($table_name)) {
+ $table = $schema->createTable($table_name);
+ $table->addColumn('id', Types::BIGINT, [
+ 'autoincrement' => true,
+ 'notnull' => true,
+ 'length' => 11,
+ 'unsigned' => true,
+ ]);
+ $table->addColumn('user_id', Types::STRING, [
+ 'notnull' => true,
+ 'length' => 64,
+
+ ]);
+ // https://saturncloud.io/blog/what-is-the-maximum-length-of-a-url-in-different-browsers/#maximum-url-length-in-different-browsers
+ // We use the least common denominator, the minimum length supported by browsers
+ $table->addColumn('recipient_provider', Types::STRING, [
+ 'notnull' => false,
+ 'length' => 2083,
+ ]);
+ $table->addColumn('recipient_user_id', Types::STRING, [
+ 'notnull' => false,
+ 'length' => 1024,
+ ]);
+ $table->addColumn('recipient_name', Types::STRING, [
+ 'notnull' => false,
+ 'length' => 1024,
+ ]);
+ // https://www.directedignorance.com/blog/maximum-length-of-email-address
+ $table->addColumn('recipient_email', Types::STRING, [
+ 'notnull' => false,
+ 'length' => 320,
+ ]);
+ $table->addColumn('token', Types::STRING, [
+ 'notnull' => true,
+ 'length' => 60,
+ ]);
+ $table->addColumn('accepted', Types::BOOLEAN, [
+ 'notnull' => false,
+ 'default' => false
+ ]);
+ $table->addColumn('created_at', Types::BIGINT, [
+ 'notnull' => true,
+ ]);
+
+ $table->addColumn('expired_at', Types::BIGINT, [
+ 'notnull' => false,
+ ]);
+
+ $table->addColumn('accepted_at', Types::BIGINT, [
+ 'notnull' => false,
+ ]);
+
+ $table->addUniqueConstraint(['token']);
+ $table->setPrimaryKey(['id']);
+ return $schema;
+ }
+
+ return null;
+ }
+}
diff --git a/apps/cloud_federation_api/lib/ResponseDefinitions.php b/apps/cloud_federation_api/lib/ResponseDefinitions.php
new file mode 100644
index 00000000000..b17f5aadc1d
--- /dev/null
+++ b/apps/cloud_federation_api/lib/ResponseDefinitions.php
@@ -0,0 +1,30 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+namespace OCA\CloudFederationAPI;
+
+/**
+ * @psalm-type CloudFederationAPIAddShare = array{
+ * recipientDisplayName: string,
+ * recipientUserId?: string,
+ * }
+ *
+ * @psalm-type CloudFederationAPIError = array{
+ * message: string,
+ * }
+ *
+ * @psalm-type CloudFederationAPIValidationError = CloudFederationAPIError&array{
+ * validationErrors: list<array{
+ * name: string,
+ * message: string|null,
+ * }>,
+ * }
+ */
+class ResponseDefinitions {
+}
diff --git a/apps/cloud_federation_api/openapi.json b/apps/cloud_federation_api/openapi.json
new file mode 100644
index 00000000000..9c92a152bf8
--- /dev/null
+++ b/apps/cloud_federation_api/openapi.json
@@ -0,0 +1,499 @@
+{
+ "openapi": "3.0.3",
+ "info": {
+ "title": "cloud_federation_api",
+ "version": "0.0.1",
+ "description": "Enable clouds to communicate with each other and exchange data",
+ "license": {
+ "name": "agpl"
+ }
+ },
+ "components": {
+ "securitySchemes": {
+ "basic_auth": {
+ "type": "http",
+ "scheme": "basic"
+ },
+ "bearer_auth": {
+ "type": "http",
+ "scheme": "bearer"
+ }
+ },
+ "schemas": {
+ "AddShare": {
+ "type": "object",
+ "required": [
+ "recipientDisplayName"
+ ],
+ "properties": {
+ "recipientDisplayName": {
+ "type": "string"
+ },
+ "recipientUserId": {
+ "type": "string"
+ }
+ }
+ },
+ "Capabilities": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object"
+ }
+ }
+ },
+ "Error": {
+ "type": "object",
+ "required": [
+ "message"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ }
+ },
+ "ValidationError": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/Error"
+ },
+ {
+ "type": "object",
+ "required": [
+ "validationErrors"
+ ],
+ "properties": {
+ "validationErrors": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "name",
+ "message"
+ ],
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string",
+ "nullable": true
+ }
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ "paths": {
+ "/index.php/ocm/shares": {
+ "post": {
+ "operationId": "request_handler-add-share",
+ "summary": "Add share",
+ "tags": [
+ "request_handler"
+ ],
+ "security": [
+ {},
+ {
+ "bearer_auth": []
+ },
+ {
+ "basic_auth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "shareWith",
+ "name",
+ "providerId",
+ "owner",
+ "protocol",
+ "shareType",
+ "resourceType"
+ ],
+ "properties": {
+ "shareWith": {
+ "type": "string",
+ "description": "The user who the share will be shared with"
+ },
+ "name": {
+ "type": "string",
+ "description": "The resource name (e.g. document.odt)"
+ },
+ "description": {
+ "type": "string",
+ "nullable": true,
+ "description": "Share description"
+ },
+ "providerId": {
+ "type": "string",
+ "description": "Resource UID on the provider side"
+ },
+ "owner": {
+ "type": "string",
+ "description": "Provider specific UID of the user who owns the resource"
+ },
+ "ownerDisplayName": {
+ "type": "string",
+ "nullable": true,
+ "description": "Display name of the user who shared the item"
+ },
+ "sharedBy": {
+ "type": "string",
+ "nullable": true,
+ "description": "Provider specific UID of the user who shared the resource"
+ },
+ "sharedByDisplayName": {
+ "type": "string",
+ "nullable": true,
+ "description": "Display name of the user who shared the resource"
+ },
+ "protocol": {
+ "type": "object",
+ "description": "e,.g. ['name' => 'webdav', 'options' => ['username' => 'john', 'permissions' => 31]]",
+ "required": [
+ "name",
+ "options"
+ ],
+ "properties": {
+ "name": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "options": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object"
+ }
+ }
+ }
+ },
+ "shareType": {
+ "type": "string",
+ "description": "'group' or 'user' share"
+ },
+ "resourceType": {
+ "type": "string",
+ "description": "'file', 'calendar',..."
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "The notification was successfully received. The display name of the recipient might be returned in the body",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/AddShare"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Bad request due to invalid parameters, e.g. when `shareWith` is not found or required properties are missing",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ValidationError"
+ }
+ }
+ }
+ },
+ "501": {
+ "description": "Share type or the resource type is not supported",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/index.php/ocm/notifications": {
+ "post": {
+ "operationId": "request_handler-receive-notification",
+ "summary": "Send a notification about an existing share",
+ "tags": [
+ "request_handler"
+ ],
+ "security": [
+ {},
+ {
+ "bearer_auth": []
+ },
+ {
+ "basic_auth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "notificationType",
+ "resourceType"
+ ],
+ "properties": {
+ "notificationType": {
+ "type": "string",
+ "description": "Notification type, e.g. SHARE_ACCEPTED"
+ },
+ "resourceType": {
+ "type": "string",
+ "description": "calendar, file, contact,..."
+ },
+ "providerId": {
+ "type": "string",
+ "nullable": true,
+ "description": "ID of the share"
+ },
+ "notification": {
+ "type": "object",
+ "nullable": true,
+ "description": "The actual payload of the notification",
+ "additionalProperties": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "The notification was successfully received",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Bad request due to invalid parameters, e.g. when `type` is invalid or missing",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ValidationError"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Getting resource is not allowed",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ }
+ },
+ "501": {
+ "description": "The resource type is not supported",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/index.php/ocm/invite-accepted": {
+ "post": {
+ "operationId": "request_handler-invite-accepted",
+ "summary": "Inform the sender that an invitation was accepted to start sharing",
+ "description": "Inform about an accepted invitation so the user on the sender provider's side can initiate the OCM share creation. To protect the identity of the parties, for shares created following an OCM invitation, the user id MAY be hashed, and recipients implementing the OCM invitation workflow MAY refuse to process shares coming from unknown parties.\nhttps://cs3org.github.io/OCM-API/docs.html?branch=v1.1.0&repo=OCM-API&user=cs3org#/paths/~1invite-accepted/post\nNote: Not implementing 404 Invitation token does not exist, instead using 400",
+ "tags": [
+ "request_handler"
+ ],
+ "security": [
+ {},
+ {
+ "bearer_auth": []
+ },
+ {
+ "basic_auth": []
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "recipientProvider",
+ "token",
+ "userId",
+ "email",
+ "name"
+ ],
+ "properties": {
+ "recipientProvider": {
+ "type": "string",
+ "description": "The address of the recipent's provider"
+ },
+ "token": {
+ "type": "string",
+ "description": "The token used for the invitation"
+ },
+ "userId": {
+ "type": "string",
+ "description": "The userId of the recipient at the recipient's provider"
+ },
+ "email": {
+ "type": "string",
+ "description": "The email address of the recipient"
+ },
+ "name": {
+ "type": "string",
+ "description": "The display name of the recipient"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Invitation accepted",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "userID",
+ "email",
+ "name"
+ ],
+ "properties": {
+ "userID": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Invitation token does not exist",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "message",
+ "error"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "error": {
+ "type": "boolean",
+ "enum": [
+ true
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid token",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "message",
+ "error"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "error": {
+ "type": "boolean",
+ "enum": [
+ true
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "409": {
+ "description": "User is already known by the OCM provider",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "message",
+ "error"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "error": {
+ "type": "boolean",
+ "enum": [
+ true
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ {
+ "name": "request_handler",
+ "description": "Open-Cloud-Mesh-API"
+ }
+ ]
+}
diff --git a/apps/cloud_federation_api/openapi.json.license b/apps/cloud_federation_api/openapi.json.license
new file mode 100644
index 00000000000..83559daa9dc
--- /dev/null
+++ b/apps/cloud_federation_api/openapi.json.license
@@ -0,0 +1,2 @@
+SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
+SPDX-License-Identifier: AGPL-3.0-or-later \ No newline at end of file
diff --git a/apps/cloud_federation_api/tests/RequestHandlerControllerTest.php b/apps/cloud_federation_api/tests/RequestHandlerControllerTest.php
new file mode 100644
index 00000000000..769e0a2dbff
--- /dev/null
+++ b/apps/cloud_federation_api/tests/RequestHandlerControllerTest.php
@@ -0,0 +1,136 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+namespace OCA\CloudFederationApi\Tests;
+
+use NCU\Security\Signature\ISignatureManager;
+use OC\OCM\OCMSignatoryManager;
+use OCA\CloudFederationAPI\Config;
+use OCA\CloudFederationAPI\Controller\RequestHandlerController;
+use OCA\CloudFederationAPI\Db\FederatedInvite;
+use OCA\CloudFederationAPI\Db\FederatedInviteMapper;
+use OCA\FederatedFileSharing\AddressHandler;
+use OCP\AppFramework\Http;
+use OCP\AppFramework\Http\JSONResponse;
+use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\EventDispatcher\IEventDispatcher;
+use OCP\Federation\ICloudFederationFactory;
+use OCP\Federation\ICloudFederationProviderManager;
+use OCP\Federation\ICloudIdManager;
+use OCP\IAppConfig;
+use OCP\IGroupManager;
+use OCP\IRequest;
+use OCP\IURLGenerator;
+use OCP\IUser;
+use OCP\IUserManager;
+use PHPUnit\Framework\MockObject\MockObject;
+use Psr\Log\LoggerInterface;
+use Test\TestCase;
+
+class RequestHandlerControllerTest extends TestCase {
+ private IRequest&MockObject $request;
+ private LoggerInterface&MockObject $logger;
+ private IUserManager&MockObject $userManager;
+ private IGroupManager&MockObject $groupManager;
+ private IURLGenerator&MockObject $urlGenerator;
+ private ICloudFederationProviderManager&MockObject $cloudFederationProviderManager;
+ private Config&MockObject $config;
+ private IEventDispatcher&MockObject $eventDispatcher;
+ private FederatedInviteMapper&MockObject $federatedInviteMapper;
+ private AddressHandler&MockObject $addressHandler;
+ private IAppConfig&MockObject $appConfig;
+ private ICloudFederationFactory&MockObject $cloudFederationFactory;
+ private ICloudIdManager&MockObject $cloudIdManager;
+ private ISignatureManager&MockObject $signatureManager;
+ private OCMSignatoryManager&MockObject $signatoryManager;
+ private ITimeFactory&MockObject $timeFactory;
+
+ private RequestHandlerController $requestHandlerController;
+
+ protected function setUp(): void {
+ parent::setUp();
+
+ $this->request = $this->createMock(IRequest::class);
+ $this->logger = $this->createMock(LoggerInterface::class);
+ $this->userManager = $this->createMock(IUserManager::class);
+ $this->groupManager = $this->createMock(IGroupManager::class);
+ $this->urlGenerator = $this->createMock(IURLGenerator::class);
+ $this->cloudFederationProviderManager = $this->createMock(ICloudFederationProviderManager::class);
+ $this->config = $this->createMock(Config::class);
+ $this->eventDispatcher = $this->createMock(IEventDispatcher::class);
+ $this->federatedInviteMapper = $this->createMock(FederatedInviteMapper::class);
+ $this->addressHandler = $this->createMock(AddressHandler::class);
+ $this->appConfig = $this->createMock(IAppConfig::class);
+ $this->cloudFederationFactory = $this->createMock(ICloudFederationFactory::class);
+ $this->cloudIdManager = $this->createMock(ICloudIdManager::class);
+ $this->signatureManager = $this->createMock(ISignatureManager::class);
+ $this->signatoryManager = $this->createMock(OCMSignatoryManager::class);
+ $this->timeFactory = $this->createMock(ITimeFactory::class);
+
+ $this->requestHandlerController = new RequestHandlerController(
+ 'cloud_federation_api',
+ $this->request,
+ $this->logger,
+ $this->userManager,
+ $this->groupManager,
+ $this->urlGenerator,
+ $this->cloudFederationProviderManager,
+ $this->config,
+ $this->eventDispatcher,
+ $this->federatedInviteMapper,
+ $this->addressHandler,
+ $this->appConfig,
+ $this->cloudFederationFactory,
+ $this->cloudIdManager,
+ $this->signatureManager,
+ $this->signatoryManager,
+ $this->timeFactory,
+ );
+ }
+
+ public function testInviteAccepted(): void {
+ $token = 'token';
+ $userId = 'userId';
+ $invite = new FederatedInvite();
+ $invite->setCreatedAt(1);
+ $invite->setUserId($userId);
+ $invite->setToken($token);
+
+ $this->federatedInviteMapper->expects(self::once())
+ ->method('findByToken')
+ ->with($token)
+ ->willReturn($invite);
+
+ $this->federatedInviteMapper->expects(self::once())
+ ->method('update')
+ ->willReturnArgument(0);
+
+ $user = $this->createMock(IUser::class);
+ $user->method('getUID')
+ ->willReturn($userId);
+ $user->method('getEMailAddress')
+ ->willReturn('email');
+ $user->method('getDisplayName')
+ ->willReturn('displayName');
+
+ $this->userManager->expects(self::once())
+ ->method('get')
+ ->with($userId)
+ ->willReturn($user);
+
+ $recipientProvider = 'http://127.0.0.1';
+ $recipientId = 'remote';
+ $recipientEmail = 'remote@example.org';
+ $recipientName = 'Remote Remoteson';
+ $response = ['userID' => $userId, 'email' => 'email', 'name' => 'displayName'];
+ $json = new JSONResponse($response, Http::STATUS_OK);
+
+ $this->assertEquals($json, $this->requestHandlerController->inviteAccepted($recipientProvider, $token, $recipientId, $recipientEmail, $recipientName));
+ }
+}