11import { PluginOptions } from '../../types' ;
22import {
3- ResponseObject ,
43 SourceFilesModel ,
54 UploadStorageModel ,
65 TranslationsModel ,
@@ -32,10 +31,6 @@ class crowdinAPIWrapper {
3231 this . branchId = 4 ;
3332 }
3433
35- async listFileRevisions ( projectId : number , fileId : number ) {
36- return await Promise . resolve ( 1 ) . then ( ( ) => undefined ) ;
37- }
38-
3934 createDirectory ( {
4035 id,
4136 request = {
@@ -84,14 +79,6 @@ class crowdinAPIWrapper {
8479 return storage ;
8580 }
8681
87- async deleteFile ( projectId : number , fileId : number ) : Promise < void > {
88- await Promise . resolve ( 1 ) . then ( ( ) => undefined ) ;
89- }
90-
91- async deleteDirectory ( projectId : number , directoryId : number ) : Promise < void > {
92- await Promise . resolve ( 1 ) . then ( ( ) => undefined ) ;
93- }
94-
9582 /**
9683 * createFile
9784 *
@@ -122,8 +109,8 @@ class crowdinAPIWrapper {
122109 revisionId : 5 ,
123110 status : 'active' ,
124111 priority : 'normal' as SourceFilesModel . Priority ,
125- importOptions : { } as any ,
126- exportOptions : { } as any ,
112+ importOptions : { } ,
113+ exportOptions : { } ,
127114 excludedTargetLanguages : [ ] ,
128115 createdAt : date ,
129116 updatedAt : date ,
@@ -137,31 +124,26 @@ class crowdinAPIWrapper {
137124 path : `/policies/security-and-privacy/${ request . name || 'fields' } ` ,
138125 parserVersion : 3 ,
139126 context : '' ,
127+ fields : [ ]
140128 } ,
141129 } ;
142130 return file ;
143131 }
144132
145133 updateOrRestoreFile ( {
146134 fileId = 1079 ,
147- request,
148135 } : {
149136 fileId : number ;
150137 request ?: SourceFilesModel . ReplaceFileFromStorageRequest ;
151138 } ) : { data : SourceFilesModel . File } {
152- /*const storageId = await this.addStorage({
153- name,
154- fileData,
155- fileType,
156- })*/
157139 const date = new Date ( ) . toISOString ( ) ;
158140 const file = {
159141 data : {
160142 revisionId : 5 ,
161143 status : 'active' ,
162144 priority : 'normal' as SourceFilesModel . Priority ,
163- importOptions : { } as any ,
164- exportOptions : { } as any ,
145+ importOptions : { } ,
146+ exportOptions : { } ,
165147 excludedTargetLanguages : [ ] ,
166148 createdAt : date ,
167149 updatedAt : date ,
@@ -175,6 +157,7 @@ class crowdinAPIWrapper {
175157 path : `/policies/security-and-privacy/file.filetype` ,
176158 parserVersion : 3 ,
177159 context : '' ,
160+ fields : [ ]
178161 } ,
179162 } ;
180163 return file ;
0 commit comments