microsoft-graph 2.3.0 → 2.4.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/.vscode/settings.json +2 -1
- package/dist/models/WorkbookTableColumnRef.d.ts +6 -0
- package/dist/models/WorkbookTableColumnRef.d.ts.map +1 -0
- package/dist/models/WorkbookTableColumnRef.js +1 -0
- package/dist/operations/drive/createFolder.d.ts +8 -1
- package/dist/operations/drive/createFolder.d.ts.map +1 -1
- package/dist/operations/drive/createFolder.js +8 -1
- package/dist/operations/drive/listDrives.d.ts +7 -1
- package/dist/operations/drive/listDrives.d.ts.map +1 -1
- package/dist/operations/drive/listDrives.js +7 -1
- package/dist/operations/driveItem/deleteDriveItem.d.ts +7 -1
- package/dist/operations/driveItem/deleteDriveItem.d.ts.map +1 -1
- package/dist/operations/driveItem/deleteDriveItem.js +7 -1
- package/dist/operations/driveItem/getDriveItem.d.ts +7 -1
- package/dist/operations/driveItem/getDriveItem.d.ts.map +1 -1
- package/dist/operations/driveItem/getDriveItem.js +7 -1
- package/dist/operations/driveItem/getDriveItem.test.js +2 -2
- package/dist/operations/driveItem/getDriveItemByPath.d.ts +8 -1
- package/dist/operations/driveItem/getDriveItemByPath.d.ts.map +1 -1
- package/dist/operations/driveItem/getDriveItemByPath.js +8 -1
- package/dist/operations/driveItem/getDriveItemByPath.test.js +2 -2
- package/dist/operations/driveItem/getDriveItemContent.d.ts +8 -1
- package/dist/operations/driveItem/getDriveItemContent.d.ts.map +1 -1
- package/dist/operations/driveItem/getDriveItemContent.js +8 -1
- package/dist/operations/driveItem/getDriveItemContent.test.js +2 -2
- package/dist/operations/driveItem/initiateCopyDriveItem.d.ts +9 -1
- package/dist/operations/driveItem/initiateCopyDriveItem.d.ts.map +1 -1
- package/dist/operations/driveItem/initiateCopyDriveItem.js +9 -1
- package/dist/operations/driveItem/initiateCopyDriveItem.test.js +3 -3
- package/dist/operations/driveItem/listDriveItems.d.ts +8 -2
- package/dist/operations/driveItem/listDriveItems.d.ts.map +1 -1
- package/dist/operations/driveItem/listDriveItems.js +8 -3
- package/dist/operations/driveItem/listDriveItems.test.js +2 -2
- package/dist/operations/site/getSite.d.ts +7 -1
- package/dist/operations/site/getSite.d.ts.map +1 -1
- package/dist/operations/site/getSite.js +7 -1
- package/dist/operations/site/getSiteByName.d.ts +9 -1
- package/dist/operations/site/getSiteByName.d.ts.map +1 -1
- package/dist/operations/site/getSiteByName.js +9 -1
- package/dist/operations/site/listSites.d.ts +7 -1
- package/dist/operations/site/listSites.d.ts.map +1 -1
- package/dist/operations/site/listSites.js +7 -1
- package/dist/operations/site/searchSites.d.ts +8 -1
- package/dist/operations/site/searchSites.d.ts.map +1 -1
- package/dist/operations/site/searchSites.js +8 -1
- package/dist/operations/user/userSendMail.d.ts +10 -1
- package/dist/operations/user/userSendMail.d.ts.map +1 -1
- package/dist/operations/user/userSendMail.js +10 -1
- package/dist/operations/workbook/calculateWorkbook.d.ts +14 -2
- package/dist/operations/workbook/calculateWorkbook.d.ts.map +1 -1
- package/dist/operations/workbook/calculateWorkbook.js +14 -2
- package/dist/operations/workbook/calculateWorkbook.test.js +4 -4
- package/dist/operations/workbook/createWorkbook.d.ts +9 -1
- package/dist/operations/workbook/createWorkbook.d.ts.map +1 -1
- package/dist/operations/workbook/createWorkbook.js +9 -1
- package/dist/operations/workbook/createWorkbook.test.js +2 -2
- package/dist/operations/workbook/deleteWorkbook.d.ts +7 -1
- package/dist/operations/workbook/deleteWorkbook.d.ts.map +1 -1
- package/dist/operations/workbook/deleteWorkbook.js +7 -1
- package/dist/operations/workbookRange/clearWorkbookRange.d.ts +8 -1
- package/dist/operations/workbookRange/clearWorkbookRange.d.ts.map +1 -1
- package/dist/operations/workbookRange/clearWorkbookRange.js +8 -1
- package/dist/operations/workbookRange/clearWorkbookRange.test.js +3 -3
- package/dist/operations/workbookRange/deleteWorkbookRange.d.ts +8 -1
- package/dist/operations/workbookRange/deleteWorkbookRange.d.ts.map +1 -1
- package/dist/operations/workbookRange/deleteWorkbookRange.js +8 -1
- package/dist/operations/workbookRange/deleteWorkbookRange.test.js +3 -3
- package/dist/operations/workbookRange/getWorkbookNamedRange.d.ts +7 -1
- package/dist/operations/workbookRange/getWorkbookNamedRange.d.ts.map +1 -1
- package/dist/operations/workbookRange/getWorkbookNamedRange.js +7 -1
- package/dist/operations/workbookRange/getWorkbookRangeFormat.d.ts +7 -1
- package/dist/operations/workbookRange/getWorkbookRangeFormat.d.ts.map +1 -1
- package/dist/operations/workbookRange/getWorkbookRangeFormat.js +7 -1
- package/dist/operations/workbookRange/getWorkbookRangeFormat.test.js +2 -2
- package/dist/operations/workbookRange/getWorkbookUsedRange.d.ts +3 -1
- package/dist/operations/workbookRange/getWorkbookUsedRange.d.ts.map +1 -1
- package/dist/operations/workbookRange/getWorkbookUsedRange.js +3 -1
- package/dist/operations/workbookRange/getWorkbookVisibleRange.d.ts +7 -1
- package/dist/operations/workbookRange/getWorkbookVisibleRange.d.ts.map +1 -1
- package/dist/operations/workbookRange/getWorkbookVisibleRange.js +7 -1
- package/dist/operations/workbookRange/getWorkbookVisibleRange.test.js +5 -5
- package/dist/operations/workbookRange/getWorkbookWorksheetRange.d.ts +7 -1
- package/dist/operations/workbookRange/getWorkbookWorksheetRange.d.ts.map +1 -1
- package/dist/operations/workbookRange/getWorkbookWorksheetRange.js +7 -1
- package/dist/operations/workbookRange/getWorkbookWorksheetRange.test.js +2 -2
- package/dist/operations/workbookRange/insertWorkbookCells.d.ts +9 -1
- package/dist/operations/workbookRange/insertWorkbookCells.d.ts.map +1 -1
- package/dist/operations/workbookRange/insertWorkbookCells.js +9 -1
- package/dist/operations/workbookRange/insertWorkbookCells.test.js +2 -2
- package/dist/operations/workbookRange/updateWorkbookNamedRange.d.ts +8 -1
- package/dist/operations/workbookRange/updateWorkbookNamedRange.d.ts.map +1 -1
- package/dist/operations/workbookRange/updateWorkbookNamedRange.js +8 -1
- package/dist/operations/workbookRange/updateWorkbookRange.d.ts +8 -1
- package/dist/operations/workbookRange/updateWorkbookRange.d.ts.map +1 -1
- package/dist/operations/workbookRange/updateWorkbookRange.js +8 -1
- package/dist/operations/workbookRange/updateWorkbookRange.test.js +3 -3
- package/dist/operations/workbookSession/closeWorkbookSession.d.ts +8 -1
- package/dist/operations/workbookSession/closeWorkbookSession.d.ts.map +1 -1
- package/dist/operations/workbookSession/closeWorkbookSession.js +8 -1
- package/dist/operations/workbookSession/createWorkbookSession.d.ts +9 -1
- package/dist/operations/workbookSession/createWorkbookSession.d.ts.map +1 -1
- package/dist/operations/workbookSession/createWorkbookSession.js +9 -1
- package/dist/operations/workbookSession/refreshWorkbookSession.d.ts +8 -1
- package/dist/operations/workbookSession/refreshWorkbookSession.d.ts.map +1 -1
- package/dist/operations/workbookSession/refreshWorkbookSession.js +8 -1
- package/dist/operations/workbookTable/applyWorkbookTableColulmnFilter.test.d.ts +2 -0
- package/dist/operations/workbookTable/applyWorkbookTableColulmnFilter.test.d.ts.map +1 -0
- package/dist/operations/workbookTable/applyWorkbookTableColulmnFilter.test.js +45 -0
- package/dist/operations/workbookTable/applyWorkbookTableColumnFilter.d.ts +13 -0
- package/dist/operations/workbookTable/applyWorkbookTableColumnFilter.d.ts.map +1 -0
- package/dist/operations/workbookTable/applyWorkbookTableColumnFilter.js +25 -0
- package/dist/operations/workbookTable/clearWorkbookTableFilters.d.ts +10 -0
- package/dist/operations/workbookTable/clearWorkbookTableFilters.d.ts.map +1 -0
- package/dist/operations/workbookTable/clearWorkbookTableFilters.js +20 -0
- package/dist/operations/workbookTable/clearWorkbookTableFilters.test.d.ts +2 -0
- package/dist/operations/workbookTable/clearWorkbookTableFilters.test.d.ts.map +1 -0
- package/dist/operations/workbookTable/clearWorkbookTableFilters.test.js +51 -0
- package/dist/operations/workbookTable/createWorkbookTable.d.ts +8 -1
- package/dist/operations/workbookTable/createWorkbookTable.d.ts.map +1 -1
- package/dist/operations/workbookTable/createWorkbookTable.js +8 -1
- package/dist/operations/workbookTable/createWorkbookTable.test.js +2 -2
- package/dist/operations/workbookTable/getWorkbookTable.d.ts +7 -1
- package/dist/operations/workbookTable/getWorkbookTable.d.ts.map +1 -1
- package/dist/operations/workbookTable/getWorkbookTable.js +7 -1
- package/dist/operations/workbookTable/getWorkbookTable.test.js +2 -2
- package/dist/operations/workbookTable/getWorkbookTableBodyRange.d.ts +7 -1
- package/dist/operations/workbookTable/getWorkbookTableBodyRange.d.ts.map +1 -1
- package/dist/operations/workbookTable/getWorkbookTableBodyRange.js +7 -1
- package/dist/operations/workbookTable/getWorkbookTableBodyRange.test.js +3 -3
- package/dist/operations/workbookTable/getWorkbookTableBodyVisibleRange.d.ts +13 -0
- package/dist/operations/workbookTable/getWorkbookTableBodyVisibleRange.d.ts.map +1 -0
- package/dist/operations/workbookTable/getWorkbookTableBodyVisibleRange.js +29 -0
- package/dist/operations/workbookTable/getWorkbookTableBodyVisibleRange.test.d.ts +2 -0
- package/dist/operations/workbookTable/getWorkbookTableBodyVisibleRange.test.d.ts.map +1 -0
- package/dist/operations/workbookTable/getWorkbookTableBodyVisibleRange.test.js +45 -0
- package/dist/operations/workbookTable/getWorkbookTableHeaderRange.d.ts +7 -1
- package/dist/operations/workbookTable/getWorkbookTableHeaderRange.d.ts.map +1 -1
- package/dist/operations/workbookTable/getWorkbookTableHeaderRange.js +7 -1
- package/dist/operations/workbookTable/getWorkbookTableHeaderRange.test.js +2 -2
- package/dist/operations/workbookTable/listWorkbookTableColumns.d.ts +7 -1
- package/dist/operations/workbookTable/listWorkbookTableColumns.d.ts.map +1 -1
- package/dist/operations/workbookTable/listWorkbookTableColumns.js +7 -1
- package/dist/operations/workbookTable/listWorkbookTableColumns.test.js +2 -2
- package/dist/operations/workbookTable/listWorkbookTableRows.d.ts +7 -1
- package/dist/operations/workbookTable/listWorkbookTableRows.d.ts.map +1 -1
- package/dist/operations/workbookTable/listWorkbookTableRows.js +7 -1
- package/dist/operations/workbookTable/listWorkbookTableRows.test.js +2 -2
- package/dist/operations/workbookTable/listWorkbookTables.d.ts +7 -1
- package/dist/operations/workbookTable/listWorkbookTables.d.ts.map +1 -1
- package/dist/operations/workbookTable/listWorkbookTables.js +7 -1
- package/dist/operations/workbookTable/listWorkbookTables.test.js +2 -2
- package/dist/operations/workbookWorksheet/createWorkbookWorksheet.d.ts +8 -1
- package/dist/operations/workbookWorksheet/createWorkbookWorksheet.d.ts.map +1 -1
- package/dist/operations/workbookWorksheet/createWorkbookWorksheet.js +8 -1
- package/dist/operations/workbookWorksheet/createWorkbookWorksheet.test.js +3 -3
- package/dist/operations/workbookWorksheet/deleteWorkbookWorksheet.d.ts +7 -1
- package/dist/operations/workbookWorksheet/deleteWorkbookWorksheet.d.ts.map +1 -1
- package/dist/operations/workbookWorksheet/deleteWorkbookWorksheet.js +7 -1
- package/dist/operations/workbookWorksheet/deleteWorkbookWorksheet.test.js +2 -2
- package/dist/operations/workbookWorksheet/getWorkbookWorksheetUsedRange.d.ts +13 -0
- package/dist/operations/workbookWorksheet/getWorkbookWorksheetUsedRange.d.ts.map +1 -0
- package/dist/operations/workbookWorksheet/getWorkbookWorksheetUsedRange.js +33 -0
- package/dist/operations/workbookWorksheet/getWorkbookWorksheetUsedRange.test.d.ts +2 -0
- package/dist/operations/workbookWorksheet/getWorkbookWorksheetUsedRange.test.d.ts.map +1 -0
- package/dist/operations/workbookWorksheet/getWorkbookWorksheetUsedRange.test.js +54 -0
- package/dist/operations/workbookWorksheet/getWorkbookWorksheetUsedVisibleRange.d.ts +13 -0
- package/dist/operations/workbookWorksheet/getWorkbookWorksheetUsedVisibleRange.d.ts.map +1 -0
- package/dist/operations/workbookWorksheet/getWorkbookWorksheetUsedVisibleRange.js +29 -0
- package/dist/operations/workbookWorksheet/getWorkbookWorksheetUsedVisibleRange.test.d.ts +2 -0
- package/dist/operations/workbookWorksheet/getWorkbookWorksheetUsedVisibleRange.test.d.ts.map +1 -0
- package/dist/operations/workbookWorksheet/getWorkbookWorksheetUsedVisibleRange.test.js +37 -0
- package/dist/operations/workbookWorksheet/listWorkbookWorksheets.d.ts +7 -1
- package/dist/operations/workbookWorksheet/listWorkbookWorksheets.d.ts.map +1 -1
- package/dist/operations/workbookWorksheet/listWorkbookWorksheets.js +7 -1
- package/dist/operations/workbookWorksheet/listWorkbookWorksheets.test.js +3 -3
- package/dist/operations/workbookWorksheet/updateWorkbookWorksheet.d.ts +11 -1
- package/dist/operations/workbookWorksheet/updateWorkbookWorksheet.d.ts.map +1 -1
- package/dist/operations/workbookWorksheet/updateWorkbookWorksheet.js +11 -1
- package/dist/operations/workbookWorksheet/updateWorkbookWorksheet.test.js +3 -3
- package/dist/services/accessToken.d.ts +9 -1
- package/dist/services/accessToken.d.ts.map +1 -1
- package/dist/services/accessToken.js +9 -1
- package/dist/services/addressManipulation.d.ts +67 -0
- package/dist/services/addressManipulation.d.ts.map +1 -1
- package/dist/services/addressManipulation.js +67 -0
- package/dist/services/addressOffset.d.ts +20 -0
- package/dist/services/addressOffset.d.ts.map +1 -1
- package/dist/services/addressOffset.js +20 -0
- package/dist/services/context.d.ts +19 -2
- package/dist/services/context.d.ts.map +1 -1
- package/dist/services/context.js +19 -2
- package/dist/services/drive.d.ts +12 -1
- package/dist/services/drive.d.ts.map +1 -1
- package/dist/services/drive.js +12 -1
- package/dist/services/driveItem.d.ts +13 -1
- package/dist/services/driveItem.d.ts.map +1 -1
- package/dist/services/driveItem.js +13 -1
- package/dist/services/environmentVariable.d.ts +13 -0
- package/dist/services/environmentVariable.d.ts.map +1 -1
- package/dist/services/environmentVariable.js +13 -0
- package/dist/services/httpAgent.d.ts +5 -0
- package/dist/services/httpAgent.d.ts.map +1 -1
- package/dist/services/httpAgent.js +5 -0
- package/dist/services/httpStatus.d.ts +15 -0
- package/dist/services/httpStatus.d.ts.map +1 -1
- package/dist/services/httpStatus.js +15 -0
- package/dist/services/operationId.d.ts +10 -0
- package/dist/services/operationId.d.ts.map +1 -1
- package/dist/services/operationId.js +10 -0
- package/dist/services/random.d.ts +5 -0
- package/dist/services/random.d.ts.map +1 -1
- package/dist/services/random.js +5 -0
- package/dist/services/sharepointUrl.d.ts +6 -1
- package/dist/services/sharepointUrl.d.ts.map +1 -1
- package/dist/services/sharepointUrl.js +6 -1
- package/dist/services/site.d.ts +12 -1
- package/dist/services/site.d.ts.map +1 -1
- package/dist/services/site.js +12 -1
- package/dist/services/sleep.d.ts +5 -0
- package/dist/services/sleep.d.ts.map +1 -1
- package/dist/services/sleep.js +5 -0
- package/dist/services/stringCaseConversion.d.ts +5 -0
- package/dist/services/stringCaseConversion.d.ts.map +1 -1
- package/dist/services/stringCaseConversion.js +5 -0
- package/dist/services/templatedPaths.d.ts +7 -1
- package/dist/services/templatedPaths.d.ts.map +1 -1
- package/dist/services/templatedPaths.js +7 -1
- package/dist/services/temporaryFiles.d.ts +5 -0
- package/dist/services/temporaryFiles.d.ts.map +1 -1
- package/dist/services/temporaryFiles.js +5 -0
- package/dist/services/workbookRange.d.ts +6 -0
- package/dist/services/workbookRange.d.ts.map +1 -1
- package/dist/services/workbookRange.js +6 -0
- package/dist/services/workbookTable.d.ts +7 -0
- package/dist/services/workbookTable.d.ts.map +1 -1
- package/dist/services/workbookTable.js +7 -0
- package/dist/services/workbookTableColumn.d.ts +12 -0
- package/dist/services/workbookTableColumn.d.ts.map +1 -0
- package/dist/services/workbookTableColumn.js +22 -0
- package/dist/services/workbookWorksheet.d.ts +12 -0
- package/dist/services/workbookWorksheet.d.ts.map +1 -1
- package/dist/services/workbookWorksheet.js +12 -0
- package/dist/tasks/createWorkbookAndStartSession.d.ts +7 -1
- package/dist/tasks/createWorkbookAndStartSession.d.ts.map +1 -1
- package/dist/tasks/createWorkbookAndStartSession.js +7 -1
- package/dist/tasks/deleteDriveItemWithRetry.d.ts +6 -1
- package/dist/tasks/deleteDriveItemWithRetry.d.ts.map +1 -1
- package/dist/tasks/deleteDriveItemWithRetry.js +6 -1
- package/dist/tasks/downloadDriveItemContent.d.ts +7 -1
- package/dist/tasks/downloadDriveItemContent.d.ts.map +1 -1
- package/dist/tasks/downloadDriveItemContent.js +7 -1
- package/dist/tasks/getRangeLastUsedCell.d.ts +7 -1
- package/dist/tasks/getRangeLastUsedCell.d.ts.map +1 -1
- package/dist/tasks/getRangeLastUsedCell.js +7 -1
- package/dist/tasks/getRangeLastUsedCell.test.js +4 -4
- package/dist/tasks/getWorkbookTableVisibleBody.d.ts +1 -1
- package/dist/tasks/getWorkbookTableVisibleBody.d.ts.map +1 -1
- package/dist/tasks/getWorkbookTableVisibleBody.js +1 -1
- package/dist/tasks/getWorkbookWorksheetByName.d.ts +8 -1
- package/dist/tasks/getWorkbookWorksheetByName.d.ts.map +1 -1
- package/dist/tasks/getWorkbookWorksheetByName.js +8 -1
- package/dist/tasks/safeDeleteWorkbook.d.ts +7 -1
- package/dist/tasks/safeDeleteWorkbook.d.ts.map +1 -1
- package/dist/tasks/safeDeleteWorkbook.js +7 -1
- package/dist/tasks/setColumnHidden.d.ts +7 -1
- package/dist/tasks/setColumnHidden.d.ts.map +1 -1
- package/dist/tasks/setColumnHidden.js +7 -1
- package/dist/tasks/setColumnHidden.test.js +2 -2
- package/dist/tasks/setRowHidden.d.ts +7 -1
- package/dist/tasks/setRowHidden.d.ts.map +1 -1
- package/dist/tasks/setRowHidden.js +7 -1
- package/dist/tasks/setRowHidden.test.js +2 -2
- package/dist/tasks/setWorkbookTableBodyVisibleRows.d.ts +9 -1
- package/dist/tasks/setWorkbookTableBodyVisibleRows.d.ts.map +1 -1
- package/dist/tasks/setWorkbookTableBodyVisibleRows.js +23 -16
- package/dist/tasks/setWorkbookTableBodyVisibleRows.test.js +10 -8
- package/dist/tasks/tryDeleteDriveItem.d.ts +9 -0
- package/dist/tasks/tryDeleteDriveItem.d.ts.map +1 -0
- package/dist/tasks/tryDeleteDriveItem.js +16 -0
- package/docs/findingSiteDriveId.md +21 -0
- package/package.json +33 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { WorkbookRange } from "@microsoft/microsoft-graph-types";
|
|
2
|
+
import type { GraphOperation } from "../../models/GraphOperation.ts";
|
|
3
|
+
import type { WorkbookRangeRef } from "../../models/WorkbookRangeRef.ts";
|
|
4
|
+
import type { WorkbookWorksheetRef } from "../../models/WorkbookWorksheetRef.ts";
|
|
5
|
+
/**
|
|
6
|
+
* Retrieve the visible (not hidden) range in a worksheet.
|
|
7
|
+
*
|
|
8
|
+
* @param worksheetRef - A reference to the worksheet, optionally including session information.
|
|
9
|
+
* @returns The visible range of the worksheet, including its metadata and reference information.
|
|
10
|
+
* @see https://learn.microsoft.com/en-us/graph/api/range-usedrange
|
|
11
|
+
*/
|
|
12
|
+
export default function getWorkbookWorksheetUsedVisibleRange(worksheetRef: WorkbookWorksheetRef): GraphOperation<WorkbookRange & WorkbookRangeRef>;
|
|
13
|
+
//# sourceMappingURL=getWorkbookWorksheetUsedVisibleRange.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getWorkbookWorksheetUsedVisibleRange.d.ts","sourceRoot":"","sources":["../../../src/operations/workbookWorksheet/getWorkbookWorksheetUsedVisibleRange.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAGtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAIjF;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,oCAAoC,CAAC,YAAY,EAAE,oBAAoB,GAAG,cAAc,CAAC,aAAa,GAAG,gBAAgB,CAAC,CAmBjJ"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { operation } from "../../graphApi.js";
|
|
2
|
+
import { generatePath } from "../../services/templatedPaths.js";
|
|
3
|
+
import { createWorkbookRangeRef } from "../../services/workbookRange.js";
|
|
4
|
+
/**
|
|
5
|
+
* Retrieve the visible (not hidden) range in a worksheet.
|
|
6
|
+
*
|
|
7
|
+
* @param worksheetRef - A reference to the worksheet, optionally including session information.
|
|
8
|
+
* @returns The visible range of the worksheet, including its metadata and reference information.
|
|
9
|
+
* @see https://learn.microsoft.com/en-us/graph/api/range-usedrange
|
|
10
|
+
*/
|
|
11
|
+
export default function getWorkbookWorksheetUsedVisibleRange(worksheetRef) {
|
|
12
|
+
return operation({
|
|
13
|
+
contextId: worksheetRef.contextId,
|
|
14
|
+
method: "GET",
|
|
15
|
+
path: generatePath("/sites/{site-id}/drives/{drive-id}/items/{item-id}/workbook/worksheets/{worksheet-id}/range/usedRange/visibleView", worksheetRef),
|
|
16
|
+
headers: {
|
|
17
|
+
"workbook-session-id": worksheetRef.sessionId,
|
|
18
|
+
},
|
|
19
|
+
body: null,
|
|
20
|
+
responseTransform: (response) => {
|
|
21
|
+
const range = response;
|
|
22
|
+
const rangeRef = createWorkbookRangeRef(worksheetRef, range.address);
|
|
23
|
+
return {
|
|
24
|
+
...range,
|
|
25
|
+
...rangeRef,
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getWorkbookWorksheetUsedVisibleRange.test.d.ts","sourceRoot":"","sources":["../../../src/operations/workbookWorksheet/getWorkbookWorksheetUsedVisibleRange.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { getDefaultDriveRef } from "../../services/drive.js";
|
|
3
|
+
import { driveItemPath } from "../../services/driveItem.js";
|
|
4
|
+
import { generateTempFileName } from "../../services/temporaryFiles.js";
|
|
5
|
+
import { createWorkbookRangeRef } from "../../services/workbookRange.js";
|
|
6
|
+
import { createWorkbookWorksheetRef, defaultWorkbookWorksheetId } from "../../services/workbookWorksheet.js";
|
|
7
|
+
import setRowHidden from "../../tasks/setRowHidden.js";
|
|
8
|
+
import tryDeleteDriveItem from "../../tasks/tryDeleteDriveItem.js";
|
|
9
|
+
import calculateWorkbook from "../workbook/calculateWorkbook.js";
|
|
10
|
+
import createWorkbook from "../workbook/createWorkbook.js";
|
|
11
|
+
import updateWorkbookRange from "../workbookRange/updateWorkbookRange.js";
|
|
12
|
+
import getWorkbookWorksheetUsedVisibleRange from "./getWorkbookWorksheetUsedVisibleRange.js";
|
|
13
|
+
describe("getWorkbookWorksheetUsedVisibleRange", () => {
|
|
14
|
+
it("can retrieve the used visible range from an existing workbook", async () => {
|
|
15
|
+
const workbookName = generateTempFileName("xlsx");
|
|
16
|
+
const workbookPath = driveItemPath(workbookName);
|
|
17
|
+
const driveRef = getDefaultDriveRef();
|
|
18
|
+
const workbook = await createWorkbook(driveRef, workbookPath);
|
|
19
|
+
const worksheetRef = createWorkbookWorksheetRef(workbook, defaultWorkbookWorksheetId);
|
|
20
|
+
const rangeRef = createWorkbookRangeRef(worksheetRef, "A1:B2");
|
|
21
|
+
try {
|
|
22
|
+
await updateWorkbookRange(rangeRef, {
|
|
23
|
+
values: [
|
|
24
|
+
[1, 2],
|
|
25
|
+
[3, 4],
|
|
26
|
+
],
|
|
27
|
+
});
|
|
28
|
+
await setRowHidden(createWorkbookRangeRef(worksheetRef, "1:1"), true);
|
|
29
|
+
await calculateWorkbook(workbook);
|
|
30
|
+
const usedRange = await getWorkbookWorksheetUsedVisibleRange(worksheetRef);
|
|
31
|
+
expect(usedRange.values).toEqual([[3, 4]]);
|
|
32
|
+
}
|
|
33
|
+
finally {
|
|
34
|
+
await tryDeleteDriveItem(workbook);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
});
|
|
@@ -2,6 +2,12 @@ import type { WorkbookWorksheet } from "@microsoft/microsoft-graph-types";
|
|
|
2
2
|
import type { GraphOperation } from "../../models/GraphOperation.ts";
|
|
3
3
|
import type { WorkbookRef } from "../../models/WorkbookRef.ts";
|
|
4
4
|
import type { WorkbookWorksheetRef } from "../../models/WorkbookWorksheetRef.ts";
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Retrieve a list of worksheets in a workbook.
|
|
7
|
+
*
|
|
8
|
+
* @param workbookRef - A reference to the workbook, optionally including session information.
|
|
9
|
+
* @returns An array of worksheets, each including its metadata and reference information.
|
|
10
|
+
* @see https://learn.microsoft.com/en-us/graph/api/worksheet-list
|
|
11
|
+
*/
|
|
6
12
|
export default function listWorkbookWorksheets(workbookRef: WorkbookRef): GraphOperation<(WorkbookWorksheet & WorkbookWorksheetRef)[]>;
|
|
7
13
|
//# sourceMappingURL=listWorkbookWorksheets.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listWorkbookWorksheets.d.ts","sourceRoot":"","sources":["../../../src/operations/workbookWorksheet/listWorkbookWorksheets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAG1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAIjF
|
|
1
|
+
{"version":3,"file":"listWorkbookWorksheets.d.ts","sourceRoot":"","sources":["../../../src/operations/workbookWorksheet/listWorkbookWorksheets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAG1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAIjF;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,WAAW,EAAE,WAAW,GAAG,cAAc,CAAC,CAAC,iBAAiB,GAAG,oBAAoB,CAAC,EAAE,CAAC,CA0BrI"}
|
|
@@ -2,7 +2,13 @@ import ProtocolError from "../../errors/ProtocolError.js";
|
|
|
2
2
|
import { operation } from "../../graphApi.js";
|
|
3
3
|
import { generatePath } from "../../services/templatedPaths.js";
|
|
4
4
|
import { createWorkbookWorksheetRef } from "../../services/workbookWorksheet.js";
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Retrieve a list of worksheets in a workbook.
|
|
7
|
+
*
|
|
8
|
+
* @param workbookRef - A reference to the workbook, optionally including session information.
|
|
9
|
+
* @returns An array of worksheets, each including its metadata and reference information.
|
|
10
|
+
* @see https://learn.microsoft.com/en-us/graph/api/worksheet-list
|
|
11
|
+
*/
|
|
6
12
|
export default function listWorkbookWorksheets(workbookRef) {
|
|
7
13
|
return operation({
|
|
8
14
|
contextId: workbookRef.contextId,
|
|
@@ -3,7 +3,7 @@ import { sequential } from "../../graphApi.js";
|
|
|
3
3
|
import { getDefaultDriveRef } from "../../services/drive.js";
|
|
4
4
|
import { driveItemPath } from "../../services/driveItem.js";
|
|
5
5
|
import { generateTempFileName } from "../../services/temporaryFiles.js";
|
|
6
|
-
import
|
|
6
|
+
import tryDeleteDriveItem from "../../tasks/tryDeleteDriveItem.js";
|
|
7
7
|
import calculateWorkbook from "../workbook/calculateWorkbook.js";
|
|
8
8
|
import createWorkbook from "../workbook/createWorkbook.js";
|
|
9
9
|
import createWorkbookWorksheet from "./createWorkbookWorksheet.js";
|
|
@@ -24,7 +24,7 @@ describe("listWorkbookWorksheets", () => {
|
|
|
24
24
|
expect(worksheetIds).toContain(worksheet2.worksheetId);
|
|
25
25
|
}
|
|
26
26
|
finally {
|
|
27
|
-
await
|
|
27
|
+
await tryDeleteDriveItem(workbook);
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
it("can list worksheets in an existing workbook parallel", async () => {
|
|
@@ -39,7 +39,7 @@ describe("listWorkbookWorksheets", () => {
|
|
|
39
39
|
expect(worksheetIds).toContain(worksheet2.worksheetId);
|
|
40
40
|
}
|
|
41
41
|
finally {
|
|
42
|
-
await
|
|
42
|
+
await tryDeleteDriveItem(workbook);
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
});
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import type { WorkbookWorksheet } from "@microsoft/microsoft-graph-types";
|
|
2
2
|
import type { GraphOperation } from "../../models/GraphOperation.ts";
|
|
3
3
|
import type { WorkbookWorksheetRef } from "../../models/WorkbookWorksheetRef.ts";
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Update the name, position, and/or visibility of a worksheet.
|
|
6
|
+
*
|
|
7
|
+
* @param worksheetRef - A reference to the worksheet to be updated, optionally including session information.
|
|
8
|
+
* @param updates - An object containing the properties to update:
|
|
9
|
+
* - `name` (optional): The new name for the worksheet.
|
|
10
|
+
* - `position` (optional): The new position of the worksheet in the workbook.
|
|
11
|
+
* - `visibility` (optional): The visibility state of the worksheet. Can be "Visible", "Hidden", or "VeryHidden".
|
|
12
|
+
* @returns The updated worksheet, including its reference information.
|
|
13
|
+
* @see https://learn.microsoft.com/en-us/graph/api/worksheet-update
|
|
14
|
+
*/
|
|
5
15
|
export default function updateWorkbookWorksheet(worksheetRef: WorkbookWorksheetRef, updates: {
|
|
6
16
|
name?: string;
|
|
7
17
|
position?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateWorkbookWorksheet.d.ts","sourceRoot":"","sources":["../../../src/operations/workbookWorksheet/updateWorkbookWorksheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAGjF
|
|
1
|
+
{"version":3,"file":"updateWorkbookWorksheet.d.ts","sourceRoot":"","sources":["../../../src/operations/workbookWorksheet/updateWorkbookWorksheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAGjF;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,YAAY,EAAE,oBAAoB,EAAE,OAAO,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,YAAY,CAAA;CAAE,GAAG,cAAc,CAAC,iBAAiB,GAAG,oBAAoB,CAAC,CAkB7O"}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { operation } from "../../graphApi.js";
|
|
2
2
|
import { generatePath } from "../../services/templatedPaths.js";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Update the name, position, and/or visibility of a worksheet.
|
|
5
|
+
*
|
|
6
|
+
* @param worksheetRef - A reference to the worksheet to be updated, optionally including session information.
|
|
7
|
+
* @param updates - An object containing the properties to update:
|
|
8
|
+
* - `name` (optional): The new name for the worksheet.
|
|
9
|
+
* - `position` (optional): The new position of the worksheet in the workbook.
|
|
10
|
+
* - `visibility` (optional): The visibility state of the worksheet. Can be "Visible", "Hidden", or "VeryHidden".
|
|
11
|
+
* @returns The updated worksheet, including its reference information.
|
|
12
|
+
* @see https://learn.microsoft.com/en-us/graph/api/worksheet-update
|
|
13
|
+
*/
|
|
4
14
|
export default function updateWorkbookWorksheet(worksheetRef, updates) {
|
|
5
15
|
return operation({
|
|
6
16
|
contextId: worksheetRef.contextId,
|
|
@@ -3,8 +3,8 @@ import { getDefaultDriveRef } from "../../services/drive.js";
|
|
|
3
3
|
import { driveItemPath } from "../../services/driveItem.js";
|
|
4
4
|
import { generateTempFileName } from "../../services/temporaryFiles.js";
|
|
5
5
|
import { createDefaultWorkbookWorksheetRef } from "../../services/workbookWorksheet.js";
|
|
6
|
-
import deleteDriveItemWithRetry from "../../tasks/deleteDriveItemWithRetry.js";
|
|
7
6
|
import getWorkbookWorksheetByName from "../../tasks/getWorkbookWorksheetByName.js";
|
|
7
|
+
import tryDeleteDriveItem from "../../tasks/tryDeleteDriveItem.js";
|
|
8
8
|
import calculateWorkbook from "../workbook/calculateWorkbook.js";
|
|
9
9
|
import createWorkbook from "../workbook/createWorkbook.js";
|
|
10
10
|
import createWorkbookWorksheet from "./createWorkbookWorksheet.js";
|
|
@@ -23,7 +23,7 @@ describe("updateWorkbookWorksheet", () => {
|
|
|
23
23
|
expect(updatedWorksheet.name).toBe(newName);
|
|
24
24
|
}
|
|
25
25
|
finally {
|
|
26
|
-
await
|
|
26
|
+
await tryDeleteDriveItem(workbook);
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
it("can update the visibility of an existing worksheet", async () => {
|
|
@@ -38,7 +38,7 @@ describe("updateWorkbookWorksheet", () => {
|
|
|
38
38
|
expect(updatedWorksheet.visibility).toBe("Hidden");
|
|
39
39
|
}
|
|
40
40
|
finally {
|
|
41
|
-
await
|
|
41
|
+
await tryDeleteDriveItem(workbook);
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
});
|
|
@@ -3,6 +3,14 @@ import type { ClientId } from "../models/ClientId.ts";
|
|
|
3
3
|
import type { ClientSecret } from "../models/ClientSecret.ts";
|
|
4
4
|
import type { Scope } from "../models/Scope.ts";
|
|
5
5
|
import type { TenantId } from "../models/TenantId.ts";
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* Retrieves the current access token for a given client and scope.
|
|
8
|
+
* If a valid token is cached, it will be returned; otherwise, a new token will be requested.
|
|
9
|
+
* @param tenantId - The tenant ID.
|
|
10
|
+
* @param clientId - The client ID.
|
|
11
|
+
* @param clientSecret - The client secret.
|
|
12
|
+
* @param scope - The scope for which the token is requested.
|
|
13
|
+
* @returns A promise that resolves to the access token.
|
|
14
|
+
*/
|
|
7
15
|
export declare function getCurrentAccessToken(tenantId: TenantId, clientId: ClientId, clientSecret: ClientSecret, scope: Scope): Promise<AccessToken>;
|
|
8
16
|
//# sourceMappingURL=accessToken.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accessToken.d.ts","sourceRoot":"","sources":["../../src/services/accessToken.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAItD
|
|
1
|
+
{"version":3,"file":"accessToken.d.ts","sourceRoot":"","sources":["../../src/services/accessToken.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAItD;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,WAAW,CAAC,CAWlJ"}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { ClientSecretCredential } from "@azure/identity";
|
|
2
2
|
const innerTokenCache = {};
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves the current access token for a given client and scope.
|
|
5
|
+
* If a valid token is cached, it will be returned; otherwise, a new token will be requested.
|
|
6
|
+
* @param tenantId - The tenant ID.
|
|
7
|
+
* @param clientId - The client ID.
|
|
8
|
+
* @param clientSecret - The client secret.
|
|
9
|
+
* @param scope - The scope for which the token is requested.
|
|
10
|
+
* @returns A promise that resolves to the access token.
|
|
11
|
+
*/
|
|
4
12
|
export async function getCurrentAccessToken(tenantId, clientId, clientSecret, scope) {
|
|
5
13
|
const cacheKey = createCacheKey(tenantId, clientId, scope);
|
|
6
14
|
let innerToken = innerTokenCache[cacheKey];
|
|
@@ -5,16 +5,83 @@ export type AddressComponents = {
|
|
|
5
5
|
startRow: RowAddress;
|
|
6
6
|
endRow: RowAddress;
|
|
7
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* Decomposes an address into its components (start and end columns/rows).
|
|
10
|
+
* @param address - The address to decompose.
|
|
11
|
+
* @returns The decomposed address components.
|
|
12
|
+
* @throws InvalidArgumentError if the address format is invalid.
|
|
13
|
+
*/
|
|
8
14
|
export declare function decomposeAddress(address: Address): AddressComponents;
|
|
15
|
+
/**
|
|
16
|
+
* Composes an address from its components.
|
|
17
|
+
* @param components - The address components.
|
|
18
|
+
* @returns The composed address.
|
|
19
|
+
* @throws InvalidArgumentError if the components are invalid.
|
|
20
|
+
*/
|
|
9
21
|
export declare function composeAddress(components: AddressComponents): Address;
|
|
22
|
+
/**
|
|
23
|
+
* Gets the first cell address from a given address.
|
|
24
|
+
* @param address - The address to analyze.
|
|
25
|
+
* @returns The first cell address.
|
|
26
|
+
*/
|
|
10
27
|
export declare function getFirstCellAddress(address: Address): CellAddress;
|
|
28
|
+
/**
|
|
29
|
+
* Gets the last cell address from a given address.
|
|
30
|
+
* @param address - The address to analyze.
|
|
31
|
+
* @returns The last cell address.
|
|
32
|
+
*/
|
|
11
33
|
export declare function getLastCellAddress(address: Address): CellAddress;
|
|
34
|
+
/**
|
|
35
|
+
* Gets the first row address from a given address.
|
|
36
|
+
* @param address - The address to analyze.
|
|
37
|
+
* @returns The first row address.
|
|
38
|
+
*/
|
|
12
39
|
export declare function getFirstRowAddress(address: Address): Address;
|
|
40
|
+
/**
|
|
41
|
+
* Gets the last row address from a given address.
|
|
42
|
+
* @param address - The address to analyze.
|
|
43
|
+
* @returns The last row address.
|
|
44
|
+
*/
|
|
13
45
|
export declare function getLastRowAddress(address: Address): Address;
|
|
46
|
+
/**
|
|
47
|
+
* Gets the first column address from a given address.
|
|
48
|
+
* @param address - The address to analyze.
|
|
49
|
+
* @returns The first column address.
|
|
50
|
+
*/
|
|
14
51
|
export declare function getFirstColumnAddress(address: Address): Address;
|
|
52
|
+
/**
|
|
53
|
+
* Gets the last column address from a given address.
|
|
54
|
+
* @param address - The address to analyze.
|
|
55
|
+
* @returns The last column address.
|
|
56
|
+
*/
|
|
15
57
|
export declare function getLastColumnAddress(address: Address): Address;
|
|
58
|
+
/**
|
|
59
|
+
* Offsets an address by the specified column and row offsets.
|
|
60
|
+
* @param address - The address to offset.
|
|
61
|
+
* @param columnOffset - The column offset.
|
|
62
|
+
* @param rowOffset - The row offset.
|
|
63
|
+
* @returns The offset address.
|
|
64
|
+
* @throws UnsupportedAddressTypeError if the address cannot be offset.
|
|
65
|
+
* @throws InvalidArgumentError if the offset is out of bounds.
|
|
66
|
+
*/
|
|
16
67
|
export declare function offsetAddress(address: Address, columnOffset: number, rowOffset: number): Address;
|
|
68
|
+
/**
|
|
69
|
+
* Increments the row address by one.
|
|
70
|
+
* @param address - The address to increment.
|
|
71
|
+
* @returns The incremented address.
|
|
72
|
+
*/
|
|
17
73
|
export declare function incrementRowAddress(address: Address): Address;
|
|
74
|
+
/**
|
|
75
|
+
* Decrements the row address by one.
|
|
76
|
+
* @param address - The address to decrement.
|
|
77
|
+
* @returns The decremented address.
|
|
78
|
+
*/
|
|
18
79
|
export declare function decrementRowAddress(address: Address): Address;
|
|
80
|
+
/**
|
|
81
|
+
* Checks if two addresses overlap.
|
|
82
|
+
* @param address1 - The first address.
|
|
83
|
+
* @param address2 - The second address.
|
|
84
|
+
* @returns True if the addresses overlap, otherwise false.
|
|
85
|
+
*/
|
|
19
86
|
export declare function isAddressOverlapping(address1: Address, address2: Address): boolean;
|
|
20
87
|
//# sourceMappingURL=addressManipulation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addressManipulation.d.ts","sourceRoot":"","sources":["../../src/services/addressManipulation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAoB,aAAa,EAAsB,UAAU,EAAmB,MAAM,sBAAsB,CAAC;AAmBnJ,MAAM,MAAM,iBAAiB,GAAG;IAC/B,WAAW,EAAE,aAAa,CAAC;IAC3B,SAAS,EAAE,aAAa,CAAC;IACzB,QAAQ,EAAE,UAAU,CAAC;IACrB,MAAM,EAAE,UAAU,CAAC;CACnB,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,iBAAiB,CAcpE;AAED,wBAAgB,cAAc,CAAC,UAAU,EAAE,iBAAiB,GAAG,OAAO,CA6BrE;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,CAGjE;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,CAGhE;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAS5D;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAS3D;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAS/D;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAS9D;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAqChG;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAE7D;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAE7D;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAKlF"}
|
|
1
|
+
{"version":3,"file":"addressManipulation.d.ts","sourceRoot":"","sources":["../../src/services/addressManipulation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAoB,aAAa,EAAsB,UAAU,EAAmB,MAAM,sBAAsB,CAAC;AAmBnJ,MAAM,MAAM,iBAAiB,GAAG;IAC/B,WAAW,EAAE,aAAa,CAAC;IAC3B,SAAS,EAAE,aAAa,CAAC;IACzB,QAAQ,EAAE,UAAU,CAAC;IACrB,MAAM,EAAE,UAAU,CAAC;CACnB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,iBAAiB,CAcpE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,iBAAiB,GAAG,OAAO,CA6BrE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,CAGjE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,CAGhE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAS5D;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAS3D;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAS/D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAS9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAqChG;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAE7D;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAKlF"}
|
|
@@ -6,6 +6,12 @@ const lastColumn = "XFD";
|
|
|
6
6
|
const firstRow = "1";
|
|
7
7
|
const lastRow = "1048576";
|
|
8
8
|
const addressPattern = /^(?<sheet>[A-Za-z0-9_]+!)?(?:(?<startColumn>[A-Z]+)?(?<startRow>\d+)?(?::(?<endColumn>[A-Z]+)?(?<endRow>\d+)?)?)$/;
|
|
9
|
+
/**
|
|
10
|
+
* Decomposes an address into its components (start and end columns/rows).
|
|
11
|
+
* @param address - The address to decompose.
|
|
12
|
+
* @returns The decomposed address components.
|
|
13
|
+
* @throws InvalidArgumentError if the address format is invalid.
|
|
14
|
+
*/
|
|
9
15
|
export function decomposeAddress(address) {
|
|
10
16
|
const match = address.match(addressPattern);
|
|
11
17
|
if (!match?.groups) {
|
|
@@ -19,6 +25,12 @@ export function decomposeAddress(address) {
|
|
|
19
25
|
endRow: groups.endRow ?? groups.startRow ?? lastRow,
|
|
20
26
|
};
|
|
21
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Composes an address from its components.
|
|
30
|
+
* @param components - The address components.
|
|
31
|
+
* @returns The composed address.
|
|
32
|
+
* @throws InvalidArgumentError if the components are invalid.
|
|
33
|
+
*/
|
|
22
34
|
export function composeAddress(components) {
|
|
23
35
|
if (isSingleColumn(components) && isMaxRows(components)) {
|
|
24
36
|
return composeColumnAddress(components.startColumn);
|
|
@@ -43,14 +55,29 @@ export function composeAddress(components) {
|
|
|
43
55
|
}
|
|
44
56
|
return composeCellRangeAddress(components.startColumn, components.startRow, components.endColumn, components.endRow);
|
|
45
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Gets the first cell address from a given address.
|
|
60
|
+
* @param address - The address to analyze.
|
|
61
|
+
* @returns The first cell address.
|
|
62
|
+
*/
|
|
46
63
|
export function getFirstCellAddress(address) {
|
|
47
64
|
const components = decomposeAddress(address);
|
|
48
65
|
return composeCellAddress(components.startColumn, components.startRow);
|
|
49
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Gets the last cell address from a given address.
|
|
69
|
+
* @param address - The address to analyze.
|
|
70
|
+
* @returns The last cell address.
|
|
71
|
+
*/
|
|
50
72
|
export function getLastCellAddress(address) {
|
|
51
73
|
const components = decomposeAddress(address);
|
|
52
74
|
return composeCellAddress(components.endColumn, components.endRow);
|
|
53
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Gets the first row address from a given address.
|
|
78
|
+
* @param address - The address to analyze.
|
|
79
|
+
* @returns The first row address.
|
|
80
|
+
*/
|
|
54
81
|
export function getFirstRowAddress(address) {
|
|
55
82
|
const components = decomposeAddress(address);
|
|
56
83
|
return composeAddress({
|
|
@@ -60,6 +87,11 @@ export function getFirstRowAddress(address) {
|
|
|
60
87
|
endRow: components.startRow,
|
|
61
88
|
});
|
|
62
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* Gets the last row address from a given address.
|
|
92
|
+
* @param address - The address to analyze.
|
|
93
|
+
* @returns The last row address.
|
|
94
|
+
*/
|
|
63
95
|
export function getLastRowAddress(address) {
|
|
64
96
|
const components = decomposeAddress(address);
|
|
65
97
|
return composeAddress({
|
|
@@ -69,6 +101,11 @@ export function getLastRowAddress(address) {
|
|
|
69
101
|
endRow: components.endRow,
|
|
70
102
|
});
|
|
71
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* Gets the first column address from a given address.
|
|
106
|
+
* @param address - The address to analyze.
|
|
107
|
+
* @returns The first column address.
|
|
108
|
+
*/
|
|
72
109
|
export function getFirstColumnAddress(address) {
|
|
73
110
|
const components = decomposeAddress(address);
|
|
74
111
|
return composeAddress({
|
|
@@ -78,6 +115,11 @@ export function getFirstColumnAddress(address) {
|
|
|
78
115
|
endRow: components.endRow,
|
|
79
116
|
});
|
|
80
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Gets the last column address from a given address.
|
|
120
|
+
* @param address - The address to analyze.
|
|
121
|
+
* @returns The last column address.
|
|
122
|
+
*/
|
|
81
123
|
export function getLastColumnAddress(address) {
|
|
82
124
|
const components = decomposeAddress(address);
|
|
83
125
|
return composeAddress({
|
|
@@ -87,6 +129,15 @@ export function getLastColumnAddress(address) {
|
|
|
87
129
|
endRow: components.endRow,
|
|
88
130
|
});
|
|
89
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* Offsets an address by the specified column and row offsets.
|
|
134
|
+
* @param address - The address to offset.
|
|
135
|
+
* @param columnOffset - The column offset.
|
|
136
|
+
* @param rowOffset - The row offset.
|
|
137
|
+
* @returns The offset address.
|
|
138
|
+
* @throws UnsupportedAddressTypeError if the address cannot be offset.
|
|
139
|
+
* @throws InvalidArgumentError if the offset is out of bounds.
|
|
140
|
+
*/
|
|
90
141
|
export function offsetAddress(address, columnOffset, rowOffset) {
|
|
91
142
|
const components = decomposeAddress(address);
|
|
92
143
|
if (isMaxRows(components) && rowOffset !== 0) {
|
|
@@ -116,12 +167,28 @@ export function offsetAddress(address, columnOffset, rowOffset) {
|
|
|
116
167
|
endRow: newEndRow,
|
|
117
168
|
});
|
|
118
169
|
}
|
|
170
|
+
/**
|
|
171
|
+
* Increments the row address by one.
|
|
172
|
+
* @param address - The address to increment.
|
|
173
|
+
* @returns The incremented address.
|
|
174
|
+
*/
|
|
119
175
|
export function incrementRowAddress(address) {
|
|
120
176
|
return offsetAddress(address, 0, +1);
|
|
121
177
|
}
|
|
178
|
+
/**
|
|
179
|
+
* Decrements the row address by one.
|
|
180
|
+
* @param address - The address to decrement.
|
|
181
|
+
* @returns The decremented address.
|
|
182
|
+
*/
|
|
122
183
|
export function decrementRowAddress(address) {
|
|
123
184
|
return offsetAddress(address, 0, -1);
|
|
124
185
|
}
|
|
186
|
+
/**
|
|
187
|
+
* Checks if two addresses overlap.
|
|
188
|
+
* @param address1 - The first address.
|
|
189
|
+
* @param address2 - The second address.
|
|
190
|
+
* @returns True if the addresses overlap, otherwise false.
|
|
191
|
+
*/
|
|
125
192
|
export function isAddressOverlapping(address1, address2) {
|
|
126
193
|
const components1 = decomposeAddress(address1);
|
|
127
194
|
const components2 = decomposeAddress(address2);
|
|
@@ -1,8 +1,28 @@
|
|
|
1
1
|
import type { ColumnAddress, RowAddress } from "../models/Address.ts";
|
|
2
2
|
import type { ColumnOffset } from "../models/ColumnOffset.ts";
|
|
3
3
|
import type { RowOffset } from "../models/RowOffset.ts";
|
|
4
|
+
/**
|
|
5
|
+
* Converts a column address (e.g., "A") to a zero-based column offset.
|
|
6
|
+
* @param column - The column address.
|
|
7
|
+
* @returns The zero-based column offset.
|
|
8
|
+
*/
|
|
4
9
|
export declare function columnAddressToOffset(column: ColumnAddress): ColumnOffset;
|
|
10
|
+
/**
|
|
11
|
+
* Converts a zero-based column offset to a column address (e.g., "A").
|
|
12
|
+
* @param offset - The zero-based column offset.
|
|
13
|
+
* @returns The column address.
|
|
14
|
+
*/
|
|
5
15
|
export declare function offsetToColumnAddress(offset: ColumnOffset): ColumnAddress;
|
|
16
|
+
/**
|
|
17
|
+
* Converts a row address (e.g., "1") to a zero-based row offset.
|
|
18
|
+
* @param row - The row address.
|
|
19
|
+
* @returns The zero-based row offset.
|
|
20
|
+
*/
|
|
6
21
|
export declare function rowAddressToOffset(row: RowAddress): RowOffset;
|
|
22
|
+
/**
|
|
23
|
+
* Converts a zero-based row offset to a row address (e.g., "1").
|
|
24
|
+
* @param offset - The zero-based row offset.
|
|
25
|
+
* @returns The row address.
|
|
26
|
+
*/
|
|
7
27
|
export declare function offsetToRowAddress(offset: RowOffset): RowAddress;
|
|
8
28
|
//# sourceMappingURL=addressOffset.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addressOffset.d.ts","sourceRoot":"","sources":["../../src/services/addressOffset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,aAAa,GAAG,YAAY,CAMzE;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,YAAY,GAAG,aAAa,CASzE;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,UAAU,GAAG,SAAS,CAE7D;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,GAAG,UAAU,CAEhE"}
|
|
1
|
+
{"version":3,"file":"addressOffset.d.ts","sourceRoot":"","sources":["../../src/services/addressOffset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,aAAa,GAAG,YAAY,CAMzE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,YAAY,GAAG,aAAa,CASzE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,UAAU,GAAG,SAAS,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,GAAG,UAAU,CAEhE"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a column address (e.g., "A") to a zero-based column offset.
|
|
3
|
+
* @param column - The column address.
|
|
4
|
+
* @returns The zero-based column offset.
|
|
5
|
+
*/
|
|
1
6
|
export function columnAddressToOffset(column) {
|
|
2
7
|
let offset = 0;
|
|
3
8
|
for (let i = 0; i < column.length; i++) {
|
|
@@ -5,6 +10,11 @@ export function columnAddressToOffset(column) {
|
|
|
5
10
|
}
|
|
6
11
|
return (offset - 1);
|
|
7
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Converts a zero-based column offset to a column address (e.g., "A").
|
|
15
|
+
* @param offset - The zero-based column offset.
|
|
16
|
+
* @returns The column address.
|
|
17
|
+
*/
|
|
8
18
|
export function offsetToColumnAddress(offset) {
|
|
9
19
|
let result = "";
|
|
10
20
|
let currentOffset = offset + 1;
|
|
@@ -15,9 +25,19 @@ export function offsetToColumnAddress(offset) {
|
|
|
15
25
|
}
|
|
16
26
|
return result;
|
|
17
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Converts a row address (e.g., "1") to a zero-based row offset.
|
|
30
|
+
* @param row - The row address.
|
|
31
|
+
* @returns The zero-based row offset.
|
|
32
|
+
*/
|
|
18
33
|
export function rowAddressToOffset(row) {
|
|
19
34
|
return (Number.parseInt(row, 10) - 1);
|
|
20
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Converts a zero-based row offset to a row address (e.g., "1").
|
|
38
|
+
* @param offset - The zero-based row offset.
|
|
39
|
+
* @returns The row address.
|
|
40
|
+
*/
|
|
21
41
|
export function offsetToRowAddress(offset) {
|
|
22
42
|
return (offset + 1).toString();
|
|
23
43
|
}
|
|
@@ -5,9 +5,26 @@ import type { ContextId } from "../models/ContextId.ts";
|
|
|
5
5
|
import type { ContextRef } from "../models/ContextRef.ts";
|
|
6
6
|
import type { HttpProxy } from "../models/HttpProxy.ts";
|
|
7
7
|
import type { TenantId } from "../models/TenantId.ts";
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* Registers a tenant+client so that its secret can be used later.
|
|
10
|
+
* @param tenantId - The tenant ID.
|
|
11
|
+
* @param clientId - The client ID.
|
|
12
|
+
* @param clientSecret - The client secret.
|
|
13
|
+
* @param httpProxy - Optional HTTP proxy configuration.
|
|
14
|
+
* @returns A reference to the registered context.
|
|
15
|
+
*/
|
|
9
16
|
export declare function register(tenantId: TenantId, clientId: ClientId, clientSecret: ClientSecret, httpProxy?: HttpProxy | undefined): ContextRef;
|
|
17
|
+
/**
|
|
18
|
+
* Retrieves the context for a given context ID.
|
|
19
|
+
* @param contextId - The ID of the context.
|
|
20
|
+
* @returns The context associated with the given ID.
|
|
21
|
+
* @throws ContextNotRegisteredError if the context ID is not registered.
|
|
22
|
+
*/
|
|
10
23
|
export declare function getContext(contextId: ContextId): Context;
|
|
11
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Retrieves the opinionated default context reference. NOT RECOMMENDED FOR PRODUCTION USE.
|
|
26
|
+
* @returns A reference to the default context.
|
|
27
|
+
* @remarks This method is opinionated and not recommended for production use.
|
|
28
|
+
*/
|
|
12
29
|
export declare function getDefaultContextRef(): ContextRef;
|
|
13
30
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/services/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAMtD
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/services/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAMtD;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,CAe1I;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAMxD;AAYD;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,UAAU,CASjD"}
|