@flarehr/superhero-basic-profile 0.1.2214 → 0.1.2217
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/dist/App.jsx +4 -0
- package/dist/Basic.Profile.Domain/AnalyticsEvent.jsx +102 -0
- package/dist/Basic.Profile.Domain/Audit.jsx +149 -0
- package/dist/Basic.Profile.Domain/Commands.jsx +68 -0
- package/dist/Basic.Profile.Domain/CommonTypes.jsx +194 -0
- package/dist/Basic.Profile.Domain/Config/Api/Admin/Read.jsx +58 -0
- package/dist/Basic.Profile.Domain/Config/Api/Admin/Write.jsx +23 -0
- package/dist/Basic.Profile.Domain/Config/Api/FlareAdminShell/Read.jsx +35 -0
- package/dist/Basic.Profile.Domain/Config/Commands.jsx +72 -0
- package/dist/Basic.Profile.Domain/Config/ConfigCommandHandler.jsx +197 -0
- package/dist/Basic.Profile.Domain/Config/Dto.jsx +181 -0
- package/dist/Basic.Profile.Domain/Config/Types.jsx +152 -0
- package/dist/Basic.Profile.Domain/DateTimeProvider.jsx +23 -0
- package/dist/Basic.Profile.Domain/DomainAggregates.jsx +801 -0
- package/dist/Basic.Profile.Domain/DomainPrimitives.jsx +426 -0
- package/dist/Basic.Profile.Domain/Dto/Aggregates.jsx +564 -0
- package/dist/Basic.Profile.Domain/Dto/AnalyticsEvent.jsx +157 -0
- package/dist/Basic.Profile.Domain/Dto/Api/Backend/Common.jsx +102 -0
- package/dist/Basic.Profile.Domain/Dto/Api/Backend/Read.jsx +85 -0
- package/dist/Basic.Profile.Domain/Dto/Api/Backend/Write.jsx +16 -0
- package/dist/Basic.Profile.Domain/Dto/Api/Common.jsx +427 -0
- package/dist/Basic.Profile.Domain/Dto/Api/External/Read.jsx +118 -0
- package/dist/Basic.Profile.Domain/Dto/Api/External/ReadV2.jsx +6 -0
- package/dist/Basic.Profile.Domain/Dto/Api/External/Write.jsx +184 -0
- package/dist/Basic.Profile.Domain/Dto/Api/External/WriteV2.jsx +439 -0
- package/dist/Basic.Profile.Domain/Dto/Api/FlareAdminShell/Read.jsx +38 -0
- package/dist/Basic.Profile.Domain/Dto/Api/FlareAdminShell/Write.jsx +199 -0
- package/dist/Basic.Profile.Domain/Dto/Api/Internal/Read.jsx +125 -0
- package/dist/Basic.Profile.Domain/Dto/Audit.jsx +121 -0
- package/dist/Basic.Profile.Domain/Dto/Commands.jsx +256 -0
- package/dist/Basic.Profile.Domain/Dto/Common.jsx +84 -0
- package/dist/Basic.Profile.Domain/Dto/Events.jsx +220 -0
- package/dist/Basic.Profile.Domain/Dto/Primitives.jsx +580 -0
- package/dist/Basic.Profile.Domain/Dto/ProfileCreationModels.jsx +324 -0
- package/dist/Basic.Profile.Domain/Dto/Validation.jsx +229 -0
- package/dist/Basic.Profile.Domain/Events.jsx +64 -0
- package/dist/Basic.Profile.Domain/Import/Api/InternalApi/Read.jsx +140 -0
- package/dist/Basic.Profile.Domain/Import/Api/InternalApi/Validation.jsx +499 -0
- package/dist/Basic.Profile.Domain/Import/Api/InternalApi/Write.jsx +51 -0
- package/dist/Basic.Profile.Domain/Import/Api/Read.jsx +154 -0
- package/dist/Basic.Profile.Domain/Import/CommonTypes.jsx +187 -0
- package/dist/Basic.Profile.Domain/Import/Dto.jsx +475 -0
- package/dist/Basic.Profile.Domain/Import/ImportCommandHandler.jsx +531 -0
- package/dist/Basic.Profile.Domain/Import/Types.jsx +405 -0
- package/dist/Basic.Profile.Domain/JwtPayload.jsx +44 -0
- package/dist/Basic.Profile.Domain/Metadata.jsx +257 -0
- package/dist/Basic.Profile.Domain/ProfileCommandHandler.jsx +261 -0
- package/dist/Basic.Profile.Domain/ProfileModels.jsx +59 -0
- package/dist/Basic.Profile.Domain/Utils.jsx +372 -0
- package/dist/Common/PreactCustomElement.jsx +8 -0
- package/dist/Common/Resources.jsx +20 -0
- package/dist/Common/Tailwind.jsx +8 -0
- package/dist/Common/Utils.jsx +18 -0
- package/dist/Directory/App.jsx +192 -0
- package/dist/Directory/BackendServices/Common.jsx +115 -0
- package/dist/Directory/BackendServices/ConfigService.jsx +168 -0
- package/dist/Directory/BackendServices/ImportService.jsx +137 -0
- package/dist/Directory/Common.jsx +93 -0
- package/dist/Directory/Config/Components.jsx +173 -0
- package/dist/Directory/Config/Types.jsx +187 -0
- package/dist/Directory/PastImports/PastImports.jsx +81 -0
- package/dist/Directory/ProfileImport/ProfileImport.jsx +284 -0
- package/dist/Directory/ProfileImport/Types.jsx +91 -0
- package/dist/Directory/TabNav.jsx +24 -0
- package/dist/Directory/Types.jsx +101 -0
- package/dist/Directory/User.jsx +117 -0
- package/dist/HeadlessUI/Dialog.jsx +66 -0
- package/dist/HeadlessUI/ModalDialog.jsx +74 -0
- package/dist/HeadlessUI/Switch.jsx +66 -0
- package/dist/HeadlessUI/Transition.jsx +66 -0
- package/package.json +1 -1
- package/dist/assets/delete.dcc7b157.svg +0 -5
- package/dist/assets/dialog-warning.cc77f3ba.svg +0 -5
- package/dist/assets/pencil.05fe6be6.svg +0 -5
- package/dist/index.html +0 -20
- package/dist/superhero-basic-profile.js +0 -50
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { Record } from "../../../../fable_modules/fable-library-js.4.20.0/Types.js";
|
|
2
|
+
import { ExternalId_toDomain, MobilePhone_toDomain, Gender_toDomain, Title_toDomain, NameModule_toDomain, Address_$reflection, Name_$reflection } from "../../Primitives.jsx";
|
|
3
|
+
import { record_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 { Address_toDomainV1, DateOfBirth_toDomain, Email_toDomain } from "../Common.jsx";
|
|
6
|
+
import { unwrap } from "../../../../fable_modules/fable-library-js.4.20.0/Option.js";
|
|
7
|
+
import { empty } from "../../../../fable_modules/fable-library-js.4.20.0/List.js";
|
|
8
|
+
import { ProfileDetail } from "../../../DomainAggregates.jsx";
|
|
9
|
+
import { FullProfileCreationDetails } from "../../../ProfileModels.jsx";
|
|
10
|
+
import { newGuid } from "../../../../fable_modules/fable-library-js.4.20.0/Guid.js";
|
|
11
|
+
import { Command$1, ProfileCommand, CommandId } from "../../../Commands.jsx";
|
|
12
|
+
|
|
13
|
+
export class ProfileWriteDto extends Record {
|
|
14
|
+
constructor(Name, ExternalId, Title, Gender, Email, MobilePhone, DateOfBirth, Address) {
|
|
15
|
+
super();
|
|
16
|
+
this.Name = Name;
|
|
17
|
+
this.ExternalId = ExternalId;
|
|
18
|
+
this.Title = Title;
|
|
19
|
+
this.Gender = Gender;
|
|
20
|
+
this.Email = Email;
|
|
21
|
+
this.MobilePhone = MobilePhone;
|
|
22
|
+
this.DateOfBirth = DateOfBirth;
|
|
23
|
+
this.Address = Address;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function ProfileWriteDto_$reflection() {
|
|
28
|
+
return record_type("Dto.Api.External.Write.ProfileWriteDto", [], ProfileWriteDto, () => [["Name", Name_$reflection()], ["ExternalId", option_type(string_type)], ["Title", string_type], ["Gender", string_type], ["Email", string_type], ["MobilePhone", string_type], ["DateOfBirth", string_type], ["Address", Address_$reflection()]]);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function ProfileWriteDtoModule_toDomainInternal(profile) {
|
|
32
|
+
const input_17 = NameModule_toDomain(profile.Name);
|
|
33
|
+
if (input_17.tag === 1) {
|
|
34
|
+
return new FSharpResult$2(1, [input_17.fields[0]]);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
const input_15 = Title_toDomain(profile.Title);
|
|
38
|
+
if (input_15.tag === 1) {
|
|
39
|
+
return new FSharpResult$2(1, [input_15.fields[0]]);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
const input_13 = Gender_toDomain(profile.Gender);
|
|
43
|
+
if (input_13.tag === 1) {
|
|
44
|
+
return new FSharpResult$2(1, [input_13.fields[0]]);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
const input_11 = Email_toDomain(profile.Email);
|
|
48
|
+
if (input_11.tag === 1) {
|
|
49
|
+
return new FSharpResult$2(1, [input_11.fields[0]]);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
const input_9 = MobilePhone_toDomain(profile.MobilePhone);
|
|
53
|
+
if (input_9.tag === 1) {
|
|
54
|
+
return new FSharpResult$2(1, [input_9.fields[0]]);
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
const input_7 = DateOfBirth_toDomain(profile.DateOfBirth);
|
|
58
|
+
if (input_7.tag === 1) {
|
|
59
|
+
return new FSharpResult$2(1, [input_7.fields[0]]);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
const input_5 = Address_toDomainV1(profile.Address);
|
|
63
|
+
if (input_5.tag === 1) {
|
|
64
|
+
return new FSharpResult$2(1, [input_5.fields[0]]);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
let input_3;
|
|
68
|
+
const input_1 = profile.ExternalId;
|
|
69
|
+
if (input_1 != null) {
|
|
70
|
+
const input_2 = ExternalId_toDomain(input_1);
|
|
71
|
+
input_3 = ((input_2.tag === 1) ? (new FSharpResult$2(1, [input_2.fields[0]])) : (new FSharpResult$2(0, [input_2.fields[0]])));
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
input_3 = (new FSharpResult$2(0, [undefined]));
|
|
75
|
+
}
|
|
76
|
+
if (input_3.tag === 1) {
|
|
77
|
+
return new FSharpResult$2(1, [input_3.fields[0]]);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
return new FSharpResult$2(0, [{
|
|
81
|
+
Address: input_5.fields[0],
|
|
82
|
+
DateOfBirth: input_7.fields[0],
|
|
83
|
+
Email: input_11.fields[0],
|
|
84
|
+
ExternalId: unwrap(input_3.fields[0]),
|
|
85
|
+
Gender: input_13.fields[0],
|
|
86
|
+
MobilePhone: input_9.fields[0],
|
|
87
|
+
Name: input_17.fields[0],
|
|
88
|
+
Title: input_15.fields[0],
|
|
89
|
+
}]);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function ProfileWriteDtoModule_toProfileDetail(accountId, metadata, profile) {
|
|
101
|
+
let data;
|
|
102
|
+
const input = ProfileWriteDtoModule_toDomainInternal(profile);
|
|
103
|
+
if (input.tag === 1) {
|
|
104
|
+
return new FSharpResult$2(1, [input.fields[0]]);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
return new FSharpResult$2(0, [(data = input.fields[0], new ProfileDetail(metadata, accountId, data.Name, data.Title, data.Gender, data.Email, data.MobilePhone, data.DateOfBirth, data.Address, data.ExternalId, empty()))]);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function ProfileWriteDtoModule_toCreateCommand(accountId, metadata, profile) {
|
|
112
|
+
let data, details, copyOfStruct;
|
|
113
|
+
const input = ProfileWriteDtoModule_toDomainInternal(profile);
|
|
114
|
+
if (input.tag === 1) {
|
|
115
|
+
return new FSharpResult$2(1, [input.fields[0]]);
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
return new FSharpResult$2(0, [(data = input.fields[0], (details = (new FullProfileCreationDetails(accountId, data.Name, data.Title, data.Gender, data.Email, data.MobilePhone, data.DateOfBirth, data.Address, data.ExternalId)), new Command$1(new CommandId((copyOfStruct = newGuid(), copyOfStruct)), new ProfileCommand(0, [details]), metadata)))]);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export class ProfileUpdateDto extends Record {
|
|
123
|
+
constructor(Name, Title, Gender, Email, MobilePhone, DateOfBirth, Address) {
|
|
124
|
+
super();
|
|
125
|
+
this.Name = Name;
|
|
126
|
+
this.Title = Title;
|
|
127
|
+
this.Gender = Gender;
|
|
128
|
+
this.Email = Email;
|
|
129
|
+
this.MobilePhone = MobilePhone;
|
|
130
|
+
this.DateOfBirth = DateOfBirth;
|
|
131
|
+
this.Address = Address;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export function ProfileUpdateDto_$reflection() {
|
|
136
|
+
return record_type("Dto.Api.External.Write.ProfileUpdateDto", [], ProfileUpdateDto, () => [["Name", Name_$reflection()], ["Title", string_type], ["Gender", string_type], ["Email", string_type], ["MobilePhone", string_type], ["DateOfBirth", string_type], ["Address", Address_$reflection()]]);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function ProfileUpdateDtoModule_toProfileDetail(accountId, metadata, externalId, emergencyContacts, profile) {
|
|
140
|
+
const input_12 = NameModule_toDomain(profile.Name);
|
|
141
|
+
if (input_12.tag === 1) {
|
|
142
|
+
return new FSharpResult$2(1, [input_12.fields[0]]);
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
const input_10 = Title_toDomain(profile.Title);
|
|
146
|
+
if (input_10.tag === 1) {
|
|
147
|
+
return new FSharpResult$2(1, [input_10.fields[0]]);
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
const input_8 = Gender_toDomain(profile.Gender);
|
|
151
|
+
if (input_8.tag === 1) {
|
|
152
|
+
return new FSharpResult$2(1, [input_8.fields[0]]);
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
const input_6 = Email_toDomain(profile.Email);
|
|
156
|
+
if (input_6.tag === 1) {
|
|
157
|
+
return new FSharpResult$2(1, [input_6.fields[0]]);
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
const input_4 = MobilePhone_toDomain(profile.MobilePhone);
|
|
161
|
+
if (input_4.tag === 1) {
|
|
162
|
+
return new FSharpResult$2(1, [input_4.fields[0]]);
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
const input_2 = DateOfBirth_toDomain(profile.DateOfBirth);
|
|
166
|
+
if (input_2.tag === 1) {
|
|
167
|
+
return new FSharpResult$2(1, [input_2.fields[0]]);
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
const input = Address_toDomainV1(profile.Address);
|
|
171
|
+
if (input.tag === 1) {
|
|
172
|
+
return new FSharpResult$2(1, [input.fields[0]]);
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
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)]);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
import { Record } from "../../../../fable_modules/fable-library-js.4.20.0/Types.js";
|
|
2
|
+
import { ExternalId_toDomain, Address_$reflection, Name_$reflection } from "../../Primitives.jsx";
|
|
3
|
+
import { record_type, option_type, string_type } from "../../../../fable_modules/fable-library-js.4.20.0/Reflection.js";
|
|
4
|
+
import { Address_toDomain, DateOfBirth_toDomain, Gender_toDomain, Title_toDomain, MobilePhone_toDomain, Email_toDomain, Name_toDomain } from "../Common.jsx";
|
|
5
|
+
import { FSharpResult$2 } from "../../../../fable_modules/fable-library-js.4.20.0/Result.js";
|
|
6
|
+
import { ProfileDetail, Profile, PartialProfileDetail } from "../../../DomainAggregates.jsx";
|
|
7
|
+
import { FullProfileCreationDetails, PartialProfileUpdateDetails, PartialProfileCreationDetails } from "../../../ProfileModels.jsx";
|
|
8
|
+
import { newGuid } from "../../../../fable_modules/fable-library-js.4.20.0/Guid.js";
|
|
9
|
+
import { Command$1, ProfileCommand, CommandId } from "../../../Commands.jsx";
|
|
10
|
+
import { MetadataModule_toCommandMetadata, CommandMetadata_withTimestamp } from "../../../Metadata.jsx";
|
|
11
|
+
|
|
12
|
+
export class PartialProfileCreateDto extends Record {
|
|
13
|
+
constructor(Name, Email, ExternalId, MobilePhone, Title, Gender, DateOfBirth, Address) {
|
|
14
|
+
super();
|
|
15
|
+
this.Name = Name;
|
|
16
|
+
this.Email = Email;
|
|
17
|
+
this.ExternalId = ExternalId;
|
|
18
|
+
this.MobilePhone = MobilePhone;
|
|
19
|
+
this.Title = Title;
|
|
20
|
+
this.Gender = Gender;
|
|
21
|
+
this.DateOfBirth = DateOfBirth;
|
|
22
|
+
this.Address = Address;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function PartialProfileCreateDto_$reflection() {
|
|
27
|
+
return record_type("Dto.Api.External.WriteV2.PartialProfileCreateDto", [], PartialProfileCreateDto, () => [["Name", Name_$reflection()], ["Email", string_type], ["ExternalId", option_type(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())]]);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function PartialProfileCreateDtoModule_toDomainInternal(p) {
|
|
31
|
+
const input_32 = Name_toDomain(p.Name);
|
|
32
|
+
if (input_32.tag === 1) {
|
|
33
|
+
return new FSharpResult$2(1, [input_32.fields[0]]);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
const input_30 = Email_toDomain(p.Email);
|
|
37
|
+
if (input_30.tag === 1) {
|
|
38
|
+
return new FSharpResult$2(1, [input_30.fields[0]]);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
let input_28;
|
|
42
|
+
const input_1 = p.MobilePhone;
|
|
43
|
+
if (input_1 != null) {
|
|
44
|
+
const input_2 = MobilePhone_toDomain(input_1);
|
|
45
|
+
input_28 = ((input_2.tag === 1) ? (new FSharpResult$2(1, [input_2.fields[0]])) : (new FSharpResult$2(0, [input_2.fields[0]])));
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
input_28 = (new FSharpResult$2(0, [undefined]));
|
|
49
|
+
}
|
|
50
|
+
if (input_28.tag === 1) {
|
|
51
|
+
return new FSharpResult$2(1, [input_28.fields[0]]);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
let input_26;
|
|
55
|
+
const input_4 = p.ExternalId;
|
|
56
|
+
if (input_4 != null) {
|
|
57
|
+
const input_5 = ExternalId_toDomain(input_4);
|
|
58
|
+
input_26 = ((input_5.tag === 1) ? (new FSharpResult$2(1, [input_5.fields[0]])) : (new FSharpResult$2(0, [input_5.fields[0]])));
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
input_26 = (new FSharpResult$2(0, [undefined]));
|
|
62
|
+
}
|
|
63
|
+
if (input_26.tag === 1) {
|
|
64
|
+
return new FSharpResult$2(1, [input_26.fields[0]]);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
let input_24;
|
|
68
|
+
const input_7 = p.Title;
|
|
69
|
+
if (input_7 != null) {
|
|
70
|
+
const input_8 = Title_toDomain(input_7);
|
|
71
|
+
input_24 = ((input_8.tag === 1) ? (new FSharpResult$2(1, [input_8.fields[0]])) : (new FSharpResult$2(0, [input_8.fields[0]])));
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
input_24 = (new FSharpResult$2(0, [undefined]));
|
|
75
|
+
}
|
|
76
|
+
if (input_24.tag === 1) {
|
|
77
|
+
return new FSharpResult$2(1, [input_24.fields[0]]);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
let input_22;
|
|
81
|
+
const input_10 = p.Gender;
|
|
82
|
+
if (input_10 != null) {
|
|
83
|
+
const input_11 = Gender_toDomain(input_10);
|
|
84
|
+
input_22 = ((input_11.tag === 1) ? (new FSharpResult$2(1, [input_11.fields[0]])) : (new FSharpResult$2(0, [input_11.fields[0]])));
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
input_22 = (new FSharpResult$2(0, [undefined]));
|
|
88
|
+
}
|
|
89
|
+
if (input_22.tag === 1) {
|
|
90
|
+
return new FSharpResult$2(1, [input_22.fields[0]]);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
let input_20;
|
|
94
|
+
const input_13 = p.DateOfBirth;
|
|
95
|
+
if (input_13 != null) {
|
|
96
|
+
const input_14 = DateOfBirth_toDomain(input_13);
|
|
97
|
+
input_20 = ((input_14.tag === 1) ? (new FSharpResult$2(1, [input_14.fields[0]])) : (new FSharpResult$2(0, [input_14.fields[0]])));
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
input_20 = (new FSharpResult$2(0, [undefined]));
|
|
101
|
+
}
|
|
102
|
+
if (input_20.tag === 1) {
|
|
103
|
+
return new FSharpResult$2(1, [input_20.fields[0]]);
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
let input_18;
|
|
107
|
+
const input_16 = p.Address;
|
|
108
|
+
if (input_16 != null) {
|
|
109
|
+
const input_17 = Address_toDomain(input_16);
|
|
110
|
+
input_18 = ((input_17.tag === 1) ? (new FSharpResult$2(1, [input_17.fields[0]])) : (new FSharpResult$2(0, [input_17.fields[0]])));
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
input_18 = (new FSharpResult$2(0, [undefined]));
|
|
114
|
+
}
|
|
115
|
+
if (input_18.tag === 1) {
|
|
116
|
+
return new FSharpResult$2(1, [input_18.fields[0]]);
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
return new FSharpResult$2(0, [[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]]]);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export function PartialProfileCreateDtoModule_toProfile(accountId, metadata, p) {
|
|
131
|
+
let _arg;
|
|
132
|
+
const input = PartialProfileCreateDtoModule_toDomainInternal(p);
|
|
133
|
+
if (input.tag === 1) {
|
|
134
|
+
return new FSharpResult$2(1, [input.fields[0]]);
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
return new FSharpResult$2(0, [(_arg = input.fields[0], new Profile(2, [new PartialProfileDetail(metadata, accountId, _arg[0], _arg[1], _arg[2], _arg[3], _arg[4], _arg[5], _arg[6], _arg[7])]))]);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function PartialProfileCreateDtoModule_toCreateCommand(accountId, metadata, p) {
|
|
142
|
+
let _arg, details, copyOfStruct;
|
|
143
|
+
const input = PartialProfileCreateDtoModule_toDomainInternal(p);
|
|
144
|
+
if (input.tag === 1) {
|
|
145
|
+
return new FSharpResult$2(1, [input.fields[0]]);
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
return new FSharpResult$2(0, [(_arg = input.fields[0], (details = (new PartialProfileCreationDetails(accountId, _arg[0], _arg[1], _arg[2], _arg[3], _arg[4], _arg[5], _arg[6], _arg[7])), new Command$1(new CommandId((copyOfStruct = newGuid(), copyOfStruct)), new ProfileCommand(1, [details]), metadata)))]);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export class PartialProfileUpdateDto extends Record {
|
|
153
|
+
constructor(Name, Email, MobilePhone, Title, Gender, DateOfBirth, Address) {
|
|
154
|
+
super();
|
|
155
|
+
this.Name = Name;
|
|
156
|
+
this.Email = Email;
|
|
157
|
+
this.MobilePhone = MobilePhone;
|
|
158
|
+
this.Title = Title;
|
|
159
|
+
this.Gender = Gender;
|
|
160
|
+
this.DateOfBirth = DateOfBirth;
|
|
161
|
+
this.Address = Address;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export function PartialProfileUpdateDto_$reflection() {
|
|
166
|
+
return record_type("Dto.Api.External.WriteV2.PartialProfileUpdateDto", [], PartialProfileUpdateDto, () => [["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())]]);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
function PartialProfileUpdateDtoModule_toDomainInternal(updateDto) {
|
|
170
|
+
const input_27 = Name_toDomain(updateDto.Name);
|
|
171
|
+
if (input_27.tag === 1) {
|
|
172
|
+
return new FSharpResult$2(1, [input_27.fields[0]]);
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
const input_25 = Email_toDomain(updateDto.Email);
|
|
176
|
+
if (input_25.tag === 1) {
|
|
177
|
+
return new FSharpResult$2(1, [input_25.fields[0]]);
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
let input_23;
|
|
181
|
+
const input_1 = updateDto.MobilePhone;
|
|
182
|
+
if (input_1 != null) {
|
|
183
|
+
const input_2 = MobilePhone_toDomain(input_1);
|
|
184
|
+
input_23 = ((input_2.tag === 1) ? (new FSharpResult$2(1, [input_2.fields[0]])) : (new FSharpResult$2(0, [input_2.fields[0]])));
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
input_23 = (new FSharpResult$2(0, [undefined]));
|
|
188
|
+
}
|
|
189
|
+
if (input_23.tag === 1) {
|
|
190
|
+
return new FSharpResult$2(1, [input_23.fields[0]]);
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
let input_21;
|
|
194
|
+
const input_4 = updateDto.Title;
|
|
195
|
+
if (input_4 != null) {
|
|
196
|
+
const input_5 = Title_toDomain(input_4);
|
|
197
|
+
input_21 = ((input_5.tag === 1) ? (new FSharpResult$2(1, [input_5.fields[0]])) : (new FSharpResult$2(0, [input_5.fields[0]])));
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
input_21 = (new FSharpResult$2(0, [undefined]));
|
|
201
|
+
}
|
|
202
|
+
if (input_21.tag === 1) {
|
|
203
|
+
return new FSharpResult$2(1, [input_21.fields[0]]);
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
let input_19;
|
|
207
|
+
const input_7 = updateDto.Gender;
|
|
208
|
+
if (input_7 != null) {
|
|
209
|
+
const input_8 = Gender_toDomain(input_7);
|
|
210
|
+
input_19 = ((input_8.tag === 1) ? (new FSharpResult$2(1, [input_8.fields[0]])) : (new FSharpResult$2(0, [input_8.fields[0]])));
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
input_19 = (new FSharpResult$2(0, [undefined]));
|
|
214
|
+
}
|
|
215
|
+
if (input_19.tag === 1) {
|
|
216
|
+
return new FSharpResult$2(1, [input_19.fields[0]]);
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
let input_17;
|
|
220
|
+
const input_10 = updateDto.DateOfBirth;
|
|
221
|
+
if (input_10 != null) {
|
|
222
|
+
const input_11 = DateOfBirth_toDomain(input_10);
|
|
223
|
+
input_17 = ((input_11.tag === 1) ? (new FSharpResult$2(1, [input_11.fields[0]])) : (new FSharpResult$2(0, [input_11.fields[0]])));
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
input_17 = (new FSharpResult$2(0, [undefined]));
|
|
227
|
+
}
|
|
228
|
+
if (input_17.tag === 1) {
|
|
229
|
+
return new FSharpResult$2(1, [input_17.fields[0]]);
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
let input_15;
|
|
233
|
+
const input_13 = updateDto.Address;
|
|
234
|
+
if (input_13 != null) {
|
|
235
|
+
const input_14 = Address_toDomain(input_13);
|
|
236
|
+
input_15 = ((input_14.tag === 1) ? (new FSharpResult$2(1, [input_14.fields[0]])) : (new FSharpResult$2(0, [input_14.fields[0]])));
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
input_15 = (new FSharpResult$2(0, [undefined]));
|
|
240
|
+
}
|
|
241
|
+
if (input_15.tag === 1) {
|
|
242
|
+
return new FSharpResult$2(1, [input_15.fields[0]]);
|
|
243
|
+
}
|
|
244
|
+
else {
|
|
245
|
+
return new FSharpResult$2(0, [[input_27.fields[0], input_25.fields[0], input_23.fields[0], input_21.fields[0], input_19.fields[0], input_17.fields[0], input_15.fields[0]]]);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export function PartialProfileUpdateDtoModule_toProfile(metadata, profileState, accountId, externalId, updateDto) {
|
|
256
|
+
let _arg;
|
|
257
|
+
const input = PartialProfileUpdateDtoModule_toDomainInternal(updateDto);
|
|
258
|
+
if (input.tag === 1) {
|
|
259
|
+
return new FSharpResult$2(1, [input.fields[0]]);
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
262
|
+
return new FSharpResult$2(0, [(_arg = input.fields[0], profileState(new PartialProfileDetail(metadata, accountId, _arg[0], _arg[1], _arg[2], externalId, _arg[3], _arg[4], _arg[5], _arg[6])))]);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export function PartialProfileUpdateDtoModule_toUpdateCommand(metadata, domainMetadata, timestamp, updateDto) {
|
|
267
|
+
let _arg, details, copyOfStruct;
|
|
268
|
+
const input = PartialProfileUpdateDtoModule_toDomainInternal(updateDto);
|
|
269
|
+
if (input.tag === 1) {
|
|
270
|
+
return new FSharpResult$2(1, [input.fields[0]]);
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
return new FSharpResult$2(0, [(_arg = input.fields[0], (details = (new PartialProfileUpdateDetails(_arg[0], _arg[1], _arg[2], _arg[3], _arg[4], _arg[5], _arg[6])), new Command$1(new CommandId((copyOfStruct = newGuid(), copyOfStruct)), new ProfileCommand(2, [details]), CommandMetadata_withTimestamp(timestamp, MetadataModule_toCommandMetadata(metadata, domainMetadata)))))]);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export class ProfileWriteDto extends Record {
|
|
278
|
+
constructor(Name, ExternalId, Title, Gender, Email, MobilePhone, DateOfBirth, Address) {
|
|
279
|
+
super();
|
|
280
|
+
this.Name = Name;
|
|
281
|
+
this.ExternalId = ExternalId;
|
|
282
|
+
this.Title = Title;
|
|
283
|
+
this.Gender = Gender;
|
|
284
|
+
this.Email = Email;
|
|
285
|
+
this.MobilePhone = MobilePhone;
|
|
286
|
+
this.DateOfBirth = DateOfBirth;
|
|
287
|
+
this.Address = Address;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export function ProfileWriteDto_$reflection() {
|
|
292
|
+
return record_type("Dto.Api.External.WriteV2.ProfileWriteDto", [], ProfileWriteDto, () => [["Name", Name_$reflection()], ["ExternalId", option_type(string_type)], ["Title", string_type], ["Gender", string_type], ["Email", string_type], ["MobilePhone", string_type], ["DateOfBirth", string_type], ["Address", Address_$reflection()]]);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export function ProfileWriteDtoModule_toDomainInternal(p) {
|
|
296
|
+
const input_17 = Name_toDomain(p.Name);
|
|
297
|
+
if (input_17.tag === 1) {
|
|
298
|
+
return new FSharpResult$2(1, [input_17.fields[0]]);
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
const input_15 = Email_toDomain(p.Email);
|
|
302
|
+
if (input_15.tag === 1) {
|
|
303
|
+
return new FSharpResult$2(1, [input_15.fields[0]]);
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
|
+
const input_13 = MobilePhone_toDomain(p.MobilePhone);
|
|
307
|
+
if (input_13.tag === 1) {
|
|
308
|
+
return new FSharpResult$2(1, [input_13.fields[0]]);
|
|
309
|
+
}
|
|
310
|
+
else {
|
|
311
|
+
let input_11;
|
|
312
|
+
const input_1 = p.ExternalId;
|
|
313
|
+
if (input_1 != null) {
|
|
314
|
+
const input_2 = ExternalId_toDomain(input_1);
|
|
315
|
+
input_11 = ((input_2.tag === 1) ? (new FSharpResult$2(1, [input_2.fields[0]])) : (new FSharpResult$2(0, [input_2.fields[0]])));
|
|
316
|
+
}
|
|
317
|
+
else {
|
|
318
|
+
input_11 = (new FSharpResult$2(0, [undefined]));
|
|
319
|
+
}
|
|
320
|
+
if (input_11.tag === 1) {
|
|
321
|
+
return new FSharpResult$2(1, [input_11.fields[0]]);
|
|
322
|
+
}
|
|
323
|
+
else {
|
|
324
|
+
const input_9 = Title_toDomain(p.Title);
|
|
325
|
+
if (input_9.tag === 1) {
|
|
326
|
+
return new FSharpResult$2(1, [input_9.fields[0]]);
|
|
327
|
+
}
|
|
328
|
+
else {
|
|
329
|
+
const input_7 = Gender_toDomain(p.Gender);
|
|
330
|
+
if (input_7.tag === 1) {
|
|
331
|
+
return new FSharpResult$2(1, [input_7.fields[0]]);
|
|
332
|
+
}
|
|
333
|
+
else {
|
|
334
|
+
const input_5 = DateOfBirth_toDomain(p.DateOfBirth);
|
|
335
|
+
if (input_5.tag === 1) {
|
|
336
|
+
return new FSharpResult$2(1, [input_5.fields[0]]);
|
|
337
|
+
}
|
|
338
|
+
else {
|
|
339
|
+
const input_3 = Address_toDomain(p.Address);
|
|
340
|
+
if (input_3.tag === 1) {
|
|
341
|
+
return new FSharpResult$2(1, [input_3.fields[0]]);
|
|
342
|
+
}
|
|
343
|
+
else {
|
|
344
|
+
return new FSharpResult$2(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]]]);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
export function ProfileWriteDtoModule_toCreateCommand(accountId, metadata, p) {
|
|
356
|
+
let _arg, details, copyOfStruct;
|
|
357
|
+
const input = ProfileWriteDtoModule_toDomainInternal(p);
|
|
358
|
+
if (input.tag === 1) {
|
|
359
|
+
return new FSharpResult$2(1, [input.fields[0]]);
|
|
360
|
+
}
|
|
361
|
+
else {
|
|
362
|
+
return new FSharpResult$2(0, [(_arg = input.fields[0], (details = (new FullProfileCreationDetails(accountId, _arg[0], _arg[4], _arg[5], _arg[1], _arg[2], _arg[6], _arg[7], _arg[3])), new Command$1(new CommandId((copyOfStruct = newGuid(), copyOfStruct)), new ProfileCommand(0, [details]), metadata)))]);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export class ProfileUpdateDto extends Record {
|
|
367
|
+
constructor(Name, Title, Gender, Email, MobilePhone, DateOfBirth, Address) {
|
|
368
|
+
super();
|
|
369
|
+
this.Name = Name;
|
|
370
|
+
this.Title = Title;
|
|
371
|
+
this.Gender = Gender;
|
|
372
|
+
this.Email = Email;
|
|
373
|
+
this.MobilePhone = MobilePhone;
|
|
374
|
+
this.DateOfBirth = DateOfBirth;
|
|
375
|
+
this.Address = Address;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
export function ProfileUpdateDto_$reflection() {
|
|
380
|
+
return record_type("Dto.Api.External.WriteV2.ProfileUpdateDto", [], ProfileUpdateDto, () => [["Name", Name_$reflection()], ["Title", string_type], ["Gender", string_type], ["Email", string_type], ["MobilePhone", string_type], ["DateOfBirth", string_type], ["Address", Address_$reflection()]]);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
function ProfileUpdateDtoModule_toDomainInternal(updateDto) {
|
|
384
|
+
const input_12 = Name_toDomain(updateDto.Name);
|
|
385
|
+
if (input_12.tag === 1) {
|
|
386
|
+
return new FSharpResult$2(1, [input_12.fields[0]]);
|
|
387
|
+
}
|
|
388
|
+
else {
|
|
389
|
+
const input_10 = Email_toDomain(updateDto.Email);
|
|
390
|
+
if (input_10.tag === 1) {
|
|
391
|
+
return new FSharpResult$2(1, [input_10.fields[0]]);
|
|
392
|
+
}
|
|
393
|
+
else {
|
|
394
|
+
const input_8 = MobilePhone_toDomain(updateDto.MobilePhone);
|
|
395
|
+
if (input_8.tag === 1) {
|
|
396
|
+
return new FSharpResult$2(1, [input_8.fields[0]]);
|
|
397
|
+
}
|
|
398
|
+
else {
|
|
399
|
+
const input_6 = Title_toDomain(updateDto.Title);
|
|
400
|
+
if (input_6.tag === 1) {
|
|
401
|
+
return new FSharpResult$2(1, [input_6.fields[0]]);
|
|
402
|
+
}
|
|
403
|
+
else {
|
|
404
|
+
const input_4 = Gender_toDomain(updateDto.Gender);
|
|
405
|
+
if (input_4.tag === 1) {
|
|
406
|
+
return new FSharpResult$2(1, [input_4.fields[0]]);
|
|
407
|
+
}
|
|
408
|
+
else {
|
|
409
|
+
const input_2 = DateOfBirth_toDomain(updateDto.DateOfBirth);
|
|
410
|
+
if (input_2.tag === 1) {
|
|
411
|
+
return new FSharpResult$2(1, [input_2.fields[0]]);
|
|
412
|
+
}
|
|
413
|
+
else {
|
|
414
|
+
const input = Address_toDomain(updateDto.Address);
|
|
415
|
+
if (input.tag === 1) {
|
|
416
|
+
return new FSharpResult$2(1, [input.fields[0]]);
|
|
417
|
+
}
|
|
418
|
+
else {
|
|
419
|
+
return new FSharpResult$2(0, [[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]]]);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
export function ProfileUpdateDtoModule_toProfileDetail(accountId, metadata, externalId, emergencyContacts, profileUpdateDto) {
|
|
430
|
+
let _arg;
|
|
431
|
+
const input = ProfileUpdateDtoModule_toDomainInternal(profileUpdateDto);
|
|
432
|
+
if (input.tag === 1) {
|
|
433
|
+
return new FSharpResult$2(1, [input.fields[0]]);
|
|
434
|
+
}
|
|
435
|
+
else {
|
|
436
|
+
return new FSharpResult$2(0, [(_arg = input.fields[0], new ProfileDetail(metadata, accountId, _arg[0], _arg[3], _arg[4], _arg[1], _arg[2], _arg[5], _arg[6], externalId, emergencyContacts))]);
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Record } from "../../../../fable_modules/fable-library-js.4.20.0/Types.js";
|
|
2
|
+
import { record_type, int32_type, option_type, string_type } from "../../../../fable_modules/fable-library-js.4.20.0/Reflection.js";
|
|
3
|
+
import { Name, Name_$reflection } from "../../Primitives.jsx";
|
|
4
|
+
|
|
5
|
+
export class ProfileDto extends Record {
|
|
6
|
+
constructor(State, Name, Email, MobilePhone, Version) {
|
|
7
|
+
super();
|
|
8
|
+
this.State = State;
|
|
9
|
+
this.Name = Name;
|
|
10
|
+
this.Email = Email;
|
|
11
|
+
this.MobilePhone = MobilePhone;
|
|
12
|
+
this.Version = (Version | 0);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function ProfileDto_$reflection() {
|
|
17
|
+
return record_type("Dto.Api.FlareAdminShell.Read.ProfileDto", [], ProfileDto, () => [["State", string_type], ["Name", Name_$reflection()], ["Email", string_type], ["MobilePhone", option_type(string_type)], ["Version", int32_type]]);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function fromProfileAggregate(profile) {
|
|
21
|
+
switch (profile.tag) {
|
|
22
|
+
case 1:
|
|
23
|
+
return new ProfileDto("Inactive", profile.fields[0].Name, profile.fields[0].Email, profile.fields[0].MobilePhone, profile.fields[0].Metadata.Version);
|
|
24
|
+
case 3:
|
|
25
|
+
return new ProfileDto("Partial", profile.fields[0].Name, profile.fields[0].Email, profile.fields[0].MobilePhone, profile.fields[0].Metadata.Version);
|
|
26
|
+
case 4:
|
|
27
|
+
return new ProfileDto("InactivePartial", profile.fields[0].Name, profile.fields[0].Email, profile.fields[0].MobilePhone, profile.fields[0].Metadata.Version);
|
|
28
|
+
case 5:
|
|
29
|
+
return new ProfileDto("Archived", profile.fields[0].Name, profile.fields[0].Email, profile.fields[0].MobilePhone, profile.fields[0].Metadata.Version);
|
|
30
|
+
case 6:
|
|
31
|
+
return new ProfileDto("ArchivedPartial", profile.fields[0].Name, profile.fields[0].Email, profile.fields[0].MobilePhone, profile.fields[0].Metadata.Version);
|
|
32
|
+
case 2:
|
|
33
|
+
return new ProfileDto("Purged", new Name("", undefined, ""), "", undefined, profile.fields[0].Metadata.Version);
|
|
34
|
+
default:
|
|
35
|
+
return new ProfileDto("Active", profile.fields[0].Name, profile.fields[0].Email, profile.fields[0].MobilePhone, profile.fields[0].Metadata.Version);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|