Skip to content

Commit ab4dd36

Browse files
fix mapping
1 parent 4c67d91 commit ab4dd36

File tree

91 files changed

+431
-1469
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+431
-1469
lines changed

figma_rest_api_file/.openapi-generator/FILES

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
.gitignore
2-
.openapi-generator-ignore
32
.travis.yml
43
Cargo.toml
54
README.md
65
docs/Action.md
76
docs/ActionOneOf.md
87
docs/AfterTimeoutTrigger.md
98
docs/ArcData.md
9+
docs/BackgroundBlurEffect.md
1010
docs/BaseBlurEffect.md
1111
docs/BaseBlurEffectBoundVariables.md
1212
docs/BaseNoiseEffect.md
@@ -82,7 +82,6 @@ docs/HasEffectsTrait.md
8282
docs/HasExportSettingsTrait.md
8383
docs/HasFramePropertiesTrait.md
8484
docs/HasGeometryTrait.md
85-
docs/HasGeometryTraitAllOfFillOverrideTable.md
8685
docs/HasLayoutTrait.md
8786
docs/HasMaskTrait.md
8887
docs/HasTextSublayerTrait.md
@@ -136,6 +135,7 @@ docs/IsLayerTraitBoundVariables.md
136135
docs/IsLayerTraitBoundVariablesIndividualStrokeWeights.md
137136
docs/IsLayerTraitBoundVariablesRectangleCornerRadii.md
138137
docs/IsLayerTraitBoundVariablesSize.md
138+
docs/LayerBlurEffect.md
139139
docs/LayoutConstraint.md
140140
docs/LayoutGrid.md
141141
docs/LayoutGridBoundVariables.md
@@ -263,6 +263,7 @@ src/models/action.rs
263263
src/models/action_one_of.rs
264264
src/models/after_timeout_trigger.rs
265265
src/models/arc_data.rs
266+
src/models/background_blur_effect.rs
266267
src/models/base_blur_effect.rs
267268
src/models/base_blur_effect_bound_variables.rs
268269
src/models/base_noise_effect.rs
@@ -335,7 +336,6 @@ src/models/has_effects_trait.rs
335336
src/models/has_export_settings_trait.rs
336337
src/models/has_frame_properties_trait.rs
337338
src/models/has_geometry_trait.rs
338-
src/models/has_geometry_trait_all_of_fill_override_table.rs
339339
src/models/has_layout_trait.rs
340340
src/models/has_mask_trait.rs
341341
src/models/has_text_sublayer_trait.rs
@@ -389,6 +389,7 @@ src/models/is_layer_trait_bound_variables.rs
389389
src/models/is_layer_trait_bound_variables_individual_stroke_weights.rs
390390
src/models/is_layer_trait_bound_variables_rectangle_corner_radii.rs
391391
src/models/is_layer_trait_bound_variables_size.rs
392+
src/models/layer_blur_effect.rs
392393
src/models/layout_constraint.rs
393394
src/models/layout_grid.rs
394395
src/models/layout_grid_bound_variables.rs

figma_rest_api_file/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ url = "^2.5"
2424
reqwest = { version = "^0.12", optional = true }
2525

2626
[dev-dependencies]
27-
tokio = { version = "1.45.1", features = ["rt", "macros", "test-util"] }
27+
serde_path_to_error = "0.1.17"
28+
tokio = { version = "1.45.1", features = ["full", "macros", "rt-multi-thread"] }

figma_rest_api_file/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Rust API client for openapi
1+
# Rust API client for figma-api
22

33
This is the OpenAPI specification for the [Figma REST API](https://www.figma.com/developers/api).
44

@@ -16,10 +16,10 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat
1616

1717
## Installation
1818

19-
Put the package under your project folder in a directory named `openapi` and add the following to `Cargo.toml` under `[dependencies]`:
19+
Put the package under your project folder in a directory named `figma-api` and add the following to `Cargo.toml` under `[dependencies]`:
2020

2121
```
22-
openapi = { path = "./openapi" }
22+
figma-api = { path = "./figma-api" }
2323
```
2424

2525
## Documentation for API Endpoints
@@ -47,6 +47,7 @@ Class | Method | HTTP request | Description
4747
- [ActionOneOf](docs/ActionOneOf.md)
4848
- [AfterTimeoutTrigger](docs/AfterTimeoutTrigger.md)
4949
- [ArcData](docs/ArcData.md)
50+
- [BackgroundBlurEffect](docs/BackgroundBlurEffect.md)
5051
- [BaseBlurEffect](docs/BaseBlurEffect.md)
5152
- [BaseBlurEffectBoundVariables](docs/BaseBlurEffectBoundVariables.md)
5253
- [BaseNoiseEffect](docs/BaseNoiseEffect.md)
@@ -119,7 +120,6 @@ Class | Method | HTTP request | Description
119120
- [HasExportSettingsTrait](docs/HasExportSettingsTrait.md)
120121
- [HasFramePropertiesTrait](docs/HasFramePropertiesTrait.md)
121122
- [HasGeometryTrait](docs/HasGeometryTrait.md)
122-
- [HasGeometryTraitAllOfFillOverrideTable](docs/HasGeometryTraitAllOfFillOverrideTable.md)
123123
- [HasLayoutTrait](docs/HasLayoutTrait.md)
124124
- [HasMaskTrait](docs/HasMaskTrait.md)
125125
- [HasTextSublayerTrait](docs/HasTextSublayerTrait.md)
@@ -173,6 +173,7 @@ Class | Method | HTTP request | Description
173173
- [IsLayerTraitBoundVariablesIndividualStrokeWeights](docs/IsLayerTraitBoundVariablesIndividualStrokeWeights.md)
174174
- [IsLayerTraitBoundVariablesRectangleCornerRadii](docs/IsLayerTraitBoundVariablesRectangleCornerRadii.md)
175175
- [IsLayerTraitBoundVariablesSize](docs/IsLayerTraitBoundVariablesSize.md)
176+
- [LayerBlurEffect](docs/LayerBlurEffect.md)
176177
- [LayoutConstraint](docs/LayoutConstraint.md)
177178
- [LayoutGrid](docs/LayoutGrid.md)
178179
- [LayoutGridBoundVariables](docs/LayoutGridBoundVariables.md)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# BackgroundBlurEffect
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**visible** | **bool** | Whether this effect is visible |
8+
**radius** | **f64** | The blur radius |
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+

figma_rest_api_file/docs/BooleanOperationNode.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**id** | **String** | A string uniquely identifying this node within the document. |
88
**name** | **String** | The name given to the node by the user in the tool. |
9-
**r#type** | **String** | The type of this node, represented by the string literal \"BOOLEAN_OPERATION\" |
109
**visible** | Option<**bool**> | Whether or not the node is visible on the canvas. | [optional][default to true]
1110
**locked** | Option<**bool**> | If true, layer is locked and cannot be edited | [optional][default to false]
1211
**is_fixed** | Option<**bool**> | Whether the layer is fixed while the parent is scrolling | [optional][default to false]
@@ -20,14 +19,12 @@ Name | Type | Description | Notes
2019
**blend_mode** | [**models::BlendMode**](BlendMode.md) | How this node blends with nodes behind it in the scene (see blend mode section for more details) |
2120
**opacity** | Option<**f64**> | Opacity of the node | [optional][default to 1]
2221
**children** | [**Vec<models::SubcanvasNode>**](SubcanvasNode.md) | An array of nodes that are direct children of this node |
23-
**absolute_bounding_box** | [**models::Rectangle**](Rectangle.md) | |
24-
**absolute_render_bounds** | [**models::Rectangle**](Rectangle.md) | |
2522
**preserve_ratio** | Option<**bool**> | Keep height and width constrained to same ratio. | [optional][default to false]
2623
**constraints** | Option<[**models::LayoutConstraint**](LayoutConstraint.md)> | Horizontal and vertical layout constraints for node. | [optional]
2724
**relative_transform** | Option<[**Vec<Vec<f64>>**](Vec.md)> | A transformation matrix is standard way in computer graphics to represent translation and rotation. These are the top two rows of a 3x3 matrix. The bottom row of the matrix is assumed to be [0, 0, 1]. This is known as an affine transform and is enough to represent translation, rotation, and skew. The identity transform is [[1, 0, 0], [0, 1, 0]]. A translation matrix will typically look like: ``` [[1, 0, tx], [0, 1, ty]] ``` and a rotation matrix will typically look like: ``` [[cos(angle), sin(angle), 0], [-sin(angle), cos(angle), 0]] ``` Another way to think about this transform is as three vectors: - The x axis (t[0][0], t[1][0]) - The y axis (t[0][1], t[1][1]) - The translation offset (t[0][2], t[1][2]) The most common usage of the Transform matrix is the `relativeTransform property`. This particular usage of the matrix has a few additional restrictions. The translation offset can take on any value but we do enforce that the axis vectors are unit vectors (i.e. have length 1). The axes are not required to be at 90° angles to each other. | [optional]
2825
**size** | Option<[**models::Vector**](Vector.md)> | Width and height of element. This is different from the width and height of the bounding box in that the absolute bounding box represents the element after scaling and rotation. Only present if `geometry=paths` is passed. | [optional]
2926
**layout_align** | Option<**String**> | Determines if the layer should stretch along the parent's counter axis. This property is only provided for direct children of auto-layout frames. - `INHERIT` - `STRETCH` In previous versions of auto layout, determined how the layer is aligned inside an auto-layout frame. This property is only provided for direct children of auto-layout frames. - `MIN` - `CENTER` - `MAX` - `STRETCH` In horizontal auto-layout frames, \"MIN\" and \"MAX\" correspond to \"TOP\" and \"BOTTOM\". In vertical auto-layout frames, \"MIN\" and \"MAX\" correspond to \"LEFT\" and \"RIGHT\". | [optional]
30-
**layout_grow** | Option<**f64**> | This property is applicable only for direct children of auto-layout frames, ignored otherwise. Determines whether a layer should stretch along the parent's primary axis. A `0` corresponds to a fixed size and `1` corresponds to stretch. | [optional][default to Variant0]
27+
**layout_grow** | Option<**f64**> | This property is applicable only for direct children of auto-layout frames, ignored otherwise. Determines whether a layer should stretch along the parent's primary axis. A `0` corresponds to a fixed size and `1` corresponds to stretch. | [optional][default to 0]
3128
**layout_positioning** | Option<**String**> | Determines whether a layer's size and position should be determined by auto-layout settings or manually adjustable. | [optional][default to Auto]
3229
**min_width** | Option<**f64**> | The minimum width of the frame. This property is only applicable for auto-layout frames or direct children of auto-layout frames. | [optional][default to 0]
3330
**max_width** | Option<**f64**> | The maximum width of the frame. This property is only applicable for auto-layout frames or direct children of auto-layout frames. | [optional][default to 0]
@@ -42,7 +39,6 @@ Name | Type | Description | Notes
4239
**stroke_align** | Option<**String**> | Position of stroke relative to vector outline, as a string enum - `INSIDE`: stroke drawn inside the shape boundary - `OUTSIDE`: stroke drawn outside the shape boundary - `CENTER`: stroke drawn centered along the shape boundary | [optional]
4340
**stroke_join** | Option<**String**> | A string enum with value of \"MITER\", \"BEVEL\", or \"ROUND\", describing how corners in vector paths are rendered. | [optional][default to Miter]
4441
**stroke_dashes** | Option<**Vec<f64>**> | An array of floating point numbers describing the pattern of dash length and gap lengths that the vector stroke will use when drawn. For example a value of [1, 2] indicates that the stroke will be drawn with a dash of length 1 followed by a gap of length 2, repeated. | [optional]
45-
**fill_override_table** | Option<[**std::collections::HashMap<String, models::HasGeometryTraitAllOfFillOverrideTable>**](HasGeometryTrait_allOf_fillOverrideTable.md)> | Map from ID to PaintOverride for looking up fill overrides. To see which regions are overriden, you must use the `geometry=paths` option. Each path returned may have an `overrideID` which maps to this table. | [optional]
4642
**fill_geometry** | Option<[**Vec<models::Path>**](Path.md)> | Only specified if parameter `geometry=paths` is used. An array of paths representing the object fill. | [optional]
4743
**stroke_geometry** | Option<[**Vec<models::Path>**](Path.md)> | Only specified if parameter `geometry=paths` is used. An array of paths representing the object stroke. | [optional]
4844
**stroke_cap** | Option<**String**> | A string enum describing the end caps of vector paths. | [optional][default to None]

figma_rest_api_file/docs/CanvasNode.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**id** | **String** | A string uniquely identifying this node within the document. |
88
**name** | **String** | The name given to the node by the user in the tool. |
9-
**r#type** | **String** | |
109
**visible** | Option<**bool**> | Whether or not the node is visible on the canvas. | [optional][default to true]
1110
**locked** | Option<**bool**> | If true, layer is locked and cannot be edited | [optional][default to false]
1211
**is_fixed** | Option<**bool**> | Whether the layer is fixed while the parent is scrolling | [optional][default to false]

figma_rest_api_file/docs/ComponentNode.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**id** | **String** | A string uniquely identifying this node within the document. |
88
**name** | **String** | The name given to the node by the user in the tool. |
9-
**r#type** | **String** | The type of this node, represented by the string literal \"COMPONENT\" |
109
**visible** | Option<**bool**> | Whether or not the node is visible on the canvas. | [optional][default to true]
1110
**locked** | Option<**bool**> | If true, layer is locked and cannot be edited | [optional][default to false]
1211
**is_fixed** | Option<**bool**> | Whether the layer is fixed while the parent is scrolling | [optional][default to false]
@@ -20,14 +19,12 @@ Name | Type | Description | Notes
2019
**blend_mode** | [**models::BlendMode**](BlendMode.md) | How this node blends with nodes behind it in the scene (see blend mode section for more details) |
2120
**opacity** | Option<**f64**> | Opacity of the node | [optional][default to 1]
2221
**children** | [**Vec<models::SubcanvasNode>**](SubcanvasNode.md) | An array of nodes that are direct children of this node |
23-
**absolute_bounding_box** | [**models::Rectangle**](Rectangle.md) | |
24-
**absolute_render_bounds** | [**models::Rectangle**](Rectangle.md) | |
2522
**preserve_ratio** | Option<**bool**> | Keep height and width constrained to same ratio. | [optional][default to false]
2623
**constraints** | Option<[**models::LayoutConstraint**](LayoutConstraint.md)> | Horizontal and vertical layout constraints for node. | [optional]
2724
**relative_transform** | Option<[**Vec<Vec<f64>>**](Vec.md)> | A transformation matrix is standard way in computer graphics to represent translation and rotation. These are the top two rows of a 3x3 matrix. The bottom row of the matrix is assumed to be [0, 0, 1]. This is known as an affine transform and is enough to represent translation, rotation, and skew. The identity transform is [[1, 0, 0], [0, 1, 0]]. A translation matrix will typically look like: ``` [[1, 0, tx], [0, 1, ty]] ``` and a rotation matrix will typically look like: ``` [[cos(angle), sin(angle), 0], [-sin(angle), cos(angle), 0]] ``` Another way to think about this transform is as three vectors: - The x axis (t[0][0], t[1][0]) - The y axis (t[0][1], t[1][1]) - The translation offset (t[0][2], t[1][2]) The most common usage of the Transform matrix is the `relativeTransform property`. This particular usage of the matrix has a few additional restrictions. The translation offset can take on any value but we do enforce that the axis vectors are unit vectors (i.e. have length 1). The axes are not required to be at 90° angles to each other. | [optional]
2825
**size** | Option<[**models::Vector**](Vector.md)> | Width and height of element. This is different from the width and height of the bounding box in that the absolute bounding box represents the element after scaling and rotation. Only present if `geometry=paths` is passed. | [optional]
2926
**layout_align** | Option<**String**> | Determines if the layer should stretch along the parent's counter axis. This property is only provided for direct children of auto-layout frames. - `INHERIT` - `STRETCH` In previous versions of auto layout, determined how the layer is aligned inside an auto-layout frame. This property is only provided for direct children of auto-layout frames. - `MIN` - `CENTER` - `MAX` - `STRETCH` In horizontal auto-layout frames, \"MIN\" and \"MAX\" correspond to \"TOP\" and \"BOTTOM\". In vertical auto-layout frames, \"MIN\" and \"MAX\" correspond to \"LEFT\" and \"RIGHT\". | [optional]
30-
**layout_grow** | Option<**f64**> | This property is applicable only for direct children of auto-layout frames, ignored otherwise. Determines whether a layer should stretch along the parent's primary axis. A `0` corresponds to a fixed size and `1` corresponds to stretch. | [optional][default to Variant0]
27+
**layout_grow** | Option<**f64**> | This property is applicable only for direct children of auto-layout frames, ignored otherwise. Determines whether a layer should stretch along the parent's primary axis. A `0` corresponds to a fixed size and `1` corresponds to stretch. | [optional][default to 0]
3128
**layout_positioning** | Option<**String**> | Determines whether a layer's size and position should be determined by auto-layout settings or manually adjustable. | [optional][default to Auto]
3229
**min_width** | Option<**f64**> | The minimum width of the frame. This property is only applicable for auto-layout frames or direct children of auto-layout frames. | [optional][default to 0]
3330
**max_width** | Option<**f64**> | The maximum width of the frame. This property is only applicable for auto-layout frames or direct children of auto-layout frames. | [optional][default to 0]
@@ -65,7 +62,6 @@ Name | Type | Description | Notes
6562
**stroke_align** | Option<**String**> | Position of stroke relative to vector outline, as a string enum - `INSIDE`: stroke drawn inside the shape boundary - `OUTSIDE`: stroke drawn outside the shape boundary - `CENTER`: stroke drawn centered along the shape boundary | [optional]
6663
**stroke_join** | Option<**String**> | A string enum with value of \"MITER\", \"BEVEL\", or \"ROUND\", describing how corners in vector paths are rendered. | [optional][default to Miter]
6764
**stroke_dashes** | Option<**Vec<f64>**> | An array of floating point numbers describing the pattern of dash length and gap lengths that the vector stroke will use when drawn. For example a value of [1, 2] indicates that the stroke will be drawn with a dash of length 1 followed by a gap of length 2, repeated. | [optional]
68-
**fill_override_table** | Option<[**std::collections::HashMap<String, models::HasGeometryTraitAllOfFillOverrideTable>**](HasGeometryTrait_allOf_fillOverrideTable.md)> | Map from ID to PaintOverride for looking up fill overrides. To see which regions are overriden, you must use the `geometry=paths` option. Each path returned may have an `overrideID` which maps to this table. | [optional]
6965
**fill_geometry** | Option<[**Vec<models::Path>**](Path.md)> | Only specified if parameter `geometry=paths` is used. An array of paths representing the object fill. | [optional]
7066
**stroke_geometry** | Option<[**Vec<models::Path>**](Path.md)> | Only specified if parameter `geometry=paths` is used. An array of paths representing the object stroke. | [optional]
7167
**stroke_cap** | Option<**String**> | A string enum describing the end caps of vector paths. | [optional][default to None]

0 commit comments

Comments
 (0)