1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- import { BaseCollection } from "./base_collection";
- import { Task } from "../models/task";
- import { PaginatedResult } from "../interfaces/paginated_result";
- import { ProjectWithPagination } from "../interfaces/project_with_pagination";
- import { ProjectOnly } from "../interfaces/project_only";
- interface ListTaskParams extends ProjectWithPagination {
- filter_title?: string;
- filter_statuses?: string;
- }
- type TaskLanguage = {
- language_iso: string;
- users?: string[] | number[];
- groups?: string[] | number[];
- };
- type CreateTaskParams = {
- title: string;
- description?: string;
- due_date?: string;
- keys?: string[] | number[];
- languages?: Array<TaskLanguage>;
- source_language_iso?: string;
- auto_close_languages?: boolean;
- auto_close_task?: boolean;
- auto_close_items?: boolean;
- task_type?: string;
- parent_task_id?: string | number;
- closing_tags?: string[];
- do_lock_translations?: boolean;
- custom_translation_status_ids?: string[] | number[];
- };
- type UpdateTaskParams = Omit<CreateTaskParams, "title" | "keys" | "source_language_iso" | "task_type" | "parent_task_id" | "custom_translation_status_ids"> & {
- title?: string;
- close_task?: boolean;
- languages?: Array<TaskLanguage & {
- close_language?: boolean;
- }>;
- };
- type TaskDeleted = {
- project_id: string;
- task_deleted: boolean;
- };
- export declare class Tasks extends BaseCollection {
- protected static rootElementName: string;
- protected static rootElementNameSingular: string;
- protected static prefixURI: string;
- protected static elementClass: typeof Task;
- list(request_params: ListTaskParams): Promise<PaginatedResult<Task>>;
- create(task_params: CreateTaskParams, request_params: ProjectOnly): Promise<Task>;
- get(task_id: string | number, request_params: ProjectOnly): Promise<Task>;
- update(task_id: string | number, task_params: UpdateTaskParams, request_params: ProjectOnly): Promise<Task>;
- delete(task_id: string | number, request_params: ProjectOnly): Promise<TaskDeleted>;
- }
- export {};
|