@fluidframework/driver-utils 2.0.0-dev.7.4.0.215747 → 2.0.0-dev.7.4.0.216897

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.
Files changed (146) hide show
  1. package/api-extractor-lint.json +13 -0
  2. package/api-report/driver-utils.api.md +47 -47
  3. package/dist/adapters/compression/compressionTypes.d.ts +2 -2
  4. package/dist/adapters/compression/compressionTypes.js +1 -1
  5. package/dist/adapters/compression/compressionTypes.js.map +1 -1
  6. package/dist/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.d.ts +1 -1
  7. package/dist/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.js +1 -1
  8. package/dist/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.js.map +1 -1
  9. package/dist/adapters/predefinedAdapters.d.ts +1 -1
  10. package/dist/adapters/predefinedAdapters.js +1 -1
  11. package/dist/adapters/predefinedAdapters.js.map +1 -1
  12. package/dist/blob.d.ts +3 -3
  13. package/dist/blob.js +3 -3
  14. package/dist/blob.js.map +1 -1
  15. package/dist/buildSnapshotTree.d.ts +1 -1
  16. package/dist/buildSnapshotTree.js +1 -1
  17. package/dist/buildSnapshotTree.js.map +1 -1
  18. package/dist/documentStorageServiceProxy.d.ts +1 -1
  19. package/dist/documentStorageServiceProxy.js +1 -1
  20. package/dist/documentStorageServiceProxy.js.map +1 -1
  21. package/dist/driver-utils-alpha.d.ts +131 -552
  22. package/dist/driver-utils-beta.d.ts +131 -552
  23. package/dist/driver-utils-public.d.ts +131 -552
  24. package/dist/driver-utils-untrimmed.d.ts +49 -49
  25. package/dist/error.d.ts +1 -1
  26. package/dist/error.js +1 -1
  27. package/dist/error.js.map +1 -1
  28. package/dist/insecureUrlResolver.d.ts +1 -1
  29. package/dist/insecureUrlResolver.js +1 -1
  30. package/dist/insecureUrlResolver.js.map +1 -1
  31. package/dist/messageRecognition.d.ts +3 -3
  32. package/dist/messageRecognition.js +3 -3
  33. package/dist/messageRecognition.js.map +1 -1
  34. package/dist/network.d.ts +19 -19
  35. package/dist/network.d.ts.map +1 -1
  36. package/dist/network.js +18 -18
  37. package/dist/network.js.map +1 -1
  38. package/dist/networkUtils.d.ts +1 -1
  39. package/dist/networkUtils.js +1 -1
  40. package/dist/networkUtils.js.map +1 -1
  41. package/dist/packageVersion.d.ts +1 -1
  42. package/dist/packageVersion.js +1 -1
  43. package/dist/packageVersion.js.map +1 -1
  44. package/dist/parallelRequests.d.ts +6 -6
  45. package/dist/parallelRequests.js +6 -6
  46. package/dist/parallelRequests.js.map +1 -1
  47. package/dist/prefetchDocumentStorageService.d.ts +1 -1
  48. package/dist/prefetchDocumentStorageService.js +1 -1
  49. package/dist/prefetchDocumentStorageService.js.map +1 -1
  50. package/dist/rateLimiter.d.ts +1 -1
  51. package/dist/rateLimiter.js +1 -1
  52. package/dist/rateLimiter.js.map +1 -1
  53. package/dist/readAndParse.d.ts +1 -1
  54. package/dist/readAndParse.js +1 -1
  55. package/dist/readAndParse.js.map +1 -1
  56. package/dist/runWithRetry.d.ts +3 -3
  57. package/dist/runWithRetry.js +2 -2
  58. package/dist/runWithRetry.js.map +1 -1
  59. package/dist/summaryForCreateNew.d.ts +2 -2
  60. package/dist/summaryForCreateNew.js +2 -2
  61. package/dist/summaryForCreateNew.js.map +1 -1
  62. package/dist/treeConversions.d.ts +1 -1
  63. package/dist/treeConversions.js +1 -1
  64. package/dist/treeConversions.js.map +1 -1
  65. package/lib/adapters/compression/compressionTypes.d.ts +2 -2
  66. package/lib/adapters/compression/compressionTypes.js +1 -1
  67. package/lib/adapters/compression/compressionTypes.js.map +1 -1
  68. package/lib/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.d.ts +1 -1
  69. package/lib/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.js +1 -1
  70. package/lib/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.js.map +1 -1
  71. package/lib/adapters/predefinedAdapters.d.ts +1 -1
  72. package/lib/adapters/predefinedAdapters.js +1 -1
  73. package/lib/adapters/predefinedAdapters.js.map +1 -1
  74. package/lib/blob.d.ts +3 -3
  75. package/lib/blob.js +3 -3
  76. package/lib/blob.js.map +1 -1
  77. package/lib/buildSnapshotTree.d.ts +1 -1
  78. package/lib/buildSnapshotTree.js +1 -1
  79. package/lib/buildSnapshotTree.js.map +1 -1
  80. package/lib/documentStorageServiceProxy.d.ts +1 -1
  81. package/lib/documentStorageServiceProxy.js +1 -1
  82. package/lib/documentStorageServiceProxy.js.map +1 -1
  83. package/lib/driver-utils-alpha.d.ts +131 -552
  84. package/lib/driver-utils-beta.d.ts +131 -552
  85. package/lib/driver-utils-public.d.ts +131 -552
  86. package/lib/driver-utils-untrimmed.d.ts +49 -49
  87. package/lib/error.d.ts +1 -1
  88. package/lib/error.js +1 -1
  89. package/lib/error.js.map +1 -1
  90. package/lib/insecureUrlResolver.d.ts +1 -1
  91. package/lib/insecureUrlResolver.js +1 -1
  92. package/lib/insecureUrlResolver.js.map +1 -1
  93. package/lib/messageRecognition.d.ts +3 -3
  94. package/lib/messageRecognition.js +3 -3
  95. package/lib/messageRecognition.js.map +1 -1
  96. package/lib/network.d.ts +19 -19
  97. package/lib/network.d.ts.map +1 -1
  98. package/lib/network.js +18 -18
  99. package/lib/network.js.map +1 -1
  100. package/lib/networkUtils.d.ts +1 -1
  101. package/lib/networkUtils.js +1 -1
  102. package/lib/networkUtils.js.map +1 -1
  103. package/lib/packageVersion.d.ts +1 -1
  104. package/lib/packageVersion.js +1 -1
  105. package/lib/packageVersion.js.map +1 -1
  106. package/lib/parallelRequests.d.ts +6 -6
  107. package/lib/parallelRequests.js +6 -6
  108. package/lib/parallelRequests.js.map +1 -1
  109. package/lib/prefetchDocumentStorageService.d.ts +1 -1
  110. package/lib/prefetchDocumentStorageService.js +1 -1
  111. package/lib/prefetchDocumentStorageService.js.map +1 -1
  112. package/lib/rateLimiter.d.ts +1 -1
  113. package/lib/rateLimiter.js +1 -1
  114. package/lib/rateLimiter.js.map +1 -1
  115. package/lib/readAndParse.d.ts +1 -1
  116. package/lib/readAndParse.js +1 -1
  117. package/lib/readAndParse.js.map +1 -1
  118. package/lib/runWithRetry.d.ts +3 -3
  119. package/lib/runWithRetry.js +2 -2
  120. package/lib/runWithRetry.js.map +1 -1
  121. package/lib/summaryForCreateNew.d.ts +2 -2
  122. package/lib/summaryForCreateNew.js +2 -2
  123. package/lib/summaryForCreateNew.js.map +1 -1
  124. package/lib/treeConversions.d.ts +1 -1
  125. package/lib/treeConversions.js +1 -1
  126. package/lib/treeConversions.js.map +1 -1
  127. package/package.json +9 -8
  128. package/src/adapters/compression/compressionTypes.ts +2 -2
  129. package/src/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.ts +1 -1
  130. package/src/adapters/predefinedAdapters.ts +1 -1
  131. package/src/blob.ts +3 -3
  132. package/src/buildSnapshotTree.ts +1 -1
  133. package/src/documentStorageServiceProxy.ts +1 -1
  134. package/src/error.ts +1 -1
  135. package/src/insecureUrlResolver.ts +1 -1
  136. package/src/messageRecognition.ts +3 -3
  137. package/src/network.ts +19 -19
  138. package/src/networkUtils.ts +1 -1
  139. package/src/packageVersion.ts +1 -1
  140. package/src/parallelRequests.ts +6 -6
  141. package/src/prefetchDocumentStorageService.ts +1 -1
  142. package/src/rateLimiter.ts +1 -1
  143. package/src/readAndParse.ts +1 -1
  144. package/src/runWithRetry.ts +3 -3
  145. package/src/summaryForCreateNew.ts +2 -2
  146. package/src/treeConversions.ts +1 -1
@@ -1,576 +1,155 @@
1
- import { FetchSource } from '@fluidframework/driver-definitions';
2
1
  import { IAttachment } from '@fluidframework/protocol-definitions';
3
- import { IAuthorizationError } from '@fluidframework/driver-definitions';
4
2
  import { IBlob } from '@fluidframework/protocol-definitions';
5
3
  import { ICommittedProposal } from '@fluidframework/protocol-definitions';
6
4
  import { ICreateBlobResponse } from '@fluidframework/protocol-definitions';
7
- import { IDeltasFetchResult } from '@fluidframework/driver-definitions';
8
5
  import { IDocumentAttributes } from '@fluidframework/protocol-definitions';
9
6
  import { IDocumentMessage } from '@fluidframework/protocol-definitions';
10
- import { IDocumentServiceFactory } from '@fluidframework/driver-definitions';
11
- import { IDocumentStorageService } from '@fluidframework/driver-definitions';
12
- import { IDocumentStorageServicePolicies } from '@fluidframework/driver-definitions';
13
- import { IDriverErrorBase } from '@fluidframework/driver-definitions';
14
- import { IFluidErrorBase } from '@fluidframework/telemetry-utils';
15
- import { ILocationRedirectionError } from '@fluidframework/driver-definitions';
16
- import { IRequest } from '@fluidframework/core-interfaces';
17
- import { IResolvedUrl } from '@fluidframework/driver-definitions';
18
7
  import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
19
8
  import { ISnapshotTree } from '@fluidframework/protocol-definitions';
20
- import { IStream } from '@fluidframework/driver-definitions';
21
- import { IStreamResult } from '@fluidframework/driver-definitions';
22
- import { ISummaryContext } from '@fluidframework/driver-definitions';
23
9
  import { ISummaryHandle } from '@fluidframework/protocol-definitions';
24
10
  import { ISummaryTree } from '@fluidframework/protocol-definitions';
25
- import { ITelemetryErrorEvent } from '@fluidframework/core-interfaces';
26
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
27
- import { ITelemetryProperties } from '@fluidframework/core-interfaces';
28
- import { IThrottlingWarning } from '@fluidframework/driver-definitions';
29
11
  import { ITree } from '@fluidframework/protocol-definitions';
30
12
  import { ITreeEntry } from '@fluidframework/protocol-definitions';
31
- import { IUrlResolver } from '@fluidframework/driver-definitions';
32
13
  import { IVersion } from '@fluidframework/protocol-definitions';
33
- import { LoaderCachingPolicy } from '@fluidframework/driver-definitions';
34
-
35
- /**
36
- * This method optionally applies compression to the given document service factory. The compression
37
- * must be enabled by setting the config to true or by passing a compression config object.
38
- * @param documentServiceFactory - The document service factory to apply compression to.
39
- * @param config - The compression configuration.
40
- * @returns The document service factory possibly with compression applied.
41
- * @public
42
- */
43
- export declare function applyStorageCompression(documentServiceFactory: IDocumentServiceFactory, config?: ICompressionStorageConfig | boolean): IDocumentServiceFactory;
44
-
45
- /**
46
- * Basic implementation of an attachment ITreeEntry
47
- * @public
48
- */
49
- export declare class AttachmentTreeEntry {
50
- readonly path: string;
51
- readonly id: string;
52
- readonly mode = FileMode.File;
53
- readonly type = TreeEntry.Attachment;
54
- readonly value: IAttachment;
55
- /**
56
- * Creates an attachment ITreeEntry
57
- * @param path - path of entry
58
- * @param id - id of external blob attachment
59
- */
60
- constructor(path: string, id: string);
61
- }
62
-
63
- /**
64
- * @public
65
- */
66
- export declare class AuthorizationError extends LoggingError implements IAuthorizationError, IFluidErrorBase {
67
- readonly claims: string | undefined;
68
- readonly tenantId: string | undefined;
69
- readonly errorType = DriverErrorType.authorizationError;
70
- readonly canRetry = false;
71
- constructor(message: string, claims: string | undefined, tenantId: string | undefined, props: DriverErrorTelemetryProps);
72
- }
73
-
74
- /**
75
- * @public
76
- */
77
- export declare const blobHeadersBlobName = ".metadata.blobHeaders";
78
-
79
- /**
80
- * Basic implementation of a blob ITreeEntry
81
- * @public
82
- */
83
- export declare class BlobTreeEntry {
84
- readonly path: string;
85
- readonly mode = FileMode.File;
86
- readonly type = TreeEntry.Blob;
87
- readonly value: IBlob;
88
- /**
89
- * Creates a blob ITreeEntry
90
- * @param path - path of entry
91
- * @param contents - blob contents
92
- * @param encoding - encoding of contents; defaults to utf-8
93
- */
94
- constructor(path: string, contents: string, encoding?: "utf-8" | "base64");
95
- }
96
-
97
- /**
98
- * Build a tree hierarchy base on an array of ITreeEntry
99
- *
100
- * @param entries - an array of ITreeEntry to flatten
101
- * @param blobMap - a map of blob's sha1 to content that gets filled with content from entries
102
- * NOTE: blobMap's validity is contingent on the returned promise's resolution
103
- * @returns the hierarchical tree
104
- * @public
105
- */
106
- export declare function buildSnapshotTree(entries: ITreeEntry[], blobMap: Map<string, ArrayBufferLike>): ISnapshotTree;
107
-
108
- /**
109
- * Calculates time to wait for after an error based on the error and wait time for previous iteration.
110
- * In case endpoint(service or socket) is not reachable, then we maybe offline or may have got some
111
- * transient error not related to endpoint, in that case we want to try at faster pace and hence the
112
- * max wait is lesser 8s as compared to when endpoint is reachable in which case it is 60s.
113
- * @param delayMs - wait time for previous iteration
114
- * @param error - error based on which we decide wait time.
115
- * @returns Wait time to wait for.
116
- * @public
117
- */
118
- export declare function calculateMaxWaitTime(delayMs: number, error: unknown): number;
119
-
120
- /**
121
- * @privateRemarks ADO #1385: To be moved to packages/protocol-base/src/protocol.ts
122
- * @public
123
- */
124
- export declare function canBeCoalescedByService(message: ISequencedDocumentMessage | IDocumentMessage): boolean;
125
-
126
- /**
127
- * Check if a connection error can be retried. Unless explicitly allowed, retry is disallowed.
128
- * I.e. asserts or unexpected exceptions in our code result in container failure.
129
- * @param error - The error to inspect for ability to retry
130
- * @public
131
- */
132
- export declare const canRetryOnError: (error: any) => boolean;
14
+
15
+ /* Excluded from this release type: applyStorageCompression */
16
+
17
+ /* Excluded from this release type: AttachmentTreeEntry */
18
+
19
+ /* Excluded from this release type: AuthorizationError */
20
+
21
+ /* Excluded from this release type: blobHeadersBlobName */
22
+
23
+ /* Excluded from this release type: BlobTreeEntry */
24
+
25
+ /* Excluded from this release type: buildSnapshotTree */
26
+
27
+ /* Excluded from this release type: calculateMaxWaitTime */
28
+
29
+ /* Excluded from this release type: canBeCoalescedByService */
30
+
31
+ /* Excluded from this release type: canRetryOnError */
133
32
 
134
33
  /* Excluded from this release type: CombinedAppAndProtocolSummary */
135
34
 
136
- /**
137
- * Converts ISummaryTree to ITree format.
138
- * @param summaryTree - summary tree in ISummaryTree format
139
- * @public
140
- */
141
- export declare function convertSummaryTreeToSnapshotITree(summaryTree: ISummaryTree): ITree;
142
-
143
- /**
144
- * @public
145
- */
146
- export declare function createGenericNetworkError(message: string, retryInfo: {
147
- canRetry: boolean;
148
- retryAfterMs?: number;
149
- }, props: DriverErrorTelemetryProps): ThrottlingError | GenericNetworkError;
150
-
151
- /**
152
- * @public
153
- */
154
- export declare const createWriteError: (message: string, props: DriverErrorTelemetryProps) => NonRetryableError<"writeError">;
155
-
156
- /**
157
- * @public
158
- */
159
- export declare class DeltaStreamConnectionForbiddenError extends LoggingError implements IDriverErrorBase, IFluidErrorBase {
160
- static readonly errorType = DriverErrorType.deltaStreamConnectionForbidden;
161
- readonly errorType = DriverErrorType.deltaStreamConnectionForbidden;
162
- readonly canRetry = false;
163
- readonly storageOnlyReason: string | undefined;
164
- constructor(message: string, props: DriverErrorTelemetryProps, storageOnlyReason?: string);
165
- }
166
-
167
- /**
168
- * @public
169
- */
170
- export declare class DocumentStorageServiceProxy implements IDocumentStorageService {
171
- protected readonly internalStorageService: IDocumentStorageService;
172
- private _policies;
173
- set policies(policies: IDocumentStorageServicePolicies | undefined);
174
- get policies(): IDocumentStorageServicePolicies | undefined;
175
- get repositoryUrl(): string;
176
- constructor(internalStorageService: IDocumentStorageService);
177
- getSnapshotTree(version?: IVersion, scenarioName?: string): Promise<ISnapshotTree | null>;
178
- getVersions(versionId: string | null, count: number, scenarioName?: string, fetchSource?: FetchSource): Promise<IVersion[]>;
179
- uploadSummaryWithContext(summary: ISummaryTree, context: ISummaryContext): Promise<string>;
180
- downloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;
181
- createBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse>;
182
- readBlob(blobId: string): Promise<ArrayBufferLike>;
183
- }
184
-
185
- /**
186
- * Telemetry props with driver-specific required properties
187
- * @public
188
- */
189
- export declare type DriverErrorTelemetryProps = ITelemetryProperties & {
190
- driverVersion: string | undefined;
191
- };
192
-
193
- /**
194
- * @public
195
- */
196
- export declare const emptyMessageStream: IStream<ISequencedDocumentMessage[]>;
197
-
198
- /**
199
- * FluidInvalidSchema error class.
200
- * @public
201
- */
202
- export declare class FluidInvalidSchemaError extends LoggingError implements IDriverErrorBase, IFluidErrorBase {
203
- readonly errorType = DriverErrorType.fluidInvalidSchema;
204
- readonly canRetry = false;
205
- constructor(message: string, props: DriverErrorTelemetryProps);
206
- }
207
-
208
- /**
209
- * Generic network error class.
210
- * @public
211
- */
212
- export declare class GenericNetworkError extends LoggingError implements IDriverErrorBase, IFluidErrorBase {
213
- readonly canRetry: boolean;
214
- readonly errorType = DriverErrorType.genericNetworkError;
215
- constructor(message: string, canRetry: boolean, props: DriverErrorTelemetryProps);
216
- }
217
-
218
- /**
219
- * Extract the attributes from the protocol summary.
220
- * @param protocolSummary - protocol summary from which the values are to be extracted.
221
- * @public
222
- */
223
- export declare function getDocAttributesFromProtocolSummary(protocolSummary: ISummaryTree): IDocumentAttributes;
224
-
225
- /**
226
- * Extract quorum values from the protocol summary.
227
- * @param protocolSummary - protocol summary from which the values are to be extracted.
228
- * @public
229
- */
230
- export declare function getQuorumValuesFromProtocolSummary(protocolSummary: ISummaryTree): [string, ICommittedProposal][];
231
-
232
- /**
233
- * Check retryAfterSeconds property on error and convert to ms
234
- * @public
235
- * */
236
- export declare const getRetryDelayFromError: (error: any) => number | undefined;
237
-
238
- /**
239
- * Check retryAfterSeconds property on error
240
- * @public
241
- * */
242
- export declare const getRetryDelaySecondsFromError: (error: any) => number | undefined;
243
-
244
- /**
245
- * @public
246
- */
247
- export declare interface ICompressionStorageConfig {
248
- algorithm: SummaryCompressionAlgorithm;
249
- minSizeToCompress: number;
250
- }
251
-
252
- /**
253
- * As the name implies this is not secure and should not be used in production. It simply makes the example easier
254
- * to get up and running.
255
- *
256
- * In our example we run a simple web server via webpack-dev-server. This defines a URL format of the form
257
- * http://localhost:8080/<documentId>/<path>.
258
- *
259
- * We then need to map that to a Fluid based URL. These are of the form
260
- * fluid://orderingUrl/<tenantId>/<documentId>/<path>.
261
- *
262
- * The tenantId/documentId pair defines the 'full' document ID the service makes use of. The path is then an optional
263
- * part of the URL that the document interprets and maps to a data store. It's exactly similar to how a web service
264
- * works or a router inside of a single page app framework.
265
- * @public
266
- */
267
- export declare class InsecureUrlResolver implements IUrlResolver {
268
- private readonly hostUrl;
269
- private readonly ordererUrl;
270
- private readonly storageUrl;
271
- private readonly tenantId;
272
- private readonly bearer;
273
- private readonly isForNodeTest;
274
- private readonly cache;
275
- constructor(hostUrl: string, ordererUrl: string, storageUrl: string, tenantId: string, bearer: string, isForNodeTest?: boolean);
276
- resolve(request: IRequest): Promise<IResolvedUrl | undefined>;
277
- private resolveHelper;
278
- getAbsoluteUrl(resolvedUrl: IResolvedUrl, relativeUrl: string): Promise<string>;
279
- createCreateNewRequest(fileName?: string): IRequest;
280
- }
281
-
282
- /**
283
- * Interface describing an object passed to various network APIs.
284
- * It allows caller to control cancellation, as well as learn about any delays.
285
- * @public
286
- */
287
- export declare interface IProgress {
288
- /**
289
- * Abort signal used to cancel operation.
290
- *
291
- * @remarks Note that most of the layers do not use this signal yet. We need to change that over time.
292
- * Please consult with API documentation / implementation.
293
- * Note that number of layers may not check this signal while holding this request in a queue,
294
- * so it may take a while it takes effect. This can be improved in the future.
295
- *
296
- * The layers in question are:
297
- *
298
- * - driver (RateLimiter)
299
- *
300
- * - runWithRetry
301
- */
302
- cancel?: AbortSignal;
303
- /**
304
- * Called whenever api returns cancellable error and the call is going to be retried.
305
- * Any exception thrown from this call back result in cancellation of operation
306
- * and propagation of thrown exception.
307
- * @param delayInMs - delay before next retry. This value will depend on internal back-off logic,
308
- * as well as information provided by service (like 429 error asking to wait for some time before retry)
309
- * @param error - error object returned from the call.
310
- */
311
- onRetry?(delayInMs: number, error: any): void;
312
- }
35
+ /* Excluded from this release type: convertSummaryTreeToSnapshotITree */
36
+
37
+ /* Excluded from this release type: createGenericNetworkError */
38
+
39
+ /* Excluded from this release type: createWriteError */
40
+
41
+ /* Excluded from this release type: DeltaStreamConnectionForbiddenError */
42
+
43
+ /* Excluded from this release type: DocumentStorageServiceProxy */
44
+
45
+ /* Excluded from this release type: DriverErrorTelemetryProps */
46
+
47
+ /* Excluded from this release type: emptyMessageStream */
48
+
49
+ /* Excluded from this release type: FetchSource */
50
+
51
+ /* Excluded from this release type: FluidInvalidSchemaError */
52
+
53
+ /* Excluded from this release type: GenericNetworkError */
54
+
55
+ /* Excluded from this release type: getDocAttributesFromProtocolSummary */
56
+
57
+ /* Excluded from this release type: getQuorumValuesFromProtocolSummary */
58
+
59
+ /* Excluded from this release type: getRetryDelayFromError */
60
+
61
+ /* Excluded from this release type: getRetryDelaySecondsFromError */
62
+
63
+ /* Excluded from this release type: IAuthorizationError */
64
+
65
+ /* Excluded from this release type: ICompressionStorageConfig */
66
+
67
+ /* Excluded from this release type: IDeltasFetchResult */
68
+
69
+ /* Excluded from this release type: IDocumentServiceFactory */
70
+
71
+ /* Excluded from this release type: IDocumentStorageService */
72
+
73
+ /* Excluded from this release type: IDocumentStorageServicePolicies */
74
+
75
+ /* Excluded from this release type: IDriverErrorBase */
76
+
77
+ /* Excluded from this release type: IFluidErrorBase */
78
+
79
+ /* Excluded from this release type: ILocationRedirectionError */
80
+
81
+ /* Excluded from this release type: InsecureUrlResolver */
82
+
83
+ /* Excluded from this release type: IProgress */
84
+
85
+ /* Excluded from this release type: IRequest */
86
+
87
+ /* Excluded from this release type: IResolvedUrl */
313
88
 
314
89
  /* Excluded from this release type: isCombinedAppAndProtocolSummary */
315
90
 
316
- /**
317
- * It tells if we have local connection only - we might not have connection to web.
318
- * No solution for node.js (other than resolve dns names / ping specific sites)
319
- * Can also use window.addEventListener("online" / "offline")
320
- * @public
321
- */
322
- export declare function isOnline(): OnlineStatus;
323
-
324
- /**
325
- * Tells if message was sent by container runtime
326
- * @privateRemarks ADO #1385: To be moved to container-definitions
327
- * @returns whether the message is a runtime message
328
- * @public
329
- */
330
- export declare function isRuntimeMessage(message: {
331
- type: string;
332
- }): boolean;
333
-
334
- /**
335
- * @public
336
- */
337
- export declare class LocationRedirectionError extends LoggingError implements ILocationRedirectionError, IFluidErrorBase {
338
- readonly redirectUrl: IResolvedUrl;
339
- readonly errorType = DriverErrorType.locationRedirection;
340
- readonly canRetry = false;
341
- constructor(message: string, redirectUrl: IResolvedUrl, props: DriverErrorTelemetryProps);
342
- }
91
+ /* Excluded from this release type: isOnline */
92
+
93
+ /* Excluded from this release type: isRuntimeMessage */
94
+
95
+ /* Excluded from this release type: IStream */
96
+
97
+ /* Excluded from this release type: IStreamResult */
98
+
99
+ /* Excluded from this release type: ISummaryContext */
100
+
101
+ /* Excluded from this release type: ITelemetryErrorEvent */
102
+
103
+ /* Excluded from this release type: ITelemetryLoggerExt */
104
+
105
+ /* Excluded from this release type: ITelemetryProperties */
106
+
107
+ /* Excluded from this release type: IThrottlingWarning */
108
+
109
+ /* Excluded from this release type: IUrlResolver */
110
+
111
+ /* Excluded from this release type: LoaderCachingPolicy */
112
+
113
+ /* Excluded from this release type: LocationRedirectionError */
343
114
 
344
115
  /* Excluded from this release type: LoggingError */
345
116
 
346
- /**
347
- * @public
348
- */
349
- export declare function logNetworkFailure(logger: ITelemetryLoggerExt, event: ITelemetryErrorEvent, error?: any): void;
350
-
351
- /**
352
- * @privateRemarks ADO #1385: staging code changes across layers.
353
- * Eventually to be replaced by MessageType.accept
354
- * @public
355
- */
356
- export declare enum MessageType2 {
357
- Accept = "accept"
358
- }
359
-
360
- /**
361
- * @public
362
- */
363
- export declare class NetworkErrorBasic<T extends string> extends LoggingError implements IFluidErrorBase {
364
- readonly errorType: T;
365
- readonly canRetry: boolean;
366
- constructor(message: string, errorType: T, canRetry: boolean, props: DriverErrorTelemetryProps);
367
- }
368
-
369
- /**
370
- * @public
371
- */
372
- export declare class NonRetryableError<T extends string> extends NetworkErrorBasic<T> {
373
- readonly errorType: T;
374
- constructor(message: string, errorType: T, props: DriverErrorTelemetryProps);
375
- }
376
-
377
- /**
378
- * @public
379
- */
380
- export declare enum OnlineStatus {
381
- Offline = 0,
382
- Online = 1,
383
- Unknown = 2
384
- }
385
-
386
- /**
387
- * Helper class to organize parallel fetching of data
388
- * It can be used to concurrently do many requests, while consuming
389
- * data in the right order. Take a look at UT for examples.
390
- * @param concurrency - level of concurrency
391
- * @param from - starting point of fetching data (inclusive)
392
- * @param to - ending point of fetching data. exclusive, or undefined if unknown
393
- * @param payloadSize - batch size
394
- * @param logger - logger to use
395
- * @param requestCallback - callback to request batches
396
- * @returns Queue that can be used to retrieve data
397
- * @public
398
- */
399
- export declare class ParallelRequests<T> {
400
- private to;
401
- private readonly payloadSize;
402
- private readonly logger;
403
- private readonly requestCallback;
404
- private readonly responseCallback;
405
- private latestRequested;
406
- private nextToDeliver;
407
- private readonly results;
408
- private workingState;
409
- private requestsInFlight;
410
- private readonly endEvent;
411
- private requests;
412
- private readonly knewTo;
413
- private get working();
414
- get canceled(): boolean;
415
- constructor(from: number, to: number | undefined, payloadSize: number, logger: ITelemetryLoggerExt, requestCallback: (request: number, from: number, to: number, strongTo: boolean, props: ITelemetryProperties) => Promise<{
416
- partial: boolean;
417
- cancel: boolean;
418
- payload: T[];
419
- }>, responseCallback: (payload: T[]) => void);
420
- cancel(): void;
421
- run(concurrency: number): Promise<void>;
422
- private done;
423
- private fail;
424
- private dispatch;
425
- private getNextChunk;
426
- private addRequest;
427
- private addRequestCore;
428
- }
429
-
430
- /**
431
- * @public
432
- */
433
- export declare class PrefetchDocumentStorageService extends DocumentStorageServiceProxy {
434
- private readonly prefetchCache;
435
- private prefetchEnabled;
436
- get policies(): {
437
- caching: LoaderCachingPolicy;
438
- maximumCacheDurationMs?: 432000000 | undefined;
439
- } | undefined;
440
- getSnapshotTree(version?: IVersion): Promise<ISnapshotTree | null>;
441
- readBlob(blobId: string): Promise<ArrayBufferLike>;
442
- stopPrefetch(): void;
443
- private cachedRead;
444
- private prefetchTree;
445
- private prefetchTreeCore;
446
- }
447
-
448
- /**
449
- * Helper queue class to allow async push / pull
450
- * It's essentially a pipe allowing multiple writers, and single reader
451
- * @public
452
- */
453
- export declare class Queue<T> implements IStream<T> {
454
- private readonly queue;
455
- private deferred;
456
- private done;
457
- pushValue(value: T): void;
458
- pushError(error: any): void;
459
- pushDone(): void;
460
- protected pushCore(value: Promise<IStreamResult<T>>): void;
461
- read(): Promise<IStreamResult<T>>;
462
- }
463
-
464
- /**
465
- * @public
466
- */
467
- export declare class RateLimiter {
468
- private maxRequests;
469
- private readonly tasks;
470
- constructor(maxRequests: number);
471
- get waitQueueLength(): number;
472
- protected readonly release: () => void;
473
- protected acquire(): Promise<void>;
474
- schedule<T>(work: () => Promise<T>): Promise<T>;
475
- }
476
-
477
- /**
478
- * Read a blob from {@link @fluidframework/driver-definitions#IDocumentStorageService} and
479
- * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse | JSON.parse}
480
- * it into object of type `T`.
481
- *
482
- * @param storage - The `DocumentStorageService` to read from.
483
- * @param id - The ID of the blob to read and parse.
484
- *
485
- * @typeParam T - Output type matching JSON format of inpyt blob data.
486
- *
487
- * @returns The object that we decoded and parsed via `JSON.parse`.
488
- * @public
489
- */
490
- export declare function readAndParse<T>(storage: Pick<IDocumentStorageService, "readBlob">, id: string): Promise<T>;
491
-
492
- /**
493
- * Request ops from storage
494
- * @param get - Getter callback to get individual batches
495
- * @param concurrency - Number of concurrent requests to make
496
- * @param fromTotal - starting sequence number to fetch (inclusive)
497
- * @param toTotal - max (exclusive) sequence number to fetch
498
- * @param payloadSize - Payload size
499
- * @param logger - Logger to log progress and errors
500
- * @param signal - Cancelation signal
501
- * @param scenarioName - Reason for fetching ops
502
- * @returns Messages fetched
503
- * @public
504
- */
505
- export declare function requestOps(get: (from: number, to: number, telemetryProps: ITelemetryProperties) => Promise<IDeltasFetchResult>, concurrency: number, fromTotal: number, toTotal: number | undefined, payloadSize: number, logger: ITelemetryLoggerExt, signal?: AbortSignal, scenarioName?: string): IStream<ISequencedDocumentMessage[]>;
506
-
507
- /**
508
- * @public
509
- */
510
- export declare class RetryableError<T extends string> extends NetworkErrorBasic<T> {
511
- readonly errorType: T;
512
- constructor(message: string, errorType: T, props: DriverErrorTelemetryProps);
513
- }
514
-
515
- /**
516
- * @public
517
- */
518
- export declare function runWithRetry<T>(api: (cancel?: AbortSignal) => Promise<T>, fetchCallName: string, logger: ITelemetryLoggerExt, progress: IProgress): Promise<T>;
519
-
520
- /**
521
- * @public
522
- */
523
- export declare function streamFromMessages(messagesArg: Promise<ISequencedDocumentMessage[]>): IStream<ISequencedDocumentMessage[]>;
524
-
525
- /**
526
- * @public
527
- */
528
- export declare function streamObserver<T>(stream: IStream<T>, handler: (value: IStreamResult<T>) => void): IStream<T>;
529
-
530
- /**
531
- * @public
532
- */
533
- export declare enum SummaryCompressionAlgorithm {
534
- None = 0,
535
- LZ4 = 1
536
- }
537
-
538
- /**
539
- * Throttling error class - used to communicate all throttling errors
540
- * @public
541
- */
542
- export declare class ThrottlingError extends LoggingError implements IThrottlingWarning, IFluidErrorBase {
543
- readonly retryAfterSeconds: number;
544
- readonly errorType = DriverErrorType.throttlingError;
545
- readonly canRetry = true;
546
- constructor(message: string, retryAfterSeconds: number, props: DriverErrorTelemetryProps);
547
- }
548
-
549
- /**
550
- * Basic implementation of a tree ITreeEntry
551
- * @public
552
- */
553
- export declare class TreeTreeEntry {
554
- readonly path: string;
555
- readonly value: ITree;
556
- readonly mode = FileMode.Directory;
557
- readonly type = TreeEntry.Tree;
558
- /**
559
- * Creates a tree ITreeEntry
560
- * @param path - path of entry
561
- * @param value - subtree
562
- */
563
- constructor(path: string, value: ITree);
564
- }
565
-
566
- /**
567
- * Error indicating an API is being used improperly resulting in an invalid operation.
568
- * @public
569
- */
570
- export declare class UsageError extends LoggingError implements IDriverErrorBase, IFluidErrorBase {
571
- readonly errorType = DriverErrorType.usageError;
572
- readonly canRetry = false;
573
- constructor(message: string);
574
- }
117
+ /* Excluded from this release type: logNetworkFailure */
118
+
119
+ /* Excluded from this release type: MessageType2 */
120
+
121
+ /* Excluded from this release type: NetworkErrorBasic */
122
+
123
+ /* Excluded from this release type: NonRetryableError */
124
+
125
+ /* Excluded from this release type: OnlineStatus */
126
+
127
+ /* Excluded from this release type: ParallelRequests */
128
+
129
+ /* Excluded from this release type: PrefetchDocumentStorageService */
130
+
131
+ /* Excluded from this release type: Queue */
132
+
133
+ /* Excluded from this release type: RateLimiter */
134
+
135
+ /* Excluded from this release type: readAndParse */
136
+
137
+ /* Excluded from this release type: requestOps */
138
+
139
+ /* Excluded from this release type: RetryableError */
140
+
141
+ /* Excluded from this release type: runWithRetry */
142
+
143
+ /* Excluded from this release type: streamFromMessages */
144
+
145
+ /* Excluded from this release type: streamObserver */
146
+
147
+ /* Excluded from this release type: SummaryCompressionAlgorithm */
148
+
149
+ /* Excluded from this release type: ThrottlingError */
150
+
151
+ /* Excluded from this release type: TreeTreeEntry */
152
+
153
+ /* Excluded from this release type: UsageError */
575
154
 
576
155
  export { }