Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

figma-js

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

figma-js - npm Package Compare versions

Comparing version 1.8.5 to 1.9.0

40

build/main/figmaTypes.d.ts

@@ -43,2 +43,3 @@ export interface Global {

export declare type EasingType = 'EASE_IN' /** Ease in with an animation curve similar to CSS ease-in */ | 'EASE_OUT' /** Ease out with an animation curve similar to CSS ease-out */ | 'EASE_IN_AND_OUT'; /** Ease in and then out with an animation curve similar to CSS ease-in-out */
export declare type RoleType = 'viewer' | 'editor' | 'owner';
export declare type NodeType = 'DOCUMENT' | 'CANVAS' | 'FRAME' | 'GROUP' | 'VECTOR' | 'BOOLEAN' | 'STAR' | 'LINE' | 'ELLIPSE' | 'REGULAR_POLYGON' | 'RECTANGLE' | 'TEXT' | 'SLICE' | 'COMPONENT' | 'INSTANCE';

@@ -605,12 +606,7 @@ export declare type Node = Document | Canvas | Frame | Group | Vector | BooleanGroup | Star | Line | Ellipse | RegularPolygon | Rectangle | Text | Slice | Component | Instance;

}
/** A relative offset within a frame */
export interface FrameOffset {
/** Unique id specifying the frame */
readonly node_id: string;
/** 2d vector offset within the frame */
readonly node_offset: Vector2;
}
interface SharedElement extends ComponentMetadata {
/** The unique identifier of the figma file which contains the element */
readonly file_key: string;
/** Id of the component node within the figma file */
readonly node_id: string;
/** URL link to the element's thumbnail image */

@@ -688,2 +684,9 @@ readonly thumbnail_urlString: string;

}
/** A relative offset within a frame */
export interface FrameOffset {
/** Unique id specifying the frame */
readonly node_id: string;
/** 2d vector offset within the frame */
readonly node_offset: Vector2;
}
export interface ProjectSummary {

@@ -703,2 +706,3 @@ readonly id: string;

readonly name: string;
readonly role: RoleType;
readonly schemaVersion: number;

@@ -723,2 +727,3 @@ readonly thumbnailUrl: string;

readonly name: string;
readonly role: RoleType;
readonly thumbnailUrl: string;

@@ -760,2 +765,15 @@ readonly version: string;

}
export interface ComponentResponse {
readonly err: string | null;
readonly status: number;
readonly meta: {
readonly [key: string]: FullComponentMetadata;
};
}
export interface StyleResponse {
readonly err: string | null;
readonly meta: {
readonly [key: string]: FullStyleMetadata;
};
}
export interface FileSummary {

@@ -768,5 +786,7 @@ readonly key: string;

export interface TeamProjectsResponse {
readonly name: string;
readonly projects: ReadonlyArray<ProjectSummary>;
}
export interface ProjectFilesResponse {
readonly name: string;
readonly files: ReadonlyArray<FileSummary>;

@@ -783,5 +803,11 @@ }

}
export interface FileComponentsResponse extends PaginationResponse {
readonly components: ReadonlyArray<FullComponentMetadata>;
}
export interface TeamStylesResponse extends PaginationResponse {
readonly styles: ReadonlyArray<FullStyleMetadata>;
}
export interface FileStylesResponse extends PaginationResponse {
readonly styles: ReadonlyArray<FullStyleMetadata>;
}
export {};

@@ -63,3 +63,5 @@ import * as Figma from './figmaTypes';

/** The absolute canvas position of where to place the comment */
readonly client_meta: Figma.Vector2 | Figma.FrameOffset;
readonly client_meta?: Figma.Vector2 | Figma.FrameOffset;
/** The comment to reply to, if any. This must be a root comment, that is, you cannot reply to a comment that is a reply itself (a reply has a parent_id). */
readonly comment_id?: string;
}

@@ -155,3 +157,3 @@ export interface PaginationParams {

* Posts a new comment on the file.
* @param {fileId} String File to get comments from
* @param {fileId} String File to post comment to
* @param {params} PostCommentParams

@@ -162,2 +164,9 @@ * @see https://www.figma.com/developers/api#post-comments-endpoint

/**
* Delete a comment from the file
* @param {fileId} String File to delete comment from
* @param {commentId} String id of the comment to be deleted
* @see https://www.figma.com/developers/api#delete-comments-endpoint
*/
readonly deleteComment: (fileId: string, commentId: string) => AxiosPromise<Figma.Comment>;
/**
* Get user information for the authenticated user.

@@ -190,2 +199,8 @@ * @see https://www.figma.com/developers/api#get-me-endpoint

/**
* Get a paginated list of published components within a file
* @param {fileId} String Id of the file to list components from
* @see https://www.figma.com/developers/api#get-file-components-endpoint
*/
readonly fileComponents: (fileId: string, params?: PaginationParams) => AxiosPromise<Figma.FileComponentsResponse>;
/**
* Get metadata on a component by key.

@@ -195,6 +210,6 @@ * @param {key} The unique identifier of the component.

*/
readonly component: (key: string) => AxiosPromise<Figma.FullComponentMetadata>;
readonly component: (key: string) => AxiosPromise<Figma.ComponentResponse>;
/**
* Get a paginated list of published styles within a team library
* @param {teamId} String Id of the team to list components from
* @param {teamId} String Id of the team to list styles from
* @see https://www.figma.com/developers/api#get-team-styles-endpoint

@@ -204,2 +219,8 @@ */

/**
* Get a paginated list of published styles within a file
* @param {fileId} String Id of the file to list styles from
* @see https://www.figma.com/developers/api#get-file-styles-endpoint
*/
readonly fileStyles: (fileId: string, params?: PaginationParams) => AxiosPromise<Figma.FileStylesResponse>;
/**
* Get metadata on a style by key.

@@ -209,4 +230,4 @@ * @param {key} The unique identifier of the style.

*/
readonly style: (key: string) => AxiosPromise<Figma.FullStyleMetadata>;
readonly style: (key: string) => AxiosPromise<Figma.StyleResponse>;
}
export declare const Client: (opts: ClientOptions) => ClientInterface;

5

build/main/index.js

@@ -32,2 +32,3 @@ "use strict";

postComment: (fileId, params) => client.post(`files/${fileId}/comments`, params),
deleteComment: (fileId, commentId) => client.delete(`files/${fileId}/comments/${commentId}`),
me: () => client.get(`me`),

@@ -37,7 +38,9 @@ teamProjects: teamId => client.get(`teams/${teamId}/projects`),

teamComponents: (teamId, params = {}) => client.get(`teams/${teamId}/components`, { params }),
fileComponents: (fileId, params = {}) => client.get(`files/${fileId}/components`, { params }),
component: key => client.get(`components/${key}`),
teamStyles: (teamId, params = {}) => client.get(`teams/${teamId}/styles`, { params }),
fileStyles: (fileId, params = {}) => client.get(`files/${fileId}/styles`, { params }),
style: key => client.get(`styles/${key}`)
};
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBw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QUFNLEdBQUcsRUFBRSxFQUFFLEVBQUUsQ0FDbEMsTUFBTSxDQUFDLEdBQUcsQ0FBQyxTQUFTLE1BQU0sU0FBUyxFQUFFLEVBQUUsTUFBTSxFQUFFLENBQUM7UUFFbEQsS0FBSyxFQUFFLEdBQUcsQ0FBQyxFQUFFLENBQUMsTUFBTSxDQUFDLEdBQUcsQ0FBQyxVQUFVLEdBQUcsRUFBRSxDQUFDO0tBQzFDLENBQUM7QUFDSixDQUFDLENBQUMifQ==

@@ -43,2 +43,3 @@ export interface Global {

export declare type EasingType = 'EASE_IN' /** Ease in with an animation curve similar to CSS ease-in */ | 'EASE_OUT' /** Ease out with an animation curve similar to CSS ease-out */ | 'EASE_IN_AND_OUT'; /** Ease in and then out with an animation curve similar to CSS ease-in-out */
export declare type RoleType = 'viewer' | 'editor' | 'owner';
export declare type NodeType = 'DOCUMENT' | 'CANVAS' | 'FRAME' | 'GROUP' | 'VECTOR' | 'BOOLEAN' | 'STAR' | 'LINE' | 'ELLIPSE' | 'REGULAR_POLYGON' | 'RECTANGLE' | 'TEXT' | 'SLICE' | 'COMPONENT' | 'INSTANCE';

@@ -605,12 +606,7 @@ export declare type Node = Document | Canvas | Frame | Group | Vector | BooleanGroup | Star | Line | Ellipse | RegularPolygon | Rectangle | Text | Slice | Component | Instance;

}
/** A relative offset within a frame */
export interface FrameOffset {
/** Unique id specifying the frame */
readonly node_id: string;
/** 2d vector offset within the frame */
readonly node_offset: Vector2;
}
interface SharedElement extends ComponentMetadata {
/** The unique identifier of the figma file which contains the element */
readonly file_key: string;
/** Id of the component node within the figma file */
readonly node_id: string;
/** URL link to the element's thumbnail image */

@@ -688,2 +684,9 @@ readonly thumbnail_urlString: string;

}
/** A relative offset within a frame */
export interface FrameOffset {
/** Unique id specifying the frame */
readonly node_id: string;
/** 2d vector offset within the frame */
readonly node_offset: Vector2;
}
export interface ProjectSummary {

@@ -703,2 +706,3 @@ readonly id: string;

readonly name: string;
readonly role: RoleType;
readonly schemaVersion: number;

@@ -723,2 +727,3 @@ readonly thumbnailUrl: string;

readonly name: string;
readonly role: RoleType;
readonly thumbnailUrl: string;

@@ -760,2 +765,15 @@ readonly version: string;

}
export interface ComponentResponse {
readonly err: string | null;
readonly status: number;
readonly meta: {
readonly [key: string]: FullComponentMetadata;
};
}
export interface StyleResponse {
readonly err: string | null;
readonly meta: {
readonly [key: string]: FullStyleMetadata;
};
}
export interface FileSummary {

@@ -768,5 +786,7 @@ readonly key: string;

export interface TeamProjectsResponse {
readonly name: string;
readonly projects: ReadonlyArray<ProjectSummary>;
}
export interface ProjectFilesResponse {
readonly name: string;
readonly files: ReadonlyArray<FileSummary>;

@@ -783,5 +803,11 @@ }

}
export interface FileComponentsResponse extends PaginationResponse {
readonly components: ReadonlyArray<FullComponentMetadata>;
}
export interface TeamStylesResponse extends PaginationResponse {
readonly styles: ReadonlyArray<FullStyleMetadata>;
}
export interface FileStylesResponse extends PaginationResponse {
readonly styles: ReadonlyArray<FullStyleMetadata>;
}
export {};

@@ -63,3 +63,5 @@ import * as Figma from './figmaTypes';

/** The absolute canvas position of where to place the comment */
readonly client_meta: Figma.Vector2 | Figma.FrameOffset;
readonly client_meta?: Figma.Vector2 | Figma.FrameOffset;
/** The comment to reply to, if any. This must be a root comment, that is, you cannot reply to a comment that is a reply itself (a reply has a parent_id). */
readonly comment_id?: string;
}

@@ -155,3 +157,3 @@ export interface PaginationParams {

* Posts a new comment on the file.
* @param {fileId} String File to get comments from
* @param {fileId} String File to post comment to
* @param {params} PostCommentParams

@@ -162,2 +164,9 @@ * @see https://www.figma.com/developers/api#post-comments-endpoint

/**
* Delete a comment from the file
* @param {fileId} String File to delete comment from
* @param {commentId} String id of the comment to be deleted
* @see https://www.figma.com/developers/api#delete-comments-endpoint
*/
readonly deleteComment: (fileId: string, commentId: string) => AxiosPromise<Figma.Comment>;
/**
* Get user information for the authenticated user.

@@ -190,2 +199,8 @@ * @see https://www.figma.com/developers/api#get-me-endpoint

/**
* Get a paginated list of published components within a file
* @param {fileId} String Id of the file to list components from
* @see https://www.figma.com/developers/api#get-file-components-endpoint
*/
readonly fileComponents: (fileId: string, params?: PaginationParams) => AxiosPromise<Figma.FileComponentsResponse>;
/**
* Get metadata on a component by key.

@@ -195,6 +210,6 @@ * @param {key} The unique identifier of the component.

*/
readonly component: (key: string) => AxiosPromise<Figma.FullComponentMetadata>;
readonly component: (key: string) => AxiosPromise<Figma.ComponentResponse>;
/**
* Get a paginated list of published styles within a team library
* @param {teamId} String Id of the team to list components from
* @param {teamId} String Id of the team to list styles from
* @see https://www.figma.com/developers/api#get-team-styles-endpoint

@@ -204,2 +219,8 @@ */

/**
* Get a paginated list of published styles within a file
* @param {fileId} String Id of the file to list styles from
* @see https://www.figma.com/developers/api#get-file-styles-endpoint
*/
readonly fileStyles: (fileId: string, params?: PaginationParams) => AxiosPromise<Figma.FileStylesResponse>;
/**
* Get metadata on a style by key.

@@ -209,4 +230,4 @@ * @param {key} The unique identifier of the style.

*/
readonly style: (key: string) => AxiosPromise<Figma.FullStyleMetadata>;
readonly style: (key: string) => AxiosPromise<Figma.StyleResponse>;
}
export declare const Client: (opts: ClientOptions) => ClientInterface;

@@ -47,2 +47,5 @@ var __assign = (this && this.__assign) || function () {

},
deleteComment: function (fileId, commentId) {
return client.delete("files/" + fileId + "/comments/" + commentId);
},
me: function () { return client.get("me"); },

@@ -55,2 +58,6 @@ teamProjects: function (teamId) { return client.get("teams/" + teamId + "/projects"); },

},
fileComponents: function (fileId, params) {
if (params === void 0) { params = {}; }
return client.get("files/" + fileId + "/components", { params: params });
},
component: function (key) { return client.get("components/" + key); },

@@ -61,5 +68,9 @@ teamStyles: function (teamId, params) {

},
fileStyles: function (fileId, params) {
if (params === void 0) { params = {}; }
return client.get("files/" + fileId + "/styles", { params: params });
},
style: function (key) { return client.get("styles/" + key); }
};
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIi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UFBLEVBQUUsQ0FBQztRQUFwRCxDQUFvRDtRQUV0RCxjQUFjLEVBQUUsVUFBQyxNQUFNLEVBQUUsTUFBVztZQUFYLHVCQUFBLEVBQUEsV0FBVztZQUNsQyxPQUFBLE1BQU0sQ0FBQyxHQUFHLENBQUMsV0FBUyxNQUFNLGdCQUFhLEVBQUUsRUFBRSxNQUFNLFFBQUEsRUFBRSxDQUFDO1FBQXBELENBQW9EO1FBRXRELFNBQVMsRUFBRSxVQUFBLEdBQUcsSUFBSSxPQUFBLE1BQU0sQ0FBQyxHQUFHLENBQUMsZ0JBQWMsR0FBSyxDQUFDLEVBQS9CLENBQStCO1FBRWpELFVBQVUsRUFBRSxVQUFDLE1BQU0sRUFBRSxNQUFXO1lBQVgsdUJBQUEsRUFBQSxXQUFXO1lBQzlCLE9BQUEsTUFBTSxDQUFDLEdBQUcsQ0FBQyxXQUFTLE1BQU0sWUFBUyxFQUFFLEVBQUUsTUFBTSxRQUFBLEVBQUUsQ0FBQztRQUFoRCxDQUFnRDtRQUVsRCxVQUFVLEVBQUUsVUFBQyxNQUFNLEVBQUUsTUFBVztZQUFYLHVCQUFBLEVBQUEsV0FBVztZQUM5QixPQUFBLE1BQU0sQ0FBQyxHQUFHLENBQUMsV0FBUyxNQUFNLFlBQVMsRUFBRSxFQUFFLE1BQU0sUUFBQSxFQUFFLENBQUM7UUFBaEQsQ0FBZ0Q7UUFFbEQsS0FBSyxFQUFFLFVBQUEsR0FBRyxJQUFJLE9BQUEsTUFBTSxDQUFDLEdBQUcsQ0FBQyxZQUFVLEdBQUssQ0FBQyxFQUEzQixDQUEyQjtLQUMxQyxDQUFDO0FBQ0osQ0FBQyxDQUFDIn0=
{
"name": "figma-js",
"version": "1.8.5",
"version": "1.9.0",
"description": "A simple wrapper for the Figma API",

@@ -5,0 +5,0 @@ "main": "build/main/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc