From 2b76ff63f11ffdc5ed37b91f4ffaf29b0f7dc4d9 Mon Sep 17 00:00:00 2001 From: Alex Jerabek <38896772+AlexJerabek@users.noreply.github.com> Date: Thu, 18 Apr 2019 15:54:46 -0700 Subject: [PATCH] [office-js, office-js-preview] Update from the CDN (#34815) * Preview Excel API Update * Preview OneNote Updates * Preview Visio Updates * Release Word Updates * Preview Word Updates * Release Visio Updates --- types/office-js-preview/index.d.ts | 1152 +++++++++++++++++++++++++++- types/office-js/index.d.ts | 642 +++++++--------- 2 files changed, 1393 insertions(+), 401 deletions(-) diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index 4a4b42ad38..e8aeaeaca8 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -17356,101 +17356,492 @@ declare namespace OfficeCore { //////////////////////////////////////////////////////////////// declare namespace Excel { - /** Represents which cell properties to load, when used as part of a "range.getCellProperties" method. */ + /** + * + * Represents which cell properties to load, when used as part of a "range.getCellProperties" method. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ interface CellPropertiesLoadOptions { + /** + * + * Specifies whether to load on the `address` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ address?: boolean; + /** + * + * Specifies whether to load on the `addressLocal` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ addressLocal?: boolean; + /** + * + * Specifies whether to load on the `format` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ format?: Excel.CellPropertiesFormatLoadOptions; + /** + * + * Specifies whether to load on the `hidden` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ hidden?: boolean; + /** + * + * Specifies whether to load on the `hyperlink` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ hyperlink?: boolean; + /** + * + * Specifies whether to load on the `style` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ style?: boolean; } - /** Represents which row properties to load, when used as part of a "range.getRowProperties" method. */ + /** + * + * Represents which row properties to load, when used as part of a "range.getRowProperties" method. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ interface RowPropertiesLoadOptions extends CellPropertiesLoadOptions { + /** + * + * Specifies whether to load on the `rowHidden` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ rowHidden?: boolean; + /** + * + * Specifies whether to load on the `rowIndex` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ rowIndex?: boolean; + /** + * + * Specifies whether to load on the `format` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ format?: Excel.CellPropertiesFormatLoadOptions & { rowHeight?: boolean; }; } - /** Represents which column properties to load, when used as part of a "range.getColumnProperties" method. */ + /** + * + * Represents which column properties to load, when used as part of a "range.getColumnProperties" method. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ interface ColumnPropertiesLoadOptions extends CellPropertiesLoadOptions { + /** + * + * Specifies whether to load on the `columnIndex` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ columnIndex?: boolean; + /** + * + * Specifies whether to load on the `columnHidden` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ columnHidden?: boolean; + /** + * + * Specifies whether to load on the `format` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ format?: Excel.CellPropertiesFormatLoadOptions & { columnWidth?: boolean; }; } - /** Represents which properties to load on the format object. */ + /** + * + * Represents which properties to load on the format object. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ interface CellPropertiesFormatLoadOptions { + /** + * + * Specifies whether to load on the `autoIndent` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ autoIndent?: boolean; + /** + * + * Specifies whether to load on the `borders` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ borders?: Excel.CellPropertiesBorderLoadOptions; + /** + * + * Specifies whether to load on the `fill` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ fill?: Excel.CellPropertiesFillLoadOptions; + /** + * + * Specifies whether to load on the `font` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ font?: Excel.CellPropertiesFontLoadOptions; + /** + * + * Specifies whether to load on the `horizontalAlignment` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ horizontalAlignment?: boolean; + /** + * + * Specifies whether to load on the `indentLevel` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ indentLevel?: boolean; + /** + * + * Specifies whether to load on the `protection` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ protection?: boolean; + /** + * + * Specifies whether to load on the `readingOrder` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ readingOrder?: boolean; + /** + * + * Specifies whether to load on the `shrinkToFit` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ shrinkToFit?: boolean; + /** + * + * Specifies whether to load on the `textOrientation` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ textOrientation?: boolean; + /** + * + * Specifies whether to load on the `useStandardHeight` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ useStandardHeight?: boolean; + /** + * + * Specifies whether to load on the `useStandardWidth` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ useStandardWidth?: boolean; + /** + * + * Specifies whether to load on the `verticalAlignment` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ verticalAlignment?: boolean; + /** + * + * Specifies whether to load on the `wrapText` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ wrapText?: boolean; } - /** Represents the input parameter of setCellProperties. */ + /** + * + * Represents the input parameter of setCellProperties. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ interface SettableCellProperties { + /** + * + * Represents the `format` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ format?: Excel.CellPropertiesFormat; + /** + * + * Represents the `hyperlink` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ hyperlink?: Excel.RangeHyperlink; + /** + * + * Represents the `style` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ style?: string; } - /** Represents the returned properties of getCellProperties. */ + /** + * + * Represents the returned properties of getCellProperties. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ interface CellProperties extends SettableCellProperties { + /** + * + * Represents the `address` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ address?: string; + /** + * + * Represents the `addressLocal` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ addressLocal?: string; + /** + * + * Represents the `hidden` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ hidden?: boolean; } - /** Represents the input parameter of setRowProperties. */ + /** + * + * Represents the input parameter of setRowProperties. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ interface SettableRowProperties extends SettableCellProperties { + /** + * + * Represents the `rowHidden` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ rowHidden?: boolean; + /** + * + * Represents the `format` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ format?: Excel.CellPropertiesFormat & { rowHeight?: number; }; } - /** Represents the returned properties of getRowProperties. */ + /** + * + * Represents the returned properties of getRowProperties. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ interface RowProperties extends SettableRowProperties { + /** + * + * Represents the `rowIndex` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ rowIndex?: number; + /** + * + * Represents the `address` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ address?: string; + /** + * + * Represents the `addressLocal` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ addressLocal?: string; } - /** Represents the input parameter of setColumnProperties. */ + /** + * + * Represents the input parameter of setColumnProperties. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ interface SettableColumnProperties extends SettableCellProperties { + /** + * + * Represents the `columnHidden` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ columnHidden?: boolean; + /** + * + * Represents the `format` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ format?: Excel.CellPropertiesFormat & { columnWidth?: number; }; } - /** Represents the returned properties of getColumnProperties. */ + /** + * + * Represents the returned properties of getColumnProperties. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ interface ColumnProperties extends SettableColumnProperties { + /** + * + * Represents the `columnIndex` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ columnIndex?: number; + /** + * + * Represents the `address` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ address?: string; + /** + * + * Represents the `addressLocal` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ addressLocal?: string; } - /** Represents the returned format properties of getCellProperties or format input parameter of setCellProperties. */ + /** + * + * Represents the returned format properties of getCellProperties or format input parameter of setCellProperties. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ interface CellPropertiesFormat { + /** + * + * Represents the `autoIndent` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ autoIndent?: boolean; + /** + * + * Represents the `borders` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ borders?: Excel.CellBorderCollection; + /** + * + * Represents the `fill` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ fill?: Excel.CellPropertiesFill; + /** + * + * Represents the `font` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ font?: Excel.CellPropertiesFont; + /** + * + * Represents the `horizontalAlignment` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ horizontalAlignment?: Excel.HorizontalAlignment | "General" | "Left" | "Center" | "Right" | "Fill" | "Justify" | "CenterAcrossSelection" | "Distributed"; + /** + * + * Represents the `indentLevel` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ indentLevel?: number; + /** + * + * Represents the `protection` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ protection?: Excel.CellPropertiesProtection; + /** + * + * Represents the `readingOrder` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ readingOrder?: Excel.ReadingOrder | "Context" | "LeftToRight" | "RightToLeft"; + /** + * + * Represents the `shrinkToFit` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ shrinkToFit?: boolean; + /** + * + * Represents the `textOrientation` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ textOrientation?: number; + /** + * + * Represents the `useStandardHeight` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ useStandardHeight?: boolean; + /** + * + * Represents the `useStandardWidth` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ useStandardWidth?: boolean; + /** + * + * Represents the `verticalAlignment` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ verticalAlignment?: Excel.VerticalAlignment | "Top" | "Center" | "Bottom" | "Justify" | "Distributed"; + /** + * + * Represents the `wrapText` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ wrapText?: boolean; } /** @@ -18134,6 +18525,88 @@ declare namespace Excel { */ worksheetId: string; } + /** + * + * Provides information about the worksheet that raised the RowSorted event. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface WorksheetRowSortedEventArgs { + /** + * + * Gets the range address that represents the sorted areas of a specific worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + address: string; + /** + * + * Gets the source of the event. See Excel.EventSource for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: "WorksheetRowSorted"; + /** + * + * Gets the id of the worksheet in which the sorting happened. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + worksheetId: string; + } + /** + * + * Provides information about the worksheet that raised the ColumnSorted event. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface WorksheetColumnSortedEventArgs { + /** + * + * Gets the range address that represents the sorted areas of a specific worksheet. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + address: string; + /** + * + * Gets the source of the event. See Excel.EventSource for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + source: Excel.EventSource | "Local" | "Remote"; + /** + * + * Gets the type of the event. See Excel.EventType for details. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + type: "WorksheetColumnSorted"; + /** + * + * Gets the id of the worksheet in which the sorting happened. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + worksheetId: string; + } /** * * Provides information about the worksheet that raised the SelectionChanged event. @@ -19728,6 +20201,16 @@ declare namespace Excel { * @eventproperty */ readonly onChanged: OfficeExtension.EventHandlers; + /** + * + * Occurs when sorting on columns. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onColumnSorted: OfficeExtension.EventHandlers; /** * * Occurs when the worksheet is deactivated. @@ -19757,6 +20240,16 @@ declare namespace Excel { * @beta */ readonly onFormatChanged: OfficeExtension.EventHandlers; + /** + * + * Occurs when sorting on rows. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onRowSorted: OfficeExtension.EventHandlers; /** * * Occurs when the selection changes on a specific worksheet. @@ -19926,6 +20419,16 @@ declare namespace Excel { * @beta */ readonly onChanged: OfficeExtension.EventHandlers; + /** + * + * Occurs when sorting on columns. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onColumnSorted: OfficeExtension.EventHandlers; /** * * Occurs when any worksheet in the workbook is deactivated. @@ -19964,6 +20467,16 @@ declare namespace Excel { * @beta */ readonly onFormatChanged: OfficeExtension.EventHandlers; + /** + * + * Occurs when sorting on rows. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * + * @eventproperty + * @beta + */ + readonly onRowSorted: OfficeExtension.EventHandlers; /** * * Occurs when the selection changes on any worksheet. @@ -20673,6 +21186,9 @@ declare namespace Excel { * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta + * + * @param cellPropertiesLoadOptions An object that represents which cell properties to load. + * @returns A 2D array where each item represents the requested properties of the corresponding cell. */ getCellProperties(cellPropertiesLoadOptions: CellPropertiesLoadOptions): OfficeExtension.ClientResult; /** @@ -20690,6 +21206,9 @@ declare namespace Excel { * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta + * + * @param columnPropertiesLoadOptions An object that represents which column properties to load. + * @returns An array where each item represents the requested properties of the corresponding column. */ getColumnProperties(columnPropertiesLoadOptions: ColumnPropertiesLoadOptions): OfficeExtension.ClientResult; /** @@ -20805,6 +21324,9 @@ declare namespace Excel { * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta + * + * @param rowPropertiesLoadOptions An object that represents which row properties to load. + * @returns An array where each item represents the requested properties of the corresponding row. */ getRowProperties(rowPropertiesLoadOptions: RowPropertiesLoadOptions): OfficeExtension.ClientResult; /** @@ -21012,6 +21534,8 @@ declare namespace Excel { * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta + * + * @param cellPropertiesData A 2D array that represents which properties to set in each cell. */ setCellProperties(cellPropertiesData: SettableCellProperties[][]): void; /** @@ -21020,6 +21544,8 @@ declare namespace Excel { * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta + * + * @param columnPropertiesData An array that represents which properties to set in each column. */ setColumnProperties(columnPropertiesData: SettableColumnProperties[]): void; /** @@ -21036,6 +21562,8 @@ declare namespace Excel { * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta + * + * @param rowPropertiesData An array that represents which properties to set in each row. */ setRowProperties(rowPropertiesData: SettableRowProperties[]): void; /** @@ -21586,122 +22114,458 @@ declare namespace Excel { } /** * - * Represents which properties to load on the format.fill object. + * Specifies which properties to load on the `format.fill` object. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta */ interface CellPropertiesFillLoadOptions { + /** + * + * Specifies whether to load on the `color` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ color?: boolean; + /** + * + * Specifies whether to load on the `pattern` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ pattern?: boolean; + /** + * + * Specifies whether to load on the `patternColor` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ patternColor?: boolean; + /** + * + * Specifies whether to load on the `patternTintAndShade` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ patternTintAndShade?: boolean; + /** + * + * Specifies whether to load on the `tintAndShade` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ tintAndShade?: boolean; } /** * - * Represents which properties to load on the format.font object. + * Specifies which properties to load on the `format.font` object. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta */ interface CellPropertiesFontLoadOptions { + /** + * + * Specifies whether to load on the `bold` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ bold?: boolean; + /** + * + * Specifies whether to load on the `color` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ color?: boolean; + /** + * + * Specifies whether to load on the `italic` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ italic?: boolean; + /** + * + * Specifies whether to load on the `name` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ name?: boolean; + /** + * + * Specifies whether to load on the `size` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ size?: boolean; + /** + * + * Specifies whether to load on the `strikethrough` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ strikethrough?: boolean; + /** + * + * Specifies whether to load on the `subscript` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ subscript?: boolean; + /** + * + * Specifies whether to load on the `superscript` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ superscript?: boolean; + /** + * + * Specifies whether to load on the `tintAndShade` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ tintAndShade?: boolean; + /** + * + * Specifies whether to load on the `underline` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ underline?: boolean; } /** * - * Represents which properties to load on the format.borders object. + * Specifies which properties to load on the `format.borders` object. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta */ interface CellPropertiesBorderLoadOptions { + /** + * + * Specifies whether to load on the `color` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ color?: boolean; + /** + * + * Specifies whether to load on the `style` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ style?: boolean; + /** + * + * Specifies whether to load on the `tintAndShade` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ tintAndShade?: boolean; + /** + * + * Specifies whether to load on the `weight` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ weight?: boolean; } /** * - * Represents the returned format.protection properties of getCell/Row/ColumnProperties or format.protection input parameter of setCell/Row/ColumnProperties. + * Represents the `format.protection` properties of `getCellProperties`, `getRowProperties`, and `getColumnProperties` or the `format.protection` input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta */ interface CellPropertiesProtection { + /** + * + * Represents the `format.protection.formulaHidden` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ formulaHidden?: boolean; + /** + * + * Represents the `format.protection.locked` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ locked?: boolean; } /** * - * Represents the returned format.fill properties of getCell/Row/ColumnProperties or format.fill input parameter of setCell/Row/ColumnProperties. + * Represents the `format.fill` properties of `getCellProperties`, `getRowProperties`, and `getColumnProperties` or the `format.fill` input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta */ interface CellPropertiesFill { + /** + * + * Represents the `format.fill.color` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ color?: string; + /** + * + * Represents the `format.fill.pattern` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ pattern?: Excel.FillPattern | "None" | "Solid" | "Gray50" | "Gray75" | "Gray25" | "Horizontal" | "Vertical" | "Down" | "Up" | "Checker" | "SemiGray75" | "LightHorizontal" | "LightVertical" | "LightDown" | "LightUp" | "Grid" | "CrissCross" | "Gray16" | "Gray8" | "LinearGradient" | "RectangularGradient"; + /** + * + * Represents the `format.fill.patternColor` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ patternColor?: string; + /** + * + * Represents the `format.fill.patternTintAndShade` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ patternTintAndShade?: number; + /** + * + * Represents the `format.fill.tintAndShade` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ tintAndShade?: number; } /** * - * Represents the returned format.font properties of getCell/Row/ColumnProperties or format.font input parameter of setCell/Row/ColumnProperties. + * Represents the `format.font` properties of `getCellProperties`, `getRowProperties`, and `getColumnProperties` or the `format.font` input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta */ interface CellPropertiesFont { + /** + * + * Represents the `format.font.bold` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ bold?: boolean; + /** + * + * Represents the `format.font.color` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ color?: string; + /** + * + * Represents the `format.font.italic` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ italic?: boolean; + /** + * + * Represents the `format.font.name` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ name?: string; + /** + * + * Represents the `format.font.size` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ size?: number; + /** + * + * Represents the `format.font.strikethrough` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ strikethrough?: boolean; + /** + * + * Represents the `format.font.subscript` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ subscript?: boolean; + /** + * + * Represents the `format.font.superscript` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ superscript?: boolean; + /** + * + * Represents the `format.font.tintAndShade` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ tintAndShade?: number; + /** + * + * Represents the `format.font.underline` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ underline?: Excel.RangeUnderlineStyle | "None" | "Single" | "Double" | "SingleAccountant" | "DoubleAccountant"; } /** * - * Represents the returned format.borders properties of getCell/Row/ColumnProperties or format.borders input parameter of setCell/Row/ColumnProperties. + * Represents the `format.borders` properties of `getCellProperties`, `getRowProperties`, and `getColumnProperties` or the `format.borders` input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta */ interface CellBorderCollection { + /** + * + * Represents the `format.borders.bottom` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ bottom?: Excel.CellBorder; + /** + * + * Represents the `format.borders.diagonalDown` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ diagonalDown?: Excel.CellBorder; + /** + * + * Represents the `format.borders.diagonalUp` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ diagonalUp?: Excel.CellBorder; + /** + * + * Represents the `format.borders.horizontal` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ horizontal?: Excel.CellBorder; + /** + * + * Represents the `format.borders.left` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ left?: Excel.CellBorder; + /** + * + * Represents the `format.borders.right` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ right?: Excel.CellBorder; + /** + * + * Represents the `format.borders.top` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ top?: Excel.CellBorder; + /** + * + * Represents the `format.borders.vertical` property. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ vertical?: Excel.CellBorder; } /** * - * Represents the returned single border properties of getCell/Row/ColumnProperties or border property input parameter of setCell/Row/ColumnProperties. + * Represents the properties of a single border returned by `getCellProperties`, `getRowProperties`, and `getColumnProperties` or the border property input parameter of `setCellProperties`, `setRowProperties`, and `setColumnProperties`. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta */ interface CellBorder { + /** + * + * Represents the `color` property of a single border. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ color?: string; + /** + * + * Represents the `style` property of a single border. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ style?: Excel.BorderLineStyle | "None" | "Continuous" | "Dash" | "DashDot" | "DashDotDot" | "Dot" | "Double" | "SlantDashDot"; + /** + * + * Represents the `tintAndShade` property of a single border. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ tintAndShade?: number; + /** + * + * Represents the `weight` property of a single border. + * + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ weight?: Excel.BorderWeight | "Hairline" | "Thin" | "Medium" | "Thick"; } /** @@ -29495,6 +30359,7 @@ declare namespace Excel { /** * * Represents the AutoFilter object. + AutoFilter turns the values in Excel column into specific filters based on the cell contents. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -29504,7 +30369,7 @@ declare namespace Excel { context: RequestContext; /** * - * Array that holds all filter criterias in an autofiltered range. Read-Only. + * An array that holds all the filter criteria in the autofiltered range. Read-Only. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -29528,19 +30393,19 @@ declare namespace Excel { readonly isDataFiltered: boolean; /** * - * Applies AutoFilter on a range and filters the column if column index and filter criteria are specified. + * Applies the AutoFilter to a range. This filters the column if column index and filter criteria are specified. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta * - * @param range The range where the AutoFilter will apply on. - * @param columnIndex The column index which the AutoFilter will apply on, start from 0. + * @param range The range over which the AutoFilter will apply on. + * @param columnIndex The zero-based column index to which the AutoFilter is applied. * @param criteria The filter criteria. */ apply(range: Range | string, columnIndex?: number, criteria?: Excel.FilterCriteria): void; /** * - * Clears the criteria if AutoFilter has filters + * Clears the filter criteria of the AutoFilter. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -29556,8 +30421,8 @@ declare namespace Excel { getRange(): Excel.Range; /** * - * If there is Range object associated with the AutoFilter, this method returns it. - Otherwise, this method returns a null object. + * Returns the Range object that represents the range to which the AutoFilter applies. + If there is no Range object associated with the AutoFilter, this method returns a null object. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -39587,7 +40452,19 @@ declare namespace Excel { * RibbonCommandExecuted represents the type of event registered on ribbon, and occurs when user click on ribbon * */ - ribbonCommandExecuted = "RibbonCommandExecuted" + ribbonCommandExecuted = "RibbonCommandExecuted", + /** + * + * WorksheetRowSorted represents the type of event registered on worksheet, and occurs when there is a sorting on rows happened. + * + */ + worksheetRowSorted = "WorksheetRowSorted", + /** + * + * WorksheetColumnSorted represents the type of event registered on worksheet, and occurs when there is a sorting on columns happened. + * + */ + worksheetColumnSorted = "WorksheetColumnSorted" } /** * [Api set: ExcelApi 1.7] @@ -52986,7 +53863,7 @@ declare namespace Excel { interface AutoFilterData { /** * - * Array that holds all filter criterias in an autofiltered range. Read-Only. + * An array that holds all the filter criteria in the autofiltered range. Read-Only. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -60891,6 +61768,7 @@ declare namespace Excel { /** * * Represents the AutoFilter object. + AutoFilter turns the values in Excel column into specific filters based on the cell contents. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -60899,7 +61777,7 @@ declare namespace Excel { $all?: boolean; /** * - * Array that holds all filter criterias in an autofiltered range. Read-Only. + * An array that holds all the filter criteria in the autofiltered range. Read-Only. * * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -68293,7 +69171,7 @@ declare namespace Word { * @param listNumbering Required. The ordinal format. * @param formatString Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a level of number type that is higher than or equal to this level. For example, an array of ["(", level - 1, ".", level, ")"] can define the format of "(2.c)", where 2 is the parent's item number and c is this level's item number. */ - setLevelNumbering(level: number, listNumbering: Word.ListNumbering, formatString?: any[]): void; + setLevelNumbering(level: number, listNumbering: Word.ListNumbering, formatString?: Array): void; /** * * Sets the numbering format at the specified level in the list. @@ -68304,7 +69182,7 @@ declare namespace Word { * @param listNumbering Required. The ordinal format. * @param formatString Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a level of number type that is higher than or equal to this level. For example, an array of ["(", level - 1, ".", level, ")"] can define the format of "(2.c)", where 2 is the parent's item number and c is this level's item number. */ - setLevelNumbering(level: number, listNumbering: "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter", formatString?: any[]): void; + setLevelNumbering(level: number, listNumbering: "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter", formatString?: Array): void; /** * * Sets the picture at the specified level in the list. @@ -71702,6 +72580,24 @@ declare namespace Word { * */ contentControlAdded = "ContentControlAdded", + /** + * + * AnnotationAdded represents the event an annotation has been added to the document. + * + */ + annotationAdded = "AnnotationAdded", + /** + * + * AnnotationAdded represents the event an annotation has been updated in the document. + * + */ + annotationChanged = "AnnotationChanged", + /** + * + * AnnotationAdded represents the event an annotation has been deleted from the document. + * + */ + annotationDeleted = "AnnotationDeleted", } /** * @@ -71726,7 +72622,7 @@ declare namespace Word { * [Api set: WordApi BETA (PREVIEW ONLY)] * @beta */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded"; + eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "AnnotationAdded" | "AnnotationChanged" | "AnnotationDeleted"; } /** * @@ -77403,6 +78299,87 @@ declare namespace Word { //////////////////////////////////////////////////////////////// declare namespace OneNote { + /** + * + * Provides information about the binding that raised the DataChanged event + * + * [Api set: OneNoteApi 1.1] + */ + interface NotebookChangedEventArgs { + /** + * + * Notebook id before change + * + * [Api set: OneNoteApi 1.3] + */ + oldId: string; + /** + * + * Gets the type of the event. See EventType for details. + * + * [Api set: OneNoteApi 1.3] + */ + type: "NotebookChanged"; + } + /** + * + * Provides information about the binding that raised the StickyNotesContextMenuExecuted event + * + * [Api set: OneNoteApi 1.5] + */ + interface StickyNotesContextMenuExecutedEventArgs { + /** + * + * Gets the type of the event. See EventType for details. + * + * [Api set: OneNoteApi 1.5] + */ + type: "StickyNotesContextMenuExecuted"; + } + /** + * + * Provides information about the binding that raised the section selection changed event + * + * [Api set: OneNoteApi 1.5] + */ + interface SectionSelectionChangedEventArgs { + /** + * + * Active Section id before change + * + * [Api set: OneNoteApi 1.5] + */ + oldId: string; + /** + * + * Gets the type of the event. See EventType for details. + * + * [Api set: OneNoteApi 1.5] + */ + type: "SectionSelectionChanged"; + } + /** + * + * Provides information about the binding that raised the Page selection changed event + * + * [Api set: OneNoteApi 1.1] + */ + interface PageSelectionChangedEventArgs { + /** + * + * Active Page id before change + * + * [Api set: OneNoteApi 1.3] + */ + oldId: string; + /** + * + * Gets the type of the event. See EventType for details. + * + * [Api set: OneNoteApi 1.3] + */ + type: "PageSelectionChanged"; + } /** * * Represents the top-level object that contains all globally addressable OneNote objects such as notebooks, the active notebook, and the active section. @@ -77531,6 +78508,42 @@ declare namespace OneNote { select?: string; expand?: string; }): OneNote.Application; + /** + * + * Occurs when the notebook is changed. + * + * [Api set: OneNoteApi 1.3] + * + * @eventproperty + */ + readonly onNotebookChanged: OfficeExtension.EventHandlers; + /** + * + * Occurs when the Page Selection change is made. + * + * [Api set: OneNoteApi 1.5] + * + * @eventproperty + */ + readonly onPageSelectionChanged: OfficeExtension.EventHandlers; + /** + * + * Occurs when the Section Selection change is made. + * + * [Api set: OneNoteApi 1.5] + * + * @eventproperty + */ + readonly onSectionSelectionChanged: OfficeExtension.EventHandlers; + /** + * + * Occurs when the host sends a command to the add-ins. + * + * [Api set: OneNoteApi 1.5] + * + * @eventproperty + */ + readonly onStickyNotesContextMenuExecutedEvent: OfficeExtension.EventHandlers; /** * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) * Whereas the original OneNote.Application object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `OneNote.Interfaces.ApplicationData`) that contains shallow copies of any loaded child properties from the original object. @@ -80986,6 +81999,15 @@ declare namespace OneNote { lim = "Lim", custom = "Custom", } + /** + * [Api set: OneNoteApi 1.3] + */ + enum EventType { + notebookChanged = "NotebookChanged", + stickyNotesContextMenuExecuted = "StickyNotesContextMenuExecuted", + sectionSelectionChanged = "SectionSelectionChanged", + pageSelectionChanged = "PageSelectionChanged", + } enum ErrorCodes { generalException = "GeneralException", operationAborted = "OperationAborted", @@ -83888,6 +84910,10 @@ declare namespace Visio { select?: string; expand?: string; }): Visio.Application; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Visio.Application object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ApplicationData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Visio.Interfaces.ApplicationData; } /** @@ -84032,6 +85058,10 @@ declare namespace Visio { * @eventproperty */ readonly onShapeMouseLeave: OfficeExtension.EventHandlers; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Visio.Document object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.DocumentData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Visio.Interfaces.DocumentData; } /** @@ -84113,6 +85143,10 @@ declare namespace Visio { select?: string; expand?: string; }): Visio.DocumentView; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Visio.DocumentView object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.DocumentViewData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Visio.Interfaces.DocumentViewData; } /** @@ -84229,6 +85263,10 @@ declare namespace Visio { select?: string; expand?: string; }): Visio.Page; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Visio.Page object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.PageData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Visio.Interfaces.PageData; } /** @@ -84330,6 +85368,10 @@ declare namespace Visio { select?: string; expand?: string; }): Visio.PageView; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Visio.PageView object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.PageViewData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Visio.Interfaces.PageViewData; } /** @@ -84377,6 +85419,10 @@ declare namespace Visio { load(option?: Visio.Interfaces.PageCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.PageCollection; load(option?: string | string[]): Visio.PageCollection; load(option?: OfficeExtension.LoadOption): Visio.PageCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Visio.PageCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.PageCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Visio.Interfaces.PageCollectionData; } /** @@ -84424,6 +85470,10 @@ declare namespace Visio { load(option?: Visio.Interfaces.ShapeCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.ShapeCollection; load(option?: string | string[]): Visio.ShapeCollection; load(option?: OfficeExtension.LoadOption): Visio.ShapeCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Visio.ShapeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Visio.Interfaces.ShapeCollectionData; } /** @@ -84540,6 +85590,10 @@ declare namespace Visio { select?: string; expand?: string; }): Visio.Shape; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Visio.Shape object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Visio.Interfaces.ShapeData; } /** @@ -84630,6 +85684,10 @@ declare namespace Visio { select?: string; expand?: string; }): Visio.ShapeView; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Visio.ShapeView object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeViewData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Visio.Interfaces.ShapeViewData; } /** @@ -84757,6 +85815,10 @@ declare namespace Visio { load(option?: Visio.Interfaces.ShapeDataItemCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.ShapeDataItemCollection; load(option?: string | string[]): Visio.ShapeDataItemCollection; load(option?: OfficeExtension.LoadOption): Visio.ShapeDataItemCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Visio.ShapeDataItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeDataItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Visio.Interfaces.ShapeDataItemCollectionData; } /** @@ -84817,6 +85879,10 @@ declare namespace Visio { select?: string; expand?: string; }): Visio.ShapeDataItem; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Visio.ShapeDataItem object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeDataItemData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Visio.Interfaces.ShapeDataItemData; } /** @@ -84864,6 +85930,10 @@ declare namespace Visio { load(option?: Visio.Interfaces.HyperlinkCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.HyperlinkCollection; load(option?: string | string[]): Visio.HyperlinkCollection; load(option?: OfficeExtension.LoadOption): Visio.HyperlinkCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Visio.HyperlinkCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.HyperlinkCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Visio.Interfaces.HyperlinkCollectionData; } /** @@ -84924,6 +85994,10 @@ declare namespace Visio { select?: string; expand?: string; }): Visio.Hyperlink; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Visio.Hyperlink object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.HyperlinkData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Visio.Interfaces.HyperlinkData; } /** @@ -84971,6 +86045,10 @@ declare namespace Visio { load(option?: Visio.Interfaces.CommentCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.CommentCollection; load(option?: string | string[]): Visio.CommentCollection; load(option?: OfficeExtension.LoadOption): Visio.CommentCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Visio.CommentCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.CommentCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Visio.Interfaces.CommentCollectionData; } /** @@ -85038,6 +86116,10 @@ declare namespace Visio { select?: string; expand?: string; }): Visio.Comment; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Visio.Comment object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.CommentData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Visio.Interfaces.CommentData; } /** @@ -85076,6 +86158,10 @@ declare namespace Visio { select?: string; expand?: string; }): Visio.Selection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Visio.Selection object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.SelectionData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Visio.Interfaces.SelectionData; } /** @@ -86240,7 +87326,7 @@ declare namespace Visio { /** * The RequestContext object facilitates requests to the Visio application. Since the Office add-in and the Visio application run in two different processes, the request context is required to get access to the Visio object model from the add-in. */ - class RequestContext extends OfficeExtension.ClientRequestContext { + class RequestContext extends OfficeCore.RequestContext { constructor(url?: string | OfficeExtension.EmbeddedSession); readonly document: Document; } diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 8dc272ba3d..29a9c46c88 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -48694,6 +48694,10 @@ declare namespace Word { * Create a new instance of Word.Application object */ static newObject(context: OfficeExtension.ClientRequestContext): Word.Application; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Word.Application object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ApplicationData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): { [key: string]: string; }; @@ -49108,6 +49112,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.Body; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Word.Body object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.BodyData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Word.Interfaces.BodyData; } /** @@ -49621,6 +49629,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.ContentControl; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Word.ContentControl object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Word.Interfaces.ContentControlData; } /** @@ -49728,6 +49740,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.ContentControlCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ContentControlCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Word.Interfaces.ContentControlCollectionData; } /** @@ -49810,6 +49826,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.CustomProperty; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Word.CustomProperty object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomPropertyData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Word.Interfaces.CustomPropertyData; } /** @@ -49891,6 +49911,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.CustomPropertyCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.CustomPropertyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomPropertyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Word.Interfaces.CustomPropertyCollectionData; } /** @@ -49994,6 +50018,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.Document; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Word.Document object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Word.Interfaces.DocumentData; } /** @@ -50097,6 +50125,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.DocumentCreated; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Word.DocumentCreated object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentCreatedData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Word.Interfaces.DocumentCreatedData; } /** @@ -50277,6 +50309,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.DocumentProperties; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Word.DocumentProperties object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentPropertiesData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Word.Interfaces.DocumentPropertiesData; } /** @@ -50412,6 +50448,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.Font; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Word.Font object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FontData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Word.Interfaces.FontData; } /** @@ -50768,6 +50808,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.InlinePicture; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Word.InlinePicture object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.InlinePictureData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Word.Interfaces.InlinePictureData; } /** @@ -50821,6 +50865,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.InlinePictureCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.InlinePictureCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.InlinePictureCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Word.Interfaces.InlinePictureCollectionData; } /** @@ -50963,7 +51011,7 @@ declare namespace Word { * @param listNumbering Required. The ordinal format. * @param formatString Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a level of number type that is higher than or equal to this level. For example, an array of ["(", level - 1, ".", level, ")"] can define the format of "(2.c)", where 2 is the parent's item number and c is this level's item number. */ - setLevelNumbering(level: number, listNumbering: Word.ListNumbering, formatString?: any[]): void; + setLevelNumbering(level: number, listNumbering: Word.ListNumbering, formatString?: Array): void; /** * * Sets the numbering format at the specified level in the list. @@ -50974,7 +51022,7 @@ declare namespace Word { * @param listNumbering Required. The ordinal format. * @param formatString Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a level of number type that is higher than or equal to this level. For example, an array of ["(", level - 1, ".", level, ")"] can define the format of "(2.c)", where 2 is the parent's item number and c is this level's item number. */ - setLevelNumbering(level: number, listNumbering: "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter", formatString?: any[]): void; + setLevelNumbering(level: number, listNumbering: "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter", formatString?: Array): void; /** * * Sets the starting number at the specified level in the list. Default value is 1. @@ -51014,6 +51062,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.List; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Word.List object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Word.Interfaces.ListData; } /** @@ -51094,6 +51146,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.ListCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ListCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Word.Interfaces.ListCollectionData; } /** @@ -51196,6 +51252,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.ListItem; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Word.ListItem object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListItemData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Word.Interfaces.ListItemData; } /** @@ -51786,6 +51846,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.Paragraph; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Word.Paragraph object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Word.Interfaces.ParagraphData; } /** @@ -51853,6 +51917,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.ParagraphCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.ParagraphCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Word.Interfaces.ParagraphCollectionData; } /** @@ -52380,6 +52448,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.Range; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Word.Range object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.RangeData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Word.Interfaces.RangeData; } /** @@ -52433,6 +52505,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.RangeCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.RangeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.RangeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Word.Interfaces.RangeCollectionData; } /** @@ -52533,6 +52609,10 @@ declare namespace Word { * Create a new instance of Word.SearchOptions object */ static newObject(context: OfficeExtension.ClientRequestContext): Word.SearchOptions; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Word.SearchOptions object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SearchOptionsData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Word.Interfaces.SearchOptionsData; } /** @@ -52644,6 +52724,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.Section; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Word.Section object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SectionData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Word.Interfaces.SectionData; } /** @@ -52697,6 +52781,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.SectionCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.SectionCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SectionCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Word.Interfaces.SectionCollectionData; } /** @@ -53255,6 +53343,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.Table; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Word.Table object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Word.Interfaces.TableData; } /** @@ -53308,6 +53400,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.TableCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.TableCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Word.Interfaces.TableCollectionData; } /** @@ -53581,6 +53677,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.TableRow; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Word.TableRow object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableRowData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Word.Interfaces.TableRowData; } /** @@ -53634,6 +53734,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.TableRowCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.TableRowCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableRowCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Word.Interfaces.TableRowCollectionData; } /** @@ -53893,6 +53997,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.TableCell; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Word.TableCell object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCellData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Word.Interfaces.TableCellData; } /** @@ -53946,6 +54054,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.TableCellCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Word.TableCellCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCellCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Word.Interfaces.TableCellCollectionData; } /** @@ -54021,6 +54133,10 @@ declare namespace Word { * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for context.trackedObjects.remove(thisObject). Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call "context.sync()" before the memory release takes effect. */ untrack(): Word.TableBorder; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Word.TableBorder object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableBorderData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Word.Interfaces.TableBorderData; } /** @@ -54054,6 +54170,24 @@ declare namespace Word { * */ contentControlAdded = "ContentControlAdded", + /** + * + * AnnotationAdded represents the event an annotation has been added to the document. + * + */ + annotationAdded = "AnnotationAdded", + /** + * + * AnnotationAdded represents the event an annotation has been updated in the document. + * + */ + annotationChanged = "AnnotationChanged", + /** + * + * AnnotationAdded represents the event an annotation has been deleted from the document. + * + */ + annotationDeleted = "AnnotationDeleted", } /** * @@ -55737,48 +55871,6 @@ declare namespace Word { paragraphs?: Word.Interfaces.ParagraphData[]; /** * - * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws if there isn't a parent body. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyData; - /** - * - * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Returns a null object if there isn't a parent body. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentBodyOrNullObject?: Word.Interfaces.BodyData; - /** - * - * Gets the content control that contains the body. Throws if there isn't a parent content control. Read-only. - * - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlData; - /** - * - * Gets the content control that contains the body. Returns a null object if there isn't a parent content control. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlData; - /** - * - * Gets the parent section of the body. Throws if there isn't a parent section. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentSection?: Word.Interfaces.SectionData; - /** - * - * Gets the parent section of the body. Returns a null object if there isn't a parent section. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentSectionOrNullObject?: Word.Interfaces.SectionData; - /** - * * Gets the collection of table objects in the body. Read-only. * * [Api set: WordApi 1.3] @@ -55852,55 +55944,6 @@ declare namespace Word { paragraphs?: Word.Interfaces.ParagraphData[]; /** * - * Gets the parent body of the content control. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyData; - /** - * - * Gets the content control that contains the content control. Throws if there isn't a parent content control. Read-only. - * - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlData; - /** - * - * Gets the content control that contains the content control. Returns a null object if there isn't a parent content control. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlData; - /** - * - * Gets the table that contains the content control. Throws if it is not contained in a table. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableData; - /** - * - * Gets the table cell that contains the content control. Throws if it is not contained in a table cell. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellData; - /** - * - * Gets the table cell that contains the content control. Returns a null object if it is not contained in a table cell. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellData; - /** - * - * Gets the table that contains the content control. Returns a null object if it is not contained in a table. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableData; - /** - * * Gets the collection of table objects in the content control. Read-only. * * [Api set: WordApi 1.3] @@ -56328,55 +56371,6 @@ declare namespace Word { } /** An interface describing the data returned by calling "inlinePicture.toJSON()". */ interface InlinePictureData { - /** - * - * Gets the parent paragraph that contains the inline image. Read-only. - * - * [Api set: WordApi 1.2] - */ - paragraph?: Word.Interfaces.ParagraphData; - /** - * - * Gets the content control that contains the inline image. Throws if there isn't a parent content control. Read-only. - * - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlData; - /** - * - * Gets the content control that contains the inline image. Returns a null object if there isn't a parent content control. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlData; - /** - * - * Gets the table that contains the inline image. Throws if it is not contained in a table. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableData; - /** - * - * Gets the table cell that contains the inline image. Throws if it is not contained in a table cell. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellData; - /** - * - * Gets the table cell that contains the inline image. Returns a null object if it is not contained in a table cell. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellData; - /** - * - * Gets the table that contains the inline image. Returns a null object if it is not contained in a table. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableData; /** * * Gets or sets a string that represents the alternative text associated with the inline image. @@ -56485,13 +56479,6 @@ declare namespace Word { } /** An interface describing the data returned by calling "paragraph.toJSON()". */ interface ParagraphData { - /** - * - * Gets the collection of content control objects in the paragraph. Read-only. - * - * [Api set: WordApi 1.1] - */ - contentControls?: Word.Interfaces.ContentControlData[]; /** * * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. Read-only. @@ -56508,13 +56495,6 @@ declare namespace Word { inlinePictures?: Word.Interfaces.InlinePictureData[]; /** * - * Gets the List to which this paragraph belongs. Throws if the paragraph is not in a list. Read-only. - * - * [Api set: WordApi 1.3] - */ - list?: Word.Interfaces.ListData; - /** - * * Gets the ListItem for the paragraph. Throws if the paragraph is not part of a list. Read-only. * * [Api set: WordApi 1.3] @@ -56527,62 +56507,6 @@ declare namespace Word { * [Api set: WordApi 1.3] */ listItemOrNullObject?: Word.Interfaces.ListItemData; - /** - * - * Gets the List to which this paragraph belongs. Returns a null object if the paragraph is not in a list. Read-only. - * - * [Api set: WordApi 1.3] - */ - listOrNullObject?: Word.Interfaces.ListData; - /** - * - * Gets the parent body of the paragraph. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyData; - /** - * - * Gets the content control that contains the paragraph. Throws if there isn't a parent content control. Read-only. - * - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlData; - /** - * - * Gets the content control that contains the paragraph. Returns a null object if there isn't a parent content control. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlData; - /** - * - * Gets the table that contains the paragraph. Throws if it is not contained in a table. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableData; - /** - * - * Gets the table cell that contains the paragraph. Throws if it is not contained in a table cell. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellData; - /** - * - * Gets the table cell that contains the paragraph. Returns a null object if it is not contained in a table cell. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellData; - /** - * - * Gets the table that contains the paragraph. Returns a null object if it is not contained in a table. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableData; /** * * Gets or sets the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. @@ -56702,13 +56626,6 @@ declare namespace Word { } /** An interface describing the data returned by calling "range.toJSON()". */ interface RangeData { - /** - * - * Gets the collection of content control objects in the range. Read-only. - * - * [Api set: WordApi 1.1] - */ - contentControls?: Word.Interfaces.ContentControlData[]; /** * * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. Read-only. @@ -56723,76 +56640,6 @@ declare namespace Word { * [Api set: WordApi 1.2] */ inlinePictures?: Word.Interfaces.InlinePictureData[]; - /** - * - * Gets the collection of list objects in the range. Read-only. - * - * [Api set: WordApi 1.3] - */ - lists?: Word.Interfaces.ListData[]; - /** - * - * Gets the collection of paragraph objects in the range. Read-only. - * - * [Api set: WordApi 1.1] - */ - paragraphs?: Word.Interfaces.ParagraphData[]; - /** - * - * Gets the parent body of the range. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyData; - /** - * - * Gets the content control that contains the range. Throws if there isn't a parent content control. Read-only. - * - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlData; - /** - * - * Gets the content control that contains the range. Returns a null object if there isn't a parent content control. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlData; - /** - * - * Gets the table that contains the range. Throws if it is not contained in a table. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableData; - /** - * - * Gets the table cell that contains the range. Throws if it is not contained in a table cell. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellData; - /** - * - * Gets the table cell that contains the range. Returns a null object if it is not contained in a table cell. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellData; - /** - * - * Gets the table that contains the range. Returns a null object if it is not contained in a table. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableData; - /** - * - * Gets the collection of table objects in the range. Read-only. - * - * [Api set: WordApi 1.3] - */ - tables?: Word.Interfaces.TableData[]; /** * * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. @@ -56910,55 +56757,6 @@ declare namespace Word { font?: Word.Interfaces.FontData; /** * - * Gets the parent body of the table. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyData; - /** - * - * Gets the content control that contains the table. Throws if there isn't a parent content control. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentContentControl?: Word.Interfaces.ContentControlData; - /** - * - * Gets the content control that contains the table. Returns a null object if there isn't a parent content control. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlData; - /** - * - * Gets the table that contains this table. Throws if it is not contained in a table. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableData; - /** - * - * Gets the table cell that contains this table. Throws if it is not contained in a table cell. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellData; - /** - * - * Gets the table cell that contains this table. Returns a null object if it is not contained in a table cell. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellData; - /** - * - * Gets the table that contains this table. Returns a null object if it is not contained in a table. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableData; - /** - * * Gets all of the table rows. Read-only. * * [Api set: WordApi 1.3] @@ -57111,13 +56909,6 @@ declare namespace Word { * [Api set: WordApi 1.3] */ font?: Word.Interfaces.FontData; - /** - * - * Gets parent table. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableData; /** * * Gets the number of cells in the row. Read-only. @@ -57188,20 +56979,6 @@ declare namespace Word { * [Api set: WordApi 1.3] */ body?: Word.Interfaces.BodyData; - /** - * - * Gets the parent row of the cell. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentRow?: Word.Interfaces.TableRowData; - /** - * - * Gets the parent table of the cell. Read-only. - * - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableData; /** * * Gets the index of the cell in its row. Read-only. @@ -66231,6 +66008,8 @@ declare namespace Visio { * [Api set: 1.1] */ class Application extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Show or hide the iFrame application borders. @@ -66300,6 +66079,10 @@ declare namespace Visio { select?: string; expand?: string; }): Visio.Application; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Visio.Application object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ApplicationData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Visio.Interfaces.ApplicationData; } /** @@ -66309,6 +66092,8 @@ declare namespace Visio { * [Api set: 1.1] */ class Document extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents a Visio application instance that contains this document. Read-only. @@ -66442,6 +66227,10 @@ declare namespace Visio { * @eventproperty */ readonly onShapeMouseLeave: OfficeExtension.EventHandlers; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Visio.Document object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.DocumentData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Visio.Interfaces.DocumentData; } /** @@ -66451,6 +66240,8 @@ declare namespace Visio { * [Api set: 1.1] */ class DocumentView extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Disable Hyperlinks. @@ -66465,6 +66256,13 @@ declare namespace Visio { * [Api set: 1.1] */ disablePan: boolean; + /** + * + * Disable PanZoomWindow. + * + * [Api set: 1.1] + */ + disablePanZoomWindow: boolean; /** * * Disable Zoom. @@ -66514,6 +66312,10 @@ declare namespace Visio { select?: string; expand?: string; }): Visio.DocumentView; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Visio.DocumentView object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.DocumentViewData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Visio.Interfaces.DocumentViewData; } /** @@ -66523,6 +66325,8 @@ declare namespace Visio { * [Api set: 1.1] */ class Page extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * All shapes in the Page, including subshapes. Read-only. @@ -66628,6 +66432,10 @@ declare namespace Visio { select?: string; expand?: string; }): Visio.Page; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Visio.Page object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.PageData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Visio.Interfaces.PageData; } /** @@ -66637,6 +66445,8 @@ declare namespace Visio { * [Api set: 1.1] */ class PageView extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Get and set Page's Zoom level. The value can be between 10 and 400 and denotes the percentage of zoom. @@ -66727,6 +66537,10 @@ declare namespace Visio { select?: string; expand?: string; }): Visio.PageView; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Visio.PageView object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.PageViewData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Visio.Interfaces.PageViewData; } /** @@ -66736,6 +66550,8 @@ declare namespace Visio { * [Api set: 1.1] */ class PageCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Visio.Page[]; /** @@ -66772,6 +66588,10 @@ declare namespace Visio { load(option?: Visio.Interfaces.PageCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.PageCollection; load(option?: string | string[]): Visio.PageCollection; load(option?: OfficeExtension.LoadOption): Visio.PageCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Visio.PageCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.PageCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Visio.Interfaces.PageCollectionData; } /** @@ -66781,6 +66601,8 @@ declare namespace Visio { * [Api set: 1.1] */ class ShapeCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Visio.Shape[]; /** @@ -66817,6 +66639,10 @@ declare namespace Visio { load(option?: Visio.Interfaces.ShapeCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.ShapeCollection; load(option?: string | string[]): Visio.ShapeCollection; load(option?: OfficeExtension.LoadOption): Visio.ShapeCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Visio.ShapeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Visio.Interfaces.ShapeCollectionData; } /** @@ -66826,6 +66652,8 @@ declare namespace Visio { * [Api set: 1.1] */ class Shape extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Returns the Comments Collection. Read-only. @@ -66931,6 +66759,10 @@ declare namespace Visio { select?: string; expand?: string; }): Visio.Shape; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Visio.Shape object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Visio.Interfaces.ShapeData; } /** @@ -66940,6 +66772,8 @@ declare namespace Visio { * [Api set: 1.1] */ class ShapeView extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Represents the highlight around the shape. @@ -66988,7 +66822,7 @@ declare namespace Visio { * @param Width Overlay Width. * @param Height Overlay Height. */ - addOverlay(OverlayType: "Text" | "Image", Content: string, OverlayHorizontalAlignment: "Left" | "Center" | "Right", OverlayVerticalAlignment: "Top" | "Middle" | "Bottom", Width: number, Height: number): OfficeExtension.ClientResult; + addOverlay(OverlayType: "Text" | "Image" | "Html", Content: string, OverlayHorizontalAlignment: "Left" | "Center" | "Right", OverlayVerticalAlignment: "Top" | "Middle" | "Bottom", Width: number, Height: number): OfficeExtension.ClientResult; /** * * Removes particular overlay or all overlays on the Shape. @@ -67019,6 +66853,10 @@ declare namespace Visio { select?: string; expand?: string; }): Visio.ShapeView; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Visio.ShapeView object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeViewData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Visio.Interfaces.ShapeViewData; } /** @@ -67108,6 +66946,8 @@ declare namespace Visio { * [Api set: 1.1] */ class ShapeDataItemCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Visio.ShapeDataItem[]; /** @@ -67144,6 +66984,10 @@ declare namespace Visio { load(option?: Visio.Interfaces.ShapeDataItemCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.ShapeDataItemCollection; load(option?: string | string[]): Visio.ShapeDataItemCollection; load(option?: OfficeExtension.LoadOption): Visio.ShapeDataItemCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Visio.ShapeDataItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeDataItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Visio.Interfaces.ShapeDataItemCollectionData; } /** @@ -67153,6 +66997,8 @@ declare namespace Visio { * [Api set: 1.1] */ class ShapeDataItem extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * A string that specifies the format of the shape data item. Read-only. @@ -67202,6 +67048,10 @@ declare namespace Visio { select?: string; expand?: string; }): Visio.ShapeDataItem; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Visio.ShapeDataItem object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.ShapeDataItemData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Visio.Interfaces.ShapeDataItemData; } /** @@ -67211,6 +67061,8 @@ declare namespace Visio { * [Api set: 1.1] */ class HyperlinkCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Visio.Hyperlink[]; /** @@ -67247,6 +67099,10 @@ declare namespace Visio { load(option?: Visio.Interfaces.HyperlinkCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.HyperlinkCollection; load(option?: string | string[]): Visio.HyperlinkCollection; load(option?: OfficeExtension.LoadOption): Visio.HyperlinkCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Visio.HyperlinkCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.HyperlinkCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Visio.Interfaces.HyperlinkCollectionData; } /** @@ -67256,6 +67112,8 @@ declare namespace Visio { * [Api set: 1.1] */ class Hyperlink extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the address of the Hyperlink object. Read-only. @@ -67305,6 +67163,10 @@ declare namespace Visio { select?: string; expand?: string; }): Visio.Hyperlink; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Visio.Hyperlink object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.HyperlinkData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Visio.Interfaces.HyperlinkData; } /** @@ -67314,6 +67176,8 @@ declare namespace Visio { * [Api set: 1.1] */ class CommentCollection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** Gets the loaded child items in this collection. */ readonly items: Visio.Comment[]; /** @@ -67350,6 +67214,10 @@ declare namespace Visio { load(option?: Visio.Interfaces.CommentCollectionLoadOptions & Visio.Interfaces.CollectionLoadOptions): Visio.CommentCollection; load(option?: string | string[]): Visio.CommentCollection; load(option?: OfficeExtension.LoadOption): Visio.CommentCollection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original `Visio.CommentCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.CommentCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. + */ toJSON(): Visio.Interfaces.CommentCollectionData; } /** @@ -67359,6 +67227,8 @@ declare namespace Visio { * [Api set: 1.1] */ class Comment extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * A string that specifies the name of the author of the comment. @@ -67415,6 +67285,10 @@ declare namespace Visio { select?: string; expand?: string; }): Visio.Comment; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Visio.Comment object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.CommentData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Visio.Interfaces.CommentData; } /** @@ -67424,6 +67298,8 @@ declare namespace Visio { * [Api set: 1.1] */ class Selection extends OfficeExtension.ClientObject { + /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ + context: RequestContext; /** * * Gets the Shapes of the Selection. Read-only. @@ -67451,6 +67327,10 @@ declare namespace Visio { select?: string; expand?: string; }): Visio.Selection; + /** + * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.) + * Whereas the original Visio.Selection object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Visio.Interfaces.SelectionData`) that contains shallow copies of any loaded child properties from the original object. + */ toJSON(): Visio.Interfaces.SelectionData; } /** @@ -67524,6 +67404,12 @@ declare namespace Visio { * */ image = "Image", + /** + * + * html + * + */ + html = "Html", } /** * @@ -67623,6 +67509,13 @@ declare namespace Visio { * [Api set: 1.1] */ disablePan?: boolean; + /** + * + * Disable PanZoomWindow. + * + * [Api set: 1.1] + */ + disablePanZoomWindow?: boolean; /** * * Disable Zoom. @@ -67786,6 +67679,13 @@ declare namespace Visio { * [Api set: 1.1] */ disablePan?: boolean; + /** + * + * Disable PanZoomWindow. + * + * [Api set: 1.1] + */ + disablePanZoomWindow?: boolean; /** * * Disable Zoom. @@ -68137,6 +68037,13 @@ declare namespace Visio { * [Api set: 1.1] */ disablePan?: boolean; + /** + * + * Disable PanZoomWindow. + * + * [Api set: 1.1] + */ + disablePanZoomWindow?: boolean; /** * * Disable Zoom. @@ -68588,14 +68495,14 @@ declare namespace Visio { /** * The RequestContext object facilitates requests to the Visio application. Since the Office add-in and the Visio application run in two different processes, the request context is required to get access to the Visio object model from the add-in. */ - class RequestContext extends OfficeExtension.ClientRequestContext { + class RequestContext extends OfficeCore.RequestContext { constructor(url?: string | OfficeExtension.EmbeddedSession); readonly document: Document; } /** - * Executes a batch script that performs actions on the Visio object model, using a new request context. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. - * @param batch - A function that takes in an Visio.RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Visio application. Since the Office add-in and the Visio application run in two different processes, the request context is required to get access to the Visio object model from the add-in. - */ + * Executes a batch script that performs actions on the Visio object model, using a new request context. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. + * @param batch - A function that takes in an Visio.RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Visio application. Since the Office add-in and the Visio application run in two different processes, the request context is required to get access to the Visio object model from the add-in. + */ function run(batch: (context: Visio.RequestContext) => Promise): Promise; /** * Executes a batch script that performs actions on the Visio object model, using the request context of a previously-created API object. @@ -68613,14 +68520,13 @@ declare namespace Visio { * Executes a batch script that performs actions on the Visio object model, using the RequestContext of a previously-created object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. * @param contextObject - A previously-created Visio.RequestContext. This context will get re-used by the batch function (instead of having a new context created). This means that the batch will be able to pick up changes made to existing API objects, if those objects were derived from this same context. * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Visio application. Since the Office add-in and the Visio application run in two different processes, the RequestContext is required to get access to the Visio object model from the add-in. - * * @remarks * In addition to this signature, the method also has the following signatures: - * + * * `run(batch: (context: Visio.RequestContext) => Promise): Promise;` - * + * * `run(object: OfficeExtension.ClientObject | OfficeExtension.EmbeddedSession, batch: (context: Visio.RequestContext) => Promise): Promise;` - * + * * `run(objects: OfficeExtension.ClientObject[], batch: (context: Visio.RequestContext) => Promise): Promise;` */ function run(contextObject: OfficeExtension.ClientRequestContext, batch: (context: Visio.RequestContext) => Promise): Promise;