microsoft-graph 3.6.0 → 3.7.0
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.
- package/dist/cjs/tasks/tryGetWorkbookWorksheetByName.d.ts +17 -0
- package/dist/cjs/tasks/tryGetWorkbookWorksheetByName.d.ts.map +1 -0
- package/dist/cjs/tasks/tryGetWorkbookWorksheetByName.js +26 -0
- package/dist/esm/tasks/tryGetWorkbookWorksheetByName.d.ts +17 -0
- package/dist/esm/tasks/tryGetWorkbookWorksheetByName.d.ts.map +1 -0
- package/dist/esm/tasks/tryGetWorkbookWorksheetByName.js +20 -0
- package/docs/api/README.md +1 -0
- package/docs/api/tryGetWorkbookWorksheetByName.md +29 -0
- package/package.json +11 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Attempts to retrieve a worksheet by its name, returning null if not found.
|
|
3
|
+
* @module tryGetWorkbookWorksheetByName
|
|
4
|
+
* @category Tasks
|
|
5
|
+
*/
|
|
6
|
+
import type { WorkbookWorksheet } from "@microsoft/microsoft-graph-types";
|
|
7
|
+
import type { WorkbookRef } from "../models/Workbook.ts";
|
|
8
|
+
import type { WorkbookWorksheetName, WorkbookWorksheetRef } from "../models/WorkbookWorksheet.ts";
|
|
9
|
+
/**
|
|
10
|
+
* Attempts to retrieve a worksheet by its name.
|
|
11
|
+
* Returns null if the worksheet does not exist (NotFoundError).
|
|
12
|
+
* @param workbookRef Reference to the workbook containing the worksheet.
|
|
13
|
+
* @param name The name of the worksheet to retrieve.
|
|
14
|
+
* @returns The worksheet, or null if not found.
|
|
15
|
+
*/
|
|
16
|
+
export default function tryGetWorkbookWorksheetByName(workbookRef: WorkbookRef, name: WorkbookWorksheetName): Promise<(WorkbookWorksheet & WorkbookWorksheetRef) | null>;
|
|
17
|
+
//# sourceMappingURL=tryGetWorkbookWorksheetByName.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tryGetWorkbookWorksheetByName.d.ts","sourceRoot":"","sources":["../../../src/tasks/tryGetWorkbookWorksheetByName.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAIlG;;;;;;GAMG;AACH,wBAA8B,6BAA6B,CAAC,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,CAAC,iBAAiB,GAAG,oBAAoB,CAAC,GAAG,IAAI,CAAC,CAS7K"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = tryGetWorkbookWorksheetByName;
|
|
7
|
+
const getWorkbookWorksheetByName_ts_1 = __importDefault(require("../operations/workbookWorksheet/getWorkbookWorksheetByName.js"));
|
|
8
|
+
const error_ts_1 = require("../services/error.js");
|
|
9
|
+
/**
|
|
10
|
+
* Attempts to retrieve a worksheet by its name.
|
|
11
|
+
* Returns null if the worksheet does not exist (NotFoundError).
|
|
12
|
+
* @param workbookRef Reference to the workbook containing the worksheet.
|
|
13
|
+
* @param name The name of the worksheet to retrieve.
|
|
14
|
+
* @returns The worksheet, or null if not found.
|
|
15
|
+
*/
|
|
16
|
+
async function tryGetWorkbookWorksheetByName(workbookRef, name) {
|
|
17
|
+
try {
|
|
18
|
+
return await (0, getWorkbookWorksheetByName_ts_1.default)(workbookRef, name);
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
if ((0, error_ts_1.isErrorWithName)(error, "NotFoundError")) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
throw error;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Attempts to retrieve a worksheet by its name, returning null if not found.
|
|
3
|
+
* @module tryGetWorkbookWorksheetByName
|
|
4
|
+
* @category Tasks
|
|
5
|
+
*/
|
|
6
|
+
import type { WorkbookWorksheet } from "@microsoft/microsoft-graph-types";
|
|
7
|
+
import type { WorkbookRef } from "../models/Workbook.ts";
|
|
8
|
+
import type { WorkbookWorksheetName, WorkbookWorksheetRef } from "../models/WorkbookWorksheet.ts";
|
|
9
|
+
/**
|
|
10
|
+
* Attempts to retrieve a worksheet by its name.
|
|
11
|
+
* Returns null if the worksheet does not exist (NotFoundError).
|
|
12
|
+
* @param workbookRef Reference to the workbook containing the worksheet.
|
|
13
|
+
* @param name The name of the worksheet to retrieve.
|
|
14
|
+
* @returns The worksheet, or null if not found.
|
|
15
|
+
*/
|
|
16
|
+
export default function tryGetWorkbookWorksheetByName(workbookRef: WorkbookRef, name: WorkbookWorksheetName): Promise<(WorkbookWorksheet & WorkbookWorksheetRef) | null>;
|
|
17
|
+
//# sourceMappingURL=tryGetWorkbookWorksheetByName.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tryGetWorkbookWorksheetByName.d.ts","sourceRoot":"","sources":["../../../src/tasks/tryGetWorkbookWorksheetByName.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAIlG;;;;;;GAMG;AACH,wBAA8B,6BAA6B,CAAC,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,CAAC,iBAAiB,GAAG,oBAAoB,CAAC,GAAG,IAAI,CAAC,CAS7K"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import getWorkbookWorksheetByName from "../operations/workbookWorksheet/getWorkbookWorksheetByName.js";
|
|
2
|
+
import { isErrorWithName } from "../services/error.js";
|
|
3
|
+
/**
|
|
4
|
+
* Attempts to retrieve a worksheet by its name.
|
|
5
|
+
* Returns null if the worksheet does not exist (NotFoundError).
|
|
6
|
+
* @param workbookRef Reference to the workbook containing the worksheet.
|
|
7
|
+
* @param name The name of the worksheet to retrieve.
|
|
8
|
+
* @returns The worksheet, or null if not found.
|
|
9
|
+
*/
|
|
10
|
+
export default async function tryGetWorkbookWorksheetByName(workbookRef, name) {
|
|
11
|
+
try {
|
|
12
|
+
return await getWorkbookWorksheetByName(workbookRef, name);
|
|
13
|
+
}
|
|
14
|
+
catch (error) {
|
|
15
|
+
if (isErrorWithName(error, "NotFoundError")) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
throw error;
|
|
19
|
+
}
|
|
20
|
+
}
|
package/docs/api/README.md
CHANGED
|
@@ -205,6 +205,7 @@
|
|
|
205
205
|
| [tryCloseWorkbookSession](tryCloseWorkbookSession.md) | Try and close a workbook session. |
|
|
206
206
|
| [tryDeleteDriveItem](tryDeleteDriveItem.md) | Attempts to delete a drive item, returning success status. |
|
|
207
207
|
| [tryGetDriveItemByPath](tryGetDriveItemByPath.md) | Attempts to retrieve the metadata for an item in a drive by file path, returning null if the item does not exist. |
|
|
208
|
+
| [tryGetWorkbookWorksheetByName](tryGetWorkbookWorksheetByName.md) | Attempts to retrieve a worksheet by its name, returning null if not found. |
|
|
208
209
|
| [updateWorkbookRangeFirstRow](updateWorkbookRangeFirstRow.md) | Update first row in a given workbook range. |
|
|
209
210
|
| [updateWorkbookRangeRows](updateWorkbookRangeRows.md) | Update rows in a given workbook range. |
|
|
210
211
|
| [writeWorkbookRows](writeWorkbookRows.md) | Write rows to a workbook range. |
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[Microsoft Graph SDK](README.md) / tryGetWorkbookWorksheetByName
|
|
2
|
+
|
|
3
|
+
# tryGetWorkbookWorksheetByName
|
|
4
|
+
|
|
5
|
+
Attempts to retrieve a worksheet by its name, returning null if not found.
|
|
6
|
+
|
|
7
|
+
## Functions
|
|
8
|
+
|
|
9
|
+
### tryGetWorkbookWorksheetByName()
|
|
10
|
+
|
|
11
|
+
> **tryGetWorkbookWorksheetByName**(`workbookRef`, `name`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`null` \| `WorkbookWorksheet` & [`SiteRef`](Site-1.md#siteref) & `object` & `object` & `object` & `object`\>
|
|
12
|
+
|
|
13
|
+
Defined in: [src/tasks/tryGetWorkbookWorksheetByName.ts:19](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/tasks/tryGetWorkbookWorksheetByName.ts#L19)
|
|
14
|
+
|
|
15
|
+
Attempts to retrieve a worksheet by its name.
|
|
16
|
+
Returns null if the worksheet does not exist (NotFoundError).
|
|
17
|
+
|
|
18
|
+
#### Parameters
|
|
19
|
+
|
|
20
|
+
| Parameter | Type | Description |
|
|
21
|
+
| ------ | ------ | ------ |
|
|
22
|
+
| `workbookRef` | [`WorkbookRef`](Workbook.md#workbookref) | Reference to the workbook containing the worksheet. |
|
|
23
|
+
| `name` | [`WorkbookWorksheetName`](WorkbookWorksheet-1.md#workbookworksheetname) | The name of the worksheet to retrieve. |
|
|
24
|
+
|
|
25
|
+
#### Returns
|
|
26
|
+
|
|
27
|
+
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`null` \| `WorkbookWorksheet` & [`SiteRef`](Site-1.md#siteref) & `object` & `object` & `object` & `object`\>
|
|
28
|
+
|
|
29
|
+
The worksheet, or null if not found.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "microsoft-graph",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"description": "Microsoft GraphAPI SDK for NodeJS",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -1892,6 +1892,16 @@
|
|
|
1892
1892
|
"require": "./dist/cjs/tasks/tryGetDriveItemByPath.js",
|
|
1893
1893
|
"types": "./dist/esm/tasks/tryGetDriveItemByPath.d.ts"
|
|
1894
1894
|
},
|
|
1895
|
+
"./tryGetWorkbookWorksheetByName": {
|
|
1896
|
+
"import": "./dist/esm/tasks/tryGetWorkbookWorksheetByName.js",
|
|
1897
|
+
"require": "./dist/cjs/tasks/tryGetWorkbookWorksheetByName.js",
|
|
1898
|
+
"types": "./dist/esm/tasks/tryGetWorkbookWorksheetByName.d.ts"
|
|
1899
|
+
},
|
|
1900
|
+
"./dist/cjs/tasks/tryGetWorkbookWorksheetByName": {
|
|
1901
|
+
"import": "./dist/esm/tasks/tryGetWorkbookWorksheetByName.js",
|
|
1902
|
+
"require": "./dist/cjs/tasks/tryGetWorkbookWorksheetByName.js",
|
|
1903
|
+
"types": "./dist/esm/tasks/tryGetWorkbookWorksheetByName.d.ts"
|
|
1904
|
+
},
|
|
1895
1905
|
"./tryGetWorkbookWorksheetUsedRangeRef": {
|
|
1896
1906
|
"import": "./dist/esm/tasks/tryGetWorkbookWorksheetUsedRangeRef.js",
|
|
1897
1907
|
"require": "./dist/cjs/tasks/tryGetWorkbookWorksheetUsedRangeRef.js",
|