39 Commits

Author SHA1 Message Date
c2ae699215 refactor: Use modern SabrePluginAddEvent
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2025-12-18 11:31:05 +01:00
c207a7a7b1 chore(ci): update to Psalm 6
Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
2025-06-05 15:50:14 +03:00
2a178d10b1 chore: removed FileEventsListener in favor of webhooks_listener feature.
Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
2025-04-14 15:27:18 +03:00
ccc6e22b7a (fix): use the event for AppAPI to get list of AI providers
Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
2025-04-10 10:47:58 +03:00
d5054738e8 (fix): performance improvement - load ExApps menu items only when an event is triggered
Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
2025-04-04 16:27:17 +03:00
3d332ea7e2 HaRP support (#505)
This PR add support for HaRP - the successor of DockerSocketProxy.

---------

Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
Co-authored-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Co-authored-by: Oleksander Piskun <oleksandr2088@icloud.com>
2025-04-01 17:03:22 +03:00
cb0dd0fa38 (chore): removed deprecated occ app_api:deploy
Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
2025-03-26 09:29:16 +02:00
c5f3d6a764 docs(reuse): Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-12-18 08:40:54 +01:00
b8200b70b5 chore: sync changes for Apps management migration to settings (#417)
This PR synchronizes backend logic for ExAppFetcher and required changes
for Apps management.

![Screen Shot 2024-10-14 at 17 01
48](https://github.com/user-attachments/assets/60667041-92b1-4d9e-a78a-9476a1271d1f)

## TODO

- [ ] Merge with the server PR for settings app changes:
https://github.com/nextcloud/server/pull/48665
- [x] Remove old UI parts that are not needed anymore

---------

Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Co-authored-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2024-10-29 21:26:46 +02:00
db15f5bb6e renamed "cloud-py-api" to "nextcloud" for "app-skeleton-python" and "test-deploy" (#420)
Also appid for "skeleton" is now "app-skeleton-python"

edited: juliushaertl -> juliusknorr

Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
2024-10-18 13:49:47 +00:00
4b73b70ce2 fix(ex_app_fetcher): use new OCP ServerVersion (#400)
After stable branches split we can update main branch for NC31 (after
https://github.com/nextcloud/app_api/pull/399) with OCP changes
(https://github.com/nextcloud/server/blob/master/lib/public/ServerVersion.php#L75-L81).

---------

Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
2024-09-26 18:12:50 +00:00
2ef33a042f fix(cli): do not remove persistent storage by default in ExApp unregister command (#381)
Do not remove ExApp docker volume by default, deprecate old option
`keep-data`, add new `rm-data` to remove ExApp data.

---------

Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
2024-09-06 21:09:54 +03:00
1eab9f6814 feat: remove ApiScopes (#373)
Ongoing optimization, unnecessary stuff removal to reduce the number of
requests during AppAPIAuth.

---------

Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Co-authored-by: Alexander Piskun <13381981+bigcat88@users.noreply.github.com>
2024-09-04 20:37:02 +03:00
2374d552be Proxy: do not set timeout for requests to ExApp (#357)
We forgot to change this in this PR:
https://github.com/cloud-py-api/app_api/pull/277

For Proxy requests there should be no timeout, cause they are coming
from user or external services and not from Nextcloud

Even if they will take a long time, Nextcloud instance will be not slow
down

Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
2024-08-08 16:43:50 +03:00
b5f8caf865 fix: disable caching if APCu detected (#348)
We do not disable caches in other places as in CLI only `/ex_apps` cache
is used.

Linked issue: https://github.com/cloud-py-api/app_api/issues/291

Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Co-authored-by: Andrey Borysenko <andrey18106x@gmail.com>
2024-08-05 15:23:47 +03:00
65003cd5d1 ExApp routes (public/user/admin) support (#327)
This PR introduces new (mandatory if you use the ExApp proxy) registration of the routes that are allowed to call on ExApp via AppAPI ExApp proxy.

---------

Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Co-authored-by: Alexander Piskun <13381981+bigcat88@users.noreply.github.com>
2024-08-02 16:47:06 +03:00
f43ad47ec5 do not disable ExApp on lower version (#341)
1. Will be required for future AI ExApps with scaling
2. Will be required for future ExApps with federated support
3. Requited by **WorkflowEngine project** at it's current stage
4. This will make developing of ExApps easier, as usual in
"manual"registration" we use different app version(constant "1.0.0")

---------

Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
2024-08-01 23:13:06 +03:00
b72baacaf5 AppAPIProxy: fixed PUT requests processing with content (#331)
Treat `PUT` with the same logic as `DELETE`

`$_POST` and `$_FILES` are always empty as PHP automatically does not
parse data during `PUT`

Just send raw request which we received to ExApp.

Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
2024-07-19 22:12:36 +03:00
d9a03f617c optimization: remove profile since unused (#321)
Ongoing optimization by removing redundant or unused parts

---------

Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Co-authored-by: Alexander Piskun <13381981+bigcat88@users.noreply.github.com>
2024-07-10 14:30:48 +03:00
15db25c7db feat: Add task processing API (#294)
Co-authored-by: Alexander Piskun <13381981+bigcat88@users.noreply.github.com>
2024-07-05 19:50:28 +02:00
0a80c686df ExApp proxy adjustments and fixes (#296)
This PR made a few changes to ExApp proxy:

1. Fix Get requests proxy to preserve the url params
2. Add pass of cookies to the ExApp with request
3. Fixes Proxy work with multipart requests and files using separate
internal version of requestToExApp with slightly adjusted handling of
query and body params
4. Remove default caching for json requests

---------

Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Co-authored-by: Alexander Piskun <13381981+bigcat88@users.noreply.github.com>
2024-06-10 20:50:42 +03:00
b0599000c9 fixed url to app-skeleton (#260)
_skeleton was moved to a separate repository in a previous week_

Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
2024-04-02 11:20:08 +03:00
46a51fc637 EventsListener API (#259)
Node Events
***********

``node_event`` - events about File `Nodes`

Supported event sub-types:

* NodeCreatedEvent
* NodeTouchedEvent
* NodeWrittenEvent
* NodeDeletedEvent
* NodeRenamedEvent
* NodeCopiedEvent

Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
2024-04-02 11:09:09 +03:00
36aaac2f95 fix(declarative_settings): changed events names (#247)
DeclarativeSettings events renamed, reflecting this changes in AppAPI

---------

Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
2024-03-12 18:10:11 +00:00
c7d1c3e8b8 "Deploy" removed, Register Rework (#233)
PR should not break anything, for old parts added a workarounds, that we
will remove in a month when all ExApps will publish their updates.

**Changes**:

* UI now use the same algorithm/code for ExApp `register` & `update` as
the CLI commands.
* Deprecated "deploy" command, now `register` commands performs deploy.

**Refactoring**:

* Removed internal `DispatchInit` command, as from CLI we already can do
it without spawning additional process.
* Removed hack(`status['active']`) when we have some half-enabled state
of ExApp when it is not enabled, but already can call APIs, now ExApp
enables before calling `/init`
* Made code more consistent in many place.

OTHER CHANGES FOR DEVS:

* For `--json-info` parameter in occ `register` command keys renamed:
"appid" -> "id", "system_app" -> "system"

_Old naming is still supported but will be removed in future, in such
way we make consistent parameters between `info.xml` and `--json-info`._

----

Related: #219 
_AppAPI will perform deploy & registration in a background and issue
should be fixed_

---------

Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Co-authored-by: Andrey Borysenko <andrey18106x@gmail.com>
2024-02-19 18:50:06 +03:00
5e492fb4d9 Declarative Settings API (#149)
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Co-authored-by: Alexander Piskun <13381981+bigcat88@users.noreply.github.com>
Co-authored-by: Alexander Piskun <bigcat88@icloud.com>
2024-02-11 14:48:02 +03:00
003794670a Daemon Templates, Docker Socket Proxy, AppAPI 2.0 (#212) 2024-01-25 12:33:48 +00:00
a8863dffee ALL ApiScope (#190)
Added `ALL` ApiScope to allow the use of OCS Apis that we have not yet
defined in the AppAPI.

---------

Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Co-authored-by: Andrey Borysenko <andrey18106x@gmail.com>
2024-01-01 13:51:33 +00:00
bc454cae77 fix: remove last slash in url (#170)
Resolves: #169

---------

Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Co-authored-by: Alexander Piskun <bigcat88@icloud.com>
2023-12-19 15:24:48 +03:00
ec0324b0df Rework of App:Register (#128)
Fixes: #122


1. Made sending the "init" request in a separate process
2. If "init" request fails with STATUS_NOT_IMPLEMENTED or
STATUS_NOT_FOUND sets the progress to 100
3. Added `wait-finish` optional parameter to `app_api:app:register` occ
command.

What is missing:

- [x] Global option: how long the "/init" request can be proceed.
- [x] Docs update for this
- [x] Update nc_py_api CI for this
- [x] Added test for registering ExApp that does not have "/init"
endpoint.


This allows to implement ExApp without "/init" endpoint and made it
optional.

---------

Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Co-authored-by: Andrey Borysenko <andrey18106x@gmail.com>
2023-11-27 15:31:37 +03:00
9ce6fc33fa occ app_api:app:unregister rework (#127)
Fixes #121

- small actions clean up
- added basic but very useful tests for "occ app_api:app:unregister"

Changes in behaviour:

- container of app is always removed
- volume  with data is removed by default, but optionally can be kept
- app_api does not try to disable ExApp if it is already disabled
- "--silent" options now means "max silence as possible"
- added "--force" option to ignore errors if any.

---------

Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
2023-11-26 12:21:31 +03:00
c0e265138b to_gif_example now lives in a separate repo (#92)
subj, added link to to_gif_example in APPS.md
2023-10-14 18:36:20 +03:00
8017dba784 UI implementation(appstore, daemons) (#77)
- [ ] polish
- [ ] update docs with screenshots

---------

Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Co-authored-by: Alexander Piskun <bigcat88@icloud.com>
Co-authored-by: Alexander Piskun <13381981+bigcat88@users.noreply.github.com>
2023-10-02 20:55:33 +03:00
125bf549ae Fixes after renaming (#71)
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
2023-09-13 15:17:06 +03:00
9c68821df3 authorization-app-api, auth simplification (#69)
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Co-authored-by: Alexander Piskun <bigcat88@icloud.com>
2023-09-13 12:07:33 +03:00
8b3f129143 app_ecosystem_v2 to app_api renaming(1) (#68)
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
2023-09-11 12:42:34 +03:00
ffa2239c82 fixed test for last nc_py_api version (#52)
Last nc_py_api use `nc.notifications` instead of
`nc.users.notifications`

Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
2023-08-22 19:59:20 +03:00
eabfb2dca1 ExApp version check (#29)
- [x] Resolve conflicts
- [ ] Merge into auth throttling PR first

---------

Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Co-authored-by: Alexander Piskun <bigcat88@icloud.com>
2023-08-09 18:51:48 +03:00
3ff978e660 Caching adjustments. Refactoring, use service layers with caching (#14)
Changes:

- [x] removed last_response_time and related functions
- [x] renamed last_response_time->last_check_time usage (getExApps) in
nc_py_api @bigcat88
- [x] added docker container healthcheck before heartbeat exApp in
deployment process @andrey18106
- [x] added php lint, cs, psalm, security cheks ci @andrey18106 
- [x] reviewed caches usage
- [x] reviewed exception handling and logging
- [x] added ci for tests with redis
- [x] php-cs fixes

---------

Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Co-authored-by: Alexander Piskun <bigcat88@icloud.com>
2023-07-22 14:05:17 +03:00