@crowdin/crowdin-api-client
Version:
JavaScript library for Crowdin API
61 lines (60 loc) • 2.32 kB
TypeScript
import { CrowdinApi, PaginationOptions, PatchRequest, ResponseList, ResponseObject } from '../core';
export declare class StyleGuides extends CrowdinApi {
/**
* @param options optional parameters for the request
* @see https://developer.crowdin.com/api/v2/#operation/api.style-guides.getMany
*/
listStyleGuides(options?: StyleGuidesModel.ListStyleGuidesOptions): Promise<ResponseList<StyleGuidesModel.StyleGuide>>;
/**
* @param request request body
* @see https://developer.crowdin.com/api/v2/#operation/api.style-guides.post
*/
createStyleGuide(request: StyleGuidesModel.CreateStyleGuideRequest): Promise<ResponseObject<StyleGuidesModel.StyleGuide>>;
/**
* @param styleGuideId style guide identifier
* @see https://developer.crowdin.com/api/v2/#operation/api.style-guides.get
*/
getStyleGuide(styleGuideId: number): Promise<ResponseObject<StyleGuidesModel.StyleGuide>>;
/**
* @param styleGuideId style guide identifier
* @see https://developer.crowdin.com/api/v2/#operation/api.style-guides.delete
*/
deleteStyleGuide(styleGuideId: number): Promise<void>;
/**
* @param styleGuideId style guide identifier
* @param request request body
* @see https://developer.crowdin.com/api/v2/#operation/api.style-guides.patch
*/
editStyleGuide(styleGuideId: number, request: PatchRequest[]): Promise<ResponseObject<StyleGuidesModel.StyleGuide>>;
}
export declare namespace StyleGuidesModel {
interface StyleGuide {
id: number;
name: string;
aiInstructions: string | null;
userId: number;
languageIds: string[] | null;
projectIds: number[] | null;
isShared: boolean;
webUrl: string;
downloadLink: string;
createdAt: string;
updatedAt: string;
/** Enterprise only */
groupId?: number;
}
interface CreateStyleGuideRequest {
name: string;
storageId: number | null;
aiInstructions?: string;
languageIds?: string[];
projectIds?: number[];
isShared?: boolean;
/** Enterprise only */
groupId?: number | null;
}
interface ListStyleGuidesOptions extends PaginationOptions {
orderBy?: string;
userId?: number;
}
}