@api-client/core 0.18.24 → 0.18.26

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 (59) hide show
  1. package/build/src/modeling/DomainEntity.d.ts +6 -1
  2. package/build/src/modeling/DomainEntity.d.ts.map +1 -1
  3. package/build/src/modeling/DomainEntity.js +24 -5
  4. package/build/src/modeling/DomainEntity.js.map +1 -1
  5. package/build/src/modeling/Semantics.d.ts +254 -0
  6. package/build/src/modeling/Semantics.d.ts.map +1 -1
  7. package/build/src/modeling/Semantics.js +328 -0
  8. package/build/src/modeling/Semantics.js.map +1 -1
  9. package/build/src/modeling/definitions/Email.js +1 -1
  10. package/build/src/modeling/definitions/Email.js.map +1 -1
  11. package/build/src/modeling/definitions/Password.d.ts.map +1 -1
  12. package/build/src/modeling/definitions/Password.js +1 -3
  13. package/build/src/modeling/definitions/Password.js.map +1 -1
  14. package/build/src/modeling/helpers/Intelisense.d.ts +7 -7
  15. package/build/src/modeling/helpers/Intelisense.d.ts.map +1 -1
  16. package/build/src/modeling/helpers/Intelisense.js +24 -58
  17. package/build/src/modeling/helpers/Intelisense.js.map +1 -1
  18. package/build/src/modeling/templates/meta/blog-publishing-platform.json +1 -1
  19. package/build/src/modeling/templates/meta/financial-services-platform.json +1 -1
  20. package/build/src/modeling/templates/meta/index.d.ts +1 -1
  21. package/build/src/modeling/templates/meta/index.js +1 -1
  22. package/build/src/modeling/templates/meta/index.js.map +1 -1
  23. package/build/src/modeling/templates/meta/iot-smart-home-platform.json +1 -1
  24. package/build/src/modeling/templates/verticals/business-services/financial-services-domain.d.ts.map +1 -1
  25. package/build/src/modeling/templates/verticals/business-services/financial-services-domain.js +248 -63
  26. package/build/src/modeling/templates/verticals/business-services/financial-services-domain.js.map +1 -1
  27. package/build/src/modeling/templates/verticals/technology-media/blog-domain.js +5 -5
  28. package/build/src/modeling/templates/verticals/technology-media/blog-domain.js.map +1 -1
  29. package/build/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.d.ts.map +1 -1
  30. package/build/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.js +2 -0
  31. package/build/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.js.map +1 -1
  32. package/build/src/modeling/validation/postgresql.d.ts.map +1 -1
  33. package/build/src/modeling/validation/postgresql.js +0 -1
  34. package/build/src/modeling/validation/postgresql.js.map +1 -1
  35. package/build/src/runtime/modeling/Semantics.d.ts +84 -0
  36. package/build/src/runtime/modeling/Semantics.d.ts.map +1 -0
  37. package/build/src/runtime/modeling/Semantics.js +124 -0
  38. package/build/src/runtime/modeling/Semantics.js.map +1 -0
  39. package/build/tsconfig.tsbuildinfo +1 -1
  40. package/data/models/example-generator-api.json +8 -8
  41. package/package.json +1 -1
  42. package/src/modeling/DomainEntity.ts +27 -5
  43. package/src/modeling/Semantics.ts +493 -0
  44. package/src/modeling/definitions/Email.ts +1 -1
  45. package/src/modeling/definitions/Password.ts +1 -3
  46. package/src/modeling/helpers/Intelisense.ts +33 -65
  47. package/src/modeling/templates/meta/blog-publishing-platform.json +1 -1
  48. package/src/modeling/templates/meta/financial-services-platform.json +1 -1
  49. package/src/modeling/templates/meta/iot-smart-home-platform.json +1 -1
  50. package/src/modeling/templates/verticals/business-services/financial-services-domain.ts +285 -65
  51. package/src/modeling/templates/verticals/technology-media/blog-domain.ts +5 -5
  52. package/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.ts +2 -0
  53. package/src/modeling/validation/postgresql.ts +0 -1
  54. package/src/runtime/modeling/Semantics.ts +196 -0
  55. package/tests/unit/modeling/client_ip_address_semantic.spec.ts +71 -0
  56. package/tests/unit/modeling/definitions/password.spec.ts +0 -2
  57. package/tests/unit/modeling/domain_entity_parents.spec.ts +243 -0
  58. package/tests/unit/modeling/semantic_runtime.spec.ts +113 -0
  59. package/tests/unit/modeling/semantics.spec.ts +68 -0
@@ -23,6 +23,7 @@
23
23
  * ```
24
24
  */
25
25
  import { DataDomain } from '../../../DataDomain.js';
26
+ import { SemanticType } from '../../../Semantics.js';
26
27
  import { addIdField, addNameField, addDescriptionField, addEmailField, addFirstNameField, addLastNameField, addPhoneField, addCustomStatusField, addCreatedAtField, addUpdatedAtField, addCurrencyAmountField, } from '../../../helpers/Intelisense.js';
27
28
  function createDomain() {
28
29
  return new DataDomain({
@@ -50,72 +51,186 @@ export default function createFinancialServicesDomain(options = {}) {
50
51
  // Ensure the root data domain
51
52
  const domain = options.domain ?? createDomain();
52
53
  //
53
- // 1. CUSTOMER MANAGEMENT NAMESPACE
54
+ // 1. USER & AUTHENTICATION NAMESPACE (Unified for customers and employees)
54
55
  //
55
- const customerManagement = domain.addNamespace({
56
+ const userManagement = domain.addNamespace({
56
57
  info: {
57
- name: 'CustomerManagement',
58
- displayName: 'Customer Management',
59
- description: 'Customer profiles, KYC, risk assessment, and segmentation',
58
+ name: 'User Management',
59
+ displayName: 'User & Authentication Management',
60
+ description: 'Unified user authentication, roles, and profile management for customers and employees',
60
61
  },
61
62
  });
62
- // Customer Model
63
- const customerModel = customerManagement.addModel({
63
+ // Authentication Model
64
+ const authModel = userManagement.addModel({
64
65
  info: {
65
- name: 'Customers',
66
- displayName: 'Customer Management',
67
- description: 'Customer profiles and information',
66
+ name: 'Authentication',
67
+ displayName: 'Authentication & Access Control',
68
+ description: 'User authentication, sessions, and access control',
68
69
  },
69
70
  });
70
- // Customer Entity
71
- const customerEntity = customerModel.addEntity({
71
+ // Unified User Entity (replaces separate Customer and Employee entities)
72
+ const userEntity = authModel.addEntity({
72
73
  info: {
73
- name: 'customer',
74
- displayName: 'Customer',
75
- description: 'Financial services customer with KYC and risk profile',
74
+ name: 'user',
75
+ displayName: 'User',
76
+ description: 'Unified user entity for both customers and employees with role-based access',
76
77
  },
78
+ semantics: [{ id: SemanticType.User }], // Mark as a user entity for automatic behaviors
77
79
  });
78
- addIdField(customerEntity, { displayName: 'Customer ID', description: 'Unique identifier for the customer' });
79
- addFirstNameField(customerEntity, { description: 'Customer first name' });
80
- addLastNameField(customerEntity, { description: 'Customer last name' });
81
- customerEntity.addProperty({
80
+ addIdField(userEntity, { displayName: 'User ID', description: 'Unique identifier for the user' });
81
+ // Authentication fields
82
+ userEntity.addProperty({
83
+ info: { name: 'username', displayName: 'Username', description: 'Unique username for login' },
84
+ type: 'string',
85
+ required: true,
86
+ unique: true,
87
+ });
88
+ userEntity.addProperty({
89
+ info: { name: 'password', displayName: 'Password', description: 'User password (hashed)' },
90
+ type: 'string',
91
+ required: true,
92
+ writeOnly: true,
93
+ semantics: [{ id: SemanticType.Password }], // Automatic password security behaviors
94
+ });
95
+ const emailProperty = addEmailField(userEntity, { description: 'User email address' });
96
+ emailProperty.required = true;
97
+ emailProperty.unique = true;
98
+ // Personal Information
99
+ addFirstNameField(userEntity, { description: 'User first name' });
100
+ addLastNameField(userEntity, { description: 'User last name' });
101
+ addPhoneField(userEntity, { description: 'User phone number' });
102
+ // User Type & Role (unified approach)
103
+ userEntity.addProperty({
104
+ info: { name: 'user_type', displayName: 'User Type', description: 'Type of user account' },
105
+ type: 'string',
106
+ required: true,
107
+ schema: {
108
+ enum: ['customer', 'employee', 'admin', 'system'],
109
+ },
110
+ });
111
+ userEntity.addProperty({
112
+ info: { name: 'role', displayName: 'User Role', description: 'User role defining permissions and access level' },
113
+ type: 'string',
114
+ required: true,
115
+ schema: {
116
+ enum: [
117
+ // Customer roles
118
+ 'individual_customer',
119
+ 'business_customer',
120
+ 'premium_customer',
121
+ 'private_banking_customer',
122
+ // Employee roles
123
+ 'teller',
124
+ 'loan_officer',
125
+ 'relationship_manager',
126
+ 'compliance_officer',
127
+ 'branch_manager',
128
+ 'investment_advisor',
129
+ 'risk_analyst',
130
+ // Admin roles
131
+ 'system_admin',
132
+ 'security_admin',
133
+ 'audit_admin',
134
+ ],
135
+ },
136
+ });
137
+ // Status and verification
138
+ addCustomStatusField(userEntity, ['active', 'inactive', 'suspended', 'pending_verification', 'locked'], {
139
+ displayName: 'User Status',
140
+ description: 'Current status of the user account',
141
+ });
142
+ userEntity.addProperty({
143
+ info: { name: 'email_verified', displayName: 'Email Verified', description: 'Whether user email is verified' },
144
+ type: 'boolean',
145
+ required: true,
146
+ });
147
+ userEntity.addProperty({
148
+ info: { name: 'last_login', displayName: 'Last Login', description: 'When user last logged in' },
149
+ type: 'datetime',
150
+ });
151
+ addCreatedAtField(userEntity, { description: 'When the user account was created' });
152
+ addUpdatedAtField(userEntity, { description: 'When the user account was last updated' });
153
+ // Session Entity for authentication management
154
+ const sessionEntity = authModel.addEntity({
155
+ info: {
156
+ name: 'user_session',
157
+ displayName: 'User Session',
158
+ description: 'Active user authentication sessions',
159
+ },
160
+ });
161
+ addIdField(sessionEntity, { displayName: 'Session ID', description: 'Unique session identifier' });
162
+ sessionEntity.addProperty({
163
+ info: { name: 'token', displayName: 'Session Token', description: 'Authentication token for the session' },
164
+ type: 'string',
165
+ required: true,
166
+ writeOnly: true,
167
+ });
168
+ sessionEntity.addProperty({
169
+ info: { name: 'expires_at', displayName: 'Expires At', description: 'When the session expires' },
170
+ type: 'datetime',
171
+ required: true,
172
+ });
173
+ sessionEntity.addProperty({
174
+ info: { name: 'ip_address', displayName: 'IP Address', description: 'IP address of the session' },
175
+ type: 'string',
176
+ semantics: [{ id: SemanticType.ClientIPAddress }],
177
+ });
178
+ addCreatedAtField(sessionEntity, { description: 'When the session was created' });
179
+ // User-Session Association
180
+ userEntity.addAssociation({ key: sessionEntity.key }, {
181
+ info: { name: 'sessions', displayName: 'User Sessions', description: 'Active sessions for this user' },
182
+ required: false,
183
+ multiple: true,
184
+ });
185
+ // Profile Model (for extended user information)
186
+ const profileModel = userManagement.addModel({
187
+ info: {
188
+ name: 'User Profiles',
189
+ displayName: 'User Profile Management',
190
+ description: 'Extended user profile information and preferences',
191
+ },
192
+ });
193
+ // Customer Profile Entity (for customer-specific information)
194
+ const customerProfileEntity = profileModel.addEntity({
195
+ info: {
196
+ name: 'customer_profile',
197
+ displayName: 'Customer Profile',
198
+ description: 'Additional profile information specific to customers',
199
+ },
200
+ });
201
+ addIdField(customerProfileEntity, { displayName: 'Profile ID', description: 'Unique profile identifier' });
202
+ customerProfileEntity.addProperty({
82
203
  info: { name: 'date_of_birth', displayName: 'Date of Birth', description: 'Customer date of birth' },
83
204
  type: 'date',
84
205
  required: true,
85
206
  });
86
- customerEntity.addProperty({
207
+ customerProfileEntity.addProperty({
87
208
  info: { name: 'ssn', displayName: 'Social Security Number', description: 'Customer SSN for identification' },
88
209
  type: 'string',
89
210
  required: true,
90
- writeOnly: true, // Sensitive data - write only
211
+ writeOnly: true,
91
212
  });
92
- addEmailField(customerEntity, { description: 'Customer email address' });
93
- addPhoneField(customerEntity, { description: 'Customer phone number' });
94
- customerEntity.addProperty({
213
+ customerProfileEntity.addProperty({
95
214
  info: { name: 'address', displayName: 'Address', description: 'Customer residential address' },
96
215
  type: 'string',
97
216
  required: true,
98
217
  });
99
- customerEntity.addProperty({
218
+ customerProfileEntity.addProperty({
100
219
  info: { name: 'city', displayName: 'City', description: 'Customer city' },
101
220
  type: 'string',
102
221
  required: true,
103
222
  });
104
- customerEntity.addProperty({
223
+ customerProfileEntity.addProperty({
105
224
  info: { name: 'state', displayName: 'State', description: 'Customer state' },
106
225
  type: 'string',
107
226
  required: true,
108
227
  });
109
- customerEntity.addProperty({
228
+ customerProfileEntity.addProperty({
110
229
  info: { name: 'zip_code', displayName: 'ZIP Code', description: 'Customer ZIP code' },
111
230
  type: 'string',
112
231
  required: true,
113
232
  });
114
- addCustomStatusField(customerEntity, ['active', 'inactive', 'suspended', 'pending_verification'], {
115
- displayName: 'Customer Status',
116
- description: 'Current status of the customer account',
117
- });
118
- customerEntity.addProperty({
233
+ customerProfileEntity.addProperty({
119
234
  info: { name: 'customer_type', displayName: 'Customer Type', description: 'Type of customer account' },
120
235
  type: 'string',
121
236
  required: true,
@@ -123,12 +238,79 @@ export default function createFinancialServicesDomain(options = {}) {
123
238
  enum: ['individual', 'business', 'trust', 'partnership'],
124
239
  },
125
240
  });
126
- addCreatedAtField(customerEntity, { description: 'When the customer account was created' });
127
- addUpdatedAtField(customerEntity, { description: 'When the customer account was last updated' });
128
- // KYC Entity
129
- const kycEntity = customerModel.addEntity({
241
+ addCreatedAtField(customerProfileEntity, { description: 'When the customer profile was created' });
242
+ addUpdatedAtField(customerProfileEntity, { description: 'When the customer profile was last updated' });
243
+ // User-CustomerProfile Association (one-to-one for customers)
244
+ userEntity.addAssociation({ key: customerProfileEntity.key }, {
245
+ info: {
246
+ name: 'customer_profile',
247
+ displayName: 'Customer Profile',
248
+ description: 'Extended customer profile information',
249
+ },
250
+ required: false, // Only for customers, not employees
251
+ multiple: false,
252
+ });
253
+ // Employee Profile Entity (for employee-specific information)
254
+ const employeeProfileEntity = profileModel.addEntity({
255
+ info: {
256
+ name: 'employee_profile',
257
+ displayName: 'Employee Profile',
258
+ description: 'Additional profile information specific to employees',
259
+ },
260
+ });
261
+ addIdField(employeeProfileEntity, {
262
+ displayName: 'Employee Profile ID',
263
+ description: 'Unique employee profile identifier',
264
+ });
265
+ employeeProfileEntity.addProperty({
266
+ info: { name: 'employee_id', displayName: 'Employee ID', description: 'Company employee identifier' },
267
+ type: 'string',
268
+ required: true,
269
+ unique: true,
270
+ });
271
+ employeeProfileEntity.addProperty({
272
+ info: { name: 'department', displayName: 'Department', description: 'Employee department' },
273
+ type: 'string',
274
+ required: true,
275
+ schema: {
276
+ enum: [
277
+ 'retail_banking',
278
+ 'commercial_banking',
279
+ 'investment_services',
280
+ 'risk_management',
281
+ 'compliance',
282
+ 'operations',
283
+ 'technology',
284
+ 'human_resources',
285
+ 'legal',
286
+ ],
287
+ },
288
+ });
289
+ employeeProfileEntity.addProperty({
290
+ info: { name: 'hire_date', displayName: 'Hire Date', description: 'Employee hire date' },
291
+ type: 'date',
292
+ required: true,
293
+ });
294
+ employeeProfileEntity.addProperty({
295
+ info: { name: 'manager_id', displayName: 'Manager ID', description: 'Employee manager identifier' },
296
+ type: 'string',
297
+ });
298
+ addCreatedAtField(employeeProfileEntity, { description: 'When the employee profile was created' });
299
+ addUpdatedAtField(employeeProfileEntity, { description: 'When the employee profile was last updated' });
300
+ // User-EmployeeProfile Association (one-to-one for employees)
301
+ userEntity.addAssociation({ key: employeeProfileEntity.key }, {
302
+ info: {
303
+ name: 'employee_profile',
304
+ displayName: 'Employee Profile',
305
+ description: 'Extended employee profile information',
306
+ },
307
+ required: false, // Only for employees, not customers
308
+ multiple: false,
309
+ });
310
+ // KYC Entity (enhanced for the unified approach)
311
+ const kycEntity = profileModel.addEntity({
130
312
  info: {
131
- name: 'kyc',
313
+ name: 'kyc_record',
132
314
  displayName: 'KYC Record',
133
315
  description: 'Know Your Customer verification and documentation',
134
316
  },
@@ -156,14 +338,15 @@ export default function createFinancialServicesDomain(options = {}) {
156
338
  required: true,
157
339
  });
158
340
  addCreatedAtField(kycEntity, { description: 'When the KYC record was created' });
159
- // KYC-Customer Association (One-to-One)
160
- kycEntity.addAssociation({ key: customerEntity.key }, {
161
- info: { name: 'customer', displayName: 'Customer', description: 'Customer for this KYC record' },
341
+ addUpdatedAtField(kycEntity, { description: 'When the KYC record was last updated' });
342
+ // KYC-User Association (One-to-One)
343
+ kycEntity.addAssociation({ key: userEntity.key }, {
344
+ info: { name: 'user', displayName: 'User', description: 'User for this KYC record' },
162
345
  required: true,
163
346
  multiple: false,
164
347
  });
165
348
  // Risk Profile Entity
166
- const riskProfileEntity = customerModel.addEntity({
349
+ const riskProfileEntity = profileModel.addEntity({
167
350
  info: {
168
351
  name: 'risk_profile',
169
352
  displayName: 'Risk Profile',
@@ -194,9 +377,10 @@ export default function createFinancialServicesDomain(options = {}) {
194
377
  });
195
378
  addDescriptionField(riskProfileEntity, { description: 'Risk assessment notes and factors' });
196
379
  addCreatedAtField(riskProfileEntity, { description: 'When the risk profile was created' });
197
- // RiskProfile-Customer Association (One-to-One)
198
- riskProfileEntity.addAssociation({ key: customerEntity.key }, {
199
- info: { name: 'customer', displayName: 'Customer', description: 'Customer for this risk profile' },
380
+ addUpdatedAtField(riskProfileEntity, { description: 'When the risk profile was last updated' });
381
+ // RiskProfile-User Association (One-to-One)
382
+ riskProfileEntity.addAssociation({ key: userEntity.key }, {
383
+ info: { name: 'user', displayName: 'User', description: 'User for this risk profile' },
200
384
  required: true,
201
385
  multiple: false,
202
386
  });
@@ -258,9 +442,9 @@ export default function createFinancialServicesDomain(options = {}) {
258
442
  });
259
443
  addCreatedAtField(bankAccountEntity, { description: 'When the account was created' });
260
444
  addUpdatedAtField(bankAccountEntity, { description: 'When the account was last updated' });
261
- // BankAccount-Customer Association (Many-to-One)
262
- bankAccountEntity.addAssociation({ key: customerEntity.key }, {
263
- info: { name: 'customer', displayName: 'Account Holder', description: 'Customer who owns this account' },
445
+ // BankAccount-User Association (Many-to-One)
446
+ bankAccountEntity.addAssociation({ key: userEntity.key }, {
447
+ info: { name: 'user', displayName: 'Account Holder', description: 'User who owns this account' },
264
448
  required: true,
265
449
  multiple: false,
266
450
  });
@@ -301,12 +485,12 @@ export default function createFinancialServicesDomain(options = {}) {
301
485
  description: 'Current status of the investment account',
302
486
  });
303
487
  addCreatedAtField(investmentAccountEntity, { description: 'When the investment account was created' });
304
- // InvestmentAccount-Customer Association (Many-to-One)
305
- investmentAccountEntity.addAssociation({ key: customerEntity.key }, {
488
+ // InvestmentAccount-User Association (Many-to-One)
489
+ investmentAccountEntity.addAssociation({ key: userEntity.key }, {
306
490
  info: {
307
- name: 'customer',
491
+ name: 'user',
308
492
  displayName: 'Account Holder',
309
- description: 'Customer who owns this investment account',
493
+ description: 'User who owns this investment account',
310
494
  },
311
495
  required: true,
312
496
  multiple: false,
@@ -349,9 +533,9 @@ export default function createFinancialServicesDomain(options = {}) {
349
533
  description: 'Current status of the credit card',
350
534
  });
351
535
  addCreatedAtField(creditCardEntity, { description: 'When the credit card was created' });
352
- // CreditCard-Customer Association (Many-to-One)
353
- creditCardEntity.addAssociation({ key: customerEntity.key }, {
354
- info: { name: 'customer', displayName: 'Cardholder', description: 'Customer who owns this credit card' },
536
+ // CreditCard-User Association (Many-to-One)
537
+ creditCardEntity.addAssociation({ key: userEntity.key }, {
538
+ info: { name: 'user', displayName: 'Cardholder', description: 'User who owns this credit card' },
355
539
  required: true,
356
540
  multiple: false,
357
541
  });
@@ -360,7 +544,7 @@ export default function createFinancialServicesDomain(options = {}) {
360
544
  //
361
545
  const transactionProcessing = domain.addNamespace({
362
546
  info: {
363
- name: 'TransactionProcessing',
547
+ name: 'Transaction Processing',
364
548
  displayName: 'Transaction Processing',
365
549
  description: 'Payments, transfers, deposits, and withdrawals',
366
550
  },
@@ -421,9 +605,9 @@ export default function createFinancialServicesDomain(options = {}) {
421
605
  type: 'string',
422
606
  });
423
607
  addCreatedAtField(transactionEntity, { description: 'When the transaction was created' });
424
- // Transaction-Customer Association (Many-to-One)
425
- transactionEntity.addAssociation({ key: customerEntity.key }, {
426
- info: { name: 'customer', displayName: 'Customer', description: 'Customer who initiated the transaction' },
608
+ // Transaction-User Association (Many-to-One)
609
+ transactionEntity.addAssociation({ key: userEntity.key }, {
610
+ info: { name: 'user', displayName: 'User', description: 'User who initiated the transaction' },
427
611
  required: true,
428
612
  multiple: false,
429
613
  });
@@ -472,7 +656,7 @@ export default function createFinancialServicesDomain(options = {}) {
472
656
  //
473
657
  const investmentPortfolio = domain.addNamespace({
474
658
  info: {
475
- name: 'InvestmentPortfolio',
659
+ name: 'Investment Portfolio',
476
660
  displayName: 'Investment Portfolio',
477
661
  description: 'Assets, positions, and performance tracking',
478
662
  },
@@ -596,7 +780,7 @@ export default function createFinancialServicesDomain(options = {}) {
596
780
  //
597
781
  const complianceReporting = domain.addNamespace({
598
782
  info: {
599
- name: 'ComplianceReporting',
783
+ name: 'Compliance Reporting',
600
784
  displayName: 'Compliance & Reporting',
601
785
  description: 'Regulatory reporting and audit trails',
602
786
  },
@@ -641,6 +825,7 @@ export default function createFinancialServicesDomain(options = {}) {
641
825
  auditTrailEntity.addProperty({
642
826
  info: { name: 'ip_address', displayName: 'IP Address', description: 'IP address of the user' },
643
827
  type: 'string',
828
+ semantics: [{ id: SemanticType.ClientIPAddress }],
644
829
  });
645
830
  addDescriptionField(auditTrailEntity, { description: 'Additional details about the action' });
646
831
  addCreatedAtField(auditTrailEntity, {
@@ -733,9 +918,9 @@ export default function createFinancialServicesDomain(options = {}) {
733
918
  required: false,
734
919
  multiple: false,
735
920
  });
736
- // FraudAlert-Customer Association (Many-to-One)
737
- fraudAlertEntity.addAssociation({ key: customerEntity.key }, {
738
- info: { name: 'customer', displayName: 'Customer', description: 'Customer associated with the alert' },
921
+ // FraudAlert-User Association (Many-to-One)
922
+ fraudAlertEntity.addAssociation({ key: userEntity.key }, {
923
+ info: { name: 'user', displayName: 'User', description: 'User associated with the alert' },
739
924
  required: true,
740
925
  multiple: false,
741
926
  });