@vpdev2/metakyc-sdk 1.0.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 (191) hide show
  1. package/README.md +104 -0
  2. package/dist/client/config.d.ts +84 -0
  3. package/dist/client/config.d.ts.map +1 -0
  4. package/dist/client/endpoint-builder.d.ts +21 -0
  5. package/dist/client/endpoint-builder.d.ts.map +1 -0
  6. package/dist/client/error-handler.d.ts +36 -0
  7. package/dist/client/error-handler.d.ts.map +1 -0
  8. package/dist/client/http-client.d.ts +43 -0
  9. package/dist/client/http-client.d.ts.map +1 -0
  10. package/dist/client/index.d.ts +5 -0
  11. package/dist/client/index.d.ts.map +1 -0
  12. package/dist/components/CreateApplicantForm.d.ts +16 -0
  13. package/dist/components/CreateApplicantForm.d.ts.map +1 -0
  14. package/dist/components/KycWorkflow.d.ts +17 -0
  15. package/dist/components/KycWorkflow.d.ts.map +1 -0
  16. package/dist/components/Logo.d.ts +13 -0
  17. package/dist/components/Logo.d.ts.map +1 -0
  18. package/dist/components/core/Badge.d.ts +11 -0
  19. package/dist/components/core/Badge.d.ts.map +1 -0
  20. package/dist/components/core/Button.d.ts +12 -0
  21. package/dist/components/core/Button.d.ts.map +1 -0
  22. package/dist/components/core/Card.d.ts +22 -0
  23. package/dist/components/core/Card.d.ts.map +1 -0
  24. package/dist/components/core/FileUpload.d.ts +17 -0
  25. package/dist/components/core/FileUpload.d.ts.map +1 -0
  26. package/dist/components/core/Input.d.ts +14 -0
  27. package/dist/components/core/Input.d.ts.map +1 -0
  28. package/dist/components/core/PhoneInput.d.ts +11 -0
  29. package/dist/components/core/PhoneInput.d.ts.map +1 -0
  30. package/dist/components/core/Select.d.ts +19 -0
  31. package/dist/components/core/Select.d.ts.map +1 -0
  32. package/dist/components/core/Spinner.d.ts +10 -0
  33. package/dist/components/core/Spinner.d.ts.map +1 -0
  34. package/dist/components/core/index.d.ts +9 -0
  35. package/dist/components/core/index.d.ts.map +1 -0
  36. package/dist/components/identity/IdentityVerificationStep.d.ts +13 -0
  37. package/dist/components/identity/IdentityVerificationStep.d.ts.map +1 -0
  38. package/dist/components/identity/index.d.ts +2 -0
  39. package/dist/components/identity/index.d.ts.map +1 -0
  40. package/dist/components/index.d.ts +8 -0
  41. package/dist/components/index.d.ts.map +1 -0
  42. package/dist/components/status/KycStatusDisplay.d.ts +17 -0
  43. package/dist/components/status/KycStatusDisplay.d.ts.map +1 -0
  44. package/dist/components/status/index.d.ts +2 -0
  45. package/dist/components/status/index.d.ts.map +1 -0
  46. package/dist/components/steps/AppropriatenessTestStep.d.ts +13 -0
  47. package/dist/components/steps/AppropriatenessTestStep.d.ts.map +1 -0
  48. package/dist/components/steps/InvestorCategorizationStep.d.ts +13 -0
  49. package/dist/components/steps/InvestorCategorizationStep.d.ts.map +1 -0
  50. package/dist/components/steps/OverviewStep.d.ts +12 -0
  51. package/dist/components/steps/OverviewStep.d.ts.map +1 -0
  52. package/dist/components/steps/QuestionnaireStep.d.ts +12 -0
  53. package/dist/components/steps/QuestionnaireStep.d.ts.map +1 -0
  54. package/dist/components/steps/RiskScoringStep.d.ts +13 -0
  55. package/dist/components/steps/RiskScoringStep.d.ts.map +1 -0
  56. package/dist/components/steps/UploadDocumentStep.d.ts +12 -0
  57. package/dist/components/steps/UploadDocumentStep.d.ts.map +1 -0
  58. package/dist/components/steps/index.d.ts +7 -0
  59. package/dist/components/steps/index.d.ts.map +1 -0
  60. package/dist/context/MetaKYCContext.d.ts +30 -0
  61. package/dist/context/MetaKYCContext.d.ts.map +1 -0
  62. package/dist/context/MetaKYCProvider.d.ts +16 -0
  63. package/dist/context/MetaKYCProvider.d.ts.map +1 -0
  64. package/dist/context/index.d.ts +4 -0
  65. package/dist/context/index.d.ts.map +1 -0
  66. package/dist/context/useMetaKYC.d.ts +8 -0
  67. package/dist/context/useMetaKYC.d.ts.map +1 -0
  68. package/dist/hooks/index.d.ts +9 -0
  69. package/dist/hooks/index.d.ts.map +1 -0
  70. package/dist/hooks/useApplicant.d.ts +14 -0
  71. package/dist/hooks/useApplicant.d.ts.map +1 -0
  72. package/dist/hooks/useAppropriatenessTest.d.ts +15 -0
  73. package/dist/hooks/useAppropriatenessTest.d.ts.map +1 -0
  74. package/dist/hooks/useIdentityVerification.d.ts +16 -0
  75. package/dist/hooks/useIdentityVerification.d.ts.map +1 -0
  76. package/dist/hooks/useKycWorkflow.d.ts +27 -0
  77. package/dist/hooks/useKycWorkflow.d.ts.map +1 -0
  78. package/dist/hooks/useOverview.d.ts +14 -0
  79. package/dist/hooks/useOverview.d.ts.map +1 -0
  80. package/dist/hooks/useQuestionnaire.d.ts +14 -0
  81. package/dist/hooks/useQuestionnaire.d.ts.map +1 -0
  82. package/dist/hooks/useRiskScoring.d.ts +15 -0
  83. package/dist/hooks/useRiskScoring.d.ts.map +1 -0
  84. package/dist/hooks/useUploadDocument.d.ts +15 -0
  85. package/dist/hooks/useUploadDocument.d.ts.map +1 -0
  86. package/dist/identity/index.d.ts +6 -0
  87. package/dist/identity/index.d.ts.map +1 -0
  88. package/dist/identity/load-script.d.ts +13 -0
  89. package/dist/identity/load-script.d.ts.map +1 -0
  90. package/dist/identity/provider-manager.d.ts +20 -0
  91. package/dist/identity/provider-manager.d.ts.map +1 -0
  92. package/dist/identity/providers/onfido.d.ts +28 -0
  93. package/dist/identity/providers/onfido.d.ts.map +1 -0
  94. package/dist/identity/providers/sardin-ai.d.ts +56 -0
  95. package/dist/identity/providers/sardin-ai.d.ts.map +1 -0
  96. package/dist/identity/providers/sumsub.d.ts +36 -0
  97. package/dist/identity/providers/sumsub.d.ts.map +1 -0
  98. package/dist/index.cjs +19 -0
  99. package/dist/index.cjs.map +1 -0
  100. package/dist/index.d.ts +12 -0
  101. package/dist/index.d.ts.map +1 -0
  102. package/dist/index.js +4882 -0
  103. package/dist/index.js.map +1 -0
  104. package/dist/services/applicant.service.d.ts +64 -0
  105. package/dist/services/applicant.service.d.ts.map +1 -0
  106. package/dist/services/appropriateness-test.service.d.ts +20 -0
  107. package/dist/services/appropriateness-test.service.d.ts.map +1 -0
  108. package/dist/services/base-information.service.d.ts +27 -0
  109. package/dist/services/base-information.service.d.ts.map +1 -0
  110. package/dist/services/identity.service.d.ts +30 -0
  111. package/dist/services/identity.service.d.ts.map +1 -0
  112. package/dist/services/index.d.ts +11 -0
  113. package/dist/services/index.d.ts.map +1 -0
  114. package/dist/services/investor-categorization.service.d.ts +20 -0
  115. package/dist/services/investor-categorization.service.d.ts.map +1 -0
  116. package/dist/services/overview.service.d.ts +20 -0
  117. package/dist/services/overview.service.d.ts.map +1 -0
  118. package/dist/services/questionnaire.service.d.ts +20 -0
  119. package/dist/services/questionnaire.service.d.ts.map +1 -0
  120. package/dist/services/risk-scoring.service.d.ts +25 -0
  121. package/dist/services/risk-scoring.service.d.ts.map +1 -0
  122. package/dist/services/theme.service.d.ts +31 -0
  123. package/dist/services/theme.service.d.ts.map +1 -0
  124. package/dist/services/upload-document.service.d.ts +24 -0
  125. package/dist/services/upload-document.service.d.ts.map +1 -0
  126. package/dist/state/event-emitter.d.ts +27 -0
  127. package/dist/state/event-emitter.d.ts.map +1 -0
  128. package/dist/state/index.d.ts +5 -0
  129. package/dist/state/index.d.ts.map +1 -0
  130. package/dist/state/step-router.d.ts +45 -0
  131. package/dist/state/step-router.d.ts.map +1 -0
  132. package/dist/state/workflow-orchestrator.d.ts +58 -0
  133. package/dist/state/workflow-orchestrator.d.ts.map +1 -0
  134. package/dist/state/workflow-state.d.ts +108 -0
  135. package/dist/state/workflow-state.d.ts.map +1 -0
  136. package/dist/styles.css +1 -0
  137. package/dist/test/setup.d.ts +2 -0
  138. package/dist/test/setup.d.ts.map +1 -0
  139. package/dist/theme/index.d.ts +3 -0
  140. package/dist/theme/index.d.ts.map +1 -0
  141. package/dist/theme/presets.d.ts +35 -0
  142. package/dist/theme/presets.d.ts.map +1 -0
  143. package/dist/theme/theme-manager.d.ts +57 -0
  144. package/dist/theme/theme-manager.d.ts.map +1 -0
  145. package/dist/types/applicant.d.ts +135 -0
  146. package/dist/types/applicant.d.ts.map +1 -0
  147. package/dist/types/appropriateness-test.d.ts +70 -0
  148. package/dist/types/appropriateness-test.d.ts.map +1 -0
  149. package/dist/types/common.d.ts +76 -0
  150. package/dist/types/common.d.ts.map +1 -0
  151. package/dist/types/enums.d.ts +118 -0
  152. package/dist/types/enums.d.ts.map +1 -0
  153. package/dist/types/form-config.d.ts +18 -0
  154. package/dist/types/form-config.d.ts.map +1 -0
  155. package/dist/types/identity.d.ts +63 -0
  156. package/dist/types/identity.d.ts.map +1 -0
  157. package/dist/types/index.d.ts +14 -0
  158. package/dist/types/index.d.ts.map +1 -0
  159. package/dist/types/investor-categorization.d.ts +34 -0
  160. package/dist/types/investor-categorization.d.ts.map +1 -0
  161. package/dist/types/overview.d.ts +26 -0
  162. package/dist/types/overview.d.ts.map +1 -0
  163. package/dist/types/questionnaire.d.ts +83 -0
  164. package/dist/types/questionnaire.d.ts.map +1 -0
  165. package/dist/types/risk-scoring.d.ts +104 -0
  166. package/dist/types/risk-scoring.d.ts.map +1 -0
  167. package/dist/types/theme.d.ts +110 -0
  168. package/dist/types/theme.d.ts.map +1 -0
  169. package/dist/types/upload-document.d.ts +77 -0
  170. package/dist/types/upload-document.d.ts.map +1 -0
  171. package/dist/types/workflow.d.ts +71 -0
  172. package/dist/types/workflow.d.ts.map +1 -0
  173. package/dist/utils/cn.d.ts +6 -0
  174. package/dist/utils/cn.d.ts.map +1 -0
  175. package/dist/utils/file.d.ts +21 -0
  176. package/dist/utils/file.d.ts.map +1 -0
  177. package/dist/utils/index.d.ts +4 -0
  178. package/dist/utils/index.d.ts.map +1 -0
  179. package/dist/utils/storage.d.ts +43 -0
  180. package/dist/utils/storage.d.ts.map +1 -0
  181. package/dist/validation/appropriateness-schema.d.ts +13 -0
  182. package/dist/validation/appropriateness-schema.d.ts.map +1 -0
  183. package/dist/validation/index.d.ts +5 -0
  184. package/dist/validation/index.d.ts.map +1 -0
  185. package/dist/validation/questionnaire-schema.d.ts +17 -0
  186. package/dist/validation/questionnaire-schema.d.ts.map +1 -0
  187. package/dist/validation/risk-scoring-schema.d.ts +12 -0
  188. package/dist/validation/risk-scoring-schema.d.ts.map +1 -0
  189. package/dist/validation/upload-document-schema.d.ts +12 -0
  190. package/dist/validation/upload-document-schema.d.ts.map +1 -0
  191. package/package.json +87 -0
@@ -0,0 +1,64 @@
1
+ import { HttpClient } from '../client/http-client';
2
+ import { ApplicantRegistrationRequestInput, CompanyApplicantRegistrationRequestInput, ProgressApplicantResult, ProgressApplicantStatusResult, ApplicantDataDto, DuplicateApplicantInput } from '../types';
3
+
4
+ /**
5
+ * Applicant service
6
+ * Handles all applicant-related API calls
7
+ */
8
+ export declare class ApplicantService {
9
+ private httpClient;
10
+ constructor(httpClient: HttpClient);
11
+ /**
12
+ * Create a new individual applicant
13
+ */
14
+ createApplicant(input: ApplicantRegistrationRequestInput): Promise<ProgressApplicantResult>;
15
+ /**
16
+ * Create a new company applicant
17
+ */
18
+ createCompanyApplicant(input: CompanyApplicantRegistrationRequestInput): Promise<ProgressApplicantResult>;
19
+ /**
20
+ * Duplicate an existing applicant with a new workflow
21
+ */
22
+ duplicateApplicant(input: DuplicateApplicantInput): Promise<ProgressApplicantResult>;
23
+ /**
24
+ * Get applicant progress
25
+ */
26
+ getProgress(applicantId: number): Promise<ProgressApplicantResult>;
27
+ /**
28
+ * Get applicant progress status (simplified)
29
+ */
30
+ getProgressStatus(applicantId: number): Promise<ProgressApplicantStatusResult>;
31
+ /**
32
+ * Get applicant data
33
+ */
34
+ getApplicantData(applicantId: number): Promise<ApplicantDataDto>;
35
+ /**
36
+ * Get applicant status
37
+ */
38
+ getApplicantStatus(applicantId: number): Promise<any>;
39
+ /**
40
+ * Stop applicant progress
41
+ */
42
+ stopProgress(applicantId: number): Promise<void>;
43
+ /**
44
+ * Move back one step in the workflow
45
+ */
46
+ progressStepBack(applicantId: number): Promise<void>;
47
+ /**
48
+ * Set applicant language
49
+ */
50
+ setLanguage(applicantId: number, language: string): Promise<void>;
51
+ /**
52
+ * Activate applicant
53
+ */
54
+ activateApplicant(applicantId: number): Promise<void>;
55
+ /**
56
+ * Delete applicant
57
+ */
58
+ deleteApplicant(applicantId: number): Promise<void>;
59
+ /**
60
+ * Check if applicant exists by external reference ID
61
+ */
62
+ checkApplicantExists(externalRefId: string): Promise<boolean>;
63
+ }
64
+ //# sourceMappingURL=applicant.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applicant.service.d.ts","sourceRoot":"","sources":["../../src/services/applicant.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EACL,iCAAiC,EACjC,wCAAwC,EACxC,uBAAuB,EACvB,6BAA6B,EAC7B,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,UAAU,CAAC;AAElB;;;GAGG;AACH,qBAAa,gBAAgB;IACf,OAAO,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU;IAE1C;;OAEG;IACG,eAAe,CAAC,KAAK,EAAE,iCAAiC,GAAG,OAAO,CAAC,uBAAuB,CAAC;IASjG;;OAEG;IACG,sBAAsB,CAC1B,KAAK,EAAE,wCAAwC,GAC9C,OAAO,CAAC,uBAAuB,CAAC;IASnC;;OAEG;IACG,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAS1F;;OAEG;IACG,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC;IASxE;;OAEG;IACG,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,6BAA6B,CAAC;IASpF;;OAEG;IACG,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAStE;;OAEG;IACG,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAS3D;;OAEG;IACG,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAItD;;OAEG;IACG,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI1D;;OAEG;IACG,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOvE;;OAEG;IACG,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3D;;OAEG;IACG,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzD;;OAEG;IACG,oBAAoB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAQpE"}
@@ -0,0 +1,20 @@
1
+ import { HttpClient } from '../client/http-client';
2
+ import { AppropriatenessTestOutputDto, FillAppropriatenessTestInput, FillAppropriatenessTestResult } from '../types';
3
+
4
+ /**
5
+ * Appropriateness test service
6
+ * Handles appropriateness test-related API calls
7
+ */
8
+ export declare class AppropriatenessTestService {
9
+ private httpClient;
10
+ constructor(httpClient: HttpClient);
11
+ /**
12
+ * Get appropriateness test for an applicant
13
+ */
14
+ getAppropriatenessTest(applicantId: number): Promise<AppropriatenessTestOutputDto>;
15
+ /**
16
+ * Submit appropriateness test answers
17
+ */
18
+ fillAppropriatenessTest(input: FillAppropriatenessTestInput): Promise<FillAppropriatenessTestResult>;
19
+ }
20
+ //# sourceMappingURL=appropriateness-test.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appropriateness-test.service.d.ts","sourceRoot":"","sources":["../../src/services/appropriateness-test.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,6BAA6B,EAC9B,MAAM,UAAU,CAAC;AAElB;;;GAGG;AACH,qBAAa,0BAA0B;IACzB,OAAO,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU;IAE1C;;OAEG;IACG,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,4BAA4B,CAAC;IASxF;;OAEG;IACG,uBAAuB,CAC3B,KAAK,EAAE,4BAA4B,GAClC,OAAO,CAAC,6BAA6B,CAAC;CAQ1C"}
@@ -0,0 +1,27 @@
1
+ import { HttpClient } from '../client/http-client';
2
+ import { CountryDto, BranchDto, LegalEntityDto } from '../types';
3
+
4
+ /**
5
+ * Base information service
6
+ * Handles reference data API calls (countries, branches, legal entities)
7
+ */
8
+ export declare class BaseInformationService {
9
+ private httpClient;
10
+ constructor(httpClient: HttpClient);
11
+ /**
12
+ * Get all countries
13
+ * @param filter - Optional filter string
14
+ * @param lng - Language code (e.g., 'en', 'de')
15
+ * @param type - Optional country type filter
16
+ */
17
+ getCountries(filter?: string, lng?: string, type?: number): Promise<CountryDto[]>;
18
+ /**
19
+ * Get all branches
20
+ */
21
+ getBranches(): Promise<BranchDto[]>;
22
+ /**
23
+ * Get all legal entities
24
+ */
25
+ getLegalEntities(): Promise<LegalEntityDto[]>;
26
+ }
27
+ //# sourceMappingURL=base-information.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-information.service.d.ts","sourceRoot":"","sources":["../../src/services/base-information.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEjE;;;GAGG;AACH,qBAAa,sBAAsB;IACrB,OAAO,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU;IAE1C;;;;;OAKG;IACG,YAAY,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IASvF;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;IAQzC;;OAEG;IACG,gBAAgB,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC;CAOpD"}
@@ -0,0 +1,30 @@
1
+ import { HttpClient } from '../client/http-client';
2
+ import { IdentityRequest, ApplicantRegistrationRequestOutput } from '../types';
3
+
4
+ /**
5
+ * Identity service
6
+ * Handles identity verification-related API calls
7
+ */
8
+ export declare class IdentityService {
9
+ private httpClient;
10
+ constructor(httpClient: HttpClient);
11
+ /**
12
+ * Request identity verification for individual applicant
13
+ */
14
+ identityRequest(input: IdentityRequest): Promise<ApplicantRegistrationRequestOutput>;
15
+ /**
16
+ * Request identity verification for company applicant
17
+ */
18
+ identityCompanyRequest(input: IdentityRequest): Promise<ApplicantRegistrationRequestOutput>;
19
+ /**
20
+ * Restart identity verification (individual)
21
+ * Uses IdentityRequest with restart flag
22
+ */
23
+ restartIdentityRequest(applicantId: number): Promise<ApplicantRegistrationRequestOutput>;
24
+ /**
25
+ * Restart identity verification (company)
26
+ * Uses IdentityCompanyRequest with restart flag
27
+ */
28
+ restartIdentityCompanyRequest(applicantId: number): Promise<ApplicantRegistrationRequestOutput>;
29
+ }
30
+ //# sourceMappingURL=identity.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.service.d.ts","sourceRoot":"","sources":["../../src/services/identity.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,kCAAkC,EAAE,MAAM,UAAU,CAAC;AAE/E;;;GAGG;AACH,qBAAa,eAAe;IACd,OAAO,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU;IAE1C;;OAEG;IACG,eAAe,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,kCAAkC,CAAC;IAW1F;;OAEG;IACG,sBAAsB,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,kCAAkC,CAAC;IASjG;;;OAGG;IACG,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,kCAAkC,CAAC;IAW9F;;;OAGG;IACG,6BAA6B,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,kCAAkC,CAAC;CAStG"}
@@ -0,0 +1,11 @@
1
+ export * from './applicant.service';
2
+ export * from './questionnaire.service';
3
+ export * from './upload-document.service';
4
+ export * from './appropriateness-test.service';
5
+ export * from './overview.service';
6
+ export * from './risk-scoring.service';
7
+ export * from './identity.service';
8
+ export * from './base-information.service';
9
+ export * from './investor-categorization.service';
10
+ export * from './theme.service';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { HttpClient } from '../client/http-client';
2
+ import { InvestorCategorizationInput, SetInvestorCategorizationResult } from '../types';
3
+
4
+ /**
5
+ * Investor categorization service
6
+ * Handles investor categorization-related API calls
7
+ */
8
+ export declare class InvestorCategorizationService {
9
+ private httpClient;
10
+ constructor(httpClient: HttpClient);
11
+ /**
12
+ * Set investor categorization
13
+ */
14
+ setInvestorCategorization(input: InvestorCategorizationInput): Promise<SetInvestorCategorizationResult>;
15
+ /**
16
+ * Get investor categorization
17
+ */
18
+ getInvestorCategorization(applicantId: number): Promise<InvestorCategorizationInput>;
19
+ }
20
+ //# sourceMappingURL=investor-categorization.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"investor-categorization.service.d.ts","sourceRoot":"","sources":["../../src/services/investor-categorization.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,EAChC,MAAM,UAAU,CAAC;AAElB;;;GAGG;AACH,qBAAa,6BAA6B;IAC5B,OAAO,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU;IAE1C;;OAEG;IACG,yBAAyB,CAC7B,KAAK,EAAE,2BAA2B,GACjC,OAAO,CAAC,+BAA+B,CAAC;IAS3C;;OAEG;IACG,yBAAyB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,2BAA2B,CAAC;CAQ3F"}
@@ -0,0 +1,20 @@
1
+ import { HttpClient } from '../client/http-client';
2
+ import { OverviewDataDto } from '../types';
3
+
4
+ /**
5
+ * Overview service
6
+ * Handles overview step-related API calls
7
+ */
8
+ export declare class OverviewService {
9
+ private httpClient;
10
+ constructor(httpClient: HttpClient);
11
+ /**
12
+ * Get overview data for an applicant
13
+ */
14
+ getOverviewData(applicantId: number): Promise<OverviewDataDto>;
15
+ /**
16
+ * Pass the overview step
17
+ */
18
+ passOverview(applicantId: number): Promise<void>;
19
+ }
20
+ //# sourceMappingURL=overview.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overview.service.d.ts","sourceRoot":"","sources":["../../src/services/overview.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C;;;GAGG;AACH,qBAAa,eAAe;IACd,OAAO,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU;IAE1C;;OAEG;IACG,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IASpE;;OAEG;IACG,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGvD"}
@@ -0,0 +1,20 @@
1
+ import { HttpClient } from '../client/http-client';
2
+ import { QuestionnaireOutput, FillQuestionnarieInput, FillQuestionnairesResult } from '../types';
3
+
4
+ /**
5
+ * Questionnaire service
6
+ * Handles questionnaire-related API calls
7
+ */
8
+ export declare class QuestionnaireService {
9
+ private httpClient;
10
+ constructor(httpClient: HttpClient);
11
+ /**
12
+ * Get questionnaire for an applicant
13
+ */
14
+ getQuestionnaire(applicantId: number): Promise<QuestionnaireOutput>;
15
+ /**
16
+ * Submit questionnaire answers
17
+ */
18
+ fillQuestionnaire(input: FillQuestionnarieInput): Promise<FillQuestionnairesResult>;
19
+ }
20
+ //# sourceMappingURL=questionnaire.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"questionnaire.service.d.ts","sourceRoot":"","sources":["../../src/services/questionnaire.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,UAAU,CAAC;AAElB;;;GAGG;AACH,qBAAa,oBAAoB;IACnB,OAAO,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU;IAE1C;;OAEG;IACG,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;IASzE;;OAEG;IACG,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,wBAAwB,CAAC;CAQ1F"}
@@ -0,0 +1,25 @@
1
+ import { HttpClient } from '../client/http-client';
2
+ import { RiskCriteriaDto, RiskCalculationInput, RiskScoringResult, RiskScoringPlanDto } from '../types';
3
+
4
+ /**
5
+ * Risk scoring service
6
+ * Handles risk scoring-related API calls
7
+ */
8
+ export declare class RiskScoringService {
9
+ private httpClient;
10
+ constructor(httpClient: HttpClient);
11
+ /**
12
+ * Get risk scoring plan information
13
+ */
14
+ getRiskScoringPlan(): Promise<RiskScoringPlanDto>;
15
+ /**
16
+ * Get risk criteria for scoring
17
+ * Note: Requires applicantId as query parameter
18
+ */
19
+ getRiskCriterias(applicantId: number): Promise<RiskCriteriaDto[]>;
20
+ /**
21
+ * Submit risk scoring calculation
22
+ */
23
+ submitRiskScoring(input: RiskCalculationInput): Promise<RiskScoringResult>;
24
+ }
25
+ //# sourceMappingURL=risk-scoring.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"risk-scoring.service.d.ts","sourceRoot":"","sources":["../../src/services/risk-scoring.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAElB;;;GAGG;AACH,qBAAa,kBAAkB;IACjB,OAAO,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU;IAE1C;;OAEG;IACG,kBAAkB,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAQvD;;;OAGG;IACG,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IASvE;;OAEG;IACG,iBAAiB,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAQjF"}
@@ -0,0 +1,31 @@
1
+ import { HttpClient } from '../client';
2
+ import { ThemeConfigurationDto, ThemeConfig, ThemePreset } from '../types/theme';
3
+
4
+ /**
5
+ * Theme Service
6
+ * Handles backend communication for theme configuration
7
+ */
8
+ export declare class ThemeService {
9
+ private httpClient;
10
+ constructor(httpClient: HttpClient);
11
+ /**
12
+ * Get theme configuration from backend
13
+ */
14
+ getThemeConfiguration(): Promise<ThemeConfig>;
15
+ /**
16
+ * Save theme configuration (for Panel use)
17
+ */
18
+ saveThemeConfiguration(config: ThemeConfigurationDto): Promise<void>;
19
+ /**
20
+ * Get available theme presets
21
+ */
22
+ getAvailablePresets(): Array<{
23
+ id: ThemePreset;
24
+ name: string;
25
+ }>;
26
+ /**
27
+ * Preview theme (doesn't save)
28
+ */
29
+ getPreviewTheme(preset: ThemePreset, overrides?: Partial<ThemeConfig>): ThemeConfig;
30
+ }
31
+ //# sourceMappingURL=theme.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.service.d.ts","sourceRoot":"","sources":["../../src/services/theme.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGjF;;;GAGG;AACH,qBAAa,YAAY;IACX,OAAO,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU;IAE1C;;OAEG;IACG,qBAAqB,IAAI,OAAO,CAAC,WAAW,CAAC;IAuDnD;;OAEG;IACG,sBAAsB,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAI1E;;OAEG;IACH,mBAAmB,IAAI,KAAK,CAAC;QAAE,EAAE,EAAE,WAAW,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAW/D;;OAEG;IACH,eAAe,CAAC,MAAM,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,WAAW;CAoBpF"}
@@ -0,0 +1,24 @@
1
+ import { HttpClient } from '../client/http-client';
2
+ import { UploadDocumentOutputDto, FillUploadDocumentInput, ReviewUploadDocumentDto } from '../types';
3
+
4
+ /**
5
+ * Upload document service
6
+ * Handles document upload-related API calls
7
+ */
8
+ export declare class UploadDocumentService {
9
+ private httpClient;
10
+ constructor(httpClient: HttpClient);
11
+ /**
12
+ * Get upload document requirements for an applicant
13
+ */
14
+ getUploadDocument(applicantId: number): Promise<UploadDocumentOutputDto>;
15
+ /**
16
+ * Submit uploaded documents
17
+ */
18
+ fillUploadDocument(input: FillUploadDocumentInput): Promise<void>;
19
+ /**
20
+ * Review uploaded documents (admin function)
21
+ */
22
+ reviewUploadDocument(input: ReviewUploadDocumentDto): Promise<void>;
23
+ }
24
+ //# sourceMappingURL=upload-document.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upload-document.service.d.ts","sourceRoot":"","sources":["../../src/services/upload-document.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,UAAU,CAAC;AAElB;;;GAGG;AACH,qBAAa,qBAAqB;IACpB,OAAO,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU;IAE1C;;OAEG;IACG,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAS9E;;OAEG;IACG,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvE;;OAEG;IACG,oBAAoB,CAAC,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;CAG1E"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Simple event emitter for state changes
3
+ */
4
+ export declare class EventEmitter<T = any> {
5
+ private listeners;
6
+ /**
7
+ * Subscribe to an event
8
+ */
9
+ on(event: string, callback: (data: T) => void): () => void;
10
+ /**
11
+ * Unsubscribe from an event
12
+ */
13
+ off(event: string, callback: (data: T) => void): void;
14
+ /**
15
+ * Emit an event
16
+ */
17
+ emit(event: string, data: T): void;
18
+ /**
19
+ * Remove all listeners
20
+ */
21
+ clear(): void;
22
+ /**
23
+ * Remove all listeners for a specific event
24
+ */
25
+ clearEvent(event: string): void;
26
+ }
27
+ //# sourceMappingURL=event-emitter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-emitter.d.ts","sourceRoot":"","sources":["../../src/state/event-emitter.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,YAAY,CAAC,CAAC,GAAG,GAAG;IAC/B,OAAO,CAAC,SAAS,CAAkD;IAEnE;;OAEG;IACH,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,GAAG,MAAM,IAAI;IAa1D;;OAEG;IACH,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,GAAG,IAAI;IAOrD;;OAEG;IACH,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI;IAalC;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;OAEG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;CAGhC"}
@@ -0,0 +1,5 @@
1
+ export * from './event-emitter';
2
+ export * from './workflow-state';
3
+ export * from './step-router';
4
+ export * from './workflow-orchestrator';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/state/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { WorkflowStepAction } from '../types';
2
+
3
+ /**
4
+ * Step data loader function type
5
+ */
6
+ export type StepDataLoader<T> = (applicantId: number) => Promise<T>;
7
+ /**
8
+ * Step data submitter function type
9
+ */
10
+ export type StepDataSubmitter<T> = (data: T) => Promise<void>;
11
+ /**
12
+ * Step handler configuration
13
+ */
14
+ export interface StepHandler<TData = any, TSubmit = any> {
15
+ loadData: StepDataLoader<TData>;
16
+ submitData: StepDataSubmitter<TSubmit>;
17
+ }
18
+ /**
19
+ * Step router
20
+ * Routes workflow steps to appropriate data loaders and submitters
21
+ */
22
+ export declare class StepRouter {
23
+ private handlers;
24
+ /**
25
+ * Register a step handler
26
+ */
27
+ registerHandler(action: WorkflowStepAction, handler: StepHandler): void;
28
+ /**
29
+ * Get handler for a step action
30
+ */
31
+ getHandler(action: WorkflowStepAction): StepHandler | undefined;
32
+ /**
33
+ * Check if a step has a handler
34
+ */
35
+ hasHandler(action: WorkflowStepAction): boolean;
36
+ /**
37
+ * Load data for a step
38
+ */
39
+ loadStepData<T>(action: WorkflowStepAction, applicantId: number): Promise<T>;
40
+ /**
41
+ * Submit data for a step
42
+ */
43
+ submitStepData<T>(action: WorkflowStepAction, data: T): Promise<void>;
44
+ }
45
+ //# sourceMappingURL=step-router.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step-router.d.ts","sourceRoot":"","sources":["../../src/state/step-router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,WAAW,CAAC,KAAK,GAAG,GAAG,EAAE,OAAO,GAAG,GAAG;IACrD,QAAQ,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC;IAChC,UAAU,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;CACxC;AAED;;;GAGG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAA8C;IAE9D;;OAEG;IACH,eAAe,CAAC,MAAM,EAAE,kBAAkB,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI;IAIvE;;OAEG;IACH,UAAU,CAAC,MAAM,EAAE,kBAAkB,GAAG,WAAW,GAAG,SAAS;IAI/D;;OAEG;IACH,UAAU,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO;IAI/C;;OAEG;IACG,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAQlF;;OAEG;IACG,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAO5E"}
@@ -0,0 +1,58 @@
1
+ import { WorkflowState } from './workflow-state';
2
+ import { StepRouter } from './step-router';
3
+ import { ApplicantService, QuestionnaireService, UploadDocumentService, AppropriatenessTestService, OverviewService, RiskScoringService, IdentityService, InvestorCategorizationService } from '../services';
4
+ import { ProgressApplicantResult } from '../types';
5
+
6
+ /**
7
+ * Workflow orchestrator
8
+ * Manages workflow execution and step progression
9
+ */
10
+ export declare class WorkflowOrchestrator {
11
+ private applicantService;
12
+ private questionnaireService;
13
+ private uploadDocumentService;
14
+ private appropriatenessTestService;
15
+ private overviewService;
16
+ private riskScoringService;
17
+ private investorCategorizationService;
18
+ private state;
19
+ private stepRouter;
20
+ constructor(applicantService: ApplicantService, questionnaireService: QuestionnaireService, uploadDocumentService: UploadDocumentService, appropriatenessTestService: AppropriatenessTestService, overviewService: OverviewService, riskScoringService: RiskScoringService, _identityService: IdentityService, investorCategorizationService: InvestorCategorizationService);
21
+ /**
22
+ * Register all step handlers
23
+ */
24
+ private registerStepHandlers;
25
+ /**
26
+ * Initialize workflow with applicant ID
27
+ */
28
+ initialize(applicantId: number): Promise<ProgressApplicantResult>;
29
+ /**
30
+ * Refresh applicant progress
31
+ */
32
+ refreshProgress(): Promise<ProgressApplicantResult>;
33
+ /**
34
+ * Get data for current step
35
+ */
36
+ getCurrentStepData<T>(): Promise<T>;
37
+ /**
38
+ * Submit data for current step
39
+ */
40
+ submitCurrentStep(data: any): Promise<void>;
41
+ /**
42
+ * Move to next step (if possible)
43
+ */
44
+ moveToNextStep(): Promise<ProgressApplicantResult>;
45
+ /**
46
+ * Move back to previous step
47
+ */
48
+ moveToPreviousStep(): Promise<ProgressApplicantResult>;
49
+ /**
50
+ * Get workflow state
51
+ */
52
+ getState(): WorkflowState;
53
+ /**
54
+ * Get step router
55
+ */
56
+ getStepRouter(): StepRouter;
57
+ }
58
+ //# sourceMappingURL=workflow-orchestrator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-orchestrator.d.ts","sourceRoot":"","sources":["../../src/state/workflow-orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,6BAA6B,EAC9B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAsB,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEvE;;;GAGG;AACH,qBAAa,oBAAoB;IAK7B,OAAO,CAAC,gBAAgB;IACxB,OAAO,CAAC,oBAAoB;IAC5B,OAAO,CAAC,qBAAqB;IAC7B,OAAO,CAAC,0BAA0B;IAClC,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,kBAAkB;IAE1B,OAAO,CAAC,6BAA6B;IAXvC,OAAO,CAAC,KAAK,CAAgB;IAC7B,OAAO,CAAC,UAAU,CAAa;gBAGrB,gBAAgB,EAAE,gBAAgB,EAClC,oBAAoB,EAAE,oBAAoB,EAC1C,qBAAqB,EAAE,qBAAqB,EAC5C,0BAA0B,EAAE,0BAA0B,EACtD,eAAe,EAAE,eAAe,EAChC,kBAAkB,EAAE,kBAAkB,EAC9C,gBAAgB,EAAE,eAAe,EACzB,6BAA6B,EAAE,6BAA6B;IAOtE;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAmF5B;;OAEG;IACG,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAYvE;;OAEG;IACG,eAAe,IAAI,OAAO,CAAC,uBAAuB,CAAC;IAezD;;OAEG;IACG,kBAAkB,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC;IAqBzC;;OAEG;IACG,iBAAiB,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAejD;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,uBAAuB,CAAC;IAKxD;;OAEG;IACG,kBAAkB,IAAI,OAAO,CAAC,uBAAuB,CAAC;IAc5D;;OAEG;IACH,QAAQ,IAAI,aAAa;IAIzB;;OAEG;IACH,aAAa,IAAI,UAAU;CAG5B"}
@@ -0,0 +1,108 @@
1
+ import { ProgressApplicantResult, FlowStep, StepInfo, ApplicantProgressStatus, WorkflowResultType } from '../types';
2
+
3
+ /**
4
+ * Workflow state events
5
+ */
6
+ export interface WorkflowStateEvents {
7
+ progressUpdated: ProgressApplicantResult;
8
+ stepChanged: FlowStep | null;
9
+ statusChanged: ApplicantProgressStatus;
10
+ error: Error;
11
+ completed: WorkflowResultType;
12
+ }
13
+ /**
14
+ * Workflow state manager
15
+ * Manages the current state of a workflow execution
16
+ */
17
+ export declare class WorkflowState {
18
+ private events;
19
+ private _applicantId;
20
+ private _progress;
21
+ private _error;
22
+ constructor();
23
+ /**
24
+ * Get current applicant ID
25
+ */
26
+ get applicantId(): number | null;
27
+ /**
28
+ * Get current progress
29
+ */
30
+ get progress(): ProgressApplicantResult | null;
31
+ /**
32
+ * Get current step
33
+ */
34
+ get currentStep(): FlowStep | null;
35
+ /**
36
+ * Get all workflow steps
37
+ */
38
+ get steps(): StepInfo[];
39
+ /**
40
+ * Get current status
41
+ */
42
+ get status(): ApplicantProgressStatus;
43
+ /**
44
+ * Get workflow result
45
+ */
46
+ get workflowResult(): WorkflowResultType | null;
47
+ /**
48
+ * Get current error
49
+ */
50
+ get error(): Error | null;
51
+ /**
52
+ * Check if workflow is complete
53
+ */
54
+ get isComplete(): boolean;
55
+ /**
56
+ * Check if workflow is on hold
57
+ */
58
+ get isOnHold(): boolean;
59
+ /**
60
+ * Check if workflow is in progress
61
+ */
62
+ get isInProgress(): boolean;
63
+ /**
64
+ * Set applicant ID
65
+ */
66
+ setApplicantId(applicantId: number): void;
67
+ /**
68
+ * Update progress
69
+ */
70
+ updateProgress(progress: ProgressApplicantResult): void;
71
+ /**
72
+ * Set error
73
+ */
74
+ setError(error: Error): void;
75
+ /**
76
+ * Clear error
77
+ */
78
+ clearError(): void;
79
+ /**
80
+ * Reset state
81
+ */
82
+ reset(): void;
83
+ /**
84
+ * Subscribe to progress updates
85
+ */
86
+ onProgressUpdated(callback: (progress: ProgressApplicantResult) => void): () => void;
87
+ /**
88
+ * Subscribe to step changes
89
+ */
90
+ onStepChanged(callback: (step: FlowStep | null) => void): () => void;
91
+ /**
92
+ * Subscribe to status changes
93
+ */
94
+ onStatusChanged(callback: (status: ApplicantProgressStatus) => void): () => void;
95
+ /**
96
+ * Subscribe to errors
97
+ */
98
+ onError(callback: (error: Error) => void): () => void;
99
+ /**
100
+ * Subscribe to completion
101
+ */
102
+ onCompleted(callback: (result: WorkflowResultType) => void): () => void;
103
+ /**
104
+ * Clear all event listeners
105
+ */
106
+ clearListeners(): void;
107
+ }
108
+ //# sourceMappingURL=workflow-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-state.d.ts","sourceRoot":"","sources":["../../src/state/workflow-state.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,QAAQ,EACR,QAAQ,EACR,uBAAuB,EACvB,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAGlB;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,eAAe,EAAE,uBAAuB,CAAC;IACzC,WAAW,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC7B,aAAa,EAAE,uBAAuB,CAAC;IACvC,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,kBAAkB,CAAC;CAC/B;AAED;;;GAGG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAA2B;IACzC,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,SAAS,CAAwC;IACzD,OAAO,CAAC,MAAM,CAAsB;;IAIpC;;OAEG;IACH,IAAI,WAAW,IAAI,MAAM,GAAG,IAAI,CAE/B;IAED;;OAEG;IACH,IAAI,QAAQ,IAAI,uBAAuB,GAAG,IAAI,CAE7C;IAED;;OAEG;IACH,IAAI,WAAW,IAAI,QAAQ,GAAG,IAAI,CAEjC;IAED;;OAEG;IACH,IAAI,KAAK,IAAI,QAAQ,EAAE,CAEtB;IAED;;OAEG;IACH,IAAI,MAAM,IAAI,uBAAuB,CAEpC;IAED;;OAEG;IACH,IAAI,cAAc,IAAI,kBAAkB,GAAG,IAAI,CAE9C;IAED;;OAEG;IACH,IAAI,KAAK,IAAI,KAAK,GAAG,IAAI,CAExB;IAED;;OAEG;IACH,IAAI,UAAU,IAAI,OAAO,CAExB;IAED;;OAEG;IACH,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED;;OAEG;IACH,IAAI,YAAY,IAAI,OAAO,CAE1B;IAED;;OAEG;IACH,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAIzC;;OAEG;IACH,cAAc,CAAC,QAAQ,EAAE,uBAAuB,GAAG,IAAI;IAuBvD;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAK5B;;OAEG;IACH,UAAU,IAAI,IAAI;IAIlB;;OAEG;IACH,KAAK,IAAI,IAAI;IAMb;;OAEG;IACH,iBAAiB,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,uBAAuB,KAAK,IAAI,GAAG,MAAM,IAAI;IAIpF;;OAEG;IACH,aAAa,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,GAAG,MAAM,IAAI;IAIpE;;OAEG;IACH,eAAe,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,uBAAuB,KAAK,IAAI,GAAG,MAAM,IAAI;IAIhF;;OAEG;IACH,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,MAAM,IAAI;IAIrD;;OAEG;IACH,WAAW,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,GAAG,MAAM,IAAI;IAIvE;;OAEG;IACH,cAAc,IAAI,IAAI;CAGvB"}