@sphereon/ssi-sdk.data-store 0.15.2-next.6 → 0.15.2-next.95

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 (213) hide show
  1. package/dist/contact/AbstractContactStore.d.ts +21 -11
  2. package/dist/contact/AbstractContactStore.d.ts.map +1 -1
  3. package/dist/contact/AbstractContactStore.js.map +1 -1
  4. package/dist/contact/ContactStore.d.ts +25 -21
  5. package/dist/contact/ContactStore.d.ts.map +1 -1
  6. package/dist/contact/ContactStore.js +216 -136
  7. package/dist/contact/ContactStore.js.map +1 -1
  8. package/dist/entities/contact/BaseConfigEntity.d.ts +2 -0
  9. package/dist/entities/contact/BaseConfigEntity.d.ts.map +1 -1
  10. package/dist/entities/contact/BaseConfigEntity.js +10 -2
  11. package/dist/entities/contact/BaseConfigEntity.js.map +1 -1
  12. package/dist/entities/contact/BaseContactEntity.d.ts +10 -0
  13. package/dist/entities/contact/BaseContactEntity.d.ts.map +1 -0
  14. package/dist/entities/contact/BaseContactEntity.js +54 -0
  15. package/dist/entities/contact/BaseContactEntity.js.map +1 -0
  16. package/dist/entities/contact/ConnectionEntity.d.ts +1 -2
  17. package/dist/entities/contact/ConnectionEntity.d.ts.map +1 -1
  18. package/dist/entities/contact/ConnectionEntity.js +2 -21
  19. package/dist/entities/contact/ConnectionEntity.js.map +1 -1
  20. package/dist/entities/contact/CorrelationIdentifierEntity.d.ts +2 -3
  21. package/dist/entities/contact/CorrelationIdentifierEntity.d.ts.map +1 -1
  22. package/dist/entities/contact/CorrelationIdentifierEntity.js +8 -11
  23. package/dist/entities/contact/CorrelationIdentifierEntity.js.map +1 -1
  24. package/dist/entities/contact/DidAuthConfigEntity.d.ts +0 -4
  25. package/dist/entities/contact/DidAuthConfigEntity.d.ts.map +1 -1
  26. package/dist/entities/contact/DidAuthConfigEntity.js +1 -17
  27. package/dist/entities/contact/DidAuthConfigEntity.js.map +1 -1
  28. package/dist/entities/contact/ElectronicAddressEntity.d.ts +14 -0
  29. package/dist/entities/contact/ElectronicAddressEntity.d.ts.map +1 -0
  30. package/dist/entities/contact/ElectronicAddressEntity.js +92 -0
  31. package/dist/entities/contact/ElectronicAddressEntity.js.map +1 -0
  32. package/dist/entities/contact/IdentityEntity.d.ts +5 -6
  33. package/dist/entities/contact/IdentityEntity.d.ts.map +1 -1
  34. package/dist/entities/contact/IdentityEntity.js +15 -20
  35. package/dist/entities/contact/IdentityEntity.js.map +1 -1
  36. package/dist/entities/contact/IdentityMetadataItemEntity.d.ts +1 -3
  37. package/dist/entities/contact/IdentityMetadataItemEntity.d.ts.map +1 -1
  38. package/dist/entities/contact/IdentityMetadataItemEntity.js +7 -10
  39. package/dist/entities/contact/IdentityMetadataItemEntity.js.map +1 -1
  40. package/dist/entities/contact/NaturalPersonEntity.d.ts +9 -0
  41. package/dist/entities/contact/NaturalPersonEntity.d.ts.map +1 -0
  42. package/dist/entities/contact/NaturalPersonEntity.js +72 -0
  43. package/dist/entities/contact/NaturalPersonEntity.js.map +1 -0
  44. package/dist/entities/contact/OpenIdConfigEntity.d.ts +0 -4
  45. package/dist/entities/contact/OpenIdConfigEntity.d.ts.map +1 -1
  46. package/dist/entities/contact/OpenIdConfigEntity.js +1 -22
  47. package/dist/entities/contact/OpenIdConfigEntity.js.map +1 -1
  48. package/dist/entities/contact/OrganizationEntity.d.ts +9 -0
  49. package/dist/entities/contact/OrganizationEntity.d.ts.map +1 -0
  50. package/dist/entities/contact/OrganizationEntity.js +67 -0
  51. package/dist/entities/contact/OrganizationEntity.js.map +1 -0
  52. package/dist/entities/contact/PartyEntity.d.ts +21 -0
  53. package/dist/entities/contact/PartyEntity.d.ts.map +1 -0
  54. package/dist/entities/contact/PartyEntity.js +155 -0
  55. package/dist/entities/contact/PartyEntity.js.map +1 -0
  56. package/dist/entities/contact/PartyRelationshipEntity.d.ts +13 -0
  57. package/dist/entities/contact/PartyRelationshipEntity.d.ts.map +1 -0
  58. package/dist/entities/contact/PartyRelationshipEntity.js +95 -0
  59. package/dist/entities/contact/PartyRelationshipEntity.js.map +1 -0
  60. package/dist/entities/contact/PartyTypeEntity.d.ts +15 -0
  61. package/dist/entities/contact/PartyTypeEntity.d.ts.map +1 -0
  62. package/dist/entities/contact/{ContactEntity.js → PartyTypeEntity.js} +35 -36
  63. package/dist/entities/contact/PartyTypeEntity.js.map +1 -0
  64. package/dist/entities/statusList2021/StatusList2021Entity.d.ts +19 -0
  65. package/dist/entities/statusList2021/StatusList2021Entity.d.ts.map +1 -0
  66. package/dist/entities/statusList2021/StatusList2021Entity.js +115 -0
  67. package/dist/entities/statusList2021/StatusList2021Entity.js.map +1 -0
  68. package/dist/entities/statusList2021/StatusList2021EntryEntity.d.ts +11 -0
  69. package/dist/entities/statusList2021/StatusList2021EntryEntity.d.ts.map +1 -0
  70. package/dist/entities/statusList2021/StatusList2021EntryEntity.js +51 -0
  71. package/dist/entities/statusList2021/StatusList2021EntryEntity.js.map +1 -0
  72. package/dist/index.d.ts +20 -9
  73. package/dist/index.d.ts.map +1 -1
  74. package/dist/index.js +27 -11
  75. package/dist/index.js.map +1 -1
  76. package/dist/migrations/generic/1-CreateContacts.d.ts.map +1 -1
  77. package/dist/migrations/generic/1-CreateContacts.js +36 -32
  78. package/dist/migrations/generic/1-CreateContacts.js.map +1 -1
  79. package/dist/migrations/generic/2-CreateContacts.d.ts +7 -0
  80. package/dist/migrations/generic/2-CreateContacts.d.ts.map +1 -0
  81. package/dist/migrations/generic/2-CreateContacts.js +76 -0
  82. package/dist/migrations/generic/2-CreateContacts.js.map +1 -0
  83. package/dist/migrations/generic/{1-CreateIssuanceBranding.d.ts → 2-CreateIssuanceBranding.d.ts} +1 -1
  84. package/dist/migrations/generic/2-CreateIssuanceBranding.d.ts.map +1 -0
  85. package/dist/migrations/generic/2-CreateIssuanceBranding.js +76 -0
  86. package/dist/migrations/generic/2-CreateIssuanceBranding.js.map +1 -0
  87. package/dist/migrations/generic/3-CreateStatusList.d.ts +7 -0
  88. package/dist/migrations/generic/3-CreateStatusList.d.ts.map +1 -0
  89. package/dist/migrations/generic/{1-CreateIssuanceBranding.js → 3-CreateStatusList.js} +11 -11
  90. package/dist/migrations/generic/3-CreateStatusList.js.map +1 -0
  91. package/dist/migrations/generic/index.d.ts +5 -0
  92. package/dist/migrations/generic/index.d.ts.map +1 -1
  93. package/dist/migrations/generic/index.js +10 -3
  94. package/dist/migrations/generic/index.js.map +1 -1
  95. package/dist/migrations/internal-migrations-ormconfig.d.ts +2 -1
  96. package/dist/migrations/internal-migrations-ormconfig.d.ts.map +1 -1
  97. package/dist/migrations/internal-migrations-ormconfig.js +0 -2
  98. package/dist/migrations/internal-migrations-ormconfig.js.map +1 -1
  99. package/dist/migrations/postgres/1659463079428-CreateContacts.d.ts.map +1 -1
  100. package/dist/migrations/postgres/1659463079428-CreateContacts.js +4 -2
  101. package/dist/migrations/postgres/1659463079428-CreateContacts.js.map +1 -1
  102. package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.d.ts.map +1 -1
  103. package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.js +2 -0
  104. package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.js.map +1 -1
  105. package/dist/migrations/postgres/1690925872592-CreateContacts.d.ts +7 -0
  106. package/dist/migrations/postgres/1690925872592-CreateContacts.d.ts.map +1 -0
  107. package/dist/migrations/postgres/1690925872592-CreateContacts.js +69 -0
  108. package/dist/migrations/postgres/1690925872592-CreateContacts.js.map +1 -0
  109. package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.d.ts +7 -0
  110. package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.d.ts.map +1 -0
  111. package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.js +32 -0
  112. package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.js.map +1 -0
  113. package/dist/migrations/postgres/uuid.d.ts +3 -0
  114. package/dist/migrations/postgres/uuid.d.ts.map +1 -0
  115. package/dist/migrations/postgres/uuid.js +25 -0
  116. package/dist/migrations/postgres/uuid.js.map +1 -0
  117. package/dist/migrations/sqlite/1690925872693-CreateContacts.d.ts +7 -0
  118. package/dist/migrations/sqlite/1690925872693-CreateContacts.d.ts.map +1 -0
  119. package/dist/migrations/sqlite/1690925872693-CreateContacts.js +108 -0
  120. package/dist/migrations/sqlite/1690925872693-CreateContacts.js.map +1 -0
  121. package/dist/migrations/sqlite/1693866470000-CreateStatusList.d.ts +7 -0
  122. package/dist/migrations/sqlite/1693866470000-CreateStatusList.d.ts.map +1 -0
  123. package/dist/migrations/sqlite/1693866470000-CreateStatusList.js +32 -0
  124. package/dist/migrations/sqlite/1693866470000-CreateStatusList.js.map +1 -0
  125. package/dist/statusList/IStatusListStore.d.ts +20 -0
  126. package/dist/statusList/IStatusListStore.d.ts.map +1 -0
  127. package/dist/statusList/IStatusListStore.js +3 -0
  128. package/dist/statusList/IStatusListStore.js.map +1 -0
  129. package/dist/statusList/StatusListStore.d.ts +36 -0
  130. package/dist/statusList/StatusListStore.d.ts.map +1 -0
  131. package/dist/statusList/StatusListStore.js +213 -0
  132. package/dist/statusList/StatusListStore.js.map +1 -0
  133. package/dist/types/contact/IAbstractContactStore.d.ts +70 -36
  134. package/dist/types/contact/IAbstractContactStore.d.ts.map +1 -1
  135. package/dist/types/contact/contact.d.ts +139 -56
  136. package/dist/types/contact/contact.d.ts.map +1 -1
  137. package/dist/types/contact/contact.js +6 -1
  138. package/dist/types/contact/contact.js.map +1 -1
  139. package/dist/types/index.d.ts +3 -0
  140. package/dist/types/index.d.ts.map +1 -1
  141. package/dist/types/index.js +3 -0
  142. package/dist/types/index.js.map +1 -1
  143. package/dist/types/statusList/IAbstractStatusListStore.d.ts +38 -0
  144. package/dist/types/statusList/IAbstractStatusListStore.d.ts.map +1 -0
  145. package/dist/types/statusList/IAbstractStatusListStore.js +3 -0
  146. package/dist/types/statusList/IAbstractStatusListStore.js.map +1 -0
  147. package/dist/types/statusList/statusList.d.ts +25 -0
  148. package/dist/types/statusList/statusList.d.ts.map +1 -0
  149. package/dist/types/statusList/statusList.js +3 -0
  150. package/dist/types/statusList/statusList.js.map +1 -0
  151. package/dist/types/validation/validation.d.ts +4 -0
  152. package/dist/types/validation/validation.d.ts.map +1 -0
  153. package/dist/types/validation/validation.js +3 -0
  154. package/dist/types/validation/validation.js.map +1 -0
  155. package/dist/utils/ValidatorUtils.d.ts +4 -0
  156. package/dist/utils/ValidatorUtils.d.ts.map +1 -0
  157. package/dist/utils/ValidatorUtils.js +13 -0
  158. package/dist/utils/ValidatorUtils.js.map +1 -0
  159. package/dist/utils/contact/MappingUtils.d.ts +47 -0
  160. package/dist/utils/contact/MappingUtils.d.ts.map +1 -0
  161. package/dist/utils/contact/MappingUtils.js +291 -0
  162. package/dist/utils/contact/MappingUtils.js.map +1 -0
  163. package/package.json +5 -4
  164. package/src/__tests__/contact.entities.test.ts +1457 -195
  165. package/src/__tests__/contact.store.test.ts +1302 -266
  166. package/src/contact/AbstractContactStore.ts +44 -22
  167. package/src/contact/ContactStore.ts +328 -204
  168. package/src/entities/contact/BaseConfigEntity.ts +10 -2
  169. package/src/entities/contact/BaseContactEntity.ts +30 -0
  170. package/src/entities/contact/ConnectionEntity.ts +4 -23
  171. package/src/entities/contact/CorrelationIdentifierEntity.ts +9 -13
  172. package/src/entities/contact/DidAuthConfigEntity.ts +1 -18
  173. package/src/entities/contact/ElectronicAddressEntity.ts +60 -0
  174. package/src/entities/contact/IdentityEntity.ts +18 -25
  175. package/src/entities/contact/IdentityMetadataItemEntity.ts +8 -12
  176. package/src/entities/contact/NaturalPersonEntity.ts +38 -0
  177. package/src/entities/contact/OpenIdConfigEntity.ts +1 -23
  178. package/src/entities/contact/OrganizationEntity.ts +34 -0
  179. package/src/entities/contact/PartyEntity.ts +118 -0
  180. package/src/entities/contact/PartyRelationshipEntity.ts +61 -0
  181. package/src/entities/contact/PartyTypeEntity.ts +59 -0
  182. package/src/entities/statusList2021/StatusList2021Entity.ts +95 -0
  183. package/src/entities/statusList2021/StatusList2021EntryEntity.ts +29 -0
  184. package/src/index.ts +36 -17
  185. package/src/migrations/generic/1-CreateContacts.ts +46 -36
  186. package/src/migrations/generic/2-CreateContacts.ts +64 -0
  187. package/src/migrations/generic/2-CreateIssuanceBranding.ts +62 -0
  188. package/src/migrations/generic/{1-CreateIssuanceBranding.ts → 3-CreateStatusList.ts} +9 -9
  189. package/src/migrations/generic/index.ts +11 -2
  190. package/src/migrations/internal-migrations-ormconfig.ts +2 -4
  191. package/src/migrations/postgres/1659463079428-CreateContacts.ts +4 -2
  192. package/src/migrations/postgres/1685628974232-CreateIssuanceBranding.ts +2 -0
  193. package/src/migrations/postgres/1690925872592-CreateContacts.ts +94 -0
  194. package/src/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.ts +24 -0
  195. package/src/migrations/postgres/uuid.ts +12 -0
  196. package/src/migrations/sqlite/1690925872693-CreateContacts.ts +163 -0
  197. package/src/migrations/sqlite/1693866470000-CreateStatusList.ts +24 -0
  198. package/src/statusList/IStatusListStore.ts +44 -0
  199. package/src/statusList/StatusListStore.ts +237 -0
  200. package/src/types/contact/IAbstractContactStore.ts +84 -27
  201. package/src/types/contact/contact.ts +144 -50
  202. package/src/types/index.ts +4 -0
  203. package/src/types/statusList/IAbstractStatusListStore.ts +47 -0
  204. package/src/types/statusList/statusList.ts +39 -0
  205. package/src/types/validation/validation.ts +3 -0
  206. package/src/utils/ValidatorUtils.ts +10 -0
  207. package/src/utils/contact/MappingUtils.ts +344 -0
  208. package/dist/entities/contact/ContactEntity.d.ts +0 -16
  209. package/dist/entities/contact/ContactEntity.d.ts.map +0 -1
  210. package/dist/entities/contact/ContactEntity.js.map +0 -1
  211. package/dist/migrations/generic/1-CreateIssuanceBranding.d.ts.map +0 -1
  212. package/dist/migrations/generic/1-CreateIssuanceBranding.js.map +0 -1
  213. package/src/entities/contact/ContactEntity.ts +0 -74
@@ -10,19 +10,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.CreateContacts1659463079428 = void 0;
13
+ const uuid_1 = require("./uuid");
13
14
  class CreateContacts1659463079428 {
14
15
  constructor() {
15
16
  this.name = 'CreateContacts1659463079428';
16
17
  }
17
18
  up(queryRunner) {
18
19
  return __awaiter(this, void 0, void 0, function* () {
20
+ yield (0, uuid_1.enableUuidv4)(queryRunner);
19
21
  yield queryRunner.query(`CREATE TABLE "BaseConfigEntity" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "client_id" character varying(255), "client_secret" character varying(255), "scopes" text, "issuer" character varying(255), "redirect_url" text, "dangerously_allow_insecure_http_requests" boolean, "client_auth_method" text, "identifier" character varying(255), "session_id" character varying(255), "type" character varying NOT NULL, "connectionId" uuid, CONSTRAINT "REL_BaseConfig_connectionId" UNIQUE ("connectionId"), CONSTRAINT "PK_BaseConfigEntity_id" PRIMARY KEY ("id"))`);
20
22
  yield queryRunner.query(`CREATE INDEX "IDX_BaseConfigEntity_type" ON "BaseConfigEntity" ("type")`);
21
23
  yield queryRunner.query(`CREATE TYPE "public"."CorrelationIdentifier_type_enum" AS ENUM('did', 'url')`);
22
24
  yield queryRunner.query(`CREATE TABLE "CorrelationIdentifier" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "type" "public"."CorrelationIdentifier_type_enum" NOT NULL, "correlation_id" text NOT NULL, "identityId" uuid, CONSTRAINT "UQ_Correlation_id" UNIQUE ("correlation_id"), CONSTRAINT "REL_CorrelationIdentifier_identityId" UNIQUE ("identityId"), CONSTRAINT "PK_CorrelationIdentifier_id" PRIMARY KEY ("id"))`);
23
- yield queryRunner.query(`CREATE TABLE "Contact" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "name" character varying(255) NOT NULL, "alias" character varying(255) NOT NULL, "uri" character varying(255) NOT NULL, "created_at" TIMESTAMP NOT NULL DEFAULT now(), "last_updated_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "UQ_Name" UNIQUE ("name"), CONSTRAINT "UQ_Alias" UNIQUE ("alias"), CONSTRAINT "PK_Contact_id" PRIMARY KEY ("id"))`);
25
+ yield queryRunner.query(`CREATE TABLE "Contact" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "name" character varying(255) NOT NULL, "alias" character varying(255) NOT NULL, "uri" character varying(255) NOT NULL, "created_at" TIMESTAMP NOT NULL DEFAULT now(), "last_updated_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "UQ_Name" UNIQUE ("name"), CONSTRAINT "UQ_Contact_Alias" UNIQUE ("alias"), CONSTRAINT "PK_Contact_id" PRIMARY KEY ("id"))`);
24
26
  yield queryRunner.query(`CREATE TABLE "IdentityMetadata" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "label" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "identityId" uuid, CONSTRAINT "PK_IdentityMetadata_id" PRIMARY KEY ("id"))`);
25
- yield queryRunner.query(`CREATE TABLE "Identity" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "alias" character varying(255) NOT NULL, "roles" text, "created_at" TIMESTAMP NOT NULL DEFAULT now(), "last_updated_at" TIMESTAMP NOT NULL DEFAULT now(), "contactId" uuid, CONSTRAINT "UQ_Alias" UNIQUE ("alias"), CONSTRAINT "PK_Identity_id" PRIMARY KEY ("id"))`);
27
+ yield queryRunner.query(`CREATE TABLE "Identity" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "alias" character varying(255) NOT NULL, "roles" text, "created_at" TIMESTAMP NOT NULL DEFAULT now(), "last_updated_at" TIMESTAMP NOT NULL DEFAULT now(), "contactId" uuid, CONSTRAINT "UQ_Identity_Alias" UNIQUE ("alias"), CONSTRAINT "PK_Identity_id" PRIMARY KEY ("id"))`);
26
28
  yield queryRunner.query(`CREATE TYPE "public"."Connection_type_enum" AS ENUM('OIDC', 'SIOPv2', 'SIOPv2+OpenID4VP')`);
27
29
  yield queryRunner.query(`CREATE TABLE "Connection" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "type" "public"."Connection_type_enum" NOT NULL, "identityId" uuid, CONSTRAINT "REL_Connection_identityId" UNIQUE ("identityId"), CONSTRAINT "PK_Connection_id" PRIMARY KEY ("id"))`);
28
30
  yield queryRunner.query(`ALTER TABLE "BaseConfigEntity" ADD CONSTRAINT "FK_BaseConfig_connectionId" FOREIGN KEY ("connectionId") REFERENCES "Connection"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
@@ -1 +1 @@
1
- {"version":3,"file":"1659463079428-CreateContacts.js","sourceRoot":"","sources":["../../../src/migrations/postgres/1659463079428-CreateContacts.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,2BAA2B;IAAxC;QACE,SAAI,GAAG,6BAA6B,CAAA;IAyDtC,CAAC;IAvDc,EAAE,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CACrB,6iBAA6iB,CAC9iB,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CAAC,yEAAyE,CAAC,CAAA;YAClG,MAAM,WAAW,CAAC,KAAK,CAAC,8EAA8E,CAAC,CAAA;YACvG,MAAM,WAAW,CAAC,KAAK,CACrB,qYAAqY,CACtY,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,gaAAga,CACja,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,8OAA8O,CAC/O,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,6UAA6U,CAC9U,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CAAC,2FAA2F,CAAC,CAAA;YACpH,MAAM,WAAW,CAAC,KAAK,CACrB,+PAA+P,CAChQ,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,6KAA6K,CAC9K,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,uLAAuL,CACxL,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,6KAA6K,CAC9K,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,0JAA0J,CAC3J,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,iKAAiK,CAClK,CAAA;QACH,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACxC,MAAM,WAAW,CAAC,KAAK,CAAC,qEAAqE,CAAC,CAAA;YAC9F,MAAM,WAAW,CAAC,KAAK,CAAC,gEAAgE,CAAC,CAAA;YACzF,MAAM,WAAW,CAAC,KAAK,CAAC,iFAAiF,CAAC,CAAA;YAC1G,MAAM,WAAW,CAAC,KAAK,CAAC,2FAA2F,CAAC,CAAA;YACpH,MAAM,WAAW,CAAC,KAAK,CAAC,6EAA6E,CAAC,CAAA;YACtG,MAAM,WAAW,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAA;YAClD,MAAM,WAAW,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAA;YACpE,MAAM,WAAW,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAA;YAChD,MAAM,WAAW,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAA;YACxD,MAAM,WAAW,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAA;YAC/C,MAAM,WAAW,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAA;YAC7D,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAA;YAC/E,MAAM,WAAW,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAA;YAC1E,MAAM,WAAW,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAA;QAC1D,CAAC;KAAA;CACF;AA1DD,kEA0DC"}
1
+ {"version":3,"file":"1659463079428-CreateContacts.js","sourceRoot":"","sources":["../../../src/migrations/postgres/1659463079428-CreateContacts.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,iCAAqC;AAErC,MAAa,2BAA2B;IAAxC;QACE,SAAI,GAAG,6BAA6B,CAAA;IA0DtC,CAAC;IAxDc,EAAE,CAAC,WAAwB;;YACtC,MAAM,IAAA,mBAAY,EAAC,WAAW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CAAC,CAAA;YACpE,MAAM,WAAW,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAA;YAChD,MAAM,WAAW,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAA;YACxD,MAAM,WAAW,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAA;YAC/C,MAAM,WAAW,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAA;YAC7D,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAA;YAC/E,MAAM,WAAW,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAA;YAC1E,MAAM,WAAW,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAA;QAC1D,CAAC;KAAA;CACF;AA3DD,kEA2DC"}
@@ -1 +1 @@
1
- {"version":3,"file":"1685628974232-CreateIssuanceBranding.d.ts","sourceRoot":"","sources":["../../../src/migrations/postgres/1685628974232-CreateIssuanceBranding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAEzD,qBAAa,mCAAoC,YAAW,kBAAkB;IAC5E,IAAI,SAAwC;IAE/B,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAuD3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAsB3D"}
1
+ {"version":3,"file":"1685628974232-CreateIssuanceBranding.d.ts","sourceRoot":"","sources":["../../../src/migrations/postgres/1685628974232-CreateIssuanceBranding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAGzD,qBAAa,mCAAoC,YAAW,kBAAkB;IAC5E,IAAI,SAAwC;IAE/B,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAwD3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAsB3D"}
@@ -10,12 +10,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.CreateIssuanceBranding1685628974232 = void 0;
13
+ const uuid_1 = require("./uuid");
13
14
  class CreateIssuanceBranding1685628974232 {
14
15
  constructor() {
15
16
  this.name = 'CreateIssuanceBranding1685628974232';
16
17
  }
17
18
  up(queryRunner) {
18
19
  return __awaiter(this, void 0, void 0, function* () {
20
+ yield (0, uuid_1.enableUuidv4)(queryRunner);
19
21
  yield queryRunner.query(`CREATE TABLE "ImageDimensions" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "width" integer NOT NULL, "height" integer NOT NULL, CONSTRAINT "PK_ImageDimensions_id" PRIMARY KEY ("id"))`);
20
22
  yield queryRunner.query(`CREATE TABLE "ImageAttributes" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "uri" character varying(255), "dataUri" character varying(255), "mediaType" character varying(255), "alt" character varying(255), "dimensionsId" uuid, CONSTRAINT "UQ_dimensionsId" UNIQUE ("dimensionsId"), CONSTRAINT "PK_ImageAttributes_id" PRIMARY KEY ("id"))`);
21
23
  yield queryRunner.query(`CREATE TABLE "BackgroundAttributes" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "color" character varying(255), "imageId" uuid, CONSTRAINT "UQ_imageId" UNIQUE ("imageId"), CONSTRAINT "PK_BackgroundAttributes_id" PRIMARY KEY ("id"))`);
@@ -1 +1 @@
1
- {"version":3,"file":"1685628974232-CreateIssuanceBranding.js","sourceRoot":"","sources":["../../../src/migrations/postgres/1685628974232-CreateIssuanceBranding.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,mCAAmC;IAAhD;QACE,SAAI,GAAG,qCAAqC,CAAA;IA+E9C,CAAC;IA7Ec,EAAE,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CACrB,4LAA4L,CAC7L,CAAA;YACD,MAAM,WAAW,CAA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AC,iFAAiF,CAAC,CAAA;YAC1G,MAAM,WAAW,CAAC,KAAK,CAAC,uFAAuF,CAAC,CAAA;YAChH,MAAM,WAAW,CAAC,KAAK,CAAC,iFAAiF,CAAC,CAAA;YAC1G,MAAM,WAAW,CAAC,KAAK,CAAC,oFAAoF,CAAC,CAAA;YAC7G,MAAM,WAAW,CAAC,KAAK,CAAC,oFAAoF,CAAC,CAAA;YAC7G,MAAM,WAAW,CAAC,KAAK,CAAC,wFAAwF,CAAC,CAAA;YACjH,MAAM,WAAW,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAA;YACtD,MAAM,WAAW,CAAC,KAAK,CAAC,mFAAmF,CAAC,CAAA;YAC5G,MAAM,WAAW,CAAC,KAAK,CAAC,gGAAgG,CAAC,CAAA;YACzH,MAAM,WAAW,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAA;YAC1D,MAAM,WAAW,CAAC,KAAK,CAAC,2EAA2E,CAAC,CAAA;YACpG,MAAM,WAAW,CAAC,KAAK,CAAC,oGAAoG,CAAC,CAAA;YAC7H,MAAM,WAAW,CAAC,KAAK,CAAC,4GAA4G,CAAC,CAAA;YACrI,MAAM,WAAW,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAA;YAC1D,MAAM,WAAW,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAA;YACtD,MAAM,WAAW,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAA;YAC5D,MAAM,WAAW,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAA;YACvD,MAAM,WAAW,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAA;QACzD,CAAC;KAAA;CACF;AAhFD,kFAgFC"}
1
+ {"version":3,"file":"1685628974232-CreateIssuanceBranding.js","sourceRoot":"","sources":["../../../src/migrations/postgres/1685628974232-CreateIssuanceBranding.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,iCAAqC;AAErC,MAAa,mCAAmC;IAAhD;QACE,SAAI,GAAG,qCAAqC,CAA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
+ import { MigrationInterface, QueryRunner } from 'typeorm';
2
+ export declare class CreateContacts1690925872592 implements MigrationInterface {
3
+ name: string;
4
+ up(queryRunner: QueryRunner): Promise<void>;
5
+ down(queryRunner: QueryRunner): Promise<void>;
6
+ }
7
+ //# sourceMappingURL=1690925872592-CreateContacts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1690925872592-CreateContacts.d.ts","sourceRoot":"","sources":["../../../src/migrations/postgres/1690925872592-CreateContacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAGzD,qBAAa,2BAA4B,YAAW,kBAAkB;IACpE,IAAI,SAAgC;IAEvB,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAmF3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAI3D"}
@@ -0,0 +1,69 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CreateContacts1690925872592 = void 0;
13
+ const uuid_1 = require("./uuid");
14
+ class CreateContacts1690925872592 {
15
+ constructor() {
16
+ this.name = 'CreateContacts1690925872592';
17
+ }
18
+ up(queryRunner) {
19
+ return __awaiter(this, void 0, void 0, function* () {
20
+ yield (0, uuid_1.enableUuidv4)(queryRunner);
21
+ yield queryRunner.query(`ALTER TABLE "CorrelationIdentifier" DROP CONSTRAINT "FK_CorrelationIdentifier_identityId"`);
22
+ yield queryRunner.query(`ALTER TABLE "IdentityMetadata" DROP CONSTRAINT "FK_IdentityMetadata_identityId"`);
23
+ yield queryRunner.query(`ALTER TABLE "Identity" DROP CONSTRAINT "FK_Identity_contactId"`);
24
+ yield queryRunner.query(`ALTER TABLE "Connection" DROP CONSTRAINT "FK_Connection_identityId"`);
25
+ yield queryRunner.query(`ALTER TABLE "CorrelationIdentifier" RENAME COLUMN "identityId" TO "identity_id"`);
26
+ yield queryRunner.query(`ALTER TABLE "Connection" RENAME COLUMN "identityId" TO "identity_id"`);
27
+ yield queryRunner.query(`CREATE TYPE "public"."PartyType_type_enum" AS ENUM('naturalPerson', 'organization')`);
28
+ yield queryRunner.query(`CREATE TABLE "PartyType" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "type" "public"."PartyType_type_enum" NOT NULL, "name" character varying(255) NOT NULL, "description" character varying(255), "tenant_id" character varying(255) NOT NULL, "created_at" TIMESTAMP NOT NULL DEFAULT now(), "last_updated_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "UQ_PartyType_name" UNIQUE ("name"), CONSTRAINT "PK_PartyType_id" PRIMARY KEY ("id"))`);
29
+ yield queryRunner.query(`CREATE UNIQUE INDEX "IDX_PartyType_type_tenant_id" ON "PartyType" ("type", "tenant_id")`);
30
+ yield queryRunner.query(`CREATE TABLE "BaseContact" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "last_updated_at" TIMESTAMP NOT NULL DEFAULT now(), "legal_name" character varying(255), "display_name" character varying(255), "first_name" character varying(255), "middle_name" character varying(255), "last_name" character varying(255), "type" character varying NOT NULL, "party_id" uuid, CONSTRAINT "UQ_BaseContact_legal_name" UNIQUE ("legal_name"), CONSTRAINT "REL_BaseContact_party_id" UNIQUE ("party_id"), CONSTRAINT "PK_BaseContact_id" PRIMARY KEY ("id"))`);
31
+ yield queryRunner.query(`CREATE INDEX "IDX_BaseContact_type" ON "BaseContact" ("type")`);
32
+ yield queryRunner.query(`CREATE TABLE "PartyRelationship" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "left_id" uuid NOT NULL, "right_id" uuid NOT NULL, "created_at" TIMESTAMP NOT NULL DEFAULT now(), "last_updated_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_PartyRelationship_id" PRIMARY KEY ("id"))`);
33
+ yield queryRunner.query(`CREATE UNIQUE INDEX "IDX_PartyRelationship_left_right" ON "PartyRelationship" ("left_id", "right_id")`);
34
+ yield queryRunner.query(`CREATE TABLE "ElectronicAddress" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "type" character varying(255) NOT NULL, "electronic_address" character varying(255) NOT NULL, "created_at" TIMESTAMP NOT NULL DEFAULT now(), "last_updated_at" TIMESTAMP NOT NULL DEFAULT now(), "partyId" uuid, CONSTRAINT "PK_ElectronicAddress_id" PRIMARY KEY ("id"))`);
35
+ yield queryRunner.query(`CREATE TABLE "Party" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "uri" character varying(255) NOT NULL, "created_at" TIMESTAMP NOT NULL DEFAULT now(), "last_updated_at" TIMESTAMP NOT NULL DEFAULT now(), "party_type_id" uuid NOT NULL, CONSTRAINT "PK_Party_id" PRIMARY KEY ("id"))`);
36
+ yield queryRunner.query(`CREATE TABLE "BaseConfig" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "identifier" character varying(255), "redirect_url" character varying(255), "session_id" character varying(255), "client_id" character varying(255), "client_secret" character varying(255), "scopes" text, "issuer" character varying(255), "dangerously_allow_insecure_http_requests" boolean, "client_auth_method" text, "type" character varying NOT NULL, "connection_id" uuid, CONSTRAINT "REL_BaseConfig_connection_id" UNIQUE ("connection_id"), CONSTRAINT "PK_BaseConfig_id" PRIMARY KEY ("id"))`);
37
+ yield queryRunner.query(`CREATE INDEX "IDX_BaseConfig_type" ON "BaseConfig" ("type")`);
38
+ yield queryRunner.query(`ALTER TABLE "Identity" RENAME COLUMN "contactId" TO "partyId"`);
39
+ yield queryRunner.query(`ALTER TABLE "Identity" ALTER COLUMN "roles" SET NOT NULL`);
40
+ yield queryRunner.query(`ALTER TABLE "CorrelationIdentifier" ADD CONSTRAINT "FK_CorrelationIdentifier_identity_id" FOREIGN KEY ("identity_id") REFERENCES "Identity"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
41
+ yield queryRunner.query(`ALTER TABLE "IdentityMetadata" ADD CONSTRAINT "FK_IdentityMetadata_identityId" FOREIGN KEY ("identityId") REFERENCES "Identity"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
42
+ yield queryRunner.query(`ALTER TABLE "BaseContact" ADD CONSTRAINT "FK_BaseContact_party_id" FOREIGN KEY ("party_id") REFERENCES "Party"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
43
+ yield queryRunner.query(`ALTER TABLE "PartyRelationship" ADD CONSTRAINT "FK_PartyRelationship_left_id" FOREIGN KEY ("left_id") REFERENCES "Party"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
44
+ yield queryRunner.query(`ALTER TABLE "PartyRelationship" ADD CONSTRAINT "FK_PartyRelationship_right_id" FOREIGN KEY ("right_id") REFERENCES "Party"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
45
+ yield queryRunner.query(`ALTER TABLE "ElectronicAddress" ADD CONSTRAINT "FK_ElectronicAddress_partyId" FOREIGN KEY ("partyId") REFERENCES "Party"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
46
+ yield queryRunner.query(`ALTER TABLE "Party" ADD CONSTRAINT "FK_Party_party_type_id" FOREIGN KEY ("party_type_id") REFERENCES "PartyType"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
47
+ yield queryRunner.query(`ALTER TABLE "Identity" ADD CONSTRAINT "FK_Identity_partyId" FOREIGN KEY ("partyId") REFERENCES "Party"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
48
+ yield queryRunner.query(`ALTER TABLE "Connection" ADD CONSTRAINT "FK_Connection_identity_id" FOREIGN KEY ("identity_id") REFERENCES "Identity"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
49
+ yield queryRunner.query(`ALTER TABLE "BaseConfig" ADD CONSTRAINT "FK_BaseConfig_connection_id" FOREIGN KEY ("connection_id") REFERENCES "Connection"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
50
+ // migrate existing data
51
+ yield queryRunner.query(`ALTER TABLE "CorrelationIdentifier" RENAME CONSTRAINT "UQ_Correlation_id" TO "UQ_CorrelationIdentifier_correlation_id"`);
52
+ yield queryRunner.query(`ALTER TABLE "Identity" RENAME CONSTRAINT "UQ_Identity_Alias" TO "UQ_Identity_alias"`);
53
+ yield queryRunner.query(`INSERT INTO "BaseConfig"("id", "identifier", "redirect_url", "session_id", "client_id", "client_secret", "scopes", "issuer", "dangerously_allow_insecure_http_requests", "client_auth_method", "type", "connection_id") SELECT "id", "identifier", "redirect_url", "session_id", "client_id", "client_secret", "scopes", "issuer", "dangerously_allow_insecure_http_requests", "client_auth_method", "type", "connectionId" FROM "BaseConfigEntity"`);
54
+ yield queryRunner.query(`DROP TABLE "BaseConfigEntity"`);
55
+ yield queryRunner.query(`INSERT INTO "PartyType"(id, type, name, description, tenant_id, created_at, last_updated_at) VALUES ('3875c12e-fdaa-4ef6-a340-c936e054b627', 'organization', 'Sphereon_default_type', 'sphereon_default_organization', '95e09cfc-c974-4174-86aa-7bf1d5251fb4', now(), now())`);
56
+ yield queryRunner.query(`INSERT INTO "Party"(id, uri, created_at, last_updated_at, party_type_id) SELECT id, uri, created_at, last_updated_at, '3875c12e-fdaa-4ef6-a340-c936e054b627' FROM "Contact"`);
57
+ yield queryRunner.query(`INSERT INTO "BaseContact"(id, legal_name, display_name, party_id, created_at, last_updated_at, type) SELECT id, name, alias, id, created_at, last_updated_at, 'Organization' FROM "Contact"`);
58
+ yield queryRunner.query(`DROP TABLE "Contact"`);
59
+ });
60
+ }
61
+ down(queryRunner) {
62
+ return __awaiter(this, void 0, void 0, function* () {
63
+ // TODO DPP-27 implement downgrade
64
+ return Promise.reject(Error(`Downgrade is not yet implemented for ${this.name}`));
65
+ });
66
+ }
67
+ }
68
+ exports.CreateContacts1690925872592 = CreateContacts1690925872592;
69
+ //# sourceMappingURL=1690925872592-CreateContacts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1690925872592-CreateContacts.js","sourceRoot":"","sources":["../../../src/migrations/postgres/1690925872592-CreateContacts.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,iCAAqC;AAErC,MAAa,2BAA2B;IAAxC;QACE,SAAI,GAAG,6BAA6B,CAAA;IAyFtC,CAAC;IAvFc,EAAE,CAAC,WAAwB;;YACtC,MAAM,IAAA,mBAAY,EAAC,WAAW,CAAC,CAAA;YAC/B,MAAM,WAAW,CAAC,KAAK,CAAC,2FAA2F,CAAC,CAAA;YACpH,MAAM,WAAW,CAAC,KAAK,CAAC,iFAAiF,CAAC,CAAA;YAC1G,MAAM,WAAW,CAAC,KAAK,CAAC,gEAAgE,CAAC,CAAA;YACzF,MAAM,WAAW,CAAC,KAAK,CAAC,qEAAqE,CAAC,CAAA;YAC9F,MAAM,WAAW,CAAC,KAAK,CAAC,iFAAiF,CAAC,CAAA;YAC1G,MAAM,WAAW,CAAC,KAAK,CAAC,sEAAsE,CAAC,CAAA;YAC/F,MAAM,WAAW,CAAC,KAAK,CAAC,qFAAqF,CAAC,CAAA;YAC9G,MAAM,WAAW,CAAC,KAAK,CACrB,ybAAyb,CAC1b,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CAAC,yFAAyF,CAAC,CAAA;YAClH,MAAM,WAAW,CAAC,KAAK,CACrB,0kBAA0kB,CAC3kB,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CAAC,+DAA+D,CAAC,CAAA;YACxF,MAAM,WAAW,CAAC,KAAK,CACrB,iSAAiS,CAClS,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CAAC,uGAAu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AW,CAAC,KAAK,CACrB,6KAA6K,CAC9K,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,6LAA6L,CAC9L,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAA;QACjD,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACxC,kCAAkC;YAClC,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,wCAAwC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;QACnF,CAAC;KAAA;CACF;AA1FD,kEA0FC"}
@@ -0,0 +1,7 @@
1
+ import { MigrationInterface, QueryRunner } from 'typeorm';
2
+ export declare class CreateStatusList1693866470001 implements MigrationInterface {
3
+ name: string;
4
+ up(queryRunner: QueryRunner): Promise<void>;
5
+ down(queryRunner: QueryRunner): Promise<void>;
6
+ }
7
+ //# sourceMappingURL=CreateStatusList1693866470001-CreateStatusList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreateStatusList1693866470001-CreateStatusList.d.ts","sourceRoot":"","sources":["../../../src/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAEzD,qBAAa,6BAA8B,YAAW,kBAAkB;IACtE,IAAI,SAAkC;IAEzB,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAiB3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAC3D"}
@@ -0,0 +1,32 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CreateStatusList1693866470001 = void 0;
13
+ class CreateStatusList1693866470001 {
14
+ constructor() {
15
+ this.name = 'CreateStatusList1693866470001';
16
+ }
17
+ up(queryRunner) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ yield queryRunner.query(`CREATE TABLE "StatusListEntry" ("statusListId" character varying NOT NULL, "statusListIndex" integer NOT NULL, "credentialId" character varying, "credentialHash" character varying(128), "correlationId" character varying(255), "value" character varying(50), CONSTRAINT "PK_68704d2d13857360c6b44a3d1d0" PRIMARY KEY ("statusListId", "statusListIndex"))`);
20
+ yield queryRunner.query(`CREATE TYPE "public"."StatusList_type_enum" AS ENUM('StatusList2021')`);
21
+ yield queryRunner.query(`CREATE TYPE "public"."StatusList_drivertype_enum" AS ENUM('agent_typeorm', 'agent_kv_store', 'github', 'agent_filesystem')`);
22
+ yield queryRunner.query(`CREATE TYPE "public"."StatusList_credentialidmode_enum" AS ENUM('ISSUANCE', 'PERSISTENCE', 'NEVER')`);
23
+ yield queryRunner.query(`CREATE TABLE "StatusList" ("id" character varying NOT NULL, "correlationId" character varying NOT NULL, "length" integer NOT NULL, "issuer" text NOT NULL, "type" "public"."StatusList_type_enum" NOT NULL DEFAULT 'StatusList2021', "driverType" "public"."StatusList_drivertype_enum" NOT NULL DEFAULT 'agent_typeorm', "credentialIdMode" "public"."StatusList_credentialidmode_enum" NOT NULL DEFAULT 'ISSUANCE', "proofFormat" character varying NOT NULL DEFAULT 'lds', "indexingDirection" character varying NOT NULL DEFAULT 'rightToLeft', "statusPurpose" character varying NOT NULL DEFAULT 'revocation', "statusListCredential" text, CONSTRAINT "UQ_correlationId" UNIQUE ("correlationId"), CONSTRAINT "PK_StatusList_Id" PRIMARY KEY ("id"))`);
24
+ yield queryRunner.query(`ALTER TABLE "StatusListEntry" ADD CONSTRAINT "FK_statusListEntry_statusListId" FOREIGN KEY ("statusListId") REFERENCES "StatusList"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
25
+ });
26
+ }
27
+ down(queryRunner) {
28
+ return __awaiter(this, void 0, void 0, function* () { });
29
+ }
30
+ }
31
+ exports.CreateStatusList1693866470001 = CreateStatusList1693866470001;
32
+ //# sourceMappingURL=CreateStatusList1693866470001-CreateStatusList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreateStatusList1693866470001-CreateStatusList.js","sourceRoot":"","sources":["../../../src/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,6BAA6B;IAA1C;QACE,SAAI,GAAG,+BAA+B,CAAA;IAoBxC,CAAC;IAlBc,EAAE,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CACrB,+VAA+V,CAChW,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CAAC,uEAAuE,CAAC,CAAA;YAChG,MAAM,WAAW,CAAC,KAAK,CACrB,4HAA4H,CAC7H,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CAAC,qGAAqG,CAAC,CAAA;YAC9H,MAAM,WAAW,CAAC,KAAK,CACrB,6tBAA6tB,CAC9tB,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,mLAAmL,CACpL,CAAA;QACH,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;8DAAkB,CAAC;KAAA;CAC9D;AArBD,sEAqBC"}
@@ -0,0 +1,3 @@
1
+ import { QueryRunner } from 'typeorm';
2
+ export declare function enableUuidv4(queryRunner: QueryRunner): Promise<void>;
3
+ //# sourceMappingURL=uuid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uuid.d.ts","sourceRoot":"","sources":["../../../src/migrations/postgres/uuid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAErC,wBAAsB,YAAY,CAAC,WAAW,EAAE,WAAW,iBAS1D"}
@@ -0,0 +1,25 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.enableUuidv4 = void 0;
13
+ function enableUuidv4(queryRunner) {
14
+ return __awaiter(this, void 0, void 0, function* () {
15
+ try {
16
+ yield queryRunner.query(`CREATE EXTENSION IF NOT EXISTS "uuid-ossp";`);
17
+ }
18
+ catch (error) {
19
+ console.log(`Please enable the uuid-ossp.control extension in your postgresql installation. It enables generating V4 UUID and can be found in the postgresql-contrib package`);
20
+ throw error;
21
+ }
22
+ });
23
+ }
24
+ exports.enableUuidv4 = enableUuidv4;
25
+ //# sourceMappingURL=uuid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uuid.js","sourceRoot":"","sources":["../../../src/migrations/postgres/uuid.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,SAAsB,YAAY,CAAC,WAAwB;;QACzD,IAAI;YACF,MAAM,WAAW,CAAC,KAAK,CAAC,6CAA6C,CAAC,CAAA;SACvE;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,CAAC,GAAG,CACT,iKAAiK,CAClK,CAAA;YACD,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CAAA;AATD,oCASC"}
@@ -0,0 +1,7 @@
1
+ import { MigrationInterface, QueryRunner } from 'typeorm';
2
+ export declare class CreateContacts1690925872693 implements MigrationInterface {
3
+ name: string;
4
+ up(queryRunner: QueryRunner): Promise<void>;
5
+ down(queryRunner: QueryRunner): Promise<void>;
6
+ }
7
+ //# sourceMappingURL=1690925872693-CreateContacts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1690925872693-CreateContacts.d.ts","sourceRoot":"","sources":["../../../src/migrations/sqlite/1690925872693-CreateContacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAEzD,qBAAa,2BAA4B,YAAW,kBAAkB;IACpE,IAAI,SAAgC;IAEvB,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAyJ3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAI3D"}
@@ -0,0 +1,108 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CreateContacts1690925872693 = void 0;
13
+ class CreateContacts1690925872693 {
14
+ constructor() {
15
+ this.name = 'CreateContacts1690925872693';
16
+ }
17
+ up(queryRunner) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ yield queryRunner.query(`CREATE TABLE "temporary_CorrelationIdentifier" ("id" varchar PRIMARY KEY NOT NULL, "type" varchar CHECK( "type" IN ('did','url') ) NOT NULL, "correlation_id" text NOT NULL, "identityId" varchar, CONSTRAINT "REL_CorrelationIdentifier_identityId" UNIQUE ("identityId"), CONSTRAINT "UQ_CorrelationIdentifier_correlation_id" UNIQUE ("correlation_id"))`);
20
+ yield queryRunner.query(`INSERT INTO "temporary_CorrelationIdentifier"("id", "type", "correlation_id", "identityId") SELECT "id", "type", "correlation_id", "identityId" FROM "CorrelationIdentifier"`);
21
+ yield queryRunner.query(`DROP TABLE "CorrelationIdentifier"`);
22
+ yield queryRunner.query(`ALTER TABLE "temporary_CorrelationIdentifier" RENAME TO "CorrelationIdentifier"`);
23
+ yield queryRunner.query(`CREATE TABLE "temporary_Identity" ("id" varchar PRIMARY KEY NOT NULL, "alias" varchar(255) NOT NULL, "roles" text NOT NULL, "created_at" datetime NOT NULL DEFAULT (datetime('now')), "last_updated_at" datetime NOT NULL DEFAULT (datetime('now')), "contactId" varchar, CONSTRAINT "UQ_Identity_alias" UNIQUE ("alias"))`);
24
+ yield queryRunner.query(`INSERT INTO "temporary_Identity"("id", "alias", "roles", "created_at", "last_updated_at", "contactId") SELECT "id", "alias", "roles", "created_at", "last_updated_at", "contactId" FROM "Identity"`);
25
+ yield queryRunner.query(`DROP TABLE "Identity"`);
26
+ yield queryRunner.query(`ALTER TABLE "temporary_Identity" RENAME TO "Identity"`);
27
+ yield queryRunner.query(`CREATE TABLE "temporary_Connection" ("id" varchar PRIMARY KEY NOT NULL, "type" varchar CHECK( "type" IN ('OIDC','SIOPv2','SIOPv2+OpenID4VP') ) NOT NULL, "identityId" varchar, CONSTRAINT "REL_Connection_identityId" UNIQUE ("identityId"))`);
28
+ yield queryRunner.query(`INSERT INTO "temporary_Connection"("id", "type", "identityId") SELECT "id", "type", "identityId" FROM "Connection"`);
29
+ yield queryRunner.query(`DROP TABLE "Connection"`);
30
+ yield queryRunner.query(`ALTER TABLE "temporary_Connection" RENAME TO "Connection"`);
31
+ yield queryRunner.query(`CREATE TABLE "temporary_CorrelationIdentifier" ("id" varchar PRIMARY KEY NOT NULL, "type" varchar CHECK( "type" IN ('did','url') ) NOT NULL, "correlation_id" text NOT NULL, "identity_id" varchar, CONSTRAINT "REL_CorrelationIdentifier_identityId" UNIQUE ("identity_id"), CONSTRAINT "UQ_CorrelationIdentifier_correlation_id" UNIQUE ("correlation_id"))`);
32
+ yield queryRunner.query(`INSERT INTO "temporary_CorrelationIdentifier"("id", "type", "correlation_id", "identity_id") SELECT "id", "type", "correlation_id", "identityId" FROM "CorrelationIdentifier"`);
33
+ yield queryRunner.query(`DROP TABLE "CorrelationIdentifier"`);
34
+ yield queryRunner.query(`ALTER TABLE "temporary_CorrelationIdentifier" RENAME TO "CorrelationIdentifier"`);
35
+ yield queryRunner.query(`CREATE TABLE "temporary_Identity" ("id" varchar PRIMARY KEY NOT NULL, "alias" varchar(255) NOT NULL, "roles" text NOT NULL, "created_at" datetime NOT NULL DEFAULT (datetime('now')), "last_updated_at" datetime NOT NULL DEFAULT (datetime('now')), "partyId" varchar, CONSTRAINT "UQ_Identity_alias" UNIQUE ("alias"))`);
36
+ yield queryRunner.query(`INSERT INTO "temporary_Identity"("id", "alias", "roles", "created_at", "last_updated_at", "partyId") SELECT "id", "alias", "roles", "created_at", "last_updated_at", "contactId" FROM "Identity"`);
37
+ yield queryRunner.query(`DROP TABLE "Identity"`);
38
+ yield queryRunner.query(`ALTER TABLE "temporary_Identity" RENAME TO "Identity"`);
39
+ yield queryRunner.query(`CREATE TABLE "temporary_Connection" ("id" varchar PRIMARY KEY NOT NULL, "type" varchar CHECK( "type" IN ('OIDC','SIOPv2','SIOPv2+OpenID4VP') ) NOT NULL, "identity_id" varchar, CONSTRAINT "REL_Connection_identityId" UNIQUE ("identity_id"))`);
40
+ yield queryRunner.query(`INSERT INTO "temporary_Connection"("id", "type", "identity_id") SELECT "id", "type", "identityId" FROM "Connection"`);
41
+ yield queryRunner.query(`DROP TABLE "Connection"`);
42
+ yield queryRunner.query(`ALTER TABLE "temporary_Connection" RENAME TO "Connection"`);
43
+ yield queryRunner.query(`CREATE TABLE "PartyType" ("id" varchar PRIMARY KEY NOT NULL, "type" varchar CHECK( "type" IN ('naturalPerson','organization') ) NOT NULL, "name" varchar(255) NOT NULL, "description" varchar(255), "tenant_id" varchar(255) NOT NULL, "created_at" datetime NOT NULL DEFAULT (datetime('now')), "last_updated_at" datetime NOT NULL DEFAULT (datetime('now')), CONSTRAINT "UQ_PartyType_name" UNIQUE ("name"))`);
44
+ yield queryRunner.query(`CREATE UNIQUE INDEX "IDX_PartyType_type_tenant_id" ON "PartyType" ("type", "tenant_id")`);
45
+ yield queryRunner.query(`CREATE TABLE "BaseContact" ("id" varchar PRIMARY KEY NOT NULL, "created_at" datetime NOT NULL DEFAULT (datetime('now')), "last_updated_at" datetime NOT NULL DEFAULT (datetime('now')), "legal_name" varchar(255), "display_name" varchar(255), "first_name" varchar(255), "middle_name" varchar(255), "last_name" varchar(255), "type" varchar NOT NULL, "party_id" varchar, CONSTRAINT "UQ_BaseContact_legal_name" UNIQUE ("legal_name"), CONSTRAINT "REL_BaseContact_party_id" UNIQUE ("party_id"))`);
46
+ yield queryRunner.query(`CREATE INDEX "IDX_BaseContact_type" ON "BaseContact" ("type")`);
47
+ yield queryRunner.query(`CREATE TABLE "PartyRelationship" ("id" varchar PRIMARY KEY NOT NULL, "left_id" varchar NOT NULL, "right_id" varchar NOT NULL, "created_at" datetime NOT NULL DEFAULT (datetime('now')), "last_updated_at" datetime NOT NULL DEFAULT (datetime('now')))`);
48
+ yield queryRunner.query(`CREATE UNIQUE INDEX "IDX_PartyRelationship_left_right" ON "PartyRelationship" ("left_id", "right_id")`);
49
+ yield queryRunner.query(`CREATE TABLE "ElectronicAddress" ("id" varchar PRIMARY KEY NOT NULL, "type" varchar(255) NOT NULL, "electronic_address" varchar(255) NOT NULL, "created_at" datetime NOT NULL DEFAULT (datetime('now')), "last_updated_at" datetime NOT NULL DEFAULT (datetime('now')), "partyId" varchar)`);
50
+ yield queryRunner.query(`CREATE TABLE "Party" ("id" varchar PRIMARY KEY NOT NULL, "uri" varchar(255) NOT NULL, "created_at" datetime NOT NULL DEFAULT (datetime('now')), "last_updated_at" datetime NOT NULL DEFAULT (datetime('now')), "party_type_id" varchar NOT NULL)`);
51
+ yield queryRunner.query(`CREATE TABLE "BaseConfig" ("id" varchar PRIMARY KEY NOT NULL, "identifier" varchar(255), "redirect_url" varchar(255), "session_id" varchar(255), "client_id" varchar(255), "client_secret" varchar(255), "scopes" text, "issuer" varchar(255), "dangerously_allow_insecure_http_requests" boolean, "client_auth_method" text, "type" varchar NOT NULL, "connection_id" varchar, CONSTRAINT "REL_BaseConfig_connection_id" UNIQUE ("connection_id"))`);
52
+ yield queryRunner.query(`CREATE INDEX "IDX_BaseConfig_type" ON "BaseConfig" ("type")`);
53
+ yield queryRunner.query(`CREATE TABLE "temporary_CorrelationIdentifier" ("id" varchar PRIMARY KEY NOT NULL, "type" varchar CHECK( "type" IN ('did','url') ) NOT NULL, "correlation_id" text NOT NULL, "identity_id" varchar, CONSTRAINT "REL_CorrelationIdentifier_identity_id" UNIQUE ("identity_id"), CONSTRAINT "UQ_CorrelationIdentifier_correlation_id" UNIQUE ("correlation_id"), CONSTRAINT "FK_CorrelationIdentifier_identity_id" FOREIGN KEY ("identity_id") REFERENCES "Identity" ("id") ON DELETE CASCADE ON UPDATE NO ACTION)`);
54
+ yield queryRunner.query(`INSERT INTO "temporary_CorrelationIdentifier"("id", "type", "correlation_id", "identity_id") SELECT "id", "type", "correlation_id", "identity_id" FROM "CorrelationIdentifier"`);
55
+ yield queryRunner.query(`DROP TABLE "CorrelationIdentifier"`);
56
+ yield queryRunner.query(`ALTER TABLE "temporary_CorrelationIdentifier" RENAME TO "CorrelationIdentifier"`);
57
+ yield queryRunner.query(`DROP INDEX "IDX_BaseContact_type"`);
58
+ yield queryRunner.query(`CREATE TABLE "temporary_BaseContact" ("id" varchar PRIMARY KEY NOT NULL, "created_at" datetime NOT NULL DEFAULT (datetime('now')), "last_updated_at" datetime NOT NULL DEFAULT (datetime('now')), "legal_name" varchar(255), "display_name" varchar(255), "first_name" varchar(255), "middle_name" varchar(255), "last_name" varchar(255), "type" varchar NOT NULL, "party_id" varchar, CONSTRAINT "UQ_BaseContact_legal_name" UNIQUE ("legal_name"), CONSTRAINT "REL_BaseContact_party_id" UNIQUE ("party_id"), CONSTRAINT "FK_BaseContact_party_id" FOREIGN KEY ("party_id") REFERENCES "Party" ("id") ON DELETE CASCADE ON UPDATE NO ACTION)`);
59
+ yield queryRunner.query(`INSERT INTO "temporary_BaseContact"("id", "created_at", "last_updated_at", "legal_name", "display_name", "first_name", "middle_name", "last_name", "type", "party_id") SELECT "id", "created_at", "last_updated_at", "legal_name", "display_name", "first_name", "middle_name", "last_name", "type", "party_id" FROM "BaseContact"`);
60
+ yield queryRunner.query(`DROP TABLE "BaseContact"`);
61
+ yield queryRunner.query(`ALTER TABLE "temporary_BaseContact" RENAME TO "BaseContact"`);
62
+ yield queryRunner.query(`CREATE INDEX "IDX_BaseContact_type" ON "BaseContact" ("type")`);
63
+ yield queryRunner.query(`DROP INDEX "IDX_PartyRelationship_left_right"`);
64
+ yield queryRunner.query(`CREATE TABLE "temporary_PartyRelationship" ("id" varchar PRIMARY KEY NOT NULL, "left_id" varchar NOT NULL, "right_id" varchar NOT NULL, "created_at" datetime NOT NULL DEFAULT (datetime('now')), "last_updated_at" datetime NOT NULL DEFAULT (datetime('now')), CONSTRAINT "FK_PartyRelationship_left_id" FOREIGN KEY ("left_id") REFERENCES "Party" ("id") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT "FK_PartyRelationship_right_id" FOREIGN KEY ("right_id") REFERENCES "Party" ("id") ON DELETE CASCADE ON UPDATE NO ACTION)`);
65
+ yield queryRunner.query(`INSERT INTO "temporary_PartyRelationship"("id", "left_id", "right_id", "created_at", "last_updated_at") SELECT "id", "left_id", "right_id", "created_at", "last_updated_at" FROM "PartyRelationship"`);
66
+ yield queryRunner.query(`DROP TABLE "PartyRelationship"`);
67
+ yield queryRunner.query(`ALTER TABLE "temporary_PartyRelationship" RENAME TO "PartyRelationship"`);
68
+ yield queryRunner.query(`CREATE UNIQUE INDEX "IDX_PartyRelationship_left_right" ON "PartyRelationship" ("left_id", "right_id")`);
69
+ yield queryRunner.query(`CREATE TABLE "temporary_ElectronicAddress" ("id" varchar PRIMARY KEY NOT NULL, "type" varchar(255) NOT NULL, "electronic_address" varchar(255) NOT NULL, "created_at" datetime NOT NULL DEFAULT (datetime('now')), "last_updated_at" datetime NOT NULL DEFAULT (datetime('now')), "partyId" varchar, CONSTRAINT "FK_ElectronicAddress_partyId" FOREIGN KEY ("partyId") REFERENCES "Party" ("id") ON DELETE CASCADE ON UPDATE NO ACTION)`);
70
+ yield queryRunner.query(`INSERT INTO "temporary_ElectronicAddress"("id", "type", "electronic_address", "created_at", "last_updated_at", "partyId") SELECT "id", "type", "electronic_address", "created_at", "last_updated_at", "partyId" FROM "ElectronicAddress"`);
71
+ yield queryRunner.query(`DROP TABLE "ElectronicAddress"`);
72
+ yield queryRunner.query(`ALTER TABLE "temporary_ElectronicAddress" RENAME TO "ElectronicAddress"`);
73
+ yield queryRunner.query(`CREATE TABLE "temporary_Party" ("id" varchar PRIMARY KEY NOT NULL, "uri" varchar(255) NOT NULL, "created_at" datetime NOT NULL DEFAULT (datetime('now')), "last_updated_at" datetime NOT NULL DEFAULT (datetime('now')), "party_type_id" varchar NOT NULL, CONSTRAINT "FK_Party_party_type_id" FOREIGN KEY ("party_type_id") REFERENCES "PartyType" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION)`);
74
+ yield queryRunner.query(`INSERT INTO "temporary_Party"("id", "uri", "created_at", "last_updated_at", "party_type_id") SELECT "id", "uri", "created_at", "last_updated_at", "party_type_id" FROM "Party"`);
75
+ yield queryRunner.query(`DROP TABLE "Party"`);
76
+ yield queryRunner.query(`ALTER TABLE "temporary_Party" RENAME TO "Party"`);
77
+ yield queryRunner.query(`CREATE TABLE "temporary_Identity" ("id" varchar PRIMARY KEY NOT NULL, "alias" varchar(255) NOT NULL, "roles" text NOT NULL, "created_at" datetime NOT NULL DEFAULT (datetime('now')), "last_updated_at" datetime NOT NULL DEFAULT (datetime('now')), "partyId" varchar, CONSTRAINT "UQ_Identity_alias" UNIQUE ("alias"), CONSTRAINT "FK_Identity_partyId" FOREIGN KEY ("partyId") REFERENCES "Party" ("id") ON DELETE CASCADE ON UPDATE NO ACTION)`);
78
+ yield queryRunner.query(`INSERT INTO "temporary_Identity"("id", "alias", "roles", "created_at", "last_updated_at", "partyId") SELECT "id", "alias", "roles", "created_at", "last_updated_at", "partyId" FROM "Identity"`);
79
+ yield queryRunner.query(`DROP TABLE "Identity"`);
80
+ yield queryRunner.query(`ALTER TABLE "temporary_Identity" RENAME TO "Identity"`);
81
+ yield queryRunner.query(`CREATE TABLE "temporary_Connection" ("id" varchar PRIMARY KEY NOT NULL, "type" varchar CHECK( "type" IN ('OIDC','SIOPv2','SIOPv2+OpenID4VP') ) NOT NULL, "identity_id" varchar, CONSTRAINT "REL_Connection_identity_id" UNIQUE ("identity_id"), CONSTRAINT "FK_Connection_identity_id" FOREIGN KEY ("identity_id") REFERENCES "Identity" ("id") ON DELETE CASCADE ON UPDATE NO ACTION)`);
82
+ yield queryRunner.query(`INSERT INTO "temporary_Connection"("id", "type", "identity_id") SELECT "id", "type", "identity_id" FROM "Connection"`);
83
+ yield queryRunner.query(`DROP TABLE "Connection"`);
84
+ yield queryRunner.query(`ALTER TABLE "temporary_Connection" RENAME TO "Connection"`);
85
+ yield queryRunner.query(`DROP INDEX "IDX_BaseConfig_type"`);
86
+ yield queryRunner.query(`CREATE TABLE "temporary_BaseConfig" ("id" varchar PRIMARY KEY NOT NULL, "identifier" varchar(255), "redirect_url" varchar(255), "session_id" varchar(255), "client_id" varchar(255), "client_secret" varchar(255), "scopes" text, "issuer" varchar(255), "dangerously_allow_insecure_http_requests" boolean, "client_auth_method" text, "type" varchar NOT NULL, "connection_id" varchar, CONSTRAINT "REL_BaseConfig_connection_id" UNIQUE ("connection_id"), CONSTRAINT "FK_BaseConfig_connection_id" FOREIGN KEY ("connection_id") REFERENCES "Connection" ("id") ON DELETE CASCADE ON UPDATE NO ACTION)`);
87
+ yield queryRunner.query(`INSERT INTO "temporary_BaseConfig"("id", "identifier", "redirect_url", "session_id", "client_id", "client_secret", "scopes", "issuer", "dangerously_allow_insecure_http_requests", "client_auth_method", "type", "connection_id") SELECT "id", "identifier", "redirect_url", "session_id", "client_id", "client_secret", "scopes", "issuer", "dangerously_allow_insecure_http_requests", "client_auth_method", "type", "connection_id" FROM "BaseConfig"`);
88
+ yield queryRunner.query(`DROP TABLE "BaseConfig"`);
89
+ yield queryRunner.query(`ALTER TABLE "temporary_BaseConfig" RENAME TO "BaseConfig"`);
90
+ yield queryRunner.query(`CREATE INDEX "IDX_BaseConfig_type" ON "BaseConfig" ("type")`);
91
+ // migrate existing data
92
+ yield queryRunner.query(`INSERT INTO "BaseConfig"("id", "identifier", "redirect_url", "session_id", "client_id", "client_secret", "scopes", "issuer", "dangerously_allow_insecure_http_requests", "client_auth_method", "type", "connection_id") SELECT "id", "identifier", "redirect_url", "session_id", "client_id", "client_secret", "scopes", "issuer", "dangerously_allow_insecure_http_requests", "client_auth_method", "type", "connection_id" FROM "BaseConfigEntity"`);
93
+ yield queryRunner.query(`DROP TABLE "BaseConfigEntity"`);
94
+ yield queryRunner.query(`INSERT INTO "PartyType"(id, type, name, description, tenant_id, created_at, last_updated_at) VALUES ('3875c12e-fdaa-4ef6-a340-c936e054b627', 'organization', 'Sphereon_default_type', 'sphereon_default_organization', '95e09cfc-c974-4174-86aa-7bf1d5251fb4', datetime('now'), datetime('now'))`);
95
+ yield queryRunner.query(`INSERT INTO "Party"(id, uri, created_at, last_updated_at, party_type_id) SELECT id, uri, created_at, last_updated_at, '3875c12e-fdaa-4ef6-a340-c936e054b627' FROM "Contact"`);
96
+ yield queryRunner.query(`INSERT INTO "BaseContact"(id, legal_name, display_name, party_id, created_at, last_updated_at, type) SELECT id, name, alias, id, created_at, last_updated_at, 'Organization' FROM "Contact"`);
97
+ yield queryRunner.query(`DROP TABLE "Contact"`);
98
+ });
99
+ }
100
+ down(queryRunner) {
101
+ return __awaiter(this, void 0, void 0, function* () {
102
+ // TODO DPP-27 implement downgrade
103
+ return Promise.reject(Error(`Downgrade is not yet implemented for ${this.name}`));
104
+ });
105
+ }
106
+ }
107
+ exports.CreateContacts1690925872693 = CreateContacts1690925872693;
108
+ //# sourceMappingURL=1690925872693-CreateContacts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1690925872693-CreateContacts.js","sourceRoot":"","sources":["../../../src/migrations/sqlite/1690925872693-CreateContacts.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,2BAA2B;IAAxC;QACE,SAAI,GAAG,6BAA6B,CAAA;IA+JtC,CAAC;IA7Jc,EAAE,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CACrB,6VAA6V,CAC9V,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,8KAA8K,CAC/K,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAA;YAC7D,MAAM,WAAW,CAAC,KAAK,CAAC,iFAAiF,CAAC,CAAA;YAC1G,MAAM,WAAW,CAAC,KAAK,CACrB,4TAA4T,CAC7T,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,oMAAoM,CACrM,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAA;YAChD,MAAM,WAAW,CAAC,KAAK,CAAC,uDAAuD,CAAC,CAAA;YAChF,MAAM,WAAW,CAAC,KAAK,CACrB,8OAA8O,CAC/O,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CAAC,oHAAoH,CAAC,CAAA;YAC7I,MAAM,WAAW,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAA;YAClD,MAAM,WAAW,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAA;YACpF,MAAM,WAAW,CAAC,KAAK,CACrB,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,CAAA;QACjD,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACxC,kCAAkC;YAClC,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,wCAAwC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;QACnF,CAAC;KAAA;CACF;AAhKD,kEAgKC"}
@@ -0,0 +1,7 @@
1
+ import { MigrationInterface, QueryRunner } from 'typeorm';
2
+ export declare class CreateStatusList1693866470002 implements MigrationInterface {
3
+ name: string;
4
+ up(queryRunner: QueryRunner): Promise<void>;
5
+ down(queryRunner: QueryRunner): Promise<void>;
6
+ }
7
+ //# sourceMappingURL=1693866470000-CreateStatusList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1693866470000-CreateStatusList.d.ts","sourceRoot":"","sources":["../../../src/migrations/sqlite/1693866470000-CreateStatusList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAEzD,qBAAa,6BAA8B,YAAW,kBAAkB;IACtE,IAAI,SAAkC;IAEzB,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAiB3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAC3D"}
@@ -0,0 +1,32 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CreateStatusList1693866470002 = void 0;
13
+ class CreateStatusList1693866470002 {
14
+ constructor() {
15
+ this.name = 'CreateStatusList1693866470002';
16
+ }
17
+ up(queryRunner) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ yield queryRunner.query(`CREATE TABLE "StatusListEntry" ("statusListId" varchar NOT NULL, "statusListIndex" integer NOT NULL, "credentialId" varchar, "credentialHash" varchar(128), "correlationId" varchar(255), "value" varchar(50), PRIMARY KEY ("statusListId", "statusListIndex"))`);
20
+ yield queryRunner.query(`CREATE TABLE "StatusList" ("id" varchar PRIMARY KEY NOT NULL, "correlationId" varchar NOT NULL, "length" integer NOT NULL, "issuer" text NOT NULL, "type" varchar CHECK( "type" IN ('StatusList2021') ) NOT NULL DEFAULT ('StatusList2021'), "driverType" varchar CHECK( "driverType" IN ('agent_typeorm','agent_kv_store','github','agent_filesystem') ) NOT NULL DEFAULT ('agent_typeorm'), "credentialIdMode" varchar CHECK( "credentialIdMode" IN ('ISSUANCE','PERSISTENCE','NEVER') ) NOT NULL DEFAULT ('ISSUANCE'), "proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt') ) NOT NULL DEFAULT ('lds'), "indexingDirection" varchar CHECK( "indexingDirection" IN ('rightToLeft') ) NOT NULL DEFAULT ('rightToLeft'), "statusPurpose" varchar NOT NULL DEFAULT ('revocation'), "statusListCredential" text, CONSTRAINT "UQ_correlationId" UNIQUE ("correlationId"))`);
21
+ yield queryRunner.query(`CREATE TABLE "temporary_StatusListEntry" ("statusListId" varchar NOT NULL, "statusListIndex" integer NOT NULL, "credentialId" varchar, "credentialHash" varchar(128), "correlationId" varchar(255), "value" varchar(50), CONSTRAINT "FK_statusListEntry_statusListId" FOREIGN KEY ("statusListId") REFERENCES "StatusList" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION, PRIMARY KEY ("statusListId", "statusListIndex"))`);
22
+ yield queryRunner.query(`INSERT INTO "temporary_StatusListEntry"("statusListId", "statusListIndex", "credentialId", "credentialHash", "correlationId", "value") SELECT "statusListId", "statusListIndex", "credentialId", "credentialHash", "correlationId", "value" FROM "StatusListEntry"`);
23
+ yield queryRunner.query(`DROP TABLE "StatusListEntry"`);
24
+ yield queryRunner.query(`ALTER TABLE "temporary_StatusListEntry" RENAME TO "StatusListEntry"`);
25
+ });
26
+ }
27
+ down(queryRunner) {
28
+ return __awaiter(this, void 0, void 0, function* () { });
29
+ }
30
+ }
31
+ exports.CreateStatusList1693866470002 = CreateStatusList1693866470002;
32
+ //# sourceMappingURL=1693866470000-CreateStatusList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1693866470000-CreateStatusList.js","sourceRoot":"","sources":["../../../src/migrations/sqlite/1693866470000-CreateStatusList.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,6BAA6B;IAA1C;QACE,SAAI,GAAG,+BAA+B,CAAA;IAoBxC,CAAC;IAlBc,EAAE,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CACrB,iQAAiQ,CAClQ,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,+0BAA+0B,CACh1B,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,6ZAA6Z,CAC9Z,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,oQAAoQ,CACrQ,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAA;YACvD,MAAM,WAAW,CAAC,KAAK,CAAC,qEAAqE,CAAC,CAAA;QAChG,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;8DAAkB,CAAC;KAAA;CAC9D;AArBD,sEAqBC"}
@@ -0,0 +1,20 @@
1
+ import { StatusListEntryEntity } from '../entities/statusList2021/StatusList2021EntryEntity';
2
+ import { IAddStatusListArgs, IAddStatusListEntryArgs, IGetStatusListArgs, IGetStatusListEntriesArgs, IGetStatusListEntryByCredentialIdArgs, IGetStatusListEntryByIndexArgs, IGetStatusListsArgs, IRemoveStatusListArgs, IStatusListEntryAvailableArgs, IUpdateStatusListIndexArgs } from '../types/statusList/IAbstractStatusListStore';
3
+ import { IStatusListEntity, IStatusListEntryEntity } from '../types/statusList/statusList';
4
+ export interface IStatusListStore {
5
+ getStatusList(args: IGetStatusListArgs): Promise<IStatusListEntity>;
6
+ getStatusLists(args: IGetStatusListsArgs): Promise<Array<IStatusListEntity>>;
7
+ removeStatusList(args: IRemoveStatusListArgs): Promise<void>;
8
+ addStatusList(args: IAddStatusListArgs): Promise<IStatusListEntity>;
9
+ updateStatusList(args: IUpdateStatusListIndexArgs): Promise<IStatusListEntity>;
10
+ availableStatusListEntries(args: IStatusListEntryAvailableArgs): Promise<number[]>;
11
+ addStatusListEntry(args: IAddStatusListEntryArgs): Promise<IStatusListEntryEntity>;
12
+ updateStatusListEntry(args: IAddStatusListEntryArgs): Promise<IStatusListEntryEntity>;
13
+ getStatusListEntryByIndex(args: IGetStatusListEntryByIndexArgs): Promise<StatusListEntryEntity | undefined>;
14
+ getStatusListEntryByCredentialId(args: IGetStatusListEntryByCredentialIdArgs): Promise<StatusListEntryEntity | undefined>;
15
+ removeStatusListEntryByIndex(args: IGetStatusListEntryByIndexArgs): Promise<boolean>;
16
+ removeStatusListEntryByCredentialId(args: IGetStatusListEntryByCredentialIdArgs): Promise<boolean>;
17
+ getStatusListEntries(args: IGetStatusListEntriesArgs): Promise<IStatusListEntryEntity[]>;
18
+ getStatusList(args: IGetStatusListArgs): Promise<IStatusListEntity>;
19
+ }
20
+ //# sourceMappingURL=IStatusListStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IStatusListStore.d.ts","sourceRoot":"","sources":["../../src/statusList/IStatusListStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAA;AAC5F,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,yBAAyB,EACzB,qCAAqC,EACrC,8BAA8B,EAC9B,mBAAmB,EACnB,qBAAqB,EAC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AExF,aAAa,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAA;CACpE"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IStatusListStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IStatusListStore.js","sourceRoot":"","sources":["../../src/statusList/IStatusListStore.ts"],"names":[],"mappings":""}
@@ -0,0 +1,36 @@
1
+ import { OrPromise } from '@sphereon/ssi-types';
2
+ import { DataSource, Repository } from 'typeorm';
3
+ import { StatusListEntity } from '../entities/statusList2021/StatusList2021Entity';
4
+ import { StatusListEntryEntity } from '../entities/statusList2021/StatusList2021EntryEntity';
5
+ import { IAddStatusListArgs, IAddStatusListEntryArgs, IGetStatusListArgs, IGetStatusListEntriesArgs, IGetStatusListEntryByCredentialIdArgs, IGetStatusListEntryByIndexArgs, IGetStatusListsArgs, IRemoveStatusListArgs, IStatusListEntryAvailableArgs, IUpdateStatusListIndexArgs, IStatusListEntity, IStatusListEntryEntity } from '../types';
6
+ import { IStatusListStore } from './IStatusListStore';
7
+ export declare class StatusListStore implements IStatusListStore {
8
+ private readonly _dbConnection;
9
+ constructor(dbConnection: OrPromise<DataSource>);
10
+ /**
11
+ * Get's the available status list indices from the provided indices. Meaning it will filter out any index that is already known.
12
+ *
13
+ * 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.
14
+ * 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.
15
+ * Callers are also expected to call this function multiple times if it does not yield results
16
+ *
17
+ * @param args
18
+ */
19
+ availableStatusListEntries(args: IStatusListEntryAvailableArgs): Promise<number[]>;
20
+ addStatusListEntry(args: IAddStatusListEntryArgs): Promise<IStatusListEntryEntity>;
21
+ updateStatusListEntry(args: IAddStatusListEntryArgs): Promise<IStatusListEntryEntity>;
22
+ getStatusListEntryByIndex(args: IGetStatusListEntryByIndexArgs): Promise<StatusListEntryEntity | undefined>;
23
+ removeStatusListEntryByIndex(args: IGetStatusListEntryByIndexArgs): Promise<boolean>;
24
+ getStatusListEntryByCredentialId(args: IGetStatusListEntryByCredentialIdArgs): Promise<StatusListEntryEntity | undefined>;
25
+ removeStatusListEntryByCredentialId(args: IGetStatusListEntryByCredentialIdArgs): Promise<boolean>;
26
+ getStatusListEntries(args: IGetStatusListEntriesArgs): Promise<StatusListEntryEntity[]>;
27
+ getStatusList(args: IGetStatusListArgs): Promise<IStatusListEntity>;
28
+ getStatusLists(args: IGetStatusListsArgs): Promise<Array<IStatusListEntity>>;
29
+ addStatusList(args: IAddStatusListArgs): Promise<IStatusListEntity>;
30
+ updateStatusList(args: IUpdateStatusListIndexArgs): Promise<IStatusListEntity>;
31
+ removeStatusList(args: IRemoveStatusListArgs): Promise<void>;
32
+ private getDS;
33
+ getStatusListRepo(): Promise<Repository<StatusListEntity>>;
34
+ getStatusListEntryRepo(): Promise<Repository<StatusListEntryEntity>>;
35
+ }
36
+ //# sourceMappingURL=StatusListStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusListStore.d.ts","sourceRoot":"","sources":["../../src/statusList/StatusListStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAE/C,OAAO,EAAE,UAAU,EAAM,UAAU,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAA;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAA;AAC5F,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,yBAAyB,EACzB,qCAAqC,EACrC,8BAA8B,EAC9B,mBAAmB,EACnB,qBAAqB,EACrB,6BAA6B,EAC7B,0BAA0B,EAC1B,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAA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