@fluidframework/core-interfaces 2.0.0-dev.5.2.0.169897 → 2.0.0-dev.6.4.0.191258

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 (76) hide show
  1. package/.eslintrc.js +1 -1
  2. package/CHANGELOG.md +87 -0
  3. package/README.md +4 -3
  4. package/Removing-IFluidRouter.md +113 -0
  5. package/dist/disposable.d.ts +21 -0
  6. package/dist/disposable.d.ts.map +1 -0
  7. package/dist/disposable.js +7 -0
  8. package/dist/disposable.js.map +1 -0
  9. package/dist/error.d.ts +105 -0
  10. package/dist/error.d.ts.map +1 -0
  11. package/dist/error.js +33 -0
  12. package/dist/error.js.map +1 -0
  13. package/dist/events.d.ts +251 -0
  14. package/dist/events.d.ts.map +1 -0
  15. package/dist/events.js +7 -0
  16. package/dist/events.js.map +1 -0
  17. package/dist/fluidLoadable.d.ts.map +1 -1
  18. package/dist/fluidLoadable.js.map +1 -1
  19. package/dist/fluidPackage.d.ts +1 -1
  20. package/dist/fluidPackage.d.ts.map +1 -1
  21. package/dist/fluidPackage.js +7 -4
  22. package/dist/fluidPackage.js.map +1 -1
  23. package/dist/fluidRouter.d.ts.map +1 -1
  24. package/dist/fluidRouter.js.map +1 -1
  25. package/dist/index.d.ts +13 -1
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +9 -5
  28. package/dist/index.js.map +1 -1
  29. package/dist/logger.d.ts +164 -0
  30. package/dist/logger.d.ts.map +1 -0
  31. package/dist/logger.js +16 -0
  32. package/dist/logger.js.map +1 -0
  33. package/dist/provider.d.ts +11 -5
  34. package/dist/provider.d.ts.map +1 -1
  35. package/dist/provider.js.map +1 -1
  36. package/lib/disposable.d.ts +21 -0
  37. package/lib/disposable.d.ts.map +1 -0
  38. package/lib/disposable.js +6 -0
  39. package/lib/disposable.js.map +1 -0
  40. package/lib/error.d.ts +105 -0
  41. package/lib/error.d.ts.map +1 -0
  42. package/lib/error.js +30 -0
  43. package/lib/error.js.map +1 -0
  44. package/lib/events.d.ts +251 -0
  45. package/lib/events.d.ts.map +1 -0
  46. package/lib/events.js +6 -0
  47. package/lib/events.js.map +1 -0
  48. package/lib/fluidLoadable.d.ts.map +1 -1
  49. package/lib/fluidLoadable.js.map +1 -1
  50. package/lib/fluidPackage.d.ts +1 -1
  51. package/lib/fluidPackage.d.ts.map +1 -1
  52. package/lib/fluidPackage.js +7 -4
  53. package/lib/fluidPackage.js.map +1 -1
  54. package/lib/fluidRouter.d.ts.map +1 -1
  55. package/lib/fluidRouter.js.map +1 -1
  56. package/lib/index.d.ts +13 -1
  57. package/lib/index.d.ts.map +1 -1
  58. package/lib/index.js +3 -1
  59. package/lib/index.js.map +1 -1
  60. package/lib/logger.d.ts +164 -0
  61. package/lib/logger.d.ts.map +1 -0
  62. package/lib/logger.js +13 -0
  63. package/lib/logger.js.map +1 -0
  64. package/lib/provider.d.ts +11 -5
  65. package/lib/provider.d.ts.map +1 -1
  66. package/lib/provider.js.map +1 -1
  67. package/package.json +9 -10
  68. package/src/disposable.ts +22 -0
  69. package/src/error.ts +121 -0
  70. package/src/events.ts +432 -0
  71. package/src/fluidLoadable.ts +2 -0
  72. package/src/fluidPackage.ts +5 -2
  73. package/src/fluidRouter.ts +6 -0
  74. package/src/index.ts +49 -11
  75. package/src/logger.ts +196 -0
  76. package/src/provider.ts +11 -5
@@ -0,0 +1,164 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ /**
6
+ * Examples of known categories, however category can be any string for extensibility.
7
+ *
8
+ * @deprecated Moved to \@fluidframework/telemetry-utils package
9
+ */
10
+ export declare type TelemetryEventCategory = "generic" | "error" | "performance";
11
+ /**
12
+ * Property types that can be logged.
13
+ *
14
+ * @remarks Logging entire objects is considered extremely dangerous from a telemetry point of view because people can
15
+ * easily add fields to objects that shouldn't be logged and not realize it's going to be logged.
16
+ * General best practice is to explicitly log the fields you care about from objects.
17
+ */
18
+ export declare type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;
19
+ /**
20
+ * {@inheritDoc TelemetryBaseEventPropertyType}
21
+ *
22
+ * @deprecated Renamed to {@link TelemetryBaseEventPropertyType}
23
+ */
24
+ export declare type TelemetryEventPropertyType = string | number | boolean | undefined;
25
+ /**
26
+ * A property to be logged to telemetry may require a tag indicating the value may contain sensitive data.
27
+ * This type wraps a value of the given type V in an object along with a string tag (type can be further specified as T).
28
+ *
29
+ * This indicates that the value should be organized or handled differently by loggers in various first or third
30
+ * party scenarios. For example, tags are used to mark data that should not be stored in logs for privacy reasons.
31
+ */
32
+ export interface Tagged<V, T extends string = string> {
33
+ value: V;
34
+ tag: T;
35
+ }
36
+ /**
37
+ * @see {@link Tagged} for info on tagging
38
+ *
39
+ * @deprecated Use Tagged\<TelemetryBaseEventPropertyType\>
40
+ */
41
+ export interface ITaggedTelemetryPropertyType {
42
+ value: TelemetryEventPropertyType;
43
+ tag: string;
44
+ }
45
+ /**
46
+ * JSON-serializable properties, which will be logged with telemetry.
47
+ */
48
+ export declare type ITelemetryBaseProperties = ITelemetryProperties;
49
+ /**
50
+ * {@inheritDoc ITelemetryBaseProperties}
51
+ *
52
+ * @deprecated Renamed to {@link ITelemetryBaseProperties}
53
+ */
54
+ export interface ITelemetryProperties {
55
+ [index: string]: TelemetryEventPropertyType | Tagged<TelemetryEventPropertyType>;
56
+ }
57
+ /**
58
+ * Base interface for logging telemetry statements.
59
+ * Can contain any number of properties that get serialized as json payload.
60
+ * @param category - category of the event, like "error", "performance", "generic", etc.
61
+ * @param eventName - name of the event.
62
+ */
63
+ export interface ITelemetryBaseEvent extends ITelemetryBaseProperties {
64
+ category: string;
65
+ eventName: string;
66
+ }
67
+ /**
68
+ * Specify levels of the logs.
69
+ */
70
+ export declare const LogLevel: {
71
+ readonly verbose: 10;
72
+ readonly default: 20;
73
+ readonly error: 30;
74
+ };
75
+ /**
76
+ * Specify a level to the log to filter out logs based on the level.
77
+ */
78
+ export declare type LogLevel = typeof LogLevel[keyof typeof LogLevel];
79
+ /**
80
+ * Interface to output telemetry events.
81
+ * Implemented by hosting app / loader
82
+ */
83
+ export interface ITelemetryBaseLogger {
84
+ send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;
85
+ minLogLevel?: LogLevel;
86
+ }
87
+ /**
88
+ * Informational (non-error) telemetry event
89
+ * Maps to category = "generic"
90
+ *
91
+ * @deprecated For internal use within FluidFramework, use ITelemetryGenericEventExt in \@fluidframework/telemetry-utils.
92
+ * No replacement intended for FluidFramework consumers.
93
+ */
94
+ export interface ITelemetryGenericEvent extends ITelemetryProperties {
95
+ eventName: string;
96
+ category?: TelemetryEventCategory;
97
+ }
98
+ /**
99
+ * Error telemetry event.
100
+ * Maps to category = "error"
101
+ *
102
+ * @deprecated For internal use within FluidFramework, use ITelemetryErrorEventExt in \@fluidframework/telemetry-utils.
103
+ * No replacement intended for FluidFramework consumers.
104
+ */
105
+ export interface ITelemetryErrorEvent extends ITelemetryProperties {
106
+ eventName: string;
107
+ }
108
+ /**
109
+ * Performance telemetry event.
110
+ * Maps to category = "performance"
111
+ *
112
+ * @deprecated For internal use within FluidFramework, use ITelemetryPerformanceEventExt in \@fluidframework/telemetry-utils.
113
+ * No replacement intended for FluidFramework consumers.
114
+ */
115
+ export interface ITelemetryPerformanceEvent extends ITelemetryGenericEvent {
116
+ duration?: number;
117
+ }
118
+ /**
119
+ * An error object that supports exporting its properties to be logged to telemetry
120
+ */
121
+ export interface ILoggingError extends Error {
122
+ /**
123
+ * Return all properties from this object that should be logged to telemetry
124
+ */
125
+ getTelemetryProperties(): ITelemetryBaseProperties;
126
+ }
127
+ /**
128
+ * ITelemetryLogger interface contains various helper telemetry methods,
129
+ * encoding in one place schemas for various types of Fluid telemetry events.
130
+ * Creates sub-logger that appends properties to all events
131
+ *
132
+ * @deprecated For internal use within FluidFramework, use ITelemetryLoggerExt in \@fluidframework/telemetry-utils.
133
+ * No replacement intended for FluidFramework consumers.
134
+ */
135
+ export interface ITelemetryLogger extends ITelemetryBaseLogger {
136
+ /**
137
+ * Actual implementation that sends telemetry event
138
+ * Implemented by derived classes
139
+ * @param event - Telemetry event to send over
140
+ * @param logLevel - optional level of the log.
141
+ */
142
+ send(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;
143
+ /**
144
+ * Send information telemetry event
145
+ * @param event - Event to send
146
+ * @param error - optional error object to log
147
+ * @param logLevel - optional level of the log.
148
+ */
149
+ sendTelemetryEvent(event: ITelemetryGenericEvent, error?: any, logLevel?: typeof LogLevel.verbose | typeof LogLevel.default): void;
150
+ /**
151
+ * Send error telemetry event
152
+ * @param event - Event to send
153
+ * @param error - optional error object to log
154
+ */
155
+ sendErrorEvent(event: ITelemetryErrorEvent, error?: any): void;
156
+ /**
157
+ * Send performance telemetry event
158
+ * @param event - Event to send
159
+ * @param error - optional error object to log
160
+ * @param logLevel - optional level of the log.
161
+ */
162
+ sendPerformanceEvent(event: ITelemetryPerformanceEvent, error?: any, logLevel?: typeof LogLevel.verbose | typeof LogLevel.default): void;
163
+ }
164
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,oBAAY,sBAAsB,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,CAAC;AAEzE;;;;;;GAMG;AACH,oBAAY,8BAA8B,GAAG,0BAA0B,CAAC;AAExE;;;;GAIG;AACH,oBAAY,0BAA0B,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAE/E;;;;;;GAMG;AACH,MAAM,WAAW,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM;IACnD,KAAK,EAAE,CAAC,CAAC;IACT,GAAG,EAAE,CAAC,CAAC;CACP;AAED;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC5C,KAAK,EAAE,0BAA0B,CAAC;IAClC,GAAG,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AACH,oBAAY,wBAAwB,GAAG,oBAAoB,CAAC;AAE5D;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACpC,CAAC,KAAK,EAAE,MAAM,GAAG,0BAA0B,GAAG,MAAM,CAAC,0BAA0B,CAAC,CAAC;CACjF;AAED;;;;;GAKG;AACH,MAAM,WAAW,mBAAoB,SAAQ,wBAAwB;IACpE,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;CAIX,CAAC;AAEX;;GAEG;AACH,oBAAY,QAAQ,GAAG,OAAO,QAAQ,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAC;AAE9D;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACpC,IAAI,CAAC,KAAK,EAAE,mBAAmB,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAE5D,WAAW,CAAC,EAAE,QAAQ,CAAC;CACvB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,sBAAuB,SAAQ,oBAAoB;IACnE,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,sBAAsB,CAAC;CAClC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IACjE,SAAS,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,0BAA2B,SAAQ,sBAAsB;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,KAAK;IAC3C;;OAEG;IACH,sBAAsB,IAAI,wBAAwB,CAAC;CACnD;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB;IAC7D;;;;;OAKG;IACH,IAAI,CAAC,KAAK,EAAE,mBAAmB,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAE5D;;;;;OAKG;IACH,kBAAkB,CACjB,KAAK,EAAE,sBAAsB,EAG7B,KAAK,CAAC,EAAE,GAAG,EACX,QAAQ,CAAC,EAAE,OAAO,QAAQ,CAAC,OAAO,GAAG,OAAO,QAAQ,CAAC,OAAO,GAC1D,IAAI,CAAC;IAER;;;;OAIG;IAEH,cAAc,CAAC,KAAK,EAAE,oBAAoB,EAAE,KAAK,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC;IAE/D;;;;;OAKG;IACH,oBAAoB,CACnB,KAAK,EAAE,0BAA0B,EAGjC,KAAK,CAAC,EAAE,GAAG,EACX,QAAQ,CAAC,EAAE,OAAO,QAAQ,CAAC,OAAO,GAAG,OAAO,QAAQ,CAAC,OAAO,GAC1D,IAAI,CAAC;CACR"}
package/dist/logger.js ADDED
@@ -0,0 +1,16 @@
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
+ exports.LogLevel = void 0;
8
+ /**
9
+ * Specify levels of the logs.
10
+ */
11
+ exports.LogLevel = {
12
+ verbose: 10,
13
+ default: 20,
14
+ error: 30, // To log errors.
15
+ };
16
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAwEH;;GAEG;AACU,QAAA,QAAQ,GAAG;IACvB,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;IACX,KAAK,EAAE,EAAE,EAAE,iBAAiB;CACnB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Examples of known categories, however category can be any string for extensibility.\n *\n * @deprecated Moved to \\@fluidframework/telemetry-utils package\n */\nexport type TelemetryEventCategory = \"generic\" | \"error\" | \"performance\";\n\n/**\n * Property types that can be logged.\n *\n * @remarks Logging entire objects is considered extremely dangerous from a telemetry point of view because people can\n * easily add fields to objects that shouldn't be logged and not realize it's going to be logged.\n * General best practice is to explicitly log the fields you care about from objects.\n */\nexport type TelemetryBaseEventPropertyType = TelemetryEventPropertyType;\n\n/**\n * {@inheritDoc TelemetryBaseEventPropertyType}\n *\n * @deprecated Renamed to {@link TelemetryBaseEventPropertyType}\n */\nexport type TelemetryEventPropertyType = string | number | boolean | undefined;\n\n/**\n * A property to be logged to telemetry may require a tag indicating the value may contain sensitive data.\n * This type wraps a value of the given type V in an object along with a string tag (type can be further specified as T).\n *\n * This indicates that the value should be organized or handled differently by loggers in various first or third\n * party scenarios. For example, tags are used to mark data that should not be stored in logs for privacy reasons.\n */\nexport interface Tagged<V, T extends string = string> {\n\tvalue: V;\n\ttag: T;\n}\n\n/**\n * @see {@link Tagged} for info on tagging\n *\n * @deprecated Use Tagged\\<TelemetryBaseEventPropertyType\\>\n */\nexport interface ITaggedTelemetryPropertyType {\n\tvalue: TelemetryEventPropertyType;\n\ttag: string;\n}\n\n/**\n * JSON-serializable properties, which will be logged with telemetry.\n */\nexport type ITelemetryBaseProperties = ITelemetryProperties;\n\n/**\n * {@inheritDoc ITelemetryBaseProperties}\n *\n * @deprecated Renamed to {@link ITelemetryBaseProperties}\n */\nexport interface ITelemetryProperties {\n\t[index: string]: TelemetryEventPropertyType | Tagged<TelemetryEventPropertyType>;\n}\n\n/**\n * Base interface for logging telemetry statements.\n * Can contain any number of properties that get serialized as json payload.\n * @param category - category of the event, like \"error\", \"performance\", \"generic\", etc.\n * @param eventName - name of the event.\n */\nexport interface ITelemetryBaseEvent extends ITelemetryBaseProperties {\n\tcategory: string;\n\teventName: string;\n}\n\n/**\n * Specify levels of the logs.\n */\nexport const LogLevel = {\n\tverbose: 10, // To log any verbose event for example when you are debugging something.\n\tdefault: 20, // Default log level\n\terror: 30, // To log errors.\n} as const;\n\n/**\n * Specify a level to the log to filter out logs based on the level.\n */\nexport type LogLevel = typeof LogLevel[keyof typeof LogLevel];\n\n/**\n * Interface to output telemetry events.\n * Implemented by hosting app / loader\n */\nexport interface ITelemetryBaseLogger {\n\tsend(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;\n\n\tminLogLevel?: LogLevel;\n}\n\n/**\n * Informational (non-error) telemetry event\n * Maps to category = \"generic\"\n *\n * @deprecated For internal use within FluidFramework, use ITelemetryGenericEventExt in \\@fluidframework/telemetry-utils.\n * No replacement intended for FluidFramework consumers.\n */\nexport interface ITelemetryGenericEvent extends ITelemetryProperties {\n\teventName: string;\n\tcategory?: TelemetryEventCategory;\n}\n\n/**\n * Error telemetry event.\n * Maps to category = \"error\"\n *\n * @deprecated For internal use within FluidFramework, use ITelemetryErrorEventExt in \\@fluidframework/telemetry-utils.\n * No replacement intended for FluidFramework consumers.\n */\nexport interface ITelemetryErrorEvent extends ITelemetryProperties {\n\teventName: string;\n}\n\n/**\n * Performance telemetry event.\n * Maps to category = \"performance\"\n *\n * @deprecated For internal use within FluidFramework, use ITelemetryPerformanceEventExt in \\@fluidframework/telemetry-utils.\n * No replacement intended for FluidFramework consumers.\n */\nexport interface ITelemetryPerformanceEvent extends ITelemetryGenericEvent {\n\tduration?: number; // Duration of event (optional)\n}\n\n/**\n * An error object that supports exporting its properties to be logged to telemetry\n */\nexport interface ILoggingError extends Error {\n\t/**\n\t * Return all properties from this object that should be logged to telemetry\n\t */\n\tgetTelemetryProperties(): ITelemetryBaseProperties;\n}\n\n/**\n * ITelemetryLogger interface contains various helper telemetry methods,\n * encoding in one place schemas for various types of Fluid telemetry events.\n * Creates sub-logger that appends properties to all events\n *\n * @deprecated For internal use within FluidFramework, use ITelemetryLoggerExt in \\@fluidframework/telemetry-utils.\n * No replacement intended for FluidFramework consumers.\n */\nexport interface ITelemetryLogger extends ITelemetryBaseLogger {\n\t/**\n\t * Actual implementation that sends telemetry event\n\t * Implemented by derived classes\n\t * @param event - Telemetry event to send over\n\t * @param logLevel - optional level of the log.\n\t */\n\tsend(event: ITelemetryBaseEvent, logLevel?: LogLevel): void;\n\n\t/**\n\t * Send information telemetry event\n\t * @param event - Event to send\n\t * @param error - optional error object to log\n\t * @param logLevel - optional level of the log.\n\t */\n\tsendTelemetryEvent(\n\t\tevent: ITelemetryGenericEvent,\n\t\t// TODO: Use `unknown` instead (API-Breaking)\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\terror?: any,\n\t\tlogLevel?: typeof LogLevel.verbose | typeof LogLevel.default,\n\t): void;\n\n\t/**\n\t * Send error telemetry event\n\t * @param event - Event to send\n\t * @param error - optional error object to log\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tsendErrorEvent(event: ITelemetryErrorEvent, error?: any): void;\n\n\t/**\n\t * Send performance telemetry event\n\t * @param event - Event to send\n\t * @param error - optional error object to log\n\t * @param logLevel - optional level of the log.\n\t */\n\tsendPerformanceEvent(\n\t\tevent: ITelemetryPerformanceEvent,\n\t\t// TODO: Use `unknown` instead (API-Breaking)\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\terror?: any,\n\t\tlogLevel?: typeof LogLevel.verbose | typeof LogLevel.default,\n\t): void;\n}\n"]}
@@ -3,13 +3,18 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  /**
6
- * This utility type is meant for internal use by {@link FluidObject}
7
6
  * Produces a valid FluidObject key given a type and a property.
7
+ *
8
+ * @remarks
9
+ *
8
10
  * A valid FluidObject key is a property that exists on the incoming type
9
11
  * as well as on the type of the property itself. For example: `IProvideFoo.IFoo.IFoo`
10
12
  * This aligns with the FluidObject pattern expected to be used with all FluidObjects.
11
13
  *
14
+ * This utility type is meant for internal use by {@link FluidObject}
15
+ *
12
16
  * @example
17
+ *
13
18
  * ```typescript
14
19
  * interface IProvideFoo{
15
20
  * IFoo: IFoo
@@ -18,10 +23,9 @@
18
23
  * foobar();
19
24
  * }
20
25
  * ```
21
- * This pattern enables discovery, and delegation in a standard way which is central
22
- * to FluidObject pattern
23
26
  *
24
- * @internal
27
+ * This pattern enables discovery, and delegation in a standard way which is central
28
+ * to FluidObject pattern.
25
29
  */
26
30
  export declare 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;
27
31
  /**
@@ -33,7 +37,9 @@ export declare type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T>
33
37
  * FluidObject without a generic argument.
34
38
  *
35
39
  * @example
36
- * For example, if we have an interface like below
40
+ *
41
+ * For example, if we have an interface like the following:
42
+ *
37
43
  * ```typescript
38
44
  * interface IProvideFoo{
39
45
  * IFoo: IFoo
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,oBAAY,uBAAuB,CAAC,CAAC,EAAE,KAAK,SAAS,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,MAAM,SAAS,KAAK,GAC3F,KAAK,GACL,MAAM,SAAS,KAAK,GACpB,KAAK,GACL,KAAK,SAAS,MAAM,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GACtC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,GAC7D,KAAK,GACL,KAAK,GACN,KAAK,CAAC;AAET;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,oBAAY,WAAW,CAAC,CAAC,GAAG,OAAO,IAAI;KACrC,CAAC,IAAI,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CACxC,CAAC;AAEF;;;;;;;;GAQG;AACH,oBAAY,eAAe,CAAC,CAAC,IAAI,MAAM,WAAW,CAAC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,oBAAY,uBAAuB,CAAC,CAAC,EAAE,KAAK,SAAS,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,MAAM,SAAS,KAAK,GAC3F,KAAK,GACL,MAAM,SAAS,KAAK,GACpB,KAAK,GACL,KAAK,SAAS,MAAM,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GACtC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,GAC7D,KAAK,GACL,KAAK,GACN,KAAK,CAAC;AAET;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,oBAAY,WAAW,CAAC,CAAC,GAAG,OAAO,IAAI;KACrC,CAAC,IAAI,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CACxC,CAAC;AAEF;;;;;;;;GAQG;AACH,oBAAY,eAAe,CAAC,CAAC,IAAI,MAAM,WAAW,CAAC,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.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 * This utility type is meant for internal use by {@link FluidObject}\n * Produces a valid FluidObject key given a type and a property.\n * A valid FluidObject key is a property that exists on the incoming type\n * as well as on the type of the property itself. For example: `IProvideFoo.IFoo.IFoo`\n * This aligns with the FluidObject pattern expected to be used with all FluidObjects.\n *\n * @example\n * ```typescript\n * interface IProvideFoo{\n * IFoo: IFoo\n * }\n * interface IFoo extends IProvideFoo{\n * foobar();\n * }\n * ```\n * This pattern enables discovery, and delegation in a standard way which is central\n * to FluidObject pattern\n *\n * @internal\n */\nexport type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp\n\t? never\n\t: number extends TProp\n\t? never // exclude indexers [key:string |number]: any\n\t: TProp extends keyof Required<T>[TProp] // TProp is a property of T, and T[TProp]\n\t? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] // T[TProp] is the same type as T[TProp][TProp]\n\t\t? TProp\n\t\t: never\n\t: never;\n\n/**\n * This utility type take interface(s) that follow the FluidObject pattern, and produces\n * a new type that can be used for inspection and discovery of those interfaces.\n *\n * It is meant to be used with types that are known to implement the FluidObject pattern.\n * A common way to specify a type implements the FluidObject pattern is to expose it as a\n * FluidObject without a generic argument.\n *\n * @example\n * For example, if we have an interface like below\n * ```typescript\n * interface IProvideFoo{\n * IFoo: IFoo\n * }\n * interface IFoo extends IProvideFoo{\n * foobar();\n * }\n * ```\n *\n * and a function that returns a FluidObject. You would do the following\n *\n * `const maybeFoo: FluidObject<IFoo> = getFluidObject()`;\n *\n * Either IFoo or IProvideFoo are valid generic arguments. In both case\n * maybeFoo will be of type `{IFoo?: IFoo}`. If IFoo is not undefined,\n * then the FluidObject provides IFoo, and it can be used.\n *\n * You can inspect multiple types via a intersection. For example:\n * `FluidObject<IFoo & IBar>`\n *\n */\nexport type FluidObject<T = unknown> = {\n\t[P in FluidObjectProviderKeys<T>]?: T[P];\n};\n\n/**\n * This utility type creates a type that is the union of all keys on the generic type\n * which implement the FluidObject pattern.\n *\n * See {@link FluidObject}\n *\n * For example `FluidObjectKeys<IFoo & IBar>` would result in `\"IFoo\" | \"IBar\"`\n *\n */\nexport type FluidObjectKeys<T> = keyof FluidObject<T>;\n"]}
1
+ {"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.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 * Produces a valid FluidObject key given a type and a property.\n *\n * @remarks\n *\n * A valid FluidObject key is a property that exists on the incoming type\n * as well as on the type of the property itself. For example: `IProvideFoo.IFoo.IFoo`\n * This aligns with the FluidObject pattern expected to be used with all FluidObjects.\n *\n * This utility type is meant for internal use by {@link FluidObject}\n *\n * @example\n *\n * ```typescript\n * interface IProvideFoo{\n * IFoo: IFoo\n * }\n * interface IFoo extends IProvideFoo{\n * foobar();\n * }\n * ```\n *\n * This pattern enables discovery, and delegation in a standard way which is central\n * to FluidObject pattern.\n */\nexport type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp\n\t? never\n\t: number extends TProp\n\t? never // exclude indexers [key:string |number]: any\n\t: TProp extends keyof Required<T>[TProp] // TProp is a property of T, and T[TProp]\n\t? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] // T[TProp] is the same type as T[TProp][TProp]\n\t\t? TProp\n\t\t: never\n\t: never;\n\n/**\n * This utility type take interface(s) that follow the FluidObject pattern, and produces\n * a new type that can be used for inspection and discovery of those interfaces.\n *\n * It is meant to be used with types that are known to implement the FluidObject pattern.\n * A common way to specify a type implements the FluidObject pattern is to expose it as a\n * FluidObject without a generic argument.\n *\n * @example\n *\n * For example, if we have an interface like the following:\n *\n * ```typescript\n * interface IProvideFoo{\n * IFoo: IFoo\n * }\n * interface IFoo extends IProvideFoo{\n * foobar();\n * }\n * ```\n *\n * and a function that returns a FluidObject. You would do the following\n *\n * `const maybeFoo: FluidObject<IFoo> = getFluidObject()`;\n *\n * Either IFoo or IProvideFoo are valid generic arguments. In both case\n * maybeFoo will be of type `{IFoo?: IFoo}`. If IFoo is not undefined,\n * then the FluidObject provides IFoo, and it can be used.\n *\n * You can inspect multiple types via a intersection. For example:\n * `FluidObject<IFoo & IBar>`\n *\n */\nexport type FluidObject<T = unknown> = {\n\t[P in FluidObjectProviderKeys<T>]?: T[P];\n};\n\n/**\n * This utility type creates a type that is the union of all keys on the generic type\n * which implement the FluidObject pattern.\n *\n * See {@link FluidObject}\n *\n * For example `FluidObjectKeys<IFoo & IBar>` would result in `\"IFoo\" | \"IBar\"`\n *\n */\nexport type FluidObjectKeys<T> = keyof FluidObject<T>;\n"]}
@@ -0,0 +1,21 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ /**
6
+ * Base interface for objects that require lifetime management via explicit disposal.
7
+ */
8
+ export interface IDisposable {
9
+ /**
10
+ * Whether or not the object has been disposed.
11
+ * If true, the object should be considered invalid, and its other state should be disregarded.
12
+ */
13
+ readonly disposed: boolean;
14
+ /**
15
+ * Dispose of the object and its resources.
16
+ * @param error - Optional error indicating the reason for the disposal, if the object was
17
+ * disposed as the result of an error.
18
+ */
19
+ dispose(error?: Error): void;
20
+ }
21
+ //# sourceMappingURL=disposable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"disposable.d.ts","sourceRoot":"","sources":["../src/disposable.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAE3B;;;;OAIG;IACH,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;CAC7B"}
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=disposable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"disposable.js","sourceRoot":"","sources":["../src/disposable.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 * Base interface for objects that require lifetime management via explicit disposal.\n */\nexport interface IDisposable {\n\t/**\n\t * Whether or not the object has been disposed.\n\t * If true, the object should be considered invalid, and its other state should be disregarded.\n\t */\n\treadonly disposed: boolean;\n\n\t/**\n\t * Dispose of the object and its resources.\n\t * @param error - Optional error indicating the reason for the disposal, if the object was\n\t * disposed as the result of an error.\n\t */\n\tdispose(error?: Error): void;\n}\n"]}
package/lib/error.d.ts ADDED
@@ -0,0 +1,105 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ import { ITelemetryBaseProperties } from "./index";
6
+ /**
7
+ * Error types the Fluid Framework may report.
8
+ */
9
+ export declare const FluidErrorTypes: {
10
+ /**
11
+ * Some error, most likely an exception caught by runtime and propagated to container as critical error
12
+ */
13
+ readonly genericError: "genericError";
14
+ /**
15
+ * Throttling error from server. Server is busy and is asking not to reconnect for some time
16
+ */
17
+ readonly throttlingError: "throttlingError";
18
+ /**
19
+ * Data loss error detected by Container / DeltaManager. Likely points to storage issue.
20
+ */
21
+ readonly dataCorruptionError: "dataCorruptionError";
22
+ /**
23
+ * Error encountered when processing an operation. May correlate with data corruption.
24
+ */
25
+ readonly dataProcessingError: "dataProcessingError";
26
+ /**
27
+ * Error indicating an API is being used improperly resulting in an invalid operation.
28
+ */
29
+ readonly usageError: "usageError";
30
+ };
31
+ export declare type FluidErrorTypes = typeof FluidErrorTypes[keyof typeof FluidErrorTypes];
32
+ /**
33
+ * Base interface for all errors and warnings emitted the container.
34
+ *
35
+ * @remarks
36
+ *
37
+ * We are in the process of unifying error types across layers of the Framework. For now we have only migrated
38
+ * those from container-definitions. Once fully migrated, this will be a base interface for all errors and
39
+ * warnings emitted by the Fluid Framework. Currently only the container layer is using IErrorBase.
40
+ * Runtime and others will follow soon.
41
+ */
42
+ export interface IErrorBase extends Partial<Error> {
43
+ /**
44
+ * A type tag differentiating kinds of errors emitted by the container.
45
+ *
46
+ * @see See {@link FluidErrorTypes#genericError} for some common examples.
47
+ * - container
48
+ * - runtime
49
+ * - drivers
50
+ */
51
+ readonly errorType: string;
52
+ /**
53
+ * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error | Error.message}
54
+ *
55
+ * @remarks
56
+ *
57
+ * Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)
58
+ * If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result
59
+ * of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.
60
+ */
61
+ readonly message: string;
62
+ /**
63
+ * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/name | Error.name}
64
+ */
65
+ readonly name?: string;
66
+ /**
67
+ * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack | Error.stack}
68
+ */
69
+ readonly stack?: string;
70
+ /**
71
+ * Returns all properties of this error object that are fit for logging.
72
+ * Some may be tagged to indicate they contain some kind of sensitive data.
73
+ */
74
+ getTelemetryProperties?(): ITelemetryBaseProperties;
75
+ }
76
+ /**
77
+ * Generic wrapper for an unrecognized/uncategorized error object
78
+ */
79
+ export interface IGenericError extends IErrorBase {
80
+ /**
81
+ * {@inheritDoc IErrorBase.errorType}
82
+ */
83
+ readonly errorType: typeof FluidErrorTypes.genericError;
84
+ error?: any;
85
+ }
86
+ /**
87
+ * Error indicating an API is being used improperly resulting in an invalid operation.
88
+ */
89
+ export interface IUsageError extends IErrorBase {
90
+ /**
91
+ * {@inheritDoc IErrorBase.errorType}
92
+ */
93
+ readonly errorType: typeof FluidErrorTypes.usageError;
94
+ }
95
+ /**
96
+ * Warning emitted when requests to storage are being throttled
97
+ */
98
+ export interface IThrottlingWarning extends IErrorBase {
99
+ /**
100
+ * {@inheritDoc IErrorBase.errorType}
101
+ */
102
+ readonly errorType: typeof FluidErrorTypes.throttlingError;
103
+ readonly retryAfterSeconds: number;
104
+ }
105
+ //# sourceMappingURL=error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,eAAe;IAC3B;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;CAEM,CAAC;AACX,oBAAY,eAAe,GAAG,OAAO,eAAe,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAEnF;;;;;;;;;GASG;AACH,MAAM,WAAW,UAAW,SAAQ,OAAO,CAAC,KAAK,CAAC;IACjD;;;;;;;OAOG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;;;;;;;OAQG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,sBAAsB,CAAC,IAAI,wBAAwB,CAAC;CACpD;AAED;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,UAAU;IAChD;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,eAAe,CAAC,YAAY,CAAC;IAIxD,KAAK,CAAC,EAAE,GAAG,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC9C;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,eAAe,CAAC,UAAU,CAAC;CACtD;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,UAAU;IACrD;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,eAAe,CAAC,eAAe,CAAC;IAC3D,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;CACnC"}
package/lib/error.js ADDED
@@ -0,0 +1,30 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ /**
6
+ * Error types the Fluid Framework may report.
7
+ */
8
+ export const FluidErrorTypes = {
9
+ /**
10
+ * Some error, most likely an exception caught by runtime and propagated to container as critical error
11
+ */
12
+ genericError: "genericError",
13
+ /**
14
+ * Throttling error from server. Server is busy and is asking not to reconnect for some time
15
+ */
16
+ throttlingError: "throttlingError",
17
+ /**
18
+ * Data loss error detected by Container / DeltaManager. Likely points to storage issue.
19
+ */
20
+ dataCorruptionError: "dataCorruptionError",
21
+ /**
22
+ * Error encountered when processing an operation. May correlate with data corruption.
23
+ */
24
+ dataProcessingError: "dataProcessingError",
25
+ /**
26
+ * Error indicating an API is being used improperly resulting in an invalid operation.
27
+ */
28
+ usageError: "usageError",
29
+ };
30
+ //# sourceMappingURL=error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC9B;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,eAAe,EAAE,iBAAiB;IAElC;;OAEG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;OAEG;IACH,mBAAmB,EAAE,qBAAqB;IAE1C;;OAEG;IACH,UAAU,EAAE,YAAY;CACf,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseProperties } from \"./index\";\n\n/**\n * Error types the Fluid Framework may report.\n */\nexport const FluidErrorTypes = {\n\t/**\n\t * Some error, most likely an exception caught by runtime and propagated to container as critical error\n\t */\n\tgenericError: \"genericError\",\n\n\t/**\n\t * Throttling error from server. Server is busy and is asking not to reconnect for some time\n\t */\n\tthrottlingError: \"throttlingError\",\n\n\t/**\n\t * Data loss error detected by Container / DeltaManager. Likely points to storage issue.\n\t */\n\tdataCorruptionError: \"dataCorruptionError\",\n\n\t/**\n\t * Error encountered when processing an operation. May correlate with data corruption.\n\t */\n\tdataProcessingError: \"dataProcessingError\",\n\n\t/**\n\t * Error indicating an API is being used improperly resulting in an invalid operation.\n\t */\n\tusageError: \"usageError\",\n} as const;\nexport type FluidErrorTypes = typeof FluidErrorTypes[keyof typeof FluidErrorTypes];\n\n/**\n * Base interface for all errors and warnings emitted the container.\n *\n * @remarks\n *\n * We are in the process of unifying error types across layers of the Framework. For now we have only migrated\n * those from container-definitions. Once fully migrated, this will be a base interface for all errors and\n * warnings emitted by the Fluid Framework. Currently only the container layer is using IErrorBase.\n * Runtime and others will follow soon.\n */\nexport interface IErrorBase extends Partial<Error> {\n\t/**\n\t * A type tag differentiating kinds of errors emitted by the container.\n\t *\n\t * @see See {@link FluidErrorTypes#genericError} for some common examples.\n\t * - container\n\t * - runtime\n\t * - drivers\n\t */\n\treadonly errorType: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error | Error.message}\n\t *\n\t * @remarks\n\t *\n\t * Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)\n\t * If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result\n\t * of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.\n\t */\n\treadonly message: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/name | Error.name}\n\t */\n\treadonly name?: string;\n\n\t/**\n\t * See {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack | Error.stack}\n\t */\n\treadonly stack?: string;\n\n\t/**\n\t * Returns all properties of this error object that are fit for logging.\n\t * Some may be tagged to indicate they contain some kind of sensitive data.\n\t */\n\tgetTelemetryProperties?(): ITelemetryBaseProperties;\n}\n\n/**\n * Generic wrapper for an unrecognized/uncategorized error object\n */\nexport interface IGenericError extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.genericError;\n\n\t// TODO: Use `unknown` instead (API-Breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\terror?: any;\n}\n\n/**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n */\nexport interface IUsageError extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.usageError;\n}\n\n/**\n * Warning emitted when requests to storage are being throttled\n */\nexport interface IThrottlingWarning extends IErrorBase {\n\t/**\n\t * {@inheritDoc IErrorBase.errorType}\n\t */\n\treadonly errorType: typeof FluidErrorTypes.throttlingError;\n\treadonly retryAfterSeconds: number;\n}\n"]}