@cranberry-money/shared-services 4.0.0 → 4.1.0

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 (100) hide show
  1. package/package.json +4 -3
  2. package/dist/api/functional-client.d.ts +0 -66
  3. package/dist/api/functional-client.d.ts.map +0 -1
  4. package/dist/api/functional-client.js +0 -165
  5. package/dist/auth/functional/auth-operations.d.ts +0 -116
  6. package/dist/auth/functional/auth-operations.d.ts.map +0 -1
  7. package/dist/auth/functional/auth-operations.js +0 -246
  8. package/dist/auth/functional/auth-state.d.ts +0 -38
  9. package/dist/auth/functional/auth-state.d.ts.map +0 -1
  10. package/dist/auth/functional/auth-state.js +0 -87
  11. package/dist/auth/functional/token-storage.d.ts +0 -44
  12. package/dist/auth/functional/token-storage.d.ts.map +0 -1
  13. package/dist/auth/functional/token-storage.js +0 -178
  14. package/dist/auth/react/AuthProvider.d.ts +0 -92
  15. package/dist/auth/react/AuthProvider.d.ts.map +0 -1
  16. package/dist/auth/react/AuthProvider.js +0 -207
  17. package/dist/integration/blueberry-integration.d.ts +0 -21
  18. package/dist/integration/blueberry-integration.d.ts.map +0 -1
  19. package/dist/integration/blueberry-integration.js +0 -109
  20. package/dist/integration/index.d.ts +0 -8
  21. package/dist/integration/index.d.ts.map +0 -1
  22. package/dist/integration/index.js +0 -18
  23. package/dist/services/accounts.d.ts +0 -220
  24. package/dist/services/accounts.d.ts.map +0 -1
  25. package/dist/services/accounts.js +0 -175
  26. package/dist/services/banks.d.ts +0 -123
  27. package/dist/services/banks.d.ts.map +0 -1
  28. package/dist/services/banks.js +0 -151
  29. package/dist/services/cash-accounts.d.ts +0 -112
  30. package/dist/services/cash-accounts.d.ts.map +0 -1
  31. package/dist/services/cash-accounts.js +0 -222
  32. package/dist/services/documents.d.ts +0 -143
  33. package/dist/services/documents.d.ts.map +0 -1
  34. package/dist/services/documents.js +0 -253
  35. package/dist/services/factories/account-factory.d.ts +0 -16
  36. package/dist/services/factories/account-factory.d.ts.map +0 -1
  37. package/dist/services/factories/account-factory.js +0 -79
  38. package/dist/services/factories/auth-factory.d.ts +0 -23
  39. package/dist/services/factories/auth-factory.d.ts.map +0 -1
  40. package/dist/services/factories/auth-factory.js +0 -75
  41. package/dist/services/factories/bank-factory.d.ts +0 -16
  42. package/dist/services/factories/bank-factory.d.ts.map +0 -1
  43. package/dist/services/factories/bank-factory.js +0 -72
  44. package/dist/services/factories/cash-account-factory.d.ts +0 -16
  45. package/dist/services/factories/cash-account-factory.d.ts.map +0 -1
  46. package/dist/services/factories/cash-account-factory.js +0 -74
  47. package/dist/services/factories/document-factory.d.ts +0 -16
  48. package/dist/services/factories/document-factory.d.ts.map +0 -1
  49. package/dist/services/factories/document-factory.js +0 -85
  50. package/dist/services/factories/index.d.ts +0 -21
  51. package/dist/services/factories/index.d.ts.map +0 -1
  52. package/dist/services/factories/index.js +0 -40
  53. package/dist/services/factories/instrument-factory.d.ts +0 -16
  54. package/dist/services/factories/instrument-factory.d.ts.map +0 -1
  55. package/dist/services/factories/instrument-factory.js +0 -68
  56. package/dist/services/factories/master-factory.d.ts +0 -74
  57. package/dist/services/factories/master-factory.d.ts.map +0 -1
  58. package/dist/services/factories/master-factory.js +0 -183
  59. package/dist/services/factories/portfolio-factory.d.ts +0 -16
  60. package/dist/services/factories/portfolio-factory.d.ts.map +0 -1
  61. package/dist/services/factories/portfolio-factory.js +0 -74
  62. package/dist/services/factories/portfolio-template-factory.d.ts +0 -16
  63. package/dist/services/factories/portfolio-template-factory.d.ts.map +0 -1
  64. package/dist/services/factories/portfolio-template-factory.js +0 -76
  65. package/dist/services/factories/reference-data-factory.d.ts +0 -16
  66. package/dist/services/factories/reference-data-factory.d.ts.map +0 -1
  67. package/dist/services/factories/reference-data-factory.js +0 -86
  68. package/dist/services/factories/tax-residency-factory.d.ts +0 -16
  69. package/dist/services/factories/tax-residency-factory.d.ts.map +0 -1
  70. package/dist/services/factories/tax-residency-factory.js +0 -73
  71. package/dist/services/factories/trade-factory.d.ts +0 -16
  72. package/dist/services/factories/trade-factory.d.ts.map +0 -1
  73. package/dist/services/factories/trade-factory.js +0 -79
  74. package/dist/services/factories/types.d.ts +0 -250
  75. package/dist/services/factories/types.d.ts.map +0 -1
  76. package/dist/services/factories/types.js +0 -32
  77. package/dist/services/factories/withdrawal-factory.d.ts +0 -16
  78. package/dist/services/factories/withdrawal-factory.d.ts.map +0 -1
  79. package/dist/services/factories/withdrawal-factory.js +0 -78
  80. package/dist/services/instruments.d.ts +0 -138
  81. package/dist/services/instruments.d.ts.map +0 -1
  82. package/dist/services/instruments.js +0 -178
  83. package/dist/services/portfolio-templates.d.ts +0 -142
  84. package/dist/services/portfolio-templates.d.ts.map +0 -1
  85. package/dist/services/portfolio-templates.js +0 -201
  86. package/dist/services/portfolios.d.ts +0 -157
  87. package/dist/services/portfolios.d.ts.map +0 -1
  88. package/dist/services/portfolios.js +0 -144
  89. package/dist/services/reference-data.d.ts +0 -185
  90. package/dist/services/reference-data.d.ts.map +0 -1
  91. package/dist/services/reference-data.js +0 -245
  92. package/dist/services/tax-residencies.d.ts +0 -83
  93. package/dist/services/tax-residencies.d.ts.map +0 -1
  94. package/dist/services/tax-residencies.js +0 -179
  95. package/dist/services/trades.d.ts +0 -190
  96. package/dist/services/trades.d.ts.map +0 -1
  97. package/dist/services/trades.js +0 -207
  98. package/dist/services/withdrawals.d.ts +0 -236
  99. package/dist/services/withdrawals.d.ts.map +0 -1
  100. package/dist/services/withdrawals.js +0 -345
@@ -1,76 +0,0 @@
1
- "use strict";
2
- /**
3
- * Portfolio Template Service Factory
4
- *
5
- * Creates portfolio template services with proper dependency injection.
6
- * Includes templates, allocations, risk levels, and validation.
7
- */
8
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
- if (k2 === undefined) k2 = k;
10
- var desc = Object.getOwnPropertyDescriptor(m, k);
11
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
- desc = { enumerable: true, get: function() { return m[k]; } };
13
- }
14
- Object.defineProperty(o, k2, desc);
15
- }) : (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- o[k2] = m[k];
18
- }));
19
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
- Object.defineProperty(o, "default", { enumerable: true, value: v });
21
- }) : function(o, v) {
22
- o["default"] = v;
23
- });
24
- var __importStar = (this && this.__importStar) || (function () {
25
- var ownKeys = function(o) {
26
- ownKeys = Object.getOwnPropertyNames || function (o) {
27
- var ar = [];
28
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
- return ar;
30
- };
31
- return ownKeys(o);
32
- };
33
- return function (mod) {
34
- if (mod && mod.__esModule) return mod;
35
- var result = {};
36
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
- __setModuleDefault(result, mod);
38
- return result;
39
- };
40
- })();
41
- Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.createPortfolioTemplateServiceFactory = void 0;
43
- const PortfolioTemplateServices = __importStar(require("../portfolio-templates"));
44
- /**
45
- * Create portfolio template service factory
46
- *
47
- * @param coreDeps - Core dependencies (API client, etc.)
48
- * @param config - Service factory configuration
49
- * @returns Portfolio template service factory
50
- */
51
- const createPortfolioTemplateServiceFactory = (coreDeps, _config) => {
52
- // Validate dependencies
53
- if (!coreDeps.apiClient) {
54
- throw new Error('API client is required for portfolio template services');
55
- }
56
- return {
57
- // Template operations
58
- getPortfolioTemplates: (filters) => PortfolioTemplateServices.getPortfolioTemplates(coreDeps, filters),
59
- getPortfolioTemplate: (uuid) => PortfolioTemplateServices.getPortfolioTemplate(coreDeps, uuid),
60
- createPortfolioTemplate: (data) => PortfolioTemplateServices.createPortfolioTemplate(coreDeps, data),
61
- updatePortfolioTemplate: (uuid, data) => PortfolioTemplateServices.updatePortfolioTemplate(coreDeps, uuid, data),
62
- deletePortfolioTemplate: (uuid) => PortfolioTemplateServices.deletePortfolioTemplate(coreDeps, uuid),
63
- applyPortfolioTemplate: (templateUuid, portfolioUuid) => PortfolioTemplateServices.applyPortfolioTemplate(coreDeps, templateUuid, portfolioUuid),
64
- // Allocation operations
65
- getTemplateAllocations: (templateUuid) => PortfolioTemplateServices.getPortfolioTemplateAllocations(coreDeps, templateUuid),
66
- createTemplateAllocation: (data) => PortfolioTemplateServices.createTemplateAllocation(coreDeps, data),
67
- updateTemplateAllocation: (uuid, data) => PortfolioTemplateServices.updateTemplateAllocation(coreDeps, uuid, data),
68
- deleteTemplateAllocation: (uuid) => PortfolioTemplateServices.deleteTemplateAllocation(coreDeps, uuid),
69
- // Query operations
70
- getTemplatesByRiskLevel: (riskLevel) => PortfolioTemplateServices.getTemplatesByRiskLevel(coreDeps, riskLevel),
71
- getActiveTemplates: () => PortfolioTemplateServices.getActiveTemplates(coreDeps),
72
- // Validation
73
- validateAllocationPercentages: (allocations) => PortfolioTemplateServices.validateAllocationPercentages(allocations),
74
- };
75
- };
76
- exports.createPortfolioTemplateServiceFactory = createPortfolioTemplateServiceFactory;
@@ -1,16 +0,0 @@
1
- /**
2
- * Reference Data Service Factory
3
- *
4
- * Creates reference data services with proper dependency injection.
5
- * Includes countries, industries, sectors, and stock exchanges.
6
- */
7
- import type { ReferenceDataServiceFactory, CoreDependencies, ServiceFactoryConfig } from './types';
8
- /**
9
- * Create reference data service factory
10
- *
11
- * @param coreDeps - Core dependencies (API client, etc.)
12
- * @param config - Service factory configuration
13
- * @returns Reference data service factory
14
- */
15
- export declare const createReferenceDataServiceFactory: (coreDeps: CoreDependencies, _config: ServiceFactoryConfig) => ReferenceDataServiceFactory;
16
- //# sourceMappingURL=reference-data-factory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reference-data-factory.d.ts","sourceRoot":"","sources":["../../../src/services/factories/reference-data-factory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,2BAA2B,EAC3B,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAGjB;;;;;;GAMG;AACH,eAAO,MAAM,iCAAiC,GAC5C,UAAU,gBAAgB,EAC1B,SAAS,oBAAoB,KAC5B,2BA6DF,CAAC"}
@@ -1,86 +0,0 @@
1
- "use strict";
2
- /**
3
- * Reference Data Service Factory
4
- *
5
- * Creates reference data services with proper dependency injection.
6
- * Includes countries, industries, sectors, and stock exchanges.
7
- */
8
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
- if (k2 === undefined) k2 = k;
10
- var desc = Object.getOwnPropertyDescriptor(m, k);
11
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
- desc = { enumerable: true, get: function() { return m[k]; } };
13
- }
14
- Object.defineProperty(o, k2, desc);
15
- }) : (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- o[k2] = m[k];
18
- }));
19
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
- Object.defineProperty(o, "default", { enumerable: true, value: v });
21
- }) : function(o, v) {
22
- o["default"] = v;
23
- });
24
- var __importStar = (this && this.__importStar) || (function () {
25
- var ownKeys = function(o) {
26
- ownKeys = Object.getOwnPropertyNames || function (o) {
27
- var ar = [];
28
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
- return ar;
30
- };
31
- return ownKeys(o);
32
- };
33
- return function (mod) {
34
- if (mod && mod.__esModule) return mod;
35
- var result = {};
36
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
- __setModuleDefault(result, mod);
38
- return result;
39
- };
40
- })();
41
- Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.createReferenceDataServiceFactory = void 0;
43
- const ReferenceDataServices = __importStar(require("../reference-data"));
44
- /**
45
- * Create reference data service factory
46
- *
47
- * @param coreDeps - Core dependencies (API client, etc.)
48
- * @param config - Service factory configuration
49
- * @returns Reference data service factory
50
- */
51
- const createReferenceDataServiceFactory = (coreDeps, _config) => {
52
- // Validate dependencies
53
- if (!coreDeps.apiClient) {
54
- throw new Error('API client is required for reference data services');
55
- }
56
- return {
57
- // Country operations
58
- getCountries: (filters) => ReferenceDataServices.getCountries(coreDeps, filters),
59
- getCountry: (uuid) => ReferenceDataServices.getCountry(coreDeps, uuid),
60
- getAvailableCountries: (filters) => ReferenceDataServices.getAvailableCountries(coreDeps, filters),
61
- searchCountries: (searchTerm, filters) => ReferenceDataServices.searchCountries(coreDeps, searchTerm, filters),
62
- getCountryByCode: (code) => ReferenceDataServices.getCountryByCode(coreDeps, code),
63
- // Industry operations
64
- getIndustries: (filters) => ReferenceDataServices.getIndustries(coreDeps, filters),
65
- getIndustry: (uuid) => ReferenceDataServices.getIndustry(coreDeps, uuid),
66
- getActiveIndustries: (filters) => ReferenceDataServices.getActiveIndustries(coreDeps, filters),
67
- searchIndustries: (searchTerm, filters) => ReferenceDataServices.searchIndustries(coreDeps, searchTerm, filters),
68
- // Sector operations
69
- getSectors: (filters) => ReferenceDataServices.getSectors(coreDeps, filters),
70
- getSector: (uuid) => ReferenceDataServices.getSector(coreDeps, uuid),
71
- getSectorsByIndustry: (industryUuid, filters) => ReferenceDataServices.getSectorsByIndustry(coreDeps, industryUuid, filters),
72
- getActiveSectors: (filters) => ReferenceDataServices.getActiveSectors(coreDeps, filters),
73
- searchSectors: (searchTerm, filters) => ReferenceDataServices.searchSectors(coreDeps, searchTerm, filters),
74
- // Stock exchange operations
75
- getStockExchanges: (filters) => ReferenceDataServices.getStockExchanges(coreDeps, filters),
76
- getStockExchange: (uuid) => ReferenceDataServices.getStockExchange(coreDeps, uuid),
77
- getStockExchangesByCountry: (countryUuid, filters) => ReferenceDataServices.getStockExchangesByCountry(coreDeps, countryUuid, filters),
78
- getActiveStockExchanges: (filters) => ReferenceDataServices.getActiveStockExchanges(coreDeps, filters),
79
- searchStockExchanges: (searchTerm, filters) => ReferenceDataServices.searchStockExchanges(coreDeps, searchTerm, filters),
80
- getStockExchangeByCode: (code) => ReferenceDataServices.getStockExchangeByCode(coreDeps, code),
81
- // Utility operations
82
- getAllActiveReferenceData: () => ReferenceDataServices.getAllActiveReferenceData(coreDeps),
83
- getSectorsGroupedByIndustry: () => ReferenceDataServices.getSectorsGroupedByIndustry(coreDeps),
84
- };
85
- };
86
- exports.createReferenceDataServiceFactory = createReferenceDataServiceFactory;
@@ -1,16 +0,0 @@
1
- /**
2
- * Tax Residency Service Factory
3
- *
4
- * Creates tax residency services with proper dependency injection.
5
- * Includes tax residencies, user management, and country validation.
6
- */
7
- import type { TaxResidencyServiceFactory, CoreDependencies, ServiceFactoryConfig } from './types';
8
- /**
9
- * Create tax residency service factory
10
- *
11
- * @param coreDeps - Core dependencies (API client, etc.)
12
- * @param config - Service factory configuration
13
- * @returns Tax residency service factory
14
- */
15
- export declare const createTaxResidencyServiceFactory: (coreDeps: CoreDependencies, _config: ServiceFactoryConfig) => TaxResidencyServiceFactory;
16
- //# sourceMappingURL=tax-residency-factory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tax-residency-factory.d.ts","sourceRoot":"","sources":["../../../src/services/factories/tax-residency-factory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,0BAA0B,EAC1B,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAGjB;;;;;;GAMG;AACH,eAAO,MAAM,gCAAgC,GAC3C,UAAU,gBAAgB,EAC1B,SAAS,oBAAoB,KAC5B,0BAmCF,CAAC"}
@@ -1,73 +0,0 @@
1
- "use strict";
2
- /**
3
- * Tax Residency Service Factory
4
- *
5
- * Creates tax residency services with proper dependency injection.
6
- * Includes tax residencies, user management, and country validation.
7
- */
8
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
- if (k2 === undefined) k2 = k;
10
- var desc = Object.getOwnPropertyDescriptor(m, k);
11
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
- desc = { enumerable: true, get: function() { return m[k]; } };
13
- }
14
- Object.defineProperty(o, k2, desc);
15
- }) : (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- o[k2] = m[k];
18
- }));
19
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
- Object.defineProperty(o, "default", { enumerable: true, value: v });
21
- }) : function(o, v) {
22
- o["default"] = v;
23
- });
24
- var __importStar = (this && this.__importStar) || (function () {
25
- var ownKeys = function(o) {
26
- ownKeys = Object.getOwnPropertyNames || function (o) {
27
- var ar = [];
28
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
- return ar;
30
- };
31
- return ownKeys(o);
32
- };
33
- return function (mod) {
34
- if (mod && mod.__esModule) return mod;
35
- var result = {};
36
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
- __setModuleDefault(result, mod);
38
- return result;
39
- };
40
- })();
41
- Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.createTaxResidencyServiceFactory = void 0;
43
- const TaxResidencyServices = __importStar(require("../tax-residencies"));
44
- /**
45
- * Create tax residency service factory
46
- *
47
- * @param coreDeps - Core dependencies (API client, etc.)
48
- * @param config - Service factory configuration
49
- * @returns Tax residency service factory
50
- */
51
- const createTaxResidencyServiceFactory = (coreDeps, _config) => {
52
- // Validate dependencies
53
- if (!coreDeps.apiClient) {
54
- throw new Error('API client is required for tax residency services');
55
- }
56
- return {
57
- // Tax residency operations
58
- getTaxResidencies: (filters) => TaxResidencyServices.getTaxResidencies(coreDeps, filters),
59
- getTaxResidency: (uuid) => TaxResidencyServices.getTaxResidency(coreDeps, uuid),
60
- createTaxResidency: (data) => TaxResidencyServices.createTaxResidency(coreDeps, data),
61
- updateTaxResidency: (uuid, data) => TaxResidencyServices.updateTaxResidency(coreDeps, uuid, data),
62
- deleteTaxResidency: (uuid) => TaxResidencyServices.deleteTaxResidency(coreDeps, uuid),
63
- // Primary tax residency operations
64
- setPrimaryTaxResidency: (uuid) => TaxResidencyServices.setPrimaryTaxResidency(coreDeps, uuid),
65
- getPrimaryTaxResidency: (userProfileUuid) => TaxResidencyServices.getPrimaryTaxResidency(coreDeps, userProfileUuid),
66
- // User tax residency operations
67
- getUserTaxResidencies: (userProfileUuid) => TaxResidencyServices.getUserTaxResidencies(coreDeps, userProfileUuid),
68
- getActiveTaxResidencies: (userProfileUuid) => TaxResidencyServices.getActiveTaxResidencies(coreDeps, userProfileUuid),
69
- // Country-based operations
70
- getTaxResidenciesByCountry: (countryUuid, userProfileUuid) => TaxResidencyServices.getTaxResidenciesByCountry(coreDeps, countryUuid, userProfileUuid),
71
- };
72
- };
73
- exports.createTaxResidencyServiceFactory = createTaxResidencyServiceFactory;
@@ -1,16 +0,0 @@
1
- /**
2
- * Trade Service Factory
3
- *
4
- * Creates trade services with proper dependency injection.
5
- * Includes trades, trade sheets, target trades, and target trade sheets.
6
- */
7
- import type { TradeServiceFactory, CoreDependencies, ServiceFactoryConfig } from './types';
8
- /**
9
- * Create trade service factory
10
- *
11
- * @param coreDeps - Core dependencies (API client, etc.)
12
- * @param config - Service factory configuration
13
- * @returns Trade service factory
14
- */
15
- export declare const createTradeServiceFactory: (coreDeps: CoreDependencies, _config: ServiceFactoryConfig) => TradeServiceFactory;
16
- //# sourceMappingURL=trade-factory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"trade-factory.d.ts","sourceRoot":"","sources":["../../../src/services/factories/trade-factory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAGjB;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,GACpC,UAAU,gBAAgB,EAC1B,SAAS,oBAAoB,KAC5B,mBA+CF,CAAC"}
@@ -1,79 +0,0 @@
1
- "use strict";
2
- /**
3
- * Trade Service Factory
4
- *
5
- * Creates trade services with proper dependency injection.
6
- * Includes trades, trade sheets, target trades, and target trade sheets.
7
- */
8
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
- if (k2 === undefined) k2 = k;
10
- var desc = Object.getOwnPropertyDescriptor(m, k);
11
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
- desc = { enumerable: true, get: function() { return m[k]; } };
13
- }
14
- Object.defineProperty(o, k2, desc);
15
- }) : (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- o[k2] = m[k];
18
- }));
19
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
- Object.defineProperty(o, "default", { enumerable: true, value: v });
21
- }) : function(o, v) {
22
- o["default"] = v;
23
- });
24
- var __importStar = (this && this.__importStar) || (function () {
25
- var ownKeys = function(o) {
26
- ownKeys = Object.getOwnPropertyNames || function (o) {
27
- var ar = [];
28
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
- return ar;
30
- };
31
- return ownKeys(o);
32
- };
33
- return function (mod) {
34
- if (mod && mod.__esModule) return mod;
35
- var result = {};
36
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
- __setModuleDefault(result, mod);
38
- return result;
39
- };
40
- })();
41
- Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.createTradeServiceFactory = void 0;
43
- const TradeServices = __importStar(require("../trades"));
44
- /**
45
- * Create trade service factory
46
- *
47
- * @param coreDeps - Core dependencies (API client, etc.)
48
- * @param config - Service factory configuration
49
- * @returns Trade service factory
50
- */
51
- const createTradeServiceFactory = (coreDeps, _config) => {
52
- // Validate dependencies
53
- if (!coreDeps.apiClient) {
54
- throw new Error('API client is required for trade services');
55
- }
56
- return {
57
- // Trade operations
58
- getTrades: (filters) => TradeServices.getTrades(coreDeps, filters),
59
- getTrade: (uuid) => TradeServices.getTrade(coreDeps, uuid),
60
- // Trade sheet operations
61
- getTradeSheets: (filters) => TradeServices.getTradeSheets(coreDeps, filters),
62
- getTradeSheet: (uuid) => TradeServices.getTradeSheet(coreDeps, uuid),
63
- // Target trade operations
64
- getTargetTrades: (filters) => TradeServices.getTargetTrades(coreDeps, filters),
65
- getTargetTrade: (uuid) => TradeServices.getTargetTrade(coreDeps, uuid),
66
- createTargetTrade: (data) => TradeServices.createTargetTrade(coreDeps, data),
67
- updateTargetTrade: (uuid, data) => TradeServices.updateTargetTrade(coreDeps, uuid, data),
68
- deleteTargetTrade: (uuid) => TradeServices.deleteTargetTrade(coreDeps, uuid),
69
- // Target trade sheet operations
70
- getTargetTradeSheets: (filters) => TradeServices.getTargetTradeSheets(coreDeps, filters),
71
- getTargetTradeSheet: (uuid) => TradeServices.getTargetTradeSheet(coreDeps, uuid),
72
- createTargetTradeSheet: (data) => TradeServices.createTargetTradeSheet(coreDeps, data),
73
- updateTargetTradeSheet: (uuid, data) => TradeServices.updateTargetTradeSheet(coreDeps, uuid, data),
74
- deleteTargetTradeSheet: (uuid) => TradeServices.deleteTargetTradeSheet(coreDeps, uuid),
75
- approveTargetTradeSheet: (uuid) => TradeServices.approveTargetTradeSheet(coreDeps, uuid),
76
- cleanTargetTradeSheet: (uuid) => TradeServices.cleanTargetTradeSheet(coreDeps, uuid),
77
- };
78
- };
79
- exports.createTradeServiceFactory = createTradeServiceFactory;
@@ -1,250 +0,0 @@
1
- /**
2
- * Service Factory Types
3
- *
4
- * Types and interfaces for the service factory pattern with proper domain separation.
5
- * Each domain has its own factory interface for clean separation of concerns.
6
- */
7
- import React from 'react';
8
- import type { ApiClient } from '../../api/functional-client';
9
- import type { TokenStorage, AuthDependencies } from '../../auth/functional/auth-operations';
10
- import type * as PortfolioTypes from '../portfolios';
11
- import type * as AccountTypes from '../accounts';
12
- import type * as TradeTypes from '../trades';
13
- import type * as WithdrawalTypes from '../withdrawals';
14
- import type * as InstrumentTypes from '../instruments';
15
- import type * as CashAccountTypes from '../cash-accounts';
16
- import type * as BankTypes from '../banks';
17
- import type * as DocumentTypes from '../documents';
18
- import type * as PortfolioTemplateTypes from '../portfolio-templates';
19
- import type * as TaxResidencyTypes from '../tax-residencies';
20
- import type * as ReferenceDataTypes from '../reference-data';
21
- export interface PlatformConfig {
22
- readonly platform: 'web' | 'mobile';
23
- readonly apiBaseUrl: string;
24
- readonly apiTimeout?: number;
25
- readonly enableCredentials?: boolean;
26
- }
27
- export interface CoreDependencies {
28
- readonly apiClient: ApiClient;
29
- readonly tokenStorage: TokenStorage;
30
- }
31
- export interface ServiceFactoryConfig {
32
- readonly platform: PlatformConfig;
33
- readonly secureStore?: any;
34
- }
35
- export interface AuthServiceFactory {
36
- readonly createAuthDependencies: () => AuthDependencies;
37
- readonly createAuthProvider: (config?: {
38
- autoInitialize?: boolean;
39
- }) => React.ComponentType<{
40
- children: React.ReactNode;
41
- }>;
42
- }
43
- export interface PortfolioServiceFactory {
44
- readonly getPortfolios: (filters?: PortfolioTypes.PortfolioFilters) => Promise<PortfolioTypes.PaginatedPortfolios>;
45
- readonly getPortfolio: (uuid: string) => Promise<PortfolioTypes.Portfolio>;
46
- readonly createPortfolio: (data: PortfolioTypes.CreatePortfolioPayload) => Promise<PortfolioTypes.Portfolio>;
47
- readonly updatePortfolio: (uuid: string, data: PortfolioTypes.UpdatePortfolioPayload) => Promise<PortfolioTypes.Portfolio>;
48
- readonly deletePortfolio: (uuid: string) => Promise<void>;
49
- readonly getPortfolioAllocations: (portfolioUuid: string) => Promise<PortfolioTypes.AssetAllocation[]>;
50
- readonly createAssetAllocation: (data: PortfolioTypes.AssetAllocationPayload) => Promise<PortfolioTypes.AssetAllocation>;
51
- readonly updateAssetAllocation: (uuid: string, data: Partial<PortfolioTypes.AssetAllocationPayload>) => Promise<PortfolioTypes.AssetAllocation>;
52
- readonly deleteAssetAllocation: (uuid: string) => Promise<void>;
53
- readonly getPortfolioHoldings: (portfolioUuid: string, orderBy?: string) => Promise<PortfolioTypes.AssetHolding[]>;
54
- readonly getAssetHoldings: (filters?: PortfolioTypes.AssetHoldingFilters) => Promise<PortfolioTypes.PaginatedAssetHoldings>;
55
- readonly getAssetHolding: (uuid: string) => Promise<PortfolioTypes.AssetHolding>;
56
- readonly generateRebalancingTrades: (portfolioUuid: string) => Promise<PortfolioTypes.RebalancingTradesGenerationResponse>;
57
- }
58
- export interface AccountServiceFactory {
59
- readonly getUserProfile: () => Promise<AccountTypes.User>;
60
- readonly updateUserProfile: (data: AccountTypes.UpdateProfilePayload) => Promise<AccountTypes.User>;
61
- readonly deleteUserAccount: () => Promise<void>;
62
- readonly getUserProfiles: () => Promise<AccountTypes.PaginatedUserProfiles>;
63
- readonly createUserProfile: (data: AccountTypes.UpdateProfilePayload) => Promise<AccountTypes.UserProfile>;
64
- readonly updateUserProfileById: (uuid: string, data: AccountTypes.UpdateProfilePayload) => Promise<AccountTypes.UserProfile>;
65
- readonly updateUserProfileCompletion: (uuid: string, data: AccountTypes.UserProfileCompletionPayload) => Promise<AccountTypes.UserProfile>;
66
- readonly getAccounts: () => Promise<AccountTypes.PaginatedAccounts>;
67
- readonly getUserAccounts: () => Promise<AccountTypes.Account[]>;
68
- readonly getAccount: (uuid: string) => Promise<AccountTypes.Account>;
69
- readonly createAccount: (data: AccountTypes.CreateAccountPayload) => Promise<AccountTypes.Account>;
70
- readonly updateAccount: (uuid: string, data: AccountTypes.UpdateAccountPayload) => Promise<AccountTypes.Account>;
71
- readonly getInvestmentPreferences: () => Promise<AccountTypes.PaginatedInvestmentPreferences>;
72
- readonly getInvestmentPreference: (uuid: string) => Promise<AccountTypes.InvestmentPreference>;
73
- readonly createInvestmentPreference: (data: AccountTypes.CreateInvestmentPreferencePayload) => Promise<AccountTypes.InvestmentPreference>;
74
- readonly updateInvestmentPreference: (uuid: string, data: AccountTypes.UpdateInvestmentPreferencePayload) => Promise<AccountTypes.InvestmentPreference>;
75
- readonly deleteInvestmentPreference: (uuid: string) => Promise<void>;
76
- }
77
- export interface TradeServiceFactory {
78
- readonly getTrades: (filters?: TradeTypes.TradeFilters) => Promise<TradeTypes.PaginatedTrades>;
79
- readonly getTrade: (uuid: string) => Promise<TradeTypes.Trade>;
80
- readonly getTradeSheets: (filters?: TradeTypes.TradeSheetFilters) => Promise<TradeTypes.PaginatedTradeSheets>;
81
- readonly getTradeSheet: (uuid: string) => Promise<TradeTypes.TradeSheet>;
82
- readonly getTargetTrades: (filters?: TradeTypes.TargetTradeFilters) => Promise<TradeTypes.PaginatedTargetTrades>;
83
- readonly getTargetTrade: (uuid: string) => Promise<TradeTypes.TargetTrade>;
84
- readonly createTargetTrade: (data: TradeTypes.TargetTradePayload) => Promise<TradeTypes.TargetTrade>;
85
- readonly updateTargetTrade: (uuid: string, data: TradeTypes.TargetTradePayload) => Promise<TradeTypes.TargetTrade>;
86
- readonly deleteTargetTrade: (uuid: string) => Promise<void>;
87
- readonly getTargetTradeSheets: (filters?: TradeTypes.TargetTradeSheetFilters) => Promise<TradeTypes.PaginatedTargetTradeSheets>;
88
- readonly getTargetTradeSheet: (uuid: string) => Promise<TradeTypes.TargetTradeSheet>;
89
- readonly createTargetTradeSheet: (data: TradeTypes.TargetTradeSheetPayload) => Promise<TradeTypes.TargetTradeSheet>;
90
- readonly updateTargetTradeSheet: (uuid: string, data: TradeTypes.TargetTradeSheetPayload) => Promise<TradeTypes.TargetTradeSheet>;
91
- readonly deleteTargetTradeSheet: (uuid: string) => Promise<void>;
92
- readonly approveTargetTradeSheet: (uuid: string) => Promise<TradeTypes.TargetTradeSheetApprovalResponse>;
93
- readonly cleanTargetTradeSheet: (uuid: string) => Promise<TradeTypes.TargetTradeSheetCleanResponse>;
94
- }
95
- export interface WithdrawalServiceFactory {
96
- readonly getWithdrawalRequests: (filters?: WithdrawalTypes.WithdrawalRequestFilters) => Promise<WithdrawalTypes.PaginatedWithdrawalRequests>;
97
- readonly getWithdrawalRequest: (uuid: string) => Promise<WithdrawalTypes.WithdrawalRequest>;
98
- readonly createWithdrawalRequest: (data: WithdrawalTypes.CreateWithdrawalRequestPayload) => Promise<WithdrawalTypes.WithdrawalRequest>;
99
- readonly updateWithdrawalRequest: (uuid: string, data: WithdrawalTypes.UpdateWithdrawalRequestPayload) => Promise<WithdrawalTypes.WithdrawalRequest>;
100
- readonly deleteWithdrawalRequest: (uuid: string) => Promise<void>;
101
- readonly approveWithdrawalRequest: (uuid: string) => Promise<WithdrawalTypes.WithdrawalRequest>;
102
- readonly rejectWithdrawalRequest: (uuid: string, reason?: string) => Promise<WithdrawalTypes.WithdrawalRequest>;
103
- readonly cancelWithdrawalRequest: (uuid: string) => Promise<WithdrawalTypes.WithdrawalRequest>;
104
- readonly processWithdrawalRequest: (uuid: string) => Promise<WithdrawalTypes.WithdrawalRequest>;
105
- readonly getWithdrawalLiquidations: (filters?: WithdrawalTypes.WithdrawalLiquidationFilters) => Promise<WithdrawalTypes.PaginatedWithdrawalLiquidations>;
106
- readonly getWithdrawalLiquidation: (uuid: string) => Promise<WithdrawalTypes.WithdrawalAssetLiquidation>;
107
- readonly createWithdrawalLiquidation: (data: WithdrawalTypes.CreateWithdrawalLiquidationPayload) => Promise<WithdrawalTypes.WithdrawalAssetLiquidation>;
108
- readonly updateWithdrawalLiquidation: (uuid: string, data: WithdrawalTypes.UpdateWithdrawalLiquidationPayload) => Promise<WithdrawalTypes.WithdrawalAssetLiquidation>;
109
- readonly deleteWithdrawalLiquidation: (uuid: string) => Promise<void>;
110
- readonly getLiquidationsByWithdrawalRequest: (withdrawalRequestUuid: string) => Promise<WithdrawalTypes.PaginatedWithdrawalLiquidations>;
111
- readonly createTradesForLiquidation: (uuid: string) => Promise<WithdrawalTypes.WithdrawalAssetLiquidation>;
112
- readonly executeLiquidationTrades: (uuid: string) => Promise<WithdrawalTypes.WithdrawalAssetLiquidation>;
113
- }
114
- export interface InstrumentServiceFactory {
115
- readonly getInstruments: (params?: InstrumentTypes.InstrumentsQueryParams) => Promise<InstrumentTypes.PaginatedInstruments>;
116
- readonly getInstrument: (uuid: string) => Promise<InstrumentTypes.Instrument>;
117
- readonly getInstrumentSnapshots: (instrumentUuid: string, filters?: InstrumentTypes.InstrumentSnapshotFilters) => Promise<InstrumentTypes.InstrumentSnapshot[]>;
118
- readonly searchInstruments: (searchTerm: string, additionalParams?: Omit<InstrumentTypes.InstrumentsQueryParams, 'search'>) => Promise<InstrumentTypes.PaginatedInstruments>;
119
- readonly getInstrumentsByExchange: (exchangeUuid: string, additionalParams?: Omit<InstrumentTypes.InstrumentsQueryParams, 'exchange_uuid'>) => Promise<InstrumentTypes.PaginatedInstruments>;
120
- readonly getETFs: (additionalParams?: Omit<InstrumentTypes.InstrumentsQueryParams, 'is_etf'>) => Promise<InstrumentTypes.PaginatedInstruments>;
121
- readonly getFunds: (additionalParams?: Omit<InstrumentTypes.InstrumentsQueryParams, 'is_fund'>) => Promise<InstrumentTypes.PaginatedInstruments>;
122
- readonly getBatchInstrumentSnapshots: (requests: InstrumentTypes.BatchInstrumentRequest[]) => Promise<InstrumentTypes.BatchInstrumentResult[]>;
123
- }
124
- export interface CashAccountServiceFactory {
125
- readonly getCashAccounts: (params?: CashAccountTypes.CashAccountQueryParams) => Promise<CashAccountTypes.PaginatedCashAccounts>;
126
- readonly getCashAccount: (uuid: string) => Promise<CashAccountTypes.CashAccount>;
127
- readonly getAccountCashAccounts: (accountUuid: string) => Promise<CashAccountTypes.PaginatedCashAccounts>;
128
- readonly getCashTransactions: (filters?: CashAccountTypes.CashTransactionFilters) => Promise<CashAccountTypes.PaginatedCashTransactions>;
129
- readonly getCashTransaction: (uuid: string) => Promise<CashAccountTypes.CashTransaction>;
130
- readonly createCashTransaction: (data: CashAccountTypes.CreateCashTransactionPayload) => Promise<CashAccountTypes.CashTransaction>;
131
- readonly getCashAccountTransactions: (cashAccountUuid: string, filters?: Omit<CashAccountTypes.CashTransactionFilters, 'cashAccount'>) => Promise<CashAccountTypes.PaginatedCashTransactions>;
132
- readonly getCashAccountBalance: (cashAccountUuid: string) => Promise<string>;
133
- readonly getCashAccountsByCurrency: (currency: CashAccountTypes.CurrencyCode, accountUuid?: string) => Promise<CashAccountTypes.PaginatedCashAccounts>;
134
- readonly getPendingTransactions: (cashAccountUuid?: string) => Promise<CashAccountTypes.PaginatedCashTransactions>;
135
- readonly getRecentTransactions: (cashAccountUuid: string, days?: number) => Promise<CashAccountTypes.PaginatedCashTransactions>;
136
- readonly getTransactionsByDateRange: (cashAccountUuid: string, fromDate: string, toDate: string) => Promise<CashAccountTypes.PaginatedCashTransactions>;
137
- }
138
- export interface BankServiceFactory {
139
- readonly getBankAccounts: (filters?: BankTypes.BankAccountFilters) => Promise<BankTypes.PaginatedBankAccounts>;
140
- readonly getBankAccount: (uuid: string) => Promise<BankTypes.BankAccount>;
141
- readonly createBankAccount: (data: BankTypes.CreateBankAccountPayload) => Promise<BankTypes.BankAccount>;
142
- readonly updateBankAccount: (uuid: string, data: BankTypes.UpdateBankAccountPayload) => Promise<BankTypes.BankAccount>;
143
- readonly deleteBankAccount: (uuid: string) => Promise<void>;
144
- readonly verifyBankAccount: (uuid: string) => Promise<BankTypes.BankAccount>;
145
- readonly setPrimaryBankAccount: (uuid: string) => Promise<BankTypes.BankAccount>;
146
- readonly getUserBankAccounts: (userProfileUuid: string) => Promise<BankTypes.PaginatedBankAccounts>;
147
- readonly getVerifiedBankAccounts: (userProfileUuid?: string) => Promise<BankTypes.PaginatedBankAccounts>;
148
- readonly getPrimaryBankAccount: (userProfileUuid: string) => Promise<BankTypes.BankAccount | null>;
149
- }
150
- export interface DocumentServiceFactory {
151
- readonly getDocuments: (filters?: DocumentTypes.DocumentFilters) => Promise<DocumentTypes.PaginatedDocuments>;
152
- readonly getDocument: (documentType: DocumentTypes.DocumentType, documentUuid: string) => Promise<DocumentTypes.Document>;
153
- readonly getMDADocuments: (filters?: Omit<DocumentTypes.DocumentFilters, 'documentType'>) => Promise<DocumentTypes.PaginatedDocuments>;
154
- readonly getMDADocument: (uuid: string) => Promise<DocumentTypes.Document>;
155
- readonly generateMDADocument: () => Promise<DocumentTypes.GenerateDocumentResponse>;
156
- readonly signMDADocument: (uuid: string) => Promise<DocumentTypes.SignDocumentResponse>;
157
- readonly getSOADocuments: (filters?: Omit<DocumentTypes.DocumentFilters, 'documentType'>) => Promise<DocumentTypes.PaginatedDocuments>;
158
- readonly getSOADocument: (uuid: string) => Promise<DocumentTypes.Document>;
159
- readonly generateSOADocument: (accountUuid: string, year: number, month: number) => Promise<DocumentTypes.GenerateDocumentResponse>;
160
- readonly signSOADocument: (uuid: string) => Promise<DocumentTypes.SignDocumentResponse>;
161
- readonly getAgreementDocuments: (filters?: Omit<DocumentTypes.DocumentFilters, 'documentType'>) => Promise<DocumentTypes.PaginatedDocuments>;
162
- readonly getAgreementDocument: (uuid: string) => Promise<DocumentTypes.Document>;
163
- readonly generateAgreementDocument: () => Promise<DocumentTypes.GenerateDocumentResponse>;
164
- readonly signAgreementDocument: (uuid: string) => Promise<DocumentTypes.SignDocumentResponse>;
165
- readonly signDocument: (documentType: DocumentTypes.DocumentType, documentUuid: string) => Promise<DocumentTypes.SignDocumentResponse>;
166
- readonly getSignedDocuments: (userProfileUuid?: string) => Promise<DocumentTypes.PaginatedDocuments>;
167
- readonly getUnsignedDocuments: (userProfileUuid?: string) => Promise<DocumentTypes.PaginatedDocuments>;
168
- }
169
- export interface PortfolioTemplateServiceFactory {
170
- readonly getPortfolioTemplates: (filters?: PortfolioTemplateTypes.PortfolioTemplateFilters) => Promise<PortfolioTemplateTypes.PaginatedPortfolioTemplates>;
171
- readonly getPortfolioTemplate: (uuid: string) => Promise<PortfolioTemplateTypes.PortfolioTemplate>;
172
- readonly createPortfolioTemplate: (data: PortfolioTemplateTypes.CreatePortfolioTemplatePayload) => Promise<PortfolioTemplateTypes.PortfolioTemplate>;
173
- readonly updatePortfolioTemplate: (uuid: string, data: PortfolioTemplateTypes.UpdatePortfolioTemplatePayload) => Promise<PortfolioTemplateTypes.PortfolioTemplate>;
174
- readonly deletePortfolioTemplate: (uuid: string) => Promise<void>;
175
- readonly applyPortfolioTemplate: (templateUuid: string, portfolioUuid: string) => Promise<PortfolioTemplateTypes.ApplyTemplateResponse>;
176
- readonly getTemplateAllocations: (templateUuid: string) => Promise<PortfolioTemplateTypes.TargetAssetAllocation[]>;
177
- readonly createTemplateAllocation: (data: PortfolioTemplateTypes.CreateTargetAllocationPayload) => Promise<PortfolioTemplateTypes.TargetAssetAllocation>;
178
- readonly updateTemplateAllocation: (uuid: string, data: Partial<PortfolioTemplateTypes.CreateTargetAllocationPayload>) => Promise<PortfolioTemplateTypes.TargetAssetAllocation>;
179
- readonly deleteTemplateAllocation: (uuid: string) => Promise<void>;
180
- readonly getTemplatesByRiskLevel: (riskLevel: PortfolioTemplateTypes.TemplateRiskLevel) => Promise<PortfolioTemplateTypes.PaginatedPortfolioTemplates>;
181
- readonly getActiveTemplates: () => Promise<PortfolioTemplateTypes.PaginatedPortfolioTemplates>;
182
- readonly validateAllocationPercentages: (allocations: PortfolioTemplateTypes.TargetAssetAllocation[]) => boolean;
183
- }
184
- export interface TaxResidencyServiceFactory {
185
- readonly getTaxResidencies: (filters?: TaxResidencyTypes.TaxResidencyFilters) => Promise<TaxResidencyTypes.PaginatedTaxResidencies>;
186
- readonly getTaxResidency: (uuid: string) => Promise<TaxResidencyTypes.TaxResidency>;
187
- readonly createTaxResidency: (data: TaxResidencyTypes.CreateTaxResidencyPayload) => Promise<TaxResidencyTypes.TaxResidency>;
188
- readonly updateTaxResidency: (uuid: string, data: TaxResidencyTypes.UpdateTaxResidencyPayload) => Promise<TaxResidencyTypes.TaxResidency>;
189
- readonly deleteTaxResidency: (uuid: string) => Promise<void>;
190
- readonly setPrimaryTaxResidency: (uuid: string) => Promise<TaxResidencyTypes.TaxResidency>;
191
- readonly getUserTaxResidencies: (userProfileUuid: string) => Promise<TaxResidencyTypes.PaginatedTaxResidencies>;
192
- readonly getActiveTaxResidencies: (userProfileUuid?: string) => Promise<TaxResidencyTypes.PaginatedTaxResidencies>;
193
- readonly getPrimaryTaxResidency: (userProfileUuid: string) => Promise<TaxResidencyTypes.TaxResidency | null>;
194
- readonly getTaxResidenciesByCountry: (countryUuid: string, userProfileUuid?: string) => Promise<TaxResidencyTypes.PaginatedTaxResidencies>;
195
- }
196
- export interface ReferenceDataServiceFactory {
197
- readonly getCountries: (filters?: ReferenceDataTypes.CountryFilters) => Promise<ReferenceDataTypes.PaginatedCountries>;
198
- readonly getCountry: (uuid: string) => Promise<ReferenceDataTypes.Country>;
199
- readonly getAvailableCountries: (filters?: Omit<ReferenceDataTypes.CountryFilters, 'isAvailable'>) => Promise<ReferenceDataTypes.PaginatedCountries>;
200
- readonly searchCountries: (searchTerm: string, filters?: Omit<ReferenceDataTypes.CountryFilters, 'search'>) => Promise<ReferenceDataTypes.PaginatedCountries>;
201
- readonly getCountryByCode: (code: string) => Promise<ReferenceDataTypes.Country | null>;
202
- readonly getIndustries: (filters?: ReferenceDataTypes.IndustryFilters) => Promise<ReferenceDataTypes.PaginatedIndustries>;
203
- readonly getIndustry: (uuid: string) => Promise<ReferenceDataTypes.Industry>;
204
- readonly getActiveIndustries: (filters?: Omit<ReferenceDataTypes.IndustryFilters, 'isActive'>) => Promise<ReferenceDataTypes.PaginatedIndustries>;
205
- readonly searchIndustries: (searchTerm: string, filters?: Omit<ReferenceDataTypes.IndustryFilters, 'search'>) => Promise<ReferenceDataTypes.PaginatedIndustries>;
206
- readonly getSectors: (filters?: ReferenceDataTypes.SectorFilters) => Promise<ReferenceDataTypes.PaginatedSectors>;
207
- readonly getSector: (uuid: string) => Promise<ReferenceDataTypes.Sector>;
208
- readonly getSectorsByIndustry: (industryUuid: string, filters?: Omit<ReferenceDataTypes.SectorFilters, 'industry'>) => Promise<ReferenceDataTypes.PaginatedSectors>;
209
- readonly getActiveSectors: (filters?: Omit<ReferenceDataTypes.SectorFilters, 'isActive'>) => Promise<ReferenceDataTypes.PaginatedSectors>;
210
- readonly searchSectors: (searchTerm: string, filters?: Omit<ReferenceDataTypes.SectorFilters, 'search'>) => Promise<ReferenceDataTypes.PaginatedSectors>;
211
- readonly getStockExchanges: (filters?: ReferenceDataTypes.StockExchangeFilters) => Promise<ReferenceDataTypes.PaginatedStockExchanges>;
212
- readonly getStockExchange: (uuid: string) => Promise<ReferenceDataTypes.StockExchange>;
213
- readonly getStockExchangesByCountry: (countryUuid: string, filters?: Omit<ReferenceDataTypes.StockExchangeFilters, 'country'>) => Promise<ReferenceDataTypes.PaginatedStockExchanges>;
214
- readonly getActiveStockExchanges: (filters?: Omit<ReferenceDataTypes.StockExchangeFilters, 'isActive'>) => Promise<ReferenceDataTypes.PaginatedStockExchanges>;
215
- readonly searchStockExchanges: (searchTerm: string, filters?: Omit<ReferenceDataTypes.StockExchangeFilters, 'search'>) => Promise<ReferenceDataTypes.PaginatedStockExchanges>;
216
- readonly getStockExchangeByCode: (code: string) => Promise<ReferenceDataTypes.StockExchange | null>;
217
- readonly getAllActiveReferenceData: () => Promise<{
218
- countries: ReferenceDataTypes.Country[];
219
- industries: ReferenceDataTypes.Industry[];
220
- sectors: ReferenceDataTypes.Sector[];
221
- stockExchanges: ReferenceDataTypes.StockExchange[];
222
- }>;
223
- readonly getSectorsGroupedByIndustry: () => Promise<Map<string, ReferenceDataTypes.Sector[]>>;
224
- }
225
- export interface ServiceFactory {
226
- readonly auth: AuthServiceFactory;
227
- readonly portfolio: PortfolioServiceFactory;
228
- readonly account: AccountServiceFactory;
229
- readonly trade: TradeServiceFactory;
230
- readonly withdrawal: WithdrawalServiceFactory;
231
- readonly instrument: InstrumentServiceFactory;
232
- readonly cashAccount: CashAccountServiceFactory;
233
- readonly bank: BankServiceFactory;
234
- readonly document: DocumentServiceFactory;
235
- readonly portfolioTemplate: PortfolioTemplateServiceFactory;
236
- readonly taxResidency: TaxResidencyServiceFactory;
237
- readonly referenceData: ReferenceDataServiceFactory;
238
- readonly config: ServiceFactoryConfig;
239
- }
240
- export declare class ServiceFactoryError extends Error {
241
- readonly cause?: unknown | undefined;
242
- constructor(message: string, cause?: unknown | undefined);
243
- }
244
- export declare class ConfigurationError extends ServiceFactoryError {
245
- constructor(message: string, cause?: unknown);
246
- }
247
- export declare class DependencyError extends ServiceFactoryError {
248
- constructor(message: string, cause?: unknown);
249
- }
250
- //# sourceMappingURL=types.d.ts.map