UNPKG

@zeplin/sdk

Version:
415 lines (414 loc) 23.4 kB
/** * Zeplin API * Access your resources in Zeplin * * Contact: support@zeplin.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { AxiosPromise, AxiosInstance, AxiosResponse } from 'axios'; import { Configuration } from '../configuration'; import { RequestArgs, BaseAPI } from '../base'; import { DesignTokens } from '../models'; import { Project } from '../models'; import { Styleguide } from '../models'; import { StyleguideMember } from '../models'; import { StyleguideMemberInviteBody } from '../models'; import { StyleguideStatusEnum } from '../models'; import { StyleguideUpdateBody } from '../models'; /** * StyleguidesApi - axios parameter creator * @export */ export declare const StyleguidesApiAxiosParamCreator: (configuration?: Configuration | undefined) => { /** * Returns a single styleguide that user has access. User is considered eligible to access a styleguide if any of the following conditions is met: * User is a member of the styleguide * User is a member of the organization that the styleguide belongs to * User is a member of a project which is linked to the styleguide (using `linked_project` parameter) * User is a member of a project and the styleguide is an ancestor of the project\'s linked styleguide (using `linked_project` parameter) * User is a member of a styleguide that the styleguide is one of its ancestors (using `linked_styleguide` parameter) * @summary Get a single styleguide * @param {string} styleguideId Styleguide id * @param {string} [linkedProject] Reference project id * @param {string} [linkedStyleguide] Reference styleguide id * @param {*} [options] Override http request option. * @throws {RequiredError} */ getStyleguide: (styleguideId: string, linkedProject?: string | undefined, linkedStyleguide?: string | undefined, options?: any) => Promise<RequestArgs>; /** * Fetch all design tokens of the styleguide * @summary Get styleguide design tokens * @param {string} styleguideId Styleguide id * @param {boolean} [includeLinkedStyleguides] Whether to include linked styleguides or not * @param {'kebab' | 'snake' | 'camel' | 'pascal' | 'constant' | 'original'} [tokenNameCase] Case for token names * @param {*} [options] Override http request option. * @throws {RequiredError} */ getStyleguideDesignTokens: (styleguideId: string, includeLinkedStyleguides?: boolean | undefined, tokenNameCase?: "kebab" | "snake" | "camel" | "pascal" | "constant" | "original" | undefined, options?: any) => Promise<RequestArgs>; /** * List all projects linked to the styleguide * @summary Get linked projects * @param {string} styleguideId Styleguide id * @param {number} [limit] Pagination limit * @param {number} [offset] Pagination offset * @param {*} [options] Override http request option. * @throws {RequiredError} */ getStyleguideLinkedProjects: (styleguideId: string, limit?: number | undefined, offset?: number | undefined, options?: any) => Promise<RequestArgs>; /** * Returns members of a styleguide that user has access. See [Styleguide docs](#getstyleguide) for more details about how `linked_project` and `linked_styleguide` parameters can be used to retrieve resources from styleguides that user is eligible to access. * @summary Get styleguide members * @param {string} styleguideId Styleguide id * @param {number} [limit] Pagination limit * @param {number} [offset] Pagination offset * @param {string} [linkedProject] Reference project id * @param {string} [linkedStyleguide] Reference styleguide id * @param {*} [options] Override http request option. * @throws {RequiredError} */ getStyleguideMembers: (styleguideId: string, limit?: number | undefined, offset?: number | undefined, linkedProject?: string | undefined, linkedStyleguide?: string | undefined, options?: any) => Promise<RequestArgs>; /** * Lists all styleguides user is a member of unless `linked_project` or `linked_styleguide` parameter is given. If `linked_project` parameter is provided, lists styleguide linked to the given project and its ancestors. Returns error if the project referenced with `linked_project` is not accessible. Simiarly, lists styleguide linked to the given styleguide and its ancestors if `linked_styleguide` parameter is provided. Returns error if the styleguide referenced with `linked_styleguide` is not accessible. ☝️ `linked_project` and `linked_styleguide` should not be used in conjunction. Also, styleguides can be filtered by workspace using the `workspace` parameter. `workspace` parameter is ignored when `linked_project` or `linked_styleguide` parameter is provided. * @summary Get all member styleguides * @param {number} [limit] Pagination limit * @param {number} [offset] Pagination offset * @param {string} [workspace] Workspace of the styleguide, it can be &#x60;personal&#x60; or the id of organization * @param {StyleguideStatusEnum} [status] Filter by status * @param {string} [linkedProject] Reference project id * @param {string} [linkedStyleguide] Reference styleguide id * @param {*} [options] Override http request option. * @throws {RequiredError} */ getStyleguides: (limit?: number | undefined, offset?: number | undefined, workspace?: string | undefined, status?: StyleguideStatusEnum | undefined, linkedProject?: string | undefined, linkedStyleguide?: string | undefined, options?: any) => Promise<RequestArgs>; /** * Invite a member to the styleguide. * @summary Invite a member * @param {string} styleguideId Styleguide id * @param {StyleguideMemberInviteBody} styleguideMemberInviteBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ inviteStyleguideMember: (styleguideId: string, styleguideMemberInviteBody: StyleguideMemberInviteBody, options?: any) => Promise<RequestArgs>; /** * Remove a member from the styleguide. * @summary Remove a member * @param {string} styleguideId Styleguide id * @param {string} memberId Member id * @param {*} [options] Override http request option. * @throws {RequiredError} */ removeStyleguideMember: (styleguideId: string, memberId: string, options?: any) => Promise<RequestArgs>; /** * Update a styleguide\'s name and description * @summary Update a styleguide * @param {string} styleguideId Styleguide id * @param {StyleguideUpdateBody} styleguideUpdateBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateStyleguide: (styleguideId: string, styleguideUpdateBody: StyleguideUpdateBody, options?: any) => Promise<RequestArgs>; }; /** * StyleguidesApi - functional programming interface * @export */ export declare const StyleguidesApiFp: (configuration?: Configuration | undefined) => { /** * Returns a single styleguide that user has access. User is considered eligible to access a styleguide if any of the following conditions is met: * User is a member of the styleguide * User is a member of the organization that the styleguide belongs to * User is a member of a project which is linked to the styleguide (using `linked_project` parameter) * User is a member of a project and the styleguide is an ancestor of the project\'s linked styleguide (using `linked_project` parameter) * User is a member of a styleguide that the styleguide is one of its ancestors (using `linked_styleguide` parameter) * @summary Get a single styleguide * @param {string} styleguideId Styleguide id * @param {string} [linkedProject] Reference project id * @param {string} [linkedStyleguide] Reference styleguide id * @param {*} [options] Override http request option. * @throws {RequiredError} */ getStyleguide(styleguideId: string, linkedProject?: string | undefined, linkedStyleguide?: string | undefined, options?: any): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<any>>; /** * Fetch all design tokens of the styleguide * @summary Get styleguide design tokens * @param {string} styleguideId Styleguide id * @param {boolean} [includeLinkedStyleguides] Whether to include linked styleguides or not * @param {'kebab' | 'snake' | 'camel' | 'pascal' | 'constant' | 'original'} [tokenNameCase] Case for token names * @param {*} [options] Override http request option. * @throws {RequiredError} */ getStyleguideDesignTokens(styleguideId: string, includeLinkedStyleguides?: boolean | undefined, tokenNameCase?: "kebab" | "snake" | "camel" | "pascal" | "constant" | "original" | undefined, options?: any): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<any>>; /** * List all projects linked to the styleguide * @summary Get linked projects * @param {string} styleguideId Styleguide id * @param {number} [limit] Pagination limit * @param {number} [offset] Pagination offset * @param {*} [options] Override http request option. * @throws {RequiredError} */ getStyleguideLinkedProjects(styleguideId: string, limit?: number | undefined, offset?: number | undefined, options?: any): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<any>>; /** * Returns members of a styleguide that user has access. See [Styleguide docs](#getstyleguide) for more details about how `linked_project` and `linked_styleguide` parameters can be used to retrieve resources from styleguides that user is eligible to access. * @summary Get styleguide members * @param {string} styleguideId Styleguide id * @param {number} [limit] Pagination limit * @param {number} [offset] Pagination offset * @param {string} [linkedProject] Reference project id * @param {string} [linkedStyleguide] Reference styleguide id * @param {*} [options] Override http request option. * @throws {RequiredError} */ getStyleguideMembers(styleguideId: string, limit?: number | undefined, offset?: number | undefined, linkedProject?: string | undefined, linkedStyleguide?: string | undefined, options?: any): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<any>>; /** * Lists all styleguides user is a member of unless `linked_project` or `linked_styleguide` parameter is given. If `linked_project` parameter is provided, lists styleguide linked to the given project and its ancestors. Returns error if the project referenced with `linked_project` is not accessible. Simiarly, lists styleguide linked to the given styleguide and its ancestors if `linked_styleguide` parameter is provided. Returns error if the styleguide referenced with `linked_styleguide` is not accessible. ☝️ `linked_project` and `linked_styleguide` should not be used in conjunction. Also, styleguides can be filtered by workspace using the `workspace` parameter. `workspace` parameter is ignored when `linked_project` or `linked_styleguide` parameter is provided. * @summary Get all member styleguides * @param {number} [limit] Pagination limit * @param {number} [offset] Pagination offset * @param {string} [workspace] Workspace of the styleguide, it can be &#x60;personal&#x60; or the id of organization * @param {StyleguideStatusEnum} [status] Filter by status * @param {string} [linkedProject] Reference project id * @param {string} [linkedStyleguide] Reference styleguide id * @param {*} [options] Override http request option. * @throws {RequiredError} */ getStyleguides(limit?: number | undefined, offset?: number | undefined, workspace?: string | undefined, status?: StyleguideStatusEnum | undefined, linkedProject?: string | undefined, linkedStyleguide?: string | undefined, options?: any): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<any>>; /** * Invite a member to the styleguide. * @summary Invite a member * @param {string} styleguideId Styleguide id * @param {StyleguideMemberInviteBody} styleguideMemberInviteBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ inviteStyleguideMember(styleguideId: string, styleguideMemberInviteBody: StyleguideMemberInviteBody, options?: any): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<any>>; /** * Remove a member from the styleguide. * @summary Remove a member * @param {string} styleguideId Styleguide id * @param {string} memberId Member id * @param {*} [options] Override http request option. * @throws {RequiredError} */ removeStyleguideMember(styleguideId: string, memberId: string, options?: any): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<any>>; /** * Update a styleguide\'s name and description * @summary Update a styleguide * @param {string} styleguideId Styleguide id * @param {StyleguideUpdateBody} styleguideUpdateBody * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateStyleguide(styleguideId: string, styleguideUpdateBody: StyleguideUpdateBody, options?: any): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<any>>; }; /** * Search parameters for getStyleguide operation in StyleguidesApi. * @export * @interface StyleguidesApiGetStyleguideSearchParams */ export interface StyleguidesApiGetStyleguideSearchParams { /** * Reference project id * @type {string} * @memberof StyleguidesApiGetStyleguideSearchParams */ readonly linkedProject?: string; /** * Reference styleguide id * @type {string} * @memberof StyleguidesApiGetStyleguideSearchParams */ readonly linkedStyleguide?: string; } /** * Search parameters for getStyleguideDesignTokens operation in StyleguidesApi. * @export * @interface StyleguidesApiGetStyleguideDesignTokensSearchParams */ export interface StyleguidesApiGetStyleguideDesignTokensSearchParams { /** * Whether to include linked styleguides or not * @type {boolean} * @memberof StyleguidesApiGetStyleguideDesignTokensSearchParams */ readonly includeLinkedStyleguides?: boolean; /** * Case for token names * @type {'kebab' | 'snake' | 'camel' | 'pascal' | 'constant' | 'original'} * @memberof StyleguidesApiGetStyleguideDesignTokensSearchParams */ readonly tokenNameCase?: 'kebab' | 'snake' | 'camel' | 'pascal' | 'constant' | 'original'; } /** * Search parameters for getStyleguideLinkedProjects operation in StyleguidesApi. * @export * @interface StyleguidesApiGetStyleguideLinkedProjectsSearchParams */ export interface StyleguidesApiGetStyleguideLinkedProjectsSearchParams { /** * Pagination limit * @type {number} * @memberof StyleguidesApiGetStyleguideLinkedProjectsSearchParams */ readonly limit?: number; /** * Pagination offset * @type {number} * @memberof StyleguidesApiGetStyleguideLinkedProjectsSearchParams */ readonly offset?: number; } /** * Search parameters for getStyleguideMembers operation in StyleguidesApi. * @export * @interface StyleguidesApiGetStyleguideMembersSearchParams */ export interface StyleguidesApiGetStyleguideMembersSearchParams { /** * Pagination limit * @type {number} * @memberof StyleguidesApiGetStyleguideMembersSearchParams */ readonly limit?: number; /** * Pagination offset * @type {number} * @memberof StyleguidesApiGetStyleguideMembersSearchParams */ readonly offset?: number; /** * Reference project id * @type {string} * @memberof StyleguidesApiGetStyleguideMembersSearchParams */ readonly linkedProject?: string; /** * Reference styleguide id * @type {string} * @memberof StyleguidesApiGetStyleguideMembersSearchParams */ readonly linkedStyleguide?: string; } /** * Search parameters for getStyleguides operation in StyleguidesApi. * @export * @interface StyleguidesApiGetStyleguidesSearchParams */ export interface StyleguidesApiGetStyleguidesSearchParams { /** * Pagination limit * @type {number} * @memberof StyleguidesApiGetStyleguidesSearchParams */ readonly limit?: number; /** * Pagination offset * @type {number} * @memberof StyleguidesApiGetStyleguidesSearchParams */ readonly offset?: number; /** * Workspace of the styleguide, it can be &#x60;personal&#x60; or the id of organization * @type {string} * @memberof StyleguidesApiGetStyleguidesSearchParams */ readonly workspace?: string; /** * Filter by status * @type {StyleguideStatusEnum} * @memberof StyleguidesApiGetStyleguidesSearchParams */ readonly status?: StyleguideStatusEnum; /** * Reference project id * @type {string} * @memberof StyleguidesApiGetStyleguidesSearchParams */ readonly linkedProject?: string; /** * Reference styleguide id * @type {string} * @memberof StyleguidesApiGetStyleguidesSearchParams */ readonly linkedStyleguide?: string; } /** * StyleguidesApi - object-oriented interface * @export * @class StyleguidesApi * @extends {BaseAPI} */ export declare class StyleguidesApi extends BaseAPI { /** * Returns a single styleguide that user has access. User is considered eligible to access a styleguide if any of the following conditions is met: * User is a member of the styleguide * User is a member of the organization that the styleguide belongs to * User is a member of a project which is linked to the styleguide (using `linked_project` parameter) * User is a member of a project and the styleguide is an ancestor of the project\'s linked styleguide (using `linked_project` parameter) * User is a member of a styleguide that the styleguide is one of its ancestors (using `linked_styleguide` parameter) * @summary Get a single styleguide * @param {string} styleguideId Styleguide id * @param {StyleguidesApiGetStyleguideSearchParams} [searchParams] Search parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof StyleguidesApi */ getStyleguide(styleguideId: string, searchParams?: StyleguidesApiGetStyleguideSearchParams, options?: any): Promise<AxiosResponse<Styleguide>>; /** * Fetch all design tokens of the styleguide * @summary Get styleguide design tokens * @param {string} styleguideId Styleguide id * @param {StyleguidesApiGetStyleguideDesignTokensSearchParams} [searchParams] Search parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof StyleguidesApi */ getStyleguideDesignTokens(styleguideId: string, searchParams?: StyleguidesApiGetStyleguideDesignTokensSearchParams, options?: any): Promise<AxiosResponse<DesignTokens>>; /** * List all projects linked to the styleguide * @summary Get linked projects * @param {string} styleguideId Styleguide id * @param {StyleguidesApiGetStyleguideLinkedProjectsSearchParams} [searchParams] Search parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof StyleguidesApi */ getStyleguideLinkedProjects(styleguideId: string, searchParams?: StyleguidesApiGetStyleguideLinkedProjectsSearchParams, options?: any): Promise<AxiosResponse<Array<Project>>>; /** * Returns members of a styleguide that user has access. See [Styleguide docs](#getstyleguide) for more details about how `linked_project` and `linked_styleguide` parameters can be used to retrieve resources from styleguides that user is eligible to access. * @summary Get styleguide members * @param {string} styleguideId Styleguide id * @param {StyleguidesApiGetStyleguideMembersSearchParams} [searchParams] Search parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof StyleguidesApi */ getStyleguideMembers(styleguideId: string, searchParams?: StyleguidesApiGetStyleguideMembersSearchParams, options?: any): Promise<AxiosResponse<Array<StyleguideMember>>>; /** * Lists all styleguides user is a member of unless `linked_project` or `linked_styleguide` parameter is given. If `linked_project` parameter is provided, lists styleguide linked to the given project and its ancestors. Returns error if the project referenced with `linked_project` is not accessible. Simiarly, lists styleguide linked to the given styleguide and its ancestors if `linked_styleguide` parameter is provided. Returns error if the styleguide referenced with `linked_styleguide` is not accessible. ☝️ `linked_project` and `linked_styleguide` should not be used in conjunction. Also, styleguides can be filtered by workspace using the `workspace` parameter. `workspace` parameter is ignored when `linked_project` or `linked_styleguide` parameter is provided. * @summary Get all member styleguides * @param {StyleguidesApiGetStyleguidesSearchParams} [searchParams] Search parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof StyleguidesApi */ getStyleguides(searchParams?: StyleguidesApiGetStyleguidesSearchParams, options?: any): Promise<AxiosResponse<Array<Styleguide>>>; /** * Invite a member to the styleguide. * @summary Invite a member * @param {string} styleguideId Styleguide id * @param {StyleguideMemberInviteBody} styleguideMemberInviteBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof StyleguidesApi */ inviteStyleguideMember(styleguideId: string, styleguideMemberInviteBody: StyleguideMemberInviteBody, options?: any): Promise<AxiosResponse<void>>; /** * Remove a member from the styleguide. * @summary Remove a member * @param {string} styleguideId Styleguide id * @param {string} memberId Member id * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof StyleguidesApi */ removeStyleguideMember(styleguideId: string, memberId: string, options?: any): Promise<AxiosResponse<void>>; /** * Update a styleguide\'s name and description * @summary Update a styleguide * @param {string} styleguideId Styleguide id * @param {StyleguideUpdateBody} styleguideUpdateBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof StyleguidesApi */ updateStyleguide(styleguideId: string, styleguideUpdateBody: StyleguideUpdateBody, options?: any): Promise<AxiosResponse<void>>; }