@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
@@ -0,0 +1,346 @@
1
+ {
2
+ "_comment": "BUSINESS CONTEXT: Token represents OAuth2/OIDC tokens (authorization code, access, refresh, identity). Functions as a session, containing token lifecycle and snapshot of client policies for autonomous lifecycle management without repeated client queries.",
3
+ "key": "token-master",
4
+ "version": "1.0.0",
5
+ "domain": "morph-idm",
6
+ "flow": "sys-schemas",
7
+ "flowVersion": "1.0.0",
8
+ "tags": [
9
+ "morph-idm",
10
+ "schema"
11
+ ],
12
+ "attributes": {
13
+ "type": "workflow",
14
+ "schema": {
15
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
16
+ "$id": "https://vnext.io/schemas/core/token-master.json",
17
+ "title": "Token",
18
+ "description": "OAuth2/OIDC token and session data. Contains access tokens and related information that a user has obtained as a result of a specific flow. This schema includes a snapshot of client policies so the token can manage its own lifecycle without querying the client repeatedly.",
19
+ "type": "object",
20
+ "properties": {
21
+ "client": {
22
+ "type": "object",
23
+ "description": "OAuth2 client information and snapshot.",
24
+ "properties": {
25
+ "id": {
26
+ "type": "string",
27
+ "description": "Client fact key."
28
+ },
29
+ "snapshot": {
30
+ "type": "object",
31
+ "description": "Client configuration snapshot taken at token creation. Allows token to manage its own lifecycle without querying client repeatedly.",
32
+ "properties": {
33
+ "fetchedAt": {
34
+ "type": "string",
35
+ "format": "date-time",
36
+ "description": "When this client snapshot was fetched."
37
+ },
38
+ "name": {
39
+ "type": "string",
40
+ "description": "Client name for logging and auditing."
41
+ },
42
+ "tokenDurations": {
43
+ "type": "object",
44
+ "description": "Token lifetime durations from client configuration.",
45
+ "properties": {
46
+ "authorizationCode": {
47
+ "type": "string",
48
+ "description": "Authorization code lifetime (ISO-8601 duration, e.g., PT1M)."
49
+ },
50
+ "accessToken": {
51
+ "type": "string",
52
+ "description": "Access token lifetime (ISO-8601 duration, e.g., PT5M)."
53
+ },
54
+ "refreshToken": {
55
+ "type": "string",
56
+ "description": "Refresh token lifetime (ISO-8601 duration, e.g., P30D)."
57
+ },
58
+ "identityToken": {
59
+ "type": "string",
60
+ "description": "Identity token lifetime (ISO-8601 duration, e.g., PT1H)."
61
+ }
62
+ }
63
+ },
64
+ "refreshTokenPolicy": {
65
+ "type": "object",
66
+ "description": "Refresh token policy from client configuration.",
67
+ "properties": {
68
+ "rotation": {
69
+ "type": "string",
70
+ "enum": [
71
+ "reuse",
72
+ "rotate"
73
+ ],
74
+ "description": "Refresh token rotation strategy. reuse: Same token can be reused. rotate: New token generated on each use."
75
+ },
76
+ "absoluteLifetime": {
77
+ "type": "string",
78
+ "description": "Total lifetime of refresh token (ISO-8601 duration)."
79
+ },
80
+ "reuseInterval": {
81
+ "type": "string",
82
+ "description": "In rotation mode, grace period during which old token remains valid (ISO-8601 duration)."
83
+ }
84
+ }
85
+ },
86
+ "accessTokenFormat": {
87
+ "type": "string",
88
+ "enum": [
89
+ "jwt",
90
+ "opaque"
91
+ ],
92
+ "description": "Format of the access token."
93
+ }
94
+ }
95
+ }
96
+ }
97
+ },
98
+ "user": {
99
+ "type": "object",
100
+ "description": "User information and snapshot.",
101
+ "properties": {
102
+ "id": {
103
+ "type": "string",
104
+ "description": "User fact key."
105
+ },
106
+ "snapshot": {
107
+ "type": "object",
108
+ "description": "User information snapshot for token claims.",
109
+ "properties": {
110
+ "fetchedAt": {
111
+ "type": "string",
112
+ "format": "date-time",
113
+ "description": "When this user snapshot was fetched."
114
+ },
115
+ "reference": {
116
+ "type": "string",
117
+ "description": "User business reference (national ID, employee number, etc.)."
118
+ },
119
+ "email": {
120
+ "type": "string",
121
+ "description": "User email address."
122
+ },
123
+ "name": {
124
+ "type": "string",
125
+ "description": "User full name."
126
+ }
127
+ }
128
+ }
129
+ }
130
+ },
131
+ "scope": {
132
+ "type": "object",
133
+ "description": "Scope (customer) information and snapshot.",
134
+ "properties": {
135
+ "id": {
136
+ "type": "string",
137
+ "description": "Scope fact key."
138
+ },
139
+ "snapshot": {
140
+ "type": "object",
141
+ "description": "Scope information snapshot for token claims.",
142
+ "properties": {
143
+ "fetchedAt": {
144
+ "type": "string",
145
+ "format": "date-time",
146
+ "description": "When this scope snapshot was fetched."
147
+ },
148
+ "reference": {
149
+ "type": "string",
150
+ "description": "Scope business reference (customer number, CIF, etc.)."
151
+ },
152
+ "name": {
153
+ "type": "string",
154
+ "description": "Scope name (customer name)."
155
+ }
156
+ }
157
+ }
158
+ }
159
+ },
160
+ "consent": {
161
+ "type": "object",
162
+ "description": "Consent information and snapshot.",
163
+ "properties": {
164
+ "id": {
165
+ "type": "string",
166
+ "description": "Consent fact key."
167
+ },
168
+ "snapshot": {
169
+ "type": "object",
170
+ "description": "Consent authorization snapshot.",
171
+ "properties": {
172
+ "fetchedAt": {
173
+ "type": "string",
174
+ "format": "date-time",
175
+ "description": "When this consent snapshot was fetched."
176
+ },
177
+ "scopes": {
178
+ "type": "array",
179
+ "items": {
180
+ "type": "string"
181
+ },
182
+ "description": "Granted scope names (resource scopes like 'read', 'write')."
183
+ },
184
+ "roles": {
185
+ "type": "array",
186
+ "items": {
187
+ "type": "string"
188
+ },
189
+ "description": "Granted role identifiers."
190
+ },
191
+ "expiresAt": {
192
+ "type": "string",
193
+ "format": "date-time",
194
+ "description": "Consent expiration time."
195
+ }
196
+ }
197
+ }
198
+ }
199
+ },
200
+ "tokenType": {
201
+ "type": "string",
202
+ "default": "Bearer",
203
+ "description": "Type of the token. Typically 'Bearer' for OAuth2 tokens. Used in Authorization header as 'Bearer <token>'."
204
+ },
205
+ "authorizationCode": {
206
+ "type": "object",
207
+ "properties": {
208
+ "value": {
209
+ "type": "string",
210
+ "description": "Authorization code value generated in the Authorization Code Grant Flow."
211
+ },
212
+ "issuedAt": {
213
+ "type": "string",
214
+ "format": "date-time",
215
+ "description": "Timestamp when the authorization code was issued."
216
+ },
217
+ "expiresAt": {
218
+ "type": "string",
219
+ "format": "date-time",
220
+ "description": "Timestamp when the authorization code will expire."
221
+ },
222
+ "isUsed": {
223
+ "type": "boolean",
224
+ "default": false,
225
+ "description": "Flag indicating whether this authorization code has been exchanged for tokens. Once used, it becomes invalid."
226
+ }
227
+ },
228
+ "description": "Authorization code information. Short-lived and single-use only."
229
+ },
230
+ "accessToken": {
231
+ "type": "object",
232
+ "properties": {
233
+ "value": {
234
+ "type": "string",
235
+ "description": "Access token value (JWT or opaque) used to access resources."
236
+ },
237
+ "issuedAt": {
238
+ "type": "string",
239
+ "format": "date-time",
240
+ "description": "Timestamp when the access token was issued."
241
+ },
242
+ "expiresAt": {
243
+ "type": "string",
244
+ "format": "date-time",
245
+ "description": "Timestamp when the access token will expire."
246
+ },
247
+ "claims": {
248
+ "type": "object",
249
+ "description": "Claims embedded in this access token (key-value pairs).",
250
+ "additionalProperties": true
251
+ }
252
+ },
253
+ "description": "Access token information. Used for API calls and resource access."
254
+ },
255
+ "refreshToken": {
256
+ "type": "object",
257
+ "properties": {
258
+ "value": {
259
+ "type": "string",
260
+ "description": "Refresh token value used to obtain new access tokens."
261
+ },
262
+ "issuedAt": {
263
+ "type": "string",
264
+ "format": "date-time",
265
+ "description": "Timestamp when the refresh token was issued."
266
+ },
267
+ "expiresAt": {
268
+ "type": "string",
269
+ "format": "date-time",
270
+ "description": "Timestamp when the refresh token will expire (absolute lifetime)."
271
+ },
272
+ "lastUsedAt": {
273
+ "type": "string",
274
+ "format": "date-time",
275
+ "description": "Timestamp when the refresh token was last used for token refresh."
276
+ },
277
+ "rotationCount": {
278
+ "type": "integer",
279
+ "default": 0,
280
+ "description": "Number of times this refresh token has been rotated. Used for tracking and security auditing."
281
+ }
282
+ },
283
+ "description": "Refresh token information. Used to obtain new access tokens without re-authentication."
284
+ },
285
+ "identityToken": {
286
+ "type": "object",
287
+ "properties": {
288
+ "value": {
289
+ "type": "string",
290
+ "description": "JWT-formatted identity token containing user information."
291
+ },
292
+ "issuedAt": {
293
+ "type": "string",
294
+ "format": "date-time",
295
+ "description": "Timestamp when the identity token was issued."
296
+ },
297
+ "expiresAt": {
298
+ "type": "string",
299
+ "format": "date-time",
300
+ "description": "Timestamp when the identity token will expire."
301
+ },
302
+ "claims": {
303
+ "type": "object",
304
+ "description": "Claims embedded in this identity token (key-value pairs).",
305
+ "additionalProperties": true
306
+ }
307
+ },
308
+ "description": "Identity token information (OpenID Connect). Contains user identity claims."
309
+ },
310
+ "sessionMetadata": {
311
+ "type": "object",
312
+ "properties": {
313
+ "createdAt": {
314
+ "type": "string",
315
+ "format": "date-time",
316
+ "description": "Timestamp when this token session was initially created (first token issued)."
317
+ },
318
+ "lastActivityAt": {
319
+ "type": "string",
320
+ "format": "date-time",
321
+ "description": "Timestamp of the last activity in this session (last token refresh or usage)."
322
+ },
323
+ "totalRefreshCount": {
324
+ "type": "integer",
325
+ "default": 0,
326
+ "description": "Total number of times refresh token has been used in this session."
327
+ }
328
+ },
329
+ "description": "Session-level metadata tracking overall session activity and statistics. Since token works as a session, this provides high-level session information. Client details (IP, port, device ID, user agent) are available in request headers and don't need to be duplicated here."
330
+ },
331
+ "completionReason": {
332
+ "type": "string",
333
+ "description": "Reason for token lifecycle completion. This information is managed by the low-code platform's state machine logic."
334
+ }
335
+ },
336
+ "required": [
337
+ "client",
338
+ "user",
339
+ "scope",
340
+ "consent",
341
+ "tokenType"
342
+ ],
343
+ "additionalProperties": false
344
+ }
345
+ }
346
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "_comment": "BUSINESS CONTEXT: Token-start transition schema. Used to initiate OAuth2 token flow with client, user, scope, and consent information.",
3
+ "key": "token-start",
4
+ "version": "1.0.0",
5
+ "domain": "morph-idm",
6
+ "flow": "sys-schemas",
7
+ "flowVersion": "1.0.0",
8
+ "tags": [
9
+ "morph-idm",
10
+ "schema"
11
+ ],
12
+ "attributes": {
13
+ "type": "workflow",
14
+ "schema": {
15
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
16
+ "$id": "https://vnext.io/schemas/core/token-start.json",
17
+ "title": "Token Start",
18
+ "description": "OAuth2 token flow initiation data. Contains client, user, scope, and consent information to start token workflow.",
19
+ "type": "object",
20
+ "properties": {
21
+ "clientId": {
22
+ "type": "string",
23
+ "description": "Client identifier (key) for the OAuth2 token request."
24
+ },
25
+ "client": {
26
+ "type": "object",
27
+ "description": "Client fact object for the OAuth2 token request."
28
+ },
29
+ "user": {
30
+ "type": "string",
31
+ "description": "User fact key for the token request."
32
+ },
33
+ "consent": {
34
+ "type": "array",
35
+ "description": "Consent fact key for the token request."
36
+ },
37
+ "scope": {
38
+ "type": "string",
39
+ "description": "Requested scopes for the token (space-separated)."
40
+ }
41
+ },
42
+ "required": [
43
+ "clientId",
44
+ "user",
45
+ "consent"
46
+ ],
47
+ "additionalProperties": true
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,175 @@
1
+ {
2
+ "_comment": "BUSINESS CONTEXT: Transaction Limit manages usage limits for transactions. Works at two levels: 1) Scope Limit (customer ceiling) - total limit for all users of a customer, 2) User Limit (personal limit) - individual user's limit within a scope. Supports Reserve/Capture/Release pattern with parallel period control (daily + monthly + weekly checked simultaneously). Lazy initialization creates instances on first use.",
3
+ "key": "transaction-limit-master",
4
+ "version": "1.0.0",
5
+ "domain": "morph-idm",
6
+ "flow": "sys-schemas",
7
+ "flowVersion": "1.0.0",
8
+ "tags": [
9
+ "transaction-limit",
10
+ "schema"
11
+ ],
12
+ "attributes": {
13
+ "type": "workflow",
14
+ "schema": {
15
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
16
+ "$id": "https://vnext.io/schemas/transaction-limit/transaction-limit-master.json",
17
+ "title": "Transaction Limit",
18
+ "description": "Transaction limit instance for scope or user+scope. Manages period-based limits with reserve/capture/release pattern.",
19
+ "type": "object",
20
+ "properties": {
21
+ "scope": {
22
+ "$ref": "../common/reference.json",
23
+ "description": "REQUIRED. Reference to the scope (customer) this limit belongs to. All transaction limits are scope-specific."
24
+ },
25
+ "user": {
26
+ "$ref": "../common/reference.json",
27
+ "description": "OPTIONAL. Reference to the user this limit belongs to. If provided, this is a User Limit (personal). If not provided, this is a Scope Limit (ceiling for all users)."
28
+ },
29
+ "positionLevel": {
30
+ "type": "string",
31
+ "description": "Position level code for user limits (e.g., 'officer', 'manager'). Only applicable when 'user' is provided. Used for default limit template selection."
32
+ },
33
+ "workflowKey": {
34
+ "type": "string",
35
+ "description": "Workflow key this limit applies to (e.g., 'eft-transfer', 'approval'). If not specified, applies to all workflows."
36
+ },
37
+ "currency": {
38
+ "type": "string",
39
+ "description": "REQUIRED. Currency code for the limits (e.g., 'TRY', 'USD', 'EUR'). Each currency requires separate limit instance."
40
+ },
41
+ "maxTransactionAmount": {
42
+ "type": "number",
43
+ "minimum": 0,
44
+ "description": "Maximum amount for a single transaction. Only applicable for User Limits. Scope Limits don't have single transaction limits."
45
+ },
46
+ "limits": {
47
+ "type": "array",
48
+ "description": "REQUIRED. Period-based limit definitions. All periods are checked in PARALLEL - transaction fails if ANY period is insufficient.",
49
+ "items": {
50
+ "type": "object",
51
+ "properties": {
52
+ "period": {
53
+ "type": "string",
54
+ "description": "Period type: 'daily', 'weekly', 'monthly', 'quarterly', 'yearly', or cron expression (e.g., '0 0 * * 1' for weekly reset on Monday)."
55
+ },
56
+ "amount": {
57
+ "type": "number",
58
+ "minimum": 0,
59
+ "description": "Maximum total amount allowed in this period. Optional if 'count' is provided."
60
+ },
61
+ "count": {
62
+ "type": "integer",
63
+ "minimum": 0,
64
+ "description": "Maximum number of transactions allowed in this period. Optional if 'amount' is provided."
65
+ }
66
+ },
67
+ "required": [
68
+ "period"
69
+ ],
70
+ "additionalProperties": false
71
+ },
72
+ "minItems": 1
73
+ },
74
+ "usage": {
75
+ "type": "object",
76
+ "description": "Period-based usage tracking. Keys are period types (e.g., 'daily', 'monthly'). Updated automatically by reserve/capture/release operations.",
77
+ "additionalProperties": {
78
+ "type": "object",
79
+ "properties": {
80
+ "amount": {
81
+ "type": "number",
82
+ "minimum": 0,
83
+ "description": "Total amount used in this period (captured transactions only)."
84
+ },
85
+ "count": {
86
+ "type": "integer",
87
+ "minimum": 0,
88
+ "description": "Total number of transactions in this period (captured transactions only)."
89
+ },
90
+ "reserved": {
91
+ "type": "number",
92
+ "minimum": 0,
93
+ "description": "Total amount currently reserved but not yet captured. Released on capture or explicit release."
94
+ },
95
+ "lastReset": {
96
+ "type": "string",
97
+ "format": "date-time",
98
+ "description": "Timestamp of last period reset. Used to determine when to reset usage counters."
99
+ }
100
+ },
101
+ "additionalProperties": false
102
+ }
103
+ },
104
+ "reservations": {
105
+ "type": "array",
106
+ "description": "Active reservations. Each reservation holds amount until captured or released. Expired reservations are cleaned up by scheduled job.",
107
+ "items": {
108
+ "type": "object",
109
+ "properties": {
110
+ "id": {
111
+ "type": "string",
112
+ "description": "Unique reservation identifier. Used for capture and release operations."
113
+ },
114
+ "amount": {
115
+ "type": "number",
116
+ "minimum": 0,
117
+ "description": "Reserved amount."
118
+ },
119
+ "affectedPeriods": {
120
+ "type": "array",
121
+ "items": {
122
+ "type": "string"
123
+ },
124
+ "description": "List of period types affected by this reservation (e.g., ['daily', 'monthly']). Used for capture/release to update correct usage counters."
125
+ },
126
+ "reservedAt": {
127
+ "type": "string",
128
+ "format": "date-time",
129
+ "description": "Timestamp when reservation was created."
130
+ },
131
+ "expiresAt": {
132
+ "type": "string",
133
+ "format": "date-time",
134
+ "description": "Timestamp when reservation expires. Expired reservations are automatically released."
135
+ },
136
+ "sourceWorkflow": {
137
+ "type": "string",
138
+ "description": "Workflow key that created this reservation (e.g., 'eft-transfer')."
139
+ },
140
+ "sourceInstanceKey": {
141
+ "type": "string",
142
+ "description": "Instance key of the workflow that created this reservation."
143
+ },
144
+ "status": {
145
+ "type": "string",
146
+ "enum": [
147
+ "reserved",
148
+ "captured",
149
+ "released",
150
+ "expired"
151
+ ],
152
+ "description": "Current status of the reservation."
153
+ }
154
+ },
155
+ "required": [
156
+ "id",
157
+ "amount",
158
+ "affectedPeriods",
159
+ "reservedAt",
160
+ "expiresAt",
161
+ "status"
162
+ ],
163
+ "additionalProperties": false
164
+ }
165
+ }
166
+ },
167
+ "required": [
168
+ "scope",
169
+ "currency",
170
+ "limits"
171
+ ],
172
+ "additionalProperties": false
173
+ }
174
+ }
175
+ }
@@ -0,0 +1,90 @@
1
+ {
2
+ "key": "transaction-limit-update",
3
+ "version": "1.0.0",
4
+ "domain": "morph-idm",
5
+ "flow": "sys-schemas",
6
+ "flowVersion": "1.0.0",
7
+ "tags": [
8
+ "transaction-limit",
9
+ "schema",
10
+ "update"
11
+ ],
12
+ "attributes": {
13
+ "type": "workflow",
14
+ "schema": {
15
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
16
+ "$id": "https://vnext.io/schemas/transaction-limit/transaction-limit-update.json",
17
+ "title": "Transaction Limit Update",
18
+ "description": "Partial update schema for transaction limit instances. All fields are optional for partial updates.",
19
+ "type": "object",
20
+ "properties": {
21
+ "workflowKey": {
22
+ "type": "string",
23
+ "description": "Updated workflow key filter."
24
+ },
25
+ "currency": {
26
+ "type": "string",
27
+ "description": "Updated currency code."
28
+ },
29
+ "maxTransactionAmount": {
30
+ "type": "number",
31
+ "minimum": 0,
32
+ "description": "Updated maximum single transaction amount (User Limits only)."
33
+ },
34
+ "limits": {
35
+ "type": "array",
36
+ "description": "Updated period-based limits. If provided, replaces entire limits array.",
37
+ "items": {
38
+ "type": "object",
39
+ "properties": {
40
+ "period": {
41
+ "type": "string",
42
+ "description": "Period type: 'daily', 'weekly', 'monthly', 'quarterly', 'yearly', or cron expression."
43
+ },
44
+ "amount": {
45
+ "type": "number",
46
+ "minimum": 0
47
+ },
48
+ "count": {
49
+ "type": "integer",
50
+ "minimum": 0
51
+ }
52
+ },
53
+ "required": [
54
+ "period"
55
+ ],
56
+ "additionalProperties": false
57
+ },
58
+ "minItems": 1
59
+ },
60
+ "usage": {
61
+ "type": "object",
62
+ "description": "Reset or adjust usage counters. Typically used for manual corrections or period resets.",
63
+ "additionalProperties": {
64
+ "type": "object",
65
+ "properties": {
66
+ "amount": {
67
+ "type": "number",
68
+ "minimum": 0
69
+ },
70
+ "count": {
71
+ "type": "integer",
72
+ "minimum": 0
73
+ },
74
+ "reserved": {
75
+ "type": "number",
76
+ "minimum": 0
77
+ },
78
+ "lastReset": {
79
+ "type": "string",
80
+ "format": "date-time"
81
+ }
82
+ },
83
+ "additionalProperties": false
84
+ }
85
+ }
86
+ },
87
+ "additionalProperties": false
88
+ }
89
+ }
90
+ }