@fluidframework/odsp-driver-definitions 3.12.0 → 3.14.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/CHANGELOG.md CHANGED
@@ -1,5 +1,65 @@
1
1
  # @fluidframework/odsp-driver-definitions
2
2
 
3
+ ## 3.14.0
4
+
5
+ ### Minor Changes
6
+
7
+ #### Claims challenges from OneDrive and SharePoint can be returned to the host instead of being retried ([#28751](https://github.com/microsoft/FluidFramework/pull/28751)) [7ebb8814dc](https://github.com/microsoft/FluidFramework/commit/7ebb8814dc5f9b4fa6e9d47089c725d8f7d721d4)
8
+
9
+ A claims challenge is a 401 or 403 response with a `WWW-Authenticate` header that asks for a token with more claims.
10
+ For more information, see [Claims challenges](https://learn.microsoft.com/entra/identity-platform/claims-challenge).
11
+ By default, the driver gets a new token one time and retries the request.
12
+ It gives the decoded claims to the host's token fetcher in [`TokenFetchOptions.claims`](https://fluidframework.com/docs/api/odsp-driver-definitions/tokenfetchoptions-interface#claims-propertysignature).
13
+
14
+ Some hosts can't satisfy the challenge themselves.
15
+ For example, a service that makes requests for another client must send the challenge to that client.
16
+ These hosts can now set the new `propagateClaimsChallenges` property of [`HostStoragePolicy`](https://fluidframework.com/docs/api/odsp-driver-definitions/hoststoragepolicy-interface) to `true`.
17
+ The driver then doesn't retry the request, and the operation fails with the original authorization error.
18
+ The error has the decoded `claims`, and the raw header value in the new `wwwAuthenticate` property of [`IAuthorizationError`](https://fluidframework.com/docs/api/driver-definitions/iauthorizationerror-interface).
19
+
20
+ ```typescript
21
+ import { DriverErrorTypes } from "@fluidframework/driver-definitions/legacy";
22
+ import { OdspDocumentServiceFactory } from "@fluidframework/odsp-driver/legacy";
23
+
24
+ const documentServiceFactory = new OdspDocumentServiceFactory(
25
+ getStorageToken,
26
+ getWebsocketToken,
27
+ persistedCache,
28
+ { propagateClaimsChallenges: true },
29
+ );
30
+
31
+ // ...
32
+
33
+ if (error.errorType === DriverErrorTypes.authorizationError && error.claims) {
34
+ // Send error.wwwAuthenticate to the client, which can then get a token with the required claims.
35
+ }
36
+ ```
37
+
38
+ To identify a claims challenge, check for a non-empty `claims` value, as in the example.
39
+ Don't check for `wwwAuthenticate`, because the driver sets it on every authorization error from a response that has the header, even when `propagateClaimsChallenges` isn't `true`.
40
+
41
+ When `propagateClaimsChallenges` is `true`, the driver doesn't give the claims to the token fetcher.
42
+ So when you load the document again after the challenge is satisfied, make sure that the token fetcher returns the new token, even when [`TokenFetchOptions.refresh`](https://fluidframework.com/docs/api/odsp-driver-definitions/tokenfetchoptions-interface#refresh-propertysignature) is `false`.
43
+
44
+ As for other authorization errors, the driver clears its cached snapshot of the document when a snapshot request fails with the challenge.
45
+ But a load can still succeed, because the driver can use a cached snapshot without waiting for the service.
46
+ A later request, such as connecting to the delta stream or fetching ops, then gets the challenge, and the container closes with the error.
47
+
48
+ While the container is connected, the driver also refreshes its join session with the service in the background.
49
+ If a refresh gets the challenge, the driver ends the delta stream connection with the error, and the container reconnects.
50
+ The container then closes with the error, unless the token fetcher returns a token that satisfies the challenge.
51
+ If the container doesn't reconnect, for example because it was loaded with the [`LoaderHeader.reconnect`](https://fluidframework.com/docs/api/container-definitions/loaderheader-enum#reconnect-enummember) request header set to `false`, it closes without an error.
52
+ The host then gets the challenge when it loads the container again.
53
+
54
+ So check for a claims challenge in the error of the container's `closed` event as well as in load errors.
55
+
56
+ `propagateClaimsChallenges` also applies to [`prefetchLatestSnapshot`](https://fluidframework.com/docs/api/odsp-driver/#prefetchlatestsnapshot-function) when the factory is passed in its `odspDocumentServiceFactory` parameter.
57
+ It doesn't apply to [`OdspDriverUrlResolverForShareLink`](https://fluidframework.com/docs/api/odsp-driver/odspdriverurlresolverforsharelink-class).
58
+
59
+ ## 3.13.0
60
+
61
+ Dependency updates only.
62
+
3
63
  ## 3.12.0
4
64
 
5
65
  Dependency updates only.
@@ -44,39 +104,39 @@ Dependency updates only.
44
104
 
45
105
  ### Minor Changes
46
106
 
47
- - Removal of direct CommonJS support ([#28124](https://github.com/microsoft/FluidFramework/pull/28124)) [0f84e3b8878](https://github.com/microsoft/FluidFramework/commit/0f84e3b8878a5e75b2253976d98fd963bbd9db88)
107
+ #### Removal of direct CommonJS support ([#28124](https://github.com/microsoft/FluidFramework/pull/28124)) [0f84e3b8878](https://github.com/microsoft/FluidFramework/commit/0f84e3b8878a5e75b2253976d98fd963bbd9db88)
48
108
 
49
- Direct `require()` import is no longer directly supported.
50
- Package is transpiled as ECMAScript Module.
109
+ Direct `require()` import is no longer directly supported.
110
+ Package is transpiled as ECMAScript Module.
51
111
 
52
- See [Removal of direct CommonJS support in v3.0](https://github.com/microsoft/FluidFramework/issues/27444) for more information.
112
+ See [Removal of direct CommonJS support in v3.0](https://github.com/microsoft/FluidFramework/issues/27444) for more information.
53
113
 
54
- - Require modern TypeScript module resolution ([#27970](https://github.com/microsoft/FluidFramework/pull/27970)) [325e2016ca9](https://github.com/microsoft/FluidFramework/commit/325e2016ca9978d4a1f7552c97ba34feac9df41f)
114
+ #### Require modern TypeScript module resolution ([#27970](https://github.com/microsoft/FluidFramework/pull/27970)) [325e2016ca9](https://github.com/microsoft/FluidFramework/commit/325e2016ca9978d4a1f7552c97ba34feac9df41f)
55
115
 
56
- Fluid Framework Client packages no longer include type declaration compatibility entrypoints for TypeScript's legacy Node10 resolution mode (`"moduleResolution": "node"` or `"node10"`).
57
- Applications upgrading to Fluid Framework 3.0 must use one of the following supported configurations:
58
- - `"module": "Node16"` with `"moduleResolution": "Node16"`
59
- - `"module": "NodeNext"` with `"moduleResolution": "NodeNext"`
60
- - `"module": "ESNext"` with `"moduleResolution": "Bundler"`
116
+ Fluid Framework Client packages no longer include type declaration compatibility entrypoints for TypeScript's legacy Node10 resolution mode (`"moduleResolution": "node"` or `"node10"`).
117
+ Applications upgrading to Fluid Framework 3.0 must use one of the following supported configurations:
118
+ - `"module": "Node16"` with `"moduleResolution": "Node16"`
119
+ - `"module": "NodeNext"` with `"moduleResolution": "NodeNext"`
120
+ - `"module": "ESNext"` with `"moduleResolution": "Bundler"`
61
121
 
62
- Existing public package entrypoints exposed through `package.json` exports, including `/alpha`, `/beta`, and `/legacy`, remain available under supported module resolution modes.
122
+ Existing public package entrypoints exposed through `package.json` exports, including `/alpha`, `/beta`, and `/legacy`, remain available under supported module resolution modes.
63
123
 
64
- See [Removal of Node10 resolutions in v3.0](https://github.com/microsoft/FluidFramework/issues/27457) for more information.
124
+ See [Removal of Node10 resolutions in v3.0](https://github.com/microsoft/FluidFramework/issues/27457) for more information.
65
125
 
66
- - Client packages now target ES2022 ([#27846](https://github.com/microsoft/FluidFramework/pull/27846)) [91c78541bdd](https://github.com/microsoft/FluidFramework/commit/91c78541bddcbca5d6c5f357b023eeaee617d885)
126
+ #### Client packages now target ES2022 ([#27846](https://github.com/microsoft/FluidFramework/pull/27846)) [91c78541bdd](https://github.com/microsoft/FluidFramework/commit/91c78541bddcbca5d6c5f357b023eeaee617d885)
67
127
 
68
- The TypeScript compilation `target` and `lib` for the Fluid Framework client packages have been raised from ES2021/ES2020 to **ES2022**.
69
- The published JavaScript now uses ES2022 language features (with correspondingly less down-leveling), so consuming these packages requires a runtime that supports ES2022.
70
- All actively supported Node.js versions and evergreen browsers already meet this requirement.
128
+ The TypeScript compilation `target` and `lib` for the Fluid Framework client packages have been raised from ES2021/ES2020 to **ES2022**.
129
+ The published JavaScript now uses ES2022 language features (with correspondingly less down-leveling), so consuming these packages requires a runtime that supports ES2022.
130
+ All actively supported Node.js versions and evergreen browsers already meet this requirement.
71
131
 
72
- Note that Fluid Framework has not officially supported targets older than ES2022 since before 2.0: this is documented in [ClientRequirements.md](https://github.com/microsoft/FluidFramework/blob/main/ClientRequirements.md) as well as the README for every client package.
132
+ Note that Fluid Framework has not officially supported targets older than ES2022 since before 2.0: this is documented in [ClientRequirements.md](https://github.com/microsoft/FluidFramework/blob/main/ClientRequirements.md) as well as the README for every client package.
73
133
 
74
- It is possible this change could impact users of less up to date JavaScript runtimes.
75
- Impacted users can use a tool like [babel](https://babeljs.io/) to transpile out unsupported language features.
134
+ It is possible this change could impact users of less up to date JavaScript runtimes.
135
+ Impacted users can use a tool like [babel](https://babeljs.io/) to transpile out unsupported language features.
76
136
 
77
- - Build with TypeScript 6 ([#28052](https://github.com/microsoft/FluidFramework/pull/28052)) [7ab015c49de](https://github.com/microsoft/FluidFramework/commit/7ab015c49deec84833cdfe1fb5e1606b901f6e81)
137
+ #### Build with TypeScript 6 ([#28052](https://github.com/microsoft/FluidFramework/pull/28052)) [7ab015c49de](https://github.com/microsoft/FluidFramework/commit/7ab015c49deec84833cdfe1fb5e1606b901f6e81)
78
138
 
79
- FluidFramework Client SDK is now built using TypeScript 6. Consumers should build with TypeScript v6 or v7 or compatible tooling.
139
+ FluidFramework Client SDK is now built using TypeScript 6. Consumers should build with TypeScript v6 or v7 or compatible tooling.
80
140
 
81
141
  ## 2.116.0
82
142
 
@@ -122,9 +182,9 @@ Dependency updates only.
122
182
 
123
183
  ### Minor Changes
124
184
 
125
- - Node 22 is now the minimum supported Node.js version ([#27116](https://github.com/microsoft/FluidFramework/pull/27116)) [e8214d29663](https://github.com/microsoft/FluidFramework/commit/e8214d29663f5ee98d737daed82506a25d8de8d0)
185
+ #### Node 22 is now the minimum supported Node.js version ([#27116](https://github.com/microsoft/FluidFramework/pull/27116)) [e8214d29663](https://github.com/microsoft/FluidFramework/commit/e8214d29663f5ee98d737daed82506a25d8de8d0)
126
186
 
127
- All Fluid Framework client packages now require Node.js 22 or later. This aligns with the standing Node upgrade policy as Node 20 reaches end-of-life on April 30, 2026.
187
+ All Fluid Framework client packages now require Node.js 22 or later. This aligns with the standing Node upgrade policy as Node 20 reaches end-of-life on April 30, 2026.
128
188
 
129
189
  ## 2.93.0
130
190
 
@@ -158,13 +218,13 @@ Dependency updates only.
158
218
 
159
219
  ### Minor Changes
160
220
 
161
- - Added layerIncompatibilityError to FluidErrorTypes, ContainerErrorTypes, DriverErrorTypes and OdspErrorTypes ([#26068](https://github.com/microsoft/FluidFramework/pull/26068)) [a8532bdd903](https://github.com/microsoft/FluidFramework/commit/a8532bdd903626524f17d2ec650d8904046e5308)
221
+ #### Added layerIncompatibilityError to FluidErrorTypes, ContainerErrorTypes, DriverErrorTypes and OdspErrorTypes ([#26068](https://github.com/microsoft/FluidFramework/pull/26068)) [a8532bdd903](https://github.com/microsoft/FluidFramework/commit/a8532bdd903626524f17d2ec650d8904046e5308)
162
222
 
163
- The Fluid error type `layerIncompatibilityError` is added to `FluidErrorTypes` and is now @legacy @beta. It is also added to `ContainerErrorTypes`, `DriverErrorTypes` and `OdspErrorTypes` which extend `FluidErrorTypes`.
164
- `layerIncompatibilityError` was added as @legacy @alpha in version 2.72.0.
165
- The corresponding interface `ILayerIncompatibilityError` for errors of type `layerIncompatibilityError` is now also @legacy @beta.
223
+ The Fluid error type `layerIncompatibilityError` is added to `FluidErrorTypes` and is now @legacy @beta. It is also added to `ContainerErrorTypes`, `DriverErrorTypes` and `OdspErrorTypes` which extend `FluidErrorTypes`.
224
+ `layerIncompatibilityError` was added as @legacy @alpha in version 2.72.0.
225
+ The corresponding interface `ILayerIncompatibilityError` for errors of type `layerIncompatibilityError` is now also @legacy @beta.
166
226
 
167
- See [this issue](https://github.com/microsoft/FluidFramework/issues/25813) for more details.
227
+ See [this issue](https://github.com/microsoft/FluidFramework/issues/25813) for more details.
168
228
 
169
229
  ## 2.74.0
170
230
 
@@ -194,15 +254,15 @@ Dependency updates only.
194
254
 
195
255
  ### Minor Changes
196
256
 
197
- - Move IPersistedCache types to driver-definitions ([#25518](https://github.com/microsoft/FluidFramework/pull/25518)) [54fca68d91](https://github.com/microsoft/FluidFramework/commit/54fca68d91aeb40bdef14b1fe8b8f3c28168b6de)
257
+ #### Move IPersistedCache types to driver-definitions ([#25518](https://github.com/microsoft/FluidFramework/pull/25518)) [54fca68d91](https://github.com/microsoft/FluidFramework/commit/54fca68d91aeb40bdef14b1fe8b8f3c28168b6de)
198
258
 
199
- In an effort to decouple the driver web cache from the odsp driver a number of types have been moved from `@fluidframework/odsp-driver-definitions` to `@fluidframework/driver-definitions`. The moved types have been deprecated in `@fluidframework/odsp-driver-definitions`, and any usages should be moved to `@fluidframework/driver-definitions`.
259
+ In an effort to decouple the driver web cache from the odsp driver a number of types have been moved from `@fluidframework/odsp-driver-definitions` to `@fluidframework/driver-definitions`. The moved types have been deprecated in `@fluidframework/odsp-driver-definitions`, and any usages should be moved to `@fluidframework/driver-definitions`.
200
260
 
201
- The moved types are:
202
- - `IEntry`
203
- - `IFileEntry`
204
- - `ICacheEntry`
205
- - `IPersistedCache`
261
+ The moved types are:
262
+ - `IEntry`
263
+ - `IFileEntry`
264
+ - `ICacheEntry`
265
+ - `IPersistedCache`
206
266
 
207
267
  ## 2.61.0
208
268
 
@@ -216,9 +276,9 @@ Dependency updates only.
216
276
 
217
277
  ### Minor Changes
218
278
 
219
- - Fixed bug in parsing sensitivity label information from the ODSP join session response ([#25186](https://github.com/microsoft/FluidFramework/pull/25186)) [b74508fd4c9](https://github.com/microsoft/FluidFramework/commit/b74508fd4c9e5414cf457595e6c803e84d715b54)
279
+ #### Fixed bug in parsing sensitivity label information from the ODSP join session response ([#25186](https://github.com/microsoft/FluidFramework/pull/25186)) [b74508fd4c9](https://github.com/microsoft/FluidFramework/commit/b74508fd4c9e5414cf457595e6c803e84d715b54)
220
280
 
221
- Fixes parsing of sensitivity label information in the ODSP join session response. If there had been sensitivity label data present in the ODSP response, this data would have been double-parsed, leading to runtime errors. This issue was so far not hit in practice, because ODSP did not roll out sensitivity labels in the response yet. This bug fix gets odsp-driver ready for that rollout, which is planned to happen soon.
281
+ Fixes parsing of sensitivity label information in the ODSP join session response. If there had been sensitivity label data present in the ODSP response, this data would have been double-parsed, leading to runtime errors. This issue was so far not hit in practice, because ODSP did not roll out sensitivity labels in the response yet. This bug fix gets odsp-driver ready for that rollout, which is planned to happen soon.
222
282
 
223
283
  ## 2.52.0
224
284
 
@@ -320,9 +380,9 @@ Dependency updates only.
320
380
 
321
381
  ### Minor Changes
322
382
 
323
- - Update to TypeScript 5.4 ([#21214](https://github.com/microsoft/FluidFramework/pull/21214)) [0e6256c722](https://github.com/microsoft/FluidFramework/commit/0e6256c722d8bf024f4325bf02547daeeb18bfa6)
383
+ #### Update to TypeScript 5.4 ([#21214](https://github.com/microsoft/FluidFramework/pull/21214)) [0e6256c722](https://github.com/microsoft/FluidFramework/commit/0e6256c722d8bf024f4325bf02547daeeb18bfa6)
324
384
 
325
- Update package implementations to use TypeScript 5.4.5.
385
+ Update package implementations to use TypeScript 5.4.5.
326
386
 
327
387
  ## 2.0.0-rc.4.0.0
328
388
 
@@ -332,80 +392,80 @@ Dependency updates only.
332
392
 
333
393
  ### Major Changes
334
394
 
335
- - Packages now use package.json "exports" and require modern module resolution [97d68aa06b](https://github.com/microsoft/FluidFramework/commit/97d68aa06bd5c022ecb026655814aea222a062ae)
395
+ #### Packages now use package.json "exports" and require modern module resolution [97d68aa06b](https://github.com/microsoft/FluidFramework/commit/97d68aa06bd5c022ecb026655814aea222a062ae)
336
396
 
337
- Fluid Framework packages have been updated to use the [package.json "exports"
338
- field](https://nodejs.org/docs/latest-v18.x/api/packages.html#exports) to define explicit entry points for both
339
- TypeScript types and implementation code.
397
+ Fluid Framework packages have been updated to use the [package.json "exports"
398
+ field](https://nodejs.org/docs/latest-v18.x/api/packages.html#exports) to define explicit entry points for both
399
+ TypeScript types and implementation code.
340
400
 
341
- This means that using Fluid Framework packages require the following TypeScript settings in tsconfig.json:
342
- - `"moduleResolution": "Node16"` with `"module": "Node16"`
343
- - `"moduleResolution": "Bundler"` with `"module": "ESNext"`
401
+ This means that using Fluid Framework packages require the following TypeScript settings in tsconfig.json:
402
+ - `"moduleResolution": "Node16"` with `"module": "Node16"`
403
+ - `"moduleResolution": "Bundler"` with `"module": "ESNext"`
344
404
 
345
- We recommend using Node16/Node16 unless absolutely necessary. That will produce transpiled JavaScript that is suitable
346
- for use with modern versions of Node.js _and_ Bundlers.
347
- [See the TypeScript documentation](https://www.typescriptlang.org/tsconfig#moduleResolution) for more information
348
- regarding the module and moduleResolution options.
405
+ We recommend using Node16/Node16 unless absolutely necessary. That will produce transpiled JavaScript that is suitable
406
+ for use with modern versions of Node.js _and_ Bundlers.
407
+ [See the TypeScript documentation](https://www.typescriptlang.org/tsconfig#moduleResolution) for more information
408
+ regarding the module and moduleResolution options.
349
409
 
350
- **Node10 moduleResolution is not supported; it does not support Fluid Framework's API structuring pattern that is used
351
- to distinguish stable APIs from those that are in development.**
410
+ **Node10 moduleResolution is not supported; it does not support Fluid Framework's API structuring pattern that is used
411
+ to distinguish stable APIs from those that are in development.**
352
412
 
353
413
  ## 2.0.0-rc.2.0.0
354
414
 
355
415
  ### Minor Changes
356
416
 
357
- - Deprecated error-related enums have been removed ([#19067](https://github.com/microsoft/FluidFramework/issues/19067)) [59793302e5](https://github.com/microsoft/FluidFramework/commits/59793302e56784cfb6ace0e6469345f3565b3312)
417
+ #### Deprecated error-related enums have been removed ([#19067](https://github.com/microsoft/FluidFramework/issues/19067)) [59793302e5](https://github.com/microsoft/FluidFramework/commits/59793302e56784cfb6ace0e6469345f3565b3312)
358
418
 
359
- Error-related enums `ContainerErrorType`, `DriverErrorType`, `OdspErrorType` and `RouterliciousErrorType` were previously
360
- deprecated and are now removed. There are replacement object-based enumerations of `ContainerErrorTypes`,
361
- `DriverErrorTypes`, `OdspErrorTypes` and `RouterliciousErrorTypes`. Refer to the release notes of [Fluid Framework version
362
- 2.0.0-internal.7.0.0](https://github.com/microsoft/FluidFramework/releases/tag/client_v2.0.0-internal.7.0.0) for details
363
- on the replacements.
419
+ Error-related enums `ContainerErrorType`, `DriverErrorType`, `OdspErrorType` and `RouterliciousErrorType` were previously
420
+ deprecated and are now removed. There are replacement object-based enumerations of `ContainerErrorTypes`,
421
+ `DriverErrorTypes`, `OdspErrorTypes` and `RouterliciousErrorTypes`. Refer to the release notes of [Fluid Framework version
422
+ 2.0.0-internal.7.0.0](https://github.com/microsoft/FluidFramework/releases/tag/client_v2.0.0-internal.7.0.0) for details
423
+ on the replacements.
364
424
 
365
- - odsp-driver: Removed deprecated implementation of SingleRT feature ([#18690](https://github.com/microsoft/FluidFramework/issues/18690)) [430205cff1](https://github.com/microsoft/FluidFramework/commits/430205cff1ba8a1a7b13b4d42d12babaae596708)
425
+ #### odsp-driver: Removed deprecated implementation of SingleRT feature ([#18690](https://github.com/microsoft/FluidFramework/issues/18690)) [430205cff1](https://github.com/microsoft/FluidFramework/commits/430205cff1ba8a1a7b13b4d42d12babaae596708)
366
426
 
367
- Removed the deprecated logic of creating sharing-links with container attach (called SingleRT) which was enabled via enableShareLinkWithCreate flag in HostStoragePolicy. This change removes SharingLinkTypes interface definition, removes other deprecated properties from the odsp-driver's resolvedUrl object and also removes the enableShareLinkWithCreate flag. The newer version of SingleRT feature continues to exist, which can be enabled via enableSingleRequestForShareLinkWithCreate feature flag in HostStoragePolicy.
427
+ Removed the deprecated logic of creating sharing-links with container attach (called SingleRT) which was enabled via enableShareLinkWithCreate flag in HostStoragePolicy. This change removes SharingLinkTypes interface definition, removes other deprecated properties from the odsp-driver's resolvedUrl object and also removes the enableShareLinkWithCreate flag. The newer version of SingleRT feature continues to exist, which can be enabled via enableSingleRequestForShareLinkWithCreate feature flag in HostStoragePolicy.
368
428
 
369
- - container-definitions: Added containerMetadata prop on IContainer interface ([#19142](https://github.com/microsoft/FluidFramework/issues/19142)) [d0d77f3516](https://github.com/microsoft/FluidFramework/commits/d0d77f3516d67f3c9faedb47b20dbd4e309c3bc2)
429
+ #### container-definitions: Added containerMetadata prop on IContainer interface ([#19142](https://github.com/microsoft/FluidFramework/issues/19142)) [d0d77f3516](https://github.com/microsoft/FluidFramework/commits/d0d77f3516d67f3c9faedb47b20dbd4e309c3bc2)
370
430
 
371
- Added `containerMetadata` prop on IContainer interface.
431
+ Added `containerMetadata` prop on IContainer interface.
372
432
 
373
- - runtime-definitions: Moved ISignalEnvelope interface to core-interfaces ([#19142](https://github.com/microsoft/FluidFramework/issues/19142)) [d0d77f3516](https://github.com/microsoft/FluidFramework/commits/d0d77f3516d67f3c9faedb47b20dbd4e309c3bc2)
433
+ #### runtime-definitions: Moved ISignalEnvelope interface to core-interfaces ([#19142](https://github.com/microsoft/FluidFramework/issues/19142)) [d0d77f3516](https://github.com/microsoft/FluidFramework/commits/d0d77f3516d67f3c9faedb47b20dbd4e309c3bc2)
374
434
 
375
- The `ISignalEnvelope` interface has been moved to the @fluidframework/core-interfaces package.
435
+ The `ISignalEnvelope` interface has been moved to the @fluidframework/core-interfaces package.
376
436
 
377
437
  ## 2.0.0-rc.1.0.0
378
438
 
379
439
  ### Minor Changes
380
440
 
381
- - Updated server dependencies ([#19122](https://github.com/microsoft/FluidFramework/issues/19122)) [25366b4229](https://github.com/microsoft/FluidFramework/commits/25366b422918cb43685c5f328b50450749592902)
382
-
383
- The following Fluid server dependencies have been updated to the latest version, 3.0.0. [See the full changelog.](https://github.com/microsoft/FluidFramework/releases/tag/server_v3.0.0)
384
- - @fluidframework/gitresources
385
- - @fluidframework/server-kafka-orderer
386
- - @fluidframework/server-lambdas
387
- - @fluidframework/server-lambdas-driver
388
- - @fluidframework/server-local-server
389
- - @fluidframework/server-memory-orderer
390
- - @fluidframework/protocol-base
391
- - @fluidframework/server-routerlicious
392
- - @fluidframework/server-routerlicious-base
393
- - @fluidframework/server-services
394
- - @fluidframework/server-services-client
395
- - @fluidframework/server-services-core
396
- - @fluidframework/server-services-ordering-kafkanode
397
- - @fluidframework/server-services-ordering-rdkafka
398
- - @fluidframework/server-services-ordering-zookeeper
399
- - @fluidframework/server-services-shared
400
- - @fluidframework/server-services-telemetry
401
- - @fluidframework/server-services-utils
402
- - @fluidframework/server-test-utils
403
- - tinylicious
404
-
405
- - Updated @fluidframework/protocol-definitions ([#19122](https://github.com/microsoft/FluidFramework/issues/19122)) [25366b4229](https://github.com/microsoft/FluidFramework/commits/25366b422918cb43685c5f328b50450749592902)
406
-
407
- The @fluidframework/protocol-definitions dependency has been upgraded to v3.1.0. [See the full
408
- changelog.](https://github.com/microsoft/FluidFramework/blob/main/common/lib/protocol-definitions/CHANGELOG.md#310)
441
+ #### Updated server dependencies ([#19122](https://github.com/microsoft/FluidFramework/issues/19122)) [25366b4229](https://github.com/microsoft/FluidFramework/commits/25366b422918cb43685c5f328b50450749592902)
442
+
443
+ The following Fluid server dependencies have been updated to the latest version, 3.0.0. [See the full changelog.](https://github.com/microsoft/FluidFramework/releases/tag/server_v3.0.0)
444
+ - @fluidframework/gitresources
445
+ - @fluidframework/server-kafka-orderer
446
+ - @fluidframework/server-lambdas
447
+ - @fluidframework/server-lambdas-driver
448
+ - @fluidframework/server-local-server
449
+ - @fluidframework/server-memory-orderer
450
+ - @fluidframework/protocol-base
451
+ - @fluidframework/server-routerlicious
452
+ - @fluidframework/server-routerlicious-base
453
+ - @fluidframework/server-services
454
+ - @fluidframework/server-services-client
455
+ - @fluidframework/server-services-core
456
+ - @fluidframework/server-services-ordering-kafkanode
457
+ - @fluidframework/server-services-ordering-rdkafka
458
+ - @fluidframework/server-services-ordering-zookeeper
459
+ - @fluidframework/server-services-shared
460
+ - @fluidframework/server-services-telemetry
461
+ - @fluidframework/server-services-utils
462
+ - @fluidframework/server-test-utils
463
+ - tinylicious
464
+
465
+ #### Updated @fluidframework/protocol-definitions ([#19122](https://github.com/microsoft/FluidFramework/issues/19122)) [25366b4229](https://github.com/microsoft/FluidFramework/commits/25366b422918cb43685c5f328b50450749592902)
466
+
467
+ The @fluidframework/protocol-definitions dependency has been upgraded to v3.1.0. [See the full
468
+ changelog.](https://github.com/microsoft/FluidFramework/blob/main/common/lib/protocol-definitions/CHANGELOG.md#310)
409
469
 
410
470
  ## 2.0.0-internal.8.0.0
411
471
 
@@ -431,64 +491,64 @@ Dependency updates only.
431
491
 
432
492
  ### Major Changes
433
493
 
434
- - odsp-driver: Load container in readonly mode when driver throws DriverErrorType.outOfStorage [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
435
-
436
- Handle DriverErrorType.outOfStorage error from driver and load the container in readonly mode. Currently there is no
437
- handling and when the join session throws this error, the container will get closed. With this we use NoDeltaStream
438
- object as connection and load the container in read mode, so that it loads properly. We also notify the that the
439
- container is "readonly" through the event on delta manager so that apps can listen to this and show any UX etc. The app
440
- can listen to the event like this:
441
-
442
- ```ts
443
- container.deltaManager.on(
444
- "readonly",
445
- (
446
- readonly?: boolean,
447
- readonlyConnectionReason?: { text: string; error?: IErrorBase },
448
- ) => {
449
- // error?.errorType will be equal to DriverErrorType.outOfStorage in this case
450
- // App logic
451
- },
452
- );
453
- ```
454
-
455
- - Dependencies on @fluidframework/protocol-definitions package updated to 3.0.0 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
456
-
457
- This included the following changes from the protocol-definitions release:
458
- - Updating signal interfaces for some planned improvements. The intention is split the interface between signals
459
- submitted by clients to the server and the resulting signals sent from the server to clients.
460
- - A new optional type member is available on the ISignalMessage interface and a new ISentSignalMessage interface has
461
- been added, which will be the typing for signals sent from the client to the server. Both extend a new
462
- ISignalMessageBase interface that contains common members.
463
- - The @fluidframework/common-definitions package dependency has been updated to version 1.0.0.
464
-
465
- - Server upgrade: dependencies on Fluid server packages updated to 2.0.1 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
466
-
467
- Dependencies on the following Fluid server package have been updated to version 2.0.1:
468
- - @fluidframework/gitresources: 2.0.1
469
- - @fluidframework/server-kafka-orderer: 2.0.1
470
- - @fluidframework/server-lambdas: 2.0.1
471
- - @fluidframework/server-lambdas-driver: 2.0.1
472
- - @fluidframework/server-local-server: 2.0.1
473
- - @fluidframework/server-memory-orderer: 2.0.1
474
- - @fluidframework/protocol-base: 2.0.1
475
- - @fluidframework/server-routerlicious: 2.0.1
476
- - @fluidframework/server-routerlicious-base: 2.0.1
477
- - @fluidframework/server-services: 2.0.1
478
- - @fluidframework/server-services-client: 2.0.1
479
- - @fluidframework/server-services-core: 2.0.1
480
- - @fluidframework/server-services-ordering-kafkanode: 2.0.1
481
- - @fluidframework/server-services-ordering-rdkafka: 2.0.1
482
- - @fluidframework/server-services-ordering-zookeeper: 2.0.1
483
- - @fluidframework/server-services-shared: 2.0.1
484
- - @fluidframework/server-services-telemetry: 2.0.1
485
- - @fluidframework/server-services-utils: 2.0.1
486
- - @fluidframework/server-test-utils: 2.0.1
487
- - tinylicious: 2.0.1
488
-
489
- - Minimum TypeScript version now 5.1.6 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
490
-
491
- The minimum supported TypeScript version for Fluid 2.0 clients is now 5.1.6.
494
+ #### odsp-driver: Load container in readonly mode when driver throws DriverErrorType.outOfStorage [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
495
+
496
+ Handle DriverErrorType.outOfStorage error from driver and load the container in readonly mode. Currently there is no
497
+ handling and when the join session throws this error, the container will get closed. With this we use NoDeltaStream
498
+ object as connection and load the container in read mode, so that it loads properly. We also notify the that the
499
+ container is "readonly" through the event on delta manager so that apps can listen to this and show any UX etc. The app
500
+ can listen to the event like this:
501
+
502
+ ```ts
503
+ container.deltaManager.on(
504
+ "readonly",
505
+ (
506
+ readonly?: boolean,
507
+ readonlyConnectionReason?: { text: string; error?: IErrorBase },
508
+ ) => {
509
+ // error?.errorType will be equal to DriverErrorType.outOfStorage in this case
510
+ // App logic
511
+ },
512
+ );
513
+ ```
514
+
515
+ #### Dependencies on @fluidframework/protocol-definitions package updated to 3.0.0 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
516
+
517
+ This included the following changes from the protocol-definitions release:
518
+ - Updating signal interfaces for some planned improvements. The intention is split the interface between signals
519
+ submitted by clients to the server and the resulting signals sent from the server to clients.
520
+ - A new optional type member is available on the ISignalMessage interface and a new ISentSignalMessage interface has
521
+ been added, which will be the typing for signals sent from the client to the server. Both extend a new
522
+ ISignalMessageBase interface that contains common members.
523
+ - The @fluidframework/common-definitions package dependency has been updated to version 1.0.0.
524
+
525
+ #### Server upgrade: dependencies on Fluid server packages updated to 2.0.1 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
526
+
527
+ Dependencies on the following Fluid server package have been updated to version 2.0.1:
528
+ - @fluidframework/gitresources: 2.0.1
529
+ - @fluidframework/server-kafka-orderer: 2.0.1
530
+ - @fluidframework/server-lambdas: 2.0.1
531
+ - @fluidframework/server-lambdas-driver: 2.0.1
532
+ - @fluidframework/server-local-server: 2.0.1
533
+ - @fluidframework/server-memory-orderer: 2.0.1
534
+ - @fluidframework/protocol-base: 2.0.1
535
+ - @fluidframework/server-routerlicious: 2.0.1
536
+ - @fluidframework/server-routerlicious-base: 2.0.1
537
+ - @fluidframework/server-services: 2.0.1
538
+ - @fluidframework/server-services-client: 2.0.1
539
+ - @fluidframework/server-services-core: 2.0.1
540
+ - @fluidframework/server-services-ordering-kafkanode: 2.0.1
541
+ - @fluidframework/server-services-ordering-rdkafka: 2.0.1
542
+ - @fluidframework/server-services-ordering-zookeeper: 2.0.1
543
+ - @fluidframework/server-services-shared: 2.0.1
544
+ - @fluidframework/server-services-telemetry: 2.0.1
545
+ - @fluidframework/server-services-utils: 2.0.1
546
+ - @fluidframework/server-test-utils: 2.0.1
547
+ - tinylicious: 2.0.1
548
+
549
+ #### Minimum TypeScript version now 5.1.6 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
550
+
551
+ The minimum supported TypeScript version for Fluid 2.0 clients is now 5.1.6.
492
552
 
493
553
  ## 2.0.0-internal.6.4.0
494
554
 
@@ -510,9 +570,9 @@ Dependency updates only.
510
570
 
511
571
  ### Major Changes
512
572
 
513
- - Upgraded typescript transpilation target to ES2020 [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
573
+ #### Upgraded typescript transpilation target to ES2020 [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
514
574
 
515
- Upgraded typescript transpilation target to ES2020. This is done in order to decrease the bundle sizes of Fluid Framework packages. This has provided size improvements across the board for ex. Loader, Driver, Runtime etc. Reduced bundle sizes helps to load lesser code in apps and hence also helps to improve the perf.If any app wants to target any older versions of browsers with which this target version is not compatible, then they can use packages like babel to transpile to a older target.
575
+ Upgraded typescript transpilation target to ES2020. This is done in order to decrease the bundle sizes of Fluid Framework packages. This has provided size improvements across the board for ex. Loader, Driver, Runtime etc. Reduced bundle sizes helps to load lesser code in apps and hence also helps to improve the perf.If any app wants to target any older versions of browsers with which this target version is not compatible, then they can use packages like babel to transpile to a older target.
516
576
 
517
577
  ## 2.0.0-internal.5.4.0
518
578
 
@@ -522,11 +582,11 @@ Dependency updates only.
522
582
 
523
583
  ### Minor Changes
524
584
 
525
- - New interfaces to discover getRelaySessionInfo API ([#16300](https://github.com/microsoft/FluidFramework/issues/16300)) [a25789cd37](https://github.com/microsoft/FluidFramework/commits/a25789cd37bf60ebc4a08e1a9f7eaa8c65f4eae2)
585
+ #### New interfaces to discover getRelaySessionInfo API ([#16300](https://github.com/microsoft/FluidFramework/issues/16300)) [a25789cd37](https://github.com/microsoft/FluidFramework/commits/a25789cd37bf60ebc4a08e1a9f7eaa8c65f4eae2)
526
586
 
527
- There are new interfaces `IRelaySessionAwareDriverFactory` and `IProvideSessionAwareDriverFactory` in
528
- odsp-driver-definitions that enable using the provider pattern to discover the new API `getRelaySessionInfo` in
529
- odsp-driver.
587
+ There are new interfaces `IRelaySessionAwareDriverFactory` and `IProvideSessionAwareDriverFactory` in
588
+ odsp-driver-definitions that enable using the provider pattern to discover the new API `getRelaySessionInfo` in
589
+ odsp-driver.
530
590
 
531
591
  ## 2.0.0-internal.5.2.0
532
592
 
@@ -26,6 +26,7 @@ export interface HostStoragePolicy {
26
26
  // (undocumented)
27
27
  opsBatchSize?: number;
28
28
  opsCaching?: IOpsCachingPolicy;
29
+ propagateClaimsChallenges?: boolean;
29
30
  sessionOptions?: ICollabSessionOptions;
30
31
  // (undocumented)
31
32
  snapshotOptions?: ISnapshotOptions;
package/dist/factory.d.ts CHANGED
@@ -160,5 +160,26 @@ export interface HostStoragePolicy {
160
160
  * as false. This is if the host wants to do some A/B testing.
161
161
  */
162
162
  avoidPrefetchSnapshotCache?: boolean;
163
+ /**
164
+ * Controls how the driver handles a claims challenge from the service.
165
+ *
166
+ * @remarks
167
+ * A claims challenge is a 401 or 403 response with a `WWW-Authenticate` header that contains `error="insufficient_claims"` and a `claims` value.
168
+ * For more information, see {@link https://learn.microsoft.com/entra/identity-platform/claims-challenge | Claims challenges}.
169
+ *
170
+ * By default, the driver gets a new token one time, with the decoded claims in {@link TokenFetchOptions.claims}, and retries the request.
171
+ *
172
+ * Set this policy to `true` when the host cannot satisfy the challenge itself, for example, a service that makes requests for another client.
173
+ * The driver then does not retry the request or give the claims to the token fetcher.
174
+ * The operation fails with the original {@link @fluidframework/driver-definitions#IAuthorizationError}, which has `claims` and `wwwAuthenticate` set.
175
+ * The host can get this error from a load or from the container's `closed` event.
176
+ * To identify a claims challenge, check for a non-empty `claims` value, because `wwwAuthenticate` is set whenever the response has the header.
177
+ * After the challenge is satisfied, the token fetcher must return the new token, even when {@link TokenFetchOptions.refresh} is `false`.
178
+ *
179
+ * This policy also applies to `prefetchLatestSnapshot` when the factory is given to it, but not to `OdspDriverUrlResolverForShareLink`.
180
+ *
181
+ * @defaultValue `false`
182
+ */
183
+ propagateClaimsChallenges?: boolean;
163
184
  }
164
185
  //# sourceMappingURL=factory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,WAAW,gB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AAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAE/B;;OAEG;IACH,cAAc,CAAC,EAAE,qBAAqB,CAAC;IAEvC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;OAGG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;;;;;;;OASG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC;;;;;;;OAOG;IACH,yCAAyC,CAAC,EAAE,OAAO,CAAC;IAEpD;;;OAGG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;IAErC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACpC"}
@@ -1 +1 @@
1
- {"version":3,"file":"factory.js","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @legacy\n * @beta\n */\nexport interface ISnapshotOptions {\n\tblobs?: number;\n\tdeltas?: number;\n\tchannels?: number;\n\n\t/**\n\t * Maximum Data size (in bytes)\n\t *\n\t * @remarks\n\t * If specified, SPO will fail snapshot request with 413 error (see {@link @fluidframework/odsp-driver-definitions#(OdspErrorTypes:variable).snapshotTooBig})\n\t * if snapshot is bigger in size than specified limit.\n\t */\n\tmds?: number;\n\n\t/*\n\t * Maximum time limit to fetch snapshot (in seconds)\n\t * If specified, client will timeout the fetch request if it exceeds the time limit and\n\t * will try to fetch the snapshot without blobs.\n\t */\n\ttimeout?: number;\n}\n\n/**\n * @legacy\n * @beta\n */\nexport interface IOpsCachingPolicy {\n\t/**\n\t * Batch size. Controls how many ops are grouped together as single cache entry\n\t * The bigger the number, the more efficient it is (less reads & writes)\n\t * At the same time, big number means we wait for so many ops to accumulate, which\n\t * increases chances and number of trailing ops that would not be flushed to cache\n\t * when user closes tab\n\t * Use any number below 1 to disable caching\n\t * Default: 100\n\t */\n\tbatchSize?: number;\n\n\t/**\n\t * To reduce the problem of losing trailing ops when using big batch sizes, host\n\t * could specify how often driver should flush ops it has not flushed yet.\n\t * -1 means do not use timer.\n\t * Measured in ms.\n\t * Default: 5000\n\t */\n\ttimerGranularity?: number;\n\n\t/**\n\t * Total number of ops to cache. When we reach that number, ops caching stops\n\t * Default: 5000\n\t */\n\ttotalOpsToCache?: number;\n}\n\n/**\n * @legacy\n * @beta\n */\nexport interface ICollabSessionOptions {\n\t/**\n\t * Value indicating the display name for session that admits unauthenticated user.\n\t * This name will be used in attribution associated with edits made by such user.\n\t * @deprecated starting in 2.0-RC3. No longer needed.\n\t */\n\tunauthenticatedUserDisplayName?: string;\n\t/**\n\t * Value indicating session preference to always pass access token via Authorization header.\n\t * Default behavior is to pass access token via query parameter unless overall href string\n\t * length exceeds 2048 characters. Using query param is performance optimization which results\n\t * in ODSP XHR request being treated as 'simple' request which do not require OPTIONS call to\n\t * validate CORS. However, not all ODSP implementations understand this optimization.\n\t * For instance, auth layer on Converged stack will fail request with access token passed via\n\t * query param.\n\t * @deprecated Due to security reasons we will be passing the token via Authorization header only.\n\t */\n\tforceAccessTokenViaAuthorizationHeader?: boolean;\n\t/**\n\t * Value indicating the client display name for current session.\n\t * This name will be used in attribution associated with edits made during session.\n\t * This is optional and used only when collab session is being joined by client acting in app-only mode (i.e. without user context).\n\t * If not specified client display name is extracted from the access token that is used to join session.\n\t */\n\tdisplayName?: string;\n}\n\n/**\n * @legacy\n * @beta\n */\nexport interface HostStoragePolicy {\n\tsnapshotOptions?: ISnapshotOptions;\n\n\t/**\n\t * Immutable host-owned attribution metadata applied to every outbound ODSP HTTP request.\n\t *\n\t * Driver-owned request headers take precedence on case-insensitive name collisions. This\n\t * prevents hosts from overriding authentication, content type, epoch, correlation, and\n\t * protocol headers. The driver copies these values when it constructs the factory.\n\t *\n\t * Custom WebSocket headers, including `User-Agent`, depend on Node.js transport support and\n\t * might not be sent by browsers.\n\t */\n\thostProvidedRequestHeaders?: Readonly<Record<string, string>>;\n\n\t/**\n\t * If set to true, tells driver to concurrently fetch snapshot from storage (SPO) and cache\n\t * Container loads from whatever comes first in such case.\n\t * Snapshot fetched from storage is pushed to cache in either case.\n\t * If set to false, driver will first consult with cache. Only on cache miss (cache does not\n\t * return snapshot), driver will fetch snapshot from storage (and push it to cache), otherwise\n\t * it will load from cache and not reach out to storage.\n\t * Passing true results in faster loads and keeping cache more current, but it increases bandwidth consumption.\n\t */\n\tconcurrentSnapshotFetch?: boolean;\n\n\t// Options overwriting default ops fetching from storage.\n\topsBatchSize?: number;\n\tconcurrentOpsBatches?: number;\n\n\t/**\n\t * Policy controlling ops caching (leveraging IPersistedCache passed to driver factory)\n\t */\n\topsCaching?: IOpsCachingPolicy;\n\n\t/**\n\t * Policy controlling how collaboration session is established\n\t */\n\tsessionOptions?: ICollabSessionOptions;\n\n\t/**\n\t * @deprecated This field will be always set to true after removal.\n\t * True to have the sharing link redeem fallback in case the Trees Latest/Redeem 1RT call fails with redeem error.\n\t * During fallback it will first redeem the sharing link and then make the Trees latest call.\n\t */\n\tenableRedeemFallback?: boolean;\n\n\t/**\n\t * Policy controlling if we will cache initial summary when we create a document\n\t */\n\tcacheCreateNewSummary?: boolean;\n\n\t/**\n\t * @deprecated This will be replaced with feature gate snapshotFormatFetchType.\n\t * Policy controlling if we want to fetch binary format snapshot.\n\t */\n\tfetchBinarySnapshotFormat?: boolean;\n\n\t/**\n\t * If set to true, socket cache are per OdspDocumentService instead of shared across all instances\n\t */\n\tisolateSocketCache?: boolean;\n\n\t/**\n\t * @deprecated Switch to using the new feature gated by enableSingleRequestForShareLinkWithCreate\n\t * with 'createLinkScope' and 'createLinkRole' is requested to the odsp apis instead of 'createLinkType'.\n\t * It enables the creation of sharing link along with the creation of file by setting this value to true.\n\t * If the host provides a 'createLinkType' parameter in the request URL to the container.attach()\n\t * method, we will send the request to ODSP with the same (if the flag is enabled) so\n\t * that a share link can be created with the creation of file to save number for round trips made to ODSP.\n\t * (This flag works independently of enableSingleRequestForShareLinkWithCreate which is used for sharing link\n\t * requests where 'createLinkScope' is requested.)\n\t */\n\tenableShareLinkWithCreate?: boolean;\n\n\t/**\n\t * Enable creation of sharing link along with the creation of file by setting this value to true.\n\t * If the host provides a 'createLinkScope' parameter in the request URL to the container.attach()\n\t * method, we will send the request to ODSP with the same (if the flag is enabled) so\n\t * that a share link can be created with the creation of file to save number for round trips made to ODSP.\n\t * (This flag works independently of enableShareLinkWithCreate which was used for old sharing link requests\n\t * where 'createLinkType' was requested.)\n\t */\n\tenableSingleRequestForShareLinkWithCreate?: boolean;\n\n\t/**\n\t * True if host does not want the storage service to use the prefetch cache to get the snapshot. Undefined will be treated\n\t * as false. This is if the host wants to do some A/B testing.\n\t */\n\tavoidPrefetchSnapshotCache?: boolean;\n}\n"]}
1
+ {"version":3,"file":"factory.js","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @legacy\n * @beta\n */\nexport interface ISnapshotOptions {\n\tblobs?: number;\n\tdeltas?: number;\n\tchannels?: number;\n\n\t/**\n\t * Maximum Data size (in bytes)\n\t *\n\t * @remarks\n\t * If specified, SPO will fail snapshot request with 413 error (see {@link @fluidframework/odsp-driver-definitions#(OdspErrorTypes:variable).snapshotTooBig})\n\t * if snapshot is bigger in size than specified limit.\n\t */\n\tmds?: number;\n\n\t/*\n\t * Maximum time limit to fetch snapshot (in seconds)\n\t * If specified, client will timeout the fetch request if it exceeds the time limit and\n\t * will try to fetch the snapshot without blobs.\n\t */\n\ttimeout?: number;\n}\n\n/**\n * @legacy\n * @beta\n */\nexport interface IOpsCachingPolicy {\n\t/**\n\t * Batch size. Controls how many ops are grouped together as single cache entry\n\t * The bigger the number, the more efficient it is (less reads & writes)\n\t * At the same time, big number means we wait for so many ops to accumulate, which\n\t * increases chances and number of trailing ops that would not be flushed to cache\n\t * when user closes tab\n\t * Use any number below 1 to disable caching\n\t * Default: 100\n\t */\n\tbatchSize?: number;\n\n\t/**\n\t * To reduce the problem of losing trailing ops when using big batch sizes, host\n\t * could specify how often driver should flush ops it has not flushed yet.\n\t * -1 means do not use timer.\n\t * Measured in ms.\n\t * Default: 5000\n\t */\n\ttimerGranularity?: number;\n\n\t/**\n\t * Total number of ops to cache. When we reach that number, ops caching stops\n\t * Default: 5000\n\t */\n\ttotalOpsToCache?: number;\n}\n\n/**\n * @legacy\n * @beta\n */\nexport interface ICollabSessionOptions {\n\t/**\n\t * Value indicating the display name for session that admits unauthenticated user.\n\t * This name will be used in attribution associated with edits made by such user.\n\t * @deprecated starting in 2.0-RC3. No longer needed.\n\t */\n\tunauthenticatedUserDisplayName?: string;\n\t/**\n\t * Value indicating session preference to always pass access token via Authorization header.\n\t * Default behavior is to pass access token via query parameter unless overall href string\n\t * length exceeds 2048 characters. Using query param is performance optimization which results\n\t * in ODSP XHR request being treated as 'simple' request which do not require OPTIONS call to\n\t * validate CORS. However, not all ODSP implementations understand this optimization.\n\t * For instance, auth layer on Converged stack will fail request with access token passed via\n\t * query param.\n\t * @deprecated Due to security reasons we will be passing the token via Authorization header only.\n\t */\n\tforceAccessTokenViaAuthorizationHeader?: boolean;\n\t/**\n\t * Value indicating the client display name for current session.\n\t * This name will be used in attribution associated with edits made during session.\n\t * This is optional and used only when collab session is being joined by client acting in app-only mode (i.e. without user context).\n\t * If not specified client display name is extracted from the access token that is used to join session.\n\t */\n\tdisplayName?: string;\n}\n\n/**\n * @legacy\n * @beta\n */\nexport interface HostStoragePolicy {\n\tsnapshotOptions?: ISnapshotOptions;\n\n\t/**\n\t * Immutable host-owned attribution metadata applied to every outbound ODSP HTTP request.\n\t *\n\t * Driver-owned request headers take precedence on case-insensitive name collisions. This\n\t * prevents hosts from overriding authentication, content type, epoch, correlation, and\n\t * protocol headers. The driver copies these values when it constructs the factory.\n\t *\n\t * Custom WebSocket headers, including `User-Agent`, depend on Node.js transport support and\n\t * might not be sent by browsers.\n\t */\n\thostProvidedRequestHeaders?: Readonly<Record<string, string>>;\n\n\t/**\n\t * If set to true, tells driver to concurrently fetch snapshot from storage (SPO) and cache\n\t * Container loads from whatever comes first in such case.\n\t * Snapshot fetched from storage is pushed to cache in either case.\n\t * If set to false, driver will first consult with cache. Only on cache miss (cache does not\n\t * return snapshot), driver will fetch snapshot from storage (and push it to cache), otherwise\n\t * it will load from cache and not reach out to storage.\n\t * Passing true results in faster loads and keeping cache more current, but it increases bandwidth consumption.\n\t */\n\tconcurrentSnapshotFetch?: boolean;\n\n\t// Options overwriting default ops fetching from storage.\n\topsBatchSize?: number;\n\tconcurrentOpsBatches?: number;\n\n\t/**\n\t * Policy controlling ops caching (leveraging IPersistedCache passed to driver factory)\n\t */\n\topsCaching?: IOpsCachingPolicy;\n\n\t/**\n\t * Policy controlling how collaboration session is established\n\t */\n\tsessionOptions?: ICollabSessionOptions;\n\n\t/**\n\t * @deprecated This field will be always set to true after removal.\n\t * True to have the sharing link redeem fallback in case the Trees Latest/Redeem 1RT call fails with redeem error.\n\t * During fallback it will first redeem the sharing link and then make the Trees latest call.\n\t */\n\tenableRedeemFallback?: boolean;\n\n\t/**\n\t * Policy controlling if we will cache initial summary when we create a document\n\t */\n\tcacheCreateNewSummary?: boolean;\n\n\t/**\n\t * @deprecated This will be replaced with feature gate snapshotFormatFetchType.\n\t * Policy controlling if we want to fetch binary format snapshot.\n\t */\n\tfetchBinarySnapshotFormat?: boolean;\n\n\t/**\n\t * If set to true, socket cache are per OdspDocumentService instead of shared across all instances\n\t */\n\tisolateSocketCache?: boolean;\n\n\t/**\n\t * @deprecated Switch to using the new feature gated by enableSingleRequestForShareLinkWithCreate\n\t * with 'createLinkScope' and 'createLinkRole' is requested to the odsp apis instead of 'createLinkType'.\n\t * It enables the creation of sharing link along with the creation of file by setting this value to true.\n\t * If the host provides a 'createLinkType' parameter in the request URL to the container.attach()\n\t * method, we will send the request to ODSP with the same (if the flag is enabled) so\n\t * that a share link can be created with the creation of file to save number for round trips made to ODSP.\n\t * (This flag works independently of enableSingleRequestForShareLinkWithCreate which is used for sharing link\n\t * requests where 'createLinkScope' is requested.)\n\t */\n\tenableShareLinkWithCreate?: boolean;\n\n\t/**\n\t * Enable creation of sharing link along with the creation of file by setting this value to true.\n\t * If the host provides a 'createLinkScope' parameter in the request URL to the container.attach()\n\t * method, we will send the request to ODSP with the same (if the flag is enabled) so\n\t * that a share link can be created with the creation of file to save number for round trips made to ODSP.\n\t * (This flag works independently of enableShareLinkWithCreate which was used for old sharing link requests\n\t * where 'createLinkType' was requested.)\n\t */\n\tenableSingleRequestForShareLinkWithCreate?: boolean;\n\n\t/**\n\t * True if host does not want the storage service to use the prefetch cache to get the snapshot. Undefined will be treated\n\t * as false. This is if the host wants to do some A/B testing.\n\t */\n\tavoidPrefetchSnapshotCache?: boolean;\n\n\t/**\n\t * Controls how the driver handles a claims challenge from the service.\n\t *\n\t * @remarks\n\t * A claims challenge is a 401 or 403 response with a `WWW-Authenticate` header that contains `error=\"insufficient_claims\"` and a `claims` value.\n\t * For more information, see {@link https://learn.microsoft.com/entra/identity-platform/claims-challenge | Claims challenges}.\n\t *\n\t * By default, the driver gets a new token one time, with the decoded claims in {@link TokenFetchOptions.claims}, and retries the request.\n\t *\n\t * Set this policy to `true` when the host cannot satisfy the challenge itself, for example, a service that makes requests for another client.\n\t * The driver then does not retry the request or give the claims to the token fetcher.\n\t * The operation fails with the original {@link @fluidframework/driver-definitions#IAuthorizationError}, which has `claims` and `wwwAuthenticate` set.\n\t * The host can get this error from a load or from the container's `closed` event.\n\t * To identify a claims challenge, check for a non-empty `claims` value, because `wwwAuthenticate` is set whenever the response has the header.\n\t * After the challenge is satisfied, the token fetcher must return the new token, even when {@link TokenFetchOptions.refresh} is `false`.\n\t *\n\t * This policy also applies to `prefetchLatestSnapshot` when the factory is given to it, but not to `OdspDriverUrlResolverForShareLink`.\n\t *\n\t * @defaultValue `false`\n\t */\n\tpropagateClaimsChallenges?: boolean;\n}\n"]}
package/lib/factory.d.ts CHANGED
@@ -160,5 +160,26 @@ export interface HostStoragePolicy {
160
160
  * as false. This is if the host wants to do some A/B testing.
161
161
  */
162
162
  avoidPrefetchSnapshotCache?: boolean;
163
+ /**
164
+ * Controls how the driver handles a claims challenge from the service.
165
+ *
166
+ * @remarks
167
+ * A claims challenge is a 401 or 403 response with a `WWW-Authenticate` header that contains `error="insufficient_claims"` and a `claims` value.
168
+ * For more information, see {@link https://learn.microsoft.com/entra/identity-platform/claims-challenge | Claims challenges}.
169
+ *
170
+ * By default, the driver gets a new token one time, with the decoded claims in {@link TokenFetchOptions.claims}, and retries the request.
171
+ *
172
+ * Set this policy to `true` when the host cannot satisfy the challenge itself, for example, a service that makes requests for another client.
173
+ * The driver then does not retry the request or give the claims to the token fetcher.
174
+ * The operation fails with the original {@link @fluidframework/driver-definitions#IAuthorizationError}, which has `claims` and `wwwAuthenticate` set.
175
+ * The host can get this error from a load or from the container's `closed` event.
176
+ * To identify a claims challenge, check for a non-empty `claims` value, because `wwwAuthenticate` is set whenever the response has the header.
177
+ * After the challenge is satisfied, the token fetcher must return the new token, even when {@link TokenFetchOptions.refresh} is `false`.
178
+ *
179
+ * This policy also applies to `prefetchLatestSnapshot` when the factory is given to it, but not to `OdspDriverUrlResolverForShareLink`.
180
+ *
181
+ * @defaultValue `false`
182
+ */
183
+ propagateClaimsChallenges?: boolean;
163
184
  }
164
185
  //# sourceMappingURL=factory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAChC,KAAK,CAAC,EAAE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;IAE9B;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAE/B;;OAEG;IACH,cAAc,CAAC,EAAE,qBAAqB,CAAC;IAEvC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;OAGG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;;;;;;;OASG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC;;;;;;;OAOG;IACH,yCAAyC,CAAC,EAAE,OAAO,CAAC;IAEpD;;;OAGG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;IAErC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACpC"}
@@ -1 +1 @@
1
- {"version":3,"file":"factory.js","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @legacy\n * @beta\n */\nexport interface ISnapshotOptions {\n\tblobs?: number;\n\tdeltas?: number;\n\tchannels?: number;\n\n\t/**\n\t * Maximum Data size (in bytes)\n\t *\n\t * @remarks\n\t * If specified, SPO will fail snapshot request with 413 error (see {@link @fluidframework/odsp-driver-definitions#(OdspErrorTypes:variable).snapshotTooBig})\n\t * if snapshot is bigger in size than specified limit.\n\t */\n\tmds?: number;\n\n\t/*\n\t * Maximum time limit to fetch snapshot (in seconds)\n\t * If specified, client will timeout the fetch request if it exceeds the time limit and\n\t * will try to fetch the snapshot without blobs.\n\t */\n\ttimeout?: number;\n}\n\n/**\n * @legacy\n * @beta\n */\nexport interface IOpsCachingPolicy {\n\t/**\n\t * Batch size. Controls how many ops are grouped together as single cache entry\n\t * The bigger the number, the more efficient it is (less reads & writes)\n\t * At the same time, big number means we wait for so many ops to accumulate, which\n\t * increases chances and number of trailing ops that would not be flushed to cache\n\t * when user closes tab\n\t * Use any number below 1 to disable caching\n\t * Default: 100\n\t */\n\tbatchSize?: number;\n\n\t/**\n\t * To reduce the problem of losing trailing ops when using big batch sizes, host\n\t * could specify how often driver should flush ops it has not flushed yet.\n\t * -1 means do not use timer.\n\t * Measured in ms.\n\t * Default: 5000\n\t */\n\ttimerGranularity?: number;\n\n\t/**\n\t * Total number of ops to cache. When we reach that number, ops caching stops\n\t * Default: 5000\n\t */\n\ttotalOpsToCache?: number;\n}\n\n/**\n * @legacy\n * @beta\n */\nexport interface ICollabSessionOptions {\n\t/**\n\t * Value indicating the display name for session that admits unauthenticated user.\n\t * This name will be used in attribution associated with edits made by such user.\n\t * @deprecated starting in 2.0-RC3. No longer needed.\n\t */\n\tunauthenticatedUserDisplayName?: string;\n\t/**\n\t * Value indicating session preference to always pass access token via Authorization header.\n\t * Default behavior is to pass access token via query parameter unless overall href string\n\t * length exceeds 2048 characters. Using query param is performance optimization which results\n\t * in ODSP XHR request being treated as 'simple' request which do not require OPTIONS call to\n\t * validate CORS. However, not all ODSP implementations understand this optimization.\n\t * For instance, auth layer on Converged stack will fail request with access token passed via\n\t * query param.\n\t * @deprecated Due to security reasons we will be passing the token via Authorization header only.\n\t */\n\tforceAccessTokenViaAuthorizationHeader?: boolean;\n\t/**\n\t * Value indicating the client display name for current session.\n\t * This name will be used in attribution associated with edits made during session.\n\t * This is optional and used only when collab session is being joined by client acting in app-only mode (i.e. without user context).\n\t * If not specified client display name is extracted from the access token that is used to join session.\n\t */\n\tdisplayName?: string;\n}\n\n/**\n * @legacy\n * @beta\n */\nexport interface HostStoragePolicy {\n\tsnapshotOptions?: ISnapshotOptions;\n\n\t/**\n\t * Immutable host-owned attribution metadata applied to every outbound ODSP HTTP request.\n\t *\n\t * Driver-owned request headers take precedence on case-insensitive name collisions. This\n\t * prevents hosts from overriding authentication, content type, epoch, correlation, and\n\t * protocol headers. The driver copies these values when it constructs the factory.\n\t *\n\t * Custom WebSocket headers, including `User-Agent`, depend on Node.js transport support and\n\t * might not be sent by browsers.\n\t */\n\thostProvidedRequestHeaders?: Readonly<Record<string, string>>;\n\n\t/**\n\t * If set to true, tells driver to concurrently fetch snapshot from storage (SPO) and cache\n\t * Container loads from whatever comes first in such case.\n\t * Snapshot fetched from storage is pushed to cache in either case.\n\t * If set to false, driver will first consult with cache. Only on cache miss (cache does not\n\t * return snapshot), driver will fetch snapshot from storage (and push it to cache), otherwise\n\t * it will load from cache and not reach out to storage.\n\t * Passing true results in faster loads and keeping cache more current, but it increases bandwidth consumption.\n\t */\n\tconcurrentSnapshotFetch?: boolean;\n\n\t// Options overwriting default ops fetching from storage.\n\topsBatchSize?: number;\n\tconcurrentOpsBatches?: number;\n\n\t/**\n\t * Policy controlling ops caching (leveraging IPersistedCache passed to driver factory)\n\t */\n\topsCaching?: IOpsCachingPolicy;\n\n\t/**\n\t * Policy controlling how collaboration session is established\n\t */\n\tsessionOptions?: ICollabSessionOptions;\n\n\t/**\n\t * @deprecated This field will be always set to true after removal.\n\t * True to have the sharing link redeem fallback in case the Trees Latest/Redeem 1RT call fails with redeem error.\n\t * During fallback it will first redeem the sharing link and then make the Trees latest call.\n\t */\n\tenableRedeemFallback?: boolean;\n\n\t/**\n\t * Policy controlling if we will cache initial summary when we create a document\n\t */\n\tcacheCreateNewSummary?: boolean;\n\n\t/**\n\t * @deprecated This will be replaced with feature gate snapshotFormatFetchType.\n\t * Policy controlling if we want to fetch binary format snapshot.\n\t */\n\tfetchBinarySnapshotFormat?: boolean;\n\n\t/**\n\t * If set to true, socket cache are per OdspDocumentService instead of shared across all instances\n\t */\n\tisolateSocketCache?: boolean;\n\n\t/**\n\t * @deprecated Switch to using the new feature gated by enableSingleRequestForShareLinkWithCreate\n\t * with 'createLinkScope' and 'createLinkRole' is requested to the odsp apis instead of 'createLinkType'.\n\t * It enables the creation of sharing link along with the creation of file by setting this value to true.\n\t * If the host provides a 'createLinkType' parameter in the request URL to the container.attach()\n\t * method, we will send the request to ODSP with the same (if the flag is enabled) so\n\t * that a share link can be created with the creation of file to save number for round trips made to ODSP.\n\t * (This flag works independently of enableSingleRequestForShareLinkWithCreate which is used for sharing link\n\t * requests where 'createLinkScope' is requested.)\n\t */\n\tenableShareLinkWithCreate?: boolean;\n\n\t/**\n\t * Enable creation of sharing link along with the creation of file by setting this value to true.\n\t * If the host provides a 'createLinkScope' parameter in the request URL to the container.attach()\n\t * method, we will send the request to ODSP with the same (if the flag is enabled) so\n\t * that a share link can be created with the creation of file to save number for round trips made to ODSP.\n\t * (This flag works independently of enableShareLinkWithCreate which was used for old sharing link requests\n\t * where 'createLinkType' was requested.)\n\t */\n\tenableSingleRequestForShareLinkWithCreate?: boolean;\n\n\t/**\n\t * True if host does not want the storage service to use the prefetch cache to get the snapshot. Undefined will be treated\n\t * as false. This is if the host wants to do some A/B testing.\n\t */\n\tavoidPrefetchSnapshotCache?: boolean;\n}\n"]}
1
+ {"version":3,"file":"factory.js","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @legacy\n * @beta\n */\nexport interface ISnapshotOptions {\n\tblobs?: number;\n\tdeltas?: number;\n\tchannels?: number;\n\n\t/**\n\t * Maximum Data size (in bytes)\n\t *\n\t * @remarks\n\t * If specified, SPO will fail snapshot request with 413 error (see {@link @fluidframework/odsp-driver-definitions#(OdspErrorTypes:variable).snapshotTooBig})\n\t * if snapshot is bigger in size than specified limit.\n\t */\n\tmds?: number;\n\n\t/*\n\t * Maximum time limit to fetch snapshot (in seconds)\n\t * If specified, client will timeout the fetch request if it exceeds the time limit and\n\t * will try to fetch the snapshot without blobs.\n\t */\n\ttimeout?: number;\n}\n\n/**\n * @legacy\n * @beta\n */\nexport interface IOpsCachingPolicy {\n\t/**\n\t * Batch size. Controls how many ops are grouped together as single cache entry\n\t * The bigger the number, the more efficient it is (less reads & writes)\n\t * At the same time, big number means we wait for so many ops to accumulate, which\n\t * increases chances and number of trailing ops that would not be flushed to cache\n\t * when user closes tab\n\t * Use any number below 1 to disable caching\n\t * Default: 100\n\t */\n\tbatchSize?: number;\n\n\t/**\n\t * To reduce the problem of losing trailing ops when using big batch sizes, host\n\t * could specify how often driver should flush ops it has not flushed yet.\n\t * -1 means do not use timer.\n\t * Measured in ms.\n\t * Default: 5000\n\t */\n\ttimerGranularity?: number;\n\n\t/**\n\t * Total number of ops to cache. When we reach that number, ops caching stops\n\t * Default: 5000\n\t */\n\ttotalOpsToCache?: number;\n}\n\n/**\n * @legacy\n * @beta\n */\nexport interface ICollabSessionOptions {\n\t/**\n\t * Value indicating the display name for session that admits unauthenticated user.\n\t * This name will be used in attribution associated with edits made by such user.\n\t * @deprecated starting in 2.0-RC3. No longer needed.\n\t */\n\tunauthenticatedUserDisplayName?: string;\n\t/**\n\t * Value indicating session preference to always pass access token via Authorization header.\n\t * Default behavior is to pass access token via query parameter unless overall href string\n\t * length exceeds 2048 characters. Using query param is performance optimization which results\n\t * in ODSP XHR request being treated as 'simple' request which do not require OPTIONS call to\n\t * validate CORS. However, not all ODSP implementations understand this optimization.\n\t * For instance, auth layer on Converged stack will fail request with access token passed via\n\t * query param.\n\t * @deprecated Due to security reasons we will be passing the token via Authorization header only.\n\t */\n\tforceAccessTokenViaAuthorizationHeader?: boolean;\n\t/**\n\t * Value indicating the client display name for current session.\n\t * This name will be used in attribution associated with edits made during session.\n\t * This is optional and used only when collab session is being joined by client acting in app-only mode (i.e. without user context).\n\t * If not specified client display name is extracted from the access token that is used to join session.\n\t */\n\tdisplayName?: string;\n}\n\n/**\n * @legacy\n * @beta\n */\nexport interface HostStoragePolicy {\n\tsnapshotOptions?: ISnapshotOptions;\n\n\t/**\n\t * Immutable host-owned attribution metadata applied to every outbound ODSP HTTP request.\n\t *\n\t * Driver-owned request headers take precedence on case-insensitive name collisions. This\n\t * prevents hosts from overriding authentication, content type, epoch, correlation, and\n\t * protocol headers. The driver copies these values when it constructs the factory.\n\t *\n\t * Custom WebSocket headers, including `User-Agent`, depend on Node.js transport support and\n\t * might not be sent by browsers.\n\t */\n\thostProvidedRequestHeaders?: Readonly<Record<string, string>>;\n\n\t/**\n\t * If set to true, tells driver to concurrently fetch snapshot from storage (SPO) and cache\n\t * Container loads from whatever comes first in such case.\n\t * Snapshot fetched from storage is pushed to cache in either case.\n\t * If set to false, driver will first consult with cache. Only on cache miss (cache does not\n\t * return snapshot), driver will fetch snapshot from storage (and push it to cache), otherwise\n\t * it will load from cache and not reach out to storage.\n\t * Passing true results in faster loads and keeping cache more current, but it increases bandwidth consumption.\n\t */\n\tconcurrentSnapshotFetch?: boolean;\n\n\t// Options overwriting default ops fetching from storage.\n\topsBatchSize?: number;\n\tconcurrentOpsBatches?: number;\n\n\t/**\n\t * Policy controlling ops caching (leveraging IPersistedCache passed to driver factory)\n\t */\n\topsCaching?: IOpsCachingPolicy;\n\n\t/**\n\t * Policy controlling how collaboration session is established\n\t */\n\tsessionOptions?: ICollabSessionOptions;\n\n\t/**\n\t * @deprecated This field will be always set to true after removal.\n\t * True to have the sharing link redeem fallback in case the Trees Latest/Redeem 1RT call fails with redeem error.\n\t * During fallback it will first redeem the sharing link and then make the Trees latest call.\n\t */\n\tenableRedeemFallback?: boolean;\n\n\t/**\n\t * Policy controlling if we will cache initial summary when we create a document\n\t */\n\tcacheCreateNewSummary?: boolean;\n\n\t/**\n\t * @deprecated This will be replaced with feature gate snapshotFormatFetchType.\n\t * Policy controlling if we want to fetch binary format snapshot.\n\t */\n\tfetchBinarySnapshotFormat?: boolean;\n\n\t/**\n\t * If set to true, socket cache are per OdspDocumentService instead of shared across all instances\n\t */\n\tisolateSocketCache?: boolean;\n\n\t/**\n\t * @deprecated Switch to using the new feature gated by enableSingleRequestForShareLinkWithCreate\n\t * with 'createLinkScope' and 'createLinkRole' is requested to the odsp apis instead of 'createLinkType'.\n\t * It enables the creation of sharing link along with the creation of file by setting this value to true.\n\t * If the host provides a 'createLinkType' parameter in the request URL to the container.attach()\n\t * method, we will send the request to ODSP with the same (if the flag is enabled) so\n\t * that a share link can be created with the creation of file to save number for round trips made to ODSP.\n\t * (This flag works independently of enableSingleRequestForShareLinkWithCreate which is used for sharing link\n\t * requests where 'createLinkScope' is requested.)\n\t */\n\tenableShareLinkWithCreate?: boolean;\n\n\t/**\n\t * Enable creation of sharing link along with the creation of file by setting this value to true.\n\t * If the host provides a 'createLinkScope' parameter in the request URL to the container.attach()\n\t * method, we will send the request to ODSP with the same (if the flag is enabled) so\n\t * that a share link can be created with the creation of file to save number for round trips made to ODSP.\n\t * (This flag works independently of enableShareLinkWithCreate which was used for old sharing link requests\n\t * where 'createLinkType' was requested.)\n\t */\n\tenableSingleRequestForShareLinkWithCreate?: boolean;\n\n\t/**\n\t * True if host does not want the storage service to use the prefetch cache to get the snapshot. Undefined will be treated\n\t * as false. This is if the host wants to do some A/B testing.\n\t */\n\tavoidPrefetchSnapshotCache?: boolean;\n\n\t/**\n\t * Controls how the driver handles a claims challenge from the service.\n\t *\n\t * @remarks\n\t * A claims challenge is a 401 or 403 response with a `WWW-Authenticate` header that contains `error=\"insufficient_claims\"` and a `claims` value.\n\t * For more information, see {@link https://learn.microsoft.com/entra/identity-platform/claims-challenge | Claims challenges}.\n\t *\n\t * By default, the driver gets a new token one time, with the decoded claims in {@link TokenFetchOptions.claims}, and retries the request.\n\t *\n\t * Set this policy to `true` when the host cannot satisfy the challenge itself, for example, a service that makes requests for another client.\n\t * The driver then does not retry the request or give the claims to the token fetcher.\n\t * The operation fails with the original {@link @fluidframework/driver-definitions#IAuthorizationError}, which has `claims` and `wwwAuthenticate` set.\n\t * The host can get this error from a load or from the container's `closed` event.\n\t * To identify a claims challenge, check for a non-empty `claims` value, because `wwwAuthenticate` is set whenever the response has the header.\n\t * After the challenge is satisfied, the token fetcher must return the new token, even when {@link TokenFetchOptions.refresh} is `false`.\n\t *\n\t * This policy also applies to `prefetchLatestSnapshot` when the factory is given to it, but not to `OdspDriverUrlResolverForShareLink`.\n\t *\n\t * @defaultValue `false`\n\t */\n\tpropagateClaimsChallenges?: boolean;\n}\n"]}
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.58.1"
8
+ "packageVersion": "7.60.1"
9
9
  }
10
10
  ]
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/odsp-driver-definitions",
3
- "version": "3.12.0",
3
+ "version": "3.14.0",
4
4
  "description": "Socket storage implementation for SPO and ODC",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -33,7 +33,7 @@
33
33
  }
34
34
  },
35
35
  "dependencies": {
36
- "@fluidframework/driver-definitions": "~3.12.0"
36
+ "@fluidframework/driver-definitions": "~3.14.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@arethetypeswrong/cli": "^0.18.5",
@@ -42,8 +42,8 @@
42
42
  "@fluidframework/build-common": "^2.0.3",
43
43
  "@fluidframework/build-tools": "^0.68.0",
44
44
  "@fluidframework/eslint-config-fluid": "^14.0.0",
45
- "@fluidframework/odsp-driver-definitions-previous": "npm:@fluidframework/odsp-driver-definitions@3.11.0",
46
- "@microsoft/api-extractor": "7.58.1",
45
+ "@fluidframework/odsp-driver-definitions-previous": "npm:@fluidframework/odsp-driver-definitions@3.13.0",
46
+ "@microsoft/api-extractor": "7.60.1",
47
47
  "concurrently": "^10.0.3",
48
48
  "copyfiles": "^2.4.1",
49
49
  "cross-env": "^10.1.0",
package/src/factory.ts CHANGED
@@ -186,4 +186,26 @@ export interface HostStoragePolicy {
186
186
  * as false. This is if the host wants to do some A/B testing.
187
187
  */
188
188
  avoidPrefetchSnapshotCache?: boolean;
189
+
190
+ /**
191
+ * Controls how the driver handles a claims challenge from the service.
192
+ *
193
+ * @remarks
194
+ * A claims challenge is a 401 or 403 response with a `WWW-Authenticate` header that contains `error="insufficient_claims"` and a `claims` value.
195
+ * For more information, see {@link https://learn.microsoft.com/entra/identity-platform/claims-challenge | Claims challenges}.
196
+ *
197
+ * By default, the driver gets a new token one time, with the decoded claims in {@link TokenFetchOptions.claims}, and retries the request.
198
+ *
199
+ * Set this policy to `true` when the host cannot satisfy the challenge itself, for example, a service that makes requests for another client.
200
+ * The driver then does not retry the request or give the claims to the token fetcher.
201
+ * The operation fails with the original {@link @fluidframework/driver-definitions#IAuthorizationError}, which has `claims` and `wwwAuthenticate` set.
202
+ * The host can get this error from a load or from the container's `closed` event.
203
+ * To identify a claims challenge, check for a non-empty `claims` value, because `wwwAuthenticate` is set whenever the response has the header.
204
+ * After the challenge is satisfied, the token fetcher must return the new token, even when {@link TokenFetchOptions.refresh} is `false`.
205
+ *
206
+ * This policy also applies to `prefetchLatestSnapshot` when the factory is given to it, but not to `OdspDriverUrlResolverForShareLink`.
207
+ *
208
+ * @defaultValue `false`
209
+ */
210
+ propagateClaimsChallenges?: boolean;
189
211
  }