@sphereon/ssi-sdk.data-store 0.18.1 → 0.18.2-unstable.10

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 (180) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +77 -77
  3. package/dist/contact/AbstractContactStore.d.ts +23 -23
  4. package/dist/contact/AbstractContactStore.js +6 -6
  5. package/dist/contact/ContactStore.d.ts +32 -32
  6. package/dist/contact/ContactStore.js +365 -365
  7. package/dist/entities/contact/BaseConfigEntity.d.ts +6 -6
  8. package/dist/entities/contact/BaseConfigEntity.js +33 -33
  9. package/dist/entities/contact/BaseContactEntity.d.ts +9 -9
  10. package/dist/entities/contact/BaseContactEntity.js +53 -53
  11. package/dist/entities/contact/ConnectionEntity.d.ts +10 -10
  12. package/dist/entities/contact/ConnectionEntity.js +46 -46
  13. package/dist/entities/contact/ContactEntity.d.ts +16 -0
  14. package/dist/entities/contact/ContactEntity.d.ts.map +1 -0
  15. package/dist/entities/contact/ContactEntity.js +164 -0
  16. package/dist/entities/contact/ContactEntity.js.map +1 -0
  17. package/dist/entities/contact/CorrelationIdentifierEntity.d.ts +10 -10
  18. package/dist/entities/contact/CorrelationIdentifierEntity.js +71 -71
  19. package/dist/entities/contact/DidAuthConfigEntity.d.ts +6 -6
  20. package/dist/entities/contact/DidAuthConfigEntity.js +32 -32
  21. package/dist/entities/contact/ElectronicAddressEntity.d.ts +13 -13
  22. package/dist/entities/contact/ElectronicAddressEntity.js +91 -91
  23. package/dist/entities/contact/IdentityEntity.d.ts +20 -20
  24. package/dist/entities/contact/IdentityEntity.js +128 -128
  25. package/dist/entities/contact/IdentityMetadataItemEntity.d.ts +9 -9
  26. package/dist/entities/contact/IdentityMetadataItemEntity.js +68 -68
  27. package/dist/entities/contact/NaturalPersonEntity.d.ts +8 -8
  28. package/dist/entities/contact/NaturalPersonEntity.js +71 -71
  29. package/dist/entities/contact/OpenIdConfigEntity.d.ts +10 -10
  30. package/dist/entities/contact/OpenIdConfigEntity.js +48 -48
  31. package/dist/entities/contact/OrganizationEntity.d.ts +8 -8
  32. package/dist/entities/contact/OrganizationEntity.js +66 -66
  33. package/dist/entities/contact/PartyEntity.d.ts +19 -19
  34. package/dist/entities/contact/PartyEntity.js +131 -131
  35. package/dist/entities/contact/PartyRelationshipEntity.d.ts +12 -12
  36. package/dist/entities/contact/PartyRelationshipEntity.js +94 -94
  37. package/dist/entities/contact/PartyTypeEntity.d.ts +14 -14
  38. package/dist/entities/contact/PartyTypeEntity.js +103 -103
  39. package/dist/entities/eventLogger/AuditEventEntity.d.ts +26 -26
  40. package/dist/entities/eventLogger/AuditEventEntity.js +123 -123
  41. package/dist/entities/issuanceBranding/BackgroundAttributesEntity.d.ts +10 -10
  42. package/dist/entities/issuanceBranding/BackgroundAttributesEntity.js +73 -73
  43. package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.d.ts +17 -17
  44. package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.js +119 -119
  45. package/dist/entities/issuanceBranding/CredentialBrandingEntity.d.ts +14 -14
  46. package/dist/entities/issuanceBranding/CredentialBrandingEntity.js +101 -101
  47. package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.d.ts +8 -8
  48. package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.js +48 -48
  49. package/dist/entities/issuanceBranding/ImageAttributesEntity.d.ts +13 -13
  50. package/dist/entities/issuanceBranding/ImageAttributesEntity.js +91 -91
  51. package/dist/entities/issuanceBranding/ImageDimensionsEntity.d.ts +8 -8
  52. package/dist/entities/issuanceBranding/ImageDimensionsEntity.js +38 -38
  53. package/dist/entities/issuanceBranding/IssuerBrandingEntity.d.ts +13 -13
  54. package/dist/entities/issuanceBranding/IssuerBrandingEntity.js +94 -94
  55. package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.d.ts +8 -8
  56. package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.js +48 -48
  57. package/dist/entities/issuanceBranding/TextAttributesEntity.d.ts +8 -8
  58. package/dist/entities/issuanceBranding/TextAttributesEntity.js +61 -61
  59. package/dist/entities/statusList2021/StatusList2021Entity.d.ts +18 -18
  60. package/dist/entities/statusList2021/StatusList2021Entity.js +114 -114
  61. package/dist/entities/statusList2021/StatusList2021EntryEntity.d.ts +10 -10
  62. package/dist/entities/statusList2021/StatusList2021EntryEntity.js +50 -50
  63. package/dist/entities/validators/index.d.ts +6 -6
  64. package/dist/entities/validators/index.js +26 -26
  65. package/dist/eventLogger/AbstractEventLoggerStore.d.ts +6 -6
  66. package/dist/eventLogger/AbstractEventLoggerStore.js +6 -6
  67. package/dist/eventLogger/EventLoggerStore.d.ts +12 -12
  68. package/dist/eventLogger/EventLoggerStore.js +43 -43
  69. package/dist/index.d.ts +41 -41
  70. package/dist/index.js +127 -127
  71. package/dist/issuanceBranding/AbstractIssuanceBrandingStore.d.ts +19 -19
  72. package/dist/issuanceBranding/AbstractIssuanceBrandingStore.js +6 -6
  73. package/dist/issuanceBranding/IssuanceBrandingStore.d.ts +30 -30
  74. package/dist/issuanceBranding/IssuanceBrandingStore.js +374 -374
  75. package/dist/migrations/generic/1-CreateContacts.d.ts +6 -6
  76. package/dist/migrations/generic/1-CreateContacts.js +77 -77
  77. package/dist/migrations/generic/1-CreateIssuanceBranding.d.ts +7 -0
  78. package/dist/migrations/generic/1-CreateIssuanceBranding.d.ts.map +1 -0
  79. package/dist/migrations/generic/1-CreateIssuanceBranding.js +96 -0
  80. package/dist/migrations/generic/1-CreateIssuanceBranding.js.map +1 -0
  81. package/dist/migrations/generic/2-CreateContacts.d.ts +7 -0
  82. package/dist/migrations/generic/2-CreateContacts.d.ts.map +1 -0
  83. package/dist/migrations/generic/2-CreateContacts.js +78 -0
  84. package/dist/migrations/generic/2-CreateContacts.js.map +1 -0
  85. package/dist/migrations/generic/2-CreateIssuanceBranding.d.ts +6 -6
  86. package/dist/migrations/generic/2-CreateIssuanceBranding.js +77 -77
  87. package/dist/migrations/generic/3-CreateContacts.d.ts +6 -6
  88. package/dist/migrations/generic/3-CreateContacts.js +77 -77
  89. package/dist/migrations/generic/3-CreateStatusList.d.ts +7 -0
  90. package/dist/migrations/generic/3-CreateStatusList.d.ts.map +1 -0
  91. package/dist/migrations/generic/3-CreateStatusList.js +72 -0
  92. package/dist/migrations/generic/3-CreateStatusList.js.map +1 -0
  93. package/dist/migrations/generic/4-CreateStatusList.d.ts +6 -6
  94. package/dist/migrations/generic/4-CreateStatusList.js +71 -71
  95. package/dist/migrations/generic/5-CreateAuditEvents.d.ts +6 -6
  96. package/dist/migrations/generic/5-CreateAuditEvents.js +77 -77
  97. package/dist/migrations/generic/index.d.ts +16 -16
  98. package/dist/migrations/generic/index.js +27 -27
  99. package/dist/migrations/index.d.ts +1 -1
  100. package/dist/migrations/index.js +5 -5
  101. package/dist/migrations/internal-migrations-ormconfig.d.ts +6 -6
  102. package/dist/migrations/internal-migrations-ormconfig.js +26 -26
  103. package/dist/migrations/postgres/1659463079428-CreateContacts.d.ts +6 -6
  104. package/dist/migrations/postgres/1659463079428-CreateContacts.js +56 -56
  105. package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.d.ts +6 -6
  106. package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.js +68 -68
  107. package/dist/migrations/postgres/1690925872592-CreateContacts.d.ts +6 -6
  108. package/dist/migrations/postgres/1690925872592-CreateContacts.js +68 -68
  109. package/dist/migrations/postgres/1693866470001-CreateStatusList.d.ts +6 -6
  110. package/dist/migrations/postgres/1693866470001-CreateStatusList.js +31 -31
  111. package/dist/migrations/postgres/1701634812183-CreateAuditEvents.d.ts +6 -6
  112. package/dist/migrations/postgres/1701634812183-CreateAuditEvents.js +42 -42
  113. package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.d.ts +7 -0
  114. package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.d.ts.map +1 -0
  115. package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.js +32 -0
  116. package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.js.map +1 -0
  117. package/dist/migrations/postgres/uuid.d.ts +3 -0
  118. package/dist/migrations/postgres/uuid.d.ts.map +1 -0
  119. package/dist/migrations/postgres/uuid.js +25 -0
  120. package/dist/migrations/postgres/uuid.js.map +1 -0
  121. package/dist/migrations/sqlite/1659463069549-CreateContacts.d.ts +6 -6
  122. package/dist/migrations/sqlite/1659463069549-CreateContacts.js +78 -78
  123. package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.d.ts +6 -6
  124. package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.js +88 -88
  125. package/dist/migrations/sqlite/1690925872693-CreateContacts.d.ts +6 -6
  126. package/dist/migrations/sqlite/1690925872693-CreateContacts.js +107 -107
  127. package/dist/migrations/sqlite/1693866470000-CreateStatusList.d.ts +6 -6
  128. package/dist/migrations/sqlite/1693866470000-CreateStatusList.js +31 -31
  129. package/dist/migrations/sqlite/1701634819487-CreateAuditEvents.d.ts +6 -6
  130. package/dist/migrations/sqlite/1701634819487-CreateAuditEvents.js +28 -28
  131. package/dist/statusList/IStatusListStore.d.ts +19 -19
  132. package/dist/statusList/IStatusListStore.js +2 -2
  133. package/dist/statusList/StatusListStore.d.ts +35 -35
  134. package/dist/statusList/StatusListStore.js +212 -212
  135. package/dist/types/contact/IAbstractContactStore.d.ts +74 -74
  136. package/dist/types/contact/IAbstractContactStore.js +2 -2
  137. package/dist/types/contact/contact.d.ts +173 -173
  138. package/dist/types/contact/contact.js +25 -25
  139. package/dist/types/eventLogger/IAbstractEventLoggerStore.d.ts +9 -9
  140. package/dist/types/eventLogger/IAbstractEventLoggerStore.js +2 -2
  141. package/dist/types/eventLogger/eventLogger.d.ts +2 -2
  142. package/dist/types/eventLogger/eventLogger.js +2 -2
  143. package/dist/types/index.d.ts +9 -9
  144. package/dist/types/index.js +25 -25
  145. package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.d.ts +58 -58
  146. package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.js +2 -2
  147. package/dist/types/issuanceBranding/issuanceBranding.d.ts +114 -114
  148. package/dist/types/issuanceBranding/issuanceBranding.js +2 -2
  149. package/dist/types/statusList/IAbstractStatusListStore.d.ts +37 -37
  150. package/dist/types/statusList/IAbstractStatusListStore.js +2 -2
  151. package/dist/types/statusList/statusList.d.ts +24 -24
  152. package/dist/types/statusList/statusList.js +2 -2
  153. package/dist/types/validation/validation.d.ts +3 -3
  154. package/dist/types/validation/validation.js +2 -2
  155. package/dist/utils/ValidatorUtils.d.ts +3 -3
  156. package/dist/utils/ValidatorUtils.js +12 -12
  157. package/dist/utils/contact/MappingUtils.d.ts +46 -46
  158. package/dist/utils/contact/MappingUtils.js +290 -290
  159. package/package.json +4 -4
  160. package/src/__tests__/eventLogger.entities.test.ts +73 -73
  161. package/src/__tests__/eventLogger.store.test.ts +136 -136
  162. package/src/contact/ContactStore.ts +501 -501
  163. package/src/entities/eventLogger/AuditEventEntity.ts +99 -99
  164. package/src/entities/statusList2021/StatusList2021Entity.ts +96 -96
  165. package/src/eventLogger/AbstractEventLoggerStore.ts +7 -7
  166. package/src/eventLogger/EventLoggerStore.ts +62 -62
  167. package/src/index.ts +113 -113
  168. package/src/migrations/generic/1-CreateContacts.ts +66 -66
  169. package/src/migrations/generic/2-CreateIssuanceBranding.ts +64 -64
  170. package/src/migrations/generic/3-CreateContacts.ts +66 -66
  171. package/src/migrations/generic/4-CreateStatusList.ts +54 -54
  172. package/src/migrations/generic/5-CreateAuditEvents.ts +66 -66
  173. package/src/migrations/generic/index.ts +27 -27
  174. package/src/migrations/postgres/1693866470001-CreateStatusList.ts +24 -24
  175. package/src/migrations/postgres/1701634812183-CreateAuditEvents.ts +33 -33
  176. package/src/migrations/sqlite/1690925872693-CreateContacts.ts +163 -163
  177. package/src/migrations/sqlite/1701634819487-CreateAuditEvents.ts +15 -15
  178. package/src/types/eventLogger/IAbstractEventLoggerStore.ts +12 -12
  179. package/src/types/eventLogger/eventLogger.ts +3 -3
  180. package/src/types/index.ts +9 -9
@@ -1,72 +1,72 @@
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
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13
- return new (P || (P = Promise))(function (resolve, reject) {
14
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
16
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
- step((generator = generator.apply(thisArg, _arguments || [])).next());
18
- });
19
- };
20
- Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.CorrelationIdentifierEntity = void 0;
22
- const typeorm_1 = require("typeorm");
23
- const types_1 = require("../../types");
24
- const IdentityEntity_1 = require("./IdentityEntity");
25
- const class_validator_1 = require("class-validator");
26
- const ValidatorUtils_1 = require("../../utils/ValidatorUtils");
27
- let CorrelationIdentifierEntity = class CorrelationIdentifierEntity extends typeorm_1.BaseEntity {
28
- validate() {
29
- return __awaiter(this, void 0, void 0, function* () {
30
- const validation = yield (0, class_validator_1.validate)(this);
31
- if (validation.length > 0) {
32
- const constraint = (0, ValidatorUtils_1.getConstraint)(validation[0]);
33
- if (constraint) {
34
- const message = Object.values(constraint)[0];
35
- return Promise.reject(Error(message));
36
- }
37
- }
38
- });
39
- }
40
- };
41
- __decorate([
42
- (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
43
- __metadata("design:type", String)
44
- ], CorrelationIdentifierEntity.prototype, "id", void 0);
45
- __decorate([
46
- (0, typeorm_1.Column)('simple-enum', { name: 'type', enum: types_1.CorrelationIdentifierEnum, nullable: false }),
47
- __metadata("design:type", String)
48
- ], CorrelationIdentifierEntity.prototype, "type", void 0);
49
- __decorate([
50
- (0, typeorm_1.Column)('text', { name: 'correlation_id', nullable: false, unique: true }),
51
- (0, class_validator_1.IsNotEmpty)({ message: 'Blank correlation ids are not allowed' }),
52
- __metadata("design:type", String)
53
- ], CorrelationIdentifierEntity.prototype, "correlationId", void 0);
54
- __decorate([
55
- (0, typeorm_1.OneToOne)(() => IdentityEntity_1.IdentityEntity, (identity) => identity.identifier, {
56
- onDelete: 'CASCADE',
57
- }),
58
- (0, typeorm_1.JoinColumn)({ name: 'identity_id' }),
59
- __metadata("design:type", IdentityEntity_1.IdentityEntity)
60
- ], CorrelationIdentifierEntity.prototype, "identity", void 0);
61
- __decorate([
62
- (0, typeorm_1.BeforeInsert)(),
63
- (0, typeorm_1.BeforeUpdate)(),
64
- __metadata("design:type", Function),
65
- __metadata("design:paramtypes", []),
66
- __metadata("design:returntype", Promise)
67
- ], CorrelationIdentifierEntity.prototype, "validate", null);
68
- CorrelationIdentifierEntity = __decorate([
69
- (0, typeorm_1.Entity)('CorrelationIdentifier')
70
- ], CorrelationIdentifierEntity);
71
- exports.CorrelationIdentifierEntity = CorrelationIdentifierEntity;
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13
+ return new (P || (P = Promise))(function (resolve, reject) {
14
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
16
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
18
+ });
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.CorrelationIdentifierEntity = void 0;
22
+ const typeorm_1 = require("typeorm");
23
+ const types_1 = require("../../types");
24
+ const IdentityEntity_1 = require("./IdentityEntity");
25
+ const class_validator_1 = require("class-validator");
26
+ const ValidatorUtils_1 = require("../../utils/ValidatorUtils");
27
+ let CorrelationIdentifierEntity = class CorrelationIdentifierEntity extends typeorm_1.BaseEntity {
28
+ validate() {
29
+ return __awaiter(this, void 0, void 0, function* () {
30
+ const validation = yield (0, class_validator_1.validate)(this);
31
+ if (validation.length > 0) {
32
+ const constraint = (0, ValidatorUtils_1.getConstraint)(validation[0]);
33
+ if (constraint) {
34
+ const message = Object.values(constraint)[0];
35
+ return Promise.reject(Error(message));
36
+ }
37
+ }
38
+ });
39
+ }
40
+ };
41
+ __decorate([
42
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
43
+ __metadata("design:type", String)
44
+ ], CorrelationIdentifierEntity.prototype, "id", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)('simple-enum', { name: 'type', enum: types_1.CorrelationIdentifierEnum, nullable: false }),
47
+ __metadata("design:type", String)
48
+ ], CorrelationIdentifierEntity.prototype, "type", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)('text', { name: 'correlation_id', nullable: false, unique: true }),
51
+ (0, class_validator_1.IsNotEmpty)({ message: 'Blank correlation ids are not allowed' }),
52
+ __metadata("design:type", String)
53
+ ], CorrelationIdentifierEntity.prototype, "correlationId", void 0);
54
+ __decorate([
55
+ (0, typeorm_1.OneToOne)(() => IdentityEntity_1.IdentityEntity, (identity) => identity.identifier, {
56
+ onDelete: 'CASCADE',
57
+ }),
58
+ (0, typeorm_1.JoinColumn)({ name: 'identity_id' }),
59
+ __metadata("design:type", IdentityEntity_1.IdentityEntity)
60
+ ], CorrelationIdentifierEntity.prototype, "identity", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.BeforeInsert)(),
63
+ (0, typeorm_1.BeforeUpdate)(),
64
+ __metadata("design:type", Function),
65
+ __metadata("design:paramtypes", []),
66
+ __metadata("design:returntype", Promise)
67
+ ], CorrelationIdentifierEntity.prototype, "validate", null);
68
+ CorrelationIdentifierEntity = __decorate([
69
+ (0, typeorm_1.Entity)('CorrelationIdentifier')
70
+ ], CorrelationIdentifierEntity);
71
+ exports.CorrelationIdentifierEntity = CorrelationIdentifierEntity;
72
72
  //# sourceMappingURL=CorrelationIdentifierEntity.js.map
@@ -1,7 +1,7 @@
1
- import { BaseConfigEntity } from './BaseConfigEntity';
2
- export declare class DidAuthConfigEntity extends BaseConfigEntity {
3
- identifier: string;
4
- redirectUrl: string;
5
- sessionId: string;
6
- }
1
+ import { BaseConfigEntity } from './BaseConfigEntity';
2
+ export declare class DidAuthConfigEntity extends BaseConfigEntity {
3
+ identifier: string;
4
+ redirectUrl: string;
5
+ sessionId: string;
6
+ }
7
7
  //# sourceMappingURL=DidAuthConfigEntity.d.ts.map
@@ -1,33 +1,33 @@
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.DidAuthConfigEntity = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseConfigEntity_1 = require("./BaseConfigEntity");
15
- let DidAuthConfigEntity = class DidAuthConfigEntity extends BaseConfigEntity_1.BaseConfigEntity {
16
- };
17
- __decorate([
18
- (0, typeorm_1.Column)({ name: 'identifier', length: 255, nullable: false }),
19
- __metadata("design:type", String)
20
- ], DidAuthConfigEntity.prototype, "identifier", void 0);
21
- __decorate([
22
- (0, typeorm_1.Column)({ name: 'redirect_url', length: 255, nullable: false }),
23
- __metadata("design:type", String)
24
- ], DidAuthConfigEntity.prototype, "redirectUrl", void 0);
25
- __decorate([
26
- (0, typeorm_1.Column)({ name: 'session_id', length: 255, nullable: false }),
27
- __metadata("design:type", String)
28
- ], DidAuthConfigEntity.prototype, "sessionId", void 0);
29
- DidAuthConfigEntity = __decorate([
30
- (0, typeorm_1.ChildEntity)('DidAuthConfig')
31
- ], DidAuthConfigEntity);
32
- exports.DidAuthConfigEntity = DidAuthConfigEntity;
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.DidAuthConfigEntity = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseConfigEntity_1 = require("./BaseConfigEntity");
15
+ let DidAuthConfigEntity = class DidAuthConfigEntity extends BaseConfigEntity_1.BaseConfigEntity {
16
+ };
17
+ __decorate([
18
+ (0, typeorm_1.Column)({ name: 'identifier', length: 255, nullable: false }),
19
+ __metadata("design:type", String)
20
+ ], DidAuthConfigEntity.prototype, "identifier", void 0);
21
+ __decorate([
22
+ (0, typeorm_1.Column)({ name: 'redirect_url', length: 255, nullable: false }),
23
+ __metadata("design:type", String)
24
+ ], DidAuthConfigEntity.prototype, "redirectUrl", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.Column)({ name: 'session_id', length: 255, nullable: false }),
27
+ __metadata("design:type", String)
28
+ ], DidAuthConfigEntity.prototype, "sessionId", void 0);
29
+ DidAuthConfigEntity = __decorate([
30
+ (0, typeorm_1.ChildEntity)('DidAuthConfig')
31
+ ], DidAuthConfigEntity);
32
+ exports.DidAuthConfigEntity = DidAuthConfigEntity;
33
33
  //# sourceMappingURL=DidAuthConfigEntity.js.map
@@ -1,14 +1,14 @@
1
- import { BaseEntity } from 'typeorm';
2
- import { PartyEntity } from './PartyEntity';
3
- import { ElectronicAddressType } from '../../types';
4
- export declare class ElectronicAddressEntity extends BaseEntity {
5
- id: string;
6
- type: ElectronicAddressType;
7
- electronicAddress: string;
8
- party: PartyEntity;
9
- createdAt: Date;
10
- lastUpdatedAt: Date;
11
- updateUpdatedDate(): void;
12
- validate(): Promise<void>;
13
- }
1
+ import { BaseEntity } from 'typeorm';
2
+ import { PartyEntity } from './PartyEntity';
3
+ import { ElectronicAddressType } from '../../types';
4
+ export declare class ElectronicAddressEntity extends BaseEntity {
5
+ id: string;
6
+ type: ElectronicAddressType;
7
+ electronicAddress: string;
8
+ party: PartyEntity;
9
+ createdAt: Date;
10
+ lastUpdatedAt: Date;
11
+ updateUpdatedDate(): void;
12
+ validate(): Promise<void>;
13
+ }
14
14
  //# sourceMappingURL=ElectronicAddressEntity.d.ts.map
@@ -1,92 +1,92 @@
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
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13
- return new (P || (P = Promise))(function (resolve, reject) {
14
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
16
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
- step((generator = generator.apply(thisArg, _arguments || [])).next());
18
- });
19
- };
20
- Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.ElectronicAddressEntity = void 0;
22
- const class_validator_1 = require("class-validator");
23
- const typeorm_1 = require("typeorm");
24
- const PartyEntity_1 = require("./PartyEntity");
25
- const ValidatorUtils_1 = require("../../utils/ValidatorUtils");
26
- let ElectronicAddressEntity = class ElectronicAddressEntity extends typeorm_1.BaseEntity {
27
- // By default, @UpdateDateColumn in TypeORM updates the timestamp only when the entity's top-level properties change.
28
- updateUpdatedDate() {
29
- this.lastUpdatedAt = new Date();
30
- }
31
- validate() {
32
- return __awaiter(this, void 0, void 0, function* () {
33
- const validation = yield (0, class_validator_1.validate)(this);
34
- if (validation.length > 0) {
35
- const constraint = (0, ValidatorUtils_1.getConstraint)(validation[0]);
36
- if (constraint) {
37
- const message = Object.values(constraint)[0];
38
- return Promise.reject(Error(message));
39
- }
40
- }
41
- });
42
- }
43
- };
44
- __decorate([
45
- (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
46
- __metadata("design:type", String)
47
- ], ElectronicAddressEntity.prototype, "id", void 0);
48
- __decorate([
49
- (0, typeorm_1.Column)({ name: 'type', length: 255, nullable: false }),
50
- (0, class_validator_1.IsNotEmpty)({ message: 'Blank electronic address types are not allowed' }),
51
- __metadata("design:type", String)
52
- ], ElectronicAddressEntity.prototype, "type", void 0);
53
- __decorate([
54
- (0, typeorm_1.Column)({ name: 'electronic_address', length: 255, nullable: false }),
55
- (0, class_validator_1.IsNotEmpty)({ message: 'Blank electronic addresses are not allowed' }),
56
- __metadata("design:type", String)
57
- ], ElectronicAddressEntity.prototype, "electronicAddress", void 0);
58
- __decorate([
59
- (0, typeorm_1.ManyToOne)(() => PartyEntity_1.PartyEntity, (party) => party.electronicAddresses, {
60
- onDelete: 'CASCADE',
61
- }),
62
- __metadata("design:type", PartyEntity_1.PartyEntity)
63
- ], ElectronicAddressEntity.prototype, "party", void 0);
64
- __decorate([
65
- (0, typeorm_1.CreateDateColumn)({ name: 'created_at', nullable: false }),
66
- __metadata("design:type", Date)
67
- ], ElectronicAddressEntity.prototype, "createdAt", void 0);
68
- __decorate([
69
- (0, typeorm_1.UpdateDateColumn)({ name: 'last_updated_at', nullable: false }),
70
- __metadata("design:type", Date
71
- // By default, @UpdateDateColumn in TypeORM updates the timestamp only when the entity's top-level properties change.
72
- )
73
- ], ElectronicAddressEntity.prototype, "lastUpdatedAt", void 0);
74
- __decorate([
75
- (0, typeorm_1.BeforeInsert)(),
76
- (0, typeorm_1.BeforeUpdate)(),
77
- __metadata("design:type", Function),
78
- __metadata("design:paramtypes", []),
79
- __metadata("design:returntype", void 0)
80
- ], ElectronicAddressEntity.prototype, "updateUpdatedDate", null);
81
- __decorate([
82
- (0, typeorm_1.BeforeInsert)(),
83
- (0, typeorm_1.BeforeUpdate)(),
84
- __metadata("design:type", Function),
85
- __metadata("design:paramtypes", []),
86
- __metadata("design:returntype", Promise)
87
- ], ElectronicAddressEntity.prototype, "validate", null);
88
- ElectronicAddressEntity = __decorate([
89
- (0, typeorm_1.Entity)('ElectronicAddress')
90
- ], ElectronicAddressEntity);
91
- exports.ElectronicAddressEntity = ElectronicAddressEntity;
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13
+ return new (P || (P = Promise))(function (resolve, reject) {
14
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
16
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
18
+ });
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.ElectronicAddressEntity = void 0;
22
+ const class_validator_1 = require("class-validator");
23
+ const typeorm_1 = require("typeorm");
24
+ const PartyEntity_1 = require("./PartyEntity");
25
+ const ValidatorUtils_1 = require("../../utils/ValidatorUtils");
26
+ let ElectronicAddressEntity = class ElectronicAddressEntity extends typeorm_1.BaseEntity {
27
+ // By default, @UpdateDateColumn in TypeORM updates the timestamp only when the entity's top-level properties change.
28
+ updateUpdatedDate() {
29
+ this.lastUpdatedAt = new Date();
30
+ }
31
+ validate() {
32
+ return __awaiter(this, void 0, void 0, function* () {
33
+ const validation = yield (0, class_validator_1.validate)(this);
34
+ if (validation.length > 0) {
35
+ const constraint = (0, ValidatorUtils_1.getConstraint)(validation[0]);
36
+ if (constraint) {
37
+ const message = Object.values(constraint)[0];
38
+ return Promise.reject(Error(message));
39
+ }
40
+ }
41
+ });
42
+ }
43
+ };
44
+ __decorate([
45
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
46
+ __metadata("design:type", String)
47
+ ], ElectronicAddressEntity.prototype, "id", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.Column)({ name: 'type', length: 255, nullable: false }),
50
+ (0, class_validator_1.IsNotEmpty)({ message: 'Blank electronic address types are not allowed' }),
51
+ __metadata("design:type", String)
52
+ ], ElectronicAddressEntity.prototype, "type", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ name: 'electronic_address', length: 255, nullable: false }),
55
+ (0, class_validator_1.IsNotEmpty)({ message: 'Blank electronic addresses are not allowed' }),
56
+ __metadata("design:type", String)
57
+ ], ElectronicAddressEntity.prototype, "electronicAddress", void 0);
58
+ __decorate([
59
+ (0, typeorm_1.ManyToOne)(() => PartyEntity_1.PartyEntity, (party) => party.electronicAddresses, {
60
+ onDelete: 'CASCADE',
61
+ }),
62
+ __metadata("design:type", PartyEntity_1.PartyEntity)
63
+ ], ElectronicAddressEntity.prototype, "party", void 0);
64
+ __decorate([
65
+ (0, typeorm_1.CreateDateColumn)({ name: 'created_at', nullable: false }),
66
+ __metadata("design:type", Date)
67
+ ], ElectronicAddressEntity.prototype, "createdAt", void 0);
68
+ __decorate([
69
+ (0, typeorm_1.UpdateDateColumn)({ name: 'last_updated_at', nullable: false }),
70
+ __metadata("design:type", Date
71
+ // By default, @UpdateDateColumn in TypeORM updates the timestamp only when the entity's top-level properties change.
72
+ )
73
+ ], ElectronicAddressEntity.prototype, "lastUpdatedAt", void 0);
74
+ __decorate([
75
+ (0, typeorm_1.BeforeInsert)(),
76
+ (0, typeorm_1.BeforeUpdate)(),
77
+ __metadata("design:type", Function),
78
+ __metadata("design:paramtypes", []),
79
+ __metadata("design:returntype", void 0)
80
+ ], ElectronicAddressEntity.prototype, "updateUpdatedDate", null);
81
+ __decorate([
82
+ (0, typeorm_1.BeforeInsert)(),
83
+ (0, typeorm_1.BeforeUpdate)(),
84
+ __metadata("design:type", Function),
85
+ __metadata("design:paramtypes", []),
86
+ __metadata("design:returntype", Promise)
87
+ ], ElectronicAddressEntity.prototype, "validate", null);
88
+ ElectronicAddressEntity = __decorate([
89
+ (0, typeorm_1.Entity)('ElectronicAddress')
90
+ ], ElectronicAddressEntity);
91
+ exports.ElectronicAddressEntity = ElectronicAddressEntity;
92
92
  //# sourceMappingURL=ElectronicAddressEntity.js.map
@@ -1,21 +1,21 @@
1
- import { BaseEntity } from 'typeorm';
2
- import { CorrelationIdentifierEntity } from './CorrelationIdentifierEntity';
3
- import { ConnectionEntity } from './ConnectionEntity';
4
- import { IdentityMetadataItemEntity } from './IdentityMetadataItemEntity';
5
- import { IdentityRoleEnum } from '../../types';
6
- import { PartyEntity } from './PartyEntity';
7
- export declare class IdentityEntity extends BaseEntity {
8
- id: string;
9
- alias: string;
10
- roles: Array<IdentityRoleEnum>;
11
- identifier: CorrelationIdentifierEntity;
12
- connection?: ConnectionEntity;
13
- metadata: Array<IdentityMetadataItemEntity>;
14
- createdAt: Date;
15
- lastUpdatedAt: Date;
16
- party: PartyEntity;
17
- partyId: string;
18
- updateUpdatedDate(): void;
19
- validate(): Promise<void>;
20
- }
1
+ import { BaseEntity } from 'typeorm';
2
+ import { CorrelationIdentifierEntity } from './CorrelationIdentifierEntity';
3
+ import { ConnectionEntity } from './ConnectionEntity';
4
+ import { IdentityMetadataItemEntity } from './IdentityMetadataItemEntity';
5
+ import { IdentityRoleEnum } from '../../types';
6
+ import { PartyEntity } from './PartyEntity';
7
+ export declare class IdentityEntity extends BaseEntity {
8
+ id: string;
9
+ alias: string;
10
+ roles: Array<IdentityRoleEnum>;
11
+ identifier: CorrelationIdentifierEntity;
12
+ connection?: ConnectionEntity;
13
+ metadata: Array<IdentityMetadataItemEntity>;
14
+ createdAt: Date;
15
+ lastUpdatedAt: Date;
16
+ party: PartyEntity;
17
+ partyId: string;
18
+ updateUpdatedDate(): void;
19
+ validate(): Promise<void>;
20
+ }
21
21
  //# sourceMappingURL=IdentityEntity.d.ts.map