@itwin/core-common 5.0.0-dev.92 → 5.0.0-dev.94

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 (39) hide show
  1. package/lib/cjs/IModelError.d.ts +17 -7
  2. package/lib/cjs/IModelError.d.ts.map +1 -1
  3. package/lib/cjs/IModelError.js +5 -4
  4. package/lib/cjs/IModelError.js.map +1 -1
  5. package/lib/cjs/ITwinCoreErrors.d.ts +28 -0
  6. package/lib/cjs/ITwinCoreErrors.d.ts.map +1 -0
  7. package/lib/cjs/ITwinCoreErrors.js +28 -0
  8. package/lib/cjs/ITwinCoreErrors.js.map +1 -0
  9. package/lib/cjs/core-common.d.ts +2 -2
  10. package/lib/cjs/core-common.d.ts.map +1 -1
  11. package/lib/cjs/core-common.js +2 -2
  12. package/lib/cjs/core-common.js.map +1 -1
  13. package/lib/cjs/ipc/IpcSocket.d.ts +2 -23
  14. package/lib/cjs/ipc/IpcSocket.d.ts.map +1 -1
  15. package/lib/cjs/ipc/IpcSocket.js.map +1 -1
  16. package/lib/esm/IModelError.d.ts +17 -7
  17. package/lib/esm/IModelError.d.ts.map +1 -1
  18. package/lib/esm/IModelError.js +5 -4
  19. package/lib/esm/IModelError.js.map +1 -1
  20. package/lib/esm/ITwinCoreErrors.d.ts +28 -0
  21. package/lib/esm/ITwinCoreErrors.d.ts.map +1 -0
  22. package/lib/esm/ITwinCoreErrors.js +25 -0
  23. package/lib/esm/ITwinCoreErrors.js.map +1 -0
  24. package/lib/esm/core-common.d.ts +2 -2
  25. package/lib/esm/core-common.d.ts.map +1 -1
  26. package/lib/esm/core-common.js +2 -2
  27. package/lib/esm/core-common.js.map +1 -1
  28. package/lib/esm/ipc/IpcSocket.d.ts +2 -23
  29. package/lib/esm/ipc/IpcSocket.d.ts.map +1 -1
  30. package/lib/esm/ipc/IpcSocket.js.map +1 -1
  31. package/package.json +6 -6
  32. package/lib/cjs/ITwinError.d.ts +0 -108
  33. package/lib/cjs/ITwinError.d.ts.map +0 -1
  34. package/lib/cjs/ITwinError.js +0 -103
  35. package/lib/cjs/ITwinError.js.map +0 -1
  36. package/lib/esm/ITwinError.d.ts +0 -108
  37. package/lib/esm/ITwinError.d.ts.map +0 -1
  38. package/lib/esm/ITwinError.js +0 -95
  39. package/lib/esm/ITwinError.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITwinCoreErrors.js","sourceRoot":"","sources":["../../src/ITwinCoreErrors.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAUjD,YAAY;AACZ,MAAM,KAAW,YAAY,CAqB5B;AArBD,WAAiB,YAAY;IAC3B,qCAAqC;IACxB,kBAAK,GAAG,sBAAsB,CAAC;IAW5C,2CAA2C;IAC3C,SAAgB,UAAU,CAAC,GAAQ,EAAE,OAAe,EAAE,UAAkB;QACtE,UAAU,CAAC,UAAU,CAAe,EAAE,YAAY,EAAE,EAAE,KAAK,EAAL,aAAA,KAAK,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;IAC7F,CAAC;IAFe,uBAAU,aAEzB,CAAA;IACD,0DAA0D;IAC1D,SAAgB,OAAO,CAAC,KAAc,EAAE,GAAS;QAC/C,OAAO,UAAU,CAAC,OAAO,CAAe,KAAK,EAAE,aAAA,KAAK,EAAE,GAAG,CAAC,IAAI,OAAO,KAAK,CAAC,UAAU,KAAK,QAAQ,CAAC;IACrG,CAAC;IAFe,oBAAO,UAEtB,CAAA;AACH,CAAC,EArBgB,YAAY,KAAZ,YAAY,QAqB5B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module iModels\n */\n\nimport { ITwinError } from \"@itwin/core-bentley\";\n\n/** An error originating from the [[ChannelControl]] interface.\n * @beta\n */\nexport interface ChannelError extends ITwinError {\n /** The channel key that caused the error. */\n readonly channelKey: string;\n}\n\n/** @beta */\nexport namespace ChannelError {\n // the scope for all `ChannelError`s.\n export const scope = \"itwin-channel-errors\";\n\n /** The set of keys identifying the different kinds of `ChannelError`s */\n export type Key =\n /** an attempt to create a channel within an existing channel */\n \"may-not-nest\" |\n /** an attempt to use a channel that was not \"allowed\" */\n \"not-allowed\" |\n /** the root channel already exists */\n \"root-exists\";\n\n /** Instantiate and throw a ChannelError */\n export function throwError(key: Key, message: string, channelKey: string): never {\n ITwinError.throwError<ChannelError>({ iTwinErrorId: { scope, key }, message, channelKey });\n }\n /** Determine whether an error object is a ChannelError */\n export function isError(error: unknown, key?: Key): error is ChannelError {\n return ITwinError.isError<ChannelError>(error, scope, key) && typeof error.channelKey === \"string\";\n }\n}\n"]}
@@ -24,8 +24,8 @@ export * from "./ContextRealityModel";
24
24
  export * from "./DisplayStyleSettings";
25
25
  export * from "./domains/FunctionalElementProps";
26
26
  export * from "./domains/GenericElementProps";
27
- export * from "./ECSqlTypes";
28
27
  export * from "./ECSchemaProps";
28
+ export * from "./ECSqlTypes";
29
29
  export * from "./ElementMesh";
30
30
  export * from "./ElementProps";
31
31
  export * from "./EmphasizeElementsProps";
@@ -68,7 +68,7 @@ export * from "./Image";
68
68
  export * from "./IModel";
69
69
  export * from "./IModelError";
70
70
  export * from "./IModelVersion";
71
- export * from "./ITwinError";
71
+ export * from "./ITwinCoreErrors";
72
72
  export * from "./ipc/IpcSocket";
73
73
  export * from "./ipc/IpcWebSocket";
74
74
  export * from "./ipc/IpcWebSocketTransport";
@@ -1 +1 @@
1
- {"version":3,"file":"core-common.d.ts","sourceRoot":"","sources":["../../src/core-common.ts"],"names":[],"mappings":"AAIA,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,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C5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAE/C,cAAc,0BAA0B,CAAC;AAEzC;;GAEG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG"}
1
+ {"version":3,"file":"core-common.d.ts","sourceRoot":"","sources":["../../src/core-common.ts"],"names":[],"mappings":"AAIA,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qCAAqC,CAAC;AACpD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CA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/C,cAAc,0BAA0B,CAAC;AAEzC;;GAEG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG"}
@@ -28,8 +28,8 @@ export * from "./ContextRealityModel";
28
28
  export * from "./DisplayStyleSettings";
29
29
  export * from "./domains/FunctionalElementProps";
30
30
  export * from "./domains/GenericElementProps";
31
- export * from "./ECSqlTypes";
32
31
  export * from "./ECSchemaProps";
32
+ export * from "./ECSqlTypes";
33
33
  export * from "./ElementMesh";
34
34
  export * from "./ElementProps";
35
35
  export * from "./EmphasizeElementsProps";
@@ -72,7 +72,7 @@ export * from "./Image";
72
72
  export * from "./IModel";
73
73
  export * from "./IModelError";
74
74
  export * from "./IModelVersion";
75
- export * from "./ITwinError";
75
+ export * from "./ITwinCoreErrors";
76
76
  export * from "./ipc/IpcSocket";
77
77
  export * from "./ipc/IpcWebSocket";
78
78
  export * from "./ipc/IpcWebSocketTransport";
@@ -1 +1 @@
1
- {"version":3,"file":"core-common.js","sourceRoot":"","sources":["../../src/core-common.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qCAAqC,CAAC;AACpD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB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,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAE/C,cAAc,0BAA0B,CAAC;AAEzC;;GAEG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nexport * from \"./AmbientOcclusion\";\nexport * from \"./AnalysisStyle\";\nexport * from \"./annotation/TextAnnotation\";\nexport * from \"./annotation/TextBlock\";\nexport * from \"./annotation/TextBlockGeometryProps\";\nexport * from \"./annotation/TextBlockLayoutResult\";\nexport * from \"./annotation/TextStyle\";\nexport * from \"./Atmosphere\";\nexport * from \"./AuthorizationClient\";\nexport * from \"./BackgroundMapProvider\";\nexport * from \"./BackgroundMapSettings\";\nexport * from \"./Base64EncodedString\";\nexport * from \"./BriefcaseTypes\";\nexport * from \"./Camera\";\nexport * from \"./ChangedElements\";\nexport * from \"./ChangedEntities\";\nexport * from \"./ChangesetProps\";\nexport * from \"./ClipStyle\";\nexport * from \"./Code\";\nexport * from \"./ColorByName\";\nexport * from \"./ColorDef\";\nexport * from \"./CommonLoggerCategory\";\nexport * from \"./ContextRealityModel\";\nexport * from \"./DisplayStyleSettings\";\nexport * from \"./domains/FunctionalElementProps\";\nexport * from \"./domains/GenericElementProps\";\nexport * from \"./ECSqlTypes\";\nexport * from \"./ECSchemaProps\";\nexport * from \"./ElementMesh\";\nexport * from \"./ElementProps\";\nexport * from \"./EmphasizeElementsProps\";\nexport * from \"./EntityProps\";\nexport * from \"./EntityReference\";\nexport * from \"./Environment\";\nexport * from \"./FeatureIndex\";\nexport * from \"./FeatureSymbology\";\nexport * from \"./FeatureTable\";\nexport * from \"./Fonts\";\nexport * from \"./Frustum\";\nexport * from \"./GenericInstanceFilter\";\nexport * from \"./GeoCoordinateServices\";\nexport * from \"./geometry/AdditionalTransform\";\nexport * from \"./geometry/AreaPattern\";\nexport * from \"./geometry/BoundingSphere\";\nexport * from \"./geometry/Cartographic\";\nexport * from \"./geometry/CoordinateReferenceSystem\";\nexport * from \"./geometry/ElementGeometry\";\nexport * from \"./geometry/FrustumPlanes\";\nexport * from \"./geometry/GeodeticDatum\";\nexport * from \"./geometry/GeodeticEllipsoid\";\nexport * from \"./geometry/GeometryStream\";\nexport * from \"./geometry/ImageGraphic\";\nexport * from \"./geometry/LineStyle\";\nexport * from \"./geometry/Placement\";\nexport * from \"./geometry/Projection\";\nexport * from \"./geometry/TextString\";\nexport * from \"./GeometryContainment\";\nexport * from \"./GeometryParams\";\nexport * from \"./GeometrySummary\";\nexport * from \"./Gradient\";\nexport * from \"./GraphicParams\";\nexport * from \"./GroundPlane\";\nexport * from \"./HiddenLine\";\nexport * from \"./Hilite\";\nexport * from \"./HSLColor\";\nexport * from \"./HSVColor\";\nexport * from \"./Image\";\nexport * from \"./IModel\";\nexport * from \"./IModelError\";\nexport * from \"./IModelVersion\";\nexport * from \"./ITwinError\";\nexport * from \"./ipc/IpcSocket\";\nexport * from \"./ipc/IpcWebSocket\";\nexport * from \"./ipc/IpcWebSocketTransport\";\nexport * from \"./ipc/IpcSession\";\nexport * from \"./IpcAppProps\";\nexport * from \"./LightSettings\";\nexport * from \"./LinePixels\";\nexport * from \"./Localization\";\nexport * from \"./MapImagerySettings\";\nexport * from \"./MapLayerSettings\";\nexport * from \"./MassProperties\";\nexport * from \"./MaterialProps\";\nexport * from \"./ModelClipGroup\";\nexport * from \"./ModelProps\";\nexport * from \"./NativeAppProps\";\nexport * from \"./OctEncodedNormal\";\nexport * from \"./ConcurrentQuery\";\nexport * from \"./ECSqlReader\";\nexport * from \"./PlanarClipMask\";\nexport * from \"./ModelGeometryChanges\";\nexport * from \"./PlanProjectionSettings\";\nexport * from \"./QPoint\";\nexport * from \"./RealityDataAccessProps\";\nexport * from \"./RealityModelDisplaySettings\";\nexport * from \"./RenderPolyline\";\nexport * from \"./RenderMaterial\";\nexport * from \"./RenderSchedule\";\nexport * from \"./RenderTexture\";\nexport * from \"./RgbColor\";\nexport * from \"./RpcManager\";\nexport * from \"./SessionProps\";\nexport * from \"./SkyBox\";\nexport * from \"./SolarCalculate\";\nexport * from \"./SolarShadows\";\nexport * from \"./SpatialClassification\";\nexport * from \"./SubCategoryAppearance\";\nexport * from \"./SubCategoryOverride\";\nexport * from \"./TerrainSettings\";\nexport * from \"./TextureMapping\";\nexport * from \"./TextureProps\";\nexport * from \"./ThematicDisplay\";\nexport * from \"./ContourDisplay\";\nexport * from \"./Thumbnail\";\nexport * from \"./TileProps\";\nexport * from \"./Tween\";\nexport * from \"./TxnAction\";\nexport * from \"./ViewDetails\";\nexport * from \"./ViewFlags\";\nexport * from \"./ViewProps\";\nexport * from \"./rpc/core/RpcConstants\";\nexport * from \"./rpc/core/RpcControl\";\nexport * from \"./rpc/core/RpcInvocation\";\nexport * from \"./rpc/core/RpcSessionInvocation\";\nexport * from \"./rpc/core/RpcMarshaling\";\nexport * from \"./rpc/core/RpcOperation\";\nexport * from \"./rpc/core/RpcPendingQueue\";\nexport * from \"./rpc/core/RpcProtocol\";\nexport * from \"./rpc/core/RpcRegistry\";\nexport * from \"./rpc/core/RpcRequest\";\nexport * from \"./rpc/core/RpcRequestContext\";\nexport * from \"./rpc/core/RpcRoutingToken\";\nexport * from \"./rpc/core/RpcPush\";\nexport * from \"./rpc/core/RpcConfiguration\";\nexport * from \"./rpc/DevToolsRpcInterface\";\nexport * from \"./rpc/IModelReadRpcInterface\";\nexport * from \"./rpc/IModelTileRpcInterface\";\nexport * from \"./rpc/SnapshotIModelRpcInterface\";\nexport * from \"./rpc/TestRpcManager\";\nexport * from \"./RpcInterface\";\nexport * from \"./rpc/web/BentleyCloudRpcManager\";\nexport * from \"./rpc/web/BentleyCloudRpcProtocol\";\nexport * from \"./rpc/web/OpenAPI\";\nexport * from \"./rpc/web/RpcMultipart\";\nexport * from \"./rpc/web/WebAppRpcProtocol\";\nexport * from \"./rpc/web/WebAppRpcRequest\";\nexport * from \"./rpc/web/WebAppRpcLogging\";\nexport * from \"./tile/B3dmTileIO\";\nexport * from \"./tile/CompositeTileIO\";\nexport * from \"./tile/ElementGraphics\";\nexport * from \"./tile/GltfTileIO\";\nexport * from \"./tile/I3dmTileIO\";\nexport * from \"./tile/IModelTileIO\";\nexport * from \"./tile/PntsTileIO\";\nexport * from \"./tile/TileIO\";\nexport * from \"./tile/TileMetadata\";\nexport * from \"./tile/Tileset3dSchema\";\nexport * from \"./WhiteOnWhiteReversalSettings\";\n\nexport * from \"./internal/cross-package\";\n\n/** @docs-package-description\n * The core-common package contains classes for working with iModels that can be used in both [frontend]($docs/learning/frontend/index.md) and [backend]($docs/learning/backend/index.md).\n */\n/**\n * @docs-group-description Entities\n * Definitions of the \"props\" interfaces and types that define the [wire format]($docs/learning/wireformat.md) for communication between the frontend and backend about entities (models, elements, etc) contained in an iModel.\n */\n/**\n * @docs-group-description Codes\n * Types for working with [Codes]($docs/bis/guide/fundamentals/codes.md).\n */\n/**\n * @docs-group-description Geometry\n * Types for working with geometry.\n */\n/**\n * @docs-group-description Serialization\n * Types for serializing geometry\n */\n/**\n * @docs-group-description Views\n * Types for defining graphical views of the contents of an iModel.\n */\n/**\n * @docs-group-description DisplayStyles\n * Types for describing how the contents of Views should be rendered.\n */\n/**\n * @docs-group-description Rendering\n * Types describing geometry, views, and symbology for consumption by a display system.\n */\n/**\n * @docs-group-description Symbology\n * Types that define the appearance of geometry.\n */\n/**\n * @docs-group-description iModels\n * Types for working with [iModels]($docs/learning/IModels.md) in both the frontend and backend.\n */\n/**\n * @docs-group-description RpcInterface\n * Types for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\n */\n/**\n * @docs-group-description IpcSocket\n * Types for working with [IpcInterfaces]($docs/learning/IpcInterface.md).\n */\n/**\n * @docs-group-description ECSQL\n * Types for working with [ECSQL]($docs/learning/ECSQL.md), [Spatial Queries]($docs/learning/SpatialQueries.md), and [ECSQL Geometry Functions]($docs/learning/GeometrySqlFuncs.md).\n */\n/**\n * @docs-group-description Logging\n * Logger categories used by this package.\n */\n/**\n * @docs-group-description CloudStorage\n * Types for working with Cloud Storage.\n */\n/**\n * @docs-group-description Tween\n * Tweening library adapted from tween.js.\n */\n/**\n * @docs-group-description Tile\n * Types for working with 3d tile formats.\n */\n/**\n * @docs-group-description Utils\n * Miscellaneous utility classes.\n */\n/**\n * @docs-group-description NativeApp\n * [Native applications]($docs/learning/NativeApps.md)\n */\n/**\n * @docs-group-description Localization\n * Classes for internationalization and localization of your app.\n */\n/**\n * @docs-group-description Authorization\n * Classes for managing AccessToken used for all requests in other classes.\n */\n/**\n * @docs-group-description RealityData\n * Types for working with the RealityData API.\n */\n/**\n * @docs-group-description MapLayers\n * Types for working with the MapLayers API.\n */\n/**\n * @docs-group-description Annotation\n * APIs for producing and manipulating annotations like text, dimensions, and labels.\n */\n"]}
1
+ {"version":3,"file":"core-common.js","sourceRoot":"","sources":["../../src/core-common.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qCAAqC,CAAC;AACpD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,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,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAE/C,cAAc,0BAA0B,CAAC;AAEzC;;GAEG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nexport * from \"./AmbientOcclusion\";\nexport * from \"./AnalysisStyle\";\nexport * from \"./annotation/TextAnnotation\";\nexport * from \"./annotation/TextBlock\";\nexport * from \"./annotation/TextBlockGeometryProps\";\nexport * from \"./annotation/TextBlockLayoutResult\";\nexport * from \"./annotation/TextStyle\";\nexport * from \"./Atmosphere\";\nexport * from \"./AuthorizationClient\";\nexport * from \"./BackgroundMapProvider\";\nexport * from \"./BackgroundMapSettings\";\nexport * from \"./Base64EncodedString\";\nexport * from \"./BriefcaseTypes\";\nexport * from \"./Camera\";\nexport * from \"./ChangedElements\";\nexport * from \"./ChangedEntities\";\nexport * from \"./ChangesetProps\";\nexport * from \"./ClipStyle\";\nexport * from \"./Code\";\nexport * from \"./ColorByName\";\nexport * from \"./ColorDef\";\nexport * from \"./CommonLoggerCategory\";\nexport * from \"./ContextRealityModel\";\nexport * from \"./DisplayStyleSettings\";\nexport * from \"./domains/FunctionalElementProps\";\nexport * from \"./domains/GenericElementProps\";\nexport * from \"./ECSchemaProps\";\nexport * from \"./ECSqlTypes\";\nexport * from \"./ElementMesh\";\nexport * from \"./ElementProps\";\nexport * from \"./EmphasizeElementsProps\";\nexport * from \"./EntityProps\";\nexport * from \"./EntityReference\";\nexport * from \"./Environment\";\nexport * from \"./FeatureIndex\";\nexport * from \"./FeatureSymbology\";\nexport * from \"./FeatureTable\";\nexport * from \"./Fonts\";\nexport * from \"./Frustum\";\nexport * from \"./GenericInstanceFilter\";\nexport * from \"./GeoCoordinateServices\";\nexport * from \"./geometry/AdditionalTransform\";\nexport * from \"./geometry/AreaPattern\";\nexport * from \"./geometry/BoundingSphere\";\nexport * from \"./geometry/Cartographic\";\nexport * from \"./geometry/CoordinateReferenceSystem\";\nexport * from \"./geometry/ElementGeometry\";\nexport * from \"./geometry/FrustumPlanes\";\nexport * from \"./geometry/GeodeticDatum\";\nexport * from \"./geometry/GeodeticEllipsoid\";\nexport * from \"./geometry/GeometryStream\";\nexport * from \"./geometry/ImageGraphic\";\nexport * from \"./geometry/LineStyle\";\nexport * from \"./geometry/Placement\";\nexport * from \"./geometry/Projection\";\nexport * from \"./geometry/TextString\";\nexport * from \"./GeometryContainment\";\nexport * from \"./GeometryParams\";\nexport * from \"./GeometrySummary\";\nexport * from \"./Gradient\";\nexport * from \"./GraphicParams\";\nexport * from \"./GroundPlane\";\nexport * from \"./HiddenLine\";\nexport * from \"./Hilite\";\nexport * from \"./HSLColor\";\nexport * from \"./HSVColor\";\nexport * from \"./Image\";\nexport * from \"./IModel\";\nexport * from \"./IModelError\";\nexport * from \"./IModelVersion\";\nexport * from \"./ITwinCoreErrors\";\nexport * from \"./ipc/IpcSocket\";\nexport * from \"./ipc/IpcWebSocket\";\nexport * from \"./ipc/IpcWebSocketTransport\";\nexport * from \"./ipc/IpcSession\";\nexport * from \"./IpcAppProps\";\nexport * from \"./LightSettings\";\nexport * from \"./LinePixels\";\nexport * from \"./Localization\";\nexport * from \"./MapImagerySettings\";\nexport * from \"./MapLayerSettings\";\nexport * from \"./MassProperties\";\nexport * from \"./MaterialProps\";\nexport * from \"./ModelClipGroup\";\nexport * from \"./ModelProps\";\nexport * from \"./NativeAppProps\";\nexport * from \"./OctEncodedNormal\";\nexport * from \"./ConcurrentQuery\";\nexport * from \"./ECSqlReader\";\nexport * from \"./PlanarClipMask\";\nexport * from \"./ModelGeometryChanges\";\nexport * from \"./PlanProjectionSettings\";\nexport * from \"./QPoint\";\nexport * from \"./RealityDataAccessProps\";\nexport * from \"./RealityModelDisplaySettings\";\nexport * from \"./RenderPolyline\";\nexport * from \"./RenderMaterial\";\nexport * from \"./RenderSchedule\";\nexport * from \"./RenderTexture\";\nexport * from \"./RgbColor\";\nexport * from \"./RpcManager\";\nexport * from \"./SessionProps\";\nexport * from \"./SkyBox\";\nexport * from \"./SolarCalculate\";\nexport * from \"./SolarShadows\";\nexport * from \"./SpatialClassification\";\nexport * from \"./SubCategoryAppearance\";\nexport * from \"./SubCategoryOverride\";\nexport * from \"./TerrainSettings\";\nexport * from \"./TextureMapping\";\nexport * from \"./TextureProps\";\nexport * from \"./ThematicDisplay\";\nexport * from \"./ContourDisplay\";\nexport * from \"./Thumbnail\";\nexport * from \"./TileProps\";\nexport * from \"./Tween\";\nexport * from \"./TxnAction\";\nexport * from \"./ViewDetails\";\nexport * from \"./ViewFlags\";\nexport * from \"./ViewProps\";\nexport * from \"./rpc/core/RpcConstants\";\nexport * from \"./rpc/core/RpcControl\";\nexport * from \"./rpc/core/RpcInvocation\";\nexport * from \"./rpc/core/RpcSessionInvocation\";\nexport * from \"./rpc/core/RpcMarshaling\";\nexport * from \"./rpc/core/RpcOperation\";\nexport * from \"./rpc/core/RpcPendingQueue\";\nexport * from \"./rpc/core/RpcProtocol\";\nexport * from \"./rpc/core/RpcRegistry\";\nexport * from \"./rpc/core/RpcRequest\";\nexport * from \"./rpc/core/RpcRequestContext\";\nexport * from \"./rpc/core/RpcRoutingToken\";\nexport * from \"./rpc/core/RpcPush\";\nexport * from \"./rpc/core/RpcConfiguration\";\nexport * from \"./rpc/DevToolsRpcInterface\";\nexport * from \"./rpc/IModelReadRpcInterface\";\nexport * from \"./rpc/IModelTileRpcInterface\";\nexport * from \"./rpc/SnapshotIModelRpcInterface\";\nexport * from \"./rpc/TestRpcManager\";\nexport * from \"./RpcInterface\";\nexport * from \"./rpc/web/BentleyCloudRpcManager\";\nexport * from \"./rpc/web/BentleyCloudRpcProtocol\";\nexport * from \"./rpc/web/OpenAPI\";\nexport * from \"./rpc/web/RpcMultipart\";\nexport * from \"./rpc/web/WebAppRpcProtocol\";\nexport * from \"./rpc/web/WebAppRpcRequest\";\nexport * from \"./rpc/web/WebAppRpcLogging\";\nexport * from \"./tile/B3dmTileIO\";\nexport * from \"./tile/CompositeTileIO\";\nexport * from \"./tile/ElementGraphics\";\nexport * from \"./tile/GltfTileIO\";\nexport * from \"./tile/I3dmTileIO\";\nexport * from \"./tile/IModelTileIO\";\nexport * from \"./tile/PntsTileIO\";\nexport * from \"./tile/TileIO\";\nexport * from \"./tile/TileMetadata\";\nexport * from \"./tile/Tileset3dSchema\";\nexport * from \"./WhiteOnWhiteReversalSettings\";\n\nexport * from \"./internal/cross-package\";\n\n/** @docs-package-description\n * The core-common package contains classes for working with iModels that can be used in both [frontend]($docs/learning/frontend/index.md) and [backend]($docs/learning/backend/index.md).\n */\n/**\n * @docs-group-description Entities\n * Definitions of the \"props\" interfaces and types that define the [wire format]($docs/learning/wireformat.md) for communication between the frontend and backend about entities (models, elements, etc) contained in an iModel.\n */\n/**\n * @docs-group-description Codes\n * Types for working with [Codes]($docs/bis/guide/fundamentals/codes.md).\n */\n/**\n * @docs-group-description Geometry\n * Types for working with geometry.\n */\n/**\n * @docs-group-description Serialization\n * Types for serializing geometry\n */\n/**\n * @docs-group-description Views\n * Types for defining graphical views of the contents of an iModel.\n */\n/**\n * @docs-group-description DisplayStyles\n * Types for describing how the contents of Views should be rendered.\n */\n/**\n * @docs-group-description Rendering\n * Types describing geometry, views, and symbology for consumption by a display system.\n */\n/**\n * @docs-group-description Symbology\n * Types that define the appearance of geometry.\n */\n/**\n * @docs-group-description iModels\n * Types for working with [iModels]($docs/learning/IModels.md) in both the frontend and backend.\n */\n/**\n * @docs-group-description RpcInterface\n * Types for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\n */\n/**\n * @docs-group-description IpcSocket\n * Types for working with [IpcInterfaces]($docs/learning/IpcInterface.md).\n */\n/**\n * @docs-group-description ECSQL\n * Types for working with [ECSQL]($docs/learning/ECSQL.md), [Spatial Queries]($docs/learning/SpatialQueries.md), and [ECSQL Geometry Functions]($docs/learning/GeometrySqlFuncs.md).\n */\n/**\n * @docs-group-description Logging\n * Logger categories used by this package.\n */\n/**\n * @docs-group-description CloudStorage\n * Types for working with Cloud Storage.\n */\n/**\n * @docs-group-description Tween\n * Tweening library adapted from tween.js.\n */\n/**\n * @docs-group-description Tile\n * Types for working with 3d tile formats.\n */\n/**\n * @docs-group-description Utils\n * Miscellaneous utility classes.\n */\n/**\n * @docs-group-description NativeApp\n * [Native applications]($docs/learning/NativeApps.md)\n */\n/**\n * @docs-group-description Localization\n * Classes for internationalization and localization of your app.\n */\n/**\n * @docs-group-description Authorization\n * Classes for managing AccessToken used for all requests in other classes.\n */\n/**\n * @docs-group-description RealityData\n * Types for working with the RealityData API.\n */\n/**\n * @docs-group-description MapLayers\n * Types for working with the MapLayers API.\n */\n/**\n * @docs-group-description Annotation\n * APIs for producing and manipulating annotations like text, dimensions, and labels.\n */\n"]}
@@ -1,7 +1,6 @@
1
1
  /** @packageDocumentation
2
2
  * @module IpcSocket
3
3
  */
4
- import { LoggingMetaData } from "@itwin/core-bentley";
5
4
  /**
6
5
  * The prefix for all IpcSocket channels to disambiguate from system channels.
7
6
  * @internal
@@ -20,35 +19,15 @@ export type IpcListener = (evt: Event, ...args: any[]) => void;
20
19
  export type RemoveFunction = () => void;
21
20
  /**
22
21
  * Payload of an IpcInvoke response. The presence of `error` indicates that the backend threw an exception and the
23
- * frontend will re-throw a [BackendError]$(frontend) with the `errorNumber` and `message` values.
24
- * The presence of iTwinError indicates that the backend threw an exception of type [[ITwinError]] and the frontend will re-throw that same error.
22
+ * frontend will re-throw an Error with the content of the exception
25
23
  * Otherwise the `result` member holds the response.
26
24
  * @internal */
27
25
  export type IpcInvokeReturn = {
28
26
  result: any;
29
27
  error?: never;
30
- iTwinError?: never;
31
28
  } | {
32
29
  result?: never;
33
- iTwinError?: never;
34
- error: {
35
- name: string;
36
- message: string;
37
- errorNumber: number;
38
- stack?: string;
39
- metadata?: LoggingMetaData;
40
- };
41
- } | {
42
- result?: never;
43
- error?: never;
44
- iTwinError: {
45
- namespace: string;
46
- errorKey: string;
47
- message: string;
48
- stack?: string;
49
- metadata?: LoggingMetaData;
50
- [key: string]: any;
51
- };
30
+ error: unknown;
52
31
  };
53
32
  /**
54
33
  * An inter-process socket connection between a single [IModelHost]($backend) on the backend (the node process), and an [IModelApp]($frontend) on
@@ -1 +1 @@
1
- {"version":3,"file":"IpcSocket.d.ts","sourceRoot":"","sources":["../../../src/ipc/IpcSocket.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;KAGK;AACL,eAAO,MAAM,YAAY,YAAa,MAAM,WAAuB,CAAC;AAEpE;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;AAE/D;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC;AAExC;;;;;eAKe;AACf,MAAM,MAAM,eAAe,GAAG;IAAE,MAAM,EAAE,GAAG,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IAAC,UAAU,CAAC,EAAE,KAAK,CAAA;CAAE,GAAG;IAA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AAC;CAC3D;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD;;;;;OAKG;IACH,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,KAAK,cAAc,CAAC;CACxF"}
@@ -1 +1 @@
1
- {"version":3,"file":"IpcSocket.js","sourceRoot":"","sources":["../../../src/ipc/IpcSocket.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAIH;;;KAGK;AACL,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,SAAS,OAAO,EAAE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module IpcSocket\n */\n\nimport { LoggingMetaData } from \"@itwin/core-bentley\";\n\n/**\n * The prefix for all IpcSocket channels to disambiguate from system channels.\n * @internal\n * */\nexport const iTwinChannel = (channel: string) => `itwin.${channel}`;\n\n/**\n * A function to handle an Ipc message.\n * @public\n */\nexport type IpcListener = (evt: Event, ...args: any[]) => void;\n\n/**\n * Function returned when establishing an Ipc `receive` listener or `invoke` handler. Call this method to remove the listener/handler.\n * @public\n * @extensions\n */\nexport type RemoveFunction = () => void;\n\n/**\n * Payload of an IpcInvoke response. The presence of `error` indicates that the backend threw an exception and the\n * frontend will re-throw a [BackendError]$(frontend) with the `errorNumber` and `message` values.\n * The presence of iTwinError indicates that the backend threw an exception of type [[ITwinError]] and the frontend will re-throw that same error.\n * Otherwise the `result` member holds the response.\n * @internal */\nexport type IpcInvokeReturn = { result: any, error?: never, iTwinError?: never } | { result?: never, iTwinError?: never, error: { name: string, message: string, errorNumber: number, stack?: string, metadata?: LoggingMetaData } } |\n{ result?: never, error?: never, iTwinError: { namespace: string, errorKey: string, message: string, stack?: string, metadata?: LoggingMetaData, [key: string]: any } };\n/**\n * An inter-process socket connection between a single [IModelHost]($backend) on the backend (the node process), and an [IModelApp]($frontend) on\n * the frontend (the browser process.) Each side will implement this interface to form a two way connection. The frontend and backend\n * processes connected through an IpcSocket don't necessarily have to be on the same computer, but often are.\n * @public\n*/\nexport interface IpcSocket {\n /**\n * Send a message over the socket.\n * @param channel The name of the channel for the message. Must begin with the [[iTwinChannel]] prefix.\n * @param data The optional data of the message.\n * @note `data` is serialized with the [Structured Clone Algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm), so only\n * primitive types and `ArrayBuffers` are allowed.\n */\n send: (channel: string, ...data: any[]) => void;\n /**\n * Establish a handler to receive messages for a channel through a socket.\n * @param channel The name of the channel for the messages. Must begin with the [[iTwinChannel]] prefix.\n * @param listener A function called when messages are sent over `channel`\n * @note returns A function to call to remove the listener.\n */\n addListener: (channel: string, listener: IpcListener) => RemoveFunction;\n /**\n * Remove a previously registered listener\n * @param channel The name of the channel for the listener previously registered with [[addListener]]\n * @param listener The function passed to [[addListener]]\n */\n removeListener: (channel: string, listener: IpcListener) => void;\n}\n\n/**\n * Interface for the frontend (browser) side of a socket connection. Frontends may invoke methods implemented on the backend.\n * @public\n */\nexport interface IpcSocketFrontend extends IpcSocket {\n /**\n * Send a message to the backend via `channel` and expect a result asynchronously.\n * @param channel The name of the channel for the method. Must begin with the [[iTwinChannel]] prefix.\n * @see Electron [ipcRenderer.invoke](https://www.electronjs.org/docs/api/ipc-renderer) documentation for details.\n * Note that this interface *may* be implemented via Electron for desktop apps, or via\n * [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) for mobile or web-based\n * Ipc connections. In either case, the Electron documentation provides the specifications for how it works.\n * @note `args` are serialized with the [Structured Clone Algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm), so only\n * primitive types and `ArrayBuffers` are allowed.\n */\n invoke: (channel: string, ...args: any[]) => Promise<any>;\n}\n\n/**\n * Interface for the backend (Node.js) side of a socket connection. Backends provide the implementation\n * of methods that are invoked from the frontend.\n * @public\n */\nexport interface IpcSocketBackend extends IpcSocket {\n /**\n * Establish a backend implementation of an Ipc interface for a channel.\n * @param channel The name of the channel for this handler. Must begin with the [[iTwinChannel]] prefix.\n * @param handler A function that supplies the implementation for methods invoked over `channel` via [[IpcSocketFrontend.invoke]]\n * @note returns A function to call to remove the handler.\n */\n handle: (channel: string, handler: (...args: any[]) => Promise<any>) => RemoveFunction;\n}\n\n"]}
1
+ {"version":3,"file":"IpcSocket.js","sourceRoot":"","sources":["../../../src/ipc/IpcSocket.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;;KAGK;AACL,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,SAAS,OAAO,EAAE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module IpcSocket\n */\n\n/**\n * The prefix for all IpcSocket channels to disambiguate from system channels.\n * @internal\n * */\nexport const iTwinChannel = (channel: string) => `itwin.${channel}`;\n\n/**\n * A function to handle an Ipc message.\n * @public\n */\nexport type IpcListener = (evt: Event, ...args: any[]) => void;\n\n/**\n * Function returned when establishing an Ipc `receive` listener or `invoke` handler. Call this method to remove the listener/handler.\n * @public\n * @extensions\n */\nexport type RemoveFunction = () => void;\n\n/**\n * Payload of an IpcInvoke response. The presence of `error` indicates that the backend threw an exception and the\n * frontend will re-throw an Error with the content of the exception\n * Otherwise the `result` member holds the response.\n * @internal */\nexport type IpcInvokeReturn = { result: any, error?: never } | { result?: never, error: unknown }\n\n/**\n * An inter-process socket connection between a single [IModelHost]($backend) on the backend (the node process), and an [IModelApp]($frontend) on\n * the frontend (the browser process.) Each side will implement this interface to form a two way connection. The frontend and backend\n * processes connected through an IpcSocket don't necessarily have to be on the same computer, but often are.\n * @public\n*/\nexport interface IpcSocket {\n /**\n * Send a message over the socket.\n * @param channel The name of the channel for the message. Must begin with the [[iTwinChannel]] prefix.\n * @param data The optional data of the message.\n * @note `data` is serialized with the [Structured Clone Algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm), so only\n * primitive types and `ArrayBuffers` are allowed.\n */\n send: (channel: string, ...data: any[]) => void;\n /**\n * Establish a handler to receive messages for a channel through a socket.\n * @param channel The name of the channel for the messages. Must begin with the [[iTwinChannel]] prefix.\n * @param listener A function called when messages are sent over `channel`\n * @note returns A function to call to remove the listener.\n */\n addListener: (channel: string, listener: IpcListener) => RemoveFunction;\n /**\n * Remove a previously registered listener\n * @param channel The name of the channel for the listener previously registered with [[addListener]]\n * @param listener The function passed to [[addListener]]\n */\n removeListener: (channel: string, listener: IpcListener) => void;\n}\n\n/**\n * Interface for the frontend (browser) side of a socket connection. Frontends may invoke methods implemented on the backend.\n * @public\n */\nexport interface IpcSocketFrontend extends IpcSocket {\n /**\n * Send a message to the backend via `channel` and expect a result asynchronously.\n * @param channel The name of the channel for the method. Must begin with the [[iTwinChannel]] prefix.\n * @see Electron [ipcRenderer.invoke](https://www.electronjs.org/docs/api/ipc-renderer) documentation for details.\n * Note that this interface *may* be implemented via Electron for desktop apps, or via\n * [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) for mobile or web-based\n * Ipc connections. In either case, the Electron documentation provides the specifications for how it works.\n * @note `args` are serialized with the [Structured Clone Algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm), so only\n * primitive types and `ArrayBuffers` are allowed.\n */\n invoke: (channel: string, ...args: any[]) => Promise<any>;\n}\n\n/**\n * Interface for the backend (Node.js) side of a socket connection. Backends provide the implementation\n * of methods that are invoked from the frontend.\n * @public\n */\nexport interface IpcSocketBackend extends IpcSocket {\n /**\n * Establish a backend implementation of an Ipc interface for a channel.\n * @param channel The name of the channel for this handler. Must begin with the [[iTwinChannel]] prefix.\n * @param handler A function that supplies the implementation for methods invoked over `channel` via [[IpcSocketFrontend.invoke]]\n * @note returns A function to call to remove the handler.\n */\n handle: (channel: string, handler: (...args: any[]) => Promise<any>) => RemoveFunction;\n}\n\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/core-common",
3
- "version": "5.0.0-dev.92",
3
+ "version": "5.0.0-dev.94",
4
4
  "description": "iTwin.js components common to frontend and backend",
5
5
  "main": "lib/cjs/core-common.js",
6
6
  "module": "lib/esm/core-common.js",
@@ -27,8 +27,8 @@
27
27
  "js-base64": "^3.6.1"
28
28
  },
29
29
  "peerDependencies": {
30
- "@itwin/core-bentley": "5.0.0-dev.92",
31
- "@itwin/core-geometry": "5.0.0-dev.92"
30
+ "@itwin/core-bentley": "5.0.0-dev.94",
31
+ "@itwin/core-geometry": "5.0.0-dev.94"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@itwin/eslint-plugin": "5.0.0-dev.1",
@@ -42,9 +42,9 @@
42
42
  "rimraf": "^6.0.1",
43
43
  "typescript": "~5.6.2",
44
44
  "vitest": "^3.0.6",
45
- "@itwin/build-tools": "5.0.0-dev.92",
46
- "@itwin/core-bentley": "5.0.0-dev.92",
47
- "@itwin/core-geometry": "5.0.0-dev.92"
45
+ "@itwin/core-bentley": "5.0.0-dev.94",
46
+ "@itwin/build-tools": "5.0.0-dev.94",
47
+ "@itwin/core-geometry": "5.0.0-dev.94"
48
48
  },
49
49
  "nyc": {
50
50
  "extends": "./node_modules/@itwin/build-tools/.nycrc",
@@ -1,108 +0,0 @@
1
- /** @packageDocumentation
2
- * @module iModels
3
- */
4
- import { LoggingMetaData } from "@itwin/core-bentley";
5
- import { LockState } from "./IModelError";
6
- import { BriefcaseId } from "./BriefcaseTypes";
7
- /**
8
- * Detailed information about a particular object Lock that is causing the Lock update conflict.
9
- * An example of a lock update conflict would be attempting to use [LockControl.acquireLocks]($backend) on an object that is already locked by another Briefcase.
10
- * @beta
11
- */
12
- export interface InUseLock {
13
- /** Id of the object that is causing conflict. */
14
- objectId: string;
15
- /**
16
- * The level of conflicting lock. Possible values are {@link LockState.Shared}, {@link LockState.Exclusive}.
17
- * See {@link LockState}.
18
- */
19
- state: LockState;
20
- /** An array of Briefcase ids that hold this lock. */
21
- briefcaseIds: BriefcaseId[];
22
- }
23
- /**
24
- * iTwinjs Core namespace namespace for a developer/application.
25
- * @beta
26
- */
27
- export declare const iTwinjsCoreNamespace = "itwinjs-core";
28
- /**
29
- * error keys object used to describe an error keys for a developer/application.
30
- * @beta
31
- */
32
- export declare const iTwinErrorKeys: {
33
- readonly inUseLocks: "in-use-locks";
34
- readonly channelNest: "channel-may-not-nest";
35
- readonly channelNotAllowed: "channel-not-allowed";
36
- readonly channelRootExists: "channel-root-exists";
37
- };
38
- /**
39
- * Record for all itwin error messages.
40
- * @beta
41
- */
42
- export declare const iTwinErrorMessages: Record<keyof typeof iTwinErrorKeys, (...args: any[]) => string>;
43
- /**
44
- * An interface used to describe an error for a developer/application. The message is not intended to be displayed to an end user.
45
- * This error interface should be extended when needing to throw errors with extra properties defined on them. See [[InUseLocksError]] for an example.
46
- * @beta
47
- */
48
- export interface ITwinError extends Error {
49
- /** namespace for the error. This is a unique qualifier for the errorKey. */
50
- namespace: string;
51
- /** unique key for error, within namespace. All errorKeys within the same namespace must be unique. */
52
- errorKey: string;
53
- /** explanation of what went wrong. Intended to be read by a developer. */
54
- message: string;
55
- /** stack trace of the error. */
56
- stack?: string;
57
- /** metadata about the exception. */
58
- metadata?: LoggingMetaData;
59
- }
60
- /**
61
- * An error raised when there is a lock conflict detected.
62
- * Typically this error would be thrown by [LockControl.acquireLocks]($backend) when you are requesting a lock on an element that is already held by another briefcase.
63
- * @beta
64
- */
65
- export interface InUseLocksError extends ITwinError {
66
- inUseLocks: InUseLock[];
67
- }
68
- /**
69
- * A function which will be used to construct an [[ITwinError]].
70
- * @param namespace The namespace associated with the error.
71
- * @param errorKey The errorKey associated with the error.
72
- * @param message The message associated with the error.
73
- * @param metadata Metadata associated with the error.
74
- * @beta
75
- */
76
- export declare function constructITwinError(namespace: string, errorKey: string, message?: string, metadata?: LoggingMetaData): ITwinError;
77
- /**
78
- * A function which constructs a detailed error for example [[ InUseLocksError ]] above.
79
- * @param namespace The namespace associated with the error.
80
- * @param errorKey The errorKey associated with the error.
81
- * @param details Other details associated with the error.
82
- * @param message The message associated with the error.
83
- * @param metadata Metadata associated with the error.
84
- * @beta
85
- */
86
- export declare function constructDetailedError<T extends ITwinError>(namespace: string, errorKey: string, details: Omit<T, keyof ITwinError>, message?: string, metadata?: LoggingMetaData): T;
87
- /**
88
- * a high level function that returns a type asserter function which would return whether or not the passed in parameter is an [[ITwinError]]
89
- * @param namespace The namespace associated with the error.
90
- * @param errorKey The errorKey associated with the error.
91
- * @beta
92
- */
93
- export declare function createITwinErrorTypeAsserter<T extends ITwinError>(namespace: string, errorKey: string): (error: unknown) => error is T;
94
- /**
95
- * get the meta data associated with this ITwinError, if any.
96
- * @param error The error for which metadata is required.
97
- * @beta
98
- */
99
- export declare function getITwinErrorMetaData(error: ITwinError): object | undefined;
100
- /**
101
- * type guard function that returns whether or not the passed in parameter is an [[ITwinError]]
102
- * @param error The error which is to ve verified.
103
- * @param namespace The namespace associated with the error.
104
- * @param errorKey The errorKey associated with the error.
105
- * @beta
106
- */
107
- export declare function isITwinError(error: unknown, namespace?: string, errorKey?: string): error is ITwinError;
108
- //# sourceMappingURL=ITwinError.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ITwinError.d.ts","sourceRoot":"","sources":["../../src/ITwinError.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AA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AO,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,eAAe,GAAG,CAAC,CAKrL;AAED;;;;;EAKE;AACF,wBAAgB,4BAA4B,CAAC,CAAC,SAAS,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WACrF,OAAO,KAAG,KAAK,IAAI,CAAC,CACpC;AAED;;;;EAIE;AACF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAE3E;AAED;;;;;;EAME;AACF,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,IAAI,UAAU,CAKvG"}
@@ -1,103 +0,0 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- /** @packageDocumentation
7
- * @module iModels
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.iTwinErrorMessages = exports.iTwinErrorKeys = exports.iTwinjsCoreNamespace = void 0;
11
- exports.constructITwinError = constructITwinError;
12
- exports.constructDetailedError = constructDetailedError;
13
- exports.createITwinErrorTypeAsserter = createITwinErrorTypeAsserter;
14
- exports.getITwinErrorMetaData = getITwinErrorMetaData;
15
- exports.isITwinError = isITwinError;
16
- /**
17
- * iTwinjs Core namespace namespace for a developer/application.
18
- * @beta
19
- */
20
- exports.iTwinjsCoreNamespace = "itwinjs-core";
21
- /**
22
- * error keys object used to describe an error keys for a developer/application.
23
- * @beta
24
- */
25
- exports.iTwinErrorKeys = {
26
- inUseLocks: "in-use-locks",
27
- channelNest: "channel-may-not-nest",
28
- channelNotAllowed: "channel-not-allowed",
29
- channelRootExists: "channel-root-exists"
30
- };
31
- /**
32
- * Record for all itwin error messages.
33
- * @beta
34
- */
35
- exports.iTwinErrorMessages = {
36
- "inUseLocks": () => 'Objects are locked by another briefcase',
37
- "channelNest": (id) => `Channel ${id} may not nest`,
38
- "channelNotAllowed": (id) => `Channel ${id} is not allowed`,
39
- "channelRootExists": (id) => `Channel ${id} root already exist`,
40
- };
41
- /**
42
- * A function which will be used to construct an [[ITwinError]].
43
- * @param namespace The namespace associated with the error.
44
- * @param errorKey The errorKey associated with the error.
45
- * @param message The message associated with the error.
46
- * @param metadata Metadata associated with the error.
47
- * @beta
48
- */
49
- function constructITwinError(namespace, errorKey, message, metadata) {
50
- const error = new Error();
51
- error.message = message ?? `${errorKey} occurred`;
52
- error.name = `${namespace}:${errorKey}`;
53
- error.namespace = namespace;
54
- error.errorKey = errorKey;
55
- error.metadata = metadata;
56
- Error.captureStackTrace(error, constructITwinError); // Optional, but this would hide constructITwinError from stack.
57
- return error;
58
- }
59
- /**
60
- * A function which constructs a detailed error for example [[ InUseLocksError ]] above.
61
- * @param namespace The namespace associated with the error.
62
- * @param errorKey The errorKey associated with the error.
63
- * @param details Other details associated with the error.
64
- * @param message The message associated with the error.
65
- * @param metadata Metadata associated with the error.
66
- * @beta
67
- */
68
- function constructDetailedError(namespace, errorKey, details, message, metadata) {
69
- const baseError = constructITwinError(namespace, errorKey, message, metadata);
70
- Error.captureStackTrace(baseError, constructDetailedError); // Optional, but this would hide constructDetailedError from stack.
71
- return Object.assign(baseError, details);
72
- }
73
- /**
74
- * a high level function that returns a type asserter function which would return whether or not the passed in parameter is an [[ITwinError]]
75
- * @param namespace The namespace associated with the error.
76
- * @param errorKey The errorKey associated with the error.
77
- * @beta
78
- */
79
- function createITwinErrorTypeAsserter(namespace, errorKey) {
80
- return (error) => isITwinError(error, namespace, errorKey);
81
- }
82
- /**
83
- * get the meta data associated with this ITwinError, if any.
84
- * @param error The error for which metadata is required.
85
- * @beta
86
- */
87
- function getITwinErrorMetaData(error) {
88
- return (typeof error.metadata === "function") ? error.metadata() : error.metadata;
89
- }
90
- /**
91
- * type guard function that returns whether or not the passed in parameter is an [[ITwinError]]
92
- * @param error The error which is to ve verified.
93
- * @param namespace The namespace associated with the error.
94
- * @param errorKey The errorKey associated with the error.
95
- * @beta
96
- */
97
- function isITwinError(error, namespace, errorKey) {
98
- return error !== undefined && error !== null && typeof error === "object"
99
- && "namespace" in error && "errorKey" in error && "message" in error
100
- && (namespace === undefined || error.namespace === namespace)
101
- && (errorKey === undefined || error.errorKey === errorKey);
102
- }
103
- //# sourceMappingURL=ITwinError.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ITwinError.js","sourceRoot":"","sources":["../../src/ITwinError.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAuFH,kDAWC;AAWD,wDAKC;AAQD,oEAEC;AAOD,sDAEC;AASD,oCAKC;AA5HD;;;GAGG;AACU,QAAA,oBAAoB,GAAG,cAAc,CAAC;AAEnD;;;GAGG;AACU,QAAA,cAAc,GAAG;IAC5B,UAAU,EAAE,cAAc;IAC1B,WAAW,EAAE,sBAAsB;IACnC,iBAAiB,EAAE,qBAAqB;IACxC,iBAAiB,EAAE,qBAAqB;CAChC,CAAC;AAEX;;;GAGG;AACU,QAAA,kBAAkB,GAAoE;IACjG,YAAY,EAAE,GAAG,EAAE,CAAC,yCAAyC;IAC7D,aAAa,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,WAAW,EAAE,eAAe;IACnD,mBAAmB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,WAAW,EAAE,iBAAiB;IAC3D,mBAAmB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,WAAW,EAAE,qBAAqB;CAChE,CAAC;AA8BF;;;;;;;EAOE;AACF,SAAgB,mBAAmB,CAAC,SAAiB,EAAE,QAAgB,EAAE,OAAgB,EAAE,QAA0B;IAEnH,MAAM,KAAK,GAAG,IAAI,KAAK,EAAgB,CAAC;IACxC,KAAK,CAAC,OAAO,GAAG,OAAO,IAAI,GAAG,QAAQ,WAAW,CAAC;IACl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KAAK,IAAI,UAAU,IAAI,KAAK,IAAI,SAAS,IAAI,KAAK;WACjE,CAAC,SAAS,KAAK,SAAS,IAAK,KAAoB,CAAC,SAAS,KAAK,SAAS,CAAC;WAC1E,CAAC,QAAQ,KAAK,SAAS,IAAK,KAAoB,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC;AAC/E,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module iModels\n */\n\nimport { LoggingMetaData } from \"@itwin/core-bentley\";\nimport { LockState } from \"./IModelError\";\nimport { BriefcaseId } from \"./BriefcaseTypes\";\n\n/**\n * Detailed information about a particular object Lock that is causing the Lock update conflict.\n * An example of a lock update conflict would be attempting to use [LockControl.acquireLocks]($backend) on an object that is already locked by another Briefcase.\n * @beta\n */\nexport interface InUseLock {\n /** Id of the object that is causing conflict. */\n objectId: string;\n /**\n * The level of conflicting lock. Possible values are {@link LockState.Shared}, {@link LockState.Exclusive}.\n * See {@link LockState}.\n */\n state: LockState;\n /** An array of Briefcase ids that hold this lock. */\n briefcaseIds: BriefcaseId[];\n}\n\n/**\n * iTwinjs Core namespace namespace for a developer/application.\n * @beta\n */\nexport const iTwinjsCoreNamespace = \"itwinjs-core\";\n\n/**\n * error keys object used to describe an error keys for a developer/application.\n * @beta\n */\nexport const iTwinErrorKeys = {\n inUseLocks: \"in-use-locks\",\n channelNest: \"channel-may-not-nest\",\n channelNotAllowed: \"channel-not-allowed\",\n channelRootExists: \"channel-root-exists\"\n} as const;\n\n/**\n * Record for all itwin error messages.\n * @beta\n */\nexport const iTwinErrorMessages: Record<keyof typeof iTwinErrorKeys, (...args: any[]) => string> = {\n \"inUseLocks\": () => 'Objects are locked by another briefcase',\n \"channelNest\": (id) => `Channel ${id} may not nest`,\n \"channelNotAllowed\": (id) => `Channel ${id} is not allowed`,\n \"channelRootExists\": (id) => `Channel ${id} root already exist`,\n};\n\n\n/**\n * An interface used to describe an error for a developer/application. The message is not intended to be displayed to an end user.\n * This error interface should be extended when needing to throw errors with extra properties defined on them. See [[InUseLocksError]] for an example.\n * @beta\n */\nexport interface ITwinError extends Error {\n /** namespace for the error. This is a unique qualifier for the errorKey. */\n namespace: string;\n /** unique key for error, within namespace. All errorKeys within the same namespace must be unique. */\n errorKey: string;\n /** explanation of what went wrong. Intended to be read by a developer. */\n message: string;\n /** stack trace of the error. */\n stack?: string;\n /** metadata about the exception. */\n metadata?: LoggingMetaData;\n}\n\n/**\n * An error raised when there is a lock conflict detected.\n * Typically this error would be thrown by [LockControl.acquireLocks]($backend) when you are requesting a lock on an element that is already held by another briefcase.\n * @beta\n*/\nexport interface InUseLocksError extends ITwinError {\n inUseLocks: InUseLock[];\n}\n\n/**\n* A function which will be used to construct an [[ITwinError]].\n* @param namespace The namespace associated with the error.\n* @param errorKey The errorKey associated with the error.\n* @param message The message associated with the error.\n* @param metadata Metadata associated with the error.\n* @beta\n*/\nexport function constructITwinError(namespace: string, errorKey: string, message?: string, metadata?: LoggingMetaData): ITwinError {\n\n const error = new Error() as ITwinError;\n error.message = message ?? `${errorKey} occurred`;\n error.name = `${namespace}:${errorKey}`;\n error.namespace = namespace;\n error.errorKey = errorKey;\n error.metadata = metadata;\n\n Error.captureStackTrace(error, constructITwinError); // Optional, but this would hide constructITwinError from stack.\n return error;\n}\n\n/**\n* A function which constructs a detailed error for example [[ InUseLocksError ]] above.\n* @param namespace The namespace associated with the error.\n* @param errorKey The errorKey associated with the error.\n* @param details Other details associated with the error.\n* @param message The message associated with the error.\n* @param metadata Metadata associated with the error.\n* @beta\n*/\nexport function constructDetailedError<T extends ITwinError>(namespace: string, errorKey: string, details: Omit<T, keyof ITwinError>, message?: string, metadata?: LoggingMetaData): T {\n const baseError = constructITwinError(namespace, errorKey, message, metadata);\n\n Error.captureStackTrace(baseError, constructDetailedError); // Optional, but this would hide constructDetailedError from stack.\n return Object.assign(baseError, details) as T;\n}\n\n/**\n * a high level function that returns a type asserter function which would return whether or not the passed in parameter is an [[ITwinError]]\n * @param namespace The namespace associated with the error.\n * @param errorKey The errorKey associated with the error.\n * @beta\n*/\nexport function createITwinErrorTypeAsserter<T extends ITwinError>(namespace: string, errorKey: string) {\n return (error: unknown): error is T => isITwinError(error, namespace, errorKey);\n}\n\n/**\n * get the meta data associated with this ITwinError, if any.\n * @param error The error for which metadata is required.\n * @beta\n*/\nexport function getITwinErrorMetaData(error: ITwinError): object | undefined {\n return (typeof error.metadata === \"function\") ? error.metadata() : error.metadata;\n}\n\n/**\n * type guard function that returns whether or not the passed in parameter is an [[ITwinError]]\n * @param error The error which is to ve verified.\n * @param namespace The namespace associated with the error.\n * @param errorKey The errorKey associated with the error.\n * @beta\n*/\nexport function isITwinError(error: unknown, namespace?: string, errorKey?: string): error is ITwinError {\n return error !== undefined && error !== null && typeof error === \"object\"\n && \"namespace\" in error && \"errorKey\" in error && \"message\" in error\n && (namespace === undefined || (error as ITwinError).namespace === namespace)\n && (errorKey === undefined || (error as ITwinError).errorKey === errorKey);\n}\n"]}
@@ -1,108 +0,0 @@
1
- /** @packageDocumentation
2
- * @module iModels
3
- */
4
- import { LoggingMetaData } from "@itwin/core-bentley";
5
- import { LockState } from "./IModelError";
6
- import { BriefcaseId } from "./BriefcaseTypes";
7
- /**
8
- * Detailed information about a particular object Lock that is causing the Lock update conflict.
9
- * An example of a lock update conflict would be attempting to use [LockControl.acquireLocks]($backend) on an object that is already locked by another Briefcase.
10
- * @beta
11
- */
12
- export interface InUseLock {
13
- /** Id of the object that is causing conflict. */
14
- objectId: string;
15
- /**
16
- * The level of conflicting lock. Possible values are {@link LockState.Shared}, {@link LockState.Exclusive}.
17
- * See {@link LockState}.
18
- */
19
- state: LockState;
20
- /** An array of Briefcase ids that hold this lock. */
21
- briefcaseIds: BriefcaseId[];
22
- }
23
- /**
24
- * iTwinjs Core namespace namespace for a developer/application.
25
- * @beta
26
- */
27
- export declare const iTwinjsCoreNamespace = "itwinjs-core";
28
- /**
29
- * error keys object used to describe an error keys for a developer/application.
30
- * @beta
31
- */
32
- export declare const iTwinErrorKeys: {
33
- readonly inUseLocks: "in-use-locks";
34
- readonly channelNest: "channel-may-not-nest";
35
- readonly channelNotAllowed: "channel-not-allowed";
36
- readonly channelRootExists: "channel-root-exists";
37
- };
38
- /**
39
- * Record for all itwin error messages.
40
- * @beta
41
- */
42
- export declare const iTwinErrorMessages: Record<keyof typeof iTwinErrorKeys, (...args: any[]) => string>;
43
- /**
44
- * An interface used to describe an error for a developer/application. The message is not intended to be displayed to an end user.
45
- * This error interface should be extended when needing to throw errors with extra properties defined on them. See [[InUseLocksError]] for an example.
46
- * @beta
47
- */
48
- export interface ITwinError extends Error {
49
- /** namespace for the error. This is a unique qualifier for the errorKey. */
50
- namespace: string;
51
- /** unique key for error, within namespace. All errorKeys within the same namespace must be unique. */
52
- errorKey: string;
53
- /** explanation of what went wrong. Intended to be read by a developer. */
54
- message: string;
55
- /** stack trace of the error. */
56
- stack?: string;
57
- /** metadata about the exception. */
58
- metadata?: LoggingMetaData;
59
- }
60
- /**
61
- * An error raised when there is a lock conflict detected.
62
- * Typically this error would be thrown by [LockControl.acquireLocks]($backend) when you are requesting a lock on an element that is already held by another briefcase.
63
- * @beta
64
- */
65
- export interface InUseLocksError extends ITwinError {
66
- inUseLocks: InUseLock[];
67
- }
68
- /**
69
- * A function which will be used to construct an [[ITwinError]].
70
- * @param namespace The namespace associated with the error.
71
- * @param errorKey The errorKey associated with the error.
72
- * @param message The message associated with the error.
73
- * @param metadata Metadata associated with the error.
74
- * @beta
75
- */
76
- export declare function constructITwinError(namespace: string, errorKey: string, message?: string, metadata?: LoggingMetaData): ITwinError;
77
- /**
78
- * A function which constructs a detailed error for example [[ InUseLocksError ]] above.
79
- * @param namespace The namespace associated with the error.
80
- * @param errorKey The errorKey associated with the error.
81
- * @param details Other details associated with the error.
82
- * @param message The message associated with the error.
83
- * @param metadata Metadata associated with the error.
84
- * @beta
85
- */
86
- export declare function constructDetailedError<T extends ITwinError>(namespace: string, errorKey: string, details: Omit<T, keyof ITwinError>, message?: string, metadata?: LoggingMetaData): T;
87
- /**
88
- * a high level function that returns a type asserter function which would return whether or not the passed in parameter is an [[ITwinError]]
89
- * @param namespace The namespace associated with the error.
90
- * @param errorKey The errorKey associated with the error.
91
- * @beta
92
- */
93
- export declare function createITwinErrorTypeAsserter<T extends ITwinError>(namespace: string, errorKey: string): (error: unknown) => error is T;
94
- /**
95
- * get the meta data associated with this ITwinError, if any.
96
- * @param error The error for which metadata is required.
97
- * @beta
98
- */
99
- export declare function getITwinErrorMetaData(error: ITwinError): object | undefined;
100
- /**
101
- * type guard function that returns whether or not the passed in parameter is an [[ITwinError]]
102
- * @param error The error which is to ve verified.
103
- * @param namespace The namespace associated with the error.
104
- * @param errorKey The errorKey associated with the error.
105
- * @beta
106
- */
107
- export declare function isITwinError(error: unknown, namespace?: string, errorKey?: string): error is ITwinError;
108
- //# sourceMappingURL=ITwinError.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ITwinError.d.ts","sourceRoot":"","sources":["../../src/ITwinError.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,iDAAiD;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB,qDAAqD;IACrD,YAAY,EAAE,WAAW,EAAE,CAAC;CAC7B;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AAEnD;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;CAKjB,CAAC;AAEX;;;GAGG;AACH,eAAO,M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