Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
yevheniyJ committed Jul 7, 2024
1 parent 3a0de80 commit 7ea11b0
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions src/sourceFiles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export class SourceFiles extends CrowdinApi {
}
let url = `${this.url}/projects/${projectId}/branches`;
url = this.addQueryParam(url, 'name', options.name);
url = this.addQueryParam(url, 'orderBy', options.orderBy);
return this.getList(url, options.limit, options.offset);
}

Expand Down Expand Up @@ -154,6 +155,7 @@ export class SourceFiles extends CrowdinApi {
url = this.addQueryParam(url, 'directoryId', options.directoryId);
url = this.addQueryParam(url, 'filter', options.filter);
url = this.addQueryParam(url, 'recursion', options.recursion);
url = this.addQueryParam(url, 'orderBy', options.orderBy);
return this.getList(url, options.limit, options.offset);
}

Expand Down Expand Up @@ -258,6 +260,7 @@ export class SourceFiles extends CrowdinApi {
url = this.addQueryParam(url, 'directoryId', options.directoryId);
url = this.addQueryParam(url, 'recursion', options.recursion);
url = this.addQueryParam(url, 'filter', options.filter);
url = this.addQueryParam(url, 'orderBy', options.orderBy);
return this.getList(url, options.limit, options.offset);
}

Expand Down Expand Up @@ -497,6 +500,7 @@ export namespace SourceFilesModel {
directoryId?: number;
filter?: string;
recursion?: string;
orderBy?: string;
}

export interface Directory {
Expand All @@ -514,9 +518,9 @@ export namespace SourceFilesModel {
}

export interface CreateDirectoryRequest {
name: string;
branchId?: number;
directoryId?: number;
name: string;
title?: string;
exportPattern?: string;
priority?: Priority;
Expand All @@ -527,6 +531,7 @@ export namespace SourceFilesModel {
directoryId?: number;
recursion?: any;
filter?: string;
orderBy?: string;
}

export interface File {
Expand All @@ -548,6 +553,7 @@ export namespace SourceFilesModel {
parserVersion: number;
createdAt: string;
updatedAt: string;
fields?: any;
}

export interface CreateFileRequest {
Expand All @@ -561,19 +567,23 @@ export namespace SourceFilesModel {
parserVersion?: number;
importOptions?: ImportOptions;
exportOptions?: GeneralExportOptions | PropertyExportOptions;
attachLabelIds?: number[];
excludedTargetLanguages?: string[];
attachLabelIds?: number[];
fields?: any;
}

export interface ReplaceFileFromStorageRequest {
storageId: number;
name?: string;
updateOption?: UpdateOption;
importOptions?: ImportOptions;
exportOptions?: GeneralExportOptions | PropertyExportOptions | JavaScriptExportOptions;
exportOptions?: GeneralExportOptions | PropertyExportOptions | JavaScriptExportOptions | MdExportOptions;
attachLabelIds?: number[];
detachLabelIds?: number[];
replaceModifiedContext?: boolean;
}

//TODO review types
export type ImportOptions =
| SpreadsheetImportOptions
| XmlImportOptions
Expand Down Expand Up @@ -722,6 +732,14 @@ export namespace SourceFilesModel {
exportQuotes?: ExportQuotes;
}

export interface MdExportOptions {
exportPattern?: string;
strongMarker?: 'asterisk' | 'underscore';
emphasisMarker?: 'asterisk' | 'underscore';
unorderedListBullet?: 'asterisks' | 'plus' | 'plus';
tableColumnWidth?: 'consolidate' | 'evenly_distribute_cells';
}

export enum EscapeQuotes {
ZERO = 0,
ONE = 1,
Expand Down Expand Up @@ -758,6 +776,7 @@ export namespace SourceFilesModel {

export interface ListProjectBranchesOptions extends PaginationOptions {
name?: string;
orderBy?: string;
}

export interface ListReviewedSourceFilesBuildOptions extends PaginationOptions {
Expand Down

0 comments on commit 7ea11b0

Please sign in to comment.