@sphereon/ssi-sdk.data-store 0.34.1-feature.SSISDK.78.280 → 0.34.1-feature.SSISDK.82.linkedVP.325

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1922,6 +1922,8 @@ var DigitalCredentialEntity = class extends BaseEntity11 {
1922
1922
  rpCorrelationId;
1923
1923
  verifiedState;
1924
1924
  tenantId;
1925
+ linkedVpId;
1926
+ linkedVpFrom;
1925
1927
  createdAt;
1926
1928
  presentedAt;
1927
1929
  lastUpdatedAt;
@@ -2084,6 +2086,21 @@ _ts_decorate18([
2084
2086
  }),
2085
2087
  _ts_metadata17("design:type", String)
2086
2088
  ], DigitalCredentialEntity.prototype, "tenantId", void 0);
2089
+ _ts_decorate18([
2090
+ Column15("text", {
2091
+ name: "linked_vp_id",
2092
+ nullable: true
2093
+ }),
2094
+ _ts_metadata17("design:type", String)
2095
+ ], DigitalCredentialEntity.prototype, "linkedVpId", void 0);
2096
+ _ts_decorate18([
2097
+ CreateDateColumn8({
2098
+ name: "linked_vp_from",
2099
+ nullable: true,
2100
+ type: typeOrmDateTime10()
2101
+ }),
2102
+ _ts_metadata17("design:type", typeof Date === "undefined" ? Object : Date)
2103
+ ], DigitalCredentialEntity.prototype, "linkedVpFrom", void 0);
2087
2104
  _ts_decorate18([
2088
2105
  CreateDateColumn8({
2089
2106
  name: "created_at",
@@ -5281,6 +5298,37 @@ var DigitalCredentialStore = class extends AbstractDigitalCredentialStore {
5281
5298
  total
5282
5299
  };
5283
5300
  }, "getCredentials");
5301
+ updateCredential = /* @__PURE__ */ __name(async (args) => {
5302
+ const dcRepo = await this.getRepository();
5303
+ const whereClause = {};
5304
+ if ("id" in args) {
5305
+ whereClause.id = args.id;
5306
+ } else if ("hash" in args) {
5307
+ whereClause.hash = args.hash;
5308
+ } else {
5309
+ return Promise.reject(Error("No id or hash param is provided."));
5310
+ }
5311
+ const credential = await dcRepo.findOne({
5312
+ where: whereClause
5313
+ });
5314
+ if (!credential) {
5315
+ return Promise.reject(Error(`No credential found for args: ${JSON.stringify(whereClause)}`));
5316
+ }
5317
+ const { id, hash, ...updates } = args;
5318
+ const updatedCredential = {
5319
+ ...credential,
5320
+ ...updates,
5321
+ id: credential.id,
5322
+ hash: credential.hash,
5323
+ createdAt: credential.createdAt,
5324
+ lastUpdatedAt: /* @__PURE__ */ new Date()
5325
+ };
5326
+ debug2("Updating credential", updatedCredential);
5327
+ const updatedResult = await dcRepo.save(updatedCredential, {
5328
+ transaction: true
5329
+ });
5330
+ return digitalCredentialFrom(updatedResult);
5331
+ }, "updateCredential");
5284
5332
  removeCredential = /* @__PURE__ */ __name(async (args) => {
5285
5333
  if (!args) {
5286
5334
  return false;
@@ -7411,6 +7459,7 @@ var CreateBitstringStatusListPG1741895823000 = class {
7411
7459
  await queryRunner.query(`ALTER TABLE "StatusList" ADD CONSTRAINT "CHK_StatusList_type" CHECK ("type" IN ('StatusList2021', 'OAuthStatusList', 'BitstringStatusList'))`);
7412
7460
  await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD COLUMN "type" character varying NOT NULL DEFAULT 'StatusListEntryEntity'`);
7413
7461
  await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD COLUMN "statusPurpose" character varying`);
7462
+ await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD COLUMN "bitsPerStatus" integer DEFAULT 1`);
7414
7463
  await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD COLUMN "statusMessage" text`);
7415
7464
  await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD COLUMN "statusReference" text`);
7416
7465
  await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD CONSTRAINT "CHK_StatusListEntry_type" CHECK ("type" IN ('StatusListEntryEntity', 'bitstring'))`);
@@ -7748,32 +7797,148 @@ var CreateDcqlQueryItem1726617600000 = class {
7748
7797
  }
7749
7798
  };
7750
7799
 
7751
- // src/migrations/generic/2-CreateIssuanceBranding.ts
7800
+ // src/migrations/generic/14-AddLinkedVpFields.ts
7752
7801
  import Debug13 from "debug";
7802
+
7803
+ // src/migrations/postgres/1763387280001-AddLinkedVpFields.ts
7804
+ var AddLinkedVpFields1763387280001 = class {
7805
+ static {
7806
+ __name(this, "AddLinkedVpFields1763387280001");
7807
+ }
7808
+ name = "AddLinkedVpFields1763387280001";
7809
+ async up(queryRunner) {
7810
+ await queryRunner.query(`
7811
+ ALTER TABLE "DigitalCredential"
7812
+ ADD COLUMN "linked_vp_id" text
7813
+ `);
7814
+ await queryRunner.query(`
7815
+ ALTER TABLE "DigitalCredential"
7816
+ ADD COLUMN "linked_vp_from" TIMESTAMP
7817
+ `);
7818
+ }
7819
+ async down(queryRunner) {
7820
+ await queryRunner.query(`
7821
+ ALTER TABLE "DigitalCredential"
7822
+ DROP COLUMN "linked_vp_from"
7823
+ `);
7824
+ await queryRunner.query(`
7825
+ ALTER TABLE "DigitalCredential"
7826
+ DROP COLUMN "linked_vp_id"
7827
+ `);
7828
+ }
7829
+ };
7830
+
7831
+ // src/migrations/sqlite/1763387280002-AddLinkedVpFields.ts
7832
+ var AddLinkedVpFields1763387280002 = class {
7833
+ static {
7834
+ __name(this, "AddLinkedVpFields1763387280002");
7835
+ }
7836
+ name = "AddLinkedVpFields1763387280002";
7837
+ async up(queryRunner) {
7838
+ await queryRunner.query(`
7839
+ ALTER TABLE "DigitalCredential"
7840
+ ADD COLUMN "linked_vp_id" text
7841
+ `);
7842
+ await queryRunner.query(`
7843
+ ALTER TABLE "DigitalCredential"
7844
+ ADD COLUMN "linked_vp_from" datetime
7845
+ `);
7846
+ }
7847
+ async down(queryRunner) {
7848
+ await queryRunner.query(`
7849
+ ALTER TABLE "DigitalCredential"
7850
+ DROP COLUMN "linked_vp_from"
7851
+ `);
7852
+ await queryRunner.query(`
7853
+ ALTER TABLE "DigitalCredential"
7854
+ DROP COLUMN "linked_vp_id"
7855
+ `);
7856
+ }
7857
+ };
7858
+
7859
+ // src/migrations/generic/14-AddLinkedVpFields.ts
7753
7860
  var debug13 = Debug13("sphereon:ssi-sdk:migrations");
7861
+ var AddLinkedVpFields1763387280000 = class {
7862
+ static {
7863
+ __name(this, "AddLinkedVpFields1763387280000");
7864
+ }
7865
+ name = "AddLinkedVpFields1763387280000";
7866
+ async up(queryRunner) {
7867
+ debug13("migration: adding linked VP fields to DigitalCredential table");
7868
+ const dbType = queryRunner.connection.driver.options.type;
7869
+ switch (dbType) {
7870
+ case "postgres": {
7871
+ debug13("using postgres migration file for AddLinkedVpFields");
7872
+ const mig = new AddLinkedVpFields1763387280001();
7873
+ await mig.up(queryRunner);
7874
+ debug13("Postgres migration statements for AddLinkedVpFields executed");
7875
+ return;
7876
+ }
7877
+ case "sqlite":
7878
+ case "expo":
7879
+ case "react-native": {
7880
+ debug13("using sqlite/react-native migration file for AddLinkedVpFields");
7881
+ const mig = new AddLinkedVpFields1763387280002();
7882
+ await mig.up(queryRunner);
7883
+ debug13("SQLite migration statements for AddLinkedVpFields executed");
7884
+ return;
7885
+ }
7886
+ default:
7887
+ return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo, and postgres for AddLinkedVpFields. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
7888
+ }
7889
+ }
7890
+ async down(queryRunner) {
7891
+ debug13("migration: reverting linked VP fields from DigitalCredential table");
7892
+ const dbType = queryRunner.connection.driver.options.type;
7893
+ switch (dbType) {
7894
+ case "postgres": {
7895
+ debug13("using postgres migration file for AddLinkedVpFields");
7896
+ const mig = new AddLinkedVpFields1763387280001();
7897
+ await mig.down(queryRunner);
7898
+ debug13("Postgres migration statements for AddLinkedVpFields reverted");
7899
+ return;
7900
+ }
7901
+ case "sqlite":
7902
+ case "expo":
7903
+ case "react-native": {
7904
+ debug13("using sqlite/react-native migration file for AddLinkedVpFields");
7905
+ const mig = new AddLinkedVpFields1763387280002();
7906
+ await mig.down(queryRunner);
7907
+ debug13("SQLite migration statements for AddLinkedVpFields reverted");
7908
+ return;
7909
+ }
7910
+ default:
7911
+ return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo, and postgres for AddLinkedVpFields. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
7912
+ }
7913
+ }
7914
+ };
7915
+
7916
+ // src/migrations/generic/2-CreateIssuanceBranding.ts
7917
+ import Debug14 from "debug";
7918
+ var debug14 = Debug14("sphereon:ssi-sdk:migrations");
7754
7919
  var CreateIssuanceBranding1659463079429 = class {
7755
7920
  static {
7756
7921
  __name(this, "CreateIssuanceBranding1659463079429");
7757
7922
  }
7758
7923
  name = "CreateIssuanceBranding1659463079429";
7759
7924
  async up(queryRunner) {
7760
- debug13("migration: creating issuance branding tables");
7925
+ debug14("migration: creating issuance branding tables");
7761
7926
  const dbType = queryRunner.connection.driver.options.type;
7762
7927
  switch (dbType) {
7763
7928
  case "postgres": {
7764
- debug13("using postgres migration file");
7929
+ debug14("using postgres migration file");
7765
7930
  const mig = new CreateIssuanceBranding1685628974232();
7766
7931
  await mig.up(queryRunner);
7767
- debug13("Migration statements executed");
7932
+ debug14("Migration statements executed");
7768
7933
  return;
7769
7934
  }
7770
7935
  case "sqlite":
7771
7936
  case "expo":
7772
7937
  case "react-native": {
7773
- debug13("using sqlite/react-native migration file");
7938
+ debug14("using sqlite/react-native migration file");
7774
7939
  const mig = new CreateIssuanceBranding1685628973231();
7775
7940
  await mig.up(queryRunner);
7776
- debug13("Migration statements executed");
7941
+ debug14("Migration statements executed");
7777
7942
  return;
7778
7943
  }
7779
7944
  default:
@@ -7781,23 +7946,23 @@ var CreateIssuanceBranding1659463079429 = class {
7781
7946
  }
7782
7947
  }
7783
7948
  async down(queryRunner) {
7784
- debug13("migration: reverting issuance branding tables");
7949
+ debug14("migration: reverting issuance branding tables");
7785
7950
  const dbType = queryRunner.connection.driver.options.type;
7786
7951
  switch (dbType) {
7787
7952
  case "postgres": {
7788
- debug13("using postgres migration file");
7953
+ debug14("using postgres migration file");
7789
7954
  const mig = new CreateIssuanceBranding1685628974232();
7790
7955
  await mig.down(queryRunner);
7791
- debug13("Migration statements executed");
7956
+ debug14("Migration statements executed");
7792
7957
  return;
7793
7958
  }
7794
7959
  case "sqlite":
7795
7960
  case "expo":
7796
7961
  case "react-native": {
7797
- debug13("using sqlite/react-native migration file");
7962
+ debug14("using sqlite/react-native migration file");
7798
7963
  const mig = new CreateIssuanceBranding1685628973231();
7799
7964
  await mig.down(queryRunner);
7800
- debug13("Migration statements executed");
7965
+ debug14("Migration statements executed");
7801
7966
  return;
7802
7967
  }
7803
7968
  default:
@@ -7807,7 +7972,7 @@ var CreateIssuanceBranding1659463079429 = class {
7807
7972
  };
7808
7973
 
7809
7974
  // src/migrations/generic/3-CreateContacts.ts
7810
- import Debug14 from "debug";
7975
+ import Debug15 from "debug";
7811
7976
 
7812
7977
  // src/migrations/postgres/1690925872592-CreateContacts.ts
7813
7978
  import { enablePostgresUuidExtension as enablePostgresUuidExtension3 } from "@sphereon/ssi-sdk.core";
@@ -8028,30 +8193,30 @@ var CreateContacts1690925872693 = class {
8028
8193
  };
8029
8194
 
8030
8195
  // src/migrations/generic/3-CreateContacts.ts
8031
- var debug14 = Debug14("sphereon:ssi-sdk:migrations");
8196
+ var debug15 = Debug15("sphereon:ssi-sdk:migrations");
8032
8197
  var CreateContacts1690925872318 = class {
8033
8198
  static {
8034
8199
  __name(this, "CreateContacts1690925872318");
8035
8200
  }
8036
8201
  name = "CreateContacts1690925872318";
8037
8202
  async up(queryRunner) {
8038
- debug14("migration: creating contacts tables");
8203
+ debug15("migration: creating contacts tables");
8039
8204
  const dbType = queryRunner.connection.driver.options.type;
8040
8205
  switch (dbType) {
8041
8206
  case "postgres": {
8042
- debug14("using postgres migration file");
8207
+ debug15("using postgres migration file");
8043
8208
  const mig = new CreateContacts1690925872592();
8044
8209
  await mig.up(queryRunner);
8045
- debug14("Migration statements executed");
8210
+ debug15("Migration statements executed");
8046
8211
  return;
8047
8212
  }
8048
8213
  case "sqlite":
8049
8214
  case "expo":
8050
8215
  case "react-native": {
8051
- debug14("using sqlite/react-native migration file");
8216
+ debug15("using sqlite/react-native migration file");
8052
8217
  const mig = new CreateContacts1690925872693();
8053
8218
  await mig.up(queryRunner);
8054
- debug14("Migration statements executed");
8219
+ debug15("Migration statements executed");
8055
8220
  return;
8056
8221
  }
8057
8222
  default:
@@ -8059,23 +8224,23 @@ var CreateContacts1690925872318 = class {
8059
8224
  }
8060
8225
  }
8061
8226
  async down(queryRunner) {
8062
- debug14("migration: reverting contacts tables");
8227
+ debug15("migration: reverting contacts tables");
8063
8228
  const dbType = queryRunner.connection.driver.options.type;
8064
8229
  switch (dbType) {
8065
8230
  case "postgres": {
8066
- debug14("using postgres migration file");
8231
+ debug15("using postgres migration file");
8067
8232
  const mig = new CreateContacts1690925872592();
8068
8233
  await mig.down(queryRunner);
8069
- debug14("Migration statements executed");
8234
+ debug15("Migration statements executed");
8070
8235
  return;
8071
8236
  }
8072
8237
  case "sqlite":
8073
8238
  case "expo":
8074
8239
  case "react-native": {
8075
- debug14("using sqlite/react-native migration file");
8240
+ debug15("using sqlite/react-native migration file");
8076
8241
  const mig = new CreateContacts1690925872693();
8077
8242
  await mig.down(queryRunner);
8078
- debug14("Migration statements executed");
8243
+ debug15("Migration statements executed");
8079
8244
  return;
8080
8245
  }
8081
8246
  default:
@@ -8085,7 +8250,7 @@ var CreateContacts1690925872318 = class {
8085
8250
  };
8086
8251
 
8087
8252
  // src/migrations/generic/4-CreateStatusList.ts
8088
- import Debug15 from "debug";
8253
+ import Debug16 from "debug";
8089
8254
 
8090
8255
  // src/migrations/postgres/1693866470001-CreateStatusList.ts
8091
8256
  var CreateStatusList1693866470001 = class {
@@ -8291,53 +8456,53 @@ var UpdateStatusList1737110469000 = class {
8291
8456
  };
8292
8457
 
8293
8458
  // src/migrations/generic/4-CreateStatusList.ts
8294
- var debug15 = Debug15("sphereon:ssi-sdk:migrations");
8459
+ var debug16 = Debug16("sphereon:ssi-sdk:migrations");
8295
8460
  var CreateStatusList1693866470000 = class {
8296
8461
  static {
8297
8462
  __name(this, "CreateStatusList1693866470000");
8298
8463
  }
8299
8464
  name = "CreateStatusList1693866470000";
8300
8465
  async up(queryRunner) {
8301
- debug15("migration: creating issuance branding tables");
8466
+ debug16("migration: creating issuance branding tables");
8302
8467
  const dbType = queryRunner.connection.driver.options.type;
8303
8468
  if (dbType === "postgres") {
8304
- debug15("using postgres migration files");
8469
+ debug16("using postgres migration files");
8305
8470
  const createMig = new CreateStatusList1693866470001();
8306
8471
  await createMig.up(queryRunner);
8307
8472
  const updateMig = new UpdateStatusList1737110469001();
8308
8473
  const up = await updateMig.up(queryRunner);
8309
- debug15("Migration statements executed");
8474
+ debug16("Migration statements executed");
8310
8475
  return up;
8311
8476
  } else if (dbType === "sqlite" || dbType === "react-native" || dbType === "expo") {
8312
- debug15("using sqlite/react-native migration files");
8477
+ debug16("using sqlite/react-native migration files");
8313
8478
  const createMig = new CreateStatusList1693866470002();
8314
8479
  await createMig.up(queryRunner);
8315
8480
  const updateMig = new UpdateStatusList1737110469000();
8316
8481
  const up = await updateMig.up(queryRunner);
8317
- debug15("Migration statements executed");
8482
+ debug16("Migration statements executed");
8318
8483
  return up;
8319
8484
  } else {
8320
8485
  return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
8321
8486
  }
8322
8487
  }
8323
8488
  async down(queryRunner) {
8324
- debug15("migration: reverting issuance branding tables");
8489
+ debug16("migration: reverting issuance branding tables");
8325
8490
  const dbType = queryRunner.connection.driver.options.type;
8326
8491
  if (dbType === "postgres") {
8327
- debug15("using postgres migration files");
8492
+ debug16("using postgres migration files");
8328
8493
  const updateMig = new UpdateStatusList1737110469001();
8329
8494
  await updateMig.down(queryRunner);
8330
8495
  const createMig = new CreateStatusList1693866470001();
8331
8496
  const down = await createMig.down(queryRunner);
8332
- debug15("Migration statements executed");
8497
+ debug16("Migration statements executed");
8333
8498
  return down;
8334
8499
  } else if (dbType === "sqlite" || dbType === "react-native" || dbType === "expo") {
8335
- debug15("using sqlite/react-native migration files");
8500
+ debug16("using sqlite/react-native migration files");
8336
8501
  const updateMig = new UpdateStatusList1737110469000();
8337
8502
  await updateMig.down(queryRunner);
8338
8503
  const createMig = new CreateStatusList1693866470002();
8339
8504
  const down = await createMig.down(queryRunner);
8340
- debug15("Migration statements executed");
8505
+ debug16("Migration statements executed");
8341
8506
  return down;
8342
8507
  } else {
8343
8508
  return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
@@ -8346,7 +8511,7 @@ var CreateStatusList1693866470000 = class {
8346
8511
  };
8347
8512
 
8348
8513
  // src/migrations/generic/5-CreateAuditEvents.ts
8349
- import Debug16 from "debug";
8514
+ import Debug17 from "debug";
8350
8515
 
8351
8516
  // src/migrations/postgres/1701634812183-CreateAuditEvents.ts
8352
8517
  var CreateAuditEvents1701634812183 = class {
@@ -8445,30 +8610,30 @@ var CreateAuditEvents1701634819487 = class {
8445
8610
  };
8446
8611
 
8447
8612
  // src/migrations/generic/5-CreateAuditEvents.ts
8448
- var debug16 = Debug16("sphereon:ssi-sdk:migrations");
8613
+ var debug17 = Debug17("sphereon:ssi-sdk:migrations");
8449
8614
  var CreateAuditEvents1701635835330 = class {
8450
8615
  static {
8451
8616
  __name(this, "CreateAuditEvents1701635835330");
8452
8617
  }
8453
8618
  name = "CreateAuditEvents1701635835330";
8454
8619
  async up(queryRunner) {
8455
- debug16("migration: creating audit events tables");
8620
+ debug17("migration: creating audit events tables");
8456
8621
  const dbType = queryRunner.connection.driver.options.type;
8457
8622
  switch (dbType) {
8458
8623
  case "postgres": {
8459
- debug16("using postgres migration file");
8624
+ debug17("using postgres migration file");
8460
8625
  const mig = new CreateAuditEvents1701634812183();
8461
8626
  await mig.up(queryRunner);
8462
- debug16("Migration statements executed");
8627
+ debug17("Migration statements executed");
8463
8628
  return;
8464
8629
  }
8465
8630
  case "sqlite":
8466
8631
  case "expo":
8467
8632
  case "react-native": {
8468
- debug16("using sqlite/react-native migration file");
8633
+ debug17("using sqlite/react-native migration file");
8469
8634
  const mig = new CreateAuditEvents1701634819487();
8470
8635
  await mig.up(queryRunner);
8471
- debug16("Migration statements executed");
8636
+ debug17("Migration statements executed");
8472
8637
  return;
8473
8638
  }
8474
8639
  default:
@@ -8476,23 +8641,23 @@ var CreateAuditEvents1701635835330 = class {
8476
8641
  }
8477
8642
  }
8478
8643
  async down(queryRunner) {
8479
- debug16("migration: reverting audit events tables");
8644
+ debug17("migration: reverting audit events tables");
8480
8645
  const dbType = queryRunner.connection.driver.options.type;
8481
8646
  switch (dbType) {
8482
8647
  case "postgres": {
8483
- debug16("using postgres migration file");
8648
+ debug17("using postgres migration file");
8484
8649
  const mig = new CreateAuditEvents1701634812183();
8485
8650
  await mig.down(queryRunner);
8486
- debug16("Migration statements executed");
8651
+ debug17("Migration statements executed");
8487
8652
  return;
8488
8653
  }
8489
8654
  case "sqlite":
8490
8655
  case "expo":
8491
8656
  case "react-native": {
8492
- debug16("using sqlite/react-native migration file");
8657
+ debug17("using sqlite/react-native migration file");
8493
8658
  const mig = new CreateAuditEvents1701634819487();
8494
8659
  await mig.down(queryRunner);
8495
- debug16("Migration statements executed");
8660
+ debug17("Migration statements executed");
8496
8661
  return;
8497
8662
  }
8498
8663
  default:
@@ -8502,7 +8667,7 @@ var CreateAuditEvents1701635835330 = class {
8502
8667
  };
8503
8668
 
8504
8669
  // src/migrations/generic/6-CreateDigitalCredential.ts
8505
- import Debug17 from "debug";
8670
+ import Debug18 from "debug";
8506
8671
 
8507
8672
  // src/migrations/postgres/1708525189001-CreateDigitalCredential.ts
8508
8673
  var CreateDigitalCredential1708525189001 = class {
@@ -8610,30 +8775,30 @@ var CreateDigitalCredential1708525189002 = class {
8610
8775
  };
8611
8776
 
8612
8777
  // src/migrations/generic/6-CreateDigitalCredential.ts
8613
- var debug17 = Debug17("sphereon:ssi-sdk:migrations");
8778
+ var debug18 = Debug18("sphereon:ssi-sdk:migrations");
8614
8779
  var CreateDigitalCredential1708525189000 = class {
8615
8780
  static {
8616
8781
  __name(this, "CreateDigitalCredential1708525189000");
8617
8782
  }
8618
8783
  name = "CreateDigitalCredential1708525189000";
8619
8784
  async up(queryRunner) {
8620
- debug17("migration: creating DigitalCredential tables");
8785
+ debug18("migration: creating DigitalCredential tables");
8621
8786
  const dbType = queryRunner.connection.driver.options.type;
8622
8787
  switch (dbType) {
8623
8788
  case "postgres": {
8624
- debug17("using postgres migration file for DigitalCredential");
8789
+ debug18("using postgres migration file for DigitalCredential");
8625
8790
  const mig = new CreateDigitalCredential1708525189001();
8626
8791
  await mig.up(queryRunner);
8627
- debug17("Postgres Migration statements for DigitalCredential executed");
8792
+ debug18("Postgres Migration statements for DigitalCredential executed");
8628
8793
  return;
8629
8794
  }
8630
8795
  case "sqlite":
8631
8796
  case "expo":
8632
8797
  case "react-native": {
8633
- debug17("using sqlite/react-native migration file for DigitalCredential");
8798
+ debug18("using sqlite/react-native migration file for DigitalCredential");
8634
8799
  const mig = new CreateDigitalCredential1708525189002();
8635
8800
  await mig.up(queryRunner);
8636
- debug17("SQLite Migration statements for DigitalCredential executed");
8801
+ debug18("SQLite Migration statements for DigitalCredential executed");
8637
8802
  return;
8638
8803
  }
8639
8804
  default:
@@ -8641,23 +8806,23 @@ var CreateDigitalCredential1708525189000 = class {
8641
8806
  }
8642
8807
  }
8643
8808
  async down(queryRunner) {
8644
- debug17("migration: reverting DigitalCredential tables");
8809
+ debug18("migration: reverting DigitalCredential tables");
8645
8810
  const dbType = queryRunner.connection.driver.options.type;
8646
8811
  switch (dbType) {
8647
8812
  case "postgres": {
8648
- debug17("using postgres migration file for DigitalCredential");
8813
+ debug18("using postgres migration file for DigitalCredential");
8649
8814
  const mig = new CreateDigitalCredential1708525189001();
8650
8815
  await mig.down(queryRunner);
8651
- debug17("Postgres Migration statements for DigitalCredential reverted");
8816
+ debug18("Postgres Migration statements for DigitalCredential reverted");
8652
8817
  return;
8653
8818
  }
8654
8819
  case "sqlite":
8655
8820
  case "expo":
8656
8821
  case "react-native": {
8657
- debug17("using sqlite/react-native migration file for DigitalCredential");
8822
+ debug18("using sqlite/react-native migration file for DigitalCredential");
8658
8823
  const mig = new CreateDigitalCredential1708525189002();
8659
8824
  await mig.down(queryRunner);
8660
- debug17("SQLite Migration statements for DigitalCredential reverted");
8825
+ debug18("SQLite Migration statements for DigitalCredential reverted");
8661
8826
  return;
8662
8827
  }
8663
8828
  default:
@@ -8667,7 +8832,7 @@ var CreateDigitalCredential1708525189000 = class {
8667
8832
  };
8668
8833
 
8669
8834
  // src/migrations/generic/7-CreateMachineStateStore.ts
8670
- import Debug18 from "debug";
8835
+ import Debug19 from "debug";
8671
8836
 
8672
8837
  // src/migrations/postgres/1708797018115-CreateMachineStateStore.ts
8673
8838
  var CreateMachineStateStore1708797018115 = class {
@@ -8729,30 +8894,30 @@ var CreateMachineStateStore1708796002272 = class {
8729
8894
  };
8730
8895
 
8731
8896
  // src/migrations/generic/7-CreateMachineStateStore.ts
8732
- var debug18 = Debug18("sphereon:ssi-sdk:migrations");
8897
+ var debug19 = Debug19("sphereon:ssi-sdk:migrations");
8733
8898
  var CreateMachineStateStore1708098041262 = class {
8734
8899
  static {
8735
8900
  __name(this, "CreateMachineStateStore1708098041262");
8736
8901
  }
8737
8902
  name = "CreateMachineStateStore1708098041262";
8738
8903
  async up(queryRunner) {
8739
- debug18("migration: creating machine state tables");
8904
+ debug19("migration: creating machine state tables");
8740
8905
  const dbType = queryRunner.connection.driver.options.type;
8741
8906
  switch (dbType) {
8742
8907
  case "postgres": {
8743
- debug18("using postgres migration file");
8908
+ debug19("using postgres migration file");
8744
8909
  const mig = new CreateMachineStateStore1708797018115();
8745
8910
  await mig.up(queryRunner);
8746
- debug18("Migration statements executed");
8911
+ debug19("Migration statements executed");
8747
8912
  return;
8748
8913
  }
8749
8914
  case "sqlite":
8750
8915
  case "expo":
8751
8916
  case "react-native": {
8752
- debug18("using sqlite/react-native migration file");
8917
+ debug19("using sqlite/react-native migration file");
8753
8918
  const mig = new CreateMachineStateStore1708796002272();
8754
8919
  await mig.up(queryRunner);
8755
- debug18("Migration statements executed");
8920
+ debug19("Migration statements executed");
8756
8921
  return;
8757
8922
  }
8758
8923
  default:
@@ -8760,23 +8925,23 @@ var CreateMachineStateStore1708098041262 = class {
8760
8925
  }
8761
8926
  }
8762
8927
  async down(queryRunner) {
8763
- debug18("migration: reverting machine state tables");
8928
+ debug19("migration: reverting machine state tables");
8764
8929
  const dbType = queryRunner.connection.driver.options.type;
8765
8930
  switch (dbType) {
8766
8931
  case "postgres": {
8767
- debug18("using postgres migration file");
8932
+ debug19("using postgres migration file");
8768
8933
  const mig = new CreateMachineStateStore1708797018115();
8769
8934
  await mig.down(queryRunner);
8770
- debug18("Migration statements executed");
8935
+ debug19("Migration statements executed");
8771
8936
  return;
8772
8937
  }
8773
8938
  case "sqlite":
8774
8939
  case "expo":
8775
8940
  case "react-native": {
8776
- debug18("using sqlite/react-native migration file");
8941
+ debug19("using sqlite/react-native migration file");
8777
8942
  const mig = new CreateMachineStateStore1708796002272();
8778
8943
  await mig.down(queryRunner);
8779
- debug18("Migration statements executed");
8944
+ debug19("Migration statements executed");
8780
8945
  return;
8781
8946
  }
8782
8947
  default:
@@ -8786,7 +8951,7 @@ var CreateMachineStateStore1708098041262 = class {
8786
8951
  };
8787
8952
 
8788
8953
  // src/migrations/generic/8-CreateContacts.ts
8789
- import Debug19 from "debug";
8954
+ import Debug20 from "debug";
8790
8955
 
8791
8956
  // src/migrations/postgres/1710438363001-CreateContacts.ts
8792
8957
  var CreateContacts1710438363001 = class {
@@ -8900,30 +9065,30 @@ var CreateContacts1710438363002 = class {
8900
9065
  };
8901
9066
 
8902
9067
  // src/migrations/generic/8-CreateContacts.ts
8903
- var debug19 = Debug19("sphereon:ssi-sdk:migrations");
9068
+ var debug20 = Debug20("sphereon:ssi-sdk:migrations");
8904
9069
  var CreateContacts1708525189000 = class {
8905
9070
  static {
8906
9071
  __name(this, "CreateContacts1708525189000");
8907
9072
  }
8908
9073
  name = "CreateContacts1708525189000";
8909
9074
  async up(queryRunner) {
8910
- debug19("migration: updating contact tables");
9075
+ debug20("migration: updating contact tables");
8911
9076
  const dbType = queryRunner.connection.driver.options.type;
8912
9077
  switch (dbType) {
8913
9078
  case "postgres": {
8914
- debug19("using postgres migration file");
9079
+ debug20("using postgres migration file");
8915
9080
  const mig = new CreateContacts1710438363001();
8916
9081
  await mig.up(queryRunner);
8917
- debug19("Migration statements executed");
9082
+ debug20("Migration statements executed");
8918
9083
  return;
8919
9084
  }
8920
9085
  case "sqlite":
8921
9086
  case "expo":
8922
9087
  case "react-native": {
8923
- debug19("using sqlite/react-native migration file");
9088
+ debug20("using sqlite/react-native migration file");
8924
9089
  const mig = new CreateContacts1710438363002();
8925
9090
  await mig.up(queryRunner);
8926
- debug19("Migration statements executed");
9091
+ debug20("Migration statements executed");
8927
9092
  return;
8928
9093
  }
8929
9094
  default:
@@ -8931,23 +9096,23 @@ var CreateContacts1708525189000 = class {
8931
9096
  }
8932
9097
  }
8933
9098
  async down(queryRunner) {
8934
- debug19("migration: reverting machine state tables");
9099
+ debug20("migration: reverting machine state tables");
8935
9100
  const dbType = queryRunner.connection.driver.options.type;
8936
9101
  switch (dbType) {
8937
9102
  case "postgres": {
8938
- debug19("using postgres migration file");
9103
+ debug20("using postgres migration file");
8939
9104
  const mig = new CreateContacts1710438363001();
8940
9105
  await mig.down(queryRunner);
8941
- debug19("Migration statements executed");
9106
+ debug20("Migration statements executed");
8942
9107
  return;
8943
9108
  }
8944
9109
  case "sqlite":
8945
9110
  case "expo":
8946
9111
  case "react-native": {
8947
- debug19("using sqlite/react-native migration file");
9112
+ debug20("using sqlite/react-native migration file");
8948
9113
  const mig = new CreateContacts1710438363002();
8949
9114
  await mig.down(queryRunner);
8950
- debug19("Migration statements executed");
9115
+ debug20("Migration statements executed");
8951
9116
  return;
8952
9117
  }
8953
9118
  default:
@@ -8957,7 +9122,7 @@ var CreateContacts1708525189000 = class {
8957
9122
  };
8958
9123
 
8959
9124
  // src/migrations/generic/9-CreateContacts.ts
8960
- import Debug20 from "debug";
9125
+ import Debug21 from "debug";
8961
9126
 
8962
9127
  // src/migrations/postgres/1715761125001-CreateContacts.ts
8963
9128
  var CreateContacts1715761125001 = class {
@@ -9069,30 +9234,30 @@ var CreateContacts1715761125002 = class {
9069
9234
  };
9070
9235
 
9071
9236
  // src/migrations/generic/9-CreateContacts.ts
9072
- var debug20 = Debug20("sphereon:ssi-sdk:migrations");
9237
+ var debug21 = Debug21("sphereon:ssi-sdk:migrations");
9073
9238
  var CreateContacts1715761125000 = class {
9074
9239
  static {
9075
9240
  __name(this, "CreateContacts1715761125000");
9076
9241
  }
9077
9242
  name = "CreateContacts1715761125000";
9078
9243
  async up(queryRunner) {
9079
- debug20("migration: updating contact tables");
9244
+ debug21("migration: updating contact tables");
9080
9245
  const dbType = queryRunner.connection.driver.options.type;
9081
9246
  switch (dbType) {
9082
9247
  case "postgres": {
9083
- debug20("using postgres migration file");
9248
+ debug21("using postgres migration file");
9084
9249
  const mig = new CreateContacts1715761125001();
9085
9250
  await mig.up(queryRunner);
9086
- debug20("Migration statements executed");
9251
+ debug21("Migration statements executed");
9087
9252
  return;
9088
9253
  }
9089
9254
  case "sqlite":
9090
9255
  case "expo":
9091
9256
  case "react-native": {
9092
- debug20("using sqlite/react-native migration file");
9257
+ debug21("using sqlite/react-native migration file");
9093
9258
  const mig = new CreateContacts1715761125002();
9094
9259
  await mig.up(queryRunner);
9095
- debug20("Migration statements executed");
9260
+ debug21("Migration statements executed");
9096
9261
  return;
9097
9262
  }
9098
9263
  default:
@@ -9100,23 +9265,23 @@ var CreateContacts1715761125000 = class {
9100
9265
  }
9101
9266
  }
9102
9267
  async down(queryRunner) {
9103
- debug20("migration: reverting machine state tables");
9268
+ debug21("migration: reverting machine state tables");
9104
9269
  const dbType = queryRunner.connection.driver.options.type;
9105
9270
  switch (dbType) {
9106
9271
  case "postgres": {
9107
- debug20("using postgres migration file");
9272
+ debug21("using postgres migration file");
9108
9273
  const mig = new CreateContacts1715761125001();
9109
9274
  await mig.down(queryRunner);
9110
- debug20("Migration statements executed");
9275
+ debug21("Migration statements executed");
9111
9276
  return;
9112
9277
  }
9113
9278
  case "sqlite":
9114
9279
  case "expo":
9115
9280
  case "react-native": {
9116
- debug20("using sqlite/react-native migration file");
9281
+ debug21("using sqlite/react-native migration file");
9117
9282
  const mig = new CreateContacts1715761125002();
9118
9283
  await mig.down(queryRunner);
9119
- debug20("Migration statements executed");
9284
+ debug21("Migration statements executed");
9120
9285
  return;
9121
9286
  }
9122
9287
  default:
@@ -9145,7 +9310,8 @@ var DataStoreEventLoggerMigrations = [
9145
9310
  CreateAuditEvents1701635835330
9146
9311
  ];
9147
9312
  var DataStoreDigitalCredentialMigrations = [
9148
- CreateDigitalCredential1708525189000
9313
+ CreateDigitalCredential1708525189000,
9314
+ AddLinkedVpFields1763387280000
9149
9315
  ];
9150
9316
  var DataStoreMachineStateMigrations = [
9151
9317
  CreateMachineStateStore1708098041262