microsoft-graph 3.8.0 → 3.9.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.
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * Utilities for iterating over AsyncIterables.
3
+ * Collects all items from an Iterable or AsyncIterable into an array, optionally converting each item.
3
4
  * @module Iteration
4
5
  * @category Services
6
+ * @template TIn The type of items in the input iterable.
7
+ * @template TOut The type of items in the resulting array (after conversion).
8
+ * @param {Iterable<TIn> | AsyncIterable<TIn>} iterable - The iterable or async iterable to collect items from.
9
+ * @returns {Promise<TOut[]>} A promise that resolves to an array of collected (and possibly converted) items.
5
10
  */
6
- /**
7
- * Iterate over an AsyncIterable and collect all items into an array.
8
- * @param iterable
9
- * @returns Array of items collected from the iterable.
10
- */
11
- export declare function iterateToArray<T, U = T>(iterable: AsyncIterable<T>, converter?: (item: T) => U): Promise<U[]>;
11
+ export declare function iterateToArray<TIn, TOut = TIn>(iterable: Iterable<TIn> | AsyncIterable<TIn>, converter?: (item: TIn) => TOut): Promise<TOut[]>;
12
12
  //# sourceMappingURL=iteration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"iteration.d.ts","sourceRoot":"","sources":["../../../src/services/iteration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAMnH"}
1
+ {"version":3,"file":"iteration.d.ts","sourceRoot":"","sources":["../../../src/services/iteration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAAC,GAAG,EAAE,IAAI,GAAG,GAAG,EAAE,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAMpJ"}
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.iterateToArray = iterateToArray;
2
4
  /**
3
5
  * Utilities for iterating over AsyncIterables.
6
+ * Collects all items from an Iterable or AsyncIterable into an array, optionally converting each item.
4
7
  * @module Iteration
5
8
  * @category Services
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.iterateToArray = iterateToArray;
9
- /**
10
- * Iterate over an AsyncIterable and collect all items into an array.
11
- * @param iterable
12
- * @returns Array of items collected from the iterable.
9
+ * @template TIn The type of items in the input iterable.
10
+ * @template TOut The type of items in the resulting array (after conversion).
11
+ * @param {Iterable<TIn> | AsyncIterable<TIn>} iterable - The iterable or async iterable to collect items from.
12
+ * @returns {Promise<TOut[]>} A promise that resolves to an array of collected (and possibly converted) items.
13
13
  */
14
14
  async function iterateToArray(iterable, converter) {
15
15
  const result = [];
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * Utilities for iterating over AsyncIterables.
3
+ * Collects all items from an Iterable or AsyncIterable into an array, optionally converting each item.
3
4
  * @module Iteration
4
5
  * @category Services
6
+ * @template TIn The type of items in the input iterable.
7
+ * @template TOut The type of items in the resulting array (after conversion).
8
+ * @param {Iterable<TIn> | AsyncIterable<TIn>} iterable - The iterable or async iterable to collect items from.
9
+ * @returns {Promise<TOut[]>} A promise that resolves to an array of collected (and possibly converted) items.
5
10
  */
6
- /**
7
- * Iterate over an AsyncIterable and collect all items into an array.
8
- * @param iterable
9
- * @returns Array of items collected from the iterable.
10
- */
11
- export declare function iterateToArray<T, U = T>(iterable: AsyncIterable<T>, converter?: (item: T) => U): Promise<U[]>;
11
+ export declare function iterateToArray<TIn, TOut = TIn>(iterable: Iterable<TIn> | AsyncIterable<TIn>, converter?: (item: TIn) => TOut): Promise<TOut[]>;
12
12
  //# sourceMappingURL=iteration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"iteration.d.ts","sourceRoot":"","sources":["../../../src/services/iteration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAMnH"}
1
+ {"version":3,"file":"iteration.d.ts","sourceRoot":"","sources":["../../../src/services/iteration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAAC,GAAG,EAAE,IAAI,GAAG,GAAG,EAAE,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAMpJ"}
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * Utilities for iterating over AsyncIterables.
3
+ * Collects all items from an Iterable or AsyncIterable into an array, optionally converting each item.
3
4
  * @module Iteration
4
5
  * @category Services
5
- */
6
- /**
7
- * Iterate over an AsyncIterable and collect all items into an array.
8
- * @param iterable
9
- * @returns Array of items collected from the iterable.
6
+ * @template TIn The type of items in the input iterable.
7
+ * @template TOut The type of items in the resulting array (after conversion).
8
+ * @param {Iterable<TIn> | AsyncIterable<TIn>} iterable - The iterable or async iterable to collect items from.
9
+ * @returns {Promise<TOut[]>} A promise that resolves to an array of collected (and possibly converted) items.
10
10
  */
11
11
  export async function iterateToArray(iterable, converter) {
12
12
  const result = [];
@@ -3,33 +3,42 @@
3
3
  # Iteration
4
4
 
5
5
  Utilities for iterating over AsyncIterables.
6
+ Collects all items from an Iterable or AsyncIterable into an array, optionally converting each item.
7
+
8
+ ## Template
9
+
10
+ The type of items in the input iterable.
11
+
12
+ ## Template
13
+
14
+ The type of items in the resulting array (after conversion).
15
+
16
+ ## Param
17
+
18
+ The iterable or async iterable to collect items from.
6
19
 
7
20
  ## Functions
8
21
 
9
22
  ### iterateToArray()
10
23
 
11
- > **iterateToArray**\<`T`, `U`\>(`iterable`, `converter?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`U`[]\>
12
-
13
- Defined in: [src/services/iteration.ts:12](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/services/iteration.ts#L12)
24
+ > **iterateToArray**\<`TIn`, `TOut`\>(`iterable`, `converter?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`TOut`[]\>
14
25
 
15
- Iterate over an AsyncIterable and collect all items into an array.
26
+ Defined in: [src/services/iteration.ts:11](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/services/iteration.ts#L11)
16
27
 
17
28
  #### Type Parameters
18
29
 
19
30
  | Type Parameter | Default type |
20
31
  | ------ | ------ |
21
- | `T` | - |
22
- | `U` | `T` |
32
+ | `TIn` | - |
33
+ | `TOut` | `TIn` |
23
34
 
24
35
  #### Parameters
25
36
 
26
- | Parameter | Type | Description |
27
- | ------ | ------ | ------ |
28
- | `iterable` | `AsyncIterable`\<`T`\> | |
29
- | `converter?` | (`item`) => `U` | - |
37
+ | Parameter | Type |
38
+ | ------ | ------ |
39
+ | `iterable` | [`Iterable`](https://www.typescriptlang.org/docs/handbook/iterators-and-generators.html#iterable-interface)\<`TIn`, `any`, `any`\> \| `AsyncIterable`\<`TIn`, `any`, `any`\> |
40
+ | `converter?` | (`item`) => `TOut` |
30
41
 
31
42
  #### Returns
32
43
 
33
- [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`U`[]\>
34
-
35
- Array of items collected from the iterable.
44
+ [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`TOut`[]\>
@@ -164,7 +164,7 @@
164
164
  | [error](error.md) | Utilities for handling errors |
165
165
  | [http](http.md) | HTTP request utilities for Microsoft Graph API, with proxy support. |
166
166
  | [httpStatus](httpStatus.md) | Utilities for analyzing HTTP status codes for Microsoft Graph API responses. |
167
- | [Iteration](Iteration.md) | Utilities for iterating over AsyncIterables. |
167
+ | [Iteration](Iteration.md) | Utilities for iterating over AsyncIterables. Collects all items from an Iterable or AsyncIterable into an array, optionally converting each item. |
168
168
  | [objectMapping](objectMapping.md) | Automated conversion of rows to objects and vice versa based on defined mapping rules. |
169
169
  | [operationId](operationId.md) | Utilities for converting between operation IDs and indexes. |
170
170
  | [operationInvoker](operationInvoker.md) | Invoke operations, potentially as parallel or sequential batches. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microsoft-graph",
3
- "version": "3.8.0",
3
+ "version": "3.9.0",
4
4
  "description": "Microsoft GraphAPI SDK for NodeJS",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",