@fluidframework/odsp-driver 2.53.1 → 2.61.0-355054
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/.mocharc.cjs +1 -2
- package/CHANGELOG.md +4 -0
- package/README.md +19 -0
- package/api-report/{odsp-driver.legacy.alpha.api.md → odsp-driver.legacy.beta.api.md} +31 -31
- package/dist/checkUrl.d.ts +1 -1
- package/dist/checkUrl.js +1 -1
- package/dist/checkUrl.js.map +1 -1
- package/dist/constants.d.ts +2 -2
- package/dist/constants.js +2 -2
- package/dist/constants.js.map +1 -1
- package/dist/contractsPublic.d.ts +1 -1
- package/dist/contractsPublic.js.map +1 -1
- package/dist/createOdspCreateContainerRequest.d.ts +1 -1
- package/dist/createOdspCreateContainerRequest.js +1 -1
- package/dist/createOdspCreateContainerRequest.js.map +1 -1
- package/dist/createOdspUrl.d.ts +1 -1
- package/dist/createOdspUrl.js +1 -1
- package/dist/createOdspUrl.js.map +1 -1
- package/dist/epochTracker.d.ts +4 -4
- package/dist/epochTracker.js +1 -1
- package/dist/epochTracker.js.map +1 -1
- package/dist/fetchSnapshot.d.ts +1 -1
- package/dist/fetchSnapshot.js +1 -1
- package/dist/fetchSnapshot.js.map +1 -1
- package/dist/getFileLink.js +1 -1
- package/dist/getFileLink.js.map +1 -1
- package/dist/legacy.d.ts +2 -1
- package/dist/odspCache.d.ts +4 -4
- package/dist/odspCache.js.map +1 -1
- package/dist/odspDocumentService.d.ts.map +1 -1
- package/dist/odspDocumentService.js +4 -4
- package/dist/odspDocumentService.js.map +1 -1
- package/dist/odspDocumentServiceFactory.d.ts +2 -2
- package/dist/odspDocumentServiceFactory.js +2 -2
- package/dist/odspDocumentServiceFactory.js.map +1 -1
- package/dist/odspDocumentServiceFactoryCore.d.ts +1 -1
- package/dist/odspDocumentServiceFactoryCore.js +1 -1
- package/dist/odspDocumentServiceFactoryCore.js.map +1 -1
- package/dist/odspDriverUrlResolver.d.ts +1 -1
- package/dist/odspDriverUrlResolver.js +1 -1
- package/dist/odspDriverUrlResolver.js.map +1 -1
- package/dist/odspDriverUrlResolverForShareLink.d.ts +2 -2
- package/dist/odspDriverUrlResolverForShareLink.js +1 -1
- package/dist/odspDriverUrlResolverForShareLink.js.map +1 -1
- package/dist/odspFluidFileLink.d.ts +4 -4
- package/dist/odspFluidFileLink.js +4 -4
- package/dist/odspFluidFileLink.js.map +1 -1
- package/dist/odspPublicUtils.d.ts +2 -2
- package/dist/odspPublicUtils.js +1 -1
- package/dist/odspPublicUtils.js.map +1 -1
- package/dist/odspUtils.d.ts +2 -2
- package/dist/odspUtils.js +1 -1
- package/dist/odspUtils.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/prefetchLatestSnapshot.d.ts +1 -1
- package/dist/prefetchLatestSnapshot.js +1 -1
- package/dist/prefetchLatestSnapshot.js.map +1 -1
- package/internal.d.ts +1 -1
- package/legacy.d.ts +1 -1
- package/lib/checkUrl.d.ts +1 -1
- package/lib/checkUrl.js +1 -1
- package/lib/checkUrl.js.map +1 -1
- package/lib/constants.d.ts +2 -2
- package/lib/constants.js +2 -2
- package/lib/constants.js.map +1 -1
- package/lib/contractsPublic.d.ts +1 -1
- package/lib/contractsPublic.js.map +1 -1
- package/lib/createOdspCreateContainerRequest.d.ts +1 -1
- package/lib/createOdspCreateContainerRequest.js +1 -1
- package/lib/createOdspCreateContainerRequest.js.map +1 -1
- package/lib/createOdspUrl.d.ts +1 -1
- package/lib/createOdspUrl.js +1 -1
- package/lib/createOdspUrl.js.map +1 -1
- package/lib/epochTracker.d.ts +4 -4
- package/lib/epochTracker.js +1 -1
- package/lib/epochTracker.js.map +1 -1
- package/lib/fetchSnapshot.d.ts +1 -1
- package/lib/fetchSnapshot.js +1 -1
- package/lib/fetchSnapshot.js.map +1 -1
- package/lib/getFileLink.js +1 -1
- package/lib/getFileLink.js.map +1 -1
- package/lib/legacy.d.ts +2 -1
- package/lib/odspCache.d.ts +4 -4
- package/lib/odspCache.js.map +1 -1
- package/lib/odspDocumentService.d.ts.map +1 -1
- package/lib/odspDocumentService.js +4 -4
- package/lib/odspDocumentService.js.map +1 -1
- package/lib/odspDocumentServiceFactory.d.ts +2 -2
- package/lib/odspDocumentServiceFactory.js +2 -2
- package/lib/odspDocumentServiceFactory.js.map +1 -1
- package/lib/odspDocumentServiceFactoryCore.d.ts +1 -1
- package/lib/odspDocumentServiceFactoryCore.js +1 -1
- package/lib/odspDocumentServiceFactoryCore.js.map +1 -1
- package/lib/odspDriverUrlResolver.d.ts +1 -1
- package/lib/odspDriverUrlResolver.js +1 -1
- package/lib/odspDriverUrlResolver.js.map +1 -1
- package/lib/odspDriverUrlResolverForShareLink.d.ts +2 -2
- package/lib/odspDriverUrlResolverForShareLink.js +1 -1
- package/lib/odspDriverUrlResolverForShareLink.js.map +1 -1
- package/lib/odspFluidFileLink.d.ts +4 -4
- package/lib/odspFluidFileLink.js +4 -4
- package/lib/odspFluidFileLink.js.map +1 -1
- package/lib/odspPublicUtils.d.ts +2 -2
- package/lib/odspPublicUtils.js +1 -1
- package/lib/odspPublicUtils.js.map +1 -1
- package/lib/odspUtils.d.ts +2 -2
- package/lib/odspUtils.js +1 -1
- package/lib/odspUtils.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/prefetchLatestSnapshot.d.ts +1 -1
- package/lib/prefetchLatestSnapshot.js +1 -1
- package/lib/prefetchLatestSnapshot.js.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/package.json +21 -21
- package/src/checkUrl.ts +1 -1
- package/src/constants.ts +2 -2
- package/src/contractsPublic.ts +1 -1
- package/src/createOdspCreateContainerRequest.ts +1 -1
- package/src/createOdspUrl.ts +1 -1
- package/src/epochTracker.ts +4 -4
- package/src/fetchSnapshot.ts +1 -1
- package/src/getFileLink.ts +1 -1
- package/src/odspCache.ts +4 -4
- package/src/odspDocumentService.ts +5 -4
- package/src/odspDocumentServiceFactory.ts +2 -2
- package/src/odspDocumentServiceFactoryCore.ts +1 -1
- package/src/odspDriverUrlResolver.ts +1 -1
- package/src/odspDriverUrlResolverForShareLink.ts +2 -2
- package/src/odspFluidFileLink.ts +4 -4
- package/src/odspPublicUtils.ts +2 -2
- package/src/odspUtils.ts +2 -2
- package/src/packageVersion.ts +1 -1
- package/src/prefetchLatestSnapshot.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/odsp-driver",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.61.0-355054",
|
|
4
4
|
"description": "Socket storage implementation for SPO and ODC",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -69,32 +69,32 @@
|
|
|
69
69
|
"temp-directory": "nyc/.nyc_output"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@fluid-internal/client-utils": "
|
|
73
|
-
"@fluidframework/core-interfaces": "
|
|
74
|
-
"@fluidframework/core-utils": "
|
|
75
|
-
"@fluidframework/driver-base": "
|
|
76
|
-
"@fluidframework/driver-definitions": "
|
|
77
|
-
"@fluidframework/driver-utils": "
|
|
78
|
-
"@fluidframework/odsp-doclib-utils": "
|
|
79
|
-
"@fluidframework/odsp-driver-definitions": "
|
|
80
|
-
"@fluidframework/telemetry-utils": "
|
|
72
|
+
"@fluid-internal/client-utils": "2.61.0-355054",
|
|
73
|
+
"@fluidframework/core-interfaces": "2.61.0-355054",
|
|
74
|
+
"@fluidframework/core-utils": "2.61.0-355054",
|
|
75
|
+
"@fluidframework/driver-base": "2.61.0-355054",
|
|
76
|
+
"@fluidframework/driver-definitions": "2.61.0-355054",
|
|
77
|
+
"@fluidframework/driver-utils": "2.61.0-355054",
|
|
78
|
+
"@fluidframework/odsp-doclib-utils": "2.61.0-355054",
|
|
79
|
+
"@fluidframework/odsp-driver-definitions": "2.61.0-355054",
|
|
80
|
+
"@fluidframework/telemetry-utils": "2.61.0-355054",
|
|
81
81
|
"socket.io-client": "~4.7.5",
|
|
82
82
|
"uuid": "^11.1.0"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@arethetypeswrong/cli": "^0.17.1",
|
|
86
86
|
"@biomejs/biome": "~1.9.3",
|
|
87
|
-
"@fluid-internal/mocha-test-setup": "
|
|
88
|
-
"@fluid-tools/build-cli": "^0.
|
|
87
|
+
"@fluid-internal/mocha-test-setup": "2.61.0-355054",
|
|
88
|
+
"@fluid-tools/build-cli": "^0.58.2",
|
|
89
89
|
"@fluidframework/build-common": "^2.0.3",
|
|
90
|
-
"@fluidframework/build-tools": "^0.
|
|
91
|
-
"@fluidframework/eslint-config-fluid": "^
|
|
92
|
-
"@fluidframework/odsp-driver-previous": "npm:@fluidframework/odsp-driver@2.
|
|
93
|
-
"@microsoft/api-extractor": "7.52.
|
|
90
|
+
"@fluidframework/build-tools": "^0.58.2",
|
|
91
|
+
"@fluidframework/eslint-config-fluid": "^6.0.0",
|
|
92
|
+
"@fluidframework/odsp-driver-previous": "npm:@fluidframework/odsp-driver@2.60.0",
|
|
93
|
+
"@microsoft/api-extractor": "7.52.11",
|
|
94
94
|
"@types/mocha": "^10.0.10",
|
|
95
95
|
"@types/node": "^18.19.0",
|
|
96
96
|
"@types/sinon": "^17.0.3",
|
|
97
|
-
"c8": "^
|
|
97
|
+
"c8": "^10.1.3",
|
|
98
98
|
"concurrently": "^8.2.1",
|
|
99
99
|
"copyfiles": "^2.4.1",
|
|
100
100
|
"cross-env": "^7.0.3",
|
|
@@ -111,8 +111,8 @@
|
|
|
111
111
|
},
|
|
112
112
|
"scripts": {
|
|
113
113
|
"api": "fluid-build . --task api",
|
|
114
|
-
"api-extractor:commonjs": "flub generate entrypoints --outDir ./dist",
|
|
115
|
-
"api-extractor:esnext": "flub generate entrypoints --outDir ./lib --node10TypeCompat",
|
|
114
|
+
"api-extractor:commonjs": "flub generate entrypoints --outFileLegacyBeta legacy --outDir ./dist",
|
|
115
|
+
"api-extractor:esnext": "flub generate entrypoints --outFileLegacyBeta legacy --outDir ./lib --node10TypeCompat",
|
|
116
116
|
"build": "fluid-build . --task build",
|
|
117
117
|
"build:api-reports": "concurrently \"npm:build:api-reports:*\"",
|
|
118
118
|
"build:api-reports:current": "api-extractor run --local --config api-extractor/api-extractor.current.json",
|
|
@@ -148,8 +148,8 @@
|
|
|
148
148
|
"test": "npm run test:mocha",
|
|
149
149
|
"test:coverage": "c8 npm test",
|
|
150
150
|
"test:mocha": "npm run test:mocha:cjs && npm run test:mocha:esm",
|
|
151
|
-
"test:mocha:cjs": "
|
|
152
|
-
"test:mocha:esm": "mocha
|
|
151
|
+
"test:mocha:cjs": "cross-env MOCHA_SPEC=dist/test mocha",
|
|
152
|
+
"test:mocha:esm": "mocha",
|
|
153
153
|
"test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
|
|
154
154
|
"tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist",
|
|
155
155
|
"typetests:gen": "flub generate typetests --dir . -v",
|
package/src/checkUrl.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { getLocatorFromOdspUrl } from "./odspFluidFileLink.js";
|
|
|
13
13
|
* Instead, this should be used as a lightweight check that can filter out easily detectable unsupported URLs
|
|
14
14
|
* before the entire Fluid loading process needs to be kicked off.
|
|
15
15
|
* @legacy
|
|
16
|
-
* @
|
|
16
|
+
* @beta
|
|
17
17
|
*/
|
|
18
18
|
export function checkUrl(documentUrl: URL): DriverPreCheckInfo | undefined {
|
|
19
19
|
const locator = getLocatorFromOdspUrl(documentUrl);
|
package/src/constants.ts
CHANGED
package/src/contractsPublic.ts
CHANGED
|
@@ -23,7 +23,7 @@ import { buildOdspShareLinkReqParams, getContainerPackageName } from "./odspUtil
|
|
|
23
23
|
* @param containerPackageInfo - Container package information which will be used to extract the container package name.
|
|
24
24
|
* If not given that means that the container package does not have a name.
|
|
25
25
|
* @legacy
|
|
26
|
-
* @
|
|
26
|
+
* @beta
|
|
27
27
|
*/
|
|
28
28
|
export function createOdspCreateContainerRequest(
|
|
29
29
|
siteUrl: string,
|
package/src/createOdspUrl.ts
CHANGED
|
@@ -13,7 +13,7 @@ import type { OdspFluidDataStoreLocator } from "./contractsPublic.js";
|
|
|
13
13
|
* Encodes ODC/SPO information into a URL format that can be handled by the Loader
|
|
14
14
|
* @param l -The property bag of necessary properties to locate a Fluid data store and craft a url for it
|
|
15
15
|
* @legacy
|
|
16
|
-
* @
|
|
16
|
+
* @beta
|
|
17
17
|
*/
|
|
18
18
|
export function createOdspUrl(l: OdspFluidDataStoreLocator): string {
|
|
19
19
|
let odspUrl = `${l.siteUrl}?driveId=${encodeURIComponent(
|
package/src/epochTracker.ts
CHANGED
|
@@ -48,7 +48,7 @@ import { pkgVersion as driverVersion } from "./packageVersion.js";
|
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* @legacy
|
|
51
|
-
* @
|
|
51
|
+
* @beta
|
|
52
52
|
*/
|
|
53
53
|
export type FetchType =
|
|
54
54
|
| "blob"
|
|
@@ -66,7 +66,7 @@ export type FetchType =
|
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
* @legacy
|
|
69
|
-
* @
|
|
69
|
+
* @beta
|
|
70
70
|
*/
|
|
71
71
|
export type FetchTypeInternal = FetchType | "cache";
|
|
72
72
|
|
|
@@ -87,7 +87,7 @@ export const Odsp409Error = "Odsp409Error";
|
|
|
87
87
|
* It also validates the epoch value received in response of fetch calls. If the epoch does not match,
|
|
88
88
|
* then it also clears all the cached entries for the given container.
|
|
89
89
|
* @legacy
|
|
90
|
-
* @
|
|
90
|
+
* @beta
|
|
91
91
|
*/
|
|
92
92
|
export class EpochTracker implements IPersistedFileCache {
|
|
93
93
|
private _fluidEpoch: string | undefined;
|
|
@@ -619,7 +619,7 @@ export class EpochTrackerWithRedemption extends EpochTracker {
|
|
|
619
619
|
|
|
620
620
|
/**
|
|
621
621
|
* @legacy
|
|
622
|
-
* @
|
|
622
|
+
* @beta
|
|
623
623
|
*/
|
|
624
624
|
export interface ICacheAndTracker {
|
|
625
625
|
cache: IOdspCache;
|
package/src/fetchSnapshot.ts
CHANGED
package/src/getFileLink.ts
CHANGED
|
@@ -115,7 +115,7 @@ export const getFileLink = mockify(
|
|
|
115
115
|
* @param logger - logger to send events.
|
|
116
116
|
* @returns Response from the API call.
|
|
117
117
|
* @legacy
|
|
118
|
-
* @
|
|
118
|
+
* @beta
|
|
119
119
|
*/
|
|
120
120
|
async function getFileLinkWithLocationRedirectionHandling(
|
|
121
121
|
getToken: TokenFetcher<OdspResourceTokenFetchOptions>,
|
package/src/odspCache.ts
CHANGED
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
/**
|
|
19
19
|
* Similar to IPersistedCache, but exposes cache interface for single file
|
|
20
20
|
* @legacy
|
|
21
|
-
* @
|
|
21
|
+
* @beta
|
|
22
22
|
*/
|
|
23
23
|
export interface IPersistedFileCache {
|
|
24
24
|
// TODO: use a stronger type
|
|
@@ -97,7 +97,7 @@ export class PromiseCacheWithOneHourSlidingExpiry<T> extends PromiseCache<string
|
|
|
97
97
|
/**
|
|
98
98
|
* Internal cache interface used within driver only
|
|
99
99
|
* @legacy
|
|
100
|
-
* @
|
|
100
|
+
* @beta
|
|
101
101
|
*/
|
|
102
102
|
export interface INonPersistentCache {
|
|
103
103
|
/**
|
|
@@ -123,7 +123,7 @@ export interface INonPersistentCache {
|
|
|
123
123
|
/**
|
|
124
124
|
* Internal cache interface used within driver only
|
|
125
125
|
* @legacy
|
|
126
|
-
* @
|
|
126
|
+
* @beta
|
|
127
127
|
*/
|
|
128
128
|
export interface IOdspCache extends INonPersistentCache {
|
|
129
129
|
/**
|
|
@@ -148,7 +148,7 @@ export class NonPersistentCache implements INonPersistentCache {
|
|
|
148
148
|
|
|
149
149
|
/**
|
|
150
150
|
* @legacy
|
|
151
|
-
* @
|
|
151
|
+
* @beta
|
|
152
152
|
*/
|
|
153
153
|
export interface IPrefetchSnapshotContents extends ISnapshot {
|
|
154
154
|
fluidEpoch: string;
|
|
@@ -225,10 +225,11 @@ export class OdspDocumentService
|
|
|
225
225
|
async (from, to, telemetryProps, fetchReason) =>
|
|
226
226
|
service.get(from, to, telemetryProps, fetchReason),
|
|
227
227
|
// Get cachedOps Callback.
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
228
|
+
// TODO AB#47218: This condition will be removed when file version can be read from the cache entry for an op.
|
|
229
|
+
this.odspResolvedUrl.fileVersion === undefined
|
|
230
|
+
? async (from, to) =>
|
|
231
|
+
((await this.opsCache?.get(from, to)) as ISequencedDocumentMessage[]) ?? []
|
|
232
|
+
: async () => [],
|
|
232
233
|
// Ops requestFromSocket Callback.
|
|
233
234
|
(from, to) => {
|
|
234
235
|
const currentConnection = this.odspDelayLoadedDeltaStream?.currentDeltaConnection;
|
|
@@ -19,7 +19,7 @@ import { OdspDocumentServiceFactoryCore } from "./odspDocumentServiceFactoryCore
|
|
|
19
19
|
* Factory for creating the sharepoint document service. Use this if you want to
|
|
20
20
|
* use the sharepoint implementation.
|
|
21
21
|
* @legacy
|
|
22
|
-
* @
|
|
22
|
+
* @beta
|
|
23
23
|
*/
|
|
24
24
|
export class OdspDocumentServiceFactory extends OdspDocumentServiceFactoryCore {
|
|
25
25
|
constructor(
|
|
@@ -39,7 +39,7 @@ export class OdspDocumentServiceFactory extends OdspDocumentServiceFactoryCore {
|
|
|
39
39
|
* content directly.
|
|
40
40
|
*
|
|
41
41
|
* @legacy
|
|
42
|
-
* @
|
|
42
|
+
* @beta
|
|
43
43
|
*/
|
|
44
44
|
export function createLocalOdspDocumentServiceFactory(
|
|
45
45
|
localSnapshot: Uint8Array | string,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
* This constructor should be used by environments that support dynamic imports and that wish
|
|
61
61
|
* to leverage code splitting as a means to keep bundles as small as possible.
|
|
62
62
|
* @legacy
|
|
63
|
-
* @
|
|
63
|
+
* @beta
|
|
64
64
|
*/
|
|
65
65
|
export class OdspDocumentServiceFactoryCore
|
|
66
66
|
implements IDocumentServiceFactory, IRelaySessionAwareDriverFactory
|
|
@@ -94,7 +94,7 @@ const isFluidPackage = (pkg: Record<string, unknown>): boolean =>
|
|
|
94
94
|
* Resolver to resolve urls like the ones created by createOdspUrl which is driver inner
|
|
95
95
|
* url format. Ex: `${siteUrl}?driveId=${driveId}&itemId=${itemId}&path=${path}`
|
|
96
96
|
* @legacy
|
|
97
|
-
* @
|
|
97
|
+
* @beta
|
|
98
98
|
*/
|
|
99
99
|
export class OdspDriverUrlResolver implements IUrlResolver {
|
|
100
100
|
constructor() {}
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
/**
|
|
38
38
|
* Properties passed to the code responsible for fetching share link for a file.
|
|
39
39
|
* @legacy
|
|
40
|
-
* @
|
|
40
|
+
* @beta
|
|
41
41
|
*/
|
|
42
42
|
export interface ShareLinkFetcherProps {
|
|
43
43
|
/**
|
|
@@ -55,7 +55,7 @@ export interface ShareLinkFetcherProps {
|
|
|
55
55
|
* url format and the ones which have things like driveId, siteId, itemId etc encoded in nav param.
|
|
56
56
|
* This resolver also handles share links and try to generate one for the use by the app.
|
|
57
57
|
* @legacy
|
|
58
|
-
* @
|
|
58
|
+
* @beta
|
|
59
59
|
*/
|
|
60
60
|
export class OdspDriverUrlResolverForShareLink implements IUrlResolver {
|
|
61
61
|
private readonly logger: ITelemetryLoggerExt;
|
package/src/odspFluidFileLink.ts
CHANGED
|
@@ -24,7 +24,7 @@ const additionalContextParamName = "x";
|
|
|
24
24
|
* @param locator - describes Fluid data store locator info to be encoded
|
|
25
25
|
* @returns string representing encoded Fluid data store locator info
|
|
26
26
|
* @legacy
|
|
27
|
-
* @
|
|
27
|
+
* @beta
|
|
28
28
|
*/
|
|
29
29
|
export function encodeOdspFluidDataStoreLocator(locator: OdspFluidDataStoreLocator): string {
|
|
30
30
|
const siteUrl = new URL(locator.siteUrl);
|
|
@@ -115,7 +115,7 @@ function decodeOdspFluidDataStoreLocator(
|
|
|
115
115
|
* This parameter is provided by host in the resolve request and it contains information about the file
|
|
116
116
|
* like driveId, itemId, siteUrl, datastorePath, packageName etc.
|
|
117
117
|
* @legacy
|
|
118
|
-
* @
|
|
118
|
+
* @beta
|
|
119
119
|
*/
|
|
120
120
|
export const locatorQueryParamName = "nav";
|
|
121
121
|
|
|
@@ -124,7 +124,7 @@ export const locatorQueryParamName = "nav";
|
|
|
124
124
|
* @param url - file url in ODSP format (can be either canonical or share link)
|
|
125
125
|
* @param locator - object representing Fluid data store location in ODSP terms
|
|
126
126
|
* @legacy
|
|
127
|
-
* @
|
|
127
|
+
* @beta
|
|
128
128
|
*/
|
|
129
129
|
export function storeLocatorInOdspUrl(url: URL, locator: OdspFluidDataStoreLocator): void {
|
|
130
130
|
const encodedLocatorValue = encodeOdspFluidDataStoreLocator(locator);
|
|
@@ -140,7 +140,7 @@ export function storeLocatorInOdspUrl(url: URL, locator: OdspFluidDataStoreLocat
|
|
|
140
140
|
* @param requireFluidSignature - flag representing if the Fluid signature is expected in the url, default true
|
|
141
141
|
* @returns object representing Fluid data store location in ODSP terms
|
|
142
142
|
* @legacy
|
|
143
|
-
* @
|
|
143
|
+
* @beta
|
|
144
144
|
*/
|
|
145
145
|
export function getLocatorFromOdspUrl(
|
|
146
146
|
url: URL,
|
package/src/odspPublicUtils.ts
CHANGED
|
@@ -14,7 +14,7 @@ import type {
|
|
|
14
14
|
* said document.
|
|
15
15
|
*
|
|
16
16
|
* @legacy
|
|
17
|
-
* @
|
|
17
|
+
* @beta
|
|
18
18
|
*/
|
|
19
19
|
export async function getHashedDocumentId(driveId: string, itemId: string): Promise<string> {
|
|
20
20
|
const buffer = IsoBuffer.from(`${driveId}_${itemId}`);
|
|
@@ -23,7 +23,7 @@ export async function getHashedDocumentId(driveId: string, itemId: string): Prom
|
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* @legacy
|
|
26
|
-
* @
|
|
26
|
+
* @beta
|
|
27
27
|
* @deprecated - This is deprecated.
|
|
28
28
|
*/
|
|
29
29
|
export interface ISnapshotContents {
|
package/src/odspUtils.ts
CHANGED
|
@@ -63,7 +63,7 @@ export const getWithRetryForTokenRefreshRepeat = "getWithRetryForTokenRefreshRep
|
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* @legacy
|
|
66
|
-
* @
|
|
66
|
+
* @beta
|
|
67
67
|
*/
|
|
68
68
|
export interface IOdspResponse<T> {
|
|
69
69
|
content: T;
|
|
@@ -341,7 +341,7 @@ export function getOdspResolvedUrl(resolvedUrl: IResolvedUrl): IOdspResolvedUrl
|
|
|
341
341
|
* Type narrowing utility to determine if the provided {@link @fluidframework/driver-definitions#IResolvedUrl}
|
|
342
342
|
* is an {@link @fluidframework/odsp-driver-definitions#IOdspResolvedUrl}.
|
|
343
343
|
* @legacy
|
|
344
|
-
* @
|
|
344
|
+
* @beta
|
|
345
345
|
*/
|
|
346
346
|
export function isOdspResolvedUrl(resolvedUrl: IResolvedUrl): resolvedUrl is IOdspResolvedUrl {
|
|
347
347
|
return "odspResolvedUrl" in resolvedUrl && resolvedUrl.odspResolvedUrl === true;
|
package/src/packageVersion.ts
CHANGED