Skip to content

Commit

Permalink
feat(slides): update the API
Browse files Browse the repository at this point in the history
#### slides:v1

The following keys were added:
- schemas.Autofit.description
- schemas.Autofit.id
- schemas.Autofit.properties.autofitType.description
- schemas.Autofit.properties.autofitType.enum
- schemas.Autofit.properties.autofitType.enumDescriptions
- schemas.Autofit.properties.autofitType.type
- schemas.Autofit.properties.fontScale.description
- schemas.Autofit.properties.fontScale.format
- schemas.Autofit.properties.fontScale.type
- schemas.Autofit.properties.lineSpacingReduction.description
- schemas.Autofit.properties.lineSpacingReduction.format
- schemas.Autofit.properties.lineSpacingReduction.type
- schemas.Autofit.type
- schemas.ShapeProperties.properties.autofit.$ref
- schemas.ShapeProperties.properties.autofit.description

The following keys were changed:
- schemas.ShapeProperties.description
  • Loading branch information
yoshi-automation authored and sofisl committed Mar 10, 2021
1 parent 3c5cc08 commit dec09a5
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 3 deletions.
41 changes: 39 additions & 2 deletions discovery/slides-v1.json
Expand Up @@ -313,7 +313,7 @@
}
}
},
"revision": "20201120",
"revision": "20210302",
"rootUrl": "https://slides.googleapis.com/",
"schemas": {
"AffineTransform": {
Expand Down Expand Up @@ -394,6 +394,39 @@
},
"type": "object"
},
"Autofit": {
"description": "The autofit properties of a Shape.",
"id": "Autofit",
"properties": {
"autofitType": {
"description": "The autofit type of the shape. If the autofit type is AUTOFIT_TYPE_UNSPECIFIED, the autofit type is inherited from a parent placeholder if it exists. The field is automatically set to NONE if a request is made that might affect text fitting within its bounding text box. In this case the font_scale is applied to the font_size and the line_spacing_reduction is applied to the line_spacing. Both properties are also reset to default values.",
"enum": [
"AUTOFIT_TYPE_UNSPECIFIED",
"NONE",
"TEXT_AUTOFIT",
"SHAPE_AUTOFIT"
],
"enumDescriptions": [
"The autofit type is unspecified.",
"Do not autofit.",
"Shrink text on overflow to fit the shape.",
"Resize the shape to fit the text."
],
"type": "string"
},
"fontScale": {
"description": "The font scale applied to the shape. For shapes with autofit_type NONE or SHAPE_AUTOFIT, this value is the default value of 1. For TEXT_AUTOFIT, this value multiplied by the font_size gives the font size that is rendered in the editor. This property is read-only.",
"format": "float",
"type": "number"
},
"lineSpacingReduction": {
"description": "The line spacing reduction applied to the shape. For shapes with autofit_type NONE or SHAPE_AUTOFIT, this value is the default value of 0. For TEXT_AUTOFIT, this value subtracted from the line_spacing gives the line spacing that is rendered in the editor. This property is read-only.",
"format": "float",
"type": "number"
}
},
"type": "object"
},
"BatchUpdatePresentationRequest": {
"description": "Request message for PresentationsService.BatchUpdatePresentation.",
"id": "BatchUpdatePresentationRequest",
Expand Down Expand Up @@ -3330,9 +3363,13 @@
"type": "object"
},
"ShapeProperties": {
"description": "The properties of a Shape. If the shape is a placeholder shape as determined by the placeholder field, then these properties may be inherited from a parent placeholder shape. Determining the rendered value of the property depends on the corresponding property_state field value.",
"description": "The properties of a Shape. If the shape is a placeholder shape as determined by the placeholder field, then these properties may be inherited from a parent placeholder shape. Determining the rendered value of the property depends on the corresponding property_state field value. Any text autofit settings on the shape are automatically deactivated by requests that can impact how text fits in the shape.",
"id": "ShapeProperties",
"properties": {
"autofit": {
"$ref": "Autofit",
"description": "The autofit properties of the shape. This property is only set for shapes that allow text."
},
"contentAlignment": {
"description": "The alignment of the content in the shape. If unspecified, the alignment is inherited from a parent placeholder if it exists. If the shape has no parent, the default alignment matches the alignment for new shapes created in the Slides editor.",
"enum": [
Expand Down
23 changes: 22 additions & 1 deletion src/apis/slides/v1.ts
Expand Up @@ -158,6 +158,23 @@ export namespace slides_v1 {
*/
unit?: string | null;
}
/**
* The autofit properties of a Shape.
*/
export interface Schema$Autofit {
/**
* The autofit type of the shape. If the autofit type is AUTOFIT_TYPE_UNSPECIFIED, the autofit type is inherited from a parent placeholder if it exists. The field is automatically set to NONE if a request is made that might affect text fitting within its bounding text box. In this case the font_scale is applied to the font_size and the line_spacing_reduction is applied to the line_spacing. Both properties are also reset to default values.
*/
autofitType?: string | null;
/**
* The font scale applied to the shape. For shapes with autofit_type NONE or SHAPE_AUTOFIT, this value is the default value of 1. For TEXT_AUTOFIT, this value multiplied by the font_size gives the font size that is rendered in the editor. This property is read-only.
*/
fontScale?: number | null;
/**
* The line spacing reduction applied to the shape. For shapes with autofit_type NONE or SHAPE_AUTOFIT, this value is the default value of 0. For TEXT_AUTOFIT, this value subtracted from the line_spacing gives the line spacing that is rendered in the editor. This property is read-only.
*/
lineSpacingReduction?: number | null;
}
/**
* A TextElement kind that represents auto text.
*/
Expand Down Expand Up @@ -1740,9 +1757,13 @@ export namespace slides_v1 {
solidFill?: Schema$SolidFill;
}
/**
* The properties of a Shape. If the shape is a placeholder shape as determined by the placeholder field, then these properties may be inherited from a parent placeholder shape. Determining the rendered value of the property depends on the corresponding property_state field value.
* The properties of a Shape. If the shape is a placeholder shape as determined by the placeholder field, then these properties may be inherited from a parent placeholder shape. Determining the rendered value of the property depends on the corresponding property_state field value. Any text autofit settings on the shape are automatically deactivated by requests that can impact how text fits in the shape.
*/
export interface Schema$ShapeProperties {
/**
* The autofit properties of the shape. This property is only set for shapes that allow text.
*/
autofit?: Schema$Autofit;
/**
* The alignment of the content in the shape. If unspecified, the alignment is inherited from a parent placeholder if it exists. If the shape has no parent, the default alignment matches the alignment for new shapes created in the Slides editor.
*/
Expand Down

0 comments on commit dec09a5

Please sign in to comment.