@fluidframework/odsp-driver-definitions 2.0.0-internal.5.1.1 → 2.0.0-internal.5.3.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 +14 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/sessionProvider.d.ts +45 -0
- package/dist/sessionProvider.d.ts.map +1 -0
- package/dist/sessionProvider.js +7 -0
- package/dist/sessionProvider.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/sessionProvider.d.ts +45 -0
- package/lib/sessionProvider.d.ts.map +1 -0
- package/lib/sessionProvider.js +6 -0
- package/lib/sessionProvider.js.map +1 -0
- package/package.json +6 -6
- package/src/index.ts +5 -0
- package/src/sessionProvider.ts +58 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @fluidframework/odsp-driver-definitions
|
|
2
2
|
|
|
3
|
+
## 2.0.0-internal.5.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- New interfaces to discover getRelaySessionInfo API ([#16300](https://github.com/microsoft/FluidFramework/issues/16300)) [a25789cd37](https://github.com/microsoft/FluidFramework/commits/a25789cd37bf60ebc4a08e1a9f7eaa8c65f4eae2)
|
|
8
|
+
|
|
9
|
+
There are new interfaces `IRelaySessionAwareDriverFactory` and `IProvideSessionAwareDriverFactory` in
|
|
10
|
+
odsp-driver-definitions that enable using the provider pattern to discover the new API `getRelaySessionInfo` in
|
|
11
|
+
odsp-driver.
|
|
12
|
+
|
|
13
|
+
## 2.0.0-internal.5.2.0
|
|
14
|
+
|
|
15
|
+
Dependency updates only.
|
|
16
|
+
|
|
3
17
|
## 2.0.0-internal.5.1.0
|
|
4
18
|
|
|
5
19
|
Dependency updates only.
|
package/dist/index.d.ts
CHANGED
|
@@ -7,4 +7,5 @@ export { HostStoragePolicy, ICollabSessionOptions, IOpsCachingPolicy, ISnapshotO
|
|
|
7
7
|
export { CacheContentType, getKeyForCacheEntry, ICacheEntry, IEntry, IFileEntry, IPersistedCache, snapshotKey, } from "./odspCache";
|
|
8
8
|
export { IOdspResolvedUrl, IOdspUrlParts, ISharingLink, ISharingLinkKind, ShareLinkInfoType, ShareLinkTypes, SharingLinkRole, SharingLinkScope, } from "./resolvedUrl";
|
|
9
9
|
export { IdentityType, InstrumentedStorageTokenFetcher, isTokenFromCache, OdspResourceTokenFetchOptions, TokenFetcher, TokenFetchOptions, tokenFromResponse, TokenResponse, } from "./tokenFetch";
|
|
10
|
+
export { IProvideSessionAwareDriverFactory, IRelaySessionAwareDriverFactory, ISocketStorageDiscovery, } from "./sessionProvider";
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzF,OAAO,EACN,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,GAChB,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,EACX,MAAM,EACN,UAAU,EACV,eAAe,EACf,WAAW,GACX,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,gBAAgB,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,YAAY,EACZ,+BAA+B,EAC/B,gBAAgB,EAChB,6BAA6B,EAC7B,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,GACb,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzF,OAAO,EACN,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,GAChB,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,EACX,MAAM,EACN,UAAU,EACV,eAAe,EACf,WAAW,GACX,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,gBAAgB,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,YAAY,EACZ,+BAA+B,EAC/B,gBAAgB,EAChB,6BAA6B,EAC7B,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,GACb,MAAM,cAAc,CAAC;AACtB,OAAO,EACN,iCAAiC,EACjC,+BAA+B,EAC/B,uBAAuB,GACvB,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,mCAAyF;AAAhC,uGAAA,aAAa,OAAA;AAOtE,yCAQqB;AANpB,gHAAA,mBAAmB,OAAA;AAKnB,wGAAA,WAAW,OAAA;AAEZ,6CASuB;AAHtB,6GAAA,cAAc,OAAA;AACd,8GAAA,eAAe,OAAA;AACf,+GAAA,gBAAgB,OAAA;AAEjB,2CASsB;AANrB,8GAAA,gBAAgB,OAAA;AAIhB,+GAAA,iBAAiB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { IOdspError, IOdspErrorAugmentations, OdspError, OdspErrorType } from \"./errors\";\nexport {\n\tHostStoragePolicy,\n\tICollabSessionOptions,\n\tIOpsCachingPolicy,\n\tISnapshotOptions,\n} from \"./factory\";\nexport {\n\tCacheContentType,\n\tgetKeyForCacheEntry,\n\tICacheEntry,\n\tIEntry,\n\tIFileEntry,\n\tIPersistedCache,\n\tsnapshotKey,\n} from \"./odspCache\";\nexport {\n\tIOdspResolvedUrl,\n\tIOdspUrlParts,\n\tISharingLink,\n\tISharingLinkKind,\n\tShareLinkInfoType,\n\tShareLinkTypes,\n\tSharingLinkRole,\n\tSharingLinkScope,\n} from \"./resolvedUrl\";\nexport {\n\tIdentityType,\n\tInstrumentedStorageTokenFetcher,\n\tisTokenFromCache,\n\tOdspResourceTokenFetchOptions,\n\tTokenFetcher,\n\tTokenFetchOptions,\n\ttokenFromResponse,\n\tTokenResponse,\n} from \"./tokenFetch\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,mCAAyF;AAAhC,uGAAA,aAAa,OAAA;AAOtE,yCAQqB;AANpB,gHAAA,mBAAmB,OAAA;AAKnB,wGAAA,WAAW,OAAA;AAEZ,6CASuB;AAHtB,6GAAA,cAAc,OAAA;AACd,8GAAA,eAAe,OAAA;AACf,+GAAA,gBAAgB,OAAA;AAEjB,2CASsB;AANrB,8GAAA,gBAAgB,OAAA;AAIhB,+GAAA,iBAAiB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { IOdspError, IOdspErrorAugmentations, OdspError, OdspErrorType } from \"./errors\";\nexport {\n\tHostStoragePolicy,\n\tICollabSessionOptions,\n\tIOpsCachingPolicy,\n\tISnapshotOptions,\n} from \"./factory\";\nexport {\n\tCacheContentType,\n\tgetKeyForCacheEntry,\n\tICacheEntry,\n\tIEntry,\n\tIFileEntry,\n\tIPersistedCache,\n\tsnapshotKey,\n} from \"./odspCache\";\nexport {\n\tIOdspResolvedUrl,\n\tIOdspUrlParts,\n\tISharingLink,\n\tISharingLinkKind,\n\tShareLinkInfoType,\n\tShareLinkTypes,\n\tSharingLinkRole,\n\tSharingLinkScope,\n} from \"./resolvedUrl\";\nexport {\n\tIdentityType,\n\tInstrumentedStorageTokenFetcher,\n\tisTokenFromCache,\n\tOdspResourceTokenFetchOptions,\n\tTokenFetcher,\n\tTokenFetchOptions,\n\ttokenFromResponse,\n\tTokenResponse,\n} from \"./tokenFetch\";\nexport {\n\tIProvideSessionAwareDriverFactory,\n\tIRelaySessionAwareDriverFactory,\n\tISocketStorageDiscovery,\n} from \"./sessionProvider\";\n"]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { IResolvedUrl } from "@fluidframework/driver-definitions";
|
|
6
|
+
/**
|
|
7
|
+
* Socket storage discovery api response
|
|
8
|
+
*/
|
|
9
|
+
export interface ISocketStorageDiscovery {
|
|
10
|
+
id: string;
|
|
11
|
+
runtimeTenantId?: string;
|
|
12
|
+
tenantId: string;
|
|
13
|
+
snapshotStorageUrl: string;
|
|
14
|
+
deltaStorageUrl: string;
|
|
15
|
+
/**
|
|
16
|
+
* PUSH URL
|
|
17
|
+
*/
|
|
18
|
+
deltaStreamSocketUrl: string;
|
|
19
|
+
/**
|
|
20
|
+
* The access token for PushChannel. Optionally returned, depending on implementation.
|
|
21
|
+
* OneDrive for Consumer implementation returns it and OneDrive for Business implementation
|
|
22
|
+
* does not return it and instead expects token to be returned via `getWebsocketToken` callback
|
|
23
|
+
* passed as a parameter to `OdspDocumentService.create()` factory.
|
|
24
|
+
*/
|
|
25
|
+
socketToken?: string;
|
|
26
|
+
/**
|
|
27
|
+
* This is the time within which client has to refresh the session on (ODSP) relay service.
|
|
28
|
+
*/
|
|
29
|
+
refreshSessionDurationSeconds?: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* An interface that allows a concrete instance of a driver factory to interrogate itself
|
|
33
|
+
* to find out if it is session aware.
|
|
34
|
+
*/
|
|
35
|
+
export interface IProvideSessionAwareDriverFactory {
|
|
36
|
+
readonly IRelaySessionAwareDriverFactory: IRelaySessionAwareDriverFactory;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* An interface that allows a concrete instance of a driver factory to call the `getRelayServiceSessionInfo`
|
|
40
|
+
* function if it session aware.
|
|
41
|
+
*/
|
|
42
|
+
export interface IRelaySessionAwareDriverFactory extends IProvideSessionAwareDriverFactory {
|
|
43
|
+
getRelayServiceSessionInfo(resolvedUrl: IResolvedUrl): Promise<ISocketStorageDiscovery | undefined>;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=sessionProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionProvider.d.ts","sourceRoot":"","sources":["../src/sessionProvider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,uBAAuB;IAEvC,EAAE,EAAE,MAAM,CAAC;IAIX,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IAEjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAE7B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,6BAA6B,CAAC,EAAE,MAAM,CAAC;CACvC;AAED;;;GAGG;AACH,MAAM,WAAW,iCAAiC;IACjD,QAAQ,CAAC,+BAA+B,EAAE,+BAA+B,CAAC;CAC1E;AAED;;;GAGG;AACH,MAAM,WAAW,+BAAgC,SAAQ,iCAAiC;IACzF,0BAA0B,CACzB,WAAW,EAAE,YAAY,GACvB,OAAO,CAAC,uBAAuB,GAAG,SAAS,CAAC,CAAC;CAChD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionProvider.js","sourceRoot":"","sources":["../src/sessionProvider.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IResolvedUrl } from \"@fluidframework/driver-definitions\";\n\n/**\n * Socket storage discovery api response\n */\nexport interface ISocketStorageDiscovery {\n\t// The id of the web socket\n\tid: string;\n\n\t// SPO gives us runtimeTenantId, we remap it to tenantId\n\t// See getSocketStorageDiscovery\n\truntimeTenantId?: string;\n\ttenantId: string;\n\n\tsnapshotStorageUrl: string;\n\tdeltaStorageUrl: string;\n\n\t/**\n\t * PUSH URL\n\t */\n\tdeltaStreamSocketUrl: string;\n\n\t/**\n\t * The access token for PushChannel. Optionally returned, depending on implementation.\n\t * OneDrive for Consumer implementation returns it and OneDrive for Business implementation\n\t * does not return it and instead expects token to be returned via `getWebsocketToken` callback\n\t * passed as a parameter to `OdspDocumentService.create()` factory.\n\t */\n\tsocketToken?: string;\n\n\t/**\n\t * This is the time within which client has to refresh the session on (ODSP) relay service.\n\t */\n\trefreshSessionDurationSeconds?: number;\n}\n\n/**\n * An interface that allows a concrete instance of a driver factory to interrogate itself\n * to find out if it is session aware.\n */\nexport interface IProvideSessionAwareDriverFactory {\n\treadonly IRelaySessionAwareDriverFactory: IRelaySessionAwareDriverFactory;\n}\n\n/**\n * An interface that allows a concrete instance of a driver factory to call the `getRelayServiceSessionInfo`\n * function if it session aware.\n */\nexport interface IRelaySessionAwareDriverFactory extends IProvideSessionAwareDriverFactory {\n\tgetRelayServiceSessionInfo(\n\t\tresolvedUrl: IResolvedUrl,\n\t): Promise<ISocketStorageDiscovery | undefined>;\n}\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -7,4 +7,5 @@ export { HostStoragePolicy, ICollabSessionOptions, IOpsCachingPolicy, ISnapshotO
|
|
|
7
7
|
export { CacheContentType, getKeyForCacheEntry, ICacheEntry, IEntry, IFileEntry, IPersistedCache, snapshotKey, } from "./odspCache";
|
|
8
8
|
export { IOdspResolvedUrl, IOdspUrlParts, ISharingLink, ISharingLinkKind, ShareLinkInfoType, ShareLinkTypes, SharingLinkRole, SharingLinkScope, } from "./resolvedUrl";
|
|
9
9
|
export { IdentityType, InstrumentedStorageTokenFetcher, isTokenFromCache, OdspResourceTokenFetchOptions, TokenFetcher, TokenFetchOptions, tokenFromResponse, TokenResponse, } from "./tokenFetch";
|
|
10
|
+
export { IProvideSessionAwareDriverFactory, IRelaySessionAwareDriverFactory, ISocketStorageDiscovery, } from "./sessionProvider";
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzF,OAAO,EACN,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,GAChB,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,EACX,MAAM,EACN,UAAU,EACV,eAAe,EACf,WAAW,GACX,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,gBAAgB,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,YAAY,EACZ,+BAA+B,EAC/B,gBAAgB,EAChB,6BAA6B,EAC7B,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,GACb,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzF,OAAO,EACN,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,GAChB,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,EACX,MAAM,EACN,UAAU,EACV,eAAe,EACf,WAAW,GACX,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,gBAAgB,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,YAAY,EACZ,+BAA+B,EAC/B,gBAAgB,EAChB,6BAA6B,EAC7B,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,GACb,MAAM,cAAc,CAAC;AACtB,OAAO,EACN,iCAAiC,EACjC,+BAA+B,EAC/B,uBAAuB,GACvB,MAAM,mBAAmB,CAAC"}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAkD,aAAa,EAAE,MAAM,UAAU,CAAC;AAOzF,OAAO,EAEN,mBAAmB,EAKnB,WAAW,GACX,MAAM,aAAa,CAAC;AACrB,OAAO,EAMN,cAAc,EACd,eAAe,EACf,gBAAgB,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAGN,gBAAgB,EAIhB,iBAAiB,GAEjB,MAAM,cAAc,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { IOdspError, IOdspErrorAugmentations, OdspError, OdspErrorType } from \"./errors\";\nexport {\n\tHostStoragePolicy,\n\tICollabSessionOptions,\n\tIOpsCachingPolicy,\n\tISnapshotOptions,\n} from \"./factory\";\nexport {\n\tCacheContentType,\n\tgetKeyForCacheEntry,\n\tICacheEntry,\n\tIEntry,\n\tIFileEntry,\n\tIPersistedCache,\n\tsnapshotKey,\n} from \"./odspCache\";\nexport {\n\tIOdspResolvedUrl,\n\tIOdspUrlParts,\n\tISharingLink,\n\tISharingLinkKind,\n\tShareLinkInfoType,\n\tShareLinkTypes,\n\tSharingLinkRole,\n\tSharingLinkScope,\n} from \"./resolvedUrl\";\nexport {\n\tIdentityType,\n\tInstrumentedStorageTokenFetcher,\n\tisTokenFromCache,\n\tOdspResourceTokenFetchOptions,\n\tTokenFetcher,\n\tTokenFetchOptions,\n\ttokenFromResponse,\n\tTokenResponse,\n} from \"./tokenFetch\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAkD,aAAa,EAAE,MAAM,UAAU,CAAC;AAOzF,OAAO,EAEN,mBAAmB,EAKnB,WAAW,GACX,MAAM,aAAa,CAAC;AACrB,OAAO,EAMN,cAAc,EACd,eAAe,EACf,gBAAgB,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAGN,gBAAgB,EAIhB,iBAAiB,GAEjB,MAAM,cAAc,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { IOdspError, IOdspErrorAugmentations, OdspError, OdspErrorType } from \"./errors\";\nexport {\n\tHostStoragePolicy,\n\tICollabSessionOptions,\n\tIOpsCachingPolicy,\n\tISnapshotOptions,\n} from \"./factory\";\nexport {\n\tCacheContentType,\n\tgetKeyForCacheEntry,\n\tICacheEntry,\n\tIEntry,\n\tIFileEntry,\n\tIPersistedCache,\n\tsnapshotKey,\n} from \"./odspCache\";\nexport {\n\tIOdspResolvedUrl,\n\tIOdspUrlParts,\n\tISharingLink,\n\tISharingLinkKind,\n\tShareLinkInfoType,\n\tShareLinkTypes,\n\tSharingLinkRole,\n\tSharingLinkScope,\n} from \"./resolvedUrl\";\nexport {\n\tIdentityType,\n\tInstrumentedStorageTokenFetcher,\n\tisTokenFromCache,\n\tOdspResourceTokenFetchOptions,\n\tTokenFetcher,\n\tTokenFetchOptions,\n\ttokenFromResponse,\n\tTokenResponse,\n} from \"./tokenFetch\";\nexport {\n\tIProvideSessionAwareDriverFactory,\n\tIRelaySessionAwareDriverFactory,\n\tISocketStorageDiscovery,\n} from \"./sessionProvider\";\n"]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { IResolvedUrl } from "@fluidframework/driver-definitions";
|
|
6
|
+
/**
|
|
7
|
+
* Socket storage discovery api response
|
|
8
|
+
*/
|
|
9
|
+
export interface ISocketStorageDiscovery {
|
|
10
|
+
id: string;
|
|
11
|
+
runtimeTenantId?: string;
|
|
12
|
+
tenantId: string;
|
|
13
|
+
snapshotStorageUrl: string;
|
|
14
|
+
deltaStorageUrl: string;
|
|
15
|
+
/**
|
|
16
|
+
* PUSH URL
|
|
17
|
+
*/
|
|
18
|
+
deltaStreamSocketUrl: string;
|
|
19
|
+
/**
|
|
20
|
+
* The access token for PushChannel. Optionally returned, depending on implementation.
|
|
21
|
+
* OneDrive for Consumer implementation returns it and OneDrive for Business implementation
|
|
22
|
+
* does not return it and instead expects token to be returned via `getWebsocketToken` callback
|
|
23
|
+
* passed as a parameter to `OdspDocumentService.create()` factory.
|
|
24
|
+
*/
|
|
25
|
+
socketToken?: string;
|
|
26
|
+
/**
|
|
27
|
+
* This is the time within which client has to refresh the session on (ODSP) relay service.
|
|
28
|
+
*/
|
|
29
|
+
refreshSessionDurationSeconds?: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* An interface that allows a concrete instance of a driver factory to interrogate itself
|
|
33
|
+
* to find out if it is session aware.
|
|
34
|
+
*/
|
|
35
|
+
export interface IProvideSessionAwareDriverFactory {
|
|
36
|
+
readonly IRelaySessionAwareDriverFactory: IRelaySessionAwareDriverFactory;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* An interface that allows a concrete instance of a driver factory to call the `getRelayServiceSessionInfo`
|
|
40
|
+
* function if it session aware.
|
|
41
|
+
*/
|
|
42
|
+
export interface IRelaySessionAwareDriverFactory extends IProvideSessionAwareDriverFactory {
|
|
43
|
+
getRelayServiceSessionInfo(resolvedUrl: IResolvedUrl): Promise<ISocketStorageDiscovery | undefined>;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=sessionProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionProvider.d.ts","sourceRoot":"","sources":["../src/sessionProvider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,uBAAuB;IAEvC,EAAE,EAAE,MAAM,CAAC;IAIX,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IAEjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAE7B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,6BAA6B,CAAC,EAAE,MAAM,CAAC;CACvC;AAED;;;GAGG;AACH,MAAM,WAAW,iCAAiC;IACjD,QAAQ,CAAC,+BAA+B,EAAE,+BAA+B,CAAC;CAC1E;AAED;;;GAGG;AACH,MAAM,WAAW,+BAAgC,SAAQ,iCAAiC;IACzF,0BAA0B,CACzB,WAAW,EAAE,YAAY,GACvB,OAAO,CAAC,uBAAuB,GAAG,SAAS,CAAC,CAAC;CAChD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionProvider.js","sourceRoot":"","sources":["../src/sessionProvider.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IResolvedUrl } from \"@fluidframework/driver-definitions\";\n\n/**\n * Socket storage discovery api response\n */\nexport interface ISocketStorageDiscovery {\n\t// The id of the web socket\n\tid: string;\n\n\t// SPO gives us runtimeTenantId, we remap it to tenantId\n\t// See getSocketStorageDiscovery\n\truntimeTenantId?: string;\n\ttenantId: string;\n\n\tsnapshotStorageUrl: string;\n\tdeltaStorageUrl: string;\n\n\t/**\n\t * PUSH URL\n\t */\n\tdeltaStreamSocketUrl: string;\n\n\t/**\n\t * The access token for PushChannel. Optionally returned, depending on implementation.\n\t * OneDrive for Consumer implementation returns it and OneDrive for Business implementation\n\t * does not return it and instead expects token to be returned via `getWebsocketToken` callback\n\t * passed as a parameter to `OdspDocumentService.create()` factory.\n\t */\n\tsocketToken?: string;\n\n\t/**\n\t * This is the time within which client has to refresh the session on (ODSP) relay service.\n\t */\n\trefreshSessionDurationSeconds?: number;\n}\n\n/**\n * An interface that allows a concrete instance of a driver factory to interrogate itself\n * to find out if it is session aware.\n */\nexport interface IProvideSessionAwareDriverFactory {\n\treadonly IRelaySessionAwareDriverFactory: IRelaySessionAwareDriverFactory;\n}\n\n/**\n * An interface that allows a concrete instance of a driver factory to call the `getRelayServiceSessionInfo`\n * function if it session aware.\n */\nexport interface IRelaySessionAwareDriverFactory extends IProvideSessionAwareDriverFactory {\n\tgetRelayServiceSessionInfo(\n\t\tresolvedUrl: IResolvedUrl,\n\t): Promise<ISocketStorageDiscovery | undefined>;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/odsp-driver-definitions",
|
|
3
|
-
"version": "2.0.0-internal.5.
|
|
3
|
+
"version": "2.0.0-internal.5.3.0",
|
|
4
4
|
"description": "Socket storage implementation for SPO and ODC",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
"module": "lib/index.js",
|
|
16
16
|
"types": "dist/index.d.ts",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@fluidframework/driver-definitions": ">=2.0.0-internal.5.
|
|
18
|
+
"@fluidframework/driver-definitions": ">=2.0.0-internal.5.3.0 <2.0.0-internal.5.4.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@fluid-tools/build-cli": "^0.
|
|
21
|
+
"@fluid-tools/build-cli": "^0.21.0",
|
|
22
22
|
"@fluidframework/build-common": "^1.2.0",
|
|
23
|
-
"@fluidframework/build-tools": "^0.
|
|
23
|
+
"@fluidframework/build-tools": "^0.21.0",
|
|
24
24
|
"@fluidframework/eslint-config-fluid": "^2.0.0",
|
|
25
|
-
"@fluidframework/odsp-driver-definitions-previous": "npm:@fluidframework/odsp-driver-definitions@2.0.0-internal.5.
|
|
25
|
+
"@fluidframework/odsp-driver-definitions-previous": "npm:@fluidframework/odsp-driver-definitions@2.0.0-internal.5.2.0",
|
|
26
26
|
"@fluidframework/protocol-definitions": "^1.1.0",
|
|
27
27
|
"@microsoft/api-extractor": "^7.34.4",
|
|
28
28
|
"concurrently": "^7.6.0",
|
|
@@ -54,6 +54,6 @@
|
|
|
54
54
|
"prettier:fix": "prettier --write . --ignore-path ../../../.prettierignore",
|
|
55
55
|
"tsc": "tsc",
|
|
56
56
|
"typetests:gen": "fluid-type-test-generator",
|
|
57
|
-
"typetests:prepare": "flub
|
|
57
|
+
"typetests:prepare": "flub typetests --dir . --reset --previous --normalize"
|
|
58
58
|
}
|
|
59
59
|
}
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { IResolvedUrl } from "@fluidframework/driver-definitions";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Socket storage discovery api response
|
|
10
|
+
*/
|
|
11
|
+
export interface ISocketStorageDiscovery {
|
|
12
|
+
// The id of the web socket
|
|
13
|
+
id: string;
|
|
14
|
+
|
|
15
|
+
// SPO gives us runtimeTenantId, we remap it to tenantId
|
|
16
|
+
// See getSocketStorageDiscovery
|
|
17
|
+
runtimeTenantId?: string;
|
|
18
|
+
tenantId: string;
|
|
19
|
+
|
|
20
|
+
snapshotStorageUrl: string;
|
|
21
|
+
deltaStorageUrl: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* PUSH URL
|
|
25
|
+
*/
|
|
26
|
+
deltaStreamSocketUrl: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The access token for PushChannel. Optionally returned, depending on implementation.
|
|
30
|
+
* OneDrive for Consumer implementation returns it and OneDrive for Business implementation
|
|
31
|
+
* does not return it and instead expects token to be returned via `getWebsocketToken` callback
|
|
32
|
+
* passed as a parameter to `OdspDocumentService.create()` factory.
|
|
33
|
+
*/
|
|
34
|
+
socketToken?: string;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* This is the time within which client has to refresh the session on (ODSP) relay service.
|
|
38
|
+
*/
|
|
39
|
+
refreshSessionDurationSeconds?: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* An interface that allows a concrete instance of a driver factory to interrogate itself
|
|
44
|
+
* to find out if it is session aware.
|
|
45
|
+
*/
|
|
46
|
+
export interface IProvideSessionAwareDriverFactory {
|
|
47
|
+
readonly IRelaySessionAwareDriverFactory: IRelaySessionAwareDriverFactory;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* An interface that allows a concrete instance of a driver factory to call the `getRelayServiceSessionInfo`
|
|
52
|
+
* function if it session aware.
|
|
53
|
+
*/
|
|
54
|
+
export interface IRelaySessionAwareDriverFactory extends IProvideSessionAwareDriverFactory {
|
|
55
|
+
getRelayServiceSessionInfo(
|
|
56
|
+
resolvedUrl: IResolvedUrl,
|
|
57
|
+
): Promise<ISocketStorageDiscovery | undefined>;
|
|
58
|
+
}
|