@flarehr/superhero-basic-profile 0.1.2217 → 0.1.2223

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 (76) hide show
  1. package/dist/assets/delete.dcc7b157.svg +5 -0
  2. package/dist/assets/dialog-warning.cc77f3ba.svg +5 -0
  3. package/dist/assets/pencil.05fe6be6.svg +5 -0
  4. package/dist/index.html +20 -0
  5. package/dist/superhero-basic-profile.js +50 -0
  6. package/package.json +1 -1
  7. package/dist/App.jsx +0 -4
  8. package/dist/Basic.Profile.Domain/AnalyticsEvent.jsx +0 -102
  9. package/dist/Basic.Profile.Domain/Audit.jsx +0 -149
  10. package/dist/Basic.Profile.Domain/Commands.jsx +0 -68
  11. package/dist/Basic.Profile.Domain/CommonTypes.jsx +0 -194
  12. package/dist/Basic.Profile.Domain/Config/Api/Admin/Read.jsx +0 -58
  13. package/dist/Basic.Profile.Domain/Config/Api/Admin/Write.jsx +0 -23
  14. package/dist/Basic.Profile.Domain/Config/Api/FlareAdminShell/Read.jsx +0 -35
  15. package/dist/Basic.Profile.Domain/Config/Commands.jsx +0 -72
  16. package/dist/Basic.Profile.Domain/Config/ConfigCommandHandler.jsx +0 -197
  17. package/dist/Basic.Profile.Domain/Config/Dto.jsx +0 -181
  18. package/dist/Basic.Profile.Domain/Config/Types.jsx +0 -152
  19. package/dist/Basic.Profile.Domain/DateTimeProvider.jsx +0 -23
  20. package/dist/Basic.Profile.Domain/DomainAggregates.jsx +0 -801
  21. package/dist/Basic.Profile.Domain/DomainPrimitives.jsx +0 -426
  22. package/dist/Basic.Profile.Domain/Dto/Aggregates.jsx +0 -564
  23. package/dist/Basic.Profile.Domain/Dto/AnalyticsEvent.jsx +0 -157
  24. package/dist/Basic.Profile.Domain/Dto/Api/Backend/Common.jsx +0 -102
  25. package/dist/Basic.Profile.Domain/Dto/Api/Backend/Read.jsx +0 -85
  26. package/dist/Basic.Profile.Domain/Dto/Api/Backend/Write.jsx +0 -16
  27. package/dist/Basic.Profile.Domain/Dto/Api/Common.jsx +0 -427
  28. package/dist/Basic.Profile.Domain/Dto/Api/External/Read.jsx +0 -118
  29. package/dist/Basic.Profile.Domain/Dto/Api/External/ReadV2.jsx +0 -6
  30. package/dist/Basic.Profile.Domain/Dto/Api/External/Write.jsx +0 -184
  31. package/dist/Basic.Profile.Domain/Dto/Api/External/WriteV2.jsx +0 -439
  32. package/dist/Basic.Profile.Domain/Dto/Api/FlareAdminShell/Read.jsx +0 -38
  33. package/dist/Basic.Profile.Domain/Dto/Api/FlareAdminShell/Write.jsx +0 -199
  34. package/dist/Basic.Profile.Domain/Dto/Api/Internal/Read.jsx +0 -125
  35. package/dist/Basic.Profile.Domain/Dto/Audit.jsx +0 -121
  36. package/dist/Basic.Profile.Domain/Dto/Commands.jsx +0 -256
  37. package/dist/Basic.Profile.Domain/Dto/Common.jsx +0 -84
  38. package/dist/Basic.Profile.Domain/Dto/Events.jsx +0 -220
  39. package/dist/Basic.Profile.Domain/Dto/Primitives.jsx +0 -580
  40. package/dist/Basic.Profile.Domain/Dto/ProfileCreationModels.jsx +0 -324
  41. package/dist/Basic.Profile.Domain/Dto/Validation.jsx +0 -229
  42. package/dist/Basic.Profile.Domain/Events.jsx +0 -64
  43. package/dist/Basic.Profile.Domain/Import/Api/InternalApi/Read.jsx +0 -140
  44. package/dist/Basic.Profile.Domain/Import/Api/InternalApi/Validation.jsx +0 -499
  45. package/dist/Basic.Profile.Domain/Import/Api/InternalApi/Write.jsx +0 -51
  46. package/dist/Basic.Profile.Domain/Import/Api/Read.jsx +0 -154
  47. package/dist/Basic.Profile.Domain/Import/CommonTypes.jsx +0 -187
  48. package/dist/Basic.Profile.Domain/Import/Dto.jsx +0 -475
  49. package/dist/Basic.Profile.Domain/Import/ImportCommandHandler.jsx +0 -531
  50. package/dist/Basic.Profile.Domain/Import/Types.jsx +0 -405
  51. package/dist/Basic.Profile.Domain/JwtPayload.jsx +0 -44
  52. package/dist/Basic.Profile.Domain/Metadata.jsx +0 -257
  53. package/dist/Basic.Profile.Domain/ProfileCommandHandler.jsx +0 -261
  54. package/dist/Basic.Profile.Domain/ProfileModels.jsx +0 -59
  55. package/dist/Basic.Profile.Domain/Utils.jsx +0 -372
  56. package/dist/Common/PreactCustomElement.jsx +0 -8
  57. package/dist/Common/Resources.jsx +0 -20
  58. package/dist/Common/Tailwind.jsx +0 -8
  59. package/dist/Common/Utils.jsx +0 -18
  60. package/dist/Directory/App.jsx +0 -192
  61. package/dist/Directory/BackendServices/Common.jsx +0 -115
  62. package/dist/Directory/BackendServices/ConfigService.jsx +0 -168
  63. package/dist/Directory/BackendServices/ImportService.jsx +0 -137
  64. package/dist/Directory/Common.jsx +0 -93
  65. package/dist/Directory/Config/Components.jsx +0 -173
  66. package/dist/Directory/Config/Types.jsx +0 -187
  67. package/dist/Directory/PastImports/PastImports.jsx +0 -81
  68. package/dist/Directory/ProfileImport/ProfileImport.jsx +0 -284
  69. package/dist/Directory/ProfileImport/Types.jsx +0 -91
  70. package/dist/Directory/TabNav.jsx +0 -24
  71. package/dist/Directory/Types.jsx +0 -101
  72. package/dist/Directory/User.jsx +0 -117
  73. package/dist/HeadlessUI/Dialog.jsx +0 -66
  74. package/dist/HeadlessUI/ModalDialog.jsx +0 -74
  75. package/dist/HeadlessUI/Switch.jsx +0 -66
  76. package/dist/HeadlessUI/Transition.jsx +0 -66
@@ -1,564 +0,0 @@
1
- import { Union, Record } from "../../fable_modules/fable-library-js.4.20.0/Types.js";
2
- import { PurgedAddressModule_ofDomain, PurgedAddressModule_toDomain, EmergencyContactDtoModule_ofDomain, ExternalId_ofDomain, AddressModule_ofDomain, DateOfBirth_ofDomain, MobilePhone_ofDomain, Email_ofDomain, Gender_ofDomain, Title_ofDomain, NameModule_ofDomain, AccountId_ofDomain, MetadataModule_ofDomain, EmergencyContactDtoModule_toDomain, ExternalId_toDomain, AddressModule_toDomain, DateOfBirth_toDomain, MobilePhone_toDomain, Email_toDomain, Gender_toDomain, Title_toDomain, NameModule_toDomain, AccountId_toDomain, MetadataModule_toDomain, PurgedAddress_$reflection, EmergencyContactDto_$reflection, Address_$reflection, Name_$reflection, Metadata_$reflection } from "./Primitives.jsx";
3
- import { union_type, record_type, list_type, option_type, string_type } from "../../fable_modules/fable-library-js.4.20.0/Reflection.js";
4
- import { FSharpResult$2 } from "../../fable_modules/fable-library-js.4.20.0/Result.js";
5
- import { traverseResultM } from "../../fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js";
6
- import { defaultArg } from "../../fable_modules/fable-library-js.4.20.0/Option.js";
7
- import { map, empty } from "../../fable_modules/fable-library-js.4.20.0/List.js";
8
- import { OperationalProfile, PurgedProfileDetail, Profile, PartialProfileDetail, ProfileDetail } from "../DomainAggregates.jsx";
9
-
10
- export class FullProfileDto extends Record {
11
- constructor(Metadata, AccountId, Name, Title, Gender, Email, MobilePhone, DateOfBirth, Address, ExternalId, EmergencyContacts) {
12
- super();
13
- this.Metadata = Metadata;
14
- this.AccountId = AccountId;
15
- this.Name = Name;
16
- this.Title = Title;
17
- this.Gender = Gender;
18
- this.Email = Email;
19
- this.MobilePhone = MobilePhone;
20
- this.DateOfBirth = DateOfBirth;
21
- this.Address = Address;
22
- this.ExternalId = ExternalId;
23
- this.EmergencyContacts = EmergencyContacts;
24
- }
25
- }
26
-
27
- export function FullProfileDto_$reflection() {
28
- return record_type("Dto.Aggregates.FullProfileDto", [], FullProfileDto, () => [["Metadata", Metadata_$reflection()], ["AccountId", string_type], ["Name", Name_$reflection()], ["Title", string_type], ["Gender", string_type], ["Email", string_type], ["MobilePhone", string_type], ["DateOfBirth", string_type], ["Address", Address_$reflection()], ["ExternalId", option_type(string_type)], ["EmergencyContacts", option_type(list_type(EmergencyContactDto_$reflection()))]]);
29
- }
30
-
31
- export class PurgedProfileDto extends Record {
32
- constructor(Metadata, AccountId, Title, Gender, DateOfBirth, Address) {
33
- super();
34
- this.Metadata = Metadata;
35
- this.AccountId = AccountId;
36
- this.Title = Title;
37
- this.Gender = Gender;
38
- this.DateOfBirth = DateOfBirth;
39
- this.Address = Address;
40
- }
41
- }
42
-
43
- export function PurgedProfileDto_$reflection() {
44
- return record_type("Dto.Aggregates.PurgedProfileDto", [], PurgedProfileDto, () => [["Metadata", Metadata_$reflection()], ["AccountId", string_type], ["Title", string_type], ["Gender", string_type], ["DateOfBirth", string_type], ["Address", PurgedAddress_$reflection()]]);
45
- }
46
-
47
- export class PartialProfileDto extends Record {
48
- constructor(Metadata, AccountId, Name, Email, MobilePhone, ExternalId, Title, Gender, DateOfBirth, Address) {
49
- super();
50
- this.Metadata = Metadata;
51
- this.AccountId = AccountId;
52
- this.Name = Name;
53
- this.Email = Email;
54
- this.MobilePhone = MobilePhone;
55
- this.ExternalId = ExternalId;
56
- this.Title = Title;
57
- this.Gender = Gender;
58
- this.DateOfBirth = DateOfBirth;
59
- this.Address = Address;
60
- }
61
- }
62
-
63
- export function PartialProfileDto_$reflection() {
64
- return record_type("Dto.Aggregates.PartialProfileDto", [], PartialProfileDto, () => [["Metadata", Metadata_$reflection()], ["AccountId", string_type], ["Name", Name_$reflection()], ["Email", string_type], ["MobilePhone", option_type(string_type)], ["ExternalId", option_type(string_type)], ["Title", option_type(string_type)], ["Gender", option_type(string_type)], ["DateOfBirth", option_type(string_type)], ["Address", option_type(Address_$reflection())]]);
65
- }
66
-
67
- export class ProfileDto extends Union {
68
- constructor(tag, fields) {
69
- super();
70
- this.tag = tag;
71
- this.fields = fields;
72
- }
73
- cases() {
74
- return ["Active", "Inactive", "Purged", "Partial", "InactivePartial", "Archived", "ArchivedPartial"];
75
- }
76
- }
77
-
78
- export function ProfileDto_$reflection() {
79
- return union_type("Dto.Aggregates.ProfileDto", [], ProfileDto, () => [[["Item", FullProfileDto_$reflection()]], [["Item", FullProfileDto_$reflection()]], [["Item", PurgedProfileDto_$reflection()]], [["Item", PartialProfileDto_$reflection()]], [["Item", PartialProfileDto_$reflection()]], [["Item", FullProfileDto_$reflection()]], [["Item", PartialProfileDto_$reflection()]]]);
80
- }
81
-
82
- export class OperationalProfileDto extends Union {
83
- constructor(tag, fields) {
84
- super();
85
- this.tag = tag;
86
- this.fields = fields;
87
- }
88
- cases() {
89
- return ["Active", "Inactive", "Partial", "InactivePartial"];
90
- }
91
- }
92
-
93
- export function OperationalProfileDto_$reflection() {
94
- return union_type("Dto.Aggregates.OperationalProfileDto", [], OperationalProfileDto, () => [[["Item", FullProfileDto_$reflection()]], [["Item", FullProfileDto_$reflection()]], [["Item", PartialProfileDto_$reflection()]], [["Item", PartialProfileDto_$reflection()]]]);
95
- }
96
-
97
- export function FullProfileDtoModule_toDomain(profile) {
98
- const metadata_1 = MetadataModule_toDomain(profile.Metadata);
99
- const accountId = AccountId_toDomain(profile.AccountId);
100
- const input_19 = NameModule_toDomain(profile.Name);
101
- if (input_19.tag === 1) {
102
- return new FSharpResult$2(1, [input_19.fields[0]]);
103
- }
104
- else {
105
- const input_17 = Title_toDomain(profile.Title);
106
- if (input_17.tag === 1) {
107
- return new FSharpResult$2(1, [input_17.fields[0]]);
108
- }
109
- else {
110
- const input_15 = Gender_toDomain(profile.Gender);
111
- if (input_15.tag === 1) {
112
- return new FSharpResult$2(1, [input_15.fields[0]]);
113
- }
114
- else {
115
- const input_13 = Email_toDomain(profile.Email);
116
- if (input_13.tag === 1) {
117
- return new FSharpResult$2(1, [input_13.fields[0]]);
118
- }
119
- else {
120
- const input_11 = MobilePhone_toDomain(profile.MobilePhone);
121
- if (input_11.tag === 1) {
122
- return new FSharpResult$2(1, [input_11.fields[0]]);
123
- }
124
- else {
125
- const input_9 = DateOfBirth_toDomain(profile.DateOfBirth);
126
- if (input_9.tag === 1) {
127
- return new FSharpResult$2(1, [input_9.fields[0]]);
128
- }
129
- else {
130
- const input_7 = AddressModule_toDomain(profile.Address);
131
- if (input_7.tag === 1) {
132
- return new FSharpResult$2(1, [input_7.fields[0]]);
133
- }
134
- else {
135
- let input_5;
136
- const input_1 = profile.ExternalId;
137
- if (input_1 != null) {
138
- const input_2 = ExternalId_toDomain(input_1);
139
- input_5 = ((input_2.tag === 1) ? (new FSharpResult$2(1, [input_2.fields[0]])) : (new FSharpResult$2(0, [input_2.fields[0]])));
140
- }
141
- else {
142
- input_5 = (new FSharpResult$2(0, [undefined]));
143
- }
144
- if (input_5.tag === 1) {
145
- return new FSharpResult$2(1, [input_5.fields[0]]);
146
- }
147
- else {
148
- const input_3 = traverseResultM(EmergencyContactDtoModule_toDomain, defaultArg(profile.EmergencyContacts, empty()));
149
- if (input_3.tag === 1) {
150
- return new FSharpResult$2(1, [input_3.fields[0]]);
151
- }
152
- else {
153
- return new FSharpResult$2(0, [new ProfileDetail(metadata_1, accountId, input_19.fields[0], input_17.fields[0], input_15.fields[0], input_13.fields[0], input_11.fields[0], input_9.fields[0], input_7.fields[0], input_5.fields[0], input_3.fields[0])]);
154
- }
155
- }
156
- }
157
- }
158
- }
159
- }
160
- }
161
- }
162
- }
163
- }
164
-
165
- export function FullProfileDtoModule_ofDomain(profile) {
166
- let input_1;
167
- return new FullProfileDto(MetadataModule_ofDomain(profile.Metadata), AccountId_ofDomain(profile.AccountId), NameModule_ofDomain(profile.Name), Title_ofDomain(profile.Title), Gender_ofDomain(profile.Gender), Email_ofDomain(profile.Email), MobilePhone_ofDomain(profile.MobilePhone), DateOfBirth_ofDomain(profile.DateOfBirth), AddressModule_ofDomain(profile.Address), (input_1 = profile.ExternalId, (input_1 == null) ? undefined : ExternalId_ofDomain(input_1)), map(EmergencyContactDtoModule_ofDomain, profile.EmergencyContacts));
168
- }
169
-
170
- export function PartialProfileDtoModule_toDomain(p) {
171
- const metadata_1 = MetadataModule_toDomain(p.Metadata);
172
- const accountId = AccountId_toDomain(p.AccountId);
173
- const input_32 = NameModule_toDomain(p.Name);
174
- if (input_32.tag === 1) {
175
- return new FSharpResult$2(1, [input_32.fields[0]]);
176
- }
177
- else {
178
- const input_30 = Email_toDomain(p.Email);
179
- if (input_30.tag === 1) {
180
- return new FSharpResult$2(1, [input_30.fields[0]]);
181
- }
182
- else {
183
- let input_28;
184
- const input_1 = p.MobilePhone;
185
- if (input_1 != null) {
186
- const input_2 = MobilePhone_toDomain(input_1);
187
- input_28 = ((input_2.tag === 1) ? (new FSharpResult$2(1, [input_2.fields[0]])) : (new FSharpResult$2(0, [input_2.fields[0]])));
188
- }
189
- else {
190
- input_28 = (new FSharpResult$2(0, [undefined]));
191
- }
192
- if (input_28.tag === 1) {
193
- return new FSharpResult$2(1, [input_28.fields[0]]);
194
- }
195
- else {
196
- let input_26;
197
- const input_4 = p.ExternalId;
198
- if (input_4 != null) {
199
- const input_5 = ExternalId_toDomain(input_4);
200
- input_26 = ((input_5.tag === 1) ? (new FSharpResult$2(1, [input_5.fields[0]])) : (new FSharpResult$2(0, [input_5.fields[0]])));
201
- }
202
- else {
203
- input_26 = (new FSharpResult$2(0, [undefined]));
204
- }
205
- if (input_26.tag === 1) {
206
- return new FSharpResult$2(1, [input_26.fields[0]]);
207
- }
208
- else {
209
- let input_24;
210
- const input_7 = p.Title;
211
- if (input_7 != null) {
212
- const input_8 = Title_toDomain(input_7);
213
- input_24 = ((input_8.tag === 1) ? (new FSharpResult$2(1, [input_8.fields[0]])) : (new FSharpResult$2(0, [input_8.fields[0]])));
214
- }
215
- else {
216
- input_24 = (new FSharpResult$2(0, [undefined]));
217
- }
218
- if (input_24.tag === 1) {
219
- return new FSharpResult$2(1, [input_24.fields[0]]);
220
- }
221
- else {
222
- let input_22;
223
- const input_10 = p.Gender;
224
- if (input_10 != null) {
225
- const input_11 = Gender_toDomain(input_10);
226
- input_22 = ((input_11.tag === 1) ? (new FSharpResult$2(1, [input_11.fields[0]])) : (new FSharpResult$2(0, [input_11.fields[0]])));
227
- }
228
- else {
229
- input_22 = (new FSharpResult$2(0, [undefined]));
230
- }
231
- if (input_22.tag === 1) {
232
- return new FSharpResult$2(1, [input_22.fields[0]]);
233
- }
234
- else {
235
- let input_20;
236
- const input_13 = p.DateOfBirth;
237
- if (input_13 != null) {
238
- const input_14 = DateOfBirth_toDomain(input_13);
239
- input_20 = ((input_14.tag === 1) ? (new FSharpResult$2(1, [input_14.fields[0]])) : (new FSharpResult$2(0, [input_14.fields[0]])));
240
- }
241
- else {
242
- input_20 = (new FSharpResult$2(0, [undefined]));
243
- }
244
- if (input_20.tag === 1) {
245
- return new FSharpResult$2(1, [input_20.fields[0]]);
246
- }
247
- else {
248
- let input_18;
249
- const input_16 = p.Address;
250
- if (input_16 != null) {
251
- const input_17 = AddressModule_toDomain(input_16);
252
- input_18 = ((input_17.tag === 1) ? (new FSharpResult$2(1, [input_17.fields[0]])) : (new FSharpResult$2(0, [input_17.fields[0]])));
253
- }
254
- else {
255
- input_18 = (new FSharpResult$2(0, [undefined]));
256
- }
257
- if (input_18.tag === 1) {
258
- return new FSharpResult$2(1, [input_18.fields[0]]);
259
- }
260
- else {
261
- return new FSharpResult$2(0, [new PartialProfileDetail(metadata_1, accountId, input_32.fields[0], input_30.fields[0], input_28.fields[0], input_26.fields[0], input_24.fields[0], input_22.fields[0], input_20.fields[0], input_18.fields[0])]);
262
- }
263
- }
264
- }
265
- }
266
- }
267
- }
268
- }
269
- }
270
- }
271
-
272
- export function PartialProfileDtoModule_ofDomain(p) {
273
- let input_1, input_3, input_5, input_7, input_9, input_11;
274
- return new PartialProfileDto(MetadataModule_ofDomain(p.Metadata), AccountId_ofDomain(p.AccountId), NameModule_ofDomain(p.Name), Email_ofDomain(p.Email), (input_1 = p.MobilePhone, (input_1 == null) ? undefined : MobilePhone_ofDomain(input_1)), (input_3 = p.ExternalId, (input_3 == null) ? undefined : ExternalId_ofDomain(input_3)), (input_5 = p.Title, (input_5 == null) ? undefined : Title_ofDomain(input_5)), (input_7 = p.Gender, (input_7 == null) ? undefined : Gender_ofDomain(input_7)), (input_9 = p.DateOfBirth, (input_9 == null) ? undefined : DateOfBirth_ofDomain(input_9)), (input_11 = p.Address, (input_11 == null) ? undefined : AddressModule_ofDomain(input_11)));
275
- }
276
-
277
- export function ProfileDtoModule_toDomain(profile) {
278
- switch (profile.tag) {
279
- case 1: {
280
- const input_3 = FullProfileDtoModule_toDomain(profile.fields[0]);
281
- if (input_3.tag === 1) {
282
- return new FSharpResult$2(1, [input_3.fields[0]]);
283
- }
284
- else {
285
- return new FSharpResult$2(0, [new Profile(1, [input_3.fields[0]])]);
286
- }
287
- }
288
- case 2: {
289
- const p_2 = profile.fields[0];
290
- const input_10 = Title_toDomain(p_2.Title);
291
- if (input_10.tag === 1) {
292
- return new FSharpResult$2(1, [input_10.fields[0]]);
293
- }
294
- else {
295
- const input_8 = Gender_toDomain(p_2.Gender);
296
- if (input_8.tag === 1) {
297
- return new FSharpResult$2(1, [input_8.fields[0]]);
298
- }
299
- else {
300
- const input_6 = DateOfBirth_toDomain(p_2.DateOfBirth);
301
- if (input_6.tag === 1) {
302
- return new FSharpResult$2(1, [input_6.fields[0]]);
303
- }
304
- else {
305
- const input_4 = PurgedAddressModule_toDomain(p_2.Address);
306
- if (input_4.tag === 1) {
307
- return new FSharpResult$2(1, [input_4.fields[0]]);
308
- }
309
- else {
310
- return new FSharpResult$2(0, [new Profile(6, [new PurgedProfileDetail(MetadataModule_toDomain(p_2.Metadata), AccountId_toDomain(p_2.AccountId), input_10.fields[0], input_8.fields[0], input_6.fields[0], input_4.fields[0])])]);
311
- }
312
- }
313
- }
314
- }
315
- }
316
- case 3: {
317
- const input_12 = PartialProfileDtoModule_toDomain(profile.fields[0]);
318
- if (input_12.tag === 1) {
319
- return new FSharpResult$2(1, [input_12.fields[0]]);
320
- }
321
- else {
322
- return new FSharpResult$2(0, [new Profile(2, [input_12.fields[0]])]);
323
- }
324
- }
325
- case 4: {
326
- const input_14 = PartialProfileDtoModule_toDomain(profile.fields[0]);
327
- if (input_14.tag === 1) {
328
- return new FSharpResult$2(1, [input_14.fields[0]]);
329
- }
330
- else {
331
- return new FSharpResult$2(0, [new Profile(3, [input_14.fields[0]])]);
332
- }
333
- }
334
- case 5: {
335
- const input_16 = FullProfileDtoModule_toDomain(profile.fields[0]);
336
- if (input_16.tag === 1) {
337
- return new FSharpResult$2(1, [input_16.fields[0]]);
338
- }
339
- else {
340
- return new FSharpResult$2(0, [new Profile(4, [input_16.fields[0]])]);
341
- }
342
- }
343
- case 6: {
344
- const input_18 = PartialProfileDtoModule_toDomain(profile.fields[0]);
345
- if (input_18.tag === 1) {
346
- return new FSharpResult$2(1, [input_18.fields[0]]);
347
- }
348
- else {
349
- return new FSharpResult$2(0, [new Profile(5, [input_18.fields[0]])]);
350
- }
351
- }
352
- default: {
353
- const input_1 = FullProfileDtoModule_toDomain(profile.fields[0]);
354
- if (input_1.tag === 1) {
355
- return new FSharpResult$2(1, [input_1.fields[0]]);
356
- }
357
- else {
358
- return new FSharpResult$2(0, [new Profile(0, [input_1.fields[0]])]);
359
- }
360
- }
361
- }
362
- }
363
-
364
- export function ProfileDtoModule_ofDomain(profile) {
365
- switch (profile.tag) {
366
- case 1:
367
- return new ProfileDto(1, [FullProfileDtoModule_ofDomain(profile.fields[0])]);
368
- case 6: {
369
- const p_2 = profile.fields[0];
370
- return new ProfileDto(2, [new PurgedProfileDto(MetadataModule_ofDomain(p_2.Metadata), AccountId_ofDomain(p_2.AccountId), Title_ofDomain(p_2.Title), Gender_ofDomain(p_2.Gender), DateOfBirth_ofDomain(p_2.DateOfBirth), PurgedAddressModule_ofDomain(p_2.Address))]);
371
- }
372
- case 2:
373
- return new ProfileDto(3, [PartialProfileDtoModule_ofDomain(profile.fields[0])]);
374
- case 3:
375
- return new ProfileDto(4, [PartialProfileDtoModule_ofDomain(profile.fields[0])]);
376
- case 4:
377
- return new ProfileDto(5, [FullProfileDtoModule_ofDomain(profile.fields[0])]);
378
- case 5:
379
- return new ProfileDto(6, [PartialProfileDtoModule_ofDomain(profile.fields[0])]);
380
- default:
381
- return new ProfileDto(0, [FullProfileDtoModule_ofDomain(profile.fields[0])]);
382
- }
383
- }
384
-
385
- export function ProfileDtoModule_getMetadata(profile) {
386
- let matchResult, p, p_2;
387
- switch (profile.tag) {
388
- case 1: {
389
- matchResult = 0;
390
- p = profile.fields[0];
391
- break;
392
- }
393
- case 2: {
394
- matchResult = 1;
395
- break;
396
- }
397
- case 3: {
398
- matchResult = 2;
399
- p_2 = profile.fields[0];
400
- break;
401
- }
402
- case 4: {
403
- matchResult = 2;
404
- p_2 = profile.fields[0];
405
- break;
406
- }
407
- case 5: {
408
- matchResult = 3;
409
- break;
410
- }
411
- case 6: {
412
- matchResult = 4;
413
- break;
414
- }
415
- default: {
416
- matchResult = 0;
417
- p = profile.fields[0];
418
- }
419
- }
420
- switch (matchResult) {
421
- case 0:
422
- return p.Metadata;
423
- case 1:
424
- return profile.fields[0].Metadata;
425
- case 2:
426
- return p_2.Metadata;
427
- case 3:
428
- return profile.fields[0].Metadata;
429
- default:
430
- return profile.fields[0].Metadata;
431
- }
432
- }
433
-
434
- export function ProfileDtoModule_getAccountId(profile) {
435
- let matchResult, p, p_2;
436
- switch (profile.tag) {
437
- case 1: {
438
- matchResult = 0;
439
- p = profile.fields[0];
440
- break;
441
- }
442
- case 2: {
443
- matchResult = 1;
444
- break;
445
- }
446
- case 3: {
447
- matchResult = 2;
448
- p_2 = profile.fields[0];
449
- break;
450
- }
451
- case 4: {
452
- matchResult = 2;
453
- p_2 = profile.fields[0];
454
- break;
455
- }
456
- case 5: {
457
- matchResult = 3;
458
- break;
459
- }
460
- case 6: {
461
- matchResult = 4;
462
- break;
463
- }
464
- default: {
465
- matchResult = 0;
466
- p = profile.fields[0];
467
- }
468
- }
469
- switch (matchResult) {
470
- case 0:
471
- return p.AccountId;
472
- case 1:
473
- return profile.fields[0].AccountId;
474
- case 2:
475
- return p_2.AccountId;
476
- case 3:
477
- return profile.fields[0].AccountId;
478
- default:
479
- return profile.fields[0].AccountId;
480
- }
481
- }
482
-
483
- export function OperationalProfileDtoModule_toDomain(profile) {
484
- switch (profile.tag) {
485
- case 1: {
486
- const input_3 = FullProfileDtoModule_toDomain(profile.fields[0]);
487
- if (input_3.tag === 1) {
488
- return new FSharpResult$2(1, [input_3.fields[0]]);
489
- }
490
- else {
491
- return new FSharpResult$2(0, [new OperationalProfile(1, [input_3.fields[0]])]);
492
- }
493
- }
494
- case 2: {
495
- const input_5 = PartialProfileDtoModule_toDomain(profile.fields[0]);
496
- if (input_5.tag === 1) {
497
- return new FSharpResult$2(1, [input_5.fields[0]]);
498
- }
499
- else {
500
- return new FSharpResult$2(0, [new OperationalProfile(2, [input_5.fields[0]])]);
501
- }
502
- }
503
- case 3: {
504
- const input_7 = PartialProfileDtoModule_toDomain(profile.fields[0]);
505
- if (input_7.tag === 1) {
506
- return new FSharpResult$2(1, [input_7.fields[0]]);
507
- }
508
- else {
509
- return new FSharpResult$2(0, [new OperationalProfile(3, [input_7.fields[0]])]);
510
- }
511
- }
512
- default: {
513
- const input_1 = FullProfileDtoModule_toDomain(profile.fields[0]);
514
- if (input_1.tag === 1) {
515
- return new FSharpResult$2(1, [input_1.fields[0]]);
516
- }
517
- else {
518
- return new FSharpResult$2(0, [new OperationalProfile(0, [input_1.fields[0]])]);
519
- }
520
- }
521
- }
522
- }
523
-
524
- export function OperationalProfileDtoModule_toProfile(profile) {
525
- switch (profile.tag) {
526
- case 1: {
527
- const input_3 = FullProfileDtoModule_toDomain(profile.fields[0]);
528
- if (input_3.tag === 1) {
529
- return new FSharpResult$2(1, [input_3.fields[0]]);
530
- }
531
- else {
532
- return new FSharpResult$2(0, [new Profile(1, [input_3.fields[0]])]);
533
- }
534
- }
535
- case 2: {
536
- const input_5 = PartialProfileDtoModule_toDomain(profile.fields[0]);
537
- if (input_5.tag === 1) {
538
- return new FSharpResult$2(1, [input_5.fields[0]]);
539
- }
540
- else {
541
- return new FSharpResult$2(0, [new Profile(2, [input_5.fields[0]])]);
542
- }
543
- }
544
- case 3: {
545
- const input_7 = PartialProfileDtoModule_toDomain(profile.fields[0]);
546
- if (input_7.tag === 1) {
547
- return new FSharpResult$2(1, [input_7.fields[0]]);
548
- }
549
- else {
550
- return new FSharpResult$2(0, [new Profile(3, [input_7.fields[0]])]);
551
- }
552
- }
553
- default: {
554
- const input_1 = FullProfileDtoModule_toDomain(profile.fields[0]);
555
- if (input_1.tag === 1) {
556
- return new FSharpResult$2(1, [input_1.fields[0]]);
557
- }
558
- else {
559
- return new FSharpResult$2(0, [new Profile(0, [input_1.fields[0]])]);
560
- }
561
- }
562
- }
563
- }
564
-