@crowdin/crowdin-api-client
Version:
JavaScript library for Crowdin API
71 lines (70 loc) • 2.49 kB
TypeScript
import { CrowdinApi, PaginationOptions, PatchRequest, ResponseList, ResponseObject } from '../core';
/**
* @deprecated
* @ignore
*/
export declare class Issues extends CrowdinApi {
/**
* @deprecated
* @param projectId project identifier
* @param options optional parameters for listing reported issues
* @see https://developer.crowdin.com/api/v2/#operation/api.projects.issues.getMany
*/
listReportedIssues(projectId: number, options?: IssuesModel.ListReportedIssuesOptions): Promise<ResponseList<IssuesModel.Issue>>;
/**
* @param projectId project identifier
* @param limit maximum number of items to retrieve (default 25)
* @param offset starting offset in the collection (default 0)
* @param type defines the issue type
* @param status defines the issue resolution status
* @deprecated optional parameters should be passed through an object
* @see https://developer.crowdin.com/api/v2/#operation/api.projects.issues.getMany
*/
listReportedIssues(projectId: number, limit?: number, offset?: number, type?: IssuesModel.Type, status?: IssuesModel.Status): Promise<ResponseList<IssuesModel.Issue>>;
/**
* @deprecated
* @param projectId project identifier
* @param issueId issue identifier
* @param request request body
* @see https://developer.crowdin.com/api/v2/#operation/api.projects.issues.patch
*/
editIssue(projectId: number, issueId: number, request: PatchRequest[]): Promise<ResponseObject<IssuesModel.Issue>>;
}
/**
* @deprecated
*/
export declare namespace IssuesModel {
type Type = 'all' | 'general_question' | 'translation_mistake' | 'context_request' | 'source_mistake';
type Status = 'all' | 'resolved' | 'unresolved';
interface Issue {
id: number;
text: string;
userId: number;
stringId: number;
user: User;
string: string;
languageId: string;
type: Type;
status: Status;
createdAt: string;
}
interface User {
id: number;
username: string;
fullName: string;
avatarUrl: string;
}
interface String {
id: number;
text: string;
type: string;
hasPlurals: boolean;
isIcu: boolean;
context: string;
fileId: number;
}
interface ListReportedIssuesOptions extends PaginationOptions {
type?: IssuesModel.Type;
status?: IssuesModel.Status;
}
}