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