microsoft-graph 2.20.1 → 2.20.3

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.
@@ -1,13 +1,14 @@
1
1
  import type { Workbook } from "@microsoft/microsoft-graph-types";
2
2
  import type { DriveItemPath } from "../models/DriveItemPath.ts";
3
+ import type { DriveItemRef } from "../models/DriveItemRef.ts";
3
4
  import type { DriveRef } from "../models/DriveRef.ts";
4
5
  import type { WorkbookRef } from "../models/WorkbookRef.ts";
5
6
  /**
6
7
  * Create a new workbook and open a session for that workbook in a single operation.
7
8
  *
8
- * @param driveRef - A reference to the drive where the workbook will be created.
9
+ * @param parentRef - A reference to the drive or driveItem where the workbook will be created.
9
10
  * @param itemPath - The path of the new workbook within the drive.
10
11
  * @returns The created workbook and session details.
11
12
  */
12
- export default function createWorkbookAndStartSession(driveRef: DriveRef, itemPath: DriveItemPath): Promise<Workbook & WorkbookRef>;
13
+ export default function createWorkbookAndStartSession(parentRef: DriveRef | DriveItemRef, itemPath: DriveItemPath): Promise<Workbook & WorkbookRef>;
13
14
  //# sourceMappingURL=createWorkbookAndStartSession.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createWorkbookAndStartSession.d.ts","sourceRoot":"","sources":["../../../src/tasks/createWorkbookAndStartSession.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAI5D;;;;;;GAMG;AACH,wBAA8B,6BAA6B,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,QAAQ,GAAG,WAAW,CAAC,CAQxI"}
1
+ {"version":3,"file":"createWorkbookAndStartSession.d.ts","sourceRoot":"","sources":["../../../src/tasks/createWorkbookAndStartSession.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAI5D;;;;;;GAMG;AACH,wBAA8B,6BAA6B,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,QAAQ,GAAG,WAAW,CAAC,CAQxJ"}
@@ -9,12 +9,12 @@ const createWorkbookSession_ts_1 = __importDefault(require("../operations/workbo
9
9
  /**
10
10
  * Create a new workbook and open a session for that workbook in a single operation.
11
11
  *
12
- * @param driveRef - A reference to the drive where the workbook will be created.
12
+ * @param parentRef - A reference to the drive or driveItem where the workbook will be created.
13
13
  * @param itemPath - The path of the new workbook within the drive.
14
14
  * @returns The created workbook and session details.
15
15
  */
16
- async function createWorkbookAndStartSession(driveRef, itemPath) {
17
- const workbook = await (0, createWorkbook_ts_1.default)(driveRef, itemPath);
16
+ async function createWorkbookAndStartSession(parentRef, itemPath) {
17
+ const workbook = await (0, createWorkbook_ts_1.default)(parentRef, itemPath);
18
18
  const workbookRef = await (0, createWorkbookSession_ts_1.default)(workbook);
19
19
  return {
20
20
  ...workbook,
@@ -1 +1 @@
1
- {"version":3,"file":"writeWorkbookRows.d.ts","sourceRoot":"","sources":["../../../src/tasks/writeWorkbookRows.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAMtE;;;;;GAKG;AACH,wBAA8B,iBAAiB,CAAC,SAAS,EAAE,gBAAgB,EAAE,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,gCAAgC,GAAE,MAAM,GAAG,IAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAuBpN"}
1
+ {"version":3,"file":"writeWorkbookRows.d.ts","sourceRoot":"","sources":["../../../src/tasks/writeWorkbookRows.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAG9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAMtE;;;;;GAKG;AACH,wBAA8B,iBAAiB,CAAC,SAAS,EAAE,gBAAgB,EAAE,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,gCAAgC,GAAE,MAAM,GAAG,IAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAuBpN"}
@@ -37,16 +37,17 @@ async function writeWorkbookRows(originRef, rows, overrideMaxRowsPerUnderlyingRe
37
37
  await flushBatch(batch, originRef, rowsCompleted);
38
38
  }
39
39
  async function flushBatch(batch, originRef, rowsCompleted) {
40
- if (batch.length === 0) {
40
+ const first = batch[0];
41
+ if (!first) {
41
42
  return 0;
42
43
  }
43
- const { ay, ax, bx } = (0, cartesianAddress_ts_1.addressToCartesian)(originRef.address);
44
+ const { ay, ax } = (0, cartesianAddress_ts_1.addressToCartesian)(originRef.address);
44
45
  const count = batch.length;
45
46
  const address = (0, cartesianAddress_ts_1.cartesianToAddress)({
46
- ay: (rowsCompleted + ay),
47
- by: (rowsCompleted + ay + count - 1),
47
+ ay: (ay + rowsCompleted),
48
+ by: (ay + rowsCompleted + count - 1),
48
49
  ax,
49
- bx,
50
+ bx: (ax + first.length - 1),
50
51
  });
51
52
  const rangeRef = (0, workbookRange_ts_1.createWorkbookRangeRef)(originRef, address);
52
53
  await (0, updateWorkbookRange_ts_1.default)(rangeRef, {
@@ -1,13 +1,14 @@
1
1
  import type { Workbook } from "@microsoft/microsoft-graph-types";
2
2
  import type { DriveItemPath } from "../models/DriveItemPath.ts";
3
+ import type { DriveItemRef } from "../models/DriveItemRef.ts";
3
4
  import type { DriveRef } from "../models/DriveRef.ts";
4
5
  import type { WorkbookRef } from "../models/WorkbookRef.ts";
5
6
  /**
6
7
  * Create a new workbook and open a session for that workbook in a single operation.
7
8
  *
8
- * @param driveRef - A reference to the drive where the workbook will be created.
9
+ * @param parentRef - A reference to the drive or driveItem where the workbook will be created.
9
10
  * @param itemPath - The path of the new workbook within the drive.
10
11
  * @returns The created workbook and session details.
11
12
  */
12
- export default function createWorkbookAndStartSession(driveRef: DriveRef, itemPath: DriveItemPath): Promise<Workbook & WorkbookRef>;
13
+ export default function createWorkbookAndStartSession(parentRef: DriveRef | DriveItemRef, itemPath: DriveItemPath): Promise<Workbook & WorkbookRef>;
13
14
  //# sourceMappingURL=createWorkbookAndStartSession.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createWorkbookAndStartSession.d.ts","sourceRoot":"","sources":["../../../src/tasks/createWorkbookAndStartSession.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAI5D;;;;;;GAMG;AACH,wBAA8B,6BAA6B,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,QAAQ,GAAG,WAAW,CAAC,CAQxI"}
1
+ {"version":3,"file":"createWorkbookAndStartSession.d.ts","sourceRoot":"","sources":["../../../src/tasks/createWorkbookAndStartSession.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAI5D;;;;;;GAMG;AACH,wBAA8B,6BAA6B,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,QAAQ,GAAG,WAAW,CAAC,CAQxJ"}
@@ -3,12 +3,12 @@ import createWorkbookSession from "../operations/workbookSession/createWorkbookS
3
3
  /**
4
4
  * Create a new workbook and open a session for that workbook in a single operation.
5
5
  *
6
- * @param driveRef - A reference to the drive where the workbook will be created.
6
+ * @param parentRef - A reference to the drive or driveItem where the workbook will be created.
7
7
  * @param itemPath - The path of the new workbook within the drive.
8
8
  * @returns The created workbook and session details.
9
9
  */
10
- export default async function createWorkbookAndStartSession(driveRef, itemPath) {
11
- const workbook = await createWorkbook(driveRef, itemPath);
10
+ export default async function createWorkbookAndStartSession(parentRef, itemPath) {
11
+ const workbook = await createWorkbook(parentRef, itemPath);
12
12
  const workbookRef = await createWorkbookSession(workbook);
13
13
  return {
14
14
  ...workbook,
@@ -1 +1 @@
1
- {"version":3,"file":"writeWorkbookRows.d.ts","sourceRoot":"","sources":["../../../src/tasks/writeWorkbookRows.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAMtE;;;;;GAKG;AACH,wBAA8B,iBAAiB,CAAC,SAAS,EAAE,gBAAgB,EAAE,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,gCAAgC,GAAE,MAAM,GAAG,IAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAuBpN"}
1
+ {"version":3,"file":"writeWorkbookRows.d.ts","sourceRoot":"","sources":["../../../src/tasks/writeWorkbookRows.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAG9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAMtE;;;;;GAKG;AACH,wBAA8B,iBAAiB,CAAC,SAAS,EAAE,gBAAgB,EAAE,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,gCAAgC,GAAE,MAAM,GAAG,IAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAuBpN"}
@@ -31,16 +31,17 @@ export default async function writeWorkbookRows(originRef, rows, overrideMaxRows
31
31
  await flushBatch(batch, originRef, rowsCompleted);
32
32
  }
33
33
  async function flushBatch(batch, originRef, rowsCompleted) {
34
- if (batch.length === 0) {
34
+ const first = batch[0];
35
+ if (!first) {
35
36
  return 0;
36
37
  }
37
- const { ay, ax, bx } = addressToCartesian(originRef.address);
38
+ const { ay, ax } = addressToCartesian(originRef.address);
38
39
  const count = batch.length;
39
40
  const address = cartesianToAddress({
40
- ay: (rowsCompleted + ay),
41
- by: (rowsCompleted + ay + count - 1),
41
+ ay: (ay + rowsCompleted),
42
+ by: (ay + rowsCompleted + count - 1),
42
43
  ax,
43
- bx,
44
+ bx: (ax + first.length - 1),
44
45
  });
45
46
  const rangeRef = createWorkbookRangeRef(originRef, address);
46
47
  await updateWorkbookRange(rangeRef, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microsoft-graph",
3
- "version": "2.20.1",
3
+ "version": "2.20.3",
4
4
  "description": "Microsoft GraphAPI SDK for NodeJS",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",