@sphereon/ssi-sdk.data-store 0.33.0 → 0.33.1-feature.vcdm2.4

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 (210) hide show
  1. package/dist/contact/AbstractContactStore.js +1 -5
  2. package/dist/contact/AbstractContactStore.js.map +1 -1
  3. package/dist/contact/ContactStore.js +544 -545
  4. package/dist/contact/ContactStore.js.map +1 -1
  5. package/dist/digitalCredential/AbstractDigitalCredentialStore.js +1 -5
  6. package/dist/digitalCredential/AbstractDigitalCredentialStore.js.map +1 -1
  7. package/dist/digitalCredential/DigitalCredentialStore.js +131 -142
  8. package/dist/digitalCredential/DigitalCredentialStore.js.map +1 -1
  9. package/dist/entities/contact/BaseConfigEntity.js +13 -14
  10. package/dist/entities/contact/BaseConfigEntity.js.map +1 -1
  11. package/dist/entities/contact/BaseContactEntity.js +24 -22
  12. package/dist/entities/contact/BaseContactEntity.js.map +1 -1
  13. package/dist/entities/contact/ConnectionEntity.js +23 -20
  14. package/dist/entities/contact/ConnectionEntity.js.map +1 -1
  15. package/dist/entities/contact/ContactMetadataItemEntity.js +38 -44
  16. package/dist/entities/contact/ContactMetadataItemEntity.js.map +1 -1
  17. package/dist/entities/contact/CorrelationIdentifierEntity.js +34 -42
  18. package/dist/entities/contact/CorrelationIdentifierEntity.js.map +1 -1
  19. package/dist/entities/contact/DidAuthConfigEntity.js +16 -14
  20. package/dist/entities/contact/DidAuthConfigEntity.js.map +1 -1
  21. package/dist/entities/contact/ElectronicAddressEntity.js +42 -47
  22. package/dist/entities/contact/ElectronicAddressEntity.js.map +1 -1
  23. package/dist/entities/contact/IdentityEntity.js +56 -57
  24. package/dist/entities/contact/IdentityEntity.js.map +1 -1
  25. package/dist/entities/contact/IdentityMetadataItemEntity.js +38 -44
  26. package/dist/entities/contact/IdentityMetadataItemEntity.js.map +1 -1
  27. package/dist/entities/contact/NaturalPersonEntity.js +35 -43
  28. package/dist/entities/contact/NaturalPersonEntity.js.map +1 -1
  29. package/dist/entities/contact/OpenIdConfigEntity.js +24 -18
  30. package/dist/entities/contact/OpenIdConfigEntity.js.map +1 -1
  31. package/dist/entities/contact/OrganizationEntity.js +28 -38
  32. package/dist/entities/contact/OrganizationEntity.js.map +1 -1
  33. package/dist/entities/contact/PartyEntity.js +57 -59
  34. package/dist/entities/contact/PartyEntity.js.map +1 -1
  35. package/dist/entities/contact/PartyRelationshipEntity.js +37 -43
  36. package/dist/entities/contact/PartyRelationshipEntity.js.map +1 -1
  37. package/dist/entities/contact/PartyTypeEntity.js +44 -49
  38. package/dist/entities/contact/PartyTypeEntity.js.map +1 -1
  39. package/dist/entities/contact/PhysicalAddressEntity.js +61 -60
  40. package/dist/entities/contact/PhysicalAddressEntity.js.map +1 -1
  41. package/dist/entities/digitalCredential/DigitalCredentialEntity.js +63 -38
  42. package/dist/entities/digitalCredential/DigitalCredentialEntity.js.map +1 -1
  43. package/dist/entities/eventLogger/AuditEventEntity.js +60 -37
  44. package/dist/entities/eventLogger/AuditEventEntity.js.map +1 -1
  45. package/dist/entities/issuanceBranding/BackgroundAttributesEntity.js +25 -36
  46. package/dist/entities/issuanceBranding/BackgroundAttributesEntity.js.map +1 -1
  47. package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.js +48 -53
  48. package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.js.map +1 -1
  49. package/dist/entities/issuanceBranding/CredentialBrandingEntity.js +35 -43
  50. package/dist/entities/issuanceBranding/CredentialBrandingEntity.js.map +1 -1
  51. package/dist/entities/issuanceBranding/CredentialClaimsEntity.js +28 -38
  52. package/dist/entities/issuanceBranding/CredentialClaimsEntity.js.map +1 -1
  53. package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.js +18 -18
  54. package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.js.map +1 -1
  55. package/dist/entities/issuanceBranding/ImageAttributesEntity.js +34 -42
  56. package/dist/entities/issuanceBranding/ImageAttributesEntity.js.map +1 -1
  57. package/dist/entities/issuanceBranding/ImageDimensionsEntity.js +11 -11
  58. package/dist/entities/issuanceBranding/ImageDimensionsEntity.js.map +1 -1
  59. package/dist/entities/issuanceBranding/IssuerBrandingEntity.js +31 -40
  60. package/dist/entities/issuanceBranding/IssuerBrandingEntity.js.map +1 -1
  61. package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.js +27 -24
  62. package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.js.map +1 -1
  63. package/dist/entities/issuanceBranding/TextAttributesEntity.js +20 -32
  64. package/dist/entities/issuanceBranding/TextAttributesEntity.js.map +1 -1
  65. package/dist/entities/machineState/MachineStateInfoEntity.js +31 -21
  66. package/dist/entities/machineState/MachineStateInfoEntity.js.map +1 -1
  67. package/dist/entities/oid4vcState/Oid4vcStateEntity.js +24 -18
  68. package/dist/entities/oid4vcState/Oid4vcStateEntity.js.map +1 -1
  69. package/dist/entities/presentationDefinition/PresentationDefinitionItemEntity.js +34 -27
  70. package/dist/entities/presentationDefinition/PresentationDefinitionItemEntity.js.map +1 -1
  71. package/dist/entities/statusList/StatusList2021EntryEntity.js +26 -22
  72. package/dist/entities/statusList/StatusList2021EntryEntity.js.map +1 -1
  73. package/dist/entities/statusList/StatusListEntities.js +48 -39
  74. package/dist/entities/statusList/StatusListEntities.js.map +1 -1
  75. package/dist/entities/validators/index.js +6 -10
  76. package/dist/entities/validators/index.js.map +1 -1
  77. package/dist/eventLogger/AbstractEventLoggerStore.js +1 -5
  78. package/dist/eventLogger/AbstractEventLoggerStore.js.map +1 -1
  79. package/dist/eventLogger/EventLoggerStore.js +50 -65
  80. package/dist/eventLogger/EventLoggerStore.js.map +1 -1
  81. package/dist/index.js +96 -163
  82. package/dist/index.js.map +1 -1
  83. package/dist/issuanceBranding/AbstractIssuanceBrandingStore.js +1 -5
  84. package/dist/issuanceBranding/AbstractIssuanceBrandingStore.js.map +1 -1
  85. package/dist/issuanceBranding/IssuanceBrandingStore.js +331 -333
  86. package/dist/issuanceBranding/IssuanceBrandingStore.js.map +1 -1
  87. package/dist/machineState/IAbstractMachineStateStore.js +1 -5
  88. package/dist/machineState/IAbstractMachineStateStore.js.map +1 -1
  89. package/dist/machineState/MachineStateStore.js +102 -122
  90. package/dist/machineState/MachineStateStore.js.map +1 -1
  91. package/dist/migrations/generic/1-CreateContacts.js +50 -72
  92. package/dist/migrations/generic/1-CreateContacts.js.map +1 -1
  93. package/dist/migrations/generic/10-CreatePresentationDefinitions.js +50 -72
  94. package/dist/migrations/generic/10-CreatePresentationDefinitions.js.map +1 -1
  95. package/dist/migrations/generic/11-FixCredentialClaimsReferenceUuid.js +52 -74
  96. package/dist/migrations/generic/11-FixCredentialClaimsReferenceUuid.js.map +1 -1
  97. package/dist/migrations/generic/2-CreateIssuanceBranding.js +50 -72
  98. package/dist/migrations/generic/2-CreateIssuanceBranding.js.map +1 -1
  99. package/dist/migrations/generic/3-CreateContacts.js +50 -72
  100. package/dist/migrations/generic/3-CreateContacts.js.map +1 -1
  101. package/dist/migrations/generic/4-CreateStatusList.js +56 -78
  102. package/dist/migrations/generic/4-CreateStatusList.js.map +1 -1
  103. package/dist/migrations/generic/5-CreateAuditEvents.js +50 -72
  104. package/dist/migrations/generic/5-CreateAuditEvents.js.map +1 -1
  105. package/dist/migrations/generic/6-CreateDigitalCredential.js +50 -72
  106. package/dist/migrations/generic/6-CreateDigitalCredential.js.map +1 -1
  107. package/dist/migrations/generic/7-CreateMachineStateStore.js +50 -72
  108. package/dist/migrations/generic/7-CreateMachineStateStore.js.map +1 -1
  109. package/dist/migrations/generic/8-CreateContacts.js +50 -72
  110. package/dist/migrations/generic/8-CreateContacts.js.map +1 -1
  111. package/dist/migrations/generic/9-CreateContacts.js +50 -72
  112. package/dist/migrations/generic/9-CreateContacts.js.map +1 -1
  113. package/dist/migrations/generic/index.js +30 -33
  114. package/dist/migrations/generic/index.js.map +1 -1
  115. package/dist/migrations/index.js +1 -12
  116. package/dist/migrations/index.js.map +1 -1
  117. package/dist/migrations/internal-migrations-ormconfig.js +6 -8
  118. package/dist/migrations/internal-migrations-ormconfig.js.map +1 -1
  119. package/dist/migrations/postgres/1659463079428-CreateContacts.js +34 -53
  120. package/dist/migrations/postgres/1659463079428-CreateContacts.js.map +1 -1
  121. package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.js +50 -69
  122. package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.js.map +1 -1
  123. package/dist/migrations/postgres/1690925872592-CreateContacts.js +87 -106
  124. package/dist/migrations/postgres/1690925872592-CreateContacts.js.map +1 -1
  125. package/dist/migrations/postgres/1693866470001-CreateStatusList.js +16 -35
  126. package/dist/migrations/postgres/1693866470001-CreateStatusList.js.map +1 -1
  127. package/dist/migrations/postgres/1701634812183-CreateAuditEvents.js +22 -41
  128. package/dist/migrations/postgres/1701634812183-CreateAuditEvents.js.map +1 -1
  129. package/dist/migrations/postgres/1708525189001-CreateDigitalCredential.js +19 -38
  130. package/dist/migrations/postgres/1708525189001-CreateDigitalCredential.js.map +1 -1
  131. package/dist/migrations/postgres/1708797018115-CreateMachineStateStore.js +6 -25
  132. package/dist/migrations/postgres/1708797018115-CreateMachineStateStore.js.map +1 -1
  133. package/dist/migrations/postgres/1710438363001-CreateContacts.js +40 -59
  134. package/dist/migrations/postgres/1710438363001-CreateContacts.js.map +1 -1
  135. package/dist/migrations/postgres/1715761125001-CreateContacts.js +18 -37
  136. package/dist/migrations/postgres/1715761125001-CreateContacts.js.map +1 -1
  137. package/dist/migrations/postgres/1716475165345-CreatePresentationDefinitions.js +6 -25
  138. package/dist/migrations/postgres/1716475165345-CreatePresentationDefinitions.js.map +1 -1
  139. package/dist/migrations/postgres/1737110469001-UpdateStatusList.js +16 -35
  140. package/dist/migrations/postgres/1737110469001-UpdateStatusList.js.map +1 -1
  141. package/dist/migrations/postgres/1741895822987-FixCredentialClaimsReferencesUuid.js +8 -27
  142. package/dist/migrations/postgres/1741895822987-FixCredentialClaimsReferencesUuid.js.map +1 -1
  143. package/dist/migrations/sqlite/1659463069549-CreateContacts.js +56 -75
  144. package/dist/migrations/sqlite/1659463069549-CreateContacts.js.map +1 -1
  145. package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.js +70 -89
  146. package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.js.map +1 -1
  147. package/dist/migrations/sqlite/1690925872693-CreateContacts.js +120 -139
  148. package/dist/migrations/sqlite/1690925872693-CreateContacts.js.map +1 -1
  149. package/dist/migrations/sqlite/1693866470000-CreateStatusList.js +12 -31
  150. package/dist/migrations/sqlite/1693866470000-CreateStatusList.js.map +1 -1
  151. package/dist/migrations/sqlite/1701634819487-CreateAuditEvents.js +6 -25
  152. package/dist/migrations/sqlite/1701634819487-CreateAuditEvents.js.map +1 -1
  153. package/dist/migrations/sqlite/1708525189002-CreateDigitalCredential.js +7 -26
  154. package/dist/migrations/sqlite/1708525189002-CreateDigitalCredential.js.map +1 -1
  155. package/dist/migrations/sqlite/1708796002272-CreateMachineStateStore.js +6 -25
  156. package/dist/migrations/sqlite/1708796002272-CreateMachineStateStore.js.map +1 -1
  157. package/dist/migrations/sqlite/1710438363002-CreateContacts.js +43 -62
  158. package/dist/migrations/sqlite/1710438363002-CreateContacts.js.map +1 -1
  159. package/dist/migrations/sqlite/1715761125002-CreateContacts.js +18 -37
  160. package/dist/migrations/sqlite/1715761125002-CreateContacts.js.map +1 -1
  161. package/dist/migrations/sqlite/1716475165344-CreatePresentationDefinitions.js +6 -25
  162. package/dist/migrations/sqlite/1716475165344-CreatePresentationDefinitions.js.map +1 -1
  163. package/dist/migrations/sqlite/1737110469000-UpdateStatusList.js +20 -39
  164. package/dist/migrations/sqlite/1737110469000-UpdateStatusList.js.map +1 -1
  165. package/dist/migrations/sqlite/1741895822987-FixCredentialClaimsReferencesUuid.js +25 -44
  166. package/dist/migrations/sqlite/1741895822987-FixCredentialClaimsReferencesUuid.js.map +1 -1
  167. package/dist/presentationDefinition/AbstractPDStore.js +1 -5
  168. package/dist/presentationDefinition/AbstractPDStore.js.map +1 -1
  169. package/dist/presentationDefinition/PDStore.js +114 -123
  170. package/dist/presentationDefinition/PDStore.js.map +1 -1
  171. package/dist/statusList/IStatusListStore.js +1 -2
  172. package/dist/statusList/StatusListStore.js +196 -225
  173. package/dist/statusList/StatusListStore.js.map +1 -1
  174. package/dist/types/contact/IAbstractContactStore.js +1 -2
  175. package/dist/types/contact/contact.js +10 -13
  176. package/dist/types/contact/contact.js.map +1 -1
  177. package/dist/types/digitalCredential/IAbstractDigitalCredentialStore.js +1 -2
  178. package/dist/types/digitalCredential/digitalCredential.js +13 -16
  179. package/dist/types/digitalCredential/digitalCredential.js.map +1 -1
  180. package/dist/types/eventLogger/IAbstractEventLoggerStore.js +1 -2
  181. package/dist/types/eventLogger/eventLogger.js +1 -2
  182. package/dist/types/index.js +14 -30
  183. package/dist/types/index.js.map +1 -1
  184. package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.js +1 -2
  185. package/dist/types/issuanceBranding/issuanceBranding.js +1 -2
  186. package/dist/types/machineState/IAbstractMachineStateStore.js +1 -2
  187. package/dist/types/presentationDefinition/IAbstractPDStore.js +1 -2
  188. package/dist/types/presentationDefinition/presentationDefinition.js +1 -2
  189. package/dist/types/statusList/IAbstractStatusListStore.js +1 -2
  190. package/dist/types/statusList/statusList.js +1 -2
  191. package/dist/types/validation/validation.js +1 -2
  192. package/dist/utils/FormattingUtils.js +3 -7
  193. package/dist/utils/FormattingUtils.js.map +1 -1
  194. package/dist/utils/SortingUtils.js +1 -5
  195. package/dist/utils/SortingUtils.js.map +1 -1
  196. package/dist/utils/ValidatorUtils.js +2 -6
  197. package/dist/utils/ValidatorUtils.js.map +1 -1
  198. package/dist/utils/contact/MappingUtils.js +124 -150
  199. package/dist/utils/contact/MappingUtils.js.map +1 -1
  200. package/dist/utils/digitalCredential/MappingUtils.js +50 -47
  201. package/dist/utils/digitalCredential/MappingUtils.js.map +1 -1
  202. package/dist/utils/eventLogger/MappingUtils.js +60 -22
  203. package/dist/utils/eventLogger/MappingUtils.js.map +1 -1
  204. package/dist/utils/issuanceBranding/MappingUtils.js +71 -77
  205. package/dist/utils/issuanceBranding/MappingUtils.js.map +1 -1
  206. package/dist/utils/presentationDefinition/MappingUtils.js +9 -15
  207. package/dist/utils/presentationDefinition/MappingUtils.js.map +1 -1
  208. package/dist/utils/statusList/MappingUtils.js +27 -22
  209. package/dist/utils/statusList/MappingUtils.js.map +1 -1
  210. package/package.json +5 -5
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8,102 +7,98 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
7
  var __metadata = (this && this.__metadata) || function (k, v) {
9
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
9
  };
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.PartyTypeEntity = void 0;
22
- const typeorm_1 = require("typeorm");
23
- const ssi_sdk_agent_config_1 = require("@sphereon/ssi-sdk.agent-config");
24
- const PartyEntity_1 = require("./PartyEntity");
25
- const types_1 = require("../../types");
26
- const class_validator_1 = require("class-validator");
27
- const validators_1 = require("../validators");
28
- const ValidatorUtils_1 = require("../../utils/ValidatorUtils");
10
+ import { BeforeInsert, BeforeUpdate, Column, CreateDateColumn, Entity, Index, OneToMany, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
11
+ import { typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config';
12
+ import { PartyEntity } from './PartyEntity';
13
+ import { PartyOrigin, PartyTypeType } from '../../types';
14
+ import { IsNotEmpty, Validate, validate } from 'class-validator';
15
+ import { IsNonEmptyStringConstraint } from '../validators';
16
+ import { getConstraint } from '../../utils/ValidatorUtils';
29
17
  let PartyTypeEntity = class PartyTypeEntity {
18
+ id;
19
+ type;
20
+ origin;
21
+ name;
22
+ description;
23
+ tenantId;
24
+ parties;
25
+ createdAt;
26
+ lastUpdatedAt;
30
27
  // By default, @UpdateDateColumn in TypeORM updates the timestamp only when the entity's top-level properties change.
31
28
  updateUpdatedDate() {
32
29
  this.lastUpdatedAt = new Date();
33
30
  }
34
- validate() {
35
- return __awaiter(this, void 0, void 0, function* () {
36
- const validation = yield (0, class_validator_1.validate)(this);
37
- if (validation.length > 0) {
38
- const constraint = (0, ValidatorUtils_1.getConstraint)(validation[0]);
39
- if (constraint) {
40
- const message = Object.values(constraint)[0];
41
- return Promise.reject(Error(message));
42
- }
31
+ async validate() {
32
+ const validation = await validate(this);
33
+ if (validation.length > 0) {
34
+ const constraint = getConstraint(validation[0]);
35
+ if (constraint) {
36
+ const message = Object.values(constraint)[0];
37
+ return Promise.reject(Error(message));
43
38
  }
44
- });
39
+ }
45
40
  }
46
41
  };
47
- exports.PartyTypeEntity = PartyTypeEntity;
48
42
  __decorate([
49
- (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
43
+ PrimaryGeneratedColumn('uuid'),
50
44
  __metadata("design:type", String)
51
45
  ], PartyTypeEntity.prototype, "id", void 0);
52
46
  __decorate([
53
- (0, typeorm_1.Column)('simple-enum', { name: 'type', enum: types_1.PartyTypeType, nullable: false }),
47
+ Column('simple-enum', { name: 'type', enum: PartyTypeType, nullable: false }),
54
48
  __metadata("design:type", String)
55
49
  ], PartyTypeEntity.prototype, "type", void 0);
56
50
  __decorate([
57
- (0, typeorm_1.Column)('simple-enum', { name: 'origin', enum: types_1.PartyOrigin, nullable: false, unique: false }),
51
+ Column('simple-enum', { name: 'origin', enum: PartyOrigin, nullable: false, unique: false }),
58
52
  __metadata("design:type", String)
59
53
  ], PartyTypeEntity.prototype, "origin", void 0);
60
54
  __decorate([
61
- (0, typeorm_1.Column)('varchar', { name: 'name', length: 255, nullable: false, unique: true }),
62
- (0, class_validator_1.IsNotEmpty)({ message: 'Blank names are not allowed' }),
55
+ Column('varchar', { name: 'name', length: 255, nullable: false, unique: true }),
56
+ IsNotEmpty({ message: 'Blank names are not allowed' }),
63
57
  __metadata("design:type", String)
64
58
  ], PartyTypeEntity.prototype, "name", void 0);
65
59
  __decorate([
66
- (0, typeorm_1.Column)('varchar', { name: 'description', length: 255, nullable: true }),
67
- (0, class_validator_1.Validate)(validators_1.IsNonEmptyStringConstraint, { message: 'Blank descriptions are not allowed' }),
60
+ Column('varchar', { name: 'description', length: 255, nullable: true }),
61
+ Validate(IsNonEmptyStringConstraint, { message: 'Blank descriptions are not allowed' }),
68
62
  __metadata("design:type", String)
69
63
  ], PartyTypeEntity.prototype, "description", void 0);
70
64
  __decorate([
71
- (0, typeorm_1.Column)({ name: 'tenant_id', type: 'varchar', length: 255, nullable: true }),
72
- (0, class_validator_1.IsNotEmpty)({ message: "Blank tenant id's are not allowed" }),
65
+ Column({ name: 'tenant_id', type: 'varchar', length: 255, nullable: true }),
66
+ IsNotEmpty({ message: "Blank tenant id's are not allowed" }),
73
67
  __metadata("design:type", String)
74
68
  ], PartyTypeEntity.prototype, "tenantId", void 0);
75
69
  __decorate([
76
- (0, typeorm_1.OneToMany)(() => PartyEntity_1.PartyEntity, (party) => party.partyType, {
70
+ OneToMany(() => PartyEntity, (party) => party.partyType, {
77
71
  nullable: false,
78
72
  }),
79
73
  __metadata("design:type", Array)
80
74
  ], PartyTypeEntity.prototype, "parties", void 0);
81
75
  __decorate([
82
- (0, typeorm_1.CreateDateColumn)({ name: 'created_at', nullable: false, type: (0, ssi_sdk_agent_config_1.typeOrmDateTime)() }),
76
+ CreateDateColumn({ name: 'created_at', nullable: false, type: typeOrmDateTime() }),
83
77
  __metadata("design:type", Date)
84
78
  ], PartyTypeEntity.prototype, "createdAt", void 0);
85
79
  __decorate([
86
- (0, typeorm_1.UpdateDateColumn)({ name: 'last_updated_at', nullable: false, type: (0, ssi_sdk_agent_config_1.typeOrmDateTime)() }),
80
+ UpdateDateColumn({ name: 'last_updated_at', nullable: false, type: typeOrmDateTime() }),
87
81
  __metadata("design:type", Date
88
82
  // By default, @UpdateDateColumn in TypeORM updates the timestamp only when the entity's top-level properties change.
89
83
  )
90
84
  ], PartyTypeEntity.prototype, "lastUpdatedAt", void 0);
91
85
  __decorate([
92
- (0, typeorm_1.BeforeInsert)(),
93
- (0, typeorm_1.BeforeUpdate)(),
86
+ BeforeInsert(),
87
+ BeforeUpdate(),
94
88
  __metadata("design:type", Function),
95
89
  __metadata("design:paramtypes", []),
96
90
  __metadata("design:returntype", void 0)
97
91
  ], PartyTypeEntity.prototype, "updateUpdatedDate", null);
98
92
  __decorate([
99
- (0, typeorm_1.BeforeInsert)(),
100
- (0, typeorm_1.BeforeUpdate)(),
93
+ BeforeInsert(),
94
+ BeforeUpdate(),
101
95
  __metadata("design:type", Function),
102
96
  __metadata("design:paramtypes", []),
103
97
  __metadata("design:returntype", Promise)
104
98
  ], PartyTypeEntity.prototype, "validate", null);
105
- exports.PartyTypeEntity = PartyTypeEntity = __decorate([
106
- (0, typeorm_1.Entity)('PartyType'),
107
- (0, typeorm_1.Index)('IDX_PartyType_type_tenant_id', ['type', 'tenantId'], { unique: true })
99
+ PartyTypeEntity = __decorate([
100
+ Entity('PartyType'),
101
+ Index('IDX_PartyType_type_tenant_id', ['type', 'tenantId'], { unique: true })
108
102
  ], PartyTypeEntity);
103
+ export { PartyTypeEntity };
109
104
  //# sourceMappingURL=PartyTypeEntity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PartyTypeEntity.js","sourceRoot":"","sources":["../../../src/entities/contact/PartyTypeEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,qCAAkJ;AAClJ,yEAAgE;AAChE,+CAA2C;AAC3C,uCAA8E;AAC9E,qDAAiF;AACjF,8CAA0D;AAC1D,+DAA0D;AAInD,IAAM,eAAe,GAArB,MAAM,eAAe;IAiC1B,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,CAAC;gBAC1B,MAAM,UAAU,GAAqC,IAAA,8BAAa,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;gBACjF,IAAI,UAAU,EAAE,CAAC;oBACf,MAAM,OAAO,GAAW,MAAM,CAAC,MAAM,CAAC,UAAW,CAAC,CAAC,CAAC,CAAC,CAAA;oBACrD,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAA;gBACvC,CAAC;YACH,CAAC;QACH,CAAC;KAAA;CACF,CAAA;AApDY,0CAAe;AAE1B;IADC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;2CACpB;AAGX;IADC,IAAA,gBAAM,EAAC,aAAa,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;6CAC1D;AAGpB;IADC,IAAA,gBAAM,EAAC,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,mBAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;;+CACz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AAQ,EAAE,IAAI,EAAE,CAAC;IAC3E,UAAU,CAAC,EAAE,OAAO,EAAE,mCAAmC,EAAE,CAAC;;iDAC5C;AAKjB;IAHC,SAAS,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,KAAkB,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,EAAE;QACrE,QAAQ,EAAE,KAAK;KAChB,CAAC;8BACQ,KAAK;gDAAa;AAG5B;IADC,gBAAgB,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,EAAE,CAAC;8BACvE,IAAI;kDAAA;AAGhB;IADC,gBAAgB,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,EAAE,CAAC;8BACxE,IAAI;IAEpB,qHAAqH;;sDAFjG;AAKpB;IAFC,YAAY,EAAE;IACd,YAAY,EAAE;;;;wDAGd;AAIK;IAFL,YAAY,EAAE;IACd,YAAY,EAAE;;;;+CAUd;AAnDU,eAAe;IAF3B,MAAM,CAAC,WAAW,CAAC;IACnB,KAAK,CAAC,8BAA8B,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;GACjE,eAAe,CAoD3B"}
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8,129 +7,131 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
7
  var __metadata = (this && this.__metadata) || function (k, v) {
9
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
9
  };
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.PhysicalAddressEntity = void 0;
22
- const class_validator_1 = require("class-validator");
23
- const typeorm_1 = require("typeorm");
24
- const ssi_sdk_agent_config_1 = require("@sphereon/ssi-sdk.agent-config");
25
- const ValidatorUtils_1 = require("../../utils/ValidatorUtils");
26
- const PartyEntity_1 = require("./PartyEntity");
27
- const validators_1 = require("../validators");
28
- let PhysicalAddressEntity = class PhysicalAddressEntity extends typeorm_1.BaseEntity {
10
+ import { IsNotEmpty, Validate, validate } from 'class-validator';
11
+ import { BaseEntity, BeforeInsert, BeforeUpdate, Column, CreateDateColumn, Entity, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn, } from 'typeorm';
12
+ import { typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config';
13
+ import { getConstraint } from '../../utils/ValidatorUtils';
14
+ import { PartyEntity } from './PartyEntity';
15
+ import { IsNonEmptyStringConstraint } from '../validators';
16
+ let PhysicalAddressEntity = class PhysicalAddressEntity extends BaseEntity {
17
+ id;
18
+ type;
19
+ streetName;
20
+ streetNumber;
21
+ postalCode;
22
+ cityName;
23
+ provinceName;
24
+ countryCode;
25
+ buildingName;
26
+ ownerId;
27
+ tenantId;
28
+ party;
29
+ partyId;
30
+ createdAt;
31
+ lastUpdatedAt;
29
32
  // By default, @UpdateDateColumn in TypeORM updates the timestamp only when the entity's top-level properties change.
30
33
  updateUpdatedDate() {
31
34
  this.lastUpdatedAt = new Date();
32
35
  }
33
- validate() {
34
- return __awaiter(this, void 0, void 0, function* () {
35
- const validation = yield (0, class_validator_1.validate)(this);
36
- if (validation.length > 0) {
37
- const constraint = (0, ValidatorUtils_1.getConstraint)(validation[0]);
38
- if (constraint) {
39
- const message = Object.values(constraint)[0];
40
- return Promise.reject(Error(message));
41
- }
36
+ async validate() {
37
+ const validation = await validate(this);
38
+ if (validation.length > 0) {
39
+ const constraint = getConstraint(validation[0]);
40
+ if (constraint) {
41
+ const message = Object.values(constraint)[0];
42
+ return Promise.reject(Error(message));
42
43
  }
43
- });
44
+ }
44
45
  }
45
46
  };
46
- exports.PhysicalAddressEntity = PhysicalAddressEntity;
47
47
  __decorate([
48
- (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
48
+ PrimaryGeneratedColumn('uuid'),
49
49
  __metadata("design:type", String)
50
50
  ], PhysicalAddressEntity.prototype, "id", void 0);
51
51
  __decorate([
52
- (0, typeorm_1.Column)('varchar', { name: 'type', length: 255, nullable: false }),
53
- (0, class_validator_1.IsNotEmpty)({ message: 'Blank physical address types are not allowed' }),
52
+ Column('varchar', { name: 'type', length: 255, nullable: false }),
53
+ IsNotEmpty({ message: 'Blank physical address types are not allowed' }),
54
54
  __metadata("design:type", String)
55
55
  ], PhysicalAddressEntity.prototype, "type", void 0);
56
56
  __decorate([
57
- (0, typeorm_1.Column)('varchar', { name: 'street_name', length: 255, nullable: false }),
58
- (0, class_validator_1.IsNotEmpty)({ message: 'Blank street names are not allowed' }),
57
+ Column('varchar', { name: 'street_name', length: 255, nullable: false }),
58
+ IsNotEmpty({ message: 'Blank street names are not allowed' }),
59
59
  __metadata("design:type", String)
60
60
  ], PhysicalAddressEntity.prototype, "streetName", void 0);
61
61
  __decorate([
62
- (0, typeorm_1.Column)('varchar', { name: 'street_number', length: 255, nullable: false }),
63
- (0, class_validator_1.IsNotEmpty)({ message: 'Blank street numbers are not allowed' }),
62
+ Column('varchar', { name: 'street_number', length: 255, nullable: false }),
63
+ IsNotEmpty({ message: 'Blank street numbers are not allowed' }),
64
64
  __metadata("design:type", String)
65
65
  ], PhysicalAddressEntity.prototype, "streetNumber", void 0);
66
66
  __decorate([
67
- (0, typeorm_1.Column)('varchar', { name: 'postal_code', length: 255, nullable: false }),
68
- (0, class_validator_1.IsNotEmpty)({ message: 'Blank postal codes are not allowed' }),
67
+ Column('varchar', { name: 'postal_code', length: 255, nullable: false }),
68
+ IsNotEmpty({ message: 'Blank postal codes are not allowed' }),
69
69
  __metadata("design:type", String)
70
70
  ], PhysicalAddressEntity.prototype, "postalCode", void 0);
71
71
  __decorate([
72
- (0, typeorm_1.Column)('varchar', { name: 'city_name', length: 255, nullable: false }),
73
- (0, class_validator_1.IsNotEmpty)({ message: 'Blank city names are not allowed' }),
72
+ Column('varchar', { name: 'city_name', length: 255, nullable: false }),
73
+ IsNotEmpty({ message: 'Blank city names are not allowed' }),
74
74
  __metadata("design:type", String)
75
75
  ], PhysicalAddressEntity.prototype, "cityName", void 0);
76
76
  __decorate([
77
- (0, typeorm_1.Column)('varchar', { name: 'province_name', length: 255, nullable: false }),
78
- (0, class_validator_1.IsNotEmpty)({ message: 'Blank province names are not allowed' }),
77
+ Column('varchar', { name: 'province_name', length: 255, nullable: false }),
78
+ IsNotEmpty({ message: 'Blank province names are not allowed' }),
79
79
  __metadata("design:type", String)
80
80
  ], PhysicalAddressEntity.prototype, "provinceName", void 0);
81
81
  __decorate([
82
- (0, typeorm_1.Column)('varchar', { name: 'country_code', length: 2, nullable: false }),
83
- (0, class_validator_1.IsNotEmpty)({ message: 'Blank country codes are not allowed' }),
82
+ Column('varchar', { name: 'country_code', length: 2, nullable: false }),
83
+ IsNotEmpty({ message: 'Blank country codes are not allowed' }),
84
84
  __metadata("design:type", String)
85
85
  ], PhysicalAddressEntity.prototype, "countryCode", void 0);
86
86
  __decorate([
87
- (0, typeorm_1.Column)('varchar', { name: 'building_name', length: 255, nullable: true }),
88
- (0, class_validator_1.Validate)(validators_1.IsNonEmptyStringConstraint, { message: 'Blank building names are not allowed' }),
87
+ Column('varchar', { name: 'building_name', length: 255, nullable: true }),
88
+ Validate(IsNonEmptyStringConstraint, { message: 'Blank building names are not allowed' }),
89
89
  __metadata("design:type", String)
90
90
  ], PhysicalAddressEntity.prototype, "buildingName", void 0);
91
91
  __decorate([
92
- (0, typeorm_1.Column)('text', { name: 'owner_id', nullable: true }),
92
+ Column('text', { name: 'owner_id', nullable: true }),
93
93
  __metadata("design:type", String)
94
94
  ], PhysicalAddressEntity.prototype, "ownerId", void 0);
95
95
  __decorate([
96
- (0, typeorm_1.Column)('text', { name: 'tenant_id', nullable: true }),
96
+ Column('text', { name: 'tenant_id', nullable: true }),
97
97
  __metadata("design:type", String)
98
98
  ], PhysicalAddressEntity.prototype, "tenantId", void 0);
99
99
  __decorate([
100
- (0, typeorm_1.ManyToOne)(() => PartyEntity_1.PartyEntity, (party) => party.physicalAddresses, {
100
+ ManyToOne(() => PartyEntity, (party) => party.physicalAddresses, {
101
101
  onDelete: 'CASCADE',
102
102
  }),
103
- __metadata("design:type", PartyEntity_1.PartyEntity)
103
+ __metadata("design:type", PartyEntity)
104
104
  ], PhysicalAddressEntity.prototype, "party", void 0);
105
105
  __decorate([
106
- (0, typeorm_1.Column)('text', { name: 'partyId', nullable: true }),
106
+ Column('text', { name: 'partyId', nullable: true }),
107
107
  __metadata("design:type", String)
108
108
  ], PhysicalAddressEntity.prototype, "partyId", void 0);
109
109
  __decorate([
110
- (0, typeorm_1.CreateDateColumn)({ name: 'created_at', nullable: false, type: (0, ssi_sdk_agent_config_1.typeOrmDateTime)() }),
110
+ CreateDateColumn({ name: 'created_at', nullable: false, type: typeOrmDateTime() }),
111
111
  __metadata("design:type", Date)
112
112
  ], PhysicalAddressEntity.prototype, "createdAt", void 0);
113
113
  __decorate([
114
- (0, typeorm_1.UpdateDateColumn)({ name: 'last_updated_at', nullable: false, type: (0, ssi_sdk_agent_config_1.typeOrmDateTime)() }),
114
+ UpdateDateColumn({ name: 'last_updated_at', nullable: false, type: typeOrmDateTime() }),
115
115
  __metadata("design:type", Date
116
116
  // By default, @UpdateDateColumn in TypeORM updates the timestamp only when the entity's top-level properties change.
117
117
  )
118
118
  ], PhysicalAddressEntity.prototype, "lastUpdatedAt", void 0);
119
119
  __decorate([
120
- (0, typeorm_1.BeforeInsert)(),
121
- (0, typeorm_1.BeforeUpdate)(),
120
+ BeforeInsert(),
121
+ BeforeUpdate(),
122
122
  __metadata("design:type", Function),
123
123
  __metadata("design:paramtypes", []),
124
124
  __metadata("design:returntype", void 0)
125
125
  ], PhysicalAddressEntity.prototype, "updateUpdatedDate", null);
126
126
  __decorate([
127
- (0, typeorm_1.BeforeInsert)(),
128
- (0, typeorm_1.BeforeUpdate)(),
127
+ BeforeInsert(),
128
+ BeforeUpdate(),
129
129
  __metadata("design:type", Function),
130
130
  __metadata("design:paramtypes", []),
131
131
  __metadata("design:returntype", Promise)
132
132
  ], PhysicalAddressEntity.prototype, "validate", null);
133
- exports.PhysicalAddressEntity = PhysicalAddressEntity = __decorate([
134
- (0, typeorm_1.Entity)('PhysicalAddress')
133
+ PhysicalAddressEntity = __decorate([
134
+ Entity('PhysicalAddress')
135
135
  ], PhysicalAddressEntity);
136
+ export { PhysicalAddressEntity };
136
137
  //# sourceMappingURL=PhysicalAddressEntity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PhysicalAddressEntity.js","sourceRoot":"","sources":["../../../src/entities/contact/PhysicalAddressEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,qDAAiF;AACjF,qCAUgB;AAChB,yEAAgE;AAChE,+DAA0D;AAE1D,+CAA2C;AAC3C,8CAA0D;AAGnD,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,oBAAU;IAwDnD,qHAAqH;IAGrH,iBAAiB;QACf,IAAI,CAAC,aAAa,GAAG,IAAI,IAAI,EAAE,CAAA;IACjC,CAAC;IAIK,QAAQ;;YACZ,MAAM,UAAU,GAA2B,MAAM,IAAA,0BAAQ,EA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DACrE;AAGrB;IADC,MAAM,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACrC;AAGhB;IADC,MAAM,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACrC;AAKjB;IAHC,SAAS,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,KAAkB,EAAE,EAAE,CAAC,KAAK,CAAC,iBAAiB,EAAE;QAC7E,QAAQ,EAAE,SAAS;KACpB,CAAC;8BACM,WAAW;oDAAA;AAGnB;IADC,MAAM,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACpC;AAGhB;IADC,gBAAgB,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,EAAE,CAAC;8BACvE,IAAI;wDAAA;AAGhB;IADC,gBAAgB,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,EAAE,CAAC;8BACxE,IAAI;IAEpB,qHAAqH;;4DAFjG;AAKpB;IAFC,YAAY,EAAE;IACd,YAAY,EAAE;;;;8DAGd;AAIK;IAFL,YAAY,EAAE;IACd,YAAY,EAAE;;;;qDAUd;AA1EU,qBAAqB;IADjC,MAAM,CAAC,iBAAiB,CAAC;GACb,qBAAqB,CA2EjC"}
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8,127 +7,153 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
7
  var __metadata = (this && this.__metadata) || function (k, v) {
9
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
9
  };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.DigitalCredentialEntity = void 0;
13
- const ssi_sdk_agent_config_1 = require("@sphereon/ssi-sdk.agent-config");
14
- const typeorm_1 = require("typeorm");
15
- const types_1 = require("../../types");
16
- let DigitalCredentialEntity = class DigitalCredentialEntity extends typeorm_1.BaseEntity {
10
+ import { typeormDate, typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config';
11
+ import { BaseEntity, Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
12
+ import { CredentialCorrelationType, CredentialDocumentFormat, CredentialRole, CredentialStateType, DocumentType, RegulationType, } from '../../types';
13
+ let DigitalCredentialEntity = class DigitalCredentialEntity extends BaseEntity {
14
+ id;
15
+ parentId;
16
+ documentType;
17
+ regulationType;
18
+ documentFormat;
19
+ credentialRole;
20
+ rawDocument;
21
+ uniformDocument;
22
+ credentialId;
23
+ hash;
24
+ kmsKeyRef;
25
+ identifierMethod;
26
+ issuerCorrelationType;
27
+ subjectCorrelationType;
28
+ rpCorrelationType;
29
+ isIssuerSigned;
30
+ issuerCorrelationId;
31
+ subjectCorrelationId;
32
+ rpCorrelationId;
33
+ verifiedState;
34
+ tenantId;
35
+ createdAt;
36
+ presentedAt;
37
+ lastUpdatedAt;
38
+ validUntil;
39
+ validFrom;
40
+ verifiedAt;
41
+ revokedAt;
17
42
  };
18
- exports.DigitalCredentialEntity = DigitalCredentialEntity;
19
43
  __decorate([
20
- (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
44
+ PrimaryGeneratedColumn('uuid'),
21
45
  __metadata("design:type", String)
22
46
  ], DigitalCredentialEntity.prototype, "id", void 0);
23
47
  __decorate([
24
- (0, typeorm_1.Column)('text', { name: 'parent_id', nullable: true }),
48
+ Column('text', { name: 'parent_id', nullable: true }),
25
49
  __metadata("design:type", String)
26
50
  ], DigitalCredentialEntity.prototype, "parentId", void 0);
27
51
  __decorate([
28
- (0, typeorm_1.Column)('simple-enum', { name: 'document_type', enum: types_1.DocumentType, nullable: false }),
52
+ Column('simple-enum', { name: 'document_type', enum: DocumentType, nullable: false }),
29
53
  __metadata("design:type", String)
30
54
  ], DigitalCredentialEntity.prototype, "documentType", void 0);
31
55
  __decorate([
32
- (0, typeorm_1.Column)('simple-enum', { name: 'regulation_type', enum: types_1.RegulationType, nullable: false }),
56
+ Column('simple-enum', { name: 'regulation_type', enum: RegulationType, nullable: false }),
33
57
  __metadata("design:type", String)
34
58
  ], DigitalCredentialEntity.prototype, "regulationType", void 0);
35
59
  __decorate([
36
- (0, typeorm_1.Column)('simple-enum', { name: 'document_format', enum: types_1.CredentialDocumentFormat, nullable: false }),
60
+ Column('simple-enum', { name: 'document_format', enum: CredentialDocumentFormat, nullable: false }),
37
61
  __metadata("design:type", String)
38
62
  ], DigitalCredentialEntity.prototype, "documentFormat", void 0);
39
63
  __decorate([
40
- (0, typeorm_1.Column)('simple-enum', { name: 'credential_role', enum: types_1.CredentialRole, nullable: false }),
64
+ Column('simple-enum', { name: 'credential_role', enum: CredentialRole, nullable: false }),
41
65
  __metadata("design:type", String)
42
66
  ], DigitalCredentialEntity.prototype, "credentialRole", void 0);
43
67
  __decorate([
44
- (0, typeorm_1.Column)('text', { name: 'raw_document', nullable: false }),
68
+ Column('text', { name: 'raw_document', nullable: false }),
45
69
  __metadata("design:type", String)
46
70
  ], DigitalCredentialEntity.prototype, "rawDocument", void 0);
47
71
  __decorate([
48
- (0, typeorm_1.Column)('text', { name: 'uniform_document', nullable: false }),
72
+ Column('text', { name: 'uniform_document', nullable: false }),
49
73
  __metadata("design:type", String)
50
74
  ], DigitalCredentialEntity.prototype, "uniformDocument", void 0);
51
75
  __decorate([
52
- (0, typeorm_1.Column)('text', { name: 'credential_id', nullable: true, unique: false }),
76
+ Column('text', { name: 'credential_id', nullable: true, unique: false }),
53
77
  __metadata("design:type", String)
54
78
  ], DigitalCredentialEntity.prototype, "credentialId", void 0);
55
79
  __decorate([
56
- (0, typeorm_1.Column)('text', { name: 'hash', nullable: false, unique: true }),
80
+ Column('text', { name: 'hash', nullable: false, unique: true }),
57
81
  __metadata("design:type", String)
58
82
  ], DigitalCredentialEntity.prototype, "hash", void 0);
59
83
  __decorate([
60
- (0, typeorm_1.Column)('text', { name: 'kms_key_ref', nullable: true }),
84
+ Column('text', { name: 'kms_key_ref', nullable: true }),
61
85
  __metadata("design:type", String)
62
86
  ], DigitalCredentialEntity.prototype, "kmsKeyRef", void 0);
63
87
  __decorate([
64
- (0, typeorm_1.Column)('text', { name: 'identifier_method', nullable: true }),
88
+ Column('text', { name: 'identifier_method', nullable: true }),
65
89
  __metadata("design:type", String)
66
90
  ], DigitalCredentialEntity.prototype, "identifierMethod", void 0);
67
91
  __decorate([
68
- (0, typeorm_1.Column)('simple-enum', { name: 'issuer_correlation_type', enum: types_1.CredentialCorrelationType, nullable: false }),
92
+ Column('simple-enum', { name: 'issuer_correlation_type', enum: CredentialCorrelationType, nullable: false }),
69
93
  __metadata("design:type", String)
70
94
  ], DigitalCredentialEntity.prototype, "issuerCorrelationType", void 0);
71
95
  __decorate([
72
- (0, typeorm_1.Column)('simple-enum', { name: 'subject_correlation_type', enum: types_1.CredentialCorrelationType, nullable: true }),
96
+ Column('simple-enum', { name: 'subject_correlation_type', enum: CredentialCorrelationType, nullable: true }),
73
97
  __metadata("design:type", String)
74
98
  ], DigitalCredentialEntity.prototype, "subjectCorrelationType", void 0);
75
99
  __decorate([
76
- (0, typeorm_1.Column)('simple-enum', { name: 'rp_correlation_type', enum: types_1.CredentialCorrelationType, nullable: true }),
100
+ Column('simple-enum', { name: 'rp_correlation_type', enum: CredentialCorrelationType, nullable: true }),
77
101
  __metadata("design:type", String)
78
102
  ], DigitalCredentialEntity.prototype, "rpCorrelationType", void 0);
79
103
  __decorate([
80
- (0, typeorm_1.Column)('boolean', { name: 'issuer_signed', nullable: true }),
104
+ Column('boolean', { name: 'issuer_signed', nullable: true }),
81
105
  __metadata("design:type", Boolean)
82
106
  ], DigitalCredentialEntity.prototype, "isIssuerSigned", void 0);
83
107
  __decorate([
84
- (0, typeorm_1.Column)('text', { name: 'issuer_correlation_id', nullable: false }),
108
+ Column('text', { name: 'issuer_correlation_id', nullable: false }),
85
109
  __metadata("design:type", String)
86
110
  ], DigitalCredentialEntity.prototype, "issuerCorrelationId", void 0);
87
111
  __decorate([
88
- (0, typeorm_1.Column)('text', { name: 'subject_correlation_id', nullable: true }),
112
+ Column('text', { name: 'subject_correlation_id', nullable: true }),
89
113
  __metadata("design:type", String)
90
114
  ], DigitalCredentialEntity.prototype, "subjectCorrelationId", void 0);
91
115
  __decorate([
92
- (0, typeorm_1.Column)('text', { name: 'rp_correlation_id', nullable: true }),
116
+ Column('text', { name: 'rp_correlation_id', nullable: true }),
93
117
  __metadata("design:type", String)
94
118
  ], DigitalCredentialEntity.prototype, "rpCorrelationId", void 0);
95
119
  __decorate([
96
- (0, typeorm_1.Column)('simple-enum', { name: 'verified_state', enum: types_1.CredentialStateType, nullable: true }),
120
+ Column('simple-enum', { name: 'verified_state', enum: CredentialStateType, nullable: true }),
97
121
  __metadata("design:type", String)
98
122
  ], DigitalCredentialEntity.prototype, "verifiedState", void 0);
99
123
  __decorate([
100
- (0, typeorm_1.Column)('text', { name: 'tenant_id', nullable: true }),
124
+ Column('text', { name: 'tenant_id', nullable: true }),
101
125
  __metadata("design:type", String)
102
126
  ], DigitalCredentialEntity.prototype, "tenantId", void 0);
103
127
  __decorate([
104
- (0, typeorm_1.CreateDateColumn)({ name: 'created_at', nullable: false, type: (0, ssi_sdk_agent_config_1.typeOrmDateTime)() }),
128
+ CreateDateColumn({ name: 'created_at', nullable: false, type: typeOrmDateTime() }),
105
129
  __metadata("design:type", Date)
106
130
  ], DigitalCredentialEntity.prototype, "createdAt", void 0);
107
131
  __decorate([
108
- (0, typeorm_1.Column)({ name: 'presented_at', nullable: true, type: (0, ssi_sdk_agent_config_1.typeormDate)() }),
132
+ Column({ name: 'presented_at', nullable: true, type: typeormDate() }),
109
133
  __metadata("design:type", Date)
110
134
  ], DigitalCredentialEntity.prototype, "presentedAt", void 0);
111
135
  __decorate([
112
- (0, typeorm_1.UpdateDateColumn)({ name: 'last_updated_at', nullable: false, type: (0, ssi_sdk_agent_config_1.typeOrmDateTime)() }),
136
+ UpdateDateColumn({ name: 'last_updated_at', nullable: false, type: typeOrmDateTime() }),
113
137
  __metadata("design:type", Date)
114
138
  ], DigitalCredentialEntity.prototype, "lastUpdatedAt", void 0);
115
139
  __decorate([
116
- (0, typeorm_1.Column)({ name: 'valid_until', nullable: true, type: (0, ssi_sdk_agent_config_1.typeormDate)() }),
140
+ Column({ name: 'valid_until', nullable: true, type: typeormDate() }),
117
141
  __metadata("design:type", Date)
118
142
  ], DigitalCredentialEntity.prototype, "validUntil", void 0);
119
143
  __decorate([
120
- (0, typeorm_1.Column)({ name: 'valid_from', nullable: true, type: (0, ssi_sdk_agent_config_1.typeormDate)() }),
144
+ Column({ name: 'valid_from', nullable: true, type: typeormDate() }),
121
145
  __metadata("design:type", Date)
122
146
  ], DigitalCredentialEntity.prototype, "validFrom", void 0);
123
147
  __decorate([
124
- (0, typeorm_1.Column)({ name: 'verified_at', nullable: true, type: (0, ssi_sdk_agent_config_1.typeOrmDateTime)() }),
148
+ Column({ name: 'verified_at', nullable: true, type: typeOrmDateTime() }),
125
149
  __metadata("design:type", Date)
126
150
  ], DigitalCredentialEntity.prototype, "verifiedAt", void 0);
127
151
  __decorate([
128
- (0, typeorm_1.Column)({ name: 'revoked_at', nullable: true, type: (0, ssi_sdk_agent_config_1.typeOrmDateTime)() }),
152
+ Column({ name: 'revoked_at', nullable: true, type: typeOrmDateTime() }),
129
153
  __metadata("design:type", Date)
130
154
  ], DigitalCredentialEntity.prototype, "revokedAt", void 0);
131
- exports.DigitalCredentialEntity = DigitalCredentialEntity = __decorate([
132
- (0, typeorm_1.Entity)('DigitalCredential')
155
+ DigitalCredentialEntity = __decorate([
156
+ Entity('DigitalCredential')
133
157
  ], DigitalCredentialEntity);
158
+ export { DigitalCredentialEntity };
134
159
  //# sourceMappingURL=DigitalCredentialEntity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DigitalCredentialEntity.js","sourceRoot":"","sources":["../../../src/entities/digitalCredential/DigitalCredentialEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yEAA6E;AAC7E,qCAAgH;AAChH,uCAQoB;AAGb,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,oBAAU;CAoFtD,CAAA;AApFY,0DAAuB;AAElC;IADC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;mDACpB;AAGX;IADC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDACrC;AAGjB;IADC,IAAA,gBAAM,EAAC,aAAa,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,oBAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;6DAC3D;AAG3B;IADC,IAAA,gBAAM,EAAC,aAAa,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE,sBAAc,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;+DAC3D;AAG/B;IADC,IAAA,gBAAM,EAAC,aAAa,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE,gCAAwB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;+DAC3D;AAGzC;IADC,IAAA,gBAAM,EAAC,aAAa,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE,sBAAc,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;+DAC3D;AAG/B;IADC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,QAAQ,E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