@itwin/core-common 5.0.0-dev.93 → 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
@@ -1,14 +1,13 @@
1
1
  /** @packageDocumentation
2
2
  * @module iModels
3
3
  */
4
- import { BentleyError, BentleyStatus, BriefcaseStatus, ChangeSetStatus, DbResult, IModelStatus, LoggingMetaData } from "@itwin/core-bentley";
4
+ import { BentleyError, BentleyStatus, BriefcaseStatus, ChangeSetStatus, DbResult, IModelStatus, LegacyITwinErrorWithNumber, LoggingMetaData } from "@itwin/core-bentley";
5
5
  /** Numeric values for common errors produced by iTwin.js APIs, typically provided by [[IModelError]].
6
6
  * The values within each of these `enum`s are guaranteed not to conflict with one another.
7
7
  * @public
8
8
  */
9
9
  export type IModelErrorNumber = IModelStatus | DbResult | BentleyStatus | BriefcaseStatus | ChangeSetStatus;
10
10
  /** The error type thrown by this module.
11
- * Creating subclasses of IModelError should be avoided. Instead use [[ITwinError]].
12
11
  * @see [[ITwinError]]
13
12
  * @see [[IModelErrorNumber]] for commonly-used error codes.
14
13
  * @public
@@ -31,26 +30,37 @@ export declare enum LockState {
31
30
  }
32
31
  /** Detailed information about a particular object Lock that is causing the Lock update conflict.
33
32
  * 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.
34
- * @public @deprecated in 4.10 Use [InUseLock]($common) instead.
33
+ * @public
35
34
  */
36
35
  export interface ConflictingLock {
37
36
  /** Id of the object that is causing conflict. */
38
37
  objectId: string;
39
38
  /**
40
- * The level of conflicting lock. Possible values are {@link LockState.Shared}, {@link LockState.Exclusive}.
41
- * See {@link LockState}.
42
- */
39
+ * The level of conflicting lock. Possible values are {@link LockState.Shared}, {@link LockState.Exclusive}.
40
+ * See {@link LockState}.
41
+ */
43
42
  state: LockState;
44
43
  /** An array of Briefcase ids that hold this lock. */
45
44
  briefcaseIds: number[];
46
45
  }
46
+ /**
47
+ * Interface that describes the contents of `ConflictingLocksError` without relying on that class, since
48
+ * the exception may be marshalled across process boundaries and the class will not survive.
49
+ * @see ConflictingLocksError.isError
50
+ * @beta
51
+ */
52
+ export interface ConflictingLocks extends LegacyITwinErrorWithNumber {
53
+ conflictingLocks?: ConflictingLock[];
54
+ }
47
55
  /**
48
56
  * An error raised when there is a lock conflict detected.
49
57
  * 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.
50
- * @public @deprecated in 4.10 Use [InUseLocksError]($common) instead.
58
+ * @public
51
59
  */
52
60
  export declare class ConflictingLocksError extends IModelError {
53
61
  conflictingLocks?: ConflictingLock[];
62
+ /** @beta */
63
+ static isError<T extends ConflictingLocks>(error: any): error is T;
54
64
  constructor(message: string, getMetaData?: LoggingMetaData, conflictingLocks?: ConflictingLock[]);
55
65
  }
56
66
  /** @public */
@@ -1 +1 @@
1
- {"version":3,"file":"IModelError.d.ts","sourceRoot":"","sources":["../../src/IModelError.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EACL,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,QAAQ,EAAmB,YAAY,EAAE,eAAe,EACxH,MAAM,qBAAqB,CAAC;AAE7B;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,QAAQ,GAAG,aAAa,GAAG,eAAe,GAAG,eAAe,CAAC;AAE5G;;;;;GAKG;AACH,qBAAa,WAAY,SAAQ,YAAY;gBACxB,WAAW,EAAE,iBAAiB,GAAG,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,eAAe;CAG3G;AAED;;GAEG;AACH,oBAAY,SAAS;IACnB,gCAAgC;IAChC,IAAI,IAAI;IACR,mJAAmJ;IACnJ,MAAM,IAAI;IACV;;OAEG;IACH,SA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W,CAAC,EAAE,eAAe;CAG3G;AAED;;GAEG;AACH,oBAAY,SAAS;IACnB,gCAAgC;IAChC,IAAI,IAAI;IACR,mJAAmJ;IACnJ,MAAM,IAAI;IACV;;OAEG;IACH,SAAS,IAAI;CACd;AAED;;;EAGE;AACF,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB,qDAAqD;IACrD,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAiB,SAAQ,0BAA0B;IAClE,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;CACtC;AAED;;;;EAIE;AACF,qBAAa,qBAAsB,SAAQ,WAAW;IAC7C,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IAE5C,YAAY;WACW,OAAO,CAAC,CAAC,SAAS,gBAAgB,EAAE,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,CAAC;gBAGtE,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,eAAe,EAAE,gBAAgB,CAAC,EAAE,eAAe,EAAE;CAIjG;AAED,cAAc;AACd,qBAAa,WAAY,SAAQ,WAAW;gBACvB,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAIxD;AAED,cAAc;AACd,qBAAa,kBAAmB,SAAQ,WAAW;gBAC9B,OAAO,EAAE,MAAM;CAInC;AAED,cAAc;AACd,qBAAa,YAAa,SAAQ,WAAW;gBACxB,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,eAAe;CAIrG;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,WAAW;;CAI9C"}
@@ -10,7 +10,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.NoContentError = exports.BackendError = exports.ServerTimeoutError = exports.ServerError = exports.ConflictingLocksError = exports.LockState = exports.IModelError = void 0;
11
11
  const core_bentley_1 = require("@itwin/core-bentley");
12
12
  /** The error type thrown by this module.
13
- * Creating subclasses of IModelError should be avoided. Instead use [[ITwinError]].
14
13
  * @see [[ITwinError]]
15
14
  * @see [[IModelErrorNumber]] for commonly-used error codes.
16
15
  * @public
@@ -38,12 +37,14 @@ var LockState;
38
37
  /**
39
38
  * An error raised when there is a lock conflict detected.
40
39
  * 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.
41
- * @public @deprecated in 4.10 Use [InUseLocksError]($common) instead.
40
+ * @public
42
41
  */
43
42
  class ConflictingLocksError extends IModelError {
44
- // eslint-disable-next-line @typescript-eslint/no-deprecated
45
43
  conflictingLocks;
46
- // eslint-disable-next-line @typescript-eslint/no-deprecated
44
+ /** @beta */
45
+ static isError(error) {
46
+ return core_bentley_1.BentleyError.isError(error, core_bentley_1.IModelHubStatus.LockOwnedByAnotherBriefcase);
47
+ }
47
48
  constructor(message, getMetaData, conflictingLocks) {
48
49
  super(core_bentley_1.IModelHubStatus.LockOwnedByAnotherBriefcase, message, getMetaData);
49
50
  this.conflictingLocks = conflictingLocks;
@@ -1 +1 @@
1
- {"version":3,"file":"IModelError.js","sourceRoot":"","sources":["../../src/IModelError.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAE6B;AAQ7B;;;;;GAKG;AACH,MAAa,WAAY,SAAQ,2BAAY;IAC3C,YAAmB,WAAuC,EAAE,OAAe,EAAE,WAA6B;QACxG,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAC3C,CAAC;CACF;AAJD,kCAIC;AAED;;GAEG;AACH,IAAY,SASX;AATD,WAAY,SAAS;IACnB,gCAAgC;IAChC,yCAAQ,CAAA;IACR,mJAAmJ;IACnJ,6CAAU,CAAA;IACV;;OAEG;IACH,mDAAa,CAAA;AACf,CAAC,EATW,SAAS,yBAAT,SAAS,QASpB;AAkBD;;;;EAIE;AACF,MAAa,qBAAsB,SAAQ,WAAW;IACpD,4DAA4D;IACrD,gBAAgB,CAAqB;IAC5C,4DAA4D;IAC5D,YAAY,OAAe,EAAE,WAA6B,EAAE,gBAAoC;QAC9F,KAAK,CAAC,8BAAe,CAAC,2BAA2B,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QACzE,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IAC3C,CAAC;CAEF;AATD,sDASC;AAED,cAAc;AACd,MAAa,WAAY,SAAQ,WAAW;IAC1C,YAAmB,WAAmB,EAAE,OAAe;QACrD,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,iBAAiB,WAAW,GAAG,CAAC;IAC9C,CAAC;CACF;AALD,kCAKC;AAED,cAAc;AACd,MAAa,kBAAmB,SAAQ,WAAW;IACjD,YAAmB,OAAe;QAChC,KAAK,CAAC,2BAAY,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QAC3C,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AALD,gDAKC;AAED,cAAc;AACd,MAAa,YAAa,SAAQ,WAAW;IAC3C,YAAmB,WAAmB,EAAE,IAAY,EAAE,OAAe,EAAE,WAA6B;QAClG,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AALD,oCAKC;AAED;;GAEG;AACH,MAAa,cAAe,SAAQ,WAAW;IAC7C;QACE,KAAK,CAAC,2BAAY,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IAC9C,CAAC;CACF;AAJD,wCAIC","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 {\n BentleyError, BentleyStatus, BriefcaseStatus, ChangeSetStatus, DbResult, IModelHubStatus, IModelStatus, LoggingMetaData,\n} from \"@itwin/core-bentley\";\n\n/** Numeric values for common errors produced by iTwin.js APIs, typically provided by [[IModelError]].\n * The values within each of these `enum`s are guaranteed not to conflict with one another.\n * @public\n */\nexport type IModelErrorNumber = IModelStatus | DbResult | BentleyStatus | BriefcaseStatus | ChangeSetStatus;\n\n/** The error type thrown by this module.\n * Creating subclasses of IModelError should be avoided. Instead use [[ITwinError]].\n * @see [[ITwinError]]\n * @see [[IModelErrorNumber]] for commonly-used error codes.\n * @public\n */\nexport class IModelError extends BentleyError {\n public constructor(errorNumber: IModelErrorNumber | number, message: string, getMetaData?: LoggingMetaData) {\n super(errorNumber, message, getMetaData);\n }\n}\n\n/** The state of a lock. See [Acquiring locks on elements.]($docs/learning/backend/ConcurrencyControl.md#acquiring-locks-on-elements).\n * @public\n */\nexport enum LockState {\n /** The element is not locked */\n None = 0,\n /** Holding a shared lock on an element blocks other users from acquiring the Exclusive lock it. More than one user may acquire the shared lock. */\n Shared = 1,\n /** A Lock that permits modifications to an element and blocks other users from making modifications to it.\n * Holding an exclusive lock on an \"owner\" (a model or a parent element), implicitly exclusively locks all its members.\n */\n Exclusive = 2,\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 * @public @deprecated in 4.10 Use [InUseLock]($common) instead.\n*/\nexport interface ConflictingLock {\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: number[];\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 * @public @deprecated in 4.10 Use [InUseLocksError]($common) instead.\n*/\nexport class ConflictingLocksError extends IModelError {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public conflictingLocks?: ConflictingLock[];\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n constructor(message: string, getMetaData?: LoggingMetaData, conflictingLocks?: ConflictingLock[]) {\n super(IModelHubStatus.LockOwnedByAnotherBriefcase, message, getMetaData);\n this.conflictingLocks = conflictingLocks;\n }\n\n}\n\n/** @public */\nexport class ServerError extends IModelError {\n public constructor(errorNumber: number, message: string) {\n super(errorNumber, message);\n this.name = `Server error (${errorNumber})`;\n }\n}\n\n/** @public */\nexport class ServerTimeoutError extends ServerError {\n public constructor(message: string) {\n super(IModelStatus.ServerTimeout, message);\n this.name = \"Server timeout error\";\n }\n}\n\n/** @public */\nexport class BackendError extends IModelError {\n public constructor(errorNumber: number, name: string, message: string, getMetaData?: LoggingMetaData) {\n super(errorNumber, message, getMetaData);\n this.name = name;\n }\n}\n\n/** Intended for API \"no content\" semantics where the error case should not trigger application failure monitoring systems.\n * @public\n */\nexport class NoContentError extends IModelError {\n public constructor() {\n super(IModelStatus.NoContent, \"No Content\");\n }\n}\n"]}
1
+ {"version":3,"file":"IModelError.js","sourceRoot":"","sources":["../../src/IModelError.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAE6B;AAQ7B;;;;GAIG;AACH,MAAa,WAAY,SAAQ,2BAAY;IAC3C,YAAmB,WAAuC,EAAE,OAAe,EAAE,WAA6B;QACxG,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAC3C,CAAC;CACF;AAJD,kCAIC;AAED;;GAEG;AACH,IAAY,SASX;AATD,WAAY,SAAS;IACnB,gCAAgC;IAChC,yCAAQ,CAAA;IACR,mJAAmJ;IACnJ,6CAAU,CAAA;IACV;;OAEG;IACH,mDAAa,CAAA;AACf,CAAC,EATW,SAAS,yBAAT,SAAS,QASpB;AA4BD;;;;EAIE;AACF,MAAa,qBAAsB,SAAQ,WAAW;IAC7C,gBAAgB,CAAqB;IAE5C,YAAY;IACL,MAAM,CAAU,OAAO,CAA6B,KAAU;QACnE,OAAO,2BAAY,CAAC,OAAO,CAAC,KAAK,EAAE,8BAAe,CAAC,2BAA2B,CAAC,CAAC;IAClF,CAAC;IACD,YAAY,OAAe,EAAE,WAA6B,EAAE,gBAAoC;QAC9F,KAAK,CAAC,8BAAe,CAAC,2BAA2B,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QACzE,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IAC3C,CAAC;CACF;AAXD,sDAWC;AAED,cAAc;AACd,MAAa,WAAY,SAAQ,WAAW;IAC1C,YAAmB,WAAmB,EAAE,OAAe;QACrD,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,iBAAiB,WAAW,GAAG,CAAC;IAC9C,CAAC;CACF;AALD,kCAKC;AAED,cAAc;AACd,MAAa,kBAAmB,SAAQ,WAAW;IACjD,YAAmB,OAAe;QAChC,KAAK,CAAC,2BAAY,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QAC3C,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AALD,gDAKC;AAED,cAAc;AACd,MAAa,YAAa,SAAQ,WAAW;IAC3C,YAAmB,WAAmB,EAAE,IAAY,EAAE,OAAe,EAAE,WAA6B;QAClG,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AALD,oCAKC;AAED;;GAEG;AACH,MAAa,cAAe,SAAQ,WAAW;IAC7C;QACE,KAAK,CAAC,2BAAY,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IAC9C,CAAC;CACF;AAJD,wCAIC","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 {\n BentleyError, BentleyStatus, BriefcaseStatus, ChangeSetStatus, DbResult, IModelHubStatus, IModelStatus, LegacyITwinErrorWithNumber, LoggingMetaData,\n} from \"@itwin/core-bentley\";\n\n/** Numeric values for common errors produced by iTwin.js APIs, typically provided by [[IModelError]].\n * The values within each of these `enum`s are guaranteed not to conflict with one another.\n * @public\n */\nexport type IModelErrorNumber = IModelStatus | DbResult | BentleyStatus | BriefcaseStatus | ChangeSetStatus;\n\n/** The error type thrown by this module.\n * @see [[ITwinError]]\n * @see [[IModelErrorNumber]] for commonly-used error codes.\n * @public\n */\nexport class IModelError extends BentleyError {\n public constructor(errorNumber: IModelErrorNumber | number, message: string, getMetaData?: LoggingMetaData) {\n super(errorNumber, message, getMetaData);\n }\n}\n\n/** The state of a lock. See [Acquiring locks on elements.]($docs/learning/backend/ConcurrencyControl.md#acquiring-locks-on-elements).\n * @public\n */\nexport enum LockState {\n /** The element is not locked */\n None = 0,\n /** Holding a shared lock on an element blocks other users from acquiring the Exclusive lock it. More than one user may acquire the shared lock. */\n Shared = 1,\n /** A Lock that permits modifications to an element and blocks other users from making modifications to it.\n * Holding an exclusive lock on an \"owner\" (a model or a parent element), implicitly exclusively locks all its members.\n */\n Exclusive = 2,\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 * @public\n*/\nexport interface ConflictingLock {\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: number[];\n}\n\n/**\n * Interface that describes the contents of `ConflictingLocksError` without relying on that class, since\n * the exception may be marshalled across process boundaries and the class will not survive.\n * @see ConflictingLocksError.isError\n * @beta\n */\nexport interface ConflictingLocks extends LegacyITwinErrorWithNumber {\n conflictingLocks?: ConflictingLock[];\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 * @public\n*/\nexport class ConflictingLocksError extends IModelError { // implements ConflictingLocks, but that's @beta\n public conflictingLocks?: ConflictingLock[];\n\n /** @beta */\n public static override isError<T extends ConflictingLocks>(error: any): error is T {\n return BentleyError.isError(error, IModelHubStatus.LockOwnedByAnotherBriefcase);\n }\n constructor(message: string, getMetaData?: LoggingMetaData, conflictingLocks?: ConflictingLock[]) {\n super(IModelHubStatus.LockOwnedByAnotherBriefcase, message, getMetaData);\n this.conflictingLocks = conflictingLocks;\n }\n}\n\n/** @public */\nexport class ServerError extends IModelError {\n public constructor(errorNumber: number, message: string) {\n super(errorNumber, message);\n this.name = `Server error (${errorNumber})`;\n }\n}\n\n/** @public */\nexport class ServerTimeoutError extends ServerError {\n public constructor(message: string) {\n super(IModelStatus.ServerTimeout, message);\n this.name = \"Server timeout error\";\n }\n}\n\n/** @public */\nexport class BackendError extends IModelError {\n public constructor(errorNumber: number, name: string, message: string, getMetaData?: LoggingMetaData) {\n super(errorNumber, message, getMetaData);\n this.name = name;\n }\n}\n\n/** Intended for API \"no content\" semantics where the error case should not trigger application failure monitoring systems.\n * @public\n */\nexport class NoContentError extends IModelError {\n public constructor() {\n super(IModelStatus.NoContent, \"No Content\");\n }\n}\n"]}
@@ -0,0 +1,28 @@
1
+ /** @packageDocumentation
2
+ * @module iModels
3
+ */
4
+ import { ITwinError } from "@itwin/core-bentley";
5
+ /** An error originating from the [[ChannelControl]] interface.
6
+ * @beta
7
+ */
8
+ export interface ChannelError extends ITwinError {
9
+ /** The channel key that caused the error. */
10
+ readonly channelKey: string;
11
+ }
12
+ /** @beta */
13
+ export declare namespace ChannelError {
14
+ const scope = "itwin-channel-errors";
15
+ /** The set of keys identifying the different kinds of `ChannelError`s */
16
+ type Key =
17
+ /** an attempt to create a channel within an existing channel */
18
+ "may-not-nest" |
19
+ /** an attempt to use a channel that was not "allowed" */
20
+ "not-allowed" |
21
+ /** the root channel already exists */
22
+ "root-exists";
23
+ /** Instantiate and throw a ChannelError */
24
+ function throwError(key: Key, message: string, channelKey: string): never;
25
+ /** Determine whether an error object is a ChannelError */
26
+ function isError(error: unknown, key?: Key): error is ChannelError;
27
+ }
28
+ //# sourceMappingURL=ITwinCoreErrors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITwinCoreErrors.d.ts","sourceRoot":"","sources":["../../src/ITwinCoreErrors.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,UAAU;IAC9C,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,YAAY;AACZ,yBAAiB,YAAY,CAAC;IAErB,MAAM,KAAK,yBAAyB,CAAC;IAE5C,yEAAyE;IACzE,KAAY,GAAG;IACb,gEAAgE;IAChE,cAAc;IACd,yDAAyD;IACzD,aAAa;IACb,sCAAsC;IACtC,aAAa,CAAC;IAEhB,2CAA2C;IAC3C,SAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,KAAK,CAE/E;IACD,0DAA0D;IAC1D,SAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,IAAI,YAAY,CAExE;CACF"}
@@ -0,0 +1,28 @@
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.ChannelError = void 0;
11
+ const core_bentley_1 = require("@itwin/core-bentley");
12
+ /** @beta */
13
+ var ChannelError;
14
+ (function (ChannelError) {
15
+ // the scope for all `ChannelError`s.
16
+ ChannelError.scope = "itwin-channel-errors";
17
+ /** Instantiate and throw a ChannelError */
18
+ function throwError(key, message, channelKey) {
19
+ core_bentley_1.ITwinError.throwError({ iTwinErrorId: { scope: ChannelError.scope, key }, message, channelKey });
20
+ }
21
+ ChannelError.throwError = throwError;
22
+ /** Determine whether an error object is a ChannelError */
23
+ function isError(error, key) {
24
+ return core_bentley_1.ITwinError.isError(error, ChannelError.scope, key) && typeof error.channelKey === "string";
25
+ }
26
+ ChannelError.isError = isError;
27
+ })(ChannelError || (exports.ChannelError = ChannelError = {}));
28
+ //# sourceMappingURL=ITwinCoreErrors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITwinCoreErrors.js","sourceRoot":"","sources":["../../src/ITwinCoreErrors.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAiD;AAUjD,YAAY;AACZ,IAAiB,YAAY,CAqB5B;AArBD,WAAiB,YAAY;IAC3B,qCAAqC;IACxB,kBAAK,GAAG,sBAAsB,CAAC;IAW5C,2CAA2C;IAC3C,SAAgB,UAAU,CAAC,GAAQ,EAAE,OAAe,EAAE,UAAkB;QACtE,yBAAU,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,yBAAU,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,4BAAZ,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,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,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,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C,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC;AACjD,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,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,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AC5C,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"}
@@ -44,8 +44,8 @@ __exportStar(require("./ContextRealityModel"), exports);
44
44
  __exportStar(require("./DisplayStyleSettings"), exports);
45
45
  __exportStar(require("./domains/FunctionalElementProps"), exports);
46
46
  __exportStar(require("./domains/GenericElementProps"), exports);
47
- __exportStar(require("./ECSqlTypes"), exports);
48
47
  __exportStar(require("./ECSchemaProps"), exports);
48
+ __exportStar(require("./ECSqlTypes"), exports);
49
49
  __exportStar(require("./ElementMesh"), exports);
50
50
  __exportStar(require("./ElementProps"), exports);
51
51
  __exportStar(require("./EmphasizeElementsProps"), exports);
@@ -88,7 +88,7 @@ __exportStar(require("./Image"), exports);
88
88
  __exportStar(require("./IModel"), exports);
89
89
  __exportStar(require("./IModelError"), exports);
90
90
  __exportStar(require("./IModelVersion"), exports);
91
- __exportStar(require("./ITwinError"), exports);
91
+ __exportStar(require("./ITwinCoreErrors"), exports);
92
92
  __exportStar(require("./ipc/IpcSocket"), exports);
93
93
  __exportStar(require("./ipc/IpcWebSocket"), exports);
94
94
  __exportStar(require("./ipc/IpcWebSocketTransport"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"core-common.js","sourceRoot":"","sources":["../../src/core-common.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,qDAAmC;AACnC,kDAAgC;AAChC,8DAA4C;AAC5C,yDAAuC;AACvC,sEAAoD;AACpD,qEAAmD;AACnD,yDAAuC;AACvC,+CAA6B;AAC7B,wDAAsC;AACtC,0DAAwC;AACxC,0DAAwC;AACxC,wDAAsC;AACtC,mDAAiC;AACjC,2CAAyB;AACzB,oDAAkC;AAClC,oDAAkC;AAClC,mDAAiC;AACjC,8CAA4B;AAC5B,yCAAuB;AACvB,gDAA8B;AAC9B,6CAA2B;AAC3B,yDAAuC;AACvC,wDAAsC;AACtC,yDAAuC;AACvC,mEAAiD;AACjD,gEAA8C;AAC9C,+CAA6B;AAC7B,kDAAgC;AAChC,gDAA8B;AAC9B,iDAA+B;AAC/B,2DAAyC;AACzC,gDAA8B;AAC9B,oDAAkC;AAClC,gDAA8B;AAC9B,iDAA+B;AAC/B,qDAAmC;AACnC,iDAA+B;AAC/B,0CAAwB;AACxB,4CAA0B;AAC1B,0DAAwC;AACxC,0DAAwC;AACxC,iEAA+C;AAC/C,yDAAuC;AACvC,4DAA0C;AAC1C,0DAAwC;AACxC,uEAAqD;AACrD,6DAA2C;AAC3C,2DAAyC;AACzC,2DAAyC;AACzC,+DAA6C;AAC7C,4DAA0C;AAC1C,0DAAwC;AACxC,uDAAqC;AACrC,uDAAqC;AACrC,wDAAsC;AACtC,wDAAsC;AACtC,wDAAsC;AACtC,mDAAiC;AACjC,oDAAkC;AAClC,6CAA2B;AAC3B,kDAAgC;AAChC,gDAA8B;AAC9B,+CAA6B;AAC7B,2CAAyB;AACzB,6CAA2B;AAC3B,6CAA2B;AAC3B,0CAA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DAAuC;AACvC,oDAAkC;AAClC,oDAAkC;AAClC,sDAAoC;AACpC,oDAAkC;AAClC,gDAA8B;AAC9B,sDAAoC;AACpC,yDAAuC;AACvC,iEAA+C;AAE/C,2DAAyC;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,qDAAmC;AACnC,kDAAgC;AAChC,8DAA4C;AAC5C,yDAAuC;AACvC,sEAAoD;AACpD,qEAAmD;AACnD,yDAAuC;AACvC,+CAA6B;AAC7B,wDAAsC;AACtC,0DAAwC;AACxC,0DAAwC;AACxC,wDAAsC;AACtC,mDAAiC;AACjC,2CAAyB;AACzB,oDAAkC;AAClC,oDAAkC;AAClC,mDAAiC;AACjC,8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B,+CAA6B;AAC7B,iDAA+B;AAC/B,2CAAyB;AACzB,mDAAiC;AACjC,iDAA+B;AAC/B,0DAAwC;AACxC,0DAAwC;AACxC,wDAAsC;AACtC,oDAAkC;AAClC,mDAAiC;AACjC,iDAA+B;AAC/B,oDAAkC;AAClC,mDAAiC;AACjC,8CAA4B;AAC5B,8CAA4B;AAC5B,0CAAwB;AACxB,8CAA4B;AAC5B,gDAA8B;AAC9B,8CAA4B;AAC5B,8CAA4B;AAC5B,0DAAwC;AACxC,wDAAsC;AACtC,2DAAyC;AACzC,kEAAgD;AAChD,2DAAyC;AACzC,0DAAwC;AACxC,6DAA2C;AAC3C,yDAAuC;AACvC,yDAAuC;AACvC,wDAAsC;AACtC,+DAA6C;AAC7C,6DAA2C;AAC3C,qDAAmC;AACnC,8DAA4C;AAC5C,6DAA2C;AAC3C,+DAA6C;AAC7C,+DAA6C;AAC7C,mEAAiD;AACjD,uDAAqC;AACrC,iDAA+B;AAC/B,mEAAiD;AACjD,oEAAkD;AAClD,oDAAkC;AAClC,yDAAuC;AACvC,8DAA4C;AAC5C,6DAA2C;AAC3C,6DAA2C;AAC3C,oDAAkC;AAClC,yDAAuC;AACvC,yDAAuC;AACvC,oDAAkC;AAClC,oDAAkC;AAClC,sDAAoC;AACpC,oDAAkC;AAClC,gDAA8B;AAC9B,sDAAoC;AACpC,yDAAuC;AACvC,iEAA+C;AAE/C,2DAAyC;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;IAAE,MAAM,CAAC,EAAE,KAAK,CAAC;IAAC,UAAU,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,eAAe,CAAA;KAAE,CAAA;CAAE,GACpO;IAAE,MAAM,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IAAC,UAAU,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,eAAe,CAAC;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAA;CAAE,CAAC;AACxK;;;;;EAK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E,MAAM,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAA;AAEjG;;;;;EAKE;AACF,MAAM,WAAW,SAAS;IACxB;;;;;;OAMG;IACH,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAChD;;;;;OAKG;IACH,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,KAAK,cAAc,CAAC;IACxE;;;;OAIG;IACH,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,KAAK,IAAI,CAAC;CAClE;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD;;;;;;;;;OASG;IACH,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;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;AACE,MAAM,YAAY,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,SAAS,OAAO,EAAE,CAAC;AAAvD,QAAA,YAAY,gBAA2C","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;AACE,MAAM,YAAY,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,SAAS,OAAO,EAAE,CAAC;AAAvD,QAAA,YAAY,gBAA2C","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"]}
@@ -1,14 +1,13 @@
1
1
  /** @packageDocumentation
2
2
  * @module iModels
3
3
  */
4
- import { BentleyError, BentleyStatus, BriefcaseStatus, ChangeSetStatus, DbResult, IModelStatus, LoggingMetaData } from "@itwin/core-bentley";
4
+ import { BentleyError, BentleyStatus, BriefcaseStatus, ChangeSetStatus, DbResult, IModelStatus, LegacyITwinErrorWithNumber, LoggingMetaData } from "@itwin/core-bentley";
5
5
  /** Numeric values for common errors produced by iTwin.js APIs, typically provided by [[IModelError]].
6
6
  * The values within each of these `enum`s are guaranteed not to conflict with one another.
7
7
  * @public
8
8
  */
9
9
  export type IModelErrorNumber = IModelStatus | DbResult | BentleyStatus | BriefcaseStatus | ChangeSetStatus;
10
10
  /** The error type thrown by this module.
11
- * Creating subclasses of IModelError should be avoided. Instead use [[ITwinError]].
12
11
  * @see [[ITwinError]]
13
12
  * @see [[IModelErrorNumber]] for commonly-used error codes.
14
13
  * @public
@@ -31,26 +30,37 @@ export declare enum LockState {
31
30
  }
32
31
  /** Detailed information about a particular object Lock that is causing the Lock update conflict.
33
32
  * 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.
34
- * @public @deprecated in 4.10 Use [InUseLock]($common) instead.
33
+ * @public
35
34
  */
36
35
  export interface ConflictingLock {
37
36
  /** Id of the object that is causing conflict. */
38
37
  objectId: string;
39
38
  /**
40
- * The level of conflicting lock. Possible values are {@link LockState.Shared}, {@link LockState.Exclusive}.
41
- * See {@link LockState}.
42
- */
39
+ * The level of conflicting lock. Possible values are {@link LockState.Shared}, {@link LockState.Exclusive}.
40
+ * See {@link LockState}.
41
+ */
43
42
  state: LockState;
44
43
  /** An array of Briefcase ids that hold this lock. */
45
44
  briefcaseIds: number[];
46
45
  }
46
+ /**
47
+ * Interface that describes the contents of `ConflictingLocksError` without relying on that class, since
48
+ * the exception may be marshalled across process boundaries and the class will not survive.
49
+ * @see ConflictingLocksError.isError
50
+ * @beta
51
+ */
52
+ export interface ConflictingLocks extends LegacyITwinErrorWithNumber {
53
+ conflictingLocks?: ConflictingLock[];
54
+ }
47
55
  /**
48
56
  * An error raised when there is a lock conflict detected.
49
57
  * 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.
50
- * @public @deprecated in 4.10 Use [InUseLocksError]($common) instead.
58
+ * @public
51
59
  */
52
60
  export declare class ConflictingLocksError extends IModelError {
53
61
  conflictingLocks?: ConflictingLock[];
62
+ /** @beta */
63
+ static isError<T extends ConflictingLocks>(error: any): error is T;
54
64
  constructor(message: string, getMetaData?: LoggingMetaData, conflictingLocks?: ConflictingLock[]);
55
65
  }
56
66
  /** @public */
@@ -1 +1 @@
1
- {"version":3,"file":"IModelError.d.ts","sourceRoot":"","sources":["../../src/IModelError.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EACL,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,QAAQ,EAAmB,YAAY,EAAE,eAAe,EACxH,MAAM,qBAAqB,CAAC;AAE7B;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,QAAQ,GAAG,aAAa,GAAG,eAAe,GAAG,eAAe,CAAC;AAE5G;;;;;GAKG;AACH,qBAAa,WAAY,SAAQ,YAAY;gBACxB,WAAW,EAAE,iBAAiB,GAAG,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,eAAe;CAG3G;AAED;;GAEG;AACH,oBAAY,SAAS;IACnB,gCAAgC;IAChC,IAAI,IAAI;IACR,mJAAmJ;IACnJ,MAAM,IAAI;IACV;;OAEG;IACH,SAAS,IAAI;CACd;AAED;;;EAGE;AACF,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB;;;SAGK;IACL,KAAK,EAAE,SAAS,CAAC;IACjB,qDAAqD;IACrD,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;;;EAIE;AACF,qBAAa,qBAAsB,SAAQ,WAAW;IAE7C,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;gBAEhC,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,eAAe,EAAE,gBAAgB,CAAC,EAAE,eAAe,EAAE;CAKjG;AAED,cAAc;AACd,qBAAa,WAAY,SAAQ,WAAW;gBACvB,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAIxD;AAED,cAAc;AACd,qBAAa,kBAAmB,SAAQ,WAAW;gBA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;IAE5C,YAAY;WACW,OAAO,CAAC,CAAC,SAAS,gBAAgB,EAAE,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,CAAC;gBAGtE,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,eAAe,EAAE,gBAAgB,CAAC,EAAE,eAAe,EAAE;CAIjG;AAED,cAAc;AACd,qBAAa,WAAY,SAAQ,WAAW;gBACvB,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAIxD;AAED,cAAc;AACd,qBAAa,kBAAmB,SAAQ,WAAW;gBAC9B,OAAO,EAAE,MAAM;CAInC;AAED,cAAc;AACd,qBAAa,YAAa,SAAQ,WAAW;gBACxB,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,eAAe;CAIrG;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,WAAW;;CAI9C"}
@@ -7,7 +7,6 @@
7
7
  */
8
8
  import { BentleyError, IModelHubStatus, IModelStatus, } from "@itwin/core-bentley";
9
9
  /** The error type thrown by this module.
10
- * Creating subclasses of IModelError should be avoided. Instead use [[ITwinError]].
11
10
  * @see [[ITwinError]]
12
11
  * @see [[IModelErrorNumber]] for commonly-used error codes.
13
12
  * @public
@@ -34,12 +33,14 @@ export var LockState;
34
33
  /**
35
34
  * An error raised when there is a lock conflict detected.
36
35
  * 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.
37
- * @public @deprecated in 4.10 Use [InUseLocksError]($common) instead.
36
+ * @public
38
37
  */
39
38
  export class ConflictingLocksError extends IModelError {
40
- // eslint-disable-next-line @typescript-eslint/no-deprecated
41
39
  conflictingLocks;
42
- // eslint-disable-next-line @typescript-eslint/no-deprecated
40
+ /** @beta */
41
+ static isError(error) {
42
+ return BentleyError.isError(error, IModelHubStatus.LockOwnedByAnotherBriefcase);
43
+ }
43
44
  constructor(message, getMetaData, conflictingLocks) {
44
45
  super(IModelHubStatus.LockOwnedByAnotherBriefcase, message, getMetaData);
45
46
  this.conflictingLocks = conflictingLocks;
@@ -1 +1 @@
1
- {"version":3,"file":"IModelError.js","sourceRoot":"","sources":["../../src/IModelError.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EACL,YAAY,EAA6D,eAAe,EAAE,YAAY,GACvG,MAAM,qBAAqB,CAAC;AAQ7B;;;;;GAKG;AACH,MAAM,OAAO,WAAY,SAAQ,YAAY;IAC3C,YAAmB,WAAuC,EAAE,OAAe,EAAE,WAA6B;QACxG,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAC3C,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,SASX;AATD,WAAY,SAAS;IACnB,gCAAgC;IAChC,yCAAQ,CAAA;IACR,mJAAmJ;IACnJ,6CAAU,CAAA;IACV;;OAEG;IACH,mDAAa,CAAA;AACf,CAAC,EATW,SAAS,KAAT,SAAS,QASpB;AAkBD;;;;EAIE;AACF,MAAM,OAAO,qBAAsB,SAAQ,WAAW;IACpD,4DAA4D;IACrD,gBAAgB,CAAqB;IAC5C,4DAA4D;IAC5D,YAAY,OAAe,EAAE,WAA6B,EAAE,gBAAoC;QAC9F,KAAK,CAAC,eAAe,CAAC,2BAA2B,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QACzE,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IAC3C,CAAC;CAEF;AAED,cAAc;AACd,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C,YAAmB,WAAmB,EAAE,OAAe;QACrD,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,iBAAiB,WAAW,GAAG,CAAC;IAC9C,CAAC;CACF;AAED,cAAc;AACd,MAAM,OAAO,kBAAmB,SAAQ,WAAW;IACjD,YAAmB,OAAe;QAChC,KAAK,CAAC,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QAC3C,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED,cAAc;AACd,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C,YAAmB,WAAmB,EAAE,IAAY,EAAE,OAAe,EAAE,WAA6B;QAClG,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C;QACE,KAAK,CAAC,YAAY,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IAC9C,CAAC;CACF","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 {\n BentleyError, BentleyStatus, BriefcaseStatus, ChangeSetStatus, DbResult, IModelHubStatus, IModelStatus, LoggingMetaData,\n} from \"@itwin/core-bentley\";\n\n/** Numeric values for common errors produced by iTwin.js APIs, typically provided by [[IModelError]].\n * The values within each of these `enum`s are guaranteed not to conflict with one another.\n * @public\n */\nexport type IModelErrorNumber = IModelStatus | DbResult | BentleyStatus | BriefcaseStatus | ChangeSetStatus;\n\n/** The error type thrown by this module.\n * Creating subclasses of IModelError should be avoided. Instead use [[ITwinError]].\n * @see [[ITwinError]]\n * @see [[IModelErrorNumber]] for commonly-used error codes.\n * @public\n */\nexport class IModelError extends BentleyError {\n public constructor(errorNumber: IModelErrorNumber | number, message: string, getMetaData?: LoggingMetaData) {\n super(errorNumber, message, getMetaData);\n }\n}\n\n/** The state of a lock. See [Acquiring locks on elements.]($docs/learning/backend/ConcurrencyControl.md#acquiring-locks-on-elements).\n * @public\n */\nexport enum LockState {\n /** The element is not locked */\n None = 0,\n /** Holding a shared lock on an element blocks other users from acquiring the Exclusive lock it. More than one user may acquire the shared lock. */\n Shared = 1,\n /** A Lock that permits modifications to an element and blocks other users from making modifications to it.\n * Holding an exclusive lock on an \"owner\" (a model or a parent element), implicitly exclusively locks all its members.\n */\n Exclusive = 2,\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 * @public @deprecated in 4.10 Use [InUseLock]($common) instead.\n*/\nexport interface ConflictingLock {\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: number[];\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 * @public @deprecated in 4.10 Use [InUseLocksError]($common) instead.\n*/\nexport class ConflictingLocksError extends IModelError {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public conflictingLocks?: ConflictingLock[];\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n constructor(message: string, getMetaData?: LoggingMetaData, conflictingLocks?: ConflictingLock[]) {\n super(IModelHubStatus.LockOwnedByAnotherBriefcase, message, getMetaData);\n this.conflictingLocks = conflictingLocks;\n }\n\n}\n\n/** @public */\nexport class ServerError extends IModelError {\n public constructor(errorNumber: number, message: string) {\n super(errorNumber, message);\n this.name = `Server error (${errorNumber})`;\n }\n}\n\n/** @public */\nexport class ServerTimeoutError extends ServerError {\n public constructor(message: string) {\n super(IModelStatus.ServerTimeout, message);\n this.name = \"Server timeout error\";\n }\n}\n\n/** @public */\nexport class BackendError extends IModelError {\n public constructor(errorNumber: number, name: string, message: string, getMetaData?: LoggingMetaData) {\n super(errorNumber, message, getMetaData);\n this.name = name;\n }\n}\n\n/** Intended for API \"no content\" semantics where the error case should not trigger application failure monitoring systems.\n * @public\n */\nexport class NoContentError extends IModelError {\n public constructor() {\n super(IModelStatus.NoContent, \"No Content\");\n }\n}\n"]}
1
+ {"version":3,"file":"IModelError.js","sourceRoot":"","sources":["../../src/IModelError.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EACL,YAAY,EAA6D,eAAe,EAAE,YAAY,GACvG,MAAM,qBAAqB,CAAC;AAQ7B;;;;GAIG;AACH,MAAM,OAAO,WAAY,SAAQ,YAAY;IAC3C,YAAmB,WAAuC,EAAE,OAAe,EAAE,WAA6B;QACxG,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAC3C,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,SASX;AATD,WAAY,SAAS;IACnB,gCAAgC;IAChC,yCAAQ,CAAA;IACR,mJAAmJ;IACnJ,6CAAU,CAAA;IACV;;OAEG;IACH,mDAAa,CAAA;AACf,CAAC,EATW,SAAS,KAAT,SAAS,QASpB;AA4BD;;;;EAIE;AACF,MAAM,OAAO,qBAAsB,SAAQ,WAAW;IAC7C,gBAAgB,CAAqB;IAE5C,YAAY;IACL,MAAM,CAAU,OAAO,CAA6B,KAAU;QACnE,OAAO,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE,eAAe,CAAC,2BAA2B,CAAC,CAAC;IAClF,CAAC;IACD,YAAY,OAAe,EAAE,WAA6B,EAAE,gBAAoC;QAC9F,KAAK,CAAC,eAAe,CAAC,2BAA2B,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QACzE,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IAC3C,CAAC;CACF;AAED,cAAc;AACd,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C,YAAmB,WAAmB,EAAE,OAAe;QACrD,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,iBAAiB,WAAW,GAAG,CAAC;IAC9C,CAAC;CACF;AAED,cAAc;AACd,MAAM,OAAO,kBAAmB,SAAQ,WAAW;IACjD,YAAmB,OAAe;QAChC,KAAK,CAAC,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QAC3C,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED,cAAc;AACd,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C,YAAmB,WAAmB,EAAE,IAAY,EAAE,OAAe,EAAE,WAA6B;QAClG,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C;QACE,KAAK,CAAC,YAAY,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IAC9C,CAAC;CACF","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 {\n BentleyError, BentleyStatus, BriefcaseStatus, ChangeSetStatus, DbResult, IModelHubStatus, IModelStatus, LegacyITwinErrorWithNumber, LoggingMetaData,\n} from \"@itwin/core-bentley\";\n\n/** Numeric values for common errors produced by iTwin.js APIs, typically provided by [[IModelError]].\n * The values within each of these `enum`s are guaranteed not to conflict with one another.\n * @public\n */\nexport type IModelErrorNumber = IModelStatus | DbResult | BentleyStatus | BriefcaseStatus | ChangeSetStatus;\n\n/** The error type thrown by this module.\n * @see [[ITwinError]]\n * @see [[IModelErrorNumber]] for commonly-used error codes.\n * @public\n */\nexport class IModelError extends BentleyError {\n public constructor(errorNumber: IModelErrorNumber | number, message: string, getMetaData?: LoggingMetaData) {\n super(errorNumber, message, getMetaData);\n }\n}\n\n/** The state of a lock. See [Acquiring locks on elements.]($docs/learning/backend/ConcurrencyControl.md#acquiring-locks-on-elements).\n * @public\n */\nexport enum LockState {\n /** The element is not locked */\n None = 0,\n /** Holding a shared lock on an element blocks other users from acquiring the Exclusive lock it. More than one user may acquire the shared lock. */\n Shared = 1,\n /** A Lock that permits modifications to an element and blocks other users from making modifications to it.\n * Holding an exclusive lock on an \"owner\" (a model or a parent element), implicitly exclusively locks all its members.\n */\n Exclusive = 2,\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 * @public\n*/\nexport interface ConflictingLock {\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: number[];\n}\n\n/**\n * Interface that describes the contents of `ConflictingLocksError` without relying on that class, since\n * the exception may be marshalled across process boundaries and the class will not survive.\n * @see ConflictingLocksError.isError\n * @beta\n */\nexport interface ConflictingLocks extends LegacyITwinErrorWithNumber {\n conflictingLocks?: ConflictingLock[];\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 * @public\n*/\nexport class ConflictingLocksError extends IModelError { // implements ConflictingLocks, but that's @beta\n public conflictingLocks?: ConflictingLock[];\n\n /** @beta */\n public static override isError<T extends ConflictingLocks>(error: any): error is T {\n return BentleyError.isError(error, IModelHubStatus.LockOwnedByAnotherBriefcase);\n }\n constructor(message: string, getMetaData?: LoggingMetaData, conflictingLocks?: ConflictingLock[]) {\n super(IModelHubStatus.LockOwnedByAnotherBriefcase, message, getMetaData);\n this.conflictingLocks = conflictingLocks;\n }\n}\n\n/** @public */\nexport class ServerError extends IModelError {\n public constructor(errorNumber: number, message: string) {\n super(errorNumber, message);\n this.name = `Server error (${errorNumber})`;\n }\n}\n\n/** @public */\nexport class ServerTimeoutError extends ServerError {\n public constructor(message: string) {\n super(IModelStatus.ServerTimeout, message);\n this.name = \"Server timeout error\";\n }\n}\n\n/** @public */\nexport class BackendError extends IModelError {\n public constructor(errorNumber: number, name: string, message: string, getMetaData?: LoggingMetaData) {\n super(errorNumber, message, getMetaData);\n this.name = name;\n }\n}\n\n/** Intended for API \"no content\" semantics where the error case should not trigger application failure monitoring systems.\n * @public\n */\nexport class NoContentError extends IModelError {\n public constructor() {\n super(IModelStatus.NoContent, \"No Content\");\n }\n}\n"]}
@@ -0,0 +1,28 @@
1
+ /** @packageDocumentation
2
+ * @module iModels
3
+ */
4
+ import { ITwinError } from "@itwin/core-bentley";
5
+ /** An error originating from the [[ChannelControl]] interface.
6
+ * @beta
7
+ */
8
+ export interface ChannelError extends ITwinError {
9
+ /** The channel key that caused the error. */
10
+ readonly channelKey: string;
11
+ }
12
+ /** @beta */
13
+ export declare namespace ChannelError {
14
+ const scope = "itwin-channel-errors";
15
+ /** The set of keys identifying the different kinds of `ChannelError`s */
16
+ type Key =
17
+ /** an attempt to create a channel within an existing channel */
18
+ "may-not-nest" |
19
+ /** an attempt to use a channel that was not "allowed" */
20
+ "not-allowed" |
21
+ /** the root channel already exists */
22
+ "root-exists";
23
+ /** Instantiate and throw a ChannelError */
24
+ function throwError(key: Key, message: string, channelKey: string): never;
25
+ /** Determine whether an error object is a ChannelError */
26
+ function isError(error: unknown, key?: Key): error is ChannelError;
27
+ }
28
+ //# sourceMappingURL=ITwinCoreErrors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITwinCoreErrors.d.ts","sourceRoot":"","sources":["../../src/ITwinCoreErrors.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,UAAU;IAC9C,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,YAAY;AACZ,yBAAiB,YAAY,CAAC;IAErB,MAAM,KAAK,yBAAyB,CAAC;IAE5C,yEAAyE;IACzE,KAAY,GAAG;IACb,gEAAgE;IAChE,cAAc;IACd,yDAAyD;IACzD,aAAa;IACb,sCAAsC;IACtC,aAAa,CAAC;IAEhB,2CAA2C;IAC3C,SAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,KAAK,CAE/E;IACD,0DAA0D;IAC1D,SAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,IAAI,YAAY,CAExE;CACF"}
@@ -0,0 +1,25 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** @packageDocumentation
6
+ * @module iModels
7
+ */
8
+ import { ITwinError } from "@itwin/core-bentley";
9
+ /** @beta */
10
+ export var ChannelError;
11
+ (function (ChannelError) {
12
+ // the scope for all `ChannelError`s.
13
+ ChannelError.scope = "itwin-channel-errors";
14
+ /** Instantiate and throw a ChannelError */
15
+ function throwError(key, message, channelKey) {
16
+ ITwinError.throwError({ iTwinErrorId: { scope: ChannelError.scope, key }, message, channelKey });
17
+ }
18
+ ChannelError.throwError = throwError;
19
+ /** Determine whether an error object is a ChannelError */
20
+ function isError(error, key) {
21
+ return ITwinError.isError(error, ChannelError.scope, key) && typeof error.channelKey === "string";
22
+ }
23
+ ChannelError.isError = isError;
24
+ })(ChannelError || (ChannelError = {}));
25
+ //# sourceMappingURL=ITwinCoreErrors.js.map