@itwin/core-bentley 4.0.0-dev.8 → 4.0.0-dev.80

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 (211) hide show
  1. package/CHANGELOG.md +50 -1
  2. package/lib/cjs/AccessToken.d.ts +10 -10
  3. package/lib/cjs/AccessToken.d.ts.map +1 -1
  4. package/lib/cjs/AccessToken.js +9 -9
  5. package/lib/cjs/Assert.d.ts +25 -25
  6. package/lib/cjs/Assert.js +45 -45
  7. package/lib/cjs/Assert.js.map +1 -1
  8. package/lib/cjs/BeEvent.d.ts +81 -81
  9. package/lib/cjs/BeEvent.d.ts.map +1 -1
  10. package/lib/cjs/BeEvent.js +156 -156
  11. package/lib/cjs/BeSQLite.d.ts +172 -170
  12. package/lib/cjs/BeSQLite.d.ts.map +1 -1
  13. package/lib/cjs/BeSQLite.js +185 -183
  14. package/lib/cjs/BeSQLite.js.map +1 -1
  15. package/lib/cjs/BentleyError.d.ts +378 -378
  16. package/lib/cjs/BentleyError.d.ts.map +1 -1
  17. package/lib/cjs/BentleyError.js +703 -702
  18. package/lib/cjs/BentleyError.js.map +1 -1
  19. package/lib/cjs/BentleyLoggerCategory.d.ts +11 -11
  20. package/lib/cjs/BentleyLoggerCategory.js +19 -19
  21. package/lib/cjs/ByteStream.d.ts +110 -110
  22. package/lib/cjs/ByteStream.js +159 -159
  23. package/lib/cjs/ClassUtils.d.ts +14 -14
  24. package/lib/cjs/ClassUtils.js +27 -27
  25. package/lib/cjs/Compare.d.ts +47 -47
  26. package/lib/cjs/Compare.d.ts.map +1 -1
  27. package/lib/cjs/Compare.js +75 -75
  28. package/lib/cjs/CompressedId64Set.d.ts +134 -134
  29. package/lib/cjs/CompressedId64Set.d.ts.map +1 -1
  30. package/lib/cjs/CompressedId64Set.js +428 -428
  31. package/lib/cjs/CompressedId64Set.js.map +1 -1
  32. package/lib/cjs/Dictionary.d.ts +125 -125
  33. package/lib/cjs/Dictionary.js +203 -203
  34. package/lib/cjs/Disposable.d.ts +80 -80
  35. package/lib/cjs/Disposable.d.ts.map +1 -1
  36. package/lib/cjs/Disposable.js +120 -120
  37. package/lib/cjs/Id.d.ts +285 -285
  38. package/lib/cjs/Id.d.ts.map +1 -1
  39. package/lib/cjs/Id.js +643 -643
  40. package/lib/cjs/IndexMap.d.ts +65 -65
  41. package/lib/cjs/IndexMap.js +91 -91
  42. package/lib/cjs/JsonSchema.d.ts +77 -77
  43. package/lib/cjs/JsonSchema.d.ts.map +1 -1
  44. package/lib/cjs/JsonSchema.js +9 -9
  45. package/lib/cjs/JsonUtils.d.ts +78 -78
  46. package/lib/cjs/JsonUtils.js +151 -151
  47. package/lib/cjs/LRUMap.d.ts +129 -129
  48. package/lib/cjs/LRUMap.js +333 -333
  49. package/lib/cjs/LRUMap.js.map +1 -1
  50. package/lib/cjs/Logger.d.ts +143 -143
  51. package/lib/cjs/Logger.d.ts.map +1 -1
  52. package/lib/cjs/Logger.js +256 -258
  53. package/lib/cjs/Logger.js.map +1 -1
  54. package/lib/cjs/ObservableSet.d.ts +23 -23
  55. package/lib/cjs/ObservableSet.js +51 -51
  56. package/lib/cjs/OneAtATimeAction.d.ts +31 -31
  57. package/lib/cjs/OneAtATimeAction.js +94 -94
  58. package/lib/cjs/OneAtATimeAction.js.map +1 -1
  59. package/lib/cjs/OrderedId64Iterable.d.ts +74 -74
  60. package/lib/cjs/OrderedId64Iterable.d.ts.map +1 -1
  61. package/lib/cjs/OrderedId64Iterable.js +235 -235
  62. package/lib/cjs/OrderedSet.d.ts +40 -40
  63. package/lib/cjs/OrderedSet.js +64 -64
  64. package/lib/cjs/PriorityQueue.d.ts +70 -70
  65. package/lib/cjs/PriorityQueue.d.ts.map +1 -1
  66. package/lib/cjs/PriorityQueue.js +140 -140
  67. package/lib/cjs/ProcessDetector.d.ts +59 -59
  68. package/lib/cjs/ProcessDetector.js +71 -71
  69. package/lib/cjs/SortedArray.d.ts +236 -232
  70. package/lib/cjs/SortedArray.d.ts.map +1 -1
  71. package/lib/cjs/SortedArray.js +315 -303
  72. package/lib/cjs/SortedArray.js.map +1 -1
  73. package/lib/cjs/StatusCategory.d.ts +30 -30
  74. package/lib/cjs/StatusCategory.d.ts.map +1 -1
  75. package/lib/cjs/StatusCategory.js +460 -460
  76. package/lib/cjs/StatusCategory.js.map +1 -1
  77. package/lib/cjs/StringUtils.d.ts +22 -22
  78. package/lib/cjs/StringUtils.js +148 -148
  79. package/lib/cjs/Time.d.ts +122 -122
  80. package/lib/cjs/Time.js +152 -152
  81. package/lib/cjs/Time.js.map +1 -1
  82. package/lib/cjs/Tracing.d.ts +43 -40
  83. package/lib/cjs/Tracing.d.ts.map +1 -1
  84. package/lib/cjs/Tracing.js +134 -130
  85. package/lib/cjs/Tracing.js.map +1 -1
  86. package/lib/cjs/TupleKeyedMap.d.ts +36 -36
  87. package/lib/cjs/TupleKeyedMap.js +102 -102
  88. package/lib/cjs/TypedArrayBuilder.d.ts +155 -155
  89. package/lib/cjs/TypedArrayBuilder.d.ts.map +1 -1
  90. package/lib/cjs/TypedArrayBuilder.js +206 -208
  91. package/lib/cjs/TypedArrayBuilder.js.map +1 -1
  92. package/lib/cjs/UnexpectedErrors.d.ts +43 -43
  93. package/lib/cjs/UnexpectedErrors.d.ts.map +1 -1
  94. package/lib/cjs/UnexpectedErrors.js +68 -68
  95. package/lib/cjs/UnexpectedErrors.js.map +1 -1
  96. package/lib/cjs/UtilityTypes.d.ts +112 -96
  97. package/lib/cjs/UtilityTypes.d.ts.map +1 -1
  98. package/lib/cjs/UtilityTypes.js +40 -40
  99. package/lib/cjs/UtilityTypes.js.map +1 -1
  100. package/lib/cjs/YieldManager.d.ts +18 -18
  101. package/lib/cjs/YieldManager.js +34 -34
  102. package/lib/cjs/core-bentley.d.ts +74 -74
  103. package/lib/cjs/core-bentley.js +94 -90
  104. package/lib/cjs/core-bentley.js.map +1 -1
  105. package/lib/cjs/partitionArray.d.ts +21 -21
  106. package/lib/cjs/partitionArray.js +43 -43
  107. package/lib/esm/AccessToken.d.ts +10 -10
  108. package/lib/esm/AccessToken.d.ts.map +1 -1
  109. package/lib/esm/AccessToken.js +8 -8
  110. package/lib/esm/Assert.d.ts +25 -25
  111. package/lib/esm/Assert.js +41 -41
  112. package/lib/esm/Assert.js.map +1 -1
  113. package/lib/esm/BeEvent.d.ts +81 -81
  114. package/lib/esm/BeEvent.d.ts.map +1 -1
  115. package/lib/esm/BeEvent.js +150 -150
  116. package/lib/esm/BeSQLite.d.ts +172 -170
  117. package/lib/esm/BeSQLite.d.ts.map +1 -1
  118. package/lib/esm/BeSQLite.js +182 -180
  119. package/lib/esm/BeSQLite.js.map +1 -1
  120. package/lib/esm/BentleyError.d.ts +378 -378
  121. package/lib/esm/BentleyError.d.ts.map +1 -1
  122. package/lib/esm/BentleyError.js +699 -698
  123. package/lib/esm/BentleyError.js.map +1 -1
  124. package/lib/esm/BentleyLoggerCategory.d.ts +11 -11
  125. package/lib/esm/BentleyLoggerCategory.js +16 -16
  126. package/lib/esm/ByteStream.d.ts +110 -110
  127. package/lib/esm/ByteStream.js +155 -155
  128. package/lib/esm/ClassUtils.d.ts +14 -14
  129. package/lib/esm/ClassUtils.js +22 -22
  130. package/lib/esm/Compare.d.ts +47 -47
  131. package/lib/esm/Compare.d.ts.map +1 -1
  132. package/lib/esm/Compare.js +63 -63
  133. package/lib/esm/CompressedId64Set.d.ts +134 -134
  134. package/lib/esm/CompressedId64Set.d.ts.map +1 -1
  135. package/lib/esm/CompressedId64Set.js +423 -423
  136. package/lib/esm/CompressedId64Set.js.map +1 -1
  137. package/lib/esm/Dictionary.d.ts +125 -125
  138. package/lib/esm/Dictionary.js +199 -199
  139. package/lib/esm/Disposable.d.ts +80 -80
  140. package/lib/esm/Disposable.d.ts.map +1 -1
  141. package/lib/esm/Disposable.js +112 -112
  142. package/lib/esm/Id.d.ts +285 -285
  143. package/lib/esm/Id.d.ts.map +1 -1
  144. package/lib/esm/Id.js +639 -639
  145. package/lib/esm/IndexMap.d.ts +65 -65
  146. package/lib/esm/IndexMap.js +86 -86
  147. package/lib/esm/JsonSchema.d.ts +77 -77
  148. package/lib/esm/JsonSchema.d.ts.map +1 -1
  149. package/lib/esm/JsonSchema.js +8 -8
  150. package/lib/esm/JsonUtils.d.ts +78 -78
  151. package/lib/esm/JsonUtils.js +148 -148
  152. package/lib/esm/LRUMap.d.ts +129 -129
  153. package/lib/esm/LRUMap.js +326 -326
  154. package/lib/esm/LRUMap.js.map +1 -1
  155. package/lib/esm/Logger.d.ts +143 -143
  156. package/lib/esm/Logger.d.ts.map +1 -1
  157. package/lib/esm/Logger.js +253 -253
  158. package/lib/esm/Logger.js.map +1 -1
  159. package/lib/esm/ObservableSet.d.ts +23 -23
  160. package/lib/esm/ObservableSet.js +47 -47
  161. package/lib/esm/OneAtATimeAction.d.ts +31 -31
  162. package/lib/esm/OneAtATimeAction.js +89 -89
  163. package/lib/esm/OneAtATimeAction.js.map +1 -1
  164. package/lib/esm/OrderedId64Iterable.d.ts +74 -74
  165. package/lib/esm/OrderedId64Iterable.d.ts.map +1 -1
  166. package/lib/esm/OrderedId64Iterable.js +232 -232
  167. package/lib/esm/OrderedSet.d.ts +40 -40
  168. package/lib/esm/OrderedSet.js +59 -59
  169. package/lib/esm/PriorityQueue.d.ts +70 -70
  170. package/lib/esm/PriorityQueue.d.ts.map +1 -1
  171. package/lib/esm/PriorityQueue.js +136 -136
  172. package/lib/esm/ProcessDetector.d.ts +59 -59
  173. package/lib/esm/ProcessDetector.js +67 -67
  174. package/lib/esm/SortedArray.d.ts +236 -232
  175. package/lib/esm/SortedArray.d.ts.map +1 -1
  176. package/lib/esm/SortedArray.js +308 -296
  177. package/lib/esm/SortedArray.js.map +1 -1
  178. package/lib/esm/StatusCategory.d.ts +30 -30
  179. package/lib/esm/StatusCategory.d.ts.map +1 -1
  180. package/lib/esm/StatusCategory.js +455 -454
  181. package/lib/esm/StatusCategory.js.map +1 -1
  182. package/lib/esm/StringUtils.d.ts +22 -22
  183. package/lib/esm/StringUtils.js +142 -142
  184. package/lib/esm/Time.d.ts +122 -122
  185. package/lib/esm/Time.js +146 -146
  186. package/lib/esm/Time.js.map +1 -1
  187. package/lib/esm/Tracing.d.ts +43 -40
  188. package/lib/esm/Tracing.d.ts.map +1 -1
  189. package/lib/esm/Tracing.js +130 -126
  190. package/lib/esm/Tracing.js.map +1 -1
  191. package/lib/esm/TupleKeyedMap.d.ts +36 -36
  192. package/lib/esm/TupleKeyedMap.js +98 -98
  193. package/lib/esm/TypedArrayBuilder.d.ts +155 -155
  194. package/lib/esm/TypedArrayBuilder.d.ts.map +1 -1
  195. package/lib/esm/TypedArrayBuilder.js +198 -200
  196. package/lib/esm/TypedArrayBuilder.js.map +1 -1
  197. package/lib/esm/UnexpectedErrors.d.ts +43 -43
  198. package/lib/esm/UnexpectedErrors.d.ts.map +1 -1
  199. package/lib/esm/UnexpectedErrors.js +65 -64
  200. package/lib/esm/UnexpectedErrors.js.map +1 -1
  201. package/lib/esm/UtilityTypes.d.ts +112 -96
  202. package/lib/esm/UtilityTypes.d.ts.map +1 -1
  203. package/lib/esm/UtilityTypes.js +34 -34
  204. package/lib/esm/UtilityTypes.js.map +1 -1
  205. package/lib/esm/YieldManager.d.ts +18 -18
  206. package/lib/esm/YieldManager.js +30 -30
  207. package/lib/esm/core-bentley.d.ts +74 -74
  208. package/lib/esm/core-bentley.js +78 -78
  209. package/lib/esm/partitionArray.d.ts +21 -21
  210. package/lib/esm/partitionArray.js +39 -39
  211. package/package.json +9 -9
@@ -1,703 +1,704 @@
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 Errors
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.BentleyError = exports.RealityDataStatus = exports.GeoServiceStatus = exports.IModelHubStatus = exports.HttpStatus = exports.RepositoryStatus = exports.ChangeSetStatus = exports.RpcInterfaceStatus = exports.BriefcaseStatus = exports.IModelStatus = exports.BentleyStatus = void 0;
11
- const BeSQLite_1 = require("./BeSQLite");
12
- /** Standard status code.
13
- * This status code should be rarely used.
14
- * Prefer to throw an exception to indicate an error, rather than returning a special status code.
15
- * If a status code is to be returned, prefer to return a more specific error status type such as IModelStatus or DbResult.
16
- * @public
17
- */
18
- var BentleyStatus;
19
- (function (BentleyStatus) {
20
- BentleyStatus[BentleyStatus["SUCCESS"] = 0] = "SUCCESS";
21
- BentleyStatus[BentleyStatus["ERROR"] = 32768] = "ERROR";
22
- })(BentleyStatus = exports.BentleyStatus || (exports.BentleyStatus = {}));
23
- /** Status codes that are used in conjunction with [[BentleyError]].
24
- * Error status codes are divided into separate ranges for different kinds of errors. All known ranges at least should be defined here, to avoid collisions.
25
- * @public
26
- */
27
- var IModelStatus;
28
- (function (IModelStatus) {
29
- IModelStatus[IModelStatus["IMODEL_ERROR_BASE"] = 65536] = "IMODEL_ERROR_BASE";
30
- IModelStatus[IModelStatus["Success"] = 0] = "Success";
31
- IModelStatus[IModelStatus["AlreadyLoaded"] = 65537] = "AlreadyLoaded";
32
- IModelStatus[IModelStatus["AlreadyOpen"] = 65538] = "AlreadyOpen";
33
- IModelStatus[IModelStatus["BadArg"] = 65539] = "BadArg";
34
- IModelStatus[IModelStatus["BadElement"] = 65540] = "BadElement";
35
- IModelStatus[IModelStatus["BadModel"] = 65541] = "BadModel";
36
- IModelStatus[IModelStatus["BadRequest"] = 65542] = "BadRequest";
37
- IModelStatus[IModelStatus["BadSchema"] = 65543] = "BadSchema";
38
- IModelStatus[IModelStatus["CannotUndo"] = 65544] = "CannotUndo";
39
- IModelStatus[IModelStatus["CodeNotReserved"] = 65545] = "CodeNotReserved";
40
- IModelStatus[IModelStatus["DeletionProhibited"] = 65546] = "DeletionProhibited";
41
- IModelStatus[IModelStatus["DuplicateCode"] = 65547] = "DuplicateCode";
42
- IModelStatus[IModelStatus["DuplicateName"] = 65548] = "DuplicateName";
43
- IModelStatus[IModelStatus["ElementBlockedChange"] = 65549] = "ElementBlockedChange";
44
- IModelStatus[IModelStatus["FileAlreadyExists"] = 65550] = "FileAlreadyExists";
45
- IModelStatus[IModelStatus["FileNotFound"] = 65551] = "FileNotFound";
46
- IModelStatus[IModelStatus["FileNotLoaded"] = 65552] = "FileNotLoaded";
47
- IModelStatus[IModelStatus["ForeignKeyConstraint"] = 65553] = "ForeignKeyConstraint";
48
- IModelStatus[IModelStatus["IdExists"] = 65554] = "IdExists";
49
- IModelStatus[IModelStatus["InDynamicTransaction"] = 65555] = "InDynamicTransaction";
50
- IModelStatus[IModelStatus["InvalidCategory"] = 65556] = "InvalidCategory";
51
- IModelStatus[IModelStatus["InvalidCode"] = 65557] = "InvalidCode";
52
- IModelStatus[IModelStatus["InvalidCodeSpec"] = 65558] = "InvalidCodeSpec";
53
- IModelStatus[IModelStatus["InvalidId"] = 65559] = "InvalidId";
54
- IModelStatus[IModelStatus["InvalidName"] = 65560] = "InvalidName";
55
- IModelStatus[IModelStatus["InvalidParent"] = 65561] = "InvalidParent";
56
- IModelStatus[IModelStatus["InvalidProfileVersion"] = 65562] = "InvalidProfileVersion";
57
- IModelStatus[IModelStatus["IsCreatingChangeSet"] = 65563] = "IsCreatingChangeSet";
58
- IModelStatus[IModelStatus["LockNotHeld"] = 65564] = "LockNotHeld";
59
- IModelStatus[IModelStatus["Mismatch2d3d"] = 65565] = "Mismatch2d3d";
60
- IModelStatus[IModelStatus["MismatchGcs"] = 65566] = "MismatchGcs";
61
- IModelStatus[IModelStatus["MissingDomain"] = 65567] = "MissingDomain";
62
- IModelStatus[IModelStatus["MissingHandler"] = 65568] = "MissingHandler";
63
- IModelStatus[IModelStatus["MissingId"] = 65569] = "MissingId";
64
- IModelStatus[IModelStatus["NoGeometry"] = 65570] = "NoGeometry";
65
- IModelStatus[IModelStatus["NoMultiTxnOperation"] = 65571] = "NoMultiTxnOperation";
66
- IModelStatus[IModelStatus["NotEnabled"] = 65573] = "NotEnabled";
67
- IModelStatus[IModelStatus["NotFound"] = 65574] = "NotFound";
68
- IModelStatus[IModelStatus["NotOpen"] = 65575] = "NotOpen";
69
- IModelStatus[IModelStatus["NotOpenForWrite"] = 65576] = "NotOpenForWrite";
70
- IModelStatus[IModelStatus["NotSameUnitBase"] = 65577] = "NotSameUnitBase";
71
- IModelStatus[IModelStatus["NothingToRedo"] = 65578] = "NothingToRedo";
72
- IModelStatus[IModelStatus["NothingToUndo"] = 65579] = "NothingToUndo";
73
- IModelStatus[IModelStatus["ParentBlockedChange"] = 65580] = "ParentBlockedChange";
74
- IModelStatus[IModelStatus["ReadError"] = 65581] = "ReadError";
75
- IModelStatus[IModelStatus["ReadOnly"] = 65582] = "ReadOnly";
76
- IModelStatus[IModelStatus["ReadOnlyDomain"] = 65583] = "ReadOnlyDomain";
77
- IModelStatus[IModelStatus["RepositoryManagerError"] = 65584] = "RepositoryManagerError";
78
- IModelStatus[IModelStatus["SQLiteError"] = 65585] = "SQLiteError";
79
- IModelStatus[IModelStatus["TransactionActive"] = 65586] = "TransactionActive";
80
- IModelStatus[IModelStatus["UnitsMissing"] = 65587] = "UnitsMissing";
81
- IModelStatus[IModelStatus["UnknownFormat"] = 65588] = "UnknownFormat";
82
- IModelStatus[IModelStatus["UpgradeFailed"] = 65589] = "UpgradeFailed";
83
- IModelStatus[IModelStatus["ValidationFailed"] = 65590] = "ValidationFailed";
84
- IModelStatus[IModelStatus["VersionTooNew"] = 65591] = "VersionTooNew";
85
- IModelStatus[IModelStatus["VersionTooOld"] = 65592] = "VersionTooOld";
86
- IModelStatus[IModelStatus["ViewNotFound"] = 65593] = "ViewNotFound";
87
- IModelStatus[IModelStatus["WriteError"] = 65594] = "WriteError";
88
- IModelStatus[IModelStatus["WrongClass"] = 65595] = "WrongClass";
89
- IModelStatus[IModelStatus["WrongIModel"] = 65596] = "WrongIModel";
90
- IModelStatus[IModelStatus["WrongDomain"] = 65597] = "WrongDomain";
91
- IModelStatus[IModelStatus["WrongElement"] = 65598] = "WrongElement";
92
- IModelStatus[IModelStatus["WrongHandler"] = 65599] = "WrongHandler";
93
- IModelStatus[IModelStatus["WrongModel"] = 65600] = "WrongModel";
94
- IModelStatus[IModelStatus["ConstraintNotUnique"] = 65601] = "ConstraintNotUnique";
95
- IModelStatus[IModelStatus["NoGeoLocation"] = 65602] = "NoGeoLocation";
96
- IModelStatus[IModelStatus["ServerTimeout"] = 65603] = "ServerTimeout";
97
- IModelStatus[IModelStatus["NoContent"] = 65604] = "NoContent";
98
- IModelStatus[IModelStatus["NotRegistered"] = 65605] = "NotRegistered";
99
- IModelStatus[IModelStatus["FunctionNotFound"] = 65606] = "FunctionNotFound";
100
- IModelStatus[IModelStatus["NoActiveCommand"] = 65607] = "NoActiveCommand";
101
- })(IModelStatus = exports.IModelStatus || (exports.IModelStatus = {}));
102
- /** Error statuses produced by various briefcase operations, typically encountered as the `errorNumber` of an [IModelError]($common).
103
- * @public
104
- */
105
- var BriefcaseStatus;
106
- (function (BriefcaseStatus) {
107
- BriefcaseStatus[BriefcaseStatus["BRIEFCASE_STATUS_BASE"] = 131072] = "BRIEFCASE_STATUS_BASE";
108
- BriefcaseStatus[BriefcaseStatus["CannotAcquire"] = 131072] = "CannotAcquire";
109
- BriefcaseStatus[BriefcaseStatus["CannotDownload"] = 131073] = "CannotDownload";
110
- BriefcaseStatus[BriefcaseStatus["CannotUpload"] = 131074] = "CannotUpload";
111
- BriefcaseStatus[BriefcaseStatus["CannotCopy"] = 131075] = "CannotCopy";
112
- BriefcaseStatus[BriefcaseStatus["CannotDelete"] = 131076] = "CannotDelete";
113
- BriefcaseStatus[BriefcaseStatus["VersionNotFound"] = 131077] = "VersionNotFound";
114
- BriefcaseStatus[BriefcaseStatus["CannotApplyChanges"] = 131078] = "CannotApplyChanges";
115
- BriefcaseStatus[BriefcaseStatus["DownloadCancelled"] = 131079] = "DownloadCancelled";
116
- BriefcaseStatus[BriefcaseStatus["ContainsDeletedChangeSets"] = 131080] = "ContainsDeletedChangeSets";
117
- })(BriefcaseStatus = exports.BriefcaseStatus || (exports.BriefcaseStatus = {}));
118
- /** RpcInterface status codes
119
- * @beta
120
- */
121
- var RpcInterfaceStatus;
122
- (function (RpcInterfaceStatus) {
123
- RpcInterfaceStatus[RpcInterfaceStatus["Success"] = 0] = "Success";
124
- RpcInterfaceStatus[RpcInterfaceStatus["RPC_INTERFACE_ERROR_BASE"] = 135168] = "RPC_INTERFACE_ERROR_BASE";
125
- /** The RpcInterface implemented by the server is incompatible with the interface requested by the client. */
126
- RpcInterfaceStatus[RpcInterfaceStatus["IncompatibleVersion"] = 135168] = "IncompatibleVersion";
127
- })(RpcInterfaceStatus = exports.RpcInterfaceStatus || (exports.RpcInterfaceStatus = {}));
128
- /** Error statuses produced by various Changeset operations, typically encountered as the `errorNumber` of an [IModelError]($common).
129
- * @public
130
- */
131
- var ChangeSetStatus;
132
- (function (ChangeSetStatus) {
133
- ChangeSetStatus[ChangeSetStatus["Success"] = 0] = "Success";
134
- ChangeSetStatus[ChangeSetStatus["CHANGESET_ERROR_BASE"] = 90112] = "CHANGESET_ERROR_BASE";
135
- /** Error applying a change set when reversing or reinstating it */
136
- ChangeSetStatus[ChangeSetStatus["ApplyError"] = 90113] = "ApplyError";
137
- /** Change tracking has not been enabled. The ChangeSet API mandates this. */
138
- ChangeSetStatus[ChangeSetStatus["ChangeTrackingNotEnabled"] = 90114] = "ChangeTrackingNotEnabled";
139
- /** Contents of the change stream are corrupted and does not match the ChangeSet */
140
- ChangeSetStatus[ChangeSetStatus["CorruptedChangeStream"] = 90115] = "CorruptedChangeStream";
141
- /** File containing the changes to the change set is not found */
142
- ChangeSetStatus[ChangeSetStatus["FileNotFound"] = 90116] = "FileNotFound";
143
- /** Error writing the contents of the change set to the backing change stream file */
144
- ChangeSetStatus[ChangeSetStatus["FileWriteError"] = 90117] = "FileWriteError";
145
- /** Cannot perform the operation since the Db has local changes */
146
- ChangeSetStatus[ChangeSetStatus["HasLocalChanges"] = 90118] = "HasLocalChanges";
147
- /** Cannot perform the operation since current transaction has uncommitted changes */
148
- ChangeSetStatus[ChangeSetStatus["HasUncommittedChanges"] = 90119] = "HasUncommittedChanges";
149
- /** Invalid ChangeSet Id */
150
- ChangeSetStatus[ChangeSetStatus["InvalidId"] = 90120] = "InvalidId";
151
- /** Invalid version of the change set */
152
- ChangeSetStatus[ChangeSetStatus["InvalidVersion"] = 90121] = "InvalidVersion";
153
- /** Cannot perform the operation since system is in the middle of a dynamic transaction */
154
- ChangeSetStatus[ChangeSetStatus["InDynamicTransaction"] = 90122] = "InDynamicTransaction";
155
- /** Cannot perform operation since system is in the middle of a creating a change set */
156
- ChangeSetStatus[ChangeSetStatus["IsCreatingChangeSet"] = 90123] = "IsCreatingChangeSet";
157
- /** Cannot perform operation since the system is not creating a change set */
158
- ChangeSetStatus[ChangeSetStatus["IsNotCreatingChangeSet"] = 90124] = "IsNotCreatingChangeSet";
159
- /** Error propagating the changes after the merge */
160
- ChangeSetStatus[ChangeSetStatus["MergePropagationError"] = 90125] = "MergePropagationError";
161
- /** No change sets to merge */
162
- ChangeSetStatus[ChangeSetStatus["NothingToMerge"] = 90126] = "NothingToMerge";
163
- /** No transactions are available to create a change set */
164
- ChangeSetStatus[ChangeSetStatus["NoTransactions"] = 90127] = "NoTransactions";
165
- /** Parent change set of the Db does not match the parent id of the change set */
166
- ChangeSetStatus[ChangeSetStatus["ParentMismatch"] = 90128] = "ParentMismatch";
167
- /** Error performing a SQLite operation on the Db */
168
- ChangeSetStatus[ChangeSetStatus["SQLiteError"] = 90129] = "SQLiteError";
169
- /** ChangeSet originated in a different Db */
170
- ChangeSetStatus[ChangeSetStatus["WrongDgnDb"] = 90130] = "WrongDgnDb";
171
- /** Could not open the DgnDb to merge change set */
172
- ChangeSetStatus[ChangeSetStatus["CouldNotOpenDgnDb"] = 90131] = "CouldNotOpenDgnDb";
173
- /** Cannot merge changes in in an open DgnDb. Close the DgnDb, and process the operation when it is opened. */
174
- ChangeSetStatus[ChangeSetStatus["MergeSchemaChangesOnOpen"] = 90132] = "MergeSchemaChangesOnOpen";
175
- /** Cannot reverse or reinstate schema changes. */
176
- ChangeSetStatus[ChangeSetStatus["ReverseOrReinstateSchemaChanges"] = 90133] = "ReverseOrReinstateSchemaChanges";
177
- /** Cannot process changes schema changes in an open DgnDb. Close the DgnDb, and process the operation when it is opened. */
178
- ChangeSetStatus[ChangeSetStatus["ProcessSchemaChangesOnOpen"] = 90134] = "ProcessSchemaChangesOnOpen";
179
- /** Cannot merge changes into a Readonly DgnDb. */
180
- ChangeSetStatus[ChangeSetStatus["CannotMergeIntoReadonly"] = 90135] = "CannotMergeIntoReadonly";
181
- /** Cannot merge changes into a Master DgnDb. */
182
- ChangeSetStatus[ChangeSetStatus["CannotMergeIntoMaster"] = 90136] = "CannotMergeIntoMaster";
183
- /** Cannot merge changes into a DgnDb that has reversed change sets. */
184
- ChangeSetStatus[ChangeSetStatus["CannotMergeIntoReversed"] = 90137] = "CannotMergeIntoReversed";
185
- /** ChangeSet(s) download was cancelled. */
186
- ChangeSetStatus[ChangeSetStatus["DownloadCancelled"] = 90138] = "DownloadCancelled";
187
- })(ChangeSetStatus = exports.ChangeSetStatus || (exports.ChangeSetStatus = {}));
188
- /** Return codes for methods which perform repository management operations
189
- * @internal
190
- */
191
- var RepositoryStatus;
192
- (function (RepositoryStatus) {
193
- RepositoryStatus[RepositoryStatus["Success"] = 0] = "Success";
194
- /** The repository server did not respond to a request */
195
- RepositoryStatus[RepositoryStatus["ServerUnavailable"] = 86017] = "ServerUnavailable";
196
- /** A requested lock was already held by another briefcase */
197
- RepositoryStatus[RepositoryStatus["LockAlreadyHeld"] = 86018] = "LockAlreadyHeld";
198
- /** Failed to sync briefcase manager with server */
199
- RepositoryStatus[RepositoryStatus["SyncError"] = 86019] = "SyncError";
200
- /** Response from server not understood */
201
- RepositoryStatus[RepositoryStatus["InvalidResponse"] = 86020] = "InvalidResponse";
202
- /** An operation requires local changes to be committed or abandoned */
203
- RepositoryStatus[RepositoryStatus["PendingTransactions"] = 86021] = "PendingTransactions";
204
- /** A lock cannot be relinquished because the associated object has been modified */
205
- RepositoryStatus[RepositoryStatus["LockUsed"] = 86022] = "LockUsed";
206
- /** An operation required creation of a ChangeSet, which failed */
207
- RepositoryStatus[RepositoryStatus["CannotCreateChangeSet"] = 86023] = "CannotCreateChangeSet";
208
- /** Request to server not understood */
209
- RepositoryStatus[RepositoryStatus["InvalidRequest"] = 86024] = "InvalidRequest";
210
- /** A change set committed to the server must be integrated into the briefcase before the operation can be completed */
211
- RepositoryStatus[RepositoryStatus["ChangeSetRequired"] = 86025] = "ChangeSetRequired";
212
- /** A requested DgnCode is reserved by another briefcase or in use */
213
- RepositoryStatus[RepositoryStatus["CodeUnavailable"] = 86026] = "CodeUnavailable";
214
- /** A DgnCode cannot be released because it has not been reserved by the requesting briefcase */
215
- RepositoryStatus[RepositoryStatus["CodeNotReserved"] = 86027] = "CodeNotReserved";
216
- /** A DgnCode cannot be relinquished because it has been used locally */
217
- RepositoryStatus[RepositoryStatus["CodeUsed"] = 86028] = "CodeUsed";
218
- /** A required lock is not held by this briefcase */
219
- RepositoryStatus[RepositoryStatus["LockNotHeld"] = 86029] = "LockNotHeld";
220
- /** Repository is currently locked, no changes allowed */
221
- RepositoryStatus[RepositoryStatus["RepositoryIsLocked"] = 86030] = "RepositoryIsLocked";
222
- /** Channel write constraint violation, such as an attempt to write outside the designated channel. */
223
- RepositoryStatus[RepositoryStatus["ChannelConstraintViolation"] = 86031] = "ChannelConstraintViolation";
224
- })(RepositoryStatus = exports.RepositoryStatus || (exports.RepositoryStatus = {}));
225
- /** Status from returned HTTP status code
226
- * @beta
227
- */
228
- var HttpStatus;
229
- (function (HttpStatus) {
230
- /** 2xx Success */
231
- HttpStatus[HttpStatus["Success"] = 0] = "Success";
232
- /** 1xx Informational responses */
233
- HttpStatus[HttpStatus["Info"] = 94209] = "Info";
234
- /** 3xx Redirection */
235
- HttpStatus[HttpStatus["Redirection"] = 94210] = "Redirection";
236
- /** 4xx Client errors */
237
- HttpStatus[HttpStatus["ClientError"] = 94211] = "ClientError";
238
- /** 5xx Server errors */
239
- HttpStatus[HttpStatus["ServerError"] = 94212] = "ServerError";
240
- })(HttpStatus = exports.HttpStatus || (exports.HttpStatus = {}));
241
- /** Statuses produced by APIs that interact with iModelHub, typically encountered as the `errorNumber` of an [IModelError]($common).
242
- * @public
243
- */
244
- var IModelHubStatus;
245
- (function (IModelHubStatus) {
246
- IModelHubStatus[IModelHubStatus["Success"] = 0] = "Success";
247
- IModelHubStatus[IModelHubStatus["IMODELHUBERROR_BASE"] = 102400] = "IMODELHUBERROR_BASE";
248
- IModelHubStatus[IModelHubStatus["IMODELHUBERROR_REQUESTERRORBASE"] = 102656] = "IMODELHUBERROR_REQUESTERRORBASE";
249
- IModelHubStatus[IModelHubStatus["Unknown"] = 102401] = "Unknown";
250
- IModelHubStatus[IModelHubStatus["MissingRequiredProperties"] = 102402] = "MissingRequiredProperties";
251
- IModelHubStatus[IModelHubStatus["InvalidPropertiesValues"] = 102403] = "InvalidPropertiesValues";
252
- IModelHubStatus[IModelHubStatus["UserDoesNotHavePermission"] = 102404] = "UserDoesNotHavePermission";
253
- IModelHubStatus[IModelHubStatus["UserDoesNotHaveAccess"] = 102405] = "UserDoesNotHaveAccess";
254
- IModelHubStatus[IModelHubStatus["InvalidBriefcase"] = 102406] = "InvalidBriefcase";
255
- IModelHubStatus[IModelHubStatus["BriefcaseDoesNotExist"] = 102407] = "BriefcaseDoesNotExist";
256
- IModelHubStatus[IModelHubStatus["BriefcaseDoesNotBelongToUser"] = 102408] = "BriefcaseDoesNotBelongToUser";
257
- IModelHubStatus[IModelHubStatus["AnotherUserPushing"] = 102409] = "AnotherUserPushing";
258
- IModelHubStatus[IModelHubStatus["ChangeSetAlreadyExists"] = 102410] = "ChangeSetAlreadyExists";
259
- IModelHubStatus[IModelHubStatus["ChangeSetDoesNotExist"] = 102411] = "ChangeSetDoesNotExist";
260
- IModelHubStatus[IModelHubStatus["FileIsNotUploaded"] = 102412] = "FileIsNotUploaded";
261
- IModelHubStatus[IModelHubStatus["iModelIsNotInitialized"] = 102413] = "iModelIsNotInitialized";
262
- IModelHubStatus[IModelHubStatus["ChangeSetPointsToBadSeed"] = 102414] = "ChangeSetPointsToBadSeed";
263
- IModelHubStatus[IModelHubStatus["OperationFailed"] = 102415] = "OperationFailed";
264
- IModelHubStatus[IModelHubStatus["PullIsRequired"] = 102416] = "PullIsRequired";
265
- IModelHubStatus[IModelHubStatus["MaximumNumberOfBriefcasesPerUser"] = 102417] = "MaximumNumberOfBriefcasesPerUser";
266
- IModelHubStatus[IModelHubStatus["MaximumNumberOfBriefcasesPerUserPerMinute"] = 102418] = "MaximumNumberOfBriefcasesPerUserPerMinute";
267
- IModelHubStatus[IModelHubStatus["DatabaseTemporarilyLocked"] = 102419] = "DatabaseTemporarilyLocked";
268
- IModelHubStatus[IModelHubStatus["iModelIsLocked"] = 102420] = "iModelIsLocked";
269
- IModelHubStatus[IModelHubStatus["CodesExist"] = 102421] = "CodesExist";
270
- IModelHubStatus[IModelHubStatus["LocksExist"] = 102422] = "LocksExist";
271
- IModelHubStatus[IModelHubStatus["iModelAlreadyExists"] = 102423] = "iModelAlreadyExists";
272
- IModelHubStatus[IModelHubStatus["iModelDoesNotExist"] = 102424] = "iModelDoesNotExist";
273
- IModelHubStatus[IModelHubStatus["FileDoesNotExist"] = 102425] = "FileDoesNotExist";
274
- IModelHubStatus[IModelHubStatus["FileAlreadyExists"] = 102426] = "FileAlreadyExists";
275
- IModelHubStatus[IModelHubStatus["LockDoesNotExist"] = 102427] = "LockDoesNotExist";
276
- IModelHubStatus[IModelHubStatus["LockOwnedByAnotherBriefcase"] = 102428] = "LockOwnedByAnotherBriefcase";
277
- IModelHubStatus[IModelHubStatus["CodeStateInvalid"] = 102429] = "CodeStateInvalid";
278
- IModelHubStatus[IModelHubStatus["CodeReservedByAnotherBriefcase"] = 102430] = "CodeReservedByAnotherBriefcase";
279
- IModelHubStatus[IModelHubStatus["CodeDoesNotExist"] = 102431] = "CodeDoesNotExist";
280
- IModelHubStatus[IModelHubStatus["EventTypeDoesNotExist"] = 102432] = "EventTypeDoesNotExist";
281
- IModelHubStatus[IModelHubStatus["EventSubscriptionDoesNotExist"] = 102433] = "EventSubscriptionDoesNotExist";
282
- IModelHubStatus[IModelHubStatus["EventSubscriptionAlreadyExists"] = 102434] = "EventSubscriptionAlreadyExists";
283
- IModelHubStatus[IModelHubStatus["ITwinIdIsNotSpecified"] = 102435] = "ITwinIdIsNotSpecified";
284
- IModelHubStatus[IModelHubStatus["FailedToGetITwinPermissions"] = 102436] = "FailedToGetITwinPermissions";
285
- IModelHubStatus[IModelHubStatus["FailedToGetITwinMembers"] = 102437] = "FailedToGetITwinMembers";
286
- IModelHubStatus[IModelHubStatus["ChangeSetAlreadyHasVersion"] = 102438] = "ChangeSetAlreadyHasVersion";
287
- IModelHubStatus[IModelHubStatus["VersionAlreadyExists"] = 102439] = "VersionAlreadyExists";
288
- IModelHubStatus[IModelHubStatus["JobSchedulingFailed"] = 102440] = "JobSchedulingFailed";
289
- IModelHubStatus[IModelHubStatus["ConflictsAggregate"] = 102441] = "ConflictsAggregate";
290
- IModelHubStatus[IModelHubStatus["FailedToGetITwinById"] = 102442] = "FailedToGetITwinById";
291
- IModelHubStatus[IModelHubStatus["DatabaseOperationFailed"] = 102443] = "DatabaseOperationFailed";
292
- IModelHubStatus[IModelHubStatus["SeedFileInitializationFailed"] = 102444] = "SeedFileInitializationFailed";
293
- IModelHubStatus[IModelHubStatus["FailedToGetAssetPermissions"] = 102445] = "FailedToGetAssetPermissions";
294
- IModelHubStatus[IModelHubStatus["FailedToGetAssetMembers"] = 102446] = "FailedToGetAssetMembers";
295
- IModelHubStatus[IModelHubStatus["ITwinDoesNotExist"] = 102447] = "ITwinDoesNotExist";
296
- IModelHubStatus[IModelHubStatus["LockChunkDoesNotExist"] = 102449] = "LockChunkDoesNotExist";
297
- IModelHubStatus[IModelHubStatus["CheckpointAlreadyExists"] = 102450] = "CheckpointAlreadyExists";
298
- IModelHubStatus[IModelHubStatus["CheckpointDoesNotExist"] = 102451] = "CheckpointDoesNotExist";
299
- // Errors that are returned for incorrect iModelHub request.
300
- IModelHubStatus[IModelHubStatus["UndefinedArgumentError"] = 102657] = "UndefinedArgumentError";
301
- IModelHubStatus[IModelHubStatus["InvalidArgumentError"] = 102658] = "InvalidArgumentError";
302
- IModelHubStatus[IModelHubStatus["MissingDownloadUrlError"] = 102659] = "MissingDownloadUrlError";
303
- IModelHubStatus[IModelHubStatus["NotSupportedInBrowser"] = 102660] = "NotSupportedInBrowser";
304
- IModelHubStatus[IModelHubStatus["FileHandlerNotSet"] = 102661] = "FileHandlerNotSet";
305
- IModelHubStatus[IModelHubStatus["FileNotFound"] = 102662] = "FileNotFound";
306
- IModelHubStatus[IModelHubStatus["InitializationTimeout"] = 102663] = "InitializationTimeout";
307
- })(IModelHubStatus = exports.IModelHubStatus || (exports.IModelHubStatus = {}));
308
- /** GeoServiceStatus errors
309
- * @public
310
- */
311
- var GeoServiceStatus;
312
- (function (GeoServiceStatus) {
313
- GeoServiceStatus[GeoServiceStatus["Success"] = 0] = "Success";
314
- GeoServiceStatus[GeoServiceStatus["GEOSERVICESTATUS_BASE"] = 147456] = "GEOSERVICESTATUS_BASE";
315
- // Error mapped from 'IModelStatus'
316
- GeoServiceStatus[GeoServiceStatus["NoGeoLocation"] = 65602] = "NoGeoLocation";
317
- // Following errors are mapped from 'GeoCoordStatus'
318
- GeoServiceStatus[GeoServiceStatus["OutOfUsefulRange"] = 147457] = "OutOfUsefulRange";
319
- GeoServiceStatus[GeoServiceStatus["OutOfMathematicalDomain"] = 147458] = "OutOfMathematicalDomain";
320
- GeoServiceStatus[GeoServiceStatus["NoDatumConverter"] = 147459] = "NoDatumConverter";
321
- GeoServiceStatus[GeoServiceStatus["VerticalDatumConvertError"] = 147460] = "VerticalDatumConvertError";
322
- GeoServiceStatus[GeoServiceStatus["CSMapError"] = 147461] = "CSMapError";
323
- GeoServiceStatus[GeoServiceStatus["Pending"] = 147462] = "Pending";
324
- })(GeoServiceStatus = exports.GeoServiceStatus || (exports.GeoServiceStatus = {}));
325
- /** Error status from various reality data operations
326
- * @alpha
327
- */
328
- var RealityDataStatus;
329
- (function (RealityDataStatus) {
330
- RealityDataStatus[RealityDataStatus["Success"] = 0] = "Success";
331
- RealityDataStatus[RealityDataStatus["REALITYDATA_ERROR_BASE"] = 151552] = "REALITYDATA_ERROR_BASE";
332
- RealityDataStatus[RealityDataStatus["InvalidData"] = 151553] = "InvalidData";
333
- })(RealityDataStatus = exports.RealityDataStatus || (exports.RealityDataStatus = {}));
334
- function isObject(obj) {
335
- return typeof obj === "object" && obj !== null;
336
- }
337
- /** Base exception class for iTwin.js exceptions.
338
- * @public
339
- */
340
- class BentleyError extends Error {
341
- /**
342
- * @param errorNumber The a number that identifies of the problem.
343
- * @param message message that describes the problem (should not be localized).
344
- * @param metaData metaData about the exception.
345
- */
346
- constructor(errorNumber, message, metaData) {
347
- super(message);
348
- this.errorNumber = errorNumber;
349
- this.errorNumber = errorNumber;
350
- this._metaData = metaData;
351
- this.name = this._initName();
352
- }
353
- /** Returns true if this BentleyError includes (optional) metadata. */
354
- get hasMetaData() { return undefined !== this._metaData; }
355
- /** get the meta data associated with this BentleyError, if any. */
356
- getMetaData() {
357
- return BentleyError.getMetaData(this._metaData);
358
- }
359
- /** get the metadata object associated with an ExceptionMetaData, if any. */
360
- static getMetaData(metaData) {
361
- return (typeof metaData === "function") ? metaData() : metaData;
362
- }
363
- /** This function returns the name of each error status. Override this method to handle more error status codes. */
364
- _initName() {
365
- switch (this.errorNumber) {
366
- case IModelStatus.AlreadyLoaded: return "Already Loaded";
367
- case IModelStatus.AlreadyOpen: return "Already Open";
368
- case IModelStatus.BadArg: return "Bad Arg";
369
- case IModelStatus.BadElement: return "Bad Element";
370
- case IModelStatus.BadModel: return "Bad Model";
371
- case IModelStatus.BadRequest: return "Bad Request";
372
- case IModelStatus.BadSchema: return "Bad Schema";
373
- case IModelStatus.CannotUndo: return "Can not Undo";
374
- case IModelStatus.CodeNotReserved: return "Code Not Reserved";
375
- case IModelStatus.DeletionProhibited: return "Deletion Prohibited";
376
- case IModelStatus.DuplicateCode: return "Duplicate Code";
377
- case IModelStatus.DuplicateName: return "Duplicate Name";
378
- case IModelStatus.ElementBlockedChange: return "Element Blocked Change";
379
- case IModelStatus.FileAlreadyExists: return "File Already Exists";
380
- case IModelStatus.FileNotFound: return "File Not Found";
381
- case IModelStatus.FileNotLoaded: return "File Not Loaded";
382
- case IModelStatus.ForeignKeyConstraint: return "ForeignKey Constraint";
383
- case IModelStatus.IdExists: return "Id Exists";
384
- case IModelStatus.InDynamicTransaction: return "InDynamicTransaction";
385
- case IModelStatus.InvalidCategory: return "Invalid Category";
386
- case IModelStatus.InvalidCode: return "Invalid Code";
387
- case IModelStatus.InvalidCodeSpec: return "Invalid CodeSpec";
388
- case IModelStatus.InvalidId: return "Invalid Id";
389
- case IModelStatus.InvalidName: return "Invalid Name";
390
- case IModelStatus.InvalidParent: return "Invalid Parent";
391
- case IModelStatus.InvalidProfileVersion: return "Invalid Profile Version";
392
- case IModelStatus.IsCreatingChangeSet: return "IsCreatingChangeSet";
393
- case IModelStatus.LockNotHeld: return "Lock Not Held";
394
- case IModelStatus.Mismatch2d3d: return "Mismatch 2d3d";
395
- case IModelStatus.MismatchGcs: return "Mismatch Gcs";
396
- case IModelStatus.MissingDomain: return "Missing Domain";
397
- case IModelStatus.MissingHandler: return "Missing Handler";
398
- case IModelStatus.MissingId: return "Missing Id";
399
- case IModelStatus.NoGeometry: return "No Geometry";
400
- case IModelStatus.NoMultiTxnOperation: return "NoMultiTxnOperation";
401
- case IModelStatus.NotEnabled: return "Not Enabled";
402
- case IModelStatus.NotFound: return "Not Found";
403
- case IModelStatus.NotOpen: return "Not Open";
404
- case IModelStatus.NotOpenForWrite: return "Not Open For Write";
405
- case IModelStatus.NotSameUnitBase: return "Not Same Unit Base";
406
- case IModelStatus.NothingToRedo: return "Nothing To Redo";
407
- case IModelStatus.NothingToUndo: return "Nothing To Undo";
408
- case IModelStatus.ParentBlockedChange: return "Parent Blocked Change";
409
- case IModelStatus.ReadError: return "Read Error";
410
- case IModelStatus.ReadOnly: return "ReadOnly";
411
- case IModelStatus.ReadOnlyDomain: return "ReadOnlyDomain";
412
- case IModelStatus.RepositoryManagerError: return "RepositoryManagerError";
413
- case IModelStatus.SQLiteError: return "SQLiteError";
414
- case IModelStatus.TransactionActive: return "Transaction Active";
415
- case IModelStatus.UnitsMissing: return "Units Missing";
416
- case IModelStatus.UnknownFormat: return "Unknown Format";
417
- case IModelStatus.UpgradeFailed: return "Upgrade Failed";
418
- case IModelStatus.ValidationFailed: return "Validation Failed";
419
- case IModelStatus.VersionTooNew: return "Version Too New";
420
- case IModelStatus.VersionTooOld: return "Version Too Old";
421
- case IModelStatus.ViewNotFound: return "View Not Found";
422
- case IModelStatus.WriteError: return "Write Error";
423
- case IModelStatus.WrongClass: return "Wrong Class";
424
- case IModelStatus.WrongIModel: return "Wrong IModel";
425
- case IModelStatus.WrongDomain: return "Wrong Domain";
426
- case IModelStatus.WrongElement: return "Wrong Element";
427
- case IModelStatus.WrongHandler: return "Wrong Handler";
428
- case IModelStatus.WrongModel: return "Wrong Model";
429
- case BeSQLite_1.DbResult.BE_SQLITE_ERROR: return "BE_SQLITE_ERROR";
430
- case BeSQLite_1.DbResult.BE_SQLITE_INTERNAL: return "BE_SQLITE_INTERNAL";
431
- case BeSQLite_1.DbResult.BE_SQLITE_PERM: return "BE_SQLITE_PERM";
432
- case BeSQLite_1.DbResult.BE_SQLITE_ABORT: return "BE_SQLITE_ABORT";
433
- case BeSQLite_1.DbResult.BE_SQLITE_BUSY: return "Db is busy";
434
- case BeSQLite_1.DbResult.BE_SQLITE_LOCKED: return "Db is Locked";
435
- case BeSQLite_1.DbResult.BE_SQLITE_NOMEM: return "BE_SQLITE_NOMEM";
436
- case BeSQLite_1.DbResult.BE_SQLITE_READONLY: return "Readonly";
437
- case BeSQLite_1.DbResult.BE_SQLITE_INTERRUPT: return "BE_SQLITE_INTERRUPT";
438
- case BeSQLite_1.DbResult.BE_SQLITE_IOERR: return "BE_SQLITE_IOERR";
439
- case BeSQLite_1.DbResult.BE_SQLITE_CORRUPT: return "BE_SQLITE_CORRUPT";
440
- case BeSQLite_1.DbResult.BE_SQLITE_NOTFOUND: return "Not Found";
441
- case BeSQLite_1.DbResult.BE_SQLITE_FULL: return "BE_SQLITE_FULL";
442
- case BeSQLite_1.DbResult.BE_SQLITE_CANTOPEN: return "Can't open";
443
- case BeSQLite_1.DbResult.BE_SQLITE_PROTOCOL: return "BE_SQLITE_PROTOCOL";
444
- case BeSQLite_1.DbResult.BE_SQLITE_EMPTY: return "BE_SQLITE_EMPTY";
445
- case BeSQLite_1.DbResult.BE_SQLITE_SCHEMA: return "BE_SQLITE_SCHEMA";
446
- case BeSQLite_1.DbResult.BE_SQLITE_TOOBIG: return "BE_SQLITE_TOOBIG";
447
- case BeSQLite_1.DbResult.BE_SQLITE_MISMATCH: return "BE_SQLITE_MISMATCH";
448
- case BeSQLite_1.DbResult.BE_SQLITE_MISUSE: return "BE_SQLITE_MISUSE";
449
- case BeSQLite_1.DbResult.BE_SQLITE_NOLFS: return "BE_SQLITE_NOLFS";
450
- case BeSQLite_1.DbResult.BE_SQLITE_AUTH: return "BE_SQLITE_AUTH";
451
- case BeSQLite_1.DbResult.BE_SQLITE_FORMAT: return "BE_SQLITE_FORMAT";
452
- case BeSQLite_1.DbResult.BE_SQLITE_RANGE: return "BE_SQLITE_RANGE";
453
- case BeSQLite_1.DbResult.BE_SQLITE_NOTADB: return "Not a Database";
454
- case BeSQLite_1.DbResult.BE_SQLITE_IOERR_READ: return "BE_SQLITE_IOERR_READ";
455
- case BeSQLite_1.DbResult.BE_SQLITE_IOERR_SHORT_READ: return "BE_SQLITE_IOERR_SHORT_READ";
456
- case BeSQLite_1.DbResult.BE_SQLITE_IOERR_WRITE: return "BE_SQLITE_IOERR_WRITE";
457
- case BeSQLite_1.DbResult.BE_SQLITE_IOERR_FSYNC: return "BE_SQLITE_IOERR_FSYNC";
458
- case BeSQLite_1.DbResult.BE_SQLITE_IOERR_DIR_FSYNC: return "BE_SQLITE_IOERR_DIR_FSYNC";
459
- case BeSQLite_1.DbResult.BE_SQLITE_IOERR_TRUNCATE: return "BE_SQLITE_IOERR_TRUNCATE";
460
- case BeSQLite_1.DbResult.BE_SQLITE_IOERR_FSTAT: return "BE_SQLITE_IOERR_FSTAT";
461
- case BeSQLite_1.DbResult.BE_SQLITE_IOERR_UNLOCK: return "BE_SQLITE_IOERR_UNLOCK";
462
- case BeSQLite_1.DbResult.BE_SQLITE_IOERR_RDLOCK: return "BE_SQLITE_IOERR_RDLOCK";
463
- case BeSQLite_1.DbResult.BE_SQLITE_IOERR_DELETE: return "BE_SQLITE_IOERR_DELETE";
464
- case BeSQLite_1.DbResult.BE_SQLITE_IOERR_BLOCKED: return "BE_SQLITE_IOERR_BLOCKED";
465
- case BeSQLite_1.DbResult.BE_SQLITE_IOERR_NOMEM: return "BE_SQLITE_IOERR_NOMEM";
466
- case BeSQLite_1.DbResult.BE_SQLITE_IOERR_ACCESS: return "BE_SQLITE_IOERR_ACCESS";
467
- case BeSQLite_1.DbResult.BE_SQLITE_IOERR_CHECKRESERVEDLOCK: return "BE_SQLITE_IOERR_CHECKRESERVEDLOCK";
468
- case BeSQLite_1.DbResult.BE_SQLITE_IOERR_LOCK: return "BE_SQLITE_IOERR_LOCK";
469
- case BeSQLite_1.DbResult.BE_SQLITE_IOERR_CLOSE: return "BE_SQLITE_IOERR_CLOSE";
470
- case BeSQLite_1.DbResult.BE_SQLITE_IOERR_DIR_CLOSE: return "BE_SQLITE_IOERR_DIR_CLOSE";
471
- case BeSQLite_1.DbResult.BE_SQLITE_IOERR_SHMOPEN: return "BE_SQLITE_IOERR_SHMOPEN";
472
- case BeSQLite_1.DbResult.BE_SQLITE_IOERR_SHMSIZE: return "BE_SQLITE_IOERR_SHMSIZE";
473
- case BeSQLite_1.DbResult.BE_SQLITE_IOERR_SHMLOCK: return "BE_SQLITE_IOERR_SHMLOCK";
474
- case BeSQLite_1.DbResult.BE_SQLITE_IOERR_SHMMAP: return "BE_SQLITE_IOERR_SHMMAP";
475
- case BeSQLite_1.DbResult.BE_SQLITE_IOERR_SEEK: return "BE_SQLITE_IOERR_SEEK";
476
- case BeSQLite_1.DbResult.BE_SQLITE_IOERR_DELETE_NOENT: return "BE_SQLITE_IOERR_DELETE_NOENT";
477
- case BeSQLite_1.DbResult.BE_SQLITE_ERROR_FileExists: return "File Exists";
478
- case BeSQLite_1.DbResult.BE_SQLITE_ERROR_AlreadyOpen: return "Already Open";
479
- case BeSQLite_1.DbResult.BE_SQLITE_ERROR_NoPropertyTable: return "No Property Table";
480
- case BeSQLite_1.DbResult.BE_SQLITE_ERROR_FileNotFound: return "File Not Found";
481
- case BeSQLite_1.DbResult.BE_SQLITE_ERROR_NoTxnActive: return "No Txn Active";
482
- case BeSQLite_1.DbResult.BE_SQLITE_ERROR_BadDbProfile: return "Bad Db Profile";
483
- case BeSQLite_1.DbResult.BE_SQLITE_ERROR_InvalidProfileVersion: return "Invalid Profile Version";
484
- case BeSQLite_1.DbResult.BE_SQLITE_ERROR_ProfileUpgradeFailed: return "Profile Upgrade Failed";
485
- case BeSQLite_1.DbResult.BE_SQLITE_ERROR_ProfileTooOldForReadWrite: return "Profile Too Old For ReadWrite";
486
- case BeSQLite_1.DbResult.BE_SQLITE_ERROR_ProfileTooOld: return "Profile Too Old";
487
- case BeSQLite_1.DbResult.BE_SQLITE_ERROR_ProfileTooNewForReadWrite: return "Profile Too New For ReadWrite";
488
- case BeSQLite_1.DbResult.BE_SQLITE_ERROR_ProfileTooNew: return "Profile Too New";
489
- case BeSQLite_1.DbResult.BE_SQLITE_ERROR_ChangeTrackError: return "ChangeTrack Error";
490
- case BeSQLite_1.DbResult.BE_SQLITE_ERROR_InvalidChangeSetVersion: return "Invalid ChangeSet Version";
491
- case BeSQLite_1.DbResult.BE_SQLITE_ERROR_SchemaUpgradeRequired: return "Schema Upgrade Required";
492
- case BeSQLite_1.DbResult.BE_SQLITE_ERROR_SchemaTooNew: return "Schema Too New";
493
- case BeSQLite_1.DbResult.BE_SQLITE_ERROR_SchemaTooOld: return "Schema Too Old";
494
- case BeSQLite_1.DbResult.BE_SQLITE_ERROR_SchemaLockFailed: return "Schema Lock Failed";
495
- case BeSQLite_1.DbResult.BE_SQLITE_ERROR_SchemaUpgradeFailed: return "Schema Upgrade Failed";
496
- case BeSQLite_1.DbResult.BE_SQLITE_ERROR_SchemaImportFailed: return "Schema Import Failed";
497
- case BeSQLite_1.DbResult.BE_SQLITE_ERROR_CouldNotAcquireLocksOrCodes: return "Could Not Acquire Locks Or Codes";
498
- case BeSQLite_1.DbResult.BE_SQLITE_ERROR_SchemaUpgradeRecommended: return "Recommended that the schemas found in the database be upgraded";
499
- case BeSQLite_1.DbResult.BE_SQLITE_LOCKED_SHAREDCACHE: return "BE_SQLITE_LOCKED_SHAREDCACHE";
500
- case BeSQLite_1.DbResult.BE_SQLITE_BUSY_RECOVERY: return "BE_SQLITE_BUSY_RECOVERY";
501
- case BeSQLite_1.DbResult.BE_SQLITE_CANTOPEN_NOTEMPDIR: return "SQLite No Temp Dir";
502
- case BeSQLite_1.DbResult.BE_SQLITE_CANTOPEN_ISDIR: return "BE_SQLITE_CANTOPEN_ISDIR";
503
- case BeSQLite_1.DbResult.BE_SQLITE_CANTOPEN_FULLPATH: return "BE_SQLITE_CANTOPEN_FULLPATH";
504
- case BeSQLite_1.DbResult.BE_SQLITE_CORRUPT_VTAB: return "BE_SQLITE_CORRUPT_VTAB";
505
- case BeSQLite_1.DbResult.BE_SQLITE_READONLY_RECOVERY: return "BE_SQLITE_READONLY_RECOVERY";
506
- case BeSQLite_1.DbResult.BE_SQLITE_READONLY_CANTLOCK: return "BE_SQLITE_READONLY_CANTLOCK";
507
- case BeSQLite_1.DbResult.BE_SQLITE_READONLY_ROLLBACK: return "BE_SQLITE_READONLY_ROLLBACK";
508
- case BeSQLite_1.DbResult.BE_SQLITE_ABORT_ROLLBACK: return "BE_SQLITE_ABORT_ROLLBACK";
509
- case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_CHECK: return "BE_SQLITE_CONSTRAINT_CHECK";
510
- case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_COMMITHOOK: return "CommitHook Constraint Error";
511
- case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_FOREIGNKEY: return "Foreign Key Constraint Error";
512
- case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_FUNCTION: return "Function Constraint Error";
513
- case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_NOTNULL: return "NotNull Constraint Error";
514
- case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_PRIMARYKEY: return "Primary Key Constraint Error";
515
- case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_TRIGGER: return "Trigger Constraint Error";
516
- case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_UNIQUE: return "Unique Constraint Error";
517
- case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_VTAB: return "VTable Constraint Error";
518
- case BentleyStatus.ERROR: return "Error";
519
- case BriefcaseStatus.CannotAcquire: return "CannotAcquire";
520
- case BriefcaseStatus.CannotDownload: return "CannotDownload";
521
- case BriefcaseStatus.CannotCopy: return "CannotCopy";
522
- case BriefcaseStatus.CannotDelete: return "CannotDelete";
523
- case BriefcaseStatus.VersionNotFound: return "VersionNotFound";
524
- case BriefcaseStatus.DownloadCancelled: return "DownloadCancelled";
525
- case BriefcaseStatus.ContainsDeletedChangeSets: return "ContainsDeletedChangeSets";
526
- case RpcInterfaceStatus.IncompatibleVersion: return "RpcInterfaceStatus.IncompatibleVersion";
527
- case ChangeSetStatus.ApplyError: return "Error applying a change set";
528
- case ChangeSetStatus.ChangeTrackingNotEnabled: return "Change tracking has not been enabled. The ChangeSet API mandates this";
529
- case ChangeSetStatus.CorruptedChangeStream: return "Contents of the change stream are corrupted and does not match the ChangeSet";
530
- case ChangeSetStatus.FileNotFound: return "File containing the changes was not found";
531
- case ChangeSetStatus.FileWriteError: return "Error writing the contents of the change set to the backing change stream file";
532
- case ChangeSetStatus.HasLocalChanges: return "Cannot perform the operation since the Db has local changes";
533
- case ChangeSetStatus.HasUncommittedChanges: return "Cannot perform the operation since current transaction has uncommitted changes";
534
- case ChangeSetStatus.InvalidId: return "Invalid ChangeSet Id";
535
- case ChangeSetStatus.InvalidVersion: return "Invalid version of the change set";
536
- case ChangeSetStatus.InDynamicTransaction: return "Cannot perform the operation since system is in the middle of a dynamic transaction";
537
- case ChangeSetStatus.IsCreatingChangeSet: return "Cannot perform operation since system is in the middle of a creating a change set";
538
- case ChangeSetStatus.IsNotCreatingChangeSet: return "Cannot perform operation since the system is not creating a change set";
539
- case ChangeSetStatus.MergePropagationError: return "Error propagating the changes after the merge";
540
- case ChangeSetStatus.NothingToMerge: return "No change sets to merge";
541
- case ChangeSetStatus.NoTransactions: return "No transactions are available to create a change set";
542
- case ChangeSetStatus.ParentMismatch: return "Parent change set of the Db does not match the parent id of the change set";
543
- case ChangeSetStatus.SQLiteError: return "Error performing a SQLite operation on the Db";
544
- case ChangeSetStatus.WrongDgnDb: return "ChangeSet originated in a different Db";
545
- case ChangeSetStatus.CouldNotOpenDgnDb: return "Could not open the DgnDb to merge change set";
546
- case ChangeSetStatus.MergeSchemaChangesOnOpen: return "Cannot merge changes in in an open DgnDb. Close the DgnDb, and process the operation when it is opened";
547
- case ChangeSetStatus.ReverseOrReinstateSchemaChanges: return "Cannot reverse or reinstate schema changes.";
548
- case ChangeSetStatus.ProcessSchemaChangesOnOpen: return "Cannot process changes schema changes in an open DgnDb. Close the DgnDb, and process the operation when it is opened";
549
- case ChangeSetStatus.CannotMergeIntoReadonly: return "Cannot merge changes into a Readonly DgnDb";
550
- case ChangeSetStatus.CannotMergeIntoMaster: return "Cannot merge changes into a Master DgnDb";
551
- case ChangeSetStatus.CannotMergeIntoReversed: return "Cannot merge changes into a DgnDb that has reversed change sets";
552
- case ChangeSetStatus.DownloadCancelled: return "ChangeSet(s) download was cancelled.";
553
- case RepositoryStatus.ServerUnavailable: return "ServerUnavailable";
554
- case RepositoryStatus.LockAlreadyHeld: return "LockAlreadyHeld";
555
- case RepositoryStatus.SyncError: return "SyncError";
556
- case RepositoryStatus.InvalidResponse: return "InvalidResponse";
557
- case RepositoryStatus.PendingTransactions: return "PendingTransactions";
558
- case RepositoryStatus.LockUsed: return "LockUsed";
559
- case RepositoryStatus.CannotCreateChangeSet: return "CannotCreateChangeSet";
560
- case RepositoryStatus.InvalidRequest: return "InvalidRequest";
561
- case RepositoryStatus.ChangeSetRequired: return "ChangeSetRequired";
562
- case RepositoryStatus.CodeUnavailable: return "CodeUnavailable";
563
- case RepositoryStatus.CodeNotReserved: return "CodeNotReserved";
564
- case RepositoryStatus.CodeUsed: return "CodeUsed";
565
- case RepositoryStatus.LockNotHeld: return "LockNotHeld";
566
- case RepositoryStatus.RepositoryIsLocked: return "RepositoryIsLocked";
567
- case RepositoryStatus.ChannelConstraintViolation: return "ChannelConstraintViolation";
568
- case HttpStatus.Info: return "HTTP Info";
569
- case HttpStatus.Redirection: return "HTTP Redirection";
570
- case HttpStatus.ClientError: return "HTTP Client error";
571
- case HttpStatus.ServerError: return "HTTP Server error";
572
- case IModelHubStatus.Unknown: return "Unknown error";
573
- case IModelHubStatus.MissingRequiredProperties: return "Missing required properties";
574
- case IModelHubStatus.InvalidPropertiesValues: return "Invalid properties values";
575
- case IModelHubStatus.UserDoesNotHavePermission: return "User does not have permission";
576
- case IModelHubStatus.UserDoesNotHaveAccess: return "User does not have access";
577
- case IModelHubStatus.InvalidBriefcase: return "Invalid briefcase";
578
- case IModelHubStatus.BriefcaseDoesNotExist: return "Briefcase does not exist";
579
- case IModelHubStatus.BriefcaseDoesNotBelongToUser: return "Briefcase does not belong to user";
580
- case IModelHubStatus.AnotherUserPushing: return "Another user pushing";
581
- case IModelHubStatus.ChangeSetAlreadyExists: return "ChangeSet already exists";
582
- case IModelHubStatus.ChangeSetDoesNotExist: return "ChangeSet does not exist";
583
- case IModelHubStatus.FileIsNotUploaded: return "File is not uploaded";
584
- case IModelHubStatus.iModelIsNotInitialized: return "iModel is not initialized";
585
- case IModelHubStatus.ChangeSetPointsToBadSeed: return "ChangeSet points to a bad seed file";
586
- case IModelHubStatus.OperationFailed: return "iModelHub operation has failed";
587
- case IModelHubStatus.PullIsRequired: return "Pull is required";
588
- case IModelHubStatus.MaximumNumberOfBriefcasesPerUser: return "Limit of briefcases per user was reached";
589
- case IModelHubStatus.MaximumNumberOfBriefcasesPerUserPerMinute: return "Limit of briefcases per user per minute was reached";
590
- case IModelHubStatus.DatabaseTemporarilyLocked: return "Database is temporarily locked";
591
- case IModelHubStatus.iModelIsLocked: return "iModel is locked";
592
- case IModelHubStatus.CodesExist: return "Code already exists";
593
- case IModelHubStatus.LocksExist: return "Lock already exists";
594
- case IModelHubStatus.iModelAlreadyExists: return "iModel already exists";
595
- case IModelHubStatus.iModelDoesNotExist: return "iModel does not exist";
596
- case IModelHubStatus.LockDoesNotExist: return "Lock does not exist";
597
- case IModelHubStatus.LockChunkDoesNotExist: return "Lock chunk does not exist";
598
- case IModelHubStatus.LockOwnedByAnotherBriefcase: return "Lock is owned by another briefcase";
599
- case IModelHubStatus.CodeStateInvalid: return "Code state is invalid";
600
- case IModelHubStatus.CodeReservedByAnotherBriefcase: return "Code is reserved by another briefcase";
601
- case IModelHubStatus.CodeDoesNotExist: return "Code does not exist";
602
- case IModelHubStatus.FileDoesNotExist: return "File does not exist";
603
- case IModelHubStatus.FileAlreadyExists: return "File already exists";
604
- case IModelHubStatus.EventTypeDoesNotExist: return "Event type does not exist";
605
- case IModelHubStatus.EventSubscriptionDoesNotExist: return "Event subscription does not exist";
606
- case IModelHubStatus.EventSubscriptionAlreadyExists: return "Event subscription already exists";
607
- case IModelHubStatus.ITwinIdIsNotSpecified: return "ITwin Id is not specified";
608
- case IModelHubStatus.FailedToGetITwinPermissions: return "Failed to get iTwin permissions";
609
- case IModelHubStatus.FailedToGetITwinMembers: return "Failed to get iTwin members";
610
- case IModelHubStatus.FailedToGetAssetPermissions: return "Failed to get asset permissions";
611
- case IModelHubStatus.FailedToGetAssetMembers: return "Failed to get asset members";
612
- case IModelHubStatus.ChangeSetAlreadyHasVersion: return "ChangeSet already has version";
613
- case IModelHubStatus.VersionAlreadyExists: return "Version already exists";
614
- case IModelHubStatus.JobSchedulingFailed: return "Failed to schedule a background job";
615
- case IModelHubStatus.ConflictsAggregate: return "Codes or locks are owned by another briefcase";
616
- case IModelHubStatus.FailedToGetITwinById: return "Failed to query iTwin by its id";
617
- case IModelHubStatus.DatabaseOperationFailed: return "Database operation has failed";
618
- case IModelHubStatus.ITwinDoesNotExist: return "ITwin does not exist";
619
- case IModelHubStatus.UndefinedArgumentError: return "Undefined argument";
620
- case IModelHubStatus.InvalidArgumentError: return "Invalid argument";
621
- case IModelHubStatus.MissingDownloadUrlError: return "Missing download url";
622
- case IModelHubStatus.NotSupportedInBrowser: return "Not supported in browser";
623
- case IModelHubStatus.FileHandlerNotSet: return "File handler is not set";
624
- case IModelHubStatus.FileNotFound: return "File not found";
625
- case GeoServiceStatus.NoGeoLocation: return "No GeoLocation";
626
- case GeoServiceStatus.OutOfUsefulRange: return "Out of useful range";
627
- case GeoServiceStatus.OutOfMathematicalDomain: return "Out of mathematical domain";
628
- case GeoServiceStatus.NoDatumConverter: return "No datum converter";
629
- case GeoServiceStatus.VerticalDatumConvertError: return "Vertical datum convert error";
630
- case GeoServiceStatus.CSMapError: return "CSMap error";
631
- case GeoServiceStatus.Pending: return "Pending";
632
- case RealityDataStatus.InvalidData: return "Invalid or unknown data";
633
- case IModelStatus.Success:
634
- case BeSQLite_1.DbResult.BE_SQLITE_OK:
635
- case BeSQLite_1.DbResult.BE_SQLITE_ROW:
636
- case BeSQLite_1.DbResult.BE_SQLITE_DONE:
637
- case BentleyStatus.SUCCESS:
638
- return "Success";
639
- default:
640
- return `Error (${this.errorNumber})`;
641
- }
642
- }
643
- /** Use run-time type checking to safely get a useful string summary of an unknown error value, or `""` if none exists.
644
- * @note It's recommended to use this function in `catch` clauses, where a caught value cannot be assumed to be `instanceof Error`
645
- * @public
646
- */
647
- static getErrorMessage(error) {
648
- if (typeof error === "string")
649
- return error;
650
- if (error instanceof Error)
651
- return error.toString();
652
- if (isObject(error)) {
653
- if (typeof error.message === "string")
654
- return error.message;
655
- if (typeof error.msg === "string")
656
- return error.msg;
657
- if (error.toString() !== "[object Object]")
658
- return error.toString();
659
- }
660
- return "";
661
- }
662
- /** Use run-time type checking to safely get the call stack of an unknown error value, if possible.
663
- * @note It's recommended to use this function in `catch` clauses, where a caught value cannot be assumed to be `instanceof Error`
664
- * @public
665
- */
666
- static getErrorStack(error) {
667
- if (isObject(error) && typeof error.stack === "string")
668
- return error.stack;
669
- return undefined;
670
- }
671
- /** Use run-time type checking to safely get the metadata with an unknown error value, if possible.
672
- * @note It's recommended to use this function in `catch` clauses, where a caught value cannot be assumed to be `instanceof BentleyError`
673
- * @see [[BentleyError.getMetaData]]
674
- * @public
675
- */
676
- static getErrorMetadata(error) {
677
- if (isObject(error) && typeof error.getMetaData === "function") {
678
- const metadata = error.getMetaData();
679
- if (typeof metadata === "object" && metadata !== null)
680
- return metadata;
681
- }
682
- return undefined;
683
- }
684
- /** Returns a new `ErrorProps` object representing an unknown error value. Useful for logging or wrapping/re-throwing caught errors.
685
- * @note Unlike `Error` objects (which lose messages and call stacks when serialized to JSON), objects
686
- * returned by this are plain old JavaScript objects, and can be easily logged/serialized to JSON.
687
- * @public
688
- */
689
- static getErrorProps(error) {
690
- const serialized = {
691
- message: BentleyError.getErrorMessage(error),
692
- };
693
- const stack = BentleyError.getErrorStack(error);
694
- if (stack)
695
- serialized.stack = stack;
696
- const metadata = BentleyError.getErrorMetadata(error);
697
- if (metadata)
698
- serialized.metadata = metadata;
699
- return serialized;
700
- }
701
- }
702
- exports.BentleyError = BentleyError;
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 Errors
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.BentleyError = exports.RealityDataStatus = exports.GeoServiceStatus = exports.IModelHubStatus = exports.HttpStatus = exports.RepositoryStatus = exports.ChangeSetStatus = exports.RpcInterfaceStatus = exports.BriefcaseStatus = exports.IModelStatus = exports.BentleyStatus = void 0;
11
+ const BeSQLite_1 = require("./BeSQLite");
12
+ /** Standard status code.
13
+ * This status code should be rarely used.
14
+ * Prefer to throw an exception to indicate an error, rather than returning a special status code.
15
+ * If a status code is to be returned, prefer to return a more specific error status type such as IModelStatus or DbResult.
16
+ * @public
17
+ */
18
+ var BentleyStatus;
19
+ (function (BentleyStatus) {
20
+ BentleyStatus[BentleyStatus["SUCCESS"] = 0] = "SUCCESS";
21
+ BentleyStatus[BentleyStatus["ERROR"] = 32768] = "ERROR";
22
+ })(BentleyStatus = exports.BentleyStatus || (exports.BentleyStatus = {}));
23
+ /** Status codes that are used in conjunction with [[BentleyError]].
24
+ * Error status codes are divided into separate ranges for different kinds of errors. All known ranges at least should be defined here, to avoid collisions.
25
+ * @public
26
+ */
27
+ var IModelStatus;
28
+ (function (IModelStatus) {
29
+ IModelStatus[IModelStatus["IMODEL_ERROR_BASE"] = 65536] = "IMODEL_ERROR_BASE";
30
+ IModelStatus[IModelStatus["Success"] = 0] = "Success";
31
+ IModelStatus[IModelStatus["AlreadyLoaded"] = 65537] = "AlreadyLoaded";
32
+ IModelStatus[IModelStatus["AlreadyOpen"] = 65538] = "AlreadyOpen";
33
+ IModelStatus[IModelStatus["BadArg"] = 65539] = "BadArg";
34
+ IModelStatus[IModelStatus["BadElement"] = 65540] = "BadElement";
35
+ IModelStatus[IModelStatus["BadModel"] = 65541] = "BadModel";
36
+ IModelStatus[IModelStatus["BadRequest"] = 65542] = "BadRequest";
37
+ IModelStatus[IModelStatus["BadSchema"] = 65543] = "BadSchema";
38
+ IModelStatus[IModelStatus["CannotUndo"] = 65544] = "CannotUndo";
39
+ IModelStatus[IModelStatus["CodeNotReserved"] = 65545] = "CodeNotReserved";
40
+ IModelStatus[IModelStatus["DeletionProhibited"] = 65546] = "DeletionProhibited";
41
+ IModelStatus[IModelStatus["DuplicateCode"] = 65547] = "DuplicateCode";
42
+ IModelStatus[IModelStatus["DuplicateName"] = 65548] = "DuplicateName";
43
+ IModelStatus[IModelStatus["ElementBlockedChange"] = 65549] = "ElementBlockedChange";
44
+ IModelStatus[IModelStatus["FileAlreadyExists"] = 65550] = "FileAlreadyExists";
45
+ IModelStatus[IModelStatus["FileNotFound"] = 65551] = "FileNotFound";
46
+ IModelStatus[IModelStatus["FileNotLoaded"] = 65552] = "FileNotLoaded";
47
+ IModelStatus[IModelStatus["ForeignKeyConstraint"] = 65553] = "ForeignKeyConstraint";
48
+ IModelStatus[IModelStatus["IdExists"] = 65554] = "IdExists";
49
+ IModelStatus[IModelStatus["InDynamicTransaction"] = 65555] = "InDynamicTransaction";
50
+ IModelStatus[IModelStatus["InvalidCategory"] = 65556] = "InvalidCategory";
51
+ IModelStatus[IModelStatus["InvalidCode"] = 65557] = "InvalidCode";
52
+ IModelStatus[IModelStatus["InvalidCodeSpec"] = 65558] = "InvalidCodeSpec";
53
+ IModelStatus[IModelStatus["InvalidId"] = 65559] = "InvalidId";
54
+ IModelStatus[IModelStatus["InvalidName"] = 65560] = "InvalidName";
55
+ IModelStatus[IModelStatus["InvalidParent"] = 65561] = "InvalidParent";
56
+ IModelStatus[IModelStatus["InvalidProfileVersion"] = 65562] = "InvalidProfileVersion";
57
+ IModelStatus[IModelStatus["IsCreatingChangeSet"] = 65563] = "IsCreatingChangeSet";
58
+ IModelStatus[IModelStatus["LockNotHeld"] = 65564] = "LockNotHeld";
59
+ IModelStatus[IModelStatus["Mismatch2d3d"] = 65565] = "Mismatch2d3d";
60
+ IModelStatus[IModelStatus["MismatchGcs"] = 65566] = "MismatchGcs";
61
+ IModelStatus[IModelStatus["MissingDomain"] = 65567] = "MissingDomain";
62
+ IModelStatus[IModelStatus["MissingHandler"] = 65568] = "MissingHandler";
63
+ IModelStatus[IModelStatus["MissingId"] = 65569] = "MissingId";
64
+ IModelStatus[IModelStatus["NoGeometry"] = 65570] = "NoGeometry";
65
+ IModelStatus[IModelStatus["NoMultiTxnOperation"] = 65571] = "NoMultiTxnOperation";
66
+ IModelStatus[IModelStatus["NotEnabled"] = 65573] = "NotEnabled";
67
+ IModelStatus[IModelStatus["NotFound"] = 65574] = "NotFound";
68
+ IModelStatus[IModelStatus["NotOpen"] = 65575] = "NotOpen";
69
+ IModelStatus[IModelStatus["NotOpenForWrite"] = 65576] = "NotOpenForWrite";
70
+ IModelStatus[IModelStatus["NotSameUnitBase"] = 65577] = "NotSameUnitBase";
71
+ IModelStatus[IModelStatus["NothingToRedo"] = 65578] = "NothingToRedo";
72
+ IModelStatus[IModelStatus["NothingToUndo"] = 65579] = "NothingToUndo";
73
+ IModelStatus[IModelStatus["ParentBlockedChange"] = 65580] = "ParentBlockedChange";
74
+ IModelStatus[IModelStatus["ReadError"] = 65581] = "ReadError";
75
+ IModelStatus[IModelStatus["ReadOnly"] = 65582] = "ReadOnly";
76
+ IModelStatus[IModelStatus["ReadOnlyDomain"] = 65583] = "ReadOnlyDomain";
77
+ IModelStatus[IModelStatus["RepositoryManagerError"] = 65584] = "RepositoryManagerError";
78
+ IModelStatus[IModelStatus["SQLiteError"] = 65585] = "SQLiteError";
79
+ IModelStatus[IModelStatus["TransactionActive"] = 65586] = "TransactionActive";
80
+ IModelStatus[IModelStatus["UnitsMissing"] = 65587] = "UnitsMissing";
81
+ IModelStatus[IModelStatus["UnknownFormat"] = 65588] = "UnknownFormat";
82
+ IModelStatus[IModelStatus["UpgradeFailed"] = 65589] = "UpgradeFailed";
83
+ IModelStatus[IModelStatus["ValidationFailed"] = 65590] = "ValidationFailed";
84
+ IModelStatus[IModelStatus["VersionTooNew"] = 65591] = "VersionTooNew";
85
+ IModelStatus[IModelStatus["VersionTooOld"] = 65592] = "VersionTooOld";
86
+ IModelStatus[IModelStatus["ViewNotFound"] = 65593] = "ViewNotFound";
87
+ IModelStatus[IModelStatus["WriteError"] = 65594] = "WriteError";
88
+ IModelStatus[IModelStatus["WrongClass"] = 65595] = "WrongClass";
89
+ IModelStatus[IModelStatus["WrongIModel"] = 65596] = "WrongIModel";
90
+ IModelStatus[IModelStatus["WrongDomain"] = 65597] = "WrongDomain";
91
+ IModelStatus[IModelStatus["WrongElement"] = 65598] = "WrongElement";
92
+ IModelStatus[IModelStatus["WrongHandler"] = 65599] = "WrongHandler";
93
+ IModelStatus[IModelStatus["WrongModel"] = 65600] = "WrongModel";
94
+ IModelStatus[IModelStatus["ConstraintNotUnique"] = 65601] = "ConstraintNotUnique";
95
+ IModelStatus[IModelStatus["NoGeoLocation"] = 65602] = "NoGeoLocation";
96
+ IModelStatus[IModelStatus["ServerTimeout"] = 65603] = "ServerTimeout";
97
+ IModelStatus[IModelStatus["NoContent"] = 65604] = "NoContent";
98
+ IModelStatus[IModelStatus["NotRegistered"] = 65605] = "NotRegistered";
99
+ IModelStatus[IModelStatus["FunctionNotFound"] = 65606] = "FunctionNotFound";
100
+ IModelStatus[IModelStatus["NoActiveCommand"] = 65607] = "NoActiveCommand";
101
+ })(IModelStatus = exports.IModelStatus || (exports.IModelStatus = {}));
102
+ /** Error statuses produced by various briefcase operations, typically encountered as the `errorNumber` of an [IModelError]($common).
103
+ * @public
104
+ */
105
+ var BriefcaseStatus;
106
+ (function (BriefcaseStatus) {
107
+ BriefcaseStatus[BriefcaseStatus["BRIEFCASE_STATUS_BASE"] = 131072] = "BRIEFCASE_STATUS_BASE";
108
+ BriefcaseStatus[BriefcaseStatus["CannotAcquire"] = 131072] = "CannotAcquire";
109
+ BriefcaseStatus[BriefcaseStatus["CannotDownload"] = 131073] = "CannotDownload";
110
+ BriefcaseStatus[BriefcaseStatus["CannotUpload"] = 131074] = "CannotUpload";
111
+ BriefcaseStatus[BriefcaseStatus["CannotCopy"] = 131075] = "CannotCopy";
112
+ BriefcaseStatus[BriefcaseStatus["CannotDelete"] = 131076] = "CannotDelete";
113
+ BriefcaseStatus[BriefcaseStatus["VersionNotFound"] = 131077] = "VersionNotFound";
114
+ BriefcaseStatus[BriefcaseStatus["CannotApplyChanges"] = 131078] = "CannotApplyChanges";
115
+ BriefcaseStatus[BriefcaseStatus["DownloadCancelled"] = 131079] = "DownloadCancelled";
116
+ BriefcaseStatus[BriefcaseStatus["ContainsDeletedChangeSets"] = 131080] = "ContainsDeletedChangeSets";
117
+ })(BriefcaseStatus = exports.BriefcaseStatus || (exports.BriefcaseStatus = {}));
118
+ /** RpcInterface status codes
119
+ * @beta
120
+ */
121
+ var RpcInterfaceStatus;
122
+ (function (RpcInterfaceStatus) {
123
+ RpcInterfaceStatus[RpcInterfaceStatus["Success"] = 0] = "Success";
124
+ RpcInterfaceStatus[RpcInterfaceStatus["RPC_INTERFACE_ERROR_BASE"] = 135168] = "RPC_INTERFACE_ERROR_BASE";
125
+ /** The RpcInterface implemented by the server is incompatible with the interface requested by the client. */
126
+ RpcInterfaceStatus[RpcInterfaceStatus["IncompatibleVersion"] = 135168] = "IncompatibleVersion";
127
+ })(RpcInterfaceStatus = exports.RpcInterfaceStatus || (exports.RpcInterfaceStatus = {}));
128
+ /** Error statuses produced by various Changeset operations, typically encountered as the `errorNumber` of an [IModelError]($common).
129
+ * @public
130
+ */
131
+ var ChangeSetStatus;
132
+ (function (ChangeSetStatus) {
133
+ ChangeSetStatus[ChangeSetStatus["Success"] = 0] = "Success";
134
+ ChangeSetStatus[ChangeSetStatus["CHANGESET_ERROR_BASE"] = 90112] = "CHANGESET_ERROR_BASE";
135
+ /** Error applying a change set when reversing or reinstating it */
136
+ ChangeSetStatus[ChangeSetStatus["ApplyError"] = 90113] = "ApplyError";
137
+ /** Change tracking has not been enabled. The ChangeSet API mandates this. */
138
+ ChangeSetStatus[ChangeSetStatus["ChangeTrackingNotEnabled"] = 90114] = "ChangeTrackingNotEnabled";
139
+ /** Contents of the change stream are corrupted and does not match the ChangeSet */
140
+ ChangeSetStatus[ChangeSetStatus["CorruptedChangeStream"] = 90115] = "CorruptedChangeStream";
141
+ /** File containing the changes to the change set is not found */
142
+ ChangeSetStatus[ChangeSetStatus["FileNotFound"] = 90116] = "FileNotFound";
143
+ /** Error writing the contents of the change set to the backing change stream file */
144
+ ChangeSetStatus[ChangeSetStatus["FileWriteError"] = 90117] = "FileWriteError";
145
+ /** Cannot perform the operation since the Db has local changes */
146
+ ChangeSetStatus[ChangeSetStatus["HasLocalChanges"] = 90118] = "HasLocalChanges";
147
+ /** Cannot perform the operation since current transaction has uncommitted changes */
148
+ ChangeSetStatus[ChangeSetStatus["HasUncommittedChanges"] = 90119] = "HasUncommittedChanges";
149
+ /** Invalid ChangeSet Id */
150
+ ChangeSetStatus[ChangeSetStatus["InvalidId"] = 90120] = "InvalidId";
151
+ /** Invalid version of the change set */
152
+ ChangeSetStatus[ChangeSetStatus["InvalidVersion"] = 90121] = "InvalidVersion";
153
+ /** Cannot perform the operation since system is in the middle of a dynamic transaction */
154
+ ChangeSetStatus[ChangeSetStatus["InDynamicTransaction"] = 90122] = "InDynamicTransaction";
155
+ /** Cannot perform operation since system is in the middle of a creating a change set */
156
+ ChangeSetStatus[ChangeSetStatus["IsCreatingChangeSet"] = 90123] = "IsCreatingChangeSet";
157
+ /** Cannot perform operation since the system is not creating a change set */
158
+ ChangeSetStatus[ChangeSetStatus["IsNotCreatingChangeSet"] = 90124] = "IsNotCreatingChangeSet";
159
+ /** Error propagating the changes after the merge */
160
+ ChangeSetStatus[ChangeSetStatus["MergePropagationError"] = 90125] = "MergePropagationError";
161
+ /** No change sets to merge */
162
+ ChangeSetStatus[ChangeSetStatus["NothingToMerge"] = 90126] = "NothingToMerge";
163
+ /** No transactions are available to create a change set */
164
+ ChangeSetStatus[ChangeSetStatus["NoTransactions"] = 90127] = "NoTransactions";
165
+ /** Parent change set of the Db does not match the parent id of the change set */
166
+ ChangeSetStatus[ChangeSetStatus["ParentMismatch"] = 90128] = "ParentMismatch";
167
+ /** Error performing a SQLite operation on the Db */
168
+ ChangeSetStatus[ChangeSetStatus["SQLiteError"] = 90129] = "SQLiteError";
169
+ /** ChangeSet originated in a different Db */
170
+ ChangeSetStatus[ChangeSetStatus["WrongDgnDb"] = 90130] = "WrongDgnDb";
171
+ /** Could not open the DgnDb to merge change set */
172
+ ChangeSetStatus[ChangeSetStatus["CouldNotOpenDgnDb"] = 90131] = "CouldNotOpenDgnDb";
173
+ /** Cannot merge changes in in an open DgnDb. Close the DgnDb, and process the operation when it is opened. */
174
+ ChangeSetStatus[ChangeSetStatus["MergeSchemaChangesOnOpen"] = 90132] = "MergeSchemaChangesOnOpen";
175
+ /** Cannot reverse or reinstate schema changes. */
176
+ ChangeSetStatus[ChangeSetStatus["ReverseOrReinstateSchemaChanges"] = 90133] = "ReverseOrReinstateSchemaChanges";
177
+ /** Cannot process changes schema changes in an open DgnDb. Close the DgnDb, and process the operation when it is opened. */
178
+ ChangeSetStatus[ChangeSetStatus["ProcessSchemaChangesOnOpen"] = 90134] = "ProcessSchemaChangesOnOpen";
179
+ /** Cannot merge changes into a Readonly DgnDb. */
180
+ ChangeSetStatus[ChangeSetStatus["CannotMergeIntoReadonly"] = 90135] = "CannotMergeIntoReadonly";
181
+ /** Cannot merge changes into a Master DgnDb. */
182
+ ChangeSetStatus[ChangeSetStatus["CannotMergeIntoMaster"] = 90136] = "CannotMergeIntoMaster";
183
+ /** Cannot merge changes into a DgnDb that has reversed change sets. */
184
+ ChangeSetStatus[ChangeSetStatus["CannotMergeIntoReversed"] = 90137] = "CannotMergeIntoReversed";
185
+ /** ChangeSet(s) download was cancelled. */
186
+ ChangeSetStatus[ChangeSetStatus["DownloadCancelled"] = 90138] = "DownloadCancelled";
187
+ })(ChangeSetStatus = exports.ChangeSetStatus || (exports.ChangeSetStatus = {}));
188
+ /** Return codes for methods which perform repository management operations
189
+ * @internal
190
+ */
191
+ var RepositoryStatus;
192
+ (function (RepositoryStatus) {
193
+ RepositoryStatus[RepositoryStatus["Success"] = 0] = "Success";
194
+ /** The repository server did not respond to a request */
195
+ RepositoryStatus[RepositoryStatus["ServerUnavailable"] = 86017] = "ServerUnavailable";
196
+ /** A requested lock was already held by another briefcase */
197
+ RepositoryStatus[RepositoryStatus["LockAlreadyHeld"] = 86018] = "LockAlreadyHeld";
198
+ /** Failed to sync briefcase manager with server */
199
+ RepositoryStatus[RepositoryStatus["SyncError"] = 86019] = "SyncError";
200
+ /** Response from server not understood */
201
+ RepositoryStatus[RepositoryStatus["InvalidResponse"] = 86020] = "InvalidResponse";
202
+ /** An operation requires local changes to be committed or abandoned */
203
+ RepositoryStatus[RepositoryStatus["PendingTransactions"] = 86021] = "PendingTransactions";
204
+ /** A lock cannot be relinquished because the associated object has been modified */
205
+ RepositoryStatus[RepositoryStatus["LockUsed"] = 86022] = "LockUsed";
206
+ /** An operation required creation of a ChangeSet, which failed */
207
+ RepositoryStatus[RepositoryStatus["CannotCreateChangeSet"] = 86023] = "CannotCreateChangeSet";
208
+ /** Request to server not understood */
209
+ RepositoryStatus[RepositoryStatus["InvalidRequest"] = 86024] = "InvalidRequest";
210
+ /** A change set committed to the server must be integrated into the briefcase before the operation can be completed */
211
+ RepositoryStatus[RepositoryStatus["ChangeSetRequired"] = 86025] = "ChangeSetRequired";
212
+ /** A requested DgnCode is reserved by another briefcase or in use */
213
+ RepositoryStatus[RepositoryStatus["CodeUnavailable"] = 86026] = "CodeUnavailable";
214
+ /** A DgnCode cannot be released because it has not been reserved by the requesting briefcase */
215
+ RepositoryStatus[RepositoryStatus["CodeNotReserved"] = 86027] = "CodeNotReserved";
216
+ /** A DgnCode cannot be relinquished because it has been used locally */
217
+ RepositoryStatus[RepositoryStatus["CodeUsed"] = 86028] = "CodeUsed";
218
+ /** A required lock is not held by this briefcase */
219
+ RepositoryStatus[RepositoryStatus["LockNotHeld"] = 86029] = "LockNotHeld";
220
+ /** Repository is currently locked, no changes allowed */
221
+ RepositoryStatus[RepositoryStatus["RepositoryIsLocked"] = 86030] = "RepositoryIsLocked";
222
+ /** Channel write constraint violation, such as an attempt to write outside the designated channel. */
223
+ RepositoryStatus[RepositoryStatus["ChannelConstraintViolation"] = 86031] = "ChannelConstraintViolation";
224
+ })(RepositoryStatus = exports.RepositoryStatus || (exports.RepositoryStatus = {}));
225
+ /** Status from returned HTTP status code
226
+ * @beta
227
+ */
228
+ var HttpStatus;
229
+ (function (HttpStatus) {
230
+ /** 2xx Success */
231
+ HttpStatus[HttpStatus["Success"] = 0] = "Success";
232
+ /** 1xx Informational responses */
233
+ HttpStatus[HttpStatus["Info"] = 94209] = "Info";
234
+ /** 3xx Redirection */
235
+ HttpStatus[HttpStatus["Redirection"] = 94210] = "Redirection";
236
+ /** 4xx Client errors */
237
+ HttpStatus[HttpStatus["ClientError"] = 94211] = "ClientError";
238
+ /** 5xx Server errors */
239
+ HttpStatus[HttpStatus["ServerError"] = 94212] = "ServerError";
240
+ })(HttpStatus = exports.HttpStatus || (exports.HttpStatus = {}));
241
+ /** Statuses produced by APIs that interact with iModelHub, typically encountered as the `errorNumber` of an [IModelError]($common).
242
+ * @public
243
+ */
244
+ var IModelHubStatus;
245
+ (function (IModelHubStatus) {
246
+ IModelHubStatus[IModelHubStatus["Success"] = 0] = "Success";
247
+ IModelHubStatus[IModelHubStatus["IMODELHUBERROR_BASE"] = 102400] = "IMODELHUBERROR_BASE";
248
+ IModelHubStatus[IModelHubStatus["IMODELHUBERROR_REQUESTERRORBASE"] = 102656] = "IMODELHUBERROR_REQUESTERRORBASE";
249
+ IModelHubStatus[IModelHubStatus["Unknown"] = 102401] = "Unknown";
250
+ IModelHubStatus[IModelHubStatus["MissingRequiredProperties"] = 102402] = "MissingRequiredProperties";
251
+ IModelHubStatus[IModelHubStatus["InvalidPropertiesValues"] = 102403] = "InvalidPropertiesValues";
252
+ IModelHubStatus[IModelHubStatus["UserDoesNotHavePermission"] = 102404] = "UserDoesNotHavePermission";
253
+ IModelHubStatus[IModelHubStatus["UserDoesNotHaveAccess"] = 102405] = "UserDoesNotHaveAccess";
254
+ IModelHubStatus[IModelHubStatus["InvalidBriefcase"] = 102406] = "InvalidBriefcase";
255
+ IModelHubStatus[IModelHubStatus["BriefcaseDoesNotExist"] = 102407] = "BriefcaseDoesNotExist";
256
+ IModelHubStatus[IModelHubStatus["BriefcaseDoesNotBelongToUser"] = 102408] = "BriefcaseDoesNotBelongToUser";
257
+ IModelHubStatus[IModelHubStatus["AnotherUserPushing"] = 102409] = "AnotherUserPushing";
258
+ IModelHubStatus[IModelHubStatus["ChangeSetAlreadyExists"] = 102410] = "ChangeSetAlreadyExists";
259
+ IModelHubStatus[IModelHubStatus["ChangeSetDoesNotExist"] = 102411] = "ChangeSetDoesNotExist";
260
+ IModelHubStatus[IModelHubStatus["FileIsNotUploaded"] = 102412] = "FileIsNotUploaded";
261
+ IModelHubStatus[IModelHubStatus["iModelIsNotInitialized"] = 102413] = "iModelIsNotInitialized";
262
+ IModelHubStatus[IModelHubStatus["ChangeSetPointsToBadSeed"] = 102414] = "ChangeSetPointsToBadSeed";
263
+ IModelHubStatus[IModelHubStatus["OperationFailed"] = 102415] = "OperationFailed";
264
+ IModelHubStatus[IModelHubStatus["PullIsRequired"] = 102416] = "PullIsRequired";
265
+ IModelHubStatus[IModelHubStatus["MaximumNumberOfBriefcasesPerUser"] = 102417] = "MaximumNumberOfBriefcasesPerUser";
266
+ IModelHubStatus[IModelHubStatus["MaximumNumberOfBriefcasesPerUserPerMinute"] = 102418] = "MaximumNumberOfBriefcasesPerUserPerMinute";
267
+ IModelHubStatus[IModelHubStatus["DatabaseTemporarilyLocked"] = 102419] = "DatabaseTemporarilyLocked";
268
+ IModelHubStatus[IModelHubStatus["iModelIsLocked"] = 102420] = "iModelIsLocked";
269
+ IModelHubStatus[IModelHubStatus["CodesExist"] = 102421] = "CodesExist";
270
+ IModelHubStatus[IModelHubStatus["LocksExist"] = 102422] = "LocksExist";
271
+ IModelHubStatus[IModelHubStatus["iModelAlreadyExists"] = 102423] = "iModelAlreadyExists";
272
+ IModelHubStatus[IModelHubStatus["iModelDoesNotExist"] = 102424] = "iModelDoesNotExist";
273
+ IModelHubStatus[IModelHubStatus["FileDoesNotExist"] = 102425] = "FileDoesNotExist";
274
+ IModelHubStatus[IModelHubStatus["FileAlreadyExists"] = 102426] = "FileAlreadyExists";
275
+ IModelHubStatus[IModelHubStatus["LockDoesNotExist"] = 102427] = "LockDoesNotExist";
276
+ IModelHubStatus[IModelHubStatus["LockOwnedByAnotherBriefcase"] = 102428] = "LockOwnedByAnotherBriefcase";
277
+ IModelHubStatus[IModelHubStatus["CodeStateInvalid"] = 102429] = "CodeStateInvalid";
278
+ IModelHubStatus[IModelHubStatus["CodeReservedByAnotherBriefcase"] = 102430] = "CodeReservedByAnotherBriefcase";
279
+ IModelHubStatus[IModelHubStatus["CodeDoesNotExist"] = 102431] = "CodeDoesNotExist";
280
+ IModelHubStatus[IModelHubStatus["EventTypeDoesNotExist"] = 102432] = "EventTypeDoesNotExist";
281
+ IModelHubStatus[IModelHubStatus["EventSubscriptionDoesNotExist"] = 102433] = "EventSubscriptionDoesNotExist";
282
+ IModelHubStatus[IModelHubStatus["EventSubscriptionAlreadyExists"] = 102434] = "EventSubscriptionAlreadyExists";
283
+ IModelHubStatus[IModelHubStatus["ITwinIdIsNotSpecified"] = 102435] = "ITwinIdIsNotSpecified";
284
+ IModelHubStatus[IModelHubStatus["FailedToGetITwinPermissions"] = 102436] = "FailedToGetITwinPermissions";
285
+ IModelHubStatus[IModelHubStatus["FailedToGetITwinMembers"] = 102437] = "FailedToGetITwinMembers";
286
+ IModelHubStatus[IModelHubStatus["ChangeSetAlreadyHasVersion"] = 102438] = "ChangeSetAlreadyHasVersion";
287
+ IModelHubStatus[IModelHubStatus["VersionAlreadyExists"] = 102439] = "VersionAlreadyExists";
288
+ IModelHubStatus[IModelHubStatus["JobSchedulingFailed"] = 102440] = "JobSchedulingFailed";
289
+ IModelHubStatus[IModelHubStatus["ConflictsAggregate"] = 102441] = "ConflictsAggregate";
290
+ IModelHubStatus[IModelHubStatus["FailedToGetITwinById"] = 102442] = "FailedToGetITwinById";
291
+ IModelHubStatus[IModelHubStatus["DatabaseOperationFailed"] = 102443] = "DatabaseOperationFailed";
292
+ IModelHubStatus[IModelHubStatus["SeedFileInitializationFailed"] = 102444] = "SeedFileInitializationFailed";
293
+ IModelHubStatus[IModelHubStatus["FailedToGetAssetPermissions"] = 102445] = "FailedToGetAssetPermissions";
294
+ IModelHubStatus[IModelHubStatus["FailedToGetAssetMembers"] = 102446] = "FailedToGetAssetMembers";
295
+ IModelHubStatus[IModelHubStatus["ITwinDoesNotExist"] = 102447] = "ITwinDoesNotExist";
296
+ IModelHubStatus[IModelHubStatus["LockChunkDoesNotExist"] = 102449] = "LockChunkDoesNotExist";
297
+ IModelHubStatus[IModelHubStatus["CheckpointAlreadyExists"] = 102450] = "CheckpointAlreadyExists";
298
+ IModelHubStatus[IModelHubStatus["CheckpointDoesNotExist"] = 102451] = "CheckpointDoesNotExist";
299
+ // Errors that are returned for incorrect iModelHub request.
300
+ IModelHubStatus[IModelHubStatus["UndefinedArgumentError"] = 102657] = "UndefinedArgumentError";
301
+ IModelHubStatus[IModelHubStatus["InvalidArgumentError"] = 102658] = "InvalidArgumentError";
302
+ IModelHubStatus[IModelHubStatus["MissingDownloadUrlError"] = 102659] = "MissingDownloadUrlError";
303
+ IModelHubStatus[IModelHubStatus["NotSupportedInBrowser"] = 102660] = "NotSupportedInBrowser";
304
+ IModelHubStatus[IModelHubStatus["FileHandlerNotSet"] = 102661] = "FileHandlerNotSet";
305
+ IModelHubStatus[IModelHubStatus["FileNotFound"] = 102662] = "FileNotFound";
306
+ IModelHubStatus[IModelHubStatus["InitializationTimeout"] = 102663] = "InitializationTimeout";
307
+ })(IModelHubStatus = exports.IModelHubStatus || (exports.IModelHubStatus = {}));
308
+ /** GeoServiceStatus errors
309
+ * @public
310
+ */
311
+ var GeoServiceStatus;
312
+ (function (GeoServiceStatus) {
313
+ GeoServiceStatus[GeoServiceStatus["Success"] = 0] = "Success";
314
+ GeoServiceStatus[GeoServiceStatus["GEOSERVICESTATUS_BASE"] = 147456] = "GEOSERVICESTATUS_BASE";
315
+ // Error mapped from 'IModelStatus'
316
+ GeoServiceStatus[GeoServiceStatus["NoGeoLocation"] = 65602] = "NoGeoLocation";
317
+ // Following errors are mapped from 'GeoCoordStatus'
318
+ GeoServiceStatus[GeoServiceStatus["OutOfUsefulRange"] = 147457] = "OutOfUsefulRange";
319
+ GeoServiceStatus[GeoServiceStatus["OutOfMathematicalDomain"] = 147458] = "OutOfMathematicalDomain";
320
+ GeoServiceStatus[GeoServiceStatus["NoDatumConverter"] = 147459] = "NoDatumConverter";
321
+ GeoServiceStatus[GeoServiceStatus["VerticalDatumConvertError"] = 147460] = "VerticalDatumConvertError";
322
+ GeoServiceStatus[GeoServiceStatus["CSMapError"] = 147461] = "CSMapError";
323
+ GeoServiceStatus[GeoServiceStatus["Pending"] = 147462] = "Pending";
324
+ })(GeoServiceStatus = exports.GeoServiceStatus || (exports.GeoServiceStatus = {}));
325
+ /** Error status from various reality data operations
326
+ * @alpha
327
+ */
328
+ var RealityDataStatus;
329
+ (function (RealityDataStatus) {
330
+ RealityDataStatus[RealityDataStatus["Success"] = 0] = "Success";
331
+ RealityDataStatus[RealityDataStatus["REALITYDATA_ERROR_BASE"] = 151552] = "REALITYDATA_ERROR_BASE";
332
+ RealityDataStatus[RealityDataStatus["InvalidData"] = 151553] = "InvalidData";
333
+ })(RealityDataStatus = exports.RealityDataStatus || (exports.RealityDataStatus = {}));
334
+ function isObject(obj) {
335
+ return typeof obj === "object" && obj !== null;
336
+ }
337
+ /** Base exception class for iTwin.js exceptions.
338
+ * @public
339
+ */
340
+ class BentleyError extends Error {
341
+ /**
342
+ * @param errorNumber The a number that identifies of the problem.
343
+ * @param message message that describes the problem (should not be localized).
344
+ * @param metaData metaData about the exception.
345
+ */
346
+ constructor(errorNumber, message, metaData) {
347
+ super(message);
348
+ this.errorNumber = errorNumber;
349
+ this.errorNumber = errorNumber;
350
+ this._metaData = metaData;
351
+ this.name = this._initName();
352
+ }
353
+ /** Returns true if this BentleyError includes (optional) metadata. */
354
+ get hasMetaData() { return undefined !== this._metaData; }
355
+ /** get the meta data associated with this BentleyError, if any. */
356
+ getMetaData() {
357
+ return BentleyError.getMetaData(this._metaData);
358
+ }
359
+ /** get the metadata object associated with an ExceptionMetaData, if any. */
360
+ static getMetaData(metaData) {
361
+ return (typeof metaData === "function") ? metaData() : metaData;
362
+ }
363
+ /** This function returns the name of each error status. Override this method to handle more error status codes. */
364
+ _initName() {
365
+ switch (this.errorNumber) {
366
+ case IModelStatus.AlreadyLoaded: return "Already Loaded";
367
+ case IModelStatus.AlreadyOpen: return "Already Open";
368
+ case IModelStatus.BadArg: return "Bad Arg";
369
+ case IModelStatus.BadElement: return "Bad Element";
370
+ case IModelStatus.BadModel: return "Bad Model";
371
+ case IModelStatus.BadRequest: return "Bad Request";
372
+ case IModelStatus.BadSchema: return "Bad Schema";
373
+ case IModelStatus.CannotUndo: return "Can not Undo";
374
+ case IModelStatus.CodeNotReserved: return "Code Not Reserved";
375
+ case IModelStatus.DeletionProhibited: return "Deletion Prohibited";
376
+ case IModelStatus.DuplicateCode: return "Duplicate Code";
377
+ case IModelStatus.DuplicateName: return "Duplicate Name";
378
+ case IModelStatus.ElementBlockedChange: return "Element Blocked Change";
379
+ case IModelStatus.FileAlreadyExists: return "File Already Exists";
380
+ case IModelStatus.FileNotFound: return "File Not Found";
381
+ case IModelStatus.FileNotLoaded: return "File Not Loaded";
382
+ case IModelStatus.ForeignKeyConstraint: return "ForeignKey Constraint";
383
+ case IModelStatus.IdExists: return "Id Exists";
384
+ case IModelStatus.InDynamicTransaction: return "InDynamicTransaction";
385
+ case IModelStatus.InvalidCategory: return "Invalid Category";
386
+ case IModelStatus.InvalidCode: return "Invalid Code";
387
+ case IModelStatus.InvalidCodeSpec: return "Invalid CodeSpec";
388
+ case IModelStatus.InvalidId: return "Invalid Id";
389
+ case IModelStatus.InvalidName: return "Invalid Name";
390
+ case IModelStatus.InvalidParent: return "Invalid Parent";
391
+ case IModelStatus.InvalidProfileVersion: return "Invalid Profile Version";
392
+ case IModelStatus.IsCreatingChangeSet: return "IsCreatingChangeSet";
393
+ case IModelStatus.LockNotHeld: return "Lock Not Held";
394
+ case IModelStatus.Mismatch2d3d: return "Mismatch 2d3d";
395
+ case IModelStatus.MismatchGcs: return "Mismatch Gcs";
396
+ case IModelStatus.MissingDomain: return "Missing Domain";
397
+ case IModelStatus.MissingHandler: return "Missing Handler";
398
+ case IModelStatus.MissingId: return "Missing Id";
399
+ case IModelStatus.NoGeometry: return "No Geometry";
400
+ case IModelStatus.NoMultiTxnOperation: return "NoMultiTxnOperation";
401
+ case IModelStatus.NotEnabled: return "Not Enabled";
402
+ case IModelStatus.NotFound: return "Not Found";
403
+ case IModelStatus.NotOpen: return "Not Open";
404
+ case IModelStatus.NotOpenForWrite: return "Not Open For Write";
405
+ case IModelStatus.NotSameUnitBase: return "Not Same Unit Base";
406
+ case IModelStatus.NothingToRedo: return "Nothing To Redo";
407
+ case IModelStatus.NothingToUndo: return "Nothing To Undo";
408
+ case IModelStatus.ParentBlockedChange: return "Parent Blocked Change";
409
+ case IModelStatus.ReadError: return "Read Error";
410
+ case IModelStatus.ReadOnly: return "ReadOnly";
411
+ case IModelStatus.ReadOnlyDomain: return "ReadOnlyDomain";
412
+ case IModelStatus.RepositoryManagerError: return "RepositoryManagerError";
413
+ case IModelStatus.SQLiteError: return "SQLiteError";
414
+ case IModelStatus.TransactionActive: return "Transaction Active";
415
+ case IModelStatus.UnitsMissing: return "Units Missing";
416
+ case IModelStatus.UnknownFormat: return "Unknown Format";
417
+ case IModelStatus.UpgradeFailed: return "Upgrade Failed";
418
+ case IModelStatus.ValidationFailed: return "Validation Failed";
419
+ case IModelStatus.VersionTooNew: return "Version Too New";
420
+ case IModelStatus.VersionTooOld: return "Version Too Old";
421
+ case IModelStatus.ViewNotFound: return "View Not Found";
422
+ case IModelStatus.WriteError: return "Write Error";
423
+ case IModelStatus.WrongClass: return "Wrong Class";
424
+ case IModelStatus.WrongIModel: return "Wrong IModel";
425
+ case IModelStatus.WrongDomain: return "Wrong Domain";
426
+ case IModelStatus.WrongElement: return "Wrong Element";
427
+ case IModelStatus.WrongHandler: return "Wrong Handler";
428
+ case IModelStatus.WrongModel: return "Wrong Model";
429
+ case BeSQLite_1.DbResult.BE_SQLITE_ERROR: return "BE_SQLITE_ERROR";
430
+ case BeSQLite_1.DbResult.BE_SQLITE_INTERNAL: return "BE_SQLITE_INTERNAL";
431
+ case BeSQLite_1.DbResult.BE_SQLITE_PERM: return "BE_SQLITE_PERM";
432
+ case BeSQLite_1.DbResult.BE_SQLITE_ABORT: return "BE_SQLITE_ABORT";
433
+ case BeSQLite_1.DbResult.BE_SQLITE_BUSY: return "Db is busy";
434
+ case BeSQLite_1.DbResult.BE_SQLITE_LOCKED: return "Db is Locked";
435
+ case BeSQLite_1.DbResult.BE_SQLITE_NOMEM: return "BE_SQLITE_NOMEM";
436
+ case BeSQLite_1.DbResult.BE_SQLITE_READONLY: return "Readonly";
437
+ case BeSQLite_1.DbResult.BE_SQLITE_INTERRUPT: return "BE_SQLITE_INTERRUPT";
438
+ case BeSQLite_1.DbResult.BE_SQLITE_IOERR: return "BE_SQLITE_IOERR";
439
+ case BeSQLite_1.DbResult.BE_SQLITE_CORRUPT: return "BE_SQLITE_CORRUPT";
440
+ case BeSQLite_1.DbResult.BE_SQLITE_NOTFOUND: return "Not Found";
441
+ case BeSQLite_1.DbResult.BE_SQLITE_FULL: return "BE_SQLITE_FULL";
442
+ case BeSQLite_1.DbResult.BE_SQLITE_CANTOPEN: return "Can't open";
443
+ case BeSQLite_1.DbResult.BE_SQLITE_PROTOCOL: return "BE_SQLITE_PROTOCOL";
444
+ case BeSQLite_1.DbResult.BE_SQLITE_EMPTY: return "BE_SQLITE_EMPTY";
445
+ case BeSQLite_1.DbResult.BE_SQLITE_SCHEMA: return "BE_SQLITE_SCHEMA";
446
+ case BeSQLite_1.DbResult.BE_SQLITE_TOOBIG: return "BE_SQLITE_TOOBIG";
447
+ case BeSQLite_1.DbResult.BE_SQLITE_MISMATCH: return "BE_SQLITE_MISMATCH";
448
+ case BeSQLite_1.DbResult.BE_SQLITE_MISUSE: return "BE_SQLITE_MISUSE";
449
+ case BeSQLite_1.DbResult.BE_SQLITE_NOLFS: return "BE_SQLITE_NOLFS";
450
+ case BeSQLite_1.DbResult.BE_SQLITE_AUTH: return "BE_SQLITE_AUTH";
451
+ case BeSQLite_1.DbResult.BE_SQLITE_FORMAT: return "BE_SQLITE_FORMAT";
452
+ case BeSQLite_1.DbResult.BE_SQLITE_RANGE: return "BE_SQLITE_RANGE";
453
+ case BeSQLite_1.DbResult.BE_SQLITE_NOTADB: return "Not a Database";
454
+ case BeSQLite_1.DbResult.BE_SQLITE_IOERR_READ: return "BE_SQLITE_IOERR_READ";
455
+ case BeSQLite_1.DbResult.BE_SQLITE_IOERR_SHORT_READ: return "BE_SQLITE_IOERR_SHORT_READ";
456
+ case BeSQLite_1.DbResult.BE_SQLITE_IOERR_WRITE: return "BE_SQLITE_IOERR_WRITE";
457
+ case BeSQLite_1.DbResult.BE_SQLITE_IOERR_FSYNC: return "BE_SQLITE_IOERR_FSYNC";
458
+ case BeSQLite_1.DbResult.BE_SQLITE_IOERR_DIR_FSYNC: return "BE_SQLITE_IOERR_DIR_FSYNC";
459
+ case BeSQLite_1.DbResult.BE_SQLITE_IOERR_TRUNCATE: return "BE_SQLITE_IOERR_TRUNCATE";
460
+ case BeSQLite_1.DbResult.BE_SQLITE_IOERR_FSTAT: return "BE_SQLITE_IOERR_FSTAT";
461
+ case BeSQLite_1.DbResult.BE_SQLITE_IOERR_UNLOCK: return "BE_SQLITE_IOERR_UNLOCK";
462
+ case BeSQLite_1.DbResult.BE_SQLITE_IOERR_RDLOCK: return "BE_SQLITE_IOERR_RDLOCK";
463
+ case BeSQLite_1.DbResult.BE_SQLITE_IOERR_DELETE: return "BE_SQLITE_IOERR_DELETE";
464
+ case BeSQLite_1.DbResult.BE_SQLITE_IOERR_BLOCKED: return "BE_SQLITE_IOERR_BLOCKED";
465
+ case BeSQLite_1.DbResult.BE_SQLITE_IOERR_NOMEM: return "BE_SQLITE_IOERR_NOMEM";
466
+ case BeSQLite_1.DbResult.BE_SQLITE_IOERR_ACCESS: return "BE_SQLITE_IOERR_ACCESS";
467
+ case BeSQLite_1.DbResult.BE_SQLITE_IOERR_CHECKRESERVEDLOCK: return "BE_SQLITE_IOERR_CHECKRESERVEDLOCK";
468
+ case BeSQLite_1.DbResult.BE_SQLITE_IOERR_LOCK: return "BE_SQLITE_IOERR_LOCK";
469
+ case BeSQLite_1.DbResult.BE_SQLITE_IOERR_CLOSE: return "BE_SQLITE_IOERR_CLOSE";
470
+ case BeSQLite_1.DbResult.BE_SQLITE_IOERR_DIR_CLOSE: return "BE_SQLITE_IOERR_DIR_CLOSE";
471
+ case BeSQLite_1.DbResult.BE_SQLITE_IOERR_SHMOPEN: return "BE_SQLITE_IOERR_SHMOPEN";
472
+ case BeSQLite_1.DbResult.BE_SQLITE_IOERR_SHMSIZE: return "BE_SQLITE_IOERR_SHMSIZE";
473
+ case BeSQLite_1.DbResult.BE_SQLITE_IOERR_SHMLOCK: return "BE_SQLITE_IOERR_SHMLOCK";
474
+ case BeSQLite_1.DbResult.BE_SQLITE_IOERR_SHMMAP: return "BE_SQLITE_IOERR_SHMMAP";
475
+ case BeSQLite_1.DbResult.BE_SQLITE_IOERR_SEEK: return "BE_SQLITE_IOERR_SEEK";
476
+ case BeSQLite_1.DbResult.BE_SQLITE_IOERR_DELETE_NOENT: return "BE_SQLITE_IOERR_DELETE_NOENT";
477
+ case BeSQLite_1.DbResult.BE_SQLITE_ERROR_DataTransformRequired: return "Schema update require to transform data";
478
+ case BeSQLite_1.DbResult.BE_SQLITE_ERROR_FileExists: return "File Exists";
479
+ case BeSQLite_1.DbResult.BE_SQLITE_ERROR_AlreadyOpen: return "Already Open";
480
+ case BeSQLite_1.DbResult.BE_SQLITE_ERROR_NoPropertyTable: return "No Property Table";
481
+ case BeSQLite_1.DbResult.BE_SQLITE_ERROR_FileNotFound: return "File Not Found";
482
+ case BeSQLite_1.DbResult.BE_SQLITE_ERROR_NoTxnActive: return "No Txn Active";
483
+ case BeSQLite_1.DbResult.BE_SQLITE_ERROR_BadDbProfile: return "Bad Db Profile";
484
+ case BeSQLite_1.DbResult.BE_SQLITE_ERROR_InvalidProfileVersion: return "Invalid Profile Version";
485
+ case BeSQLite_1.DbResult.BE_SQLITE_ERROR_ProfileUpgradeFailed: return "Profile Upgrade Failed";
486
+ case BeSQLite_1.DbResult.BE_SQLITE_ERROR_ProfileTooOldForReadWrite: return "Profile Too Old For ReadWrite";
487
+ case BeSQLite_1.DbResult.BE_SQLITE_ERROR_ProfileTooOld: return "Profile Too Old";
488
+ case BeSQLite_1.DbResult.BE_SQLITE_ERROR_ProfileTooNewForReadWrite: return "Profile Too New For ReadWrite";
489
+ case BeSQLite_1.DbResult.BE_SQLITE_ERROR_ProfileTooNew: return "Profile Too New";
490
+ case BeSQLite_1.DbResult.BE_SQLITE_ERROR_ChangeTrackError: return "ChangeTrack Error";
491
+ case BeSQLite_1.DbResult.BE_SQLITE_ERROR_InvalidChangeSetVersion: return "Invalid ChangeSet Version";
492
+ case BeSQLite_1.DbResult.BE_SQLITE_ERROR_SchemaUpgradeRequired: return "Schema Upgrade Required";
493
+ case BeSQLite_1.DbResult.BE_SQLITE_ERROR_SchemaTooNew: return "Schema Too New";
494
+ case BeSQLite_1.DbResult.BE_SQLITE_ERROR_SchemaTooOld: return "Schema Too Old";
495
+ case BeSQLite_1.DbResult.BE_SQLITE_ERROR_SchemaLockFailed: return "Schema Lock Failed";
496
+ case BeSQLite_1.DbResult.BE_SQLITE_ERROR_SchemaUpgradeFailed: return "Schema Upgrade Failed";
497
+ case BeSQLite_1.DbResult.BE_SQLITE_ERROR_SchemaImportFailed: return "Schema Import Failed";
498
+ case BeSQLite_1.DbResult.BE_SQLITE_ERROR_CouldNotAcquireLocksOrCodes: return "Could Not Acquire Locks Or Codes";
499
+ case BeSQLite_1.DbResult.BE_SQLITE_ERROR_SchemaUpgradeRecommended: return "Recommended that the schemas found in the database be upgraded";
500
+ case BeSQLite_1.DbResult.BE_SQLITE_LOCKED_SHAREDCACHE: return "BE_SQLITE_LOCKED_SHAREDCACHE";
501
+ case BeSQLite_1.DbResult.BE_SQLITE_BUSY_RECOVERY: return "BE_SQLITE_BUSY_RECOVERY";
502
+ case BeSQLite_1.DbResult.BE_SQLITE_CANTOPEN_NOTEMPDIR: return "SQLite No Temp Dir";
503
+ case BeSQLite_1.DbResult.BE_SQLITE_CANTOPEN_ISDIR: return "BE_SQLITE_CANTOPEN_ISDIR";
504
+ case BeSQLite_1.DbResult.BE_SQLITE_CANTOPEN_FULLPATH: return "BE_SQLITE_CANTOPEN_FULLPATH";
505
+ case BeSQLite_1.DbResult.BE_SQLITE_CORRUPT_VTAB: return "BE_SQLITE_CORRUPT_VTAB";
506
+ case BeSQLite_1.DbResult.BE_SQLITE_READONLY_RECOVERY: return "BE_SQLITE_READONLY_RECOVERY";
507
+ case BeSQLite_1.DbResult.BE_SQLITE_READONLY_CANTLOCK: return "BE_SQLITE_READONLY_CANTLOCK";
508
+ case BeSQLite_1.DbResult.BE_SQLITE_READONLY_ROLLBACK: return "BE_SQLITE_READONLY_ROLLBACK";
509
+ case BeSQLite_1.DbResult.BE_SQLITE_ABORT_ROLLBACK: return "BE_SQLITE_ABORT_ROLLBACK";
510
+ case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_CHECK: return "BE_SQLITE_CONSTRAINT_CHECK";
511
+ case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_COMMITHOOK: return "CommitHook Constraint Error";
512
+ case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_FOREIGNKEY: return "Foreign Key Constraint Error";
513
+ case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_FUNCTION: return "Function Constraint Error";
514
+ case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_NOTNULL: return "NotNull Constraint Error";
515
+ case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_PRIMARYKEY: return "Primary Key Constraint Error";
516
+ case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_TRIGGER: return "Trigger Constraint Error";
517
+ case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_UNIQUE: return "Unique Constraint Error";
518
+ case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_VTAB: return "VTable Constraint Error";
519
+ case BentleyStatus.ERROR: return "Error";
520
+ case BriefcaseStatus.CannotAcquire: return "CannotAcquire";
521
+ case BriefcaseStatus.CannotDownload: return "CannotDownload";
522
+ case BriefcaseStatus.CannotCopy: return "CannotCopy";
523
+ case BriefcaseStatus.CannotDelete: return "CannotDelete";
524
+ case BriefcaseStatus.VersionNotFound: return "VersionNotFound";
525
+ case BriefcaseStatus.DownloadCancelled: return "DownloadCancelled";
526
+ case BriefcaseStatus.ContainsDeletedChangeSets: return "ContainsDeletedChangeSets";
527
+ case RpcInterfaceStatus.IncompatibleVersion: return "RpcInterfaceStatus.IncompatibleVersion";
528
+ case ChangeSetStatus.ApplyError: return "Error applying a change set";
529
+ case ChangeSetStatus.ChangeTrackingNotEnabled: return "Change tracking has not been enabled. The ChangeSet API mandates this";
530
+ case ChangeSetStatus.CorruptedChangeStream: return "Contents of the change stream are corrupted and does not match the ChangeSet";
531
+ case ChangeSetStatus.FileNotFound: return "File containing the changes was not found";
532
+ case ChangeSetStatus.FileWriteError: return "Error writing the contents of the change set to the backing change stream file";
533
+ case ChangeSetStatus.HasLocalChanges: return "Cannot perform the operation since the Db has local changes";
534
+ case ChangeSetStatus.HasUncommittedChanges: return "Cannot perform the operation since current transaction has uncommitted changes";
535
+ case ChangeSetStatus.InvalidId: return "Invalid ChangeSet Id";
536
+ case ChangeSetStatus.InvalidVersion: return "Invalid version of the change set";
537
+ case ChangeSetStatus.InDynamicTransaction: return "Cannot perform the operation since system is in the middle of a dynamic transaction";
538
+ case ChangeSetStatus.IsCreatingChangeSet: return "Cannot perform operation since system is in the middle of a creating a change set";
539
+ case ChangeSetStatus.IsNotCreatingChangeSet: return "Cannot perform operation since the system is not creating a change set";
540
+ case ChangeSetStatus.MergePropagationError: return "Error propagating the changes after the merge";
541
+ case ChangeSetStatus.NothingToMerge: return "No change sets to merge";
542
+ case ChangeSetStatus.NoTransactions: return "No transactions are available to create a change set";
543
+ case ChangeSetStatus.ParentMismatch: return "Parent change set of the Db does not match the parent id of the change set";
544
+ case ChangeSetStatus.SQLiteError: return "Error performing a SQLite operation on the Db";
545
+ case ChangeSetStatus.WrongDgnDb: return "ChangeSet originated in a different Db";
546
+ case ChangeSetStatus.CouldNotOpenDgnDb: return "Could not open the DgnDb to merge change set";
547
+ case ChangeSetStatus.MergeSchemaChangesOnOpen: return "Cannot merge changes in in an open DgnDb. Close the DgnDb, and process the operation when it is opened";
548
+ case ChangeSetStatus.ReverseOrReinstateSchemaChanges: return "Cannot reverse or reinstate schema changes.";
549
+ case ChangeSetStatus.ProcessSchemaChangesOnOpen: return "Cannot process changes schema changes in an open DgnDb. Close the DgnDb, and process the operation when it is opened";
550
+ case ChangeSetStatus.CannotMergeIntoReadonly: return "Cannot merge changes into a Readonly DgnDb";
551
+ case ChangeSetStatus.CannotMergeIntoMaster: return "Cannot merge changes into a Master DgnDb";
552
+ case ChangeSetStatus.CannotMergeIntoReversed: return "Cannot merge changes into a DgnDb that has reversed change sets";
553
+ case ChangeSetStatus.DownloadCancelled: return "ChangeSet(s) download was cancelled.";
554
+ case RepositoryStatus.ServerUnavailable: return "ServerUnavailable";
555
+ case RepositoryStatus.LockAlreadyHeld: return "LockAlreadyHeld";
556
+ case RepositoryStatus.SyncError: return "SyncError";
557
+ case RepositoryStatus.InvalidResponse: return "InvalidResponse";
558
+ case RepositoryStatus.PendingTransactions: return "PendingTransactions";
559
+ case RepositoryStatus.LockUsed: return "LockUsed";
560
+ case RepositoryStatus.CannotCreateChangeSet: return "CannotCreateChangeSet";
561
+ case RepositoryStatus.InvalidRequest: return "InvalidRequest";
562
+ case RepositoryStatus.ChangeSetRequired: return "ChangeSetRequired";
563
+ case RepositoryStatus.CodeUnavailable: return "CodeUnavailable";
564
+ case RepositoryStatus.CodeNotReserved: return "CodeNotReserved";
565
+ case RepositoryStatus.CodeUsed: return "CodeUsed";
566
+ case RepositoryStatus.LockNotHeld: return "LockNotHeld";
567
+ case RepositoryStatus.RepositoryIsLocked: return "RepositoryIsLocked";
568
+ case RepositoryStatus.ChannelConstraintViolation: return "ChannelConstraintViolation";
569
+ case HttpStatus.Info: return "HTTP Info";
570
+ case HttpStatus.Redirection: return "HTTP Redirection";
571
+ case HttpStatus.ClientError: return "HTTP Client error";
572
+ case HttpStatus.ServerError: return "HTTP Server error";
573
+ case IModelHubStatus.Unknown: return "Unknown error";
574
+ case IModelHubStatus.MissingRequiredProperties: return "Missing required properties";
575
+ case IModelHubStatus.InvalidPropertiesValues: return "Invalid properties values";
576
+ case IModelHubStatus.UserDoesNotHavePermission: return "User does not have permission";
577
+ case IModelHubStatus.UserDoesNotHaveAccess: return "User does not have access";
578
+ case IModelHubStatus.InvalidBriefcase: return "Invalid briefcase";
579
+ case IModelHubStatus.BriefcaseDoesNotExist: return "Briefcase does not exist";
580
+ case IModelHubStatus.BriefcaseDoesNotBelongToUser: return "Briefcase does not belong to user";
581
+ case IModelHubStatus.AnotherUserPushing: return "Another user pushing";
582
+ case IModelHubStatus.ChangeSetAlreadyExists: return "ChangeSet already exists";
583
+ case IModelHubStatus.ChangeSetDoesNotExist: return "ChangeSet does not exist";
584
+ case IModelHubStatus.FileIsNotUploaded: return "File is not uploaded";
585
+ case IModelHubStatus.iModelIsNotInitialized: return "iModel is not initialized";
586
+ case IModelHubStatus.ChangeSetPointsToBadSeed: return "ChangeSet points to a bad seed file";
587
+ case IModelHubStatus.OperationFailed: return "iModelHub operation has failed";
588
+ case IModelHubStatus.PullIsRequired: return "Pull is required";
589
+ case IModelHubStatus.MaximumNumberOfBriefcasesPerUser: return "Limit of briefcases per user was reached";
590
+ case IModelHubStatus.MaximumNumberOfBriefcasesPerUserPerMinute: return "Limit of briefcases per user per minute was reached";
591
+ case IModelHubStatus.DatabaseTemporarilyLocked: return "Database is temporarily locked";
592
+ case IModelHubStatus.iModelIsLocked: return "iModel is locked";
593
+ case IModelHubStatus.CodesExist: return "Code already exists";
594
+ case IModelHubStatus.LocksExist: return "Lock already exists";
595
+ case IModelHubStatus.iModelAlreadyExists: return "iModel already exists";
596
+ case IModelHubStatus.iModelDoesNotExist: return "iModel does not exist";
597
+ case IModelHubStatus.LockDoesNotExist: return "Lock does not exist";
598
+ case IModelHubStatus.LockChunkDoesNotExist: return "Lock chunk does not exist";
599
+ case IModelHubStatus.LockOwnedByAnotherBriefcase: return "Lock is owned by another briefcase";
600
+ case IModelHubStatus.CodeStateInvalid: return "Code state is invalid";
601
+ case IModelHubStatus.CodeReservedByAnotherBriefcase: return "Code is reserved by another briefcase";
602
+ case IModelHubStatus.CodeDoesNotExist: return "Code does not exist";
603
+ case IModelHubStatus.FileDoesNotExist: return "File does not exist";
604
+ case IModelHubStatus.FileAlreadyExists: return "File already exists";
605
+ case IModelHubStatus.EventTypeDoesNotExist: return "Event type does not exist";
606
+ case IModelHubStatus.EventSubscriptionDoesNotExist: return "Event subscription does not exist";
607
+ case IModelHubStatus.EventSubscriptionAlreadyExists: return "Event subscription already exists";
608
+ case IModelHubStatus.ITwinIdIsNotSpecified: return "ITwin Id is not specified";
609
+ case IModelHubStatus.FailedToGetITwinPermissions: return "Failed to get iTwin permissions";
610
+ case IModelHubStatus.FailedToGetITwinMembers: return "Failed to get iTwin members";
611
+ case IModelHubStatus.FailedToGetAssetPermissions: return "Failed to get asset permissions";
612
+ case IModelHubStatus.FailedToGetAssetMembers: return "Failed to get asset members";
613
+ case IModelHubStatus.ChangeSetAlreadyHasVersion: return "ChangeSet already has version";
614
+ case IModelHubStatus.VersionAlreadyExists: return "Version already exists";
615
+ case IModelHubStatus.JobSchedulingFailed: return "Failed to schedule a background job";
616
+ case IModelHubStatus.ConflictsAggregate: return "Codes or locks are owned by another briefcase";
617
+ case IModelHubStatus.FailedToGetITwinById: return "Failed to query iTwin by its id";
618
+ case IModelHubStatus.DatabaseOperationFailed: return "Database operation has failed";
619
+ case IModelHubStatus.ITwinDoesNotExist: return "ITwin does not exist";
620
+ case IModelHubStatus.UndefinedArgumentError: return "Undefined argument";
621
+ case IModelHubStatus.InvalidArgumentError: return "Invalid argument";
622
+ case IModelHubStatus.MissingDownloadUrlError: return "Missing download url";
623
+ case IModelHubStatus.NotSupportedInBrowser: return "Not supported in browser";
624
+ case IModelHubStatus.FileHandlerNotSet: return "File handler is not set";
625
+ case IModelHubStatus.FileNotFound: return "File not found";
626
+ case GeoServiceStatus.NoGeoLocation: return "No GeoLocation";
627
+ case GeoServiceStatus.OutOfUsefulRange: return "Out of useful range";
628
+ case GeoServiceStatus.OutOfMathematicalDomain: return "Out of mathematical domain";
629
+ case GeoServiceStatus.NoDatumConverter: return "No datum converter";
630
+ case GeoServiceStatus.VerticalDatumConvertError: return "Vertical datum convert error";
631
+ case GeoServiceStatus.CSMapError: return "CSMap error";
632
+ case GeoServiceStatus.Pending: return "Pending";
633
+ case RealityDataStatus.InvalidData: return "Invalid or unknown data";
634
+ case IModelStatus.Success:
635
+ case BeSQLite_1.DbResult.BE_SQLITE_OK:
636
+ case BeSQLite_1.DbResult.BE_SQLITE_ROW:
637
+ case BeSQLite_1.DbResult.BE_SQLITE_DONE:
638
+ case BentleyStatus.SUCCESS:
639
+ return "Success";
640
+ default:
641
+ return `Error (${this.errorNumber})`;
642
+ }
643
+ }
644
+ /** Use run-time type checking to safely get a useful string summary of an unknown error value, or `""` if none exists.
645
+ * @note It's recommended to use this function in `catch` clauses, where a caught value cannot be assumed to be `instanceof Error`
646
+ * @public
647
+ */
648
+ static getErrorMessage(error) {
649
+ if (typeof error === "string")
650
+ return error;
651
+ if (error instanceof Error)
652
+ return error.toString();
653
+ if (isObject(error)) {
654
+ if (typeof error.message === "string")
655
+ return error.message;
656
+ if (typeof error.msg === "string")
657
+ return error.msg;
658
+ if (error.toString() !== "[object Object]")
659
+ return error.toString();
660
+ }
661
+ return "";
662
+ }
663
+ /** Use run-time type checking to safely get the call stack of an unknown error value, if possible.
664
+ * @note It's recommended to use this function in `catch` clauses, where a caught value cannot be assumed to be `instanceof Error`
665
+ * @public
666
+ */
667
+ static getErrorStack(error) {
668
+ if (isObject(error) && typeof error.stack === "string")
669
+ return error.stack;
670
+ return undefined;
671
+ }
672
+ /** Use run-time type checking to safely get the metadata with an unknown error value, if possible.
673
+ * @note It's recommended to use this function in `catch` clauses, where a caught value cannot be assumed to be `instanceof BentleyError`
674
+ * @see [[BentleyError.getMetaData]]
675
+ * @public
676
+ */
677
+ static getErrorMetadata(error) {
678
+ if (isObject(error) && typeof error.getMetaData === "function") {
679
+ const metadata = error.getMetaData();
680
+ if (typeof metadata === "object" && metadata !== null)
681
+ return metadata;
682
+ }
683
+ return undefined;
684
+ }
685
+ /** Returns a new `ErrorProps` object representing an unknown error value. Useful for logging or wrapping/re-throwing caught errors.
686
+ * @note Unlike `Error` objects (which lose messages and call stacks when serialized to JSON), objects
687
+ * returned by this are plain old JavaScript objects, and can be easily logged/serialized to JSON.
688
+ * @public
689
+ */
690
+ static getErrorProps(error) {
691
+ const serialized = {
692
+ message: BentleyError.getErrorMessage(error),
693
+ };
694
+ const stack = BentleyError.getErrorStack(error);
695
+ if (stack)
696
+ serialized.stack = stack;
697
+ const metadata = BentleyError.getErrorMetadata(error);
698
+ if (metadata)
699
+ serialized.metadata = metadata;
700
+ return serialized;
701
+ }
702
+ }
703
+ exports.BentleyError = BentleyError;
703
704
  //# sourceMappingURL=BentleyError.js.map