@flarehr/superhero-basic-profile 0.1.2217 → 0.1.2219

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,157 +0,0 @@
1
- import { ProfileIdModule_value } from "../DomainPrimitives.jsx";
2
- import { Union, Record } from "../../fable_modules/fable-library-js.4.20.0/Types.js";
3
- import { union_type, class_type, getUnionFields, name, record_type, int32_type, option_type, string_type } from "../../fable_modules/fable-library-js.4.20.0/Reflection.js";
4
- import { StreamIdModule_value } from "../Metadata.jsx";
5
- import { map } from "../../fable_modules/fable-library-js.4.20.0/Option.js";
6
- import { Gender_ofDomain, Title_ofDomain, AccountId_ofDomain } from "./Primitives.jsx";
7
- import { ProfileState_$reflection } from "../AnalyticsEvent.jsx";
8
- import { toString } from "../../fable_modules/fable-library-js.4.20.0/Guid.js";
9
- import { EventIdModule_value } from "../Events.jsx";
10
-
11
- export function getMethod(domainMetadata) {
12
- const matchValue = domainMetadata.Source;
13
- switch (matchValue.tag) {
14
- case 1:
15
- return "internal API";
16
- case 2:
17
- return "self";
18
- case 3:
19
- return "employer admin";
20
- case 4:
21
- return "superhero";
22
- case 5:
23
- return "internal";
24
- default:
25
- return "partner";
26
- }
27
- }
28
-
29
- export function tryGetAdminId(domainMetadata) {
30
- if (domainMetadata != null) {
31
- const matchValue = domainMetadata.Source;
32
- if (matchValue.tag === 3) {
33
- return ProfileIdModule_value(matchValue.fields[0].ProfileId);
34
- }
35
- else {
36
- return undefined;
37
- }
38
- }
39
- else {
40
- return undefined;
41
- }
42
- }
43
-
44
- export function ProfileTypeDto_ofDomain(_arg) {
45
- if (_arg.tag === 1) {
46
- return "Partial";
47
- }
48
- else {
49
- return "Full";
50
- }
51
- }
52
-
53
- export class MixpanelProfilePropertiesDto extends Record {
54
- constructor(StreamId, AccountId, ProfileType, Title, Gender, YearOfBirth, City, State, Postcode, CountryCode, ProfileState) {
55
- super();
56
- this.StreamId = StreamId;
57
- this.AccountId = AccountId;
58
- this.ProfileType = ProfileType;
59
- this.Title = Title;
60
- this.Gender = Gender;
61
- this.YearOfBirth = YearOfBirth;
62
- this.City = City;
63
- this.State = State;
64
- this.Postcode = Postcode;
65
- this.CountryCode = CountryCode;
66
- this.ProfileState = ProfileState;
67
- }
68
- }
69
-
70
- export function MixpanelProfilePropertiesDto_$reflection() {
71
- return record_type("Dto.AnalyticsEvent.MixpanelProfilePropertiesDto", [], MixpanelProfilePropertiesDto, () => [["StreamId", string_type], ["AccountId", option_type(string_type)], ["ProfileType", option_type(string_type)], ["Title", option_type(string_type)], ["Gender", option_type(string_type)], ["YearOfBirth", option_type(int32_type)], ["City", option_type(string_type)], ["State", option_type(string_type)], ["Postcode", option_type(string_type)], ["CountryCode", option_type(string_type)], ["ProfileState", option_type(string_type)]]);
72
- }
73
-
74
- export function MixpanelProfilePropertiesDtoModule_ofDomain(payload) {
75
- return new MixpanelProfilePropertiesDto(StreamIdModule_value(payload.StreamId), map(AccountId_ofDomain, payload.AccountId), map(ProfileTypeDto_ofDomain, payload.ProfileType), map(Title_ofDomain, payload.Title), map(Gender_ofDomain, payload.Gender), payload.YearOfBirth, payload.City, payload.State, payload.Postcode, payload.CountryCode, map((x) => name(getUnionFields(x, ProfileState_$reflection())[0]), payload.ProfileState));
76
- }
77
-
78
- export class AnalyticsEventDataDto extends Record {
79
- constructor(StreamId, Timestamp, EventId, Method, AdminId) {
80
- super();
81
- this.StreamId = StreamId;
82
- this.Timestamp = Timestamp;
83
- this.EventId = EventId;
84
- this.Method = Method;
85
- this.AdminId = AdminId;
86
- }
87
- }
88
-
89
- export function AnalyticsEventDataDto_$reflection() {
90
- return record_type("Dto.AnalyticsEvent.AnalyticsEventDataDto", [], AnalyticsEventDataDto, () => [["StreamId", string_type], ["Timestamp", class_type("System.DateTime")], ["EventId", string_type], ["Method", option_type(string_type)], ["AdminId", option_type(string_type)]]);
91
- }
92
-
93
- export function AnalyticsEventDataDtoModule_ofDomain(data) {
94
- return new AnalyticsEventDataDto(StreamIdModule_value(data.StreamId), data.Timestamp, toString(EventIdModule_value(data.EventId), "D").toLocaleUpperCase(), map(getMethod, data.DomainMetadata), tryGetAdminId(data.DomainMetadata));
95
- }
96
-
97
- export class AnalyticsStateChangedEventDataDto extends Record {
98
- constructor(StreamId, Timestamp, EventId, From, To, Method, AdminId) {
99
- super();
100
- this.StreamId = StreamId;
101
- this.Timestamp = Timestamp;
102
- this.EventId = EventId;
103
- this.From = From;
104
- this.To = To;
105
- this.Method = Method;
106
- this.AdminId = AdminId;
107
- }
108
- }
109
-
110
- export function AnalyticsStateChangedEventDataDto_$reflection() {
111
- return record_type("Dto.AnalyticsEvent.AnalyticsStateChangedEventDataDto", [], AnalyticsStateChangedEventDataDto, () => [["StreamId", string_type], ["Timestamp", class_type("System.DateTime")], ["EventId", string_type], ["From", option_type(string_type)], ["To", option_type(string_type)], ["Method", option_type(string_type)], ["AdminId", option_type(string_type)]]);
112
- }
113
-
114
- export function AnalyticsStateChangedEventDataDtoModule_ofDomain(data) {
115
- return new AnalyticsStateChangedEventDataDto(StreamIdModule_value(data.StreamId), data.Timestamp, toString(EventIdModule_value(data.EventId), "D").toLocaleUpperCase(), map((x) => name(getUnionFields(x, ProfileState_$reflection())[0]), data.From), map((x_2) => name(getUnionFields(x_2, ProfileState_$reflection())[0]), data.To), map(getMethod, data.DomainMetadata), tryGetAdminId(data.DomainMetadata));
116
- }
117
-
118
- export class AnalyticsEventDto extends Union {
119
- constructor(tag, fields) {
120
- super();
121
- this.tag = tag;
122
- this.fields = fields;
123
- }
124
- cases() {
125
- return ["Created", "Updated", "PartialCreated", "PartialUpdated", "PartialPromoted", "Restored", "Archived", "Activated", "Deactivated", "Purged"];
126
- }
127
- }
128
-
129
- export function AnalyticsEventDto_$reflection() {
130
- return union_type("Dto.AnalyticsEvent.AnalyticsEventDto", [], AnalyticsEventDto, () => [[["Item", AnalyticsEventDataDto_$reflection()]], [["Item", AnalyticsEventDataDto_$reflection()]], [["Item", AnalyticsEventDataDto_$reflection()]], [["Item", AnalyticsEventDataDto_$reflection()]], [["Item", AnalyticsEventDataDto_$reflection()]], [["Item", AnalyticsStateChangedEventDataDto_$reflection()]], [["Item", AnalyticsStateChangedEventDataDto_$reflection()]], [["Item", AnalyticsStateChangedEventDataDto_$reflection()]], [["Item", AnalyticsStateChangedEventDataDto_$reflection()]], [["Item", AnalyticsStateChangedEventDataDto_$reflection()]]]);
131
- }
132
-
133
- export function AnalyticsEventType_ofDomain(event) {
134
- switch (event.tag) {
135
- case 1:
136
- return new AnalyticsEventDto(1, [AnalyticsEventDataDtoModule_ofDomain(event.fields[0])]);
137
- case 2:
138
- return new AnalyticsEventDto(2, [AnalyticsEventDataDtoModule_ofDomain(event.fields[0])]);
139
- case 3:
140
- return new AnalyticsEventDto(3, [AnalyticsEventDataDtoModule_ofDomain(event.fields[0])]);
141
- case 4:
142
- return new AnalyticsEventDto(4, [AnalyticsEventDataDtoModule_ofDomain(event.fields[0])]);
143
- case 5:
144
- return new AnalyticsEventDto(5, [AnalyticsStateChangedEventDataDtoModule_ofDomain(event.fields[0])]);
145
- case 7:
146
- return new AnalyticsEventDto(7, [AnalyticsStateChangedEventDataDtoModule_ofDomain(event.fields[0])]);
147
- case 8:
148
- return new AnalyticsEventDto(8, [AnalyticsStateChangedEventDataDtoModule_ofDomain(event.fields[0])]);
149
- case 6:
150
- return new AnalyticsEventDto(6, [AnalyticsStateChangedEventDataDtoModule_ofDomain(event.fields[0])]);
151
- case 9:
152
- return new AnalyticsEventDto(9, [AnalyticsStateChangedEventDataDtoModule_ofDomain(event.fields[0])]);
153
- default:
154
- return new AnalyticsEventDto(0, [AnalyticsEventDataDtoModule_ofDomain(event.fields[0])]);
155
- }
156
- }
157
-
@@ -1,102 +0,0 @@
1
- import { replace } from "../../../../fable_modules/fable-library-js.4.20.0/RegExp.js";
2
- import { Record } from "../../../../fable_modules/fable-library-js.4.20.0/Types.js";
3
- import { EmergencyContactDto_$reflection, EmergencyContactDtoModule_ofDomain, Address, AddressModule_ofDomain, DateOfBirth_ofDomain, MobilePhone_ofDomain, Email_ofDomain, Gender_ofDomain, Title_ofDomain, Name, NameModule_ofDomain, Address_$reflection, Name_$reflection } from "../../Primitives.jsx";
4
- import { list_type, record_type, string_type } from "../../../../fable_modules/fable-library-js.4.20.0/Reflection.js";
5
- import { EmergencyContact_toDomain, Address_toDomain, DateOfBirth_toDomain, MobilePhone_toDomain, Email_toDomain, Gender_toDomain, Title_toDomain, Name_toDomain } from "../Common.jsx";
6
- import { FSharpResult$2 } from "../../../../fable_modules/fable-library-js.4.20.0/Result.js";
7
- import { ProfileDetail } from "../../../DomainAggregates.jsx";
8
- import { map } from "../../../../fable_modules/fable-library-js.4.20.0/List.js";
9
- import { Auto_generateBoxedEncoder_437914C6, toString } from "../../../../fable_modules/Thoth.Json.10.2.0/Encode.fs.js";
10
- import { CaseStrategy } from "../../../../fable_modules/Thoth.Json.10.2.0/Types.fs.js";
11
- import { traverseResultM } from "../../../../fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js";
12
- import { Auto_generateBoxedDecoder_Z6670B51, fromString } from "../../../../fable_modules/Thoth.Json.10.2.0/Decode.fs.js";
13
- import { uncurry2 } from "../../../../fable_modules/fable-library-js.4.20.0/Util.js";
14
-
15
- export function cleanString(str) {
16
- return replace(str.trim(), "[\\n\\r]", "");
17
- }
18
-
19
- export class FullProfileDto extends Record {
20
- constructor(Name, Title, Gender, Email, MobilePhone, DateOfBirth, Address) {
21
- super();
22
- this.Name = Name;
23
- this.Title = Title;
24
- this.Gender = Gender;
25
- this.Email = Email;
26
- this.MobilePhone = MobilePhone;
27
- this.DateOfBirth = DateOfBirth;
28
- this.Address = Address;
29
- }
30
- }
31
-
32
- export function FullProfileDto_$reflection() {
33
- return record_type("Dto.Api.Backend.Common.FullProfileDto", [], FullProfileDto, () => [["Name", Name_$reflection()], ["Title", string_type], ["Gender", string_type], ["Email", string_type], ["MobilePhone", string_type], ["DateOfBirth", string_type], ["Address", Address_$reflection()]]);
34
- }
35
-
36
- export function FullProfileDtoModule_ofDomain(p) {
37
- let name_1, input_1, address_1, input_3;
38
- return new FullProfileDto((name_1 = NameModule_ofDomain(p.Name), new Name(cleanString(name_1.FirstName), (input_1 = name_1.MiddleName, (input_1 == null) ? undefined : cleanString(input_1)), cleanString(name_1.LastName))), cleanString(Title_ofDomain(p.Title)), cleanString(Gender_ofDomain(p.Gender)), cleanString(Email_ofDomain(p.Email)), cleanString(MobilePhone_ofDomain(p.MobilePhone)), cleanString(DateOfBirth_ofDomain(p.DateOfBirth)), (address_1 = AddressModule_ofDomain(p.Address), new Address(cleanString(address_1.AddressLine1), (input_3 = address_1.AddressLine2, (input_3 == null) ? undefined : cleanString(input_3)), cleanString(address_1.City), cleanString(address_1.State), cleanString(address_1.Postcode), cleanString(address_1.CountryCode))));
39
- }
40
-
41
- export function FullProfileDtoModule_toDomain(p, metadata, accountId, externalId, emergencyContacts) {
42
- const input_12 = Name_toDomain(p.Name);
43
- if (input_12.tag === 1) {
44
- return new FSharpResult$2(1, [input_12.fields[0]]);
45
- }
46
- else {
47
- const input_10 = Title_toDomain(p.Title);
48
- if (input_10.tag === 1) {
49
- return new FSharpResult$2(1, [input_10.fields[0]]);
50
- }
51
- else {
52
- const input_8 = Gender_toDomain(p.Gender);
53
- if (input_8.tag === 1) {
54
- return new FSharpResult$2(1, [input_8.fields[0]]);
55
- }
56
- else {
57
- const input_6 = Email_toDomain(p.Email);
58
- if (input_6.tag === 1) {
59
- return new FSharpResult$2(1, [input_6.fields[0]]);
60
- }
61
- else {
62
- const input_4 = MobilePhone_toDomain(p.MobilePhone);
63
- if (input_4.tag === 1) {
64
- return new FSharpResult$2(1, [input_4.fields[0]]);
65
- }
66
- else {
67
- const input_2 = DateOfBirth_toDomain(p.DateOfBirth);
68
- if (input_2.tag === 1) {
69
- return new FSharpResult$2(1, [input_2.fields[0]]);
70
- }
71
- else {
72
- const input = Address_toDomain(p.Address);
73
- if (input.tag === 1) {
74
- return new FSharpResult$2(1, [input.fields[0]]);
75
- }
76
- else {
77
- return new FSharpResult$2(0, [new ProfileDetail(metadata, accountId, input_12.fields[0], input_10.fields[0], input_8.fields[0], input_6.fields[0], input_4.fields[0], input_2.fields[0], input.fields[0], externalId, emergencyContacts)]);
78
- }
79
- }
80
- }
81
- }
82
- }
83
- }
84
- }
85
- }
86
-
87
- export function EmergencyContactsListDtoModule_ofDomain(ec) {
88
- return map(EmergencyContactDtoModule_ofDomain, ec);
89
- }
90
-
91
- export function EmergencyContactsListDtoModule_toJson(ec) {
92
- return toString(0, Auto_generateBoxedEncoder_437914C6(list_type(EmergencyContactDto_$reflection()), new CaseStrategy(1, []), undefined, undefined)(ec));
93
- }
94
-
95
- export function EmergencyContactsListDtoModule_toDomain(ec) {
96
- return traverseResultM(EmergencyContact_toDomain, ec);
97
- }
98
-
99
- export function EmergencyContactsListDtoModule_ofJson(json) {
100
- return fromString(uncurry2(Auto_generateBoxedDecoder_Z6670B51(list_type(EmergencyContactDto_$reflection()), new CaseStrategy(1, []), undefined)), json);
101
- }
102
-
@@ -1,85 +0,0 @@
1
- import { Union, Record } from "../../../../fable_modules/fable-library-js.4.20.0/Types.js";
2
- import { Address, AddressModule_ofDomain, DateOfBirth_ofDomain, Gender_ofDomain, Title_ofDomain, MobilePhone_ofDomain, Email_ofDomain, Name, NameModule_ofDomain, Address_$reflection, Name_$reflection } from "../../Primitives.jsx";
3
- import { union_type, record_type, option_type, string_type } from "../../../../fable_modules/fable-library-js.4.20.0/Reflection.js";
4
- import { FullProfileDtoModule_ofDomain, FullProfileDto_$reflection, cleanString } from "./Common.jsx";
5
- import { Auto_generateBoxedEncoder_437914C6, toString } from "../../../../fable_modules/Thoth.Json.10.2.0/Encode.fs.js";
6
- import { CaseStrategy } from "../../../../fable_modules/Thoth.Json.10.2.0/Types.fs.js";
7
- import { Auto_generateBoxedDecoder_Z6670B51, fromString } from "../../../../fable_modules/Thoth.Json.10.2.0/Decode.fs.js";
8
- import { uncurry2 } from "../../../../fable_modules/fable-library-js.4.20.0/Util.js";
9
-
10
- export class PartialProfileDto extends Record {
11
- constructor(Name, Email, MobilePhone, Title, Gender, DateOfBirth, Address) {
12
- super();
13
- this.Name = Name;
14
- this.Email = Email;
15
- this.MobilePhone = MobilePhone;
16
- this.Title = Title;
17
- this.Gender = Gender;
18
- this.DateOfBirth = DateOfBirth;
19
- this.Address = Address;
20
- }
21
- }
22
-
23
- export function PartialProfileDto_$reflection() {
24
- return record_type("Dto.Api.Backend.Read.PartialProfileDto", [], PartialProfileDto, () => [["Name", Name_$reflection()], ["Email", string_type], ["MobilePhone", option_type(string_type)], ["Title", option_type(string_type)], ["Gender", option_type(string_type)], ["DateOfBirth", option_type(string_type)], ["Address", option_type(Address_$reflection())]]);
25
- }
26
-
27
- export function PartialProfileDtoModule_ofDomain(p) {
28
- let name_1, input_1, input_5, input_3, input_9, input_7, input_13, input_11, input_17, input_15, input_23, input_19, address_1, input_21;
29
- return new PartialProfileDto((name_1 = NameModule_ofDomain(p.Name), new Name(cleanString(name_1.FirstName), (input_1 = name_1.MiddleName, (input_1 == null) ? undefined : cleanString(input_1)), cleanString(name_1.LastName))), cleanString(Email_ofDomain(p.Email)), (input_5 = ((input_3 = p.MobilePhone, (input_3 == null) ? undefined : MobilePhone_ofDomain(input_3))), (input_5 == null) ? undefined : cleanString(input_5)), (input_9 = ((input_7 = p.Title, (input_7 == null) ? undefined : Title_ofDomain(input_7))), (input_9 == null) ? undefined : cleanString(input_9)), (input_13 = ((input_11 = p.Gender, (input_11 == null) ? undefined : Gender_ofDomain(input_11))), (input_13 == null) ? undefined : cleanString(input_13)), (input_17 = ((input_15 = p.DateOfBirth, (input_15 == null) ? undefined : DateOfBirth_ofDomain(input_15))), (input_17 == null) ? undefined : cleanString(input_17)), (input_23 = ((input_19 = p.Address, (input_19 == null) ? undefined : AddressModule_ofDomain(input_19))), (input_23 == null) ? undefined : ((address_1 = input_23, new Address(cleanString(address_1.AddressLine1), (input_21 = address_1.AddressLine2, (input_21 == null) ? undefined : cleanString(input_21)), cleanString(address_1.City), cleanString(address_1.State), cleanString(address_1.Postcode), cleanString(address_1.CountryCode))))));
30
- }
31
-
32
- export class ProfileDto extends Union {
33
- constructor(tag, fields) {
34
- super();
35
- this.tag = tag;
36
- this.fields = fields;
37
- }
38
- cases() {
39
- return ["Full", "Partial"];
40
- }
41
- }
42
-
43
- export function ProfileDto_$reflection() {
44
- return union_type("Dto.Api.Backend.Read.ProfileDto", [], ProfileDto, () => [[["Item", FullProfileDto_$reflection()]], [["Item", PartialProfileDto_$reflection()]]]);
45
- }
46
-
47
- export function ProfileDtoModule_ofFull(p) {
48
- return new ProfileDto(0, [FullProfileDtoModule_ofDomain(p)]);
49
- }
50
-
51
- export function ProfileDtoModule_ofPartial(p) {
52
- return new ProfileDto(1, [PartialProfileDtoModule_ofDomain(p)]);
53
- }
54
-
55
- export function ProfileDtoModule_toJson(p) {
56
- return toString(0, Auto_generateBoxedEncoder_437914C6(ProfileDto_$reflection(), new CaseStrategy(1, []), undefined, undefined)(p));
57
- }
58
-
59
- export function ProfileDtoModule_ofJson(json) {
60
- return fromString(uncurry2(Auto_generateBoxedDecoder_Z6670B51(ProfileDto_$reflection(), new CaseStrategy(1, []), undefined)), json);
61
- }
62
-
63
- export class ProfileUpdateStatus extends Union {
64
- constructor(tag, fields) {
65
- super();
66
- this.tag = tag;
67
- this.fields = fields;
68
- }
69
- cases() {
70
- return ["Success", "EmailNotUnique"];
71
- }
72
- }
73
-
74
- export function ProfileUpdateStatus_$reflection() {
75
- return union_type("Dto.Api.Backend.Read.ProfileUpdateStatus", [], ProfileUpdateStatus, () => [[], []]);
76
- }
77
-
78
- export function ProfileUpdateStatusModule_toJson(p) {
79
- return toString(0, Auto_generateBoxedEncoder_437914C6(ProfileUpdateStatus_$reflection(), new CaseStrategy(1, []), undefined, undefined)(p));
80
- }
81
-
82
- export function ProfileUpdateStatusModule_ofJson(json) {
83
- return fromString(uncurry2(Auto_generateBoxedDecoder_Z6670B51(ProfileUpdateStatus_$reflection(), new CaseStrategy(1, []), undefined)), json);
84
- }
85
-
@@ -1,16 +0,0 @@
1
- import { Auto_generateBoxedDecoder_Z6670B51, fromString } from "../../../../fable_modules/Thoth.Json.10.2.0/Decode.fs.js";
2
- import { uncurry2 } from "../../../../fable_modules/fable-library-js.4.20.0/Util.js";
3
- import { FullProfileDtoModule_toDomain, FullProfileDto_$reflection } from "./Common.jsx";
4
- import { CaseStrategy } from "../../../../fable_modules/Thoth.Json.10.2.0/Types.fs.js";
5
- import { Auto_generateBoxedEncoder_437914C6, toString } from "../../../../fable_modules/Thoth.Json.10.2.0/Encode.fs.js";
6
-
7
- export const ProfileDtoModule_ofJson = (s) => fromString(uncurry2(Auto_generateBoxedDecoder_Z6670B51(FullProfileDto_$reflection(), new CaseStrategy(1, []), undefined)), s);
8
-
9
- export function ProfileDtoModule_toDomain(profileDto, metadata, accountId, externalId, emergencyContacts) {
10
- return FullProfileDtoModule_toDomain(profileDto, metadata, accountId, externalId, emergencyContacts);
11
- }
12
-
13
- export function ProfileDtoModule_toJson(profile) {
14
- return toString(0, Auto_generateBoxedEncoder_437914C6(FullProfileDto_$reflection(), new CaseStrategy(1, []), undefined, undefined)(profile));
15
- }
16
-