@sphereon/ssi-sdk.data-store 0.18.2-unstable.7 → 0.18.2-unstable.85

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 (266) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +77 -77
  3. package/dist/contact/AbstractContactStore.d.ts +33 -23
  4. package/dist/contact/AbstractContactStore.d.ts.map +1 -1
  5. package/dist/contact/AbstractContactStore.js +6 -6
  6. package/dist/contact/AbstractContactStore.js.map +1 -1
  7. package/dist/contact/ContactStore.d.ts +44 -32
  8. package/dist/contact/ContactStore.d.ts.map +1 -1
  9. package/dist/contact/ContactStore.js +528 -365
  10. package/dist/contact/ContactStore.js.map +1 -1
  11. package/dist/digitalCredential/AbstractDigitalCredentialStore.d.ts +10 -0
  12. package/dist/digitalCredential/AbstractDigitalCredentialStore.d.ts.map +1 -0
  13. package/dist/digitalCredential/AbstractDigitalCredentialStore.js +7 -0
  14. package/dist/digitalCredential/AbstractDigitalCredentialStore.js.map +1 -0
  15. package/dist/digitalCredential/DigitalCredentialStore.d.ts +15 -0
  16. package/dist/digitalCredential/DigitalCredentialStore.d.ts.map +1 -0
  17. package/dist/digitalCredential/DigitalCredentialStore.js +97 -0
  18. package/dist/digitalCredential/DigitalCredentialStore.js.map +1 -0
  19. package/dist/entities/contact/BaseConfigEntity.d.ts +6 -6
  20. package/dist/entities/contact/BaseConfigEntity.js +33 -33
  21. package/dist/entities/contact/BaseContactEntity.d.ts +9 -9
  22. package/dist/entities/contact/BaseContactEntity.js +53 -53
  23. package/dist/entities/contact/ConnectionEntity.d.ts +10 -10
  24. package/dist/entities/contact/ConnectionEntity.js +46 -46
  25. package/dist/entities/contact/CorrelationIdentifierEntity.d.ts +10 -10
  26. package/dist/entities/contact/CorrelationIdentifierEntity.js +71 -71
  27. package/dist/entities/contact/DidAuthConfigEntity.d.ts +6 -6
  28. package/dist/entities/contact/DidAuthConfigEntity.js +32 -32
  29. package/dist/entities/contact/ElectronicAddressEntity.d.ts +14 -13
  30. package/dist/entities/contact/ElectronicAddressEntity.d.ts.map +1 -1
  31. package/dist/entities/contact/ElectronicAddressEntity.js +95 -91
  32. package/dist/entities/contact/ElectronicAddressEntity.js.map +1 -1
  33. package/dist/entities/contact/IdentityEntity.d.ts +20 -20
  34. package/dist/entities/contact/IdentityEntity.d.ts.map +1 -1
  35. package/dist/entities/contact/IdentityEntity.js +128 -128
  36. package/dist/entities/contact/IdentityMetadataItemEntity.d.ts +9 -9
  37. package/dist/entities/contact/IdentityMetadataItemEntity.js +68 -68
  38. package/dist/entities/contact/NaturalPersonEntity.d.ts +8 -8
  39. package/dist/entities/contact/NaturalPersonEntity.js +71 -71
  40. package/dist/entities/contact/OpenIdConfigEntity.d.ts +10 -10
  41. package/dist/entities/contact/OpenIdConfigEntity.js +48 -48
  42. package/dist/entities/contact/OrganizationEntity.d.ts +8 -8
  43. package/dist/entities/contact/OrganizationEntity.js +66 -66
  44. package/dist/entities/contact/PartyEntity.d.ts +21 -19
  45. package/dist/entities/contact/PartyEntity.d.ts.map +1 -1
  46. package/dist/entities/contact/PartyEntity.js +142 -131
  47. package/dist/entities/contact/PartyEntity.js.map +1 -1
  48. package/dist/entities/contact/PartyRelationshipEntity.d.ts +12 -12
  49. package/dist/entities/contact/PartyRelationshipEntity.js +94 -94
  50. package/dist/entities/contact/PartyTypeEntity.d.ts +14 -14
  51. package/dist/entities/contact/PartyTypeEntity.js +103 -103
  52. package/dist/entities/contact/PhysicalAddressEntity.d.ts +21 -0
  53. package/dist/entities/contact/PhysicalAddressEntity.d.ts.map +1 -0
  54. package/dist/entities/contact/PhysicalAddressEntity.js +126 -0
  55. package/dist/entities/contact/PhysicalAddressEntity.js.map +1 -0
  56. package/dist/entities/digitalCredential/DigitalCredentialEntity.d.ts +23 -0
  57. package/dist/entities/digitalCredential/DigitalCredentialEntity.d.ts.map +1 -0
  58. package/dist/entities/digitalCredential/DigitalCredentialEntity.js +93 -0
  59. package/dist/entities/digitalCredential/DigitalCredentialEntity.js.map +1 -0
  60. package/dist/entities/eventLogger/AuditEventEntity.d.ts +26 -26
  61. package/dist/entities/eventLogger/AuditEventEntity.js +123 -123
  62. package/dist/entities/eventLogger/AuditEventEntity.js.map +1 -1
  63. package/dist/entities/issuanceBranding/BackgroundAttributesEntity.d.ts +10 -10
  64. package/dist/entities/issuanceBranding/BackgroundAttributesEntity.js +73 -73
  65. package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.d.ts +17 -17
  66. package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.js +119 -119
  67. package/dist/entities/issuanceBranding/CredentialBrandingEntity.d.ts +14 -14
  68. package/dist/entities/issuanceBranding/CredentialBrandingEntity.js +101 -101
  69. package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.d.ts +8 -8
  70. package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.js +48 -48
  71. package/dist/entities/issuanceBranding/ImageAttributesEntity.d.ts +13 -13
  72. package/dist/entities/issuanceBranding/ImageAttributesEntity.js +91 -91
  73. package/dist/entities/issuanceBranding/ImageDimensionsEntity.d.ts +8 -8
  74. package/dist/entities/issuanceBranding/ImageDimensionsEntity.js +38 -38
  75. package/dist/entities/issuanceBranding/IssuerBrandingEntity.d.ts +13 -13
  76. package/dist/entities/issuanceBranding/IssuerBrandingEntity.js +94 -94
  77. package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.d.ts +8 -8
  78. package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.js +48 -48
  79. package/dist/entities/issuanceBranding/TextAttributesEntity.d.ts +8 -8
  80. package/dist/entities/issuanceBranding/TextAttributesEntity.js +61 -61
  81. package/dist/entities/statusList2021/StatusList2021Entity.d.ts +18 -18
  82. package/dist/entities/statusList2021/StatusList2021Entity.js +114 -114
  83. package/dist/entities/statusList2021/StatusList2021EntryEntity.d.ts +10 -10
  84. package/dist/entities/statusList2021/StatusList2021EntryEntity.js +50 -50
  85. package/dist/entities/validators/index.d.ts +6 -6
  86. package/dist/entities/validators/index.js +26 -26
  87. package/dist/eventLogger/AbstractEventLoggerStore.d.ts +6 -6
  88. package/dist/eventLogger/AbstractEventLoggerStore.js +6 -6
  89. package/dist/eventLogger/EventLoggerStore.d.ts +12 -12
  90. package/dist/eventLogger/EventLoggerStore.js +43 -43
  91. package/dist/index.d.ts +45 -41
  92. package/dist/index.d.ts.map +1 -1
  93. package/dist/index.js +143 -127
  94. package/dist/index.js.map +1 -1
  95. package/dist/issuanceBranding/AbstractIssuanceBrandingStore.d.ts +19 -19
  96. package/dist/issuanceBranding/AbstractIssuanceBrandingStore.js +6 -6
  97. package/dist/issuanceBranding/IssuanceBrandingStore.d.ts +30 -30
  98. package/dist/issuanceBranding/IssuanceBrandingStore.d.ts.map +1 -1
  99. package/dist/issuanceBranding/IssuanceBrandingStore.js +390 -374
  100. package/dist/issuanceBranding/IssuanceBrandingStore.js.map +1 -1
  101. package/dist/migrations/generic/1-CreateContacts.d.ts +6 -6
  102. package/dist/migrations/generic/1-CreateContacts.js +77 -77
  103. package/dist/migrations/generic/2-CreateIssuanceBranding.d.ts +6 -6
  104. package/dist/migrations/generic/2-CreateIssuanceBranding.js +77 -77
  105. package/dist/migrations/generic/3-CreateContacts.d.ts +6 -6
  106. package/dist/migrations/generic/3-CreateContacts.js +77 -77
  107. package/dist/migrations/generic/4-CreateStatusList.d.ts +6 -6
  108. package/dist/migrations/generic/4-CreateStatusList.js +71 -71
  109. package/dist/migrations/generic/5-CreateAuditEvents.d.ts +6 -6
  110. package/dist/migrations/generic/5-CreateAuditEvents.js +77 -77
  111. package/dist/migrations/generic/{2-CreateContacts.d.ts → 6-CreateDigitalCredential.d.ts} +2 -2
  112. package/dist/migrations/generic/6-CreateDigitalCredential.d.ts.map +1 -0
  113. package/dist/migrations/generic/{2-CreateContacts.js → 6-CreateDigitalCredential.js} +23 -23
  114. package/dist/migrations/generic/6-CreateDigitalCredential.js.map +1 -0
  115. package/dist/migrations/generic/index.d.ts +18 -16
  116. package/dist/migrations/generic/index.d.ts.map +1 -1
  117. package/dist/migrations/generic/index.js +30 -27
  118. package/dist/migrations/generic/index.js.map +1 -1
  119. package/dist/migrations/index.d.ts +1 -1
  120. package/dist/migrations/index.d.ts.map +1 -1
  121. package/dist/migrations/index.js +10 -5
  122. package/dist/migrations/index.js.map +1 -1
  123. package/dist/migrations/internal-migrations-ormconfig.d.ts +6 -6
  124. package/dist/migrations/internal-migrations-ormconfig.js +26 -26
  125. package/dist/migrations/postgres/1659463079428-CreateContacts.d.ts +6 -6
  126. package/dist/migrations/postgres/1659463079428-CreateContacts.js +56 -56
  127. package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.d.ts +6 -6
  128. package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.js +68 -68
  129. package/dist/migrations/postgres/1690925872592-CreateContacts.d.ts +6 -6
  130. package/dist/migrations/postgres/1690925872592-CreateContacts.js +68 -68
  131. package/dist/migrations/postgres/1693866470001-CreateStatusList.d.ts +6 -6
  132. package/dist/migrations/postgres/1693866470001-CreateStatusList.js +31 -31
  133. package/dist/migrations/postgres/1701634812183-CreateAuditEvents.d.ts +6 -6
  134. package/dist/migrations/postgres/1701634812183-CreateAuditEvents.js +42 -42
  135. package/dist/migrations/postgres/1701634812183-CreateAuditEvents.js.map +1 -1
  136. package/dist/migrations/{generic/3-CreateStatusList.d.ts → postgres/1708525189001-CreateDigitalCredential.d.ts} +2 -2
  137. package/dist/migrations/postgres/1708525189001-CreateDigitalCredential.d.ts.map +1 -0
  138. package/dist/migrations/postgres/1708525189001-CreateDigitalCredential.js +59 -0
  139. package/dist/migrations/postgres/1708525189001-CreateDigitalCredential.js.map +1 -0
  140. package/dist/migrations/sqlite/1659463069549-CreateContacts.d.ts +6 -6
  141. package/dist/migrations/sqlite/1659463069549-CreateContacts.js +78 -78
  142. package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.d.ts +6 -6
  143. package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.js +88 -88
  144. package/dist/migrations/sqlite/1690925872693-CreateContacts.d.ts +6 -6
  145. package/dist/migrations/sqlite/1690925872693-CreateContacts.d.ts.map +1 -1
  146. package/dist/migrations/sqlite/1690925872693-CreateContacts.js +104 -107
  147. package/dist/migrations/sqlite/1690925872693-CreateContacts.js.map +1 -1
  148. package/dist/migrations/sqlite/1693866470000-CreateStatusList.d.ts +6 -6
  149. package/dist/migrations/sqlite/1693866470000-CreateStatusList.js +31 -31
  150. package/dist/migrations/sqlite/1701634819487-CreateAuditEvents.d.ts +6 -6
  151. package/dist/migrations/sqlite/1701634819487-CreateAuditEvents.js +28 -28
  152. package/dist/migrations/sqlite/1701634819487-CreateAuditEvents.js.map +1 -1
  153. package/dist/migrations/{postgres/CreateStatusList1693866470001-CreateStatusList.d.ts → sqlite/1708525189002-CreateDigitalCredential.d.ts} +2 -2
  154. package/dist/migrations/sqlite/1708525189002-CreateDigitalCredential.d.ts.map +1 -0
  155. package/dist/migrations/sqlite/1708525189002-CreateDigitalCredential.js +50 -0
  156. package/dist/migrations/sqlite/1708525189002-CreateDigitalCredential.js.map +1 -0
  157. package/dist/statusList/IStatusListStore.d.ts +19 -19
  158. package/dist/statusList/IStatusListStore.js +2 -2
  159. package/dist/statusList/StatusListStore.d.ts +35 -35
  160. package/dist/statusList/StatusListStore.js +212 -212
  161. package/dist/types/contact/IAbstractContactStore.d.ts +109 -74
  162. package/dist/types/contact/IAbstractContactStore.d.ts.map +1 -1
  163. package/dist/types/contact/IAbstractContactStore.js +2 -2
  164. package/dist/types/contact/contact.d.ts +196 -173
  165. package/dist/types/contact/contact.d.ts.map +1 -1
  166. package/dist/types/contact/contact.js +25 -25
  167. package/dist/types/contact/contact.js.map +1 -1
  168. package/dist/types/digitalCredential/IAbstractDigitalCredentialStore.d.ts +27 -0
  169. package/dist/types/digitalCredential/IAbstractDigitalCredentialStore.d.ts.map +1 -0
  170. package/dist/types/digitalCredential/IAbstractDigitalCredentialStore.js +3 -0
  171. package/dist/types/digitalCredential/IAbstractDigitalCredentialStore.js.map +1 -0
  172. package/dist/types/digitalCredential/digitalCredential.d.ts +41 -0
  173. package/dist/types/digitalCredential/digitalCredential.d.ts.map +1 -0
  174. package/dist/types/digitalCredential/digitalCredential.js +28 -0
  175. package/dist/types/digitalCredential/digitalCredential.js.map +1 -0
  176. package/dist/types/eventLogger/IAbstractEventLoggerStore.d.ts +9 -9
  177. package/dist/types/eventLogger/IAbstractEventLoggerStore.js +2 -2
  178. package/dist/types/eventLogger/eventLogger.d.ts +2 -2
  179. package/dist/types/eventLogger/eventLogger.js +2 -2
  180. package/dist/types/index.d.ts +9 -9
  181. package/dist/types/index.js +25 -25
  182. package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.d.ts +58 -58
  183. package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.js +2 -2
  184. package/dist/types/issuanceBranding/issuanceBranding.d.ts +114 -114
  185. package/dist/types/issuanceBranding/issuanceBranding.js +2 -2
  186. package/dist/types/statusList/IAbstractStatusListStore.d.ts +37 -37
  187. package/dist/types/statusList/IAbstractStatusListStore.js +2 -2
  188. package/dist/types/statusList/statusList.d.ts +24 -24
  189. package/dist/types/statusList/statusList.js +2 -2
  190. package/dist/types/validation/validation.d.ts +3 -3
  191. package/dist/types/validation/validation.js +2 -2
  192. package/dist/utils/ValidatorUtils.d.ts +3 -3
  193. package/dist/utils/ValidatorUtils.js +12 -12
  194. package/dist/utils/contact/MappingUtils.d.ts +49 -46
  195. package/dist/utils/contact/MappingUtils.d.ts.map +1 -1
  196. package/dist/utils/contact/MappingUtils.js +326 -290
  197. package/dist/utils/contact/MappingUtils.js.map +1 -1
  198. package/dist/utils/digitalCredential/MappingUtils.d.ts +9 -0
  199. package/dist/utils/digitalCredential/MappingUtils.d.ts.map +1 -0
  200. package/dist/utils/digitalCredential/MappingUtils.js +92 -0
  201. package/dist/utils/digitalCredential/MappingUtils.js.map +1 -0
  202. package/package.json +5 -4
  203. package/src/__tests__/contact.entities.test.ts +323 -23
  204. package/src/__tests__/contact.store.test.ts +586 -10
  205. package/src/__tests__/digitalCredential.entities.test.ts +247 -0
  206. package/src/__tests__/digitalCredential.store.test.ts +194 -0
  207. package/src/__tests__/eventLogger.entities.test.ts +73 -73
  208. package/src/__tests__/eventLogger.store.test.ts +136 -136
  209. package/src/contact/AbstractContactStore.ts +38 -17
  210. package/src/contact/ContactStore.ts +715 -501
  211. package/src/digitalCredential/AbstractDigitalCredentialStore.ts +16 -0
  212. package/src/digitalCredential/DigitalCredentialStore.ts +107 -0
  213. package/src/entities/contact/ElectronicAddressEntity.ts +3 -0
  214. package/src/entities/contact/IdentityEntity.ts +1 -1
  215. package/src/entities/contact/PartyEntity.ts +11 -1
  216. package/src/entities/contact/PhysicalAddressEntity.ts +87 -0
  217. package/src/entities/digitalCredential/DigitalCredentialEntity.ts +64 -0
  218. package/src/entities/eventLogger/AuditEventEntity.ts +99 -99
  219. package/src/entities/statusList2021/StatusList2021Entity.ts +96 -96
  220. package/src/eventLogger/AbstractEventLoggerStore.ts +7 -7
  221. package/src/eventLogger/EventLoggerStore.ts +62 -62
  222. package/src/index.ts +131 -113
  223. package/src/issuanceBranding/IssuanceBrandingStore.ts +78 -62
  224. package/src/migrations/generic/1-CreateContacts.ts +66 -66
  225. package/src/migrations/generic/2-CreateIssuanceBranding.ts +64 -64
  226. package/src/migrations/generic/3-CreateContacts.ts +66 -66
  227. package/src/migrations/generic/4-CreateStatusList.ts +54 -54
  228. package/src/migrations/generic/5-CreateAuditEvents.ts +66 -66
  229. package/src/migrations/generic/6-CreateDigitalCredential.ts +66 -0
  230. package/src/migrations/generic/index.ts +30 -27
  231. package/src/migrations/index.ts +8 -1
  232. package/src/migrations/postgres/1693866470001-CreateStatusList.ts +24 -24
  233. package/src/migrations/postgres/1701634812183-CreateAuditEvents.ts +33 -33
  234. package/src/migrations/postgres/1708525189001-CreateDigitalCredential.ts +44 -0
  235. package/src/migrations/sqlite/1690925872693-CreateContacts.ts +158 -163
  236. package/src/migrations/sqlite/1701634819487-CreateAuditEvents.ts +15 -15
  237. package/src/migrations/sqlite/1708525189002-CreateDigitalCredential.ts +34 -0
  238. package/src/types/contact/IAbstractContactStore.ts +58 -8
  239. package/src/types/contact/contact.ts +29 -4
  240. package/src/types/digitalCredential/IAbstractDigitalCredentialStore.ts +26 -0
  241. package/src/types/digitalCredential/digitalCredential.ts +45 -0
  242. package/src/types/eventLogger/IAbstractEventLoggerStore.ts +12 -12
  243. package/src/types/eventLogger/eventLogger.ts +3 -3
  244. package/src/types/index.ts +9 -9
  245. package/src/utils/contact/MappingUtils.ts +39 -1
  246. package/src/utils/digitalCredential/MappingUtils.ts +112 -0
  247. package/dist/entities/contact/ContactEntity.d.ts +0 -16
  248. package/dist/entities/contact/ContactEntity.d.ts.map +0 -1
  249. package/dist/entities/contact/ContactEntity.js +0 -164
  250. package/dist/entities/contact/ContactEntity.js.map +0 -1
  251. package/dist/migrations/generic/1-CreateIssuanceBranding.d.ts +0 -7
  252. package/dist/migrations/generic/1-CreateIssuanceBranding.d.ts.map +0 -1
  253. package/dist/migrations/generic/1-CreateIssuanceBranding.js +0 -96
  254. package/dist/migrations/generic/1-CreateIssuanceBranding.js.map +0 -1
  255. package/dist/migrations/generic/2-CreateContacts.d.ts.map +0 -1
  256. package/dist/migrations/generic/2-CreateContacts.js.map +0 -1
  257. package/dist/migrations/generic/3-CreateStatusList.d.ts.map +0 -1
  258. package/dist/migrations/generic/3-CreateStatusList.js +0 -72
  259. package/dist/migrations/generic/3-CreateStatusList.js.map +0 -1
  260. package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.d.ts.map +0 -1
  261. package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.js +0 -32
  262. package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.js.map +0 -1
  263. package/dist/migrations/postgres/uuid.d.ts +0 -3
  264. package/dist/migrations/postgres/uuid.d.ts.map +0 -1
  265. package/dist/migrations/postgres/uuid.js +0 -25
  266. package/dist/migrations/postgres/uuid.js.map +0 -1
@@ -1,213 +1,213 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.StatusListStore = void 0;
16
- const debug_1 = __importDefault(require("debug"));
17
- const typeorm_1 = require("typeorm");
18
- const StatusList2021Entity_1 = require("../entities/statusList2021/StatusList2021Entity");
19
- const StatusList2021EntryEntity_1 = require("../entities/statusList2021/StatusList2021EntryEntity");
20
- const debug = (0, debug_1.default)('sphereon:ssi-sdk:data-store:status-list');
21
- class StatusListStore {
22
- constructor(dbConnection) {
23
- this._dbConnection = dbConnection;
24
- }
25
- /**
26
- * Get's the available status list indices from the provided indices. Meaning it will filter out any index that is already known.
27
- *
28
- * The idea is that the caller provides a set of random status list indices. We can relatively easy check against the DB in an optimized way.
29
- * If the status list is large it is probably best ot also provide at least a good number of indices. So something like 10 or 20 values.
30
- * Callers are also expected to call this function multiple times if it does not yield results
31
- *
32
- * @param args
33
- */
34
- availableStatusListEntries(args) {
35
- return __awaiter(this, void 0, void 0, function* () {
36
- const statusListIndex = Array.isArray(args.statusListIndex) ? args.statusListIndex : [args.statusListIndex];
37
- const statusList = yield this.getStatusList(Object.assign(Object.assign({}, args), { id: args.statusListId }));
38
- const repo = yield this.getStatusListEntryRepo();
39
- const results = (yield repo.find({
40
- where: {
41
- statusList,
42
- statusListIndex: (0, typeorm_1.In)(statusListIndex),
43
- },
44
- })).map((index) => index.statusListIndex);
45
- return statusListIndex.filter((index) => !results.includes(index));
46
- });
47
- }
48
- addStatusListEntry(args) {
49
- return __awaiter(this, void 0, void 0, function* () {
50
- return (yield this.getStatusListEntryRepo()).save(args);
51
- });
52
- }
53
- updateStatusListEntry(args) {
54
- return __awaiter(this, void 0, void 0, function* () {
55
- const statusListId = typeof args.statusList === 'string' ? args.statusList : args.statusList.id;
56
- const result = yield this.getStatusListEntryByIndex(Object.assign(Object.assign({}, args), { statusListId, errorOnNotFound: false }));
57
- const updatedEntry = {
58
- value: args.value,
59
- correlationId: args.correlationId,
60
- credentialHash: args.credentialHash,
61
- credentialId: args.credentialId,
62
- };
63
- const updateResult = yield (yield this.getStatusListEntryRepo()).upsert(Object.assign(Object.assign({}, (result !== null && result !== void 0 ? result : { statusList: args.statusList, statusListIndex: args.statusListIndex })), updatedEntry), { conflictPaths: ['statusList', 'statusListIndex'] });
64
- console.log(updateResult);
65
- return (yield this.getStatusListEntryByIndex(Object.assign(Object.assign({}, args), { statusListId, errorOnNotFound: true })));
66
- });
67
- }
68
- getStatusListEntryByIndex(args) {
69
- return __awaiter(this, void 0, void 0, function* () {
70
- if (!args.statusListId && !args.correlationId) {
71
- throw Error(`Cannot get statusList entry if not either a statusList id or correlationId is provided`);
72
- }
73
- const result = yield (yield this.getStatusListEntryRepo()).findOne({
74
- where: Object.assign(Object.assign(Object.assign({}, (args.statusListId && { statusList: args.statusListId })), (args.correlationId && { correlationId: args.correlationId })), { statusListIndex: args.statusListIndex }),
75
- });
76
- if (!result && args.errorOnNotFound) {
77
- throw Error(`Could not find status list index ${args.statusListIndex} for status list id ${args.statusListId}`);
78
- }
79
- return result !== null && result !== void 0 ? result : undefined;
80
- });
81
- }
82
- removeStatusListEntryByIndex(args) {
83
- return __awaiter(this, void 0, void 0, function* () {
84
- let error = false;
85
- try {
86
- yield this.getStatusListEntryByIndex(args); // only used to check it exists
87
- }
88
- catch (error) {
89
- error = true;
90
- }
91
- if (error) {
92
- console.log(`Could not delete statusList ${args.statusListId} entry by index ${args.statusListIndex}`);
93
- }
94
- else {
95
- const result = yield (yield this.getStatusListEntryRepo()).delete(Object.assign(Object.assign(Object.assign({}, (args.statusListId && { statusList: args.statusListId })), (args.correlationId && { correlationId: args.correlationId })), { statusListIndex: args.statusListIndex }));
96
- error = !result.affected || result.affected !== 1;
97
- }
98
- return !error;
99
- });
100
- }
101
- getStatusListEntryByCredentialId(args) {
102
- return __awaiter(this, void 0, void 0, function* () {
103
- const credentialId = args.credentialId;
104
- if (!credentialId) {
105
- throw Error('Can only get a credential by credentialId when a credentialId is supplied');
106
- }
107
- const statusList = yield this.getStatusList({ id: args.statusListId, correlationId: args.statusListCorrelationId });
108
- const where = Object.assign(Object.assign({ statusList: statusList.id }, (args.entryCorrelationId && { correlationId: args.entryCorrelationId })), { credentialId });
109
- console.log(`Entries: ${JSON.stringify(yield (yield this.getStatusListEntryRepo()).find(), null, 2)}`);
110
- const result = yield (yield this.getStatusListEntryRepo()).findOne({ where });
111
- if (!result && args.errorOnNotFound) {
112
- throw Error(`Could not find status list credential id ${credentialId} for status list id ${statusList.id}`);
113
- }
114
- return result !== null && result !== void 0 ? result : undefined;
115
- });
116
- }
117
- removeStatusListEntryByCredentialId(args) {
118
- return __awaiter(this, void 0, void 0, function* () {
119
- let error = false;
120
- try {
121
- yield this.getStatusListEntryByCredentialId(args); // only used to check it exists
122
- }
123
- catch (error) {
124
- error = true;
125
- }
126
- if (!error) {
127
- const result = yield (yield this.getStatusListEntryRepo()).delete(Object.assign(Object.assign(Object.assign({}, (args.statusListId && { statusList: args.statusListId })), (args.entryCorrelationId && { correlationId: args.entryCorrelationId })), { credentialId: args.credentialId }));
128
- error = !result.affected || result.affected !== 1;
129
- }
130
- return !error;
131
- });
132
- }
133
- getStatusListEntries(args) {
134
- return __awaiter(this, void 0, void 0, function* () {
135
- return (yield this.getStatusListEntryRepo()).find({ where: Object.assign(Object.assign({}, args === null || args === void 0 ? void 0 : args.filter), { statusList: args.statusListId }) });
136
- });
137
- }
138
- getStatusList(args) {
139
- return __awaiter(this, void 0, void 0, function* () {
140
- if (!args.id && !args.correlationId) {
141
- throw Error(`At least and 'id' or 'correlationId' needs to be provided to lookup a status list`);
142
- }
143
- const where = [];
144
- if (args.id) {
145
- where.push({ id: args.id });
146
- }
147
- if (args.correlationId) {
148
- where.push({ correlationId: args.correlationId });
149
- }
150
- const result = yield (yield this.getStatusListRepo()).findOne({ where });
151
- if (!result) {
152
- throw Error(`No status list found for id ${args.id}`);
153
- }
154
- return result;
155
- });
156
- }
157
- getStatusLists(args) {
158
- return __awaiter(this, void 0, void 0, function* () {
159
- const result = yield (yield this.getStatusListRepo()).find({
160
- where: args.filter,
161
- });
162
- if (!result) {
163
- return [];
164
- }
165
- return result;
166
- });
167
- }
168
- addStatusList(args) {
169
- return __awaiter(this, void 0, void 0, function* () {
170
- const { id, correlationId } = args;
171
- const result = yield (yield this.getStatusListRepo()).findOne({
172
- where: [{ id }, { correlationId }],
173
- });
174
- if (result) {
175
- throw Error(`Status list for id ${id}, correlationId ${correlationId} already exists`);
176
- }
177
- debug('Adding status list ', id);
178
- const createdResult = yield (yield this.getStatusListRepo()).save(args);
179
- return createdResult;
180
- });
181
- }
182
- updateStatusList(args) {
183
- return __awaiter(this, void 0, void 0, function* () {
184
- const result = yield this.getStatusList(args);
185
- debug('Updating status list', result);
186
- const updatedResult = yield (yield this.getStatusListRepo()).save(args, { transaction: true });
187
- return updatedResult;
188
- });
189
- }
190
- removeStatusList(args) {
191
- return __awaiter(this, void 0, void 0, function* () {
192
- const result = yield this.getStatusList(args);
193
- yield (yield this.getStatusListRepo()).delete(result);
194
- });
195
- }
196
- getDS() {
197
- return __awaiter(this, void 0, void 0, function* () {
198
- return yield this._dbConnection;
199
- });
200
- }
201
- getStatusListRepo() {
202
- return __awaiter(this, void 0, void 0, function* () {
203
- return (yield this.getDS()).getRepository(StatusList2021Entity_1.StatusListEntity);
204
- });
205
- }
206
- getStatusListEntryRepo() {
207
- return __awaiter(this, void 0, void 0, function* () {
208
- return (yield this.getDS()).getRepository(StatusList2021EntryEntity_1.StatusListEntryEntity);
209
- });
210
- }
211
- }
212
- exports.StatusListStore = StatusListStore;
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.StatusListStore = void 0;
16
+ const debug_1 = __importDefault(require("debug"));
17
+ const typeorm_1 = require("typeorm");
18
+ const StatusList2021Entity_1 = require("../entities/statusList2021/StatusList2021Entity");
19
+ const StatusList2021EntryEntity_1 = require("../entities/statusList2021/StatusList2021EntryEntity");
20
+ const debug = (0, debug_1.default)('sphereon:ssi-sdk:data-store:status-list');
21
+ class StatusListStore {
22
+ constructor(dbConnection) {
23
+ this._dbConnection = dbConnection;
24
+ }
25
+ /**
26
+ * Get's the available status list indices from the provided indices. Meaning it will filter out any index that is already known.
27
+ *
28
+ * The idea is that the caller provides a set of random status list indices. We can relatively easy check against the DB in an optimized way.
29
+ * If the status list is large it is probably best ot also provide at least a good number of indices. So something like 10 or 20 values.
30
+ * Callers are also expected to call this function multiple times if it does not yield results
31
+ *
32
+ * @param args
33
+ */
34
+ availableStatusListEntries(args) {
35
+ return __awaiter(this, void 0, void 0, function* () {
36
+ const statusListIndex = Array.isArray(args.statusListIndex) ? args.statusListIndex : [args.statusListIndex];
37
+ const statusList = yield this.getStatusList(Object.assign(Object.assign({}, args), { id: args.statusListId }));
38
+ const repo = yield this.getStatusListEntryRepo();
39
+ const results = (yield repo.find({
40
+ where: {
41
+ statusList,
42
+ statusListIndex: (0, typeorm_1.In)(statusListIndex),
43
+ },
44
+ })).map((index) => index.statusListIndex);
45
+ return statusListIndex.filter((index) => !results.includes(index));
46
+ });
47
+ }
48
+ addStatusListEntry(args) {
49
+ return __awaiter(this, void 0, void 0, function* () {
50
+ return (yield this.getStatusListEntryRepo()).save(args);
51
+ });
52
+ }
53
+ updateStatusListEntry(args) {
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ const statusListId = typeof args.statusList === 'string' ? args.statusList : args.statusList.id;
56
+ const result = yield this.getStatusListEntryByIndex(Object.assign(Object.assign({}, args), { statusListId, errorOnNotFound: false }));
57
+ const updatedEntry = {
58
+ value: args.value,
59
+ correlationId: args.correlationId,
60
+ credentialHash: args.credentialHash,
61
+ credentialId: args.credentialId,
62
+ };
63
+ const updateResult = yield (yield this.getStatusListEntryRepo()).upsert(Object.assign(Object.assign({}, (result !== null && result !== void 0 ? result : { statusList: args.statusList, statusListIndex: args.statusListIndex })), updatedEntry), { conflictPaths: ['statusList', 'statusListIndex'] });
64
+ console.log(updateResult);
65
+ return (yield this.getStatusListEntryByIndex(Object.assign(Object.assign({}, args), { statusListId, errorOnNotFound: true })));
66
+ });
67
+ }
68
+ getStatusListEntryByIndex(args) {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ if (!args.statusListId && !args.correlationId) {
71
+ throw Error(`Cannot get statusList entry if not either a statusList id or correlationId is provided`);
72
+ }
73
+ const result = yield (yield this.getStatusListEntryRepo()).findOne({
74
+ where: Object.assign(Object.assign(Object.assign({}, (args.statusListId && { statusList: args.statusListId })), (args.correlationId && { correlationId: args.correlationId })), { statusListIndex: args.statusListIndex }),
75
+ });
76
+ if (!result && args.errorOnNotFound) {
77
+ throw Error(`Could not find status list index ${args.statusListIndex} for status list id ${args.statusListId}`);
78
+ }
79
+ return result !== null && result !== void 0 ? result : undefined;
80
+ });
81
+ }
82
+ removeStatusListEntryByIndex(args) {
83
+ return __awaiter(this, void 0, void 0, function* () {
84
+ let error = false;
85
+ try {
86
+ yield this.getStatusListEntryByIndex(args); // only used to check it exists
87
+ }
88
+ catch (error) {
89
+ error = true;
90
+ }
91
+ if (error) {
92
+ console.log(`Could not delete statusList ${args.statusListId} entry by index ${args.statusListIndex}`);
93
+ }
94
+ else {
95
+ const result = yield (yield this.getStatusListEntryRepo()).delete(Object.assign(Object.assign(Object.assign({}, (args.statusListId && { statusList: args.statusListId })), (args.correlationId && { correlationId: args.correlationId })), { statusListIndex: args.statusListIndex }));
96
+ error = !result.affected || result.affected !== 1;
97
+ }
98
+ return !error;
99
+ });
100
+ }
101
+ getStatusListEntryByCredentialId(args) {
102
+ return __awaiter(this, void 0, void 0, function* () {
103
+ const credentialId = args.credentialId;
104
+ if (!credentialId) {
105
+ throw Error('Can only get a credential by credentialId when a credentialId is supplied');
106
+ }
107
+ const statusList = yield this.getStatusList({ id: args.statusListId, correlationId: args.statusListCorrelationId });
108
+ const where = Object.assign(Object.assign({ statusList: statusList.id }, (args.entryCorrelationId && { correlationId: args.entryCorrelationId })), { credentialId });
109
+ console.log(`Entries: ${JSON.stringify(yield (yield this.getStatusListEntryRepo()).find(), null, 2)}`);
110
+ const result = yield (yield this.getStatusListEntryRepo()).findOne({ where });
111
+ if (!result && args.errorOnNotFound) {
112
+ throw Error(`Could not find status list credential id ${credentialId} for status list id ${statusList.id}`);
113
+ }
114
+ return result !== null && result !== void 0 ? result : undefined;
115
+ });
116
+ }
117
+ removeStatusListEntryByCredentialId(args) {
118
+ return __awaiter(this, void 0, void 0, function* () {
119
+ let error = false;
120
+ try {
121
+ yield this.getStatusListEntryByCredentialId(args); // only used to check it exists
122
+ }
123
+ catch (error) {
124
+ error = true;
125
+ }
126
+ if (!error) {
127
+ const result = yield (yield this.getStatusListEntryRepo()).delete(Object.assign(Object.assign(Object.assign({}, (args.statusListId && { statusList: args.statusListId })), (args.entryCorrelationId && { correlationId: args.entryCorrelationId })), { credentialId: args.credentialId }));
128
+ error = !result.affected || result.affected !== 1;
129
+ }
130
+ return !error;
131
+ });
132
+ }
133
+ getStatusListEntries(args) {
134
+ return __awaiter(this, void 0, void 0, function* () {
135
+ return (yield this.getStatusListEntryRepo()).find({ where: Object.assign(Object.assign({}, args === null || args === void 0 ? void 0 : args.filter), { statusList: args.statusListId }) });
136
+ });
137
+ }
138
+ getStatusList(args) {
139
+ return __awaiter(this, void 0, void 0, function* () {
140
+ if (!args.id && !args.correlationId) {
141
+ throw Error(`At least and 'id' or 'correlationId' needs to be provided to lookup a status list`);
142
+ }
143
+ const where = [];
144
+ if (args.id) {
145
+ where.push({ id: args.id });
146
+ }
147
+ if (args.correlationId) {
148
+ where.push({ correlationId: args.correlationId });
149
+ }
150
+ const result = yield (yield this.getStatusListRepo()).findOne({ where });
151
+ if (!result) {
152
+ throw Error(`No status list found for id ${args.id}`);
153
+ }
154
+ return result;
155
+ });
156
+ }
157
+ getStatusLists(args) {
158
+ return __awaiter(this, void 0, void 0, function* () {
159
+ const result = yield (yield this.getStatusListRepo()).find({
160
+ where: args.filter,
161
+ });
162
+ if (!result) {
163
+ return [];
164
+ }
165
+ return result;
166
+ });
167
+ }
168
+ addStatusList(args) {
169
+ return __awaiter(this, void 0, void 0, function* () {
170
+ const { id, correlationId } = args;
171
+ const result = yield (yield this.getStatusListRepo()).findOne({
172
+ where: [{ id }, { correlationId }],
173
+ });
174
+ if (result) {
175
+ throw Error(`Status list for id ${id}, correlationId ${correlationId} already exists`);
176
+ }
177
+ debug('Adding status list ', id);
178
+ const createdResult = yield (yield this.getStatusListRepo()).save(args);
179
+ return createdResult;
180
+ });
181
+ }
182
+ updateStatusList(args) {
183
+ return __awaiter(this, void 0, void 0, function* () {
184
+ const result = yield this.getStatusList(args);
185
+ debug('Updating status list', result);
186
+ const updatedResult = yield (yield this.getStatusListRepo()).save(args, { transaction: true });
187
+ return updatedResult;
188
+ });
189
+ }
190
+ removeStatusList(args) {
191
+ return __awaiter(this, void 0, void 0, function* () {
192
+ const result = yield this.getStatusList(args);
193
+ yield (yield this.getStatusListRepo()).delete(result);
194
+ });
195
+ }
196
+ getDS() {
197
+ return __awaiter(this, void 0, void 0, function* () {
198
+ return yield this._dbConnection;
199
+ });
200
+ }
201
+ getStatusListRepo() {
202
+ return __awaiter(this, void 0, void 0, function* () {
203
+ return (yield this.getDS()).getRepository(StatusList2021Entity_1.StatusListEntity);
204
+ });
205
+ }
206
+ getStatusListEntryRepo() {
207
+ return __awaiter(this, void 0, void 0, function* () {
208
+ return (yield this.getDS()).getRepository(StatusList2021EntryEntity_1.StatusListEntryEntity);
209
+ });
210
+ }
211
+ }
212
+ exports.StatusListStore = StatusListStore;
213
213
  //# sourceMappingURL=StatusListStore.js.map
@@ -1,75 +1,110 @@
1
- import { NonPersistedPartyType, NonPersistedContact, NonPersistedIdentity, Party, Identity, PartialParty, PartialIdentity, PartyTypeEnum, PartyType, PartyRelationship, PartialPartyRelationship, PartialPartyType, NonPersistedElectronicAddress } from './contact';
2
- export type FindPartyArgs = Array<PartialParty>;
3
- export type FindIdentityArgs = Array<PartialIdentity>;
4
- export type FindPartyTypeArgs = Array<PartialPartyType>;
5
- export type FindRelationshipArgs = Array<PartialPartyRelationship>;
6
- export type GetPartyArgs = {
7
- partyId: string;
8
- };
9
- export type GetPartiesArgs = {
10
- filter?: FindPartyArgs;
11
- };
12
- export type AddPartyArgs = {
13
- uri?: string;
14
- partyType: NonPersistedPartyType;
15
- contact: NonPersistedContact;
16
- identities?: Array<NonPersistedIdentity>;
17
- electronicAddresses?: Array<NonPersistedElectronicAddress>;
18
- };
19
- export type UpdatePartyArgs = {
20
- party: Omit<Party, 'identities' | 'electronicAddresses' | 'partyType' | 'createdAt' | 'lastUpdatedAt'>;
21
- };
22
- export type RemovePartyArgs = {
23
- partyId: string;
24
- };
25
- export type GetIdentityArgs = {
26
- identityId: string;
27
- };
28
- export type GetIdentitiesArgs = {
29
- filter?: FindIdentityArgs;
30
- };
31
- export type AddIdentityArgs = {
32
- partyId: string;
33
- identity: NonPersistedIdentity;
34
- };
35
- export type UpdateIdentityArgs = {
36
- identity: Identity;
37
- };
38
- export type RemoveIdentityArgs = {
39
- identityId: string;
40
- };
41
- export type RemoveRelationshipArgs = {
42
- relationshipId: string;
43
- };
44
- export type AddRelationshipArgs = {
45
- leftId: string;
46
- rightId: string;
47
- };
48
- export type GetRelationshipArgs = {
49
- relationshipId: string;
50
- };
51
- export type GetRelationshipsArgs = {
52
- filter: FindRelationshipArgs;
53
- };
54
- export type UpdateRelationshipArgs = {
55
- relationship: Omit<PartyRelationship, 'createdAt' | 'lastUpdatedAt'>;
56
- };
57
- export type AddPartyTypeArgs = {
58
- type: PartyTypeEnum;
59
- name: string;
60
- tenantId: string;
61
- description?: string;
62
- };
63
- export type GetPartyTypeArgs = {
64
- partyTypeId: string;
65
- };
66
- export type GetPartyTypesArgs = {
67
- filter?: FindPartyTypeArgs;
68
- };
69
- export type UpdatePartyTypeArgs = {
70
- partyType: Omit<PartyType, 'createdAt' | 'lastUpdatedAt'>;
71
- };
72
- export type RemovePartyTypeArgs = {
73
- partyTypeId: string;
74
- };
1
+ import { ElectronicAddress, Identity, NonPersistedContact, NonPersistedElectronicAddress, NonPersistedIdentity, NonPersistedPartyType, NonPersistedPhysicalAddress, PartialElectronicAddress, PartialIdentity, PartialParty, PartialPartyRelationship, PartialPartyType, PartialPhysicalAddress, Party, PartyRelationship, PartyType, PartyTypeEnum, PhysicalAddress } from './contact';
2
+ export type FindPartyArgs = Array<PartialParty>;
3
+ export type FindIdentityArgs = Array<PartialIdentity>;
4
+ export type FindPartyTypeArgs = Array<PartialPartyType>;
5
+ export type FindRelationshipArgs = Array<PartialPartyRelationship>;
6
+ export type FindElectronicAddressArgs = Array<PartialElectronicAddress>;
7
+ export type FindPhysicalAddressArgs = Array<PartialPhysicalAddress>;
8
+ export type GetPartyArgs = {
9
+ partyId: string;
10
+ };
11
+ export type GetPartiesArgs = {
12
+ filter?: FindPartyArgs;
13
+ };
14
+ export type AddPartyArgs = {
15
+ uri?: string;
16
+ partyType: NonPersistedPartyType;
17
+ contact: NonPersistedContact;
18
+ identities?: Array<NonPersistedIdentity>;
19
+ electronicAddresses?: Array<NonPersistedElectronicAddress>;
20
+ physicalAddresses?: Array<NonPersistedPhysicalAddress>;
21
+ };
22
+ export type UpdatePartyArgs = {
23
+ party: Omit<Party, 'identities' | 'electronicAddresses' | 'partyType' | 'createdAt' | 'lastUpdatedAt'>;
24
+ };
25
+ export type RemovePartyArgs = {
26
+ partyId: string;
27
+ };
28
+ export type GetIdentityArgs = {
29
+ identityId: string;
30
+ };
31
+ export type GetIdentitiesArgs = {
32
+ filter?: FindIdentityArgs;
33
+ };
34
+ export type AddIdentityArgs = {
35
+ partyId: string;
36
+ identity: NonPersistedIdentity;
37
+ };
38
+ export type UpdateIdentityArgs = {
39
+ identity: Identity;
40
+ };
41
+ export type RemoveIdentityArgs = {
42
+ identityId: string;
43
+ };
44
+ export type RemoveRelationshipArgs = {
45
+ relationshipId: string;
46
+ };
47
+ export type AddRelationshipArgs = {
48
+ leftId: string;
49
+ rightId: string;
50
+ };
51
+ export type GetRelationshipArgs = {
52
+ relationshipId: string;
53
+ };
54
+ export type GetRelationshipsArgs = {
55
+ filter: FindRelationshipArgs;
56
+ };
57
+ export type UpdateRelationshipArgs = {
58
+ relationship: Omit<PartyRelationship, 'createdAt' | 'lastUpdatedAt'>;
59
+ };
60
+ export type AddPartyTypeArgs = {
61
+ type: PartyTypeEnum;
62
+ name: string;
63
+ tenantId: string;
64
+ description?: string;
65
+ };
66
+ export type GetPartyTypeArgs = {
67
+ partyTypeId: string;
68
+ };
69
+ export type GetPartyTypesArgs = {
70
+ filter?: FindPartyTypeArgs;
71
+ };
72
+ export type UpdatePartyTypeArgs = {
73
+ partyType: Omit<PartyType, 'createdAt' | 'lastUpdatedAt'>;
74
+ };
75
+ export type RemovePartyTypeArgs = {
76
+ partyTypeId: string;
77
+ };
78
+ export type GetElectronicAddressArgs = {
79
+ electronicAddressId: string;
80
+ };
81
+ export type GetElectronicAddressesArgs = {
82
+ filter?: FindElectronicAddressArgs;
83
+ };
84
+ export type AddElectronicAddressArgs = {
85
+ partyId: string;
86
+ electronicAddress: NonPersistedElectronicAddress;
87
+ };
88
+ export type UpdateElectronicAddressArgs = {
89
+ electronicAddress: ElectronicAddress;
90
+ };
91
+ export type RemoveElectronicAddressArgs = {
92
+ electronicAddressId: string;
93
+ };
94
+ export type GetPhysicalAddressArgs = {
95
+ physicalAddressId: string;
96
+ };
97
+ export type GetPhysicalAddressesArgs = {
98
+ filter?: FindPhysicalAddressArgs;
99
+ };
100
+ export type AddPhysicalAddressArgs = {
101
+ partyId: string;
102
+ physicalAddress: NonPersistedPhysicalAddress;
103
+ };
104
+ export type UpdatePhysicalAddressArgs = {
105
+ physicalAddress: PhysicalAddress;
106
+ };
107
+ export type RemovePhysicalAddressArgs = {
108
+ physicalAddressId: string;
109
+ };
75
110
  //# sourceMappingURL=IAbstractContactStore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IAbstractContactStore.d.ts","sourceRoot":"","sources":["../../../src/types/contact/IAbstractContactStore.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,aAAa,EACb,SAAS,EACT,iBAAiB,EACjB,wBAAwB,EACxB,gBAAgB,EAChB,6BAA6B,EAC9B,MAAM,WAAW,CAAA;AAElB,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,YAAY,CAAC,CAAA;AAC/C,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,eAAe,CAAC,CAAA;AACrD,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,gBAAgB,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AChC,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,oBAAoB,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,YAAY,EAAE,IAAI,CAAC,iBAAiB,EAAE,WAAW,GAAG,eAAe,CAAC,CAAA;CACrE,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,aAAa,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,CAAC,EAAE,iBAAiB,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,WAAW,GAAG,eAAe,CAAC,CAAA;CAC1D,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA"}
1
+ {"version":3,"file":"IAbstractContactStore.d.ts","sourceRoot":"","sources":["../../../src/types/contact/IAbstractContactStore.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,mBAAmB,EACnB,6BAA6B,EAC7B,oBAAoB,EACpB,qBAAqB,EACrB,2BAA2B,EAC3B,wBAAwB,EACxB,eAAe,EACf,YAAY,EACZ,wBAAwB,EACxB,gBAAgB,EAChB,sBAAsB,EACtB,KAAK,EACL,iBAAiB,EACjB,SAAS,EACT,aAAa,EACb,eAAe,EAChB,MAAM,WAAW,CAAA;AA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M,MAAM,wBAAwB,GAAG;IACrC,mBAAmB,EAAE,MAAM,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,MAAM,CAAC,EAAE,yBAAyB,CAAA;CACnC,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,EAAE,MAAM,CAAA;IACf,iBAAiB,EAAE,6BAA6B,CAAA;CACjD,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,iBAAiB,EAAE,iBAAiB,CAAA;CACrC,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,mBAAmB,EAAE,MAAM,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,iBAAiB,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,CAAC,EAAE,uBAAuB,CAAA;CACjC,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,eAAe,EAAE,2BAA2B,CAAA;CAC7C,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,eAAe,EAAE,eAAe,CAAA;CACjC,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,iBAAiB,EAAE,MAAM,CAAA;CAC1B,CAAA"}
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=IAbstractContactStore.js.map