@sphereon/ssi-sdk.data-store 0.18.2-next.9 → 0.18.2-unstable.13
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/LICENSE +201 -201
- package/README.md +77 -77
- package/dist/contact/AbstractContactStore.d.ts +23 -23
- package/dist/contact/AbstractContactStore.js +6 -6
- package/dist/contact/ContactStore.d.ts +32 -32
- package/dist/contact/ContactStore.js +365 -365
- package/dist/entities/contact/BaseConfigEntity.d.ts +6 -6
- package/dist/entities/contact/BaseConfigEntity.js +33 -33
- package/dist/entities/contact/BaseContactEntity.d.ts +9 -9
- package/dist/entities/contact/BaseContactEntity.js +53 -53
- package/dist/entities/contact/ConnectionEntity.d.ts +10 -10
- package/dist/entities/contact/ConnectionEntity.js +46 -46
- package/dist/entities/contact/ContactEntity.d.ts +16 -0
- package/dist/entities/contact/ContactEntity.d.ts.map +1 -0
- package/dist/entities/contact/ContactEntity.js +164 -0
- package/dist/entities/contact/ContactEntity.js.map +1 -0
- package/dist/entities/contact/CorrelationIdentifierEntity.d.ts +10 -10
- package/dist/entities/contact/CorrelationIdentifierEntity.js +71 -71
- package/dist/entities/contact/DidAuthConfigEntity.d.ts +6 -6
- package/dist/entities/contact/DidAuthConfigEntity.js +32 -32
- package/dist/entities/contact/ElectronicAddressEntity.d.ts +13 -13
- package/dist/entities/contact/ElectronicAddressEntity.js +91 -91
- package/dist/entities/contact/IdentityEntity.d.ts +20 -20
- package/dist/entities/contact/IdentityEntity.js +128 -128
- package/dist/entities/contact/IdentityMetadataItemEntity.d.ts +9 -9
- package/dist/entities/contact/IdentityMetadataItemEntity.js +68 -68
- package/dist/entities/contact/NaturalPersonEntity.d.ts +8 -8
- package/dist/entities/contact/NaturalPersonEntity.js +71 -71
- package/dist/entities/contact/OpenIdConfigEntity.d.ts +10 -10
- package/dist/entities/contact/OpenIdConfigEntity.js +48 -48
- package/dist/entities/contact/OrganizationEntity.d.ts +8 -8
- package/dist/entities/contact/OrganizationEntity.js +66 -66
- package/dist/entities/contact/PartyEntity.d.ts +19 -19
- package/dist/entities/contact/PartyEntity.js +131 -131
- package/dist/entities/contact/PartyRelationshipEntity.d.ts +12 -12
- package/dist/entities/contact/PartyRelationshipEntity.js +94 -94
- package/dist/entities/contact/PartyTypeEntity.d.ts +14 -14
- package/dist/entities/contact/PartyTypeEntity.js +103 -103
- package/dist/entities/eventLogger/AuditEventEntity.d.ts +26 -26
- package/dist/entities/eventLogger/AuditEventEntity.js +123 -123
- package/dist/entities/eventLogger/AuditEventEntity.js.map +1 -1
- package/dist/entities/issuanceBranding/BackgroundAttributesEntity.d.ts +10 -10
- package/dist/entities/issuanceBranding/BackgroundAttributesEntity.js +73 -73
- package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.d.ts +17 -17
- package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.js +119 -119
- package/dist/entities/issuanceBranding/CredentialBrandingEntity.d.ts +14 -14
- package/dist/entities/issuanceBranding/CredentialBrandingEntity.js +101 -101
- package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.d.ts +8 -8
- package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.js +48 -48
- package/dist/entities/issuanceBranding/ImageAttributesEntity.d.ts +13 -13
- package/dist/entities/issuanceBranding/ImageAttributesEntity.js +91 -91
- package/dist/entities/issuanceBranding/ImageDimensionsEntity.d.ts +8 -8
- package/dist/entities/issuanceBranding/ImageDimensionsEntity.js +38 -38
- package/dist/entities/issuanceBranding/IssuerBrandingEntity.d.ts +13 -13
- package/dist/entities/issuanceBranding/IssuerBrandingEntity.js +94 -94
- package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.d.ts +8 -8
- package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.js +48 -48
- package/dist/entities/issuanceBranding/TextAttributesEntity.d.ts +8 -8
- package/dist/entities/issuanceBranding/TextAttributesEntity.js +61 -61
- package/dist/entities/statusList2021/StatusList2021Entity.d.ts +18 -18
- package/dist/entities/statusList2021/StatusList2021Entity.js +114 -114
- package/dist/entities/statusList2021/StatusList2021EntryEntity.d.ts +10 -10
- package/dist/entities/statusList2021/StatusList2021EntryEntity.js +50 -50
- package/dist/entities/validators/index.d.ts +6 -6
- package/dist/entities/validators/index.js +26 -26
- package/dist/eventLogger/AbstractEventLoggerStore.d.ts +6 -6
- package/dist/eventLogger/AbstractEventLoggerStore.js +6 -6
- package/dist/eventLogger/EventLoggerStore.d.ts +12 -12
- package/dist/eventLogger/EventLoggerStore.js +43 -43
- package/dist/index.d.ts +41 -41
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +127 -131
- package/dist/index.js.map +1 -1
- package/dist/issuanceBranding/AbstractIssuanceBrandingStore.d.ts +19 -19
- package/dist/issuanceBranding/AbstractIssuanceBrandingStore.js +6 -6
- package/dist/issuanceBranding/IssuanceBrandingStore.d.ts +30 -30
- package/dist/issuanceBranding/IssuanceBrandingStore.js +374 -374
- package/dist/migrations/generic/1-CreateContacts.d.ts +6 -6
- package/dist/migrations/generic/1-CreateContacts.js +77 -77
- package/dist/migrations/generic/1-CreateIssuanceBranding.d.ts +7 -0
- package/dist/migrations/generic/1-CreateIssuanceBranding.d.ts.map +1 -0
- package/dist/migrations/generic/1-CreateIssuanceBranding.js +96 -0
- package/dist/migrations/generic/1-CreateIssuanceBranding.js.map +1 -0
- package/dist/migrations/generic/2-CreateContacts.d.ts +7 -0
- package/dist/migrations/generic/2-CreateContacts.d.ts.map +1 -0
- package/dist/migrations/generic/2-CreateContacts.js +78 -0
- package/dist/migrations/generic/2-CreateContacts.js.map +1 -0
- package/dist/migrations/generic/2-CreateIssuanceBranding.d.ts +6 -6
- package/dist/migrations/generic/2-CreateIssuanceBranding.js +77 -77
- package/dist/migrations/generic/3-CreateContacts.d.ts +6 -6
- package/dist/migrations/generic/3-CreateContacts.js +77 -77
- package/dist/migrations/generic/3-CreateStatusList.d.ts +7 -0
- package/dist/migrations/generic/3-CreateStatusList.d.ts.map +1 -0
- package/dist/migrations/generic/3-CreateStatusList.js +72 -0
- package/dist/migrations/generic/3-CreateStatusList.js.map +1 -0
- package/dist/migrations/generic/4-CreateStatusList.d.ts +6 -6
- package/dist/migrations/generic/4-CreateStatusList.js +71 -71
- package/dist/migrations/generic/5-CreateAuditEvents.d.ts +6 -6
- package/dist/migrations/generic/5-CreateAuditEvents.js +77 -77
- package/dist/migrations/generic/index.d.ts +16 -16
- package/dist/migrations/generic/index.js +27 -27
- package/dist/migrations/index.d.ts +1 -1
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/migrations/index.js +5 -9
- package/dist/migrations/index.js.map +1 -1
- package/dist/migrations/internal-migrations-ormconfig.d.ts +6 -6
- package/dist/migrations/internal-migrations-ormconfig.js +26 -26
- package/dist/migrations/postgres/1659463079428-CreateContacts.d.ts +6 -6
- package/dist/migrations/postgres/1659463079428-CreateContacts.js +56 -56
- package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.d.ts +6 -6
- package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.js +68 -68
- package/dist/migrations/postgres/1690925872592-CreateContacts.d.ts +6 -6
- package/dist/migrations/postgres/1690925872592-CreateContacts.js +68 -68
- package/dist/migrations/postgres/1693866470001-CreateStatusList.d.ts +6 -6
- package/dist/migrations/postgres/1693866470001-CreateStatusList.js +31 -31
- package/dist/migrations/postgres/1701634812183-CreateAuditEvents.d.ts +6 -6
- package/dist/migrations/postgres/1701634812183-CreateAuditEvents.js +42 -42
- package/dist/migrations/postgres/1701634812183-CreateAuditEvents.js.map +1 -1
- package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.d.ts +7 -0
- package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.d.ts.map +1 -0
- package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.js +32 -0
- package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.js.map +1 -0
- package/dist/migrations/postgres/uuid.d.ts +3 -0
- package/dist/migrations/postgres/uuid.d.ts.map +1 -0
- package/dist/migrations/postgres/uuid.js +25 -0
- package/dist/migrations/postgres/uuid.js.map +1 -0
- package/dist/migrations/sqlite/1659463069549-CreateContacts.d.ts +6 -6
- package/dist/migrations/sqlite/1659463069549-CreateContacts.js +78 -78
- package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.d.ts +6 -6
- package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.js +88 -88
- package/dist/migrations/sqlite/1690925872693-CreateContacts.d.ts +6 -6
- package/dist/migrations/sqlite/1690925872693-CreateContacts.js +107 -107
- package/dist/migrations/sqlite/1693866470000-CreateStatusList.d.ts +6 -6
- package/dist/migrations/sqlite/1693866470000-CreateStatusList.js +31 -31
- package/dist/migrations/sqlite/1701634819487-CreateAuditEvents.d.ts +6 -6
- package/dist/migrations/sqlite/1701634819487-CreateAuditEvents.js +28 -28
- package/dist/migrations/sqlite/1701634819487-CreateAuditEvents.js.map +1 -1
- package/dist/statusList/IStatusListStore.d.ts +19 -19
- package/dist/statusList/IStatusListStore.js +2 -2
- package/dist/statusList/StatusListStore.d.ts +35 -35
- package/dist/statusList/StatusListStore.js +212 -212
- package/dist/types/contact/IAbstractContactStore.d.ts +74 -74
- package/dist/types/contact/IAbstractContactStore.js +2 -2
- package/dist/types/contact/contact.d.ts +173 -173
- package/dist/types/contact/contact.js +25 -25
- package/dist/types/eventLogger/IAbstractEventLoggerStore.d.ts +9 -9
- package/dist/types/eventLogger/IAbstractEventLoggerStore.js +2 -2
- package/dist/types/eventLogger/eventLogger.d.ts +2 -2
- package/dist/types/eventLogger/eventLogger.js +2 -2
- package/dist/types/index.d.ts +9 -9
- package/dist/types/index.js +25 -25
- package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.d.ts +58 -58
- package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.js +2 -2
- package/dist/types/issuanceBranding/issuanceBranding.d.ts +114 -114
- package/dist/types/issuanceBranding/issuanceBranding.js +2 -2
- package/dist/types/statusList/IAbstractStatusListStore.d.ts +37 -37
- package/dist/types/statusList/IAbstractStatusListStore.js +2 -2
- package/dist/types/statusList/statusList.d.ts +24 -24
- package/dist/types/statusList/statusList.js +2 -2
- package/dist/types/validation/validation.d.ts +3 -3
- package/dist/types/validation/validation.js +2 -2
- package/dist/utils/ValidatorUtils.d.ts +3 -3
- package/dist/utils/ValidatorUtils.js +12 -12
- package/dist/utils/contact/MappingUtils.d.ts +46 -46
- package/dist/utils/contact/MappingUtils.js +290 -290
- package/package.json +4 -4
- package/src/__tests__/eventLogger.entities.test.ts +73 -73
- package/src/__tests__/eventLogger.store.test.ts +136 -136
- package/src/contact/ContactStore.ts +501 -501
- package/src/entities/eventLogger/AuditEventEntity.ts +99 -99
- package/src/entities/statusList2021/StatusList2021Entity.ts +96 -96
- package/src/eventLogger/AbstractEventLoggerStore.ts +7 -7
- package/src/eventLogger/EventLoggerStore.ts +62 -62
- package/src/index.ts +113 -119
- package/src/migrations/generic/1-CreateContacts.ts +66 -66
- package/src/migrations/generic/2-CreateIssuanceBranding.ts +64 -64
- package/src/migrations/generic/3-CreateContacts.ts +66 -66
- package/src/migrations/generic/4-CreateStatusList.ts +54 -54
- package/src/migrations/generic/5-CreateAuditEvents.ts +66 -66
- package/src/migrations/generic/index.ts +27 -27
- package/src/migrations/index.ts +1 -7
- package/src/migrations/postgres/1693866470001-CreateStatusList.ts +24 -24
- package/src/migrations/postgres/1701634812183-CreateAuditEvents.ts +33 -33
- package/src/migrations/sqlite/1690925872693-CreateContacts.ts +163 -163
- package/src/migrations/sqlite/1701634819487-CreateAuditEvents.ts +15 -15
- package/src/types/eventLogger/IAbstractEventLoggerStore.ts +12 -12
- package/src/types/eventLogger/eventLogger.ts +3 -3
- package/src/types/index.ts +9 -9
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BaseEntity } from 'typeorm';
|
|
2
|
-
import { ConnectionEntity } from './ConnectionEntity';
|
|
3
|
-
export declare abstract class BaseConfigEntity extends BaseEntity {
|
|
4
|
-
id: string;
|
|
5
|
-
connection?: ConnectionEntity;
|
|
6
|
-
}
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { ConnectionEntity } from './ConnectionEntity';
|
|
3
|
+
export declare abstract class BaseConfigEntity extends BaseEntity {
|
|
4
|
+
id: string;
|
|
5
|
+
connection?: ConnectionEntity;
|
|
6
|
+
}
|
|
7
7
|
//# sourceMappingURL=BaseConfigEntity.d.ts.map
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.BaseConfigEntity = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const ConnectionEntity_1 = require("./ConnectionEntity");
|
|
15
|
-
let BaseConfigEntity = class BaseConfigEntity extends typeorm_1.BaseEntity {
|
|
16
|
-
};
|
|
17
|
-
__decorate([
|
|
18
|
-
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
19
|
-
__metadata("design:type", String)
|
|
20
|
-
], BaseConfigEntity.prototype, "id", void 0);
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, typeorm_1.OneToOne)(() => ConnectionEntity_1.ConnectionEntity, (connection) => connection.config, {
|
|
23
|
-
cascade: ['insert', 'update'],
|
|
24
|
-
onDelete: 'CASCADE',
|
|
25
|
-
}),
|
|
26
|
-
(0, typeorm_1.JoinColumn)({ name: 'connection_id' }),
|
|
27
|
-
__metadata("design:type", ConnectionEntity_1.ConnectionEntity)
|
|
28
|
-
], BaseConfigEntity.prototype, "connection", void 0);
|
|
29
|
-
BaseConfigEntity = __decorate([
|
|
30
|
-
(0, typeorm_1.Entity)('BaseConfig'),
|
|
31
|
-
(0, typeorm_1.TableInheritance)({ column: { type: 'varchar', name: 'type' } })
|
|
32
|
-
], BaseConfigEntity);
|
|
33
|
-
exports.BaseConfigEntity = BaseConfigEntity;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.BaseConfigEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const ConnectionEntity_1 = require("./ConnectionEntity");
|
|
15
|
+
let BaseConfigEntity = class BaseConfigEntity extends typeorm_1.BaseEntity {
|
|
16
|
+
};
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], BaseConfigEntity.prototype, "id", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.OneToOne)(() => ConnectionEntity_1.ConnectionEntity, (connection) => connection.config, {
|
|
23
|
+
cascade: ['insert', 'update'],
|
|
24
|
+
onDelete: 'CASCADE',
|
|
25
|
+
}),
|
|
26
|
+
(0, typeorm_1.JoinColumn)({ name: 'connection_id' }),
|
|
27
|
+
__metadata("design:type", ConnectionEntity_1.ConnectionEntity)
|
|
28
|
+
], BaseConfigEntity.prototype, "connection", void 0);
|
|
29
|
+
BaseConfigEntity = __decorate([
|
|
30
|
+
(0, typeorm_1.Entity)('BaseConfig'),
|
|
31
|
+
(0, typeorm_1.TableInheritance)({ column: { type: 'varchar', name: 'type' } })
|
|
32
|
+
], BaseConfigEntity);
|
|
33
|
+
exports.BaseConfigEntity = BaseConfigEntity;
|
|
34
34
|
//# sourceMappingURL=BaseConfigEntity.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { BaseEntity } from 'typeorm';
|
|
2
|
-
import { PartyEntity } from './PartyEntity';
|
|
3
|
-
export declare abstract class BaseContactEntity extends BaseEntity {
|
|
4
|
-
id: string;
|
|
5
|
-
createdAt: Date;
|
|
6
|
-
lastUpdatedAt: Date;
|
|
7
|
-
party: PartyEntity;
|
|
8
|
-
updateUpdatedDate(): void;
|
|
9
|
-
}
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { PartyEntity } from './PartyEntity';
|
|
3
|
+
export declare abstract class BaseContactEntity extends BaseEntity {
|
|
4
|
+
id: string;
|
|
5
|
+
createdAt: Date;
|
|
6
|
+
lastUpdatedAt: Date;
|
|
7
|
+
party: PartyEntity;
|
|
8
|
+
updateUpdatedDate(): void;
|
|
9
|
+
}
|
|
10
10
|
//# sourceMappingURL=BaseContactEntity.d.ts.map
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.BaseContactEntity = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const PartyEntity_1 = require("./PartyEntity");
|
|
15
|
-
let BaseContactEntity = class BaseContactEntity extends typeorm_1.BaseEntity {
|
|
16
|
-
// By default, @UpdateDateColumn in TypeORM updates the timestamp only when the entity's top-level properties change.
|
|
17
|
-
updateUpdatedDate() {
|
|
18
|
-
this.lastUpdatedAt = new Date();
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
23
|
-
__metadata("design:type", String)
|
|
24
|
-
], BaseContactEntity.prototype, "id", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, typeorm_1.CreateDateColumn)({ name: 'created_at', nullable: false }),
|
|
27
|
-
__metadata("design:type", Date)
|
|
28
|
-
], BaseContactEntity.prototype, "createdAt", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, typeorm_1.UpdateDateColumn)({ name: 'last_updated_at', nullable: false }),
|
|
31
|
-
__metadata("design:type", Date)
|
|
32
|
-
], BaseContactEntity.prototype, "lastUpdatedAt", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, typeorm_1.OneToOne)(() => PartyEntity_1.PartyEntity, (party) => party.contact, {
|
|
35
|
-
onDelete: 'CASCADE',
|
|
36
|
-
}),
|
|
37
|
-
(0, typeorm_1.JoinColumn)({ name: 'party_id' }),
|
|
38
|
-
__metadata("design:type", PartyEntity_1.PartyEntity
|
|
39
|
-
// By default, @UpdateDateColumn in TypeORM updates the timestamp only when the entity's top-level properties change.
|
|
40
|
-
)
|
|
41
|
-
], BaseContactEntity.prototype, "party", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, typeorm_1.BeforeInsert)(),
|
|
44
|
-
(0, typeorm_1.BeforeUpdate)(),
|
|
45
|
-
__metadata("design:type", Function),
|
|
46
|
-
__metadata("design:paramtypes", []),
|
|
47
|
-
__metadata("design:returntype", void 0)
|
|
48
|
-
], BaseContactEntity.prototype, "updateUpdatedDate", null);
|
|
49
|
-
BaseContactEntity = __decorate([
|
|
50
|
-
(0, typeorm_1.Entity)('BaseContact'),
|
|
51
|
-
(0, typeorm_1.TableInheritance)({ column: { type: 'varchar', name: 'type' } })
|
|
52
|
-
], BaseContactEntity);
|
|
53
|
-
exports.BaseContactEntity = BaseContactEntity;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.BaseContactEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const PartyEntity_1 = require("./PartyEntity");
|
|
15
|
+
let BaseContactEntity = class BaseContactEntity extends typeorm_1.BaseEntity {
|
|
16
|
+
// By default, @UpdateDateColumn in TypeORM updates the timestamp only when the entity's top-level properties change.
|
|
17
|
+
updateUpdatedDate() {
|
|
18
|
+
this.lastUpdatedAt = new Date();
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], BaseContactEntity.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.CreateDateColumn)({ name: 'created_at', nullable: false }),
|
|
27
|
+
__metadata("design:type", Date)
|
|
28
|
+
], BaseContactEntity.prototype, "createdAt", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.UpdateDateColumn)({ name: 'last_updated_at', nullable: false }),
|
|
31
|
+
__metadata("design:type", Date)
|
|
32
|
+
], BaseContactEntity.prototype, "lastUpdatedAt", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.OneToOne)(() => PartyEntity_1.PartyEntity, (party) => party.contact, {
|
|
35
|
+
onDelete: 'CASCADE',
|
|
36
|
+
}),
|
|
37
|
+
(0, typeorm_1.JoinColumn)({ name: 'party_id' }),
|
|
38
|
+
__metadata("design:type", PartyEntity_1.PartyEntity
|
|
39
|
+
// By default, @UpdateDateColumn in TypeORM updates the timestamp only when the entity's top-level properties change.
|
|
40
|
+
)
|
|
41
|
+
], BaseContactEntity.prototype, "party", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.BeforeInsert)(),
|
|
44
|
+
(0, typeorm_1.BeforeUpdate)(),
|
|
45
|
+
__metadata("design:type", Function),
|
|
46
|
+
__metadata("design:paramtypes", []),
|
|
47
|
+
__metadata("design:returntype", void 0)
|
|
48
|
+
], BaseContactEntity.prototype, "updateUpdatedDate", null);
|
|
49
|
+
BaseContactEntity = __decorate([
|
|
50
|
+
(0, typeorm_1.Entity)('BaseContact'),
|
|
51
|
+
(0, typeorm_1.TableInheritance)({ column: { type: 'varchar', name: 'type' } })
|
|
52
|
+
], BaseContactEntity);
|
|
53
|
+
exports.BaseContactEntity = BaseContactEntity;
|
|
54
54
|
//# sourceMappingURL=BaseContactEntity.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { BaseEntity } from 'typeorm';
|
|
2
|
-
import { BaseConfigEntity } from './BaseConfigEntity';
|
|
3
|
-
import { ConnectionTypeEnum } from '../../types';
|
|
4
|
-
import { IdentityEntity } from './IdentityEntity';
|
|
5
|
-
export declare class ConnectionEntity extends BaseEntity {
|
|
6
|
-
id: string;
|
|
7
|
-
type: ConnectionTypeEnum;
|
|
8
|
-
config: BaseConfigEntity;
|
|
9
|
-
identity: IdentityEntity;
|
|
10
|
-
}
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { BaseConfigEntity } from './BaseConfigEntity';
|
|
3
|
+
import { ConnectionTypeEnum } from '../../types';
|
|
4
|
+
import { IdentityEntity } from './IdentityEntity';
|
|
5
|
+
export declare class ConnectionEntity extends BaseEntity {
|
|
6
|
+
id: string;
|
|
7
|
+
type: ConnectionTypeEnum;
|
|
8
|
+
config: BaseConfigEntity;
|
|
9
|
+
identity: IdentityEntity;
|
|
10
|
+
}
|
|
11
11
|
//# sourceMappingURL=ConnectionEntity.d.ts.map
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.ConnectionEntity = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseConfigEntity_1 = require("./BaseConfigEntity");
|
|
15
|
-
const types_1 = require("../../types");
|
|
16
|
-
const IdentityEntity_1 = require("./IdentityEntity");
|
|
17
|
-
let ConnectionEntity = class ConnectionEntity extends typeorm_1.BaseEntity {
|
|
18
|
-
};
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
21
|
-
__metadata("design:type", String)
|
|
22
|
-
], ConnectionEntity.prototype, "id", void 0);
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, typeorm_1.Column)('simple-enum', { name: 'type', enum: types_1.ConnectionTypeEnum, nullable: false }),
|
|
25
|
-
__metadata("design:type", String)
|
|
26
|
-
], ConnectionEntity.prototype, "type", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, typeorm_1.OneToOne)(() => BaseConfigEntity_1.BaseConfigEntity, (config) => config.connection, {
|
|
29
|
-
cascade: true,
|
|
30
|
-
onDelete: 'CASCADE',
|
|
31
|
-
eager: true,
|
|
32
|
-
nullable: false,
|
|
33
|
-
}),
|
|
34
|
-
__metadata("design:type", BaseConfigEntity_1.BaseConfigEntity)
|
|
35
|
-
], ConnectionEntity.prototype, "config", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, typeorm_1.OneToOne)(() => IdentityEntity_1.IdentityEntity, (identity) => identity.connection, {
|
|
38
|
-
onDelete: 'CASCADE',
|
|
39
|
-
}),
|
|
40
|
-
(0, typeorm_1.JoinColumn)({ name: 'identity_id' }),
|
|
41
|
-
__metadata("design:type", IdentityEntity_1.IdentityEntity)
|
|
42
|
-
], ConnectionEntity.prototype, "identity", void 0);
|
|
43
|
-
ConnectionEntity = __decorate([
|
|
44
|
-
(0, typeorm_1.Entity)('Connection')
|
|
45
|
-
], ConnectionEntity);
|
|
46
|
-
exports.ConnectionEntity = ConnectionEntity;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ConnectionEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseConfigEntity_1 = require("./BaseConfigEntity");
|
|
15
|
+
const types_1 = require("../../types");
|
|
16
|
+
const IdentityEntity_1 = require("./IdentityEntity");
|
|
17
|
+
let ConnectionEntity = class ConnectionEntity extends typeorm_1.BaseEntity {
|
|
18
|
+
};
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], ConnectionEntity.prototype, "id", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)('simple-enum', { name: 'type', enum: types_1.ConnectionTypeEnum, nullable: false }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ConnectionEntity.prototype, "type", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.OneToOne)(() => BaseConfigEntity_1.BaseConfigEntity, (config) => config.connection, {
|
|
29
|
+
cascade: true,
|
|
30
|
+
onDelete: 'CASCADE',
|
|
31
|
+
eager: true,
|
|
32
|
+
nullable: false,
|
|
33
|
+
}),
|
|
34
|
+
__metadata("design:type", BaseConfigEntity_1.BaseConfigEntity)
|
|
35
|
+
], ConnectionEntity.prototype, "config", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.OneToOne)(() => IdentityEntity_1.IdentityEntity, (identity) => identity.connection, {
|
|
38
|
+
onDelete: 'CASCADE',
|
|
39
|
+
}),
|
|
40
|
+
(0, typeorm_1.JoinColumn)({ name: 'identity_id' }),
|
|
41
|
+
__metadata("design:type", IdentityEntity_1.IdentityEntity)
|
|
42
|
+
], ConnectionEntity.prototype, "identity", void 0);
|
|
43
|
+
ConnectionEntity = __decorate([
|
|
44
|
+
(0, typeorm_1.Entity)('Connection')
|
|
45
|
+
], ConnectionEntity);
|
|
46
|
+
exports.ConnectionEntity = ConnectionEntity;
|
|
47
47
|
//# sourceMappingURL=ConnectionEntity.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseEntity } from 'typeorm'
|
|
2
|
+
import { IBasicContact } from '../../types'
|
|
3
|
+
import { IdentityEntity } from './IdentityEntity'
|
|
4
|
+
export declare class ContactEntity extends BaseEntity {
|
|
5
|
+
id: string
|
|
6
|
+
name: string
|
|
7
|
+
alias: string
|
|
8
|
+
uri?: string
|
|
9
|
+
identities: Array<IdentityEntity>
|
|
10
|
+
createdAt: Date
|
|
11
|
+
lastUpdatedAt: Date
|
|
12
|
+
updateUpdatedDate(): void
|
|
13
|
+
validate(): Promise<undefined>
|
|
14
|
+
}
|
|
15
|
+
export declare const contactEntityFrom: (args: IBasicContact) => ContactEntity
|
|
16
|
+
//# sourceMappingURL=ContactEntity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContactEntity.d.ts","sourceRoot":"","sources":["../../../src/entities/contact/ContactEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAUX,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,aAAa,EAAkB,MAAM,aAAa,CAAA;AAC3D,OAAO,EAAE,cAAc,EAAsB,MAAM,kBAAkB,CAAA;AAGrE,qBACa,aAAc,SAAQ,UAAU;IAE3C,EAAE,EAAG,MAAM,CAAA;IAIX,IAAI,EAAG,MAAM,CAAA;IAIb,KAAK,EAAG,MAAM,CAAA;IAGd,GAAG,CAAC,EAAE,MAAM,CAAA;IASZ,UAAU,EAAG,KAAK,CAAC,cAAc,CAAC,CAAA;IAGlC,SAAS,EAAG,IAAI,CAAA;IAGhB,aAAa,EAAG,IAAI,CAAA;IAKpB,iBAAiB;IAMX,QAAQ;CAOf;AAED,eAAO,MAAM,iBAAiB,SAAU,aAAa,KAAG,aAQvD,CAAA"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
var __decorate =
|
|
3
|
+
(this && this.__decorate) ||
|
|
4
|
+
function (decorators, target, key, desc) {
|
|
5
|
+
var c = arguments.length,
|
|
6
|
+
r = c < 3 ? target : desc === null ? (desc = Object.getOwnPropertyDescriptor(target, key)) : desc,
|
|
7
|
+
d
|
|
8
|
+
if (typeof Reflect === 'object' && typeof Reflect.decorate === 'function') r = Reflect.decorate(decorators, target, key, desc)
|
|
9
|
+
else
|
|
10
|
+
for (var i = decorators.length - 1; i >= 0; i--) if ((d = decorators[i])) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r
|
|
11
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r
|
|
12
|
+
}
|
|
13
|
+
var __metadata =
|
|
14
|
+
(this && this.__metadata) ||
|
|
15
|
+
function (k, v) {
|
|
16
|
+
if (typeof Reflect === 'object' && typeof Reflect.metadata === 'function') return Reflect.metadata(k, v)
|
|
17
|
+
}
|
|
18
|
+
var __awaiter =
|
|
19
|
+
(this && this.__awaiter) ||
|
|
20
|
+
function (thisArg, _arguments, P, generator) {
|
|
21
|
+
function adopt(value) {
|
|
22
|
+
return value instanceof P
|
|
23
|
+
? value
|
|
24
|
+
: new P(function (resolve) {
|
|
25
|
+
resolve(value)
|
|
26
|
+
})
|
|
27
|
+
}
|
|
28
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
29
|
+
function fulfilled(value) {
|
|
30
|
+
try {
|
|
31
|
+
step(generator.next(value))
|
|
32
|
+
} catch (e) {
|
|
33
|
+
reject(e)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function rejected(value) {
|
|
37
|
+
try {
|
|
38
|
+
step(generator['throw'](value))
|
|
39
|
+
} catch (e) {
|
|
40
|
+
reject(e)
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function step(result) {
|
|
44
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected)
|
|
45
|
+
}
|
|
46
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next())
|
|
47
|
+
})
|
|
48
|
+
}
|
|
49
|
+
Object.defineProperty(exports, '__esModule', { value: true })
|
|
50
|
+
exports.contactEntityFrom = exports.ContactEntity = void 0
|
|
51
|
+
const typeorm_1 = require('typeorm')
|
|
52
|
+
const IdentityEntity_1 = require('./IdentityEntity')
|
|
53
|
+
const class_validator_1 = require('class-validator')
|
|
54
|
+
let ContactEntity = class ContactEntity extends typeorm_1.BaseEntity {
|
|
55
|
+
// By default, @UpdateDateColumn in TypeORM updates the timestamp only when the entity's top-level properties change.
|
|
56
|
+
updateUpdatedDate() {
|
|
57
|
+
this.lastUpdatedAt = new Date()
|
|
58
|
+
}
|
|
59
|
+
validate() {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
const validation = yield (0, class_validator_1.validate)(this)
|
|
62
|
+
if (validation.length > 0) {
|
|
63
|
+
return Promise.reject(Error(Object.values(validation[0].constraints)[0]))
|
|
64
|
+
}
|
|
65
|
+
return
|
|
66
|
+
})
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
__decorate([(0, typeorm_1.PrimaryGeneratedColumn)('uuid'), __metadata('design:type', String)], ContactEntity.prototype, 'id', void 0)
|
|
70
|
+
__decorate(
|
|
71
|
+
[
|
|
72
|
+
(0, typeorm_1.Column)({ name: 'name', length: 255, nullable: false, unique: true }),
|
|
73
|
+
(0, class_validator_1.IsNotEmpty)({ message: 'Blank names are not allowed' }),
|
|
74
|
+
__metadata('design:type', String),
|
|
75
|
+
],
|
|
76
|
+
ContactEntity.prototype,
|
|
77
|
+
'name',
|
|
78
|
+
void 0
|
|
79
|
+
)
|
|
80
|
+
__decorate(
|
|
81
|
+
[
|
|
82
|
+
(0, typeorm_1.Column)({ name: 'alias', length: 255, nullable: false, unique: true }),
|
|
83
|
+
(0, class_validator_1.IsNotEmpty)({ message: 'Blank aliases are not allowed' }),
|
|
84
|
+
__metadata('design:type', String),
|
|
85
|
+
],
|
|
86
|
+
ContactEntity.prototype,
|
|
87
|
+
'alias',
|
|
88
|
+
void 0
|
|
89
|
+
)
|
|
90
|
+
__decorate([(0, typeorm_1.Column)({ name: 'uri', length: 255 }), __metadata('design:type', String)], ContactEntity.prototype, 'uri', void 0)
|
|
91
|
+
__decorate(
|
|
92
|
+
[
|
|
93
|
+
(0, typeorm_1.OneToMany)(
|
|
94
|
+
() => IdentityEntity_1.IdentityEntity,
|
|
95
|
+
(identity) => identity.contact,
|
|
96
|
+
{
|
|
97
|
+
cascade: true,
|
|
98
|
+
onDelete: 'CASCADE',
|
|
99
|
+
eager: true,
|
|
100
|
+
nullable: false,
|
|
101
|
+
}
|
|
102
|
+
),
|
|
103
|
+
(0, typeorm_1.JoinColumn)({ name: 'identityId' }),
|
|
104
|
+
__metadata('design:type', Array),
|
|
105
|
+
],
|
|
106
|
+
ContactEntity.prototype,
|
|
107
|
+
'identities',
|
|
108
|
+
void 0
|
|
109
|
+
)
|
|
110
|
+
__decorate(
|
|
111
|
+
[(0, typeorm_1.CreateDateColumn)({ name: 'created_at', nullable: false }), __metadata('design:type', Date)],
|
|
112
|
+
ContactEntity.prototype,
|
|
113
|
+
'createdAt',
|
|
114
|
+
void 0
|
|
115
|
+
)
|
|
116
|
+
__decorate(
|
|
117
|
+
[
|
|
118
|
+
(0, typeorm_1.UpdateDateColumn)({ name: 'last_updated_at', nullable: false }),
|
|
119
|
+
__metadata(
|
|
120
|
+
'design:type',
|
|
121
|
+
Date
|
|
122
|
+
// By default, @UpdateDateColumn in TypeORM updates the timestamp only when the entity's top-level properties change.
|
|
123
|
+
),
|
|
124
|
+
],
|
|
125
|
+
ContactEntity.prototype,
|
|
126
|
+
'lastUpdatedAt',
|
|
127
|
+
void 0
|
|
128
|
+
)
|
|
129
|
+
__decorate(
|
|
130
|
+
[
|
|
131
|
+
(0, typeorm_1.BeforeInsert)(),
|
|
132
|
+
(0, typeorm_1.BeforeUpdate)(),
|
|
133
|
+
__metadata('design:type', Function),
|
|
134
|
+
__metadata('design:paramtypes', []),
|
|
135
|
+
__metadata('design:returntype', void 0),
|
|
136
|
+
],
|
|
137
|
+
ContactEntity.prototype,
|
|
138
|
+
'updateUpdatedDate',
|
|
139
|
+
null
|
|
140
|
+
)
|
|
141
|
+
__decorate(
|
|
142
|
+
[
|
|
143
|
+
(0, typeorm_1.BeforeInsert)(),
|
|
144
|
+
(0, typeorm_1.BeforeUpdate)(),
|
|
145
|
+
__metadata('design:type', Function),
|
|
146
|
+
__metadata('design:paramtypes', []),
|
|
147
|
+
__metadata('design:returntype', Promise),
|
|
148
|
+
],
|
|
149
|
+
ContactEntity.prototype,
|
|
150
|
+
'validate',
|
|
151
|
+
null
|
|
152
|
+
)
|
|
153
|
+
ContactEntity = __decorate([(0, typeorm_1.Entity)('Contact')], ContactEntity)
|
|
154
|
+
exports.ContactEntity = ContactEntity
|
|
155
|
+
const contactEntityFrom = (args) => {
|
|
156
|
+
const contactEntity = new ContactEntity()
|
|
157
|
+
contactEntity.name = args.name
|
|
158
|
+
contactEntity.alias = args.alias
|
|
159
|
+
contactEntity.uri = args.uri
|
|
160
|
+
contactEntity.identities = args.identities ? args.identities.map((identity) => (0, IdentityEntity_1.identityEntityFrom)(identity)) : []
|
|
161
|
+
return contactEntity
|
|
162
|
+
}
|
|
163
|
+
exports.contactEntityFrom = contactEntityFrom
|
|
164
|
+
//# sourceMappingURL=ContactEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContactEntity.js","sourceRoot":"","sources":["../../../src/entities/contact/ContactEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,qCAWgB;AAEhB,qDAAqE;AACrE,qDAAuE;AAGhE,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,oBAAU;IA8B3C,qHAAqH;IAGrH,iBAAiB;QACf,IAAI,CAAC,aAAa,GAAG,IAAI,IAAI,EAAE,CAAA;IACjC,CAAC;IAIK,QAAQ;;YACZ,MAAM,UAAU,GAA2B,MAAM,IAAA,0BAAQ,EAAC,IAAI,CAAC,CAAA;YAC/D,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,WAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;aAC3E;YACD,OAAM;QACR,CAAC;KAAA;CACF,CAAA;AA7CC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;yCACpB;AAEX;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACpE,IAAA,4BAAU,EAAC,EAAE,OAAO,EAAE,6BAA6B,EAAE,CAAC;;2CAC1C;AAEb;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACrE,IAAA,4BAAU,EAAC,EAAE,OAAO,EAAE,+BAA+B,EAAE,CAAC;;4CAC3C;AAEd;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;0CACzB;AAEZ;IAAC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,+BAAc,EAAE,CAAC,QAAwB,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE;QAC/E,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;8BACtB,KAAK;iDAAgB;AAElC;IAAC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;8BAC9C,IAAI;gDAAA;AAEhB;IAAC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;8BAC/C,IAAI;IAEpB,qHAAqH;;oDAFjG;AAGpB;IAAC,IAAA,sBAAY,GAAE;IACd,IAAA,sBAAY,GAAE;;;;sDAGd;AAIK;IAFL,IAAA,sBAAY,GAAE;IACd,IAAA,sBAAY,GAAE;;;;6CAOd;AA7CU,aAAa;IADzB,IAAA,gBAAM,EAAC,SAAS,CAAC;GACL,aAAa,CA8CzB;AA9CY,sCAAa;AAgDnB,MAAM,iBAAiB,GAAG,CAAC,IAAmB,EAAiB,EAAE;IACtE,MAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAA;IACzC,aAAa,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;IAC9B,aAAa,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;IAChC,aAAa,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAA;IAC5B,aAAa,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,QAAwB,EAAE,EAAE,CAAC,IAAA,mCAAkB,EAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IAEjI,OAAO,aAAa,CAAA;AACtB,CAAC,CAAA;AARY,QAAA,iBAAiB,qBAQ7B"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { BaseEntity } from 'typeorm';
|
|
2
|
-
import { CorrelationIdentifierEnum } from '../../types';
|
|
3
|
-
import { IdentityEntity } from './IdentityEntity';
|
|
4
|
-
export declare class CorrelationIdentifierEntity extends BaseEntity {
|
|
5
|
-
id: string;
|
|
6
|
-
type: CorrelationIdentifierEnum;
|
|
7
|
-
correlationId: string;
|
|
8
|
-
identity: IdentityEntity;
|
|
9
|
-
validate(): Promise<void>;
|
|
10
|
-
}
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { CorrelationIdentifierEnum } from '../../types';
|
|
3
|
+
import { IdentityEntity } from './IdentityEntity';
|
|
4
|
+
export declare class CorrelationIdentifierEntity extends BaseEntity {
|
|
5
|
+
id: string;
|
|
6
|
+
type: CorrelationIdentifierEnum;
|
|
7
|
+
correlationId: string;
|
|
8
|
+
identity: IdentityEntity;
|
|
9
|
+
validate(): Promise<void>;
|
|
10
|
+
}
|
|
11
11
|
//# sourceMappingURL=CorrelationIdentifierEntity.d.ts.map
|