@fluidframework/routerlicious-driver 2.0.0-rc.2.0.2 → 2.0.0-rc.3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/api-extractor-lint.json +1 -1
- package/api-extractor.json +1 -1
- package/api-report/routerlicious-driver.api.md +3 -3
- package/beta.d.ts +11 -0
- package/{lib/storageContracts.mjs → dist/axios.cjs} +3 -2
- package/dist/axios.cjs.map +1 -0
- package/dist/axios.d.cts +7 -0
- package/dist/axios.d.cts.map +1 -0
- package/dist/beta.d.ts +15 -0
- package/dist/cache.js +2 -2
- package/dist/cache.js.map +1 -1
- package/dist/defaultTokenProvider.d.ts +1 -1
- package/dist/defaultTokenProvider.d.ts.map +1 -1
- package/dist/defaultTokenProvider.js.map +1 -1
- package/dist/deltaStorageService.d.ts +3 -3
- package/dist/deltaStorageService.d.ts.map +1 -1
- package/dist/deltaStorageService.js +12 -12
- package/dist/deltaStorageService.js.map +1 -1
- package/dist/documentDeltaConnection.d.ts +4 -3
- package/dist/documentDeltaConnection.d.ts.map +1 -1
- package/dist/documentDeltaConnection.js +6 -6
- package/dist/documentDeltaConnection.js.map +1 -1
- package/dist/documentService.d.ts +7 -7
- package/dist/documentService.d.ts.map +1 -1
- package/dist/documentService.js +30 -31
- package/dist/documentService.js.map +1 -1
- package/dist/documentServiceFactory.d.ts +3 -3
- package/dist/documentServiceFactory.d.ts.map +1 -1
- package/dist/documentServiceFactory.js +43 -43
- package/dist/documentServiceFactory.js.map +1 -1
- package/dist/documentStorageService.d.ts +8 -8
- package/dist/documentStorageService.d.ts.map +1 -1
- package/dist/documentStorageService.js +9 -9
- package/dist/documentStorageService.js.map +1 -1
- package/dist/errorUtils.d.ts +4 -3
- package/dist/errorUtils.d.ts.map +1 -1
- package/dist/errorUtils.js +8 -9
- package/dist/errorUtils.js.map +1 -1
- package/dist/gitManager.d.ts +3 -3
- package/dist/gitManager.d.ts.map +1 -1
- package/dist/gitManager.js.map +1 -1
- package/dist/historian.d.ts +4 -4
- package/dist/historian.d.ts.map +1 -1
- package/dist/historian.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +18 -0
- package/dist/mapWithExpiration.js +2 -2
- package/dist/mapWithExpiration.js.map +1 -1
- package/dist/nullBlobStorageService.d.ts +1 -1
- package/dist/nullBlobStorageService.d.ts.map +1 -1
- package/dist/nullBlobStorageService.js.map +1 -1
- package/dist/package.json +3 -0
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/public.d.ts +15 -0
- package/dist/r11sSnapshotParser.d.ts +1 -1
- package/dist/r11sSnapshotParser.d.ts.map +1 -1
- package/dist/r11sSnapshotParser.js.map +1 -1
- package/dist/restWrapper.d.ts +4 -4
- package/dist/restWrapper.d.ts.map +1 -1
- package/dist/restWrapper.js +16 -16
- package/dist/restWrapper.js.map +1 -1
- package/dist/restWrapperBase.d.ts +2 -2
- package/dist/restWrapperBase.d.ts.map +1 -1
- package/dist/restWrapperBase.js.map +1 -1
- package/dist/retriableGitManager.d.ts +3 -3
- package/dist/retriableGitManager.d.ts.map +1 -1
- package/dist/retriableGitManager.js +2 -2
- package/dist/retriableGitManager.js.map +1 -1
- package/dist/routerliciousResolvedUrl.d.ts +1 -1
- package/dist/routerliciousResolvedUrl.d.ts.map +1 -1
- package/dist/routerliciousResolvedUrl.js.map +1 -1
- package/dist/shreddedSummaryDocumentStorageService.d.ts +6 -6
- package/dist/shreddedSummaryDocumentStorageService.d.ts.map +1 -1
- package/dist/shreddedSummaryDocumentStorageService.js +13 -13
- package/dist/shreddedSummaryDocumentStorageService.js.map +1 -1
- package/dist/storageContracts.d.ts +2 -2
- package/dist/storageContracts.d.ts.map +1 -1
- package/dist/storageContracts.js.map +1 -1
- package/dist/summaryTreeUploadManager.d.ts +1 -1
- package/dist/summaryTreeUploadManager.d.ts.map +1 -1
- package/dist/summaryTreeUploadManager.js +6 -6
- package/dist/summaryTreeUploadManager.js.map +1 -1
- package/dist/treeUtils.d.ts +2 -2
- package/dist/treeUtils.d.ts.map +1 -1
- package/dist/treeUtils.js +4 -4
- package/dist/treeUtils.js.map +1 -1
- package/dist/urlUtils.d.ts +1 -1
- package/dist/urlUtils.d.ts.map +1 -1
- package/dist/urlUtils.js.map +1 -1
- package/dist/wholeSummaryDocumentStorageService.d.ts +6 -6
- package/dist/wholeSummaryDocumentStorageService.d.ts.map +1 -1
- package/dist/wholeSummaryDocumentStorageService.js +25 -25
- package/dist/wholeSummaryDocumentStorageService.js.map +1 -1
- package/dist/wholeSummaryUploadManager.d.ts +1 -1
- package/dist/wholeSummaryUploadManager.d.ts.map +1 -1
- package/dist/wholeSummaryUploadManager.js.map +1 -1
- package/internal.d.ts +11 -0
- package/legacy.d.ts +11 -0
- package/lib/axios.cjs +7 -0
- package/lib/axios.cjs.map +1 -0
- package/lib/axios.d.cts +7 -0
- package/lib/axios.d.cts.map +1 -0
- package/lib/beta.d.ts +15 -0
- package/lib/{cache.d.mts → cache.d.ts} +1 -1
- package/lib/cache.d.ts.map +1 -0
- package/lib/{cache.mjs → cache.js} +2 -2
- package/lib/cache.js.map +1 -0
- package/lib/{contracts.d.mts → contracts.d.ts} +1 -1
- package/lib/contracts.d.ts.map +1 -0
- package/lib/{policies.mjs → contracts.js} +1 -1
- package/lib/contracts.js.map +1 -0
- package/lib/{createNewUtils.d.mts → createNewUtils.d.ts} +1 -1
- package/lib/createNewUtils.d.ts.map +1 -0
- package/lib/{createNewUtils.mjs → createNewUtils.js} +1 -1
- package/lib/createNewUtils.js.map +1 -0
- package/lib/{defaultTokenProvider.d.mts → defaultTokenProvider.d.ts} +2 -2
- package/lib/defaultTokenProvider.d.ts.map +1 -0
- package/lib/{defaultTokenProvider.mjs → defaultTokenProvider.js} +1 -1
- package/lib/defaultTokenProvider.js.map +1 -0
- package/lib/{definitions.d.mts → definitions.d.ts} +1 -1
- package/lib/definitions.d.ts.map +1 -0
- package/lib/{definitions.mjs → definitions.js} +1 -1
- package/lib/definitions.js.map +1 -0
- package/lib/{deltaStorageService.d.mts → deltaStorageService.d.ts} +4 -4
- package/lib/deltaStorageService.d.ts.map +1 -0
- package/lib/{deltaStorageService.mjs → deltaStorageService.js} +4 -4
- package/lib/deltaStorageService.js.map +1 -0
- package/lib/{documentDeltaConnection.d.mts → documentDeltaConnection.d.ts} +5 -4
- package/lib/documentDeltaConnection.d.ts.map +1 -0
- package/lib/{documentDeltaConnection.mjs → documentDeltaConnection.js} +4 -4
- package/lib/documentDeltaConnection.js.map +1 -0
- package/lib/{documentService.d.mts → documentService.d.ts} +8 -8
- package/lib/documentService.d.ts.map +1 -0
- package/lib/{documentService.mjs → documentService.js} +13 -14
- package/lib/documentService.js.map +1 -0
- package/lib/{documentServiceFactory.d.mts → documentServiceFactory.d.ts} +4 -4
- package/lib/documentServiceFactory.d.ts.map +1 -0
- package/lib/{documentServiceFactory.mjs → documentServiceFactory.js} +12 -12
- package/lib/documentServiceFactory.js.map +1 -0
- package/lib/{documentStorageService.d.mts → documentStorageService.d.ts} +9 -9
- package/lib/documentStorageService.d.ts.map +1 -0
- package/lib/{documentStorageService.mjs → documentStorageService.js} +5 -5
- package/lib/documentStorageService.js.map +1 -0
- package/lib/{errorUtils.d.mts → errorUtils.d.ts} +5 -4
- package/lib/errorUtils.d.ts.map +1 -0
- package/lib/{errorUtils.mjs → errorUtils.js} +4 -5
- package/lib/errorUtils.js.map +1 -0
- package/lib/{gitManager.d.mts → gitManager.d.ts} +4 -4
- package/lib/gitManager.d.ts.map +1 -0
- package/lib/{gitManager.mjs → gitManager.js} +1 -1
- package/lib/gitManager.js.map +1 -0
- package/lib/{historian.d.mts → historian.d.ts} +5 -5
- package/lib/historian.d.ts.map +1 -0
- package/lib/{historian.mjs → historian.js} +1 -1
- package/lib/historian.js.map +1 -0
- package/lib/{index.d.mts → index.d.ts} +7 -7
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +11 -0
- package/lib/index.js.map +1 -0
- package/lib/legacy.d.ts +18 -0
- package/lib/{mapWithExpiration.d.mts → mapWithExpiration.d.ts} +1 -1
- package/lib/mapWithExpiration.d.ts.map +1 -0
- package/lib/{mapWithExpiration.mjs → mapWithExpiration.js} +2 -2
- package/lib/mapWithExpiration.js.map +1 -0
- package/lib/{nullBlobStorageService.d.mts → nullBlobStorageService.d.ts} +2 -2
- package/lib/nullBlobStorageService.d.ts.map +1 -0
- package/lib/{nullBlobStorageService.mjs → nullBlobStorageService.js} +1 -1
- package/lib/nullBlobStorageService.js.map +1 -0
- package/lib/{packageVersion.d.mts → packageVersion.d.ts} +2 -2
- package/lib/packageVersion.d.ts.map +1 -0
- package/lib/{packageVersion.mjs → packageVersion.js} +2 -2
- package/lib/packageVersion.js.map +1 -0
- package/lib/{policies.d.mts → policies.d.ts} +1 -1
- package/lib/policies.d.ts.map +1 -0
- package/lib/{contracts.mjs → policies.js} +1 -1
- package/lib/policies.js.map +1 -0
- package/lib/public.d.ts +15 -0
- package/lib/{r11sSnapshotParser.d.mts → r11sSnapshotParser.d.ts} +2 -2
- package/lib/r11sSnapshotParser.d.ts.map +1 -0
- package/lib/{r11sSnapshotParser.mjs → r11sSnapshotParser.js} +1 -1
- package/lib/r11sSnapshotParser.js.map +1 -0
- package/lib/{restWrapper.d.mts → restWrapper.d.ts} +5 -5
- package/lib/restWrapper.d.ts.map +1 -0
- package/lib/{restWrapper.mjs → restWrapper.js} +8 -8
- package/lib/restWrapper.js.map +1 -0
- package/lib/{restWrapperBase.d.mts → restWrapperBase.d.ts} +3 -3
- package/lib/restWrapperBase.d.ts.map +1 -0
- package/lib/{restWrapperBase.mjs → restWrapperBase.js} +1 -1
- package/lib/restWrapperBase.js.map +1 -0
- package/lib/{retriableGitManager.d.mts → retriableGitManager.d.ts} +4 -4
- package/lib/retriableGitManager.d.ts.map +1 -0
- package/lib/{retriableGitManager.mjs → retriableGitManager.js} +2 -2
- package/lib/retriableGitManager.js.map +1 -0
- package/lib/{routerliciousResolvedUrl.d.mts → routerliciousResolvedUrl.d.ts} +2 -2
- package/lib/routerliciousResolvedUrl.d.ts.map +1 -0
- package/lib/{routerliciousResolvedUrl.mjs → routerliciousResolvedUrl.js} +1 -1
- package/lib/routerliciousResolvedUrl.js.map +1 -0
- package/lib/{shreddedSummaryDocumentStorageService.d.mts → shreddedSummaryDocumentStorageService.d.ts} +7 -7
- package/lib/shreddedSummaryDocumentStorageService.d.ts.map +1 -0
- package/lib/{shreddedSummaryDocumentStorageService.mjs → shreddedSummaryDocumentStorageService.js} +6 -6
- package/lib/shreddedSummaryDocumentStorageService.js.map +1 -0
- package/lib/{storageContracts.d.mts → storageContracts.d.ts} +3 -3
- package/lib/storageContracts.d.ts.map +1 -0
- package/lib/storageContracts.js +6 -0
- package/lib/storageContracts.js.map +1 -0
- package/lib/{summaryTreeUploadManager.d.mts → summaryTreeUploadManager.d.ts} +2 -2
- package/lib/summaryTreeUploadManager.d.ts.map +1 -0
- package/lib/{summaryTreeUploadManager.mjs → summaryTreeUploadManager.js} +3 -3
- package/lib/summaryTreeUploadManager.js.map +1 -0
- package/lib/{tokens.d.mts → tokens.d.ts} +1 -1
- package/lib/tokens.d.ts.map +1 -0
- package/lib/{tokens.mjs → tokens.js} +1 -1
- package/lib/tokens.js.map +1 -0
- package/lib/{treeUtils.d.mts → treeUtils.d.ts} +3 -3
- package/lib/treeUtils.d.ts.map +1 -0
- package/lib/{treeUtils.mjs → treeUtils.js} +2 -2
- package/lib/treeUtils.js.map +1 -0
- package/lib/{urlUtils.d.mts → urlUtils.d.ts} +2 -2
- package/lib/urlUtils.d.ts.map +1 -0
- package/lib/{urlUtils.mjs → urlUtils.js} +1 -1
- package/lib/urlUtils.js.map +1 -0
- package/lib/{wholeSummaryDocumentStorageService.d.mts → wholeSummaryDocumentStorageService.d.ts} +7 -7
- package/lib/wholeSummaryDocumentStorageService.d.ts.map +1 -0
- package/lib/{wholeSummaryDocumentStorageService.mjs → wholeSummaryDocumentStorageService.js} +9 -9
- package/lib/wholeSummaryDocumentStorageService.js.map +1 -0
- package/lib/{wholeSummaryUploadManager.d.mts → wholeSummaryUploadManager.d.ts} +2 -2
- package/lib/wholeSummaryUploadManager.d.ts.map +1 -0
- package/lib/{wholeSummaryUploadManager.mjs → wholeSummaryUploadManager.js} +1 -1
- package/lib/wholeSummaryUploadManager.js.map +1 -0
- package/package.json +50 -68
- package/src/axios.cts +8 -0
- package/src/cache.ts +1 -1
- package/src/defaultTokenProvider.ts +1 -1
- package/src/deltaStorageService.ts +11 -9
- package/src/documentDeltaConnection.ts +7 -5
- package/src/documentService.ts +26 -20
- package/src/documentServiceFactory.ts +19 -18
- package/src/documentStorageService.ts +12 -11
- package/src/errorUtils.ts +9 -12
- package/src/gitManager.ts +4 -3
- package/src/historian.ts +5 -4
- package/src/index.ts +6 -6
- package/src/mapWithExpiration.ts +1 -1
- package/src/nullBlobStorageService.ts +4 -1
- package/src/packageVersion.ts +1 -1
- package/src/r11sSnapshotParser.ts +7 -2
- package/src/restWrapper.ts +15 -13
- package/src/restWrapperBase.ts +2 -2
- package/src/retriableGitManager.ts +5 -4
- package/src/routerliciousResolvedUrl.ts +1 -1
- package/src/shreddedSummaryDocumentStorageService.ts +17 -16
- package/src/storageContracts.ts +3 -2
- package/src/summaryTreeUploadManager.ts +4 -3
- package/src/treeUtils.ts +4 -3
- package/src/urlUtils.ts +1 -1
- package/src/wholeSummaryDocumentStorageService.ts +21 -20
- package/src/wholeSummaryUploadManager.ts +2 -1
- package/tsconfig.cjs.json +7 -0
- package/tsconfig.json +2 -5
- package/api-extractor-esm.json +0 -4
- package/dist/routerlicious-driver-alpha.d.ts +0 -113
- package/dist/routerlicious-driver-beta.d.ts +0 -97
- package/dist/routerlicious-driver-public.d.ts +0 -97
- package/dist/routerlicious-driver-untrimmed.d.ts +0 -260
- package/lib/cache.d.mts.map +0 -1
- package/lib/cache.mjs.map +0 -1
- package/lib/contracts.d.mts.map +0 -1
- package/lib/contracts.mjs.map +0 -1
- package/lib/createNewUtils.d.mts.map +0 -1
- package/lib/createNewUtils.mjs.map +0 -1
- package/lib/defaultTokenProvider.d.mts.map +0 -1
- package/lib/defaultTokenProvider.mjs.map +0 -1
- package/lib/definitions.d.mts.map +0 -1
- package/lib/definitions.mjs.map +0 -1
- package/lib/deltaStorageService.d.mts.map +0 -1
- package/lib/deltaStorageService.mjs.map +0 -1
- package/lib/documentDeltaConnection.d.mts.map +0 -1
- package/lib/documentDeltaConnection.mjs.map +0 -1
- package/lib/documentService.d.mts.map +0 -1
- package/lib/documentService.mjs.map +0 -1
- package/lib/documentServiceFactory.d.mts.map +0 -1
- package/lib/documentServiceFactory.mjs.map +0 -1
- package/lib/documentStorageService.d.mts.map +0 -1
- package/lib/documentStorageService.mjs.map +0 -1
- package/lib/errorUtils.d.mts.map +0 -1
- package/lib/errorUtils.mjs.map +0 -1
- package/lib/gitManager.d.mts.map +0 -1
- package/lib/gitManager.mjs.map +0 -1
- package/lib/historian.d.mts.map +0 -1
- package/lib/historian.mjs.map +0 -1
- package/lib/index.d.mts.map +0 -1
- package/lib/index.mjs +0 -8
- package/lib/index.mjs.map +0 -1
- package/lib/mapWithExpiration.d.mts.map +0 -1
- package/lib/mapWithExpiration.mjs.map +0 -1
- package/lib/nullBlobStorageService.d.mts.map +0 -1
- package/lib/nullBlobStorageService.mjs.map +0 -1
- package/lib/packageVersion.d.mts.map +0 -1
- package/lib/packageVersion.mjs.map +0 -1
- package/lib/policies.d.mts.map +0 -1
- package/lib/policies.mjs.map +0 -1
- package/lib/r11sSnapshotParser.d.mts.map +0 -1
- package/lib/r11sSnapshotParser.mjs.map +0 -1
- package/lib/restWrapper.d.mts.map +0 -1
- package/lib/restWrapper.mjs.map +0 -1
- package/lib/restWrapperBase.d.mts.map +0 -1
- package/lib/restWrapperBase.mjs.map +0 -1
- package/lib/retriableGitManager.d.mts.map +0 -1
- package/lib/retriableGitManager.mjs.map +0 -1
- package/lib/routerlicious-driver-alpha.d.mts +0 -113
- package/lib/routerlicious-driver-beta.d.mts +0 -97
- package/lib/routerlicious-driver-public.d.mts +0 -97
- package/lib/routerlicious-driver-untrimmed.d.mts +0 -260
- package/lib/routerliciousResolvedUrl.d.mts.map +0 -1
- package/lib/routerliciousResolvedUrl.mjs.map +0 -1
- package/lib/shreddedSummaryDocumentStorageService.d.mts.map +0 -1
- package/lib/shreddedSummaryDocumentStorageService.mjs.map +0 -1
- package/lib/storageContracts.d.mts.map +0 -1
- package/lib/storageContracts.mjs.map +0 -1
- package/lib/summaryTreeUploadManager.d.mts.map +0 -1
- package/lib/summaryTreeUploadManager.mjs.map +0 -1
- package/lib/tokens.d.mts.map +0 -1
- package/lib/tokens.mjs.map +0 -1
- package/lib/treeUtils.d.mts.map +0 -1
- package/lib/treeUtils.mjs.map +0 -1
- package/lib/urlUtils.d.mts.map +0 -1
- package/lib/urlUtils.mjs.map +0 -1
- package/lib/wholeSummaryDocumentStorageService.d.mts.map +0 -1
- package/lib/wholeSummaryDocumentStorageService.mjs.map +0 -1
- package/lib/wholeSummaryUploadManager.d.mts.map +0 -1
- package/lib/wholeSummaryUploadManager.mjs.map +0 -1
- /package/{dist → lib}/tsdoc-metadata.json +0 -0
package/src/restWrapper.ts
CHANGED
|
@@ -3,28 +3,30 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { fromUtf8ToBase64, performance } from "@fluid-internal/client-utils";
|
|
6
7
|
import { ITelemetryBaseProperties } from "@fluidframework/core-interfaces";
|
|
8
|
+
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
9
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} from "@fluidframework/
|
|
12
|
-
import { assert } from "@fluidframework/core-utils";
|
|
13
|
-
import { fromUtf8ToBase64, performance } from "@fluid-internal/client-utils";
|
|
14
|
-
import { GenericNetworkError, NonRetryableError, RateLimiter } from "@fluidframework/driver-utils";
|
|
10
|
+
GenericNetworkError,
|
|
11
|
+
NonRetryableError,
|
|
12
|
+
RateLimiter,
|
|
13
|
+
} from "@fluidframework/driver-utils/internal";
|
|
15
14
|
import {
|
|
16
15
|
CorrelationIdHeaderName,
|
|
17
16
|
DriverVersionHeaderName,
|
|
18
|
-
getAuthorizationTokenFromCredentials,
|
|
19
17
|
RestLessClient,
|
|
18
|
+
getAuthorizationTokenFromCredentials,
|
|
20
19
|
} from "@fluidframework/server-services-client";
|
|
20
|
+
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
21
|
+
import { PerformanceEvent, numberFromString } from "@fluidframework/telemetry-utils/internal";
|
|
21
22
|
import fetch from "cross-fetch";
|
|
22
|
-
import type { AxiosRequestConfig, RawAxiosRequestHeaders } from "axios";
|
|
23
23
|
import safeStringify from "json-stringify-safe";
|
|
24
|
-
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
24
|
+
|
|
25
|
+
import type { AxiosRequestConfig, RawAxiosRequestHeaders } from "./axios.cjs";
|
|
26
|
+
import { RouterliciousErrorTypes, throwR11sNetworkError } from "./errorUtils.js";
|
|
27
|
+
import { pkgVersion as driverVersion } from "./packageVersion.js";
|
|
28
|
+
import { QueryStringType, RestWrapper } from "./restWrapperBase.js";
|
|
29
|
+
import { ITokenProvider, ITokenResponse } from "./tokens.js";
|
|
28
30
|
|
|
29
31
|
type AuthorizationHeaderGetter = (token: ITokenResponse) => string;
|
|
30
32
|
export type TokenFetcher = (refresh?: boolean) => Promise<ITokenResponse>;
|
package/src/restWrapperBase.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { AxiosRequestConfig, AxiosRequestHeaders } from "axios";
|
|
7
|
-
import { IR11sResponse } from "./restWrapper";
|
|
6
|
+
import type { AxiosRequestConfig, AxiosRequestHeaders } from "./axios.cjs";
|
|
7
|
+
import { IR11sResponse } from "./restWrapper.js";
|
|
8
8
|
|
|
9
9
|
export abstract class RestWrapper {
|
|
10
10
|
constructor(
|
|
@@ -3,16 +3,17 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { runWithRetry } from "@fluidframework/driver-utils/internal";
|
|
6
7
|
import type * as git from "@fluidframework/gitresources";
|
|
7
8
|
import {
|
|
8
9
|
IWholeSummaryPayload,
|
|
9
10
|
IWriteSummaryResponse,
|
|
10
11
|
} from "@fluidframework/server-services-client";
|
|
11
|
-
import { runWithRetry } from "@fluidframework/driver-utils";
|
|
12
12
|
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
13
|
-
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
13
|
+
|
|
14
|
+
import { IWholeFlatSnapshot } from "./contracts.js";
|
|
15
|
+
import { IR11sResponse } from "./restWrapper.js";
|
|
16
|
+
import { IGitManager } from "./storageContracts.js";
|
|
16
17
|
|
|
17
18
|
export class RetriableGitManager implements IGitManager {
|
|
18
19
|
constructor(
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { IResolvedUrl } from "@fluidframework/driver-definitions";
|
|
6
|
+
import type { IResolvedUrl } from "@fluidframework/driver-definitions/internal";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Routerlicious extends the resolved url with additional properties to control Routerlicious-specific behaviors.
|
|
@@ -3,18 +3,12 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
ITelemetryLoggerExt,
|
|
8
|
-
MonitoringContext,
|
|
9
|
-
PerformanceEvent,
|
|
10
|
-
createChildMonitoringContext,
|
|
11
|
-
} from "@fluidframework/telemetry-utils";
|
|
12
|
-
import { stringToBuffer, Uint8ArrayToString } from "@fluid-internal/client-utils";
|
|
6
|
+
import { Uint8ArrayToString, stringToBuffer } from "@fluid-internal/client-utils";
|
|
13
7
|
import {
|
|
14
8
|
IDocumentStorageService,
|
|
15
|
-
ISummaryContext,
|
|
16
9
|
IDocumentStorageServicePolicies,
|
|
17
|
-
|
|
10
|
+
ISummaryContext,
|
|
11
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
18
12
|
import { buildGitTreeHierarchy } from "@fluidframework/protocol-base";
|
|
19
13
|
import {
|
|
20
14
|
ICreateBlobResponse,
|
|
@@ -23,13 +17,20 @@ import {
|
|
|
23
17
|
ISummaryTree,
|
|
24
18
|
IVersion,
|
|
25
19
|
} from "@fluidframework/protocol-definitions";
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
20
|
+
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
21
|
+
import {
|
|
22
|
+
MonitoringContext,
|
|
23
|
+
PerformanceEvent,
|
|
24
|
+
createChildMonitoringContext,
|
|
25
|
+
} from "@fluidframework/telemetry-utils/internal";
|
|
26
|
+
|
|
27
|
+
import { ICache, InMemoryCache } from "./cache.js";
|
|
28
|
+
import { ISnapshotTreeVersion } from "./definitions.js";
|
|
29
|
+
import { GitManager } from "./gitManager.js";
|
|
30
|
+
import { IRouterliciousDriverPolicies } from "./policies.js";
|
|
31
|
+
import { RetriableGitManager } from "./retriableGitManager.js";
|
|
32
|
+
import { ISummaryUploadManager } from "./storageContracts.js";
|
|
33
|
+
import { SummaryTreeUploadManager } from "./summaryTreeUploadManager.js";
|
|
33
34
|
|
|
34
35
|
const isNode = typeof window === "undefined";
|
|
35
36
|
|
package/src/storageContracts.ts
CHANGED
|
@@ -10,8 +10,9 @@ import {
|
|
|
10
10
|
IWholeSummaryPayloadType,
|
|
11
11
|
IWriteSummaryResponse,
|
|
12
12
|
} from "@fluidframework/server-services-client";
|
|
13
|
-
|
|
14
|
-
import { IWholeFlatSnapshot } from "./contracts";
|
|
13
|
+
|
|
14
|
+
import { IWholeFlatSnapshot } from "./contracts.js";
|
|
15
|
+
import { IR11sResponse } from "./restWrapper.js";
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* Interface to a generic Git provider
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
import { assert, unreachableCase } from "@fluidframework/core-utils";
|
|
6
|
+
import { IsoBuffer, Uint8ArrayToString, gitHashFile } from "@fluid-internal/client-utils";
|
|
7
|
+
import { assert, unreachableCase } from "@fluidframework/core-utils/internal";
|
|
8
8
|
import { ICreateTreeEntry } from "@fluidframework/gitresources";
|
|
9
9
|
import { getGitMode, getGitType } from "@fluidframework/protocol-base";
|
|
10
10
|
import {
|
|
@@ -14,7 +14,8 @@ import {
|
|
|
14
14
|
SummaryType,
|
|
15
15
|
} from "@fluidframework/protocol-definitions";
|
|
16
16
|
import { IWholeSummaryPayloadType } from "@fluidframework/server-services-client";
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
import { IGitManager, ISummaryUploadManager } from "./storageContracts.js";
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
21
|
* Recursively writes summary tree as individual summary blobs.
|
package/src/treeUtils.ts
CHANGED
|
@@ -4,14 +4,15 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { IsoBuffer } from "@fluid-internal/client-utils";
|
|
7
|
-
import { assert } from "@fluidframework/core-utils";
|
|
7
|
+
import { assert } from "@fluidframework/core-utils/internal";
|
|
8
8
|
import {
|
|
9
|
-
SummaryType,
|
|
10
9
|
ISnapshotTree,
|
|
11
10
|
ISummaryTree,
|
|
12
11
|
SummaryObject,
|
|
12
|
+
SummaryType,
|
|
13
13
|
} from "@fluidframework/protocol-definitions";
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
import { INormalizedWholeSnapshot } from "./contracts.js";
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* Summary tree assembler props
|
package/src/urlUtils.ts
CHANGED
|
@@ -3,20 +3,14 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
PerformanceEvent,
|
|
10
|
-
createChildMonitoringContext,
|
|
11
|
-
} from "@fluidframework/telemetry-utils";
|
|
12
|
-
import { performance, stringToBuffer, Uint8ArrayToString } from "@fluid-internal/client-utils";
|
|
13
|
-
import { assert } from "@fluidframework/core-utils";
|
|
14
|
-
import { getW3CData, promiseRaceWithWinner } from "@fluidframework/driver-base";
|
|
6
|
+
import { Uint8ArrayToString, performance, stringToBuffer } from "@fluid-internal/client-utils";
|
|
7
|
+
import { assert } from "@fluidframework/core-utils/internal";
|
|
8
|
+
import { getW3CData, promiseRaceWithWinner } from "@fluidframework/driver-base/internal";
|
|
15
9
|
import {
|
|
16
10
|
IDocumentStorageService,
|
|
17
|
-
ISummaryContext,
|
|
18
11
|
IDocumentStorageServicePolicies,
|
|
19
|
-
|
|
12
|
+
ISummaryContext,
|
|
13
|
+
} from "@fluidframework/driver-definitions/internal";
|
|
20
14
|
import {
|
|
21
15
|
ICreateBlobResponse,
|
|
22
16
|
ISnapshotTree,
|
|
@@ -24,19 +18,26 @@ import {
|
|
|
24
18
|
ISummaryTree,
|
|
25
19
|
IVersion,
|
|
26
20
|
} from "@fluidframework/protocol-definitions";
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
21
|
+
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
22
|
+
import {
|
|
23
|
+
MonitoringContext,
|
|
24
|
+
PerformanceEvent,
|
|
25
|
+
createChildMonitoringContext,
|
|
26
|
+
} from "@fluidframework/telemetry-utils/internal";
|
|
27
|
+
|
|
28
|
+
import { ICache, InMemoryCache } from "./cache.js";
|
|
29
|
+
import { INormalizedWholeSnapshot, IWholeFlatSnapshot } from "./contracts.js";
|
|
30
|
+
import { GitManager } from "./gitManager.js";
|
|
31
|
+
import { IRouterliciousDriverPolicies } from "./policies.js";
|
|
32
|
+
import { convertWholeFlatSnapshotToSnapshotTreeAndBlobs } from "./r11sSnapshotParser.js";
|
|
33
|
+
import { IR11sResponse } from "./restWrapper.js";
|
|
34
|
+
import { ISummaryUploadManager } from "./storageContracts.js";
|
|
29
35
|
import {
|
|
30
36
|
convertSnapshotAndBlobsToSummaryTree,
|
|
31
37
|
evalBlobsAndTrees,
|
|
32
38
|
validateBlobsAndTrees,
|
|
33
|
-
} from "./treeUtils";
|
|
34
|
-
import {
|
|
35
|
-
import { WholeSummaryUploadManager } from "./wholeSummaryUploadManager";
|
|
36
|
-
import { ISummaryUploadManager } from "./storageContracts";
|
|
37
|
-
import { IR11sResponse } from "./restWrapper";
|
|
38
|
-
import { INormalizedWholeSnapshot, IWholeFlatSnapshot } from "./contracts";
|
|
39
|
-
import { convertWholeFlatSnapshotToSnapshotTreeAndBlobs } from "./r11sSnapshotParser";
|
|
39
|
+
} from "./treeUtils.js";
|
|
40
|
+
import { WholeSummaryUploadManager } from "./wholeSummaryUploadManager.js";
|
|
40
41
|
|
|
41
42
|
const latestSnapshotId: string = "latest";
|
|
42
43
|
|
|
@@ -9,7 +9,8 @@ import {
|
|
|
9
9
|
IWholeSummaryPayloadType,
|
|
10
10
|
convertSummaryTreeToWholeSummaryTree,
|
|
11
11
|
} from "@fluidframework/server-services-client";
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
import { IGitManager, ISummaryUploadManager } from "./storageContracts.js";
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* Converts summary to snapshot tree and uploads with single snaphot tree payload.
|
package/tsconfig.json
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends":
|
|
3
|
-
"../../../common/build/build-common/tsconfig.base.json",
|
|
4
|
-
"../../../common/build/build-common/tsconfig.cjs.json",
|
|
5
|
-
],
|
|
2
|
+
"extends": "../../../common/build/build-common/tsconfig.node16.json",
|
|
6
3
|
"include": ["src/**/*"],
|
|
7
4
|
"exclude": ["src/test/**/*"],
|
|
8
5
|
"compilerOptions": {
|
|
9
6
|
"rootDir": "./src",
|
|
10
|
-
"outDir": "./
|
|
7
|
+
"outDir": "./lib",
|
|
11
8
|
},
|
|
12
9
|
}
|
package/api-extractor-esm.json
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { IDocumentService } from '@fluidframework/driver-definitions';
|
|
2
|
-
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
|
|
3
|
-
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
4
|
-
import { ISession } from '@fluidframework/server-services-client';
|
|
5
|
-
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
6
|
-
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
7
|
-
import { ITokenClaims } from '@fluidframework/protocol-definitions';
|
|
8
|
-
|
|
9
|
-
/* Excluded from this release type: DefaultTokenProvider */
|
|
10
|
-
|
|
11
|
-
/* Excluded from this release type: DocumentPostCreateError */
|
|
12
|
-
|
|
13
|
-
/* Excluded from this release type: IRouterliciousDriverPolicies */
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Routerlicious extends the resolved url with additional properties to control Routerlicious-specific behaviors.
|
|
17
|
-
*
|
|
18
|
-
* @privateRemarks
|
|
19
|
-
* {@link isRouterliciousResolvedUrl} can be used to detect whether an {@link @fluidframework/driver-definitions#IResolvedUrl}
|
|
20
|
-
* is an IRouterliciousResolvedUrl.
|
|
21
|
-
*
|
|
22
|
-
* @alpha
|
|
23
|
-
*/
|
|
24
|
-
export declare interface IRouterliciousResolvedUrl extends IResolvedUrl {
|
|
25
|
-
/**
|
|
26
|
-
* A flag to facilitate type narrowing from {@link @fluidframework/driver-definitions#IResolvedUrl} to IRouterliciousResolvedUrl.
|
|
27
|
-
*/
|
|
28
|
-
routerliciousResolvedUrl: true;
|
|
29
|
-
/**
|
|
30
|
-
* Controls whether a newly created container will be ephemeral, which means the service will not retain it
|
|
31
|
-
* after the collaboration session ends. Only affects
|
|
32
|
-
* {@link @fluidframework/driver-definitions#IDocumentServiceFactory.createContainer} requests.
|
|
33
|
-
*
|
|
34
|
-
* @defaultValue If left undefined, treated as `false`
|
|
35
|
-
*/
|
|
36
|
-
createAsEphemeral?: boolean;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Abstracts the token fetching mechanism for a hosting application.
|
|
41
|
-
* The hosting application is responsible for providing an implementation.
|
|
42
|
-
* @public
|
|
43
|
-
*/
|
|
44
|
-
export declare interface ITokenProvider {
|
|
45
|
-
/**
|
|
46
|
-
* Fetches the orderer token from host.
|
|
47
|
-
*
|
|
48
|
-
* @param tenantId - Tenant ID.
|
|
49
|
-
* @param documentId - Optional. Document ID is only required for document-scoped requests.
|
|
50
|
-
* @param refresh - Optional flag indicating whether token fetch must bypass local cache.
|
|
51
|
-
* This likely indicates that some previous request failed authorization due to an expired token,
|
|
52
|
-
* and so a fresh token is required.
|
|
53
|
-
*
|
|
54
|
-
* Default: `false`.
|
|
55
|
-
*
|
|
56
|
-
* NOTE: This parameter will be made required in the future.
|
|
57
|
-
*/
|
|
58
|
-
fetchOrdererToken(tenantId: string, documentId?: string, refresh?: boolean): Promise<ITokenResponse>;
|
|
59
|
-
/**
|
|
60
|
-
* Fetches the storage token from host.
|
|
61
|
-
*
|
|
62
|
-
* @param tenantId - Tenant ID.
|
|
63
|
-
* @param documentId - Document ID.
|
|
64
|
-
* @param refresh - Optional flag indicating whether token fetch must bypass local cache.
|
|
65
|
-
* This likely indicates that some previous request failed authorization due to an expired token,
|
|
66
|
-
* and so a fresh token is required.
|
|
67
|
-
*
|
|
68
|
-
* Default: `false`.
|
|
69
|
-
*
|
|
70
|
-
* NOTE: This parameter will be made required in the future.
|
|
71
|
-
*/
|
|
72
|
-
fetchStorageToken(tenantId: string, documentId: string, refresh?: boolean): Promise<ITokenResponse>;
|
|
73
|
-
/**
|
|
74
|
-
* A callback triggered directly after creating the document. In this callback the client has the opportunity, to
|
|
75
|
-
* verify against an authorization service, if the user who claims to create the document is the same user who
|
|
76
|
-
* created it.
|
|
77
|
-
*
|
|
78
|
-
* @remarks Notes:
|
|
79
|
-
*
|
|
80
|
-
* * Using the callback may have performance impact on the document creation process.
|
|
81
|
-
*
|
|
82
|
-
* * Any exceptions thrown in the callback would fail the creation workflow.
|
|
83
|
-
*
|
|
84
|
-
* @param documentId - Document ID.
|
|
85
|
-
* @param creationToken - A special token that doesn't provide any kind of access, but it has the user's payload
|
|
86
|
-
* and document id. It can be used to validate the identity of the document creator.
|
|
87
|
-
*/
|
|
88
|
-
documentPostCreateCallback?(documentId: string, creationToken: string): Promise<void>;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* @public
|
|
93
|
-
*/
|
|
94
|
-
export declare interface ITokenResponse {
|
|
95
|
-
/**
|
|
96
|
-
* {@link https://jwt.io/introduction/ | JSON Web Token (JWT)} value.
|
|
97
|
-
*/
|
|
98
|
-
jwt: string;
|
|
99
|
-
/**
|
|
100
|
-
* A flag indicating whether token was obtained from local cache.
|
|
101
|
-
*
|
|
102
|
-
* @remarks `undefined` indicates that the source of the token could not be determined.
|
|
103
|
-
*/
|
|
104
|
-
fromCache?: boolean;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/* Excluded from this release type: ITokenService */
|
|
108
|
-
|
|
109
|
-
/* Excluded from this release type: RouterliciousDocumentServiceFactory */
|
|
110
|
-
|
|
111
|
-
/* Excluded from this release type: RouterliciousErrorTypes */
|
|
112
|
-
|
|
113
|
-
export { }
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { IDocumentService } from '@fluidframework/driver-definitions';
|
|
2
|
-
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
|
|
3
|
-
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
4
|
-
import { ISession } from '@fluidframework/server-services-client';
|
|
5
|
-
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
6
|
-
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
7
|
-
import { ITokenClaims } from '@fluidframework/protocol-definitions';
|
|
8
|
-
|
|
9
|
-
/* Excluded from this release type: DefaultTokenProvider */
|
|
10
|
-
|
|
11
|
-
/* Excluded from this release type: DocumentPostCreateError */
|
|
12
|
-
|
|
13
|
-
/* Excluded from this release type: IDocumentService */
|
|
14
|
-
|
|
15
|
-
/* Excluded from this release type: IDocumentServiceFactory */
|
|
16
|
-
|
|
17
|
-
/* Excluded from this release type: IResolvedUrl */
|
|
18
|
-
|
|
19
|
-
/* Excluded from this release type: IRouterliciousDriverPolicies */
|
|
20
|
-
|
|
21
|
-
/* Excluded from this release type: IRouterliciousResolvedUrl */
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Abstracts the token fetching mechanism for a hosting application.
|
|
25
|
-
* The hosting application is responsible for providing an implementation.
|
|
26
|
-
* @public
|
|
27
|
-
*/
|
|
28
|
-
export declare interface ITokenProvider {
|
|
29
|
-
/**
|
|
30
|
-
* Fetches the orderer token from host.
|
|
31
|
-
*
|
|
32
|
-
* @param tenantId - Tenant ID.
|
|
33
|
-
* @param documentId - Optional. Document ID is only required for document-scoped requests.
|
|
34
|
-
* @param refresh - Optional flag indicating whether token fetch must bypass local cache.
|
|
35
|
-
* This likely indicates that some previous request failed authorization due to an expired token,
|
|
36
|
-
* and so a fresh token is required.
|
|
37
|
-
*
|
|
38
|
-
* Default: `false`.
|
|
39
|
-
*
|
|
40
|
-
* NOTE: This parameter will be made required in the future.
|
|
41
|
-
*/
|
|
42
|
-
fetchOrdererToken(tenantId: string, documentId?: string, refresh?: boolean): Promise<ITokenResponse>;
|
|
43
|
-
/**
|
|
44
|
-
* Fetches the storage token from host.
|
|
45
|
-
*
|
|
46
|
-
* @param tenantId - Tenant ID.
|
|
47
|
-
* @param documentId - Document ID.
|
|
48
|
-
* @param refresh - Optional flag indicating whether token fetch must bypass local cache.
|
|
49
|
-
* This likely indicates that some previous request failed authorization due to an expired token,
|
|
50
|
-
* and so a fresh token is required.
|
|
51
|
-
*
|
|
52
|
-
* Default: `false`.
|
|
53
|
-
*
|
|
54
|
-
* NOTE: This parameter will be made required in the future.
|
|
55
|
-
*/
|
|
56
|
-
fetchStorageToken(tenantId: string, documentId: string, refresh?: boolean): Promise<ITokenResponse>;
|
|
57
|
-
/**
|
|
58
|
-
* A callback triggered directly after creating the document. In this callback the client has the opportunity, to
|
|
59
|
-
* verify against an authorization service, if the user who claims to create the document is the same user who
|
|
60
|
-
* created it.
|
|
61
|
-
*
|
|
62
|
-
* @remarks Notes:
|
|
63
|
-
*
|
|
64
|
-
* * Using the callback may have performance impact on the document creation process.
|
|
65
|
-
*
|
|
66
|
-
* * Any exceptions thrown in the callback would fail the creation workflow.
|
|
67
|
-
*
|
|
68
|
-
* @param documentId - Document ID.
|
|
69
|
-
* @param creationToken - A special token that doesn't provide any kind of access, but it has the user's payload
|
|
70
|
-
* and document id. It can be used to validate the identity of the document creator.
|
|
71
|
-
*/
|
|
72
|
-
documentPostCreateCallback?(documentId: string, creationToken: string): Promise<void>;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* @public
|
|
77
|
-
*/
|
|
78
|
-
export declare interface ITokenResponse {
|
|
79
|
-
/**
|
|
80
|
-
* {@link https://jwt.io/introduction/ | JSON Web Token (JWT)} value.
|
|
81
|
-
*/
|
|
82
|
-
jwt: string;
|
|
83
|
-
/**
|
|
84
|
-
* A flag indicating whether token was obtained from local cache.
|
|
85
|
-
*
|
|
86
|
-
* @remarks `undefined` indicates that the source of the token could not be determined.
|
|
87
|
-
*/
|
|
88
|
-
fromCache?: boolean;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/* Excluded from this release type: ITokenService */
|
|
92
|
-
|
|
93
|
-
/* Excluded from this release type: RouterliciousDocumentServiceFactory */
|
|
94
|
-
|
|
95
|
-
/* Excluded from this release type: RouterliciousErrorTypes */
|
|
96
|
-
|
|
97
|
-
export { }
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { IDocumentService } from '@fluidframework/driver-definitions';
|
|
2
|
-
import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
|
|
3
|
-
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
4
|
-
import { ISession } from '@fluidframework/server-services-client';
|
|
5
|
-
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
6
|
-
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
7
|
-
import { ITokenClaims } from '@fluidframework/protocol-definitions';
|
|
8
|
-
|
|
9
|
-
/* Excluded from this release type: DefaultTokenProvider */
|
|
10
|
-
|
|
11
|
-
/* Excluded from this release type: DocumentPostCreateError */
|
|
12
|
-
|
|
13
|
-
/* Excluded from this release type: IDocumentService */
|
|
14
|
-
|
|
15
|
-
/* Excluded from this release type: IDocumentServiceFactory */
|
|
16
|
-
|
|
17
|
-
/* Excluded from this release type: IResolvedUrl */
|
|
18
|
-
|
|
19
|
-
/* Excluded from this release type: IRouterliciousDriverPolicies */
|
|
20
|
-
|
|
21
|
-
/* Excluded from this release type: IRouterliciousResolvedUrl */
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Abstracts the token fetching mechanism for a hosting application.
|
|
25
|
-
* The hosting application is responsible for providing an implementation.
|
|
26
|
-
* @public
|
|
27
|
-
*/
|
|
28
|
-
export declare interface ITokenProvider {
|
|
29
|
-
/**
|
|
30
|
-
* Fetches the orderer token from host.
|
|
31
|
-
*
|
|
32
|
-
* @param tenantId - Tenant ID.
|
|
33
|
-
* @param documentId - Optional. Document ID is only required for document-scoped requests.
|
|
34
|
-
* @param refresh - Optional flag indicating whether token fetch must bypass local cache.
|
|
35
|
-
* This likely indicates that some previous request failed authorization due to an expired token,
|
|
36
|
-
* and so a fresh token is required.
|
|
37
|
-
*
|
|
38
|
-
* Default: `false`.
|
|
39
|
-
*
|
|
40
|
-
* NOTE: This parameter will be made required in the future.
|
|
41
|
-
*/
|
|
42
|
-
fetchOrdererToken(tenantId: string, documentId?: string, refresh?: boolean): Promise<ITokenResponse>;
|
|
43
|
-
/**
|
|
44
|
-
* Fetches the storage token from host.
|
|
45
|
-
*
|
|
46
|
-
* @param tenantId - Tenant ID.
|
|
47
|
-
* @param documentId - Document ID.
|
|
48
|
-
* @param refresh - Optional flag indicating whether token fetch must bypass local cache.
|
|
49
|
-
* This likely indicates that some previous request failed authorization due to an expired token,
|
|
50
|
-
* and so a fresh token is required.
|
|
51
|
-
*
|
|
52
|
-
* Default: `false`.
|
|
53
|
-
*
|
|
54
|
-
* NOTE: This parameter will be made required in the future.
|
|
55
|
-
*/
|
|
56
|
-
fetchStorageToken(tenantId: string, documentId: string, refresh?: boolean): Promise<ITokenResponse>;
|
|
57
|
-
/**
|
|
58
|
-
* A callback triggered directly after creating the document. In this callback the client has the opportunity, to
|
|
59
|
-
* verify against an authorization service, if the user who claims to create the document is the same user who
|
|
60
|
-
* created it.
|
|
61
|
-
*
|
|
62
|
-
* @remarks Notes:
|
|
63
|
-
*
|
|
64
|
-
* * Using the callback may have performance impact on the document creation process.
|
|
65
|
-
*
|
|
66
|
-
* * Any exceptions thrown in the callback would fail the creation workflow.
|
|
67
|
-
*
|
|
68
|
-
* @param documentId - Document ID.
|
|
69
|
-
* @param creationToken - A special token that doesn't provide any kind of access, but it has the user's payload
|
|
70
|
-
* and document id. It can be used to validate the identity of the document creator.
|
|
71
|
-
*/
|
|
72
|
-
documentPostCreateCallback?(documentId: string, creationToken: string): Promise<void>;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* @public
|
|
77
|
-
*/
|
|
78
|
-
export declare interface ITokenResponse {
|
|
79
|
-
/**
|
|
80
|
-
* {@link https://jwt.io/introduction/ | JSON Web Token (JWT)} value.
|
|
81
|
-
*/
|
|
82
|
-
jwt: string;
|
|
83
|
-
/**
|
|
84
|
-
* A flag indicating whether token was obtained from local cache.
|
|
85
|
-
*
|
|
86
|
-
* @remarks `undefined` indicates that the source of the token could not be determined.
|
|
87
|
-
*/
|
|
88
|
-
fromCache?: boolean;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/* Excluded from this release type: ITokenService */
|
|
92
|
-
|
|
93
|
-
/* Excluded from this release type: RouterliciousDocumentServiceFactory */
|
|
94
|
-
|
|
95
|
-
/* Excluded from this release type: RouterliciousErrorTypes */
|
|
96
|
-
|
|
97
|
-
export { }
|