@@ -63,6 +63,9 @@ public function __construct($appName, IRequest $request, $corsMethods, $corsAllo
6363
6464 /**
6565 * @NoAdminRequired
66+ *
67+ * Get the direct editing capabilities
68+ * @return DataResponse<Http::STATUS_OK, array{editors: array<string, array{id: string, name: string, mimetypes: string[], optionalMimetypes: string[], secure: bool}>, creators: array<string, array{id: string, editor: string, name: string, extension: string, templates: bool, mimetypes: string[]}>}, array{}>
6669 */
6770 public function info (): DataResponse {
6871 $ response = new DataResponse ($ this ->directEditingService ->getDirectEditingCapabilitites ());
@@ -72,6 +75,18 @@ public function info(): DataResponse {
7275
7376 /**
7477 * @NoAdminRequired
78+ *
79+ * Create a file for direct editing
80+ *
81+ * @param string $path Path of the file
82+ * @param string $editorId ID of the editor
83+ * @param string $creatorId ID of the creator
84+ * @param ?string $templateId ID of the template
85+ *
86+ * @return DataResponse<Http::STATUS_OK, array{url: string}, array{}>|DataResponse<Http::STATUS_FORBIDDEN|Http::STATUS_INTERNAL_SERVER_ERROR, array{message: string}, array{}>
87+ *
88+ * 200: URL for direct editing returned
89+ * 403: Opening file is not allowed
7590 */
7691 public function create (string $ path , string $ editorId , string $ creatorId , string $ templateId = null ): DataResponse {
7792 if (!$ this ->directEditingManager ->isEnabled ()) {
@@ -92,6 +107,17 @@ public function create(string $path, string $editorId, string $creatorId, string
92107
93108 /**
94109 * @NoAdminRequired
110+ *
111+ * Open a file for direct editing
112+ *
113+ * @param string $path Path of the file
114+ * @param ?string $editorId ID of the editor
115+ * @param ?int $fileId ID of the file
116+ *
117+ * @return DataResponse<Http::STATUS_OK, array{url: string}, array{}>|DataResponse<Http::STATUS_FORBIDDEN|Http::STATUS_INTERNAL_SERVER_ERROR, array{message: string}, array{}>
118+ *
119+ * 200: URL for direct editing returned
120+ * 403: Opening file is not allowed
95121 */
96122 public function open (string $ path , string $ editorId = null , ?int $ fileId = null ): DataResponse {
97123 if (!$ this ->directEditingManager ->isEnabled ()) {
@@ -114,6 +140,15 @@ public function open(string $path, string $editorId = null, ?int $fileId = null)
114140
115141 /**
116142 * @NoAdminRequired
143+ *
144+ * Get the templates for direct editing
145+ *
146+ * @param string $editorId ID of the editor
147+ * @param string $creatorId ID of the creator
148+ *
149+ * @return DataResponse<Http::STATUS_OK, array{templates: array<string, array{id: string, title: string, preview: ?string, extension: string, mimetype: string}>}, array{}>|DataResponse<Http::STATUS_INTERNAL_SERVER_ERROR, array{message: string}, array{}>
150+ *
151+ * 200: Templates returned
117152 */
118153 public function templates (string $ editorId , string $ creatorId ): DataResponse {
119154 if (!$ this ->directEditingManager ->isEnabled ()) {
0 commit comments