microsoft-graph 3.2.2 → 3.2.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 +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,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,GAAG,cAAc,CAAC,SAAS,GAAG,YAAY,CAAC,CAqBhI"}
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,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,GAAG,cAAc,CAAC,SAAS,GAAG,YAAY,CAAC,CAuBhI"}
@@ -24,10 +24,11 @@ function getDriveItemByPath(driveRef, 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 normalizedPath = itemPath === "/" ? "/sites/{site-id}/drives/{drive-id}/root" : `/sites/{site-id}/drives/{drive-id}/root:${itemPath}`;
27
28
  return (0, operationInvoker_ts_1.operation)({
28
29
  context: driveRef.context,
29
30
  method: "GET",
30
- path: (0, templatedPaths_ts_1.generatePath)(`/sites/{site-id}/drives/{drive-id}/root:${itemPath}`, driveRef),
31
+ path: (0, templatedPaths_ts_1.generatePath)(normalizedPath, driveRef),
31
32
  headers: {},
32
33
  body: null,
33
34
  responseTransform: (response) => {
@@ -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,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,GAAG,cAAc,CAAC,SAAS,GAAG,YAAY,CAAC,CAqBhI"}
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,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,GAAG,cAAc,CAAC,SAAS,GAAG,YAAY,CAAC,CAuBhI"}
@@ -18,10 +18,11 @@ export default function getDriveItemByPath(driveRef, itemPath) {
18
18
  if (!itemPath.startsWith("/")) {
19
19
  throw new InvalidArgumentError("itemPath must start with a forward slash (/)");
20
20
  }
21
+ const normalizedPath = itemPath === "/" ? "/sites/{site-id}/drives/{drive-id}/root" : `/sites/{site-id}/drives/{drive-id}/root:${itemPath}`;
21
22
  return operation({
22
23
  context: driveRef.context,
23
24
  method: "GET",
24
- path: generatePath(`/sites/{site-id}/drives/{drive-id}/root:${itemPath}`, driveRef),
25
+ path: generatePath(normalizedPath, driveRef),
25
26
  headers: {},
26
27
  body: null,
27
28
  responseTransform: (response) => {
@@ -8,7 +8,7 @@
8
8
 
9
9
  > **getSiteByUrl**(`contextRef`, `url`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`Site` & [`SiteRef`](../Site-1.md#siteref)\>
10
10
 
11
- Defined in: src/tasks/getSiteByUrl.ts:15
11
+ Defined in: [src/tasks/getSiteByUrl.ts:15](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/tasks/getSiteByUrl.ts#L15)
12
12
 
13
13
  Retrieves a site from a SharePoint URL.
14
14
 
@@ -2,12 +2,18 @@
2
2
  At the time of writing there is no **good** way to get these values. So what follows is a work-around process.
3
3
 
4
4
  ## SiteId
5
- 1. Open the Sharepoint UI for the site you're interested in (ie https://msftfuturesecureai.sharepoint.com/sites/FSAI-MQG/)
6
- 2. In your browser, open "View Source"
7
- 3. Search the source for `siteId` and look immediately after it.
8
- 4. The SiteId is a GUID and will look something like "89cb90aa-7977-412d-8215-31c74db72d7b"
5
+ ### Automated way
6
+ Install [Microsoft Graph Tool](https://www.npmjs.com/package/microsoft-graph-tool) and run `graph get-site <url>` (ie `graph get-site https://myhost.sharepoint.com/sites/sitename/`) and you will be given the rool
7
+
8
+ ### Manual way
9
+ Go to this path on your site https://{host-name}/sites/{site-name}/_api/site/id (ie https://myhost.sharepoint.com/sites/sitename/_api/site/id) and you will be given the ID
9
10
 
10
11
  ## DriveID
12
+
13
+ ### Automated way
14
+ Install [Microsoft Graph Tool](https://www.npmjs.com/package/microsoft-graph-tool) and run `graph list-drives <siteId>`
15
+
16
+ ### Manual way
11
17
  1. In the Sharepoint UI, create a workbook. New > Workbook
12
18
  2. Close the file and back in Sharepoint refresh the page
13
19
  3. Open your web browsers Inspect tool
@@ -15,7 +21,7 @@ At the time of writing there is no **good** way to get these values. So what fol
15
21
  5. In the inspect tool, swap to the "Network" table and filter the view vy "Fetch/XHR"
16
22
  6. Find the request to the Graph API. It will look like this:
17
23
  `https://msftfuturesecureai.sharepoint.com/_api/v2.1/drives/b!qpDLiXd5LUGCFTHHTbcte07zDZGO-jpHhga5szhvDwEvhFVvV24OSrAv5WljW1aA/items/01LRCMNGPGDA4PSPHWF5AZN45DNO37BP3Z?%24select=id%2Creactions%2Ctrending&%24expand=insights(%24expand%3DkeyPoints)%2Canalytics(%24expand%3DallTime(%24expand%3Dactivities))%2CrecommendedActionSet(%24expand%3DnonAggregatedRecommendedActions%2CaggregatedEditRecommendedAction(%24expand%3DimportantActorsAndActivities))%2CconversationSet(%24expand%3DemailConversations(%24expand%3Dparticipants)%2CmeetingConversations(%24expand%3Dparticipants)%2CteamsConversations(%24expand%3Dparticipants))`
18
- 7. Note the portion between `/drives/` and `/items`/. This is your driveId. In the above example it is `b!qpDLiXd5LUGCFTHHTbcte07zDZGO-jpHhga5szhvDwEvhFVvV24OSrAv5WljW1aA`.
24
+ 1. Note the portion between `/drives/` and `/items`/. This is your driveId. In the above example it is `b!qpDLiXd5LUGCFTHHTbcte07zDZGO-jpHhga5szhvDwEvhFVvV24OSrAv5WljW1aA`.
19
25
 
20
26
 
21
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microsoft-graph",
3
- "version": "3.2.2",
3
+ "version": "3.2.3",
4
4
  "description": "Microsoft GraphAPI SDK for NodeJS",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",