@fluidframework/odsp-driver-definitions 2.0.0-dev.7.4.0.215930 → 2.0.0-dev.7.4.0.217212
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/api-extractor-lint.json +13 -0
- package/api-extractor.json +0 -4
- package/api-report/odsp-driver-definitions.api.md +36 -36
- package/dist/errors.cjs +2 -0
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +12 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/factory.cjs.map +1 -1
- package/dist/factory.d.ts +12 -0
- package/dist/factory.d.ts.map +1 -1
- package/dist/odsp-driver-definitions-alpha.d.ts +71 -587
- package/dist/odsp-driver-definitions-beta.d.ts +75 -590
- package/dist/odsp-driver-definitions-public.d.ts +75 -590
- package/dist/odsp-driver-definitions-untrimmed.d.ts +60 -0
- package/dist/odspCache.cjs +2 -0
- package/dist/odspCache.cjs.map +1 -1
- package/dist/odspCache.d.ts +11 -0
- package/dist/odspCache.d.ts.map +1 -1
- package/dist/resolvedUrl.cjs +3 -0
- package/dist/resolvedUrl.cjs.map +1 -1
- package/dist/resolvedUrl.d.ts +12 -0
- package/dist/resolvedUrl.d.ts.map +1 -1
- package/dist/sessionProvider.cjs.map +1 -1
- package/dist/sessionProvider.d.ts +3 -0
- package/dist/sessionProvider.d.ts.map +1 -1
- package/dist/tokenFetch.cjs +2 -0
- package/dist/tokenFetch.cjs.map +1 -1
- package/dist/tokenFetch.d.ts +10 -0
- package/dist/tokenFetch.d.ts.map +1 -1
- package/lib/errors.d.ts +12 -0
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.mjs +2 -0
- package/lib/errors.mjs.map +1 -1
- package/lib/factory.d.ts +12 -0
- package/lib/factory.d.ts.map +1 -1
- package/lib/factory.mjs.map +1 -1
- package/lib/odsp-driver-definitions-alpha.d.ts +71 -587
- package/lib/odsp-driver-definitions-beta.d.ts +75 -590
- package/lib/odsp-driver-definitions-public.d.ts +75 -590
- package/lib/odsp-driver-definitions-untrimmed.d.ts +60 -0
- package/lib/odspCache.d.ts +11 -0
- package/lib/odspCache.d.ts.map +1 -1
- package/lib/odspCache.mjs +2 -0
- package/lib/odspCache.mjs.map +1 -1
- package/lib/resolvedUrl.d.ts +12 -0
- package/lib/resolvedUrl.d.ts.map +1 -1
- package/lib/resolvedUrl.mjs +3 -0
- package/lib/resolvedUrl.mjs.map +1 -1
- package/lib/sessionProvider.d.ts +3 -0
- package/lib/sessionProvider.d.ts.map +1 -1
- package/lib/sessionProvider.mjs.map +1 -1
- package/lib/tokenFetch.d.ts +10 -0
- package/lib/tokenFetch.d.ts.map +1 -1
- package/lib/tokenFetch.mjs +2 -0
- package/lib/tokenFetch.mjs.map +1 -1
- package/package.json +4 -3
- package/src/errors.ts +12 -0
- package/src/factory.ts +12 -0
- package/src/odspCache.ts +11 -0
- package/src/resolvedUrl.ts +12 -0
- package/src/sessionProvider.ts +3 -0
- package/src/tokenFetch.ts +10 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/odsp-driver-definitions",
|
|
3
|
-
"version": "2.0.0-dev.7.4.0.
|
|
3
|
+
"version": "2.0.0-dev.7.4.0.217212",
|
|
4
4
|
"description": "Socket storage implementation for SPO and ODC",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"module": "lib/index.mjs",
|
|
16
16
|
"types": "dist/index.d.ts",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@fluidframework/driver-definitions": "2.0.0-dev.7.4.0.
|
|
18
|
+
"@fluidframework/driver-definitions": "2.0.0-dev.7.4.0.217212"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@fluid-tools/build-cli": "^0.28.0",
|
|
@@ -58,12 +58,13 @@
|
|
|
58
58
|
"build:docs": "fluid-build . --task api",
|
|
59
59
|
"build:esnext": "tsc-multi --config ../../../common/build/build-common/tsc-multi.esm.json",
|
|
60
60
|
"build:test": "tsc-multi --config ./tsc-multi.test.json",
|
|
61
|
+
"check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
|
|
61
62
|
"ci:build:docs": "api-extractor run",
|
|
62
63
|
"clean": "rimraf --glob dist lib \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp",
|
|
63
64
|
"eslint": "eslint --format stylish src",
|
|
64
65
|
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
65
66
|
"format": "npm run prettier:fix",
|
|
66
|
-
"lint": "npm run prettier && npm run eslint",
|
|
67
|
+
"lint": "npm run prettier && npm run check:release-tags && npm run eslint",
|
|
67
68
|
"lint:fix": "npm run prettier:fix && npm run eslint:fix",
|
|
68
69
|
"prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
|
|
69
70
|
"prettier:fix": "prettier --write . --cache --ignore-path ../../../.prettierignore",
|
package/src/errors.ts
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
/**
|
|
12
12
|
* ODSP Error types.
|
|
13
13
|
* Different error types that may be thrown by the ODSP driver.
|
|
14
|
+
* @internal
|
|
14
15
|
*/
|
|
15
16
|
export const OdspErrorTypes = {
|
|
16
17
|
// Inherit base driver error types
|
|
@@ -60,6 +61,9 @@ export const OdspErrorTypes = {
|
|
|
60
61
|
*/
|
|
61
62
|
blockedIPAddress: "blockedIPAddress",
|
|
62
63
|
} as const;
|
|
64
|
+
/**
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
63
67
|
export type OdspErrorTypes = (typeof OdspErrorTypes)[keyof typeof OdspErrorTypes];
|
|
64
68
|
|
|
65
69
|
/**
|
|
@@ -67,6 +71,7 @@ export type OdspErrorTypes = (typeof OdspErrorTypes)[keyof typeof OdspErrorTypes
|
|
|
67
71
|
* Different error types that may be thrown by the ODSP driver.
|
|
68
72
|
*
|
|
69
73
|
* @deprecated Use {@link (OdspErrorTypes:variable)} instead.
|
|
74
|
+
* @internal
|
|
70
75
|
*/
|
|
71
76
|
export enum OdspErrorType {
|
|
72
77
|
/**
|
|
@@ -124,6 +129,9 @@ export enum OdspErrorType {
|
|
|
124
129
|
blockedIPAddress = "blockedIPAddress",
|
|
125
130
|
}
|
|
126
131
|
|
|
132
|
+
/**
|
|
133
|
+
* @internal
|
|
134
|
+
*/
|
|
127
135
|
export interface IOdspErrorAugmentations {
|
|
128
136
|
/**
|
|
129
137
|
* Server epoch indicates when the file was last modified.
|
|
@@ -146,9 +154,13 @@ export interface IOdspErrorAugmentations {
|
|
|
146
154
|
/**
|
|
147
155
|
* Base interface for all errors and warnings
|
|
148
156
|
* Superset of IDriverErrorBase, but with Odsp-specific errorType and properties
|
|
157
|
+
* @internal
|
|
149
158
|
*/
|
|
150
159
|
export interface IOdspError extends Omit<IDriverErrorBase, "errorType">, IOdspErrorAugmentations {
|
|
151
160
|
readonly errorType: OdspErrorType;
|
|
152
161
|
}
|
|
153
162
|
|
|
163
|
+
/**
|
|
164
|
+
* @internal
|
|
165
|
+
*/
|
|
154
166
|
export type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);
|
package/src/factory.ts
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
6
9
|
export interface ISnapshotOptions {
|
|
7
10
|
blobs?: number;
|
|
8
11
|
deltas?: number;
|
|
@@ -22,6 +25,9 @@ export interface ISnapshotOptions {
|
|
|
22
25
|
timeout?: number;
|
|
23
26
|
}
|
|
24
27
|
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
25
31
|
export interface IOpsCachingPolicy {
|
|
26
32
|
/**
|
|
27
33
|
* Batch size. Controls how many ops are grouped together as single cache entry
|
|
@@ -50,6 +56,9 @@ export interface IOpsCachingPolicy {
|
|
|
50
56
|
totalOpsToCache?: number;
|
|
51
57
|
}
|
|
52
58
|
|
|
59
|
+
/**
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
53
62
|
export interface ICollabSessionOptions {
|
|
54
63
|
/**
|
|
55
64
|
* Value indicating the display name for session that admits unauthenticated user.
|
|
@@ -69,6 +78,9 @@ export interface ICollabSessionOptions {
|
|
|
69
78
|
forceAccessTokenViaAuthorizationHeader?: boolean;
|
|
70
79
|
}
|
|
71
80
|
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
72
84
|
export interface HostStoragePolicy {
|
|
73
85
|
snapshotOptions?: ISnapshotOptions;
|
|
74
86
|
|
package/src/odspCache.ts
CHANGED
|
@@ -7,8 +7,12 @@ import { IResolvedUrl } from "@fluidframework/driver-definitions";
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Describes what kind of content is stored in cache entry.
|
|
10
|
+
* @internal
|
|
10
11
|
*/
|
|
11
12
|
export const snapshotKey = "snapshot";
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
12
16
|
export type CacheContentType = "snapshot" | "ops";
|
|
13
17
|
|
|
14
18
|
/*
|
|
@@ -16,6 +20,9 @@ export type CacheContentType = "snapshot" | "ops";
|
|
|
16
20
|
* There is overlapping information here - host can use all of it or parts
|
|
17
21
|
* to implement storage / identify files.
|
|
18
22
|
*/
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
19
26
|
export interface IFileEntry {
|
|
20
27
|
/**
|
|
21
28
|
* Unique and stable ID of the document.
|
|
@@ -33,6 +40,7 @@ export interface IFileEntry {
|
|
|
33
40
|
|
|
34
41
|
/**
|
|
35
42
|
* Cache entry. Identifies file that this entry belongs to, and type of content stored in it.
|
|
43
|
+
* @internal
|
|
36
44
|
*/
|
|
37
45
|
export interface IEntry {
|
|
38
46
|
/**
|
|
@@ -55,6 +63,7 @@ export interface IEntry {
|
|
|
55
63
|
|
|
56
64
|
/**
|
|
57
65
|
* Cache entry. Identifies file that this entry belongs to, and type of content stored in it.
|
|
66
|
+
* @internal
|
|
58
67
|
*/
|
|
59
68
|
export interface ICacheEntry extends IEntry {
|
|
60
69
|
/**
|
|
@@ -69,6 +78,7 @@ export interface ICacheEntry extends IEntry {
|
|
|
69
78
|
* cache implementation that does not survive across sessions. Snapshot entires stored in the
|
|
70
79
|
* IPersistedCache will be considered stale and removed after 2 days. Read the README for more
|
|
71
80
|
* information.
|
|
81
|
+
* @internal
|
|
72
82
|
*/
|
|
73
83
|
export interface IPersistedCache {
|
|
74
84
|
/**
|
|
@@ -97,6 +107,7 @@ export interface IPersistedCache {
|
|
|
97
107
|
* Api to generate a cache key from cache entry.
|
|
98
108
|
* @param entry - cache entry from which a cache key is generated
|
|
99
109
|
* @returns The key for cache.
|
|
110
|
+
* @internal
|
|
100
111
|
*/
|
|
101
112
|
export function getKeyForCacheEntry(entry: ICacheEntry): string {
|
|
102
113
|
return `${entry.file.docId}_${entry.type}_${entry.key}`;
|
package/src/resolvedUrl.ts
CHANGED
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
import { IResolvedUrl } from "@fluidframework/driver-definitions";
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
8
11
|
export interface IOdspUrlParts {
|
|
9
12
|
siteUrl: string;
|
|
10
13
|
driveId: string;
|
|
@@ -14,6 +17,7 @@ export interface IOdspUrlParts {
|
|
|
14
17
|
/**
|
|
15
18
|
* @deprecated Use ISharingLinkKind type instead.
|
|
16
19
|
* Type of shareLink requested/created when creating the file for the first time.
|
|
20
|
+
* @internal
|
|
17
21
|
*/
|
|
18
22
|
export enum ShareLinkTypes {
|
|
19
23
|
csl = "csl",
|
|
@@ -21,6 +25,7 @@ export enum ShareLinkTypes {
|
|
|
21
25
|
|
|
22
26
|
/**
|
|
23
27
|
* Sharing scope of the share links created for a file.
|
|
28
|
+
* @internal
|
|
24
29
|
*/
|
|
25
30
|
export enum SharingLinkScope {
|
|
26
31
|
organization = "organization",
|
|
@@ -31,6 +36,7 @@ export enum SharingLinkScope {
|
|
|
31
36
|
|
|
32
37
|
/**
|
|
33
38
|
* View/edit permission role for a sharing link.
|
|
39
|
+
* @internal
|
|
34
40
|
*/
|
|
35
41
|
export enum SharingLinkRole {
|
|
36
42
|
view = "view",
|
|
@@ -40,6 +46,7 @@ export enum SharingLinkRole {
|
|
|
40
46
|
/**
|
|
41
47
|
* Defines the permissions scope for a share link requested to be created during the creation the file in ODSP.
|
|
42
48
|
* Providing these properties to the /snapshot api will also create and return the requested kind of sharing link.
|
|
49
|
+
* @internal
|
|
43
50
|
*/
|
|
44
51
|
export interface ISharingLinkKind {
|
|
45
52
|
scope: SharingLinkScope;
|
|
@@ -52,6 +59,7 @@ export interface ISharingLinkKind {
|
|
|
52
59
|
|
|
53
60
|
/**
|
|
54
61
|
* Sharing link data received from the /snapshot api response.
|
|
62
|
+
* @internal
|
|
55
63
|
*/
|
|
56
64
|
export interface ISharingLink extends ISharingLinkKind {
|
|
57
65
|
webUrl: string;
|
|
@@ -61,6 +69,7 @@ export interface ISharingLink extends ISharingLinkKind {
|
|
|
61
69
|
* Sharing link data created for the ODSP item.
|
|
62
70
|
* Contains information about either sharing link created while creating a new file or
|
|
63
71
|
* a redeemable share link created when loading an existing file
|
|
72
|
+
* @internal
|
|
64
73
|
*/
|
|
65
74
|
export interface ShareLinkInfoType {
|
|
66
75
|
/**
|
|
@@ -98,6 +107,9 @@ export interface ShareLinkInfoType {
|
|
|
98
107
|
*/
|
|
99
108
|
sharingLinkToRedeem?: string;
|
|
100
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
101
113
|
export interface IOdspResolvedUrl extends IResolvedUrl, IOdspUrlParts {
|
|
102
114
|
type: "fluid";
|
|
103
115
|
odspResolvedUrl: true;
|
package/src/sessionProvider.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { IResolvedUrl } from "@fluidframework/driver-definitions";
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Socket storage discovery api response
|
|
10
|
+
* @internal
|
|
10
11
|
*/
|
|
11
12
|
export interface ISocketStorageDiscovery {
|
|
12
13
|
// The id of the web socket
|
|
@@ -42,6 +43,7 @@ export interface ISocketStorageDiscovery {
|
|
|
42
43
|
/**
|
|
43
44
|
* An interface that allows a concrete instance of a driver factory to interrogate itself
|
|
44
45
|
* to find out if it is session aware.
|
|
46
|
+
* @internal
|
|
45
47
|
*/
|
|
46
48
|
export interface IProvideSessionAwareDriverFactory {
|
|
47
49
|
readonly IRelaySessionAwareDriverFactory: IRelaySessionAwareDriverFactory;
|
|
@@ -50,6 +52,7 @@ export interface IProvideSessionAwareDriverFactory {
|
|
|
50
52
|
/**
|
|
51
53
|
* An interface that allows a concrete instance of a driver factory to call the `getRelayServiceSessionInfo`
|
|
52
54
|
* function if it session aware.
|
|
55
|
+
* @internal
|
|
53
56
|
*/
|
|
54
57
|
export interface IRelaySessionAwareDriverFactory extends IProvideSessionAwareDriverFactory {
|
|
55
58
|
getRelayServiceSessionInfo(
|
package/src/tokenFetch.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Represents token response
|
|
8
|
+
* @internal
|
|
8
9
|
*/
|
|
9
10
|
export interface TokenResponse {
|
|
10
11
|
/** Token value */
|
|
@@ -16,6 +17,7 @@ export interface TokenResponse {
|
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* Represents access token fetch options
|
|
20
|
+
* @internal
|
|
19
21
|
*/
|
|
20
22
|
export interface TokenFetchOptions {
|
|
21
23
|
/**
|
|
@@ -40,6 +42,7 @@ export interface TokenFetchOptions {
|
|
|
40
42
|
|
|
41
43
|
/**
|
|
42
44
|
* Represents access token fetch options for ODSP resource
|
|
45
|
+
* @internal
|
|
43
46
|
*/
|
|
44
47
|
export interface OdspResourceTokenFetchOptions extends TokenFetchOptions {
|
|
45
48
|
/** Site url representing ODSP resource location */
|
|
@@ -58,6 +61,7 @@ export interface OdspResourceTokenFetchOptions extends TokenFetchOptions {
|
|
|
58
61
|
* @returns If successful, TokenResponse object representing token value along with flag indicating
|
|
59
62
|
* whether token came from cache. Legacy implementation may return a string for token value;
|
|
60
63
|
* in this case it should be assumes that fromCache signal is undefined. Null is returned in case of failure.
|
|
64
|
+
* @internal
|
|
61
65
|
*/
|
|
62
66
|
export type TokenFetcher<T> = (options: T) => Promise<string | TokenResponse | null>;
|
|
63
67
|
|
|
@@ -65,6 +69,7 @@ export type TokenFetcher<T> = (options: T) => Promise<string | TokenResponse | n
|
|
|
65
69
|
* Helper method which transforms return value for TokenFetcher method to token string
|
|
66
70
|
* @param tokenResponse - return value for TokenFetcher method
|
|
67
71
|
* @returns Token value
|
|
72
|
+
* @internal
|
|
68
73
|
*/
|
|
69
74
|
export const tokenFromResponse = (
|
|
70
75
|
tokenResponse: string | TokenResponse | null | undefined,
|
|
@@ -80,6 +85,7 @@ export const tokenFromResponse = (
|
|
|
80
85
|
* @param tokenResponse - return value for TokenFetcher method
|
|
81
86
|
* @returns Value indicating whether response came from cache.
|
|
82
87
|
* Undefined is returned when we could not determine the source of token.
|
|
88
|
+
* @internal
|
|
83
89
|
*/
|
|
84
90
|
export const isTokenFromCache = (
|
|
85
91
|
tokenResponse: string | TokenResponse | null,
|
|
@@ -92,9 +98,13 @@ export const isTokenFromCache = (
|
|
|
92
98
|
* Identity types supported by ODSP driver.
|
|
93
99
|
* `Consumer` represents user authenticated with Microsoft Account (MSA).
|
|
94
100
|
* `Enterprise` represents user authenticated with M365 tenant account.
|
|
101
|
+
* @internal
|
|
95
102
|
*/
|
|
96
103
|
export type IdentityType = "Consumer" | "Enterprise";
|
|
97
104
|
|
|
105
|
+
/**
|
|
106
|
+
* @internal
|
|
107
|
+
*/
|
|
98
108
|
export type InstrumentedStorageTokenFetcher = (
|
|
99
109
|
options: TokenFetchOptions,
|
|
100
110
|
name: string,
|