@explorins/pers-shared 2.1.1 → 2.1.2

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 (240) hide show
  1. package/dist/cjs/dto/account-selector.dto.d.ts +2 -2
  2. package/dist/cjs/dto/account-selector.dto.d.ts.map +1 -1
  3. package/dist/cjs/dto/account-selector.dto.js +4 -4
  4. package/dist/cjs/dto/account-selector.dto.js.map +1 -1
  5. package/dist/cjs/dto/analytics/group-by-expression.dto.d.ts +6 -0
  6. package/dist/cjs/dto/analytics/group-by-expression.dto.d.ts.map +1 -0
  7. package/dist/cjs/dto/analytics/group-by-expression.dto.js +48 -0
  8. package/dist/cjs/dto/analytics/group-by-expression.dto.js.map +1 -0
  9. package/dist/cjs/dto/index.d.ts +3 -10
  10. package/dist/cjs/dto/index.d.ts.map +1 -1
  11. package/dist/cjs/dto/index.js +5 -10
  12. package/dist/cjs/dto/index.js.map +1 -1
  13. package/dist/cjs/dto/pagination/index.d.ts +3 -0
  14. package/dist/cjs/dto/pagination/index.d.ts.map +1 -0
  15. package/dist/cjs/{exceptions → dto/pagination}/index.js +2 -3
  16. package/dist/cjs/dto/pagination/index.js.map +1 -0
  17. package/dist/cjs/dto/pagination/pagination.request.dto.d.ts +20 -0
  18. package/dist/cjs/dto/pagination/pagination.request.dto.d.ts.map +1 -0
  19. package/dist/cjs/dto/pagination/pagination.request.dto.js +92 -0
  20. package/dist/cjs/dto/pagination/pagination.request.dto.js.map +1 -0
  21. package/dist/cjs/dto/pagination/pagination.response.dto.d.ts +18 -0
  22. package/dist/cjs/dto/pagination/pagination.response.dto.d.ts.map +1 -0
  23. package/dist/cjs/dto/pagination/pagination.response.dto.js +66 -0
  24. package/dist/cjs/dto/pagination/pagination.response.dto.js.map +1 -0
  25. package/dist/cjs/dto/signing-account/create-signing-account-request.dto.d.ts +2 -2
  26. package/dist/cjs/dto/signing-account/create-signing-account-request.dto.d.ts.map +1 -1
  27. package/dist/cjs/dto/signing-account/create-signing-account-request.dto.js +4 -4
  28. package/dist/cjs/dto/signing-account/create-signing-account-request.dto.js.map +1 -1
  29. package/dist/cjs/dto/signing-account/select-primary-account-request.dto.d.ts +2 -2
  30. package/dist/cjs/dto/signing-account/select-primary-account-request.dto.d.ts.map +1 -1
  31. package/dist/cjs/dto/signing-account/select-primary-account-request.dto.js +3 -3
  32. package/dist/cjs/dto/signing-account/select-primary-account-request.dto.js.map +1 -1
  33. package/dist/cjs/dto/signing-account/signing-account.dto.d.ts +3 -3
  34. package/dist/cjs/dto/signing-account/signing-account.dto.d.ts.map +1 -1
  35. package/dist/cjs/dto/signing-account/signing-account.dto.js +4 -4
  36. package/dist/cjs/dto/signing-account/signing-account.dto.js.map +1 -1
  37. package/dist/cjs/dto/transaction/index.d.ts +2 -0
  38. package/dist/cjs/dto/transaction/index.d.ts.map +1 -1
  39. package/dist/cjs/dto/transaction/index.js +2 -0
  40. package/dist/cjs/dto/transaction/index.js.map +1 -1
  41. package/dist/cjs/dto/transaction/transaction-analytics.request.dto.d.ts +43 -0
  42. package/dist/cjs/dto/transaction/transaction-analytics.request.dto.d.ts.map +1 -0
  43. package/dist/cjs/dto/transaction/transaction-analytics.request.dto.js +186 -0
  44. package/dist/cjs/dto/transaction/transaction-analytics.request.dto.js.map +1 -0
  45. package/dist/cjs/dto/transaction/transaction-pagination.request.dto.d.ts +23 -0
  46. package/dist/cjs/dto/transaction/transaction-pagination.request.dto.d.ts.map +1 -0
  47. package/dist/cjs/dto/transaction/transaction-pagination.request.dto.js +107 -0
  48. package/dist/cjs/dto/transaction/transaction-pagination.request.dto.js.map +1 -0
  49. package/dist/cjs/dto/transaction/transaction.dto.d.ts +9 -1
  50. package/dist/cjs/dto/transaction/transaction.dto.d.ts.map +1 -1
  51. package/dist/cjs/dto/transaction/transaction.dto.js +46 -0
  52. package/dist/cjs/dto/transaction/transaction.dto.js.map +1 -1
  53. package/dist/cjs/dto/wallet.dto.d.ts +2 -2
  54. package/dist/cjs/dto/wallet.dto.d.ts.map +1 -1
  55. package/dist/cjs/dto/wallet.dto.js +2 -2
  56. package/dist/cjs/dto/wallet.dto.js.map +1 -1
  57. package/dist/cjs/enum/index.d.ts +1 -1
  58. package/dist/cjs/enum/index.d.ts.map +1 -1
  59. package/dist/cjs/enum/index.js +1 -1
  60. package/dist/cjs/enum/index.js.map +1 -1
  61. package/dist/cjs/enum/owner-type.enum.d.ts +1 -1
  62. package/dist/cjs/enum/owner-type.enum.d.ts.map +1 -1
  63. package/dist/cjs/enum/owner-type.enum.js +8 -8
  64. package/dist/cjs/enum/owner-type.enum.js.map +1 -1
  65. package/dist/cjs/enum/sort-order.enum.d.ts +5 -0
  66. package/dist/cjs/enum/sort-order.enum.d.ts.map +1 -0
  67. package/dist/cjs/enum/sort-order.enum.js +9 -0
  68. package/dist/cjs/enum/sort-order.enum.js.map +1 -0
  69. package/dist/cjs/interfaces/base-pagination.interface.d.ts +44 -0
  70. package/dist/cjs/interfaces/base-pagination.interface.d.ts.map +1 -0
  71. package/dist/cjs/interfaces/base-pagination.interface.js +3 -0
  72. package/dist/cjs/interfaces/base-pagination.interface.js.map +1 -0
  73. package/dist/cjs/interfaces/group-by-expression.interface.d.ts +6 -0
  74. package/dist/cjs/interfaces/group-by-expression.interface.d.ts.map +1 -0
  75. package/dist/cjs/interfaces/group-by-expression.interface.js +3 -0
  76. package/dist/cjs/interfaces/group-by-expression.interface.js.map +1 -0
  77. package/dist/cjs/interfaces/index.d.ts +4 -0
  78. package/dist/cjs/interfaces/index.d.ts.map +1 -1
  79. package/dist/cjs/interfaces/index.js +4 -0
  80. package/dist/cjs/interfaces/index.js.map +1 -1
  81. package/dist/cjs/interfaces/polymorphic-owner.interface.d.ts +2 -2
  82. package/dist/cjs/interfaces/polymorphic-owner.interface.d.ts.map +1 -1
  83. package/dist/cjs/interfaces/transaction-analytics-request.interface.d.ts +18 -0
  84. package/dist/cjs/interfaces/transaction-analytics-request.interface.d.ts.map +1 -0
  85. package/dist/cjs/interfaces/transaction-analytics-request.interface.js +3 -0
  86. package/dist/cjs/interfaces/transaction-analytics-request.interface.js.map +1 -0
  87. package/dist/cjs/interfaces/transaction.interface.d.ts +32 -0
  88. package/dist/cjs/interfaces/transaction.interface.d.ts.map +1 -0
  89. package/dist/cjs/interfaces/transaction.interface.js +3 -0
  90. package/dist/cjs/interfaces/transaction.interface.js.map +1 -0
  91. package/dist/cjs/types/analytics.type.d.ts +13 -0
  92. package/dist/cjs/types/analytics.type.d.ts.map +1 -0
  93. package/dist/cjs/types/analytics.type.js +8 -0
  94. package/dist/cjs/types/analytics.type.js.map +1 -0
  95. package/dist/cjs/types/index.d.ts +1 -0
  96. package/dist/cjs/types/index.d.ts.map +1 -1
  97. package/dist/cjs/types/index.js +1 -0
  98. package/dist/cjs/types/index.js.map +1 -1
  99. package/dist/cjs/value-objects/index.js +0 -1
  100. package/dist/cjs/value-objects/index.js.map +1 -1
  101. package/dist/esm/dto/account-selector.dto.d.ts +2 -2
  102. package/dist/esm/dto/account-selector.dto.d.ts.map +1 -1
  103. package/dist/esm/dto/account-selector.dto.js +4 -4
  104. package/dist/esm/dto/account-selector.dto.js.map +1 -1
  105. package/dist/esm/dto/analytics/group-by-expression.dto.d.ts +6 -0
  106. package/dist/esm/dto/analytics/group-by-expression.dto.d.ts.map +1 -0
  107. package/dist/esm/dto/analytics/group-by-expression.dto.js +38 -0
  108. package/dist/esm/dto/analytics/group-by-expression.dto.js.map +1 -0
  109. package/dist/esm/dto/index.d.ts +3 -10
  110. package/dist/esm/dto/index.d.ts.map +1 -1
  111. package/dist/esm/dto/index.js +5 -10
  112. package/dist/esm/dto/index.js.map +1 -1
  113. package/dist/esm/dto/pagination/index.d.ts +3 -0
  114. package/dist/esm/dto/pagination/index.d.ts.map +1 -0
  115. package/dist/esm/dto/pagination/index.js +3 -0
  116. package/dist/esm/dto/pagination/index.js.map +1 -0
  117. package/dist/esm/dto/pagination/pagination.request.dto.d.ts +20 -0
  118. package/dist/esm/dto/pagination/pagination.request.dto.d.ts.map +1 -0
  119. package/dist/esm/dto/pagination/pagination.request.dto.js +79 -0
  120. package/dist/esm/dto/pagination/pagination.request.dto.js.map +1 -0
  121. package/dist/esm/dto/pagination/pagination.response.dto.d.ts +18 -0
  122. package/dist/esm/dto/pagination/pagination.response.dto.d.ts.map +1 -0
  123. package/dist/esm/dto/pagination/pagination.response.dto.js +57 -0
  124. package/dist/esm/dto/pagination/pagination.response.dto.js.map +1 -0
  125. package/dist/esm/dto/signing-account/create-signing-account-request.dto.d.ts +2 -2
  126. package/dist/esm/dto/signing-account/create-signing-account-request.dto.d.ts.map +1 -1
  127. package/dist/esm/dto/signing-account/create-signing-account-request.dto.js +5 -5
  128. package/dist/esm/dto/signing-account/create-signing-account-request.dto.js.map +1 -1
  129. package/dist/esm/dto/signing-account/select-primary-account-request.dto.d.ts +2 -2
  130. package/dist/esm/dto/signing-account/select-primary-account-request.dto.d.ts.map +1 -1
  131. package/dist/esm/dto/signing-account/select-primary-account-request.dto.js +4 -4
  132. package/dist/esm/dto/signing-account/select-primary-account-request.dto.js.map +1 -1
  133. package/dist/esm/dto/signing-account/signing-account.dto.d.ts +3 -3
  134. package/dist/esm/dto/signing-account/signing-account.dto.d.ts.map +1 -1
  135. package/dist/esm/dto/signing-account/signing-account.dto.js +5 -5
  136. package/dist/esm/dto/signing-account/signing-account.dto.js.map +1 -1
  137. package/dist/esm/dto/transaction/index.d.ts +2 -0
  138. package/dist/esm/dto/transaction/index.d.ts.map +1 -1
  139. package/dist/esm/dto/transaction/index.js +2 -0
  140. package/dist/esm/dto/transaction/index.js.map +1 -1
  141. package/dist/esm/dto/transaction/transaction-analytics.request.dto.d.ts +43 -0
  142. package/dist/esm/dto/transaction/transaction-analytics.request.dto.d.ts.map +1 -0
  143. package/dist/esm/dto/transaction/transaction-analytics.request.dto.js +166 -0
  144. package/dist/esm/dto/transaction/transaction-analytics.request.dto.js.map +1 -0
  145. package/dist/esm/dto/transaction/transaction-pagination.request.dto.d.ts +23 -0
  146. package/dist/esm/dto/transaction/transaction-pagination.request.dto.d.ts.map +1 -0
  147. package/dist/esm/dto/transaction/transaction-pagination.request.dto.js +92 -0
  148. package/dist/esm/dto/transaction/transaction-pagination.request.dto.js.map +1 -0
  149. package/dist/esm/dto/transaction/transaction.dto.d.ts +9 -1
  150. package/dist/esm/dto/transaction/transaction.dto.d.ts.map +1 -1
  151. package/dist/esm/dto/transaction/transaction.dto.js +40 -0
  152. package/dist/esm/dto/transaction/transaction.dto.js.map +1 -1
  153. package/dist/esm/dto/wallet.dto.d.ts +2 -2
  154. package/dist/esm/dto/wallet.dto.d.ts.map +1 -1
  155. package/dist/esm/dto/wallet.dto.js +3 -3
  156. package/dist/esm/dto/wallet.dto.js.map +1 -1
  157. package/dist/esm/enum/index.d.ts +1 -1
  158. package/dist/esm/enum/index.d.ts.map +1 -1
  159. package/dist/esm/enum/index.js +1 -1
  160. package/dist/esm/enum/index.js.map +1 -1
  161. package/dist/esm/enum/owner-type.enum.d.ts +1 -1
  162. package/dist/esm/enum/owner-type.enum.d.ts.map +1 -1
  163. package/dist/esm/enum/owner-type.enum.js +7 -7
  164. package/dist/esm/enum/owner-type.enum.js.map +1 -1
  165. package/dist/esm/enum/sort-order.enum.d.ts +5 -0
  166. package/dist/esm/enum/sort-order.enum.d.ts.map +1 -0
  167. package/dist/esm/enum/sort-order.enum.js +6 -0
  168. package/dist/esm/enum/sort-order.enum.js.map +1 -0
  169. package/dist/esm/interfaces/base-pagination.interface.d.ts +44 -0
  170. package/dist/esm/interfaces/base-pagination.interface.d.ts.map +1 -0
  171. package/dist/esm/interfaces/base-pagination.interface.js +2 -0
  172. package/dist/esm/interfaces/base-pagination.interface.js.map +1 -0
  173. package/dist/esm/interfaces/group-by-expression.interface.d.ts +6 -0
  174. package/dist/esm/interfaces/group-by-expression.interface.d.ts.map +1 -0
  175. package/dist/esm/interfaces/group-by-expression.interface.js +2 -0
  176. package/dist/esm/interfaces/group-by-expression.interface.js.map +1 -0
  177. package/dist/esm/interfaces/index.d.ts +4 -0
  178. package/dist/esm/interfaces/index.d.ts.map +1 -1
  179. package/dist/esm/interfaces/index.js +4 -0
  180. package/dist/esm/interfaces/index.js.map +1 -1
  181. package/dist/esm/interfaces/polymorphic-owner.interface.d.ts +2 -2
  182. package/dist/esm/interfaces/polymorphic-owner.interface.d.ts.map +1 -1
  183. package/dist/esm/interfaces/transaction-analytics-request.interface.d.ts +18 -0
  184. package/dist/esm/interfaces/transaction-analytics-request.interface.d.ts.map +1 -0
  185. package/dist/esm/interfaces/transaction-analytics-request.interface.js +2 -0
  186. package/dist/esm/interfaces/transaction-analytics-request.interface.js.map +1 -0
  187. package/dist/esm/interfaces/transaction.interface.d.ts +32 -0
  188. package/dist/esm/interfaces/transaction.interface.d.ts.map +1 -0
  189. package/dist/esm/interfaces/transaction.interface.js +2 -0
  190. package/dist/esm/interfaces/transaction.interface.js.map +1 -0
  191. package/dist/esm/types/analytics.type.d.ts +13 -0
  192. package/dist/esm/types/analytics.type.d.ts.map +1 -0
  193. package/dist/esm/types/analytics.type.js +5 -0
  194. package/dist/esm/types/analytics.type.js.map +1 -0
  195. package/dist/esm/types/index.d.ts +1 -0
  196. package/dist/esm/types/index.d.ts.map +1 -1
  197. package/dist/esm/types/index.js +1 -0
  198. package/dist/esm/types/index.js.map +1 -1
  199. package/dist/esm/value-objects/index.js +0 -1
  200. package/dist/esm/value-objects/index.js.map +1 -1
  201. package/package.json +1 -1
  202. package/dist/cjs/enum/account-type.enum.d.ts +0 -5
  203. package/dist/cjs/enum/account-type.enum.d.ts.map +0 -1
  204. package/dist/cjs/enum/account-type.enum.js +0 -9
  205. package/dist/cjs/enum/account-type.enum.js.map +0 -1
  206. package/dist/cjs/exceptions/business-error.base.d.ts +0 -29
  207. package/dist/cjs/exceptions/business-error.base.d.ts.map +0 -1
  208. package/dist/cjs/exceptions/business-error.base.js +0 -53
  209. package/dist/cjs/exceptions/business-error.base.js.map +0 -1
  210. package/dist/cjs/exceptions/index.d.ts +0 -4
  211. package/dist/cjs/exceptions/index.d.ts.map +0 -1
  212. package/dist/cjs/exceptions/index.js.map +0 -1
  213. package/dist/cjs/exceptions/technical-errors.d.ts +0 -24
  214. package/dist/cjs/exceptions/technical-errors.d.ts.map +0 -1
  215. package/dist/cjs/exceptions/technical-errors.js +0 -73
  216. package/dist/cjs/exceptions/technical-errors.js.map +0 -1
  217. package/dist/cjs/exceptions/transaction-errors.d.ts +0 -44
  218. package/dist/cjs/exceptions/transaction-errors.d.ts.map +0 -1
  219. package/dist/cjs/exceptions/transaction-errors.js +0 -88
  220. package/dist/cjs/exceptions/transaction-errors.js.map +0 -1
  221. package/dist/esm/enum/account-type.enum.d.ts +0 -5
  222. package/dist/esm/enum/account-type.enum.d.ts.map +0 -1
  223. package/dist/esm/enum/account-type.enum.js +0 -6
  224. package/dist/esm/enum/account-type.enum.js.map +0 -1
  225. package/dist/esm/exceptions/business-error.base.d.ts +0 -29
  226. package/dist/esm/exceptions/business-error.base.d.ts.map +0 -1
  227. package/dist/esm/exceptions/business-error.base.js +0 -49
  228. package/dist/esm/exceptions/business-error.base.js.map +0 -1
  229. package/dist/esm/exceptions/index.d.ts +0 -4
  230. package/dist/esm/exceptions/index.d.ts.map +0 -1
  231. package/dist/esm/exceptions/index.js +0 -4
  232. package/dist/esm/exceptions/index.js.map +0 -1
  233. package/dist/esm/exceptions/technical-errors.d.ts +0 -24
  234. package/dist/esm/exceptions/technical-errors.d.ts.map +0 -1
  235. package/dist/esm/exceptions/technical-errors.js +0 -68
  236. package/dist/esm/exceptions/technical-errors.js.map +0 -1
  237. package/dist/esm/exceptions/transaction-errors.d.ts +0 -44
  238. package/dist/esm/exceptions/transaction-errors.d.ts.map +0 -1
  239. package/dist/esm/exceptions/transaction-errors.js +0 -72
  240. package/dist/esm/exceptions/transaction-errors.js.map +0 -1
@@ -0,0 +1,5 @@
1
+ /* // ✅ EXPRESSION ALIASES: Results from CASE WHEN expressions and other computed fields
2
+ & { [key: string]: string | number | Date | undefined }; */
3
+ export const ANALYTICS_METRIC_TYPES = ['count', 'sum', 'avg', 'min', 'max'];
4
+ export const ANALYTICS_GROUP_BY_TYPES = ['month', 'week', 'day', 'year', 'quarter'];
5
+ //# sourceMappingURL=analytics.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analytics.type.js","sourceRoot":"","sources":["../../../src/types/analytics.type.ts"],"names":[],"mappings":"AAUE;2DAC2D;AAE7D,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAU,CAAC;AAIrF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAU,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from './testnet-prefix';
2
2
  export * from './unique-user-identifier-keys';
3
3
  export * from './native-token.type';
4
+ export * from './analytics.type';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC"}
@@ -2,4 +2,5 @@
2
2
  export * from './testnet-prefix';
3
3
  export * from './unique-user-identifier-keys';
4
4
  export * from './native-token.type';
5
+ export * from './analytics.type';
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC"}
@@ -3,7 +3,6 @@ export * from './address.value-object';
3
3
  export * from './token-balance.value-object';
4
4
  export * from './account-token-balances.value-object';
5
5
  export * from './token-unit.value-object';
6
- // Server build: Export full classes (needed for instantiation with 'new')
7
6
  // These use decorators but server environment can handle reflect-metadata
8
7
  export * from './token-transaction-input.vo';
9
8
  export * from './token-transaction-entity-reference-input.vo';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/value-objects/index.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uCAAuC,CAAC;AACtD,cAAc,2BAA2B,CAAC;AAC1C,0EAA0E;AAC1E,0EAA0E;AAC1E,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/value-objects/index.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uCAAuC,CAAC;AACtD,cAAc,2BAA2B,CAAC;AAE1C,0EAA0E;AAC1E,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,qBAAqB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@explorins/pers-shared",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "scripts": {
5
5
  "clean": "rm -rf dist",
6
6
  "build:esm": "tsc -p tsconfig.esm.json",
@@ -1,5 +0,0 @@
1
- export declare enum AccountType {
2
- BUSINESS = "BUSINESS",
3
- USER = "USER"
4
- }
5
- //# sourceMappingURL=account-type.enum.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"account-type.enum.d.ts","sourceRoot":"","sources":["../../../src/enum/account-type.enum.ts"],"names":[],"mappings":"AACA,oBAAY,WAAW;IACnB,QAAQ,aAAgB;IACxB,IAAI,SAAgB;CACvB"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AccountType = void 0;
4
- var AccountType;
5
- (function (AccountType) {
6
- AccountType["BUSINESS"] = "BUSINESS";
7
- AccountType["USER"] = "USER";
8
- })(AccountType || (exports.AccountType = AccountType = {}));
9
- //# sourceMappingURL=account-type.enum.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"account-type.enum.js","sourceRoot":"","sources":["../../../src/enum/account-type.enum.ts"],"names":[],"mappings":";;;AACA,IAAY,WAGX;AAHD,WAAY,WAAW;IACnB,oCAAwB,CAAA;IACxB,4BAAoB,CAAA;AACxB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB"}
@@ -1,29 +0,0 @@
1
- import { HttpException, HttpStatus } from '@nestjs/common';
2
- /**
3
- * Base class for business logic errors that should be surfaced to clients
4
- * with meaningful error messages and appropriate HTTP status codes.
5
- */
6
- export declare abstract class BusinessError extends HttpException {
7
- readonly errorCode: string;
8
- readonly domain: string;
9
- readonly userMessage: string;
10
- readonly developerMessage: string;
11
- readonly action?: string;
12
- constructor(errorCode: string, domain: string, userMessage: string, developerMessage: string, httpStatus?: HttpStatus, action?: string);
13
- /**
14
- * Check if an error is a business error that should be surfaced to clients
15
- */
16
- static isBusinessError(error: any): error is BusinessError;
17
- /**
18
- * Get a client-safe error response
19
- */
20
- getClientResponse(): {
21
- code: string;
22
- domain: string;
23
- message: string;
24
- action: string | undefined;
25
- timestamp: string;
26
- category: string;
27
- };
28
- }
29
- //# sourceMappingURL=business-error.base.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"business-error.base.d.ts","sourceRoot":"","sources":["../../../src/exceptions/business-error.base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE3D;;;GAGG;AACH,8BAAsB,aAAc,SAAQ,aAAa;IACvD,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,SAAgB,WAAW,EAAE,MAAM,CAAC;IACpC,SAAgB,gBAAgB,EAAE,MAAM,CAAC;IACzC,SAAgB,MAAM,CAAC,EAAE,MAAM,CAAC;gBAG9B,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,gBAAgB,EAAE,MAAM,EACxB,UAAU,GAAE,UAAmC,EAC/C,MAAM,CAAC,EAAE,MAAM;IAuBjB;;OAEG;IACH,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,aAAa;IAI1D;;OAEG;IACH,iBAAiB;;;;;;;;CAUlB"}
@@ -1,53 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BusinessError = void 0;
4
- const common_1 = require("@nestjs/common");
5
- /**
6
- * Base class for business logic errors that should be surfaced to clients
7
- * with meaningful error messages and appropriate HTTP status codes.
8
- */
9
- class BusinessError extends common_1.HttpException {
10
- errorCode;
11
- domain;
12
- userMessage;
13
- developerMessage;
14
- action;
15
- constructor(errorCode, domain, userMessage, developerMessage, httpStatus = common_1.HttpStatus.BAD_REQUEST, action) {
16
- super({
17
- code: errorCode,
18
- domain,
19
- message: userMessage,
20
- developerMessage,
21
- action,
22
- timestamp: new Date().toISOString(),
23
- category: 'BUSINESS_LOGIC'
24
- }, httpStatus);
25
- this.errorCode = errorCode;
26
- this.domain = domain;
27
- this.userMessage = userMessage;
28
- this.developerMessage = developerMessage;
29
- this.action = action;
30
- this.name = this.constructor.name;
31
- }
32
- /**
33
- * Check if an error is a business error that should be surfaced to clients
34
- */
35
- static isBusinessError(error) {
36
- return error instanceof BusinessError;
37
- }
38
- /**
39
- * Get a client-safe error response
40
- */
41
- getClientResponse() {
42
- return {
43
- code: this.errorCode,
44
- domain: this.domain,
45
- message: this.userMessage,
46
- action: this.action,
47
- timestamp: new Date().toISOString(),
48
- category: 'BUSINESS_LOGIC'
49
- };
50
- }
51
- }
52
- exports.BusinessError = BusinessError;
53
- //# sourceMappingURL=business-error.base.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"business-error.base.js","sourceRoot":"","sources":["../../../src/exceptions/business-error.base.ts"],"names":[],"mappings":";;;AAAA,2CAA2D;AAE3D;;;GAGG;AACH,MAAsB,aAAc,SAAQ,sBAAa;IACvC,SAAS,CAAS;IAClB,MAAM,CAAS;IACf,WAAW,CAAS;IACpB,gBAAgB,CAAS;IACzB,MAAM,CAAU;IAEhC,YACE,SAAiB,EACjB,MAAc,EACd,WAAmB,EACnB,gBAAwB,EACxB,aAAyB,mBAAU,CAAC,WAAW,EAC/C,MAAe;QAEf,KAAK,CACH;YACE,IAAI,EAAE,SAAS;YACf,MAAM;YACN,OAAO,EAAE,WAAW;YACpB,gBAAgB;YAChB,MAAM;YACN,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACnC,QAAQ,EAAE,gBAAgB;SAC3B,EACD,UAAU,CACX,CAAC;QAEF,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IACpC,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,eAAe,CAAC,KAAU;QAC/B,OAAO,KAAK,YAAY,aAAa,CAAC;IACxC,CAAC;IAED;;OAEG;IACH,iBAAiB;QACf,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,SAAS;YACpB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,OAAO,EAAE,IAAI,CAAC,WAAW;YACzB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACnC,QAAQ,EAAE,gBAAgB;SAC3B,CAAC;IACJ,CAAC;CACF;AAxDD,sCAwDC"}
@@ -1,4 +0,0 @@
1
- export * from './business-error.base';
2
- export * from './transaction-errors';
3
- export * from './technical-errors';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exceptions/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/exceptions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,uDAAqC;AACrC,qDAAmC"}
@@ -1,24 +0,0 @@
1
- import { HttpException, HttpStatus } from '@nestjs/common';
2
- /**
3
- * Technical errors that should be logged but not exposed to clients
4
- */
5
- export declare class TechnicalError extends HttpException {
6
- readonly correlationId?: string;
7
- readonly originalError?: Error;
8
- constructor(message: string, originalError?: Error, correlationId?: string, httpStatus?: HttpStatus);
9
- static isTechnicalError(error: any): error is TechnicalError;
10
- }
11
- /**
12
- * Orchestration errors that wrap other errors but preserve business context
13
- */
14
- export declare class OrchestrationError extends HttpException {
15
- readonly operation: string;
16
- readonly originalError: Error;
17
- constructor(operation: string, originalError: Error);
18
- static isOrchestrationError(error: any): error is OrchestrationError;
19
- /**
20
- * Get the root business error if it exists
21
- */
22
- getRootBusinessError(): HttpException | null;
23
- }
24
- //# sourceMappingURL=technical-errors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"technical-errors.d.ts","sourceRoot":"","sources":["../../../src/exceptions/technical-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE3D;;GAEG;AACH,qBAAa,cAAe,SAAQ,aAAa;IAC/C,SAAgB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvC,SAAgB,aAAa,CAAC,EAAE,KAAK,CAAC;gBAGpC,OAAO,EAAE,MAAM,EACf,aAAa,CAAC,EAAE,KAAK,EACrB,aAAa,CAAC,EAAE,MAAM,EACtB,UAAU,GAAE,UAA6C;IAkB3D,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,cAAc;CAG7D;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,aAAa;IACnD,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,aAAa,EAAE,KAAK,CAAC;gBAEzB,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK;IAkBnD,MAAM,CAAC,oBAAoB,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,kBAAkB;IAIpE;;OAEG;IACH,oBAAoB,IAAI,aAAa,GAAG,IAAI;CAkB7C"}
@@ -1,73 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OrchestrationError = exports.TechnicalError = void 0;
4
- const common_1 = require("@nestjs/common");
5
- /**
6
- * Technical errors that should be logged but not exposed to clients
7
- */
8
- class TechnicalError extends common_1.HttpException {
9
- correlationId;
10
- originalError;
11
- constructor(message, originalError, correlationId, httpStatus = common_1.HttpStatus.INTERNAL_SERVER_ERROR) {
12
- super({
13
- code: 'TECHNICAL_ERROR',
14
- message: 'An unexpected error occurred',
15
- correlationId,
16
- timestamp: new Date().toISOString(),
17
- category: 'TECHNICAL'
18
- }, httpStatus);
19
- this.originalError = originalError;
20
- this.correlationId = correlationId;
21
- this.name = this.constructor.name;
22
- }
23
- static isTechnicalError(error) {
24
- return error instanceof TechnicalError;
25
- }
26
- }
27
- exports.TechnicalError = TechnicalError;
28
- /**
29
- * Orchestration errors that wrap other errors but preserve business context
30
- */
31
- class OrchestrationError extends common_1.HttpException {
32
- operation;
33
- originalError;
34
- constructor(operation, originalError) {
35
- // If the original error is a business error, preserve its HTTP status and message
36
- const isBusinessError = originalError instanceof common_1.HttpException;
37
- const status = isBusinessError ? originalError.getStatus() : common_1.HttpStatus.INTERNAL_SERVER_ERROR;
38
- const response = isBusinessError ? originalError.getResponse() : {
39
- code: 'ORCHESTRATION_ERROR',
40
- message: 'Operation failed',
41
- timestamp: new Date().toISOString(),
42
- category: 'ORCHESTRATION'
43
- };
44
- super(response, status);
45
- this.operation = operation;
46
- this.originalError = originalError;
47
- this.name = this.constructor.name;
48
- }
49
- static isOrchestrationError(error) {
50
- return error instanceof OrchestrationError;
51
- }
52
- /**
53
- * Get the root business error if it exists
54
- */
55
- getRootBusinessError() {
56
- let current = this.originalError;
57
- while (current) {
58
- if (current instanceof common_1.HttpException &&
59
- current.getResponse?.()?.category === 'BUSINESS_LOGIC') {
60
- return current;
61
- }
62
- if (current instanceof OrchestrationError) {
63
- current = current.originalError;
64
- }
65
- else {
66
- break;
67
- }
68
- }
69
- return null;
70
- }
71
- }
72
- exports.OrchestrationError = OrchestrationError;
73
- //# sourceMappingURL=technical-errors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"technical-errors.js","sourceRoot":"","sources":["../../../src/exceptions/technical-errors.ts"],"names":[],"mappings":";;;AAAA,2CAA2D;AAE3D;;GAEG;AACH,MAAa,cAAe,SAAQ,sBAAa;IAC/B,aAAa,CAAU;IACvB,aAAa,CAAS;IAEtC,YACE,OAAe,EACf,aAAqB,EACrB,aAAsB,EACtB,aAAyB,mBAAU,CAAC,qB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oBAAoB,CAAC,KAAU;QACpC,OAAO,KAAK,YAAY,kBAAkB,CAAC;IAC7C,CAAC;IAED;;OAEG;IACH,oBAAoB;QAClB,IAAI,OAAO,GAAU,IAAI,CAAC,aAAa,CAAC;QAExC,OAAO,OAAO,EAAE,CAAC;YACf,IAAI,OAAO,YAAY,sBAAa;gBAC/B,OAAe,CAAC,WAAW,EAAE,EAAE,EAAE,QAAQ,KAAK,gBAAgB,EAAE,CAAC;gBACpE,OAAO,OAAO,CAAC;YACjB,CAAC;YAED,IAAI,OAAO,YAAY,kBAAkB,EAAE,CAAC;gBAC1C,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC;YAClC,CAAC;iBAAM,CAAC;gBACN,MAAM;YACR,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA/CD,gDA+CC"}
@@ -1,44 +0,0 @@
1
- import { BusinessError } from './business-error.base';
2
- /**
3
- * Transaction-specific business errors
4
- */
5
- export declare class TransactionAlreadyCompletedError extends BusinessError {
6
- constructor(transactionId: string, currentStatus: string);
7
- }
8
- export declare class TransactionNotPendingError extends BusinessError {
9
- constructor(transactionId: string, currentStatus: string);
10
- }
11
- export declare class TransactionValidationError extends BusinessError {
12
- constructor(field: string, reason: string);
13
- }
14
- export declare class WalletMissingSigningError extends BusinessError {
15
- constructor(walletAddress: string);
16
- }
17
- export declare class WalletNotFoundError extends BusinessError {
18
- constructor(ownerAddress: string);
19
- }
20
- export declare class SmartWalletProcessingError extends BusinessError {
21
- constructor(reason: string);
22
- }
23
- export declare class ContractNotFoundError extends BusinessError {
24
- constructor(contractAddress: string);
25
- }
26
- export declare class InsufficientBalanceError extends BusinessError {
27
- constructor(required: string, available: string, tokenSymbol?: string);
28
- }
29
- export declare class TokenNotActiveError extends BusinessError {
30
- constructor(tokenId: string);
31
- }
32
- export declare class BusinessNotMinterError extends BusinessError {
33
- constructor(businessId: string, tokenId: string);
34
- }
35
- export declare class TokenIdRequiredError extends BusinessError {
36
- constructor(tokenType: string);
37
- }
38
- export declare class UserNotFoundError extends BusinessError {
39
- constructor(identifier: string);
40
- }
41
- export declare class UnexpectedValidationScenarioError extends BusinessError {
42
- constructor(scenario: string);
43
- }
44
- //# sourceMappingURL=transaction-errors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transaction-errors.d.ts","sourceRoot":"","sources":["../../../src/exceptions/transaction-errors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD;;GAEG;AACH,qBAAa,gCAAiC,SAAQ,aAAa;gBACrD,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM;CAUzD;AAED,qBAAa,0BAA2B,SAAQ,aAAa;gBAC/C,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM;CAUzD;AAED,qBAAa,0BAA2B,SAAQ,aAAa;gBAC/C,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAU1C;AAED,qBAAa,yBAA0B,SAAQ,aAAa;gBAC9C,aAAa,EAAE,MAAM;CAUlC;AAED,qBAAa,mBAAoB,SAAQ,aAAa;gBACxC,YAAY,EAAE,MAAM;CAUjC;AAED,qBAAa,0BAA2B,SAAQ,aAAa;gBAC/C,MAAM,EAAE,MAAM;CAU3B;AAED,qBAAa,qBAAsB,SAAQ,aAAa;gBAC1C,eAAe,EAAE,MAAM;CAUpC;AAED,qBAAa,wBAAyB,SAAQ,aAAa;gBAC7C,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM;CAWtE;AAED,qBAAa,mBAAoB,SAAQ,aAAa;gBACxC,OAAO,EAAE,MAAM;CAU5B;AAED,qBAAa,sBAAuB,SAAQ,aAAa;gBAC3C,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAUhD;AAED,qBAAa,oBAAqB,SAAQ,aAAa;gBACzC,SAAS,EAAE,MAAM;CAU9B;AAED,qBAAa,iBAAkB,SAAQ,aAAa;gBACtC,UAAU,EAAE,MAAM;CAU/B;AAED,qBAAa,iCAAkC,SAAQ,aAAa;gBACtD,QAAQ,EAAE,MAAM;CAU7B"}
@@ -1,88 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UnexpectedValidationScenarioError = exports.UserNotFoundError = exports.TokenIdRequiredError = exports.BusinessNotMinterError = exports.TokenNotActiveError = exports.InsufficientBalanceError = exports.ContractNotFoundError = exports.SmartWalletProcessingError = exports.WalletNotFoundError = exports.WalletMissingSigningError = exports.TransactionValidationError = exports.TransactionNotPendingError = exports.TransactionAlreadyCompletedError = void 0;
4
- const common_1 = require("@nestjs/common");
5
- const business_error_base_1 = require("./business-error.base");
6
- /**
7
- * Transaction-specific business errors
8
- */
9
- class TransactionAlreadyCompletedError extends business_error_base_1.BusinessError {
10
- constructor(transactionId, currentStatus) {
11
- super('TRANSACTION_ALREADY_COMPLETED', 'transaction', 'This transaction has already been completed', `Transaction ${transactionId} is in status: ${currentStatus}`, common_1.HttpStatus.CONFLICT, 'Please refresh and check the transaction status');
12
- }
13
- }
14
- exports.TransactionAlreadyCompletedError = TransactionAlreadyCompletedError;
15
- class TransactionNotPendingError extends business_error_base_1.BusinessError {
16
- constructor(transactionId, currentStatus) {
17
- super('TRANSACTION_NOT_PENDING', 'transaction', 'Transaction is not in a pending state', `Transaction ${transactionId} has status: ${currentStatus}, expected: pending`, common_1.HttpStatus.CONFLICT, 'Please check the current transaction status');
18
- }
19
- }
20
- exports.TransactionNotPendingError = TransactionNotPendingError;
21
- class TransactionValidationError extends business_error_base_1.BusinessError {
22
- constructor(field, reason) {
23
- super('TRANSACTION_VALIDATION_ERROR', 'transaction', `Transaction validation failed: ${reason}`, `Field '${field}' validation failed: ${reason}`, common_1.HttpStatus.BAD_REQUEST, 'Please check the transaction data and try again');
24
- }
25
- }
26
- exports.TransactionValidationError = TransactionValidationError;
27
- class WalletMissingSigningError extends business_error_base_1.BusinessError {
28
- constructor(walletAddress) {
29
- super('WALLET_MISSING_SIGNING', 'wallet', 'Wallet exists but has no linked signing account', `Wallet ${walletAddress} exists but has no linked signing account`, common_1.HttpStatus.CONFLICT, 'Please set up a signing account for this wallet');
30
- }
31
- }
32
- exports.WalletMissingSigningError = WalletMissingSigningError;
33
- class WalletNotFoundError extends business_error_base_1.BusinessError {
34
- constructor(ownerAddress) {
35
- super('WALLET_NOT_FOUND', 'wallet', 'No wallet found for this address', `No wallet found for owner address: ${ownerAddress}`, common_1.HttpStatus.NOT_FOUND, 'Please create a wallet first');
36
- }
37
- }
38
- exports.WalletNotFoundError = WalletNotFoundError;
39
- class SmartWalletProcessingError extends business_error_base_1.BusinessError {
40
- constructor(reason) {
41
- super('SMART_WALLET_PROCESSING_FAILED', 'wallet', 'Smart wallet transaction processing failed', `Smart wallet processing failed: ${reason}`, common_1.HttpStatus.UNPROCESSABLE_ENTITY, 'Please try with a standard wallet transaction');
42
- }
43
- }
44
- exports.SmartWalletProcessingError = SmartWalletProcessingError;
45
- class ContractNotFoundError extends business_error_base_1.BusinessError {
46
- constructor(contractAddress) {
47
- super('CONTRACT_NOT_FOUND', 'contract', 'Contract not found or ABI unavailable', `Contract at address ${contractAddress} not found or ABI unavailable`, common_1.HttpStatus.NOT_FOUND, 'Please verify the contract address');
48
- }
49
- }
50
- exports.ContractNotFoundError = ContractNotFoundError;
51
- class InsufficientBalanceError extends business_error_base_1.BusinessError {
52
- constructor(required, available, tokenSymbol) {
53
- const token = tokenSymbol ? ` ${tokenSymbol}` : '';
54
- super('INSUFFICIENT_BALANCE', 'balance', `Insufficient${token} balance for this transaction`, `Required: ${required}${token}, Available: ${available}${token}`, common_1.HttpStatus.UNPROCESSABLE_ENTITY, 'Please ensure you have sufficient balance');
55
- }
56
- }
57
- exports.InsufficientBalanceError = InsufficientBalanceError;
58
- class TokenNotActiveError extends business_error_base_1.BusinessError {
59
- constructor(tokenId) {
60
- super('TOKEN_NOT_ACTIVE', 'token', 'Token is not active', `Token ${tokenId} is not in an active state`, common_1.HttpStatus.UNPROCESSABLE_ENTITY, 'Please use an active token');
61
- }
62
- }
63
- exports.TokenNotActiveError = TokenNotActiveError;
64
- class BusinessNotMinterError extends business_error_base_1.BusinessError {
65
- constructor(businessId, tokenId) {
66
- super('BUSINESS_NOT_MINTER', 'token', 'Business is not authorized as a minter for this token', `Business ${businessId} is not a minter for token ${tokenId}`, common_1.HttpStatus.FORBIDDEN, 'Please verify token minting permissions');
67
- }
68
- }
69
- exports.BusinessNotMinterError = BusinessNotMinterError;
70
- class TokenIdRequiredError extends business_error_base_1.BusinessError {
71
- constructor(tokenType) {
72
- super('TOKEN_ID_REQUIRED', 'token', `TokenId is required for ${tokenType} tokens`, `TokenId parameter is required for token type: ${tokenType}`, common_1.HttpStatus.BAD_REQUEST, 'Please provide a valid tokenId');
73
- }
74
- }
75
- exports.TokenIdRequiredError = TokenIdRequiredError;
76
- class UserNotFoundError extends business_error_base_1.BusinessError {
77
- constructor(identifier) {
78
- super('USER_NOT_FOUND', 'user', 'User not found', `User not found for identifier: ${identifier}`, common_1.HttpStatus.NOT_FOUND, 'Please verify the user exists');
79
- }
80
- }
81
- exports.UserNotFoundError = UserNotFoundError;
82
- class UnexpectedValidationScenarioError extends business_error_base_1.BusinessError {
83
- constructor(scenario) {
84
- super('UNEXPECTED_VALIDATION_SCENARIO', 'validation', 'Unexpected validation scenario encountered', `Unexpected validation scenario: ${scenario}`, common_1.HttpStatus.INTERNAL_SERVER_ERROR, 'Please contact support');
85
- }
86
- }
87
- exports.UnexpectedValidationScenarioError = UnexpectedValidationScenarioError;
88
- //# sourceMappingURL=transaction-errors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transaction-errors.js","sourceRoot":"","sources":["../../../src/exceptions/transaction-errors.ts"],"names":[],"mappings":";;;AAAA,2CAA4C;AAC5C,+DAAsD;AAEtD;;GAEG;AACH,MAAa,gCAAiC,SAAQ,mCAAa;IACjE,YAAY,aAAqB,EAAE,aA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,EACnB,OAAO,EACP,2BAA2B,SAAS,SAAS,EAC7C,iDAAiD,SAAS,EAAE,EAC5D,mBAAU,CAAC,WAAW,EACtB,gCAAgC,CACjC,CAAC;IACJ,CAAC;CACF;AAXD,oDAWC;AAED,MAAa,iBAAkB,SAAQ,mCAAa;IAClD,YAAY,UAAkB;QAC5B,KAAK,CACH,gBAAgB,EAChB,MAAM,EACN,gBAAgB,EAChB,kCAAkC,UAAU,EAAE,EAC9C,mBAAU,CAAC,SAAS,EACpB,+BAA+B,CAChC,CAAC;IACJ,CAAC;CACF;AAXD,8CAWC;AAED,MAAa,iCAAkC,SAAQ,mCAAa;IAClE,YAAY,QAAgB;QAC1B,KAAK,CACH,gCAAgC,EAChC,YAAY,EACZ,4CAA4C,EAC5C,mCAAmC,QAAQ,EAAE,EAC7C,mBAAU,CAAC,qBAAqB,EAChC,wBAAwB,CACzB,CAAC;IACJ,CAAC;CACF;AAXD,8EAWC"}
@@ -1,5 +0,0 @@
1
- export declare enum AccountType {
2
- BUSINESS = "BUSINESS",
3
- USER = "USER"
4
- }
5
- //# sourceMappingURL=account-type.enum.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"account-type.enum.d.ts","sourceRoot":"","sources":["../../../src/enum/account-type.enum.ts"],"names":[],"mappings":"AACA,oBAAY,WAAW;IACnB,QAAQ,aAAgB;IACxB,IAAI,SAAgB;CACvB"}
@@ -1,6 +0,0 @@
1
- export var AccountType;
2
- (function (AccountType) {
3
- AccountType["BUSINESS"] = "BUSINESS";
4
- AccountType["USER"] = "USER";
5
- })(AccountType || (AccountType = {}));
6
- //# sourceMappingURL=account-type.enum.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"account-type.enum.js","sourceRoot":"","sources":["../../../src/enum/account-type.enum.ts"],"names":[],"mappings":"AACA,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACnB,oCAAwB,CAAA;IACxB,4BAAoB,CAAA;AACxB,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB"}
@@ -1,29 +0,0 @@
1
- import { HttpException, HttpStatus } from '@nestjs/common';
2
- /**
3
- * Base class for business logic errors that should be surfaced to clients
4
- * with meaningful error messages and appropriate HTTP status codes.
5
- */
6
- export declare abstract class BusinessError extends HttpException {
7
- readonly errorCode: string;
8
- readonly domain: string;
9
- readonly userMessage: string;
10
- readonly developerMessage: string;
11
- readonly action?: string;
12
- constructor(errorCode: string, domain: string, userMessage: string, developerMessage: string, httpStatus?: HttpStatus, action?: string);
13
- /**
14
- * Check if an error is a business error that should be surfaced to clients
15
- */
16
- static isBusinessError(error: any): error is BusinessError;
17
- /**
18
- * Get a client-safe error response
19
- */
20
- getClientResponse(): {
21
- code: string;
22
- domain: string;
23
- message: string;
24
- action: string | undefined;
25
- timestamp: string;
26
- category: string;
27
- };
28
- }
29
- //# sourceMappingURL=business-error.base.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"business-error.base.d.ts","sourceRoot":"","sources":["../../../src/exceptions/business-error.base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE3D;;;GAGG;AACH,8BAAsB,aAAc,SAAQ,aAAa;IACvD,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,SAAgB,WAAW,EAAE,MAAM,CAAC;IACpC,SAAgB,gBAAgB,EAAE,MAAM,CAAC;IACzC,SAAgB,MAAM,CAAC,EAAE,MAAM,CAAC;gBAG9B,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,gBAAgB,EAAE,MAAM,EACxB,UAAU,GAAE,UAAmC,EAC/C,MAAM,CAAC,EAAE,MAAM;IAuBjB;;OAEG;IACH,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,aAAa;IAI1D;;OAEG;IACH,iBAAiB;;;;;;;;CAUlB"}
@@ -1,49 +0,0 @@
1
- import { HttpException, HttpStatus } from '@nestjs/common';
2
- /**
3
- * Base class for business logic errors that should be surfaced to clients
4
- * with meaningful error messages and appropriate HTTP status codes.
5
- */
6
- export class BusinessError extends HttpException {
7
- errorCode;
8
- domain;
9
- userMessage;
10
- developerMessage;
11
- action;
12
- constructor(errorCode, domain, userMessage, developerMessage, httpStatus = HttpStatus.BAD_REQUEST, action) {
13
- super({
14
- code: errorCode,
15
- domain,
16
- message: userMessage,
17
- developerMessage,
18
- action,
19
- timestamp: new Date().toISOString(),
20
- category: 'BUSINESS_LOGIC'
21
- }, httpStatus);
22
- this.errorCode = errorCode;
23
- this.domain = domain;
24
- this.userMessage = userMessage;
25
- this.developerMessage = developerMessage;
26
- this.action = action;
27
- this.name = this.constructor.name;
28
- }
29
- /**
30
- * Check if an error is a business error that should be surfaced to clients
31
- */
32
- static isBusinessError(error) {
33
- return error instanceof BusinessError;
34
- }
35
- /**
36
- * Get a client-safe error response
37
- */
38
- getClientResponse() {
39
- return {
40
- code: this.errorCode,
41
- domain: this.domain,
42
- message: this.userMessage,
43
- action: this.action,
44
- timestamp: new Date().toISOString(),
45
- category: 'BUSINESS_LOGIC'
46
- };
47
- }
48
- }
49
- //# sourceMappingURL=business-error.base.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"business-error.base.js","sourceRoot":"","sources":["../../../src/exceptions/business-error.base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE3D;;;GAGG;AACH,MAAM,OAAgB,aAAc,SAAQ,aAAa;IACvC,SAAS,CAAS;IAClB,MAAM,CAAS;IACf,WAAW,CAAS;IACpB,gBAAgB,CAAS;IACzB,MAAM,CAAU;IAEhC,YACE,SAAiB,EACjB,MAAc,EACd,WAAmB,EACnB,gBAAwB,EACxB,aAAyB,UAAU,CAAC,WAAW,EAC/C,MAAe;QAEf,KAAK,CACH;YACE,IAAI,EAAE,SAAS;YACf,MAAM;YACN,OAAO,EAAE,WAAW;YACpB,gBAAgB;YAChB,MAAM;YACN,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACnC,QAAQ,EAAE,gBAAgB;SAC3B,EACD,UAAU,CACX,CAAC;QAEF,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IACpC,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,eAAe,CAAC,KAAU;QAC/B,OAAO,KAAK,YAAY,aAAa,CAAC;IACxC,CAAC;IAED;;OAEG;IACH,iBAAiB;QACf,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,SAAS;YACpB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,OAAO,EAAE,IAAI,CAAC,WAAW;YACzB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACnC,QAAQ,EAAE,gBAAgB;SAC3B,CAAC;IACJ,CAAC;CACF"}
@@ -1,4 +0,0 @@
1
- export * from './business-error.base';
2
- export * from './transaction-errors';
3
- export * from './technical-errors';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exceptions/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC"}
@@ -1,4 +0,0 @@
1
- export * from './business-error.base';
2
- export * from './transaction-errors';
3
- export * from './technical-errors';
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/exceptions/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC"}
@@ -1,24 +0,0 @@
1
- import { HttpException, HttpStatus } from '@nestjs/common';
2
- /**
3
- * Technical errors that should be logged but not exposed to clients
4
- */
5
- export declare class TechnicalError extends HttpException {
6
- readonly correlationId?: string;
7
- readonly originalError?: Error;
8
- constructor(message: string, originalError?: Error, correlationId?: string, httpStatus?: HttpStatus);
9
- static isTechnicalError(error: any): error is TechnicalError;
10
- }
11
- /**
12
- * Orchestration errors that wrap other errors but preserve business context
13
- */
14
- export declare class OrchestrationError extends HttpException {
15
- readonly operation: string;
16
- readonly originalError: Error;
17
- constructor(operation: string, originalError: Error);
18
- static isOrchestrationError(error: any): error is OrchestrationError;
19
- /**
20
- * Get the root business error if it exists
21
- */
22
- getRootBusinessError(): HttpException | null;
23
- }
24
- //# sourceMappingURL=technical-errors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"technical-errors.d.ts","sourceRoot":"","sources":["../../../src/exceptions/technical-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE3D;;GAEG;AACH,qBAAa,cAAe,SAAQ,aAAa;IAC/C,SAAgB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvC,SAAgB,aAAa,CAAC,EAAE,KAAK,CAAC;gBAGpC,OAAO,EAAE,MAAM,EACf,aAAa,CAAC,EAAE,KAAK,EACrB,aAAa,CAAC,EAAE,MAAM,EACtB,UAAU,GAAE,UAA6C;IAkB3D,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,cAAc;CAG7D;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,aAAa;IACnD,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,aAAa,EAAE,KAAK,CAAC;gBAEzB,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK;IAkBnD,MAAM,CAAC,oBAAoB,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,kBAAkB;IAIpE;;OAEG;IACH,oBAAoB,IAAI,aAAa,GAAG,IAAI;CAkB7C"}