@utdk/figma 0.37.0-20260408.5-dev.646adf4
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/LICENSE +373 -0
- package/README.md +47 -0
- package/docs/activity-logs.md +46 -0
- package/docs/comment-reactions.md +114 -0
- package/docs/comments.md +114 -0
- package/docs/component-sets.md +114 -0
- package/docs/components.md +114 -0
- package/docs/dev-resources.md +148 -0
- package/docs/files.md +216 -0
- package/docs/library-analytics.md +216 -0
- package/docs/oembed.md +46 -0
- package/docs/payments.md +46 -0
- package/docs/projects.md +80 -0
- package/docs/styles.md +114 -0
- package/docs/users.md +45 -0
- package/docs/variables.md +114 -0
- package/docs/webhooks.md +250 -0
- package/index.ts +22 -0
- package/metadata.ts +917 -0
- package/openapi.json +13812 -0
- package/package.json +34 -0
- package/types.ts +284 -0
package/docs/files.md
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
# Files
|
|
2
|
+
|
|
3
|
+
Use these operations through the generated client (not direct HTTP calls).
|
|
4
|
+
|
|
5
|
+
Import path: `@utdk/figma`
|
|
6
|
+
|
|
7
|
+
## Operations
|
|
8
|
+
|
|
9
|
+
### `figma.getFile`
|
|
10
|
+
|
|
11
|
+
- **HTTP**: `GET /v1/files/{file_key}`
|
|
12
|
+
- **What it does**: Get file JSON
|
|
13
|
+
- **OpenAPI operationId**: `getFile`
|
|
14
|
+
- **Path params**: `file_key`
|
|
15
|
+
- **Query params**: `version`, `ids`, `depth`, `geometry`, `plugin_data`, `branch_data`
|
|
16
|
+
- **Response codes**: `200`, `400`, `403`, `404`, `429`, `500`
|
|
17
|
+
- **Transport options**: None
|
|
18
|
+
- **Source**: [OpenAPI reference](https://www.figma.com/developers/api)
|
|
19
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
20
|
+
|
|
21
|
+
**Inputs**
|
|
22
|
+
|
|
23
|
+
- Client input type: `{ file_key: string; version?: string; ids?: string; depth?: number; geometry?: string; plugin_data?: string; branch_data?: boolean }`
|
|
24
|
+
- Client transport options: None
|
|
25
|
+
|
|
26
|
+
**Outputs**
|
|
27
|
+
|
|
28
|
+
- Client return type: `{ name: string; role: "owner" | "editor" | "viewer"; lastModified: string; editorType: "figma" | "figjam"; thumbnailUrl?: string; version: string; document: { type: "DOCUMENT"; children: ({ type: "CANVAS"; children: ({ ...`
|
|
29
|
+
- OpenAPI response codes: `200`, `400`, `403`, `404`, `429`, `500`
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import figma from "@utdk/figma";
|
|
33
|
+
|
|
34
|
+
type GetFileInput = Parameters<typeof figma.getFile> extends [infer T, ...unknown[]] ? T : undefined;
|
|
35
|
+
type GetFileOutput = Awaited<ReturnType<typeof figma.getFile>>;
|
|
36
|
+
|
|
37
|
+
const input: GetFileInput = {} as { file_key: string; version?: string; ids?: string; depth?: number; geometry?: string; plugin_data?: string; branch_data?: boolean };
|
|
38
|
+
const result: GetFileOutput = await figma.getFile(input);
|
|
39
|
+
|
|
40
|
+
// Result shape (from schema): { name: string; role: "owner" | "editor" | "viewer"; lastModified: string; editorType: "figma" | "figjam"; thumbnailUrl?: string; version: string; document: { type: "DOCUMENT"; children: ({ type: "CANVAS"; children: ({ ...
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### `figma.getImageFills`
|
|
44
|
+
|
|
45
|
+
- **HTTP**: `GET /v1/files/{file_key}/images`
|
|
46
|
+
- **What it does**: Get image fills
|
|
47
|
+
- **OpenAPI operationId**: `getImageFills`
|
|
48
|
+
- **Path params**: `file_key`
|
|
49
|
+
- **Query params**: None
|
|
50
|
+
- **Response codes**: `200`, `400`, `403`, `404`, `429`, `500`
|
|
51
|
+
- **Transport options**: None
|
|
52
|
+
- **Source**: [OpenAPI reference](https://www.figma.com/developers/api)
|
|
53
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
54
|
+
|
|
55
|
+
**Inputs**
|
|
56
|
+
|
|
57
|
+
- Client input type: `{ file_key: string }`
|
|
58
|
+
- Client transport options: None
|
|
59
|
+
|
|
60
|
+
**Outputs**
|
|
61
|
+
|
|
62
|
+
- Client return type: `{ error: false; status: 200; meta: { images: { [key: string]: string | undefined } } }`
|
|
63
|
+
- OpenAPI response codes: `200`, `400`, `403`, `404`, `429`, `500`
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
import figma from "@utdk/figma";
|
|
67
|
+
|
|
68
|
+
type GetImageFillsInput = Parameters<typeof figma.getImageFills> extends [infer T, ...unknown[]] ? T : undefined;
|
|
69
|
+
type GetImageFillsOutput = Awaited<ReturnType<typeof figma.getImageFills>>;
|
|
70
|
+
|
|
71
|
+
const input: GetImageFillsInput = {} as { file_key: string };
|
|
72
|
+
const result: GetImageFillsOutput = await figma.getImageFills(input);
|
|
73
|
+
|
|
74
|
+
// Result shape (from schema): { error: false; status: 200; meta: { images: { [key: string]: string | undefined } } }
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### `figma.getFileMeta`
|
|
78
|
+
|
|
79
|
+
- **HTTP**: `GET /v1/files/{file_key}/meta`
|
|
80
|
+
- **What it does**: Get file metadata
|
|
81
|
+
- **OpenAPI operationId**: `getFileMeta`
|
|
82
|
+
- **Path params**: `file_key`
|
|
83
|
+
- **Query params**: None
|
|
84
|
+
- **Response codes**: `200`, `400`, `403`, `404`, `429`, `500`
|
|
85
|
+
- **Transport options**: None
|
|
86
|
+
- **Source**: [OpenAPI reference](https://www.figma.com/developers/api)
|
|
87
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
88
|
+
|
|
89
|
+
**Inputs**
|
|
90
|
+
|
|
91
|
+
- Client input type: `{ file_key: string }`
|
|
92
|
+
- Client transport options: None
|
|
93
|
+
|
|
94
|
+
**Outputs**
|
|
95
|
+
|
|
96
|
+
- Client return type: `{ name: string; folder_name?: string; last_touched_at: string; creator: { id: string; handle: string; img_url: string }; last_touched_by?: { id: string; handle: string; img_url: string }; thumbnail_url?: string; editorT...`
|
|
97
|
+
- OpenAPI response codes: `200`, `400`, `403`, `404`, `429`, `500`
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
import figma from "@utdk/figma";
|
|
101
|
+
|
|
102
|
+
type GetFileMetaInput = Parameters<typeof figma.getFileMeta> extends [infer T, ...unknown[]] ? T : undefined;
|
|
103
|
+
type GetFileMetaOutput = Awaited<ReturnType<typeof figma.getFileMeta>>;
|
|
104
|
+
|
|
105
|
+
const input: GetFileMetaInput = {} as { file_key: string };
|
|
106
|
+
const result: GetFileMetaOutput = await figma.getFileMeta(input);
|
|
107
|
+
|
|
108
|
+
// Result shape (from schema): { name: string; folder_name?: string; last_touched_at: string; creator: { id: string; handle: string; img_url: string }; last_touched_by?: { id: string; handle: string; img_url: string }; thumbnail_url?: string; editorT...
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### `figma.getFileNodes`
|
|
112
|
+
|
|
113
|
+
- **HTTP**: `GET /v1/files/{file_key}/nodes`
|
|
114
|
+
- **What it does**: Get file JSON for specific nodes
|
|
115
|
+
- **OpenAPI operationId**: `getFileNodes`
|
|
116
|
+
- **Path params**: `file_key`
|
|
117
|
+
- **Query params**: `ids`, `version`, `depth`, `geometry`, `plugin_data`
|
|
118
|
+
- **Response codes**: `200`, `400`, `403`, `404`, `429`, `500`
|
|
119
|
+
- **Transport options**: None
|
|
120
|
+
- **Source**: [OpenAPI reference](https://www.figma.com/developers/api)
|
|
121
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
122
|
+
|
|
123
|
+
**Inputs**
|
|
124
|
+
|
|
125
|
+
- Client input type: `{ file_key: string; ids: string; version?: string; depth?: number; geometry?: string; plugin_data?: string }`
|
|
126
|
+
- Client transport options: None
|
|
127
|
+
|
|
128
|
+
**Outputs**
|
|
129
|
+
|
|
130
|
+
- Client return type: `{ name: string; role: "owner" | "editor" | "viewer"; lastModified: string; editorType: "figma" | "figjam"; thumbnailUrl: string; version: string; nodes: { [key: string]: { document: { type: "BOOLEAN_OPERATION"; booleanO...`
|
|
131
|
+
- OpenAPI response codes: `200`, `400`, `403`, `404`, `429`, `500`
|
|
132
|
+
|
|
133
|
+
```ts
|
|
134
|
+
import figma from "@utdk/figma";
|
|
135
|
+
|
|
136
|
+
type GetFileNodesInput = Parameters<typeof figma.getFileNodes> extends [infer T, ...unknown[]] ? T : undefined;
|
|
137
|
+
type GetFileNodesOutput = Awaited<ReturnType<typeof figma.getFileNodes>>;
|
|
138
|
+
|
|
139
|
+
const input: GetFileNodesInput = {} as { file_key: string; ids: string; version?: string; depth?: number; geometry?: string; plugin_data?: string };
|
|
140
|
+
const result: GetFileNodesOutput = await figma.getFileNodes(input);
|
|
141
|
+
|
|
142
|
+
// Result shape (from schema): { name: string; role: "owner" | "editor" | "viewer"; lastModified: string; editorType: "figma" | "figjam"; thumbnailUrl: string; version: string; nodes: { [key: string]: { document: { type: "BOOLEAN_OPERATION"; booleanO...
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### `figma.getFileVersions`
|
|
146
|
+
|
|
147
|
+
- **HTTP**: `GET /v1/files/{file_key}/versions`
|
|
148
|
+
- **What it does**: Get versions of a file
|
|
149
|
+
- **OpenAPI operationId**: `getFileVersions`
|
|
150
|
+
- **Path params**: `file_key`
|
|
151
|
+
- **Query params**: `page_size`, `before`, `after`
|
|
152
|
+
- **Response codes**: `200`, `403`, `404`, `429`, `500`
|
|
153
|
+
- **Transport options**: None
|
|
154
|
+
- **Source**: [OpenAPI reference](https://www.figma.com/developers/api)
|
|
155
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
156
|
+
|
|
157
|
+
**Inputs**
|
|
158
|
+
|
|
159
|
+
- Client input type: `{ file_key: string; page_size?: number; before?: number; after?: number }`
|
|
160
|
+
- Client transport options: None
|
|
161
|
+
|
|
162
|
+
**Outputs**
|
|
163
|
+
|
|
164
|
+
- Client return type: `{ versions: ({ id: string; created_at: string; label: string | null; description: string | null; user: { id: string; handle: string; img_url: string }; thumbnail_url?: string })[]; pagination: { prev_page?: string; next...`
|
|
165
|
+
- OpenAPI response codes: `200`, `403`, `404`, `429`, `500`
|
|
166
|
+
|
|
167
|
+
```ts
|
|
168
|
+
import figma from "@utdk/figma";
|
|
169
|
+
|
|
170
|
+
type GetFileVersionsInput = Parameters<typeof figma.getFileVersions> extends [infer T, ...unknown[]] ? T : undefined;
|
|
171
|
+
type GetFileVersionsOutput = Awaited<ReturnType<typeof figma.getFileVersions>>;
|
|
172
|
+
|
|
173
|
+
const input: GetFileVersionsInput = {} as { file_key: string; page_size?: number; before?: number; after?: number };
|
|
174
|
+
const result: GetFileVersionsOutput = await figma.getFileVersions(input);
|
|
175
|
+
|
|
176
|
+
// Result shape (from schema): { versions: ({ id: string; created_at: string; label: string | null; description: string | null; user: { id: string; handle: string; img_url: string }; thumbnail_url?: string })[]; pagination: { prev_page?: string; next...
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### `figma.getImages`
|
|
180
|
+
|
|
181
|
+
- **HTTP**: `GET /v1/images/{file_key}`
|
|
182
|
+
- **What it does**: Render images of file nodes
|
|
183
|
+
- **OpenAPI operationId**: `getImages`
|
|
184
|
+
- **Path params**: `file_key`
|
|
185
|
+
- **Query params**: `ids`, `version`, `scale`, `format`, `svg_outline_text`, `svg_include_id`, `svg_include_node_id`, `svg_simplify_stroke`, `contents_only`, `use_absolute_bounds`
|
|
186
|
+
- **Response codes**: `200`, `400`, `403`, `404`, `429`, `500`
|
|
187
|
+
- **Transport options**: None
|
|
188
|
+
- **Source**: [OpenAPI reference](https://www.figma.com/developers/api)
|
|
189
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
190
|
+
|
|
191
|
+
**Inputs**
|
|
192
|
+
|
|
193
|
+
- Client input type: `{ file_key: string; ids: string; version?: string; scale?: number; format?: "jpg" | "png" | "svg" | "pdf"; svg_outline_text?: boolean; svg_include_id?: boolean; svg_include_node_id?: boolean; svg_simplify_stroke?: boolean; contents_only?: boolean; use_absolute_bounds?: boolean }`
|
|
194
|
+
- Client transport options: None
|
|
195
|
+
|
|
196
|
+
**Outputs**
|
|
197
|
+
|
|
198
|
+
- Client return type: `{ err: null; images: { [key: string]: string | null | undefined } }`
|
|
199
|
+
- OpenAPI response codes: `200`, `400`, `403`, `404`, `429`, `500`
|
|
200
|
+
|
|
201
|
+
```ts
|
|
202
|
+
import figma from "@utdk/figma";
|
|
203
|
+
|
|
204
|
+
type GetImagesInput = Parameters<typeof figma.getImages> extends [infer T, ...unknown[]] ? T : undefined;
|
|
205
|
+
type GetImagesOutput = Awaited<ReturnType<typeof figma.getImages>>;
|
|
206
|
+
|
|
207
|
+
const input: GetImagesInput = {} as { file_key: string; ids: string; version?: string; scale?: number; format?: "jpg" | "png" | "svg" | "pdf"; svg_outline_text?: boolean; svg_include_id?: boolean; svg_include_node_id?: boolean; svg_simplify_stroke?: boolean; contents_only?: boolean; use_absolute_bounds?: boolean };
|
|
208
|
+
const result: GetImagesOutput = await figma.getImages(input);
|
|
209
|
+
|
|
210
|
+
// Result shape (from schema): { err: null; images: { [key: string]: string | null | undefined } }
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
<!-- prompt-hash:
|
|
215
|
+
8c3694991a4c289225f05a4e8f1e098cc74d085a088d7dffd82f00d93797b7f8
|
|
216
|
+
-->
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
# Library Analytics
|
|
2
|
+
|
|
3
|
+
Use these operations through the generated client (not direct HTTP calls).
|
|
4
|
+
|
|
5
|
+
Import path: `@utdk/figma`
|
|
6
|
+
|
|
7
|
+
## Operations
|
|
8
|
+
|
|
9
|
+
### `figma.getLibraryAnalyticsComponentActions`
|
|
10
|
+
|
|
11
|
+
- **HTTP**: `GET /v1/analytics/libraries/{file_key}/component/actions`
|
|
12
|
+
- **What it does**: Get library analytics component action data.
|
|
13
|
+
- **OpenAPI operationId**: `getLibraryAnalyticsComponentActions`
|
|
14
|
+
- **Path params**: `file_key`
|
|
15
|
+
- **Query params**: `cursor`, `group_by`, `start_date`, `end_date`
|
|
16
|
+
- **Response codes**: `200`, `400`, `401`, `403`, `429`, `500`
|
|
17
|
+
- **Transport options**: None
|
|
18
|
+
- **Source**: [OpenAPI reference](https://www.figma.com/developers/api)
|
|
19
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
20
|
+
|
|
21
|
+
**Inputs**
|
|
22
|
+
|
|
23
|
+
- Client input type: `{ file_key: string; cursor?: string; group_by: "component" | "team"; start_date?: string; end_date?: string }`
|
|
24
|
+
- Client transport options: None
|
|
25
|
+
|
|
26
|
+
**Outputs**
|
|
27
|
+
|
|
28
|
+
- Client return type: `{ rows: ({ week: string; component_key: string; component_name: string; component_set_key?: string; component_set_name?: string; detachments: number; insertions: number })[] | ({ week: string; team_name: string; workspa...`
|
|
29
|
+
- OpenAPI response codes: `200`, `400`, `401`, `403`, `429`, `500`
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import figma from "@utdk/figma";
|
|
33
|
+
|
|
34
|
+
type GetLibraryAnalyticsComponentActionsInput = Parameters<typeof figma.getLibraryAnalyticsComponentActions> extends [infer T, ...unknown[]] ? T : undefined;
|
|
35
|
+
type GetLibraryAnalyticsComponentActionsOutput = Awaited<ReturnType<typeof figma.getLibraryAnalyticsComponentActions>>;
|
|
36
|
+
|
|
37
|
+
const input: GetLibraryAnalyticsComponentActionsInput = {} as { file_key: string; cursor?: string; group_by: "component" | "team"; start_date?: string; end_date?: string };
|
|
38
|
+
const result: GetLibraryAnalyticsComponentActionsOutput = await figma.getLibraryAnalyticsComponentActions(input);
|
|
39
|
+
|
|
40
|
+
// Result shape (from schema): { rows: ({ week: string; component_key: string; component_name: string; component_set_key?: string; component_set_name?: string; detachments: number; insertions: number })[] | ({ week: string; team_name: string; workspa...
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### `figma.getLibraryAnalyticsComponentUsages`
|
|
44
|
+
|
|
45
|
+
- **HTTP**: `GET /v1/analytics/libraries/{file_key}/component/usages`
|
|
46
|
+
- **What it does**: Get library analytics component usage data.
|
|
47
|
+
- **OpenAPI operationId**: `getLibraryAnalyticsComponentUsages`
|
|
48
|
+
- **Path params**: `file_key`
|
|
49
|
+
- **Query params**: `cursor`, `group_by`
|
|
50
|
+
- **Response codes**: `200`, `400`, `401`, `403`, `429`, `500`
|
|
51
|
+
- **Transport options**: None
|
|
52
|
+
- **Source**: [OpenAPI reference](https://www.figma.com/developers/api)
|
|
53
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
54
|
+
|
|
55
|
+
**Inputs**
|
|
56
|
+
|
|
57
|
+
- Client input type: `{ file_key: string; cursor?: string; group_by: "component" | "file" }`
|
|
58
|
+
- Client transport options: None
|
|
59
|
+
|
|
60
|
+
**Outputs**
|
|
61
|
+
|
|
62
|
+
- Client return type: `{ rows: ({ component_key: string; component_name: string; component_set_key?: string; component_set_name?: string; usages: number; teams_using: number; files_using: number })[] | ({ file_name: string; team_name: string;...`
|
|
63
|
+
- OpenAPI response codes: `200`, `400`, `401`, `403`, `429`, `500`
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
import figma from "@utdk/figma";
|
|
67
|
+
|
|
68
|
+
type GetLibraryAnalyticsComponentUsagesInput = Parameters<typeof figma.getLibraryAnalyticsComponentUsages> extends [infer T, ...unknown[]] ? T : undefined;
|
|
69
|
+
type GetLibraryAnalyticsComponentUsagesOutput = Awaited<ReturnType<typeof figma.getLibraryAnalyticsComponentUsages>>;
|
|
70
|
+
|
|
71
|
+
const input: GetLibraryAnalyticsComponentUsagesInput = {} as { file_key: string; cursor?: string; group_by: "component" | "file" };
|
|
72
|
+
const result: GetLibraryAnalyticsComponentUsagesOutput = await figma.getLibraryAnalyticsComponentUsages(input);
|
|
73
|
+
|
|
74
|
+
// Result shape (from schema): { rows: ({ component_key: string; component_name: string; component_set_key?: string; component_set_name?: string; usages: number; teams_using: number; files_using: number })[] | ({ file_name: string; team_name: string;...
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### `figma.getLibraryAnalyticsStyleActions`
|
|
78
|
+
|
|
79
|
+
- **HTTP**: `GET /v1/analytics/libraries/{file_key}/style/actions`
|
|
80
|
+
- **What it does**: Get library analytics style action data.
|
|
81
|
+
- **OpenAPI operationId**: `getLibraryAnalyticsStyleActions`
|
|
82
|
+
- **Path params**: `file_key`
|
|
83
|
+
- **Query params**: `cursor`, `group_by`, `start_date`, `end_date`
|
|
84
|
+
- **Response codes**: `200`, `400`, `401`, `403`, `429`, `500`
|
|
85
|
+
- **Transport options**: None
|
|
86
|
+
- **Source**: [OpenAPI reference](https://www.figma.com/developers/api)
|
|
87
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
88
|
+
|
|
89
|
+
**Inputs**
|
|
90
|
+
|
|
91
|
+
- Client input type: `{ file_key: string; cursor?: string; group_by: "style" | "team"; start_date?: string; end_date?: string }`
|
|
92
|
+
- Client transport options: None
|
|
93
|
+
|
|
94
|
+
**Outputs**
|
|
95
|
+
|
|
96
|
+
- Client return type: `{ rows: ({ week: string; style_key: string; style_name: string; style_type: string; detachments: number; insertions: number })[] | ({ week: string; team_name: string; workspace_name?: string; detachments: number; insert...`
|
|
97
|
+
- OpenAPI response codes: `200`, `400`, `401`, `403`, `429`, `500`
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
import figma from "@utdk/figma";
|
|
101
|
+
|
|
102
|
+
type GetLibraryAnalyticsStyleActionsInput = Parameters<typeof figma.getLibraryAnalyticsStyleActions> extends [infer T, ...unknown[]] ? T : undefined;
|
|
103
|
+
type GetLibraryAnalyticsStyleActionsOutput = Awaited<ReturnType<typeof figma.getLibraryAnalyticsStyleActions>>;
|
|
104
|
+
|
|
105
|
+
const input: GetLibraryAnalyticsStyleActionsInput = {} as { file_key: string; cursor?: string; group_by: "style" | "team"; start_date?: string; end_date?: string };
|
|
106
|
+
const result: GetLibraryAnalyticsStyleActionsOutput = await figma.getLibraryAnalyticsStyleActions(input);
|
|
107
|
+
|
|
108
|
+
// Result shape (from schema): { rows: ({ week: string; style_key: string; style_name: string; style_type: string; detachments: number; insertions: number })[] | ({ week: string; team_name: string; workspace_name?: string; detachments: number; insert...
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### `figma.getLibraryAnalyticsStyleUsages`
|
|
112
|
+
|
|
113
|
+
- **HTTP**: `GET /v1/analytics/libraries/{file_key}/style/usages`
|
|
114
|
+
- **What it does**: Get library analytics style usage data.
|
|
115
|
+
- **OpenAPI operationId**: `getLibraryAnalyticsStyleUsages`
|
|
116
|
+
- **Path params**: `file_key`
|
|
117
|
+
- **Query params**: `cursor`, `group_by`
|
|
118
|
+
- **Response codes**: `200`, `400`, `401`, `403`, `429`, `500`
|
|
119
|
+
- **Transport options**: None
|
|
120
|
+
- **Source**: [OpenAPI reference](https://www.figma.com/developers/api)
|
|
121
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
122
|
+
|
|
123
|
+
**Inputs**
|
|
124
|
+
|
|
125
|
+
- Client input type: `{ file_key: string; cursor?: string; group_by: "style" | "file" }`
|
|
126
|
+
- Client transport options: None
|
|
127
|
+
|
|
128
|
+
**Outputs**
|
|
129
|
+
|
|
130
|
+
- Client return type: `{ rows: ({ style_key: string; style_name: string; style_type: string; usages: number; teams_using: number; files_using: number })[] | ({ file_name: string; team_name: string; workspace_name?: string; usages: number })[]...`
|
|
131
|
+
- OpenAPI response codes: `200`, `400`, `401`, `403`, `429`, `500`
|
|
132
|
+
|
|
133
|
+
```ts
|
|
134
|
+
import figma from "@utdk/figma";
|
|
135
|
+
|
|
136
|
+
type GetLibraryAnalyticsStyleUsagesInput = Parameters<typeof figma.getLibraryAnalyticsStyleUsages> extends [infer T, ...unknown[]] ? T : undefined;
|
|
137
|
+
type GetLibraryAnalyticsStyleUsagesOutput = Awaited<ReturnType<typeof figma.getLibraryAnalyticsStyleUsages>>;
|
|
138
|
+
|
|
139
|
+
const input: GetLibraryAnalyticsStyleUsagesInput = {} as { file_key: string; cursor?: string; group_by: "style" | "file" };
|
|
140
|
+
const result: GetLibraryAnalyticsStyleUsagesOutput = await figma.getLibraryAnalyticsStyleUsages(input);
|
|
141
|
+
|
|
142
|
+
// Result shape (from schema): { rows: ({ style_key: string; style_name: string; style_type: string; usages: number; teams_using: number; files_using: number })[] | ({ file_name: string; team_name: string; workspace_name?: string; usages: number })[]...
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### `figma.getLibraryAnalyticsVariableActions`
|
|
146
|
+
|
|
147
|
+
- **HTTP**: `GET /v1/analytics/libraries/{file_key}/variable/actions`
|
|
148
|
+
- **What it does**: Get library analytics variable action data.
|
|
149
|
+
- **OpenAPI operationId**: `getLibraryAnalyticsVariableActions`
|
|
150
|
+
- **Path params**: `file_key`
|
|
151
|
+
- **Query params**: `cursor`, `group_by`, `start_date`, `end_date`
|
|
152
|
+
- **Response codes**: `200`, `400`, `401`, `403`, `429`, `500`
|
|
153
|
+
- **Transport options**: None
|
|
154
|
+
- **Source**: [OpenAPI reference](https://www.figma.com/developers/api)
|
|
155
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
156
|
+
|
|
157
|
+
**Inputs**
|
|
158
|
+
|
|
159
|
+
- Client input type: `{ file_key: string; cursor?: string; group_by: "variable" | "team"; start_date?: string; end_date?: string }`
|
|
160
|
+
- Client transport options: None
|
|
161
|
+
|
|
162
|
+
**Outputs**
|
|
163
|
+
|
|
164
|
+
- Client return type: `{ rows: ({ week: string; variable_key: string; variable_name: string; variable_type: string; collection_key: string; collection_name: string; detachments: number; insertions: number })[] | ({ week: string; team_name: st...`
|
|
165
|
+
- OpenAPI response codes: `200`, `400`, `401`, `403`, `429`, `500`
|
|
166
|
+
|
|
167
|
+
```ts
|
|
168
|
+
import figma from "@utdk/figma";
|
|
169
|
+
|
|
170
|
+
type GetLibraryAnalyticsVariableActionsInput = Parameters<typeof figma.getLibraryAnalyticsVariableActions> extends [infer T, ...unknown[]] ? T : undefined;
|
|
171
|
+
type GetLibraryAnalyticsVariableActionsOutput = Awaited<ReturnType<typeof figma.getLibraryAnalyticsVariableActions>>;
|
|
172
|
+
|
|
173
|
+
const input: GetLibraryAnalyticsVariableActionsInput = {} as { file_key: string; cursor?: string; group_by: "variable" | "team"; start_date?: string; end_date?: string };
|
|
174
|
+
const result: GetLibraryAnalyticsVariableActionsOutput = await figma.getLibraryAnalyticsVariableActions(input);
|
|
175
|
+
|
|
176
|
+
// Result shape (from schema): { rows: ({ week: string; variable_key: string; variable_name: string; variable_type: string; collection_key: string; collection_name: string; detachments: number; insertions: number })[] | ({ week: string; team_name: st...
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### `figma.getLibraryAnalyticsVariableUsages`
|
|
180
|
+
|
|
181
|
+
- **HTTP**: `GET /v1/analytics/libraries/{file_key}/variable/usages`
|
|
182
|
+
- **What it does**: Get library analytics variable usage data.
|
|
183
|
+
- **OpenAPI operationId**: `getLibraryAnalyticsVariableUsages`
|
|
184
|
+
- **Path params**: `file_key`
|
|
185
|
+
- **Query params**: `cursor`, `group_by`
|
|
186
|
+
- **Response codes**: `200`, `400`, `401`, `403`, `429`, `500`
|
|
187
|
+
- **Transport options**: None
|
|
188
|
+
- **Source**: [OpenAPI reference](https://www.figma.com/developers/api)
|
|
189
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
190
|
+
|
|
191
|
+
**Inputs**
|
|
192
|
+
|
|
193
|
+
- Client input type: `{ file_key: string; cursor?: string; group_by: "variable" | "file" }`
|
|
194
|
+
- Client transport options: None
|
|
195
|
+
|
|
196
|
+
**Outputs**
|
|
197
|
+
|
|
198
|
+
- Client return type: `{ rows: ({ variable_key: string; variable_name: string; variable_type: string; collection_key: string; collection_name: string; usages: number; teams_using: number; files_using: number })[] | ({ file_name: string; team_...`
|
|
199
|
+
- OpenAPI response codes: `200`, `400`, `401`, `403`, `429`, `500`
|
|
200
|
+
|
|
201
|
+
```ts
|
|
202
|
+
import figma from "@utdk/figma";
|
|
203
|
+
|
|
204
|
+
type GetLibraryAnalyticsVariableUsagesInput = Parameters<typeof figma.getLibraryAnalyticsVariableUsages> extends [infer T, ...unknown[]] ? T : undefined;
|
|
205
|
+
type GetLibraryAnalyticsVariableUsagesOutput = Awaited<ReturnType<typeof figma.getLibraryAnalyticsVariableUsages>>;
|
|
206
|
+
|
|
207
|
+
const input: GetLibraryAnalyticsVariableUsagesInput = {} as { file_key: string; cursor?: string; group_by: "variable" | "file" };
|
|
208
|
+
const result: GetLibraryAnalyticsVariableUsagesOutput = await figma.getLibraryAnalyticsVariableUsages(input);
|
|
209
|
+
|
|
210
|
+
// Result shape (from schema): { rows: ({ variable_key: string; variable_name: string; variable_type: string; collection_key: string; collection_name: string; usages: number; teams_using: number; files_using: number })[] | ({ file_name: string; team_...
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
<!-- prompt-hash:
|
|
215
|
+
8c3694991a4c289225f05a4e8f1e098cc74d085a088d7dffd82f00d93797b7f8
|
|
216
|
+
-->
|
package/docs/oembed.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# OEmbed
|
|
2
|
+
|
|
3
|
+
Use these operations through the generated client (not direct HTTP calls).
|
|
4
|
+
|
|
5
|
+
Import path: `@utdk/figma`
|
|
6
|
+
|
|
7
|
+
## Operations
|
|
8
|
+
|
|
9
|
+
### `figma.getOEmbed`
|
|
10
|
+
|
|
11
|
+
- **HTTP**: `GET /v1/oembed`
|
|
12
|
+
- **What it does**: Get oEmbed data
|
|
13
|
+
- **OpenAPI operationId**: `getOEmbed`
|
|
14
|
+
- **Path params**: None
|
|
15
|
+
- **Query params**: `url`, `maxwidth`, `maxheight`
|
|
16
|
+
- **Response codes**: `200`, `400`, `404`, `429`, `501`
|
|
17
|
+
- **Transport options**: None
|
|
18
|
+
- **Source**: [OpenAPI reference](https://www.figma.com/developers/api)
|
|
19
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
20
|
+
|
|
21
|
+
**Inputs**
|
|
22
|
+
|
|
23
|
+
- Client input type: `{ url: string; maxwidth?: number; maxheight?: number }`
|
|
24
|
+
- Client transport options: None
|
|
25
|
+
|
|
26
|
+
**Outputs**
|
|
27
|
+
|
|
28
|
+
- Client return type: `{ version: string; type: string; title: string; key?: string; url: string; provider_name: string; provider_url: string; cache_age: number; width: number; height: number; html: string; is_published_site?: boolean; folder...`
|
|
29
|
+
- OpenAPI response codes: `200`, `400`, `404`, `429`, `501`
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import figma from "@utdk/figma";
|
|
33
|
+
|
|
34
|
+
type GetOEmbedInput = Parameters<typeof figma.getOEmbed> extends [infer T, ...unknown[]] ? T : undefined;
|
|
35
|
+
type GetOEmbedOutput = Awaited<ReturnType<typeof figma.getOEmbed>>;
|
|
36
|
+
|
|
37
|
+
const input: GetOEmbedInput = {} as { url: string; maxwidth?: number; maxheight?: number };
|
|
38
|
+
const result: GetOEmbedOutput = await figma.getOEmbed(input);
|
|
39
|
+
|
|
40
|
+
// Result shape (from schema): { version: string; type: string; title: string; key?: string; url: string; provider_name: string; provider_url: string; cache_age: number; width: number; height: number; html: string; is_published_site?: boolean; folder...
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
<!-- prompt-hash:
|
|
45
|
+
8c3694991a4c289225f05a4e8f1e098cc74d085a088d7dffd82f00d93797b7f8
|
|
46
|
+
-->
|
package/docs/payments.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Payments
|
|
2
|
+
|
|
3
|
+
Use these operations through the generated client (not direct HTTP calls).
|
|
4
|
+
|
|
5
|
+
Import path: `@utdk/figma`
|
|
6
|
+
|
|
7
|
+
## Operations
|
|
8
|
+
|
|
9
|
+
### `figma.getPayments`
|
|
10
|
+
|
|
11
|
+
- **HTTP**: `GET /v1/payments`
|
|
12
|
+
- **What it does**: Get payments
|
|
13
|
+
- **OpenAPI operationId**: `getPayments`
|
|
14
|
+
- **Path params**: None
|
|
15
|
+
- **Query params**: `plugin_payment_token`, `user_id`, `community_file_id`, `plugin_id`, `widget_id`
|
|
16
|
+
- **Response codes**: `200`, `401`, `429`, `500`
|
|
17
|
+
- **Transport options**: None
|
|
18
|
+
- **Source**: [OpenAPI reference](https://www.figma.com/developers/api)
|
|
19
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
20
|
+
|
|
21
|
+
**Inputs**
|
|
22
|
+
|
|
23
|
+
- Client input type: `{ plugin_payment_token?: string; user_id?: string; community_file_id?: string; plugin_id?: string; widget_id?: string }`
|
|
24
|
+
- Client transport options: None
|
|
25
|
+
|
|
26
|
+
**Outputs**
|
|
27
|
+
|
|
28
|
+
- Client return type: `{ status: 200; error: false; meta: { user_id: string; resource_id: string; resource_type: "PLUGIN" | "WIDGET" | "COMMUNITY_FILE"; payment_status: { type?: "UNPAID" | "PAID" | "TRIAL" }; date_of_purchase?: string } }`
|
|
29
|
+
- OpenAPI response codes: `200`, `401`, `429`, `500`
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import figma from "@utdk/figma";
|
|
33
|
+
|
|
34
|
+
type GetPaymentsInput = Parameters<typeof figma.getPayments> extends [infer T, ...unknown[]] ? T : undefined;
|
|
35
|
+
type GetPaymentsOutput = Awaited<ReturnType<typeof figma.getPayments>>;
|
|
36
|
+
|
|
37
|
+
const input: GetPaymentsInput = {} as { plugin_payment_token?: string; user_id?: string; community_file_id?: string; plugin_id?: string; widget_id?: string };
|
|
38
|
+
const result: GetPaymentsOutput = await figma.getPayments(input);
|
|
39
|
+
|
|
40
|
+
// Result shape (from schema): { status: 200; error: false; meta: { user_id: string; resource_id: string; resource_type: "PLUGIN" | "WIDGET" | "COMMUNITY_FILE"; payment_status: { type?: "UNPAID" | "PAID" | "TRIAL" }; date_of_purchase?: string } }
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
<!-- prompt-hash:
|
|
45
|
+
8c3694991a4c289225f05a4e8f1e098cc74d085a088d7dffd82f00d93797b7f8
|
|
46
|
+
-->
|
package/docs/projects.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Projects
|
|
2
|
+
|
|
3
|
+
Use these operations through the generated client (not direct HTTP calls).
|
|
4
|
+
|
|
5
|
+
Import path: `@utdk/figma`
|
|
6
|
+
|
|
7
|
+
## Operations
|
|
8
|
+
|
|
9
|
+
### `figma.getProjectFiles`
|
|
10
|
+
|
|
11
|
+
- **HTTP**: `GET /v1/projects/{project_id}/files`
|
|
12
|
+
- **What it does**: Get files in a project
|
|
13
|
+
- **OpenAPI operationId**: `getProjectFiles`
|
|
14
|
+
- **Path params**: `project_id`
|
|
15
|
+
- **Query params**: `branch_data`
|
|
16
|
+
- **Response codes**: `200`, `400`, `403`, `429`, `500`
|
|
17
|
+
- **Transport options**: None
|
|
18
|
+
- **Source**: [OpenAPI reference](https://www.figma.com/developers/api)
|
|
19
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
20
|
+
|
|
21
|
+
**Inputs**
|
|
22
|
+
|
|
23
|
+
- Client input type: `{ project_id: string; branch_data?: boolean }`
|
|
24
|
+
- Client transport options: None
|
|
25
|
+
|
|
26
|
+
**Outputs**
|
|
27
|
+
|
|
28
|
+
- Client return type: `{ name: string; files: ({ key: string; name: string; thumbnail_url?: string; last_modified: string })[] }`
|
|
29
|
+
- OpenAPI response codes: `200`, `400`, `403`, `429`, `500`
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import figma from "@utdk/figma";
|
|
33
|
+
|
|
34
|
+
type GetProjectFilesInput = Parameters<typeof figma.getProjectFiles> extends [infer T, ...unknown[]] ? T : undefined;
|
|
35
|
+
type GetProjectFilesOutput = Awaited<ReturnType<typeof figma.getProjectFiles>>;
|
|
36
|
+
|
|
37
|
+
const input: GetProjectFilesInput = {} as { project_id: string; branch_data?: boolean };
|
|
38
|
+
const result: GetProjectFilesOutput = await figma.getProjectFiles(input);
|
|
39
|
+
|
|
40
|
+
// Result shape (from schema): { name: string; files: ({ key: string; name: string; thumbnail_url?: string; last_modified: string })[] }
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### `figma.getTeamProjects`
|
|
44
|
+
|
|
45
|
+
- **HTTP**: `GET /v1/teams/{team_id}/projects`
|
|
46
|
+
- **What it does**: Get projects in a team
|
|
47
|
+
- **OpenAPI operationId**: `getTeamProjects`
|
|
48
|
+
- **Path params**: `team_id`
|
|
49
|
+
- **Query params**: None
|
|
50
|
+
- **Response codes**: `200`, `400`, `403`, `429`, `500`
|
|
51
|
+
- **Transport options**: None
|
|
52
|
+
- **Source**: [OpenAPI reference](https://www.figma.com/developers/api)
|
|
53
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
54
|
+
|
|
55
|
+
**Inputs**
|
|
56
|
+
|
|
57
|
+
- Client input type: `{ team_id: string }`
|
|
58
|
+
- Client transport options: None
|
|
59
|
+
|
|
60
|
+
**Outputs**
|
|
61
|
+
|
|
62
|
+
- Client return type: `{ name: string; projects: ({ id: string; name: string })[] }`
|
|
63
|
+
- OpenAPI response codes: `200`, `400`, `403`, `429`, `500`
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
import figma from "@utdk/figma";
|
|
67
|
+
|
|
68
|
+
type GetTeamProjectsInput = Parameters<typeof figma.getTeamProjects> extends [infer T, ...unknown[]] ? T : undefined;
|
|
69
|
+
type GetTeamProjectsOutput = Awaited<ReturnType<typeof figma.getTeamProjects>>;
|
|
70
|
+
|
|
71
|
+
const input: GetTeamProjectsInput = {} as { team_id: string };
|
|
72
|
+
const result: GetTeamProjectsOutput = await figma.getTeamProjects(input);
|
|
73
|
+
|
|
74
|
+
// Result shape (from schema): { name: string; projects: ({ id: string; name: string })[] }
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
<!-- prompt-hash:
|
|
79
|
+
8c3694991a4c289225f05a4e8f1e098cc74d085a088d7dffd82f00d93797b7f8
|
|
80
|
+
-->
|