@crowdin/crowdin-api-client
Advanced tools
Comparing version 1.26.0 to 1.27.0
@@ -54,4 +54,4 @@ "use strict"; | ||
crowdinResponseErrors.forEach((e) => { | ||
var _a; | ||
if (e.error.key && Array.isArray((_a = e.error) === null || _a === void 0 ? void 0 : _a.errors)) { | ||
var _a, _b; | ||
if (((_a = e.error) === null || _a === void 0 ? void 0 : _a.key) && Array.isArray((_b = e.error) === null || _b === void 0 ? void 0 : _b.errors)) { | ||
const codes = []; | ||
@@ -58,0 +58,0 @@ e.error.errors.forEach((er) => { |
@@ -125,2 +125,33 @@ import { BooleanInt, CrowdinApi, DownloadLink, PaginationOptions, PatchRequest, ResponseList, ResponseObject } from '../core'; | ||
editProjectFileFormatSettings(projectId: number, fileFormatSettingsId: number, request: PatchRequest[]): Promise<ResponseObject<ProjectsGroupsModel.ProjectFileFormatSettings>>; | ||
/** | ||
* @param projectId project identifier | ||
* @param options optional parameters for the request | ||
* @see https://developer.crowdin.com/api/v2/#operation/api.projects.strings-exporter-settings.getMany | ||
*/ | ||
listProjectStringsExporterSettings(projectId: number, options?: PaginationOptions): Promise<ResponseList<ProjectsGroupsModel.ProjectStringsExporterSettings>>; | ||
/** | ||
* @param projectId project identifier | ||
* @param request request body | ||
* @see https://developer.crowdin.com/api/v2/#operation/api.projects.strings-exporter-settings.post | ||
*/ | ||
addProjectStringsExporterSettings(projectId: number, request: ProjectsGroupsModel.AddProjectStringsExporterSettingsRequest): Promise<ResponseObject<ProjectsGroupsModel.ProjectStringsExporterSettings>>; | ||
/** | ||
* @param projectId project identifier | ||
* @param systemStringsExporterSettingsId file format settings identifier | ||
* @see https://developer.crowdin.com/api/v2/#operation/api.projects.strings-exporter-settings.get | ||
*/ | ||
getProjectStringsExporterSettings(projectId: number, systemStringsExporterSettingsId: number): Promise<ResponseObject<ProjectsGroupsModel.ProjectStringsExporterSettings>>; | ||
/** | ||
* @param projectId project identifier | ||
* @param systemStringsExporterSettingsId file format settings identifier | ||
* @see https://developer.crowdin.com/api/v2/#operation/api.projects.strings-exporter-settings.delete | ||
*/ | ||
deleteProjectStringsExporterSettings(projectId: number, systemStringsExporterSettingsId: number): Promise<void>; | ||
/** | ||
* @param projectId project identifier | ||
* @param systemStringsExporterSettingsId file format settings identifier | ||
* @param request request body | ||
* @see https://developer.crowdin.com/api/v2/#operation/api.projects.strings-exporter-settings.patch | ||
*/ | ||
editProjectStringsExporterSettings(projectId: number, systemStringsExporterSettingsId: number, request: ProjectsGroupsModel.AddProjectStringsExporterSettingsRequest): Promise<ResponseObject<ProjectsGroupsModel.ProjectStringsExporterSettings>>; | ||
} | ||
@@ -408,2 +439,23 @@ export declare namespace ProjectsGroupsModel { | ||
} | ||
type StringsExporterSettings = AndroidStringsExporterSettings | MacOSXStringsExporterSettings | XliffStringsExporterSettings; | ||
interface ProjectStringsExporterSettings { | ||
id: number; | ||
format: string; | ||
settings: StringsExporterSettings; | ||
createdAt: string; | ||
updatedAt: string; | ||
} | ||
interface AndroidStringsExporterSettings { | ||
convertPlaceholders?: boolean; | ||
} | ||
interface MacOSXStringsExporterSettings { | ||
convertPlaceholders?: boolean; | ||
} | ||
interface XliffStringsExporterSettings { | ||
convertPlaceholders?: boolean; | ||
} | ||
interface AddProjectStringsExporterSettingsRequest { | ||
format: string; | ||
settings: StringsExporterSettings; | ||
} | ||
} |
@@ -172,2 +172,48 @@ "use strict"; | ||
} | ||
/** | ||
* @param projectId project identifier | ||
* @param options optional parameters for the request | ||
* @see https://developer.crowdin.com/api/v2/#operation/api.projects.strings-exporter-settings.getMany | ||
*/ | ||
listProjectStringsExporterSettings(projectId, options) { | ||
const url = `${this.url}/projects/${projectId}/strings-exporter-settings`; | ||
return this.getList(url, options === null || options === void 0 ? void 0 : options.limit, options === null || options === void 0 ? void 0 : options.offset); | ||
} | ||
/** | ||
* @param projectId project identifier | ||
* @param request request body | ||
* @see https://developer.crowdin.com/api/v2/#operation/api.projects.strings-exporter-settings.post | ||
*/ | ||
addProjectStringsExporterSettings(projectId, request) { | ||
const url = `${this.url}/projects/${projectId}/strings-exporter-settings`; | ||
return this.post(url, request, this.defaultConfig()); | ||
} | ||
/** | ||
* @param projectId project identifier | ||
* @param systemStringsExporterSettingsId file format settings identifier | ||
* @see https://developer.crowdin.com/api/v2/#operation/api.projects.strings-exporter-settings.get | ||
*/ | ||
getProjectStringsExporterSettings(projectId, systemStringsExporterSettingsId) { | ||
const url = `${this.url}/projects/${projectId}/strings-exporter-settings/${systemStringsExporterSettingsId}`; | ||
return this.get(url, this.defaultConfig()); | ||
} | ||
/** | ||
* @param projectId project identifier | ||
* @param systemStringsExporterSettingsId file format settings identifier | ||
* @see https://developer.crowdin.com/api/v2/#operation/api.projects.strings-exporter-settings.delete | ||
*/ | ||
deleteProjectStringsExporterSettings(projectId, systemStringsExporterSettingsId) { | ||
const url = `${this.url}/projects/${projectId}/strings-exporter-settings/${systemStringsExporterSettingsId}`; | ||
return this.delete(url, this.defaultConfig()); | ||
} | ||
/** | ||
* @param projectId project identifier | ||
* @param systemStringsExporterSettingsId file format settings identifier | ||
* @param request request body | ||
* @see https://developer.crowdin.com/api/v2/#operation/api.projects.strings-exporter-settings.patch | ||
*/ | ||
editProjectStringsExporterSettings(projectId, systemStringsExporterSettingsId, request) { | ||
const url = `${this.url}/projects/${projectId}/strings-exporter-settings/${systemStringsExporterSettingsId}`; | ||
return this.patch(url, request, this.defaultConfig()); | ||
} | ||
} | ||
@@ -174,0 +220,0 @@ exports.ProjectsGroups = ProjectsGroups; |
{ | ||
"name": "@crowdin/crowdin-api-client", | ||
"version": "1.26.0", | ||
"version": "1.27.0", | ||
"description": "JavaScript library for Crowdin API", | ||
@@ -5,0 +5,0 @@ "main": "out/index.js", |
397415
9063