@fluidframework/core-interfaces 2.0.0-internal.7.3.0 → 2.0.0-internal.8.0.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.
Files changed (110) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/Removing-IFluidRouter.md +22 -17
  3. package/api-extractor-lint.json +13 -0
  4. package/api-extractor.json +3 -6
  5. package/api-report/core-interfaces.api.md +66 -73
  6. package/dist/config.d.ts +35 -0
  7. package/dist/config.d.ts.map +1 -0
  8. package/dist/config.js +7 -0
  9. package/dist/config.js.map +1 -0
  10. package/dist/core-interfaces-alpha.d.ts +101 -249
  11. package/dist/core-interfaces-beta.d.ts +105 -905
  12. package/dist/core-interfaces-public.d.ts +105 -905
  13. package/dist/core-interfaces-untrimmed.d.ts +112 -18
  14. package/dist/disposable.d.ts +1 -0
  15. package/dist/disposable.d.ts.map +1 -1
  16. package/dist/disposable.js.map +1 -1
  17. package/dist/error.d.ts +9 -0
  18. package/dist/error.d.ts.map +1 -1
  19. package/dist/error.js +1 -0
  20. package/dist/error.js.map +1 -1
  21. package/dist/events.d.ts +8 -1
  22. package/dist/events.d.ts.map +1 -1
  23. package/dist/events.js.map +1 -1
  24. package/dist/fluidLoadable.d.ts +16 -0
  25. package/dist/fluidLoadable.d.ts.map +1 -1
  26. package/dist/fluidLoadable.js +6 -0
  27. package/dist/fluidLoadable.js.map +1 -1
  28. package/dist/fluidPackage.d.ts +9 -0
  29. package/dist/fluidPackage.d.ts.map +1 -1
  30. package/dist/fluidPackage.js +3 -0
  31. package/dist/fluidPackage.js.map +1 -1
  32. package/dist/fluidRouter.d.ts +9 -17
  33. package/dist/fluidRouter.d.ts.map +1 -1
  34. package/dist/fluidRouter.js +0 -5
  35. package/dist/fluidRouter.js.map +1 -1
  36. package/dist/handles.d.ts +14 -0
  37. package/dist/handles.d.ts.map +1 -1
  38. package/dist/handles.js +6 -0
  39. package/dist/handles.js.map +1 -1
  40. package/dist/index.d.ts +2 -1
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +1 -6
  43. package/dist/index.js.map +1 -1
  44. package/dist/logger.d.ts +16 -0
  45. package/dist/logger.d.ts.map +1 -1
  46. package/dist/logger.js +1 -0
  47. package/dist/logger.js.map +1 -1
  48. package/dist/provider.d.ts +3 -2
  49. package/dist/provider.d.ts.map +1 -1
  50. package/dist/provider.js.map +1 -1
  51. package/lib/config.d.ts +35 -0
  52. package/lib/config.d.ts.map +1 -0
  53. package/lib/config.js +7 -0
  54. package/lib/config.js.map +1 -0
  55. package/lib/core-interfaces-alpha.d.ts +101 -249
  56. package/lib/core-interfaces-beta.d.ts +105 -905
  57. package/lib/core-interfaces-public.d.ts +105 -905
  58. package/lib/core-interfaces-untrimmed.d.ts +112 -18
  59. package/lib/disposable.d.ts +1 -0
  60. package/lib/disposable.d.ts.map +1 -1
  61. package/lib/disposable.js +2 -1
  62. package/lib/disposable.js.map +1 -1
  63. package/lib/error.d.ts +9 -0
  64. package/lib/error.d.ts.map +1 -1
  65. package/lib/error.js +5 -1
  66. package/lib/error.js.map +1 -1
  67. package/lib/events.d.ts +8 -1
  68. package/lib/events.d.ts.map +1 -1
  69. package/lib/events.js +2 -1
  70. package/lib/events.js.map +1 -1
  71. package/lib/fluidLoadable.d.ts +16 -0
  72. package/lib/fluidLoadable.d.ts.map +1 -1
  73. package/lib/fluidLoadable.js +11 -2
  74. package/lib/fluidLoadable.js.map +1 -1
  75. package/lib/fluidPackage.d.ts +9 -0
  76. package/lib/fluidPackage.d.ts.map +1 -1
  77. package/lib/fluidPackage.js +12 -4
  78. package/lib/fluidPackage.js.map +1 -1
  79. package/lib/fluidRouter.d.ts +9 -17
  80. package/lib/fluidRouter.d.ts.map +1 -1
  81. package/lib/fluidRouter.js +2 -4
  82. package/lib/fluidRouter.js.map +1 -1
  83. package/lib/handles.d.ts +14 -0
  84. package/lib/handles.d.ts.map +1 -1
  85. package/lib/handles.js +11 -2
  86. package/lib/handles.js.map +1 -1
  87. package/lib/index.d.ts +2 -1
  88. package/lib/index.d.ts.map +1 -1
  89. package/lib/index.js +17 -9
  90. package/lib/index.js.map +1 -1
  91. package/lib/logger.d.ts +16 -0
  92. package/lib/logger.d.ts.map +1 -1
  93. package/lib/logger.js +5 -1
  94. package/lib/logger.js.map +1 -1
  95. package/lib/provider.d.ts +3 -2
  96. package/lib/provider.d.ts.map +1 -1
  97. package/lib/provider.js +2 -1
  98. package/lib/provider.js.map +1 -1
  99. package/package.json +22 -6
  100. package/src/config.ts +36 -0
  101. package/src/disposable.ts +1 -0
  102. package/src/error.ts +9 -0
  103. package/src/events.ts +8 -1
  104. package/src/fluidLoadable.ts +16 -0
  105. package/src/fluidPackage.ts +9 -0
  106. package/src/fluidRouter.ts +9 -20
  107. package/src/handles.ts +14 -0
  108. package/src/index.ts +2 -7
  109. package/src/logger.ts +16 -0
  110. package/src/provider.ts +3 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @fluidframework/core-interfaces
2
2
 
3
+ ## 2.0.0-internal.8.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - container-runtime-definitions: Removed getRootDataStore [9a451d4946](https://github.com/microsoft/FluidFramework/commits/9a451d4946b5c51a52e4d1ab5bf51e7b285b0d74)
8
+
9
+ The `getRootDataStore` method has been removed from `IContainerRuntime` and `ContainerRuntime`. Please migrate all usage to the new `getAliasedDataStoreEntryPoint` method. This method returns the data store's entry point which is its `IFluidHandle`.
10
+
11
+ See [Removing-IFluidRouter.md](https://github.com/microsoft/FluidFramework/blob/main/packages/common/core-interfaces/Removing-IFluidRouter.md) for more details.
12
+
13
+ - core-interfaces: Removed IFluidRouter and IProvideFluidRouter [9a451d4946](https://github.com/microsoft/FluidFramework/commits/9a451d4946b5c51a52e4d1ab5bf51e7b285b0d74)
14
+
15
+ The `IFluidRouter` and `IProvideFluidRouter` interfaces have been removed. Please migrate all usage to the new `entryPoint` pattern.
16
+
17
+ See [Removing-IFluidRouter.md](https://github.com/microsoft/FluidFramework/blob/main/packages/common/core-interfaces/Removing-IFluidRouter.md) for more details.
18
+
19
+ ## 2.0.0-internal.7.4.0
20
+
21
+ ### Minor Changes
22
+
23
+ - telemetry-utils: Deprecate ConfigTypes and IConfigProviderBase ([#18597](https://github.com/microsoft/FluidFramework/issues/18597)) [39b9ff57c0](https://github.com/microsoft/FluidFramework/commits/39b9ff57c0184b72f0e3f9425922dda944995265)
24
+
25
+ The types `ConfigTypes` and `IConfigProviderBase` have been deprecated in the @fluidframework/telemetry-utils package.
26
+ The types can now be found in the @fluidframework/core-interfaces package. Please replace any uses with the types from
27
+ @fluidframework/core-interfaces.
28
+
3
29
  ## 2.0.0-internal.7.3.0
4
30
 
5
31
  Dependency updates only.
@@ -97,23 +97,28 @@ const entryPoint = await container.getEntryPoint();
97
97
  <!-- prettier-ignore-start -->
98
98
  | API | Deprecated in | Removed in |
99
99
  | -------------------------------------------------------------------------------------------- | -------------------- | -------------------- |
100
- | `IContainer.request` (except calling with "/") | 2.0.0-internal.6.0.0 | |
101
- | `IDataStore.request` (except calling with "/") | 2.0.0-internal.6.0.0 | |
102
- | `IContainer.IFluidRouter` | 2.0.0-internal.6.0.0 | |
103
- | `IDataStore.IFluidRouter` | 2.0.0-internal.6.0.0 | |
104
- | `request` and `IFluidRouter` on `ILoader` and `Loader` | 2.0.0-internal.6.0.0 | |
105
- | `request` and `IFluidRouter` on `IRuntime` and `ContainerRuntime` | 2.0.0-internal.6.0.0 | |
106
- | `request` and `IFluidRouter` on `IFluidDataStoreRuntime` and `FluidDataStoreRuntime` | 2.0.0-internal.6.0.0 | |
107
- | `request` and `IFluidRouter` on `IFluidDataStoreChannel` | 2.0.0-internal.6.0.0 | |
108
- | `getRootDataStore` on `IContainerRuntime` and `ContainerRuntime` | 2.0.0-internal.6.0.0 | |
109
- | `resolveHandle` on `IContainerRuntime` | 2.0.0-internal.7.0.0 | |
110
- | `IFluidHandleContext` on `IContainerRuntimeBase` | 2.0.0-internal.7.0.0 | |
100
+ | `IContainer.request` (except calling with "/") | 2.0.0-internal.6.0.0 | 2.0.0-internal.8.0.0 |
101
+ | `IDataStore.request` (except calling with "/") | 2.0.0-internal.6.0.0 | 2.0.0-internal.8.0.0 |
102
+ | `IContainer.IFluidRouter` | 2.0.0-internal.6.0.0 | 2.0.0-internal.8.0.0 |
103
+ | `IDataStore.IFluidRouter` | 2.0.0-internal.6.0.0 | 2.0.0-internal.8.0.0 |
104
+ | `request` and `IFluidRouter` on `ILoader` and `Loader` | 2.0.0-internal.6.0.0 | 2.0.0-internal.8.0.0 |
105
+ | `request` and `IFluidRouter` on `IRuntime` and `ContainerRuntime` | 2.0.0-internal.6.0.0 | 2.0.0-internal.8.0.0 |
106
+ | `request` and `IFluidRouter` on `IFluidDataStoreRuntime` | 2.0.0-internal.6.0.0 | 2.0.0-internal.8.0.0 |
107
+ | `IFluidRouter` on `IFluidDataStoreChannel` and `FluidDataStoreRuntime` | 2.0.0-internal.6.0.0 | 2.0.0-internal.8.0.0 |
108
+ | `getRootDataStore` on `IContainerRuntime` and `ContainerRuntime` | 2.0.0-internal.6.0.0 | 2.0.0-internal.8.0.0 |
109
+ | `resolveHandle` on `IContainerRuntime` | 2.0.0-internal.7.0.0 | 2.0.0-internal.8.0.0 |
110
+ | `IFluidHandleContext` on `IContainerRuntimeBase` | 2.0.0-internal.7.0.0 | 2.0.0-internal.8.0.0 |
111
111
  | `requestHandler` property in `ContainerRuntime.loadRuntime(...)` | 2.0.0-internal.7.0.0 | |
112
112
  | `RuntimeRequestHandler` and `RuntimeRequestHandlerBuilder` | 2.0.0-internal.7.0.0 | |
113
- | `request` and `IFluidRouter` on `IContainer` and `Container` | 2.0.0-internal.7.0.0 | |
114
- | `request` and `IFluidRouter` on `IDataStore` | 2.0.0-internal.7.0.0 | |
115
- | `IFluidRouter` and `IProvideFluidRouter` | 2.0.0-internal.7.0.0 | |
116
- | `requestFluidObject` | 2.0.0-internal.7.0.0 | |
117
- | `requestResolvedObjectFromContainer` | 2.0.0-internal.7.0.0 | |
118
- | `getDefaultObjectFromContainer`, `getObjectWithIdFromContainer` and `getObjectFromContainer` | 2.0.0-internal.7.0.0 | |
113
+ | `request` and `IFluidRouter` on `IContainer` and `Container` | 2.0.0-internal.7.0.0 | 2.0.0-internal.8.0.0 |
114
+ | `request` on `IDataStore` | 2.0.0-internal.7.0.0 | 2.0.0-internal.8.0.0 |
115
+ | `IFluidRouter` and `IProvideFluidRouter` | 2.0.0-internal.7.0.0 | 2.0.0-internal.8.0.0 |
116
+ | `requestFluidObject` | 2.0.0-internal.7.0.0 | 2.0.0-internal.8.0.0 |
117
+ | `requestResolvedObjectFromContainer` | 2.0.0-internal.7.0.0 | 2.0.0-internal.8.0.0 |
118
+ | `getDefaultObjectFromContainer`, `getObjectWithIdFromContainer` and `getObjectFromContainer` | 2.0.0-internal.7.0.0 | 2.0.0-internal.8.0.0 |
119
119
  <!-- prettier-ignore-end -->
120
+
121
+ The removal of some items will need to wait for the LTS version of the `Loader` to reach "2.0.0-internal.7.0.0". This is because old `Loader` or `Container` code doesn't know about the new `entryPoint` pattern and will still attempt to use the `request` pattern. The following items are affected:
122
+
123
+ - `requestHandler` property in `ContainerRuntime.loadRuntime(...)`, `BaseContainerRuntimeFactory`, `ContainerRuntimeFactoryWithDefaultDataStore`, `mixinAttributor`, `RuntimeFactory`, `TestContainerRuntimeFactory`
124
+ - `RuntimeRequestHandler` and `RuntimeRequestHandlerBuilder`
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "../../../common/build/build-common/api-extractor-lint.json",
4
+ "messages": {
5
+ "extractorMessageReporting": {
6
+ // TODO: remove once base config has this enabled as an error
7
+ "ae-incompatible-release-tags": {
8
+ "logLevel": "error",
9
+ "addToApiReportFile": false
10
+ }
11
+ }
12
+ }
13
+ }
@@ -1,15 +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-base.json",
3
+ "extends": "../../../common/build/build-common/api-extractor-base.json",
4
4
  "messages": {
5
5
  "extractorMessageReporting": {
6
- "ae-missing-release-tag": {
7
- // TODO: Fix violations and remove this rule override
6
+ // TODO: Add missing documentation and remove this rule override
7
+ "ae-undocumented": {
8
8
  "logLevel": "none"
9
9
  }
10
10
  }
11
- },
12
- "dtsRollup": {
13
- "enabled": true
14
11
  }
15
12
  }
@@ -4,10 +4,13 @@
4
4
 
5
5
  ```ts
6
6
 
7
- // @public
7
+ // @alpha
8
+ export type ConfigTypes = string | number | boolean | number[] | string[] | boolean[] | undefined;
9
+
10
+ // @alpha
8
11
  export type ExtendEventProvider<TBaseEvent extends IEvent, TBase extends IEventProvider<TBaseEvent>, TEvent extends TBaseEvent> = Omit<Omit<Omit<TBase, "on">, "once">, "off"> & IEventProvider<TBaseEvent> & IEventProvider<TEvent>;
9
12
 
10
- // @public
13
+ // @internal
11
14
  export const FluidErrorTypes: {
12
15
  readonly genericError: "genericError";
13
16
  readonly throttlingError: "throttlingError";
@@ -16,27 +19,32 @@ export const FluidErrorTypes: {
16
19
  readonly usageError: "usageError";
17
20
  };
18
21
 
19
- // @public (undocumented)
22
+ // @internal (undocumented)
20
23
  export type FluidErrorTypes = (typeof FluidErrorTypes)[keyof typeof FluidErrorTypes];
21
24
 
22
- // @public
25
+ // @alpha
23
26
  export type FluidObject<T = unknown> = {
24
27
  [P in FluidObjectProviderKeys<T>]?: T[P];
25
28
  };
26
29
 
27
- // @public
30
+ // @alpha
28
31
  export type FluidObjectKeys<T> = keyof FluidObject<T>;
29
32
 
30
- // @public
33
+ // @alpha
31
34
  export type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Required<T>[TProp] ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] ? TProp : never : never;
32
35
 
33
- // @public
36
+ // @alpha
37
+ export interface IConfigProviderBase {
38
+ getRawConfig(name: string): ConfigTypes;
39
+ }
40
+
41
+ // @alpha
34
42
  export interface IDisposable {
35
43
  dispose(error?: Error): void;
36
44
  readonly disposed: boolean;
37
45
  }
38
46
 
39
- // @public
47
+ // @alpha
40
48
  export interface IErrorBase extends Partial<Error> {
41
49
  readonly errorType: string;
42
50
  getTelemetryProperties?(): ITelemetryBaseProperties;
@@ -45,31 +53,31 @@ export interface IErrorBase extends Partial<Error> {
45
53
  readonly stack?: string;
46
54
  }
47
55
 
48
- // @public
56
+ // @alpha
49
57
  export interface IErrorEvent extends IEvent {
50
58
  // @eventProperty
51
59
  (event: "error", listener: (message: any) => void): any;
52
60
  }
53
61
 
54
- // @public
62
+ // @alpha
55
63
  export interface IEvent {
56
64
  // @eventProperty
57
65
  (event: string, listener: (...args: any[]) => void): any;
58
66
  }
59
67
 
60
- // @public
68
+ // @alpha
61
69
  export interface IEventProvider<TEvent extends IEvent> {
62
70
  readonly off: IEventTransformer<this, TEvent>;
63
71
  readonly on: IEventTransformer<this, TEvent>;
64
72
  readonly once: IEventTransformer<this, TEvent>;
65
73
  }
66
74
 
67
- // @public
75
+ // @alpha
68
76
  export type IEventThisPlaceHolder = {
69
77
  thisPlaceHolder: "thisPlaceHolder";
70
78
  };
71
79
 
72
- // @public
80
+ // @alpha
73
81
  export type IEventTransformer<TThis, TEvent extends IEvent> = TEvent extends {
74
82
  (event: infer E0, listener: (...args: infer A0) => void): any;
75
83
  (event: infer E1, listener: (...args: infer A1) => void): any;
@@ -222,31 +230,31 @@ export type IEventTransformer<TThis, TEvent extends IEvent> = TEvent extends {
222
230
  (event: string, listener: (...args: any[]) => void): any;
223
231
  } ? TransformedEvent<TThis, E0, A0> : TransformedEvent<TThis, string, any[]>;
224
232
 
225
- // @public @deprecated
233
+ // @internal @deprecated
226
234
  export interface IFluidCodeDetails {
227
235
  readonly config?: IFluidCodeDetailsConfig;
228
236
  readonly package: string | Readonly<IFluidPackage>;
229
237
  }
230
238
 
231
- // @public @deprecated (undocumented)
239
+ // @internal @deprecated (undocumented)
232
240
  export const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer;
233
241
 
234
- // @public @deprecated
242
+ // @internal @deprecated
235
243
  export interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {
236
244
  compare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;
237
245
  satisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;
238
246
  }
239
247
 
240
- // @public @deprecated
248
+ // @internal @deprecated
241
249
  export interface IFluidCodeDetailsConfig {
242
250
  // (undocumented)
243
251
  readonly [key: string]: string;
244
252
  }
245
253
 
246
- // @public (undocumented)
254
+ // @alpha (undocumented)
247
255
  export const IFluidHandle: keyof IProvideFluidHandle;
248
256
 
249
- // @public
257
+ // @alpha
250
258
  export interface IFluidHandle<T = FluidObject & IFluidLoadable> extends IProvideFluidHandle {
251
259
  // @deprecated (undocumented)
252
260
  readonly absolutePath: string;
@@ -258,10 +266,10 @@ export interface IFluidHandle<T = FluidObject & IFluidLoadable> extends IProvide
258
266
  readonly isAttached: boolean;
259
267
  }
260
268
 
261
- // @public (undocumented)
269
+ // @alpha (undocumented)
262
270
  export const IFluidHandleContext: keyof IProvideFluidHandleContext;
263
271
 
264
- // @public
272
+ // @alpha
265
273
  export interface IFluidHandleContext extends IProvideFluidHandleContext {
266
274
  readonly absolutePath: string;
267
275
  attachGraph(): void;
@@ -271,16 +279,16 @@ export interface IFluidHandleContext extends IProvideFluidHandleContext {
271
279
  readonly routeContext?: IFluidHandleContext;
272
280
  }
273
281
 
274
- // @public (undocumented)
282
+ // @alpha (undocumented)
275
283
  export const IFluidLoadable: keyof IProvideFluidLoadable;
276
284
 
277
- // @public
285
+ // @alpha
278
286
  export interface IFluidLoadable extends IProvideFluidLoadable {
279
287
  // (undocumented)
280
288
  handle: IFluidHandle;
281
289
  }
282
290
 
283
- // @public @deprecated
291
+ // @internal @deprecated
284
292
  export interface IFluidPackage {
285
293
  [key: string]: unknown;
286
294
  fluid: {
@@ -289,7 +297,7 @@ export interface IFluidPackage {
289
297
  name: string;
290
298
  }
291
299
 
292
- // @public @deprecated
300
+ // @internal @deprecated
293
301
  export interface IFluidPackageEnvironment {
294
302
  [target: string]: undefined | {
295
303
  files: string[];
@@ -297,19 +305,10 @@ export interface IFluidPackageEnvironment {
297
305
  };
298
306
  }
299
307
 
300
- // @public @deprecated (undocumented)
301
- export const IFluidRouter: keyof IProvideFluidRouter;
302
-
303
- // @public @deprecated (undocumented)
304
- export interface IFluidRouter extends IProvideFluidRouter {
305
- // (undocumented)
306
- request(request: IRequest): Promise<IResponse>;
307
- }
308
-
309
- // @public (undocumented)
308
+ // @internal (undocumented)
310
309
  export const IFluidRunnable: keyof IProvideFluidRunnable;
311
310
 
312
- // @public (undocumented)
311
+ // @internal (undocumented)
313
312
  export interface IFluidRunnable {
314
313
  // (undocumented)
315
314
  run(...args: any[]): Promise<void>;
@@ -317,55 +316,49 @@ export interface IFluidRunnable {
317
316
  stop(reason?: string): void;
318
317
  }
319
318
 
320
- // @public
319
+ // @internal
321
320
  export interface IGenericError extends IErrorBase {
322
321
  // (undocumented)
323
322
  error?: any;
324
323
  readonly errorType: typeof FluidErrorTypes.genericError;
325
324
  }
326
325
 
327
- // @public
326
+ // @internal
328
327
  export interface ILoggingError extends Error {
329
328
  getTelemetryProperties(): ITelemetryBaseProperties;
330
329
  }
331
330
 
332
- // @public @deprecated (undocumented)
331
+ // @internal @deprecated (undocumented)
333
332
  export interface IProvideFluidCodeDetailsComparer {
334
333
  // (undocumented)
335
334
  readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;
336
335
  }
337
336
 
338
- // @public (undocumented)
337
+ // @alpha (undocumented)
339
338
  export interface IProvideFluidHandle {
340
339
  // (undocumented)
341
340
  readonly IFluidHandle: IFluidHandle;
342
341
  }
343
342
 
344
- // @public (undocumented)
343
+ // @alpha (undocumented)
345
344
  export interface IProvideFluidHandleContext {
346
345
  // (undocumented)
347
346
  readonly IFluidHandleContext: IFluidHandleContext;
348
347
  }
349
348
 
350
- // @public (undocumented)
349
+ // @alpha (undocumented)
351
350
  export interface IProvideFluidLoadable {
352
351
  // (undocumented)
353
352
  readonly IFluidLoadable: IFluidLoadable;
354
353
  }
355
354
 
356
- // @public @deprecated
357
- export interface IProvideFluidRouter {
358
- // (undocumented)
359
- readonly IFluidRouter: IFluidRouter;
360
- }
361
-
362
- // @public (undocumented)
355
+ // @internal (undocumented)
363
356
  export interface IProvideFluidRunnable {
364
357
  // (undocumented)
365
358
  readonly IFluidRunnable: IFluidRunnable;
366
359
  }
367
360
 
368
- // @public (undocumented)
361
+ // @alpha (undocumented)
369
362
  export interface IRequest {
370
363
  // (undocumented)
371
364
  headers?: IRequestHeader;
@@ -373,13 +366,13 @@ export interface IRequest {
373
366
  url: string;
374
367
  }
375
368
 
376
- // @public (undocumented)
369
+ // @alpha (undocumented)
377
370
  export interface IRequestHeader {
378
371
  // (undocumented)
379
372
  [index: string]: any;
380
373
  }
381
374
 
382
- // @public (undocumented)
375
+ // @alpha (undocumented)
383
376
  export interface IResponse {
384
377
  // (undocumented)
385
378
  headers?: {
@@ -395,13 +388,13 @@ export interface IResponse {
395
388
  value: any;
396
389
  }
397
390
 
398
- // @public @deprecated (undocumented)
391
+ // @internal @deprecated (undocumented)
399
392
  export const isFluidCodeDetails: (details: unknown) => details is Readonly<IFluidCodeDetails>;
400
393
 
401
- // @public @deprecated
394
+ // @internal @deprecated
402
395
  export const isFluidPackage: (pkg: unknown) => pkg is Readonly<IFluidPackage>;
403
396
 
404
- // @public @deprecated (undocumented)
397
+ // @internal @deprecated (undocumented)
405
398
  export interface ITaggedTelemetryPropertyType {
406
399
  // (undocumented)
407
400
  tag: string;
@@ -409,7 +402,7 @@ export interface ITaggedTelemetryPropertyType {
409
402
  value: TelemetryEventPropertyType;
410
403
  }
411
404
 
412
- // @public
405
+ // @alpha
413
406
  export interface ITelemetryBaseEvent extends ITelemetryBaseProperties {
414
407
  // (undocumented)
415
408
  category: string;
@@ -417,7 +410,7 @@ export interface ITelemetryBaseEvent extends ITelemetryBaseProperties {
417
410
  eventName: string;
418
411
  }
419
412
 
420
- // @public
413
+ // @alpha
421
414
  export interface ITelemetryBaseLogger {
422
415
  // (undocumented)
423
416
  minLogLevel?: LogLevel;
@@ -425,16 +418,16 @@ export interface ITelemetryBaseLogger {
425
418
  send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;
426
419
  }
427
420
 
428
- // @public
421
+ // @alpha
429
422
  export type ITelemetryBaseProperties = ITelemetryProperties;
430
423
 
431
- // @public @deprecated
424
+ // @alpha @deprecated
432
425
  export interface ITelemetryErrorEvent extends ITelemetryProperties {
433
426
  // (undocumented)
434
427
  eventName: string;
435
428
  }
436
429
 
437
- // @public @deprecated
430
+ // @alpha @deprecated
438
431
  export interface ITelemetryGenericEvent extends ITelemetryProperties {
439
432
  // (undocumented)
440
433
  category?: TelemetryEventCategory;
@@ -442,7 +435,7 @@ export interface ITelemetryGenericEvent extends ITelemetryProperties {
442
435
  eventName: string;
443
436
  }
444
437
 
445
- // @public @deprecated
438
+ // @alpha @deprecated
446
439
  export interface ITelemetryLogger extends ITelemetryBaseLogger {
447
440
  send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;
448
441
  sendErrorEvent(event: ITelemetryErrorEvent, error?: any): void;
@@ -450,46 +443,46 @@ export interface ITelemetryLogger extends ITelemetryBaseLogger {
450
443
  sendTelemetryEvent(event: ITelemetryGenericEvent, error?: any, logLevel?: typeof LogLevel.verbose | typeof LogLevel.default): void;
451
444
  }
452
445
 
453
- // @public @deprecated
446
+ // @alpha @deprecated
454
447
  export interface ITelemetryPerformanceEvent extends ITelemetryGenericEvent {
455
448
  // (undocumented)
456
449
  duration?: number;
457
450
  }
458
451
 
459
- // @public @deprecated
452
+ // @alpha @deprecated
460
453
  export interface ITelemetryProperties {
461
454
  // (undocumented)
462
455
  [index: string]: TelemetryEventPropertyType | Tagged<TelemetryEventPropertyType>;
463
456
  }
464
457
 
465
- // @public
458
+ // @internal
466
459
  export interface IThrottlingWarning extends IErrorBase {
467
460
  readonly errorType: typeof FluidErrorTypes.throttlingError;
468
461
  // (undocumented)
469
462
  readonly retryAfterSeconds: number;
470
463
  }
471
464
 
472
- // @public
465
+ // @internal
473
466
  export interface IUsageError extends IErrorBase {
474
467
  readonly errorType: typeof FluidErrorTypes.usageError;
475
468
  }
476
469
 
477
- // @public
470
+ // @alpha
478
471
  export const LogLevel: {
479
472
  readonly verbose: 10;
480
473
  readonly default: 20;
481
474
  readonly error: 30;
482
475
  };
483
476
 
484
- // @public
477
+ // @alpha
485
478
  export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
486
479
 
487
- // @public
480
+ // @alpha
488
481
  export type ReplaceIEventThisPlaceHolder<L extends any[], TThis> = L extends any[] ? {
489
482
  [K in keyof L]: L[K] extends IEventThisPlaceHolder ? TThis : L[K];
490
483
  } : L;
491
484
 
492
- // @public
485
+ // @alpha
493
486
  export interface Tagged<V, T extends string = string> {
494
487
  // (undocumented)
495
488
  tag: T;
@@ -497,16 +490,16 @@ export interface Tagged<V, T extends string = string> {
497
490
  value: V;
498
491
  }
499
492
 
500
- // @public
493
+ // @internal
501
494
  export type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;
502
495
 
503
- // @public @deprecated
496
+ // @alpha @deprecated
504
497
  export type TelemetryEventCategory = "generic" | "error" | "performance";
505
498
 
506
- // @public @deprecated
499
+ // @alpha @deprecated
507
500
  export type TelemetryEventPropertyType = string | number | boolean | undefined;
508
501
 
509
- // @public
502
+ // @alpha
510
503
  export type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (...args: ReplaceIEventThisPlaceHolder<A, TThis>) => void) => TThis;
511
504
 
512
505
  // (No @packageDocumentation comment for this package)
@@ -0,0 +1,35 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ /**
6
+ * Types supported by {@link IConfigProviderBase}.
7
+ * @alpha
8
+ */
9
+ export type ConfigTypes = string | number | boolean | number[] | string[] | boolean[] | undefined;
10
+ /**
11
+ * Base interface for providing configurations to enable/disable/control features.
12
+ * @alpha
13
+ */
14
+ export interface IConfigProviderBase {
15
+ /**
16
+ * For the specified config name this function gets the value.
17
+ *
18
+ * This type is meant be easy to implement by Fluid Framework consumers
19
+ * so the returned valued needs minimal type coercion, and allows consumers to
20
+ * return values in a natural way from whatever source they retrieve them.
21
+ *
22
+ * For instance a value of 1 maybe be returned as a string or a number.
23
+ * For array types a json string or an object are allowable.
24
+ *
25
+ * It should return undefined if there is no value available for the config name.
26
+ *
27
+ * @param name - The name of the config to get the value for.
28
+ *
29
+ * @privateRemarks Generally, this type should only be taken as input, and be wrapped by an
30
+ * internal monitoring context from the fluidframework/telemetry-utils package. That will provide
31
+ * a wrapper with provides strongly typed access to values via consistent type coercion.
32
+ */
33
+ getRawConfig(name: string): ConfigTypes;
34
+ }
35
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO,EAAE,GAAG,SAAS,CAAC;AAElG;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IACnC;;;;;;;;;;;;;;;;;OAiBG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;CACxC"}
package/dist/config.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /*!
3
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
+ * Licensed under the MIT License.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Types supported by {@link IConfigProviderBase}.\n * @alpha\n */\nexport type ConfigTypes = string | number | boolean | number[] | string[] | boolean[] | undefined;\n\n/**\n * Base interface for providing configurations to enable/disable/control features.\n * @alpha\n */\nexport interface IConfigProviderBase {\n\t/**\n\t * For the specified config name this function gets the value.\n\t *\n\t * This type is meant be easy to implement by Fluid Framework consumers\n\t * so the returned valued needs minimal type coercion, and allows consumers to\n\t * return values in a natural way from whatever source they retrieve them.\n\t *\n\t * For instance a value of 1 maybe be returned as a string or a number.\n\t * For array types a json string or an object are allowable.\n\t *\n\t * It should return undefined if there is no value available for the config name.\n\t *\n\t * @param name - The name of the config to get the value for.\n\t *\n\t * @privateRemarks Generally, this type should only be taken as input, and be wrapped by an\n\t * internal monitoring context from the fluidframework/telemetry-utils package. That will provide\n\t * a wrapper with provides strongly typed access to values via consistent type coercion.\n\t */\n\tgetRawConfig(name: string): ConfigTypes;\n}\n"]}