@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.
- package/dist/assets/delete.dcc7b157.svg +5 -0
- package/dist/assets/dialog-warning.cc77f3ba.svg +5 -0
- package/dist/assets/pencil.05fe6be6.svg +5 -0
- package/dist/index.html +20 -0
- package/dist/superhero-basic-profile.js +50 -0
- package/package.json +1 -1
- package/dist/App.jsx +0 -4
- package/dist/Basic.Profile.Domain/AnalyticsEvent.jsx +0 -102
- package/dist/Basic.Profile.Domain/Audit.jsx +0 -149
- package/dist/Basic.Profile.Domain/Commands.jsx +0 -68
- package/dist/Basic.Profile.Domain/CommonTypes.jsx +0 -194
- package/dist/Basic.Profile.Domain/Config/Api/Admin/Read.jsx +0 -58
- package/dist/Basic.Profile.Domain/Config/Api/Admin/Write.jsx +0 -23
- package/dist/Basic.Profile.Domain/Config/Api/FlareAdminShell/Read.jsx +0 -35
- package/dist/Basic.Profile.Domain/Config/Commands.jsx +0 -72
- package/dist/Basic.Profile.Domain/Config/ConfigCommandHandler.jsx +0 -197
- package/dist/Basic.Profile.Domain/Config/Dto.jsx +0 -181
- package/dist/Basic.Profile.Domain/Config/Types.jsx +0 -152
- package/dist/Basic.Profile.Domain/DateTimeProvider.jsx +0 -23
- package/dist/Basic.Profile.Domain/DomainAggregates.jsx +0 -801
- package/dist/Basic.Profile.Domain/DomainPrimitives.jsx +0 -426
- package/dist/Basic.Profile.Domain/Dto/Aggregates.jsx +0 -564
- package/dist/Basic.Profile.Domain/Dto/AnalyticsEvent.jsx +0 -157
- package/dist/Basic.Profile.Domain/Dto/Api/Backend/Common.jsx +0 -102
- package/dist/Basic.Profile.Domain/Dto/Api/Backend/Read.jsx +0 -85
- package/dist/Basic.Profile.Domain/Dto/Api/Backend/Write.jsx +0 -16
- package/dist/Basic.Profile.Domain/Dto/Api/Common.jsx +0 -427
- package/dist/Basic.Profile.Domain/Dto/Api/External/Read.jsx +0 -118
- package/dist/Basic.Profile.Domain/Dto/Api/External/ReadV2.jsx +0 -6
- package/dist/Basic.Profile.Domain/Dto/Api/External/Write.jsx +0 -184
- package/dist/Basic.Profile.Domain/Dto/Api/External/WriteV2.jsx +0 -439
- package/dist/Basic.Profile.Domain/Dto/Api/FlareAdminShell/Read.jsx +0 -38
- package/dist/Basic.Profile.Domain/Dto/Api/FlareAdminShell/Write.jsx +0 -199
- package/dist/Basic.Profile.Domain/Dto/Api/Internal/Read.jsx +0 -125
- package/dist/Basic.Profile.Domain/Dto/Audit.jsx +0 -121
- package/dist/Basic.Profile.Domain/Dto/Commands.jsx +0 -256
- package/dist/Basic.Profile.Domain/Dto/Common.jsx +0 -84
- package/dist/Basic.Profile.Domain/Dto/Events.jsx +0 -220
- package/dist/Basic.Profile.Domain/Dto/Primitives.jsx +0 -580
- package/dist/Basic.Profile.Domain/Dto/ProfileCreationModels.jsx +0 -324
- package/dist/Basic.Profile.Domain/Dto/Validation.jsx +0 -229
- package/dist/Basic.Profile.Domain/Events.jsx +0 -64
- package/dist/Basic.Profile.Domain/Import/Api/InternalApi/Read.jsx +0 -140
- package/dist/Basic.Profile.Domain/Import/Api/InternalApi/Validation.jsx +0 -499
- package/dist/Basic.Profile.Domain/Import/Api/InternalApi/Write.jsx +0 -51
- package/dist/Basic.Profile.Domain/Import/Api/Read.jsx +0 -154
- package/dist/Basic.Profile.Domain/Import/CommonTypes.jsx +0 -187
- package/dist/Basic.Profile.Domain/Import/Dto.jsx +0 -475
- package/dist/Basic.Profile.Domain/Import/ImportCommandHandler.jsx +0 -531
- package/dist/Basic.Profile.Domain/Import/Types.jsx +0 -405
- package/dist/Basic.Profile.Domain/JwtPayload.jsx +0 -44
- package/dist/Basic.Profile.Domain/Metadata.jsx +0 -257
- package/dist/Basic.Profile.Domain/ProfileCommandHandler.jsx +0 -261
- package/dist/Basic.Profile.Domain/ProfileModels.jsx +0 -59
- package/dist/Basic.Profile.Domain/Utils.jsx +0 -372
- package/dist/Common/PreactCustomElement.jsx +0 -8
- package/dist/Common/Resources.jsx +0 -20
- package/dist/Common/Tailwind.jsx +0 -8
- package/dist/Common/Utils.jsx +0 -18
- package/dist/Directory/App.jsx +0 -192
- package/dist/Directory/BackendServices/Common.jsx +0 -115
- package/dist/Directory/BackendServices/ConfigService.jsx +0 -168
- package/dist/Directory/BackendServices/ImportService.jsx +0 -137
- package/dist/Directory/Common.jsx +0 -93
- package/dist/Directory/Config/Components.jsx +0 -173
- package/dist/Directory/Config/Types.jsx +0 -187
- package/dist/Directory/PastImports/PastImports.jsx +0 -81
- package/dist/Directory/ProfileImport/ProfileImport.jsx +0 -284
- package/dist/Directory/ProfileImport/Types.jsx +0 -91
- package/dist/Directory/TabNav.jsx +0 -24
- package/dist/Directory/Types.jsx +0 -101
- package/dist/Directory/User.jsx +0 -117
- package/dist/HeadlessUI/Dialog.jsx +0 -66
- package/dist/HeadlessUI/ModalDialog.jsx +0 -74
- package/dist/HeadlessUI/Switch.jsx +0 -66
- package/dist/HeadlessUI/Transition.jsx +0 -66
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import { Record, Union } from "../../../../fable_modules/fable-library-js.4.20.0/Types.js";
|
|
2
|
-
import { class_type, anonRecord_type, record_type, bool_type, option_type, union_type, list_type, string_type, int32_type } from "../../../../fable_modules/fable-library-js.4.20.0/Reflection.js";
|
|
3
|
-
import { singleton, empty, ofArray } from "../../../../fable_modules/fable-library-js.4.20.0/List.js";
|
|
4
|
-
import { UnusedDto_$reflection } from "../../../Dto/Primitives.jsx";
|
|
5
|
-
|
|
6
|
-
export class ValidationRule extends Union {
|
|
7
|
-
constructor(tag, fields) {
|
|
8
|
-
super();
|
|
9
|
-
this.tag = tag;
|
|
10
|
-
this.fields = fields;
|
|
11
|
-
}
|
|
12
|
-
cases() {
|
|
13
|
-
return ["MaxLength", "Pattern", "AllowedValues"];
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export function ValidationRule_$reflection() {
|
|
18
|
-
return union_type("Basic.Profile.Domain.Import.Api.InternalApi.Read.ValidationRule", [], ValidationRule, () => [[["Item", int32_type]], [["Item", string_type]], [["Item", list_type(string_type)]]]);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export class ColumnDefinitionDto extends Record {
|
|
22
|
-
constructor(DisplayName, PropName, Description, Required, ValidationRules) {
|
|
23
|
-
super();
|
|
24
|
-
this.DisplayName = DisplayName;
|
|
25
|
-
this.PropName = PropName;
|
|
26
|
-
this.Description = Description;
|
|
27
|
-
this.Required = Required;
|
|
28
|
-
this.ValidationRules = ValidationRules;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export function ColumnDefinitionDto_$reflection() {
|
|
33
|
-
return record_type("Basic.Profile.Domain.Import.Api.InternalApi.Read.ColumnDefinitionDto", [], ColumnDefinitionDto, () => [["DisplayName", string_type], ["PropName", string_type], ["Description", option_type(string_type)], ["Required", bool_type], ["ValidationRules", list_type(ValidationRule_$reflection())]]);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export class ImportSchemaDto extends Record {
|
|
37
|
-
constructor(ColumnsInfo) {
|
|
38
|
-
super();
|
|
39
|
-
this.ColumnsInfo = ColumnsInfo;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export function ImportSchemaDto_$reflection() {
|
|
44
|
-
return record_type("Basic.Profile.Domain.Import.Api.InternalApi.Read.ImportSchemaDto", [], ImportSchemaDto, () => [["ColumnsInfo", list_type(ColumnDefinitionDto_$reflection())]]);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export const ImportSchemaDtoModule_Default = new ImportSchemaDto(ofArray([new ColumnDefinitionDto("First Name", "firstName", undefined, true, ofArray([new ValidationRule(0, [60]), new ValidationRule(1, ["(^[A-Za-zÀ-ÖØ-öø-ÿĀ-ž])[A-Za-zÀ-ÖØ-öø-ÿĀ-ž\\- \']{0,59}$"])])), new ColumnDefinitionDto("Middle Name", "middleName", undefined, false, ofArray([new ValidationRule(0, [60]), new ValidationRule(1, ["(^[A-Za-zÀ-ÖØ-öø-ÿĀ-ž])[A-Za-zÀ-ÖØ-öø-ÿĀ-ž\\- \']{0,59}$"])])), new ColumnDefinitionDto("Last Name", "lastName", undefined, true, ofArray([new ValidationRule(0, [60]), new ValidationRule(1, ["(^[A-Za-zÀ-ÖØ-öø-ÿĀ-ž])[A-Za-zÀ-ÖØ-öø-ÿĀ-ž\\- \']{0,59}$"])])), new ColumnDefinitionDto("External ID", "externalId", "An optional value referencing this profile in another system", false, empty()), new ColumnDefinitionDto("Title", "title", undefined, false, singleton(new ValidationRule(2, [ofArray(["Mr", "Miss", "Mrs", "Ms", "Dr", "Prof", "Mx"])]))), new ColumnDefinitionDto("Gender", "gender", undefined, false, singleton(new ValidationRule(2, [ofArray(["Male", "Female", "Intersex", "Transgender", "PreferNotToAnswer", "Other", "NotSet"])]))), new ColumnDefinitionDto("Email", "email", undefined, true, ofArray([new ValidationRule(0, [320]), new ValidationRule(1, ["^[A-Z0-9][A-Z0-9._%+\'-]{0,63}@(?:[A-Z0-9-]{1,63}\\.){1,125}[A-Z]{2,63}$"])])), new ColumnDefinitionDto("Mobile Number", "mobileNumber", "Countrycode required, Mobile numbers should be in international format (e.g. +61), with the leading 0 dropped", false, singleton(new ValidationRule(0, [12]))), new ColumnDefinitionDto("DoB", "dateOfBirth", "All profile users must be at least 13 and under 100 years of age, example: 1990-12-20", false, empty()), new ColumnDefinitionDto("Address Line 1", "addressLine1", undefined, false, ofArray([new ValidationRule(0, [60]), new ValidationRule(1, ["(^[0-9A-Za-z])[0-9A-Za-z\\- \'\\/,\\.]{0,59}$"])])), new ColumnDefinitionDto("Address Line 2", "addressLine2", undefined, false, ofArray([new ValidationRule(0, [60]), new ValidationRule(1, ["(^[0-9A-Za-z])[0-9A-Za-z\\- \'\\/,\\.]{0,59}$"])])), new ColumnDefinitionDto("City", "city", undefined, false, singleton(new ValidationRule(1, ["(^[A-Za-z])[A-Za-z\\- ]{0,59}$"]))), new ColumnDefinitionDto("State", "state", undefined, false, singleton(new ValidationRule(2, [ofArray(["NSW", "QLD", "WA", "SA", "NT", "VIC", "TAS", "ACT"])]))), new ColumnDefinitionDto("PostCode", "postCode", undefined, false, ofArray([new ValidationRule(0, [4]), new ValidationRule(1, ["^[0-9]{1,4}$"])])), new ColumnDefinitionDto("CountryCode", "countryCode", "Example: AU", false, singleton(new ValidationRule(0, [4])))]));
|
|
48
|
-
|
|
49
|
-
export class FieldErrorDto extends Record {
|
|
50
|
-
constructor(Column, Message) {
|
|
51
|
-
super();
|
|
52
|
-
this.Column = Column;
|
|
53
|
-
this.Message = Message;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export function FieldErrorDto_$reflection() {
|
|
58
|
-
return record_type("Basic.Profile.Domain.Import.Api.InternalApi.Read.FieldErrorDto", [], FieldErrorDto, () => [["Column", string_type], ["Message", string_type]]);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export class RowValidationErrorDto extends Record {
|
|
62
|
-
constructor(RowId, FieldErrors) {
|
|
63
|
-
super();
|
|
64
|
-
this.RowId = (RowId | 0);
|
|
65
|
-
this.FieldErrors = FieldErrors;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export function RowValidationErrorDto_$reflection() {
|
|
70
|
-
return record_type("Basic.Profile.Domain.Import.Api.InternalApi.Read.RowValidationErrorDto", [], RowValidationErrorDto, () => [["RowId", int32_type], ["FieldErrors", list_type(FieldErrorDto_$reflection())]]);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export class ImportValidationErrorDto extends Union {
|
|
74
|
-
constructor(tag, fields) {
|
|
75
|
-
super();
|
|
76
|
-
this.tag = tag;
|
|
77
|
-
this.fields = fields;
|
|
78
|
-
}
|
|
79
|
-
cases() {
|
|
80
|
-
return ["BadRequestPayload", "ExceedsMaxRows", "NoData", "DuplicateRowId", "RowValidationErrors"];
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export function ImportValidationErrorDto_$reflection() {
|
|
85
|
-
return union_type("Basic.Profile.Domain.Import.Api.InternalApi.Read.ImportValidationErrorDto", [], ImportValidationErrorDto, () => [[["Item", UnusedDto_$reflection()]], [["Item", UnusedDto_$reflection()]], [["Item", UnusedDto_$reflection()]], [["Item", UnusedDto_$reflection()]], [["Item", anonRecord_type(["Errors", list_type(RowValidationErrorDto_$reflection())])]]]);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export class StartImportErrorDto extends Union {
|
|
89
|
-
constructor(tag, fields) {
|
|
90
|
-
super();
|
|
91
|
-
this.tag = tag;
|
|
92
|
-
this.fields = fields;
|
|
93
|
-
}
|
|
94
|
-
cases() {
|
|
95
|
-
return ["ImportInProgress", "ValidationError"];
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export function StartImportErrorDto_$reflection() {
|
|
100
|
-
return union_type("Basic.Profile.Domain.Import.Api.InternalApi.Read.StartImportErrorDto", [], StartImportErrorDto, () => [[["Item", UnusedDto_$reflection()]], [["Item", anonRecord_type(["Error", ImportValidationErrorDto_$reflection()])]]]);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export class ProgressInfoDto extends Union {
|
|
104
|
-
constructor(tag, fields) {
|
|
105
|
-
super();
|
|
106
|
-
this.tag = tag;
|
|
107
|
-
this.fields = fields;
|
|
108
|
-
}
|
|
109
|
-
cases() {
|
|
110
|
-
return ["InProgress", "Done"];
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export function ProgressInfoDto_$reflection() {
|
|
115
|
-
return union_type("Basic.Profile.Domain.Import.Api.InternalApi.Read.ProgressInfoDto", [], ProgressInfoDto, () => [[["Item", anonRecord_type(["FailedRowCount", int32_type], ["ImportId", int32_type], ["RemainingRowCount", int32_type], ["StartTime", class_type("System.DateTime")], ["SucceededRowCount", int32_type], ["TotalRowCount", int32_type])]], [["Item", anonRecord_type(["FailedRowCount", int32_type], ["FailedRows", list_type(anonRecord_type(["Reason", string_type], ["RowId", int32_type]))], ["ImportId", int32_type], ["RemainingRowCount", int32_type], ["StartTime", class_type("System.DateTime")], ["StopTime", class_type("System.DateTime")], ["SucceededRowCount", int32_type], ["TotalRowCount", int32_type])]]]);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export class ProfileRowMappingDto extends Record {
|
|
119
|
-
constructor(RowId, ProfileId) {
|
|
120
|
-
super();
|
|
121
|
-
this.RowId = (RowId | 0);
|
|
122
|
-
this.ProfileId = ProfileId;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export function ProfileRowMappingDto_$reflection() {
|
|
127
|
-
return record_type("Basic.Profile.Domain.Import.Api.InternalApi.Read.ProfileRowMappingDto", [], ProfileRowMappingDto, () => [["RowId", int32_type], ["ProfileId", string_type]]);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
export class ProfileRowMappingDataDto extends Record {
|
|
131
|
-
constructor(Data) {
|
|
132
|
-
super();
|
|
133
|
-
this.Data = Data;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export function ProfileRowMappingDataDto_$reflection() {
|
|
138
|
-
return record_type("Basic.Profile.Domain.Import.Api.InternalApi.Read.ProfileRowMappingDataDto", [], ProfileRowMappingDataDto, () => [["Data", list_type(ProfileRowMappingDto_$reflection())]]);
|
|
139
|
-
}
|
|
140
|
-
|
|
@@ -1,499 +0,0 @@
|
|
|
1
|
-
import { RowValidationErrorDto, ImportValidationErrorDto, FieldErrorDto } from "./Read.jsx";
|
|
2
|
-
import { FSharpResult$2 } from "../../../../fable_modules/fable-library-js.4.20.0/Result.js";
|
|
3
|
-
import { Validation_toErrorMessage } from "../../../Dto/Api/Common.jsx";
|
|
4
|
-
import { Validate_dateOfBirthStrAgeNow, Validate_gender, Validate_title, Validate_mobilePhone, Validate_email, Validate_optionalName, Validate_name, Validate_state, Validate_postcode, Validate_countryCode, Validate_city, Validate_addressLine, ValidationNotPassed } from "../../../Dto/Validation.jsx";
|
|
5
|
-
import { value as value_16, some } from "../../../../fable_modules/fable-library-js.4.20.0/Option.js";
|
|
6
|
-
import { tryFind, map, ofArray, filter, length, append, singleton } from "../../../../fable_modules/fable-library-js.4.20.0/List.js";
|
|
7
|
-
import { ValidatedImportDataDto, ValidatedImportRowDataDto, ValidatedImportProfileDataDto, ValidatedImportAddressDto } from "../../Dto.jsx";
|
|
8
|
-
import { ExternalId_toDomain, UnusedDtoModule_Default } from "../../../Dto/Primitives.jsx";
|
|
9
|
-
import { List_distinctBy } from "../../../../fable_modules/fable-library-js.4.20.0/Seq2.js";
|
|
10
|
-
import { equals, numberHash } from "../../../../fable_modules/fable-library-js.4.20.0/Util.js";
|
|
11
|
-
import { sequenceResultA } from "../../../../fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js";
|
|
12
|
-
|
|
13
|
-
function Result_toFieldError(fieldName, result) {
|
|
14
|
-
const input_1 = result;
|
|
15
|
-
if (input_1.tag === 1) {
|
|
16
|
-
return new FSharpResult$2(1, [new FieldErrorDto(fieldName, input_1.fields[0])]);
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
return new FSharpResult$2(0, [input_1.fields[0]]);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function validateField(field, fieldName, validateFn) {
|
|
24
|
-
let input_1;
|
|
25
|
-
return Result_toFieldError(fieldName, (input_1 = validateFn(field), (input_1.tag === 1) ? (new FSharpResult$2(1, [Validation_toErrorMessage(fieldName, input_1.fields[0])])) : (new FSharpResult$2(0, [input_1.fields[0]]))));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function validateRequiredField(field, fieldName, validateFn) {
|
|
29
|
-
let input_4, input_2, option_1, value, input;
|
|
30
|
-
return Result_toFieldError(fieldName, (input_4 = ((input_2 = ((option_1 = field, (option_1 == null) ? (new FSharpResult$2(1, [new ValidationNotPassed(0, [])])) : (new FSharpResult$2(0, [option_1])))), (input_2.tag === 1) ? (new FSharpResult$2(1, [input_2.fields[0]])) : ((value = input_2.fields[0], (input = validateFn(value), (input.tag === 1) ? (new FSharpResult$2(1, [input.fields[0]])) : (new FSharpResult$2(0, [value]))))))), (input_4.tag === 1) ? (new FSharpResult$2(1, [Validation_toErrorMessage(fieldName, input_4.fields[0])])) : (new FSharpResult$2(0, [input_4.fields[0]]))));
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function validateAddress(row) {
|
|
34
|
-
let _arg_1;
|
|
35
|
-
let input_33;
|
|
36
|
-
let left_8;
|
|
37
|
-
const input_3 = validateField(row.AddressLine1, "AddressLine1", (input) => {
|
|
38
|
-
const input_1 = input;
|
|
39
|
-
if (input_1 != null) {
|
|
40
|
-
const input_2 = Validate_addressLine(input_1);
|
|
41
|
-
return (input_2.tag === 1) ? (new FSharpResult$2(1, [input_2.fields[0]])) : (new FSharpResult$2(0, [some(input_2.fields[0])]));
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
return new FSharpResult$2(0, [undefined]);
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
left_8 = ((input_3.tag === 1) ? (new FSharpResult$2(1, [singleton(input_3.fields[0])])) : (new FSharpResult$2(0, [input_3.fields[0]])));
|
|
48
|
-
let right_9;
|
|
49
|
-
let left_6;
|
|
50
|
-
const input_7 = validateField(row.AddressLine2, "AddressLine2", (input_4) => {
|
|
51
|
-
const input_5 = input_4;
|
|
52
|
-
if (input_5 != null) {
|
|
53
|
-
const input_6 = Validate_addressLine(input_5);
|
|
54
|
-
return (input_6.tag === 1) ? (new FSharpResult$2(1, [input_6.fields[0]])) : (new FSharpResult$2(0, [some(input_6.fields[0])]));
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
return new FSharpResult$2(0, [undefined]);
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
left_6 = ((input_7.tag === 1) ? (new FSharpResult$2(1, [singleton(input_7.fields[0])])) : (new FSharpResult$2(0, [input_7.fields[0]])));
|
|
61
|
-
let right_7;
|
|
62
|
-
let left_4;
|
|
63
|
-
const input_11 = validateField(row.City, "City", (input_8) => {
|
|
64
|
-
const input_9 = input_8;
|
|
65
|
-
if (input_9 != null) {
|
|
66
|
-
const input_10 = Validate_city(input_9);
|
|
67
|
-
return (input_10.tag === 1) ? (new FSharpResult$2(1, [input_10.fields[0]])) : (new FSharpResult$2(0, [some(input_10.fields[0])]));
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
return new FSharpResult$2(0, [undefined]);
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
left_4 = ((input_11.tag === 1) ? (new FSharpResult$2(1, [singleton(input_11.fields[0])])) : (new FSharpResult$2(0, [input_11.fields[0]])));
|
|
74
|
-
let right_5;
|
|
75
|
-
let left_2;
|
|
76
|
-
const input_15 = validateField(row.CountryCode, "CountryCode", (input_12) => {
|
|
77
|
-
const input_13 = input_12;
|
|
78
|
-
if (input_13 != null) {
|
|
79
|
-
const input_14 = Validate_countryCode(input_13);
|
|
80
|
-
return (input_14.tag === 1) ? (new FSharpResult$2(1, [input_14.fields[0]])) : (new FSharpResult$2(0, [some(input_14.fields[0])]));
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
return new FSharpResult$2(0, [undefined]);
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
left_2 = ((input_15.tag === 1) ? (new FSharpResult$2(1, [singleton(input_15.fields[0])])) : (new FSharpResult$2(0, [input_15.fields[0]])));
|
|
87
|
-
let right_3;
|
|
88
|
-
let left;
|
|
89
|
-
const input_19 = validateField(row.Postcode, "Postcode", (input_16) => {
|
|
90
|
-
const input_17 = input_16;
|
|
91
|
-
if (input_17 != null) {
|
|
92
|
-
const input_18 = Validate_postcode(input_17);
|
|
93
|
-
return (input_18.tag === 1) ? (new FSharpResult$2(1, [input_18.fields[0]])) : (new FSharpResult$2(0, [some(input_18.fields[0])]));
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
return new FSharpResult$2(0, [undefined]);
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
left = ((input_19.tag === 1) ? (new FSharpResult$2(1, [singleton(input_19.fields[0])])) : (new FSharpResult$2(0, [input_19.fields[0]])));
|
|
100
|
-
let right_1;
|
|
101
|
-
const input_23 = validateField(row.State, "State", (input_20) => {
|
|
102
|
-
const input_21 = input_20;
|
|
103
|
-
if (input_21 != null) {
|
|
104
|
-
const input_22 = Validate_state(input_21);
|
|
105
|
-
return (input_22.tag === 1) ? (new FSharpResult$2(1, [input_22.fields[0]])) : (new FSharpResult$2(0, [some(input_22.fields[0])]));
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
return new FSharpResult$2(0, [undefined]);
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
right_1 = ((input_23.tag === 1) ? (new FSharpResult$2(1, [singleton(input_23.fields[0])])) : (new FSharpResult$2(0, [input_23.fields[0]])));
|
|
112
|
-
const copyOfStruct = left;
|
|
113
|
-
if (copyOfStruct.tag === 1) {
|
|
114
|
-
const copyOfStruct_1 = right_1;
|
|
115
|
-
right_3 = ((copyOfStruct_1.tag === 1) ? (new FSharpResult$2(1, [append(copyOfStruct.fields[0], copyOfStruct_1.fields[0])])) : (new FSharpResult$2(1, [copyOfStruct.fields[0]])));
|
|
116
|
-
}
|
|
117
|
-
else {
|
|
118
|
-
const copyOfStruct_2 = right_1;
|
|
119
|
-
right_3 = ((copyOfStruct_2.tag === 1) ? (new FSharpResult$2(1, [copyOfStruct_2.fields[0]])) : (new FSharpResult$2(0, [[copyOfStruct.fields[0], copyOfStruct_2.fields[0]]])));
|
|
120
|
-
}
|
|
121
|
-
const copyOfStruct_3 = left_2;
|
|
122
|
-
if (copyOfStruct_3.tag === 1) {
|
|
123
|
-
const copyOfStruct_1_1 = right_3;
|
|
124
|
-
right_5 = ((copyOfStruct_1_1.tag === 1) ? (new FSharpResult$2(1, [append(copyOfStruct_3.fields[0], copyOfStruct_1_1.fields[0])])) : (new FSharpResult$2(1, [copyOfStruct_3.fields[0]])));
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
const copyOfStruct_2_1 = right_3;
|
|
128
|
-
right_5 = ((copyOfStruct_2_1.tag === 1) ? (new FSharpResult$2(1, [copyOfStruct_2_1.fields[0]])) : (new FSharpResult$2(0, [[copyOfStruct_3.fields[0], copyOfStruct_2_1.fields[0]]])));
|
|
129
|
-
}
|
|
130
|
-
const copyOfStruct_4 = left_4;
|
|
131
|
-
if (copyOfStruct_4.tag === 1) {
|
|
132
|
-
const copyOfStruct_1_2 = right_5;
|
|
133
|
-
right_7 = ((copyOfStruct_1_2.tag === 1) ? (new FSharpResult$2(1, [append(copyOfStruct_4.fields[0], copyOfStruct_1_2.fields[0])])) : (new FSharpResult$2(1, [copyOfStruct_4.fields[0]])));
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
const copyOfStruct_2_2 = right_5;
|
|
137
|
-
right_7 = ((copyOfStruct_2_2.tag === 1) ? (new FSharpResult$2(1, [copyOfStruct_2_2.fields[0]])) : (new FSharpResult$2(0, [[copyOfStruct_4.fields[0], copyOfStruct_2_2.fields[0]]])));
|
|
138
|
-
}
|
|
139
|
-
const copyOfStruct_5 = left_6;
|
|
140
|
-
if (copyOfStruct_5.tag === 1) {
|
|
141
|
-
const copyOfStruct_1_3 = right_7;
|
|
142
|
-
right_9 = ((copyOfStruct_1_3.tag === 1) ? (new FSharpResult$2(1, [append(copyOfStruct_5.fields[0], copyOfStruct_1_3.fields[0])])) : (new FSharpResult$2(1, [copyOfStruct_5.fields[0]])));
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
const copyOfStruct_2_3 = right_7;
|
|
146
|
-
right_9 = ((copyOfStruct_2_3.tag === 1) ? (new FSharpResult$2(1, [copyOfStruct_2_3.fields[0]])) : (new FSharpResult$2(0, [[copyOfStruct_5.fields[0], copyOfStruct_2_3.fields[0]]])));
|
|
147
|
-
}
|
|
148
|
-
const copyOfStruct_6 = left_8;
|
|
149
|
-
if (copyOfStruct_6.tag === 1) {
|
|
150
|
-
const copyOfStruct_1_4 = right_9;
|
|
151
|
-
input_33 = ((copyOfStruct_1_4.tag === 1) ? (new FSharpResult$2(1, [append(copyOfStruct_6.fields[0], copyOfStruct_1_4.fields[0])])) : (new FSharpResult$2(1, [copyOfStruct_6.fields[0]])));
|
|
152
|
-
}
|
|
153
|
-
else {
|
|
154
|
-
const copyOfStruct_2_4 = right_9;
|
|
155
|
-
input_33 = ((copyOfStruct_2_4.tag === 1) ? (new FSharpResult$2(1, [copyOfStruct_2_4.fields[0]])) : (new FSharpResult$2(0, [[copyOfStruct_6.fields[0], copyOfStruct_2_4.fields[0]]])));
|
|
156
|
-
}
|
|
157
|
-
if (input_33.tag === 1) {
|
|
158
|
-
return new FSharpResult$2(1, [input_33.fields[0]]);
|
|
159
|
-
}
|
|
160
|
-
else {
|
|
161
|
-
const _arg = input_33.fields[0];
|
|
162
|
-
if (length(filter((option) => (option != null), ofArray([_arg[0], _arg[1][0], _arg[1][1][0], _arg[1][1][1][0], _arg[1][1][1][1][0], _arg[1][1][1][1][1]]))) === 0) {
|
|
163
|
-
return new FSharpResult$2(0, [undefined]);
|
|
164
|
-
}
|
|
165
|
-
else {
|
|
166
|
-
const require = (field, fieldName) => {
|
|
167
|
-
const error = new FieldErrorDto(fieldName, `${fieldName} is required`);
|
|
168
|
-
const option_2 = field;
|
|
169
|
-
if (option_2 == null) {
|
|
170
|
-
return new FSharpResult$2(1, [error]);
|
|
171
|
-
}
|
|
172
|
-
else {
|
|
173
|
-
return new FSharpResult$2(0, [value_16(option_2)]);
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
let input_31;
|
|
177
|
-
let left_16;
|
|
178
|
-
const input_24 = require(row.AddressLine1, "AddressLine1");
|
|
179
|
-
left_16 = ((input_24.tag === 1) ? (new FSharpResult$2(1, [singleton(input_24.fields[0])])) : (new FSharpResult$2(0, [input_24.fields[0]])));
|
|
180
|
-
let right_17;
|
|
181
|
-
let left_14;
|
|
182
|
-
const input_25 = require(row.City, "City");
|
|
183
|
-
left_14 = ((input_25.tag === 1) ? (new FSharpResult$2(1, [singleton(input_25.fields[0])])) : (new FSharpResult$2(0, [input_25.fields[0]])));
|
|
184
|
-
let right_15;
|
|
185
|
-
let left_12;
|
|
186
|
-
const input_26 = require(row.CountryCode, "CountryCode");
|
|
187
|
-
left_12 = ((input_26.tag === 1) ? (new FSharpResult$2(1, [singleton(input_26.fields[0])])) : (new FSharpResult$2(0, [input_26.fields[0]])));
|
|
188
|
-
let right_13;
|
|
189
|
-
let left_10;
|
|
190
|
-
const input_27 = require(row.Postcode, "Postcode");
|
|
191
|
-
left_10 = ((input_27.tag === 1) ? (new FSharpResult$2(1, [singleton(input_27.fields[0])])) : (new FSharpResult$2(0, [input_27.fields[0]])));
|
|
192
|
-
let right_11;
|
|
193
|
-
const input_28 = require(row.State, "State");
|
|
194
|
-
right_11 = ((input_28.tag === 1) ? (new FSharpResult$2(1, [singleton(input_28.fields[0])])) : (new FSharpResult$2(0, [input_28.fields[0]])));
|
|
195
|
-
const copyOfStruct_7 = left_10;
|
|
196
|
-
if (copyOfStruct_7.tag === 1) {
|
|
197
|
-
const copyOfStruct_1_5 = right_11;
|
|
198
|
-
right_13 = ((copyOfStruct_1_5.tag === 1) ? (new FSharpResult$2(1, [append(copyOfStruct_7.fields[0], copyOfStruct_1_5.fields[0])])) : (new FSharpResult$2(1, [copyOfStruct_7.fields[0]])));
|
|
199
|
-
}
|
|
200
|
-
else {
|
|
201
|
-
const copyOfStruct_2_5 = right_11;
|
|
202
|
-
right_13 = ((copyOfStruct_2_5.tag === 1) ? (new FSharpResult$2(1, [copyOfStruct_2_5.fields[0]])) : (new FSharpResult$2(0, [[copyOfStruct_7.fields[0], copyOfStruct_2_5.fields[0]]])));
|
|
203
|
-
}
|
|
204
|
-
const copyOfStruct_8 = left_12;
|
|
205
|
-
if (copyOfStruct_8.tag === 1) {
|
|
206
|
-
const copyOfStruct_1_6 = right_13;
|
|
207
|
-
right_15 = ((copyOfStruct_1_6.tag === 1) ? (new FSharpResult$2(1, [append(copyOfStruct_8.fields[0], copyOfStruct_1_6.fields[0])])) : (new FSharpResult$2(1, [copyOfStruct_8.fields[0]])));
|
|
208
|
-
}
|
|
209
|
-
else {
|
|
210
|
-
const copyOfStruct_2_6 = right_13;
|
|
211
|
-
right_15 = ((copyOfStruct_2_6.tag === 1) ? (new FSharpResult$2(1, [copyOfStruct_2_6.fields[0]])) : (new FSharpResult$2(0, [[copyOfStruct_8.fields[0], copyOfStruct_2_6.fields[0]]])));
|
|
212
|
-
}
|
|
213
|
-
const copyOfStruct_9 = left_14;
|
|
214
|
-
if (copyOfStruct_9.tag === 1) {
|
|
215
|
-
const copyOfStruct_1_7 = right_15;
|
|
216
|
-
right_17 = ((copyOfStruct_1_7.tag === 1) ? (new FSharpResult$2(1, [append(copyOfStruct_9.fields[0], copyOfStruct_1_7.fields[0])])) : (new FSharpResult$2(1, [copyOfStruct_9.fields[0]])));
|
|
217
|
-
}
|
|
218
|
-
else {
|
|
219
|
-
const copyOfStruct_2_7 = right_15;
|
|
220
|
-
right_17 = ((copyOfStruct_2_7.tag === 1) ? (new FSharpResult$2(1, [copyOfStruct_2_7.fields[0]])) : (new FSharpResult$2(0, [[copyOfStruct_9.fields[0], copyOfStruct_2_7.fields[0]]])));
|
|
221
|
-
}
|
|
222
|
-
const copyOfStruct_10 = left_16;
|
|
223
|
-
if (copyOfStruct_10.tag === 1) {
|
|
224
|
-
const copyOfStruct_1_8 = right_17;
|
|
225
|
-
input_31 = ((copyOfStruct_1_8.tag === 1) ? (new FSharpResult$2(1, [append(copyOfStruct_10.fields[0], copyOfStruct_1_8.fields[0])])) : (new FSharpResult$2(1, [copyOfStruct_10.fields[0]])));
|
|
226
|
-
}
|
|
227
|
-
else {
|
|
228
|
-
const copyOfStruct_2_8 = right_17;
|
|
229
|
-
input_31 = ((copyOfStruct_2_8.tag === 1) ? (new FSharpResult$2(1, [copyOfStruct_2_8.fields[0]])) : (new FSharpResult$2(0, [[copyOfStruct_10.fields[0], copyOfStruct_2_8.fields[0]]])));
|
|
230
|
-
}
|
|
231
|
-
if (input_31.tag === 1) {
|
|
232
|
-
return new FSharpResult$2(1, [input_31.fields[0]]);
|
|
233
|
-
}
|
|
234
|
-
else {
|
|
235
|
-
return new FSharpResult$2(0, [(_arg_1 = input_31.fields[0], new ValidatedImportAddressDto(_arg_1[0], row.AddressLine2, _arg_1[1][0], _arg_1[1][1][1][1], _arg_1[1][1][1][0], _arg_1[1][1][0]))]);
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
export function validate(importData) {
|
|
242
|
-
const data = importData.Data;
|
|
243
|
-
let input_37;
|
|
244
|
-
const input_2 = (length(data) > 0) ? (new FSharpResult$2(0, [undefined])) : (new FSharpResult$2(1, [new ImportValidationErrorDto(2, [UnusedDtoModule_Default])]));
|
|
245
|
-
if (input_2.tag === 1) {
|
|
246
|
-
input_37 = (new FSharpResult$2(1, [input_2.fields[0]]));
|
|
247
|
-
}
|
|
248
|
-
else {
|
|
249
|
-
const input = (length(data) <= 5000) ? (new FSharpResult$2(0, [undefined])) : (new FSharpResult$2(1, [new ImportValidationErrorDto(1, [UnusedDtoModule_Default])]));
|
|
250
|
-
input_37 = ((input.tag === 1) ? (new FSharpResult$2(1, [input.fields[0]])) : (new FSharpResult$2(0, [undefined])));
|
|
251
|
-
}
|
|
252
|
-
if (input_37.tag === 1) {
|
|
253
|
-
return new FSharpResult$2(1, [input_37.fields[0]]);
|
|
254
|
-
}
|
|
255
|
-
else {
|
|
256
|
-
const input_35 = (length(List_distinctBy((item) => item.RowId, data, {
|
|
257
|
-
Equals: (x_3, y) => (x_3 === y),
|
|
258
|
-
GetHashCode: numberHash,
|
|
259
|
-
})) === length(data)) ? (new FSharpResult$2(0, [undefined])) : (new FSharpResult$2(1, [new ImportValidationErrorDto(3, [UnusedDtoModule_Default])]));
|
|
260
|
-
if (input_35.tag === 1) {
|
|
261
|
-
return new FSharpResult$2(1, [input_35.fields[0]]);
|
|
262
|
-
}
|
|
263
|
-
else {
|
|
264
|
-
const matchValue_15 = sequenceResultA(map((item_1) => {
|
|
265
|
-
let input_12, input_13, _arg_4;
|
|
266
|
-
const row = item_1.Data;
|
|
267
|
-
let input_33;
|
|
268
|
-
let input_31;
|
|
269
|
-
let left_20;
|
|
270
|
-
const input_3 = validateRequiredField(row.FirstName, "FirstName", Validate_name);
|
|
271
|
-
left_20 = ((input_3.tag === 1) ? (new FSharpResult$2(1, [singleton(input_3.fields[0])])) : (new FSharpResult$2(0, [input_3.fields[0]])));
|
|
272
|
-
let right_21;
|
|
273
|
-
let left_18;
|
|
274
|
-
const input_4 = validateField(row.MiddleName, "MiddleName", Validate_optionalName);
|
|
275
|
-
left_18 = ((input_4.tag === 1) ? (new FSharpResult$2(1, [singleton(input_4.fields[0])])) : (new FSharpResult$2(0, [input_4.fields[0]])));
|
|
276
|
-
let right_19;
|
|
277
|
-
let left_16;
|
|
278
|
-
const input_5 = validateRequiredField(row.LastName, "LastName", Validate_name);
|
|
279
|
-
left_16 = ((input_5.tag === 1) ? (new FSharpResult$2(1, [singleton(input_5.fields[0])])) : (new FSharpResult$2(0, [input_5.fields[0]])));
|
|
280
|
-
let right_17;
|
|
281
|
-
let left_14;
|
|
282
|
-
const input_6 = validateRequiredField(row.Email, "Email", Validate_email);
|
|
283
|
-
left_14 = ((input_6.tag === 1) ? (new FSharpResult$2(1, [singleton(input_6.fields[0])])) : (new FSharpResult$2(0, [input_6.fields[0]])));
|
|
284
|
-
let right_15;
|
|
285
|
-
let left_12;
|
|
286
|
-
const input_10 = validateField(row.MobileNumber, "MobileNumber", (input_7) => {
|
|
287
|
-
const input_8 = input_7;
|
|
288
|
-
if (input_8 != null) {
|
|
289
|
-
const input_9 = Validate_mobilePhone(input_8);
|
|
290
|
-
return (input_9.tag === 1) ? (new FSharpResult$2(1, [input_9.fields[0]])) : (new FSharpResult$2(0, [some(input_9.fields[0])]));
|
|
291
|
-
}
|
|
292
|
-
else {
|
|
293
|
-
return new FSharpResult$2(0, [undefined]);
|
|
294
|
-
}
|
|
295
|
-
});
|
|
296
|
-
left_12 = ((input_10.tag === 1) ? (new FSharpResult$2(1, [singleton(input_10.fields[0])])) : (new FSharpResult$2(0, [input_10.fields[0]])));
|
|
297
|
-
let right_13;
|
|
298
|
-
let left_10;
|
|
299
|
-
const input_14 = Result_toFieldError("ExternalId", (input_12 = row.ExternalId, (input_12 != null) ? ((input_13 = ExternalId_toDomain(input_12), (input_13.tag === 1) ? (new FSharpResult$2(1, [input_13.fields[0]])) : (new FSharpResult$2(0, [input_13.fields[0]])))) : (new FSharpResult$2(0, [undefined]))));
|
|
300
|
-
left_10 = ((input_14.tag === 1) ? (new FSharpResult$2(1, [singleton(input_14.fields[0])])) : (new FSharpResult$2(0, [input_14.fields[0]])));
|
|
301
|
-
let right_11;
|
|
302
|
-
let left_8;
|
|
303
|
-
const input_18 = validateField(row.Title, "Title", (input_15) => {
|
|
304
|
-
const input_16 = input_15;
|
|
305
|
-
if (input_16 != null) {
|
|
306
|
-
const input_17 = Validate_title(input_16);
|
|
307
|
-
return (input_17.tag === 1) ? (new FSharpResult$2(1, [input_17.fields[0]])) : (new FSharpResult$2(0, [some(input_17.fields[0])]));
|
|
308
|
-
}
|
|
309
|
-
else {
|
|
310
|
-
return new FSharpResult$2(0, [undefined]);
|
|
311
|
-
}
|
|
312
|
-
});
|
|
313
|
-
left_8 = ((input_18.tag === 1) ? (new FSharpResult$2(1, [singleton(input_18.fields[0])])) : (new FSharpResult$2(0, [input_18.fields[0]])));
|
|
314
|
-
let right_9;
|
|
315
|
-
let left_6;
|
|
316
|
-
const input_22 = validateField(row.Gender, "Gender", (input_19) => {
|
|
317
|
-
const input_20 = input_19;
|
|
318
|
-
if (input_20 != null) {
|
|
319
|
-
const input_21 = Validate_gender(input_20);
|
|
320
|
-
return (input_21.tag === 1) ? (new FSharpResult$2(1, [input_21.fields[0]])) : (new FSharpResult$2(0, [some(input_21.fields[0])]));
|
|
321
|
-
}
|
|
322
|
-
else {
|
|
323
|
-
return new FSharpResult$2(0, [undefined]);
|
|
324
|
-
}
|
|
325
|
-
});
|
|
326
|
-
left_6 = ((input_22.tag === 1) ? (new FSharpResult$2(1, [singleton(input_22.fields[0])])) : (new FSharpResult$2(0, [input_22.fields[0]])));
|
|
327
|
-
let right_7;
|
|
328
|
-
let left_4;
|
|
329
|
-
const input_26 = validateField(row.DateOfBirth, "DateOfBirth", (input_23) => {
|
|
330
|
-
const input_24 = input_23;
|
|
331
|
-
if (input_24 != null) {
|
|
332
|
-
const input_25 = Validate_dateOfBirthStrAgeNow(input_24);
|
|
333
|
-
return (input_25.tag === 1) ? (new FSharpResult$2(1, [input_25.fields[0]])) : (new FSharpResult$2(0, [some(input_25.fields[0])]));
|
|
334
|
-
}
|
|
335
|
-
else {
|
|
336
|
-
return new FSharpResult$2(0, [undefined]);
|
|
337
|
-
}
|
|
338
|
-
});
|
|
339
|
-
left_4 = ((input_26.tag === 1) ? (new FSharpResult$2(1, [singleton(input_26.fields[0])])) : (new FSharpResult$2(0, [input_26.fields[0]])));
|
|
340
|
-
let right_5;
|
|
341
|
-
const left_2 = validateAddress(row);
|
|
342
|
-
let right_3;
|
|
343
|
-
let left;
|
|
344
|
-
let input_27;
|
|
345
|
-
const matchValue = row.Email;
|
|
346
|
-
if (matchValue != null) {
|
|
347
|
-
const email = matchValue;
|
|
348
|
-
const matchValue_1 = tryFind((item$0027) => {
|
|
349
|
-
if (!equals(item$0027, item_1)) {
|
|
350
|
-
return equals(item$0027.Data.Email, email);
|
|
351
|
-
}
|
|
352
|
-
else {
|
|
353
|
-
return false;
|
|
354
|
-
}
|
|
355
|
-
}, data);
|
|
356
|
-
input_27 = ((matchValue_1 != null) ? (new FSharpResult$2(1, [new FieldErrorDto("Email", `Duplicate ${"Email"} exists in Row ${matchValue_1.RowId}`)])) : (new FSharpResult$2(0, [undefined])));
|
|
357
|
-
}
|
|
358
|
-
else {
|
|
359
|
-
input_27 = (new FSharpResult$2(0, [undefined]));
|
|
360
|
-
}
|
|
361
|
-
left = ((input_27.tag === 1) ? (new FSharpResult$2(1, [singleton(input_27.fields[0])])) : (new FSharpResult$2(0, [input_27.fields[0]])));
|
|
362
|
-
let right_1;
|
|
363
|
-
let input_28;
|
|
364
|
-
const matchValue_2 = row.ExternalId;
|
|
365
|
-
if (matchValue_2 != null) {
|
|
366
|
-
const _externalId = matchValue_2;
|
|
367
|
-
const matchValue_3 = tryFind((item$0027_1) => {
|
|
368
|
-
if (!equals(item$0027_1, item_1)) {
|
|
369
|
-
return equals(item$0027_1.Data.ExternalId, row.ExternalId);
|
|
370
|
-
}
|
|
371
|
-
else {
|
|
372
|
-
return false;
|
|
373
|
-
}
|
|
374
|
-
}, data);
|
|
375
|
-
input_28 = ((matchValue_3 != null) ? (new FSharpResult$2(1, [new FieldErrorDto("ExternalId", `Duplicate ${"ExternalId"} exists in Row ${matchValue_3.RowId}`)])) : (new FSharpResult$2(0, [undefined])));
|
|
376
|
-
}
|
|
377
|
-
else {
|
|
378
|
-
input_28 = (new FSharpResult$2(0, [undefined]));
|
|
379
|
-
}
|
|
380
|
-
right_1 = ((input_28.tag === 1) ? (new FSharpResult$2(1, [singleton(input_28.fields[0])])) : (new FSharpResult$2(0, [input_28.fields[0]])));
|
|
381
|
-
const copyOfStruct = left;
|
|
382
|
-
if (copyOfStruct.tag === 1) {
|
|
383
|
-
const copyOfStruct_1 = right_1;
|
|
384
|
-
right_3 = ((copyOfStruct_1.tag === 1) ? (new FSharpResult$2(1, [append(copyOfStruct.fields[0], copyOfStruct_1.fields[0])])) : (new FSharpResult$2(1, [copyOfStruct.fields[0]])));
|
|
385
|
-
}
|
|
386
|
-
else {
|
|
387
|
-
const copyOfStruct_2 = right_1;
|
|
388
|
-
right_3 = ((copyOfStruct_2.tag === 1) ? (new FSharpResult$2(1, [copyOfStruct_2.fields[0]])) : (new FSharpResult$2(0, [[copyOfStruct.fields[0], copyOfStruct_2.fields[0]]])));
|
|
389
|
-
}
|
|
390
|
-
const copyOfStruct_3 = left_2;
|
|
391
|
-
if (copyOfStruct_3.tag === 1) {
|
|
392
|
-
const copyOfStruct_1_1 = right_3;
|
|
393
|
-
right_5 = ((copyOfStruct_1_1.tag === 1) ? (new FSharpResult$2(1, [append(copyOfStruct_3.fields[0], copyOfStruct_1_1.fields[0])])) : (new FSharpResult$2(1, [copyOfStruct_3.fields[0]])));
|
|
394
|
-
}
|
|
395
|
-
else {
|
|
396
|
-
const copyOfStruct_2_1 = right_3;
|
|
397
|
-
right_5 = ((copyOfStruct_2_1.tag === 1) ? (new FSharpResult$2(1, [copyOfStruct_2_1.fields[0]])) : (new FSharpResult$2(0, [[copyOfStruct_3.fields[0], copyOfStruct_2_1.fields[0]]])));
|
|
398
|
-
}
|
|
399
|
-
const copyOfStruct_4 = left_4;
|
|
400
|
-
if (copyOfStruct_4.tag === 1) {
|
|
401
|
-
const copyOfStruct_1_2 = right_5;
|
|
402
|
-
right_7 = ((copyOfStruct_1_2.tag === 1) ? (new FSharpResult$2(1, [append(copyOfStruct_4.fields[0], copyOfStruct_1_2.fields[0])])) : (new FSharpResult$2(1, [copyOfStruct_4.fields[0]])));
|
|
403
|
-
}
|
|
404
|
-
else {
|
|
405
|
-
const copyOfStruct_2_2 = right_5;
|
|
406
|
-
right_7 = ((copyOfStruct_2_2.tag === 1) ? (new FSharpResult$2(1, [copyOfStruct_2_2.fields[0]])) : (new FSharpResult$2(0, [[copyOfStruct_4.fields[0], copyOfStruct_2_2.fields[0]]])));
|
|
407
|
-
}
|
|
408
|
-
const copyOfStruct_5 = left_6;
|
|
409
|
-
if (copyOfStruct_5.tag === 1) {
|
|
410
|
-
const copyOfStruct_1_3 = right_7;
|
|
411
|
-
right_9 = ((copyOfStruct_1_3.tag === 1) ? (new FSharpResult$2(1, [append(copyOfStruct_5.fields[0], copyOfStruct_1_3.fields[0])])) : (new FSharpResult$2(1, [copyOfStruct_5.fields[0]])));
|
|
412
|
-
}
|
|
413
|
-
else {
|
|
414
|
-
const copyOfStruct_2_3 = right_7;
|
|
415
|
-
right_9 = ((copyOfStruct_2_3.tag === 1) ? (new FSharpResult$2(1, [copyOfStruct_2_3.fields[0]])) : (new FSharpResult$2(0, [[copyOfStruct_5.fields[0], copyOfStruct_2_3.fields[0]]])));
|
|
416
|
-
}
|
|
417
|
-
const copyOfStruct_6 = left_8;
|
|
418
|
-
if (copyOfStruct_6.tag === 1) {
|
|
419
|
-
const copyOfStruct_1_4 = right_9;
|
|
420
|
-
right_11 = ((copyOfStruct_1_4.tag === 1) ? (new FSharpResult$2(1, [append(copyOfStruct_6.fields[0], copyOfStruct_1_4.fields[0])])) : (new FSharpResult$2(1, [copyOfStruct_6.fields[0]])));
|
|
421
|
-
}
|
|
422
|
-
else {
|
|
423
|
-
const copyOfStruct_2_4 = right_9;
|
|
424
|
-
right_11 = ((copyOfStruct_2_4.tag === 1) ? (new FSharpResult$2(1, [copyOfStruct_2_4.fields[0]])) : (new FSharpResult$2(0, [[copyOfStruct_6.fields[0], copyOfStruct_2_4.fields[0]]])));
|
|
425
|
-
}
|
|
426
|
-
const copyOfStruct_7 = left_10;
|
|
427
|
-
if (copyOfStruct_7.tag === 1) {
|
|
428
|
-
const copyOfStruct_1_5 = right_11;
|
|
429
|
-
right_13 = ((copyOfStruct_1_5.tag === 1) ? (new FSharpResult$2(1, [append(copyOfStruct_7.fields[0], copyOfStruct_1_5.fields[0])])) : (new FSharpResult$2(1, [copyOfStruct_7.fields[0]])));
|
|
430
|
-
}
|
|
431
|
-
else {
|
|
432
|
-
const copyOfStruct_2_5 = right_11;
|
|
433
|
-
right_13 = ((copyOfStruct_2_5.tag === 1) ? (new FSharpResult$2(1, [copyOfStruct_2_5.fields[0]])) : (new FSharpResult$2(0, [[copyOfStruct_7.fields[0], copyOfStruct_2_5.fields[0]]])));
|
|
434
|
-
}
|
|
435
|
-
const copyOfStruct_8 = left_12;
|
|
436
|
-
if (copyOfStruct_8.tag === 1) {
|
|
437
|
-
const copyOfStruct_1_6 = right_13;
|
|
438
|
-
right_15 = ((copyOfStruct_1_6.tag === 1) ? (new FSharpResult$2(1, [append(copyOfStruct_8.fields[0], copyOfStruct_1_6.fields[0])])) : (new FSharpResult$2(1, [copyOfStruct_8.fields[0]])));
|
|
439
|
-
}
|
|
440
|
-
else {
|
|
441
|
-
const copyOfStruct_2_6 = right_13;
|
|
442
|
-
right_15 = ((copyOfStruct_2_6.tag === 1) ? (new FSharpResult$2(1, [copyOfStruct_2_6.fields[0]])) : (new FSharpResult$2(0, [[copyOfStruct_8.fields[0], copyOfStruct_2_6.fields[0]]])));
|
|
443
|
-
}
|
|
444
|
-
const copyOfStruct_9 = left_14;
|
|
445
|
-
if (copyOfStruct_9.tag === 1) {
|
|
446
|
-
const copyOfStruct_1_7 = right_15;
|
|
447
|
-
right_17 = ((copyOfStruct_1_7.tag === 1) ? (new FSharpResult$2(1, [append(copyOfStruct_9.fields[0], copyOfStruct_1_7.fields[0])])) : (new FSharpResult$2(1, [copyOfStruct_9.fields[0]])));
|
|
448
|
-
}
|
|
449
|
-
else {
|
|
450
|
-
const copyOfStruct_2_7 = right_15;
|
|
451
|
-
right_17 = ((copyOfStruct_2_7.tag === 1) ? (new FSharpResult$2(1, [copyOfStruct_2_7.fields[0]])) : (new FSharpResult$2(0, [[copyOfStruct_9.fields[0], copyOfStruct_2_7.fields[0]]])));
|
|
452
|
-
}
|
|
453
|
-
const copyOfStruct_10 = left_16;
|
|
454
|
-
if (copyOfStruct_10.tag === 1) {
|
|
455
|
-
const copyOfStruct_1_8 = right_17;
|
|
456
|
-
right_19 = ((copyOfStruct_1_8.tag === 1) ? (new FSharpResult$2(1, [append(copyOfStruct_10.fields[0], copyOfStruct_1_8.fields[0])])) : (new FSharpResult$2(1, [copyOfStruct_10.fields[0]])));
|
|
457
|
-
}
|
|
458
|
-
else {
|
|
459
|
-
const copyOfStruct_2_8 = right_17;
|
|
460
|
-
right_19 = ((copyOfStruct_2_8.tag === 1) ? (new FSharpResult$2(1, [copyOfStruct_2_8.fields[0]])) : (new FSharpResult$2(0, [[copyOfStruct_10.fields[0], copyOfStruct_2_8.fields[0]]])));
|
|
461
|
-
}
|
|
462
|
-
const copyOfStruct_11 = left_18;
|
|
463
|
-
if (copyOfStruct_11.tag === 1) {
|
|
464
|
-
const copyOfStruct_1_9 = right_19;
|
|
465
|
-
right_21 = ((copyOfStruct_1_9.tag === 1) ? (new FSharpResult$2(1, [append(copyOfStruct_11.fields[0], copyOfStruct_1_9.fields[0])])) : (new FSharpResult$2(1, [copyOfStruct_11.fields[0]])));
|
|
466
|
-
}
|
|
467
|
-
else {
|
|
468
|
-
const copyOfStruct_2_9 = right_19;
|
|
469
|
-
right_21 = ((copyOfStruct_2_9.tag === 1) ? (new FSharpResult$2(1, [copyOfStruct_2_9.fields[0]])) : (new FSharpResult$2(0, [[copyOfStruct_11.fields[0], copyOfStruct_2_9.fields[0]]])));
|
|
470
|
-
}
|
|
471
|
-
const copyOfStruct_12 = left_20;
|
|
472
|
-
if (copyOfStruct_12.tag === 1) {
|
|
473
|
-
const copyOfStruct_1_10 = right_21;
|
|
474
|
-
input_31 = ((copyOfStruct_1_10.tag === 1) ? (new FSharpResult$2(1, [append(copyOfStruct_12.fields[0], copyOfStruct_1_10.fields[0])])) : (new FSharpResult$2(1, [copyOfStruct_12.fields[0]])));
|
|
475
|
-
}
|
|
476
|
-
else {
|
|
477
|
-
const copyOfStruct_2_10 = right_21;
|
|
478
|
-
input_31 = ((copyOfStruct_2_10.tag === 1) ? (new FSharpResult$2(1, [copyOfStruct_2_10.fields[0]])) : (new FSharpResult$2(0, [[copyOfStruct_12.fields[0], copyOfStruct_2_10.fields[0]]])));
|
|
479
|
-
}
|
|
480
|
-
input_33 = ((input_31.tag === 1) ? (new FSharpResult$2(1, [input_31.fields[0]])) : (new FSharpResult$2(0, [(_arg_4 = input_31.fields[0], new ValidatedImportRowDataDto(item_1.RowId, new ValidatedImportProfileDataDto(_arg_4[0], row.MiddleName, _arg_4[1][1][0], _arg_4[1][1][1][0], row.MobileNumber, row.ExternalId, row.Title, row.Gender, row.DateOfBirth, _arg_4[1][1][1][1][1][1][1][1][1][0])))])));
|
|
481
|
-
if (input_33.tag === 1) {
|
|
482
|
-
return new FSharpResult$2(1, [new RowValidationErrorDto(item_1.RowId, input_33.fields[0])]);
|
|
483
|
-
}
|
|
484
|
-
else {
|
|
485
|
-
return new FSharpResult$2(0, [input_33.fields[0]]);
|
|
486
|
-
}
|
|
487
|
-
}, data));
|
|
488
|
-
if (matchValue_15.tag === 1) {
|
|
489
|
-
return new FSharpResult$2(1, [new ImportValidationErrorDto(4, [{
|
|
490
|
-
Errors: matchValue_15.fields[0],
|
|
491
|
-
}])]);
|
|
492
|
-
}
|
|
493
|
-
else {
|
|
494
|
-
return new FSharpResult$2(0, [new ValidatedImportDataDto(matchValue_15.fields[0])]);
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
|