@fluidframework/odsp-driver-definitions 2.0.0-internal.6.4.0 → 2.0.0-internal.7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,71 @@
1
1
  # @fluidframework/odsp-driver-definitions
2
2
 
3
+ ## 2.0.0-internal.7.1.0
4
+
5
+ Dependency updates only.
6
+
7
+ ## 2.0.0-internal.7.0.0
8
+
9
+ ### Major Changes
10
+
11
+ - odsp-driver: Load container in readonly mode when driver throws DriverErrorType.outOfStorage [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
12
+
13
+ Handle DriverErrorType.outOfStorage error from driver and load the container in readonly mode. Currently there is no
14
+ handling and when the join session throws this error, the container will get closed. With this we use NoDeltaStream
15
+ object as connection and load the container in read mode, so that it loads properly. We also notify the that the
16
+ container is "readonly" through the event on delta manager so that apps can listen to this and show any UX etc. The app
17
+ can listen to the event like this:
18
+
19
+ ```ts
20
+ container.deltaManager.on(
21
+ "readonly",
22
+ (readonly?: boolean, readonlyConnectionReason?: { text: string; error?: IErrorBase }) => {
23
+ // error?.errorType will be equal to DriverErrorType.outOfStorage in this case
24
+ // App logic
25
+ },
26
+ );
27
+ ```
28
+
29
+ - Dependencies on @fluidframework/protocol-definitions package updated to 3.0.0 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
30
+
31
+ This included the following changes from the protocol-definitions release:
32
+
33
+ - Updating signal interfaces for some planned improvements. The intention is split the interface between signals
34
+ submitted by clients to the server and the resulting signals sent from the server to clients.
35
+ - A new optional type member is available on the ISignalMessage interface and a new ISentSignalMessage interface has
36
+ been added, which will be the typing for signals sent from the client to the server. Both extend a new
37
+ ISignalMessageBase interface that contains common members.
38
+ - The @fluidframework/common-definitions package dependency has been updated to version 1.0.0.
39
+
40
+ - Server upgrade: dependencies on Fluid server packages updated to 2.0.1 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
41
+
42
+ Dependencies on the following Fluid server package have been updated to version 2.0.1:
43
+
44
+ - @fluidframework/gitresources: 2.0.1
45
+ - @fluidframework/server-kafka-orderer: 2.0.1
46
+ - @fluidframework/server-lambdas: 2.0.1
47
+ - @fluidframework/server-lambdas-driver: 2.0.1
48
+ - @fluidframework/server-local-server: 2.0.1
49
+ - @fluidframework/server-memory-orderer: 2.0.1
50
+ - @fluidframework/protocol-base: 2.0.1
51
+ - @fluidframework/server-routerlicious: 2.0.1
52
+ - @fluidframework/server-routerlicious-base: 2.0.1
53
+ - @fluidframework/server-services: 2.0.1
54
+ - @fluidframework/server-services-client: 2.0.1
55
+ - @fluidframework/server-services-core: 2.0.1
56
+ - @fluidframework/server-services-ordering-kafkanode: 2.0.1
57
+ - @fluidframework/server-services-ordering-rdkafka: 2.0.1
58
+ - @fluidframework/server-services-ordering-zookeeper: 2.0.1
59
+ - @fluidframework/server-services-shared: 2.0.1
60
+ - @fluidframework/server-services-telemetry: 2.0.1
61
+ - @fluidframework/server-services-utils: 2.0.1
62
+ - @fluidframework/server-test-utils: 2.0.1
63
+ - tinylicious: 2.0.1
64
+
65
+ - Minimum TypeScript version now 5.1.6 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
66
+
67
+ The minimum supported TypeScript version for Fluid 2.0 clients is now 5.1.6.
68
+
3
69
  ## 2.0.0-internal.6.4.0
4
70
 
5
71
  Dependency updates only.
@@ -1,4 +1,12 @@
1
1
  {
2
2
  "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "@fluidframework/build-common/api-extractor-common-report.json"
3
+ "extends": "@fluidframework/build-common/api-extractor-base.json",
4
+ "messages": {
5
+ "extractorMessageReporting": {
6
+ "ae-missing-release-tag": {
7
+ // TODO: Fix violations and remove this rule override
8
+ "logLevel": "none"
9
+ }
10
+ }
11
+ }
4
12
  }
@@ -0,0 +1,320 @@
1
+ ## API Report File for "@fluidframework/odsp-driver-definitions"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ import { DriverError } from '@fluidframework/driver-definitions';
8
+ import { IDriverErrorBase } from '@fluidframework/driver-definitions';
9
+ import { IResolvedUrl } from '@fluidframework/driver-definitions';
10
+
11
+ // @public (undocumented)
12
+ export type CacheContentType = "snapshot" | "ops";
13
+
14
+ // @public
15
+ export function getKeyForCacheEntry(entry: ICacheEntry): string;
16
+
17
+ // @public (undocumented)
18
+ export interface HostStoragePolicy {
19
+ avoidPrefetchSnapshotCache?: boolean;
20
+ cacheCreateNewSummary?: boolean;
21
+ // (undocumented)
22
+ concurrentOpsBatches?: number;
23
+ concurrentSnapshotFetch?: boolean;
24
+ // @deprecated (undocumented)
25
+ enableRedeemFallback?: boolean;
26
+ // @deprecated (undocumented)
27
+ enableShareLinkWithCreate?: boolean;
28
+ enableSingleRequestForShareLinkWithCreate?: boolean;
29
+ // @deprecated (undocumented)
30
+ fetchBinarySnapshotFormat?: boolean;
31
+ isolateSocketCache?: boolean;
32
+ // (undocumented)
33
+ opsBatchSize?: number;
34
+ opsCaching?: IOpsCachingPolicy;
35
+ sessionOptions?: ICollabSessionOptions;
36
+ // (undocumented)
37
+ snapshotOptions?: ISnapshotOptions;
38
+ }
39
+
40
+ // @public
41
+ export interface ICacheEntry extends IEntry {
42
+ file: IFileEntry;
43
+ }
44
+
45
+ // @public (undocumented)
46
+ export interface ICollabSessionOptions {
47
+ // @deprecated (undocumented)
48
+ forceAccessTokenViaAuthorizationHeader?: boolean;
49
+ unauthenticatedUserDisplayName?: string;
50
+ }
51
+
52
+ // @public
53
+ export type IdentityType = "Consumer" | "Enterprise";
54
+
55
+ // @public
56
+ export interface IEntry {
57
+ key: string;
58
+ type: CacheContentType;
59
+ }
60
+
61
+ // @public (undocumented)
62
+ export interface IFileEntry {
63
+ docId: string;
64
+ resolvedUrl: IResolvedUrl;
65
+ }
66
+
67
+ // @public (undocumented)
68
+ export type InstrumentedStorageTokenFetcher = (options: TokenFetchOptions, name: string, alwaysRecordTokenFetchTelemetry?: boolean) => Promise<string | null>;
69
+
70
+ // @public
71
+ export interface IOdspError extends Omit<IDriverErrorBase, "errorType">, IOdspErrorAugmentations {
72
+ // (undocumented)
73
+ readonly errorType: OdspErrorType;
74
+ }
75
+
76
+ // @public (undocumented)
77
+ export interface IOdspErrorAugmentations {
78
+ facetCodes?: string[];
79
+ redirectLocation?: string;
80
+ serverEpoch?: string;
81
+ }
82
+
83
+ // @public (undocumented)
84
+ export interface IOdspResolvedUrl extends IResolvedUrl, IOdspUrlParts {
85
+ // (undocumented)
86
+ codeHint?: {
87
+ containerPackageName?: string;
88
+ };
89
+ // (undocumented)
90
+ dataStorePath?: string;
91
+ // (undocumented)
92
+ endpoints: {
93
+ snapshotStorageUrl: string;
94
+ attachmentPOSTStorageUrl: string;
95
+ attachmentGETStorageUrl: string;
96
+ deltaStorageUrl: string;
97
+ };
98
+ // (undocumented)
99
+ fileName: string;
100
+ // (undocumented)
101
+ fileVersion: string | undefined;
102
+ // (undocumented)
103
+ hashedDocumentId: string;
104
+ // (undocumented)
105
+ isClpCompliantApp?: boolean;
106
+ // (undocumented)
107
+ odspResolvedUrl: true;
108
+ shareLinkInfo?: ShareLinkInfoType;
109
+ // (undocumented)
110
+ summarizer: boolean;
111
+ // (undocumented)
112
+ tokens: {};
113
+ // (undocumented)
114
+ type: "fluid";
115
+ // (undocumented)
116
+ url: string;
117
+ }
118
+
119
+ // @public (undocumented)
120
+ export interface IOdspUrlParts {
121
+ // (undocumented)
122
+ driveId: string;
123
+ // (undocumented)
124
+ itemId: string;
125
+ // (undocumented)
126
+ siteUrl: string;
127
+ }
128
+
129
+ // @public (undocumented)
130
+ export interface IOpsCachingPolicy {
131
+ batchSize?: number;
132
+ timerGranularity?: number;
133
+ totalOpsToCache?: number;
134
+ }
135
+
136
+ // @public
137
+ export interface IPersistedCache {
138
+ get(entry: ICacheEntry): Promise<any>;
139
+ put(entry: ICacheEntry, value: any): Promise<void>;
140
+ removeEntries(file: IFileEntry): Promise<void>;
141
+ }
142
+
143
+ // @public
144
+ export interface IProvideSessionAwareDriverFactory {
145
+ // (undocumented)
146
+ readonly IRelaySessionAwareDriverFactory: IRelaySessionAwareDriverFactory;
147
+ }
148
+
149
+ // @public
150
+ export interface IRelaySessionAwareDriverFactory extends IProvideSessionAwareDriverFactory {
151
+ // (undocumented)
152
+ getRelayServiceSessionInfo(resolvedUrl: IResolvedUrl): Promise<ISocketStorageDiscovery | undefined>;
153
+ }
154
+
155
+ // @public
156
+ export interface ISharingLink extends ISharingLinkKind {
157
+ // (undocumented)
158
+ webUrl: string;
159
+ }
160
+
161
+ // @public
162
+ export interface ISharingLinkKind {
163
+ // (undocumented)
164
+ role?: SharingLinkRole;
165
+ // (undocumented)
166
+ scope: SharingLinkScope;
167
+ }
168
+
169
+ // @public (undocumented)
170
+ export interface ISnapshotOptions {
171
+ // (undocumented)
172
+ blobs?: number;
173
+ // (undocumented)
174
+ channels?: number;
175
+ // (undocumented)
176
+ deltas?: number;
177
+ // (undocumented)
178
+ mds?: number;
179
+ // (undocumented)
180
+ timeout?: number;
181
+ }
182
+
183
+ // @public
184
+ export interface ISocketStorageDiscovery {
185
+ // (undocumented)
186
+ deltaStorageUrl: string;
187
+ deltaStreamSocketUrl: string;
188
+ // (undocumented)
189
+ id: string;
190
+ refreshSessionDurationSeconds?: number;
191
+ // (undocumented)
192
+ runtimeTenantId?: string;
193
+ // (undocumented)
194
+ snapshotStorageUrl: string;
195
+ socketToken?: string;
196
+ // (undocumented)
197
+ tenantId: string;
198
+ }
199
+
200
+ // @public
201
+ export const isTokenFromCache: (tokenResponse: string | TokenResponse | null) => boolean | undefined;
202
+
203
+ // @public (undocumented)
204
+ export type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);
205
+
206
+ // @public @deprecated
207
+ export enum OdspErrorType {
208
+ blockedIPAddress = "blockedIPAddress",
209
+ cannotCatchUp = "cannotCatchUp",
210
+ fetchTimeout = "fetchTimeout",
211
+ // (undocumented)
212
+ fetchTokenError = "fetchTokenError",
213
+ fluidNotEnabled = "fluidNotEnabled",
214
+ invalidFileNameError = "invalidFileNameError",
215
+ outOfStorageError = "outOfStorageError",
216
+ serviceReadOnly = "serviceReadOnly",
217
+ snapshotTooBig = "snapshotTooBig"
218
+ }
219
+
220
+ // @public
221
+ export const OdspErrorTypes: {
222
+ readonly invalidFileNameError: "invalidFileNameError";
223
+ readonly snapshotTooBig: "snapshotTooBig";
224
+ readonly fetchTimeout: "fetchTimeout";
225
+ readonly fluidNotEnabled: "fluidNotEnabled";
226
+ readonly cannotCatchUp: "cannotCatchUp";
227
+ readonly serviceReadOnly: "serviceReadOnly";
228
+ readonly blockedIPAddress: "blockedIPAddress";
229
+ readonly genericNetworkError: "genericNetworkError";
230
+ readonly authorizationError: "authorizationError";
231
+ readonly fileNotFoundOrAccessDeniedError: "fileNotFoundOrAccessDeniedError";
232
+ readonly offlineError: "offlineError";
233
+ readonly unsupportedClientProtocolVersion: "unsupportedClientProtocolVersion";
234
+ readonly writeError: "writeError";
235
+ readonly fetchFailure: "fetchFailure";
236
+ readonly fetchTokenError: "fetchTokenError";
237
+ readonly incorrectServerResponse: "incorrectServerResponse";
238
+ readonly fileOverwrittenInStorage: "fileOverwrittenInStorage";
239
+ readonly deltaStreamConnectionForbidden: "deltaStreamConnectionForbidden";
240
+ readonly locationRedirection: "locationRedirection";
241
+ readonly fluidInvalidSchema: "fluidInvalidSchema";
242
+ readonly fileIsLocked: "fileIsLocked";
243
+ readonly outOfStorageError: "outOfStorageError";
244
+ readonly genericError: "genericError";
245
+ readonly throttlingError: "throttlingError";
246
+ readonly usageError: "usageError";
247
+ };
248
+
249
+ // @public (undocumented)
250
+ export type OdspErrorTypes = (typeof OdspErrorTypes)[keyof typeof OdspErrorTypes];
251
+
252
+ // @public
253
+ export interface OdspResourceTokenFetchOptions extends TokenFetchOptions {
254
+ driveId?: string;
255
+ itemId?: string;
256
+ siteUrl: string;
257
+ }
258
+
259
+ // @public
260
+ export interface ShareLinkInfoType {
261
+ createLink?: {
262
+ type?: ShareLinkTypes | ISharingLinkKind;
263
+ link?: string | ISharingLink;
264
+ error?: any;
265
+ shareId?: string;
266
+ };
267
+ sharingLinkToRedeem?: string;
268
+ }
269
+
270
+ // @public @deprecated (undocumented)
271
+ export enum ShareLinkTypes {
272
+ // (undocumented)
273
+ csl = "csl"
274
+ }
275
+
276
+ // @public
277
+ export enum SharingLinkRole {
278
+ // (undocumented)
279
+ edit = "edit",
280
+ // (undocumented)
281
+ view = "view"
282
+ }
283
+
284
+ // @public
285
+ export enum SharingLinkScope {
286
+ // (undocumented)
287
+ anonymous = "anonymous",
288
+ // (undocumented)
289
+ default = "default",
290
+ // (undocumented)
291
+ organization = "organization",
292
+ // (undocumented)
293
+ users = "users"
294
+ }
295
+
296
+ // @public
297
+ export const snapshotKey = "snapshot";
298
+
299
+ // @public
300
+ export type TokenFetcher<T> = (options: T) => Promise<string | TokenResponse | null>;
301
+
302
+ // @public
303
+ export interface TokenFetchOptions {
304
+ claims?: string;
305
+ refresh: boolean;
306
+ tenantId?: string;
307
+ }
308
+
309
+ // @public
310
+ export const tokenFromResponse: (tokenResponse: string | TokenResponse | null | undefined) => string | null;
311
+
312
+ // @public
313
+ export interface TokenResponse {
314
+ fromCache?: boolean;
315
+ token: string;
316
+ }
317
+
318
+ // (No @packageDocumentation comment for this package)
319
+
320
+ ```
package/dist/errors.d.ts CHANGED
@@ -8,10 +8,6 @@ import { DriverError, IDriverErrorBase } from "@fluidframework/driver-definition
8
8
  * Different error types that may be thrown by the ODSP driver.
9
9
  */
10
10
  export declare const OdspErrorTypes: {
11
- /**
12
- * Storage is out of space
13
- */
14
- readonly outOfStorageError: "outOfStorageError";
15
11
  /**
16
12
  * Invalid file name (at creation of the file)
17
13
  */
@@ -45,6 +41,10 @@ export declare const OdspErrorTypes: {
45
41
  * So to preserve integrity of the data, the data becomes readonly.
46
42
  */
47
43
  readonly serviceReadOnly: "serviceReadOnly";
44
+ /**
45
+ * Due to organizational policies, you can't access server resources from the current network location.
46
+ */
47
+ readonly blockedIPAddress: "blockedIPAddress";
48
48
  readonly genericNetworkError: "genericNetworkError";
49
49
  readonly authorizationError: "authorizationError";
50
50
  readonly fileNotFoundOrAccessDeniedError: "fileNotFoundOrAccessDeniedError";
@@ -56,16 +56,15 @@ export declare const OdspErrorTypes: {
56
56
  readonly incorrectServerResponse: "incorrectServerResponse";
57
57
  readonly fileOverwrittenInStorage: "fileOverwrittenInStorage";
58
58
  readonly deltaStreamConnectionForbidden: "deltaStreamConnectionForbidden";
59
- readonly locationRedirection: "locationRedirection"; /**
60
- * SPO admin toggle: fluid service is not enabled.
61
- */
59
+ readonly locationRedirection: "locationRedirection";
62
60
  readonly fluidInvalidSchema: "fluidInvalidSchema";
63
61
  readonly fileIsLocked: "fileIsLocked";
62
+ readonly outOfStorageError: "outOfStorageError";
64
63
  readonly genericError: "genericError";
65
64
  readonly throttlingError: "throttlingError";
66
65
  readonly usageError: "usageError";
67
66
  };
68
- export declare type OdspErrorTypes = typeof OdspErrorTypes[keyof typeof OdspErrorTypes];
67
+ export type OdspErrorTypes = (typeof OdspErrorTypes)[keyof typeof OdspErrorTypes];
69
68
  /**
70
69
  * ODSP Error types.
71
70
  * Different error types that may be thrown by the ODSP driver.
@@ -113,7 +112,11 @@ export declare enum OdspErrorType {
113
112
  * SPO can occasionally return 403 for r/w operations on document when there is a fail over to another data center.
114
113
  * So to preserve integrity of the data, the data becomes readonly.
115
114
  */
116
- serviceReadOnly = "serviceReadOnly"
115
+ serviceReadOnly = "serviceReadOnly",
116
+ /**
117
+ * Due to organizational policies, you can't access server resources from the current network location.
118
+ */
119
+ blockedIPAddress = "blockedIPAddress"
117
120
  }
118
121
  export interface IOdspErrorAugmentations {
119
122
  /**
@@ -138,5 +141,5 @@ export interface IOdspErrorAugmentations {
138
141
  export interface IOdspError extends Omit<IDriverErrorBase, "errorType">, IOdspErrorAugmentations {
139
142
  readonly errorType: OdspErrorType;
140
143
  }
141
- export declare type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);
144
+ export type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);
142
145
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACN,WAAW,EACX,gBAAgB,EAEhB,MAAM,oCAAoC,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,cAAc;IAI1B;;OAEG;;IAGH;;OAEG;;IAGH;;;;OAIG;;IAGH;;;;OAIG;;IAGH;;OAEG;;IAGH;;;;;;OAMG;;IAGH;;;OAGG;;;;;;;;;;;;;yDAoCH;;OAEG;;;;;;CApCM,CAAC;AACX,oBAAY,cAAc,GAAG,OAAO,cAAc,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEhF;;;;;GAKG;AACH,oBAAY,aAAa;IACxB;;OAEG;IACH,iBAAiB,sBAAsB;IAEvC;;OAEG;IACH,oBAAoB,yBAAyB;IAE7C;;;;OAIG;IACH,cAAc,mBAAmB;IAEjC;;;;OAIG;IACH,YAAY,iBAAiB;IAE7B;;OAEG;IACH,eAAe,oBAAoB;IAEnC;;OAEG;IACH,eAAe,oBAAoB;IAEnC;;;;;;OAMG;IACH,aAAa,kBAAkB;IAE/B;;;OAGG;IACH,eAAe,oBAAoB;CACnC;AAED,MAAM,WAAW,uBAAuB;IACvC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,gBAAgB,EAAE,WAAW,CAAC,EAAE,uBAAuB;IAC/F,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;CAClC;AAED,oBAAY,SAAS,GAAG,UAAU,GAAG,CAAC,WAAW,GAAG,uBAAuB,CAAC,CAAC"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACN,WAAW,EACX,gBAAgB,EAEhB,MAAM,oCAAoC,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,cAAc;IAI1B;;OAEG;;IAGH;;;;OAIG;;IAGH;;;;OAIG;;IAGH;;OAEG;;IAGH;;;;;;OAMG;;IAGH;;;OAGG;;IAGH;;OAEG;;;;;;;;;;;;;;;;;;;;CAEM,CAAC;AACX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAElF;;;;;GAKG;AACH,oBAAY,aAAa;IACxB;;OAEG;IACH,iBAAiB,sBAAsB;IAEvC;;OAEG;IACH,oBAAoB,yBAAyB;IAE7C;;;;OAIG;IACH,cAAc,mBAAmB;IAEjC;;;;OAIG;IACH,YAAY,iBAAiB;IAE7B;;OAEG;IACH,eAAe,oBAAoB;IAEnC;;OAEG;IACH,eAAe,oBAAoB;IAEnC;;;;;;OAMG;IACH,aAAa,kBAAkB;IAE/B;;;OAGG;IACH,eAAe,oBAAoB;IAEnC;;OAEG;IACH,gBAAgB,qBAAqB;CACrC;AAED,MAAM,WAAW,uBAAuB;IACvC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,gBAAgB,EAAE,WAAW,CAAC,EAAE,uBAAuB;IAC/F,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;CAClC;AAED,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,CAAC,WAAW,GAAG,uBAAuB,CAAC,CAAC"}
package/dist/errors.js CHANGED
@@ -13,10 +13,6 @@ const driver_definitions_1 = require("@fluidframework/driver-definitions");
13
13
  exports.OdspErrorTypes = {
14
14
  // Inherit base driver error types
15
15
  ...driver_definitions_1.DriverErrorTypes,
16
- /**
17
- * Storage is out of space
18
- */
19
- outOfStorageError: "outOfStorageError",
20
16
  /**
21
17
  * Invalid file name (at creation of the file)
22
18
  */
@@ -50,6 +46,10 @@ exports.OdspErrorTypes = {
50
46
  * So to preserve integrity of the data, the data becomes readonly.
51
47
  */
52
48
  serviceReadOnly: "serviceReadOnly",
49
+ /**
50
+ * Due to organizational policies, you can't access server resources from the current network location.
51
+ */
52
+ blockedIPAddress: "blockedIPAddress",
53
53
  };
54
54
  /**
55
55
  * ODSP Error types.
@@ -100,5 +100,9 @@ var OdspErrorType;
100
100
  * So to preserve integrity of the data, the data becomes readonly.
101
101
  */
102
102
  OdspErrorType["serviceReadOnly"] = "serviceReadOnly";
103
- })(OdspErrorType = exports.OdspErrorType || (exports.OdspErrorType = {}));
103
+ /**
104
+ * Due to organizational policies, you can't access server resources from the current network location.
105
+ */
106
+ OdspErrorType["blockedIPAddress"] = "blockedIPAddress";
107
+ })(OdspErrorType || (exports.OdspErrorType = OdspErrorType = {}));
104
108
  //# sourceMappingURL=errors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,2EAI4C;AAE5C;;;GAGG;AACU,QAAA,cAAc,GAAG;IAC7B,kCAAkC;IAClC,GAAG,qCAAgB;IAEnB;;OAEG;IACH,iBAAiB,EAAE,mBAAmB;IAEtC;;OAEG;IACH,oBAAoB,EAAE,sBAAsB;IAE5C;;;;OAIG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;;;OAIG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;;;;;OAMG;IACH,aAAa,EAAE,eAAe;IAE9B;;;OAGG;IACH,eAAe,EAAE,iBAAiB;CACzB,CAAC;AAGX;;;;;GAKG;AACH,IAAY,aAiDX;AAjDD,WAAY,aAAa;IACxB;;OAEG;IACH,wDAAuC,CAAA;IAEvC;;OAEG;IACH,8DAA6C,CAAA;IAE7C;;;;OAIG;IACH,kDAAiC,CAAA;IAEjC;;;;OAIG;IACH,8CAA6B,CAAA;IAE7B;;OAEG;IACH,oDAAmC,CAAA;IAEnC;;OAEG;IACH,oDAAmC,CAAA;IAEnC;;;;;;OAMG;IACH,gDAA+B,CAAA;IAE/B;;;OAGG;IACH,oDAAmC,CAAA;AACpC,CAAC,EAjDW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAiDxB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport {\n\tDriverError,\n\tIDriverErrorBase,\n\tDriverErrorTypes,\n} from \"@fluidframework/driver-definitions\";\n\n/**\n * ODSP Error types.\n * Different error types that may be thrown by the ODSP driver.\n */\nexport const OdspErrorTypes = {\n\t// Inherit base driver error types\n\t...DriverErrorTypes,\n\n\t/**\n\t * Storage is out of space\n\t */\n\toutOfStorageError: \"outOfStorageError\",\n\n\t/**\n\t * Invalid file name (at creation of the file)\n\t */\n\tinvalidFileNameError: \"invalidFileNameError\",\n\n\t/**\n\t * Snapshot is too big. Host application specified limit for snapshot size, and snapshot was bigger\n\t * that that limit, thus request failed. Hosting application is expected to have fall-back behavior for\n\t * such case.\n\t */\n\tsnapshotTooBig: \"snapshotTooBig\",\n\n\t/**\n\t * Maximum time limit to fetch reached. Host application specified limit for fetching of snapshot, when\n\t * that limit is reached, request fails. Hosting application is expected to have fall-back behavior for\n\t * such case.\n\t */\n\tfetchTimeout: \"fetchTimeout\",\n\n\t/**\n\t * SPO admin toggle: fluid service is not enabled.\n\t */\n\tfluidNotEnabled: \"fluidNotEnabled\",\n\n\t/**\n\t * This error will be raised when client is too behind with no way to catch up.\n\t * This condition will happen when user was offline for too long, resulting in old ops / blobs being deleted\n\t * by storage, and thus removing an ability for client to catch up.\n\t * This condition will result in any local changes being lost (i.e. only way to save state is by user\n\t * copying it over manually)\n\t */\n\tcannotCatchUp: \"cannotCatchUp\",\n\n\t/**\n\t * SPO can occasionally return 403 for r/w operations on document when there is a fail over to another data center.\n\t * So to preserve integrity of the data, the data becomes readonly.\n\t */\n\tserviceReadOnly: \"serviceReadOnly\",\n} as const;\nexport type OdspErrorTypes = typeof OdspErrorTypes[keyof typeof OdspErrorTypes];\n\n/**\n * ODSP Error types.\n * Different error types that may be thrown by the ODSP driver.\n *\n * @deprecated Use {@link (OdspErrorTypes:variable)} instead.\n */\nexport enum OdspErrorType {\n\t/**\n\t * Storage is out of space\n\t */\n\toutOfStorageError = \"outOfStorageError\",\n\n\t/**\n\t * Invalid file name (at creation of the file)\n\t */\n\tinvalidFileNameError = \"invalidFileNameError\",\n\n\t/**\n\t * Snapshot is too big. Host application specified limit for snapshot size, and snapshot was bigger\n\t * that that limit, thus request failed. Hosting application is expected to have fall-back behavior for\n\t * such case.\n\t */\n\tsnapshotTooBig = \"snapshotTooBig\",\n\n\t/**\n\t * Maximum time limit to fetch reached. Host application specified limit for fetching of snapshot, when\n\t * that limit is reached, request fails. Hosting application is expected to have fall-back behavior for\n\t * such case.\n\t */\n\tfetchTimeout = \"fetchTimeout\",\n\n\t/**\n\t * SPO admin toggle: fluid service is not enabled.\n\t */\n\tfluidNotEnabled = \"fluidNotEnabled\",\n\n\t/**\n\t * {@inheritDoc @fluidframework/driver-definitions#FluidErrorType.fetchTokenError}\n\t */\n\tfetchTokenError = \"fetchTokenError\",\n\n\t/**\n\t * This error will be raised when client is too behind with no way to catch up.\n\t * This condition will happen when user was offline for too long, resulting in old ops / blobs being deleted\n\t * by storage, and thus removing an ability for client to catch up.\n\t * This condition will result in any local changes being lost (i.e. only way to save state is by user\n\t * copying it over manually)\n\t */\n\tcannotCatchUp = \"cannotCatchUp\",\n\n\t/**\n\t * SPO can occasionally return 403 for r/w operations on document when there is a fail over to another data center.\n\t * So to preserve integrity of the data, the data becomes readonly.\n\t */\n\tserviceReadOnly = \"serviceReadOnly\",\n}\n\nexport interface IOdspErrorAugmentations {\n\t/**\n\t * Server epoch indicates when the file was last modified.\n\t * Used to detect modifications outside Fluid's services\n\t */\n\tserverEpoch?: string;\n\n\t/**\n\t * It is the redirection url at which the network call should have been made. It is due to change\n\t * in site domain of the file on server.\n\t */\n\tredirectLocation?: string;\n\n\t/**\n\t * It is array of error codes included in error response from server.\n\t */\n\tfacetCodes?: string[];\n}\n\n/**\n * Base interface for all errors and warnings\n * Superset of IDriverErrorBase, but with Odsp-specific errorType and properties\n */\nexport interface IOdspError extends Omit<IDriverErrorBase, \"errorType\">, IOdspErrorAugmentations {\n\treadonly errorType: OdspErrorType;\n}\n\nexport type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);\n"]}
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,2EAI4C;AAE5C;;;GAGG;AACU,QAAA,cAAc,GAAG;IAC7B,kCAAkC;IAClC,GAAG,qCAAgB;IAEnB;;OAEG;IACH,oBAAoB,EAAE,sBAAsB;IAE5C;;;;OAIG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;;;OAIG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;;;;;OAMG;IACH,aAAa,EAAE,eAAe;IAE9B;;;OAGG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,gBAAgB,EAAE,kBAAkB;CAC3B,CAAC;AAGX;;;;;GAKG;AACH,IAAY,aAsDX;AAtDD,WAAY,aAAa;IACxB;;OAEG;IACH,wDAAuC,CAAA;IAEvC;;OAEG;IACH,8DAA6C,CAAA;IAE7C;;;;OAIG;IACH,kDAAiC,CAAA;IAEjC;;;;OAIG;IACH,8CAA6B,CAAA;IAE7B;;OAEG;IACH,oDAAmC,CAAA;IAEnC;;OAEG;IACH,oDAAmC,CAAA;IAEnC;;;;;;OAMG;IACH,gDAA+B,CAAA;IAE/B;;;OAGG;IACH,oDAAmC,CAAA;IAEnC;;OAEG;IACH,sDAAqC,CAAA;AACtC,CAAC,EAtDW,aAAa,6BAAb,aAAa,QAsDxB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport {\n\tDriverError,\n\tIDriverErrorBase,\n\tDriverErrorTypes,\n} from \"@fluidframework/driver-definitions\";\n\n/**\n * ODSP Error types.\n * Different error types that may be thrown by the ODSP driver.\n */\nexport const OdspErrorTypes = {\n\t// Inherit base driver error types\n\t...DriverErrorTypes,\n\n\t/**\n\t * Invalid file name (at creation of the file)\n\t */\n\tinvalidFileNameError: \"invalidFileNameError\",\n\n\t/**\n\t * Snapshot is too big. Host application specified limit for snapshot size, and snapshot was bigger\n\t * that that limit, thus request failed. Hosting application is expected to have fall-back behavior for\n\t * such case.\n\t */\n\tsnapshotTooBig: \"snapshotTooBig\",\n\n\t/**\n\t * Maximum time limit to fetch reached. Host application specified limit for fetching of snapshot, when\n\t * that limit is reached, request fails. Hosting application is expected to have fall-back behavior for\n\t * such case.\n\t */\n\tfetchTimeout: \"fetchTimeout\",\n\n\t/**\n\t * SPO admin toggle: fluid service is not enabled.\n\t */\n\tfluidNotEnabled: \"fluidNotEnabled\",\n\n\t/**\n\t * This error will be raised when client is too behind with no way to catch up.\n\t * This condition will happen when user was offline for too long, resulting in old ops / blobs being deleted\n\t * by storage, and thus removing an ability for client to catch up.\n\t * This condition will result in any local changes being lost (i.e. only way to save state is by user\n\t * copying it over manually)\n\t */\n\tcannotCatchUp: \"cannotCatchUp\",\n\n\t/**\n\t * SPO can occasionally return 403 for r/w operations on document when there is a fail over to another data center.\n\t * So to preserve integrity of the data, the data becomes readonly.\n\t */\n\tserviceReadOnly: \"serviceReadOnly\",\n\n\t/**\n\t * Due to organizational policies, you can't access server resources from the current network location.\n\t */\n\tblockedIPAddress: \"blockedIPAddress\",\n} as const;\nexport type OdspErrorTypes = (typeof OdspErrorTypes)[keyof typeof OdspErrorTypes];\n\n/**\n * ODSP Error types.\n * Different error types that may be thrown by the ODSP driver.\n *\n * @deprecated Use {@link (OdspErrorTypes:variable)} instead.\n */\nexport enum OdspErrorType {\n\t/**\n\t * Storage is out of space\n\t */\n\toutOfStorageError = \"outOfStorageError\",\n\n\t/**\n\t * Invalid file name (at creation of the file)\n\t */\n\tinvalidFileNameError = \"invalidFileNameError\",\n\n\t/**\n\t * Snapshot is too big. Host application specified limit for snapshot size, and snapshot was bigger\n\t * that that limit, thus request failed. Hosting application is expected to have fall-back behavior for\n\t * such case.\n\t */\n\tsnapshotTooBig = \"snapshotTooBig\",\n\n\t/**\n\t * Maximum time limit to fetch reached. Host application specified limit for fetching of snapshot, when\n\t * that limit is reached, request fails. Hosting application is expected to have fall-back behavior for\n\t * such case.\n\t */\n\tfetchTimeout = \"fetchTimeout\",\n\n\t/**\n\t * SPO admin toggle: fluid service is not enabled.\n\t */\n\tfluidNotEnabled = \"fluidNotEnabled\",\n\n\t/**\n\t * {@inheritDoc @fluidframework/driver-definitions#FluidErrorType.fetchTokenError}\n\t */\n\tfetchTokenError = \"fetchTokenError\",\n\n\t/**\n\t * This error will be raised when client is too behind with no way to catch up.\n\t * This condition will happen when user was offline for too long, resulting in old ops / blobs being deleted\n\t * by storage, and thus removing an ability for client to catch up.\n\t * This condition will result in any local changes being lost (i.e. only way to save state is by user\n\t * copying it over manually)\n\t */\n\tcannotCatchUp = \"cannotCatchUp\",\n\n\t/**\n\t * SPO can occasionally return 403 for r/w operations on document when there is a fail over to another data center.\n\t * So to preserve integrity of the data, the data becomes readonly.\n\t */\n\tserviceReadOnly = \"serviceReadOnly\",\n\n\t/**\n\t * Due to organizational policies, you can't access server resources from the current network location.\n\t */\n\tblockedIPAddress = \"blockedIPAddress\",\n}\n\nexport interface IOdspErrorAugmentations {\n\t/**\n\t * Server epoch indicates when the file was last modified.\n\t * Used to detect modifications outside Fluid's services\n\t */\n\tserverEpoch?: string;\n\n\t/**\n\t * It is the redirection url at which the network call should have been made. It is due to change\n\t * in site domain of the file on server.\n\t */\n\tredirectLocation?: string;\n\n\t/**\n\t * It is array of error codes included in error response from server.\n\t */\n\tfacetCodes?: string[];\n}\n\n/**\n * Base interface for all errors and warnings\n * Superset of IDriverErrorBase, but with Odsp-specific errorType and properties\n */\nexport interface IOdspError extends Omit<IDriverErrorBase, \"errorType\">, IOdspErrorAugmentations {\n\treadonly errorType: OdspErrorType;\n}\n\nexport type OdspError = IOdspError | (DriverError & IOdspErrorAugmentations);\n"]}