@flarehr/superhero-basic-profile 0.1.2217 → 0.1.2223
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
package/package.json
CHANGED
package/dist/App.jsx
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { Record, Union } from "../fable_modules/fable-library-js.4.20.0/Types.js";
|
|
2
|
-
import { class_type, record_type, string_type, int32_type, option_type, union_type } from "../fable_modules/fable-library-js.4.20.0/Reflection.js";
|
|
3
|
-
import { DomainMetadata_$reflection, StreamId_$reflection } from "./Metadata.jsx";
|
|
4
|
-
import { Gender_$reflection, Title_$reflection, AccountId_$reflection } from "./DomainPrimitives.jsx";
|
|
5
|
-
import { EventId_$reflection } from "./Events.jsx";
|
|
6
|
-
|
|
7
|
-
export class ProfileType extends Union {
|
|
8
|
-
constructor(tag, fields) {
|
|
9
|
-
super();
|
|
10
|
-
this.tag = tag;
|
|
11
|
-
this.fields = fields;
|
|
12
|
-
}
|
|
13
|
-
cases() {
|
|
14
|
-
return ["Full", "Partial"];
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export function ProfileType_$reflection() {
|
|
19
|
-
return union_type("Basic.Profile.Domain.AnalyticsEvent.ProfileType", [], ProfileType, () => [[], []]);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export class ProfileState extends Union {
|
|
23
|
-
constructor(tag, fields) {
|
|
24
|
-
super();
|
|
25
|
-
this.tag = tag;
|
|
26
|
-
this.fields = fields;
|
|
27
|
-
}
|
|
28
|
-
cases() {
|
|
29
|
-
return ["Active", "Inactive", "Archived", "Purged"];
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export function ProfileState_$reflection() {
|
|
34
|
-
return union_type("Basic.Profile.Domain.AnalyticsEvent.ProfileState", [], ProfileState, () => [[], [], [], []]);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export class MixpanelProfileProperties extends Record {
|
|
38
|
-
constructor(StreamId, AccountId, ProfileType, Title, Gender, YearOfBirth, City, State, Postcode, CountryCode, ProfileState) {
|
|
39
|
-
super();
|
|
40
|
-
this.StreamId = StreamId;
|
|
41
|
-
this.AccountId = AccountId;
|
|
42
|
-
this.ProfileType = ProfileType;
|
|
43
|
-
this.Title = Title;
|
|
44
|
-
this.Gender = Gender;
|
|
45
|
-
this.YearOfBirth = YearOfBirth;
|
|
46
|
-
this.City = City;
|
|
47
|
-
this.State = State;
|
|
48
|
-
this.Postcode = Postcode;
|
|
49
|
-
this.CountryCode = CountryCode;
|
|
50
|
-
this.ProfileState = ProfileState;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export function MixpanelProfileProperties_$reflection() {
|
|
55
|
-
return record_type("Basic.Profile.Domain.AnalyticsEvent.MixpanelProfileProperties", [], MixpanelProfileProperties, () => [["StreamId", StreamId_$reflection()], ["AccountId", option_type(AccountId_$reflection())], ["ProfileType", option_type(ProfileType_$reflection())], ["Title", option_type(Title_$reflection())], ["Gender", option_type(Gender_$reflection())], ["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(ProfileState_$reflection())]]);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export class AnalyticsEventData extends Record {
|
|
59
|
-
constructor(StreamId, Timestamp, EventId, DomainMetadata) {
|
|
60
|
-
super();
|
|
61
|
-
this.StreamId = StreamId;
|
|
62
|
-
this.Timestamp = Timestamp;
|
|
63
|
-
this.EventId = EventId;
|
|
64
|
-
this.DomainMetadata = DomainMetadata;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export function AnalyticsEventData_$reflection() {
|
|
69
|
-
return record_type("Basic.Profile.Domain.AnalyticsEvent.AnalyticsEventData", [], AnalyticsEventData, () => [["StreamId", StreamId_$reflection()], ["Timestamp", class_type("System.DateTime")], ["EventId", EventId_$reflection()], ["DomainMetadata", option_type(DomainMetadata_$reflection())]]);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export class AnalyticsStateChangedEventData extends Record {
|
|
73
|
-
constructor(StreamId, Timestamp, EventId, From, To, DomainMetadata) {
|
|
74
|
-
super();
|
|
75
|
-
this.StreamId = StreamId;
|
|
76
|
-
this.Timestamp = Timestamp;
|
|
77
|
-
this.EventId = EventId;
|
|
78
|
-
this.From = From;
|
|
79
|
-
this.To = To;
|
|
80
|
-
this.DomainMetadata = DomainMetadata;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export function AnalyticsStateChangedEventData_$reflection() {
|
|
85
|
-
return record_type("Basic.Profile.Domain.AnalyticsEvent.AnalyticsStateChangedEventData", [], AnalyticsStateChangedEventData, () => [["StreamId", StreamId_$reflection()], ["Timestamp", class_type("System.DateTime")], ["EventId", EventId_$reflection()], ["From", option_type(ProfileState_$reflection())], ["To", option_type(ProfileState_$reflection())], ["DomainMetadata", option_type(DomainMetadata_$reflection())]]);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export class AnalyticsEventType extends Union {
|
|
89
|
-
constructor(tag, fields) {
|
|
90
|
-
super();
|
|
91
|
-
this.tag = tag;
|
|
92
|
-
this.fields = fields;
|
|
93
|
-
}
|
|
94
|
-
cases() {
|
|
95
|
-
return ["Created", "Updated", "PartialCreated", "PartialUpdated", "PartialPromoted", "Restored", "Archived", "Activated", "Deactivated", "Purged"];
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export function AnalyticsEventType_$reflection() {
|
|
100
|
-
return union_type("Basic.Profile.Domain.AnalyticsEvent.AnalyticsEventType", [], AnalyticsEventType, () => [[["Item", AnalyticsEventData_$reflection()]], [["Item", AnalyticsEventData_$reflection()]], [["Item", AnalyticsEventData_$reflection()]], [["Item", AnalyticsEventData_$reflection()]], [["Item", AnalyticsEventData_$reflection()]], [["Item", AnalyticsStateChangedEventData_$reflection()]], [["Item", AnalyticsStateChangedEventData_$reflection()]], [["Item", AnalyticsStateChangedEventData_$reflection()]], [["Item", AnalyticsStateChangedEventData_$reflection()]], [["Item", AnalyticsStateChangedEventData_$reflection()]]]);
|
|
101
|
-
}
|
|
102
|
-
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { Union, Record } from "../fable_modules/fable-library-js.4.20.0/Types.js";
|
|
2
|
-
import { CommandId_$reflection } from "./Commands.jsx";
|
|
3
|
-
import { option_type, string_type, union_type, record_type } from "../fable_modules/fable-library-js.4.20.0/Reflection.js";
|
|
4
|
-
import { StreamId_$reflection } from "./Metadata.jsx";
|
|
5
|
-
import { JwtPayload_$reflection } from "./JwtPayload.jsx";
|
|
6
|
-
import { PartnerId_$reflection, AccountId_$reflection } from "./DomainPrimitives.jsx";
|
|
7
|
-
|
|
8
|
-
export class AuditMetadata extends Record {
|
|
9
|
-
constructor(CausationId, Trigger) {
|
|
10
|
-
super();
|
|
11
|
-
this.CausationId = CausationId;
|
|
12
|
-
this.Trigger = Trigger;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function AuditMetadata_$reflection() {
|
|
17
|
-
return record_type("Basic.Profile.Domain.Audit.AuditMetadata", [], AuditMetadata, () => [["CausationId", CommandId_$reflection()], ["Trigger", Trigger_$reflection()]]);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export class Trigger extends Union {
|
|
21
|
-
constructor(tag, fields) {
|
|
22
|
-
super();
|
|
23
|
-
this.tag = tag;
|
|
24
|
-
this.fields = fields;
|
|
25
|
-
}
|
|
26
|
-
cases() {
|
|
27
|
-
return ["HttpTrigger", "StorageQueueTrigger"];
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function Trigger_$reflection() {
|
|
32
|
-
return union_type("Basic.Profile.Domain.Audit.Trigger", [], Trigger, () => [[["Item", HttpTriggerAuditMetadata_$reflection()]], [["Item", StorageQueueTriggerMetadata_$reflection()]]]);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export class HttpTriggerAuditMetadata extends Record {
|
|
36
|
-
constructor(ApiRequestUrl, HttpMethod, IpAddress, XForwardedFor, Initiator) {
|
|
37
|
-
super();
|
|
38
|
-
this.ApiRequestUrl = ApiRequestUrl;
|
|
39
|
-
this.HttpMethod = HttpMethod;
|
|
40
|
-
this.IpAddress = IpAddress;
|
|
41
|
-
this.XForwardedFor = XForwardedFor;
|
|
42
|
-
this.Initiator = Initiator;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export function HttpTriggerAuditMetadata_$reflection() {
|
|
47
|
-
return record_type("Basic.Profile.Domain.Audit.HttpTriggerAuditMetadata", [], HttpTriggerAuditMetadata, () => [["ApiRequestUrl", string_type], ["HttpMethod", string_type], ["IpAddress", option_type(string_type)], ["XForwardedFor", option_type(string_type)], ["Initiator", Initiator_$reflection()]]);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export class Initiator extends Union {
|
|
51
|
-
constructor(tag, fields) {
|
|
52
|
-
super();
|
|
53
|
-
this.tag = tag;
|
|
54
|
-
this.fields = fields;
|
|
55
|
-
}
|
|
56
|
-
cases() {
|
|
57
|
-
return ["Profile", "Account", "Partner", "Admin", "Internal", "FlareAdminShell"];
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export function Initiator_$reflection() {
|
|
62
|
-
return union_type("Basic.Profile.Domain.Audit.Initiator", [], Initiator, () => [[["Item", ProfileInitiator_$reflection()]], [["Item", AccountInitiator_$reflection()]], [["Item", PartnerInitiator_$reflection()]], [["Item", AdminInitiator_$reflection()]], [["Item", InternalInitiator_$reflection()]], [["Item", FlareAdminShellInitiator_$reflection()]]]);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export class ProfileInitiator extends Record {
|
|
66
|
-
constructor(BearerTokenTruncated, UserAgent, ProfileId, Claims) {
|
|
67
|
-
super();
|
|
68
|
-
this.BearerTokenTruncated = BearerTokenTruncated;
|
|
69
|
-
this.UserAgent = UserAgent;
|
|
70
|
-
this.ProfileId = ProfileId;
|
|
71
|
-
this.Claims = Claims;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export function ProfileInitiator_$reflection() {
|
|
76
|
-
return record_type("Basic.Profile.Domain.Audit.ProfileInitiator", [], ProfileInitiator, () => [["BearerTokenTruncated", option_type(string_type)], ["UserAgent", option_type(string_type)], ["ProfileId", StreamId_$reflection()], ["Claims", option_type(JwtPayload_$reflection())]]);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export class AccountInitiator extends Record {
|
|
80
|
-
constructor(AccountId) {
|
|
81
|
-
super();
|
|
82
|
-
this.AccountId = AccountId;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export function AccountInitiator_$reflection() {
|
|
87
|
-
return record_type("Basic.Profile.Domain.Audit.AccountInitiator", [], AccountInitiator, () => [["AccountId", AccountId_$reflection()]]);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export class PartnerInitiator extends Record {
|
|
91
|
-
constructor(PartnerId) {
|
|
92
|
-
super();
|
|
93
|
-
this.PartnerId = PartnerId;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export function PartnerInitiator_$reflection() {
|
|
98
|
-
return record_type("Basic.Profile.Domain.Audit.PartnerInitiator", [], PartnerInitiator, () => [["PartnerId", PartnerId_$reflection()]]);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export class AdminInitiator extends Record {
|
|
102
|
-
constructor(BearerTokenTruncated, Claims) {
|
|
103
|
-
super();
|
|
104
|
-
this.BearerTokenTruncated = BearerTokenTruncated;
|
|
105
|
-
this.Claims = Claims;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export function AdminInitiator_$reflection() {
|
|
110
|
-
return record_type("Basic.Profile.Domain.Audit.AdminInitiator", [], AdminInitiator, () => [["BearerTokenTruncated", option_type(string_type)], ["Claims", option_type(JwtPayload_$reflection())]]);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export class InternalInitiator extends Record {
|
|
114
|
-
constructor(BearerTokenTruncated, Claims) {
|
|
115
|
-
super();
|
|
116
|
-
this.BearerTokenTruncated = BearerTokenTruncated;
|
|
117
|
-
this.Claims = Claims;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export function InternalInitiator_$reflection() {
|
|
122
|
-
return record_type("Basic.Profile.Domain.Audit.InternalInitiator", [], InternalInitiator, () => [["BearerTokenTruncated", option_type(string_type)], ["Claims", option_type(JwtPayload_$reflection())]]);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export class StorageQueueTriggerMetadata extends Record {
|
|
126
|
-
constructor(QueueName, MessageId) {
|
|
127
|
-
super();
|
|
128
|
-
this.QueueName = QueueName;
|
|
129
|
-
this.MessageId = MessageId;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export function StorageQueueTriggerMetadata_$reflection() {
|
|
134
|
-
return record_type("Basic.Profile.Domain.Audit.StorageQueueTriggerMetadata", [], StorageQueueTriggerMetadata, () => [["QueueName", string_type], ["MessageId", string_type]]);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export class FlareAdminShellInitiator extends Record {
|
|
138
|
-
constructor(BearerTokenTruncated, UserAgent, Claims) {
|
|
139
|
-
super();
|
|
140
|
-
this.BearerTokenTruncated = BearerTokenTruncated;
|
|
141
|
-
this.UserAgent = UserAgent;
|
|
142
|
-
this.Claims = Claims;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
export function FlareAdminShellInitiator_$reflection() {
|
|
147
|
-
return record_type("Basic.Profile.Domain.Audit.FlareAdminShellInitiator", [], FlareAdminShellInitiator, () => [["BearerTokenTruncated", option_type(string_type)], ["UserAgent", option_type(string_type)], ["Claims", option_type(JwtPayload_$reflection())]]);
|
|
148
|
-
}
|
|
149
|
-
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { Record, Union } from "../fable_modules/fable-library-js.4.20.0/Types.js";
|
|
2
|
-
import { PartialProfileUpdateDetails_$reflection, PartialProfileCreationDetails_$reflection, FullProfileCreationDetails_$reflection } from "./ProfileModels.jsx";
|
|
3
|
-
import { EmergencyContact_$reflection, Address_$reflection, DateOfBirth_$reflection, MobilePhone_$reflection, Email_$reflection, Gender_$reflection, Title_$reflection, Name_$reflection } from "./DomainPrimitives.jsx";
|
|
4
|
-
import { record_type, string_type, union_type, list_type } from "../fable_modules/fable-library-js.4.20.0/Reflection.js";
|
|
5
|
-
import { newGuid } from "../fable_modules/fable-library-js.4.20.0/Guid.js";
|
|
6
|
-
import { MetadataModule_toCommandMetadata, CommandMetadata_incrementVersion, CommandMetadata_withTimestamp, ProfileCommandMetadata_$reflection } from "./Metadata.jsx";
|
|
7
|
-
import { mapIndexed } from "../fable_modules/fable-library-js.4.20.0/List.js";
|
|
8
|
-
|
|
9
|
-
export class ProfileCommand extends Union {
|
|
10
|
-
constructor(tag, fields) {
|
|
11
|
-
super();
|
|
12
|
-
this.tag = tag;
|
|
13
|
-
this.fields = fields;
|
|
14
|
-
}
|
|
15
|
-
cases() {
|
|
16
|
-
return ["Create", "CreatePartial", "UpdatePartial", "PromotePartial", "Activate", "Deactivate", "Archive", "Restore", "ChangeName", "ChangeTitle", "ChangeGender", "ChangeEmail", "ChangeMobilePhone", "ChangeDateOfBirth", "ChangeAddress", "ChangeEmergencyContacts", "PurgePersonalData"];
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export function ProfileCommand_$reflection() {
|
|
21
|
-
return union_type("Commands.ProfileCommand", [], ProfileCommand, () => [[["Item", FullProfileCreationDetails_$reflection()]], [["Item", PartialProfileCreationDetails_$reflection()]], [["Item", PartialProfileUpdateDetails_$reflection()]], [["Item", FullProfileCreationDetails_$reflection()]], [], [], [], [], [["Item", Name_$reflection()]], [["Item", Title_$reflection()]], [["Item", Gender_$reflection()]], [["Item", Email_$reflection()]], [["Item", MobilePhone_$reflection()]], [["Item", DateOfBirth_$reflection()]], [["Item", Address_$reflection()]], [["Item", list_type(EmergencyContact_$reflection())]], []]);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export class CommandId extends Union {
|
|
25
|
-
constructor(Item) {
|
|
26
|
-
super();
|
|
27
|
-
this.tag = 0;
|
|
28
|
-
this.fields = [Item];
|
|
29
|
-
}
|
|
30
|
-
cases() {
|
|
31
|
-
return ["CommandId"];
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export function CommandId_$reflection() {
|
|
36
|
-
return union_type("Commands.CommandId", [], CommandId, () => [[["Item", string_type]]]);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export function CommandIdModule_createNew() {
|
|
40
|
-
let copyOfStruct;
|
|
41
|
-
return new CommandId((copyOfStruct = newGuid(), copyOfStruct));
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export function CommandIdModule_create(commandId) {
|
|
45
|
-
return new CommandId(commandId);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export function CommandIdModule_value(_arg) {
|
|
49
|
-
return _arg.fields[0];
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export class Command$1 extends Record {
|
|
53
|
-
constructor(Id, Data, Metadata) {
|
|
54
|
-
super();
|
|
55
|
-
this.Id = Id;
|
|
56
|
-
this.Data = Data;
|
|
57
|
-
this.Metadata = Metadata;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export function Command$1_$reflection(gen0) {
|
|
62
|
-
return record_type("Commands.Command`1", [gen0], Command$1, () => [["Id", CommandId_$reflection()], ["Data", gen0], ["Metadata", ProfileCommandMetadata_$reflection()]]);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export function Command_ofProfileCommandList(currentMetadata, domainMetadata, timestamp, profileCommandList) {
|
|
66
|
-
return mapIndexed((index, c) => (new Command$1(CommandIdModule_createNew(), c, CommandMetadata_withTimestamp(timestamp, CommandMetadata_incrementVersion(index - 1, MetadataModule_toCommandMetadata(currentMetadata, domainMetadata))))), profileCommandList);
|
|
67
|
-
}
|
|
68
|
-
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import { Record, Union } from "../fable_modules/fable-library-js.4.20.0/Types.js";
|
|
2
|
-
import { record_type, int32_type, string_type, union_type, class_type } from "../fable_modules/fable-library-js.4.20.0/Reflection.js";
|
|
3
|
-
import { newGuid, parse } from "../fable_modules/fable-library-js.4.20.0/Guid.js";
|
|
4
|
-
import { incrementVersion, AppVersion_$reflection, StreamId_$reflection } from "./Metadata.jsx";
|
|
5
|
-
import { UtcDateTime_$reflection } from "./DomainPrimitives.jsx";
|
|
6
|
-
import { CommandId_$reflection } from "./Commands.jsx";
|
|
7
|
-
|
|
8
|
-
export class EventId extends Union {
|
|
9
|
-
constructor(Item) {
|
|
10
|
-
super();
|
|
11
|
-
this.tag = 0;
|
|
12
|
-
this.fields = [Item];
|
|
13
|
-
}
|
|
14
|
-
cases() {
|
|
15
|
-
return ["EventId"];
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function EventId_$reflection() {
|
|
20
|
-
return union_type("Basic.Profile.Domain.CommonTypes.EventId", [], EventId, () => [[["Item", class_type("System.Guid")]]]);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export function EventIdModule_create(eventId) {
|
|
24
|
-
return new EventId(parse(eventId));
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export function EventIdModule_generate() {
|
|
28
|
-
return new EventId(newGuid());
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function EventIdModule_value(_arg) {
|
|
32
|
-
return _arg.fields[0];
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export function EventIdModule_toString(eventId) {
|
|
36
|
-
let copyOfStruct;
|
|
37
|
-
return ((copyOfStruct = EventIdModule_value(eventId), copyOfStruct)).toLocaleUpperCase();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export class CausationId extends Union {
|
|
41
|
-
constructor(Item) {
|
|
42
|
-
super();
|
|
43
|
-
this.tag = 0;
|
|
44
|
-
this.fields = [Item];
|
|
45
|
-
}
|
|
46
|
-
cases() {
|
|
47
|
-
return ["CausationId"];
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export function CausationId_$reflection() {
|
|
52
|
-
return union_type("Basic.Profile.Domain.CommonTypes.CausationId", [], CausationId, () => [[["Item", string_type]]]);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export function CausationIdModule_create(causationId) {
|
|
56
|
-
return new CausationId(causationId);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export function CausationIdModule_value(_arg) {
|
|
60
|
-
return _arg.fields[0];
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export const $007CCausationId$007C = CausationIdModule_value;
|
|
64
|
-
|
|
65
|
-
export class CorrelationId extends Union {
|
|
66
|
-
constructor(Item) {
|
|
67
|
-
super();
|
|
68
|
-
this.tag = 0;
|
|
69
|
-
this.fields = [Item];
|
|
70
|
-
}
|
|
71
|
-
cases() {
|
|
72
|
-
return ["CorrelationId"];
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export function CorrelationId_$reflection() {
|
|
77
|
-
return union_type("Basic.Profile.Domain.CommonTypes.CorrelationId", [], CorrelationId, () => [[["Item", string_type]]]);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export function CorrelationIdModule_create(correlationId) {
|
|
81
|
-
return new CorrelationId(correlationId);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export function CorrelationIdModule_value(_arg) {
|
|
85
|
-
return _arg.fields[0];
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export class EventMetadata$1 extends Record {
|
|
89
|
-
constructor(StreamId, Version, AppVersion, Timestamp, Domain) {
|
|
90
|
-
super();
|
|
91
|
-
this.StreamId = StreamId;
|
|
92
|
-
this.Version = (Version | 0);
|
|
93
|
-
this.AppVersion = AppVersion;
|
|
94
|
-
this.Timestamp = Timestamp;
|
|
95
|
-
this.Domain = Domain;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export function EventMetadata$1_$reflection(gen0) {
|
|
100
|
-
return record_type("Basic.Profile.Domain.CommonTypes.EventMetadata`1", [gen0], EventMetadata$1, () => [["StreamId", StreamId_$reflection()], ["Version", int32_type], ["AppVersion", AppVersion_$reflection()], ["Timestamp", UtcDateTime_$reflection()], ["Domain", gen0]]);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export class Event$2 extends Record {
|
|
104
|
-
constructor(Id, CausationId, CorrelationId, Payload, Metadata) {
|
|
105
|
-
super();
|
|
106
|
-
this.Id = Id;
|
|
107
|
-
this.CausationId = CausationId;
|
|
108
|
-
this.CorrelationId = CorrelationId;
|
|
109
|
-
this.Payload = Payload;
|
|
110
|
-
this.Metadata = Metadata;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export function Event$2_$reflection(gen0, gen1) {
|
|
115
|
-
return record_type("Basic.Profile.Domain.CommonTypes.Event`2", [gen0, gen1], Event$2, () => [["Id", EventId_$reflection()], ["CausationId", CausationId_$reflection()], ["CorrelationId", CorrelationId_$reflection()], ["Payload", gen0], ["Metadata", EventMetadata$1_$reflection(gen1)]]);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export class AggregateMetadata$1 extends Record {
|
|
119
|
-
constructor(StreamId, Version, CreatedAt, UpdatedAt, Domain) {
|
|
120
|
-
super();
|
|
121
|
-
this.StreamId = StreamId;
|
|
122
|
-
this.Version = (Version | 0);
|
|
123
|
-
this.CreatedAt = CreatedAt;
|
|
124
|
-
this.UpdatedAt = UpdatedAt;
|
|
125
|
-
this.Domain = Domain;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export function AggregateMetadata$1_$reflection(gen0) {
|
|
130
|
-
return record_type("Basic.Profile.Domain.CommonTypes.AggregateMetadata`1", [gen0], AggregateMetadata$1, () => [["StreamId", StreamId_$reflection()], ["Version", int32_type], ["CreatedAt", UtcDateTime_$reflection()], ["UpdatedAt", UtcDateTime_$reflection()], ["Domain", gen0]]);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export class Aggregate$2 extends Record {
|
|
134
|
-
constructor(Data, Metadata) {
|
|
135
|
-
super();
|
|
136
|
-
this.Data = Data;
|
|
137
|
-
this.Metadata = Metadata;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
export function Aggregate$2_$reflection(gen0, gen1) {
|
|
142
|
-
return record_type("Basic.Profile.Domain.CommonTypes.Aggregate`2", [gen0, gen1], Aggregate$2, () => [["Data", gen0], ["Metadata", AggregateMetadata$1_$reflection(gen1)]]);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export class CommandMetadata$1 extends Record {
|
|
146
|
-
constructor(StreamId, Version, AppVersion, Timestamp, Domain) {
|
|
147
|
-
super();
|
|
148
|
-
this.StreamId = StreamId;
|
|
149
|
-
this.Version = (Version | 0);
|
|
150
|
-
this.AppVersion = AppVersion;
|
|
151
|
-
this.Timestamp = Timestamp;
|
|
152
|
-
this.Domain = Domain;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
export function CommandMetadata$1_$reflection(gen0) {
|
|
157
|
-
return record_type("Basic.Profile.Domain.CommonTypes.CommandMetadata`1", [gen0], CommandMetadata$1, () => [["StreamId", StreamId_$reflection()], ["Version", int32_type], ["AppVersion", AppVersion_$reflection()], ["Timestamp", UtcDateTime_$reflection()], ["Domain", gen0]]);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export function CommandMetadata_create(streamId, version, timestamp, domainData, appVersion) {
|
|
161
|
-
return new CommandMetadata$1(streamId, version, appVersion, timestamp, domainData);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export function CommandMetadata_createNew(streamId, timestamp, domainData, appVersion) {
|
|
165
|
-
return CommandMetadata_create(streamId, 0, timestamp, domainData, appVersion);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export function CommandMetadata_incrementVersion(delta, m) {
|
|
169
|
-
return new CommandMetadata$1(m.StreamId, incrementVersion(delta, m.Version), m.AppVersion, m.Timestamp, m.Domain);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export function CommandMetadata_withTimestamp(timestamp, metadata) {
|
|
173
|
-
return new CommandMetadata$1(metadata.StreamId, metadata.Version, metadata.AppVersion, timestamp, metadata.Domain);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
export function CommandMetadata_toEventMetadata(metadata, eventDomainMetadata) {
|
|
177
|
-
return new EventMetadata$1(metadata.StreamId, metadata.Version, metadata.AppVersion, metadata.Timestamp, eventDomainMetadata);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
export class Command$2 extends Record {
|
|
181
|
-
constructor(Id, CausationId, CorrelationId, Payload, Metadata) {
|
|
182
|
-
super();
|
|
183
|
-
this.Id = Id;
|
|
184
|
-
this.CausationId = CausationId;
|
|
185
|
-
this.CorrelationId = CorrelationId;
|
|
186
|
-
this.Payload = Payload;
|
|
187
|
-
this.Metadata = Metadata;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export function Command$2_$reflection(gen0, gen1) {
|
|
192
|
-
return record_type("Basic.Profile.Domain.CommonTypes.Command`2", [gen0, gen1], Command$2, () => [["Id", CommandId_$reflection()], ["CausationId", CausationId_$reflection()], ["CorrelationId", CorrelationId_$reflection()], ["Payload", gen0], ["Metadata", CommandMetadata$1_$reflection(gen1)]]);
|
|
193
|
-
}
|
|
194
|
-
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { Record, Union } from "../../../../fable_modules/fable-library-js.4.20.0/Types.js";
|
|
2
|
-
import { record_type, bool_type, union_type } from "../../../../fable_modules/fable-library-js.4.20.0/Reflection.js";
|
|
3
|
-
|
|
4
|
-
export class OwnershipDto extends Union {
|
|
5
|
-
constructor(tag, fields) {
|
|
6
|
-
super();
|
|
7
|
-
this.tag = tag;
|
|
8
|
-
this.fields = fields;
|
|
9
|
-
}
|
|
10
|
-
cases() {
|
|
11
|
-
return ["Specific", "Inherited", "Default"];
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function OwnershipDto_$reflection() {
|
|
16
|
-
return union_type("Basic.Profile.Domain.Config.Api.Admin.Read.OwnershipDto", [], OwnershipDto, () => [[], [], []]);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export class ConfigDto extends Record {
|
|
20
|
-
constructor(AdminUserManagementEnabled, Ownership) {
|
|
21
|
-
super();
|
|
22
|
-
this.AdminUserManagementEnabled = AdminUserManagementEnabled;
|
|
23
|
-
this.Ownership = Ownership;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export function ConfigDto_$reflection() {
|
|
28
|
-
return record_type("Basic.Profile.Domain.Config.Api.Admin.Read.ConfigDto", [], ConfigDto, () => [["AdminUserManagementEnabled", bool_type], ["Ownership", OwnershipDto_$reflection()]]);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function ConfigDto_get_Default() {
|
|
32
|
-
return new ConfigDto(false, new OwnershipDto(2, []));
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function ofDomain(ownership, content) {
|
|
36
|
-
return new ConfigDto(content.AdminUserManagementEnabled, ownership);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export function ofAccountConfig(config) {
|
|
40
|
-
switch (config.tag) {
|
|
41
|
-
case 1:
|
|
42
|
-
return ofDomain(new OwnershipDto(1, []), config.fields[0]);
|
|
43
|
-
case 0:
|
|
44
|
-
return ofDomain(new OwnershipDto(2, []), config.fields[0]);
|
|
45
|
-
default:
|
|
46
|
-
return ofDomain(new OwnershipDto(0, []), config.fields[0]);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export function ofPartnerConfig(config) {
|
|
51
|
-
if (config.tag === 0) {
|
|
52
|
-
return ofDomain(new OwnershipDto(2, []), config.fields[0]);
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
return ofDomain(new OwnershipDto(0, []), config.fields[0]);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Record } from "../../../../fable_modules/fable-library-js.4.20.0/Types.js";
|
|
2
|
-
import { record_type, bool_type } from "../../../../fable_modules/fable-library-js.4.20.0/Reflection.js";
|
|
3
|
-
import { ConfigCommandPayload, UpdateOrCreateCommandDetails } from "../../Commands.jsx";
|
|
4
|
-
|
|
5
|
-
export class ConfigPutDto extends Record {
|
|
6
|
-
constructor(AdminUserManagementEnabled) {
|
|
7
|
-
super();
|
|
8
|
-
this.AdminUserManagementEnabled = AdminUserManagementEnabled;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function ConfigPutDto_$reflection() {
|
|
13
|
-
return record_type("Basic.Profile.Domain.Config.Api.Admin.Write.ConfigPutDto", [], ConfigPutDto, () => [["AdminUserManagementEnabled", bool_type]]);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function ConfigPutDtoModule_toCreateCommandPayload(dto) {
|
|
17
|
-
return new ConfigCommandPayload(0, [new UpdateOrCreateCommandDetails(dto.AdminUserManagementEnabled)]);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export function ConfigPutDtoModule_toUpdateCommandPayload(dto) {
|
|
21
|
-
return new ConfigCommandPayload(1, [new UpdateOrCreateCommandDetails(dto.AdminUserManagementEnabled)]);
|
|
22
|
-
}
|
|
23
|
-
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Record } from "../../../../fable_modules/fable-library-js.4.20.0/Types.js";
|
|
2
|
-
import { record_type, bool_type } from "../../../../fable_modules/fable-library-js.4.20.0/Reflection.js";
|
|
3
|
-
|
|
4
|
-
export class ConfigDto extends Record {
|
|
5
|
-
constructor(AdminUserManagementEnabled) {
|
|
6
|
-
super();
|
|
7
|
-
this.AdminUserManagementEnabled = AdminUserManagementEnabled;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function ConfigDto_$reflection() {
|
|
12
|
-
return record_type("Basic.Profile.Domain.Config.Api.FlareAdminShell.Read.ConfigDto", [], ConfigDto, () => [["AdminUserManagementEnabled", bool_type]]);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function ofDomain(content) {
|
|
16
|
-
return new ConfigDto(content.AdminUserManagementEnabled);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function ofAccountConfig(config) {
|
|
20
|
-
let content;
|
|
21
|
-
switch (config.tag) {
|
|
22
|
-
case 1: {
|
|
23
|
-
content = config.fields[0];
|
|
24
|
-
break;
|
|
25
|
-
}
|
|
26
|
-
case 0: {
|
|
27
|
-
content = config.fields[0];
|
|
28
|
-
break;
|
|
29
|
-
}
|
|
30
|
-
default:
|
|
31
|
-
content = config.fields[0];
|
|
32
|
-
}
|
|
33
|
-
return ofDomain(content);
|
|
34
|
-
}
|
|
35
|
-
|