Published type aliases
Exact declarations from @kittl/[email protected]. These are the types shipped by npm, including supporting declarations referenced by public APIs. A supporting declaration is not necessarily an exported runtime value.
API member inventory · Download the published declaration
AIGenerationContentType
export type AIGenerationContentType = "image" | "video";
AIGenerationModelTaskType
export type AIGenerationModelTaskType = "IMAGE_TO_IMAGE" | "IMAGE_INPAINT" | "TEXT_TO_IMAGE" | "IMAGE_TO_VIDEO";
APIOptions
export type APIOptions<T extends Record<string, unknown>> = {
batchClient?: BatchClient<T>;
} | {
origin?: Origin;
historyOrigin?: HistoryOrigins;
} | undefined;
AbsolutePosition
export type AbsolutePosition = {
absolute: LeftTopPosition;
};
ActiveTool
export type ActiveTool = {
type: "artboard";
} | {
type: "move";
} | {
type: "pen";
} | {
type: "pen-vector-editing";
} | {
type: "comment";
} | {
type: "shape";
shape: BasicShapeType;
};
AddIllustrationParams
export type AddIllustrationParams = {
src: string;
objectProperties?: IllustrationProperties;
} & CreateElementWithPositionAndSize;
AddImageParams
export type AddImageParams = ({
src: string;
} | {
width: number;
height: number;
src?: never;
}) & GeneratableObject & {
objectProperties?: ImageProperties;
} & CreateElementWithPositionAndSize;
AddIntoGroupParams
export type AddIntoGroupParams = {
groupId: string;
objectIds: string[];
};
AddMockupBoardParams
export type AddMockupBoardParams = {
inputBoardIds: string[];
mockupTemplateId: number;
shouldMockupColorMatchArtboard?: boolean;
initialDesigns?: AddMockupDesignObjectParams[];
} & {
position: AbsolutePosition | RelativePosition;
size: Dimensions;
};
AddMockupDesignObjectParams
export type AddMockupDesignObjectParams = {
mockupBoardId: string;
inputBoardId: string;
mockupTemplateId: number;
initialNormalizedUnwarpedRect: MockupDesignRect;
};
AddSmartboardParams
export type AddSmartboardParams = {
linkedBoardIds?: string[];
} & {
position: AbsolutePosition | RelativePosition;
size: Dimensions;
};
AddTextParams
export type AddTextParams = {
text: string;
id?: string;
textProperties?: TextProperties;
position: CreateElementWithPositionAndSize["position"];
size: Dimensions;
};
AddVideoParams
export type AddVideoParams = {
playlist: Omit<VideoPlaylistItem, "id">[];
videoSize?: {
width: number;
height: number;
};
} & CreateElementWithPositionAndSize;
AddVideoboardParams
export type AddVideoboardParams = {
linkedBoardIds?: string[];
video?: {
width?: number;
height?: number;
playlist: Omit<VideoPlaylistItem, "id">[];
};
} & {
position: AbsolutePosition | RelativePosition;
size: Dimensions;
};
AppState
export type AppState = {
selectedObjectsIds: string[];
selectedLayersIds: string[];
selectedArtboardIds: string[];
selectedArtboardsObjectIds: string[];
allSelectedObjectsIds: string[];
canvasMode: CanvasMode | string;
activeTool: ActiveTool | null;
viewport: Viewport;
highlightedObjectId: string | null;
};
ArtboardLikeType
export type ArtboardLikeType = ObjectType.Artboard | ObjectType.MockupBoard | ObjectType.Smartboard | ObjectType.Videoboard;
ArtboardOptions
export type ArtboardOptions = StandardArtboardOptions | SmartboardOptions | MockupBoardOptions | VideoboardOptions;
AvailableShadowOptions
export type AvailableShadowOptions = Partial<Pick<ShadowOptions, "blur">> & Omit<ShadowOptions, "blur">;
BaseFloatingBoard
export type BaseFloatingBoard = {
id: string;
floating: true;
};
BasicShapeConfigurableFields
export type BasicShapeConfigurableFields = {
angle?: BasicShapeSerializedObject["angle"];
flipX?: BasicShapeSerializedObject["flipX"];
flipY?: BasicShapeSerializedObject["flipY"];
hidden?: BasicShapeSerializedObject["hidden"];
opacity?: BasicShapeSerializedObject["opacity"];
skewX?: BasicShapeSerializedObject["skewX"];
skewY?: BasicShapeSerializedObject["skewY"];
cornerRadii?: BasicShapeSerializedObject["cornerRadii"];
name?: BasicShapeSerializedObject["name"];
shadowOptions?: BasicShapeSerializedObject["shadowOptions"];
shadowColor?: NonNullable<BasicShapeSerializedObject["shadowOptions"]>["color"];
fill?: BasicShapeSerializedObject["fill"];
fillColor?: NonNullable<BasicShapeSerializedObject["fill"]>[number]["value"];
stroke?: BasicShapeSerializedObject["stroke"];
strokeWidth?: BasicShapeSerializedObject["strokeWidth"];
};
BasicShapeSerializedObject
export type BasicShapeSerializedObject = typeof BASIC_SHAPE_DEFAULT_VALUES & {
nPoints?: number | undefined;
};
BasicShapeType
export type BasicShapeType = (typeof BasicShapeType)[keyof typeof BasicShapeType];
BridgedSdkResult
export type BridgedSdkResult<T> = T extends SdkResult<infer _R, infer _E> ? T : SdkResult<T, Error>;
Builtin
export type Builtin = Date | Function | Uint8Array | RegExp | Map<unknown, unknown> | Set<unknown>;
CanvasMode
export type CanvasMode = "erase" | "crop" | "reframe" | "inpaint" | null;
CloneArtboardParams
export type CloneArtboardParams = {
boardId: string;
position: CreateElementWithPositionAndSize["position"];
};
Color
export type Color = GradientObject | string | null | undefined;
ColorInfo
export type ColorInfo = StringColor | FullColor;
CombinedShapeSerializedObject
export type CombinedShapeSerializedObject = Omit<typeof DEFAULT_VALUES, "shapes"> & {
shapes: Shape[];
};
ConnectedArtboardOptions
export type ConnectedArtboardOptions<T extends ArtboardLikeType = ArtboardLikeType> = BaseStandardArtboardOptions<T> & {
inputBoardIds?: string[];
};
ConvertShapeToMaskInput
export type ConvertShapeToMaskInput = {
id: NormalizedBasicShapeObject["id"];
};
CreateBasicShapeInput
export type CreateBasicShapeInput = CreateElementWithPositionAndSize & {
objectName: string;
objectProperties?: ShapeProperties;
};
CreateBoardParams
export type CreateBoardParams = Omit<CreateElementWithPositionAndSize, "size" | "boardId"> & {
title?: string;
size: {
width: number;
height: number;
};
};
CreateElementWithPositionAndSize
export type CreateElementWithPositionAndSize = {
boardId?: string;
position: AbsolutePosition | RelativePosition;
size?: Dimensions & {
applyViewportScale?: boolean;
};
};
CreateGroupParams
export type CreateGroupParams = {
structureIds: string[];
};
CreateGuideInput
export type CreateGuideInput = {
boardId?: string;
} & OrientationConditional;
CreateShapeInput
export type CreateShapeInput = CreateElementWithPositionAndSize & {
shapeType: BasicShapeType;
objectProperties?: ShapeProperties;
};
DeepPartial
export type DeepPartial<T> = {
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
};
DesignApiOptions
export type DesignApiOptions = APIOptions<NormalizedDesignState>;
DesignObjectId
export type DesignObjectId = string;
DesignStructureObject
export type DesignStructureObject = {
id?: StructureObjectId | null;
meta?: StructureObjectMeta;
parentId?: ID;
};
Dimensions
export type Dimensions = {
width: number;
height: number;
};
ElementLocation
export type ElementLocation = "origin" | "center";
Expand
export type Expand<T> = T extends infer O ? {
[K in keyof O]: O[K];
} : never;
FillMetaTarget
export type FillMetaTarget = "border" | "fill";
FullColor
export type FullColor = {
key: "fill" | (Exclude<string, StringColorKeysType> & {});
value: Color;
visible: boolean;
};
FunctionType
export type FunctionType = (...args: never) => unknown;
GenerationStatus
export type GenerationStatus = (typeof GenerationStatus)[keyof typeof GenerationStatus];
GenerationStatusUpdate
export type GenerationStatusUpdate = {
generationId: string;
status: typeof GenerationStatus.CREATED;
inputData: undefined;
result: undefined;
} | {
generationId: string;
status: typeof GenerationStatus.STARTED;
inputData: GenerationInputData;
result: StartedGenerationResult;
} | {
generationId: string;
status: typeof GenerationStatus.COMPLETE;
inputData: GenerationInputData;
result: SuccessGenerationResult;
} | {
generationId: string;
status: typeof GenerationStatus.FAILED;
inputData: GenerationInputData | undefined;
result: ErrorGenerationResult;
};
GuideSerializedObject
export type GuideSerializedObject = typeof GUIDE_DEFAULT_VALUES & OrientationDir;
ID
export type ID = string;
IllustrationImageSerializedObject
export type IllustrationImageSerializedObject = typeof DEFAULT_VALUES$1 & {
backgroundRemoved?: boolean | undefined;
realWidth?: number | undefined;
realHeight?: number | undefined;
erasePaths?: {
cacheKey: string;
objectName: string | null;
fallbackObjectName?: string;
} | undefined;
_eraseStrokeWidth?: number | undefined;
};
IllustrationProperties
export type IllustrationProperties = {
angle?: IllustrationSerializedObject["angle"];
flipX?: IllustrationSerializedObject["flipX"];
flipY?: IllustrationSerializedObject["flipY"];
hidden?: IllustrationSerializedObject["hidden"];
opacity?: IllustrationSerializedObject["opacity"];
shadowOptions?: IllustrationSerializedObject["shadowOptions"];
stroke?: IllustrationSerializedObject["stroke"];
strokeWidth?: IllustrationSerializedObject["strokeWidth"];
fill?: IllustrationSerializedObject["fill"];
gradients?: IllustrationSerializedObject["gradients"];
};
IllustrationSerializedObject
export type IllustrationSerializedObject = typeof ILLUSTRATION_DEFAULT_VALUES;
ImageProperties
export type ImageProperties = {
angle?: IllustrationImageSerializedObject["angle"];
flipX?: IllustrationImageSerializedObject["flipX"];
flipY?: IllustrationImageSerializedObject["flipY"];
hidden?: IllustrationImageSerializedObject["hidden"];
opacity?: IllustrationImageSerializedObject["opacity"];
shadowOptions?: IllustrationImageSerializedObject["shadowOptions"];
stroke?: IllustrationImageSerializedObject["stroke"];
strokeWidth?: IllustrationImageSerializedObject["strokeWidth"];
fill?: IllustrationImageSerializedObject["fill"];
};
InternalPatchArgs
export type InternalPatchArgs<T> = {
patch: PatchTree<T> | PatchTree<T>[];
origin: Origin;
historyOrigin?: HistoryOrigins;
};
LayerIconType
export type LayerIconType = "drawIcon";
LayerType
export type LayerType = Exclude<SerializableObjectType, ObjectType.Guide> | typeof structuralGroupType | typeof clippingMaskType | typeof backgroundType | typeof pathType;
LayersMovePosition
export type LayersMovePosition = "before" | "after" | "into";
LeftTopPosition
export type LeftTopPosition = {
left: number;
top: number;
};
LinkedPreset
export type LinkedPreset = {
id: string;
libraryId: string;
} & LinkedPresetMeta;
LinkedPresetMeta
export type LinkedPresetMeta = {
type: LibraryPresetType.FILL;
meta: LinkedFillPresetMeta;
} | {
type: LibraryPresetType.TRANSFORMATION;
meta?: never;
} | {
type: LibraryPresetType.PHOTO_FILTER;
meta?: never;
} | {
type: LibraryPresetType.SHADOW;
meta?: never;
} | {
type: LibraryPresetType.TEXT;
meta?: never;
} | {
type: LibraryPresetType.TEXT_EFFECT;
meta?: never;
} | {
type: LibraryPresetType.TEXT_DECORATION;
meta?: never;
};
LoadingCardSerializedObject
export type LoadingCardSerializedObject = typeof LOADING_CARD_DEFAULT_VALUES & {
imageGenerationId?: string | undefined;
startedAt?: number | undefined;
generatingModelKey?: string | undefined;
generationAverageSpeed?: number | undefined;
};
MaskSerializedObject
export type MaskSerializedObject = typeof MASK_DEFAULT_VALUES & {
maskFill?: string | null | undefined;
isClipPath?: boolean | undefined;
};
MockupBoardOptions
export type MockupBoardOptions = ConnectedArtboardOptions<ObjectType.MockupBoard> & {
mockupTemplateId?: number;
shouldMockupColorMatchArtboard?: boolean;
};
MockupDesignRect
export type MockupDesignRect = {
x: number;
y: number;
width: number;
height: number;
};
MockupDesignSerializedObject
export type MockupDesignSerializedObject = typeof MOCKUP_DESIGN_DEFAULT_VALUES & {
inputBoardId: string;
mockupTemplateId: number;
initialNormalizedUnwarpedRect: MockupDesignRect;
};
MoveToParams
export type MoveToParams = {
boardOrObjectIds: string[];
position: LayersMovePosition;
targetId: string;
};
NormalizeArray
export type NormalizeArray<T> = T extends (infer U)[] ? Record<string, Normalized<U>> : never;
NormalizeObject
export type NormalizeObject<T> = Expand<{
[K in keyof T]: NormalizeValue<T[K]>;
} & {
[K in keyof T as undefined extends T[K] ? never : NonNullable<T[K]> extends Array<unknown> ? T[K] extends null ? never : `${Extract<K, string>}Indices` : never]: Record<string, string>;
} & {
[K in keyof T as undefined extends T[K] ? NonNullable<T[K]> extends Array<unknown> ? T[K] extends null | undefined ? never : `${Extract<K, string>}Indices` : never : never]?: Record<string, string>;
}>;
NormalizeValue
export type NormalizeValue<T> = T extends null | undefined ? T : NonNullable<T> extends unknown[] | readonly unknown[] ? undefined extends T ? NormalizeArray<NonNullable<T>> | undefined : NormalizeArray<T> : T extends Builtin ? T : NonNullable<T> extends object ? Normalized<T> : T;
Normalized
export type Normalized<T> = T extends null | undefined ? T : T extends Builtin ? T : T extends unknown[] | readonly unknown[] ? NormalizeArray<T> : T extends object ? NormalizeObject<T> : T;
NormalizedBasicShapeObject
export type NormalizedBasicShapeObject = Normalized<BasicShapeSerializedObject>;
NormalizedBoard
export type NormalizedBoard = NormalizedStandardBoard | NormalizedFloatingBoard;
NormalizedCombinedShapeObject
export type NormalizedCombinedShapeObject = Normalized<CombinedShapeSerializedObject>;
NormalizedDesignState
export type NormalizedDesignState = {
boards: Record<ID, NormalizedBoard>;
boardsIndices: Record<ID, string>;
objects: Record<ID, NormalizedObject>;
groupStructures: Record<ID, DesignStructureObject>;
groupStructuresIndices: Record<ID, string>;
config: DesignConfig;
};
NormalizedFloatingBoard
export type NormalizedFloatingBoard = Normalized<BaseFloatingBoard>;
NormalizedGuideObject
export type NormalizedGuideObject = Normalized<GuideSerializedObject>;
NormalizedIllustrationImageObject
export type NormalizedIllustrationImageObject = Normalized<IllustrationImageSerializedObject>;
NormalizedIllustrationObject
export type NormalizedIllustrationObject = Normalized<IllustrationSerializedObject>;
NormalizedLoadingCardObject
export type NormalizedLoadingCardObject = Normalized<LoadingCardSerializedObject>;
NormalizedMaskObject
export type NormalizedMaskObject = Normalized<MaskSerializedObject>;
NormalizedMockupDesignObject
export type NormalizedMockupDesignObject = Normalized<MockupDesignSerializedObject>;
NormalizedObject
export type NormalizedObject = NormalizedStandardObject | NormalizedGuideObject;
NormalizedPathTextObject
export type NormalizedPathTextObject = Normalized<PathTextSerializedObject>;
NormalizedRichTextObject
export type NormalizedRichTextObject = Normalized<RichTextSerializedObject>;
NormalizedStandardBoard
export type NormalizedStandardBoard<T extends ArtboardOptions = ArtboardOptions> = Normalized<BaseStandardBoard<T>>;
NormalizedStandardObject
export type NormalizedStandardObject = NormalizedBasicShapeObject | NormalizedCombinedShapeObject | NormalizedIllustrationImageObject | NormalizedIllustrationObject | NormalizedLoadingCardObject | NormalizedMaskObject | NormalizedMockupDesignObject | NormalizedPathTextObject | NormalizedRichTextObject | NormalizedVideoObject;
NormalizedVideoObject
export type NormalizedVideoObject = Normalized<VideoSerializedObject>;
NullablePathTextShadowOptions
export type NullablePathTextShadowOptions = PathTextShadowOptions | {
type: null;
};
OnGenerationStatusUpdate
export type OnGenerationStatusUpdate = (update: GenerationStatusUpdate) => void | Promise<void>;
OrientationConditional
export type OrientationConditional = {
orientation: Orientation.HORIZONTAL;
top: number;
} | {
orientation: Orientation.VERTICAL;
left: number;
};
OrientationDir
export type OrientationDir = {
orientation: Orientation.HORIZONTAL;
top: number;
} | {
orientation: Orientation.VERTICAL;
left: number;
};
OriginX
export type OriginX = "left" | "center" | "right";
OriginY
export type OriginY = "top" | "center" | "bottom";
PatchAction
export type PatchAction<T> = {
action: Action.MERGE;
value: DeepPartial<T>;
} | {
action: Action.SET;
value: T;
} | {
action: Action.DELETE;
};
PatchTree
export type PatchTree<S> = {
[K in keyof S]?: NonNullable<S[K]> extends object ? PatchAction<DeepPartial<S[K]>> | PatchTree<NonNullable<DeepPartial<S[K]>>> : PatchAction<DeepPartial<S[K]>>;
};
PathTextSerializedObject
export type PathTextSerializedObject = typeof PATH_TEXT_DEFAULT_VALUES & {
relativeSize?: number | undefined;
overrideText?: string | undefined;
transformOptions: PathTextTransformOptions;
fontFamily?: string | undefined;
fontWeight?: string | undefined;
text: string;
shadowOptions: NullablePathTextShadowOptions;
adjustableWidth?: number | undefined;
uppercase?: boolean | undefined;
underline?: boolean | undefined;
variation?: Record<string, number> | undefined;
variationAxes?: Record<string, FontVariation> | undefined;
decorationOptions?: DecorationOptions | undefined;
isUserFont?: boolean | undefined;
};
PathTextShadowOptions
export type PathTextShadowOptions = ShadingOptions & ShadowOptions & {
color: string;
};
PathTextTransformOptions
export type PathTextTransformOptions = TransformOptions & {
points: {
x: number;
y: number;
}[];
};
PrintMargins
export type PrintMargins = {
enabled: boolean;
top: number;
right: number;
bottom: number;
left: number;
};
RelativePosition
export type RelativePosition = {
relative: RelativeToObject | RelativeToViewport | RelativeToScreen;
};
RelativeToObject
export type RelativeToObject = {
to: Exclude<string, "viewport">;
location: ElementLocation;
offset?: LeftTopPosition;
};
RelativeToScreen
export type RelativeToScreen = {
to: "screen";
coordinates: ScreenCoordinates;
offset?: LeftTopPosition;
};
RelativeToViewport
export type RelativeToViewport = {
to: "viewport";
location: ElementLocation;
offset?: LeftTopPosition;
};
ReleaseTextureParams
export type ReleaseTextureParams = {
boardId: string;
};
RemoveFromGroupParams
export type RemoveFromGroupParams = {
objectIds: string[];
};
RemoveGroupParams
export type RemoveGroupParams = {
groupId: string;
};
RemovePlaylistItemParams
export type RemovePlaylistItemParams = {
videoBoardId: string;
playlistItemId: string;
};
RemoveTextureParams
export type RemoveTextureParams = {
boardId: string;
};
RemoveVideoPlaylistItemParams
export type RemoveVideoPlaylistItemParams = {
videoId: string;
playlistItemId: string;
};
RenameParams
export type RenameParams = {
objectId: string;
newName: string;
};
ResultType
export type ResultType = (typeof ResultType)[keyof typeof ResultType];
RichTextBasePluginSerializedObject
export type RichTextBasePluginSerializedObject = {
id: string;
name: string;
version: string;
};
RichTextDecorationPluginSerializedObject
export type RichTextDecorationPluginSerializedObject = RichTextBasePluginSerializedObject & {
fillStyle: string;
[key: string]: string | number;
};
RichTextRenderPluginSerializedObject
export type RichTextRenderPluginSerializedObject = RichTextBasePluginSerializedObject & {
color: string;
angle: number;
offset: number;
[key: string]: string | number;
};
RichTextSerializedObject
export type RichTextSerializedObject = typeof RICH_TEXT_DEFAULT_VALUES & {
text: string;
activeRenderPlugins?: RichTextRenderPluginSerializedObject[];
activeDecorationPlugins?: RichTextDecorationPluginSerializedObject[];
[key: string]: unknown;
};
ScreenCoordinates
export type ScreenCoordinates = {
x: number;
y: number;
};
SdkError
export type SdkError = SdkBadInputError | SdkInternalError;
SdkResult
export type SdkResult<T, E = SdkError> = {
isOk: true;
result: T;
error?: never;
} | {
isOk: false;
result?: never;
error: E;
};
SdkResultAsync
export type SdkResultAsync<T, E = SdkError> = Promise<{
isOk: true;
result: T;
error?: never;
} | {
isOk: false;
result?: never;
error: E;
}>;
Selector
export type Selector<T, U = unknown> = (state: T) => U;
SendToParams
export type SendToParams = {
boardOrObjectIds: string[];
};
SerialisedPhotoFilter
export type SerialisedPhotoFilter = ({
type: ImageFilterType;
} & PhotoFilterOptions[ImageFilterType]) | {
type: ImageFilterType;
};
SerializableCornerRadii
export type SerializableCornerRadii = Record<string, Record<string, number>>;
SerializableObjectType
export type SerializableObjectType = ObjectType.IllustrationImage | ObjectType.Illustration | ObjectType.Artboard | ObjectType.Smartboard | ObjectType.Videoboard | ObjectType.MockupBoard | ObjectType.PathText | ObjectType.RichText | ObjectType.MockupDesign | ObjectType.OverlayTexture | ObjectType.Mask | ObjectType.BasicShape | ObjectType.VectorPath | ObjectType.Guide | ObjectType.CombinedShape | ObjectType.LoadingCard | ObjectType.Video;
SerializedObject
export type SerializedObject = StandardSerializedObject | GuideSerializedObject;
SetTextureParams
export type SetTextureParams = {
boardId: string;
texture: string;
options?: Partial<TextureOptions>;
};
SetVideoOnVideoboardParams
export type SetVideoOnVideoboardParams = {
videoBoardId: string;
video: {
width?: number;
height?: number;
playlist: Omit<VideoPlaylistItem, "id">[];
};
} & Pick<VideoboardOptions, "generationSettings">;
ShadingOptions
export type ShadingOptions = AvailableShadowOptions & {
type: "drop" | "line" | "block" | "detail";
outlineWidth?: number;
borderColor?: string | null;
};
Shape
export type Shape = {
groupId?: string;
} & (BasicShapeSerializedObject | CombinedShapeSerializedObject | IllustrationSerializedObject | PathTextSerializedObject | RichTextSerializedObject);
ShapeBooleanOperation
export type ShapeBooleanOperation = "unite" | "subtract" | "intersect" | "exclude" | "divide";
ShapeProperties
export type ShapeProperties = {
angle?: BasicShapeSerializedObject["angle"];
flipX?: BasicShapeSerializedObject["flipX"];
flipY?: BasicShapeSerializedObject["flipY"];
hidden?: BasicShapeSerializedObject["hidden"];
opacity?: BasicShapeSerializedObject["opacity"];
skewX?: BasicShapeSerializedObject["skewX"];
skewY?: BasicShapeSerializedObject["skewY"];
cornerRadii?: BasicShapeSerializedObject["cornerRadii"];
name?: BasicShapeSerializedObject["name"];
shadowOptions?: BasicShapeSerializedObject["shadowOptions"];
fill?: NonNullable<BasicShapeSerializedObject["fill"]>;
fillColor?: NonNullable<BasicShapeSerializedObject["fill"]>[number]["value"];
stroke?: NonNullable<BasicShapeSerializedObject["stroke"]>;
strokeWidth?: NonNullable<BasicShapeSerializedObject["strokeWidth"]>;
};
SmartboardAction
export type SmartboardAction = SmartboardActionWithAiPrompt | SmartboardActionInitial;
SmartboardActionInitial
export type SmartboardActionInitial = {
type: "noAction";
aspectRatio?: SmartboardAspectRatio;
modelId?: string;
};
SmartboardActionWithAiPrompt
export type SmartboardActionWithAiPrompt = {
type: "aiPrompt";
prompt: string;
quality?: SmartboardQuality;
aspectRatio?: SmartboardAspectRatio;
transparentBackground?: boolean;
background?: SmartboardBackground;
modelId?: string;
averageSpeed?: number;
generatedContent?: SmartboardGeneratedContent;
};
SmartboardAspectRatio
export type SmartboardAspectRatio = string;
SmartboardBackground
export type SmartboardBackground = "transparent" | "opaque";
SmartboardGeneratedContent
export type SmartboardGeneratedContent = {
id: string;
status: "STARTED" | "COMPLETE" | "FAILED";
objectName?: string;
startedAt?: number;
};
SmartboardGenerationSettings
export type SmartboardGenerationSettings = Record<string, unknown>;
SmartboardOptions
export type SmartboardOptions = ConnectedArtboardOptions<ObjectType.Smartboard> & {
action?: SmartboardAction;
} & GeneratableBoard<SmartboardGenerationSettings>;
SmartboardQuality
export type SmartboardQuality = "auto" | "high" | "medium" | "low";
StandardSerializedObject
export type StandardSerializedObject = BasicShapeSerializedObject | CombinedShapeSerializedObject | IllustrationImageSerializedObject | IllustrationSerializedObject | LoadingCardSerializedObject | MaskSerializedObject | MockupDesignSerializedObject | PathTextSerializedObject | RichTextSerializedObject | VideoSerializedObject;
StartedGenerationResult
export type StartedGenerationResult = VideoGenerationStartedResult | ImageGenerationStartedResult;
StateGradientInfo
export type StateGradientInfo = {
[key: string]: GradientInfo;
};
StringColor
export type StringColor = {
key: StringColorKeysType;
value: string | null | undefined;
visible: boolean;
};
StringColorKeysType
export type StringColorKeysType = (typeof stringColorKeys)[number];
StructureObjectId
export type StructureObjectId = string;
SuccessGenerationResult
export type SuccessGenerationResult = VideoGenerationResult | ImageGenerationResult;
TempUserImageUpload
export type TempUserImageUpload = {
objectId: string;
mimeType: string;
};
TextProperties
export type TextProperties = {
fontFamily?: string;
fontSize?: number;
fontWeight?: string | number;
fill?: Color;
textAlign?: "left" | "center" | "right" | "justify";
lineHeight?: number;
resizeBehavior?: "none" | "hug" | "hug-height";
charSpacing?: number;
underline?: boolean;
overline?: boolean;
linethrough?: boolean;
angle?: number;
scaleX?: number;
scaleY?: number;
stroke?: string;
strokeWidth?: number;
};
UpdateArtboardBackgroundParams
export type UpdateArtboardBackgroundParams = {
id: string;
objectName: string;
};
UpdateArtboardParams
export type UpdateArtboardParams = {
id: string;
artboard?: Partial<ArtboardOptions>;
title?: string;
texture?: TextureOptions;
backgroundImage?: BackgroundImageOptions;
};
UpdateDecorationPluginParams
export type UpdateDecorationPluginParams = {
textId: string;
decorationPluginId: string;
decorationPlugin: Partial<Omit<RichTextDecorationPluginSerializedObject, "id">>;
};
UpdateIllustrationParams
export type UpdateIllustrationParams = {
id: string;
left?: number;
top?: number;
width?: number;
height?: number;
objectName?: string;
shadowOptions?: IllustrationSerializedObject["shadowOptions"];
shadowColor?: NonNullable<IllustrationSerializedObject["shadowOptions"]>["color"];
stroke?: IllustrationSerializedObject["stroke"];
strokeWidth?: IllustrationSerializedObject["strokeWidth"];
fill?: IllustrationSerializedObject["fill"];
};
UpdateImageParams
export type UpdateImageParams = {
id: IllustrationImageSerializedObject["id"];
left?: IllustrationImageSerializedObject["left"];
top?: IllustrationImageSerializedObject["top"];
width?: IllustrationImageSerializedObject["width"];
height?: IllustrationImageSerializedObject["height"];
objectName?: IllustrationImageSerializedObject["objectName"];
shadowOptions?: IllustrationImageSerializedObject["shadowOptions"];
shadowColor?: NonNullable<IllustrationImageSerializedObject["shadowOptions"]>["color"];
stroke?: IllustrationImageSerializedObject["stroke"];
strokeWidth?: IllustrationImageSerializedObject["strokeWidth"];
} & GeneratableObject;
UpdateMockupBoardParams
export type UpdateMockupBoardParams = {
mockupBoardId: string;
size?: Dimensions;
mockupTemplateId?: number;
shouldMockupColorMatchArtboard?: boolean;
};
UpdatePlaylistItemParams
export type UpdatePlaylistItemParams = {
videoBoardId: string;
playlistItemId: string;
playlistItem: Omit<VideoPlaylistItem, "id">;
};
UpdateRenderPluginParams
export type UpdateRenderPluginParams = {
textId: string;
renderPluginId: string;
renderPlugin: Partial<Omit<RichTextRenderPluginSerializedObject, "id">>;
};
UpdateShapeInput
export type UpdateShapeInput = Partial<CreateElementWithPositionAndSize> & BasicShapeConfigurableFields & {
id: NormalizedBasicShapeObject["id"];
};
UpdateSmartboardParams
export type UpdateSmartboardParams = {
smartboardId: string;
size?: Dimensions;
backgroundImage?: Partial<BackgroundImageOptions>;
} & Pick<SmartboardOptions, "generationSettings">;
UpdateTextParams
export type UpdateTextParams = {
textId: string;
text?: string;
left?: number;
top?: number;
angle?: number;
} & Partial<TextProperties>;
UpdateTextureParams
export type UpdateTextureParams = {
boardId: string;
options: Partial<TextureOptions>;
};
UpdateVideoParams
export type UpdateVideoParams = {
videoId: string;
position?: AbsolutePosition | RelativePosition;
size?: Dimensions;
shadowOptions?: VideoSerializedObject["shadowOptions"];
shadowColor?: NonNullable<VideoSerializedObject["shadowOptions"]>["color"];
stroke?: VideoSerializedObject["stroke"];
strokeWidth?: VideoSerializedObject["strokeWidth"];
};
UpdateVideoPlaylistItemParams
export type UpdateVideoPlaylistItemParams = {
videoId: string;
playlistItemId: string;
playlistItem: Omit<VideoPlaylistItem, "id">;
};
UpdateVideoboardParams
export type UpdateVideoboardParams = {
videoBoardId: string;
size?: Dimensions;
} & Pick<VideoboardOptions, "generationSettings">;
UploadedFontFamily
export type UploadedFontFamily = {
id: string;
name: string;
fonts: UploadedFontStyle[];
workspaceId?: string;
preview?: string;
extension?: {
id: string;
name?: string;
};
};
UploadedFontStyle
export type UploadedFontStyle = {
name: string;
id: string;
style: string | null;
objectName: string;
};
UserImageUpload
export type UserImageUpload = {
id: string;
objectName: string;
mimeType: string;
};
VideoBoardGenerationSettings
export type VideoBoardGenerationSettings = Record<string, unknown>;
VideoPlaylistItem
export type VideoPlaylistItem = {
id: string;
objectName?: string;
meta?: GeneratableObject & {
generation?: {
isGenerating?: boolean;
};
};
};
VideoSerializedObject
export type VideoSerializedObject = typeof DEFAULT_VALUES$2 & {
playlist: VideoPlaylistItem[];
realWidth?: number;
realHeight?: number;
};
VideoboardOptions
export type VideoboardOptions = ConnectedArtboardOptions<ObjectType.Videoboard> & {
video?: {
width: number;
height: number;
playlist: VideoPlaylistItem[];
};
} & GeneratableBoard<VideoBoardGenerationSettings>;
Viewport
export type Viewport = {
coords: {
tl: {
x: number;
y: number;
};
tr: {
x: number;
y: number;
};
bl: {
x: number;
y: number;
};
br: {
x: number;
y: number;
};
};
transform: [
number,
number,
number,
number,
number,
number
];
};
ViewportAPI
export type ViewportAPI = {
get(): Viewport;
set(patch: ViewportPatch, origin?: Origin): void;
getTransform(): Viewport["transform"];
setTransform(transform: Viewport["transform"], origin?: Origin): void;
getZoom(): number;
setZoom(zoom: number, origin?: Origin): void;
getCoords(): Viewport["coords"];
setCoords(coords: Viewport["coords"], origin?: Origin): void;
getPosition(): {
x: number;
y: number;
};
setPosition(position: {
x: number;
y: number;
}, origin?: Origin): void;
};
ViewportPatch
export type ViewportPatch = {
transform: Viewport["transform"];
zoom?: never;
position?: never;
} | {
zoom: number;
position?: {
x: number;
y: number;
};
transform?: never;
} | {
position: {
x: number;
y: number;
};
zoom?: never;
transform?: never;
};
WithAsync
export type WithAsync<T> = {
[K in keyof T]: T[K] extends (...args: infer Args) => infer Return ? Return extends Promise<infer U> ? (...args: Args) => Promise<BridgedSdkResult<U>> : (...args: Args) => Promise<BridgedSdkResult<Return>> : T[K] extends object ? T[K] extends FunctionType | Array<unknown> ? T[K] : WithAsync<T[K]> : T[K];
};
WithOptsRemoved
export type WithOptsRemoved<T> = {
[K in keyof T]: T[K] extends (...args: infer Args) => infer Return ? Args extends [
infer First,
...unknown[]
] ? (arg: First) => Return : T[K] : T[K] extends object ? WithOptsRemoved<T[K]> : T[K];
};