@zeplin/sdk
Version:
Zeplin API client for JavaScript
309 lines (308 loc) • 13.3 kB
TypeScript
/**
* 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 { ProjectMember } from '../models';
import { ProjectMemberInviteBody } from '../models';
import { ProjectStatusEnum } from '../models';
import { ProjectUpdateBody } from '../models';
/**
* ProjectsApi - axios parameter creator
* @export
*/
export declare const ProjectsApiAxiosParamCreator: (configuration?: Configuration | undefined) => {
/**
* Get a project by id
* @summary Get a single project
* @param {string} projectId Project id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getProject: (projectId: string, options?: any) => Promise<RequestArgs>;
/**
* Fetch all design tokens of the project
* @summary Get project design tokens
* @param {string} projectId Project 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}
*/
getProjectDesignTokens: (projectId: string, includeLinkedStyleguides?: boolean | undefined, tokenNameCase?: "kebab" | "snake" | "camel" | "pascal" | "constant" | "original" | undefined, options?: any) => Promise<RequestArgs>;
/**
* List all members of the project
* @summary Get project members
* @param {string} projectId Project id
* @param {number} [limit] Pagination limit
* @param {number} [offset] Pagination offset
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getProjectMembers: (projectId: string, limit?: number | undefined, offset?: number | undefined, options?: any) => Promise<RequestArgs>;
/**
* List all projects that user is a member of
* @summary Get all projects
* @param {number} [limit] Pagination limit
* @param {string} [workspace] Workspace of the project, it can be `personal` or the id of organization
* @param {ProjectStatusEnum} [status] Filter by status
* @param {number} [offset] Pagination offset
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getProjects: (limit?: number | undefined, workspace?: string | undefined, status?: ProjectStatusEnum | undefined, offset?: number | undefined, options?: any) => Promise<RequestArgs>;
/**
* Invite a member to the project.
* @summary Invite a member
* @param {string} projectId Project id
* @param {ProjectMemberInviteBody} projectMemberInviteBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
inviteProjectMember: (projectId: string, projectMemberInviteBody: ProjectMemberInviteBody, options?: any) => Promise<RequestArgs>;
/**
* Remove a member from the project.
* @summary Remove a member
* @param {string} projectId Project id
* @param {string} memberId Member id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
removeProjectMember: (projectId: string, memberId: string, options?: any) => Promise<RequestArgs>;
/**
* Update a project\'s name and description
* @summary Update a project
* @param {string} projectId Project id
* @param {ProjectUpdateBody} projectUpdateBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateProject: (projectId: string, projectUpdateBody: ProjectUpdateBody, options?: any) => Promise<RequestArgs>;
};
/**
* ProjectsApi - functional programming interface
* @export
*/
export declare const ProjectsApiFp: (configuration?: Configuration | undefined) => {
/**
* Get a project by id
* @summary Get a single project
* @param {string} projectId Project id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getProject(projectId: string, options?: any): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<any>>;
/**
* Fetch all design tokens of the project
* @summary Get project design tokens
* @param {string} projectId Project 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}
*/
getProjectDesignTokens(projectId: 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 members of the project
* @summary Get project members
* @param {string} projectId Project id
* @param {number} [limit] Pagination limit
* @param {number} [offset] Pagination offset
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getProjectMembers(projectId: string, limit?: number | undefined, offset?: number | undefined, options?: any): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<any>>;
/**
* List all projects that user is a member of
* @summary Get all projects
* @param {number} [limit] Pagination limit
* @param {string} [workspace] Workspace of the project, it can be `personal` or the id of organization
* @param {ProjectStatusEnum} [status] Filter by status
* @param {number} [offset] Pagination offset
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getProjects(limit?: number | undefined, workspace?: string | undefined, status?: ProjectStatusEnum | undefined, offset?: number | undefined, options?: any): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<any>>;
/**
* Invite a member to the project.
* @summary Invite a member
* @param {string} projectId Project id
* @param {ProjectMemberInviteBody} projectMemberInviteBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
inviteProjectMember(projectId: string, projectMemberInviteBody: ProjectMemberInviteBody, options?: any): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<any>>;
/**
* Remove a member from the project.
* @summary Remove a member
* @param {string} projectId Project id
* @param {string} memberId Member id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
removeProjectMember(projectId: string, memberId: string, options?: any): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<any>>;
/**
* Update a project\'s name and description
* @summary Update a project
* @param {string} projectId Project id
* @param {ProjectUpdateBody} projectUpdateBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateProject(projectId: string, projectUpdateBody: ProjectUpdateBody, options?: any): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<any>>;
};
/**
* Search parameters for getProjectDesignTokens operation in ProjectsApi.
* @export
* @interface ProjectsApiGetProjectDesignTokensSearchParams
*/
export interface ProjectsApiGetProjectDesignTokensSearchParams {
/**
* Whether to include linked styleguides or not
* @type {boolean}
* @memberof ProjectsApiGetProjectDesignTokensSearchParams
*/
readonly includeLinkedStyleguides?: boolean;
/**
* Case for token names
* @type {'kebab' | 'snake' | 'camel' | 'pascal' | 'constant' | 'original'}
* @memberof ProjectsApiGetProjectDesignTokensSearchParams
*/
readonly tokenNameCase?: 'kebab' | 'snake' | 'camel' | 'pascal' | 'constant' | 'original';
}
/**
* Search parameters for getProjectMembers operation in ProjectsApi.
* @export
* @interface ProjectsApiGetProjectMembersSearchParams
*/
export interface ProjectsApiGetProjectMembersSearchParams {
/**
* Pagination limit
* @type {number}
* @memberof ProjectsApiGetProjectMembersSearchParams
*/
readonly limit?: number;
/**
* Pagination offset
* @type {number}
* @memberof ProjectsApiGetProjectMembersSearchParams
*/
readonly offset?: number;
}
/**
* Search parameters for getProjects operation in ProjectsApi.
* @export
* @interface ProjectsApiGetProjectsSearchParams
*/
export interface ProjectsApiGetProjectsSearchParams {
/**
* Pagination limit
* @type {number}
* @memberof ProjectsApiGetProjectsSearchParams
*/
readonly limit?: number;
/**
* Workspace of the project, it can be `personal` or the id of organization
* @type {string}
* @memberof ProjectsApiGetProjectsSearchParams
*/
readonly workspace?: string;
/**
* Filter by status
* @type {ProjectStatusEnum}
* @memberof ProjectsApiGetProjectsSearchParams
*/
readonly status?: ProjectStatusEnum;
/**
* Pagination offset
* @type {number}
* @memberof ProjectsApiGetProjectsSearchParams
*/
readonly offset?: number;
}
/**
* ProjectsApi - object-oriented interface
* @export
* @class ProjectsApi
* @extends {BaseAPI}
*/
export declare class ProjectsApi extends BaseAPI {
/**
* Get a project by id
* @summary Get a single project
* @param {string} projectId Project id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ProjectsApi
*/
getProject(projectId: string, options?: any): Promise<AxiosResponse<Project>>;
/**
* Fetch all design tokens of the project
* @summary Get project design tokens
* @param {string} projectId Project id
* @param {ProjectsApiGetProjectDesignTokensSearchParams} [searchParams] Search parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ProjectsApi
*/
getProjectDesignTokens(projectId: string, searchParams?: ProjectsApiGetProjectDesignTokensSearchParams, options?: any): Promise<AxiosResponse<DesignTokens>>;
/**
* List all members of the project
* @summary Get project members
* @param {string} projectId Project id
* @param {ProjectsApiGetProjectMembersSearchParams} [searchParams] Search parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ProjectsApi
*/
getProjectMembers(projectId: string, searchParams?: ProjectsApiGetProjectMembersSearchParams, options?: any): Promise<AxiosResponse<Array<ProjectMember>>>;
/**
* List all projects that user is a member of
* @summary Get all projects
* @param {ProjectsApiGetProjectsSearchParams} [searchParams] Search parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ProjectsApi
*/
getProjects(searchParams?: ProjectsApiGetProjectsSearchParams, options?: any): Promise<AxiosResponse<Array<Project>>>;
/**
* Invite a member to the project.
* @summary Invite a member
* @param {string} projectId Project id
* @param {ProjectMemberInviteBody} projectMemberInviteBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ProjectsApi
*/
inviteProjectMember(projectId: string, projectMemberInviteBody: ProjectMemberInviteBody, options?: any): Promise<AxiosResponse<void>>;
/**
* Remove a member from the project.
* @summary Remove a member
* @param {string} projectId Project id
* @param {string} memberId Member id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ProjectsApi
*/
removeProjectMember(projectId: string, memberId: string, options?: any): Promise<AxiosResponse<void>>;
/**
* Update a project\'s name and description
* @summary Update a project
* @param {string} projectId Project id
* @param {ProjectUpdateBody} projectUpdateBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ProjectsApi
*/
updateProject(projectId: string, projectUpdateBody: ProjectUpdateBody, options?: any): Promise<AxiosResponse<void>>;
}