@venturialstd/workflow 0.1.117 → 0.1.120

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 (140) hide show
  1. package/dist/modules/capa/services/create-user-kyc.service.d.ts.map +1 -1
  2. package/dist/modules/capa/services/create-user-kyc.service.js +37 -5
  3. package/dist/modules/capa/services/create-user-kyc.service.js.map +1 -1
  4. package/dist/modules/capa/services/create-user.service.d.ts.map +1 -1
  5. package/dist/modules/capa/services/create-user.service.js +11 -1
  6. package/dist/modules/capa/services/create-user.service.js.map +1 -1
  7. package/dist/modules/email/actions/send-template-email.action.d.ts.map +1 -1
  8. package/dist/modules/email/actions/send-template-email.action.js +3 -0
  9. package/dist/modules/email/actions/send-template-email.action.js.map +1 -1
  10. package/dist/modules/email/auth/email-auth.service.d.ts.map +1 -1
  11. package/dist/modules/email/auth/email-auth.service.js.map +1 -1
  12. package/dist/modules/email/services/email-template-options.service.d.ts.map +1 -1
  13. package/dist/modules/email/services/email-template-options.service.js +1 -3
  14. package/dist/modules/email/services/email-template-options.service.js.map +1 -1
  15. package/dist/modules/email/services/send-template-email.service.d.ts.map +1 -1
  16. package/dist/modules/email/services/send-template-email.service.js +9 -3
  17. package/dist/modules/email/services/send-template-email.service.js.map +1 -1
  18. package/dist/modules/email/utils/template-options.util.d.ts +2 -2
  19. package/dist/modules/email/utils/template-options.util.d.ts.map +1 -1
  20. package/dist/modules/email/utils/template-options.util.js +1 -1
  21. package/dist/modules/email/utils/template-options.util.js.map +1 -1
  22. package/dist/modules/index.d.ts +1 -0
  23. package/dist/modules/index.d.ts.map +1 -1
  24. package/dist/modules/index.js +5 -1
  25. package/dist/modules/index.js.map +1 -1
  26. package/dist/modules/kyc/actions/add-kyc-document-by-provider.action.d.ts +3 -0
  27. package/dist/modules/kyc/actions/add-kyc-document-by-provider.action.d.ts.map +1 -0
  28. package/dist/modules/kyc/actions/add-kyc-document-by-provider.action.js +283 -0
  29. package/dist/modules/kyc/actions/add-kyc-document-by-provider.action.js.map +1 -0
  30. package/dist/modules/kyc/actions/check-kyc-status.action.d.ts +3 -0
  31. package/dist/modules/kyc/actions/check-kyc-status.action.d.ts.map +1 -0
  32. package/dist/modules/kyc/actions/check-kyc-status.action.js +65 -0
  33. package/dist/modules/kyc/actions/check-kyc-status.action.js.map +1 -0
  34. package/dist/modules/kyc/actions/create-kyc-document.action.d.ts +3 -0
  35. package/dist/modules/kyc/actions/create-kyc-document.action.d.ts.map +1 -0
  36. package/dist/modules/kyc/actions/create-kyc-document.action.js +197 -0
  37. package/dist/modules/kyc/actions/create-kyc-document.action.js.map +1 -0
  38. package/dist/modules/kyc/actions/create-kyc-profile.action.d.ts +3 -0
  39. package/dist/modules/kyc/actions/create-kyc-profile.action.d.ts.map +1 -0
  40. package/dist/modules/kyc/actions/create-kyc-profile.action.js +189 -0
  41. package/dist/modules/kyc/actions/create-kyc-profile.action.js.map +1 -0
  42. package/dist/modules/kyc/actions/get-kyc-document.action.d.ts +3 -0
  43. package/dist/modules/kyc/actions/get-kyc-document.action.d.ts.map +1 -0
  44. package/dist/modules/kyc/actions/get-kyc-document.action.js +65 -0
  45. package/dist/modules/kyc/actions/get-kyc-document.action.js.map +1 -0
  46. package/dist/modules/kyc/actions/get-kyc-documents-by-profile.action.d.ts +3 -0
  47. package/dist/modules/kyc/actions/get-kyc-documents-by-profile.action.d.ts.map +1 -0
  48. package/dist/modules/kyc/actions/get-kyc-documents-by-profile.action.js +41 -0
  49. package/dist/modules/kyc/actions/get-kyc-documents-by-profile.action.js.map +1 -0
  50. package/dist/modules/kyc/actions/get-kyc-profile.action.d.ts +3 -0
  51. package/dist/modules/kyc/actions/get-kyc-profile.action.d.ts.map +1 -0
  52. package/dist/modules/kyc/actions/get-kyc-profile.action.js +86 -0
  53. package/dist/modules/kyc/actions/get-kyc-profile.action.js.map +1 -0
  54. package/dist/modules/kyc/actions/index.d.ts +11 -0
  55. package/dist/modules/kyc/actions/index.d.ts.map +1 -0
  56. package/dist/modules/kyc/actions/index.js +27 -0
  57. package/dist/modules/kyc/actions/index.js.map +1 -0
  58. package/dist/modules/kyc/actions/update-kyc-document.action.d.ts +3 -0
  59. package/dist/modules/kyc/actions/update-kyc-document.action.d.ts.map +1 -0
  60. package/dist/modules/kyc/actions/update-kyc-document.action.js +98 -0
  61. package/dist/modules/kyc/actions/update-kyc-document.action.js.map +1 -0
  62. package/dist/modules/kyc/actions/update-kyc-profile.action.d.ts +3 -0
  63. package/dist/modules/kyc/actions/update-kyc-profile.action.d.ts.map +1 -0
  64. package/dist/modules/kyc/actions/update-kyc-profile.action.js +109 -0
  65. package/dist/modules/kyc/actions/update-kyc-profile.action.js.map +1 -0
  66. package/dist/modules/kyc/actions/update-kyc-status.action.d.ts +3 -0
  67. package/dist/modules/kyc/actions/update-kyc-status.action.d.ts.map +1 -0
  68. package/dist/modules/kyc/actions/update-kyc-status.action.js +86 -0
  69. package/dist/modules/kyc/actions/update-kyc-status.action.js.map +1 -0
  70. package/dist/modules/kyc/auth/index.d.ts +2 -0
  71. package/dist/modules/kyc/auth/index.d.ts.map +1 -0
  72. package/dist/modules/kyc/auth/index.js +18 -0
  73. package/dist/modules/kyc/auth/index.js.map +1 -0
  74. package/dist/modules/kyc/auth/kyc-auth.service.d.ts +5 -0
  75. package/dist/modules/kyc/auth/kyc-auth.service.d.ts.map +1 -0
  76. package/dist/modules/kyc/auth/kyc-auth.service.js +23 -0
  77. package/dist/modules/kyc/auth/kyc-auth.service.js.map +1 -0
  78. package/dist/modules/kyc/credentials.d.ts +3 -0
  79. package/dist/modules/kyc/credentials.d.ts.map +1 -0
  80. package/dist/modules/kyc/credentials.js +5 -0
  81. package/dist/modules/kyc/credentials.js.map +1 -0
  82. package/dist/modules/kyc/kyc-nest.module.d.ts +3 -0
  83. package/dist/modules/kyc/kyc-nest.module.d.ts.map +1 -0
  84. package/dist/modules/kyc/kyc-nest.module.js +52 -0
  85. package/dist/modules/kyc/kyc-nest.module.js.map +1 -0
  86. package/dist/modules/kyc/kyc.module.d.ts +3 -0
  87. package/dist/modules/kyc/kyc.module.d.ts.map +1 -0
  88. package/dist/modules/kyc/kyc.module.js +29 -0
  89. package/dist/modules/kyc/kyc.module.js.map +1 -0
  90. package/dist/modules/kyc/services/add-kyc-document-by-provider.service.d.ts +10 -0
  91. package/dist/modules/kyc/services/add-kyc-document-by-provider.service.d.ts.map +1 -0
  92. package/dist/modules/kyc/services/add-kyc-document-by-provider.service.js +125 -0
  93. package/dist/modules/kyc/services/add-kyc-document-by-provider.service.js.map +1 -0
  94. package/dist/modules/kyc/services/check-kyc-status.service.d.ts +8 -0
  95. package/dist/modules/kyc/services/check-kyc-status.service.d.ts.map +1 -0
  96. package/dist/modules/kyc/services/check-kyc-status.service.js +43 -0
  97. package/dist/modules/kyc/services/check-kyc-status.service.js.map +1 -0
  98. package/dist/modules/kyc/services/create-kyc-document.service.d.ts +9 -0
  99. package/dist/modules/kyc/services/create-kyc-document.service.d.ts.map +1 -0
  100. package/dist/modules/kyc/services/create-kyc-document.service.js +75 -0
  101. package/dist/modules/kyc/services/create-kyc-document.service.js.map +1 -0
  102. package/dist/modules/kyc/services/create-kyc-profile.service.d.ts +8 -0
  103. package/dist/modules/kyc/services/create-kyc-profile.service.d.ts.map +1 -0
  104. package/dist/modules/kyc/services/create-kyc-profile.service.js +84 -0
  105. package/dist/modules/kyc/services/create-kyc-profile.service.js.map +1 -0
  106. package/dist/modules/kyc/services/get-kyc-document.service.d.ts +9 -0
  107. package/dist/modules/kyc/services/get-kyc-document.service.d.ts.map +1 -0
  108. package/dist/modules/kyc/services/get-kyc-document.service.js +68 -0
  109. package/dist/modules/kyc/services/get-kyc-document.service.js.map +1 -0
  110. package/dist/modules/kyc/services/get-kyc-documents-by-profile.service.d.ts +9 -0
  111. package/dist/modules/kyc/services/get-kyc-documents-by-profile.service.d.ts.map +1 -0
  112. package/dist/modules/kyc/services/get-kyc-documents-by-profile.service.js +66 -0
  113. package/dist/modules/kyc/services/get-kyc-documents-by-profile.service.js.map +1 -0
  114. package/dist/modules/kyc/services/get-kyc-profile.service.d.ts +8 -0
  115. package/dist/modules/kyc/services/get-kyc-profile.service.d.ts.map +1 -0
  116. package/dist/modules/kyc/services/get-kyc-profile.service.js +72 -0
  117. package/dist/modules/kyc/services/get-kyc-profile.service.js.map +1 -0
  118. package/dist/modules/kyc/services/index.d.ts +11 -0
  119. package/dist/modules/kyc/services/index.d.ts.map +1 -0
  120. package/dist/modules/kyc/services/index.js +27 -0
  121. package/dist/modules/kyc/services/index.js.map +1 -0
  122. package/dist/modules/kyc/services/update-kyc-document.service.d.ts +9 -0
  123. package/dist/modules/kyc/services/update-kyc-document.service.d.ts.map +1 -0
  124. package/dist/modules/kyc/services/update-kyc-document.service.js +103 -0
  125. package/dist/modules/kyc/services/update-kyc-document.service.js.map +1 -0
  126. package/dist/modules/kyc/services/update-kyc-profile.service.d.ts +8 -0
  127. package/dist/modules/kyc/services/update-kyc-profile.service.d.ts.map +1 -0
  128. package/dist/modules/kyc/services/update-kyc-profile.service.js +93 -0
  129. package/dist/modules/kyc/services/update-kyc-profile.service.js.map +1 -0
  130. package/dist/modules/kyc/services/update-kyc-status.service.d.ts +8 -0
  131. package/dist/modules/kyc/services/update-kyc-status.service.d.ts.map +1 -0
  132. package/dist/modules/kyc/services/update-kyc-status.service.js +53 -0
  133. package/dist/modules/kyc/services/update-kyc-status.service.js.map +1 -0
  134. package/dist/modules/twilio/actions/send-sms.action.d.ts.map +1 -1
  135. package/dist/modules/twilio/actions/send-sms.action.js +3 -0
  136. package/dist/modules/twilio/actions/send-sms.action.js.map +1 -1
  137. package/dist/workflow.module.d.ts.map +1 -1
  138. package/dist/workflow.module.js +3 -0
  139. package/dist/workflow.module.js.map +1 -1
  140. package/package.json +3 -2
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateKYCProfileAction = void 0;
4
+ const types_1 = require("../../types");
5
+ const kyc_1 = require("@venturialstd/kyc");
6
+ const update_kyc_profile_service_1 = require("../services/update-kyc-profile.service");
7
+ exports.updateKYCProfileAction = {
8
+ key: 'update-kyc-profile',
9
+ name: 'Update KYC Profile',
10
+ description: 'Update an existing KYC profile',
11
+ category: types_1.NODE_CATEGORY.ACTION,
12
+ icon: '✏️',
13
+ serviceClass: update_kyc_profile_service_1.UpdateKYCProfileService,
14
+ inputs: [
15
+ {
16
+ id: 'profileId',
17
+ name: 'Profile ID',
18
+ description: 'The KYC profile ID to update',
19
+ type: types_1.FIELD_TYPE.STRING,
20
+ validation: {
21
+ required: true,
22
+ minLength: 1,
23
+ },
24
+ placeholder: 'profile-uuid',
25
+ },
26
+ {
27
+ id: 'status',
28
+ name: 'Status',
29
+ description: 'KYC status',
30
+ type: types_1.FIELD_TYPE.STRING,
31
+ validation: {
32
+ required: false,
33
+ enum: Object.values(kyc_1.KYC_STATUS),
34
+ },
35
+ options: Object.values(kyc_1.KYC_STATUS).map((status) => ({
36
+ label: status.replace(/_/g, ' '),
37
+ value: status,
38
+ })),
39
+ },
40
+ {
41
+ id: 'verificationLevel',
42
+ name: 'Verification Level',
43
+ description: 'Verification level',
44
+ type: types_1.FIELD_TYPE.STRING,
45
+ validation: {
46
+ required: false,
47
+ enum: Object.values(kyc_1.KYC_VERIFICATION_LEVEL),
48
+ },
49
+ options: Object.values(kyc_1.KYC_VERIFICATION_LEVEL).map((level) => ({
50
+ label: level,
51
+ value: level,
52
+ })),
53
+ },
54
+ {
55
+ id: 'firstName',
56
+ name: 'First Name',
57
+ description: 'User first name',
58
+ type: types_1.FIELD_TYPE.STRING,
59
+ validation: {
60
+ required: false,
61
+ },
62
+ },
63
+ {
64
+ id: 'lastName',
65
+ name: 'Last Name',
66
+ description: 'User last name',
67
+ type: types_1.FIELD_TYPE.STRING,
68
+ validation: {
69
+ required: false,
70
+ },
71
+ },
72
+ {
73
+ id: 'taxId',
74
+ name: 'Tax ID',
75
+ description: 'Tax identification number',
76
+ type: types_1.FIELD_TYPE.STRING,
77
+ validation: {
78
+ required: false,
79
+ },
80
+ },
81
+ ],
82
+ outputs: [
83
+ {
84
+ id: 'id',
85
+ name: 'Profile ID',
86
+ description: 'The unique identifier of the updated KYC profile',
87
+ type: types_1.FIELD_TYPE.STRING,
88
+ },
89
+ {
90
+ id: 'userId',
91
+ name: 'User ID',
92
+ description: 'The user ID',
93
+ type: types_1.FIELD_TYPE.STRING,
94
+ },
95
+ {
96
+ id: 'status',
97
+ name: 'Status',
98
+ description: 'The KYC status',
99
+ type: types_1.FIELD_TYPE.STRING,
100
+ },
101
+ {
102
+ id: 'updatedAt',
103
+ name: 'Updated At',
104
+ description: 'Timestamp when the profile was updated',
105
+ type: types_1.FIELD_TYPE.DATE,
106
+ },
107
+ ],
108
+ };
109
+ //# sourceMappingURL=update-kyc-profile.action.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-kyc-profile.action.js","sourceRoot":"","sources":["../../../../src/modules/kyc/actions/update-kyc-profile.action.ts"],"names":[],"mappings":";;;AAAA,uCAKqB;AACrB,2CAAuE;AACvE,uFAAiF;AAEpE,QAAA,sBAAsB,GAA0B;IAC3D,GAAG,EAAE,oBAAoB;IACzB,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,gCAAgC;IAC7C,QAAQ,EAAE,qBAAa,CAAC,MAAM;IAC9B,IAAI,EAAE,IAAI;IACV,YAAY,EAAE,oDAA6E;IAC3F,MAAM,EAAE;QACN;YACE,EAAE,EAAE,WAAW;YACf,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,8BAA8B;YAC3C,IAAI,EAAE,kBAAU,CAAC,MAAM;YACvB,UAAU,EAAE;gBACV,QAAQ,EAAE,IAAI;gBACd,SAAS,EAAE,CAAC;aACb;YACD,WAAW,EAAE,cAAc;SAC5B;QACD;YACE,EAAE,EAAE,QAAQ;YACZ,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,YAAY;YACzB,IAAI,EAAE,kBAAU,CAAC,MAAM;YACvB,UAAU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;SACF;KACF;IACD,OAAO,EAAE;QACP;YACE,EAAE,EAAE,IAAI;YACR,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,kDAAkD;YAC/D,IAAI,EAAE,kBAAU,CAAC,MAAM;SACxB;QACD;YACE,EAAE,EAAE,QAAQ;YACZ,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,aAAa;YAC1B,IAAI,EAAE,kBAAU,CAAC,MAAM;SACxB;QACD;YACE,EAAE,EAAE,QAAQ;YACZ,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,gBAAgB;YAC7B,IAAI,EAAE,kBAAU,CAAC,MAAM;SACxB;QACD;YACE,EAAE,EAAE,WAAW;YACf,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,wCAAwC;YACrD,IAAI,EAAE,kBAAU,CAAC,IAAI;SACtB;KACF;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { WorkflowActionTrigger } from '../../types';
2
+ export declare const updateKYCStatusAction: WorkflowActionTrigger;
3
+ //# sourceMappingURL=update-kyc-status.action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-kyc-status.action.d.ts","sourceRoot":"","sources":["../../../../src/modules/kyc/actions/update-kyc-status.action.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,qBAAqB,EACtB,MAAM,aAAa,CAAC;AAIrB,eAAO,MAAM,qBAAqB,EAAE,qBA8EnC,CAAC"}
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateKYCStatusAction = void 0;
4
+ const types_1 = require("../../types");
5
+ const kyc_1 = require("@venturialstd/kyc");
6
+ const update_kyc_status_service_1 = require("../services/update-kyc-status.service");
7
+ exports.updateKYCStatusAction = {
8
+ key: 'update-kyc-status',
9
+ name: 'Update KYC Status',
10
+ description: 'Update the status of a KYC profile',
11
+ category: types_1.NODE_CATEGORY.ACTION,
12
+ icon: '📊',
13
+ serviceClass: update_kyc_status_service_1.UpdateKYCStatusService,
14
+ inputs: [
15
+ {
16
+ id: 'profileId',
17
+ name: 'Profile ID',
18
+ description: 'The KYC profile ID to update',
19
+ type: types_1.FIELD_TYPE.STRING,
20
+ validation: {
21
+ required: true,
22
+ minLength: 1,
23
+ },
24
+ placeholder: 'profile-uuid',
25
+ },
26
+ {
27
+ id: 'status',
28
+ name: 'Status',
29
+ description: 'New KYC status',
30
+ type: types_1.FIELD_TYPE.STRING,
31
+ validation: {
32
+ required: true,
33
+ enum: Object.values(kyc_1.KYC_STATUS),
34
+ },
35
+ options: Object.values(kyc_1.KYC_STATUS).map((status) => ({
36
+ label: status.replace(/_/g, ' '),
37
+ value: status,
38
+ })),
39
+ },
40
+ {
41
+ id: 'reviewedBy',
42
+ name: 'Reviewed By',
43
+ description: 'User ID of the reviewer (optional)',
44
+ type: types_1.FIELD_TYPE.STRING,
45
+ validation: {
46
+ required: false,
47
+ },
48
+ },
49
+ {
50
+ id: 'notes',
51
+ name: 'Review Notes',
52
+ description: 'Optional review notes',
53
+ type: types_1.FIELD_TYPE.STRING,
54
+ validation: {
55
+ required: false,
56
+ },
57
+ },
58
+ ],
59
+ outputs: [
60
+ {
61
+ id: 'id',
62
+ name: 'Profile ID',
63
+ description: 'The unique identifier of the updated KYC profile',
64
+ type: types_1.FIELD_TYPE.STRING,
65
+ },
66
+ {
67
+ id: 'status',
68
+ name: 'Status',
69
+ description: 'The updated KYC status',
70
+ type: types_1.FIELD_TYPE.STRING,
71
+ },
72
+ {
73
+ id: 'reviewedBy',
74
+ name: 'Reviewed By',
75
+ description: 'User ID of the reviewer',
76
+ type: types_1.FIELD_TYPE.STRING,
77
+ },
78
+ {
79
+ id: 'updatedAt',
80
+ name: 'Updated At',
81
+ description: 'Timestamp when the status was updated',
82
+ type: types_1.FIELD_TYPE.DATE,
83
+ },
84
+ ],
85
+ };
86
+ //# sourceMappingURL=update-kyc-status.action.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-kyc-status.action.js","sourceRoot":"","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C,IAAI,EAAE,kBAAU,CAAC,MAAM;YACvB,UAAU,EAAE;gBACV,QAAQ,EAAE,KAAK;aAChB;SACF;KACF;IACD,OAAO,EAAE;QACP;YACE,EAAE,EAAE,IAAI;YACR,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,kDAAkD;YAC/D,IAAI,EAAE,kBAAU,CAAC,MAAM;SACxB;QACD;YACE,EAAE,EAAE,QAAQ;YACZ,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,wBAAwB;YACrC,IAAI,EAAE,kBAAU,CAAC,MAAM;SACxB;QACD;YACE,EAAE,EAAE,YAAY;YAChB,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,yBAAyB;YACtC,IAAI,EAAE,kBAAU,CAAC,MAAM;SACxB;QACD;YACE,EAAE,EAAE,WAAW;YACf,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,uCAAuC;YACpD,IAAI,EAAE,kBAAU,CAAC,IAAI;SACtB;KACF;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './kyc-auth.service';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/kyc/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./kyc-auth.service"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/kyc/auth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC"}
@@ -0,0 +1,5 @@
1
+ import { CredentialAuthResult, IWorkflowCredentialAuthService } from '../../types';
2
+ export declare class KYCAuthService implements IWorkflowCredentialAuthService {
3
+ authenticate(_credentials: Record<string, unknown>): Promise<CredentialAuthResult>;
4
+ }
5
+ //# sourceMappingURL=kyc-auth.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kyc-auth.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/kyc/auth/kyc-auth.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAEnF,qBACa,cAAe,YAAW,8BAA8B;IAC7D,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,oBAAoB,CAAC;CASzF"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.KYCAuthService = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ let KYCAuthService = class KYCAuthService {
12
+ async authenticate(_credentials) {
13
+ return {
14
+ success: true,
15
+ message: 'KYC module credentials validated successfully',
16
+ };
17
+ }
18
+ };
19
+ exports.KYCAuthService = KYCAuthService;
20
+ exports.KYCAuthService = KYCAuthService = __decorate([
21
+ (0, common_1.Injectable)()
22
+ ], KYCAuthService);
23
+ //# sourceMappingURL=kyc-auth.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kyc-auth.service.js","sourceRoot":"","sources":["../../../../src/modules/kyc/auth/kyc-auth.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAKrC,IAAM,cAAc,GAApB,MAAM,cAAc;IACzB,KAAK,CAAC,YAAY,CAAC,YAAqC;QAItD,OAAO;YACL,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,+CAA+C;SACzD,CAAC;IACJ,CAAC;CACF,CAAA;AAVY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;GACA,cAAc,CAU1B"}
@@ -0,0 +1,3 @@
1
+ import { CredentialFieldDefinition } from '../types';
2
+ export declare const kycCredentials: CredentialFieldDefinition[];
3
+ //# sourceMappingURL=credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../src/modules/kyc/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAErD,eAAO,MAAM,cAAc,EAAE,yBAAyB,EAGrD,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.kycCredentials = void 0;
4
+ exports.kycCredentials = [];
5
+ //# sourceMappingURL=credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials.js","sourceRoot":"","sources":["../../../src/modules/kyc/credentials.ts"],"names":[],"mappings":";;;AAEa,QAAA,cAAc,GAAgC,EAG1D,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare class KYCNestModule {
2
+ }
3
+ //# sourceMappingURL=kyc-nest.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kyc-nest.module.d.ts","sourceRoot":"","sources":["../../../src/modules/kyc/kyc-nest.module.ts"],"names":[],"mappings":"AAkBA,qBAgCa,aAAa;CAAG"}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.KYCNestModule = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const typeorm_1 = require("@nestjs/typeorm");
12
+ const kyc_1 = require("@venturialstd/kyc");
13
+ const auth_1 = require("./auth");
14
+ const services_1 = require("./services");
15
+ let KYCNestModule = class KYCNestModule {
16
+ };
17
+ exports.KYCNestModule = KYCNestModule;
18
+ exports.KYCNestModule = KYCNestModule = __decorate([
19
+ (0, common_1.Module)({
20
+ imports: [
21
+ kyc_1.KYCModule.forRoot(),
22
+ typeorm_1.TypeOrmModule.forFeature([kyc_1.KYCDocument, kyc_1.KYCVerification]),
23
+ ],
24
+ providers: [
25
+ services_1.AddKYCDocumentByProviderService,
26
+ services_1.CreateKYCProfileService,
27
+ services_1.GetKYCProfileService,
28
+ services_1.UpdateKYCProfileService,
29
+ services_1.UpdateKYCStatusService,
30
+ services_1.CheckKYCStatusService,
31
+ services_1.CreateKYCDocumentService,
32
+ services_1.GetKYCDocumentService,
33
+ services_1.GetKYCDocumentsByProfileService,
34
+ services_1.UpdateKYCDocumentService,
35
+ auth_1.KYCAuthService,
36
+ ],
37
+ exports: [
38
+ services_1.AddKYCDocumentByProviderService,
39
+ services_1.CreateKYCProfileService,
40
+ services_1.GetKYCProfileService,
41
+ services_1.UpdateKYCProfileService,
42
+ services_1.UpdateKYCStatusService,
43
+ services_1.CheckKYCStatusService,
44
+ services_1.CreateKYCDocumentService,
45
+ services_1.GetKYCDocumentService,
46
+ services_1.GetKYCDocumentsByProfileService,
47
+ services_1.UpdateKYCDocumentService,
48
+ auth_1.KYCAuthService,
49
+ ],
50
+ })
51
+ ], KYCNestModule);
52
+ //# sourceMappingURL=kyc-nest.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kyc-nest.module.js","sourceRoot":"","sources":["../../../src/modules/kyc/kyc-nest.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,2CAA4E;AAE5E,iCAAwC;AACxC,yCAWoB;AAkCb,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAG,CAAA;AAAhB,sCAAa;wBAAb,aAAa;IAhCzB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,eAAS,CAAC,OAAO,EAAE;YACnB,uBAAa,CAAC,UAAU,CAAC,CAAC,iBAAW,EAAE,qBAAe,CAAC,CAAC;SACzD;QACD,SAAS,EAAE;YACT,0CAA+B;YAC/B,kCAAuB;YACvB,+BAAoB;YACpB,kCAAuB;YACvB,iCAAsB;YACtB,gCAAqB;YACrB,mCAAwB;YACxB,gCAAqB;YACrB,0CAA+B;YAC/B,mCAAwB;YACxB,qBAAc;SACf;QACD,OAAO,EAAE;YACP,0CAA+B;YAC/B,kCAAuB;YACvB,+BAAoB;YACpB,kCAAuB;YACvB,iCAAsB;YACtB,gCAAqB;YACrB,mCAAwB;YACxB,gCAAqB;YACrB,0CAA+B;YAC/B,mCAAwB;YACxB,qBAAc;SACf;KACF,CAAC;GACW,aAAa,CAAG"}
@@ -0,0 +1,3 @@
1
+ import { WorkflowModuleDefinition } from '../types';
2
+ export declare const kycModule: WorkflowModuleDefinition;
3
+ //# sourceMappingURL=kyc.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kyc.module.d.ts","sourceRoot":"","sources":["../../../src/modules/kyc/kyc.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAgBpF,eAAO,MAAM,SAAS,EAAE,wBA0BvB,CAAC"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.kycModule = void 0;
4
+ const actions_1 = require("./actions");
5
+ const kyc_auth_service_1 = require("./auth/kyc-auth.service");
6
+ const credentials_1 = require("./credentials");
7
+ exports.kycModule = {
8
+ key: 'kyc',
9
+ name: 'KYC',
10
+ description: 'Know Your Customer operations including profile management, document uploads, and verification status tracking',
11
+ icon: '🆔',
12
+ version: '1.0.0',
13
+ credentialFields: credentials_1.kycCredentials,
14
+ authServiceClass: kyc_auth_service_1.KYCAuthService,
15
+ actions: [
16
+ actions_1.createKYCProfileAction,
17
+ actions_1.getKYCProfileAction,
18
+ actions_1.updateKYCProfileAction,
19
+ actions_1.updateKYCStatusAction,
20
+ actions_1.checkKYCStatusAction,
21
+ actions_1.createKYCDocumentAction,
22
+ actions_1.addKYCDocumentByProviderAction,
23
+ actions_1.getKYCDocumentAction,
24
+ actions_1.getKYCDocumentsByProfileAction,
25
+ actions_1.updateKYCDocumentAction,
26
+ ],
27
+ triggers: [],
28
+ };
29
+ //# sourceMappingURL=kyc.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kyc.module.js","sourceRoot":"","sources":["../../../src/modules/kyc/kyc.module.ts"],"names":[],"mappings":";;;AACA,uCAWmB;AACnB,8DAAyD;AACzD,+CAA+C;AAElC,QAAA,SAAS,GAA6B;IACjD,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,KAAK;IACX,WAAW,EACT,gHAAgH;IAClH,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,OAAO;IAChB,gBAAgB,EAAE,4BAAc;IAChC,gBAAgB,EAAE,iCAEiB;IACnC,OAAO,EAAE;QAEP,gCAAsB;QACtB,6BAAmB;QACnB,gCAAsB;QACtB,+BAAqB;QACrB,8BAAoB;QAEpB,iCAAuB;QACvB,wCAA8B;QAC9B,8BAAoB;QACpB,wCAA8B;QAC9B,iCAAuB;KACxB;IACD,QAAQ,EAAE,EAAE;CACb,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { KYCDocument, KYCVerification } from '@venturialstd/kyc';
2
+ import { Repository } from 'typeorm';
3
+ import { IWorkflowActionService, WorkflowActionContext } from '../../types';
4
+ export declare class AddKYCDocumentByProviderService implements IWorkflowActionService {
5
+ private readonly kycDocumentRepository;
6
+ private readonly kycVerificationRepository;
7
+ constructor(kycDocumentRepository: Repository<KYCDocument>, kycVerificationRepository: Repository<KYCVerification>);
8
+ perform(inputs: Record<string, unknown>, _context: WorkflowActionContext): Promise<Record<string, unknown>>;
9
+ }
10
+ //# sourceMappingURL=add-kyc-document-by-provider.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-kyc-document-by-provider.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/kyc/services/add-kyc-document-by-provider.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,WAAW,EACX,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAE5E,qBACa,+BAAgC,YAAW,sBAAsB;IAG1E,OAAO,CAAC,QAAQ,CAAC,qBAAqB;IAEtC,OAAO,CAAC,QAAQ,CAAC,yBAAyB;gBAFzB,qBAAqB,EAAE,UAAU,CAAC,WAAW,CAAC,EAE9C,yBAAyB,EAAE,UAAU,CAAC,eAAe,CAAC;IAGnE,OAAO,CACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,QAAQ,EAAE,qBAAqB,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAmGpC"}
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.AddKYCDocumentByProviderService = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const typeorm_1 = require("@nestjs/typeorm");
18
+ const kyc_1 = require("@venturialstd/kyc");
19
+ const typeorm_2 = require("typeorm");
20
+ let AddKYCDocumentByProviderService = class AddKYCDocumentByProviderService {
21
+ kycDocumentRepository;
22
+ kycVerificationRepository;
23
+ constructor(kycDocumentRepository, kycVerificationRepository) {
24
+ this.kycDocumentRepository = kycDocumentRepository;
25
+ this.kycVerificationRepository = kycVerificationRepository;
26
+ }
27
+ async perform(inputs, _context) {
28
+ const provider = inputs.provider;
29
+ const providerVerificationId = inputs.providerVerificationId;
30
+ const kycProfileId = inputs.kycProfileId;
31
+ const documentType = inputs.documentType;
32
+ const side = inputs.side || kyc_1.KYC_DOCUMENT_SIDE.FRONT;
33
+ const status = inputs.status || kyc_1.KYC_DOCUMENT_STATUS.PENDING;
34
+ if (!provider) {
35
+ throw new Error('provider is required');
36
+ }
37
+ if (!providerVerificationId) {
38
+ throw new Error('providerVerificationId is required');
39
+ }
40
+ if (!documentType) {
41
+ throw new Error('documentType is required');
42
+ }
43
+ let profileId = kycProfileId;
44
+ if (!profileId) {
45
+ const verification = await this.kycVerificationRepository.findOne({
46
+ where: {
47
+ provider,
48
+ providerVerificationId,
49
+ },
50
+ });
51
+ if (verification) {
52
+ profileId = verification.kycProfileId;
53
+ }
54
+ else {
55
+ throw new Error(`Verification not found for provider ${provider} with verification ID ${providerVerificationId}. Please provide kycProfileId.`);
56
+ }
57
+ }
58
+ const docData = {
59
+ kycProfileId: profileId,
60
+ documentType,
61
+ side,
62
+ status,
63
+ documentNumber: inputs.documentNumber,
64
+ issuingCountry: inputs.issuingCountry,
65
+ issueDate: inputs.issueDate,
66
+ expiryDate: inputs.expiryDate,
67
+ frontFileUrl: inputs.frontFileUrl,
68
+ frontFileName: inputs.frontFileName,
69
+ frontFileType: inputs.frontFileType,
70
+ frontFileSize: inputs.frontFileSize,
71
+ backFileUrl: inputs.backFileUrl,
72
+ backFileName: inputs.backFileName,
73
+ backFileType: inputs.backFileType,
74
+ backFileSize: inputs.backFileSize,
75
+ verificationNotes: inputs.verificationNotes,
76
+ rejectionReason: inputs.rejectionReason,
77
+ extractedData: inputs.extractedData
78
+ ? typeof inputs.extractedData === 'string'
79
+ ? JSON.parse(inputs.extractedData)
80
+ : inputs.extractedData
81
+ : undefined,
82
+ metadata: {
83
+ provider,
84
+ providerVerificationId,
85
+ ...(inputs.metadata
86
+ ? typeof inputs.metadata === 'string'
87
+ ? JSON.parse(inputs.metadata)
88
+ : inputs.metadata
89
+ : {}),
90
+ },
91
+ };
92
+ const document = this.kycDocumentRepository.create(docData);
93
+ const savedDocument = await this.kycDocumentRepository.save(document);
94
+ return {
95
+ id: savedDocument.id,
96
+ kycProfileId: savedDocument.kycProfileId,
97
+ documentType: savedDocument.documentType,
98
+ side: savedDocument.side,
99
+ status: savedDocument.status,
100
+ documentNumber: savedDocument.documentNumber,
101
+ issuingCountry: savedDocument.issuingCountry,
102
+ issueDate: savedDocument.issueDate,
103
+ expiryDate: savedDocument.expiryDate,
104
+ frontFileUrl: savedDocument.frontFileUrl,
105
+ frontFileName: savedDocument.frontFileName,
106
+ frontFileType: savedDocument.frontFileType,
107
+ frontFileSize: savedDocument.frontFileSize,
108
+ backFileUrl: savedDocument.backFileUrl,
109
+ backFileName: savedDocument.backFileName,
110
+ backFileType: savedDocument.backFileType,
111
+ backFileSize: savedDocument.backFileSize,
112
+ createdAt: savedDocument.createdAt?.toISOString() || new Date().toISOString(),
113
+ updatedAt: savedDocument.updatedAt?.toISOString() || new Date().toISOString(),
114
+ };
115
+ }
116
+ };
117
+ exports.AddKYCDocumentByProviderService = AddKYCDocumentByProviderService;
118
+ exports.AddKYCDocumentByProviderService = AddKYCDocumentByProviderService = __decorate([
119
+ (0, common_1.Injectable)(),
120
+ __param(0, (0, typeorm_1.InjectRepository)(kyc_1.KYCDocument)),
121
+ __param(1, (0, typeorm_1.InjectRepository)(kyc_1.KYCVerification)),
122
+ __metadata("design:paramtypes", [typeorm_2.Repository,
123
+ typeorm_2.Repository])
124
+ ], AddKYCDocumentByProviderService);
125
+ //# sourceMappingURL=add-kyc-document-by-provider.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-kyc-document-by-provider.service.js","sourceRoot":"","sources":["../../../../src/modules/kyc/services/add-kyc-document-by-provider.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,2CAM2B;AAC3B,qCAAqC;AAK9B,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;IAGvB;IAEA;IAJnB,YAEmB,qBAA8C,EAE9C,yBAAsD;QAFtD,0BAAqB,GAArB,qBAAqB,CAAyB;QAE9C,8BAAyB,GAAzB,yBAAyB,CAA6B;IACtE,CAAC;IAEJ,KAAK,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AAE;YACpB,YAAY,EAAE,aAAa,CAAC,YAAY;YACxC,YAAY,EAAE,aAAa,CAAC,YAAY;YACxC,IAAI,EAAE,aAAa,CAAC,IAAI;YACxB,MAAM,EAAE,aAAa,CAAC,MAAM;YAC5B,cAAc,EAAE,aAAa,CAAC,cAAc;YAC5C,cAAc,EAAE,aAAa,CAAC,cAAc;YAC5C,SAAS,EAAE,aAAa,CAAC,SAAS;YAClC,UAAU,EAAE,aAAa,CAAC,UAAU;YACpC,YAAY,EAAE,aAAa,CAAC,YAAY;YACxC,aAAa,EAAE,aAAa,CAAC,aAAa;YAC1C,aAAa,EAAE,aAAa,CAAC,aAAa;YAC1C,aAAa,EAAE,aAAa,CAAC,aAAa;YAC1C,WAAW,EAAE,aAAa,CAAC,WAAW;YACtC,YAAY,EAAE,aAAa,CAAC,YAAY;YACxC,YAAY,EAAE,aAAa,CAAC,YAAY;YACxC,YAAY,EAAE,aAAa,CAAC,YAAY;YACxC,SAAS,EAAE,aAAa,CAAC,SAAS,EAAE,WAAW,EAAE,IAAI,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YAC7E,SAAS,EAAE,aAAa,CAAC,SAAS,EAAE,WAAW,EAAE,IAAI,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SAC9E,CAAC;IACJ,CAAC;CACF,CAAA;AA9GY,0EAA+B;0CAA/B,+BAA+B;IAD3C,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,iBAAW,CAAC,CAAA;IAE7B,WAAA,IAAA,0BAAgB,EAAC,qBAAe,CAAC,CAAA;qCADM,oBAAU;QAEN,oBAAU;GAL7C,+BAA+B,CA8G3C"}
@@ -0,0 +1,8 @@
1
+ import { KYCService } from '@venturialstd/kyc';
2
+ import { IWorkflowActionService, WorkflowActionContext } from '../../types';
3
+ export declare class CheckKYCStatusService implements IWorkflowActionService {
4
+ private readonly kycService;
5
+ constructor(kycService: KYCService);
6
+ perform(inputs: Record<string, unknown>, _context: WorkflowActionContext): Promise<Record<string, unknown>>;
7
+ }
8
+ //# sourceMappingURL=check-kyc-status.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-kyc-status.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/kyc/services/check-kyc-status.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAc,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAE5E,qBACa,qBAAsB,YAAW,sBAAsB;IACtD,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU;IAE7C,OAAO,CACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,QAAQ,EAAE,qBAAqB,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAmBpC"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CheckKYCStatusService = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const kyc_1 = require("@venturialstd/kyc");
15
+ let CheckKYCStatusService = class CheckKYCStatusService {
16
+ kycService;
17
+ constructor(kycService) {
18
+ this.kycService = kycService;
19
+ }
20
+ async perform(inputs, _context) {
21
+ const userId = inputs.userId;
22
+ if (!userId) {
23
+ throw new Error('userId is required');
24
+ }
25
+ const isCompleted = await this.kycService.isKYCCompleted(userId);
26
+ const verificationLevel = await this.kycService.getVerificationLevel(userId);
27
+ const profile = await this.kycService.findByUserId(userId);
28
+ return {
29
+ userId,
30
+ isCompleted,
31
+ verificationLevel: verificationLevel || 'NONE',
32
+ status: profile?.status || kyc_1.KYC_STATUS.PENDING,
33
+ hasProfile: !!profile,
34
+ profileId: profile?.id || null,
35
+ };
36
+ }
37
+ };
38
+ exports.CheckKYCStatusService = CheckKYCStatusService;
39
+ exports.CheckKYCStatusService = CheckKYCStatusService = __decorate([
40
+ (0, common_1.Injectable)(),
41
+ __metadata("design:paramtypes", [kyc_1.KYCService])
42
+ ], CheckKYCStatusService);
43
+ //# sourceMappingURL=check-kyc-status.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-kyc-status.service.js","sourceRoot":"","sources":["../../../../src/modules/kyc/services/check-kyc-status.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,2CAA2D;AAKpD,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IACH;IAA7B,YAA6B,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAEvD,KAAK,CAAC,OAAO,CACX,MAA+B,EAC/B,QAA+B;QAE/B,MAAM,MAAM,GAAG,MAAM,CAAC,MAAgB,CAAC;QACvC,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;QACxC,CAAC;QAED,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QACjE,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;QAC7E,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QAE3D,OAAO;YACL,MAAM;YACN,WAAW;YACX,iBAAiB,EAAE,iBAAiB,IAAI,MAAM;YAC9C,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,gBAAU,CAAC,OAAO;YAC7C,UAAU,EAAE,CAAC,CAAC,OAAO;YACrB,SAAS,EAAE,OAAO,EAAE,EAAE,IAAI,IAAI;SAC/B,CAAC;IACJ,CAAC;CACF,CAAA;AAzBY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;qCAE8B,gBAAU;GADxC,qBAAqB,CAyBjC"}
@@ -0,0 +1,9 @@
1
+ import { KYCDocument } from '@venturialstd/kyc';
2
+ import { Repository } from 'typeorm';
3
+ import { IWorkflowActionService, WorkflowActionContext } from '../../types';
4
+ export declare class CreateKYCDocumentService implements IWorkflowActionService {
5
+ private readonly kycDocumentRepository;
6
+ constructor(kycDocumentRepository: Repository<KYCDocument>);
7
+ perform(inputs: Record<string, unknown>, _context: WorkflowActionContext): Promise<Record<string, unknown>>;
8
+ }
9
+ //# sourceMappingURL=create-kyc-document.service.d.ts.map