@burgan-tech/morph-idm-runtime 0.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 (206) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +245 -0
  3. package/burgan-tech-morph-idm-runtime-0.0.0.tgz +0 -0
  4. package/morph-idm/Extensions/.gitkeep +0 -0
  5. package/morph-idm/Functions/.gitkeep +0 -0
  6. package/morph-idm/Functions/user/function-validate-user.json +31 -0
  7. package/morph-idm/Functions/user/src/ValidateUser.csx +39 -0
  8. package/morph-idm/Mappings/device-register-evaluate-get-device-request.mapper.json +319 -0
  9. package/morph-idm/Mappings/device-register-evaluate-get-device-response.mapper.json +761 -0
  10. package/morph-idm/Mappings/device-register-new-device-call-device-start-request.mapper.json +762 -0
  11. package/morph-idm/Mappings/device-register-start.mapper.json +971 -0
  12. package/morph-idm/Mappings/device-start-request.mapper.json +20 -0
  13. package/morph-idm/Mappings/device-start.mapper.json +896 -0
  14. package/morph-idm/Mappings/device-update-request.mapper.json +883 -0
  15. package/morph-idm/Mappings/token-start-request.mapper.json +436 -0
  16. package/morph-idm/Schemas/approval-matrix/approval-matrix-master-1.0.0.json +98 -0
  17. package/morph-idm/Schemas/approval-matrix/approval-matrix-update-1.0.0.json +85 -0
  18. package/morph-idm/Schemas/client/client-master-1.0.0.json +293 -0
  19. package/morph-idm/Schemas/client/client-update-master-1.0.0.json +201 -0
  20. package/morph-idm/Schemas/consent/consent-master-1.0.0.json +151 -0
  21. package/morph-idm/Schemas/device/device-master-1.0.0.json +433 -0
  22. package/morph-idm/Schemas/device/device-register-master-1.0.0.json +300 -0
  23. package/morph-idm/Schemas/device/device-register-start-1.0.0.json +270 -0
  24. package/morph-idm/Schemas/device/device-start-1.0.0.json +281 -0
  25. package/morph-idm/Schemas/device/device-update-1.0.0.json +275 -0
  26. package/morph-idm/Schemas/headers-1.0.0.json +245 -0
  27. package/morph-idm/Schemas/organization/organization-master-1.0.0.json +386 -0
  28. package/morph-idm/Schemas/organization/organization-update-1.0.0.json +60 -0
  29. package/morph-idm/Schemas/privilege/privilege-master-1.0.0.json +84 -0
  30. package/morph-idm/Schemas/privilege/privilege-update-1.0.0.json +76 -0
  31. package/morph-idm/Schemas/scope/scope-group-master-1.0.0.json +52 -0
  32. package/morph-idm/Schemas/scope/scope-master-1.0.0.json +120 -0
  33. package/morph-idm/Schemas/token/token-master-1.0.0.json +346 -0
  34. package/morph-idm/Schemas/token/token-start-1.0.0.json +50 -0
  35. package/morph-idm/Schemas/transaction-limit/transaction-limit-master-1.0.0.json +175 -0
  36. package/morph-idm/Schemas/transaction-limit/transaction-limit-update-1.0.0.json +90 -0
  37. package/morph-idm/Schemas/user/person-master-1.0.0.json +211 -0
  38. package/morph-idm/Schemas/user/user-master-1.0.0.json +121 -0
  39. package/morph-idm/Tasks/.gitkeep +0 -0
  40. package/morph-idm/Tasks/call-device-start-1.0.0.json +21 -0
  41. package/morph-idm/Tasks/call-device-update-1.0.0.json +21 -0
  42. package/morph-idm/Tasks/client/client-create-rsa.json +26 -0
  43. package/morph-idm/Tasks/client/client-password-generator.json +14 -0
  44. package/morph-idm/Tasks/client/get-client-by-task.json +18 -0
  45. package/morph-idm/Tasks/consent/get-consent-by-task.json +18 -0
  46. package/morph-idm/Tasks/consent/get-multi-consents-by-task.json +25 -0
  47. package/morph-idm/Tasks/device/get-device-by-task.json +18 -0
  48. package/morph-idm/Tasks/get-device-1.0.0.json +20 -0
  49. package/morph-idm/Tasks/scope/get-scope-by-task.json +17 -0
  50. package/morph-idm/Tasks/scope/scope-by-user-task.json +25 -0
  51. package/morph-idm/Tasks/scope/scope-details-task.json +25 -0
  52. package/morph-idm/Tasks/token/send-token-to-main.json +20 -0
  53. package/morph-idm/Tasks/token/token-create-jwt.json +27 -0
  54. package/morph-idm/Tasks/user/get-user-by-task.json +18 -0
  55. package/morph-idm/Tasks/user/send-otp-task.json +25 -0
  56. package/morph-idm/Tasks/user/send-push-task.json +22 -0
  57. package/morph-idm/Tasks/user/user-password-generator.json +26 -0
  58. package/morph-idm/Tasks/user/verify-otp-task.json +22 -0
  59. package/morph-idm/Tasks/user/verify-push-task.json +22 -0
  60. package/morph-idm/Views/.gitkeep +0 -0
  61. package/morph-idm/Workflows/.gitkeep +0 -0
  62. package/morph-idm/Workflows/approval-matrix/approval-1.0.0.json +452 -0
  63. package/morph-idm/Workflows/approval-matrix/approval-matrix-1.0.0.json +184 -0
  64. package/morph-idm/Workflows/client/client-1.0.0.json +257 -0
  65. package/morph-idm/Workflows/client/client-update-1.0.0.json +202 -0
  66. package/morph-idm/Workflows/client/execute/client.http +377 -0
  67. package/morph-idm/Workflows/client/src/ClientCreateRsa.csx +198 -0
  68. package/morph-idm/Workflows/client/src/ClientCreateRsaByScript.csx +118 -0
  69. package/morph-idm/Workflows/client/src/CreateRsaByHttpCallMapping.csx +223 -0
  70. package/morph-idm/Workflows/client/src/PasswordGeneratorMapping.csx +26 -0
  71. package/morph-idm/Workflows/client/src/RsaExistsRule.csx +44 -0
  72. package/morph-idm/Workflows/client-manager/client-manager-1.0.0.json +217 -0
  73. package/morph-idm/Workflows/client-manager/execute/client-manager.http +214 -0
  74. package/morph-idm/Workflows/client-manager/src/ClientCreatedRule.csx +28 -0
  75. package/morph-idm/Workflows/client-manager/src/ClientExistsRule.csx +25 -0
  76. package/morph-idm/Workflows/client-manager/src/CreateClientSubFlowMapping.csx +63 -0
  77. package/morph-idm/Workflows/client-manager/src/GetClientForManagerMapping.csx +59 -0
  78. package/morph-idm/Workflows/consent/consent-1.0.0.json +424 -0
  79. package/morph-idm/Workflows/consent/execute/README.md +167 -0
  80. package/morph-idm/Workflows/consent/execute/consent-invitation-flow.http +283 -0
  81. package/morph-idm/Workflows/consent/execute/create-consent.http +780 -0
  82. package/morph-idm/Workflows/consent/src/AutoConsentRule.csx +29 -0
  83. package/morph-idm/Workflows/consent/src/ConsentTimeoutTimer.csx +14 -0
  84. package/morph-idm/Workflows/consent-selection/consent-selection-1.0.0.json +331 -0
  85. package/morph-idm/Workflows/consent-selection/src/AutoConsentCreatedRule.csx +28 -0
  86. package/morph-idm/Workflows/consent-selection/src/ConsentFetchMapping.csx +82 -0
  87. package/morph-idm/Workflows/consent-selection/src/ConsentSelectedMapping.csx +70 -0
  88. package/morph-idm/Workflows/consent-selection/src/CreateAutoConsentMapping.csx +150 -0
  89. package/morph-idm/Workflows/consent-selection/src/MultipleConsentsRule.csx +31 -0
  90. package/morph-idm/Workflows/consent-selection/src/NoConsentEligibleRule.csx +44 -0
  91. package/morph-idm/Workflows/consent-selection/src/SingleConsentRule.csx +45 -0
  92. package/morph-idm/Workflows/device/device-1.0.0.json +261 -0
  93. package/morph-idm/Workflows/device/device-migration-1.0.0.json +213 -0
  94. package/morph-idm/Workflows/device/device-register-1.0.0-documentation.md +646 -0
  95. package/morph-idm/Workflows/device/device-register-1.0.0-documentation.svg +36 -0
  96. package/morph-idm/Workflows/device/device-register-1.0.0.json +185 -0
  97. package/morph-idm/Workflows/device/execute/device-android.http +260 -0
  98. package/morph-idm/Workflows/device/execute/device-huawei.http +219 -0
  99. package/morph-idm/Workflows/device/execute/device-ios.http +325 -0
  100. package/morph-idm/Workflows/device/execute/device-web.http +284 -0
  101. package/morph-idm/Workflows/device/src/DeviceCreatedRule.csx +32 -0
  102. package/morph-idm/Workflows/device/src/DeviceFoundRule.csx +32 -0
  103. package/morph-idm/Workflows/device/src/DeviceNotFoundRule.csx +28 -0
  104. package/morph-idm/Workflows/device/src/DeviceUpdatedRule.csx +26 -0
  105. package/morph-idm/Workflows/device/src/NoUpdateRule.csx +19 -0
  106. package/morph-idm/Workflows/device/src/ReInstallRule.csx +19 -0
  107. package/morph-idm/Workflows/document-validation/_FF_document-validation.json +423 -0
  108. package/morph-idm/Workflows/document-validation/src/ApproveRule.csx +16 -0
  109. package/morph-idm/Workflows/document-validation/src/ClassifyRule.csx +16 -0
  110. package/morph-idm/Workflows/document-validation/src/ExtractRule.csx +16 -0
  111. package/morph-idm/Workflows/document-validation/src/HitlRule.csx +16 -0
  112. package/morph-idm/Workflows/document-validation/src/RejectRule.csx +16 -0
  113. package/morph-idm/Workflows/document-validation/src/RunOcrRule.csx +16 -0
  114. package/morph-idm/Workflows/document-validation/src/StartRule.csx +16 -0
  115. package/morph-idm/Workflows/document-validation/src/ToAggregateRule.csx +16 -0
  116. package/morph-idm/Workflows/document-validation/src/ToFraudRule.csx +16 -0
  117. package/morph-idm/Workflows/document-validation/src/ToReferentialRule.csx +16 -0
  118. package/morph-idm/Workflows/document-validation/src/ToSemanticRule.csx +16 -0
  119. package/morph-idm/Workflows/document-validation/src/ToStructuralRule.csx +16 -0
  120. package/morph-idm/Workflows/organization/execute/create-organization.http +280 -0
  121. package/morph-idm/Workflows/organization/organization-1.0.0-documentation.md +616 -0
  122. package/morph-idm/Workflows/organization/organization-1.0.0.json +181 -0
  123. package/morph-idm/Workflows/privilege/privilege-1.0.0.json +185 -0
  124. package/morph-idm/Workflows/scope/execute/scope-24-7-access.http +131 -0
  125. package/morph-idm/Workflows/scope/execute/scope-business-hours.http +138 -0
  126. package/morph-idm/Workflows/scope/execute/scope-corporate.http +165 -0
  127. package/morph-idm/Workflows/scope/execute/scope-individual.http +133 -0
  128. package/morph-idm/Workflows/scope/execute/scope-lifecycle-test.http +133 -0
  129. package/morph-idm/Workflows/scope/execute/scope-multi-systems.http +159 -0
  130. package/morph-idm/Workflows/scope/execute/scope-restricted.http +143 -0
  131. package/morph-idm/Workflows/scope/scope-1.0.0.json +142 -0
  132. package/morph-idm/Workflows/scope/scope-group-1.0.0.json +144 -0
  133. package/morph-idm/Workflows/scope-group/execute/create-scope-group.http +222 -0
  134. package/morph-idm/Workflows/token/execute/README.md +450 -0
  135. package/morph-idm/Workflows/token/execute/token.http +236 -0
  136. package/morph-idm/Workflows/token/oauth-authentication-workflow.json +406 -0
  137. package/morph-idm/Workflows/token/password-subflow.json +173 -0
  138. package/morph-idm/Workflows/token/scope-cdc-worker.1.0.0.json +46 -0
  139. package/morph-idm/Workflows/token/src/CreateRsaJwtMapping.csx +208 -0
  140. package/morph-idm/Workflows/token/src/ExpireTokenTimer.csx +14 -0
  141. package/morph-idm/Workflows/token/src/PrepareAuthorizationCodeRule.csx +16 -0
  142. package/morph-idm/Workflows/token/src/RequestInappropriateRule.csx +16 -0
  143. package/morph-idm/Workflows/token/src/SendJwtToMainMapping.csx +167 -0
  144. package/morph-idm/Workflows/token/token-1.0.0.json +356 -0
  145. package/morph-idm/Workflows/token/token-1.0.0.openapi.json.md +707 -0
  146. package/morph-idm/Workflows/token/token-exchange.1.0.0.json +45 -0
  147. package/morph-idm/Workflows/transaction-limit/transaction-limit-1.0.0.json +244 -0
  148. package/morph-idm/Workflows/transaction-limit/transaction-limit-authorization.json +502 -0
  149. package/morph-idm/Workflows/transaction-limit/transaction-limit-capture.json +142 -0
  150. package/morph-idm/Workflows/user/execute/README-LOGIN.md +535 -0
  151. package/morph-idm/Workflows/user/execute/create-user-1234567890.http +116 -0
  152. package/morph-idm/Workflows/user/execute/create-user-minimal.http +22 -0
  153. package/morph-idm/Workflows/user/execute/create-user-person-password.http +130 -0
  154. package/morph-idm/Workflows/user/execute/create-user-person.http +249 -0
  155. package/morph-idm/Workflows/user/execute/create-user-system.http +16 -0
  156. package/morph-idm/Workflows/user/execute/user-login.http +583 -0
  157. package/morph-idm/Workflows/user/execute/user-requests.http +51 -0
  158. package/morph-idm/Workflows/user/person-1.0.0.json +140 -0
  159. package/morph-idm/Workflows/user/person-cdc-worker.1.0.0.json +46 -0
  160. package/morph-idm/Workflows/user/person-upsert-1.0.0.json +129 -0
  161. package/morph-idm/Workflows/user/src/ApproveRule.csx +16 -0
  162. package/morph-idm/Workflows/user/src/AutoConsentCreatedRule.csx +20 -0
  163. package/morph-idm/Workflows/user/src/AutoConsentRequiredRule.csx +77 -0
  164. package/morph-idm/Workflows/user/src/CheckDeviceByUserReferenceMapping.csx +66 -0
  165. package/morph-idm/Workflows/user/src/ClientValidationFailRule.csx +28 -0
  166. package/morph-idm/Workflows/user/src/ClientValidationRule.csx +25 -0
  167. package/morph-idm/Workflows/user/src/ConsentSelectedRule.csx +24 -0
  168. package/morph-idm/Workflows/user/src/ConsentValidationRule.csx +36 -0
  169. package/morph-idm/Workflows/user/src/CreateAutoConsentMapping.csx +171 -0
  170. package/morph-idm/Workflows/user/src/DeviceFoundForLoginRule.csx +32 -0
  171. package/morph-idm/Workflows/user/src/DeviceNotFoundForLoginRule.csx +31 -0
  172. package/morph-idm/Workflows/user/src/GetClientMapping.csx +45 -0
  173. package/morph-idm/Workflows/user/src/GetConsentMapping.csx +27 -0
  174. package/morph-idm/Workflows/user/src/GetDeviceMapping.csx +52 -0
  175. package/morph-idm/Workflows/user/src/GetScopeMapping.csx +139 -0
  176. package/morph-idm/Workflows/user/src/GetScopesByUserMapping.csx +137 -0
  177. package/morph-idm/Workflows/user/src/GetUserMapping.csx +39 -0
  178. package/morph-idm/Workflows/user/src/GrantValidationFailRule.csx +48 -0
  179. package/morph-idm/Workflows/user/src/GrantValidationRule.csx +45 -0
  180. package/morph-idm/Workflows/user/src/IsIbWebClientWithDeviceRule.csx +42 -0
  181. package/morph-idm/Workflows/user/src/NonIbWebClientWithDeviceRule.csx +42 -0
  182. package/morph-idm/Workflows/user/src/OtpSentRule.csx +31 -0
  183. package/morph-idm/Workflows/user/src/OtpVerifiedRule.csx +31 -0
  184. package/morph-idm/Workflows/user/src/PushSentRule.csx +31 -0
  185. package/morph-idm/Workflows/user/src/PushVerifiedRule.csx +31 -0
  186. package/morph-idm/Workflows/user/src/RejectRule.csx +16 -0
  187. package/morph-idm/Workflows/user/src/ScopeFetchedRule.csx +35 -0
  188. package/morph-idm/Workflows/user/src/ScopeValidationFailRule.csx +67 -0
  189. package/morph-idm/Workflows/user/src/ScopeValidationRule.csx +67 -0
  190. package/morph-idm/Workflows/user/src/SendOtpMapping.csx +94 -0
  191. package/morph-idm/Workflows/user/src/SendPushMapping.csx +90 -0
  192. package/morph-idm/Workflows/user/src/TokenGenerationSuccessRule.csx +28 -0
  193. package/morph-idm/Workflows/user/src/TriggerConsentSelectionAsSubFlowMapping.csx +63 -0
  194. package/morph-idm/Workflows/user/src/TriggerTokenWorkflowAsSubFlowMapping.csx +42 -0
  195. package/morph-idm/Workflows/user/src/UserPasswordGeneratorMapping.csx +190 -0
  196. package/morph-idm/Workflows/user/src/UserValidationFailRule.csx +36 -0
  197. package/morph-idm/Workflows/user/src/UserValidationRule.csx +38 -0
  198. package/morph-idm/Workflows/user/src/VerifyOtpMapping.csx +65 -0
  199. package/morph-idm/Workflows/user/src/VerifyPushMapping.csx +65 -0
  200. package/morph-idm/Workflows/user/user-1.0.0.json +400 -0
  201. package/morph-idm/Workflows/user/user-force-update.1.0.0.json +46 -0
  202. package/morph-idm/Workflows/user/user-login-certificate.1.0.0.json +46 -0
  203. package/morph-idm/Workflows/user/user-login.1.0.0.json +1144 -0
  204. package/morph-idm/Workflows/user/user-password-reset.1.0.0.json +45 -0
  205. package/package.json +21 -0
  206. package/vnext.config.json +58 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Burgan Tech
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,245 @@
1
+ # morph-idm
2
+
3
+ A structured template package for vNext workflow components with domain-based architecture. This package provides a foundation for building scalable workflow systems with schemas, tasks, views, functions, and extensions.
4
+
5
+ [![npm version](https://badge.fury.io/js/%40burgan-tech%2Fvnext-template.svg)](https://badge.fury.io/js/%40burgan-tech%2Fvnext-template)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ ## 🚀 Features
9
+
10
+ - **Domain-Driven Architecture**: Organized by business domains with clear separation of concerns
11
+ - **Component-Based Structure**: Modular design with schemas, workflows, tasks, views, functions, and extensions
12
+ - **JSON Schema Validation**: Built-in validation for all component definitions
13
+ - **Template System**: Ready-to-use template structure for new vNext projects
14
+ - **Type Safety**: Structured exports with clear APIs for accessing components
15
+
16
+ ## 📦 Installation
17
+
18
+ ### Install as dependency
19
+ ```bash
20
+ npm install @my-organization/morph-idm
21
+ ```
22
+
23
+ ### Install as dev dependency
24
+ ```bash
25
+ npm install --save-dev @my-organization/morph-idm
26
+ ```
27
+
28
+ ## 🏗️ Project Structure
29
+
30
+ ```
31
+ vnext-template/
32
+ ├── morph-idm/ # Domain-specific components
33
+ │ ├── Extensions/ # Extension definitions
34
+ │ ├── Functions/ # Function definitions
35
+ │ ├── Schemas/ # JSON schema definitions
36
+ │ ├── Tasks/ # Task definitions
37
+ │ ├── Views/ # View components
38
+ │ └── Workflows/ # Workflow definitions
39
+ ├── index.js # Main entry point
40
+ ├── vnext.config.json # Domain configuration
41
+ └── package.json # Package metadata
42
+ ```
43
+
44
+ ## 📚 Usage
45
+
46
+ ### Basic Usage
47
+
48
+ ```javascript
49
+ const vnextTemplate = require('@my-organization/morph-idm');
50
+
51
+ // Get domain configuration
52
+ const config = vnextTemplate.getDomainConfig();
53
+ console.log('Domain config:', config);
54
+
55
+ // Get all available component types
56
+ const availableTypes = vnextTemplate.getAvailableTypes();
57
+ console.log('Available types:', availableTypes);
58
+ // Output: ['schemas', 'workflows', 'tasks', 'views', 'functions', 'extensions']
59
+
60
+ // Get domain name
61
+ const domainName = vnextTemplate.getDomainName();
62
+ console.log('Domain name:', domainName);
63
+ ```
64
+
65
+ ### Component Access
66
+
67
+ ```javascript
68
+ // Load specific component types
69
+ const schemas = vnextTemplate.getSchemas();
70
+ const workflows = vnextTemplate.getWorkflows();
71
+ const tasks = vnextTemplate.getTasks();
72
+ const views = vnextTemplate.getViews();
73
+ const functions = vnextTemplate.getFunctions();
74
+ const extensions = vnextTemplate.getExtensions();
75
+
76
+ // Example: Working with schemas
77
+ Object.keys(schemas).forEach(schemaName => {
78
+ console.log(`Schema: ${schemaName}`, schemas[schemaName]);
79
+ });
80
+
81
+ // Example: Working with workflows
82
+ Object.keys(workflows).forEach(workflowName => {
83
+ console.log(`Workflow: ${workflowName}`, workflows[workflowName]);
84
+ });
85
+ ```
86
+
87
+ ### Integration Example
88
+
89
+ ```javascript
90
+ const vnext = require('my-organization/morph-idm');
91
+
92
+ class WorkflowManager {
93
+ constructor() {
94
+ this.config = vnext.getDomainConfig();
95
+ this.schemas = vnext.getSchemas();
96
+ this.workflows = vnext.getWorkflows();
97
+ }
98
+
99
+ validateWorkflow(workflowData) {
100
+ // Use loaded schemas for validation
101
+ // Implementation depends on your validation library
102
+ }
103
+
104
+ executeWorkflow(workflowName) {
105
+ const workflow = this.workflows[workflowName];
106
+ if (!workflow) {
107
+ throw new Error(`Workflow ${workflowName} not found`);
108
+ }
109
+ // Execute workflow logic
110
+ }
111
+ }
112
+
113
+ const manager = new WorkflowManager();
114
+ ```
115
+
116
+ ## 🔧 API Reference
117
+
118
+ ### `getDomainConfig()`
119
+ Returns the domain configuration from `vnext.config.json`.
120
+
121
+ **Returns:** `Object | null` - The configuration object or null if not found
122
+
123
+ ### `getSchemas()`
124
+ Loads all JSON schema files from the Schemas directory.
125
+
126
+ **Returns:** `Object` - Key-value pairs of schema names and definitions
127
+
128
+ ### `getWorkflows()`
129
+ Loads all workflow definitions from the Workflows directory.
130
+
131
+ **Returns:** `Object` - Key-value pairs of workflow names and definitions
132
+
133
+ ### `getTasks()`
134
+ Loads all task definitions from the Tasks directory.
135
+
136
+ **Returns:** `Object` - Key-value pairs of task names and definitions
137
+
138
+ ### `getViews()`
139
+ Loads all view definitions from the Views directory.
140
+
141
+ **Returns:** `Object` - Key-value pairs of view names and definitions
142
+
143
+ ### `getFunctions()`
144
+ Loads all function definitions from the Functions directory.
145
+
146
+ **Returns:** `Object` - Key-value pairs of function names and definitions
147
+
148
+ ### `getExtensions()`
149
+ Loads all extension definitions from the Extensions directory.
150
+
151
+ **Returns:** `Object` - Key-value pairs of extension names and definitions
152
+
153
+ ### `getAvailableTypes()`
154
+ Returns an array of available component types.
155
+
156
+ **Returns:** `Array<string>` - Available component types
157
+
158
+ ### `getDomainName()`
159
+ Returns the name of the domain directory.
160
+
161
+ **Returns:** `string | null` - Domain directory name or null if not found
162
+
163
+ ## 🏛️ Architecture Principles
164
+
165
+ ### Domain-Driven Design
166
+ - Each domain is represented as a separate directory
167
+ - Components are organized by type within domains
168
+ - Clear separation between different workflow concerns
169
+
170
+ ### Component Types
171
+
172
+ 1. **Schemas**: JSON Schema definitions for data validation
173
+ 2. **Workflows**: Business process definitions and state machines
174
+ 3. **Tasks**: Individual task definitions and configurations
175
+ 4. **Views**: User interface and presentation components
176
+ 5. **Functions**: Reusable business logic functions
177
+ 6. **Extensions**: Plugin and extension definitions
178
+
179
+
180
+ Example: `user-registration.1.0.0.json`
181
+
182
+ ## 🛠️ Development
183
+
184
+ ### Running Tests
185
+ ```bash
186
+ npm test
187
+ ```
188
+
189
+ ### Validation
190
+ ```bash
191
+ npm run validate
192
+ ```
193
+
194
+ ## 📋 Schema Validation Rules
195
+
196
+ The template follows strict schema validation rules:
197
+
198
+ ### Instance Base Properties
199
+ - Schema instances MUST include: `key`, `version`, `domain`, `flow`, `flowVersion`
200
+ - Schema instances MUST NOT include: `labels` (labels belong to business logic)
201
+ - Optional fields: `id`, `eTag` (added by platform in production)
202
+
203
+ ### Reference Pattern
204
+ - References use: `domain` + `workflow` + (`id` OR `key`) + optional `version`
205
+ - NO `type` property in references - `workflow` field serves as type
206
+ - Always use local file references: `reference.json#/attributes`
207
+
208
+ ### Standard Lifecycle Pattern
209
+ All lifecycle workflows must have:
210
+ - `draft` (type: "start") - Initial state
211
+ - `active` (type: "normal") - Active state
212
+ - `passive` (type: "finish") - Final state
213
+
214
+ ## 🤝 Contributing
215
+
216
+ 1. Fork the repository
217
+ 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
218
+ 3. Commit your changes (`git commit -m 'Add some amazing feature'`)
219
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
220
+ 5. Open a Pull Request
221
+
222
+ ## 📄 License
223
+
224
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
225
+
226
+ ## 🏢 About Burgan Tech
227
+
228
+ This package is maintained by the Burgan Tech team as part of our commitment to building scalable, domain-driven workflow solutions.
229
+
230
+ ## 🔗 Links
231
+
232
+ - [NPM Package](https://www.npmjs.com/package/@burgan-tech/vnext-template)
233
+ - [GitHub Repository](https://github.com/burgan-tech/vnext-template)
234
+ - [Issues](https://github.com/burgan-tech/vnext-template/issues)
235
+ - [Documentation](https://github.com/burgan-tech/vnext-template#readme)
236
+
237
+ ## 📞 Support
238
+
239
+ For support and questions:
240
+ - Create an issue on [GitHub](https://github.com/burgan-tech/vnext-template/issues)
241
+ - Contact the development team at dev@burgan-tech.com
242
+
243
+ ---
244
+
245
+ Made with ❤️ by the Burgan Tech team
File without changes
File without changes
@@ -0,0 +1,31 @@
1
+ {
2
+ "key": "function-validate-user",
3
+ "flow": "sys-functions",
4
+ "domain": "morph-idm",
5
+ "version": "1.0.0",
6
+ "flowVersion": "1.0.0",
7
+ "tags": [
8
+ "system",
9
+ "morph-idm",
10
+ "sys-extensions",
11
+ "components",
12
+ "users",
13
+ "validate"
14
+ ],
15
+ "attributes": {
16
+ "scope": "I",
17
+ "task": {
18
+ "order": 1,
19
+ "task": {
20
+ "key": "script-task",
21
+ "domain": "morph-idm",
22
+ "version": "1.0.0",
23
+ "flow": "sys-tasks"
24
+ },
25
+ "mapping": {
26
+ "location": "./src/ValidateUser.csx",
27
+ "code": "dXNpbmcgU3lzdGVtLlRocmVhZGluZy5UYXNrczsKdXNpbmcgQkJULldvcmtmbG93LlNjcmlwdGluZzsKdXNpbmcgQkJULldvcmtmbG93LkRlZmluaXRpb25zOwp1c2luZyBTeXN0ZW0uVGV4dC5Kc29uOwp1c2luZyBCQlQuV29ya2Zsb3cuU2NyaXB0aW5nLkZ1bmN0aW9uczsKCnB1YmxpYyBjbGFzcyBWYWxpZGF0ZVVzZXIgOlNjcmlwdEJhc2UsIElNYXBwaW5nCnsKICAgIHB1YmxpYyBUYXNrPFNjcmlwdFJlc3BvbnNlPiBJbnB1dEhhbmRsZXIoV29ya2Zsb3dUYXNrIHRhc2ssIFNjcmlwdENvbnRleHQgY29udGV4dCkKICAgIHsKICAgICAgICByZXR1cm4gVGFzay5Gcm9tUmVzdWx0KG5ldyBTY3JpcHRSZXNwb25zZSgpKTsKICAgIH0KICAgIHB1YmxpYyBhc3luYyBUYXNrPFNjcmlwdFJlc3BvbnNlPiBPdXRwdXRIYW5kbGVyKFNjcmlwdENvbnRleHQgY29udGV4dCkKICAgIHsKICAgICAgICBMb2dJbmZvcm1hdGlvbigkIlZhbGlkYXRlVXNlciBJbnN0YWNlIE91dHB1dEhhbmRsZXI6IHtjb250ZXh0Lkluc3RhbmNlLkRhdGEucGFzc3dvcmR9Iik7CiAgICAgICAgTG9nSW5mb3JtYXRpb24oJCJWYWxpZGF0ZVVzZXIgQm9keSBPdXRwdXRIYW5kbGVyOiB7SnNvblNlcmlhbGl6ZXIuU2VyaWFsaXplKGNvbnRleHQuQm9keSl9Iik7CiAgICAgICAgaWYoY29udGV4dC5Cb2R5LnBhc3N3b3JkID09IGNvbnRleHQuSW5zdGFuY2UuRGF0YS5wYXNzd29yZCkKICAgICAgICB7CiAgICAgICAgICAgIHJldHVybiBuZXcgU2NyaXB0UmVzcG9uc2UKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgRGF0YSA9IG5ldwogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIHVzZXIgPSBjb250ZXh0LkJvZHksCiAgICAgICAgICAgICAgICAgICAgcGFzc3dvcmRDaGVja1Jlc3VsdCA9IHRydWUKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgZWxzZQogICAgICAgIHsKICAgICAgICAgICAgcmV0dXJuIG5ldyBTY3JpcHRSZXNwb25zZQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBEYXRhID0gbmV3CiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgcGFzc3dvcmRDaGVja1Jlc3VsdCA9IGZhbHNlCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH07CiAgICAgICAgfQogICAgfQp9"
28
+ }
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,39 @@
1
+ using System.Threading.Tasks;
2
+ using BBT.Workflow.Scripting;
3
+ using BBT.Workflow.Definitions;
4
+ using System.Text.Json;
5
+ using BBT.Workflow.Scripting.Functions;
6
+
7
+ public class ValidateUser :ScriptBase, IMapping
8
+ {
9
+ public Task<ScriptResponse> InputHandler(WorkflowTask task, ScriptContext context)
10
+ {
11
+ return Task.FromResult(new ScriptResponse());
12
+ }
13
+ public async Task<ScriptResponse> OutputHandler(ScriptContext context)
14
+ {
15
+ LogInformation($"ValidateUser Instace OutputHandler: {context.Instance.Data.password}");
16
+ LogInformation($"ValidateUser Body OutputHandler: {JsonSerializer.Serialize(context.Body)}");
17
+ if(context.Body.password == context.Instance.Data.password)
18
+ {
19
+ return new ScriptResponse
20
+ {
21
+ Data = new
22
+ {
23
+ user = context.Body,
24
+ passwordCheckResult = true
25
+ }
26
+ };
27
+ }
28
+ else
29
+ {
30
+ return new ScriptResponse
31
+ {
32
+ Data = new
33
+ {
34
+ passwordCheckResult = false
35
+ }
36
+ };
37
+ }
38
+ }
39
+ }
@@ -0,0 +1,319 @@
1
+ {
2
+ "version": "1.0",
3
+ "metadata": {
4
+ "name": "device-register-evaluate-get-device-request",
5
+ "description": "device-register-evaluate-get-device-request mapper",
6
+ "version": "1.0.0",
7
+ "source": "none",
8
+ "target": "none",
9
+ "createdAt": "2025-11-08T06:08:00.051Z",
10
+ "tags": [
11
+ "new"
12
+ ]
13
+ },
14
+ "schemas": {
15
+ "source": "none",
16
+ "target": "none"
17
+ },
18
+ "nodes": [],
19
+ "edges": [],
20
+ "schemaParts": {
21
+ "source": {
22
+ "instance": {
23
+ "schemaRef": "custom",
24
+ "schema": {
25
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
26
+ "$id": "https://example.com/schemas/device-register-master.schema.json",
27
+ "title": "Device Register",
28
+ "description": "Device registration operational flow data. Stores device information during registration process before transferring to device fact.",
29
+ "type": "object",
30
+ "properties": {
31
+ "deviceId": {
32
+ "type": "string",
33
+ "description": "Hardware or system-level unique identifier of the device (e.g., UUID, Vendor ID, IMEI)."
34
+ },
35
+ "installationId": {
36
+ "type": "string",
37
+ "format": "uuid",
38
+ "description": "Unique identifier generated for each installation of the application on the device. Distinguishes different installations on the same device."
39
+ },
40
+ "deviceInfo": {
41
+ "type": "object",
42
+ "description": "Detailed information about the device and operating system.",
43
+ "properties": {
44
+ "osName": {
45
+ "type": "string",
46
+ "description": "Operating system name (e.g., iOS, Android, HarmonyOS, Windows, macOS)."
47
+ },
48
+ "osVersion": {
49
+ "type": "string",
50
+ "description": "Operating system version (e.g., 17.2.1, API 33, Windows 11)."
51
+ },
52
+ "deviceModel": {
53
+ "type": "string",
54
+ "description": "Device model (e.g., iPhone 14 Pro, Pixel 7, Galaxy S22, MacBook Pro)."
55
+ },
56
+ "manufacturer": {
57
+ "type": "string",
58
+ "description": "Device manufacturer (e.g., Apple, Samsung, Xiaomi, Huawei, Google)."
59
+ },
60
+ "userAgent": {
61
+ "type": "string",
62
+ "description": "User-Agent string from browser or application."
63
+ },
64
+ "screenResolution": {
65
+ "type": "string",
66
+ "description": "Device screen resolution (e.g., 1920x1080, 2532x1170)."
67
+ },
68
+ "language": {
69
+ "type": "string",
70
+ "description": "Device language setting (e.g., en-US, tr-TR)."
71
+ },
72
+ "timezone": {
73
+ "type": "string",
74
+ "description": "Device timezone (e.g., Europe/Istanbul, America/New_York)."
75
+ }
76
+ },
77
+ "required": [
78
+ "osName",
79
+ "osVersion",
80
+ "deviceModel",
81
+ "manufacturer"
82
+ ]
83
+ },
84
+ "deviceCertificatePublicKey": {
85
+ "type": "string",
86
+ "description": "Device-specific base public key. Used during initial device registration for device attestation. This is the root device identity, independent of user/consent."
87
+ },
88
+ "pushToken": {
89
+ "description": "Platform-specific push notification token. Device can have only ONE active push token based on its platform. Use 'platform' field to determine which push service to use.",
90
+ "oneOf": [
91
+ {
92
+ "type": "object",
93
+ "description": "Apple Push Notification Service (APNS) for iOS/iPadOS/macOS devices.",
94
+ "required": [
95
+ "platform",
96
+ "token"
97
+ ],
98
+ "properties": {
99
+ "platform": {
100
+ "type": "string",
101
+ "const": "apns",
102
+ "description": "Platform identifier (discriminator field)."
103
+ },
104
+ "token": {
105
+ "type": "string",
106
+ "description": "APNS device token (hex string, 64 characters)."
107
+ },
108
+ "environment": {
109
+ "type": "string",
110
+ "enum": [
111
+ "production",
112
+ "sandbox"
113
+ ],
114
+ "description": "APNS environment. production (App Store), sandbox (Development/TestFlight)."
115
+ },
116
+ "bundleId": {
117
+ "type": "string",
118
+ "description": "iOS app bundle identifier (e.g., 'com.burgan.mobilebanking')."
119
+ }
120
+ }
121
+ },
122
+ {
123
+ "type": "object",
124
+ "description": "Firebase Cloud Messaging (FCM) for Android devices with Google Play Services.",
125
+ "required": [
126
+ "platform",
127
+ "token"
128
+ ],
129
+ "properties": {
130
+ "platform": {
131
+ "type": "string",
132
+ "const": "fcm",
133
+ "description": "Platform identifier (discriminator field)."
134
+ },
135
+ "token": {
136
+ "type": "string",
137
+ "description": "FCM registration token."
138
+ },
139
+ "projectId": {
140
+ "type": "string",
141
+ "description": "Firebase project ID."
142
+ },
143
+ "packageName": {
144
+ "type": "string",
145
+ "description": "Android app package name."
146
+ }
147
+ }
148
+ },
149
+ {
150
+ "type": "object",
151
+ "description": "Huawei Mobile Services (HMS) Push for Huawei devices without Google Play Services.",
152
+ "required": [
153
+ "platform",
154
+ "token"
155
+ ],
156
+ "properties": {
157
+ "platform": {
158
+ "type": "string",
159
+ "const": "hms",
160
+ "description": "Platform identifier (discriminator field)."
161
+ },
162
+ "token": {
163
+ "type": "string",
164
+ "description": "HMS Push token."
165
+ },
166
+ "appId": {
167
+ "type": "string",
168
+ "description": "Huawei AppGallery app ID."
169
+ },
170
+ "packageName": {
171
+ "type": "string",
172
+ "description": "Android app package name."
173
+ }
174
+ }
175
+ },
176
+ {
177
+ "type": "object",
178
+ "description": "Web Push API for Progressive Web Apps and browsers.",
179
+ "required": [
180
+ "platform",
181
+ "endpoint"
182
+ ],
183
+ "properties": {
184
+ "platform": {
185
+ "type": "string",
186
+ "const": "webpush",
187
+ "description": "Platform identifier (discriminator field)."
188
+ },
189
+ "endpoint": {
190
+ "type": "string",
191
+ "description": "Push service endpoint URL."
192
+ },
193
+ "keys": {
194
+ "type": "object",
195
+ "properties": {
196
+ "p256dh": {
197
+ "type": "string",
198
+ "description": "Client public key for encryption (base64)."
199
+ },
200
+ "auth": {
201
+ "type": "string",
202
+ "description": "Authentication secret (base64)."
203
+ }
204
+ }
205
+ },
206
+ "browser": {
207
+ "type": "string",
208
+ "description": "Browser name/version (e.g., 'Chrome 120')."
209
+ }
210
+ }
211
+ }
212
+ ]
213
+ },
214
+ "appVersion": {
215
+ "type": "string",
216
+ "description": "Version of the application installed on this device (e.g., 2.5.1, 3.0.0-beta)."
217
+ },
218
+ "attribution": {
219
+ "type": "object",
220
+ "description": "App installation attribution and referral tracking data. Captured during first app install from app stores or marketing campaigns. Only sent on FIRST launch, null on subsequent launches.",
221
+ "properties": {
222
+ "referrerCode": {
223
+ "type": "string",
224
+ "description": "Referral code used during app installation. Could be from friend invite, affiliate program, or promotion code."
225
+ },
226
+ "source": {
227
+ "type": "string",
228
+ "description": "Installation source (e.g., 'organic', 'google_ads', 'facebook_ads', 'app_store', 'play_store', 'sms_campaign', 'email_campaign', 'qr_code')."
229
+ },
230
+ "campaign": {
231
+ "type": "string",
232
+ "description": "Marketing campaign identifier that led to this installation (e.g., 'summer_2024', 'new_year_promo', 'branch_opening')."
233
+ },
234
+ "medium": {
235
+ "type": "string",
236
+ "description": "Marketing medium (e.g., 'cpc', 'social', 'email', 'sms', 'banner', 'outdoor')."
237
+ },
238
+ "utmParameters": {
239
+ "type": "object",
240
+ "description": "UTM parameters from marketing URLs. Standard tracking parameters for digital campaigns.",
241
+ "properties": {
242
+ "utm_source": {
243
+ "type": "string",
244
+ "description": "Traffic source (e.g., 'google', 'facebook', 'newsletter')."
245
+ },
246
+ "utm_medium": {
247
+ "type": "string",
248
+ "description": "Marketing medium (e.g., 'cpc', 'banner', 'email')."
249
+ },
250
+ "utm_campaign": {
251
+ "type": "string",
252
+ "description": "Campaign name (e.g., 'spring_sale', 'app_launch')."
253
+ },
254
+ "utm_term": {
255
+ "type": "string",
256
+ "description": "Paid search keywords."
257
+ },
258
+ "utm_content": {
259
+ "type": "string",
260
+ "description": "Ad variation identifier (A/B testing)."
261
+ }
262
+ }
263
+ },
264
+ "clickId": {
265
+ "type": "string",
266
+ "description": "Ad click identifier from ad networks (e.g., Google Click ID 'gclid', Facebook Click ID 'fbclid')."
267
+ },
268
+ "installReferrer": {
269
+ "type": "string",
270
+ "description": "Google Play Install Referrer or App Store attribution data. Raw referrer string from app store."
271
+ },
272
+ "attributionProvider": {
273
+ "type": "string",
274
+ "description": "Attribution SDK/service used (e.g., 'AppsFlyer', 'Adjust', 'Branch', 'Firebase', 'native')."
275
+ },
276
+ "attributionData": {
277
+ "type": "object",
278
+ "description": "Raw attribution data from third-party attribution provider. Provider-specific tracking data.",
279
+ "additionalProperties": true
280
+ }
281
+ }
282
+ },
283
+ "registeredDevice": {
284
+ "type": "object",
285
+ "description": "Existing registered device information from device fact. Populated by get-device task in evaluate state. Used for comparison to determine registration flow path (no-device, reinstall, no-update). Null if device is not registered yet.",
286
+ "properties": {
287
+ "deviceId": {
288
+ "type": "string",
289
+ "description": "Device ID from existing device fact record. Used to compare with current deviceId from headers."
290
+ },
291
+ "installationId": {
292
+ "type": "string",
293
+ "format": "uuid",
294
+ "description": "Installation ID from existing device fact record. Used to detect reinstallation scenarios."
295
+ }
296
+ }
297
+ }
298
+ },
299
+ "required": [
300
+ "deviceId",
301
+ "installationId",
302
+ "deviceInfo",
303
+ "deviceCertificatePublicKey",
304
+ "appVersion"
305
+ ],
306
+ "additionalProperties": false
307
+ },
308
+ "schemaSourcePath": "morph-idm/morph-idm/Schemas/device-register-master-1.0.0.json",
309
+ "schemaHash": "a5fe10fd30779ee25e07d157e61f9c39ce4db00c15507431e5b666382ee4f365",
310
+ "label": "instance"
311
+ }
312
+ },
313
+ "target": {},
314
+ "sourceOrder": [
315
+ "instance"
316
+ ],
317
+ "targetOrder": []
318
+ }
319
+ }