@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,300 @@
1
+ {
2
+ "_comment": "BUSINESS CONTEXT: Device registration master schema. This operational flow is called on every app launch. It stores device information temporarily during registration process, then transfers to device fact upon completion. Acts as a staging area for device registration workflow.",
3
+ "key": "device-register-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
+ "operational"
12
+ ],
13
+ "attributes": {
14
+ "type": "workflow",
15
+ "schema": {
16
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
17
+ "$id": "https://vnext.io/schemas/core/device-register-master.json",
18
+ "title": "Device Register",
19
+ "description": "Device registration operational flow data. Stores device information during registration process before transferring to device fact.",
20
+ "type": "object",
21
+ "properties": {
22
+ "deviceId": {
23
+ "type": "string",
24
+ "description": "Hardware or system-level unique identifier of the device (e.g., UUID, Vendor ID, IMEI)."
25
+ },
26
+ "installationId": {
27
+ "type": "string",
28
+ "format": "uuid",
29
+ "description": "Unique identifier generated for each installation of the application on the device. Distinguishes different installations on the same device."
30
+ },
31
+ "deviceInfo": {
32
+ "type": "object",
33
+ "description": "Detailed information about the device and operating system.",
34
+ "properties": {
35
+ "osName": {
36
+ "type": "string",
37
+ "description": "Operating system name (e.g., iOS, Android, HarmonyOS, Windows, macOS)."
38
+ },
39
+ "osVersion": {
40
+ "type": "string",
41
+ "description": "Operating system version (e.g., 17.2.1, API 33, Windows 11)."
42
+ },
43
+ "deviceModel": {
44
+ "type": "string",
45
+ "description": "Device model (e.g., iPhone 14 Pro, Pixel 7, Galaxy S22, MacBook Pro)."
46
+ },
47
+ "manufacturer": {
48
+ "type": "string",
49
+ "description": "Device manufacturer (e.g., Apple, Samsung, Xiaomi, Huawei, Google)."
50
+ },
51
+ "userAgent": {
52
+ "type": "string",
53
+ "description": "User-Agent string from browser or application."
54
+ },
55
+ "screenResolution": {
56
+ "type": "string",
57
+ "description": "Device screen resolution (e.g., 1920x1080, 2532x1170)."
58
+ },
59
+ "language": {
60
+ "type": "string",
61
+ "description": "Device language setting (e.g., en-US, tr-TR)."
62
+ },
63
+ "timezone": {
64
+ "type": "string",
65
+ "description": "Device timezone (e.g., Europe/Istanbul, America/New_York)."
66
+ }
67
+ },
68
+ "required": [
69
+ "osName",
70
+ "osVersion",
71
+ "deviceModel",
72
+ "manufacturer"
73
+ ]
74
+ },
75
+ "deviceCertificatePublicKey": {
76
+ "type": "string",
77
+ "description": "Device-specific base public key. Used during initial device registration for device attestation. This is the root device identity, independent of user/consent."
78
+ },
79
+ "pushToken": {
80
+ "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.",
81
+ "oneOf": [
82
+ {
83
+ "type": "object",
84
+ "description": "Apple Push Notification Service (APNS) for iOS/iPadOS/macOS devices.",
85
+ "required": [
86
+ "platform",
87
+ "token"
88
+ ],
89
+ "properties": {
90
+ "platform": {
91
+ "type": "string",
92
+ "const": "apns",
93
+ "description": "Platform identifier (discriminator field)."
94
+ },
95
+ "token": {
96
+ "type": "string",
97
+ "description": "APNS device token (hex string, 64 characters)."
98
+ },
99
+ "environment": {
100
+ "type": "string",
101
+ "enum": [
102
+ "production",
103
+ "sandbox"
104
+ ],
105
+ "description": "APNS environment. production (App Store), sandbox (Development/TestFlight)."
106
+ },
107
+ "bundleId": {
108
+ "type": "string",
109
+ "description": "iOS app bundle identifier (e.g., 'com.burgan.mobilebanking')."
110
+ }
111
+ }
112
+ },
113
+ {
114
+ "type": "object",
115
+ "description": "Firebase Cloud Messaging (FCM) for Android devices with Google Play Services.",
116
+ "required": [
117
+ "platform",
118
+ "token"
119
+ ],
120
+ "properties": {
121
+ "platform": {
122
+ "type": "string",
123
+ "const": "fcm",
124
+ "description": "Platform identifier (discriminator field)."
125
+ },
126
+ "token": {
127
+ "type": "string",
128
+ "description": "FCM registration token."
129
+ },
130
+ "projectId": {
131
+ "type": "string",
132
+ "description": "Firebase project ID."
133
+ },
134
+ "packageName": {
135
+ "type": "string",
136
+ "description": "Android app package name."
137
+ }
138
+ }
139
+ },
140
+ {
141
+ "type": "object",
142
+ "description": "Huawei Mobile Services (HMS) Push for Huawei devices without Google Play Services.",
143
+ "required": [
144
+ "platform",
145
+ "token"
146
+ ],
147
+ "properties": {
148
+ "platform": {
149
+ "type": "string",
150
+ "const": "hms",
151
+ "description": "Platform identifier (discriminator field)."
152
+ },
153
+ "token": {
154
+ "type": "string",
155
+ "description": "HMS Push token."
156
+ },
157
+ "appId": {
158
+ "type": "string",
159
+ "description": "Huawei AppGallery app ID."
160
+ },
161
+ "packageName": {
162
+ "type": "string",
163
+ "description": "Android app package name."
164
+ }
165
+ }
166
+ },
167
+ {
168
+ "type": "object",
169
+ "description": "Web Push API for Progressive Web Apps and browsers.",
170
+ "required": [
171
+ "platform",
172
+ "endpoint"
173
+ ],
174
+ "properties": {
175
+ "platform": {
176
+ "type": "string",
177
+ "const": "webpush",
178
+ "description": "Platform identifier (discriminator field)."
179
+ },
180
+ "endpoint": {
181
+ "type": "string",
182
+ "description": "Push service endpoint URL."
183
+ },
184
+ "keys": {
185
+ "type": "object",
186
+ "properties": {
187
+ "p256dh": {
188
+ "type": "string",
189
+ "description": "Client public key for encryption (base64)."
190
+ },
191
+ "auth": {
192
+ "type": "string",
193
+ "description": "Authentication secret (base64)."
194
+ }
195
+ }
196
+ },
197
+ "browser": {
198
+ "type": "string",
199
+ "description": "Browser name/version (e.g., 'Chrome 120')."
200
+ }
201
+ }
202
+ }
203
+ ]
204
+ },
205
+ "appVersion": {
206
+ "type": "string",
207
+ "description": "Version of the application installed on this device (e.g., 2.5.1, 3.0.0-beta)."
208
+ },
209
+ "attribution": {
210
+ "type": "object",
211
+ "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.",
212
+ "properties": {
213
+ "referrerCode": {
214
+ "type": "string",
215
+ "description": "Referral code used during app installation. Could be from friend invite, affiliate program, or promotion code."
216
+ },
217
+ "source": {
218
+ "type": "string",
219
+ "description": "Installation source (e.g., 'organic', 'google_ads', 'facebook_ads', 'app_store', 'play_store', 'sms_campaign', 'email_campaign', 'qr_code')."
220
+ },
221
+ "campaign": {
222
+ "type": "string",
223
+ "description": "Marketing campaign identifier that led to this installation (e.g., 'summer_2024', 'new_year_promo', 'branch_opening')."
224
+ },
225
+ "medium": {
226
+ "type": "string",
227
+ "description": "Marketing medium (e.g., 'cpc', 'social', 'email', 'sms', 'banner', 'outdoor')."
228
+ },
229
+ "utmParameters": {
230
+ "type": "object",
231
+ "description": "UTM parameters from marketing URLs. Standard tracking parameters for digital campaigns.",
232
+ "properties": {
233
+ "utm_source": {
234
+ "type": "string",
235
+ "description": "Traffic source (e.g., 'google', 'facebook', 'newsletter')."
236
+ },
237
+ "utm_medium": {
238
+ "type": "string",
239
+ "description": "Marketing medium (e.g., 'cpc', 'banner', 'email')."
240
+ },
241
+ "utm_campaign": {
242
+ "type": "string",
243
+ "description": "Campaign name (e.g., 'spring_sale', 'app_launch')."
244
+ },
245
+ "utm_term": {
246
+ "type": "string",
247
+ "description": "Paid search keywords."
248
+ },
249
+ "utm_content": {
250
+ "type": "string",
251
+ "description": "Ad variation identifier (A/B testing)."
252
+ }
253
+ }
254
+ },
255
+ "clickId": {
256
+ "type": "string",
257
+ "description": "Ad click identifier from ad networks (e.g., Google Click ID 'gclid', Facebook Click ID 'fbclid')."
258
+ },
259
+ "installReferrer": {
260
+ "type": "string",
261
+ "description": "Google Play Install Referrer or App Store attribution data. Raw referrer string from app store."
262
+ },
263
+ "attributionProvider": {
264
+ "type": "string",
265
+ "description": "Attribution SDK/service used (e.g., 'AppsFlyer', 'Adjust', 'Branch', 'Firebase', 'native')."
266
+ },
267
+ "attributionData": {
268
+ "type": "object",
269
+ "description": "Raw attribution data from third-party attribution provider. Provider-specific tracking data.",
270
+ "additionalProperties": true
271
+ }
272
+ }
273
+ },
274
+ "registeredDevice": {
275
+ "type": "object",
276
+ "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.",
277
+ "properties": {
278
+ "deviceId": {
279
+ "type": "string",
280
+ "description": "Device ID from existing device fact record. Used to compare with current deviceId from headers."
281
+ },
282
+ "installationId": {
283
+ "type": "string",
284
+ "format": "uuid",
285
+ "description": "Installation ID from existing device fact record. Used to detect reinstallation scenarios."
286
+ }
287
+ }
288
+ }
289
+ },
290
+ "required": [
291
+ "deviceId",
292
+ "installationId",
293
+ "deviceInfo",
294
+ "deviceCertificatePublicKey",
295
+ "appVersion"
296
+ ],
297
+ "additionalProperties": false
298
+ }
299
+ }
300
+ }
@@ -0,0 +1,270 @@
1
+ {
2
+ "_comment": "BUSINESS CONTEXT: Device registration start transition schema. Called on every app launch to register or update device. Contains essential device information captured during app initialization.",
3
+ "key": "device-register-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
+ "transition"
12
+ ],
13
+ "attributes": {
14
+ "type": "workflow",
15
+ "schema": {
16
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
17
+ "$id": "https://vnext.io/schemas/core/device-register-start.json",
18
+ "title": "Device Register Start",
19
+ "description": "Device registration initiation data. Contains device identification, hardware info, and optional marketing attribution data captured on app launch.",
20
+ "type": "object",
21
+ "properties": {
22
+ "deviceInfo": {
23
+ "type": "object",
24
+ "description": "Detailed information about the device and operating system.",
25
+ "properties": {
26
+ "osName": {
27
+ "type": "string",
28
+ "description": "Operating system name (e.g., iOS, Android, HarmonyOS, Windows, macOS)."
29
+ },
30
+ "osVersion": {
31
+ "type": "string",
32
+ "description": "Operating system version (e.g., 17.2.1, API 33, Windows 11)."
33
+ },
34
+ "deviceModel": {
35
+ "type": "string",
36
+ "description": "Device model (e.g., iPhone 14 Pro, Pixel 7, Galaxy S22, MacBook Pro)."
37
+ },
38
+ "manufacturer": {
39
+ "type": "string",
40
+ "description": "Device manufacturer (e.g., Apple, Samsung, Xiaomi, Huawei, Google)."
41
+ },
42
+ "screenResolution": {
43
+ "type": "string",
44
+ "description": "Device screen resolution (e.g., 1920x1080, 2532x1170)."
45
+ },
46
+ "language": {
47
+ "type": "string",
48
+ "description": "Device language setting (e.g., en-US, tr-TR)."
49
+ },
50
+ "timezone": {
51
+ "type": "string",
52
+ "description": "Device timezone (e.g., Europe/Istanbul, America/New_York)."
53
+ }
54
+ },
55
+ "required": [
56
+ "osName",
57
+ "osVersion",
58
+ "deviceModel",
59
+ "manufacturer"
60
+ ]
61
+ },
62
+ "deviceCertificatePublicKey": {
63
+ "type": "string",
64
+ "description": "Device-specific base public key. Used during initial device registration for device attestation. This is the root device identity, independent of user/consent."
65
+ },
66
+ "pushToken": {
67
+ "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.",
68
+ "oneOf": [
69
+ {
70
+ "type": "object",
71
+ "description": "Apple Push Notification Service (APNS) for iOS/iPadOS/macOS devices.",
72
+ "required": [
73
+ "platform",
74
+ "token"
75
+ ],
76
+ "properties": {
77
+ "platform": {
78
+ "type": "string",
79
+ "const": "apns",
80
+ "description": "Platform identifier (discriminator field)."
81
+ },
82
+ "token": {
83
+ "type": "string",
84
+ "description": "APNS device token (hex string, 64 characters)."
85
+ },
86
+ "environment": {
87
+ "type": "string",
88
+ "enum": [
89
+ "production",
90
+ "sandbox"
91
+ ],
92
+ "description": "APNS environment. production (App Store), sandbox (Development/TestFlight)."
93
+ },
94
+ "bundleId": {
95
+ "type": "string",
96
+ "description": "iOS app bundle identifier (e.g., 'com.burgan.mobilebanking')."
97
+ }
98
+ }
99
+ },
100
+ {
101
+ "type": "object",
102
+ "description": "Firebase Cloud Messaging (FCM) for Android devices with Google Play Services.",
103
+ "required": [
104
+ "platform",
105
+ "token"
106
+ ],
107
+ "properties": {
108
+ "platform": {
109
+ "type": "string",
110
+ "const": "fcm",
111
+ "description": "Platform identifier (discriminator field)."
112
+ },
113
+ "token": {
114
+ "type": "string",
115
+ "description": "FCM registration token."
116
+ },
117
+ "projectId": {
118
+ "type": "string",
119
+ "description": "Firebase project ID."
120
+ },
121
+ "packageName": {
122
+ "type": "string",
123
+ "description": "Android app package name."
124
+ }
125
+ }
126
+ },
127
+ {
128
+ "type": "object",
129
+ "description": "Huawei Mobile Services (HMS) Push for Huawei devices without Google Play Services.",
130
+ "required": [
131
+ "platform",
132
+ "token"
133
+ ],
134
+ "properties": {
135
+ "platform": {
136
+ "type": "string",
137
+ "const": "hms",
138
+ "description": "Platform identifier (discriminator field)."
139
+ },
140
+ "token": {
141
+ "type": "string",
142
+ "description": "HMS Push token."
143
+ },
144
+ "appId": {
145
+ "type": "string",
146
+ "description": "Huawei AppGallery app ID."
147
+ },
148
+ "packageName": {
149
+ "type": "string",
150
+ "description": "Android app package name."
151
+ }
152
+ }
153
+ },
154
+ {
155
+ "type": "object",
156
+ "description": "Web Push API for Progressive Web Apps and browsers.",
157
+ "required": [
158
+ "platform",
159
+ "endpoint"
160
+ ],
161
+ "properties": {
162
+ "platform": {
163
+ "type": "string",
164
+ "const": "webpush",
165
+ "description": "Platform identifier (discriminator field)."
166
+ },
167
+ "endpoint": {
168
+ "type": "string",
169
+ "description": "Push service endpoint URL."
170
+ },
171
+ "keys": {
172
+ "type": "object",
173
+ "properties": {
174
+ "p256dh": {
175
+ "type": "string",
176
+ "description": "Client public key for encryption (base64)."
177
+ },
178
+ "auth": {
179
+ "type": "string",
180
+ "description": "Authentication secret (base64)."
181
+ }
182
+ }
183
+ },
184
+ "browser": {
185
+ "type": "string",
186
+ "description": "Browser name/version (e.g., 'Chrome 120')."
187
+ }
188
+ }
189
+ }
190
+ ]
191
+ },
192
+ "appVersion": {
193
+ "type": "string",
194
+ "description": "Version of the application installed on this device (e.g., 2.5.1, 3.0.0-beta)."
195
+ },
196
+ "attribution": {
197
+ "type": "object",
198
+ "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.",
199
+ "properties": {
200
+ "referrerCode": {
201
+ "type": "string",
202
+ "description": "Referral code used during app installation. Could be from friend invite, affiliate program, or promotion code."
203
+ },
204
+ "source": {
205
+ "type": "string",
206
+ "description": "Installation source (e.g., 'organic', 'google_ads', 'facebook_ads', 'app_store', 'play_store', 'sms_campaign', 'email_campaign', 'qr_code')."
207
+ },
208
+ "campaign": {
209
+ "type": "string",
210
+ "description": "Marketing campaign identifier that led to this installation (e.g., 'summer_2024', 'new_year_promo', 'branch_opening')."
211
+ },
212
+ "medium": {
213
+ "type": "string",
214
+ "description": "Marketing medium (e.g., 'cpc', 'social', 'email', 'sms', 'banner', 'outdoor')."
215
+ },
216
+ "utmParameters": {
217
+ "type": "object",
218
+ "description": "UTM parameters from marketing URLs. Standard tracking parameters for digital campaigns.",
219
+ "properties": {
220
+ "utm_source": {
221
+ "type": "string",
222
+ "description": "Traffic source (e.g., 'google', 'facebook', 'newsletter')."
223
+ },
224
+ "utm_medium": {
225
+ "type": "string",
226
+ "description": "Marketing medium (e.g., 'cpc', 'banner', 'email')."
227
+ },
228
+ "utm_campaign": {
229
+ "type": "string",
230
+ "description": "Campaign name (e.g., 'spring_sale', 'app_launch')."
231
+ },
232
+ "utm_term": {
233
+ "type": "string",
234
+ "description": "Paid search keywords."
235
+ },
236
+ "utm_content": {
237
+ "type": "string",
238
+ "description": "Ad variation identifier (A/B testing)."
239
+ }
240
+ }
241
+ },
242
+ "clickId": {
243
+ "type": "string",
244
+ "description": "Ad click identifier from ad networks (e.g., Google Click ID 'gclid', Facebook Click ID 'fbclid')."
245
+ },
246
+ "installReferrer": {
247
+ "type": "string",
248
+ "description": "Google Play Install Referrer or App Store attribution data. Raw referrer string from app store."
249
+ },
250
+ "attributionProvider": {
251
+ "type": "string",
252
+ "description": "Attribution SDK/service used (e.g., 'AppsFlyer', 'Adjust', 'Branch', 'Firebase', 'native')."
253
+ },
254
+ "attributionData": {
255
+ "type": "object",
256
+ "description": "Raw attribution data from third-party attribution provider. Provider-specific tracking data.",
257
+ "additionalProperties": true
258
+ }
259
+ }
260
+ }
261
+ },
262
+ "required": [
263
+ "deviceInfo",
264
+ "deviceCertificatePublicKey",
265
+ "appVersion"
266
+ ],
267
+ "additionalProperties": false
268
+ }
269
+ }
270
+ }