@flarehr/superhero-basic-profile 0.1.2217 → 0.1.2219

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/assets/delete.dcc7b157.svg +5 -0
  2. package/dist/assets/dialog-warning.cc77f3ba.svg +5 -0
  3. package/dist/assets/pencil.05fe6be6.svg +5 -0
  4. package/dist/index.html +20 -0
  5. package/dist/superhero-basic-profile.js +50 -0
  6. package/package.json +1 -1
  7. package/dist/App.jsx +0 -4
  8. package/dist/Basic.Profile.Domain/AnalyticsEvent.jsx +0 -102
  9. package/dist/Basic.Profile.Domain/Audit.jsx +0 -149
  10. package/dist/Basic.Profile.Domain/Commands.jsx +0 -68
  11. package/dist/Basic.Profile.Domain/CommonTypes.jsx +0 -194
  12. package/dist/Basic.Profile.Domain/Config/Api/Admin/Read.jsx +0 -58
  13. package/dist/Basic.Profile.Domain/Config/Api/Admin/Write.jsx +0 -23
  14. package/dist/Basic.Profile.Domain/Config/Api/FlareAdminShell/Read.jsx +0 -35
  15. package/dist/Basic.Profile.Domain/Config/Commands.jsx +0 -72
  16. package/dist/Basic.Profile.Domain/Config/ConfigCommandHandler.jsx +0 -197
  17. package/dist/Basic.Profile.Domain/Config/Dto.jsx +0 -181
  18. package/dist/Basic.Profile.Domain/Config/Types.jsx +0 -152
  19. package/dist/Basic.Profile.Domain/DateTimeProvider.jsx +0 -23
  20. package/dist/Basic.Profile.Domain/DomainAggregates.jsx +0 -801
  21. package/dist/Basic.Profile.Domain/DomainPrimitives.jsx +0 -426
  22. package/dist/Basic.Profile.Domain/Dto/Aggregates.jsx +0 -564
  23. package/dist/Basic.Profile.Domain/Dto/AnalyticsEvent.jsx +0 -157
  24. package/dist/Basic.Profile.Domain/Dto/Api/Backend/Common.jsx +0 -102
  25. package/dist/Basic.Profile.Domain/Dto/Api/Backend/Read.jsx +0 -85
  26. package/dist/Basic.Profile.Domain/Dto/Api/Backend/Write.jsx +0 -16
  27. package/dist/Basic.Profile.Domain/Dto/Api/Common.jsx +0 -427
  28. package/dist/Basic.Profile.Domain/Dto/Api/External/Read.jsx +0 -118
  29. package/dist/Basic.Profile.Domain/Dto/Api/External/ReadV2.jsx +0 -6
  30. package/dist/Basic.Profile.Domain/Dto/Api/External/Write.jsx +0 -184
  31. package/dist/Basic.Profile.Domain/Dto/Api/External/WriteV2.jsx +0 -439
  32. package/dist/Basic.Profile.Domain/Dto/Api/FlareAdminShell/Read.jsx +0 -38
  33. package/dist/Basic.Profile.Domain/Dto/Api/FlareAdminShell/Write.jsx +0 -199
  34. package/dist/Basic.Profile.Domain/Dto/Api/Internal/Read.jsx +0 -125
  35. package/dist/Basic.Profile.Domain/Dto/Audit.jsx +0 -121
  36. package/dist/Basic.Profile.Domain/Dto/Commands.jsx +0 -256
  37. package/dist/Basic.Profile.Domain/Dto/Common.jsx +0 -84
  38. package/dist/Basic.Profile.Domain/Dto/Events.jsx +0 -220
  39. package/dist/Basic.Profile.Domain/Dto/Primitives.jsx +0 -580
  40. package/dist/Basic.Profile.Domain/Dto/ProfileCreationModels.jsx +0 -324
  41. package/dist/Basic.Profile.Domain/Dto/Validation.jsx +0 -229
  42. package/dist/Basic.Profile.Domain/Events.jsx +0 -64
  43. package/dist/Basic.Profile.Domain/Import/Api/InternalApi/Read.jsx +0 -140
  44. package/dist/Basic.Profile.Domain/Import/Api/InternalApi/Validation.jsx +0 -499
  45. package/dist/Basic.Profile.Domain/Import/Api/InternalApi/Write.jsx +0 -51
  46. package/dist/Basic.Profile.Domain/Import/Api/Read.jsx +0 -154
  47. package/dist/Basic.Profile.Domain/Import/CommonTypes.jsx +0 -187
  48. package/dist/Basic.Profile.Domain/Import/Dto.jsx +0 -475
  49. package/dist/Basic.Profile.Domain/Import/ImportCommandHandler.jsx +0 -531
  50. package/dist/Basic.Profile.Domain/Import/Types.jsx +0 -405
  51. package/dist/Basic.Profile.Domain/JwtPayload.jsx +0 -44
  52. package/dist/Basic.Profile.Domain/Metadata.jsx +0 -257
  53. package/dist/Basic.Profile.Domain/ProfileCommandHandler.jsx +0 -261
  54. package/dist/Basic.Profile.Domain/ProfileModels.jsx +0 -59
  55. package/dist/Basic.Profile.Domain/Utils.jsx +0 -372
  56. package/dist/Common/PreactCustomElement.jsx +0 -8
  57. package/dist/Common/Resources.jsx +0 -20
  58. package/dist/Common/Tailwind.jsx +0 -8
  59. package/dist/Common/Utils.jsx +0 -18
  60. package/dist/Directory/App.jsx +0 -192
  61. package/dist/Directory/BackendServices/Common.jsx +0 -115
  62. package/dist/Directory/BackendServices/ConfigService.jsx +0 -168
  63. package/dist/Directory/BackendServices/ImportService.jsx +0 -137
  64. package/dist/Directory/Common.jsx +0 -93
  65. package/dist/Directory/Config/Components.jsx +0 -173
  66. package/dist/Directory/Config/Types.jsx +0 -187
  67. package/dist/Directory/PastImports/PastImports.jsx +0 -81
  68. package/dist/Directory/ProfileImport/ProfileImport.jsx +0 -284
  69. package/dist/Directory/ProfileImport/Types.jsx +0 -91
  70. package/dist/Directory/TabNav.jsx +0 -24
  71. package/dist/Directory/Types.jsx +0 -101
  72. package/dist/Directory/User.jsx +0 -117
  73. package/dist/HeadlessUI/Dialog.jsx +0 -66
  74. package/dist/HeadlessUI/ModalDialog.jsx +0 -74
  75. package/dist/HeadlessUI/Switch.jsx +0 -66
  76. package/dist/HeadlessUI/Transition.jsx +0 -66
@@ -1,51 +0,0 @@
1
- import { Record } from "../../../../fable_modules/fable-library-js.4.20.0/Types.js";
2
- import { list_type, int32_type, record_type, option_type, string_type } from "../../../../fable_modules/fable-library-js.4.20.0/Reflection.js";
3
-
4
- export class ImportProfileDataDto extends Record {
5
- constructor(FirstName, MiddleName, LastName, Email, MobileNumber, ExternalId, Title, Gender, DateOfBirth, AddressLine1, AddressLine2, City, State, Postcode, CountryCode) {
6
- super();
7
- this.FirstName = FirstName;
8
- this.MiddleName = MiddleName;
9
- this.LastName = LastName;
10
- this.Email = Email;
11
- this.MobileNumber = MobileNumber;
12
- this.ExternalId = ExternalId;
13
- this.Title = Title;
14
- this.Gender = Gender;
15
- this.DateOfBirth = DateOfBirth;
16
- this.AddressLine1 = AddressLine1;
17
- this.AddressLine2 = AddressLine2;
18
- this.City = City;
19
- this.State = State;
20
- this.Postcode = Postcode;
21
- this.CountryCode = CountryCode;
22
- }
23
- }
24
-
25
- export function ImportProfileDataDto_$reflection() {
26
- return record_type("Basic.Profile.Domain.Import.Api.InternalApi.Write.ImportProfileDataDto", [], ImportProfileDataDto, () => [["FirstName", option_type(string_type)], ["MiddleName", option_type(string_type)], ["LastName", option_type(string_type)], ["Email", option_type(string_type)], ["MobileNumber", option_type(string_type)], ["ExternalId", option_type(string_type)], ["Title", option_type(string_type)], ["Gender", option_type(string_type)], ["DateOfBirth", option_type(string_type)], ["AddressLine1", option_type(string_type)], ["AddressLine2", option_type(string_type)], ["City", option_type(string_type)], ["State", option_type(string_type)], ["Postcode", option_type(string_type)], ["CountryCode", option_type(string_type)]]);
27
- }
28
-
29
- export class ImportRowDataDto extends Record {
30
- constructor(RowId, Data) {
31
- super();
32
- this.RowId = (RowId | 0);
33
- this.Data = Data;
34
- }
35
- }
36
-
37
- export function ImportRowDataDto_$reflection() {
38
- return record_type("Basic.Profile.Domain.Import.Api.InternalApi.Write.ImportRowDataDto", [], ImportRowDataDto, () => [["RowId", int32_type], ["Data", ImportProfileDataDto_$reflection()]]);
39
- }
40
-
41
- export class ImportDataDto extends Record {
42
- constructor(Data) {
43
- super();
44
- this.Data = Data;
45
- }
46
- }
47
-
48
- export function ImportDataDto_$reflection() {
49
- return record_type("Basic.Profile.Domain.Import.Api.InternalApi.Write.ImportDataDto", [], ImportDataDto, () => [["Data", list_type(ImportRowDataDto_$reflection())]]);
50
- }
51
-
@@ -1,154 +0,0 @@
1
- import { Union, Record } from "../../../fable_modules/fable-library-js.4.20.0/Types.js";
2
- import { union_type, list_type, record_type, class_type, option_type, string_type, int32_type } from "../../../fable_modules/fable-library-js.4.20.0/Reflection.js";
3
- import { ActiveImportModule_importsRemaining, ImportIdModule_value } from "../Types.jsx";
4
- import { UtcDateTimeModule_value } from "../../DomainPrimitives.jsx";
5
- import { map as map_1, empty } from "../../../fable_modules/fable-library-js.4.20.0/List.js";
6
- import { map } from "../../../fable_modules/fable-library-js.4.20.0/Option.js";
7
-
8
- export class ActiveImportDto extends Record {
9
- constructor(ImportId, User, Filename, NumberOfRecords, CompletedSuccessfully, CompletedFailed, NextRow, StartTime) {
10
- super();
11
- this.ImportId = (ImportId | 0);
12
- this.User = User;
13
- this.Filename = Filename;
14
- this.NumberOfRecords = (NumberOfRecords | 0);
15
- this.CompletedSuccessfully = (CompletedSuccessfully | 0);
16
- this.CompletedFailed = (CompletedFailed | 0);
17
- this.NextRow = NextRow;
18
- this.StartTime = StartTime;
19
- }
20
- }
21
-
22
- export function ActiveImportDto_$reflection() {
23
- return record_type("Basic.Profile.Domain.Import.Api.Admin.Read.ActiveImportDto", [], ActiveImportDto, () => [["ImportId", int32_type], ["User", string_type], ["Filename", string_type], ["NumberOfRecords", int32_type], ["CompletedSuccessfully", int32_type], ["CompletedFailed", int32_type], ["NextRow", option_type(int32_type)], ["StartTime", class_type("System.DateTime")]]);
24
- }
25
-
26
- export function ActiveImportDtoModule_ofDomain(domain) {
27
- let matchValue;
28
- return new ActiveImportDto(ImportIdModule_value(domain.ImportId), (matchValue = domain.Actor, (matchValue.tag === 1) ? "Apollo Import" : matchValue.fields[0].Name), domain.FileInfo.Filename, domain.NumberOfRecords, domain.CompletedSuccessfully, domain.CompletedFailed, domain.NextRow, UtcDateTimeModule_value(domain.StartTime));
29
- }
30
-
31
- export class ImportHistoryDto extends Record {
32
- constructor(ImportId, User, Filename, NumberOfRecords, Succeeded, Failed, StartTime, StopTime) {
33
- super();
34
- this.ImportId = (ImportId | 0);
35
- this.User = User;
36
- this.Filename = Filename;
37
- this.NumberOfRecords = (NumberOfRecords | 0);
38
- this.Succeeded = (Succeeded | 0);
39
- this.Failed = (Failed | 0);
40
- this.StartTime = StartTime;
41
- this.StopTime = StopTime;
42
- }
43
- }
44
-
45
- export function ImportHistoryDto_$reflection() {
46
- return record_type("Basic.Profile.Domain.Import.Api.Admin.Read.ImportHistoryDto", [], ImportHistoryDto, () => [["ImportId", int32_type], ["User", string_type], ["Filename", string_type], ["NumberOfRecords", int32_type], ["Succeeded", int32_type], ["Failed", int32_type], ["StartTime", class_type("System.DateTime")], ["StopTime", class_type("System.DateTime")]]);
47
- }
48
-
49
- export function ImportHistoryDtoModule_ofDomain(domain) {
50
- let matchValue;
51
- return new ImportHistoryDto(ImportIdModule_value(domain.ImportId), (matchValue = domain.Actor, (matchValue.tag === 1) ? "Apollo Import" : matchValue.fields[0].Name), domain.FileInfo.Filename, domain.NumberOfRecords, domain.Succeeded, domain.Failed, UtcDateTimeModule_value(domain.StartTime), UtcDateTimeModule_value(domain.StopTime));
52
- }
53
-
54
- export class AccountImportsDto extends Record {
55
- constructor(ActiveImport, ImportHistory) {
56
- super();
57
- this.ActiveImport = ActiveImport;
58
- this.ImportHistory = ImportHistory;
59
- }
60
- }
61
-
62
- export function AccountImportsDto_$reflection() {
63
- return record_type("Basic.Profile.Domain.Import.Api.Admin.Read.AccountImportsDto", [], AccountImportsDto, () => [["ActiveImport", option_type(ActiveImportDto_$reflection())], ["ImportHistory", list_type(ImportHistoryDto_$reflection())]]);
64
- }
65
-
66
- export const AccountImportsDtoModule_empty = new AccountImportsDto(undefined, empty());
67
-
68
- export function AccountImportsDtoModule_ofDomain(domain) {
69
- return new AccountImportsDto(map(ActiveImportDtoModule_ofDomain, domain.ActiveImport), map_1(ImportHistoryDtoModule_ofDomain, domain.ImportHistory));
70
- }
71
-
72
- export class FieldError extends Record {
73
- constructor(Column, Message) {
74
- super();
75
- this.Column = Column;
76
- this.Message = Message;
77
- }
78
- }
79
-
80
- export function FieldError_$reflection() {
81
- return record_type("Basic.Profile.Domain.Import.Api.Admin.Read.FieldError", [], FieldError, () => [["Column", string_type], ["Message", string_type]]);
82
- }
83
-
84
- export class RowValidationError extends Record {
85
- constructor(RowId, FieldErrors) {
86
- super();
87
- this.RowId = (RowId | 0);
88
- this.FieldErrors = FieldErrors;
89
- }
90
- }
91
-
92
- export function RowValidationError_$reflection() {
93
- return record_type("Basic.Profile.Domain.Import.Api.Admin.Read.RowValidationError", [], RowValidationError, () => [["RowId", int32_type], ["FieldErrors", list_type(FieldError_$reflection())]]);
94
- }
95
-
96
- export class PostImportError extends Union {
97
- constructor(tag, fields) {
98
- super();
99
- this.tag = tag;
100
- this.fields = fields;
101
- }
102
- cases() {
103
- return ["InvalidFileContentType", "InvalidFileName", "ExceedsMaxRows", "FileFormatError", "NoData", "NoFile", "MultipleFiles", "RowValidationErrors", "UnknownAccount", "ImportInProgress"];
104
- }
105
- }
106
-
107
- export function PostImportError_$reflection() {
108
- return union_type("Basic.Profile.Domain.Import.Api.Admin.Read.PostImportError", [], PostImportError, () => [[], [], [], [["Item", string_type]], [], [], [], [["Item", list_type(RowValidationError_$reflection())]], [], []]);
109
- }
110
-
111
- export class ImportDto extends Record {
112
- constructor(ImportId, User, Filename, TotalRecordCount, SucceededRecordCount, FailedRecordCount, FailedRecords, RemainingRecordCount, StartTime, StopTime) {
113
- super();
114
- this.ImportId = (ImportId | 0);
115
- this.User = User;
116
- this.Filename = Filename;
117
- this.TotalRecordCount = (TotalRecordCount | 0);
118
- this.SucceededRecordCount = (SucceededRecordCount | 0);
119
- this.FailedRecordCount = (FailedRecordCount | 0);
120
- this.FailedRecords = FailedRecords;
121
- this.RemainingRecordCount = (RemainingRecordCount | 0);
122
- this.StartTime = StartTime;
123
- this.StopTime = StopTime;
124
- }
125
- }
126
-
127
- export function ImportDto_$reflection() {
128
- return record_type("Basic.Profile.Domain.Import.Api.Admin.Read.ImportDto", [], ImportDto, () => [["ImportId", int32_type], ["User", string_type], ["Filename", string_type], ["TotalRecordCount", int32_type], ["SucceededRecordCount", int32_type], ["FailedRecordCount", int32_type], ["FailedRecords", list_type(FailedImportRecordDto_$reflection())], ["RemainingRecordCount", int32_type], ["StartTime", class_type("System.DateTime")], ["StopTime", option_type(class_type("System.DateTime"))]]);
129
- }
130
-
131
- export class FailedImportRecordDto extends Record {
132
- constructor(RowId, Reason) {
133
- super();
134
- this.RowId = (RowId | 0);
135
- this.Reason = Reason;
136
- }
137
- }
138
-
139
- export function FailedImportRecordDto_$reflection() {
140
- return record_type("Basic.Profile.Domain.Import.Api.Admin.Read.FailedImportRecordDto", [], FailedImportRecordDto, () => [["RowId", int32_type], ["Reason", string_type]]);
141
- }
142
-
143
- export function ImportDtoModule_ofDomain(importStatus, rowFailures) {
144
- let matchValue_1, matchValue;
145
- if (importStatus.tag === 1) {
146
- const historicalImport = importStatus.fields[0];
147
- return new ImportDto(ImportIdModule_value(historicalImport.ImportId), (matchValue_1 = historicalImport.Actor, (matchValue_1.tag === 1) ? "Apollo Import" : matchValue_1.fields[0].Name), historicalImport.FileInfo.Filename, historicalImport.NumberOfRecords, historicalImport.Succeeded, historicalImport.Failed, map_1((tupledArg_1) => (new FailedImportRecordDto(tupledArg_1[0], tupledArg_1[1])), rowFailures), 0, UtcDateTimeModule_value(historicalImport.StartTime), UtcDateTimeModule_value(historicalImport.StopTime));
148
- }
149
- else {
150
- const activeImport = importStatus.fields[0];
151
- return new ImportDto(ImportIdModule_value(activeImport.ImportId), (matchValue = activeImport.Actor, (matchValue.tag === 1) ? "Apollo Import" : matchValue.fields[0].Name), activeImport.FileInfo.Filename, activeImport.NumberOfRecords, activeImport.CompletedSuccessfully, activeImport.CompletedFailed, map_1((tupledArg) => (new FailedImportRecordDto(tupledArg[0], tupledArg[1])), rowFailures), ActiveImportModule_importsRemaining(activeImport), UtcDateTimeModule_value(activeImport.StartTime), undefined);
152
- }
153
- }
154
-
@@ -1,187 +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 { AppVersion_$reflection, StreamId_$reflection } from "../Metadata.jsx";
5
- import { AccountId_$reflection, PartnerId_$reflection, UtcDateTime_$reflection } from "../DomainPrimitives.jsx";
6
- import { CommandIdModule_value, 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.Import.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.Import.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.Import.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.Import.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.Import.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.Import.CommonTypes.AggregateMetadata`1", [gen0], AggregateMetadata$1, () => [["StreamId", StreamId_$reflection()], ["Version", int32_type], ["CreatedAt", UtcDateTime_$reflection()], ["UpdatedAt", UtcDateTime_$reflection()], ["Domain", gen0]]);
131
- }
132
-
133
- export function AggregateMetadata_incrementVersion(metadata, timestamp) {
134
- return new AggregateMetadata$1(metadata.StreamId, metadata.Version + 1, metadata.CreatedAt, timestamp, metadata.Domain);
135
- }
136
-
137
- export class Aggregate$2 extends Record {
138
- constructor(Data, Metadata) {
139
- super();
140
- this.Data = Data;
141
- this.Metadata = Metadata;
142
- }
143
- }
144
-
145
- export function Aggregate$2_$reflection(gen0, gen1) {
146
- return record_type("Basic.Profile.Domain.Import.CommonTypes.Aggregate`2", [gen0, gen1], Aggregate$2, () => [["Data", gen0], ["Metadata", AggregateMetadata$1_$reflection(gen1)]]);
147
- }
148
-
149
- export function ErrorMessageModule_startsWith(prefix, errorMessage) {
150
- return errorMessage.indexOf(prefix) === 0;
151
- }
152
-
153
- export class CommandMetadata extends Record {
154
- constructor(PartnerId, AccountId, StreamId, Version, AppVersion, Timestamp) {
155
- super();
156
- this.PartnerId = PartnerId;
157
- this.AccountId = AccountId;
158
- this.StreamId = StreamId;
159
- this.Version = (Version | 0);
160
- this.AppVersion = AppVersion;
161
- this.Timestamp = Timestamp;
162
- }
163
- }
164
-
165
- export function CommandMetadata_$reflection() {
166
- return record_type("Basic.Profile.Domain.Import.CommonTypes.CommandMetadata", [], CommandMetadata, () => [["PartnerId", PartnerId_$reflection()], ["AccountId", AccountId_$reflection()], ["StreamId", StreamId_$reflection()], ["Version", int32_type], ["AppVersion", AppVersion_$reflection()], ["Timestamp", UtcDateTime_$reflection()]]);
167
- }
168
-
169
- export class Command$1 extends Record {
170
- constructor(Id, CausationId, CorrelationId, Payload, Metadata) {
171
- super();
172
- this.Id = Id;
173
- this.CausationId = CausationId;
174
- this.CorrelationId = CorrelationId;
175
- this.Payload = Payload;
176
- this.Metadata = Metadata;
177
- }
178
- }
179
-
180
- export function Command$1_$reflection(gen0) {
181
- return record_type("Basic.Profile.Domain.Import.CommonTypes.Command`1", [gen0], Command$1, () => [["Id", CommandId_$reflection()], ["CausationId", CausationId_$reflection()], ["CorrelationId", CorrelationId_$reflection()], ["Payload", gen0], ["Metadata", CommandMetadata_$reflection()]]);
182
- }
183
-
184
- export function Command_toEvent(domainMetadata, currentVersion, command, eventPayload) {
185
- return new Event$2(EventIdModule_generate(), CausationIdModule_create(CommandIdModule_value(command.Id)), command.CorrelationId, eventPayload, new EventMetadata$1(command.Metadata.StreamId, currentVersion + 1, command.Metadata.AppVersion, command.Metadata.Timestamp, domainMetadata));
186
- }
187
-