integrate-sdk 0.9.23-dev.0 → 0.9.24-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +101 -7
- package/dist/server.js +101 -7
- package/dist/src/integrations/figma-client.d.ts +673 -101
- package/dist/src/integrations/figma-client.d.ts.map +1 -1
- package/dist/src/integrations/figma.d.ts +1 -1
- package/dist/src/integrations/figma.d.ts.map +1 -1
- package/dist/src/integrations/outlook-client.d.ts +381 -188
- package/dist/src/integrations/outlook-client.d.ts.map +1 -1
- package/dist/src/integrations/outlook.d.ts +1 -1
- package/dist/src/integrations/outlook.d.ts.map +1 -1
- package/dist/src/integrations/slack-client.d.ts +236 -0
- package/dist/src/integrations/slack-client.d.ts.map +1 -1
- package/dist/src/integrations/slack.d.ts +1 -1
- package/dist/src/integrations/slack.d.ts.map +1 -1
- package/dist/src/integrations/stripe-client.d.ts +376 -17
- package/dist/src/integrations/stripe-client.d.ts.map +1 -1
- package/dist/src/integrations/stripe.d.ts +1 -1
- package/dist/src/integrations/stripe.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -3,9 +3,12 @@
|
|
|
3
3
|
* Fully typed interface for Figma integration methods
|
|
4
4
|
*/
|
|
5
5
|
import type { MCPToolCallResponse } from "../protocol/messages.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
export interface FigmaUser {
|
|
7
|
+
id: string;
|
|
8
|
+
handle: string;
|
|
9
|
+
img_url: string;
|
|
10
|
+
email?: string;
|
|
11
|
+
}
|
|
9
12
|
export interface FigmaFile {
|
|
10
13
|
name: string;
|
|
11
14
|
lastModified: string;
|
|
@@ -28,9 +31,6 @@ export interface FigmaFile {
|
|
|
28
31
|
schemaVersion: number;
|
|
29
32
|
styles?: Record<string, any>;
|
|
30
33
|
}
|
|
31
|
-
/**
|
|
32
|
-
* Figma Node
|
|
33
|
-
*/
|
|
34
34
|
export interface FigmaNode {
|
|
35
35
|
id: string;
|
|
36
36
|
name: string;
|
|
@@ -55,18 +55,11 @@ export interface FigmaNode {
|
|
|
55
55
|
horizontal: string;
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
|
-
/**
|
|
59
|
-
* Figma Comment
|
|
60
|
-
*/
|
|
61
58
|
export interface FigmaComment {
|
|
62
59
|
id: string;
|
|
63
60
|
file_key: string;
|
|
64
61
|
parent_id?: string;
|
|
65
|
-
user:
|
|
66
|
-
id: string;
|
|
67
|
-
handle: string;
|
|
68
|
-
img_url: string;
|
|
69
|
-
};
|
|
62
|
+
user: FigmaUser;
|
|
70
63
|
created_at: string;
|
|
71
64
|
resolved_at?: string;
|
|
72
65
|
message: string;
|
|
@@ -81,39 +74,28 @@ export interface FigmaComment {
|
|
|
81
74
|
};
|
|
82
75
|
order_id?: string;
|
|
83
76
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
77
|
+
export interface FigmaCommentReaction {
|
|
78
|
+
user: FigmaUser;
|
|
79
|
+
created_at: string;
|
|
80
|
+
emoji: string;
|
|
81
|
+
}
|
|
87
82
|
export interface FigmaProject {
|
|
88
83
|
id: string;
|
|
89
84
|
name: string;
|
|
90
85
|
}
|
|
91
|
-
/**
|
|
92
|
-
* Figma Project File
|
|
93
|
-
*/
|
|
94
86
|
export interface FigmaProjectFile {
|
|
95
87
|
key: string;
|
|
96
88
|
name: string;
|
|
97
89
|
thumbnail_url: string;
|
|
98
90
|
last_modified: string;
|
|
99
91
|
}
|
|
100
|
-
/**
|
|
101
|
-
* Figma File Version
|
|
102
|
-
*/
|
|
103
92
|
export interface FigmaFileVersion {
|
|
104
93
|
id: string;
|
|
105
94
|
created_at: string;
|
|
106
95
|
label?: string;
|
|
107
96
|
description?: string;
|
|
108
|
-
user:
|
|
109
|
-
id: string;
|
|
110
|
-
handle: string;
|
|
111
|
-
img_url: string;
|
|
112
|
-
};
|
|
97
|
+
user: FigmaUser;
|
|
113
98
|
}
|
|
114
|
-
/**
|
|
115
|
-
* Figma Component
|
|
116
|
-
*/
|
|
117
99
|
export interface FigmaComponent {
|
|
118
100
|
key: string;
|
|
119
101
|
file_key: string;
|
|
@@ -123,39 +105,125 @@ export interface FigmaComponent {
|
|
|
123
105
|
description: string;
|
|
124
106
|
created_at: string;
|
|
125
107
|
updated_at: string;
|
|
126
|
-
user:
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
108
|
+
user: FigmaUser;
|
|
109
|
+
containing_frame?: {
|
|
110
|
+
name: string;
|
|
111
|
+
nodeId: string;
|
|
130
112
|
};
|
|
113
|
+
}
|
|
114
|
+
export interface FigmaComponentSet {
|
|
115
|
+
key: string;
|
|
116
|
+
file_key: string;
|
|
117
|
+
node_id: string;
|
|
118
|
+
thumbnail_url: string;
|
|
119
|
+
name: string;
|
|
120
|
+
description: string;
|
|
121
|
+
created_at: string;
|
|
122
|
+
updated_at: string;
|
|
123
|
+
user: FigmaUser;
|
|
131
124
|
containing_frame?: {
|
|
132
125
|
name: string;
|
|
133
126
|
nodeId: string;
|
|
134
127
|
};
|
|
135
128
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
129
|
+
export interface FigmaStyle {
|
|
130
|
+
key: string;
|
|
131
|
+
file_key: string;
|
|
132
|
+
node_id: string;
|
|
133
|
+
style_type: "FILL" | "TEXT" | "EFFECT" | "GRID";
|
|
134
|
+
thumbnail_url: string;
|
|
135
|
+
name: string;
|
|
136
|
+
description: string;
|
|
137
|
+
created_at: string;
|
|
138
|
+
updated_at: string;
|
|
139
|
+
user: FigmaUser;
|
|
140
|
+
sort_position: string;
|
|
141
|
+
}
|
|
142
|
+
export interface FigmaWebhook {
|
|
143
|
+
id: string;
|
|
144
|
+
team_id: string;
|
|
145
|
+
event_type: string;
|
|
146
|
+
client_id: string;
|
|
147
|
+
endpoint: string;
|
|
148
|
+
passcode: string;
|
|
149
|
+
status: "ACTIVE" | "PAUSED";
|
|
150
|
+
description?: string;
|
|
151
|
+
protocol_version: string;
|
|
152
|
+
}
|
|
153
|
+
export interface FigmaVariable {
|
|
154
|
+
id: string;
|
|
155
|
+
name: string;
|
|
156
|
+
key: string;
|
|
157
|
+
variableCollectionId: string;
|
|
158
|
+
resolvedType: "BOOLEAN" | "FLOAT" | "STRING" | "COLOR";
|
|
159
|
+
valuesByMode: Record<string, any>;
|
|
160
|
+
remote: boolean;
|
|
161
|
+
description: string;
|
|
162
|
+
hiddenFromPublishing: boolean;
|
|
163
|
+
scopes: string[];
|
|
164
|
+
codeSyntax: Record<string, string>;
|
|
165
|
+
}
|
|
166
|
+
export interface FigmaVariableCollection {
|
|
167
|
+
id: string;
|
|
168
|
+
name: string;
|
|
169
|
+
key: string;
|
|
170
|
+
modes: Array<{
|
|
171
|
+
modeId: string;
|
|
172
|
+
name: string;
|
|
173
|
+
}>;
|
|
174
|
+
defaultModeId: string;
|
|
175
|
+
remote: boolean;
|
|
176
|
+
hiddenFromPublishing: boolean;
|
|
177
|
+
variableIds: string[];
|
|
178
|
+
}
|
|
179
|
+
export interface FigmaDevResource {
|
|
180
|
+
id: string;
|
|
181
|
+
name: string;
|
|
182
|
+
url: string;
|
|
183
|
+
file_key: string;
|
|
184
|
+
node_id: string;
|
|
185
|
+
created_at: string;
|
|
186
|
+
updated_at: string;
|
|
187
|
+
}
|
|
188
|
+
export interface FigmaPaymentStatus {
|
|
189
|
+
user_id: string;
|
|
190
|
+
resource_id: string;
|
|
191
|
+
resource_type: string;
|
|
192
|
+
status: "UNPAID" | "PAID";
|
|
193
|
+
}
|
|
194
|
+
export interface FigmaLibraryAnalyticsItem {
|
|
195
|
+
component_key?: string;
|
|
196
|
+
component_name?: string;
|
|
197
|
+
style_key?: string;
|
|
198
|
+
style_name?: string;
|
|
199
|
+
actions?: number;
|
|
200
|
+
usages?: number;
|
|
201
|
+
teams?: Array<{
|
|
202
|
+
name: string;
|
|
203
|
+
count: number;
|
|
204
|
+
}>;
|
|
205
|
+
files?: Array<{
|
|
206
|
+
name: string;
|
|
207
|
+
count: number;
|
|
208
|
+
}>;
|
|
209
|
+
}
|
|
140
210
|
export interface FigmaIntegrationClient {
|
|
141
211
|
/**
|
|
142
212
|
* Get a Figma file by key
|
|
143
213
|
*
|
|
144
214
|
* @example
|
|
145
215
|
* ```typescript
|
|
146
|
-
* const file = await client.figma.getFile({
|
|
147
|
-
* file_key: "abc123"
|
|
148
|
-
* });
|
|
216
|
+
* const file = await client.figma.getFile({ file_key: "abc123" });
|
|
149
217
|
* ```
|
|
150
218
|
*/
|
|
151
219
|
getFile(params: {
|
|
152
220
|
/** Figma file key */
|
|
153
221
|
file_key: string;
|
|
154
|
-
/**
|
|
222
|
+
/** Version ID */
|
|
155
223
|
version?: string;
|
|
156
|
-
/** Comma-separated
|
|
224
|
+
/** Comma-separated node IDs to fetch */
|
|
157
225
|
ids?: string;
|
|
158
|
-
/** Depth to traverse
|
|
226
|
+
/** Depth to traverse */
|
|
159
227
|
depth?: number;
|
|
160
228
|
/** Geometry format */
|
|
161
229
|
geometry?: "paths" | "svg";
|
|
@@ -165,32 +233,47 @@ export interface FigmaIntegrationClient {
|
|
|
165
233
|
*
|
|
166
234
|
* @example
|
|
167
235
|
* ```typescript
|
|
168
|
-
* const nodes = await client.figma.getFileNodes({
|
|
169
|
-
* file_key: "abc123",
|
|
170
|
-
* ids: "1:5,1:6"
|
|
171
|
-
* });
|
|
236
|
+
* const nodes = await client.figma.getFileNodes({ file_key: "abc123", node_ids: "1:5,1:6" });
|
|
172
237
|
* ```
|
|
173
238
|
*/
|
|
174
239
|
getFileNodes(params: {
|
|
175
240
|
/** Figma file key */
|
|
176
241
|
file_key: string;
|
|
177
242
|
/** Comma-separated list of node IDs */
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
243
|
+
node_ids: string;
|
|
244
|
+
}): Promise<MCPToolCallResponse>;
|
|
245
|
+
/**
|
|
246
|
+
* Get file metadata (name, last modified, version, etc.) without the full document tree
|
|
247
|
+
*
|
|
248
|
+
* @example
|
|
249
|
+
* ```typescript
|
|
250
|
+
* const meta = await client.figma.getFileMeta({ file_key: "abc123" });
|
|
251
|
+
* ```
|
|
252
|
+
*/
|
|
253
|
+
getFileMeta(params: {
|
|
254
|
+
/** Figma file key */
|
|
255
|
+
file_key: string;
|
|
256
|
+
}): Promise<MCPToolCallResponse>;
|
|
257
|
+
/**
|
|
258
|
+
* Get URLs of image fills used in a file
|
|
259
|
+
*
|
|
260
|
+
* @example
|
|
261
|
+
* ```typescript
|
|
262
|
+
* const fills = await client.figma.getImageFills({ file_key: "abc123" });
|
|
263
|
+
* ```
|
|
264
|
+
*/
|
|
265
|
+
getImageFills(params: {
|
|
266
|
+
/** Figma file key */
|
|
267
|
+
file_key: string;
|
|
185
268
|
}): Promise<MCPToolCallResponse>;
|
|
186
269
|
/**
|
|
187
|
-
* Export images
|
|
270
|
+
* Export rendered images for nodes in a file
|
|
188
271
|
*
|
|
189
272
|
* @example
|
|
190
273
|
* ```typescript
|
|
191
274
|
* const images = await client.figma.getImages({
|
|
192
275
|
* file_key: "abc123",
|
|
193
|
-
*
|
|
276
|
+
* node_ids: "1:5,1:6",
|
|
194
277
|
* format: "png",
|
|
195
278
|
* scale: 2
|
|
196
279
|
* });
|
|
@@ -199,28 +282,60 @@ export interface FigmaIntegrationClient {
|
|
|
199
282
|
getImages(params: {
|
|
200
283
|
/** Figma file key */
|
|
201
284
|
file_key: string;
|
|
202
|
-
/** Comma-separated list of node IDs */
|
|
203
|
-
|
|
285
|
+
/** Comma-separated list of node IDs to render */
|
|
286
|
+
node_ids: string;
|
|
204
287
|
/** Image format */
|
|
205
288
|
format?: "jpg" | "png" | "svg" | "pdf";
|
|
206
289
|
/** Scale factor (0.01 to 4) */
|
|
207
290
|
scale?: number;
|
|
208
|
-
/** SVG
|
|
291
|
+
/** Include node IDs in SVG output */
|
|
209
292
|
svg_include_id?: boolean;
|
|
293
|
+
/** Simplify strokes in SVG output */
|
|
210
294
|
svg_simplify_stroke?: boolean;
|
|
211
|
-
/** Use absolute bounds */
|
|
295
|
+
/** Use absolute bounds for cropping */
|
|
212
296
|
use_absolute_bounds?: boolean;
|
|
213
297
|
/** Version ID */
|
|
214
298
|
version?: string;
|
|
215
299
|
}): Promise<MCPToolCallResponse>;
|
|
300
|
+
/**
|
|
301
|
+
* Get version history of a file
|
|
302
|
+
*
|
|
303
|
+
* @example
|
|
304
|
+
* ```typescript
|
|
305
|
+
* const versions = await client.figma.getFileVersions({ file_key: "abc123" });
|
|
306
|
+
* ```
|
|
307
|
+
*/
|
|
308
|
+
getFileVersions(params: {
|
|
309
|
+
/** Figma file key */
|
|
310
|
+
file_key: string;
|
|
311
|
+
}): Promise<MCPToolCallResponse>;
|
|
312
|
+
/**
|
|
313
|
+
* Get oEmbed data for a Figma file (embed metadata for external sites)
|
|
314
|
+
*
|
|
315
|
+
* @example
|
|
316
|
+
* ```typescript
|
|
317
|
+
* const embed = await client.figma.getOembed({ file_key: "abc123" });
|
|
318
|
+
* ```
|
|
319
|
+
*/
|
|
320
|
+
getOembed(params: {
|
|
321
|
+
/** Figma file key */
|
|
322
|
+
file_key: string;
|
|
323
|
+
}): Promise<MCPToolCallResponse>;
|
|
324
|
+
/**
|
|
325
|
+
* Get the current authenticated user
|
|
326
|
+
*
|
|
327
|
+
* @example
|
|
328
|
+
* ```typescript
|
|
329
|
+
* const me = await client.figma.getMe();
|
|
330
|
+
* ```
|
|
331
|
+
*/
|
|
332
|
+
getMe(params?: Record<string, never>): Promise<MCPToolCallResponse>;
|
|
216
333
|
/**
|
|
217
334
|
* Get comments on a file
|
|
218
335
|
*
|
|
219
336
|
* @example
|
|
220
337
|
* ```typescript
|
|
221
|
-
* const comments = await client.figma.getComments({
|
|
222
|
-
* file_key: "abc123"
|
|
223
|
-
* });
|
|
338
|
+
* const comments = await client.figma.getComments({ file_key: "abc123" });
|
|
224
339
|
* ```
|
|
225
340
|
*/
|
|
226
341
|
getComments(params: {
|
|
@@ -234,41 +349,90 @@ export interface FigmaIntegrationClient {
|
|
|
234
349
|
* ```typescript
|
|
235
350
|
* await client.figma.postComment({
|
|
236
351
|
* file_key: "abc123",
|
|
237
|
-
* message: "
|
|
238
|
-
*
|
|
352
|
+
* message: "Looks great!",
|
|
353
|
+
* client_meta_x: 100,
|
|
354
|
+
* client_meta_y: 200
|
|
239
355
|
* });
|
|
240
356
|
* ```
|
|
241
357
|
*/
|
|
242
358
|
postComment(params: {
|
|
243
359
|
/** Figma file key */
|
|
244
360
|
file_key: string;
|
|
245
|
-
/** Comment message */
|
|
361
|
+
/** Comment message text */
|
|
246
362
|
message: string;
|
|
247
|
-
/** Position metadata */
|
|
248
|
-
client_meta?: {
|
|
249
|
-
/** X coordinate */
|
|
250
|
-
x?: number;
|
|
251
|
-
/** Y coordinate */
|
|
252
|
-
y?: number;
|
|
253
|
-
/** Node ID */
|
|
254
|
-
node_id?: string;
|
|
255
|
-
/** Node offset */
|
|
256
|
-
node_offset?: {
|
|
257
|
-
x: number;
|
|
258
|
-
y: number;
|
|
259
|
-
};
|
|
260
|
-
};
|
|
261
363
|
/** Parent comment ID (for replies) */
|
|
262
364
|
comment_id?: string;
|
|
365
|
+
/** Canvas X coordinate for pinned comment */
|
|
366
|
+
client_meta_x?: number;
|
|
367
|
+
/** Canvas Y coordinate for pinned comment */
|
|
368
|
+
client_meta_y?: number;
|
|
369
|
+
}): Promise<MCPToolCallResponse>;
|
|
370
|
+
/**
|
|
371
|
+
* Delete a comment from a file
|
|
372
|
+
*
|
|
373
|
+
* @example
|
|
374
|
+
* ```typescript
|
|
375
|
+
* await client.figma.deleteComment({ file_key: "abc123", comment_id: "456" });
|
|
376
|
+
* ```
|
|
377
|
+
*/
|
|
378
|
+
deleteComment(params: {
|
|
379
|
+
/** Figma file key */
|
|
380
|
+
file_key: string;
|
|
381
|
+
/** Comment ID to delete */
|
|
382
|
+
comment_id: string;
|
|
383
|
+
}): Promise<MCPToolCallResponse>;
|
|
384
|
+
/**
|
|
385
|
+
* Get reactions on a comment
|
|
386
|
+
*
|
|
387
|
+
* @example
|
|
388
|
+
* ```typescript
|
|
389
|
+
* const reactions = await client.figma.getCommentReactions({ file_key: "abc123", comment_id: "456" });
|
|
390
|
+
* ```
|
|
391
|
+
*/
|
|
392
|
+
getCommentReactions(params: {
|
|
393
|
+
/** Figma file key */
|
|
394
|
+
file_key: string;
|
|
395
|
+
/** Comment ID */
|
|
396
|
+
comment_id: string;
|
|
397
|
+
}): Promise<MCPToolCallResponse>;
|
|
398
|
+
/**
|
|
399
|
+
* Add a reaction to a comment
|
|
400
|
+
*
|
|
401
|
+
* @example
|
|
402
|
+
* ```typescript
|
|
403
|
+
* await client.figma.postCommentReaction({ file_key: "abc123", comment_id: "456", emoji: "👍" });
|
|
404
|
+
* ```
|
|
405
|
+
*/
|
|
406
|
+
postCommentReaction(params: {
|
|
407
|
+
/** Figma file key */
|
|
408
|
+
file_key: string;
|
|
409
|
+
/** Comment ID */
|
|
410
|
+
comment_id: string;
|
|
411
|
+
/** Emoji reaction */
|
|
412
|
+
emoji: string;
|
|
413
|
+
}): Promise<MCPToolCallResponse>;
|
|
414
|
+
/**
|
|
415
|
+
* Delete a reaction from a comment
|
|
416
|
+
*
|
|
417
|
+
* @example
|
|
418
|
+
* ```typescript
|
|
419
|
+
* await client.figma.deleteCommentReaction({ file_key: "abc123", comment_id: "456", emoji: "👍" });
|
|
420
|
+
* ```
|
|
421
|
+
*/
|
|
422
|
+
deleteCommentReaction(params: {
|
|
423
|
+
/** Figma file key */
|
|
424
|
+
file_key: string;
|
|
425
|
+
/** Comment ID */
|
|
426
|
+
comment_id: string;
|
|
427
|
+
/** Emoji reaction to remove */
|
|
428
|
+
emoji: string;
|
|
263
429
|
}): Promise<MCPToolCallResponse>;
|
|
264
430
|
/**
|
|
265
431
|
* List projects in a team
|
|
266
432
|
*
|
|
267
433
|
* @example
|
|
268
434
|
* ```typescript
|
|
269
|
-
* const projects = await client.figma.listProjects({
|
|
270
|
-
* team_id: "123456"
|
|
271
|
-
* });
|
|
435
|
+
* const projects = await client.figma.listProjects({ team_id: "123456" });
|
|
272
436
|
* ```
|
|
273
437
|
*/
|
|
274
438
|
listProjects(params: {
|
|
@@ -280,48 +444,456 @@ export interface FigmaIntegrationClient {
|
|
|
280
444
|
*
|
|
281
445
|
* @example
|
|
282
446
|
* ```typescript
|
|
283
|
-
* const files = await client.figma.getProjectFiles({
|
|
284
|
-
* project_id: "123456"
|
|
285
|
-
* });
|
|
447
|
+
* const files = await client.figma.getProjectFiles({ project_id: "123456" });
|
|
286
448
|
* ```
|
|
287
449
|
*/
|
|
288
450
|
getProjectFiles(params: {
|
|
289
451
|
/** Project ID */
|
|
290
452
|
project_id: string;
|
|
291
|
-
/**
|
|
292
|
-
branch_data?:
|
|
453
|
+
/** Whether to include branch data */
|
|
454
|
+
branch_data?: boolean;
|
|
293
455
|
}): Promise<MCPToolCallResponse>;
|
|
294
456
|
/**
|
|
295
|
-
* Get
|
|
457
|
+
* Get published components for a team
|
|
296
458
|
*
|
|
297
459
|
* @example
|
|
298
460
|
* ```typescript
|
|
299
|
-
* const
|
|
300
|
-
* file_key: "abc123"
|
|
301
|
-
* });
|
|
461
|
+
* const components = await client.figma.getTeamComponents({ team_id: "123456" });
|
|
302
462
|
* ```
|
|
303
463
|
*/
|
|
304
|
-
|
|
464
|
+
getTeamComponents(params: {
|
|
465
|
+
/** Team ID */
|
|
466
|
+
team_id: string;
|
|
467
|
+
/** Number of items per page */
|
|
468
|
+
page_size?: number;
|
|
469
|
+
/** Cursor for next page */
|
|
470
|
+
after?: number;
|
|
471
|
+
/** Cursor for previous page */
|
|
472
|
+
before?: number;
|
|
473
|
+
}): Promise<MCPToolCallResponse>;
|
|
474
|
+
/**
|
|
475
|
+
* Get components defined in a file
|
|
476
|
+
*
|
|
477
|
+
* @example
|
|
478
|
+
* ```typescript
|
|
479
|
+
* const components = await client.figma.getFileComponents({ file_key: "abc123" });
|
|
480
|
+
* ```
|
|
481
|
+
*/
|
|
482
|
+
getFileComponents(params: {
|
|
305
483
|
/** Figma file key */
|
|
306
484
|
file_key: string;
|
|
307
485
|
}): Promise<MCPToolCallResponse>;
|
|
308
486
|
/**
|
|
309
|
-
* Get published
|
|
487
|
+
* Get a single published component by key
|
|
310
488
|
*
|
|
311
489
|
* @example
|
|
312
490
|
* ```typescript
|
|
313
|
-
* const
|
|
314
|
-
* team_id: "123456"
|
|
315
|
-
* });
|
|
491
|
+
* const component = await client.figma.getComponent({ key: "component_key" });
|
|
316
492
|
* ```
|
|
317
493
|
*/
|
|
318
|
-
|
|
494
|
+
getComponent(params: {
|
|
495
|
+
/** Component key */
|
|
496
|
+
key: string;
|
|
497
|
+
}): Promise<MCPToolCallResponse>;
|
|
498
|
+
/**
|
|
499
|
+
* Get published component sets for a team
|
|
500
|
+
*
|
|
501
|
+
* @example
|
|
502
|
+
* ```typescript
|
|
503
|
+
* const sets = await client.figma.getTeamComponentSets({ team_id: "123456" });
|
|
504
|
+
* ```
|
|
505
|
+
*/
|
|
506
|
+
getTeamComponentSets(params: {
|
|
507
|
+
/** Team ID */
|
|
508
|
+
team_id: string;
|
|
509
|
+
/** Number of items per page */
|
|
510
|
+
page_size?: number;
|
|
511
|
+
/** Cursor for next page */
|
|
512
|
+
after?: number;
|
|
513
|
+
/** Cursor for previous page */
|
|
514
|
+
before?: number;
|
|
515
|
+
}): Promise<MCPToolCallResponse>;
|
|
516
|
+
/**
|
|
517
|
+
* Get component sets defined in a file
|
|
518
|
+
*
|
|
519
|
+
* @example
|
|
520
|
+
* ```typescript
|
|
521
|
+
* const sets = await client.figma.getFileComponentSets({ file_key: "abc123" });
|
|
522
|
+
* ```
|
|
523
|
+
*/
|
|
524
|
+
getFileComponentSets(params: {
|
|
525
|
+
/** Figma file key */
|
|
526
|
+
file_key: string;
|
|
527
|
+
}): Promise<MCPToolCallResponse>;
|
|
528
|
+
/**
|
|
529
|
+
* Get a single published component set by key
|
|
530
|
+
*
|
|
531
|
+
* @example
|
|
532
|
+
* ```typescript
|
|
533
|
+
* const set = await client.figma.getComponentSet({ key: "set_key" });
|
|
534
|
+
* ```
|
|
535
|
+
*/
|
|
536
|
+
getComponentSet(params: {
|
|
537
|
+
/** Component set key */
|
|
538
|
+
key: string;
|
|
539
|
+
}): Promise<MCPToolCallResponse>;
|
|
540
|
+
/**
|
|
541
|
+
* Get published styles for a team
|
|
542
|
+
*
|
|
543
|
+
* @example
|
|
544
|
+
* ```typescript
|
|
545
|
+
* const styles = await client.figma.getTeamStyles({ team_id: "123456" });
|
|
546
|
+
* ```
|
|
547
|
+
*/
|
|
548
|
+
getTeamStyles(params: {
|
|
319
549
|
/** Team ID */
|
|
320
550
|
team_id: string;
|
|
321
|
-
/**
|
|
551
|
+
/** Number of items per page */
|
|
322
552
|
page_size?: number;
|
|
553
|
+
/** Cursor for next page */
|
|
554
|
+
after?: number;
|
|
555
|
+
/** Cursor for previous page */
|
|
556
|
+
before?: number;
|
|
557
|
+
}): Promise<MCPToolCallResponse>;
|
|
558
|
+
/**
|
|
559
|
+
* Get styles defined in a file
|
|
560
|
+
*
|
|
561
|
+
* @example
|
|
562
|
+
* ```typescript
|
|
563
|
+
* const styles = await client.figma.getFileStyles({ file_key: "abc123" });
|
|
564
|
+
* ```
|
|
565
|
+
*/
|
|
566
|
+
getFileStyles(params: {
|
|
567
|
+
/** Figma file key */
|
|
568
|
+
file_key: string;
|
|
569
|
+
}): Promise<MCPToolCallResponse>;
|
|
570
|
+
/**
|
|
571
|
+
* Get a single published style by key
|
|
572
|
+
*
|
|
573
|
+
* @example
|
|
574
|
+
* ```typescript
|
|
575
|
+
* const style = await client.figma.getStyle({ key: "style_key" });
|
|
576
|
+
* ```
|
|
577
|
+
*/
|
|
578
|
+
getStyle(params: {
|
|
579
|
+
/** Style key */
|
|
580
|
+
key: string;
|
|
581
|
+
}): Promise<MCPToolCallResponse>;
|
|
582
|
+
/**
|
|
583
|
+
* List all webhooks for the authenticated user
|
|
584
|
+
*
|
|
585
|
+
* @example
|
|
586
|
+
* ```typescript
|
|
587
|
+
* const webhooks = await client.figma.listWebhooks();
|
|
588
|
+
* ```
|
|
589
|
+
*/
|
|
590
|
+
listWebhooks(params?: {
|
|
591
|
+
/** Filter by plan API ID */
|
|
592
|
+
plan_api_id?: string;
|
|
593
|
+
}): Promise<MCPToolCallResponse>;
|
|
594
|
+
/**
|
|
595
|
+
* Create a webhook
|
|
596
|
+
*
|
|
597
|
+
* @example
|
|
598
|
+
* ```typescript
|
|
599
|
+
* await client.figma.createWebhook({
|
|
600
|
+
* event_type: "FILE_UPDATE",
|
|
601
|
+
* team_id: "123456",
|
|
602
|
+
* endpoint: "https://example.com/webhook",
|
|
603
|
+
* passcode: "secret"
|
|
604
|
+
* });
|
|
605
|
+
* ```
|
|
606
|
+
*/
|
|
607
|
+
createWebhook(params: {
|
|
608
|
+
/** Event type to subscribe to (e.g. FILE_UPDATE, FILE_VERSION_UPDATE) */
|
|
609
|
+
event_type: string;
|
|
610
|
+
/** Team ID to scope the webhook */
|
|
611
|
+
team_id: string;
|
|
612
|
+
/** URL to receive webhook payloads */
|
|
613
|
+
endpoint: string;
|
|
614
|
+
/** Passcode sent with each payload for verification */
|
|
615
|
+
passcode: string;
|
|
616
|
+
/** Webhook status */
|
|
617
|
+
status?: "ACTIVE" | "PAUSED";
|
|
618
|
+
/** Human-readable description */
|
|
619
|
+
description?: string;
|
|
620
|
+
}): Promise<MCPToolCallResponse>;
|
|
621
|
+
/**
|
|
622
|
+
* Get a webhook by ID
|
|
623
|
+
*
|
|
624
|
+
* @example
|
|
625
|
+
* ```typescript
|
|
626
|
+
* const webhook = await client.figma.getWebhook({ webhook_id: "789" });
|
|
627
|
+
* ```
|
|
628
|
+
*/
|
|
629
|
+
getWebhook(params: {
|
|
630
|
+
/** Webhook ID */
|
|
631
|
+
webhook_id: string;
|
|
632
|
+
}): Promise<MCPToolCallResponse>;
|
|
633
|
+
/**
|
|
634
|
+
* Update an existing webhook
|
|
635
|
+
*
|
|
636
|
+
* @example
|
|
637
|
+
* ```typescript
|
|
638
|
+
* await client.figma.updateWebhook({
|
|
639
|
+
* webhook_id: "789",
|
|
640
|
+
* event_type: "FILE_UPDATE",
|
|
641
|
+
* endpoint: "https://example.com/webhook",
|
|
642
|
+
* passcode: "new_secret"
|
|
643
|
+
* });
|
|
644
|
+
* ```
|
|
645
|
+
*/
|
|
646
|
+
updateWebhook(params: {
|
|
647
|
+
/** Webhook ID */
|
|
648
|
+
webhook_id: string;
|
|
649
|
+
/** Event type to subscribe to */
|
|
650
|
+
event_type: string;
|
|
651
|
+
/** URL to receive webhook payloads */
|
|
652
|
+
endpoint: string;
|
|
653
|
+
/** Passcode sent with each payload */
|
|
654
|
+
passcode: string;
|
|
655
|
+
/** Webhook status */
|
|
656
|
+
status?: "ACTIVE" | "PAUSED";
|
|
657
|
+
/** Human-readable description */
|
|
658
|
+
description?: string;
|
|
659
|
+
}): Promise<MCPToolCallResponse>;
|
|
660
|
+
/**
|
|
661
|
+
* Delete a webhook
|
|
662
|
+
*
|
|
663
|
+
* @example
|
|
664
|
+
* ```typescript
|
|
665
|
+
* await client.figma.deleteWebhook({ webhook_id: "789" });
|
|
666
|
+
* ```
|
|
667
|
+
*/
|
|
668
|
+
deleteWebhook(params: {
|
|
669
|
+
/** Webhook ID */
|
|
670
|
+
webhook_id: string;
|
|
671
|
+
}): Promise<MCPToolCallResponse>;
|
|
672
|
+
/**
|
|
673
|
+
* Get all webhooks for a team
|
|
674
|
+
*
|
|
675
|
+
* @example
|
|
676
|
+
* ```typescript
|
|
677
|
+
* const webhooks = await client.figma.getTeamWebhooks({ team_id: "123456" });
|
|
678
|
+
* ```
|
|
679
|
+
*/
|
|
680
|
+
getTeamWebhooks(params: {
|
|
681
|
+
/** Team ID */
|
|
682
|
+
team_id: string;
|
|
683
|
+
}): Promise<MCPToolCallResponse>;
|
|
684
|
+
/**
|
|
685
|
+
* Get recent delivery requests for a webhook
|
|
686
|
+
*
|
|
687
|
+
* @example
|
|
688
|
+
* ```typescript
|
|
689
|
+
* const requests = await client.figma.getWebhookRequests({ webhook_id: "789" });
|
|
690
|
+
* ```
|
|
691
|
+
*/
|
|
692
|
+
getWebhookRequests(params: {
|
|
693
|
+
/** Webhook ID */
|
|
694
|
+
webhook_id: string;
|
|
695
|
+
}): Promise<MCPToolCallResponse>;
|
|
696
|
+
/**
|
|
697
|
+
* Get local variables defined in a file
|
|
698
|
+
*
|
|
699
|
+
* @example
|
|
700
|
+
* ```typescript
|
|
701
|
+
* const vars = await client.figma.getLocalVariables({ file_key: "abc123" });
|
|
702
|
+
* ```
|
|
703
|
+
*/
|
|
704
|
+
getLocalVariables(params: {
|
|
705
|
+
/** Figma file key */
|
|
706
|
+
file_key: string;
|
|
707
|
+
}): Promise<MCPToolCallResponse>;
|
|
708
|
+
/**
|
|
709
|
+
* Get published variables available to a file
|
|
710
|
+
*
|
|
711
|
+
* @example
|
|
712
|
+
* ```typescript
|
|
713
|
+
* const vars = await client.figma.getPublishedVariables({ file_key: "abc123" });
|
|
714
|
+
* ```
|
|
715
|
+
*/
|
|
716
|
+
getPublishedVariables(params: {
|
|
717
|
+
/** Figma file key */
|
|
718
|
+
file_key: string;
|
|
719
|
+
}): Promise<MCPToolCallResponse>;
|
|
720
|
+
/**
|
|
721
|
+
* Create, update, or delete variables and variable collections in a file
|
|
722
|
+
*
|
|
723
|
+
* @example
|
|
724
|
+
* ```typescript
|
|
725
|
+
* await client.figma.postVariables({
|
|
726
|
+
* file_key: "abc123",
|
|
727
|
+
* payload_json: JSON.stringify({ variableCollections: [], variables: [] })
|
|
728
|
+
* });
|
|
729
|
+
* ```
|
|
730
|
+
*/
|
|
731
|
+
postVariables(params: {
|
|
732
|
+
/** Figma file key */
|
|
733
|
+
file_key: string;
|
|
734
|
+
/** JSON-encoded variables payload */
|
|
735
|
+
payload_json: string;
|
|
736
|
+
}): Promise<MCPToolCallResponse>;
|
|
737
|
+
/**
|
|
738
|
+
* Get dev resources linked to nodes in a file
|
|
739
|
+
*
|
|
740
|
+
* @example
|
|
741
|
+
* ```typescript
|
|
742
|
+
* const resources = await client.figma.getDevResources({ file_key: "abc123" });
|
|
743
|
+
* ```
|
|
744
|
+
*/
|
|
745
|
+
getDevResources(params: {
|
|
746
|
+
/** Figma file key */
|
|
747
|
+
file_key: string;
|
|
748
|
+
/** Comma-separated node IDs to filter results */
|
|
749
|
+
node_ids?: string;
|
|
750
|
+
}): Promise<MCPToolCallResponse>;
|
|
751
|
+
/**
|
|
752
|
+
* Create dev resources linked to file nodes
|
|
753
|
+
*
|
|
754
|
+
* @example
|
|
755
|
+
* ```typescript
|
|
756
|
+
* await client.figma.postDevResources({
|
|
757
|
+
* payload_json: JSON.stringify({ dev_resources: [{ name: "Storybook", url: "...", file_key: "abc123", node_id: "1:5" }] })
|
|
758
|
+
* });
|
|
759
|
+
* ```
|
|
760
|
+
*/
|
|
761
|
+
postDevResources(params: {
|
|
762
|
+
/** JSON-encoded dev resources payload */
|
|
763
|
+
payload_json: string;
|
|
764
|
+
}): Promise<MCPToolCallResponse>;
|
|
765
|
+
/**
|
|
766
|
+
* Update existing dev resources
|
|
767
|
+
*
|
|
768
|
+
* @example
|
|
769
|
+
* ```typescript
|
|
770
|
+
* await client.figma.putDevResources({
|
|
771
|
+
* payload_json: JSON.stringify({ dev_resources: [{ id: "res123", name: "Updated" }] })
|
|
772
|
+
* });
|
|
773
|
+
* ```
|
|
774
|
+
*/
|
|
775
|
+
putDevResources(params: {
|
|
776
|
+
/** JSON-encoded dev resources update payload */
|
|
777
|
+
payload_json: string;
|
|
778
|
+
}): Promise<MCPToolCallResponse>;
|
|
779
|
+
/**
|
|
780
|
+
* Delete a dev resource from a file
|
|
781
|
+
*
|
|
782
|
+
* @example
|
|
783
|
+
* ```typescript
|
|
784
|
+
* await client.figma.deleteDevResource({ file_key: "abc123", dev_resource_id: "res123" });
|
|
785
|
+
* ```
|
|
786
|
+
*/
|
|
787
|
+
deleteDevResource(params: {
|
|
788
|
+
/** Figma file key */
|
|
789
|
+
file_key: string;
|
|
790
|
+
/** Dev resource ID to delete */
|
|
791
|
+
dev_resource_id: string;
|
|
792
|
+
}): Promise<MCPToolCallResponse>;
|
|
793
|
+
/**
|
|
794
|
+
* Get payment status for a plugin, widget, or community file.
|
|
795
|
+
* Provide exactly one of: plugin_payment_token, user_id, community_file_id, plugin_id, widget_id.
|
|
796
|
+
*
|
|
797
|
+
* @example
|
|
798
|
+
* ```typescript
|
|
799
|
+
* const payment = await client.figma.getPayments({ plugin_id: "123456789" });
|
|
800
|
+
* ```
|
|
801
|
+
*/
|
|
802
|
+
getPayments(params: {
|
|
803
|
+
/** One-time payment token from the plugin */
|
|
804
|
+
plugin_payment_token?: string;
|
|
805
|
+
/** User ID to check payment status for */
|
|
806
|
+
user_id?: string;
|
|
807
|
+
/** Community file ID */
|
|
808
|
+
community_file_id?: string;
|
|
809
|
+
/** Plugin ID */
|
|
810
|
+
plugin_id?: string;
|
|
811
|
+
/** Widget ID */
|
|
812
|
+
widget_id?: string;
|
|
813
|
+
}): Promise<MCPToolCallResponse>;
|
|
814
|
+
/**
|
|
815
|
+
* Get analytics on component insert/detach actions from a library file
|
|
816
|
+
*
|
|
817
|
+
* @example
|
|
818
|
+
* ```typescript
|
|
819
|
+
* const actions = await client.figma.getLibraryAnalyticsComponentActions({
|
|
820
|
+
* file_key: "abc123",
|
|
821
|
+
* group_by: "component"
|
|
822
|
+
* });
|
|
823
|
+
* ```
|
|
824
|
+
*/
|
|
825
|
+
getLibraryAnalyticsComponentActions(params: {
|
|
826
|
+
/** Library file key */
|
|
827
|
+
file_key: string;
|
|
828
|
+
/** Dimension to group results by (e.g. "component", "team", "file") */
|
|
829
|
+
group_by: string;
|
|
830
|
+
/** Pagination cursor */
|
|
831
|
+
cursor?: string;
|
|
832
|
+
/** Sort order */
|
|
833
|
+
order?: "asc" | "desc";
|
|
834
|
+
}): Promise<MCPToolCallResponse>;
|
|
835
|
+
/**
|
|
836
|
+
* Get analytics on component usages (instances) from a library file
|
|
837
|
+
*
|
|
838
|
+
* @example
|
|
839
|
+
* ```typescript
|
|
840
|
+
* const usages = await client.figma.getLibraryAnalyticsComponentUsages({
|
|
841
|
+
* file_key: "abc123",
|
|
842
|
+
* group_by: "component"
|
|
843
|
+
* });
|
|
844
|
+
* ```
|
|
845
|
+
*/
|
|
846
|
+
getLibraryAnalyticsComponentUsages(params: {
|
|
847
|
+
/** Library file key */
|
|
848
|
+
file_key: string;
|
|
849
|
+
/** Dimension to group results by */
|
|
850
|
+
group_by: string;
|
|
851
|
+
/** Pagination cursor */
|
|
852
|
+
cursor?: string;
|
|
853
|
+
/** Sort order */
|
|
854
|
+
order?: "asc" | "desc";
|
|
855
|
+
}): Promise<MCPToolCallResponse>;
|
|
856
|
+
/**
|
|
857
|
+
* Get analytics on style insert/detach actions from a library file
|
|
858
|
+
*
|
|
859
|
+
* @example
|
|
860
|
+
* ```typescript
|
|
861
|
+
* const actions = await client.figma.getLibraryAnalyticsStyleActions({
|
|
862
|
+
* file_key: "abc123",
|
|
863
|
+
* group_by: "style"
|
|
864
|
+
* });
|
|
865
|
+
* ```
|
|
866
|
+
*/
|
|
867
|
+
getLibraryAnalyticsStyleActions(params: {
|
|
868
|
+
/** Library file key */
|
|
869
|
+
file_key: string;
|
|
870
|
+
/** Dimension to group results by */
|
|
871
|
+
group_by: string;
|
|
872
|
+
/** Pagination cursor */
|
|
873
|
+
cursor?: string;
|
|
874
|
+
/** Sort order */
|
|
875
|
+
order?: "asc" | "desc";
|
|
876
|
+
}): Promise<MCPToolCallResponse>;
|
|
877
|
+
/**
|
|
878
|
+
* Get analytics on style usages from a library file
|
|
879
|
+
*
|
|
880
|
+
* @example
|
|
881
|
+
* ```typescript
|
|
882
|
+
* const usages = await client.figma.getLibraryAnalyticsStyleUsages({
|
|
883
|
+
* file_key: "abc123",
|
|
884
|
+
* group_by: "style"
|
|
885
|
+
* });
|
|
886
|
+
* ```
|
|
887
|
+
*/
|
|
888
|
+
getLibraryAnalyticsStyleUsages(params: {
|
|
889
|
+
/** Library file key */
|
|
890
|
+
file_key: string;
|
|
891
|
+
/** Dimension to group results by */
|
|
892
|
+
group_by: string;
|
|
323
893
|
/** Pagination cursor */
|
|
324
894
|
cursor?: string;
|
|
895
|
+
/** Sort order */
|
|
896
|
+
order?: "asc" | "desc";
|
|
325
897
|
}): Promise<MCPToolCallResponse>;
|
|
326
898
|
}
|
|
327
899
|
//# sourceMappingURL=figma-client.d.ts.map
|