microsoft-graph 2.9.3 → 2.11.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.
Files changed (33) hide show
  1. package/dist/cjs/graphApi.js +3 -6
  2. package/dist/cjs/models/GraphOperation.d.ts +1 -1
  3. package/dist/cjs/models/GraphOperation.d.ts.map +1 -1
  4. package/dist/cjs/operations/driveItem/createDriveItem.d.ts +15 -0
  5. package/dist/cjs/operations/driveItem/createDriveItem.d.ts.map +1 -0
  6. package/dist/cjs/operations/driveItem/createDriveItem.js +34 -0
  7. package/dist/cjs/operations/driveItem/existsDriveItem.d.ts +10 -0
  8. package/dist/cjs/operations/driveItem/existsDriveItem.d.ts.map +1 -0
  9. package/dist/cjs/operations/driveItem/existsDriveItem.js +39 -0
  10. package/dist/cjs/operations/driveItem/getDriveItemContent.js +1 -1
  11. package/dist/cjs/services/httpStatus.d.ts +12 -0
  12. package/dist/cjs/services/httpStatus.d.ts.map +1 -1
  13. package/dist/cjs/services/httpStatus.js +19 -1
  14. package/dist/cjs/services/workbookWorksheet.d.ts +4 -0
  15. package/dist/cjs/services/workbookWorksheet.d.ts.map +1 -1
  16. package/dist/cjs/services/workbookWorksheet.js +4 -1
  17. package/dist/esm/graphApi.js +4 -7
  18. package/dist/esm/models/GraphOperation.d.ts +1 -1
  19. package/dist/esm/models/GraphOperation.d.ts.map +1 -1
  20. package/dist/esm/operations/driveItem/createDriveItem.d.ts +15 -0
  21. package/dist/esm/operations/driveItem/createDriveItem.d.ts.map +1 -0
  22. package/dist/esm/operations/driveItem/createDriveItem.js +31 -0
  23. package/dist/esm/operations/driveItem/existsDriveItem.d.ts +10 -0
  24. package/dist/esm/operations/driveItem/existsDriveItem.d.ts.map +1 -0
  25. package/dist/esm/operations/driveItem/existsDriveItem.js +33 -0
  26. package/dist/esm/operations/driveItem/getDriveItemContent.js +2 -2
  27. package/dist/esm/services/httpStatus.d.ts +12 -0
  28. package/dist/esm/services/httpStatus.d.ts.map +1 -1
  29. package/dist/esm/services/httpStatus.js +17 -1
  30. package/dist/esm/services/workbookWorksheet.d.ts +4 -0
  31. package/dist/esm/services/workbookWorksheet.d.ts.map +1 -1
  32. package/dist/esm/services/workbookWorksheet.js +3 -0
  33. package/package.json +21 -1
@@ -106,7 +106,7 @@ async function executeBatch(...ops) {
106
106
  if (!op) {
107
107
  throw new ProtocolError_ts_1.default("Reference to operation that was not submitted in the batch");
108
108
  }
109
- if (!(0, httpStatus_ts_1.isHttpOk)(r.status)) {
109
+ if (!(0, httpStatus_ts_1.isHttpSuccess)(r.status)) {
110
110
  const bodyError = body;
111
111
  let errorMessage = `${r.status}`;
112
112
  if (bodyError?.error) {
@@ -175,12 +175,9 @@ async function innerFetch(args) {
175
175
  }
176
176
  }
177
177
  if (!response) {
178
- throw new NeverError_ts_1.default("Response is null. Should be impossible");
178
+ throw new NeverError_ts_1.default("Response is empty.");
179
179
  }
180
- if ((0, httpStatus_ts_1.isHttpTooManyRequests)(response.status)) {
181
- RequestFailedError_ts_1.default.throw("GraphAPI fetch failed after 3 retries due to too many requests.", args);
182
- }
183
- if (!(0, httpStatus_ts_1.isHttpOk)(response.status)) {
180
+ if (!(0, httpStatus_ts_1.isHttpSuccess)(response.status)) {
184
181
  const bodyError = response.data;
185
182
  let errorMessage = `${response.status} '${response.statusText}'`;
186
183
  if (bodyError?.error) {
@@ -6,7 +6,7 @@ export type GraphPath = string & {
6
6
  };
7
7
  export type GraphHeaders = {
8
8
  "workbook-session-id"?: WorkbookSessionId | undefined;
9
- "content-type"?: "application/json" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | undefined;
9
+ "content-type"?: string | undefined;
10
10
  };
11
11
  export type GraphOperationDefinition<T> = {
12
12
  /** Context to match the operation to. Used for authentication etc. */
@@ -1 +1 @@
1
- {"version":3,"file":"GraphOperation.d.ts","sourceRoot":"","sources":["../../../src/models/GraphOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;AACtE,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AACrD,MAAM,MAAM,YAAY,GAAG;IAC1B,qBAAqB,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACtD,cAAc,CAAC,EAAE,kBAAkB,GAAG,mEAAmE,GAAG,SAAS,CAAC;CACtH,CAAC;AAGF,MAAM,MAAM,wBAAwB,CAAC,CAAC,IAAI;IACzC,sEAAsE;IACtE,SAAS,EAAE,SAAS,CAAC;IACrB,8BAA8B;IAC9B,MAAM,EAAE,WAAW,CAAC;IACpB,oJAAoJ;IACpJ,IAAI,EAAE,SAAS,CAAC;IAChB,kGAAkG;IAClG,OAAO,EAAE,YAAY,CAAC;IACtB,6LAA6L;IAC7L,IAAI,EAAE,OAAO,CAAC;IACd,wDAAwD;IACxD,iBAAiB,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,CAAC,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,GAAG;IAC5C,UAAU,EAAE,wBAAwB,CAAC,CAAC,CAAC,CAAC;CACxC,CAAC"}
1
+ {"version":3,"file":"GraphOperation.d.ts","sourceRoot":"","sources":["../../../src/models/GraphOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;AACtE,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AACrD,MAAM,MAAM,YAAY,GAAG;IAC1B,qBAAqB,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACtD,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC,CAAC;AAGF,MAAM,MAAM,wBAAwB,CAAC,CAAC,IAAI;IACzC,sEAAsE;IACtE,SAAS,EAAE,SAAS,CAAC;IACrB,8BAA8B;IAC9B,MAAM,EAAE,WAAW,CAAC;IACpB,oJAAoJ;IACpJ,IAAI,EAAE,SAAS,CAAC;IAChB,kGAAkG;IAClG,OAAO,EAAE,YAAY,CAAC;IACtB,6LAA6L;IAC7L,IAAI,EAAE,OAAO,CAAC;IACd,wDAAwD;IACxD,iBAAiB,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,CAAC,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,GAAG;IAC5C,UAAU,EAAE,wBAAwB,CAAC,CAAC,CAAC,CAAC;CACxC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { DriveItem } from "@microsoft/microsoft-graph-types";
2
+ import type { DriveItemPath } from "../../models/DriveItemPath.ts";
3
+ import type { DriveItemRef } from "../../models/DriveItemRef.ts";
4
+ import type { DriveRef } from "../../models/DriveRef.ts";
5
+ import type { GraphOperation } from "../../models/GraphOperation.ts";
6
+ /**
7
+ * Creates new drive item in the specified parent drive or folder. If the file already exists, it will be replaced.
8
+ *
9
+ * @param parentRef - A reference to the parent drive or folder where the workbook will be created.
10
+ * @param itemPath - The path (including the filename) for the new workbook.
11
+ * @returns The newly created workbook, including its metadata and reference information.
12
+ * @see https://learn.microsoft.com/en-us/graph/api/driveitem-put-content
13
+ */
14
+ export default function createDriveItem(parentRef: DriveRef | DriveItemRef, itemPath: DriveItemPath, contextType: string, content: ArrayBuffer): GraphOperation<DriveItem & DriveItemRef>;
15
+ //# sourceMappingURL=createDriveItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createDriveItem.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/createDriveItem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAGlE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAIrE;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,cAAc,CAAC,SAAS,GAAG,YAAY,CAAC,CAsBxL"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = createDriveItem;
4
+ const graphApi_ts_1 = require("../../graphApi.js");
5
+ const driveItem_ts_1 = require("../../services/driveItem.js");
6
+ const templatedPaths_ts_1 = require("../../services/templatedPaths.js");
7
+ /**
8
+ * Creates new drive item in the specified parent drive or folder. If the file already exists, it will be replaced.
9
+ *
10
+ * @param parentRef - A reference to the parent drive or folder where the workbook will be created.
11
+ * @param itemPath - The path (including the filename) for the new workbook.
12
+ * @returns The newly created workbook, including its metadata and reference information.
13
+ * @see https://learn.microsoft.com/en-us/graph/api/driveitem-put-content
14
+ */
15
+ function createDriveItem(parentRef, itemPath, contextType, content) {
16
+ const pathSegment = parentRef.itemId ? "items/{item-id}" : "root";
17
+ return (0, graphApi_ts_1.operation)({
18
+ contextId: parentRef.contextId,
19
+ method: "PUT",
20
+ path: (0, templatedPaths_ts_1.generatePath)(`/sites/{site-id}/drives/{drive-id}/${pathSegment}:/${itemPath}:/content`, parentRef),
21
+ headers: {
22
+ "content-type": contextType,
23
+ },
24
+ body: content,
25
+ responseTransform: (response) => {
26
+ const driveItem = response;
27
+ const itemRef = (0, driveItem_ts_1.createDriveItemRef)(parentRef, driveItem.id);
28
+ return {
29
+ ...driveItem,
30
+ ...itemRef,
31
+ };
32
+ },
33
+ });
34
+ }
@@ -0,0 +1,10 @@
1
+ import type { DriveItemPath } from "../../models/DriveItemPath.ts";
2
+ import type { DriveRef } from "../../models/DriveRef.ts";
3
+ /**
4
+ * Check if a given drive item exists.
5
+ *
6
+ * @param itemRef - A reference to the drive item to be downloaded.
7
+ * @returns If the drive item exists.
8
+ */
9
+ export default function existsDriveItem(driveRef: DriveRef, itemPath: DriveItemPath): Promise<boolean>;
10
+ //# sourceMappingURL=existsDriveItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"existsDriveItem.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/existsDriveItem.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAMzD;;;;;GAKG;AACH,wBAA8B,eAAe,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CAwB3G"}
@@ -0,0 +1,39 @@
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 = existsDriveItem;
7
+ const axios_1 = __importDefault(require("axios"));
8
+ const graphApi_ts_1 = require("../../graphApi.js");
9
+ const accessToken_ts_1 = require("../../services/accessToken.js");
10
+ const context_ts_1 = require("../../services/context.js");
11
+ const httpStatus_ts_1 = require("../../services/httpStatus.js");
12
+ const templatedPaths_ts_1 = require("../../services/templatedPaths.js");
13
+ /**
14
+ * Check if a given drive item exists.
15
+ *
16
+ * @param itemRef - A reference to the drive item to be downloaded.
17
+ * @returns If the drive item exists.
18
+ */
19
+ async function existsDriveItem(driveRef, itemPath) {
20
+ // Note this method doesn't match the standard pattern since the batching library doesn't support non-JSON return types.
21
+ const url = `${graphApi_ts_1.endpoint}${(0, templatedPaths_ts_1.generatePath)(`/sites/{site-id}/drives/{drive-id}/root:${itemPath}`, driveRef)}`;
22
+ const context = (0, context_ts_1.getContext)(driveRef.contextId);
23
+ const accessToken = await (0, accessToken_ts_1.getCurrentAccessToken)(context.tenantId, context.clientId, context.clientSecret, graphApi_ts_1.authenticationScope);
24
+ const response = await (0, axios_1.default)({
25
+ url,
26
+ method: "GET",
27
+ headers: {
28
+ authorization: `Bearer ${accessToken}`,
29
+ },
30
+ validateStatus: () => true,
31
+ });
32
+ if ((0, httpStatus_ts_1.isHttpOk)(response.status)) {
33
+ return true;
34
+ }
35
+ if ((0, httpStatus_ts_1.isHttpNotFound)(response.status)) {
36
+ return false;
37
+ }
38
+ throw new Error(`Unexpected response status: ${response.status} ${response.statusText}`);
39
+ }
@@ -31,7 +31,7 @@ async function getDriveItemContent(itemRef) {
31
31
  },
32
32
  responseType: "arraybuffer",
33
33
  });
34
- if (!(0, httpStatus_ts_1.isHttpOk)(response.status)) {
34
+ if (!(0, httpStatus_ts_1.isHttpSuccess)(response.status)) {
35
35
  throw new Error(`Failed to download file: ${response.status} ${response.statusText}`);
36
36
  }
37
37
  if (!Buffer.isBuffer(response.data)) {
@@ -3,7 +3,19 @@
3
3
  * @param status - The HTTP status code.
4
4
  * @returns True if the status code is in the range 200-299, otherwise false.
5
5
  */
6
+ export declare function isHttpSuccess(status: number): boolean;
7
+ /**
8
+ * Checks if the HTTP status code is OK
9
+ * @param status - The HTTP status code.
10
+ * @returns True if the status code is 200, otherwise false.
11
+ */
6
12
  export declare function isHttpOk(status: number): boolean;
13
+ /**
14
+ * Checks if the HTTP status code indicates not found.
15
+ * @param status - The HTTP status code.
16
+ * @returns True if the status code is 404, otherwise false.
17
+ */
18
+ export declare function isHttpNotFound(status: number): boolean;
7
19
  /**
8
20
  * Checks if the HTTP status code indicates too many requests (rate limiting).
9
21
  * @param status - The HTTP status code.
@@ -1 +1 @@
1
- {"version":3,"file":"httpStatus.d.ts","sourceRoot":"","sources":["../../../src/services/httpStatus.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEhD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAExD"}
1
+ {"version":3,"file":"httpStatus.d.ts","sourceRoot":"","sources":["../../../src/services/httpStatus.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEhD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAExD"}
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isHttpSuccess = isHttpSuccess;
3
4
  exports.isHttpOk = isHttpOk;
5
+ exports.isHttpNotFound = isHttpNotFound;
4
6
  exports.isHttpTooManyRequests = isHttpTooManyRequests;
5
7
  exports.isServiceUnavailable = isServiceUnavailable;
6
8
  exports.isGatewayTimeout = isGatewayTimeout;
@@ -9,9 +11,25 @@ exports.isGatewayTimeout = isGatewayTimeout;
9
11
  * @param status - The HTTP status code.
10
12
  * @returns True if the status code is in the range 200-299, otherwise false.
11
13
  */
12
- function isHttpOk(status) {
14
+ function isHttpSuccess(status) {
13
15
  return status >= 200 && status < 300;
14
16
  }
17
+ /**
18
+ * Checks if the HTTP status code is OK
19
+ * @param status - The HTTP status code.
20
+ * @returns True if the status code is 200, otherwise false.
21
+ */
22
+ function isHttpOk(status) {
23
+ return status === 200;
24
+ }
25
+ /**
26
+ * Checks if the HTTP status code indicates not found.
27
+ * @param status - The HTTP status code.
28
+ * @returns True if the status code is 404, otherwise false.
29
+ */
30
+ function isHttpNotFound(status) {
31
+ return status === 404;
32
+ }
15
33
  /**
16
34
  * Checks if the HTTP status code indicates too many requests (rate limiting).
17
35
  * @param status - The HTTP status code.
@@ -1,7 +1,11 @@
1
1
  import type { WorkbookRef } from "../models/WorkbookRef.ts";
2
2
  import type { WorkbookWorksheetId } from "../models/WorkbookWorksheetId.ts";
3
+ import type { WorkbookWorksheetName } from "../models/WorkbookWorksheetName.ts";
3
4
  import type { WorkbookWorksheetRef } from "../models/WorkbookWorksheetRef.ts";
5
+ /** ID of the initial worksheet that is included in a new workbook. */
4
6
  export declare const defaultWorkbookWorksheetId: WorkbookWorksheetId;
7
+ /** Name of the initial worksheet that is included in a new workbook. */
8
+ export declare const defaultWorkbookWorksheetName: WorkbookWorksheetName;
5
9
  /**
6
10
  * Creates a reference to a workbook worksheet.
7
11
  * @param workbookRef - The reference to the workbook.
@@ -1 +1 @@
1
- {"version":3,"file":"workbookWorksheet.d.ts","sourceRoot":"","sources":["../../../src/services/workbookWorksheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAE9E,eAAO,MAAM,0BAA0B,EAA+C,mBAAmB,CAAC;AAE1G;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,mBAAmB,GAAG,SAAS,GAAG,oBAAoB,CAavI;AAED;;;;GAIG;AACH,wBAAgB,iCAAiC,CAAC,WAAW,EAAE,WAAW,GAAG,oBAAoB,CAEhG"}
1
+ {"version":3,"file":"workbookWorksheet.d.ts","sourceRoot":"","sources":["../../../src/services/workbookWorksheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAE9E,sEAAsE;AACtE,eAAO,MAAM,0BAA0B,EAA+C,mBAAmB,CAAC;AAE1G,wEAAwE;AACxE,eAAO,MAAM,4BAA4B,EAAe,qBAAqB,CAAC;AAE9E;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,mBAAmB,GAAG,SAAS,GAAG,oBAAoB,CAavI;AAED;;;;GAIG;AACH,wBAAgB,iCAAiC,CAAC,WAAW,EAAE,WAAW,GAAG,oBAAoB,CAEhG"}
@@ -1,9 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.defaultWorkbookWorksheetId = void 0;
3
+ exports.defaultWorkbookWorksheetName = exports.defaultWorkbookWorksheetId = void 0;
4
4
  exports.createWorkbookWorksheetRef = createWorkbookWorksheetRef;
5
5
  exports.createDefaultWorkbookWorksheetRef = createDefaultWorkbookWorksheetRef;
6
+ /** ID of the initial worksheet that is included in a new workbook. */
6
7
  exports.defaultWorkbookWorksheetId = "{00000000-0001-0000-0000-000000000000}"; // Program Manager in Microsoft Office Extensibility team says this ID is used for the first sheet of all workbooks by design, but not documented. https://github.com/OfficeDev/office-js/issues/552#issuecomment-800841930
8
+ /** Name of the initial worksheet that is included in a new workbook. */
9
+ exports.defaultWorkbookWorksheetName = "Sheet1";
7
10
  /**
8
11
  * Creates a reference to a workbook worksheet.
9
12
  * @param workbookRef - The reference to the workbook.
@@ -7,7 +7,7 @@ import ProtocolError from "./errors/ProtocolError.js";
7
7
  import RequestFailedError from "./errors/RequestFailedError.js";
8
8
  import { getCurrentAccessToken } from "./services/accessToken.js";
9
9
  import { getContext } from "./services/context.js";
10
- import { isGatewayTimeout, isHttpOk, isHttpTooManyRequests, isServiceUnavailable } from "./services/httpStatus.js";
10
+ import { isGatewayTimeout, isHttpSuccess, isHttpTooManyRequests, isServiceUnavailable } from "./services/httpStatus.js";
11
11
  import { operationIdToIndex, operationIndexToId } from "./services/operationId.js";
12
12
  import { sleep } from "./services/sleep.js";
13
13
  export const authenticationScope = "https://graph.microsoft.com/.default";
@@ -97,7 +97,7 @@ async function executeBatch(...ops) {
97
97
  if (!op) {
98
98
  throw new ProtocolError("Reference to operation that was not submitted in the batch");
99
99
  }
100
- if (!isHttpOk(r.status)) {
100
+ if (!isHttpSuccess(r.status)) {
101
101
  const bodyError = body;
102
102
  let errorMessage = `${r.status}`;
103
103
  if (bodyError?.error) {
@@ -166,12 +166,9 @@ async function innerFetch(args) {
166
166
  }
167
167
  }
168
168
  if (!response) {
169
- throw new NeverError("Response is null. Should be impossible");
169
+ throw new NeverError("Response is empty.");
170
170
  }
171
- if (isHttpTooManyRequests(response.status)) {
172
- RequestFailedError.throw("GraphAPI fetch failed after 3 retries due to too many requests.", args);
173
- }
174
- if (!isHttpOk(response.status)) {
171
+ if (!isHttpSuccess(response.status)) {
175
172
  const bodyError = response.data;
176
173
  let errorMessage = `${response.status} '${response.statusText}'`;
177
174
  if (bodyError?.error) {
@@ -6,7 +6,7 @@ export type GraphPath = string & {
6
6
  };
7
7
  export type GraphHeaders = {
8
8
  "workbook-session-id"?: WorkbookSessionId | undefined;
9
- "content-type"?: "application/json" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | undefined;
9
+ "content-type"?: string | undefined;
10
10
  };
11
11
  export type GraphOperationDefinition<T> = {
12
12
  /** Context to match the operation to. Used for authentication etc. */
@@ -1 +1 @@
1
- {"version":3,"file":"GraphOperation.d.ts","sourceRoot":"","sources":["../../../src/models/GraphOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;AACtE,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AACrD,MAAM,MAAM,YAAY,GAAG;IAC1B,qBAAqB,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACtD,cAAc,CAAC,EAAE,kBAAkB,GAAG,mEAAmE,GAAG,SAAS,CAAC;CACtH,CAAC;AAGF,MAAM,MAAM,wBAAwB,CAAC,CAAC,IAAI;IACzC,sEAAsE;IACtE,SAAS,EAAE,SAAS,CAAC;IACrB,8BAA8B;IAC9B,MAAM,EAAE,WAAW,CAAC;IACpB,oJAAoJ;IACpJ,IAAI,EAAE,SAAS,CAAC;IAChB,kGAAkG;IAClG,OAAO,EAAE,YAAY,CAAC;IACtB,6LAA6L;IAC7L,IAAI,EAAE,OAAO,CAAC;IACd,wDAAwD;IACxD,iBAAiB,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,CAAC,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,GAAG;IAC5C,UAAU,EAAE,wBAAwB,CAAC,CAAC,CAAC,CAAC;CACxC,CAAC"}
1
+ {"version":3,"file":"GraphOperation.d.ts","sourceRoot":"","sources":["../../../src/models/GraphOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;AACtE,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AACrD,MAAM,MAAM,YAAY,GAAG;IAC1B,qBAAqB,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACtD,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC,CAAC;AAGF,MAAM,MAAM,wBAAwB,CAAC,CAAC,IAAI;IACzC,sEAAsE;IACtE,SAAS,EAAE,SAAS,CAAC;IACrB,8BAA8B;IAC9B,MAAM,EAAE,WAAW,CAAC;IACpB,oJAAoJ;IACpJ,IAAI,EAAE,SAAS,CAAC;IAChB,kGAAkG;IAClG,OAAO,EAAE,YAAY,CAAC;IACtB,6LAA6L;IAC7L,IAAI,EAAE,OAAO,CAAC;IACd,wDAAwD;IACxD,iBAAiB,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,CAAC,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,GAAG;IAC5C,UAAU,EAAE,wBAAwB,CAAC,CAAC,CAAC,CAAC;CACxC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { DriveItem } from "@microsoft/microsoft-graph-types";
2
+ import type { DriveItemPath } from "../../models/DriveItemPath.ts";
3
+ import type { DriveItemRef } from "../../models/DriveItemRef.ts";
4
+ import type { DriveRef } from "../../models/DriveRef.ts";
5
+ import type { GraphOperation } from "../../models/GraphOperation.ts";
6
+ /**
7
+ * Creates new drive item in the specified parent drive or folder. If the file already exists, it will be replaced.
8
+ *
9
+ * @param parentRef - A reference to the parent drive or folder where the workbook will be created.
10
+ * @param itemPath - The path (including the filename) for the new workbook.
11
+ * @returns The newly created workbook, including its metadata and reference information.
12
+ * @see https://learn.microsoft.com/en-us/graph/api/driveitem-put-content
13
+ */
14
+ export default function createDriveItem(parentRef: DriveRef | DriveItemRef, itemPath: DriveItemPath, contextType: string, content: ArrayBuffer): GraphOperation<DriveItem & DriveItemRef>;
15
+ //# sourceMappingURL=createDriveItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createDriveItem.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/createDriveItem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAGlE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAIrE;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,cAAc,CAAC,SAAS,GAAG,YAAY,CAAC,CAsBxL"}
@@ -0,0 +1,31 @@
1
+ import { operation } from "../../graphApi.js";
2
+ import { createDriveItemRef } from "../../services/driveItem.js";
3
+ import { generatePath } from "../../services/templatedPaths.js";
4
+ /**
5
+ * Creates new drive item in the specified parent drive or folder. If the file already exists, it will be replaced.
6
+ *
7
+ * @param parentRef - A reference to the parent drive or folder where the workbook will be created.
8
+ * @param itemPath - The path (including the filename) for the new workbook.
9
+ * @returns The newly created workbook, including its metadata and reference information.
10
+ * @see https://learn.microsoft.com/en-us/graph/api/driveitem-put-content
11
+ */
12
+ export default function createDriveItem(parentRef, itemPath, contextType, content) {
13
+ const pathSegment = parentRef.itemId ? "items/{item-id}" : "root";
14
+ return operation({
15
+ contextId: parentRef.contextId,
16
+ method: "PUT",
17
+ path: generatePath(`/sites/{site-id}/drives/{drive-id}/${pathSegment}:/${itemPath}:/content`, parentRef),
18
+ headers: {
19
+ "content-type": contextType,
20
+ },
21
+ body: content,
22
+ responseTransform: (response) => {
23
+ const driveItem = response;
24
+ const itemRef = createDriveItemRef(parentRef, driveItem.id);
25
+ return {
26
+ ...driveItem,
27
+ ...itemRef,
28
+ };
29
+ },
30
+ });
31
+ }
@@ -0,0 +1,10 @@
1
+ import type { DriveItemPath } from "../../models/DriveItemPath.ts";
2
+ import type { DriveRef } from "../../models/DriveRef.ts";
3
+ /**
4
+ * Check if a given drive item exists.
5
+ *
6
+ * @param itemRef - A reference to the drive item to be downloaded.
7
+ * @returns If the drive item exists.
8
+ */
9
+ export default function existsDriveItem(driveRef: DriveRef, itemPath: DriveItemPath): Promise<boolean>;
10
+ //# sourceMappingURL=existsDriveItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"existsDriveItem.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/existsDriveItem.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAMzD;;;;;GAKG;AACH,wBAA8B,eAAe,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CAwB3G"}
@@ -0,0 +1,33 @@
1
+ import axios from "axios";
2
+ import { authenticationScope, endpoint } from "../../graphApi.js";
3
+ import { getCurrentAccessToken } from "../../services/accessToken.js";
4
+ import { getContext } from "../../services/context.js";
5
+ import { isHttpNotFound, isHttpOk } from "../../services/httpStatus.js";
6
+ import { generatePath } from "../../services/templatedPaths.js";
7
+ /**
8
+ * Check if a given drive item exists.
9
+ *
10
+ * @param itemRef - A reference to the drive item to be downloaded.
11
+ * @returns If the drive item exists.
12
+ */
13
+ export default async function existsDriveItem(driveRef, itemPath) {
14
+ // Note this method doesn't match the standard pattern since the batching library doesn't support non-JSON return types.
15
+ const url = `${endpoint}${generatePath(`/sites/{site-id}/drives/{drive-id}/root:${itemPath}`, driveRef)}`;
16
+ const context = getContext(driveRef.contextId);
17
+ const accessToken = await getCurrentAccessToken(context.tenantId, context.clientId, context.clientSecret, authenticationScope);
18
+ const response = await axios({
19
+ url,
20
+ method: "GET",
21
+ headers: {
22
+ authorization: `Bearer ${accessToken}`,
23
+ },
24
+ validateStatus: () => true,
25
+ });
26
+ if (isHttpOk(response.status)) {
27
+ return true;
28
+ }
29
+ if (isHttpNotFound(response.status)) {
30
+ return false;
31
+ }
32
+ throw new Error(`Unexpected response status: ${response.status} ${response.statusText}`);
33
+ }
@@ -2,7 +2,7 @@ import axios from "axios";
2
2
  import { authenticationScope, endpoint } from "../../graphApi.js";
3
3
  import { getCurrentAccessToken } from "../../services/accessToken.js";
4
4
  import { getContext } from "../../services/context.js";
5
- import { isHttpOk } from "../../services/httpStatus.js";
5
+ import { isHttpSuccess } from "../../services/httpStatus.js";
6
6
  import { generatePath } from "../../services/templatedPaths.js";
7
7
  /**
8
8
  * Download the content of a drive item.
@@ -25,7 +25,7 @@ export default async function getDriveItemContent(itemRef) {
25
25
  },
26
26
  responseType: "arraybuffer",
27
27
  });
28
- if (!isHttpOk(response.status)) {
28
+ if (!isHttpSuccess(response.status)) {
29
29
  throw new Error(`Failed to download file: ${response.status} ${response.statusText}`);
30
30
  }
31
31
  if (!Buffer.isBuffer(response.data)) {
@@ -3,7 +3,19 @@
3
3
  * @param status - The HTTP status code.
4
4
  * @returns True if the status code is in the range 200-299, otherwise false.
5
5
  */
6
+ export declare function isHttpSuccess(status: number): boolean;
7
+ /**
8
+ * Checks if the HTTP status code is OK
9
+ * @param status - The HTTP status code.
10
+ * @returns True if the status code is 200, otherwise false.
11
+ */
6
12
  export declare function isHttpOk(status: number): boolean;
13
+ /**
14
+ * Checks if the HTTP status code indicates not found.
15
+ * @param status - The HTTP status code.
16
+ * @returns True if the status code is 404, otherwise false.
17
+ */
18
+ export declare function isHttpNotFound(status: number): boolean;
7
19
  /**
8
20
  * Checks if the HTTP status code indicates too many requests (rate limiting).
9
21
  * @param status - The HTTP status code.
@@ -1 +1 @@
1
- {"version":3,"file":"httpStatus.d.ts","sourceRoot":"","sources":["../../../src/services/httpStatus.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEhD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAExD"}
1
+ {"version":3,"file":"httpStatus.d.ts","sourceRoot":"","sources":["../../../src/services/httpStatus.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEhD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAExD"}
@@ -3,9 +3,25 @@
3
3
  * @param status - The HTTP status code.
4
4
  * @returns True if the status code is in the range 200-299, otherwise false.
5
5
  */
6
- export function isHttpOk(status) {
6
+ export function isHttpSuccess(status) {
7
7
  return status >= 200 && status < 300;
8
8
  }
9
+ /**
10
+ * Checks if the HTTP status code is OK
11
+ * @param status - The HTTP status code.
12
+ * @returns True if the status code is 200, otherwise false.
13
+ */
14
+ export function isHttpOk(status) {
15
+ return status === 200;
16
+ }
17
+ /**
18
+ * Checks if the HTTP status code indicates not found.
19
+ * @param status - The HTTP status code.
20
+ * @returns True if the status code is 404, otherwise false.
21
+ */
22
+ export function isHttpNotFound(status) {
23
+ return status === 404;
24
+ }
9
25
  /**
10
26
  * Checks if the HTTP status code indicates too many requests (rate limiting).
11
27
  * @param status - The HTTP status code.
@@ -1,7 +1,11 @@
1
1
  import type { WorkbookRef } from "../models/WorkbookRef.ts";
2
2
  import type { WorkbookWorksheetId } from "../models/WorkbookWorksheetId.ts";
3
+ import type { WorkbookWorksheetName } from "../models/WorkbookWorksheetName.ts";
3
4
  import type { WorkbookWorksheetRef } from "../models/WorkbookWorksheetRef.ts";
5
+ /** ID of the initial worksheet that is included in a new workbook. */
4
6
  export declare const defaultWorkbookWorksheetId: WorkbookWorksheetId;
7
+ /** Name of the initial worksheet that is included in a new workbook. */
8
+ export declare const defaultWorkbookWorksheetName: WorkbookWorksheetName;
5
9
  /**
6
10
  * Creates a reference to a workbook worksheet.
7
11
  * @param workbookRef - The reference to the workbook.
@@ -1 +1 @@
1
- {"version":3,"file":"workbookWorksheet.d.ts","sourceRoot":"","sources":["../../../src/services/workbookWorksheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAE9E,eAAO,MAAM,0BAA0B,EAA+C,mBAAmB,CAAC;AAE1G;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,mBAAmB,GAAG,SAAS,GAAG,oBAAoB,CAavI;AAED;;;;GAIG;AACH,wBAAgB,iCAAiC,CAAC,WAAW,EAAE,WAAW,GAAG,oBAAoB,CAEhG"}
1
+ {"version":3,"file":"workbookWorksheet.d.ts","sourceRoot":"","sources":["../../../src/services/workbookWorksheet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAE9E,sEAAsE;AACtE,eAAO,MAAM,0BAA0B,EAA+C,mBAAmB,CAAC;AAE1G,wEAAwE;AACxE,eAAO,MAAM,4BAA4B,EAAe,qBAAqB,CAAC;AAE9E;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,mBAAmB,GAAG,SAAS,GAAG,oBAAoB,CAavI;AAED;;;;GAIG;AACH,wBAAgB,iCAAiC,CAAC,WAAW,EAAE,WAAW,GAAG,oBAAoB,CAEhG"}
@@ -1,4 +1,7 @@
1
+ /** ID of the initial worksheet that is included in a new workbook. */
1
2
  export const defaultWorkbookWorksheetId = "{00000000-0001-0000-0000-000000000000}"; // Program Manager in Microsoft Office Extensibility team says this ID is used for the first sheet of all workbooks by design, but not documented. https://github.com/OfficeDev/office-js/issues/552#issuecomment-800841930
3
+ /** Name of the initial worksheet that is included in a new workbook. */
4
+ export const defaultWorkbookWorksheetName = "Sheet1";
2
5
  /**
3
6
  * Creates a reference to a workbook worksheet.
4
7
  * @param workbookRef - The reference to the workbook.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microsoft-graph",
3
- "version": "2.9.3",
3
+ "version": "2.11.0",
4
4
  "description": "Microsoft GraphAPI SDK for NodeJS",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -312,11 +312,21 @@
312
312
  "require": "./dist/cjs/operations/drive/listDrives.js",
313
313
  "types": "./dist/esm/operations/drive/listDrives.d.ts"
314
314
  },
315
+ "./operations/driveItem/createDriveItem": {
316
+ "import": "./dist/esm/operations/driveItem/createDriveItem.js",
317
+ "require": "./dist/cjs/operations/driveItem/createDriveItem.js",
318
+ "types": "./dist/esm/operations/driveItem/createDriveItem.d.ts"
319
+ },
315
320
  "./operations/driveItem/deleteDriveItem": {
316
321
  "import": "./dist/esm/operations/driveItem/deleteDriveItem.js",
317
322
  "require": "./dist/cjs/operations/driveItem/deleteDriveItem.js",
318
323
  "types": "./dist/esm/operations/driveItem/deleteDriveItem.d.ts"
319
324
  },
325
+ "./operations/driveItem/existsDriveItem": {
326
+ "import": "./dist/esm/operations/driveItem/existsDriveItem.js",
327
+ "require": "./dist/cjs/operations/driveItem/existsDriveItem.js",
328
+ "types": "./dist/esm/operations/driveItem/existsDriveItem.d.ts"
329
+ },
320
330
  "./operations/driveItem/getDriveItem": {
321
331
  "import": "./dist/esm/operations/driveItem/getDriveItem.js",
322
332
  "require": "./dist/cjs/operations/driveItem/getDriveItem.js",
@@ -1007,11 +1017,21 @@
1007
1017
  "import": "./dist/esm/operations/drive/listDrives.js",
1008
1018
  "types": "./dist/esm/operations/drive/listDrives.d.ts"
1009
1019
  },
1020
+ "./dist/cjs/operations/driveItem/createDriveItem.js": {
1021
+ "require": "./dist/cjs/operations/driveItem/createDriveItem.js",
1022
+ "import": "./dist/esm/operations/driveItem/createDriveItem.js",
1023
+ "types": "./dist/esm/operations/driveItem/createDriveItem.d.ts"
1024
+ },
1010
1025
  "./dist/cjs/operations/driveItem/deleteDriveItem.js": {
1011
1026
  "require": "./dist/cjs/operations/driveItem/deleteDriveItem.js",
1012
1027
  "import": "./dist/esm/operations/driveItem/deleteDriveItem.js",
1013
1028
  "types": "./dist/esm/operations/driveItem/deleteDriveItem.d.ts"
1014
1029
  },
1030
+ "./dist/cjs/operations/driveItem/existsDriveItem.js": {
1031
+ "require": "./dist/cjs/operations/driveItem/existsDriveItem.js",
1032
+ "import": "./dist/esm/operations/driveItem/existsDriveItem.js",
1033
+ "types": "./dist/esm/operations/driveItem/existsDriveItem.d.ts"
1034
+ },
1015
1035
  "./dist/cjs/operations/driveItem/getDriveItem.js": {
1016
1036
  "require": "./dist/cjs/operations/driveItem/getDriveItem.js",
1017
1037
  "import": "./dist/esm/operations/driveItem/getDriveItem.js",