@types/office-js-preview 1.0.315 → 1.0.318

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@ This package contains type definitions for Office.js (https://github.com/OfficeD
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js-preview.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Thu, 16 Jun 2022 20:31:36 GMT
11
+ * Last updated: Fri, 08 Jul 2022 00:32:15 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `Excel`, `Office`, `OfficeCore`, `OfficeExtension`, `OneNote`, `PowerPoint`, `Visio`, `Word`
14
14
 
@@ -1536,9 +1536,15 @@ declare namespace Office {
1536
1536
  *
1537
1537
  * **Hosts**: Excel, OneNote, Outlook, PowerPoint, Word
1538
1538
  *
1539
- * **Important**: In Outlook, this API is not supported if the add-in is loaded in an Outlook.com or Gmail mailbox.
1540
- *
1541
1539
  * **Requirement set**: {@link https://docs.microsoft.com/javascript/api/requirement-sets/common/identity-api-requirement-sets | IdentityAPI 1.3}
1540
+ *
1541
+ * **Important**: In Outlook, this API isn't supported if the add-in is loaded in an Outlook.com or Gmail mailbox.
1542
+ *
1543
+ * **Note**: In an Outlook event-based activation add-in, this API is supported in Outlook on Windows starting from version 2111 (build 14701.20000).
1544
+ * To retrieve an access token in older builds, use
1545
+ * {@link https://docs.microsoft.com/javascript/api/office-runtime/officeruntime.auth?view=common-js-preview#office-runtime-officeruntime-auth-getaccesstoken-member(1) |
1546
+ * OfficeRuntime.auth.getAccessToken} instead. For more information, see
1547
+ * {@link https://docs.microsoft.com/office/dev/add-ins/outlook/use-sso-in-event-based-activation | Enable single sign-on (SSO) in Outlook add-ins that use event-based activation}.
1542
1548
  *
1543
1549
  * @param options - Optional. Accepts an `AuthOptions` object to define sign-on behaviors.
1544
1550
  * @returns Promise to the access token.
@@ -17508,17 +17514,30 @@ declare namespace Office {
17508
17514
  *
17509
17515
  * - New Mac UI, Android: No limit
17510
17516
  *
17511
- * **Important**: In Outlook on the web, if a user created a new message by activating a contact's email address link from their contact or
17512
- * profile card, your add-in's `getAsync` call currently won't return a value in the `displayName` property of the
17513
- * associated `EmailAddressDetails` object. For more details, refer to the
17514
- * {@link https://github.com/OfficeDev/office-js/issues/2201 | related GitHub issue}.
17515
- *
17516
17517
  * @remarks
17517
17518
  * [Api set: Mailbox 1.1]
17518
17519
  *
17519
17520
  * **{@link https://docs.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: `ReadItem`
17520
17521
  *
17521
17522
  * **{@link https://docs.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
17523
+ *
17524
+ * **Important**: In Outlook on the web and on Windows, if a user creates a new message by activating a contact's email address link from their contact
17525
+ * or profile card, your add-in's `Recipients.getAsync` call returns the contact's email address in the `displayName` property of the associated
17526
+ * `EmailAddressDetails` object instead of the contact's saved name. For more details, refer to the
17527
+ * {@link https://github.com/OfficeDev/office-js/issues/2201 | related GitHub issue}.
17528
+ *
17529
+ * **Important**: The `getAsync` method only returns recipients resolved by the Outlook client. A resolved recipient has the following characteristics.
17530
+ *
17531
+ * - If the recipient has a saved entry in the sender's address book, Outlook resolves the email address to the recipient's saved display name.
17532
+ *
17533
+ * - A Teams meeting status icon appears before the recipient's name or email address.
17534
+ *
17535
+ * - A semicolon appears after the recipient's name or email address.
17536
+ *
17537
+ * - The recipient's name or email address is underlined or enclosed in a box.
17538
+ *
17539
+ * To resolve an email address once it's added to a mail item, the sender must use the **Tab** key or select a suggested contact or email address from
17540
+ * the auto-complete list.
17522
17541
  *
17523
17542
  * @param options - An object literal that contains one or more of the following properties.
17524
17543
  * `asyncContext`: Developers can provide any object they wish to access in the callback method.
@@ -17536,17 +17555,30 @@ declare namespace Office {
17536
17555
  *
17537
17556
  * - New Mac UI, Android: No limit
17538
17557
  *
17539
- * **Important**: In Outlook on the web, if a user created a new message by activating a contact's email address link from their contact or
17540
- * profile card, your add-in's `getAsync` call currently won't return a value in the `displayName` property of the
17541
- * associated `EmailAddressDetails` object. For more details, refer to the
17542
- * {@link https://github.com/OfficeDev/office-js/issues/2201 | related GitHub issue}.
17543
- *
17544
17558
  * @remarks
17545
17559
  * [Api set: Mailbox 1.1]
17546
17560
  *
17547
17561
  * **{@link https://docs.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: `ReadItem`
17548
17562
  *
17549
17563
  * **{@link https://docs.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
17564
+ *
17565
+ * **Important**: In Outlook on the web and on Windows, if a user creates a new message by activating a contact's email address link from their contact
17566
+ * or profile card, your add-in's `Recipients.getAsync` call returns the contact's email address in the `displayName` property of the associated
17567
+ * `EmailAddressDetails` object instead of the contact's saved name. For more details, refer to the
17568
+ * {@link https://github.com/OfficeDev/office-js/issues/2201 | related GitHub issue}.
17569
+ *
17570
+ * **Important**: The `getAsync` method only returns recipients resolved by the Outlook client. A resolved recipient has the following characteristics.
17571
+ *
17572
+ * - If the recipient has a saved entry in the sender's address book, Outlook resolves the email address to the recipient's saved display name.
17573
+ *
17574
+ * - A Teams meeting status icon appears before the recipient's name or email address.
17575
+ *
17576
+ * - A semicolon appears after the recipient's name or email address.
17577
+ *
17578
+ * - The recipient's name or email address is underlined or enclosed in a box.
17579
+ *
17580
+ * To resolve an email address once it's added to a mail item, the sender must use the **Tab** key or select a suggested contact or email address from
17581
+ * the auto-complete list.
17550
17582
  *
17551
17583
  * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter
17552
17584
  * of type `Office.AsyncResult`. The `value` property of the result is an array of `EmailAddressDetails` objects.
@@ -19612,7 +19644,24 @@ declare namespace Excel {
19612
19644
  * [Api set: ExcelApi BETA (PREVIEW ONLY)]
19613
19645
  * @beta
19614
19646
  */
19615
- lambdaInCell = "LambdaInCell"
19647
+ lambdaInCell = "LambdaInCell",
19648
+ /**
19649
+ * An error caused by a `CellValue` object that is too deeply nested within another `CellValue`. Displays as error type #CALC! in Excel.
19650
+ *
19651
+ * @remarks
19652
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
19653
+ * @beta
19654
+ */
19655
+ tooDeeplyNested = "TooDeeplyNested",
19656
+ /**
19657
+ * An error caused by a cell's formula returning a string that exceeds the maximum of 32767 characters. Displays as error type #CALC! in Excel.
19658
+ * Some characters, like emoji, may appear to be one character in the Excel UI but are actually processed as surrogate characters. A surrogate character counts as multiple characters toward the maximum character limit.
19659
+ *
19660
+ * @remarks
19661
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
19662
+ * @beta
19663
+ */
19664
+ textOverflow = "TextOverflow"
19616
19665
  }
19617
19666
  /**
19618
19667
  * Represents the value of a cell containing a #CALC! error.
@@ -19663,7 +19712,15 @@ declare namespace Excel {
19663
19712
  * [Api set: ExcelApi BETA (PREVIEW ONLY)]
19664
19713
  * @beta
19665
19714
  */
19666
- errorSubType?: CalcErrorCellValueSubType | "Unknown" | "ArrayOfArrays" | "ArrayOfRanges" | "EmptyArray" | "UnsupportedLifting" | "DataTableReferencedPendingFormula" | "TooManyCells" | "LambdaInCell";
19715
+ errorSubType?: CalcErrorCellValueSubType | "Unknown" | "ArrayOfArrays" | "ArrayOfRanges" | "EmptyArray" | "UnsupportedLifting" | "DataTableReferencedPendingFormula" | "TooManyCells" | "LambdaInCell" | "TooDeeplyNested" | "TextOverflow";
19716
+ /**
19717
+ * Represents the name of the function causing the error.
19718
+ *
19719
+ * @remarks
19720
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
19721
+ * @beta
19722
+ */
19723
+ functionName?: string;
19667
19724
  }
19668
19725
  /**
19669
19726
  * Represents a reference to a property used by the card layout.
@@ -19674,7 +19731,7 @@ declare namespace Excel {
19674
19731
  */
19675
19732
  interface CardLayoutPropertyReference {
19676
19733
  /**
19677
- * The name of the property referenced by the card layout.
19734
+ * Represents the name of the property referenced by the card layout.
19678
19735
  *
19679
19736
  * @remarks
19680
19737
  * [Api set: ExcelApi BETA (PREVIEW ONLY)]
@@ -20806,6 +20863,14 @@ declare namespace Excel {
20806
20863
  */
20807
20864
  div0 = "Div0",
20808
20865
  /**
20866
+ * Represents an `ExternalErrorCellValue`.
20867
+ *
20868
+ * @remarks
20869
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
20870
+ * @beta
20871
+ */
20872
+ external = "External",
20873
+ /**
20809
20874
  * Represents a `FieldErrorCellValue`.
20810
20875
  *
20811
20876
  * @remarks
@@ -20893,7 +20958,83 @@ declare namespace Excel {
20893
20958
  * [Api set: ExcelApi BETA (PREVIEW ONLY)]
20894
20959
  * @beta
20895
20960
  */
20896
- type ErrorCellValue = BlockedErrorCellValue | BusyErrorCellValue | CalcErrorCellValue | ConnectErrorCellValue | Div0ErrorCellValue | FieldErrorCellValue | GettingDataErrorCellValue | NotAvailableErrorCellValue | NameErrorCellValue | NullErrorCellValue | NumErrorCellValue | PlaceholderErrorCellValue | RefErrorCellValue | SpillErrorCellValue | ValueErrorCellValue;
20961
+ type ErrorCellValue = BlockedErrorCellValue | BusyErrorCellValue | CalcErrorCellValue | ConnectErrorCellValue | Div0ErrorCellValue | ExternalErrorCellValue | FieldErrorCellValue | GettingDataErrorCellValue | NotAvailableErrorCellValue | NameErrorCellValue | NullErrorCellValue | NumErrorCellValue | PlaceholderErrorCellValue | RefErrorCellValue | SpillErrorCellValue | ValueErrorCellValue;
20962
+ /**
20963
+ * Represents types of #EXTERNAL! errors.
20964
+ *
20965
+ * @remarks
20966
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
20967
+ * @beta
20968
+ */
20969
+ enum ExternalErrorCellValueSubType {
20970
+ /**
20971
+ * An unknown type of error. Displays as error type #EXTERNAL! in Excel.
20972
+ *
20973
+ * @remarks
20974
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
20975
+ * @beta
20976
+ */
20977
+ unknown = "Unknown",
20978
+ /**
20979
+ * An error returned by the Python interpreter as a result of running the Python code. Displays as error type #EXTERNAL! in Excel.
20980
+ *
20981
+ * @remarks
20982
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
20983
+ * @beta
20984
+ */
20985
+ pythonError = "PythonError"
20986
+ }
20987
+ /**
20988
+ * Represents the value of a cell containing an #EXTERNAL! error.
20989
+ *
20990
+ * @remarks
20991
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
20992
+ * @beta
20993
+ */
20994
+ interface ExternalErrorCellValue {
20995
+ /**
20996
+ * Represents the type of this cell value.
20997
+ *
20998
+ * @remarks
20999
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
21000
+ * @beta
21001
+ */
21002
+ type: CellValueType.error | "Error";
21003
+ /**
21004
+ * Represents the value that would be returned by `Range.values` for a cell with this value.
21005
+ * When accessed through a `valuesAsJson` property, this string value aligns with the en-US locale.
21006
+ * When accessed through a `valuesAsJsonLocal` property, this string value aligns with the user's display locale.
21007
+ *
21008
+ * @remarks
21009
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
21010
+ * @beta
21011
+ */
21012
+ basicValue?: "#EXTERNAL!" | string;
21013
+ /**
21014
+ * Represents the value that would be returned by `Range.valueTypes` for a cell with this value.
21015
+ *
21016
+ * @remarks
21017
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
21018
+ * @beta
21019
+ */
21020
+ basicType?: RangeValueType.error | "Error";
21021
+ /**
21022
+ * Represents the type of `ErrorCellValue`.
21023
+ *
21024
+ * @remarks
21025
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
21026
+ * @beta
21027
+ */
21028
+ errorType?: ErrorCellValueType.external | "External";
21029
+ /**
21030
+ * Represents the type of `ExternalErrorCellValue`.
21031
+ *
21032
+ * @remarks
21033
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
21034
+ * @beta
21035
+ */
21036
+ errorSubType?: ExternalErrorCellValueSubType | "Unknown" | "PythonError";
21037
+ }
20897
21038
  /**
20898
21039
  * Represents types of #FIELD! errors.
20899
21040
  *
@@ -20977,6 +21118,14 @@ declare namespace Excel {
20977
21118
  * @beta
20978
21119
  */
20979
21120
  errorSubType?: FieldErrorCellValueSubType | "Unknown" | "WebImageMissingFilePart" | "DataProviderError";
21121
+ /**
21122
+ * Represents the field which was not found by FIELDVALUE.
21123
+ *
21124
+ * @remarks
21125
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
21126
+ * @beta
21127
+ */
21128
+ fieldName?: string;
20980
21129
  }
20981
21130
  /**
20982
21131
  * Represents the value of a cell containing a number with a format string. Number format strings must conform to Excel guidelines. To learn more, see {@link https://support.microsoft.com/office/review-guidelines-for-customizing-a-number-format-c0a1d1fa-d3f4-4018-96b7-9c9354dd99f5 | Review guidelines for customizing a number format}.
@@ -21318,6 +21467,31 @@ declare namespace Excel {
21318
21467
  errorType?: ErrorCellValueType.null | "Null";
21319
21468
  }
21320
21469
  /**
21470
+ * Represents types of #NUM! errors.
21471
+ *
21472
+ * @remarks
21473
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
21474
+ * @beta
21475
+ */
21476
+ enum NumErrorCellValueSubType {
21477
+ /**
21478
+ * An unknown type of error. Displays as error type #NUM! in Excel.
21479
+ *
21480
+ * @remarks
21481
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
21482
+ * @beta
21483
+ */
21484
+ unknown = "Unknown",
21485
+ /**
21486
+ * An error caused by a cell's formula having an array parameter with too many rows or columns. The maximum number of rows and columns in an array parameter is 1048576. Displays as error type #NUM! in Excel.
21487
+ *
21488
+ * @remarks
21489
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
21490
+ * @beta
21491
+ */
21492
+ arrayTooLarge = "ArrayTooLarge"
21493
+ }
21494
+ /**
21321
21495
  * Represents the value of a cell containing a #NUM! error.
21322
21496
  *
21323
21497
  * @remarks
@@ -21359,6 +21533,22 @@ declare namespace Excel {
21359
21533
  * @beta
21360
21534
  */
21361
21535
  errorType?: ErrorCellValueType.num | "Num";
21536
+ /**
21537
+ * Represents the type of `NumErrorCellValue`.
21538
+ *
21539
+ * @remarks
21540
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
21541
+ * @beta
21542
+ */
21543
+ errorSubType?: NumErrorCellValueSubType | "Unknown" | "ArrayTooLarge";
21544
+ /**
21545
+ * Represents the name of the function causing the error.
21546
+ *
21547
+ * @remarks
21548
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
21549
+ * @beta
21550
+ */
21551
+ functionName?: string;
21362
21552
  }
21363
21553
  /**
21364
21554
  * Represents types of #REF! errors.
@@ -32793,6 +32983,19 @@ declare namespace Excel {
32793
32983
  * @param name Optional. Specifies the name of the new column. If `null`, the default name will be used.
32794
32984
  */
32795
32985
  add(index?: number, values?: Array<Array<boolean | string | number>> | boolean | string | number, name?: string): Excel.TableColumn;
32986
+ /**
32987
+ * Adds a new column to the table.
32988
+ Unlike `add()`, `addAsJson()` takes any type of cell value, such as image or entity data types.
32989
+ *
32990
+ * @remarks
32991
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
32992
+ * @beta
32993
+ *
32994
+ * @param index Optional. Specifies the relative position of the new column. If null or -1, the addition happens at the end. Columns with a higher index will be shifted to the side. Zero-indexed.
32995
+ * @param values Optional. A 2D array of cell values of the table column.
32996
+ * @param name Optional. Specifies the name of the new column. If `null`, the default name will be used.
32997
+ */
32998
+ addAsJson(index?: number, values?: CellValue[][], name?: string): Excel.TableColumn;
32796
32999
  /**
32797
33000
  * Gets the number of columns in the table.
32798
33001
  *
@@ -33026,6 +33229,24 @@ declare namespace Excel {
33026
33229
  * @param alwaysInsert Optional. Specifies whether the new rows will be inserted into the table when new rows are added. If `true`, the new rows will be inserted into the table. If `false`, the new rows will be added below the table. Default is `true`.
33027
33230
  */
33028
33231
  add(index?: number, values?: Array<Array<boolean | string | number>> | boolean | string | number, alwaysInsert?: boolean): Excel.TableRow;
33232
+ /**
33233
+ * Adds one or more rows to the table. The returned object will be the top row of the newly added row or rows.
33234
+ Unlike `add()`, `addAsJson()` takes any type of cell value, such as image or entity data types.
33235
+
33236
+ Note that unlike ranges or columns, which will adjust if new rows or columns are added before them,
33237
+ a `TableRow` object represents the physical location of the table row, but not the data.
33238
+ That is, if the data is sorted or if new rows are added, a table row will continue
33239
+ to point at the index for which it was created.
33240
+ *
33241
+ * @remarks
33242
+ * [Api set: ExcelApi BETA (PREVIEW ONLY)]
33243
+ * @beta
33244
+ *
33245
+ * @param index Optional. Specifies the relative position of the new row. If null or -1, the addition happens at the end. Any rows below the inserted row are shifted downwards. Zero-indexed.
33246
+ * @param values Optional. A 2D array of cell values of the table row.
33247
+ * @param alwaysInsert Optional. Specifies whether the new rows will be inserted into the table when new rows are added. If `true`, the new rows will be inserted into the table. If `false`, the new rows will be added below the table. Default is `true`.
33248
+ */
33249
+ addAsJson(index?: number, values?: CellValue[][], alwaysInsert?: boolean): Excel.TableRow;
33029
33250
  /**
33030
33251
  * Delete multiple rows from a table.
33031
33252
  These rows don't need to be sequential. This method will throw the `InvalidArgument` error if a chosen row has already been deleted or doesn't exist.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/office-js-preview",
3
- "version": "1.0.315",
3
+ "version": "1.0.318",
4
4
  "description": "TypeScript definitions for Office.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js-preview",
6
6
  "license": "MIT",
@@ -45,6 +45,6 @@
45
45
  },
46
46
  "scripts": {},
47
47
  "dependencies": {},
48
- "typesPublisherContentHash": "7b8b6cb450be9b3c52cd71cd1dd00a54a63029abb20462fab4e186809b42c9ba",
48
+ "typesPublisherContentHash": "bf8642e42365f504fdabe3aa84a7a02ca4d53fc8dd8056c72ed6be5c0d143aeb",
49
49
  "typeScriptVersion": "4.0"
50
50
  }