microsoft-graph 2.15.0 → 2.15.1

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.
@@ -21,16 +21,16 @@ function listDriveItemChildren(parentRef, take = 1000) {
21
21
  headers: {},
22
22
  body: null,
23
23
  responseTransform: (response) => {
24
- const r = response;
24
+ const result = response;
25
25
  return {
26
- value: r.value.map((item) => {
26
+ value: result.value.map((item) => {
27
27
  const itemRef = (0, driveItem_ts_1.createDriveItemRef)(parentRef, item.id);
28
28
  return {
29
29
  ...item,
30
30
  ...itemRef,
31
31
  };
32
32
  }),
33
- "@odata.nextLink": r["@odata.nextLink"] ?? null,
33
+ "@odata.nextLink": result["@odata.nextLink"] ?? null,
34
34
  };
35
35
  },
36
36
  });
@@ -1 +1 @@
1
- {"version":3,"file":"listDriveItems.d.ts","sourceRoot":"","sources":["../../../src/tasks/listDriveItems.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAMtD,wBAA8B,cAAc,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,SAAO,GAAG,OAAO,CAAC,CAAC,SAAS,GAAG,YAAY,CAAC,EAAE,CAAC,CAwBvI"}
1
+ {"version":3,"file":"listDriveItems.d.ts","sourceRoot":"","sources":["../../../src/tasks/listDriveItems.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAGlE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAOtD,wBAA8B,cAAc,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,SAAO,GAAG,OAAO,CAAC,CAAC,SAAS,GAAG,YAAY,CAAC,EAAE,CAAC,CAiCvI"}
@@ -8,6 +8,7 @@ const graphApi_ts_1 = require("../graphApi.js");
8
8
  const listDriveItemChildren_ts_1 = __importDefault(require("../operations/driveItem/listDriveItemChildren.js"));
9
9
  const accessToken_ts_1 = require("../services/accessToken.js");
10
10
  const context_ts_1 = require("../services/context.js");
11
+ const driveItem_ts_1 = require("../services/driveItem.js");
11
12
  const http_ts_1 = require("../services/http.js");
12
13
  async function listDriveItems(parentRef, pageSize = 1000) {
13
14
  const output = [];
@@ -24,7 +25,14 @@ async function listDriveItems(parentRef, pageSize = 1000) {
24
25
  },
25
26
  });
26
27
  result = response.data;
27
- output.push(...result.value);
28
+ const items = result.value.map((item) => {
29
+ const itemRef = (0, driveItem_ts_1.createDriveItemRef)(parentRef, item.id);
30
+ return {
31
+ ...item,
32
+ ...itemRef,
33
+ };
34
+ });
35
+ output.push(...items);
28
36
  }
29
37
  return output;
30
38
  }
@@ -18,16 +18,16 @@ export default function listDriveItemChildren(parentRef, take = 1000) {
18
18
  headers: {},
19
19
  body: null,
20
20
  responseTransform: (response) => {
21
- const r = response;
21
+ const result = response;
22
22
  return {
23
- value: r.value.map((item) => {
23
+ value: result.value.map((item) => {
24
24
  const itemRef = createDriveItemRef(parentRef, item.id);
25
25
  return {
26
26
  ...item,
27
27
  ...itemRef,
28
28
  };
29
29
  }),
30
- "@odata.nextLink": r["@odata.nextLink"] ?? null,
30
+ "@odata.nextLink": result["@odata.nextLink"] ?? null,
31
31
  };
32
32
  },
33
33
  });
@@ -1 +1 @@
1
- {"version":3,"file":"listDriveItems.d.ts","sourceRoot":"","sources":["../../../src/tasks/listDriveItems.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAMtD,wBAA8B,cAAc,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,SAAO,GAAG,OAAO,CAAC,CAAC,SAAS,GAAG,YAAY,CAAC,EAAE,CAAC,CAwBvI"}
1
+ {"version":3,"file":"listDriveItems.d.ts","sourceRoot":"","sources":["../../../src/tasks/listDriveItems.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAGlE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAOtD,wBAA8B,cAAc,CAAC,SAAS,EAAE,QAAQ,GAAG,YAAY,EAAE,QAAQ,SAAO,GAAG,OAAO,CAAC,CAAC,SAAS,GAAG,YAAY,CAAC,EAAE,CAAC,CAiCvI"}
@@ -2,6 +2,7 @@ import { authenticationScope } from "../graphApi.js";
2
2
  import listDriveItemChildren from "../operations/driveItem/listDriveItemChildren.js";
3
3
  import { getCurrentAccessToken } from "../services/accessToken.js";
4
4
  import { getContext } from "../services/context.js";
5
+ import { createDriveItemRef } from "../services/driveItem.js";
5
6
  import { executeHttpRequest } from "../services/http.js";
6
7
  export default async function listDriveItems(parentRef, pageSize = 1000) {
7
8
  const output = [];
@@ -18,7 +19,14 @@ export default async function listDriveItems(parentRef, pageSize = 1000) {
18
19
  },
19
20
  });
20
21
  result = response.data;
21
- output.push(...result.value);
22
+ const items = result.value.map((item) => {
23
+ const itemRef = createDriveItemRef(parentRef, item.id);
24
+ return {
25
+ ...item,
26
+ ...itemRef,
27
+ };
28
+ });
29
+ output.push(...items);
22
30
  }
23
31
  return output;
24
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microsoft-graph",
3
- "version": "2.15.0",
3
+ "version": "2.15.1",
4
4
  "description": "Microsoft GraphAPI SDK for NodeJS",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",