@fluidframework/odsp-driver-definitions 3.13.0 → 3.15.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.15.0
4
+
5
+ Dependency updates only.
6
+
7
+ ## 3.14.0
8
+
9
+ ### Minor Changes
10
+
11
+ #### 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)
12
+
13
+ A claims challenge is a 401 or 403 response with a `WWW-Authenticate` header that asks for a token with more claims.
14
+ For more information, see [Claims challenges](https://learn.microsoft.com/entra/identity-platform/claims-challenge).
15
+ By default, the driver gets a new token one time and retries the request.
16
+ 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).
17
+
18
+ Some hosts can't satisfy the challenge themselves.
19
+ For example, a service that makes requests for another client must send the challenge to that client.
20
+ These hosts can now set the new `propagateClaimsChallenges` property of [`HostStoragePolicy`](https://fluidframework.com/docs/api/odsp-driver-definitions/hoststoragepolicy-interface) to `true`.
21
+ The driver then doesn't retry the request, and the operation fails with the original authorization error.
22
+ 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).
23
+
24
+ ```typescript
25
+ import { DriverErrorTypes } from "@fluidframework/driver-definitions/legacy";
26
+ import { OdspDocumentServiceFactory } from "@fluidframework/odsp-driver/legacy";
27
+
28
+ const documentServiceFactory = new OdspDocumentServiceFactory(
29
+ getStorageToken,
30
+ getWebsocketToken,
31
+ persistedCache,
32
+ { propagateClaimsChallenges: true },
33
+ );
34
+
35
+ // ...
36
+
37
+ if (error.errorType === DriverErrorTypes.authorizationError && error.claims) {
38
+ // Send error.wwwAuthenticate to the client, which can then get a token with the required claims.
39
+ }
40
+ ```
41
+
42
+ To identify a claims challenge, check for a non-empty `claims` value, as in the example.
43
+ 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`.
44
+
45
+ When `propagateClaimsChallenges` is `true`, the driver doesn't give the claims to the token fetcher.
46
+ 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`.
47
+
48
+ As for other authorization errors, the driver clears its cached snapshot of the document when a snapshot request fails with the challenge.
49
+ But a load can still succeed, because the driver can use a cached snapshot without waiting for the service.
50
+ A later request, such as connecting to the delta stream or fetching ops, then gets the challenge, and the container closes with the error.
51
+
52
+ While the container is connected, the driver also refreshes its join session with the service in the background.
53
+ If a refresh gets the challenge, the driver ends the delta stream connection with the error, and the container reconnects.
54
+ The container then closes with the error, unless the token fetcher returns a token that satisfies the challenge.
55
+ 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.
56
+ The host then gets the challenge when it loads the container again.
57
+
58
+ So check for a claims challenge in the error of the container's `closed` event as well as in load errors.
59
+
60
+ `propagateClaimsChallenges` also applies to [`prefetchLatestSnapshot`](https://fluidframework.com/docs/api/odsp-driver/#prefetchlatestsnapshot-function) when the factory is passed in its `odspDocumentServiceFactory` parameter.
61
+ It doesn't apply to [`OdspDriverUrlResolverForShareLink`](https://fluidframework.com/docs/api/odsp-driver/odspdriverurlresolverforsharelink-class).
62
+
3
63
  ## 3.13.0
4
64
 
5
65
  Dependency updates only.
@@ -48,39 +108,39 @@ Dependency updates only.
48
108
 
49
109
  ### Minor Changes
50
110
 
51
- - Removal of direct CommonJS support ([#28124](https://github.com/microsoft/FluidFramework/pull/28124)) [0f84e3b8878](https://github.com/microsoft/FluidFramework/commit/0f84e3b8878a5e75b2253976d98fd963bbd9db88)
111
+ #### Removal of direct CommonJS support ([#28124](https://github.com/microsoft/FluidFramework/pull/28124)) [0f84e3b8878](https://github.com/microsoft/FluidFramework/commit/0f84e3b8878a5e75b2253976d98fd963bbd9db88)
52
112
 
53
- Direct `require()` import is no longer directly supported.
54
- Package is transpiled as ECMAScript Module.
113
+ Direct `require()` import is no longer directly supported.
114
+ Package is transpiled as ECMAScript Module.
55
115
 
56
- See [Removal of direct CommonJS support in v3.0](https://github.com/microsoft/FluidFramework/issues/27444) for more information.
116
+ See [Removal of direct CommonJS support in v3.0](https://github.com/microsoft/FluidFramework/issues/27444) for more information.
57
117
 
58
- - Require modern TypeScript module resolution ([#27970](https://github.com/microsoft/FluidFramework/pull/27970)) [325e2016ca9](https://github.com/microsoft/FluidFramework/commit/325e2016ca9978d4a1f7552c97ba34feac9df41f)
118
+ #### Require modern TypeScript module resolution ([#27970](https://github.com/microsoft/FluidFramework/pull/27970)) [325e2016ca9](https://github.com/microsoft/FluidFramework/commit/325e2016ca9978d4a1f7552c97ba34feac9df41f)
59
119
 
60
- Fluid Framework Client packages no longer include type declaration compatibility entrypoints for TypeScript's legacy Node10 resolution mode (`"moduleResolution": "node"` or `"node10"`).
61
- Applications upgrading to Fluid Framework 3.0 must use one of the following supported configurations:
62
- - `"module": "Node16"` with `"moduleResolution": "Node16"`
63
- - `"module": "NodeNext"` with `"moduleResolution": "NodeNext"`
64
- - `"module": "ESNext"` with `"moduleResolution": "Bundler"`
120
+ Fluid Framework Client packages no longer include type declaration compatibility entrypoints for TypeScript's legacy Node10 resolution mode (`"moduleResolution": "node"` or `"node10"`).
121
+ Applications upgrading to Fluid Framework 3.0 must use one of the following supported configurations:
122
+ - `"module": "Node16"` with `"moduleResolution": "Node16"`
123
+ - `"module": "NodeNext"` with `"moduleResolution": "NodeNext"`
124
+ - `"module": "ESNext"` with `"moduleResolution": "Bundler"`
65
125
 
66
- Existing public package entrypoints exposed through `package.json` exports, including `/alpha`, `/beta`, and `/legacy`, remain available under supported module resolution modes.
126
+ Existing public package entrypoints exposed through `package.json` exports, including `/alpha`, `/beta`, and `/legacy`, remain available under supported module resolution modes.
67
127
 
68
- See [Removal of Node10 resolutions in v3.0](https://github.com/microsoft/FluidFramework/issues/27457) for more information.
128
+ See [Removal of Node10 resolutions in v3.0](https://github.com/microsoft/FluidFramework/issues/27457) for more information.
69
129
 
70
- - Client packages now target ES2022 ([#27846](https://github.com/microsoft/FluidFramework/pull/27846)) [91c78541bdd](https://github.com/microsoft/FluidFramework/commit/91c78541bddcbca5d6c5f357b023eeaee617d885)
130
+ #### Client packages now target ES2022 ([#27846](https://github.com/microsoft/FluidFramework/pull/27846)) [91c78541bdd](https://github.com/microsoft/FluidFramework/commit/91c78541bddcbca5d6c5f357b023eeaee617d885)
71
131
 
72
- The TypeScript compilation `target` and `lib` for the Fluid Framework client packages have been raised from ES2021/ES2020 to **ES2022**.
73
- The published JavaScript now uses ES2022 language features (with correspondingly less down-leveling), so consuming these packages requires a runtime that supports ES2022.
74
- All actively supported Node.js versions and evergreen browsers already meet this requirement.
132
+ The TypeScript compilation `target` and `lib` for the Fluid Framework client packages have been raised from ES2021/ES2020 to **ES2022**.
133
+ The published JavaScript now uses ES2022 language features (with correspondingly less down-leveling), so consuming these packages requires a runtime that supports ES2022.
134
+ All actively supported Node.js versions and evergreen browsers already meet this requirement.
75
135
 
76
- 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.
136
+ 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.
77
137
 
78
- It is possible this change could impact users of less up to date JavaScript runtimes.
79
- Impacted users can use a tool like [babel](https://babeljs.io/) to transpile out unsupported language features.
138
+ It is possible this change could impact users of less up to date JavaScript runtimes.
139
+ Impacted users can use a tool like [babel](https://babeljs.io/) to transpile out unsupported language features.
80
140
 
81
- - Build with TypeScript 6 ([#28052](https://github.com/microsoft/FluidFramework/pull/28052)) [7ab015c49de](https://github.com/microsoft/FluidFramework/commit/7ab015c49deec84833cdfe1fb5e1606b901f6e81)
141
+ #### Build with TypeScript 6 ([#28052](https://github.com/microsoft/FluidFramework/pull/28052)) [7ab015c49de](https://github.com/microsoft/FluidFramework/commit/7ab015c49deec84833cdfe1fb5e1606b901f6e81)
82
142
 
83
- FluidFramework Client SDK is now built using TypeScript 6. Consumers should build with TypeScript v6 or v7 or compatible tooling.
143
+ FluidFramework Client SDK is now built using TypeScript 6. Consumers should build with TypeScript v6 or v7 or compatible tooling.
84
144
 
85
145
  ## 2.116.0
86
146
 
@@ -126,9 +186,9 @@ Dependency updates only.
126
186
 
127
187
  ### Minor Changes
128
188
 
129
- - 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)
189
+ #### 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)
130
190
 
131
- 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.
191
+ 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.
132
192
 
133
193
  ## 2.93.0
134
194
 
@@ -162,13 +222,13 @@ Dependency updates only.
162
222
 
163
223
  ### Minor Changes
164
224
 
165
- - Added layerIncompatibilityError to FluidErrorTypes, ContainerErrorTypes, DriverErrorTypes and OdspErrorTypes ([#26068](https://github.com/microsoft/FluidFramework/pull/26068)) [a8532bdd903](https://github.com/microsoft/FluidFramework/commit/a8532bdd903626524f17d2ec650d8904046e5308)
225
+ #### Added layerIncompatibilityError to FluidErrorTypes, ContainerErrorTypes, DriverErrorTypes and OdspErrorTypes ([#26068](https://github.com/microsoft/FluidFramework/pull/26068)) [a8532bdd903](https://github.com/microsoft/FluidFramework/commit/a8532bdd903626524f17d2ec650d8904046e5308)
166
226
 
167
- 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`.
168
- `layerIncompatibilityError` was added as @legacy @alpha in version 2.72.0.
169
- The corresponding interface `ILayerIncompatibilityError` for errors of type `layerIncompatibilityError` is now also @legacy @beta.
227
+ 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`.
228
+ `layerIncompatibilityError` was added as @legacy @alpha in version 2.72.0.
229
+ The corresponding interface `ILayerIncompatibilityError` for errors of type `layerIncompatibilityError` is now also @legacy @beta.
170
230
 
171
- See [this issue](https://github.com/microsoft/FluidFramework/issues/25813) for more details.
231
+ See [this issue](https://github.com/microsoft/FluidFramework/issues/25813) for more details.
172
232
 
173
233
  ## 2.74.0
174
234
 
@@ -198,15 +258,15 @@ Dependency updates only.
198
258
 
199
259
  ### Minor Changes
200
260
 
201
- - Move IPersistedCache types to driver-definitions ([#25518](https://github.com/microsoft/FluidFramework/pull/25518)) [54fca68d91](https://github.com/microsoft/FluidFramework/commit/54fca68d91aeb40bdef14b1fe8b8f3c28168b6de)
261
+ #### Move IPersistedCache types to driver-definitions ([#25518](https://github.com/microsoft/FluidFramework/pull/25518)) [54fca68d91](https://github.com/microsoft/FluidFramework/commit/54fca68d91aeb40bdef14b1fe8b8f3c28168b6de)
202
262
 
203
- 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`.
263
+ 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`.
204
264
 
205
- The moved types are:
206
- - `IEntry`
207
- - `IFileEntry`
208
- - `ICacheEntry`
209
- - `IPersistedCache`
265
+ The moved types are:
266
+ - `IEntry`
267
+ - `IFileEntry`
268
+ - `ICacheEntry`
269
+ - `IPersistedCache`
210
270
 
211
271
  ## 2.61.0
212
272
 
@@ -220,9 +280,9 @@ Dependency updates only.
220
280
 
221
281
  ### Minor Changes
222
282
 
223
- - 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)
283
+ #### 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)
224
284
 
225
- 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.
285
+ 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.
226
286
 
227
287
  ## 2.52.0
228
288
 
@@ -324,9 +384,9 @@ Dependency updates only.
324
384
 
325
385
  ### Minor Changes
326
386
 
327
- - Update to TypeScript 5.4 ([#21214](https://github.com/microsoft/FluidFramework/pull/21214)) [0e6256c722](https://github.com/microsoft/FluidFramework/commit/0e6256c722d8bf024f4325bf02547daeeb18bfa6)
387
+ #### Update to TypeScript 5.4 ([#21214](https://github.com/microsoft/FluidFramework/pull/21214)) [0e6256c722](https://github.com/microsoft/FluidFramework/commit/0e6256c722d8bf024f4325bf02547daeeb18bfa6)
328
388
 
329
- Update package implementations to use TypeScript 5.4.5.
389
+ Update package implementations to use TypeScript 5.4.5.
330
390
 
331
391
  ## 2.0.0-rc.4.0.0
332
392
 
@@ -336,80 +396,80 @@ Dependency updates only.
336
396
 
337
397
  ### Major Changes
338
398
 
339
- - Packages now use package.json "exports" and require modern module resolution [97d68aa06b](https://github.com/microsoft/FluidFramework/commit/97d68aa06bd5c022ecb026655814aea222a062ae)
399
+ #### Packages now use package.json "exports" and require modern module resolution [97d68aa06b](https://github.com/microsoft/FluidFramework/commit/97d68aa06bd5c022ecb026655814aea222a062ae)
340
400
 
341
- Fluid Framework packages have been updated to use the [package.json "exports"
342
- field](https://nodejs.org/docs/latest-v18.x/api/packages.html#exports) to define explicit entry points for both
343
- TypeScript types and implementation code.
401
+ Fluid Framework packages have been updated to use the [package.json "exports"
402
+ field](https://nodejs.org/docs/latest-v18.x/api/packages.html#exports) to define explicit entry points for both
403
+ TypeScript types and implementation code.
344
404
 
345
- This means that using Fluid Framework packages require the following TypeScript settings in tsconfig.json:
346
- - `"moduleResolution": "Node16"` with `"module": "Node16"`
347
- - `"moduleResolution": "Bundler"` with `"module": "ESNext"`
405
+ This means that using Fluid Framework packages require the following TypeScript settings in tsconfig.json:
406
+ - `"moduleResolution": "Node16"` with `"module": "Node16"`
407
+ - `"moduleResolution": "Bundler"` with `"module": "ESNext"`
348
408
 
349
- We recommend using Node16/Node16 unless absolutely necessary. That will produce transpiled JavaScript that is suitable
350
- for use with modern versions of Node.js _and_ Bundlers.
351
- [See the TypeScript documentation](https://www.typescriptlang.org/tsconfig#moduleResolution) for more information
352
- regarding the module and moduleResolution options.
409
+ We recommend using Node16/Node16 unless absolutely necessary. That will produce transpiled JavaScript that is suitable
410
+ for use with modern versions of Node.js _and_ Bundlers.
411
+ [See the TypeScript documentation](https://www.typescriptlang.org/tsconfig#moduleResolution) for more information
412
+ regarding the module and moduleResolution options.
353
413
 
354
- **Node10 moduleResolution is not supported; it does not support Fluid Framework's API structuring pattern that is used
355
- to distinguish stable APIs from those that are in development.**
414
+ **Node10 moduleResolution is not supported; it does not support Fluid Framework's API structuring pattern that is used
415
+ to distinguish stable APIs from those that are in development.**
356
416
 
357
417
  ## 2.0.0-rc.2.0.0
358
418
 
359
419
  ### Minor Changes
360
420
 
361
- - Deprecated error-related enums have been removed ([#19067](https://github.com/microsoft/FluidFramework/issues/19067)) [59793302e5](https://github.com/microsoft/FluidFramework/commits/59793302e56784cfb6ace0e6469345f3565b3312)
421
+ #### Deprecated error-related enums have been removed ([#19067](https://github.com/microsoft/FluidFramework/issues/19067)) [59793302e5](https://github.com/microsoft/FluidFramework/commits/59793302e56784cfb6ace0e6469345f3565b3312)
362
422
 
363
- Error-related enums `ContainerErrorType`, `DriverErrorType`, `OdspErrorType` and `RouterliciousErrorType` were previously
364
- deprecated and are now removed. There are replacement object-based enumerations of `ContainerErrorTypes`,
365
- `DriverErrorTypes`, `OdspErrorTypes` and `RouterliciousErrorTypes`. Refer to the release notes of [Fluid Framework version
366
- 2.0.0-internal.7.0.0](https://github.com/microsoft/FluidFramework/releases/tag/client_v2.0.0-internal.7.0.0) for details
367
- on the replacements.
423
+ Error-related enums `ContainerErrorType`, `DriverErrorType`, `OdspErrorType` and `RouterliciousErrorType` were previously
424
+ deprecated and are now removed. There are replacement object-based enumerations of `ContainerErrorTypes`,
425
+ `DriverErrorTypes`, `OdspErrorTypes` and `RouterliciousErrorTypes`. Refer to the release notes of [Fluid Framework version
426
+ 2.0.0-internal.7.0.0](https://github.com/microsoft/FluidFramework/releases/tag/client_v2.0.0-internal.7.0.0) for details
427
+ on the replacements.
368
428
 
369
- - odsp-driver: Removed deprecated implementation of SingleRT feature ([#18690](https://github.com/microsoft/FluidFramework/issues/18690)) [430205cff1](https://github.com/microsoft/FluidFramework/commits/430205cff1ba8a1a7b13b4d42d12babaae596708)
429
+ #### odsp-driver: Removed deprecated implementation of SingleRT feature ([#18690](https://github.com/microsoft/FluidFramework/issues/18690)) [430205cff1](https://github.com/microsoft/FluidFramework/commits/430205cff1ba8a1a7b13b4d42d12babaae596708)
370
430
 
371
- 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.
431
+ 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.
372
432
 
373
- - container-definitions: Added containerMetadata prop on IContainer interface ([#19142](https://github.com/microsoft/FluidFramework/issues/19142)) [d0d77f3516](https://github.com/microsoft/FluidFramework/commits/d0d77f3516d67f3c9faedb47b20dbd4e309c3bc2)
433
+ #### container-definitions: Added containerMetadata prop on IContainer interface ([#19142](https://github.com/microsoft/FluidFramework/issues/19142)) [d0d77f3516](https://github.com/microsoft/FluidFramework/commits/d0d77f3516d67f3c9faedb47b20dbd4e309c3bc2)
374
434
 
375
- Added `containerMetadata` prop on IContainer interface.
435
+ Added `containerMetadata` prop on IContainer interface.
376
436
 
377
- - runtime-definitions: Moved ISignalEnvelope interface to core-interfaces ([#19142](https://github.com/microsoft/FluidFramework/issues/19142)) [d0d77f3516](https://github.com/microsoft/FluidFramework/commits/d0d77f3516d67f3c9faedb47b20dbd4e309c3bc2)
437
+ #### runtime-definitions: Moved ISignalEnvelope interface to core-interfaces ([#19142](https://github.com/microsoft/FluidFramework/issues/19142)) [d0d77f3516](https://github.com/microsoft/FluidFramework/commits/d0d77f3516d67f3c9faedb47b20dbd4e309c3bc2)
378
438
 
379
- The `ISignalEnvelope` interface has been moved to the @fluidframework/core-interfaces package.
439
+ The `ISignalEnvelope` interface has been moved to the @fluidframework/core-interfaces package.
380
440
 
381
441
  ## 2.0.0-rc.1.0.0
382
442
 
383
443
  ### Minor Changes
384
444
 
385
- - Updated server dependencies ([#19122](https://github.com/microsoft/FluidFramework/issues/19122)) [25366b4229](https://github.com/microsoft/FluidFramework/commits/25366b422918cb43685c5f328b50450749592902)
386
-
387
- 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)
388
- - @fluidframework/gitresources
389
- - @fluidframework/server-kafka-orderer
390
- - @fluidframework/server-lambdas
391
- - @fluidframework/server-lambdas-driver
392
- - @fluidframework/server-local-server
393
- - @fluidframework/server-memory-orderer
394
- - @fluidframework/protocol-base
395
- - @fluidframework/server-routerlicious
396
- - @fluidframework/server-routerlicious-base
397
- - @fluidframework/server-services
398
- - @fluidframework/server-services-client
399
- - @fluidframework/server-services-core
400
- - @fluidframework/server-services-ordering-kafkanode
401
- - @fluidframework/server-services-ordering-rdkafka
402
- - @fluidframework/server-services-ordering-zookeeper
403
- - @fluidframework/server-services-shared
404
- - @fluidframework/server-services-telemetry
405
- - @fluidframework/server-services-utils
406
- - @fluidframework/server-test-utils
407
- - tinylicious
408
-
409
- - Updated @fluidframework/protocol-definitions ([#19122](https://github.com/microsoft/FluidFramework/issues/19122)) [25366b4229](https://github.com/microsoft/FluidFramework/commits/25366b422918cb43685c5f328b50450749592902)
410
-
411
- The @fluidframework/protocol-definitions dependency has been upgraded to v3.1.0. [See the full
412
- changelog.](https://github.com/microsoft/FluidFramework/blob/main/common/lib/protocol-definitions/CHANGELOG.md#310)
445
+ #### Updated server dependencies ([#19122](https://github.com/microsoft/FluidFramework/issues/19122)) [25366b4229](https://github.com/microsoft/FluidFramework/commits/25366b422918cb43685c5f328b50450749592902)
446
+
447
+ 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)
448
+ - @fluidframework/gitresources
449
+ - @fluidframework/server-kafka-orderer
450
+ - @fluidframework/server-lambdas
451
+ - @fluidframework/server-lambdas-driver
452
+ - @fluidframework/server-local-server
453
+ - @fluidframework/server-memory-orderer
454
+ - @fluidframework/protocol-base
455
+ - @fluidframework/server-routerlicious
456
+ - @fluidframework/server-routerlicious-base
457
+ - @fluidframework/server-services
458
+ - @fluidframework/server-services-client
459
+ - @fluidframework/server-services-core
460
+ - @fluidframework/server-services-ordering-kafkanode
461
+ - @fluidframework/server-services-ordering-rdkafka
462
+ - @fluidframework/server-services-ordering-zookeeper
463
+ - @fluidframework/server-services-shared
464
+ - @fluidframework/server-services-telemetry
465
+ - @fluidframework/server-services-utils
466
+ - @fluidframework/server-test-utils
467
+ - tinylicious
468
+
469
+ #### Updated @fluidframework/protocol-definitions ([#19122](https://github.com/microsoft/FluidFramework/issues/19122)) [25366b4229](https://github.com/microsoft/FluidFramework/commits/25366b422918cb43685c5f328b50450749592902)
470
+
471
+ The @fluidframework/protocol-definitions dependency has been upgraded to v3.1.0. [See the full
472
+ changelog.](https://github.com/microsoft/FluidFramework/blob/main/common/lib/protocol-definitions/CHANGELOG.md#310)
413
473
 
414
474
  ## 2.0.0-internal.8.0.0
415
475
 
@@ -435,64 +495,64 @@ Dependency updates only.
435
495
 
436
496
  ### Major Changes
437
497
 
438
- - odsp-driver: Load container in readonly mode when driver throws DriverErrorType.outOfStorage [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
439
-
440
- Handle DriverErrorType.outOfStorage error from driver and load the container in readonly mode. Currently there is no
441
- handling and when the join session throws this error, the container will get closed. With this we use NoDeltaStream
442
- object as connection and load the container in read mode, so that it loads properly. We also notify the that the
443
- container is "readonly" through the event on delta manager so that apps can listen to this and show any UX etc. The app
444
- can listen to the event like this:
445
-
446
- ```ts
447
- container.deltaManager.on(
448
- "readonly",
449
- (
450
- readonly?: boolean,
451
- readonlyConnectionReason?: { text: string; error?: IErrorBase },
452
- ) => {
453
- // error?.errorType will be equal to DriverErrorType.outOfStorage in this case
454
- // App logic
455
- },
456
- );
457
- ```
458
-
459
- - Dependencies on @fluidframework/protocol-definitions package updated to 3.0.0 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
460
-
461
- This included the following changes from the protocol-definitions release:
462
- - Updating signal interfaces for some planned improvements. The intention is split the interface between signals
463
- submitted by clients to the server and the resulting signals sent from the server to clients.
464
- - A new optional type member is available on the ISignalMessage interface and a new ISentSignalMessage interface has
465
- been added, which will be the typing for signals sent from the client to the server. Both extend a new
466
- ISignalMessageBase interface that contains common members.
467
- - The @fluidframework/common-definitions package dependency has been updated to version 1.0.0.
468
-
469
- - Server upgrade: dependencies on Fluid server packages updated to 2.0.1 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
470
-
471
- Dependencies on the following Fluid server package have been updated to version 2.0.1:
472
- - @fluidframework/gitresources: 2.0.1
473
- - @fluidframework/server-kafka-orderer: 2.0.1
474
- - @fluidframework/server-lambdas: 2.0.1
475
- - @fluidframework/server-lambdas-driver: 2.0.1
476
- - @fluidframework/server-local-server: 2.0.1
477
- - @fluidframework/server-memory-orderer: 2.0.1
478
- - @fluidframework/protocol-base: 2.0.1
479
- - @fluidframework/server-routerlicious: 2.0.1
480
- - @fluidframework/server-routerlicious-base: 2.0.1
481
- - @fluidframework/server-services: 2.0.1
482
- - @fluidframework/server-services-client: 2.0.1
483
- - @fluidframework/server-services-core: 2.0.1
484
- - @fluidframework/server-services-ordering-kafkanode: 2.0.1
485
- - @fluidframework/server-services-ordering-rdkafka: 2.0.1
486
- - @fluidframework/server-services-ordering-zookeeper: 2.0.1
487
- - @fluidframework/server-services-shared: 2.0.1
488
- - @fluidframework/server-services-telemetry: 2.0.1
489
- - @fluidframework/server-services-utils: 2.0.1
490
- - @fluidframework/server-test-utils: 2.0.1
491
- - tinylicious: 2.0.1
492
-
493
- - Minimum TypeScript version now 5.1.6 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
494
-
495
- The minimum supported TypeScript version for Fluid 2.0 clients is now 5.1.6.
498
+ #### odsp-driver: Load container in readonly mode when driver throws DriverErrorType.outOfStorage [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
499
+
500
+ Handle DriverErrorType.outOfStorage error from driver and load the container in readonly mode. Currently there is no
501
+ handling and when the join session throws this error, the container will get closed. With this we use NoDeltaStream
502
+ object as connection and load the container in read mode, so that it loads properly. We also notify the that the
503
+ container is "readonly" through the event on delta manager so that apps can listen to this and show any UX etc. The app
504
+ can listen to the event like this:
505
+
506
+ ```ts
507
+ container.deltaManager.on(
508
+ "readonly",
509
+ (
510
+ readonly?: boolean,
511
+ readonlyConnectionReason?: { text: string; error?: IErrorBase },
512
+ ) => {
513
+ // error?.errorType will be equal to DriverErrorType.outOfStorage in this case
514
+ // App logic
515
+ },
516
+ );
517
+ ```
518
+
519
+ #### Dependencies on @fluidframework/protocol-definitions package updated to 3.0.0 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
520
+
521
+ This included the following changes from the protocol-definitions release:
522
+ - Updating signal interfaces for some planned improvements. The intention is split the interface between signals
523
+ submitted by clients to the server and the resulting signals sent from the server to clients.
524
+ - A new optional type member is available on the ISignalMessage interface and a new ISentSignalMessage interface has
525
+ been added, which will be the typing for signals sent from the client to the server. Both extend a new
526
+ ISignalMessageBase interface that contains common members.
527
+ - The @fluidframework/common-definitions package dependency has been updated to version 1.0.0.
528
+
529
+ #### Server upgrade: dependencies on Fluid server packages updated to 2.0.1 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
530
+
531
+ Dependencies on the following Fluid server package have been updated to version 2.0.1:
532
+ - @fluidframework/gitresources: 2.0.1
533
+ - @fluidframework/server-kafka-orderer: 2.0.1
534
+ - @fluidframework/server-lambdas: 2.0.1
535
+ - @fluidframework/server-lambdas-driver: 2.0.1
536
+ - @fluidframework/server-local-server: 2.0.1
537
+ - @fluidframework/server-memory-orderer: 2.0.1
538
+ - @fluidframework/protocol-base: 2.0.1
539
+ - @fluidframework/server-routerlicious: 2.0.1
540
+ - @fluidframework/server-routerlicious-base: 2.0.1
541
+ - @fluidframework/server-services: 2.0.1
542
+ - @fluidframework/server-services-client: 2.0.1
543
+ - @fluidframework/server-services-core: 2.0.1
544
+ - @fluidframework/server-services-ordering-kafkanode: 2.0.1
545
+ - @fluidframework/server-services-ordering-rdkafka: 2.0.1
546
+ - @fluidframework/server-services-ordering-zookeeper: 2.0.1
547
+ - @fluidframework/server-services-shared: 2.0.1
548
+ - @fluidframework/server-services-telemetry: 2.0.1
549
+ - @fluidframework/server-services-utils: 2.0.1
550
+ - @fluidframework/server-test-utils: 2.0.1
551
+ - tinylicious: 2.0.1
552
+
553
+ #### Minimum TypeScript version now 5.1.6 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
554
+
555
+ The minimum supported TypeScript version for Fluid 2.0 clients is now 5.1.6.
496
556
 
497
557
  ## 2.0.0-internal.6.4.0
498
558
 
@@ -514,9 +574,9 @@ Dependency updates only.
514
574
 
515
575
  ### Major Changes
516
576
 
517
- - Upgraded typescript transpilation target to ES2020 [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
577
+ #### Upgraded typescript transpilation target to ES2020 [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
518
578
 
519
- 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.
579
+ 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.
520
580
 
521
581
  ## 2.0.0-internal.5.4.0
522
582
 
@@ -526,11 +586,11 @@ Dependency updates only.
526
586
 
527
587
  ### Minor Changes
528
588
 
529
- - New interfaces to discover getRelaySessionInfo API ([#16300](https://github.com/microsoft/FluidFramework/issues/16300)) [a25789cd37](https://github.com/microsoft/FluidFramework/commits/a25789cd37bf60ebc4a08e1a9f7eaa8c65f4eae2)
589
+ #### New interfaces to discover getRelaySessionInfo API ([#16300](https://github.com/microsoft/FluidFramework/issues/16300)) [a25789cd37](https://github.com/microsoft/FluidFramework/commits/a25789cd37bf60ebc4a08e1a9f7eaa8c65f4eae2)
530
590
 
531
- There are new interfaces `IRelaySessionAwareDriverFactory` and `IProvideSessionAwareDriverFactory` in
532
- odsp-driver-definitions that enable using the provider pattern to discover the new API `getRelaySessionInfo` in
533
- odsp-driver.
591
+ There are new interfaces `IRelaySessionAwareDriverFactory` and `IProvideSessionAwareDriverFactory` in
592
+ odsp-driver-definitions that enable using the provider pattern to discover the new API `getRelaySessionInfo` in
593
+ odsp-driver.
534
594
 
535
595
  ## 2.0.0-internal.5.2.0
536
596
 
@@ -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.13.0",
3
+ "version": "3.15.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.13.0"
36
+ "@fluidframework/driver-definitions": "~3.15.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.12.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
  }