import { BarcodeType } from '../types/BarcodeTypes'; import { ColorUsage } from '../types/ColorStyleTypes'; import { EditorAPI, EditorResponse, Id } from '../types/CommonTypes'; import { AnchorTarget, AutoGrowDirection, BlendMode, ComponentSource, CropType, FitMode, FitModePosition, FontSizeRangeManagedConstraint, FrameAnchorType, FrameConfiguration, FrameConstraints, FrameLayoutType, FrameType, FrameTypeEnum, IdSetManagedConstraint, SmartCropSettings, UpdateZIndexMethod, VerticalAlign } from '../types/FrameTypes'; import { GradientUpdate } from '../types/GradientStyleTypes'; import { ShapeType, ShapeFrameSource } from '../types/ShapeTypes'; /** * The FrameController is responsible for all communication regarding Frames. * Methods inside this controller can be called by `window.SDK.frame.{method-name}` */ export declare class FrameController { #private; constraints: FrameConstraintController; /** * This variable helps to redirect shapes related methods to newly introduced ShapeController * to avoid any breaking changes */ private shapeController; /** * @ignore */ constructor(editorAPI: EditorAPI); /** * This method returns the list of frames * @returns list of all frames */ getAll: () => Promise>; /** * This method returns the list of selected frames * @returns list of all selected frames */ getSelected: () => Promise>; /** * This method returns the list of frames by id * @param id the id of a specific page * @returns list of all frames by id */ getAllByPageId: (id: Id) => Promise>; /** * This method returns a frame by its name * @param name the name of a specific frame * @returns frame properties */ getByName: (name: string) => Promise>; /** * This method returns a frame by its id * @param id the id of a specific frame * @returns frame properties */ getById: (id: Id) => Promise>; /** * This method returns all frame properties on current layout * @returns all frame properties on current layout */ getPropertiesOnSelectedLayout: () => Promise>; /** * This method returns frame layout properties for a given frame and layout * @param id the id of a specific frame * @param layoutId the id of a specific layout * @returns frame layout properties */ getLayoutProperties: (id: Id, layoutId?: Id) => Promise>; /** * This method returns a list of frame properties for a given layout * @param id the id of a specific layout * @returns list of frame layout properties */ getAllLayoutProperties: (id: Id) => Promise>; /** * This method will reset the frame's transformation properties (x, y, width, height, rotation, anchors) * to the frame's to be inherited from the parent layout * @param id the id of a specific frame * @returns */ resetTransformation: (id: Id) => Promise>; /** * This method will reset the frame's transformation properties (x, y, width, height, rotation, anchors) * to the frame's to be inherited from the parent layout * @param id the id of a specific frame * @returns * @deprecated Use 'resetTransformation' instead */ resetSize: (id: Id) => Promise>; /** * This method will select a specific frame * @param id the id of a specific frame * @returns */ select: (id: Id) => Promise>; /** * This method will select multipleFrames * @param ids An array of all ids you want to select * @returns */ selectMultiple: (ids: Id[]) => Promise>; /** * This method will deselect all frames * @returns */ deselectAll: () => Promise>; /** * This method changes the order of frames in the z-index list. * @param order the index in the list to move to * @param ids An array of all IDs you want to move to the given index * @returns */ reorderFrames: (order: number, ids: Id[]) => Promise>; /** * This method will update the z-index of a frame. * @param id the id of the frame you want to change the z-index of * @param method the z-index update method to perform * @returns */ setZIndex: (id: Id, method: UpdateZIndexMethod) => Promise>; /** * This method will set the height of a specific frame * @param id the id of a specific frame * @param height the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels * @returns */ setHeight: (id: Id, height: string) => Promise>; /** * This method will set the rotation angle of a specific frame * @param id the id of a specific frame * @param rotation the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels * @returns */ setRotation: (id: Id, rotation: string) => Promise>; /** * This method will set the width of a specific frame * @param id the id of a specific frame * @param width the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels * @returns */ setWidth: (id: Id, width: string) => Promise>; /** * This method will set the x value of a specific frame * @param id the id of a specific frame * @param XValue the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels * @returns */ setX: (id: Id, XValue: string) => Promise>; /** * This method will set the y value of a specific frame * @param id the id of a specific frame * @param YValue the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels * @returns */ setY: (id: Id, YValue: string) => Promise>; /** * This method will set the frame opacity * @param id the id of a specific frame * @param opacity the opacity of the frame in range [0.0 - 1.0] * @returns */ setOpacity: (id: Id, opacity: number) => Promise>; /** * This method will update the name of a specific frame * @param id the id of a specific frame * @param name the new name that the frame should receive * @returns */ rename: (id: Id, name: string) => Promise>; /** * This method will reset properties of a specific frame to their original values * @param id the id of the frame that needs to get reset * @returns */ reset: (id: Id) => Promise>; /** * This method will reset the frame's transformation properties (x, y, width, height, rotation, anchors) * to the frame's to be inherited from the parent layout * @param id the id of a specific frame * @returns * @deprecated Use 'resetTransformation' instead */ resetX: (id: Id) => Promise>; /** * This method will reset the frame's transformation properties (x, y, width, height, rotation, anchors) * to the frame's to be inherited from the parent layout * @param id the id of a specific frame * @returns * @deprecated Use 'resetTransformation' instead */ resetY: (id: Id) => Promise>; /** * This method will reset the frame's transformation properties (x, y, width, height, rotation, anchors) * to the frame's to be inherited from the parent layout * @param id the id of a specific frame * @returns * @deprecated Use 'resetTransformation' instead */ resetRotation: (id: Id) => Promise>; /** * This method will reset the frame's transformation properties (x, y, width, height, rotation, anchors) * to the frame's to be inherited from the parent layout * @param id the id of a specific frame * @returns * @deprecated Use 'resetTransformation' instead */ resetWidth: (id: Id) => Promise>; /** * This method will reset the frame's transformation properties (x, y, width, height, rotation, anchors) * to the frame's to be inherited from the parent layout * @param id the id of a specific frame * @returns * @deprecated Use 'resetTransformation' instead */ resetHeight: (id: Id) => Promise>; /** * This method will reset the fitMode, position and crop properties of a specific frame to its original value * @param id the id of the frame that needs to get reset * @returns */ resetImageFrameFitMode: (id: Id) => Promise>; /** * @deprecated Use `setIsVisible` instead. * * This method will set the visibility property of a specified frame. If set to false the frame will be invisible and vice versa. * @param id the id of the frame that needs to get updated * @param value True means the frame gets visible, false means the frame gets invisible * @returns */ setVisibility: (id: Id, value: boolean) => Promise>; /** * This method will set the isVisible property of a specified frame. If set to false the frame will be invisible and vice versa. * @param id the id of the frame that needs to get updated * @param value True means the frame gets visible, false means the frame gets invisible * @returns */ setIsVisible: (id: Id, value: boolean) => Promise>; /** * This method will remove a specific frame using the Id. * @param id the id of the frame that needs to be deleted * @returns */ remove: (id: Id) => Promise>; /** * This method will remove frames with the given ids. * @param ids an array of ids of the frames to be removed. * @returns */ removeFrames: (ids: Id[]) => Promise>; /** * This method will create a new frame of 'type' to the template positioned on the requested * coordinates. * @param type the type of frame to create * @param x X coordinate of the new frame within the template * @param y Y coordinate of the new frame within the template * @param width Width of the new frame within the template * @param height Height of the new frame within the template * @returns the newly created frame's id */ create: (type: FrameTypeEnum, x: number, y: number, width: number, height: number) => Promise>; /** * This method will create a new frame of 'type' type to the template positioned on the requested * coordinates. * @param type the type of frame to create * @param x X coordinate of the new frame within the template * @param y Y coordinate of the new frame within the template * @param width Width of the new frame within the template * @param height Height of the new frame within the template * @returns the newly created shape frame's id */ createShapeFrame: (type: ShapeType, x: number, y: number, width: number, height: number) => Promise>; /** * This method will create a new barcode frame of 'type' type to the layout positioned on the requested * coordinates. Any coordinate that is not specified will default to 'center'. * @param type the type of barcode to create * @param position optional position object where you can specify the x, y of the barcode frame * @returns the newly created barcode frame's id */ createBarcodeFrame: (type: BarcodeType, position?: { x?: number; y?: number; }) => Promise>; /** * @experimental This method will add a new component frame to the current layout positioned on the requested * coordinates with the given dimensions. The component is initialized with the provided source. * @param source The source of the component frame * @param x The X coordinate of the new component frame within the layout * @param y The Y coordinate of the new component frame within the layout * @param width The width of the new component frame within the layout * @param height The height of the new component frame within the layout * @returns the newly created component frame's id */ createComponentFrame: (source: ComponentSource, x: number, y: number, width: number, height: number) => Promise>; /** * This method will duplicate a list of frames * @param ids An array of all ids you want to duplicate * @returns */ duplicateFrames: (ids: Id[]) => Promise>; /** * This method sets or removes the image source to the ImageFrame * @param imageFrameId the id of the imageFrame where an image needs to be assigned to * @param newImageSource A new image source * @returns */ private updateImageSource; /** * This method removes the image source from the ImageFrame * @param imageFrameId the id of the imageFrame where an image needs to be removed from */ removeImageSource: (imageFrameId: string) => Promise>; /** * This method will assign an image from a mediaConnector to the correct ImageFrame * @param id Unique Id of the media connector * @param imageFrameId the id of the imageFrame where an image needs to be assigned to * @param assetId Unique id of the asset that you want to assign to the imageFrame * @returns */ setImageFromConnector: (imageFrameId: Id, connectorId: Id, assetId: Id) => Promise>; /** * This method will assign an image from url to the correct ImageFrame * Make sure the url can be accessed by the editor. * @param imageFrameId the id of the imageFrame where an image needs to be assigned to * @param url A valid image uri * @returns */ setImageFromUrl: (imageFrameId: Id, url: string) => Promise>; /** * This method will set the fitMode property of a specified image frame. * @param imageFrameId the id of the imageFrame that needs to get updated. * @param fitMode the new fitMode that you want to set to the imageFrame. * @returns */ setImageFrameFitMode: (imageFrameId: Id, fitMode: FitMode) => Promise>; /** * This method will set the fit mode position property of a specified image frame. * @param imageFrameId the id of the imageFrame that needs to get updated. * @param position the new position that you want to set to the imageFrame. * @returns */ setImageFrameFitModePosition: (imageFrameId: Id, position: FitModePosition) => Promise>; /** * This method sets the smart crop settings of a specified image frame. The frame does not have * to be in smart crop mode to set the smart crop settings. This method does not change the mode of the image frame * * @param imageFrameId the id of the imageFrame that needs to get updated. * @param settings the new smart crop settings to be set to the imageFrame. * @returns */ setImageFrameSmartCropSettings: (imageFrameId: Id, settings: SmartCropSettings) => Promise>; /** * @deprecated the constrain proportions setter is not supported anymore. * * This method will set the constrainProportions property of a specified frame. If constrainProportionsReadOnly is * true, the frame's constrainProportions property cannot be changed and this method will return an error. * * @param _id the id of the frame that needs to get updated. * @param _constrainProportions The new constraint that you want to set to the frame. * @returns */ setFrameConstrainProportions: (_id: Id, _constrainProportions: boolean) => Promise>; /** * This method will set the vertical alignment property of a specified frame. * @param id the id of the frame that needs to get updated * @param verticalAlign the new vertical alignment to be set to the frame. * @returns */ setVerticalAlign: (id: Id, verticalAlign: VerticalAlign) => Promise>; /** * This method will set the number of columns property of a specified frame. * @param id the id of the frame that needs to get updated * @param numberOfColumns the number of columns to be set to the frame. * @returns */ setNumberOfColumns: (id: Id, numberOfColumns: number) => Promise>; /** * This method will set the column gap property of a specified frame. * @param id the id of the frame that needs to get updated * @param columnGap the column gap value to be set to the frame. * @returns */ setColumnGap: (id: Id, columnGap: string) => Promise>; /** * This method will set the min copyFitting property of a specified frame. * @param id the id of the frame that needs to get updated * @param value the new min copyFitting value to be set to the frame. * @returns */ setMinCopyfitting: (id: Id, value: string) => Promise>; /** * This method will set the max copyFitting property of a specified frame. * @param id the id of the frame that needs to get updated * @param value the new max copyFitting value to be set to the frame. * @returns */ setMaxCopyfitting: (id: Id, value: string) => Promise>; /** * This method will enable copyFitting on a specified frame. * @param id the id of the frame that needs to get updated * @param value the new value to be set to the frame. * @returns */ setEnableCopyfitting: (id: Id, value: boolean) => Promise>; /** * This method will reset the frame minCopyfitting to the frame's original value * @param id the id of a specific frame * @returns */ resetMinCopyfitting: (id: Id) => Promise>; /** * This method will reset the frame maxCopyfitting to the frame's original value * @param id the id of a specific frame * @returns */ resetMaxCopyfitting: (id: Id) => Promise>; /** * This method will reset the frame enableCopyfitting to the frame's original value * @param id the id of a specific frame * @returns */ resetEnableCopyfitting: (id: Id) => Promise>; /** * This method will set the visibility of the shape fill. * @param shapeFrameId the id of the shapeFrame that needs to get updated. * @param enableFill Whether the shape fill is visible. * @returns */ setShapeFrameEnableFill: (shapeFrameId: Id, enableFill: boolean) => Promise>; /** * This method will set the shape fill color of a specified shape frame. * @param shapeFrameId the id of the shapeFrame that needs to get updated. * @param fillColor the new shape fill color that you want to set to the shapeFrame. * @returns */ setShapeFrameFillColor: (shapeFrameId: Id, fillColor: ColorUsage) => Promise>; /** * This method will set the visibility of the shape stroke. * @param shapeFrameId the id of the shapeFrame that needs to get updated. * @param enableStroke Whether the shape stroke is visible. * @returns */ setShapeFrameEnableStroke: (shapeFrameId: Id, enableStroke: boolean) => Promise>; /** * This method will set the shape stroke color of a specified shape frame. * @param shapeFrameId the id of the shapeFrame that needs to get updated. * @param strokeColor the new shape stroke color that you want to set to the shapeFrame. * @returns */ setShapeFrameStrokeColor: (shapeFrameId: Id, strokeColor: ColorUsage) => Promise>; /** * This method will set the shape stroke weight of a specified shape frame. * @param shapeFrameId the id of the shapeFrame that needs to get updated. * @param strokeWeight the new shape stroke weight that you want to set to the shapeFrame. * @returns */ setShapeFrameStrokeWeight: (shapeFrameId: Id, strokeWeight: number) => Promise>; /** * This method will set the blend mode of a specified frame * @param id the id of a specific frame * @param blendMode the blend mode * @returns */ setBlendMode: (id: Id, blendMode: BlendMode) => Promise>; /** * This method will set the container shape of a specified frame * @param frameId the id of the frame that needs to get updated * @param value the shape frame source object * @returns */ setFrameContainerShape: (frameId: Id, value: ShapeFrameSource) => Promise>; /** * This method will make the specified image frame go into cropping mode. * @param id the id of a specific image frame * @param type the type of cropping mode to enter. Defaults to frameCrop. * @returns */ enterCropMode: (id: Id, type?: CropType) => Promise>; /** * This method will exit cropping mode while saving the applied crop. * @returns */ applyCropMode: () => Promise>; /** * This method will exit cropping mode without saving the applied crop. * @returns */ exitCropMode: () => Promise>; /** * This method will make the specified image frame go into subject mode. * @param id the id of a specific image frame * @returns */ enterSubjectMode: (id: Id) => Promise>; /** * This method will exit subject mode while saving the applied subject area. * @returns */ applySubjectMode: () => Promise>; /** * This method will exit subject mode without saving the applied subject area. * @returns */ exitSubjectMode: () => Promise>; /** * This method will make the specified shape frame go into gradient mode. * @param id the id of a specific shape frame * @returns */ enterGradientMode: (id: Id) => Promise>; /** * This method will exit gradient mode while saving the applied gradient. * @returns */ applyGradientMode: () => Promise>; /** * This method will exit gradient mode without saving the applied gradient. * @returns */ cancelGradientMode: () => Promise>; /** * @deprecated This method no longer has any effect. Use 'setImageFrameFitMode' or 'resetImageFrameFitMode' instead */ resetCropMode: (_id: Id) => Promise>; /** * This method will enable auto grow on a specified frame. * @param id the id of the frame that needs to get updated * @param value the new value to be set to the frame. * @returns */ setEnableAutoGrow: (id: Id, value: boolean) => Promise>; /** * This method will set the minWidth for auto-grow of a specified frame. Set to null to remove the value. * @param id the id of the frame that needs to get updated * @param value the new minWidth value to be set * @returns */ setAutoGrowMinWidth: (id: Id, value: string | null) => Promise>; /** * This method will set the maxWidth for auto-grow of a specified frame. Set to null to remove the value. * @param id the id of the frame that needs to get updated * @param value the new maxWidth value to be set * @returns */ setAutoGrowMaxWidth: (id: Id, value: string | null) => Promise>; /** * This method will set the minHeight for auto-grow of a specified frame. Set to null to remove the value. * @param id the id of the frame that needs to get updated * @param value the new minHeight value to be set * @returns */ setAutoGrowMinHeight: (id: Id, value: string | null) => Promise>; /** * This method will set the maxHeight for auto-grow of a specified frame. Set to null to remove the value. * @param id the id of the frame that needs to get updated * @param value the new maxHeight value to be set * @returns */ setAutoGrowMaxHeight: (id: Id, value: string | null) => Promise>; /** * This method will set the auto grow directions for auto-grow of a specified frame. * @param id the id of the frame that needs to get updated * @param value the new directions value to be set * @returns */ setAutoGrowDirections: (id: Id, value: Array) => Promise>; /** * @deprecated This method no longer has any effect. Use `resetTransformation` instead */ resetAutoGrowSettingsEnabled: (_id: Id) => Promise>; /** * @deprecated This method no longer has any effect. Use `resetTransformation` instead */ resetAutoGrowMinWidth: (_id: Id) => Promise>; /** * @deprecated This method no longer has any effect. Use `resetTransformation` instead */ resetAutoGrowMaxWidth: (_id: Id) => Promise>; /** * @deprecated This method no longer has any effect. Use `resetTransformation` instead */ resetAutoGrowMinHeight: (_id: Id) => Promise>; /** * @deprecated This method no longer has any effect. Use `resetTransformation` instead */ resetAutoGrowMaxHeight: (_id: Id) => Promise>; /** * @deprecated This method no longer has any effect. Use `resetTransformation` instead */ resetAutoGrowDirections: (_id: Id) => Promise>; /** * @deprecated This method no longer has any effect. Use `resetTransformation` instead */ resetAutoGrow: (_id: Id) => Promise>; /** * This method will enable shadow on a specified frame. * @param id the id of the frame that needs to get updated * @param value the new value to be set to the frame. * @returns */ setShadowEnabled: (id: Id, value: boolean) => Promise>; /** * This method will set the distance for shadow of a specified frame. * @param id the id of the frame that needs to get updated * @param value the new distance value to be set * @returns */ setShadowDistance: (id: Id, value: string) => Promise>; /** * This method will set the angle in degrees for shadow of a specified frame. * @param id the id of the frame that needs to get updated * @param value the new angle value to be set * @returns */ setShadowAngleDegrees: (id: Id, value: number) => Promise>; /** * This method will set the blur radius for shadow of a specified frame. * @param id the id of the frame that needs to get updated * @param value the new blur radius value to be set * @returns */ setShadowBlurRadius: (id: Id, value: number) => Promise>; /** * This method will set the color for shadow of a specified frame. * @param id the id of the frame that needs to get updated * @param value the new color value to be set * @returns */ setShadowColor: (id: Id, value: ColorUsage) => Promise>; private setAnchor; /** * @experimental * This method will set the vertical anchor to target frame on a specified frame. * @param id the id of the frame that needs to get a frame anchor set * @param anchorType the type of positioning to be set to the frame * @param anchorTarget the target frame to which it is anchored * @param endAnchorTarget the target (end) frame to which it can be anchored * @returns */ setVerticalAnchor: (id: Id, anchorType: FrameAnchorType, anchorTarget: AnchorTarget, endAnchorTarget?: AnchorTarget | null) => Promise>; /** * @experimental * This method will set the horizontal anchor to target frame on a specified frame. * @param id the id of the frame that needs to get a frame anchor set * @param anchorType the type of positioning to be set to the frame * @param anchorTarget the target frame to which it is anchored * @param endAnchorTarget the target (end) frame to which it can be anchored * @returns */ setHorizontalAnchor: (id: Id, anchorType: FrameAnchorType, anchorTarget: AnchorTarget, endAnchorTarget?: AnchorTarget | null) => Promise>; /** * This method will reset the frame's transformation properties (x, y, width, height, rotation, anchors) * to the frame's to be inherited from the parent layout * @param id the id of a specific frame * @returns * @deprecated Use 'resetTransformation' instead */ resetAnchoring: (id: Id) => Promise>; /** * This method will reset the isVisible property of a specified frame. * @param id the id of the frame that needs to get updated * @returns */ resetVisibility: (id: Id) => Promise>; /** * This method will get the frame configuration for a specified frame. * * A frame configuration is a set of rules that define what is allowed to * do with a given behavior of a frame. * * e.g. list of allowed frame targets for a specific anchor * * @param id the id of the frame to get the frame configuration for * @returns the frame's configuration */ getConfiguration: (id: Id) => Promise>; /** * This method will set the crop override for the current asset for the specified frame * @param id the id of the frame that holds the override to reset * @returns */ resetAssetCropOverride: (id: Id) => Promise>; /** * This method will reset all crop overrides for the specified frame * @param id the id of the frame * @returns */ resetAllAssetCropOverrides: (id: Id) => Promise>; /** * This method will enable/disable gradient on a specified frame. * @param id the id of the frame that needs to get updated * @param value the new value to be set to the frame. * @returns */ setGradientApplied: (id: Id, value: boolean) => Promise>; /** * This method will update (or set) the local gradient on a specified frame. * @param id the id of the frame that needs to get updated * @param value the new value to be set to the frame. * @returns */ setLocalGradient: (id: Id, value: GradientUpdate) => Promise>; /** * This method will update (or set) the frame to use the provided brand kit gradient * @param id the id of the frame that needs to get updated * @param value the id of an existing brandkit gradient * @returns */ setBrandKitGradient: (id: Id, value: Id) => Promise>; /** * This method will set the smart crop subject id for a specified frame * @param id the id of the frame that needs to get updated * @param subjectId the subject id to set for smart crop * @returns */ setSmartCropSubjectId: (id: Id, subjectId?: Id) => Promise>; } export declare class FrameConstraintController { #private; /** * @ignore */ constructor(editorAPI: EditorAPI); /** * This method will retrieve all constraints for a specified frame * @param id the id of the frame that we want to know the constraints from * @returns the constraints configuration for the frame */ get: (id: Id) => Promise>; /** * This method will set the selectable constraint for a specified frame * @param id the id of the frame that needs to get updated * @param allowed whether the frame is selectable or not * @returns */ setSelectable: (id: Id, allowed: boolean) => Promise>; /** * This method will set the horizontal movement constraint for a specified frame * @param id the id of the frame that needs to get updated * @param allowed whether horizontal movement is allowed or not * @returns */ setHorizontalMovement: (id: Id, allowed: boolean) => Promise>; /** * This method will set the vertical movement constraint for a specified frame * @param id the id of the frame that needs to get updated * @param allowed whether vertical movement is allowed or not * @returns */ setVerticalMovement: (id: Id, allowed: boolean) => Promise>; /** * This method will set the rotation constraint for a specified frame * @param id the id of the frame that needs to get updated * @param allowed whether rotation is allowed or not * @returns */ setRotation: (id: Id, allowed: boolean) => Promise>; /** * This method will set the resize constraint for a specified frame * @param id the id of the frame that needs to get updated * @param allowed whether resize is allowed or not * @param proportionLocked whether the frame's proportions are locked or not * @returns */ setResize: (id: Id, allowed: boolean, proportionLocked?: boolean) => Promise>; /** * This method will set the crop constraint for a specified image frame * @param id the id of the frame that needs to get updated * @param allowed whether crop is allowed or not * @returns */ setCrop: (id: Id, allowed: boolean) => Promise>; /** * This method will set the text editing constraint for a specified text frame * @param id the id of the frame that needs to get updated * @param allowed whether text editing is allowed or not * @returns */ setTextEditingAllowed: (id: Id, allowed: boolean) => Promise>; /** * This method will set the allowed paragraph styles constraint for a specified text frame * @param id the id of the frame that needs to get updated * @param constraint the managed constraint: when allowed is true, only the provided ids may be used; when false, the constraint is turned off (stored value is kept for reactivation) * @returns */ setAllowedParagraphStyles: (id: Id, constraint: IdSetManagedConstraint) => Promise>; /** * This method will set the allowed character styles constraint for a specified text frame * @param id the id of the frame that needs to get updated * @param constraint the managed constraint: when allowed is true, only the provided ids may be used; when false, the constraint is turned off (stored value is kept for reactivation) * @returns */ setAllowedCharacterStyles: (id: Id, constraint: IdSetManagedConstraint) => Promise>; /** * This method will set the allowed colors constraint for a specified text frame * @param id the id of the frame that needs to get updated * @param constraint the managed constraint: when allowed is true, only the provided ids may be used; when false, the constraint is turned off (stored value is kept for reactivation) * @returns */ setAllowedColors: (id: Id, constraint: IdSetManagedConstraint) => Promise>; /** * This method will set the allowed font sizes constraint for a specified text frame * @param id the id of the frame that needs to get updated * @param constraint the managed constraint: when allowed is true, restricts font sizes to min and max (inclusive); when false, the constraint is turned off (stored value is kept for reactivation) * @returns */ setAllowedFontSizes: (id: Id, constraint: FontSizeRangeManagedConstraint) => Promise>; }