|
@@ -1,6 +1,6 @@
|
|
package com.example.kdan_data_center.datacenter.file
|
|
package com.example.kdan_data_center.datacenter.file
|
|
|
|
|
|
-import com.example.kdan_data_center.datacenter.file.body.SyncBody
|
|
|
|
|
|
+import com.example.kdan_data_center.datacenter.file.body.SyncFileBody
|
|
import com.example.kdan_data_center.datacenter.file.body.UploadMissionBody
|
|
import com.example.kdan_data_center.datacenter.file.body.UploadMissionBody
|
|
import com.example.kdan_data_center.datacenter.file.data.*
|
|
import com.example.kdan_data_center.datacenter.file.data.*
|
|
import io.reactivex.Observable
|
|
import io.reactivex.Observable
|
|
@@ -42,7 +42,7 @@ interface FileService {
|
|
@Field("object_id") objectId: Int,
|
|
@Field("object_id") objectId: Int,
|
|
@Field("project_name") projectName: String?,
|
|
@Field("project_name") projectName: String?,
|
|
@Field("parent_id") parentId: Int?
|
|
@Field("parent_id") parentId: Int?
|
|
- )
|
|
|
|
|
|
+ ): Observable<FileInfoData>
|
|
|
|
|
|
@HTTP(method = "DELETE", path = ".", hasBody = true)
|
|
@HTTP(method = "DELETE", path = ".", hasBody = true)
|
|
@FormUrlEncoded
|
|
@FormUrlEncoded
|
|
@@ -65,14 +65,14 @@ interface FileService {
|
|
@Header("Authorization") accessToken: String,
|
|
@Header("Authorization") accessToken: String,
|
|
@Field("object_type") objectType: String?,
|
|
@Field("object_type") objectType: String?,
|
|
@Field("object_id") objectId: Int
|
|
@Field("object_id") objectId: Int
|
|
- )
|
|
|
|
|
|
+ ): Observable<MutiFileInfoData>
|
|
|
|
|
|
@HTTP(method = "DELETE", path = "hard_destroy", hasBody = true)
|
|
@HTTP(method = "DELETE", path = "hard_destroy", hasBody = true)
|
|
fun hardDeleteFile(
|
|
fun hardDeleteFile(
|
|
@Header("Authorization") accessToken: String,
|
|
@Header("Authorization") accessToken: String,
|
|
@Field("object_type") objectType: String?,
|
|
@Field("object_type") objectType: String?,
|
|
- @Field("object_id_list") objectIdList: Array<Int>
|
|
|
|
- )
|
|
|
|
|
|
+ @Field("object_id_list[]") objectIdList: IntArray
|
|
|
|
+ ): Observable<MutiFileInfoData>
|
|
|
|
|
|
@HTTP(method = "DELETE", path = "clean", hasBody = true)
|
|
@HTTP(method = "DELETE", path = "clean", hasBody = true)
|
|
fun cleanDeleteFile(
|
|
fun cleanDeleteFile(
|
|
@@ -102,16 +102,16 @@ interface FileService {
|
|
@Field("object_type") objectType: String?,
|
|
@Field("object_type") objectType: String?,
|
|
@Field("object_id") objectId: Int,
|
|
@Field("object_id") objectId: Int,
|
|
@Field("parent_id") parentId: Int
|
|
@Field("parent_id") parentId: Int
|
|
- )
|
|
|
|
|
|
+ ): Observable<MutiFileInfoData>
|
|
|
|
|
|
@POST("copy")
|
|
@POST("copy")
|
|
@FormUrlEncoded
|
|
@FormUrlEncoded
|
|
fun copyFile(
|
|
fun copyFile(
|
|
@Header("Authorization") accessToken: String,
|
|
@Header("Authorization") accessToken: String,
|
|
@Field("object_type") objectType: String?,
|
|
@Field("object_type") objectType: String?,
|
|
- @Field("object_id_list") objectIdList: Array<Int>,
|
|
|
|
|
|
+ @Field("object_id_list[]") objectIdList: IntArray,
|
|
@Field("parent_id") parentId: Int
|
|
@Field("parent_id") parentId: Int
|
|
- )
|
|
|
|
|
|
+ ): Observable<MutiFileInfoData>
|
|
|
|
|
|
@PUT("move")
|
|
@PUT("move")
|
|
@FormUrlEncoded
|
|
@FormUrlEncoded
|
|
@@ -120,23 +120,23 @@ interface FileService {
|
|
@Field("object_type") objectType: String?,
|
|
@Field("object_type") objectType: String?,
|
|
@Field("object_id") objectId: Int,
|
|
@Field("object_id") objectId: Int,
|
|
@Field("parent_id") parentId: Int
|
|
@Field("parent_id") parentId: Int
|
|
- )
|
|
|
|
|
|
+ ): Observable<MutiFileInfoData>
|
|
|
|
|
|
@PUT("move")
|
|
@PUT("move")
|
|
@FormUrlEncoded
|
|
@FormUrlEncoded
|
|
fun moveFile(
|
|
fun moveFile(
|
|
@Header("Authorization") accessToken: String,
|
|
@Header("Authorization") accessToken: String,
|
|
@Field("object_type") objectType: String?,
|
|
@Field("object_type") objectType: String?,
|
|
- @Field("object_id_list") objectIdList: Array<Int>,
|
|
|
|
|
|
+ @Field("object_id_list[]") objectIdList: IntArray,
|
|
@Field("parent_id") parentId: Int
|
|
@Field("parent_id") parentId: Int
|
|
- )
|
|
|
|
|
|
+ ): Observable<MutiFileInfoData>
|
|
|
|
|
|
@GET("download_url")
|
|
@GET("download_url")
|
|
- fun getDownloadUrl(
|
|
|
|
|
|
+ fun getFileDownloadUrl(
|
|
@Header("Authorization") accessToken: String,
|
|
@Header("Authorization") accessToken: String,
|
|
@Query("object_id") objectId: Int,
|
|
@Query("object_id") objectId: Int,
|
|
@Query("object_type") objectType: String?
|
|
@Query("object_type") objectType: String?
|
|
- ): Observable<DownloadUrlData>
|
|
|
|
|
|
+ ): Observable<FileDownloadUrlData>
|
|
|
|
|
|
@GET("data_source_url")
|
|
@GET("data_source_url")
|
|
fun getDataSourceUrl(
|
|
fun getDataSourceUrl(
|
|
@@ -161,12 +161,12 @@ interface FileService {
|
|
@GET("preview_info")
|
|
@GET("preview_info")
|
|
fun getFilePreviewInfo(
|
|
fun getFilePreviewInfo(
|
|
@Query("token") previewToken: String
|
|
@Query("token") previewToken: String
|
|
- )
|
|
|
|
|
|
+ ): Observable<FilePreviewInfoData>
|
|
|
|
|
|
@PUT("sync_architecture")
|
|
@PUT("sync_architecture")
|
|
- fun sync(
|
|
|
|
|
|
+ fun syncFile(
|
|
@Header("Authorization") accessToken: String,
|
|
@Header("Authorization") accessToken: String,
|
|
@Header("Content-Type") contentType: String,
|
|
@Header("Content-Type") contentType: String,
|
|
- @Body syncBody: SyncBody
|
|
|
|
- ): Observable<SyncData>
|
|
|
|
|
|
+ @Body syncFileBody: SyncFileBody
|
|
|
|
+ ): Observable<SyncFileData>
|
|
}
|
|
}
|