mirror of
https://github.com/penpot/penpot.git
synced 2025-05-13 21:46:38 +02:00
✨ Use sm/define on management rpc comnand schemas
This commit is contained in:
parent
daec51bb7d
commit
f5ec818fc7
1 changed files with 30 additions and 20 deletions
|
@ -34,10 +34,12 @@
|
||||||
|
|
||||||
(declare duplicate-file)
|
(declare duplicate-file)
|
||||||
|
|
||||||
(def ^:private schema:duplicate-file
|
(def ^:private
|
||||||
|
schema:duplicate-file
|
||||||
|
(sm/define
|
||||||
[:map {:title "duplicate-file"}
|
[:map {:title "duplicate-file"}
|
||||||
[:file-id ::sm/uuid]
|
[:file-id ::sm/uuid]
|
||||||
[:name {:optional true} :string]])
|
[:name {:optional true} :string]]))
|
||||||
|
|
||||||
(sv/defmethod ::duplicate-file
|
(sv/defmethod ::duplicate-file
|
||||||
"Duplicate a single file in the same team."
|
"Duplicate a single file in the same team."
|
||||||
|
@ -210,10 +212,12 @@
|
||||||
|
|
||||||
(declare duplicate-project)
|
(declare duplicate-project)
|
||||||
|
|
||||||
(def ^:private schema:duplicate-project
|
(def ^:private
|
||||||
|
schema:duplicate-project
|
||||||
|
(sm/define
|
||||||
[:map {:title "duplicate-project"}
|
[:map {:title "duplicate-project"}
|
||||||
[:project-id ::sm/uuid]
|
[:project-id ::sm/uuid]
|
||||||
[:name {:optional true} :string]])
|
[:name {:optional true} :string]]))
|
||||||
|
|
||||||
(sv/defmethod ::duplicate-project
|
(sv/defmethod ::duplicate-project
|
||||||
"Duplicate an entire project with all the files"
|
"Duplicate an entire project with all the files"
|
||||||
|
@ -337,10 +341,12 @@
|
||||||
|
|
||||||
nil))
|
nil))
|
||||||
|
|
||||||
(def ^:private schema:move-files
|
(def ^:private
|
||||||
|
schema:move-files
|
||||||
|
(sm/define
|
||||||
[:map {:title "move-files"}
|
[:map {:title "move-files"}
|
||||||
[:ids ::sm/set-of-uuid]
|
[:ids ::sm/set-of-uuid]
|
||||||
[:project-id ::sm/uuid]])
|
[:project-id ::sm/uuid]]))
|
||||||
|
|
||||||
(sv/defmethod ::move-files
|
(sv/defmethod ::move-files
|
||||||
"Move a set of files from one project to other."
|
"Move a set of files from one project to other."
|
||||||
|
@ -382,10 +388,12 @@
|
||||||
|
|
||||||
nil))
|
nil))
|
||||||
|
|
||||||
(def ^:private schema:move-project
|
(def ^:private
|
||||||
|
schema:move-project
|
||||||
|
(sm/define
|
||||||
[:map {:title "move-project"}
|
[:map {:title "move-project"}
|
||||||
[:team-id ::sm/uuid]
|
[:team-id ::sm/uuid]
|
||||||
[:project-id ::sm/uuid]])
|
[:project-id ::sm/uuid]]))
|
||||||
|
|
||||||
(sv/defmethod ::move-project
|
(sv/defmethod ::move-project
|
||||||
"Move projects between teams"
|
"Move projects between teams"
|
||||||
|
@ -420,10 +428,12 @@
|
||||||
(assoc ::binfile/migrate? true)
|
(assoc ::binfile/migrate? true)
|
||||||
(binfile/import!))))
|
(binfile/import!))))
|
||||||
|
|
||||||
(def schema:clone-template
|
(def ^:private
|
||||||
|
schema:clone-template
|
||||||
|
(sm/define
|
||||||
[:map {:title "clone-template"}
|
[:map {:title "clone-template"}
|
||||||
[:project-id ::sm/uuid]
|
[:project-id ::sm/uuid]
|
||||||
[:template-id ::sm/word-string]])
|
[:template-id ::sm/word-string]]))
|
||||||
|
|
||||||
(sv/defmethod ::clone-template
|
(sv/defmethod ::clone-template
|
||||||
"Clone into the specified project the template by its id."
|
"Clone into the specified project the template by its id."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue