UNPKG

figma-api

Version:

Thin typed wrapper around the Figma REST API

49 lines (48 loc) 8.16 kB
import { ApiRequestMethod } from "./utils"; type ApiClass = { request: ApiRequestMethod; }; import type * as FigmaRestAPI from '@figma/rest-api-spec'; export declare function getFileApi(this: ApiClass, pathParams: FigmaRestAPI.GetFilePathParams, queryParams?: FigmaRestAPI.GetFileQueryParams): Promise<FigmaRestAPI.GetFileResponse>; export declare function getFileNodesApi(this: ApiClass, pathParams: FigmaRestAPI.GetFileNodesPathParams, queryParams?: FigmaRestAPI.GetFileNodesQueryParams): Promise<FigmaRestAPI.GetFileNodesResponse>; export declare function getImagesApi(this: ApiClass, pathParams: FigmaRestAPI.GetImagesPathParams, queryParams?: FigmaRestAPI.GetImagesQueryParams): Promise<FigmaRestAPI.GetImagesResponse>; export declare function getImageFillsApi(this: ApiClass, pathParams: FigmaRestAPI.GetImageFillsPathParams): Promise<FigmaRestAPI.GetImageFillsResponse>; export declare function getCommentsApi(this: ApiClass, pathParams: FigmaRestAPI.GetCommentsPathParams): Promise<FigmaRestAPI.GetCommentsResponse>; export declare function postCommentApi(this: ApiClass, pathParams: FigmaRestAPI.PostCommentPathParams, requestBody?: FigmaRestAPI.PostCommentRequestBody): Promise<FigmaRestAPI.PostCommentResponse>; export declare function deleteCommentApi(this: ApiClass, pathParams: FigmaRestAPI.DeleteCommentPathParams): Promise<FigmaRestAPI.DeleteCommentResponse>; export declare function getCommentReactionsApi(this: ApiClass, pathParams: FigmaRestAPI.GetCommentReactionsPathParams, queryParams?: FigmaRestAPI.GetCommentReactionsQueryParams): Promise<FigmaRestAPI.GetCommentsResponse>; export declare function postCommentReactionApi(this: ApiClass, pathParams: FigmaRestAPI.PostCommentReactionPathParams, requestBody?: FigmaRestAPI.PostCommentReactionRequestBody): Promise<FigmaRestAPI.PostCommentResponse>; export declare function deleteCommentReactionsApi(this: ApiClass, pathParams: FigmaRestAPI.DeleteCommentReactionPathParams): Promise<FigmaRestAPI.DeleteCommentReactionResponse>; export declare function getUserMeApi(this: ApiClass): Promise<FigmaRestAPI.User>; export declare function getFileVersionsApi(this: ApiClass, pathParams: FigmaRestAPI.GetFileVersionsPathParams): Promise<FigmaRestAPI.GetFileVersionsResponse>; export declare function getTeamProjectsApi(this: ApiClass, pathParams: FigmaRestAPI.GetTeamProjectsPathParams): Promise<FigmaRestAPI.GetTeamProjectsResponse>; export declare function getProjectFilesApi(this: ApiClass, pathParams: FigmaRestAPI.GetProjectFilesPathParams, queryParams?: FigmaRestAPI.GetProjectFilesQueryParams): Promise<FigmaRestAPI.GetProjectFilesResponse>; export declare function getTeamComponentsApi(this: ApiClass, pathParams: FigmaRestAPI.GetTeamComponentsPathParams, queryParams?: FigmaRestAPI.GetTeamComponentsQueryParams): Promise<FigmaRestAPI.GetTeamComponentsResponse>; export declare function getFileComponentsApi(this: ApiClass, pathParams: FigmaRestAPI.GetFileComponentsPathParams): Promise<FigmaRestAPI.GetFileComponentsResponse>; export declare function getComponentApi(this: ApiClass, pathParams: FigmaRestAPI.GetComponentPathParams): Promise<FigmaRestAPI.GetComponentResponse>; export declare function getTeamComponentSetsApi(this: ApiClass, pathParams: FigmaRestAPI.GetTeamComponentSetsPathParams, queryParams?: FigmaRestAPI.GetTeamComponentSetsQueryParams): Promise<FigmaRestAPI.GetTeamComponentSetsResponse>; export declare function getFileComponentSetsApi(this: ApiClass, pathParams: FigmaRestAPI.GetFileComponentSetsPathParams): Promise<FigmaRestAPI.GetFileComponentSetsResponse>; export declare function getComponentSetApi(this: ApiClass, pathParams: FigmaRestAPI.GetComponentSetPathParams): Promise<FigmaRestAPI.GetComponentSetResponse>; export declare function getTeamStylesApi(this: ApiClass, pathParams: FigmaRestAPI.GetTeamStylesPathParams, queryParams?: FigmaRestAPI.GetTeamStylesQueryParams): Promise<FigmaRestAPI.GetTeamStylesResponse>; export declare function getFileStylesApi(this: ApiClass, pathParams: FigmaRestAPI.GetFileStylesPathParams): Promise<FigmaRestAPI.GetFileStylesResponse>; export declare function getStyleApi(this: ApiClass, pathParams: FigmaRestAPI.GetStylePathParams): Promise<FigmaRestAPI.GetStyleResponse>; export declare function getWebhookApi(this: ApiClass, pathParams: FigmaRestAPI.GetWebhookPathParams): Promise<FigmaRestAPI.GetWebhookResponse>; export declare function postWebhookApi(this: ApiClass, requestBody?: FigmaRestAPI.PostWebhookRequestBody): Promise<FigmaRestAPI.PostWebhookResponse>; export declare function putWebhookApi(this: ApiClass, pathParams: FigmaRestAPI.PutWebhookPathParams, requestBody?: FigmaRestAPI.PutWebhookRequestBody): Promise<FigmaRestAPI.PutWebhookResponse>; export declare function deleteWebhookApi(this: ApiClass, pathParams: FigmaRestAPI.DeleteWebhookPathParams): Promise<FigmaRestAPI.DeleteWebhookResponse>; export declare function getTeamWebhooksApi(this: ApiClass, pathParams: FigmaRestAPI.GetTeamWebhooksPathParams): Promise<FigmaRestAPI.GetTeamWebhooksResponse>; export declare function getWebhookRequestsApi(this: ApiClass, pathParams: FigmaRestAPI.GetWebhookRequestsPathParams): Promise<FigmaRestAPI.GetWebhookRequestsResponse>; export declare function getLocalVariablesApi(this: ApiClass, pathParams: FigmaRestAPI.GetLocalVariablesPathParams): Promise<FigmaRestAPI.GetLocalVariablesResponse>; export declare function getPublishedVariablesApi(this: ApiClass, pathParams: FigmaRestAPI.GetPublishedVariablesPathParams): Promise<FigmaRestAPI.GetPublishedVariablesResponse>; export declare function postVariablesApi(this: ApiClass, pathParams: FigmaRestAPI.PostVariablesPathParams, requestBody?: FigmaRestAPI.PostVariablesRequestBody): Promise<FigmaRestAPI.PostVariablesResponse>; export declare function getDevResourcesApi(this: ApiClass, pathParams: FigmaRestAPI.GetDevResourcesPathParams, queryParams?: FigmaRestAPI.GetDevResourcesQueryParams): Promise<FigmaRestAPI.GetDevResourcesResponse>; export declare function postDevResourcesApi(this: ApiClass, requestBody?: FigmaRestAPI.PostDevResourcesRequestBody): Promise<FigmaRestAPI.PostDevResourcesResponse>; export declare function putDevResourcesApi(this: ApiClass, requestBody?: FigmaRestAPI.PutDevResourcesRequestBody): Promise<FigmaRestAPI.PutDevResourcesResponse>; export declare function deleteDevResourcesApi(this: ApiClass, pathParams: FigmaRestAPI.DeleteDevResourcePathParams): Promise<FigmaRestAPI.DeleteDevResourceResponse>; export declare function getLibraryAnalyticsComponentActionsApi(this: ApiClass, pathParams: FigmaRestAPI.GetLibraryAnalyticsComponentActionsPathParams, queryParams?: FigmaRestAPI.GetLibraryAnalyticsComponentActionsQueryParams): Promise<FigmaRestAPI.GetLibraryAnalyticsComponentActionsResponse>; export declare function getLibraryAnalyticsComponentUsagesApi(this: ApiClass, pathParams: FigmaRestAPI.GetLibraryAnalyticsComponentUsagesPathParams, queryParams?: FigmaRestAPI.GetLibraryAnalyticsComponentUsagesQueryParams): Promise<FigmaRestAPI.GetLibraryAnalyticsComponentUsagesResponse>; export declare function getLibraryAnalyticsStyleActionsApi(this: ApiClass, pathParams: FigmaRestAPI.GetLibraryAnalyticsStyleActionsPathParams, queryParams?: FigmaRestAPI.GetLibraryAnalyticsStyleActionsQueryParams): Promise<FigmaRestAPI.GetLibraryAnalyticsStyleActionsResponse>; export declare function getLibraryAnalyticsStyleUsagesApi(this: ApiClass, pathParams: FigmaRestAPI.GetLibraryAnalyticsStyleUsagesPathParams, queryParams?: FigmaRestAPI.GetLibraryAnalyticsStyleUsagesQueryParams): Promise<FigmaRestAPI.GetLibraryAnalyticsStyleUsagesResponse>; export declare function getLibraryAnalyticsVariableActionsApi(this: ApiClass, pathParams: FigmaRestAPI.GetLibraryAnalyticsVariableActionsPathParams, queryParams?: FigmaRestAPI.GetLibraryAnalyticsVariableActionsQueryParams): Promise<FigmaRestAPI.GetLibraryAnalyticsVariableActionsResponse>; export declare function getLibraryAnalyticsVariableUsagesApi(this: ApiClass, pathParams: FigmaRestAPI.GetLibraryAnalyticsVariableUsagesPathParams, queryParams?: FigmaRestAPI.GetLibraryAnalyticsVariableUsagesQueryParams): Promise<FigmaRestAPI.GetLibraryAnalyticsVariableUsagesResponse>; export {};