mirror of
https://github.com/immich-app/immich.git
synced 2026-02-09 11:20:00 +03:00
* feat: plugins * feat: table definition * feat: type and migration * feat: add repositories * feat: validate manifest with class-validator and load manifest info to database * feat: workflow/plugin controller/service layer * feat: implement workflow logic * feat: make trigger static * feat: dynamical instantiate plugin instances * fix: access control and helper script * feat: it works * chore: simplify * refactor: refactor and use queue for workflow execution * refactor: remove unsused property in plugin-schema * build wasm in prod * feat: plugin loader in transaction * fix: docker build arm64 * generated files * shell check * fix tests * fix: waiting for migration to finish before loading plugin * remove context reassignment * feat: use mise to manage extism tools (#23760) * pr feedback * refactor: create workflow now including create filters and actions * feat: workflow medium tests * fix: broken medium test * feat: medium tests * chore: unify workflow job * sign user id with jwt * chore: query plugin with filters and action * chore: read manifest in repository * chore: load manifest from server configs * merge main * feat: endpoint documentation * pr feedback * load plugin from absolute path * refactor:handle trigger * throw error and return early * pr feedback * unify plugin services * fix: plugins code * clean up * remove triggerConfig * clean up * displayName and methodName --------- Co-authored-by: Jason Rasmussen <jason@rasm.me> Co-authored-by: bo0tzz <git@bo0tzz.me>
160 lines
2.9 KiB
SQL
160 lines
2.9 KiB
SQL
-- NOTE: This file is auto generated by ./sql-generator
|
|
|
|
-- PluginRepository.getPlugin
|
|
select
|
|
"plugin"."id" as "id",
|
|
"plugin"."name" as "name",
|
|
"plugin"."title" as "title",
|
|
"plugin"."description" as "description",
|
|
"plugin"."author" as "author",
|
|
"plugin"."version" as "version",
|
|
"plugin"."wasmPath" as "wasmPath",
|
|
"plugin"."createdAt" as "createdAt",
|
|
"plugin"."updatedAt" as "updatedAt",
|
|
(
|
|
select
|
|
coalesce(json_agg(agg), '[]')
|
|
from
|
|
(
|
|
select
|
|
*
|
|
from
|
|
"plugin_filter"
|
|
where
|
|
"plugin_filter"."pluginId" = "plugin"."id"
|
|
) as agg
|
|
) as "filters",
|
|
(
|
|
select
|
|
coalesce(json_agg(agg), '[]')
|
|
from
|
|
(
|
|
select
|
|
*
|
|
from
|
|
"plugin_action"
|
|
where
|
|
"plugin_action"."pluginId" = "plugin"."id"
|
|
) as agg
|
|
) as "actions"
|
|
from
|
|
"plugin"
|
|
where
|
|
"plugin"."id" = $1
|
|
|
|
-- PluginRepository.getPluginByName
|
|
select
|
|
"plugin"."id" as "id",
|
|
"plugin"."name" as "name",
|
|
"plugin"."title" as "title",
|
|
"plugin"."description" as "description",
|
|
"plugin"."author" as "author",
|
|
"plugin"."version" as "version",
|
|
"plugin"."wasmPath" as "wasmPath",
|
|
"plugin"."createdAt" as "createdAt",
|
|
"plugin"."updatedAt" as "updatedAt",
|
|
(
|
|
select
|
|
coalesce(json_agg(agg), '[]')
|
|
from
|
|
(
|
|
select
|
|
*
|
|
from
|
|
"plugin_filter"
|
|
where
|
|
"plugin_filter"."pluginId" = "plugin"."id"
|
|
) as agg
|
|
) as "filters",
|
|
(
|
|
select
|
|
coalesce(json_agg(agg), '[]')
|
|
from
|
|
(
|
|
select
|
|
*
|
|
from
|
|
"plugin_action"
|
|
where
|
|
"plugin_action"."pluginId" = "plugin"."id"
|
|
) as agg
|
|
) as "actions"
|
|
from
|
|
"plugin"
|
|
where
|
|
"plugin"."name" = $1
|
|
|
|
-- PluginRepository.getAllPlugins
|
|
select
|
|
"plugin"."id" as "id",
|
|
"plugin"."name" as "name",
|
|
"plugin"."title" as "title",
|
|
"plugin"."description" as "description",
|
|
"plugin"."author" as "author",
|
|
"plugin"."version" as "version",
|
|
"plugin"."wasmPath" as "wasmPath",
|
|
"plugin"."createdAt" as "createdAt",
|
|
"plugin"."updatedAt" as "updatedAt",
|
|
(
|
|
select
|
|
coalesce(json_agg(agg), '[]')
|
|
from
|
|
(
|
|
select
|
|
*
|
|
from
|
|
"plugin_filter"
|
|
where
|
|
"plugin_filter"."pluginId" = "plugin"."id"
|
|
) as agg
|
|
) as "filters",
|
|
(
|
|
select
|
|
coalesce(json_agg(agg), '[]')
|
|
from
|
|
(
|
|
select
|
|
*
|
|
from
|
|
"plugin_action"
|
|
where
|
|
"plugin_action"."pluginId" = "plugin"."id"
|
|
) as agg
|
|
) as "actions"
|
|
from
|
|
"plugin"
|
|
order by
|
|
"plugin"."name"
|
|
|
|
-- PluginRepository.getFilter
|
|
select
|
|
*
|
|
from
|
|
"plugin_filter"
|
|
where
|
|
"id" = $1
|
|
|
|
-- PluginRepository.getFiltersByPlugin
|
|
select
|
|
*
|
|
from
|
|
"plugin_filter"
|
|
where
|
|
"pluginId" = $1
|
|
|
|
-- PluginRepository.getAction
|
|
select
|
|
*
|
|
from
|
|
"plugin_action"
|
|
where
|
|
"id" = $1
|
|
|
|
-- PluginRepository.getActionsByPlugin
|
|
select
|
|
*
|
|
from
|
|
"plugin_action"
|
|
where
|
|
"pluginId" = $1
|