@burgan-tech/morph-idm-runtime 0.0.2 → 0.0.3
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.
- package/burgan-tech-morph-idm-runtime-0.0.3.tgz +0 -0
- package/morph-idm/Schemas/client/client-update-1.0.0.json +263 -0
- package/morph-idm/Tasks/{user/send-push-task.json → user-login/push-send-task.json} +2 -2
- package/morph-idm/Workflows/client/client-1.0.0.json +7 -2
- package/morph-idm/Workflows/client/execute/client-update.http +763 -0
- package/morph-idm/Workflows/client/execute/client.http +12 -4
- package/morph-idm/Workflows/client/src/CreateRsaByHttpCallMapping.csx +10 -14
- package/morph-idm/Workflows/user/src/SendOtpSmsMapping.csx +3 -2
- package/morph-idm/Workflows/user-login/src/DeviceSearchMapping.csx +11 -3
- package/morph-idm/Workflows/user-login/src/PasswordVerifyMapping.csx +7 -4
- package/morph-idm/Workflows/user-login/src/PushSendMapping.csx +101 -0
- package/morph-idm/Workflows/user-login/src/ScopesByUserGetMapping.csx +7 -5
- package/morph-idm/Workflows/user-login/user-login.1.0.0.json +8 -7
- package/package.json +1 -1
- package/vnext.config.json +1 -1
- package/burgan-tech-morph-idm-runtime-0.0.2.tgz +0 -0
- package/morph-idm/Schemas/client/client-update-master-1.0.0.json +0 -201
- package/morph-idm/Workflows/client/client-update-1.0.0.json +0 -202
- package/morph-idm/Workflows/client-manager/client-manager-1.0.0.json +0 -217
- package/morph-idm/Workflows/client-manager/execute/client-manager.http +0 -214
- package/morph-idm/Workflows/client-manager/src/ClientCreatedRule.csx +0 -28
- package/morph-idm/Workflows/client-manager/src/ClientExistsRule.csx +0 -25
- package/morph-idm/Workflows/client-manager/src/CreateClientSubFlowMapping.csx +0 -63
- package/morph-idm/Workflows/client-manager/src/GetClientForManagerMapping.csx +0 -59
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_comment": "BUSINESS CONTEXT: Client update operational flow schema. Implements dual control (4-eyes principle) for client configuration changes. Uses CHANGESET approach: only modified fields are stored (partial update). UI resolves client reference for display (real-time, no stale data). On approval, only populated fields are patched to client fact. Example: If user changes only redirectUris and requirePKCE, only those 2 fields + metadata are stored in update request.",
|
|
3
|
-
"key": "client-update-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/client-update-master.json",
|
|
18
|
-
"title": "Client Update",
|
|
19
|
-
"description": "Client update request data. CHANGESET MODEL: Only populate fields that are being changed. All fields except clientFactKey and changeReason are optional. Immutable fields (clientId, clientSecret) are excluded and cannot be updated. IMPORTANT: For arrays and complex types, if field is non-null, ENTIRE value will REPLACE existing value in client fact (no partial merge). Example: if redirectUris is provided, it completely replaces all existing redirectUris. To remove all items, send empty array []. Null/undefined = no change.",
|
|
20
|
-
"type": "object",
|
|
21
|
-
"required": [
|
|
22
|
-
"clientFactKey",
|
|
23
|
-
"changeReason"
|
|
24
|
-
],
|
|
25
|
-
"properties": {
|
|
26
|
-
"clientFactKey": {
|
|
27
|
-
"type": "string",
|
|
28
|
-
"description": "Reference to the client fact being updated."
|
|
29
|
-
},
|
|
30
|
-
"changeReason": {
|
|
31
|
-
"type": "string",
|
|
32
|
-
"description": "Business reason for this update request. Required for audit trail."
|
|
33
|
-
},
|
|
34
|
-
"rejectionReason": {
|
|
35
|
-
"type": "string",
|
|
36
|
-
"description": "Reason for rejection. Set by approver when rejecting."
|
|
37
|
-
},
|
|
38
|
-
"allowedGrants": {
|
|
39
|
-
"type": "array",
|
|
40
|
-
"items": {
|
|
41
|
-
"type": "string"
|
|
42
|
-
},
|
|
43
|
-
"description": "OAuth2 grant types (authorization_code, client_credentials, refresh_token, etc.). If provided, REPLACES entire array in client fact."
|
|
44
|
-
},
|
|
45
|
-
"allowedFirstFactor": {
|
|
46
|
-
"type": "array",
|
|
47
|
-
"items": {
|
|
48
|
-
"type": "string",
|
|
49
|
-
"enum": [
|
|
50
|
-
"password",
|
|
51
|
-
"pin",
|
|
52
|
-
"sldap"
|
|
53
|
-
]
|
|
54
|
-
},
|
|
55
|
-
"description": "Allowed first-factor authentication methods. If provided, REPLACES entire array."
|
|
56
|
-
},
|
|
57
|
-
"redirectUris": {
|
|
58
|
-
"type": "array",
|
|
59
|
-
"items": {
|
|
60
|
-
"type": "string",
|
|
61
|
-
"format": "uri"
|
|
62
|
-
},
|
|
63
|
-
"description": "OAuth2 redirect URIs. Critical for security. If provided, REPLACES entire array. To remove all URIs, send []."
|
|
64
|
-
},
|
|
65
|
-
"postLogoutRedirectUris": {
|
|
66
|
-
"type": "array",
|
|
67
|
-
"items": {
|
|
68
|
-
"type": "string",
|
|
69
|
-
"format": "uri"
|
|
70
|
-
},
|
|
71
|
-
"description": "Post-logout redirect URIs. If provided, REPLACES entire array."
|
|
72
|
-
},
|
|
73
|
-
"allowedOrigins": {
|
|
74
|
-
"type": "array",
|
|
75
|
-
"items": {
|
|
76
|
-
"type": "string",
|
|
77
|
-
"format": "uri"
|
|
78
|
-
},
|
|
79
|
-
"description": "CORS allowed origins for SPA applications. If provided, REPLACES entire array."
|
|
80
|
-
},
|
|
81
|
-
"loginURI": {
|
|
82
|
-
"type": "string",
|
|
83
|
-
"format": "uri",
|
|
84
|
-
"description": "Custom login page URI."
|
|
85
|
-
},
|
|
86
|
-
"returnURI": {
|
|
87
|
-
"type": "string",
|
|
88
|
-
"format": "uri",
|
|
89
|
-
"description": "Default return URI after successful login."
|
|
90
|
-
},
|
|
91
|
-
"logoutURI": {
|
|
92
|
-
"type": "string",
|
|
93
|
-
"format": "uri",
|
|
94
|
-
"description": "Logout completion URI."
|
|
95
|
-
},
|
|
96
|
-
"tokens": {
|
|
97
|
-
"type": "array",
|
|
98
|
-
"items": {
|
|
99
|
-
"type": "object",
|
|
100
|
-
"properties": {
|
|
101
|
-
"type": {
|
|
102
|
-
"type": "string",
|
|
103
|
-
"enum": [
|
|
104
|
-
"identity",
|
|
105
|
-
"access",
|
|
106
|
-
"refresh"
|
|
107
|
-
],
|
|
108
|
-
"description": "Token type."
|
|
109
|
-
},
|
|
110
|
-
"duration": {
|
|
111
|
-
"type": "string",
|
|
112
|
-
"description": "Token validity duration (ISO-8601 format, e.g., PT5M)."
|
|
113
|
-
},
|
|
114
|
-
"claims": {
|
|
115
|
-
"type": "array",
|
|
116
|
-
"items": {
|
|
117
|
-
"type": "object",
|
|
118
|
-
"properties": {
|
|
119
|
-
"name": {
|
|
120
|
-
"type": "string",
|
|
121
|
-
"description": "Claim name."
|
|
122
|
-
},
|
|
123
|
-
"value": {
|
|
124
|
-
"type": "string",
|
|
125
|
-
"description": "Claim value or expression."
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
"description": "Custom claims for this token type."
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
"description": "Token configurations (duration, claims). If provided, REPLACES entire tokens array. To modify one token type, include all 3 types in update."
|
|
134
|
-
},
|
|
135
|
-
"authorizationCodeLifetime": {
|
|
136
|
-
"type": "string",
|
|
137
|
-
"description": "Authorization code lifetime (ISO-8601)."
|
|
138
|
-
},
|
|
139
|
-
"refreshTokenRotation": {
|
|
140
|
-
"type": "string",
|
|
141
|
-
"enum": [
|
|
142
|
-
"reuse",
|
|
143
|
-
"rotate"
|
|
144
|
-
],
|
|
145
|
-
"description": "Refresh token rotation strategy."
|
|
146
|
-
},
|
|
147
|
-
"refreshTokenAbsoluteLifetime": {
|
|
148
|
-
"type": "string",
|
|
149
|
-
"description": "Refresh token absolute lifetime (ISO-8601)."
|
|
150
|
-
},
|
|
151
|
-
"refreshTokenReuseInterval": {
|
|
152
|
-
"type": "string",
|
|
153
|
-
"description": "Grace period for rotated refresh tokens (ISO-8601)."
|
|
154
|
-
},
|
|
155
|
-
"allowOffline": {
|
|
156
|
-
"type": "boolean",
|
|
157
|
-
"description": "Allow offline access (refresh tokens without user presence)."
|
|
158
|
-
},
|
|
159
|
-
"requirePKCE": {
|
|
160
|
-
"type": "boolean",
|
|
161
|
-
"description": "Require PKCE for authorization code flow."
|
|
162
|
-
},
|
|
163
|
-
"allowRememberMe": {
|
|
164
|
-
"type": "boolean",
|
|
165
|
-
"description": "Allow remember me functionality."
|
|
166
|
-
},
|
|
167
|
-
"clientMetadata": {
|
|
168
|
-
"type": "object",
|
|
169
|
-
"properties": {
|
|
170
|
-
"clientName": {
|
|
171
|
-
"type": "string",
|
|
172
|
-
"description": "Human-readable client name."
|
|
173
|
-
},
|
|
174
|
-
"clientUri": {
|
|
175
|
-
"type": "string",
|
|
176
|
-
"format": "uri",
|
|
177
|
-
"description": "Client's home page URL."
|
|
178
|
-
},
|
|
179
|
-
"logoUri": {
|
|
180
|
-
"type": "string",
|
|
181
|
-
"format": "uri",
|
|
182
|
-
"description": "Client logo URL."
|
|
183
|
-
},
|
|
184
|
-
"policyUri": {
|
|
185
|
-
"type": "string",
|
|
186
|
-
"format": "uri",
|
|
187
|
-
"description": "Privacy policy URL."
|
|
188
|
-
},
|
|
189
|
-
"tosUri": {
|
|
190
|
-
"type": "string",
|
|
191
|
-
"format": "uri",
|
|
192
|
-
"description": "Terms of service URL."
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
"description": "Client display metadata. If provided, REPLACES entire metadata object. To update one field, include all fields you want to keep."
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
"additionalProperties": false
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_comment": "BUSINESS CONTEXT: Client update operational flow. Implements dual control (maker-checker) pattern for client modifications. Uses CHANGESET model: only modified fields stored. Flow: 1) Maker creates draft with clientFactKey reference, 2) UI resolves reference to display current values (real-time), 3) Maker edits only needed fields (e.g., redirectUris, requirePKCE), 4) Submit for approval, 5) Checker approves/rejects (different user), 6) On approve→approved transition, onentry task patches client fact: for each non-null field in changeset, update corresponding field in client fact. Example: if update.redirectUris exists, clientFact.redirectUris = update.redirectUris. No full snapshot, only delta applied.",
|
|
3
|
-
"$schema": "../../../schemas/schemas/workflow-definition.schema.json",
|
|
4
|
-
"key": "update",
|
|
5
|
-
"flow": "sys-flows",
|
|
6
|
-
"domain": "morph-idm",
|
|
7
|
-
"version": "1.0.0",
|
|
8
|
-
"tags": [
|
|
9
|
-
"operational"
|
|
10
|
-
],
|
|
11
|
-
"attributes": {
|
|
12
|
-
"schema": {
|
|
13
|
-
"key": "client-update-master",
|
|
14
|
-
"domain": "morph-idm",
|
|
15
|
-
"version": "1.0.0",
|
|
16
|
-
"flow": "sys-schemas"
|
|
17
|
-
},
|
|
18
|
-
"type": "F",
|
|
19
|
-
"labels": [
|
|
20
|
-
{
|
|
21
|
-
"label": "Client Update",
|
|
22
|
-
"language": "en"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"label": "İstemci Güncelleme",
|
|
26
|
-
"language": "tr"
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
"startTransition": {
|
|
30
|
-
"key": "start",
|
|
31
|
-
"target": "draft",
|
|
32
|
-
"triggerType": 0,
|
|
33
|
-
"versionStrategy": "Minor",
|
|
34
|
-
"labels": [
|
|
35
|
-
{
|
|
36
|
-
"label": "Başlat",
|
|
37
|
-
"language": "tr"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"label": "Start",
|
|
41
|
-
"language": "en"
|
|
42
|
-
}
|
|
43
|
-
]
|
|
44
|
-
},
|
|
45
|
-
"states": [
|
|
46
|
-
{
|
|
47
|
-
"key": "draft",
|
|
48
|
-
"stateType": 1,
|
|
49
|
-
"versionStrategy": "Minor",
|
|
50
|
-
"labels": [
|
|
51
|
-
{
|
|
52
|
-
"language": "tr",
|
|
53
|
-
"label": "Taslak"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"language": "en",
|
|
57
|
-
"label": "Draft"
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
|
-
"transitions": [
|
|
61
|
-
{
|
|
62
|
-
"key": "submit",
|
|
63
|
-
"target": "pending-approval",
|
|
64
|
-
"versionStrategy": "Major",
|
|
65
|
-
"triggerType": 0,
|
|
66
|
-
"schema": null,
|
|
67
|
-
"labels": [
|
|
68
|
-
{
|
|
69
|
-
"label": "Onaya Gönder",
|
|
70
|
-
"language": "tr"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"label": "Submit for Approval",
|
|
74
|
-
"language": "en"
|
|
75
|
-
}
|
|
76
|
-
]
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"key": "cancel",
|
|
80
|
-
"target": "cancelled",
|
|
81
|
-
"versionStrategy": "Major",
|
|
82
|
-
"triggerType": 0,
|
|
83
|
-
"schema": null,
|
|
84
|
-
"labels": [
|
|
85
|
-
{
|
|
86
|
-
"label": "İptal Et",
|
|
87
|
-
"language": "tr"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"label": "Cancel",
|
|
91
|
-
"language": "en"
|
|
92
|
-
}
|
|
93
|
-
]
|
|
94
|
-
}
|
|
95
|
-
]
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"key": "pending-approval",
|
|
99
|
-
"stateType": 2,
|
|
100
|
-
"versionStrategy": "Minor",
|
|
101
|
-
"labels": [
|
|
102
|
-
{
|
|
103
|
-
"language": "tr",
|
|
104
|
-
"label": "Onay Bekliyor"
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"language": "en",
|
|
108
|
-
"label": "Pending Approval"
|
|
109
|
-
}
|
|
110
|
-
],
|
|
111
|
-
"transitions": [
|
|
112
|
-
{
|
|
113
|
-
"key": "approve",
|
|
114
|
-
"target": "approved",
|
|
115
|
-
"versionStrategy": "Major",
|
|
116
|
-
"triggerType": 0,
|
|
117
|
-
"schema": null,
|
|
118
|
-
"labels": [
|
|
119
|
-
{
|
|
120
|
-
"label": "Onayla",
|
|
121
|
-
"language": "tr"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"label": "Approve",
|
|
125
|
-
"language": "en"
|
|
126
|
-
}
|
|
127
|
-
]
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
"key": "reject",
|
|
131
|
-
"target": "rejected",
|
|
132
|
-
"versionStrategy": "Major",
|
|
133
|
-
"triggerType": 0,
|
|
134
|
-
"schema": null,
|
|
135
|
-
"labels": [
|
|
136
|
-
{
|
|
137
|
-
"label": "Reddet",
|
|
138
|
-
"language": "tr"
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
"label": "Reject",
|
|
142
|
-
"language": "en"
|
|
143
|
-
}
|
|
144
|
-
]
|
|
145
|
-
}
|
|
146
|
-
]
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
"key": "approved",
|
|
150
|
-
"_comment": "IMPLEMENTATION: Onentry task must: 1) Resolve clientFactKey to get target client, 2) Extract all non-null fields from update fact attributes (changeset), 3) PATCH client fact: Object.entries(changeset).forEach(([key, value]) => { if (value !== null && value !== undefined) clientFact.attributes[key] = value; }), 4) Trigger client fact version bump (Major). Security: Validate approver ≠ requester before patching.",
|
|
151
|
-
"stateType": 3,
|
|
152
|
-
"versionStrategy": "Minor",
|
|
153
|
-
"labels": [
|
|
154
|
-
{
|
|
155
|
-
"language": "tr",
|
|
156
|
-
"label": "Onaylandı"
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
"language": "en",
|
|
160
|
-
"label": "Approved"
|
|
161
|
-
}
|
|
162
|
-
],
|
|
163
|
-
"transitions": [],
|
|
164
|
-
"stateSubType": 1
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
"key": "rejected",
|
|
168
|
-
"stateType": 3,
|
|
169
|
-
"versionStrategy": "Minor",
|
|
170
|
-
"labels": [
|
|
171
|
-
{
|
|
172
|
-
"language": "tr",
|
|
173
|
-
"label": "Reddedildi"
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
"language": "en",
|
|
177
|
-
"label": "Rejected"
|
|
178
|
-
}
|
|
179
|
-
],
|
|
180
|
-
"transitions": [],
|
|
181
|
-
"stateSubType": 1
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
"key": "cancelled",
|
|
185
|
-
"stateType": 3,
|
|
186
|
-
"versionStrategy": "Minor",
|
|
187
|
-
"labels": [
|
|
188
|
-
{
|
|
189
|
-
"language": "tr",
|
|
190
|
-
"label": "İptal Edildi"
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
"language": "en",
|
|
194
|
-
"label": "Cancelled"
|
|
195
|
-
}
|
|
196
|
-
],
|
|
197
|
-
"transitions": [],
|
|
198
|
-
"stateSubType": 1
|
|
199
|
-
}
|
|
200
|
-
]
|
|
201
|
-
}
|
|
202
|
-
}
|
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "../../../schemas/schemas/workflow-definition.schema.json",
|
|
3
|
-
"_comment": "Client Manager - Get or Create pattern. First tries to fetch existing client, if not found creates a new one.",
|
|
4
|
-
"key": "client-manager",
|
|
5
|
-
"flow": "sys-flows",
|
|
6
|
-
"domain": "morph-idm",
|
|
7
|
-
"version": "1.0.0",
|
|
8
|
-
"tags": [
|
|
9
|
-
"client",
|
|
10
|
-
"manager",
|
|
11
|
-
"orchestrator"
|
|
12
|
-
],
|
|
13
|
-
"attributes": {
|
|
14
|
-
"type": "F",
|
|
15
|
-
"labels": [
|
|
16
|
-
{
|
|
17
|
-
"label": "Client Manager",
|
|
18
|
-
"language": "en"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"label": "Client Yöneticisi",
|
|
22
|
-
"language": "tr"
|
|
23
|
-
}
|
|
24
|
-
],
|
|
25
|
-
"startTransition": {
|
|
26
|
-
"key": "start",
|
|
27
|
-
"target": "check-client",
|
|
28
|
-
"triggerType": 0,
|
|
29
|
-
"versionStrategy": "Minor",
|
|
30
|
-
"labels": [
|
|
31
|
-
{
|
|
32
|
-
"label": "Start",
|
|
33
|
-
"language": "en"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"label": "Başlat",
|
|
37
|
-
"language": "tr"
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
},
|
|
41
|
-
"sharedTransitions": [],
|
|
42
|
-
"states": [
|
|
43
|
-
{
|
|
44
|
-
"key": "check-client",
|
|
45
|
-
"stateType": 1,
|
|
46
|
-
"versionStrategy": "Minor",
|
|
47
|
-
"labels": [
|
|
48
|
-
{
|
|
49
|
-
"label": "Check Client",
|
|
50
|
-
"language": "en"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"label": "Client Kontrol",
|
|
54
|
-
"language": "tr"
|
|
55
|
-
}
|
|
56
|
-
],
|
|
57
|
-
"onEntries": [
|
|
58
|
-
{
|
|
59
|
-
"order": 1,
|
|
60
|
-
"task": {
|
|
61
|
-
"key": "get-client-by-task",
|
|
62
|
-
"domain": "morph-idm",
|
|
63
|
-
"version": "1.0.0",
|
|
64
|
-
"flow": "sys-tasks"
|
|
65
|
-
},
|
|
66
|
-
"mapping": {
|
|
67
|
-
"location": "./src/GetClientForManagerMapping.csx",
|
|
68
|
-
"code": "dXNpbmcgU3lzdGVtLlRocmVhZGluZy5UYXNrczsKdXNpbmcgQkJULldvcmtmbG93LkRlZmluaXRpb25zOwp1c2luZyBCQlQuV29ya2Zsb3cuU2NyaXB0aW5nOwp1c2luZyBCQlQuV29ya2Zsb3cuU2NyaXB0aW5nLkZ1bmN0aW9uczsKCnB1YmxpYyBjbGFzcyBHZXRDbGllbnRGb3JNYW5hZ2VyTWFwcGluZyA6IFNjcml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luZzogQ2xpZW50IGZvdW5kIik7CiAgICAgICAgICAgIAogICAgICAgICAgICByZXR1cm4gbmV3IFNjcmlwdFJlc3BvbnNlCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIERhdGEgPSBuZXcKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICBjbGllbnRGb3VuZCA9IHRydWUsCiAgICAgICAgICAgICAgICAgICAgZXhpc3RpbmdDbGllbnQgPSBuZXcKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgIGtleSA9IGNvbnRleHQuQm9keS5kYXRhLmtleSwKICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGUgPSBjb250ZXh0LkJvZHkuZGF0YS5hdHRyaWJ1dGVzPy5zdGF0ZT8ua2V5LAogICAgICAgICAgICAgICAgICAgICAgICBkYXRhID0gY2xpZW50RGF0YQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgZWxzZQogICAgICAgIHsKICAgICAgICAgICAgTG9nSW5mb3JtYXRpb24oIkdldENsaWVudEZvck1hbmFnZXJNYXBwaW5nOiBDbGllbnQgbm90IGZvdW5kLCB3aWxsIGNyZWF0ZSBuZXcgb25lIik7CiAgICAgICAgICAgIAogICAgICAgICAgICByZXR1cm4gbmV3IFNjcmlwdFJlc3BvbnNlCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIERhdGEgPSBuZXcKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICBjbGllbnRGb3VuZCA9IGZhbHNlLAogICAgICAgICAgICAgICAgICAgIGV4aXN0aW5nQ2xpZW50ID0gKG9iamVjdCludWxsCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH07CiAgICAgICAgfQogICAgfQp9Cgo="
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
],
|
|
72
|
-
"transitions": [
|
|
73
|
-
{
|
|
74
|
-
"key": "client-exists",
|
|
75
|
-
"target": "client-ready",
|
|
76
|
-
"versionStrategy": "Major",
|
|
77
|
-
"triggerType": 1,
|
|
78
|
-
"schema": null,
|
|
79
|
-
"labels": [
|
|
80
|
-
{
|
|
81
|
-
"label": "Client Exists",
|
|
82
|
-
"language": "en"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"label": "Client Mevcut",
|
|
86
|
-
"language": "tr"
|
|
87
|
-
}
|
|
88
|
-
],
|
|
89
|
-
"rule": {
|
|
90
|
-
"location": "./src/ClientExistsRule.csx",
|
|
91
|
-
"code": "dXNpbmcgU3lzdGVtLlRocmVhZGluZy5UYXNrczsKdXNpbmcgQkJULldvcmtmbG93LlNjcmlwdGluZzsKdXNpbmcgQkJULldvcmtmbG93LlNjcmlwdGluZy5GdW5jdGlvbnM7CgpwdWJsaWMgY2xhc3MgQ2xpZW50RXhpc3RzUnVsZSA6IFNjcmlwdEJhc2UsIElDb25kaXRpb25NYXBwaW5nCnsKICAgIHB1YmxpYyBhc3luYyBUYXNrPGJvb2w+IEhhbmRsZXIoU2NyaXB0Q29udGV4dCBjb250ZXh0KQogICAgewogICAgICAgIC8vIENoZWNrIGlmIGNsaWVudCB3YXMgZm91bmQgaW4gdGhlIGRhdGFiYXNlCiAgICAgICAgdmFyIGNsaWVudEZvdW5kID0gY29udGV4dC5JbnN0YW5jZT8uRGF0YT8uY2xpZW50Rm91bmQ7CiAgICAgICAgCiAgICAgICAgaWYgKGNsaWVudEZvdW5kID09IG51bGwpCiAgICAgICAgewogICAgICAgICAgICBMb2dXYXJuaW5nKCJDbGllbnRFeGlzdHNSdWxlOiBjbGllbnRGb3VuZCBmbGFnIG5vdCBzZXQiKTsKICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIH0KICAgICAgICAKICAgICAgICBib29sIGV4aXN0cyA9IChib29sKWNsaWVudEZvdW5kOwogICAgICAgIAogICAgICAgIExvZ0luZm9ybWF0aW9uKCQiQ2xpZW50RXhpc3RzUnVsZTogQ2xpZW50IGV4aXN0cyA9IHtleGlzdHN9Iik7CiAgICAgICAgCiAgICAgICAgcmV0dXJuIGV4aXN0czsKICAgIH0KfQoK"
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
"key": "client-not-exists",
|
|
96
|
-
"target": "create-client",
|
|
97
|
-
"versionStrategy": "Major",
|
|
98
|
-
"triggerType": 1,
|
|
99
|
-
"triggerKind": 10,
|
|
100
|
-
"schema": null,
|
|
101
|
-
"labels": [
|
|
102
|
-
{
|
|
103
|
-
"label": "Client Not Exists",
|
|
104
|
-
"language": "en"
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"label": "Client Yok",
|
|
108
|
-
"language": "tr"
|
|
109
|
-
}
|
|
110
|
-
]
|
|
111
|
-
}
|
|
112
|
-
]
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"key": "create-client",
|
|
116
|
-
"stateType": 4,
|
|
117
|
-
"versionStrategy": "Minor",
|
|
118
|
-
"labels": [
|
|
119
|
-
{
|
|
120
|
-
"label": "Create Client",
|
|
121
|
-
"language": "en"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"label": "Client Oluştur",
|
|
125
|
-
"language": "tr"
|
|
126
|
-
}
|
|
127
|
-
],
|
|
128
|
-
"subFlow": {
|
|
129
|
-
"type": "S",
|
|
130
|
-
"process": {
|
|
131
|
-
"key": "client",
|
|
132
|
-
"domain": "morph-idm",
|
|
133
|
-
"version": "1.0.0",
|
|
134
|
-
"flow": "sys-flows"
|
|
135
|
-
},
|
|
136
|
-
"mapping": {
|
|
137
|
-
"location": "./src/CreateClientSubFlowMapping.csx",
|
|
138
|
-
"code": "dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uRHluYW1pYzsKdXNpbmcgU3lzdGVtLlRocmVhZGluZy5UYXNrczsKdXNpbmcgQkJULldvcmtmbG93LkRlZmluaXRpb25zOwp1c2luZyBCQl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sKICAgICAgICAgICAgZXhwYW5kb09iamVjdC5hdHRyaWJ1dGVzID0gY29udGV4dC5JbnN0YW5jZS5EYXRhLmNsaWVudENvbmZpZzsKICAgICAgICB9CiAgICAgICAgZWxzZQogICAgICAgIHsKICAgICAgICAgICAgLy8gRGVmYXVsdCBtaW5pbWFsIGNsaWVudCBjb25maWd1cmF0aW9uCiAgICAgICAgICAgIGV4cGFuZG9PYmplY3QuYXR0cmlidXRlcyA9IG5ldwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBhbGxvd2VkR3JhbnRzID0gbmV3W10geyAiYXV0aG9yaXphdGlvbl9jb2RlIiwgInJlZnJlc2hfdG9rZW4iIH0sCiAgICAgICAgICAgICAgICBjbGllbnRUeXBlID0gImNvbmZpZGVudGlhbCIsCiAgICAgICAgICAgICAgICBhbGxvd2VkU2NvcGVHcm91cHMgPSBuZXdbXSB7ICJJYkN1c3RvbWVyIiB9CiAgICAgICAgICAgIH07CiAgICAgICAgfQogICAgICAgIAogICAgICAgIExvZ0luZm9ybWF0aW9uKCQiQ3JlYXRlQ2xpZW50U3ViRmxvd01hcHBpbmc6IFN0YXJ0aW5nIGNsaWVudCB3b3JrZmxvdyB3aXRoIGtleSAne2V4cGFuZG9PYmplY3Qua2V5fSciKTsKICAgICAgICAKICAgICAgICByZXR1cm4gVGFzay5Gcm9tUmVzdWx0KG5ldyBTY3JpcHRSZXNwb25zZQogICAgICAgIHsKICAgICAgICAgICAgRGF0YSA9IGV4cGFuZG9PYmplY3QsCiAgICAgICAgICAgIEhlYWRlcnMgPSBudWxsCiAgICAgICAgfSk7CiAgICB9CgogICAgcHVibGljIGFzeW5jIFRhc2s8U2NyaXB0UmVzcG9uc2U+IE91dHB1dEhhbmRsZXIoU2NyaXB0Q29udGV4dCBjb250ZXh0KQogICAgewogICAgICAgIC8vIFN0b3JlIHRoZSBjcmVhdGVkIGNsaWVudCBpbmZvcm1hdGlvbgogICAgICAgIExvZ0luZm9ybWF0aW9uKCJDcmVhdGVDbGllbnRTdWJGbG93TWFwcGluZzogQ2xpZW50IHN1YmZsb3cgY29tcGxldGVkIik7CiAgICAgICAgCiAgICAgICAgcmV0dXJuIG5ldyBTY3JpcHRSZXNwb25zZQogICAgICAgIHsKICAgICAgICAgICAgRGF0YSA9IG5ldwogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBjcmVhdGVkQ2xpZW50ID0gY29udGV4dC5Cb2R5CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIEhlYWRlcnMgPSBudWxsCiAgICAgICAgfTsKICAgIH0KfQoK"
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
"transitions": [
|
|
142
|
-
{
|
|
143
|
-
"key": "client-created",
|
|
144
|
-
"target": "client-ready",
|
|
145
|
-
"versionStrategy": "Major",
|
|
146
|
-
"triggerType": 1,
|
|
147
|
-
"schema": null,
|
|
148
|
-
"labels": [
|
|
149
|
-
{
|
|
150
|
-
"label": "Client Created",
|
|
151
|
-
"language": "en"
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
"label": "Client Oluşturuldu",
|
|
155
|
-
"language": "tr"
|
|
156
|
-
}
|
|
157
|
-
],
|
|
158
|
-
"rule": {
|
|
159
|
-
"location": "./src/ClientCreatedRule.csx",
|
|
160
|
-
"code": "dXNpbmcgU3lzdGVtLlRocmVhZGluZy5UYXNrczsKdXNpbmcgQkJULldvcmtmbG93LlNjcmlwdGluZzsKdXNpbmcgQkJULldvcmtmbG93LlNjcmlwdGluZy5GdW5jdGlvbnM7CgpwdWJsaWMgY2xhc3MgQ2xpZW50Q3JlYXRlZFJ1bGUgOiBTY3JpcHRCYXNlLCBJQ29uZGl0aW9uTWFwcGluZwp7CiAgICBwdWJsaWMgYXN5bmMgVGFzazxib29sPiBIYW5kbGVyKFNjcmlwdENvbnRleHQgY29udGV4dCkKICAgIHsKICAgICAgICAvLyBDaGVjayBpZiBjbGllbnQgd29ya2Zsb3cgY29tcGxldGVkIHN1Y2Nlc3NmdWxseQogICAgICAgIHZhciBjcmVhdGVkQ2xpZW50ID0gY29udGV4dC5JbnN0YW5jZT8uRGF0YT8uY3JlYXRlZENsaWVudDsKICAgICAgICAKICAgICAgICBpZiAoY3JlYXRlZENsaWVudCA9PSBudWxsKQogICAgICAgIHsKICAgICAgICAgICAgTG9nV2FybmluZygiQ2xpZW50Q3JlYXRlZFJ1bGU6IGNyZWF0ZWRDbGllbnQgaXMgbnVsbCIpOwogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgICAgIAogICAgICAgIC8vIENoZWNrIGlmIGNsaWVudCByZWFjaGVkIGEgdmFsaWQgc3RhdGUgKGRyYWZ0IG9yIGFjdGl2ZSkKICAgICAgICB2YXIgY2xpZW50U3RhdGUgPSBjcmVhdGVkQ2xpZW50Py5hdHRyaWJ1dGVzPy5zdGF0ZT8ua2V5Py5Ub1N0cmluZygpOwogICAgICAgIAogICAgICAgIGJvb2wgaXNDcmVhdGVkID0gY2xpZW50U3RhdGUgPT0gImRyYWZ0IiB8fCBjbGllbnRTdGF0ZSA9PSAiYWN0aXZlIjsKICAgICAgICAKICAgICAgICBMb2dJbmZvcm1hdGlvbigkIkNsaWVudENyZWF0ZWRSdWxlOiBDbGllbnQgc3RhdGUgPSAne2NsaWVudFN0YXRlfScsIGlzQ3JlYXRlZCA9IHtpc0NyZWF0ZWR9Iik7CiAgICAgICAgCiAgICAgICAgcmV0dXJuIGlzQ3JlYXRlZDsKICAgIH0KfQoK"
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
"key": "client-creation-failed",
|
|
165
|
-
"target": "failed",
|
|
166
|
-
"versionStrategy": "Major",
|
|
167
|
-
"triggerType": 1,
|
|
168
|
-
"triggerKind": 10,
|
|
169
|
-
"schema": null,
|
|
170
|
-
"labels": [
|
|
171
|
-
{
|
|
172
|
-
"label": "Client Creation Failed",
|
|
173
|
-
"language": "en"
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
"label": "Client Oluşturulamadı",
|
|
177
|
-
"language": "tr"
|
|
178
|
-
}
|
|
179
|
-
]
|
|
180
|
-
}
|
|
181
|
-
]
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
"key": "client-ready",
|
|
185
|
-
"stateType": 3,
|
|
186
|
-
"versionStrategy": "Minor",
|
|
187
|
-
"labels": [
|
|
188
|
-
{
|
|
189
|
-
"label": "Client Ready",
|
|
190
|
-
"language": "en"
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
"label": "Client Hazır",
|
|
194
|
-
"language": "tr"
|
|
195
|
-
}
|
|
196
|
-
],
|
|
197
|
-
"transitions": []
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
"key": "failed",
|
|
201
|
-
"stateType": 3,
|
|
202
|
-
"versionStrategy": "Minor",
|
|
203
|
-
"labels": [
|
|
204
|
-
{
|
|
205
|
-
"label": "Failed",
|
|
206
|
-
"language": "en"
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
"label": "Başarısız",
|
|
210
|
-
"language": "tr"
|
|
211
|
-
}
|
|
212
|
-
],
|
|
213
|
-
"transitions": []
|
|
214
|
-
}
|
|
215
|
-
]
|
|
216
|
-
}
|
|
217
|
-
}
|