File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,10 @@ export class ApiImport extends ApiBase {
1919 *
2020 * @see {@link https://localazy.com/docs/api/import#import-content-to-a-project Localazy API Docs }
2121 */
22- public async json ( request : ImportJsonRequest , config ?: RequestConfig ) : Promise < File > {
22+ public async json (
23+ request : ImportJsonRequest ,
24+ config ?: RequestConfig ,
25+ ) : Promise < ReturnType < ApiImport [ 'getImportedFile' ] > > {
2326 const { project, json } : ImportJsonRequest = request ;
2427 const projectId : string = ApiBase . getId ( project , 'project' ) ;
2528 const chunks : I18nJson [ ] = JsonUtils . slice ( json ) ;
@@ -36,7 +39,11 @@ export class ApiImport extends ApiBase {
3639 return this . getImportedFile ( project , data , result ) ;
3740 }
3841
39- protected async getImportedFile ( project : string | Project , data : ImportData , importBatch : string ) : Promise < File > {
42+ protected async getImportedFile (
43+ project : string | Project ,
44+ data : ImportData ,
45+ importBatch : string ,
46+ ) : Promise < File & { importBatch : string } > {
4047 const files : File [ ] = await this . api . files . list ( { project } ) ;
4148 const file : File | undefined = files . find ( ( f : File ) : boolean =>
4249 data . files . some (
You can’t perform that action at this time.
0 commit comments