microsoft-graph 3.11.19 → 3.11.21

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 (27) hide show
  1. package/dist/cjs/operations/driveItem/createDriveItem.d.ts.map +1 -1
  2. package/dist/cjs/operations/driveItem/createDriveItem.js +2 -1
  3. package/dist/cjs/operations/driveItem/createDriveItemContent.d.ts.map +1 -1
  4. package/dist/cjs/operations/driveItem/createDriveItemContent.js +2 -1
  5. package/dist/cjs/operations/driveItem/existsDriveItem.d.ts.map +1 -1
  6. package/dist/cjs/operations/driveItem/existsDriveItem.js +2 -1
  7. package/dist/cjs/operations/driveItem/getDriveItemByPath.d.ts.map +1 -1
  8. package/dist/cjs/operations/driveItem/getDriveItemByPath.js +3 -2
  9. package/dist/cjs/operations/workbook/createBinaryWorkbook.d.ts.map +1 -1
  10. package/dist/cjs/operations/workbook/createBinaryWorkbook.js +2 -1
  11. package/dist/cjs/operations/workbook/createWorkbook.d.ts.map +1 -1
  12. package/dist/cjs/operations/workbook/createWorkbook.js +2 -1
  13. package/dist/cjs/services/driveItem.js +1 -1
  14. package/dist/esm/operations/driveItem/createDriveItem.d.ts.map +1 -1
  15. package/dist/esm/operations/driveItem/createDriveItem.js +2 -1
  16. package/dist/esm/operations/driveItem/createDriveItemContent.d.ts.map +1 -1
  17. package/dist/esm/operations/driveItem/createDriveItemContent.js +2 -1
  18. package/dist/esm/operations/driveItem/existsDriveItem.d.ts.map +1 -1
  19. package/dist/esm/operations/driveItem/existsDriveItem.js +2 -1
  20. package/dist/esm/operations/driveItem/getDriveItemByPath.d.ts.map +1 -1
  21. package/dist/esm/operations/driveItem/getDriveItemByPath.js +3 -2
  22. package/dist/esm/operations/workbook/createBinaryWorkbook.d.ts.map +1 -1
  23. package/dist/esm/operations/workbook/createBinaryWorkbook.js +2 -1
  24. package/dist/esm/operations/workbook/createWorkbook.d.ts.map +1 -1
  25. package/dist/esm/operations/workbook/createWorkbook.js +2 -1
  26. package/dist/esm/services/driveItem.js +1 -1
  27. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"createDriveItem.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/createDriveItem.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAKrE;;;;;;;;;GASG;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"}
1
+ {"version":3,"file":"createDriveItem.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/createDriveItem.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAKrE;;;;;;;;;GASG;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,CAuBxL"}
@@ -22,10 +22,11 @@ const templatedPaths_ts_1 = require("../../services/templatedPaths.js");
22
22
  */
23
23
  function createDriveItem(parentRef, itemPath, contextType, content) {
24
24
  const pathSegment = parentRef.itemId ? "items/{item-id}" : "root";
25
+ const encodedItemPath = itemPath.split("/").map(encodeURIComponent).join("/");
25
26
  return (0, operationInvoker_ts_1.operation)({
26
27
  context: parentRef.context,
27
28
  method: "PUT",
28
- path: (0, templatedPaths_ts_1.generatePath)(`/sites/{site-id}/drives/{drive-id}/${pathSegment}:/${itemPath}:/content`, parentRef),
29
+ path: (0, templatedPaths_ts_1.generatePath)(`/sites/{site-id}/drives/{drive-id}/${pathSegment}:/${encodedItemPath}:/content`, parentRef),
29
30
  headers: {
30
31
  "content-type": contextType,
31
32
  },
@@ -1 +1 @@
1
- {"version":3,"file":"createDriveItemContent.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/createDriveItemContent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAIlE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAM1F;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,QAAa,CAAC;AAc5C;;;;;GAKG;AACH,MAAM,WAAW,6BAA6B;IAC7C,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAA8B,sBAAsB,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,CAAC,cAAc,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,GAAE,6BAAkC,GAAG,OAAO,CAAC,SAAS,GAAG,YAAY,CAAC,CAsG7P"}
1
+ {"version":3,"file":"createDriveItemContent.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/createDriveItemContent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAIlE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAM1F;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,QAAa,CAAC;AAc5C;;;;;GAKG;AACH,MAAM,WAAW,6BAA6B;IAC7C,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAA8B,sBAAsB,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,CAAC,cAAc,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,GAAE,6BAAkC,GAAG,OAAO,CAAC,SAAS,GAAG,YAAY,CAAC,CAuG7P"}
@@ -47,7 +47,8 @@ async function createDriveItemContent(parentRef, itemPath, contentStream, conten
47
47
  throw new InvalidArgumentError_ts_1.default(`Chunk size (${maxChunkSize.toLocaleString()}) must be a multiple of ${(exports.chunkSizeMultiple / 1024).toLocaleString()} KiB *${exports.chunkSizeMultiple.toLocaleString()} bytes).`);
48
48
  }
49
49
  const pathSegment = parentRef.itemId ? "items/{item-id}" : "root";
50
- const uploadSessionUrl = `${operationInvoker_ts_1.endpoint}${(0, templatedPaths_ts_1.generatePath)(`/sites/{site-id}/drives/{drive-id}/${pathSegment}:${itemPath}:/createUploadSession`, parentRef)}`;
50
+ const encodedItemPath = itemPath.split("/").map(encodeURIComponent).join("/");
51
+ const uploadSessionUrl = `${operationInvoker_ts_1.endpoint}${(0, templatedPaths_ts_1.generatePath)(`/sites/{site-id}/drives/{drive-id}/${pathSegment}:${encodedItemPath}:/createUploadSession`, parentRef)}`;
51
52
  const accessToken = await parentRef.context.generateAccessToken();
52
53
  const fileName = (0, node_path_1.basename)(itemPath);
53
54
  const { uploadUrl } = await (0, http_ts_1.execute)({
@@ -1 +1 @@
1
- {"version":3,"file":"existsDriveItem.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/existsDriveItem.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAM/D;;;;GAIG;AACH,wBAA8B,eAAe,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CA0B3G"}
1
+ {"version":3,"file":"existsDriveItem.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/existsDriveItem.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAM/D;;;;GAIG;AACH,wBAA8B,eAAe,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CA2B3G"}
@@ -23,7 +23,8 @@ async function existsDriveItem(driveRef, itemPath) {
23
23
  if (!itemPath.startsWith("/")) {
24
24
  throw new InvalidArgumentError_ts_1.default("itemPath must start with a forward slash (/)");
25
25
  }
26
- const url = `${operationInvoker_ts_1.endpoint}${(0, templatedPaths_ts_1.generatePath)(`/sites/{site-id}/drives/{drive-id}/root:${itemPath}`, driveRef)}`;
26
+ const encodedItemPath = itemPath.split("/").map(encodeURIComponent).join("/");
27
+ const url = `${operationInvoker_ts_1.endpoint}${(0, templatedPaths_ts_1.generatePath)(`/sites/{site-id}/drives/{drive-id}/root:${encodedItemPath}`, driveRef)}`;
27
28
  const accessToken = await driveRef.context.generateAccessToken();
28
29
  const response = await (0, http_ts_1.executeRaw)({
29
30
  // TODO: This is not supporting retry and needs fixing
@@ -1 +1 @@
1
- {"version":3,"file":"getDriveItemByPath.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/getDriveItemByPath.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAKrE;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,EAAE,aAAa,GAAG,cAAc,CAAC,SAAS,GAAG,YAAY,CAAC,CA8BhJ"}
1
+ {"version":3,"file":"getDriveItemByPath.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/getDriveItemByPath.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAKrE;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,EAAE,aAAa,GAAG,cAAc,CAAC,SAAS,GAAG,YAAY,CAAC,CA+BhJ"}
@@ -24,14 +24,15 @@ function getDriveItemByPath(parentRef, itemPath) {
24
24
  if (!itemPath.startsWith("/")) {
25
25
  throw new InvalidArgumentError_ts_1.default("itemPath must start with a forward slash (/)");
26
26
  }
27
+ const encodedItemPath = itemPath.split("/").map(encodeURIComponent).join("/");
27
28
  let normalizedPath;
28
29
  if ("id" in parentRef) {
29
30
  // parentRef is a DriveItemRef
30
- normalizedPath = itemPath === "/" ? "/sites/{site-id}/drives/{drive-id}/items/{item-id}" : `/sites/{site-id}/drives/{drive-id}/items/{item-id}:${itemPath}`;
31
+ normalizedPath = itemPath === "/" ? "/sites/{site-id}/drives/{drive-id}/items/{item-id}" : `/sites/{site-id}/drives/{drive-id}/items/{item-id}:${encodedItemPath}`;
31
32
  }
32
33
  else {
33
34
  // parentRef is a DriveRef
34
- normalizedPath = itemPath === "/" ? "/sites/{site-id}/drives/{drive-id}/root" : `/sites/{site-id}/drives/{drive-id}/root:${itemPath}`;
35
+ normalizedPath = itemPath === "/" ? "/sites/{site-id}/drives/{drive-id}/root" : `/sites/{site-id}/drives/{drive-id}/root:${encodedItemPath}`;
35
36
  }
36
37
  return (0, operationInvoker_ts_1.operation)({
37
38
  context: parentRef.context,
@@ -1 +1 @@
1
- {"version":3,"file":"createBinaryWorkbook.d.ts","sourceRoot":"","sources":["../../../../src/operations/workbook/createBinaryWorkbook.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAQ5D;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,EAAE,aAAa,GAAG,cAAc,CAAC,SAAS,GAAG,WAAW,CAAC,CAyBjJ"}
1
+ {"version":3,"file":"createBinaryWorkbook.d.ts","sourceRoot":"","sources":["../../../../src/operations/workbook/createBinaryWorkbook.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAQ5D;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,EAAE,aAAa,GAAG,cAAc,CAAC,SAAS,GAAG,WAAW,CAAC,CA0BjJ"}
@@ -26,11 +26,12 @@ function createBinaryWorkbook(parentRef, itemPath) {
26
26
  if (!itemPath.endsWith(`.${driveItem_ts_1.binaryWorkbookFileExtension}`)) {
27
27
  throw new InvalidArgumentError_ts_1.default(`Item path must end with '.${driveItem_ts_1.workbookFileExtension}'`);
28
28
  }
29
+ const encodedItemPath = itemPath.split("/").map(encodeURIComponent).join("/");
29
30
  const pathSegment = parentRef.itemId ? "items/{item-id}" : "root";
30
31
  return (0, operationInvoker_ts_1.operation)({
31
32
  context: parentRef.context,
32
33
  method: "PUT",
33
- path: (0, templatedPaths_ts_1.generatePath)(`/sites/{site-id}/drives/{drive-id}/${pathSegment}:/${itemPath}:/content`, parentRef),
34
+ path: (0, templatedPaths_ts_1.generatePath)(`/sites/{site-id}/drives/{drive-id}/${pathSegment}:/${encodedItemPath}:/content`, parentRef),
34
35
  headers: {
35
36
  "content-type": "application/vnd.ms-excel.sheet.binary",
36
37
  },
@@ -1 +1 @@
1
- {"version":3,"file":"createWorkbook.d.ts","sourceRoot":"","sources":["../../../../src/operations/workbook/createWorkbook.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAK5D;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,EAAE,aAAa,GAAG,cAAc,CAAC,SAAS,GAAG,WAAW,CAAC,CAyB3I"}
1
+ {"version":3,"file":"createWorkbook.d.ts","sourceRoot":"","sources":["../../../../src/operations/workbook/createWorkbook.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAK5D;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,EAAE,aAAa,GAAG,cAAc,CAAC,SAAS,GAAG,WAAW,CAAC,CA2B3I"}
@@ -25,11 +25,12 @@ function createWorkbook(parentRef, itemPath) {
25
25
  if (!itemPath.endsWith(`.${driveItem_ts_1.workbookFileExtension}`)) {
26
26
  throw new InvalidArgumentError_ts_1.default(`Item path must end with '.${driveItem_ts_1.workbookFileExtension}'`);
27
27
  }
28
+ const encodedItemPath = itemPath.split("/").map(encodeURIComponent).join("/");
28
29
  const pathSegment = parentRef.itemId ? "items/{item-id}" : "root";
29
30
  return (0, operationInvoker_ts_1.operation)({
30
31
  context: parentRef.context,
31
32
  method: "PUT",
32
- path: (0, templatedPaths_ts_1.generatePath)(`/sites/{site-id}/drives/{drive-id}/${pathSegment}:/${itemPath}:/content`, parentRef),
33
+ path: (0, templatedPaths_ts_1.generatePath)(`/sites/{site-id}/drives/{drive-id}/${pathSegment}:/${encodedItemPath}:/content`, parentRef),
33
34
  headers: {
34
35
  "content-type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
35
36
  },
@@ -17,7 +17,7 @@ exports.getDriveItemParent = getDriveItemParent;
17
17
  const node_path_1 = __importDefault(require("node:path"));
18
18
  const InvalidArgumentError_ts_1 = __importDefault(require("../errors/InvalidArgumentError.js"));
19
19
  const ProtocolError_ts_1 = __importDefault(require("../errors/ProtocolError.js"));
20
- const segmentPattern = /^[^"*:<>?\\|#]{1,256}$/;
20
+ const segmentPattern = /^[^"*:<>\\|]{1,256}$/;
21
21
  const reservedNames = ["CON", "PRN", "AUX", "NUL", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9"];
22
22
  exports.workbookFileExtension = "xlsx";
23
23
  exports.binaryWorkbookFileExtension = "xlsb";
@@ -1 +1 @@
1
- {"version":3,"file":"createDriveItem.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/createDriveItem.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAKrE;;;;;;;;;GASG;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"}
1
+ {"version":3,"file":"createDriveItem.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/createDriveItem.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAKrE;;;;;;;;;GASG;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,CAuBxL"}
@@ -19,10 +19,11 @@ import { generatePath } from "../../services/templatedPaths.js";
19
19
  */
20
20
  export default function createDriveItem(parentRef, itemPath, contextType, content) {
21
21
  const pathSegment = parentRef.itemId ? "items/{item-id}" : "root";
22
+ const encodedItemPath = itemPath.split("/").map(encodeURIComponent).join("/");
22
23
  return operation({
23
24
  context: parentRef.context,
24
25
  method: "PUT",
25
- path: generatePath(`/sites/{site-id}/drives/{drive-id}/${pathSegment}:/${itemPath}:/content`, parentRef),
26
+ path: generatePath(`/sites/{site-id}/drives/{drive-id}/${pathSegment}:/${encodedItemPath}:/content`, parentRef),
26
27
  headers: {
27
28
  "content-type": contextType,
28
29
  },
@@ -1 +1 @@
1
- {"version":3,"file":"createDriveItemContent.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/createDriveItemContent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAIlE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAM1F;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,QAAa,CAAC;AAc5C;;;;;GAKG;AACH,MAAM,WAAW,6BAA6B;IAC7C,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAA8B,sBAAsB,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,CAAC,cAAc,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,GAAE,6BAAkC,GAAG,OAAO,CAAC,SAAS,GAAG,YAAY,CAAC,CAsG7P"}
1
+ {"version":3,"file":"createDriveItemContent.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/createDriveItemContent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAIlE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAM1F;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,QAAa,CAAC;AAc5C;;;;;GAKG;AACH,MAAM,WAAW,6BAA6B;IAC7C,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAA8B,sBAAsB,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,CAAC,cAAc,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,GAAE,6BAAkC,GAAG,OAAO,CAAC,SAAS,GAAG,YAAY,CAAC,CAuG7P"}
@@ -40,7 +40,8 @@ export default async function createDriveItemContent(parentRef, itemPath, conten
40
40
  throw new InvalidArgumentError(`Chunk size (${maxChunkSize.toLocaleString()}) must be a multiple of ${(chunkSizeMultiple / 1024).toLocaleString()} KiB *${chunkSizeMultiple.toLocaleString()} bytes).`);
41
41
  }
42
42
  const pathSegment = parentRef.itemId ? "items/{item-id}" : "root";
43
- const uploadSessionUrl = `${endpoint}${generatePath(`/sites/{site-id}/drives/{drive-id}/${pathSegment}:${itemPath}:/createUploadSession`, parentRef)}`;
43
+ const encodedItemPath = itemPath.split("/").map(encodeURIComponent).join("/");
44
+ const uploadSessionUrl = `${endpoint}${generatePath(`/sites/{site-id}/drives/{drive-id}/${pathSegment}:${encodedItemPath}:/createUploadSession`, parentRef)}`;
44
45
  const accessToken = await parentRef.context.generateAccessToken();
45
46
  const fileName = basename(itemPath);
46
47
  const { uploadUrl } = await execute({
@@ -1 +1 @@
1
- {"version":3,"file":"existsDriveItem.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/existsDriveItem.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAM/D;;;;GAIG;AACH,wBAA8B,eAAe,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CA0B3G"}
1
+ {"version":3,"file":"existsDriveItem.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/existsDriveItem.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAM/D;;;;GAIG;AACH,wBAA8B,eAAe,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CA2B3G"}
@@ -17,7 +17,8 @@ export default async function existsDriveItem(driveRef, itemPath) {
17
17
  if (!itemPath.startsWith("/")) {
18
18
  throw new InvalidArgumentError("itemPath must start with a forward slash (/)");
19
19
  }
20
- const url = `${endpoint}${generatePath(`/sites/{site-id}/drives/{drive-id}/root:${itemPath}`, driveRef)}`;
20
+ const encodedItemPath = itemPath.split("/").map(encodeURIComponent).join("/");
21
+ const url = `${endpoint}${generatePath(`/sites/{site-id}/drives/{drive-id}/root:${encodedItemPath}`, driveRef)}`;
21
22
  const accessToken = await driveRef.context.generateAccessToken();
22
23
  const response = await executeRaw({
23
24
  // TODO: This is not supporting retry and needs fixing
@@ -1 +1 @@
1
- {"version":3,"file":"getDriveItemByPath.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/getDriveItemByPath.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAKrE;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,EAAE,aAAa,GAAG,cAAc,CAAC,SAAS,GAAG,YAAY,CAAC,CA8BhJ"}
1
+ {"version":3,"file":"getDriveItemByPath.d.ts","sourceRoot":"","sources":["../../../../src/operations/driveItem/getDriveItemByPath.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAKrE;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,EAAE,aAAa,GAAG,cAAc,CAAC,SAAS,GAAG,YAAY,CAAC,CA+BhJ"}
@@ -18,14 +18,15 @@ export default function getDriveItemByPath(parentRef, itemPath) {
18
18
  if (!itemPath.startsWith("/")) {
19
19
  throw new InvalidArgumentError("itemPath must start with a forward slash (/)");
20
20
  }
21
+ const encodedItemPath = itemPath.split("/").map(encodeURIComponent).join("/");
21
22
  let normalizedPath;
22
23
  if ("id" in parentRef) {
23
24
  // parentRef is a DriveItemRef
24
- normalizedPath = itemPath === "/" ? "/sites/{site-id}/drives/{drive-id}/items/{item-id}" : `/sites/{site-id}/drives/{drive-id}/items/{item-id}:${itemPath}`;
25
+ normalizedPath = itemPath === "/" ? "/sites/{site-id}/drives/{drive-id}/items/{item-id}" : `/sites/{site-id}/drives/{drive-id}/items/{item-id}:${encodedItemPath}`;
25
26
  }
26
27
  else {
27
28
  // parentRef is a DriveRef
28
- normalizedPath = itemPath === "/" ? "/sites/{site-id}/drives/{drive-id}/root" : `/sites/{site-id}/drives/{drive-id}/root:${itemPath}`;
29
+ normalizedPath = itemPath === "/" ? "/sites/{site-id}/drives/{drive-id}/root" : `/sites/{site-id}/drives/{drive-id}/root:${encodedItemPath}`;
29
30
  }
30
31
  return operation({
31
32
  context: parentRef.context,
@@ -1 +1 @@
1
- {"version":3,"file":"createBinaryWorkbook.d.ts","sourceRoot":"","sources":["../../../../src/operations/workbook/createBinaryWorkbook.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAQ5D;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,EAAE,aAAa,GAAG,cAAc,CAAC,SAAS,GAAG,WAAW,CAAC,CAyBjJ"}
1
+ {"version":3,"file":"createBinaryWorkbook.d.ts","sourceRoot":"","sources":["../../../../src/operations/workbook/createBinaryWorkbook.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAQ5D;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,EAAE,aAAa,GAAG,cAAc,CAAC,SAAS,GAAG,WAAW,CAAC,CA0BjJ"}
@@ -20,11 +20,12 @@ export default function createBinaryWorkbook(parentRef, itemPath) {
20
20
  if (!itemPath.endsWith(`.${binaryWorkbookFileExtension}`)) {
21
21
  throw new InvalidArgumentError(`Item path must end with '.${workbookFileExtension}'`);
22
22
  }
23
+ const encodedItemPath = itemPath.split("/").map(encodeURIComponent).join("/");
23
24
  const pathSegment = parentRef.itemId ? "items/{item-id}" : "root";
24
25
  return operation({
25
26
  context: parentRef.context,
26
27
  method: "PUT",
27
- path: generatePath(`/sites/{site-id}/drives/{drive-id}/${pathSegment}:/${itemPath}:/content`, parentRef),
28
+ path: generatePath(`/sites/{site-id}/drives/{drive-id}/${pathSegment}:/${encodedItemPath}:/content`, parentRef),
28
29
  headers: {
29
30
  "content-type": "application/vnd.ms-excel.sheet.binary",
30
31
  },
@@ -1 +1 @@
1
- {"version":3,"file":"createWorkbook.d.ts","sourceRoot":"","sources":["../../../../src/operations/workbook/createWorkbook.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAK5D;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,EAAE,aAAa,GAAG,cAAc,CAAC,SAAS,GAAG,WAAW,CAAC,CAyB3I"}
1
+ {"version":3,"file":"createWorkbook.d.ts","sourceRoot":"","sources":["../../../../src/operations/workbook/createWorkbook.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAe,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAK5D;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,EAAE,aAAa,GAAG,cAAc,CAAC,SAAS,GAAG,WAAW,CAAC,CA2B3I"}
@@ -19,11 +19,12 @@ export default function createWorkbook(parentRef, itemPath) {
19
19
  if (!itemPath.endsWith(`.${workbookFileExtension}`)) {
20
20
  throw new InvalidArgumentError(`Item path must end with '.${workbookFileExtension}'`);
21
21
  }
22
+ const encodedItemPath = itemPath.split("/").map(encodeURIComponent).join("/");
22
23
  const pathSegment = parentRef.itemId ? "items/{item-id}" : "root";
23
24
  return operation({
24
25
  context: parentRef.context,
25
26
  method: "PUT",
26
- path: generatePath(`/sites/{site-id}/drives/{drive-id}/${pathSegment}:/${itemPath}:/content`, parentRef),
27
+ path: generatePath(`/sites/{site-id}/drives/{drive-id}/${pathSegment}:/${encodedItemPath}:/content`, parentRef),
27
28
  headers: {
28
29
  "content-type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
29
30
  },
@@ -6,7 +6,7 @@
6
6
  import path from "node:path";
7
7
  import InvalidArgumentError from "../errors/InvalidArgumentError.js";
8
8
  import ProtocolError from "../errors/ProtocolError.js";
9
- const segmentPattern = /^[^"*:<>?\\|#]{1,256}$/;
9
+ const segmentPattern = /^[^"*:<>\\|]{1,256}$/;
10
10
  const reservedNames = ["CON", "PRN", "AUX", "NUL", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9"];
11
11
  export const workbookFileExtension = "xlsx";
12
12
  export const binaryWorkbookFileExtension = "xlsb";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microsoft-graph",
3
- "version": "3.11.19",
3
+ "version": "3.11.21",
4
4
  "description": "Microsoft GraphAPI SDK for NodeJS",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",