@explorins/pers-shared 2.1.40 → 2.1.42

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 (129) hide show
  1. package/CHANGELOG.md +0 -0
  2. package/README.md +0 -0
  3. package/dist/cjs/shared-lib/dto/admin/admin-create.request.dto.d.ts +1 -1
  4. package/dist/cjs/shared-lib/dto/admin/admin-create.request.dto.d.ts.map +1 -1
  5. package/dist/cjs/shared-lib/dto/admin/admin-create.request.dto.js +3 -3
  6. package/dist/cjs/shared-lib/dto/admin/admin-create.request.dto.js.map +1 -1
  7. package/dist/cjs/shared-lib/dto/api-key/api-key-verification.dto.d.ts +8 -0
  8. package/dist/cjs/shared-lib/dto/api-key/api-key-verification.dto.d.ts.map +1 -0
  9. package/dist/cjs/shared-lib/dto/api-key/api-key-verification.dto.js +51 -0
  10. package/dist/cjs/shared-lib/dto/api-key/api-key-verification.dto.js.map +1 -0
  11. package/dist/cjs/shared-lib/dto/api-key/api-key.dto.d.ts +23 -0
  12. package/dist/cjs/shared-lib/dto/api-key/api-key.dto.d.ts.map +1 -0
  13. package/dist/cjs/shared-lib/dto/api-key/api-key.dto.js +108 -0
  14. package/dist/cjs/shared-lib/dto/api-key/api-key.dto.js.map +1 -0
  15. package/dist/cjs/shared-lib/dto/api-key/api-key.request.dto.d.ts +4 -0
  16. package/dist/cjs/shared-lib/dto/api-key/api-key.request.dto.d.ts.map +1 -0
  17. package/dist/cjs/shared-lib/dto/{tenant/tenantApiKey.request.dto.js → api-key/api-key.request.dto.js} +12 -16
  18. package/dist/cjs/shared-lib/dto/api-key/api-key.request.dto.js.map +1 -0
  19. package/dist/cjs/shared-lib/dto/api-key/index.d.ts +4 -0
  20. package/dist/cjs/shared-lib/dto/api-key/index.d.ts.map +1 -0
  21. package/dist/cjs/shared-lib/dto/api-key/index.js +20 -0
  22. package/dist/cjs/shared-lib/dto/api-key/index.js.map +1 -0
  23. package/dist/cjs/shared-lib/dto/auth.dto.js +3 -2
  24. package/dist/cjs/shared-lib/dto/auth.dto.js.map +1 -1
  25. package/dist/cjs/shared-lib/dto/index.d.ts +1 -0
  26. package/dist/cjs/shared-lib/dto/index.d.ts.map +1 -1
  27. package/dist/cjs/shared-lib/dto/index.js +1 -0
  28. package/dist/cjs/shared-lib/dto/index.js.map +1 -1
  29. package/dist/cjs/shared-lib/dto/tenant/index.d.ts +0 -1
  30. package/dist/cjs/shared-lib/dto/tenant/index.d.ts.map +1 -1
  31. package/dist/cjs/shared-lib/dto/tenant/index.js +0 -1
  32. package/dist/cjs/shared-lib/dto/tenant/index.js.map +1 -1
  33. package/dist/cjs/shared-lib/dto/token/token.request.dto.d.ts +1 -0
  34. package/dist/cjs/shared-lib/dto/token/token.request.dto.d.ts.map +1 -1
  35. package/dist/cjs/shared-lib/dto/token/token.request.dto.js +7 -0
  36. package/dist/cjs/shared-lib/dto/token/token.request.dto.js.map +1 -1
  37. package/dist/cjs/shared-lib/enum/api-key-type.enum.d.ts +3 -1
  38. package/dist/cjs/shared-lib/enum/api-key-type.enum.d.ts.map +1 -1
  39. package/dist/cjs/shared-lib/enum/api-key-type.enum.js +1 -1
  40. package/dist/cjs/shared-lib/enum/api-key-type.enum.js.map +1 -1
  41. package/dist/cjs/shared-lib/enum/transaction-status.enum.d.ts +3 -1
  42. package/dist/cjs/shared-lib/enum/transaction-status.enum.d.ts.map +1 -1
  43. package/dist/cjs/shared-lib/enum/transaction-status.enum.js +6 -0
  44. package/dist/cjs/shared-lib/enum/transaction-status.enum.js.map +1 -1
  45. package/dist/cjs/shared-lib/errors/technical-errors.d.ts +0 -13
  46. package/dist/cjs/shared-lib/errors/technical-errors.d.ts.map +1 -1
  47. package/dist/cjs/shared-lib/errors/technical-errors.js +1 -46
  48. package/dist/cjs/shared-lib/errors/technical-errors.js.map +1 -1
  49. package/dist/cjs/shared-lib/interfaces/jwt.payload.interface.d.ts +32 -10
  50. package/dist/cjs/shared-lib/interfaces/jwt.payload.interface.d.ts.map +1 -1
  51. package/dist/cjs/shared-lib/interfaces/jwt.payload.interface.js +16 -1
  52. package/dist/cjs/shared-lib/interfaces/jwt.payload.interface.js.map +1 -1
  53. package/dist/cjs/shared-lib/value-objects/account-selector.vo.d.ts.map +1 -1
  54. package/dist/cjs/shared-lib/value-objects/account-selector.vo.js +13 -9
  55. package/dist/cjs/shared-lib/value-objects/account-selector.vo.js.map +1 -1
  56. package/dist/cjs/shared-lib/value-objects/address.value-object.d.ts.map +1 -1
  57. package/dist/cjs/shared-lib/value-objects/address.value-object.js +2 -1
  58. package/dist/cjs/shared-lib/value-objects/address.value-object.js.map +1 -1
  59. package/dist/cjs/shared-patterns/errors/error-factory.d.ts +150 -0
  60. package/dist/cjs/shared-patterns/errors/error-factory.d.ts.map +1 -0
  61. package/dist/cjs/shared-patterns/errors/error-factory.js +257 -0
  62. package/dist/cjs/shared-patterns/errors/error-factory.js.map +1 -0
  63. package/dist/esm/shared-lib/dto/admin/admin-create.request.dto.d.ts +1 -1
  64. package/dist/esm/shared-lib/dto/admin/admin-create.request.dto.d.ts.map +1 -1
  65. package/dist/esm/shared-lib/dto/admin/admin-create.request.dto.js +1 -1
  66. package/dist/esm/shared-lib/dto/admin/admin-create.request.dto.js.map +1 -1
  67. package/dist/esm/shared-lib/dto/api-key/api-key-verification.dto.d.ts +8 -0
  68. package/dist/esm/shared-lib/dto/api-key/api-key-verification.dto.d.ts.map +1 -0
  69. package/dist/esm/shared-lib/dto/api-key/api-key-verification.dto.js +41 -0
  70. package/dist/esm/shared-lib/dto/api-key/api-key-verification.dto.js.map +1 -0
  71. package/dist/esm/shared-lib/dto/api-key/api-key.dto.d.ts +23 -0
  72. package/dist/esm/shared-lib/dto/api-key/api-key.dto.d.ts.map +1 -0
  73. package/dist/esm/shared-lib/dto/api-key/api-key.dto.js +92 -0
  74. package/dist/esm/shared-lib/dto/api-key/api-key.dto.js.map +1 -0
  75. package/dist/esm/shared-lib/dto/api-key/api-key.request.dto.d.ts +4 -0
  76. package/dist/esm/shared-lib/dto/api-key/api-key.request.dto.d.ts.map +1 -0
  77. package/dist/esm/shared-lib/dto/{tenant/tenantApiKey.request.dto.js → api-key/api-key.request.dto.js} +9 -11
  78. package/dist/esm/shared-lib/dto/api-key/api-key.request.dto.js.map +1 -0
  79. package/dist/esm/shared-lib/dto/api-key/index.d.ts +4 -0
  80. package/dist/esm/shared-lib/dto/api-key/index.d.ts.map +1 -0
  81. package/dist/esm/shared-lib/dto/api-key/index.js +4 -0
  82. package/dist/esm/shared-lib/dto/api-key/index.js.map +1 -0
  83. package/dist/esm/shared-lib/dto/auth.dto.js +3 -2
  84. package/dist/esm/shared-lib/dto/auth.dto.js.map +1 -1
  85. package/dist/esm/shared-lib/dto/index.d.ts +1 -0
  86. package/dist/esm/shared-lib/dto/index.d.ts.map +1 -1
  87. package/dist/esm/shared-lib/dto/index.js +1 -0
  88. package/dist/esm/shared-lib/dto/index.js.map +1 -1
  89. package/dist/esm/shared-lib/dto/tenant/index.d.ts +0 -1
  90. package/dist/esm/shared-lib/dto/tenant/index.d.ts.map +1 -1
  91. package/dist/esm/shared-lib/dto/tenant/index.js +0 -1
  92. package/dist/esm/shared-lib/dto/tenant/index.js.map +1 -1
  93. package/dist/esm/shared-lib/dto/token/token.request.dto.d.ts +1 -0
  94. package/dist/esm/shared-lib/dto/token/token.request.dto.d.ts.map +1 -1
  95. package/dist/esm/shared-lib/dto/token/token.request.dto.js +6 -0
  96. package/dist/esm/shared-lib/dto/token/token.request.dto.js.map +1 -1
  97. package/dist/esm/shared-lib/enum/api-key-type.enum.d.ts +3 -1
  98. package/dist/esm/shared-lib/enum/api-key-type.enum.d.ts.map +1 -1
  99. package/dist/esm/shared-lib/enum/api-key-type.enum.js +1 -1
  100. package/dist/esm/shared-lib/enum/api-key-type.enum.js.map +1 -1
  101. package/dist/esm/shared-lib/enum/transaction-status.enum.d.ts +3 -1
  102. package/dist/esm/shared-lib/enum/transaction-status.enum.d.ts.map +1 -1
  103. package/dist/esm/shared-lib/enum/transaction-status.enum.js +6 -0
  104. package/dist/esm/shared-lib/enum/transaction-status.enum.js.map +1 -1
  105. package/dist/esm/shared-lib/errors/technical-errors.d.ts +0 -13
  106. package/dist/esm/shared-lib/errors/technical-errors.d.ts.map +1 -1
  107. package/dist/esm/shared-lib/errors/technical-errors.js +0 -44
  108. package/dist/esm/shared-lib/errors/technical-errors.js.map +1 -1
  109. package/dist/esm/shared-lib/interfaces/jwt.payload.interface.d.ts +32 -10
  110. package/dist/esm/shared-lib/interfaces/jwt.payload.interface.d.ts.map +1 -1
  111. package/dist/esm/shared-lib/interfaces/jwt.payload.interface.js +13 -2
  112. package/dist/esm/shared-lib/interfaces/jwt.payload.interface.js.map +1 -1
  113. package/dist/esm/shared-lib/value-objects/account-selector.vo.d.ts.map +1 -1
  114. package/dist/esm/shared-lib/value-objects/account-selector.vo.js +13 -9
  115. package/dist/esm/shared-lib/value-objects/account-selector.vo.js.map +1 -1
  116. package/dist/esm/shared-lib/value-objects/address.value-object.d.ts.map +1 -1
  117. package/dist/esm/shared-lib/value-objects/address.value-object.js +2 -1
  118. package/dist/esm/shared-lib/value-objects/address.value-object.js.map +1 -1
  119. package/dist/esm/shared-patterns/errors/error-factory.d.ts +150 -0
  120. package/dist/esm/shared-patterns/errors/error-factory.d.ts.map +1 -0
  121. package/dist/esm/shared-patterns/errors/error-factory.js +254 -0
  122. package/dist/esm/shared-patterns/errors/error-factory.js.map +1 -0
  123. package/package.json +1 -1
  124. package/dist/cjs/shared-lib/dto/tenant/tenantApiKey.request.dto.d.ts +0 -7
  125. package/dist/cjs/shared-lib/dto/tenant/tenantApiKey.request.dto.d.ts.map +0 -1
  126. package/dist/cjs/shared-lib/dto/tenant/tenantApiKey.request.dto.js.map +0 -1
  127. package/dist/esm/shared-lib/dto/tenant/tenantApiKey.request.dto.d.ts +0 -7
  128. package/dist/esm/shared-lib/dto/tenant/tenantApiKey.request.dto.d.ts.map +0 -1
  129. package/dist/esm/shared-lib/dto/tenant/tenantApiKey.request.dto.js.map +0 -1
@@ -6,6 +6,7 @@ export declare class TokenUpdateRequestDTO {
6
6
  }
7
7
  export declare class TokenCreateRequestDTO {
8
8
  contractAddress: string;
9
+ chainId?: number;
9
10
  abiUrl?: string;
10
11
  type: NativeTokenType;
11
12
  decimals?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"token.request.dto.d.ts","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/token/token.request.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,eAAe,EAAoB,MAAM,+BAA+B,CAAC;AAGvF,qBAAa,qBAAqB;IAK9B,SAAS,CAAC,EAAE,OAAO,CAAC;IAKpB,IAAI,CAAC,EAAE,MAAM,CAAC;IAKd,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,qBAAa,qBAAqB;IAI9B,eAAe,EAAE,MAAM,CAAK;IAe5B,MAAM,CAAC,EAAE,MAAM,CAAA;IAKf,IAAI,EAAE,eAAe,CAA0B;IAK/C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB"}
1
+ {"version":3,"file":"token.request.dto.d.ts","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/token/token.request.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,eAAe,EAAoB,MAAM,+BAA+B,CAAC;AAGvF,qBAAa,qBAAqB;IAK9B,SAAS,CAAC,EAAE,OAAO,CAAC;IAKpB,IAAI,CAAC,EAAE,MAAM,CAAC;IAKd,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,qBAAa,qBAAqB;IAI9B,eAAe,EAAE,MAAM,CAAK;IAK5B,OAAO,CAAC,EAAE,MAAM,CAAC;IAejB,MAAM,CAAC,EAAE,MAAM,CAAA;IAKf,IAAI,EAAE,eAAe,CAA0B;IAK/C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB"}
@@ -22,6 +22,7 @@ __decorate([
22
22
  ], TokenUpdateRequestDTO.prototype, "symbol", void 0);
23
23
  export class TokenCreateRequestDTO {
24
24
  contractAddress = '';
25
+ chainId;
25
26
  /* @ApiProperty({
26
27
  description: 'The chain id is the chain id of the contract. This is useful for multi-chain contracts.'
27
28
  })
@@ -39,6 +40,11 @@ __decorate([
39
40
  description: 'Contract address is the address of the token contract on chain.'
40
41
  })
41
42
  ], TokenCreateRequestDTO.prototype, "contractAddress", void 0);
43
+ __decorate([
44
+ ApiPropertyOptional({
45
+ description: 'The chain id is the chain id of the contract. This is useful for multi-chain contracts.'
46
+ })
47
+ ], TokenCreateRequestDTO.prototype, "chainId", void 0);
42
48
  __decorate([
43
49
  ApiPropertyOptional({
44
50
  description: 'The ABI URL is the URL to the contract ABI. This is an optional field. If not provided, the contract ABI will be fetched from PERS instance depending on selected token type.'
@@ -1 +1 @@
1
- {"version":3,"file":"token.request.dto.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/token/token.request.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAAwB,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGvF,MAAM,OAAO,qBAAqB;IAK9B,SAAS,CAAW;IAKpB,IAAI,CAAU;IAKd,MAAM,CAAU;CACnB;AAXG;IAHC,mBAAmB,CAChB,EAAC,WAAW,EAAE,uGAAuG,EAAC,CACzH;wDACmB;AAKpB;IAHC,mBAAmB,CAChB,EAAC,WAAW,EAAE,uBAAuB,EAAC,CACzC;mDACa;AAKd;IAHC,mBAAmB,CAChB,EAAC,WAAW,EAAE,yBAAyB,EAAC,CAC3C;qDACe;AAGpB,MAAM,OAAO,qBAAqB;IAI9B,eAAe,GAAW,EAAE,CAAA;IAE5B;;;0BAGsB;IAEtB;;;+BAG2B;IAK3B,MAAM,CAAS;IAKf,IAAI,GAAoB,gBAAgB,CAAC,KAAK,CAAC;IAK/C,QAAQ,CAAU;CACrB;AA1BG;IAHC,WAAW,CAAC;QACT,WAAW,EAAE,iEAAiE;KACjF,CAAC;8DAC0B;AAe5B;IAHC,mBAAmB,CAAC;QACjB,WAAW,EAAE,+KAA+K;KAC/L,CAAC;qDACa;AAKf;IAHC,WAAW,CAAC;QACT,IAAI,EAAE,gBAAgB;KACzB,CAAC;mDAC6C;AAK/C;IAHC,mBAAmB,CAChB,EAAC,WAAW,EAAE,qFAAqF,EAAC,CACvG;uDACiB"}
1
+ {"version":3,"file":"token.request.dto.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/token/token.request.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAAwB,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGvF,MAAM,OAAO,qBAAqB;IAK9B,SAAS,CAAW;IAKpB,IAAI,CAAU;IAKd,MAAM,CAAU;CACnB;AAXG;IAHC,mBAAmB,CAChB,EAAC,WAAW,EAAE,uGAAuG,EAAC,CACzH;wDACmB;AAKpB;IAHC,mBAAmB,CAChB,EAAC,WAAW,EAAE,uBAAuB,EAAC,CACzC;mDACa;AAKd;IAHC,mBAAmB,CAChB,EAAC,WAAW,EAAE,yBAAyB,EAAC,CAC3C;qDACe;AAGpB,MAAM,OAAO,qBAAqB;IAI9B,eAAe,GAAW,EAAE,CAAA;IAK5B,OAAO,CAAU;IAEjB;;;0BAGsB;IAEtB;;;+BAG2B;IAK3B,MAAM,CAAS;IAKf,IAAI,GAAoB,gBAAgB,CAAC,KAAK,CAAC;IAK/C,QAAQ,CAAU;CACrB;AA/BG;IAHC,WAAW,CAAC;QACT,WAAW,EAAE,iEAAiE;KACjF,CAAC;8DAC0B;AAK5B;IAHC,mBAAmB,CAAC;QACjB,WAAW,EAAE,yFAAyF;KACzG,CAAC;sDACe;AAejB;IAHC,mBAAmB,CAAC;QACjB,WAAW,EAAE,+KAA+K;KAC/L,CAAC;qDACa;AAKf;IAHC,WAAW,CAAC;QACT,IAAI,EAAE,gBAAgB;KACzB,CAAC;mDAC6C;AAK/C;IAHC,mBAAmB,CAChB,EAAC,WAAW,EAAE,qFAAqF,EAAC,CACvG;uDACiB"}
@@ -1,5 +1,4 @@
1
1
  export declare enum ApiKeyType {
2
- TENANT_SYSTEM_API_SECRET = "TENANT_SYSTEM_API_SECRET",
3
2
  TENANT_SYSTEM_JWT = "TENANT_SYSTEM_JWT",
4
3
  ADMIN_JWT_ACCESS_TOKEN = "ADMIN_JWT_ACCESS_TOKEN",
5
4
  ADMIN_JWT_REFRESH_TOKEN = "ADMIN_JWT_REFRESH_TOKEN",
@@ -9,4 +8,7 @@ export declare enum ApiKeyType {
9
8
  BLOCKCHAIN_READER_JWT = "BLOCKCHAIN_READER_JWT",
10
9
  TENANT_LEGACY_ADMIN = "TENANT_ADMIN_JWT"
11
10
  }
11
+ export type AuthApiKeyType = ApiKeyType.USER_JWT_ACCESS_TOKEN | ApiKeyType.USER_JWT_REFRESH_TOKEN | ApiKeyType.ADMIN_JWT_ACCESS_TOKEN | ApiKeyType.ADMIN_JWT_REFRESH_TOKEN;
12
+ export type BlockchainApiKeyType = ApiKeyType.BLOCKCHAIN_READER_JWT | ApiKeyType.BLOCKCHAIN_WRITER_JWT;
13
+ export type IntegrationApiKeyType = ApiKeyType.TENANT_SYSTEM_JWT | ApiKeyType.TENANT_LEGACY_ADMIN;
12
14
  //# sourceMappingURL=api-key-type.enum.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-key-type.enum.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/enum/api-key-type.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,UAAU;IAClB,wBAAwB,6BAAgC;IACxD,iBAAiB,sBAAgC;IACjD,sBAAsB,2BAAgC;IACtD,uBAAuB,4BAAgC;IACvD,qBAAqB,0BAAgC;IACrD,sBAAsB,2BAAgC;IACtD,qBAAqB,0BAAgC;IACrD,qBAAqB,0BAAgC;IAGrD,mBAAmB,qBAA6B;CACnD"}
1
+ {"version":3,"file":"api-key-type.enum.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/enum/api-key-type.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,UAAU;IAClB,iBAAiB,sBAAgC;IACjD,sBAAsB,2BAAgC;IACtD,uBAAuB,4BAAgC;IACvD,qBAAqB,0BAAgC;IACrD,sBAAsB,2BAAgC;IACtD,qBAAqB,0BAAgC;IACrD,qBAAqB,0BAAgC;IAGrD,mBAAmB,qBAA6B;CAEnD;AAOD,MAAM,MAAM,cAAc,GACpB,UAAU,CAAC,qBAAqB,GAChC,UAAU,CAAC,sBAAsB,GACjC,UAAU,CAAC,sBAAsB,GACjC,UAAU,CAAC,uBAAuB,CAAA;AAIxC,MAAM,MAAM,oBAAoB,GAC1B,UAAU,CAAC,qBAAqB,GAChC,UAAU,CAAC,qBAAqB,CAAC;AAGvC,MAAM,MAAM,qBAAqB,GAC3B,UAAU,CAAC,iBAAiB,GAC5B,UAAU,CAAC,mBAAmB,CAAC"}
@@ -1,6 +1,5 @@
1
1
  export var ApiKeyType;
2
2
  (function (ApiKeyType) {
3
- ApiKeyType["TENANT_SYSTEM_API_SECRET"] = "TENANT_SYSTEM_API_SECRET";
4
3
  ApiKeyType["TENANT_SYSTEM_JWT"] = "TENANT_SYSTEM_JWT";
5
4
  ApiKeyType["ADMIN_JWT_ACCESS_TOKEN"] = "ADMIN_JWT_ACCESS_TOKEN";
6
5
  ApiKeyType["ADMIN_JWT_REFRESH_TOKEN"] = "ADMIN_JWT_REFRESH_TOKEN";
@@ -10,5 +9,6 @@ export var ApiKeyType;
10
9
  ApiKeyType["BLOCKCHAIN_READER_JWT"] = "BLOCKCHAIN_READER_JWT";
11
10
  // TODO: this needs to be removed. However, there is still dependency
12
11
  ApiKeyType["TENANT_LEGACY_ADMIN"] = "TENANT_ADMIN_JWT";
12
+ // TENANT_SYSTEM_API_SECRET = 'TENANT_SYSTEM_API_SECRET',
13
13
  })(ApiKeyType || (ApiKeyType = {}));
14
14
  //# sourceMappingURL=api-key-type.enum.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-key-type.enum.js","sourceRoot":"","sources":["../../../../src/shared-lib/enum/api-key-type.enum.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,UAYX;AAZD,WAAY,UAAU;IAClB,mEAAwD,CAAA;IACxD,qDAAiD,CAAA;IACjD,+DAAsD,CAAA;IACtD,iEAAuD,CAAA;IACvD,6DAAqD,CAAA;IACrD,+DAAsD,CAAA;IACtD,6DAAqD,CAAA;IACrD,6DAAqD,CAAA;IAErD,qEAAqE;IACrE,sDAAgD,CAAA;AACpD,CAAC,EAZW,UAAU,KAAV,UAAU,QAYrB"}
1
+ {"version":3,"file":"api-key-type.enum.js","sourceRoot":"","sources":["../../../../src/shared-lib/enum/api-key-type.enum.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,UAYX;AAZD,WAAY,UAAU;IAClB,qDAAiD,CAAA;IACjD,+DAAsD,CAAA;IACtD,iEAAuD,CAAA;IACvD,6DAAqD,CAAA;IACrD,+DAAsD,CAAA;IACtD,6DAAqD,CAAA;IACrD,6DAAqD,CAAA;IAErD,qEAAqE;IACrE,sDAAgD,CAAA;IAChD,4DAA4D;AAChE,CAAC,EAZW,UAAU,KAAV,UAAU,QAYrB"}
@@ -4,6 +4,8 @@ export declare enum TransactionStatus {
4
4
  PENDING_SIGNATURE = "pending_signature",
5
5
  BROADCASTED = "broadcasted",
6
6
  SUCCEEDED = "succeeded",
7
- FAILED = "failed"
7
+ FAILED = "failed",
8
+ CANCELLED = "cancelled",
9
+ EXPIRED = "expired"
8
10
  }
9
11
  //# sourceMappingURL=transaction-status.enum.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transaction-status.enum.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/enum/transaction-status.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,iBAAiB;IAEzB,OAAO,YAA+B;IAGtC,UAAU,eAAgC;IAG1C,iBAAiB,sBAAiC;IAGlD,WAAW,gBAAgC;IAG3C,SAAS,cAAgC;IAGzC,MAAM,WAAgC;CACvC"}
1
+ {"version":3,"file":"transaction-status.enum.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/enum/transaction-status.enum.ts"],"names":[],"mappings":"AAEA,oBAAY,iBAAiB;IAEzB,OAAO,YAA+B;IAGtC,UAAU,eAAgC;IAG1C,iBAAiB,sBAAiC;IAGlD,WAAW,gBAAgC;IAG3C,SAAS,cAAgC;IAGzC,MAAM,WAAgC;IAItC,SAAS,cAAgC;IAIzC,OAAO,YAA+B;CACvC"}
@@ -11,5 +11,11 @@ export var TransactionStatus;
11
11
  TransactionStatus["SUCCEEDED"] = "succeeded";
12
12
  // after transaction has failed
13
13
  TransactionStatus["FAILED"] = "failed";
14
+ // after transaction has been cancelled
15
+ // TODO : is it needed? & needs to be handled in the flows
16
+ TransactionStatus["CANCELLED"] = "cancelled";
17
+ // after transaction has expired
18
+ // TODO : is it needed? & needs to be handled in the flows
19
+ TransactionStatus["EXPIRED"] = "expired";
14
20
  })(TransactionStatus || (TransactionStatus = {}));
15
21
  //# sourceMappingURL=transaction-status.enum.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"transaction-status.enum.js","sourceRoot":"","sources":["../../../../src/shared-lib/enum/transaction-status.enum.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,iBAkBT;AAlBH,WAAY,iBAAiB;IAEzB,wCAAsC,CAAA;IAEtC,kCAAkC;IAClC,8CAA0C,CAAA;IAE1C,2CAA2C;IAC3C,4DAAkD,CAAA;IAElD,yCAAyC;IACzC,gDAA2C,CAAA;IAE3C,kCAAkC;IAClC,4CAAyC,CAAA;IAEzC,+BAA+B;IAC/B,sCAAsC,CAAA;AACxC,CAAC,EAlBS,iBAAiB,KAAjB,iBAAiB,QAkB1B"}
1
+ {"version":3,"file":"transaction-status.enum.js","sourceRoot":"","sources":["../../../../src/shared-lib/enum/transaction-status.enum.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,iBA0BT;AA1BH,WAAY,iBAAiB;IAEzB,wCAAsC,CAAA;IAEtC,kCAAkC;IAClC,8CAA0C,CAAA;IAE1C,2CAA2C;IAC3C,4DAAkD,CAAA;IAElD,yCAAyC;IACzC,gDAA2C,CAAA;IAE3C,kCAAkC;IAClC,4CAAyC,CAAA;IAEzC,+BAA+B;IAC/B,sCAAsC,CAAA;IAEtC,uCAAuC;IACvC,0DAA0D;IAC1D,4CAAyC,CAAA;IAEzC,gCAAgC;IAChC,0DAA0D;IAC1D,wCAAsC,CAAA;AACxC,CAAC,EA1BS,iBAAiB,KAAjB,iBAAiB,QA0B1B"}
@@ -18,17 +18,4 @@ export declare class TechnicalError extends HttpException {
18
18
  */
19
19
  static hidden(message: string, originalError?: Error, correlationId?: string): TechnicalError;
20
20
  }
21
- /**
22
- * Orchestration errors that wrap other errors but preserve business context
23
- */
24
- export declare class OrchestrationError extends HttpException {
25
- readonly operation: string;
26
- readonly originalError: Error;
27
- constructor(operation: string, originalError: Error);
28
- static isOrchestrationError(error: any): error is OrchestrationError;
29
- /**
30
- * Get the root business error if it exists
31
- */
32
- getRootBusinessError(): HttpException | null;
33
- }
34
21
  //# sourceMappingURL=technical-errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"technical-errors.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/errors/technical-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAI3D;;;GAGG;AACH,qBAAa,cAAe,SAAQ,aAAa;IAC/C,SAAgB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvC,SAAgB,aAAa,CAAC,EAAE,KAAK,CAAC;IACtC,SAAgB,eAAe,EAAE,OAAO,CAAC;gBAGvC,OAAO,EAAE,MAAM,EACf,aAAa,CAAC,EAAE,KAAK,EACrB,aAAa,CAAC,EAAE,MAAM,EACtB,UAAU,GAAE,UAA6C,EACzD,eAAe,GAAE,OAAc;IAs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,aAAa,CAAC,EAAE,MAAM,GAAG,cAAc;IAI3E;;OAEG;IACH,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,cAAc;CAG9F"}
@@ -40,48 +40,4 @@ export class TechnicalError extends HttpException {
40
40
  return new TechnicalError(message, originalError, correlationId, HttpStatus.INTERNAL_SERVER_ERROR, false);
41
41
  }
42
42
  }
43
- /**
44
- * Orchestration errors that wrap other errors but preserve business context
45
- */
46
- export class OrchestrationError extends HttpException {
47
- operation;
48
- originalError;
49
- constructor(operation, originalError) {
50
- // If the original error is a business error, preserve its HTTP status and message
51
- const isBusinessError = originalError instanceof HttpException;
52
- const status = isBusinessError ? originalError.getStatus() : HttpStatus.INTERNAL_SERVER_ERROR;
53
- const response = isBusinessError ? originalError.getResponse() : {
54
- code: CommonErrorCodes.ORCHESTRATION_ERROR,
55
- message: 'Operation failed',
56
- timestamp: new Date().toISOString(),
57
- category: 'ORCHESTRATION'
58
- };
59
- super(response, status);
60
- this.operation = operation;
61
- this.originalError = originalError;
62
- this.name = this.constructor.name;
63
- }
64
- static isOrchestrationError(error) {
65
- return error instanceof OrchestrationError;
66
- }
67
- /**
68
- * Get the root business error if it exists
69
- */
70
- getRootBusinessError() {
71
- let current = this.originalError;
72
- while (current) {
73
- if (current instanceof HttpException &&
74
- current.getResponse?.()?.category === 'DOMAIN_RULE') {
75
- return current;
76
- }
77
- if (current instanceof OrchestrationError) {
78
- current = current.originalError;
79
- }
80
- else {
81
- break;
82
- }
83
- }
84
- return null;
85
- }
86
- }
87
43
  //# sourceMappingURL=technical-errors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"technical-errors.js","sourceRoot":"","sources":["../../../../src/shared-lib/errors/technical-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,aAAa,EA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C,CAAC;iBAAM,CAAC;gBACN,MAAM;YACR,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
1
+ {"version":3,"file":"technical-errors.js","sourceRoot":"","sources":["../../../../src/shared-lib/errors/technical-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD;;;GAGG;AACH,MAAM,OAAO,cAAe,SAAQ,aAAa;IAC/B,aAAa,CAAU;IACvB,aAAa,CAAS;IACtB,eAAe,CAAU;IAEzC,YACE,OAAe,EACf,aAAqB,EACrB,aAAsB,EACtB,aAAyB,UAAU,CAAC,qBAAqB,EACzD,kBAA2B,IAAI;QAE/B,2EAA2E;QAC3E,MAAM,aAAa,GAAG,eAAe,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,8BAA8B,CAAC;QAEjF,KAAK,CACH;YACE,IAAI,EAAE,gBAAgB,CAAC,eAAe;YACtC,OAAO,EAAE,aAAa;YACtB,aAAa;YACb,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACnC,QAAQ,EAAE,aAAa,CAAC,SAAS;SAClC,EACD,UAAU,CACX,CAAC;QAEF,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IACpC,CAAC;IAED,MAAM,CAAC,gBAAgB,CAAC,KAAU;QAChC,OAAO,KAAK,YAAY,cAAc,CAAC;IACzC,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,WAAW,CAAC,OAAe,EAAE,aAAsB;QACxD,OAAO,IAAI,cAAc,CAAC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,CAAC,qBAAqB,EAAE,IAAI,CAAC,CAAC;IACvG,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,MAAM,CAAC,OAAe,EAAE,aAAqB,EAAE,aAAsB;QAC1E,OAAO,IAAI,cAAc,CAAC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,CAAC,qBAAqB,EAAE,KAAK,CAAC,CAAC;IAC5G,CAAC;CACF"}
@@ -1,15 +1,37 @@
1
- import { ApiKeyType } from "../enum/api-key-type.enum";
2
- type JWTPayloadSub = 'PERS-Auth-Token';
3
- export interface JWTPayload {
4
- sub: JWTPayloadSub | string;
5
- providerContextId?: string;
1
+ import { AccountOwnerType } from "../enum/owner-type.enum";
2
+ import { IntegrationApiKeyType, ApiKeyType, AuthApiKeyType, BlockchainApiKeyType } from "../enum/api-key-type.enum";
3
+ interface BaseJWTPayload {
4
+ sub: string;
6
5
  type: ApiKeyType;
7
6
  tenantId: string | null;
8
- transactionId?: string | null;
9
- userId: string | null;
10
- adminId: string | null;
11
- businessId?: string | null;
12
- permissions?: string[];
7
+ accountType?: AccountOwnerType;
8
+ }
9
+ export interface AuthJWTPayload extends BaseJWTPayload {
10
+ sub: string;
11
+ type: AuthApiKeyType | IntegrationApiKeyType;
12
+ tenantId: string | null;
13
+ accountType: AccountOwnerType;
14
+ apiKeyId: string | null;
15
+ providerContextId?: string;
16
+ }
17
+ export interface ActionableJWTPayload extends BaseJWTPayload {
18
+ sub: string;
19
+ type: AuthApiKeyType;
20
+ tenantId: string | null;
21
+ accountType: AccountOwnerType;
22
+ transactionId: string | null;
23
+ providerContextId?: string;
24
+ }
25
+ export interface BlockchainJWTPayload extends BaseJWTPayload {
26
+ sub: string;
27
+ type: BlockchainApiKeyType;
28
+ tenantId: string | null;
29
+ accountType?: AccountOwnerType;
30
+ permissions: string[];
13
31
  }
32
+ export type PersJWTPayload = AuthJWTPayload | ActionableJWTPayload | BlockchainJWTPayload;
33
+ export declare function isAuthPayload(payload: PersJWTPayload): payload is AuthJWTPayload;
34
+ export declare function isActionablePayload(payload: PersJWTPayload): payload is ActionableJWTPayload;
35
+ export declare function isBlockchainPayload(payload: PersJWTPayload): payload is BlockchainJWTPayload;
14
36
  export {};
15
37
  //# sourceMappingURL=jwt.payload.interface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jwt.payload.interface.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/interfaces/jwt.payload.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,KAAK,aAAa,GAAG,iBAAiB,CAAC;AAEvC,MAAM,WAAW,UAAU;IACvB,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB"}
1
+ {"version":3,"file":"jwt.payload.interface.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/interfaces/jwt.payload.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAwBpH,UAAU,cAAc;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,gBAAgB,CAAC;CAMlC;AAGD,MAAM,WAAW,cAAe,SAAQ,cAAc;IAClD,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,cAAc,GAAG,qBAAqB,CAAC;IAC7C,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAGD,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IACxD,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,cAAc,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,gBAAgB,CAAC;IAG9B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAGD,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IACxD,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,oBAAoB,CAAC;IAC3B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAG/B,WAAW,EAAE,MAAM,EAAE,CAAC;CACzB;AAOD,MAAM,MAAM,cAAc,GAAG,cAAc,GAAG,oBAAoB,GAAG,oBAAoB,CAAC;AAQ1F,wBAAgB,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,IAAI,cAAc,CAEhF;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,IAAI,oBAAoB,CAE5F;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,IAAI,oBAAoB,CAE5F"}
@@ -1,3 +1,14 @@
1
- ;
2
- export {};
1
+ // ===========================================
2
+ // TYPE GUARDS & UTILITIES
3
+ // ===========================================
4
+ // Type guards for specific payload types
5
+ export function isAuthPayload(payload) {
6
+ return !('permissionss' in payload) && !('transactionId' in payload);
7
+ }
8
+ export function isActionablePayload(payload) {
9
+ return 'transactionId' in payload && !('permissions' in payload);
10
+ }
11
+ export function isBlockchainPayload(payload) {
12
+ return 'permissions' in payload;
13
+ }
3
14
  //# sourceMappingURL=jwt.payload.interface.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"jwt.payload.interface.js","sourceRoot":"","sources":["../../../../src/shared-lib/interfaces/jwt.payload.interface.ts"],"names":[],"mappings":"AAeG,CAAC"}
1
+ {"version":3,"file":"jwt.payload.interface.js","sourceRoot":"","sources":["../../../../src/shared-lib/interfaces/jwt.payload.interface.ts"],"names":[],"mappings":"AA8EA,8CAA8C;AAC9C,0BAA0B;AAC1B,8CAA8C;AAG9C,yCAAyC;AACzC,MAAM,UAAU,aAAa,CAAC,OAAuB;IACjD,OAAO,CAAC,CAAC,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,eAAe,IAAI,OAAO,CAAC,CAAC;AACzE,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,OAAuB;IACvD,OAAO,eAAe,IAAI,OAAO,IAAI,CAAC,CAAC,aAAa,IAAI,OAAO,CAAC,CAAC;AACrE,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,OAAuB;IACvD,OAAO,aAAa,IAAI,OAAO,CAAC;AACpC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"account-selector.vo.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/value-objects/account-selector.vo.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAG5C,qBAAa,iBAAiB;IAGpB,WAAW,EAAE,gBAAgB,CAAC;IAI9B,SAAS,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AG,iBAAiB;IAQ1D,MAAM,CAAC,oBAAoB,CAAC,WAAW,EAAE,gBAAgB,CAAC,IAAI,GAAG,gBAAgB,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAG,iBAAiB;IAOjI;;;OAGG;IACH,MAAM,CAAC,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,iBAAiB;IAOrD;;;OAGG;IACH,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,iBAAiB;IAO3D;;;OAGG;IACH,MAAM,CAAC,YAAY,IAAI,iBAAiB;gBAO9B,IAAI,EAAE,eAAe;IAQjC;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAyB7B;;;OAGG;IACH,iBAAiB,IAAI,eAAe;CAgCrC"}
@@ -8,6 +8,7 @@ import { Type } from "class-transformer";
8
8
  import { IsEnum, IsNotEmpty, IsString, IsOptional, ValidateNested } from "class-validator";
9
9
  import { AccountOwnerType } from "./../enum";
10
10
  import { Address } from "./address.value-object";
11
+ import { ErrorFactory } from '../../shared-patterns/errors/error-factory';
11
12
  export class AccountSelectorVo {
12
13
  static fromDTO(selector) {
13
14
  // Create the appropriate AccountSelector based on accountType
@@ -16,7 +17,7 @@ export class AccountSelectorVo {
16
17
  case AccountOwnerType.USER:
17
18
  case AccountOwnerType.BUSINESS:
18
19
  if (!selector.accountId) {
19
- throw new Error(`${selector.accountType} account selector requires accountId`);
20
+ throw ErrorFactory.requiredField(`accountId for ${selector.accountType} account selector`);
20
21
  }
21
22
  accountSelectorData = {
22
23
  accountType: selector.accountType,
@@ -25,7 +26,7 @@ export class AccountSelectorVo {
25
26
  break;
26
27
  case AccountOwnerType.EXTERNAL:
27
28
  if (!selector.accountAddress) {
28
- throw new Error('External account selector requires accountAddress');
29
+ throw ErrorFactory.requiredField('accountAddress for external account selector');
29
30
  }
30
31
  accountSelectorData = {
31
32
  accountType: selector.accountType,
@@ -38,7 +39,8 @@ export class AccountSelectorVo {
38
39
  };
39
40
  break;
40
41
  default:
41
- throw new Error(`Unsupported account type: ${selector.accountType}`);
42
+ const accountTypeValue = selector.accountType === undefined ? 'undefined' : selector.accountType;
43
+ throw ErrorFactory.invalidInput('accountType', `Unsupported account type: ${accountTypeValue}. Supported types: ${Object.values(AccountOwnerType).join(', ')}`);
42
44
  }
43
45
  return new AccountSelectorVo(accountSelectorData);
44
46
  }
@@ -104,19 +106,20 @@ export class AccountSelectorVo {
104
106
  case AccountOwnerType.USER:
105
107
  case AccountOwnerType.BUSINESS:
106
108
  if (!this.accountId) {
107
- throw new Error(`${this.accountType} account selector requires accountId`);
109
+ throw ErrorFactory.requiredField(`accountId for ${this.accountType} account selector`);
108
110
  }
109
111
  break;
110
112
  case AccountOwnerType.EXTERNAL:
111
113
  if (!this.accountAddress) {
112
- throw new Error('External account selector requires accountAddress');
114
+ throw ErrorFactory.requiredField('accountAddress for external account selector');
113
115
  }
114
116
  break;
115
117
  case AccountOwnerType.TENANT:
116
118
  // Tenant context resolved from request - no validation needed
117
119
  break;
118
120
  default:
119
- throw new Error(`Unsupported account type: ${this.accountType}`);
121
+ const accountTypeValue = this.accountType === undefined ? 'undefined' : this.accountType;
122
+ throw ErrorFactory.invalidInput('accountType', `Unsupported account type: ${accountTypeValue}. Supported types: ${Object.values(AccountOwnerType).join(', ')}`);
120
123
  }
121
124
  }
122
125
  /**
@@ -128,7 +131,7 @@ export class AccountSelectorVo {
128
131
  case AccountOwnerType.USER:
129
132
  case AccountOwnerType.BUSINESS:
130
133
  if (!this.accountId) {
131
- throw new Error(`${this.accountType} account selector requires accountId`);
134
+ throw ErrorFactory.requiredField(`accountId for ${this.accountType} account selector`);
132
135
  }
133
136
  return {
134
137
  accountType: this.accountType,
@@ -136,7 +139,7 @@ export class AccountSelectorVo {
136
139
  };
137
140
  case AccountOwnerType.EXTERNAL:
138
141
  if (!this.accountAddress) {
139
- throw new Error('EXTERNAL account selector requires accountAddress');
142
+ throw ErrorFactory.requiredField('accountAddress for external account selector');
140
143
  }
141
144
  return {
142
145
  accountType: this.accountType,
@@ -148,7 +151,8 @@ export class AccountSelectorVo {
148
151
  accountType: this.accountType
149
152
  };
150
153
  default:
151
- throw new Error(`Unsupported account type: ${this.accountType}`);
154
+ const accountTypeValue = this.accountType === undefined ? 'undefined' : this.accountType;
155
+ throw ErrorFactory.invalidInput('accountType', `Unsupported account type: ${accountTypeValue}. Supported types: ${Object.values(AccountOwnerType).join(', ')}`);
152
156
  }
153
157
  }
154
158
  }
@@ -1 +1 @@
1
- {"version":3,"file":"account-selector.vo.js","sourceRoot":"","sources":["../../../../src/shared-lib/value-objects/account-selector.vo.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAIjD,MAAM,OAAO,iBAAiB;IAc5B,MAAM,CAAC,OAAO,CAAC,QAA4B;QACzC,8DAA8D;QAC9D,IAAI,mBAAoC,CAAC;QAEzC,QAAQ,QAAQ,CAAC,WAAW,EAAE,CAAC;YAC7B,KAAK,gBAAgB,CAAC,IAAI,CAAC;YAC3B,KAAK,gBAAgB,CAAC,QAAQ;gBAC5B,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;oBACxB,MAAM,IAAI,KAAK,CAAC,GAAG,QAAQ,CAAC,WAAW,sCAAsC,CAAC,CAAC;gBACjF,CAAC;gBACD,mBAAmB,GAAG;oBACpB,WAAW,EAAE,QAAQ,CAAC,WAAW;oBACjC,SAAS,EAAE,QAAQ,CAAC,SAAS;iBAC9B,CAAC;gBACF,MAAM;YAER,KAAK,gBAAgB,CAAC,QAAQ;gBAC5B,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC;oB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ot":"","sources":["../../../../src/shared-lib/value-objects/address.value-object.ts"],"names":[],"mappings":"AAEA,qBAAa,OAAO;IAChB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;gBAEnB,KAAK,EAAE,MAAM;IAOzB,QAAQ,IAAI,MAAM;IAIlB,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAI/B,OAAO,CAAC,cAAc;CAIvB"}
1
+ {"version":3,"file":"address.value-object.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/value-objects/address.value-object.ts"],"names":[],"mappings":"AAIA,qBAAa,OAAO;IAChB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;gBAEnB,KAAK,EAAE,MAAM;IAOzB,QAAQ,IAAI,MAAM;IAIlB,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAI/B,OAAO,CAAC,cAAc;CAIvB"}
@@ -1,8 +1,9 @@
1
+ import { ErrorFactory } from '../../shared-patterns/errors/error-factory';
1
2
  export class Address {
2
3
  value;
3
4
  constructor(value) {
4
5
  if (!this.isValidAddress(value)) {
5
- throw new Error('Invalid address for value: ' + value);
6
+ throw ErrorFactory.invalidFormat('address', `Valid Ethereum address (0x + 40 hex characters). Received: "${value}" with length ${value?.length || 0}`);
6
7
  }
7
8
  this.value = value;
8
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"address.value-object.js","sourceRoot":"","sources":["../../../../src/shared-lib/value-objects/address.value-object.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,OAAO;IACC,KAAK,CAAS;IAE/B,YAAY,KAAa;QACvB,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,6BAA6B,GAAG,KAAK,CAAC,CAAC;QACzD,CAAC;QACD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,MAAM,CAAC,KAAc;QACnB,OAAO,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC;IACpC,CAAC;IAEO,cAAc,CAAC,KAAa;QAClC,yEAAyE;QACzE,OAAO,KAAK,CAAC,MAAM,KAAK,EAAE,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACvD,CAAC;CACF"}
1
+ {"version":3,"file":"address.value-object.js","sourceRoot":"","sources":["../../../../src/shared-lib/value-objects/address.value-object.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAE1E,MAAM,OAAO,OAAO;IACC,KAAK,CAAS;IAE/B,YAAY,KAAa;QACvB,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;YAChC,MAAM,YAAY,CAAC,aAAa,CAAC,SAAS,EAAE,+DAA+D,KAAK,iBAAiB,KAAK,EAAE,MAAM,IAAI,CAAC,EAAE,CAAC,CAAC;QACzJ,CAAC;QACD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,MAAM,CAAC,KAAc;QACnB,OAAO,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC;IACpC,CAAC;IAEO,cAAc,CAAC,KAAa;QAClC,yEAAyE;QACzE,OAAO,KAAK,CAAC,MAAM,KAAK,EAAE,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACvD,CAAC;CACF"}
@@ -0,0 +1,150 @@
1
+ import { UserNotFoundError, BusinessNotFoundError, TokenNotFoundError, TransactionNotFoundError, AuthenticationRequiredError, InvalidTokenError, TokenExpiredError, AuthorizationFailedError, InsufficientBalanceError, InvalidInputError, RequiredFieldError, InvalidFormatError, SystemError, ExternalServiceError, ConfigurationMissingError, TokenNotActiveError, TokenIdRequiredError, TokenTypeNotFoundError, TokenUnitNotFoundError, TransactionAlreadyCompletedError, TransactionNotPendingError, TransactionValidationError, SigningAccountValidationError, SigningAccountNotFoundError, SigningAccountAlreadyExistsError, KeyGenerationError, CampaignNotFoundError, GeographicRestrictionError, LocationVerificationRequiredError, RedemptionLimitReachedError, UserStatusRestrictedError, WalletNotFoundError, WalletMissingSigningError, SmartWalletProcessingError, BusinessNotMinterError, UnexpectedValidationScenarioError } from '../../shared-lib/errors';
2
+ /**
3
+ * Universal Error Factory for NestJS Applications
4
+ *
5
+ * This factory provides a clean, discoverable API for creating errors while
6
+ * maintaining the domain error classes as the single source of truth.
7
+ *
8
+ * Architecture:
9
+ * - Domain files define canonical error classes (exported as types for frontend)
10
+ * - Factory methods instantiate these domain classes (no duplication)
11
+ * - NestJS apps use factory for clean developer experience
12
+ * - Frontend devs import types from domain classes
13
+ */
14
+ export declare class ErrorFactory {
15
+ /**
16
+ * Resource "not found" patterns
17
+ * Uses domain classes internally for consistency
18
+ */
19
+ static userNotFound(identifier: string): UserNotFoundError;
20
+ static businessNotFound(identifier: string): BusinessNotFoundError;
21
+ static tokenNotFound(tokenId: string): TokenNotFoundError;
22
+ static transactionNotFound(transactionId: string): TransactionNotFoundError;
23
+ static campaignNotFound(campaignId: string): CampaignNotFoundError;
24
+ static tokenUnitNotFound(tokenUnitId?: string): TokenUnitNotFoundError;
25
+ /**
26
+ * Authentication & Authorization patterns
27
+ */
28
+ static authRequired(resource?: string): AuthenticationRequiredError;
29
+ static invalidToken(reason?: string): InvalidTokenError;
30
+ static tokenExpired(): TokenExpiredError;
31
+ static forbidden(action: string, resource: string): AuthorizationFailedError;
32
+ /**
33
+ * Business rule patterns
34
+ */
35
+ static geographicRestriction(countryCode: string, resource?: string): GeographicRestrictionError;
36
+ static locationRequired(resource?: string): LocationVerificationRequiredError;
37
+ static limitReached(limitType: 'max_redemption' | 'user_limit'): RedemptionLimitReachedError;
38
+ static userStatusRestricted(): UserStatusRestrictedError;
39
+ /**
40
+ * Validation patterns
41
+ */
42
+ static invalidInput(field: string, reason?: string): InvalidInputError;
43
+ static requiredField(field: string): RequiredFieldError;
44
+ static invalidFormat(field: string, expectedFormat: string): InvalidFormatError;
45
+ /**
46
+ * Financial/Balance patterns
47
+ */
48
+ static insufficientBalance(required: string, available: string): InsufficientBalanceError;
49
+ /**
50
+ * Technical/Infrastructure patterns
51
+ */
52
+ static systemError(operation: string, details: string): SystemError;
53
+ static externalServiceError(serviceName: string, operation: string): ExternalServiceError;
54
+ static configMissing(configKey: string): ConfigurationMissingError;
55
+ /**
56
+ * Token-specific patterns
57
+ */
58
+ static tokenNotActive(tokenId: string): TokenNotActiveError;
59
+ static tokenIdRequired(tokenType: string): TokenIdRequiredError;
60
+ static tokenTypeNotFound(tokenType: string): TokenTypeNotFoundError;
61
+ /**
62
+ * Transaction-specific patterns
63
+ */
64
+ static transactionAlreadyCompleted(transactionId: string, currentStatus: string): TransactionAlreadyCompletedError;
65
+ static transactionNotPending(transactionId: string, currentStatus: string): TransactionNotPendingError;
66
+ static transactionValidation(field: string, reason: string): TransactionValidationError;
67
+ /**
68
+ * Signing account patterns
69
+ */
70
+ static signingAccountValidation(field: string, reason: string): SigningAccountValidationError;
71
+ static signingAccountNotFound(identifier: string): SigningAccountNotFoundError;
72
+ static signingAccountAlreadyExists(accountAddress: string): SigningAccountAlreadyExistsError;
73
+ static keyGeneration(reason: string): KeyGenerationError;
74
+ /**
75
+ * Wallet patterns
76
+ */
77
+ static walletNotFound(ownerAddress: string): WalletNotFoundError;
78
+ static walletMissingSigning(walletAddress: string, reason: string): WalletMissingSigningError;
79
+ static smartWalletProcessing(reason: string): SmartWalletProcessingError;
80
+ /**
81
+ * Business patterns
82
+ */
83
+ static businessNotMinter(businessId: string, tokenAddress: string): BusinessNotMinterError;
84
+ /**
85
+ * Validation patterns
86
+ */
87
+ static unexpectedValidationScenario(context: string): UnexpectedValidationScenarioError;
88
+ }
89
+ /**
90
+ * Convenient shortcut object for the most commonly used error patterns
91
+ * Provides clean, discoverable API for NestJS applications
92
+ */
93
+ export declare const Errors: {
94
+ userNotFound: (id: string) => UserNotFoundError;
95
+ businessNotFound: (id: string) => BusinessNotFoundError;
96
+ tokenNotFound: (id: string) => TokenNotFoundError;
97
+ tokenUnitNotFound: (id?: string) => TokenUnitNotFoundError;
98
+ transactionNotFound: (id: string) => TransactionNotFoundError;
99
+ campaignNotFound: (id: string) => CampaignNotFoundError;
100
+ authRequired: (resource?: string) => AuthenticationRequiredError;
101
+ invalidToken: (reason?: string) => InvalidTokenError;
102
+ tokenExpired: () => TokenExpiredError;
103
+ forbidden: (action: string, resource: string) => AuthorizationFailedError;
104
+ geographicRestriction: (countryCode: string, resource?: string) => GeographicRestrictionError;
105
+ locationRequired: (resource?: string) => LocationVerificationRequiredError;
106
+ limitReached: (limitType: "max_redemption" | "user_limit") => RedemptionLimitReachedError;
107
+ userStatusRestricted: () => UserStatusRestrictedError;
108
+ invalidInput: (field: string, reason?: string) => InvalidInputError;
109
+ requiredField: (field: string) => RequiredFieldError;
110
+ invalidFormat: (field: string, format: string) => InvalidFormatError;
111
+ insufficientBalance: (required: string, available: string) => InsufficientBalanceError;
112
+ systemError: (operation: string, details: string) => SystemError;
113
+ externalServiceError: (service: string, operation: string) => ExternalServiceError;
114
+ configMissing: (key: string) => ConfigurationMissingError;
115
+ tokenNotActive: (id: string) => TokenNotActiveError;
116
+ tokenIdRequired: (type: string) => TokenIdRequiredError;
117
+ tokenTypeNotFound: (type: string) => TokenTypeNotFoundError;
118
+ transactionAlreadyCompleted: (id: string, status: string) => TransactionAlreadyCompletedError;
119
+ transactionNotPending: (id: string, status: string) => TransactionNotPendingError;
120
+ transactionValidation: (field: string, reason: string) => TransactionValidationError;
121
+ signingAccountValidation: (field: string, reason: string) => SigningAccountValidationError;
122
+ signingAccountNotFound: (id: string) => SigningAccountNotFoundError;
123
+ signingAccountAlreadyExists: (address: string) => SigningAccountAlreadyExistsError;
124
+ keyGeneration: (reason: string) => KeyGenerationError;
125
+ walletNotFound: (address: string) => WalletNotFoundError;
126
+ walletMissingSigning: (address: string, reason: string) => WalletMissingSigningError;
127
+ smartWalletProcessing: (reason: string) => SmartWalletProcessingError;
128
+ businessNotMinter: (businessId: string, tokenAddress: string) => BusinessNotMinterError;
129
+ unexpectedValidationScenario: (context: string) => UnexpectedValidationScenarioError;
130
+ };
131
+ /**
132
+ * Advanced Error Builder for complex scenarios
133
+ * Still references domain classes when possible
134
+ */
135
+ export declare class ErrorBuilder {
136
+ private config;
137
+ static create(): ErrorBuilder;
138
+ /**
139
+ * Use a specific domain error class
140
+ */
141
+ useClass(errorClass: any, ...params: any[]): ErrorBuilder;
142
+ /**
143
+ * Build the error instance
144
+ */
145
+ build(): Error;
146
+ buildUserNotFound(id: string): UserNotFoundError;
147
+ buildBusinessNotFound(id: string): BusinessNotFoundError;
148
+ buildAuthRequired(resource: string): AuthenticationRequiredError;
149
+ }
150
+ //# sourceMappingURL=error-factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-factory.d.ts","sourceRoot":"","sources":["../../../../src/shared-patterns/errors/error-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,wBAAwB,EACxB,2BAA2B,EAC3B,iBAAiB,EACjB,iBAAiB,EACjB,wBAAwB,EACxB,wBAAwB,EACxB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,oBAAoB,EACpB,yBAAyB,EACzB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,gCAAgC,EAChC,0BAA0B,EAC1B,0BAA0B,EAC1B,6BAA6B,EAC7B,2BAA2B,EAC3B,gCAAgC,EAChC,kBAAkB,EAClB,qBAAqB,EACrB,0BAA0B,EAC1B,iCAAiC,EACjC,2BAA2B,EAC3B,yBAAyB,EACzB,mBAAmB,EACnB,yBAAyB,EACzB,0BAA0B,EAC1B,sBAAsB,EACtB,iCAAiC,EAElC,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