microsoft-graph 2.34.1 → 2.35.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.
- package/dist/cjs/services/objectMapping.d.ts +100 -0
- package/dist/cjs/services/objectMapping.d.ts.map +1 -0
- package/dist/cjs/services/objectMapping.js +143 -0
- package/dist/cjs/tasks/insertWorkbookRangeRow.d.ts +2 -2
- package/dist/cjs/tasks/insertWorkbookRangeRow.js +2 -2
- package/dist/cjs/tasks/insertWorkbookRangeRows.d.ts +3 -3
- package/dist/cjs/tasks/insertWorkbookRangeRows.js +3 -3
- package/dist/cjs/tasks/iterateWorkbookRangeRows.d.ts +1 -1
- package/dist/cjs/tasks/iterateWorkbookRangeRows.js +1 -1
- package/dist/cjs/tasks/readWorkbookRangeFirstRow.d.ts +2 -2
- package/dist/cjs/tasks/readWorkbookRangeFirstRow.js +2 -2
- package/dist/cjs/tasks/readWorkbookRangeRows.d.ts +2 -2
- package/dist/cjs/tasks/readWorkbookRangeRows.js +2 -2
- package/dist/cjs/tasks/updateWorkbookRangeFirstRow.d.ts +3 -3
- package/dist/cjs/tasks/updateWorkbookRangeFirstRow.js +3 -3
- package/dist/cjs/tasks/updateWorkbookRangeRows.d.ts +15 -6
- package/dist/cjs/tasks/updateWorkbookRangeRows.d.ts.map +1 -1
- package/dist/cjs/tasks/updateWorkbookRangeRows.js +16 -7
- package/dist/esm/services/objectMapping.d.ts +100 -0
- package/dist/esm/services/objectMapping.d.ts.map +1 -0
- package/dist/esm/services/objectMapping.js +132 -0
- package/dist/esm/tasks/insertWorkbookRangeRow.d.ts +2 -2
- package/dist/esm/tasks/insertWorkbookRangeRow.js +2 -2
- package/dist/esm/tasks/insertWorkbookRangeRows.d.ts +3 -3
- package/dist/esm/tasks/insertWorkbookRangeRows.js +3 -3
- package/dist/esm/tasks/iterateWorkbookRangeRows.d.ts +1 -1
- package/dist/esm/tasks/iterateWorkbookRangeRows.js +1 -1
- package/dist/esm/tasks/readWorkbookRangeFirstRow.d.ts +2 -2
- package/dist/esm/tasks/readWorkbookRangeFirstRow.js +2 -2
- package/dist/esm/tasks/readWorkbookRangeRows.d.ts +2 -2
- package/dist/esm/tasks/readWorkbookRangeRows.js +2 -2
- package/dist/esm/tasks/updateWorkbookRangeFirstRow.d.ts +3 -3
- package/dist/esm/tasks/updateWorkbookRangeFirstRow.js +3 -3
- package/dist/esm/tasks/updateWorkbookRangeRows.d.ts +15 -6
- package/dist/esm/tasks/updateWorkbookRangeRows.d.ts.map +1 -1
- package/dist/esm/tasks/updateWorkbookRangeRows.js +16 -7
- package/docs/api/README.md +8 -9
- package/docs/api/{insertRow.md → insertWorkbookRangeRow.md} +3 -3
- package/docs/api/{insertRows.md → insertWorkbookRangeRows.md} +5 -5
- package/docs/api/{iterateRows.md → iterateWorkbookRangeRows.md} +2 -2
- package/docs/api/objectMapping.md +225 -0
- package/docs/api/{readFirstRow.md → readWorkbookRangeFirstRow.md} +3 -3
- package/docs/api/{readRows.md → readWorkbookRangeRows.md} +4 -4
- package/docs/api/{updateFirstRow.md → updateWorkbookRangeFirstRow.md} +4 -4
- package/docs/api/{updateRows.md → updateWorkbookRangeRows.md} +19 -10
- package/docs/api/writeWorkbookRows.md +1 -1
- package/package.json +26 -51
- package/dist/cjs/models/DataSource.d.ts +0 -49
- package/dist/cjs/models/DataSource.d.ts.map +0 -1
- package/dist/cjs/models/DataSource.js +0 -8
- package/dist/cjs/services/dataSource.d.ts +0 -69
- package/dist/cjs/services/dataSource.d.ts.map +0 -1
- package/dist/cjs/services/dataSource.js +0 -193
- package/dist/esm/models/DataSource.d.ts +0 -49
- package/dist/esm/models/DataSource.d.ts.map +0 -1
- package/dist/esm/models/DataSource.js +0 -7
- package/dist/esm/services/dataSource.d.ts +0 -69
- package/dist/esm/services/dataSource.d.ts.map +0 -1
- package/dist/esm/services/dataSource.js +0 -182
- package/docs/api/DataSource-1.md +0 -191
- package/docs/api/dataSource.md +0 -204
package/docs/api/DataSource-1.md
DELETED
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
[Microsoft Graph SDK](README.md) / DataSource
|
|
2
|
-
|
|
3
|
-
# DataSource
|
|
4
|
-
|
|
5
|
-
**`Experimental`**
|
|
6
|
-
|
|
7
|
-
Tooling for easily creating, updating, and deleting items in a worksheet or range.
|
|
8
|
-
|
|
9
|
-
## Type Aliases
|
|
10
|
-
|
|
11
|
-
### DataSource\<T\>
|
|
12
|
-
|
|
13
|
-
> **DataSource**\<`T`\> = `object` & `AsyncIterable`\<[`Item`](#item)\<`T`\>\>
|
|
14
|
-
|
|
15
|
-
Defined in: [src/models/DataSource.ts:17](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/DataSource.ts#L17)
|
|
16
|
-
|
|
17
|
-
**`Experimental`**
|
|
18
|
-
|
|
19
|
-
Defines a data source for a worksheet or range.
|
|
20
|
-
|
|
21
|
-
#### Type declaration
|
|
22
|
-
|
|
23
|
-
##### bodyOffset
|
|
24
|
-
|
|
25
|
-
> **bodyOffset**: [`RowOffset`](Row.md#rowoffset)
|
|
26
|
-
|
|
27
|
-
##### bodyRef
|
|
28
|
-
|
|
29
|
-
> **bodyRef**: [`WorkbookRangeRef`](WorkbookRange-1.md#workbookrangeref)
|
|
30
|
-
|
|
31
|
-
##### coding
|
|
32
|
-
|
|
33
|
-
> **coding**: `object`
|
|
34
|
-
|
|
35
|
-
###### coding.decode
|
|
36
|
-
|
|
37
|
-
> **decode**: [`RowDecoder`](#rowdecoder)\<`T`\>
|
|
38
|
-
|
|
39
|
-
###### coding.encode
|
|
40
|
-
|
|
41
|
-
> **encode**: [`RowEncoder`](#rowencoder)\<`T`\> \| `null`
|
|
42
|
-
|
|
43
|
-
##### head
|
|
44
|
-
|
|
45
|
-
> **head**: [`ColumnName`](Column.md#columnname)[]
|
|
46
|
-
|
|
47
|
-
#### Type Parameters
|
|
48
|
-
|
|
49
|
-
| Type Parameter | Description |
|
|
50
|
-
| ------ | ------ |
|
|
51
|
-
| `T` *extends* [`RecordBase`](#recordbase) | Type of the record, extending RecordBase. |
|
|
52
|
-
|
|
53
|
-
***
|
|
54
|
-
|
|
55
|
-
### DataSourceRow
|
|
56
|
-
|
|
57
|
-
> **DataSourceRow** = [`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)\<[`ColumnName`](Column.md#columnname), [`Partial`](https://www.typescriptlang.org/docs/handbook/utility-types.html#partialtype)\<[`Cell`](Cell.md#cell)\>\>
|
|
58
|
-
|
|
59
|
-
Defined in: [src/models/DataSource.ts:55](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/DataSource.ts#L55)
|
|
60
|
-
|
|
61
|
-
**`Experimental`**
|
|
62
|
-
|
|
63
|
-
***
|
|
64
|
-
|
|
65
|
-
### Item\<T\>
|
|
66
|
-
|
|
67
|
-
> **Item**\<`T`\> = `object`
|
|
68
|
-
|
|
69
|
-
Defined in: [src/models/DataSource.ts:47](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/DataSource.ts#L47)
|
|
70
|
-
|
|
71
|
-
**`Experimental`**
|
|
72
|
-
|
|
73
|
-
Item within a data source.
|
|
74
|
-
|
|
75
|
-
#### Type Parameters
|
|
76
|
-
|
|
77
|
-
| Type Parameter |
|
|
78
|
-
| ------ |
|
|
79
|
-
| `T` *extends* [`RecordBase`](#recordbase) |
|
|
80
|
-
|
|
81
|
-
#### Properties
|
|
82
|
-
|
|
83
|
-
| Property | Type | Defined in |
|
|
84
|
-
| ------ | ------ | ------ |
|
|
85
|
-
| <a id="index"></a> `index` | [`ItemIndex`](#itemindex-1) | [src/models/DataSource.ts:48](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/DataSource.ts#L48) |
|
|
86
|
-
| <a id="record"></a> `record` | `T` | [src/models/DataSource.ts:50](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/DataSource.ts#L50) |
|
|
87
|
-
| <a id="rownumber"></a> `rowNumber` | [`RowNumber`](Row.md#rownumber) | [src/models/DataSource.ts:49](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/DataSource.ts#L49) |
|
|
88
|
-
|
|
89
|
-
***
|
|
90
|
-
|
|
91
|
-
### ItemIndex
|
|
92
|
-
|
|
93
|
-
> **ItemIndex** = `number` & `object`
|
|
94
|
-
|
|
95
|
-
Defined in: [src/models/DataSource.ts:40](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/DataSource.ts#L40)
|
|
96
|
-
|
|
97
|
-
**`Experimental`**
|
|
98
|
-
|
|
99
|
-
Item's position within a data source.
|
|
100
|
-
|
|
101
|
-
#### Type declaration
|
|
102
|
-
|
|
103
|
-
##### \_\_brand
|
|
104
|
-
|
|
105
|
-
> **\_\_brand**: `"ItemIndex"`
|
|
106
|
-
|
|
107
|
-
***
|
|
108
|
-
|
|
109
|
-
### RangeOperationCallback()
|
|
110
|
-
|
|
111
|
-
> **RangeOperationCallback** = (`rangeRef`) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
|
|
112
|
-
|
|
113
|
-
Defined in: [src/models/DataSource.ts:56](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/DataSource.ts#L56)
|
|
114
|
-
|
|
115
|
-
**`Experimental`**
|
|
116
|
-
|
|
117
|
-
#### Parameters
|
|
118
|
-
|
|
119
|
-
| Parameter | Type |
|
|
120
|
-
| ------ | ------ |
|
|
121
|
-
| `rangeRef` | [`WorkbookRangeRef`](WorkbookRange-1.md#workbookrangeref) |
|
|
122
|
-
|
|
123
|
-
#### Returns
|
|
124
|
-
|
|
125
|
-
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
|
|
126
|
-
|
|
127
|
-
***
|
|
128
|
-
|
|
129
|
-
### RecordBase
|
|
130
|
-
|
|
131
|
-
> **RecordBase** = [`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)\<`string`, [`CellValue`](Cell.md#cellvalue-1)\>
|
|
132
|
-
|
|
133
|
-
Defined in: [src/models/DataSource.ts:54](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/DataSource.ts#L54)
|
|
134
|
-
|
|
135
|
-
**`Experimental`**
|
|
136
|
-
|
|
137
|
-
***
|
|
138
|
-
|
|
139
|
-
### RowDecoder()\<T\>
|
|
140
|
-
|
|
141
|
-
> **RowDecoder**\<`T`\> = (`row`) => `T`
|
|
142
|
-
|
|
143
|
-
Defined in: [src/models/DataSource.ts:30](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/DataSource.ts#L30)
|
|
144
|
-
|
|
145
|
-
**`Experimental`**
|
|
146
|
-
|
|
147
|
-
Method to decode row into a record.
|
|
148
|
-
|
|
149
|
-
#### Type Parameters
|
|
150
|
-
|
|
151
|
-
| Type Parameter |
|
|
152
|
-
| ------ |
|
|
153
|
-
| `T` *extends* [`RecordBase`](#recordbase) |
|
|
154
|
-
|
|
155
|
-
#### Parameters
|
|
156
|
-
|
|
157
|
-
| Parameter | Type |
|
|
158
|
-
| ------ | ------ |
|
|
159
|
-
| `row` | [`DataSourceRow`](#datasourcerow) |
|
|
160
|
-
|
|
161
|
-
#### Returns
|
|
162
|
-
|
|
163
|
-
`T`
|
|
164
|
-
|
|
165
|
-
***
|
|
166
|
-
|
|
167
|
-
### RowEncoder()\<T\>
|
|
168
|
-
|
|
169
|
-
> **RowEncoder**\<`T`\> = (`record`) => [`DataSourceRow`](#datasourcerow)
|
|
170
|
-
|
|
171
|
-
Defined in: [src/models/DataSource.ts:35](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/models/DataSource.ts#L35)
|
|
172
|
-
|
|
173
|
-
**`Experimental`**
|
|
174
|
-
|
|
175
|
-
Method to encode a record into a row.
|
|
176
|
-
|
|
177
|
-
#### Type Parameters
|
|
178
|
-
|
|
179
|
-
| Type Parameter |
|
|
180
|
-
| ------ |
|
|
181
|
-
| `T` *extends* [`RecordBase`](#recordbase) |
|
|
182
|
-
|
|
183
|
-
#### Parameters
|
|
184
|
-
|
|
185
|
-
| Parameter | Type |
|
|
186
|
-
| ------ | ------ |
|
|
187
|
-
| `record` | `T` |
|
|
188
|
-
|
|
189
|
-
#### Returns
|
|
190
|
-
|
|
191
|
-
[`DataSourceRow`](#datasourcerow)
|
package/docs/api/dataSource.md
DELETED
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
[Microsoft Graph SDK](README.md) / dataSource
|
|
2
|
-
|
|
3
|
-
# dataSource
|
|
4
|
-
|
|
5
|
-
**`Experimental`**
|
|
6
|
-
|
|
7
|
-
Tooling for easily creating, updating, and deleting items in a worksheet or range.
|
|
8
|
-
|
|
9
|
-
## Functions
|
|
10
|
-
|
|
11
|
-
### createItem()
|
|
12
|
-
|
|
13
|
-
> **createItem**\<`T`\>(`source`, `record`, `after`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Item`](DataSource-1.md#item)\<`T`\>\>
|
|
14
|
-
|
|
15
|
-
Defined in: [src/services/dataSource.ts:110](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/services/dataSource.ts#L110)
|
|
16
|
-
|
|
17
|
-
**`Experimental`**
|
|
18
|
-
|
|
19
|
-
#### Type Parameters
|
|
20
|
-
|
|
21
|
-
| Type Parameter | Description |
|
|
22
|
-
| ------ | ------ |
|
|
23
|
-
| `T` *extends* [`RecordBase`](DataSource-1.md#recordbase) | Type of the record, extending RecordBase. |
|
|
24
|
-
|
|
25
|
-
#### Parameters
|
|
26
|
-
|
|
27
|
-
| Parameter | Type | Default value | Description |
|
|
28
|
-
| ------ | ------ | ------ | ------ |
|
|
29
|
-
| `source` | [`DataSource`](DataSource-1.md#datasource)\<`T`\> | `undefined` | Data source to insert into. Must be initialized. |
|
|
30
|
-
| `record` | `T` | `undefined` | Record to insert. |
|
|
31
|
-
| `after` | `null` \| [`ItemIndex`](DataSource-1.md#itemindex-1) | `null` | Index after which to insert the new item. If null, inserts at the end. If -1 inserts at top. |
|
|
32
|
-
|
|
33
|
-
#### Returns
|
|
34
|
-
|
|
35
|
-
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`Item`](DataSource-1.md#item)\<`T`\>\>
|
|
36
|
-
|
|
37
|
-
Newly created item, including its index, row number, and record.
|
|
38
|
-
|
|
39
|
-
#### Throws
|
|
40
|
-
|
|
41
|
-
If the data source is not initialized.
|
|
42
|
-
|
|
43
|
-
#### Throws
|
|
44
|
-
|
|
45
|
-
If the 'after' index is out of range.
|
|
46
|
-
|
|
47
|
-
***
|
|
48
|
-
|
|
49
|
-
### dataSourceFromRange()
|
|
50
|
-
|
|
51
|
-
> **dataSourceFromRange**\<`T`\>(`rangeRef`, `decode`, `encode`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`DataSource`](DataSource-1.md#datasource)\<`T`\>\>
|
|
52
|
-
|
|
53
|
-
Defined in: [src/services/dataSource.ts:47](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/services/dataSource.ts#L47)
|
|
54
|
-
|
|
55
|
-
**`Experimental`**
|
|
56
|
-
|
|
57
|
-
#### Type Parameters
|
|
58
|
-
|
|
59
|
-
| Type Parameter | Description |
|
|
60
|
-
| ------ | ------ |
|
|
61
|
-
| `T` *extends* [`RecordBase`](DataSource-1.md#recordbase) | Type of the record, extending RecordBase. |
|
|
62
|
-
|
|
63
|
-
#### Parameters
|
|
64
|
-
|
|
65
|
-
| Parameter | Type | Default value | Description |
|
|
66
|
-
| ------ | ------ | ------ | ------ |
|
|
67
|
-
| `rangeRef` | [`WorkbookRangeRef`](WorkbookRange-1.md#workbookrangeref) | `undefined` | Workbook range reference to define the data source on. |
|
|
68
|
-
| `decode` | [`RowDecoder`](DataSource-1.md#rowdecoder)\<`T`\> | `undefined` | Function to decode a row into a record. |
|
|
69
|
-
| `encode` | `null` \| [`RowEncoder`](DataSource-1.md#rowencoder)\<`T`\> | `null` | Function to encode a record into a row. Optional. |
|
|
70
|
-
|
|
71
|
-
#### Returns
|
|
72
|
-
|
|
73
|
-
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`DataSource`](DataSource-1.md#datasource)\<`T`\>\>
|
|
74
|
-
|
|
75
|
-
The initialized data source.
|
|
76
|
-
|
|
77
|
-
***
|
|
78
|
-
|
|
79
|
-
### dataSourceFromWorksheet()
|
|
80
|
-
|
|
81
|
-
> **dataSourceFromWorksheet**\<`T`\>(`worksheetRef`, `decode`, `encode`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`DataSource`](DataSource-1.md#datasource)\<`T`\>\>
|
|
82
|
-
|
|
83
|
-
Defined in: [src/services/dataSource.ts:34](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/services/dataSource.ts#L34)
|
|
84
|
-
|
|
85
|
-
**`Experimental`**
|
|
86
|
-
|
|
87
|
-
#### Type Parameters
|
|
88
|
-
|
|
89
|
-
| Type Parameter | Description |
|
|
90
|
-
| ------ | ------ |
|
|
91
|
-
| `T` *extends* [`RecordBase`](DataSource-1.md#recordbase) | Type of the record, extending RecordBase. |
|
|
92
|
-
|
|
93
|
-
#### Parameters
|
|
94
|
-
|
|
95
|
-
| Parameter | Type | Default value | Description |
|
|
96
|
-
| ------ | ------ | ------ | ------ |
|
|
97
|
-
| `worksheetRef` | [`WorkbookRangeRef`](WorkbookRange-1.md#workbookrangeref) | `undefined` | Workbook range reference to define the data source on. |
|
|
98
|
-
| `decode` | [`RowDecoder`](DataSource-1.md#rowdecoder)\<`T`\> | `undefined` | Function to decode a row into a record. |
|
|
99
|
-
| `encode` | `null` \| [`RowEncoder`](DataSource-1.md#rowencoder)\<`T`\> | `null` | Function to encode a record into a row. Optional. |
|
|
100
|
-
|
|
101
|
-
#### Returns
|
|
102
|
-
|
|
103
|
-
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`DataSource`](DataSource-1.md#datasource)\<`T`\>\>
|
|
104
|
-
|
|
105
|
-
The initialized data source.
|
|
106
|
-
|
|
107
|
-
***
|
|
108
|
-
|
|
109
|
-
### deleteItem()
|
|
110
|
-
|
|
111
|
-
> **deleteItem**\<`T`\>(`source`, `index`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
|
|
112
|
-
|
|
113
|
-
Defined in: [src/services/dataSource.ts:157](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/services/dataSource.ts#L157)
|
|
114
|
-
|
|
115
|
-
**`Experimental`**
|
|
116
|
-
|
|
117
|
-
#### Type Parameters
|
|
118
|
-
|
|
119
|
-
| Type Parameter | Description |
|
|
120
|
-
| ------ | ------ |
|
|
121
|
-
| `T` *extends* [`RecordBase`](DataSource-1.md#recordbase) | Type of the record, extending RecordBase. |
|
|
122
|
-
|
|
123
|
-
#### Parameters
|
|
124
|
-
|
|
125
|
-
| Parameter | Type | Description |
|
|
126
|
-
| ------ | ------ | ------ |
|
|
127
|
-
| `source` | [`DataSource`](DataSource-1.md#datasource)\<`T`\> | Data source to delete from. Must be initialized. |
|
|
128
|
-
| `index` | [`ItemIndex`](DataSource-1.md#itemindex-1) | Index of the item to delete. |
|
|
129
|
-
|
|
130
|
-
#### Returns
|
|
131
|
-
|
|
132
|
-
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
|
|
133
|
-
|
|
134
|
-
#### Throws
|
|
135
|
-
|
|
136
|
-
If the data source is not initialized.
|
|
137
|
-
|
|
138
|
-
***
|
|
139
|
-
|
|
140
|
-
### ~~listItems()~~
|
|
141
|
-
|
|
142
|
-
> **listItems**\<`T`\>(`source`): `AsyncIterable`\<[`Item`](DataSource-1.md#item)\<`T`\>\>
|
|
143
|
-
|
|
144
|
-
Defined in: [src/services/dataSource.ts:93](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/services/dataSource.ts#L93)
|
|
145
|
-
|
|
146
|
-
**`Experimental`**
|
|
147
|
-
|
|
148
|
-
#### Type Parameters
|
|
149
|
-
|
|
150
|
-
| Type Parameter | Description |
|
|
151
|
-
| ------ | ------ |
|
|
152
|
-
| `T` *extends* [`RecordBase`](DataSource-1.md#recordbase) | Type of the record, extending RecordBase. |
|
|
153
|
-
|
|
154
|
-
#### Parameters
|
|
155
|
-
|
|
156
|
-
| Parameter | Type | Description |
|
|
157
|
-
| ------ | ------ | ------ |
|
|
158
|
-
| `source` | [`DataSource`](DataSource-1.md#datasource)\<`T`\> | Data source to read from. |
|
|
159
|
-
|
|
160
|
-
#### Returns
|
|
161
|
-
|
|
162
|
-
`AsyncIterable`\<[`Item`](DataSource-1.md#item)\<`T`\>\>
|
|
163
|
-
|
|
164
|
-
Array of all items in the data source.
|
|
165
|
-
|
|
166
|
-
#### Deprecated
|
|
167
|
-
|
|
168
|
-
Iterate on the source directly using `for await (const item of source)`.
|
|
169
|
-
|
|
170
|
-
***
|
|
171
|
-
|
|
172
|
-
### updateItem()
|
|
173
|
-
|
|
174
|
-
> **updateItem**\<`T`\>(`source`, `index`, `record`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
|
|
175
|
-
|
|
176
|
-
Defined in: [src/services/dataSource.ts:138](https://github.com/Future-Secure-AI/microsoft-graph/blob/main/src/services/dataSource.ts#L138)
|
|
177
|
-
|
|
178
|
-
**`Experimental`**
|
|
179
|
-
|
|
180
|
-
#### Type Parameters
|
|
181
|
-
|
|
182
|
-
| Type Parameter | Description |
|
|
183
|
-
| ------ | ------ |
|
|
184
|
-
| `T` *extends* [`RecordBase`](DataSource-1.md#recordbase) | Type of the record, extending RecordBase. |
|
|
185
|
-
|
|
186
|
-
#### Parameters
|
|
187
|
-
|
|
188
|
-
| Parameter | Type | Description |
|
|
189
|
-
| ------ | ------ | ------ |
|
|
190
|
-
| `source` | [`DataSource`](DataSource-1.md#datasource)\<`T`\> | Data source to update. Must be initialized. |
|
|
191
|
-
| `index` | [`ItemIndex`](DataSource-1.md#itemindex-1) | Index of the item to update. |
|
|
192
|
-
| `record` | `T` | New record to write at the specified index. |
|
|
193
|
-
|
|
194
|
-
#### Returns
|
|
195
|
-
|
|
196
|
-
[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>
|
|
197
|
-
|
|
198
|
-
#### Throws
|
|
199
|
-
|
|
200
|
-
If the data source is not initialized.
|
|
201
|
-
|
|
202
|
-
#### Throws
|
|
203
|
-
|
|
204
|
-
If the index is out of range.
|