@sphereon/ssi-sdk.data-store 0.36.1-next.115 → 0.36.1-next.129
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.cjs +477 -102
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +492 -117
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/src/__tests__/issuanceBranding.entities.test.ts +1 -1
- package/src/__tests__/issuanceBranding.store.test.ts +310 -0
- package/src/contact/ContactStore.ts +14 -2
- package/src/entities/issuanceBranding/CredentialBrandingEntity.ts +44 -1
- package/src/entities/issuanceBranding/CredentialLocaleBrandingEntity.ts +64 -1
- package/src/entities/issuanceBranding/IssuerLocaleBrandingEntity.ts +63 -1
- package/src/issuanceBranding/IssuanceBrandingStore.ts +45 -6
- package/src/migrations/generic/15-AddBrandingState.ts +64 -0
- package/src/migrations/generic/index.ts +6 -1
- package/src/migrations/postgres/1766000000000-AddBrandingState.ts +15 -0
- package/src/migrations/sqlite/1766000000000-AddBrandingState.ts +87 -0
- package/src/utils/issuanceBranding/HashUtils.ts +30 -0
- package/src/utils/issuanceBranding/MappingUtils.ts +21 -1
package/dist/index.js
CHANGED
|
@@ -2871,10 +2871,23 @@ BaseLocaleBrandingEntity = _ts_decorate24([
|
|
|
2871
2871
|
// src/entities/issuanceBranding/CredentialBrandingEntity.ts
|
|
2872
2872
|
import { typeOrmDateTime as typeOrmDateTime13 } from "@sphereon/ssi-sdk.agent-config";
|
|
2873
2873
|
import { ArrayMinSize, IsNotEmpty as IsNotEmpty10, validate as validate16 } from "class-validator";
|
|
2874
|
-
import { BaseEntity as BaseEntity19, BeforeInsert as
|
|
2874
|
+
import { BaseEntity as BaseEntity19, BeforeInsert as BeforeInsert19, BeforeUpdate as BeforeUpdate19, Column as Column24, CreateDateColumn as CreateDateColumn11, Entity as Entity21, Index as Index5, OneToMany as OneToMany6, PrimaryGeneratedColumn as PrimaryGeneratedColumn21, UpdateDateColumn as UpdateDateColumn11 } from "typeorm";
|
|
2875
2875
|
|
|
2876
2876
|
// src/entities/issuanceBranding/CredentialLocaleBrandingEntity.ts
|
|
2877
|
-
import { ChildEntity as ChildEntity5, Column as Column23, Index as Index4, JoinColumn as JoinColumn11, ManyToOne as ManyToOne9, OneToMany as OneToMany5 } from "typeorm";
|
|
2877
|
+
import { BeforeInsert as BeforeInsert18, BeforeUpdate as BeforeUpdate18, ChildEntity as ChildEntity5, Column as Column23, Index as Index4, JoinColumn as JoinColumn11, ManyToOne as ManyToOne9, OneToMany as OneToMany5 } from "typeorm";
|
|
2878
|
+
|
|
2879
|
+
// src/utils/issuanceBranding/HashUtils.ts
|
|
2880
|
+
var FNV_PRIME = 0x100000001b3n;
|
|
2881
|
+
var OFFSET_BASIS = 0xcbf29ce484222325n;
|
|
2882
|
+
function computeCompactHash(input) {
|
|
2883
|
+
let hash = OFFSET_BASIS;
|
|
2884
|
+
for (let i = 0; i < input.length; i++) {
|
|
2885
|
+
hash ^= BigInt(input.charCodeAt(i));
|
|
2886
|
+
hash = hash * FNV_PRIME & 0xffffffffffffffffn;
|
|
2887
|
+
}
|
|
2888
|
+
return hash.toString(36);
|
|
2889
|
+
}
|
|
2890
|
+
__name(computeCompactHash, "computeCompactHash");
|
|
2878
2891
|
|
|
2879
2892
|
// src/entities/issuanceBranding/CredentialClaimsEntity.ts
|
|
2880
2893
|
import { validate as validate15, Validate as Validate8 } from "class-validator";
|
|
@@ -2980,6 +2993,10 @@ var CredentialLocaleBrandingEntity = class extends BaseLocaleBrandingEntity {
|
|
|
2980
2993
|
credentialBranding;
|
|
2981
2994
|
claims;
|
|
2982
2995
|
credentialBrandingId;
|
|
2996
|
+
state;
|
|
2997
|
+
setState() {
|
|
2998
|
+
this.state = computeCredentialLocaleBrandingState(this);
|
|
2999
|
+
}
|
|
2983
3000
|
};
|
|
2984
3001
|
_ts_decorate26([
|
|
2985
3002
|
ManyToOne9(() => CredentialBrandingEntity, (credentialBranding) => credentialBranding.localeBranding, {
|
|
@@ -3009,6 +3026,21 @@ _ts_decorate26([
|
|
|
3009
3026
|
}),
|
|
3010
3027
|
_ts_metadata25("design:type", String)
|
|
3011
3028
|
], CredentialLocaleBrandingEntity.prototype, "credentialBrandingId", void 0);
|
|
3029
|
+
_ts_decorate26([
|
|
3030
|
+
Column23("varchar", {
|
|
3031
|
+
name: "state",
|
|
3032
|
+
length: 255,
|
|
3033
|
+
nullable: false
|
|
3034
|
+
}),
|
|
3035
|
+
_ts_metadata25("design:type", String)
|
|
3036
|
+
], CredentialLocaleBrandingEntity.prototype, "state", void 0);
|
|
3037
|
+
_ts_decorate26([
|
|
3038
|
+
BeforeInsert18(),
|
|
3039
|
+
BeforeUpdate18(),
|
|
3040
|
+
_ts_metadata25("design:type", Function),
|
|
3041
|
+
_ts_metadata25("design:paramtypes", []),
|
|
3042
|
+
_ts_metadata25("design:returntype", void 0)
|
|
3043
|
+
], CredentialLocaleBrandingEntity.prototype, "setState", null);
|
|
3012
3044
|
CredentialLocaleBrandingEntity = _ts_decorate26([
|
|
3013
3045
|
ChildEntity5("CredentialLocaleBranding"),
|
|
3014
3046
|
Index4("IDX_CredentialLocaleBrandingEntity_credentialBranding_locale", [
|
|
@@ -3018,6 +3050,45 @@ CredentialLocaleBrandingEntity = _ts_decorate26([
|
|
|
3018
3050
|
unique: true
|
|
3019
3051
|
})
|
|
3020
3052
|
], CredentialLocaleBrandingEntity);
|
|
3053
|
+
var computeCredentialLocaleBrandingState = /* @__PURE__ */ __name((localeBranding) => {
|
|
3054
|
+
const sortedClaims = (localeBranding.claims ?? []).map((claim) => ({
|
|
3055
|
+
key: claim.key,
|
|
3056
|
+
name: claim.name
|
|
3057
|
+
})).sort((first, second) => first.key.localeCompare(second.key));
|
|
3058
|
+
const payload = {
|
|
3059
|
+
alias: localeBranding.alias ?? null,
|
|
3060
|
+
locale: localeBranding.locale ?? null,
|
|
3061
|
+
description: localeBranding.description ?? null,
|
|
3062
|
+
logo: localeBranding.logo ? {
|
|
3063
|
+
uri: localeBranding.logo.uri ?? null,
|
|
3064
|
+
dataUri: localeBranding.logo.dataUri ?? null,
|
|
3065
|
+
mediaType: localeBranding.logo.mediaType ?? null,
|
|
3066
|
+
alt: localeBranding.logo.alt ?? null,
|
|
3067
|
+
dimensions: localeBranding.logo.dimensions ? {
|
|
3068
|
+
width: localeBranding.logo.dimensions.width,
|
|
3069
|
+
height: localeBranding.logo.dimensions.height
|
|
3070
|
+
} : null
|
|
3071
|
+
} : null,
|
|
3072
|
+
background: localeBranding.background ? {
|
|
3073
|
+
color: localeBranding.background.color ?? null,
|
|
3074
|
+
image: localeBranding.background.image ? {
|
|
3075
|
+
uri: localeBranding.background.image.uri ?? null,
|
|
3076
|
+
dataUri: localeBranding.background.image.dataUri ?? null,
|
|
3077
|
+
mediaType: localeBranding.background.image.mediaType ?? null,
|
|
3078
|
+
alt: localeBranding.background.image.alt ?? null,
|
|
3079
|
+
dimensions: localeBranding.background.image.dimensions ? {
|
|
3080
|
+
width: localeBranding.background.image.dimensions.width,
|
|
3081
|
+
height: localeBranding.background.image.dimensions.height
|
|
3082
|
+
} : null
|
|
3083
|
+
} : null
|
|
3084
|
+
} : null,
|
|
3085
|
+
text: localeBranding.text ? {
|
|
3086
|
+
color: localeBranding.text.color ?? null
|
|
3087
|
+
} : null,
|
|
3088
|
+
claims: sortedClaims
|
|
3089
|
+
};
|
|
3090
|
+
return computeCompactHash(JSON.stringify(payload));
|
|
3091
|
+
}, "computeCredentialLocaleBrandingState");
|
|
3021
3092
|
|
|
3022
3093
|
// src/entities/issuanceBranding/CredentialBrandingEntity.ts
|
|
3023
3094
|
function _ts_decorate27(decorators, target, key, desc) {
|
|
@@ -3038,6 +3109,7 @@ var CredentialBrandingEntity = class extends BaseEntity19 {
|
|
|
3038
3109
|
id;
|
|
3039
3110
|
vcHash;
|
|
3040
3111
|
issuerCorrelationId;
|
|
3112
|
+
state;
|
|
3041
3113
|
localeBranding;
|
|
3042
3114
|
createdAt;
|
|
3043
3115
|
lastUpdatedAt;
|
|
@@ -3045,6 +3117,11 @@ var CredentialBrandingEntity = class extends BaseEntity19 {
|
|
|
3045
3117
|
updateUpdatedDate() {
|
|
3046
3118
|
this.lastUpdatedAt = /* @__PURE__ */ new Date();
|
|
3047
3119
|
}
|
|
3120
|
+
setState() {
|
|
3121
|
+
if (this.localeBranding && Array.isArray(this.localeBranding)) {
|
|
3122
|
+
this.state = this.computeState();
|
|
3123
|
+
}
|
|
3124
|
+
}
|
|
3048
3125
|
async validate() {
|
|
3049
3126
|
const validation = await validate16(this);
|
|
3050
3127
|
if (validation.length > 0) {
|
|
@@ -3052,6 +3129,31 @@ var CredentialBrandingEntity = class extends BaseEntity19 {
|
|
|
3052
3129
|
}
|
|
3053
3130
|
return;
|
|
3054
3131
|
}
|
|
3132
|
+
computeState() {
|
|
3133
|
+
const localeStates = (this.localeBranding ?? []).map((localeBranding) => ({
|
|
3134
|
+
locale: localeBranding.locale ?? "",
|
|
3135
|
+
alias: localeBranding.alias ?? "",
|
|
3136
|
+
id: localeBranding.id ?? "",
|
|
3137
|
+
state: computeCredentialLocaleBrandingState(localeBranding)
|
|
3138
|
+
}));
|
|
3139
|
+
localeStates.sort((first, second) => {
|
|
3140
|
+
const localeCompare = first.locale.localeCompare(second.locale);
|
|
3141
|
+
if (localeCompare !== 0) {
|
|
3142
|
+
return localeCompare;
|
|
3143
|
+
}
|
|
3144
|
+
const aliasCompare = first.alias.localeCompare(second.alias);
|
|
3145
|
+
if (aliasCompare !== 0) {
|
|
3146
|
+
return aliasCompare;
|
|
3147
|
+
}
|
|
3148
|
+
return first.id.localeCompare(second.id);
|
|
3149
|
+
});
|
|
3150
|
+
const payload = {
|
|
3151
|
+
issuerCorrelationId: this.issuerCorrelationId,
|
|
3152
|
+
vcHash: this.vcHash,
|
|
3153
|
+
localeBranding: localeStates.map((entry) => entry.state)
|
|
3154
|
+
};
|
|
3155
|
+
return computeCompactHash(JSON.stringify(payload));
|
|
3156
|
+
}
|
|
3055
3157
|
};
|
|
3056
3158
|
_ts_decorate27([
|
|
3057
3159
|
PrimaryGeneratedColumn21("uuid"),
|
|
@@ -3081,6 +3183,14 @@ _ts_decorate27([
|
|
|
3081
3183
|
}),
|
|
3082
3184
|
_ts_metadata26("design:type", String)
|
|
3083
3185
|
], CredentialBrandingEntity.prototype, "issuerCorrelationId", void 0);
|
|
3186
|
+
_ts_decorate27([
|
|
3187
|
+
Column24("varchar", {
|
|
3188
|
+
name: "state",
|
|
3189
|
+
length: 255,
|
|
3190
|
+
nullable: false
|
|
3191
|
+
}),
|
|
3192
|
+
_ts_metadata26("design:type", String)
|
|
3193
|
+
], CredentialBrandingEntity.prototype, "state", void 0);
|
|
3084
3194
|
_ts_decorate27([
|
|
3085
3195
|
OneToMany6(() => CredentialLocaleBrandingEntity, (credentialLocaleBrandingEntity) => credentialLocaleBrandingEntity.credentialBranding, {
|
|
3086
3196
|
cascade: true,
|
|
@@ -3110,15 +3220,22 @@ _ts_decorate27([
|
|
|
3110
3220
|
_ts_metadata26("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3111
3221
|
], CredentialBrandingEntity.prototype, "lastUpdatedAt", void 0);
|
|
3112
3222
|
_ts_decorate27([
|
|
3113
|
-
|
|
3114
|
-
|
|
3223
|
+
BeforeInsert19(),
|
|
3224
|
+
BeforeUpdate19(),
|
|
3115
3225
|
_ts_metadata26("design:type", Function),
|
|
3116
3226
|
_ts_metadata26("design:paramtypes", []),
|
|
3117
3227
|
_ts_metadata26("design:returntype", void 0)
|
|
3118
3228
|
], CredentialBrandingEntity.prototype, "updateUpdatedDate", null);
|
|
3119
3229
|
_ts_decorate27([
|
|
3120
|
-
|
|
3121
|
-
|
|
3230
|
+
BeforeInsert19(),
|
|
3231
|
+
BeforeUpdate19(),
|
|
3232
|
+
_ts_metadata26("design:type", Function),
|
|
3233
|
+
_ts_metadata26("design:paramtypes", []),
|
|
3234
|
+
_ts_metadata26("design:returntype", void 0)
|
|
3235
|
+
], CredentialBrandingEntity.prototype, "setState", null);
|
|
3236
|
+
_ts_decorate27([
|
|
3237
|
+
BeforeInsert19(),
|
|
3238
|
+
BeforeUpdate19(),
|
|
3122
3239
|
_ts_metadata26("design:type", Function),
|
|
3123
3240
|
_ts_metadata26("design:paramtypes", []),
|
|
3124
3241
|
_ts_metadata26("design:returntype", Promise)
|
|
@@ -3136,11 +3253,11 @@ CredentialBrandingEntity = _ts_decorate27([
|
|
|
3136
3253
|
// src/entities/issuanceBranding/IssuerBrandingEntity.ts
|
|
3137
3254
|
import { typeOrmDateTime as typeOrmDateTime14 } from "@sphereon/ssi-sdk.agent-config";
|
|
3138
3255
|
import { ArrayMinSize as ArrayMinSize2, IsNotEmpty as IsNotEmpty11, validate as validate17 } from "class-validator";
|
|
3139
|
-
import { BaseEntity as BaseEntity20, BeforeInsert as
|
|
3256
|
+
import { BaseEntity as BaseEntity20, BeforeInsert as BeforeInsert21, BeforeUpdate as BeforeUpdate21, Column as Column26, CreateDateColumn as CreateDateColumn12, Entity as Entity22, Index as Index7, OneToMany as OneToMany7, PrimaryGeneratedColumn as PrimaryGeneratedColumn22, UpdateDateColumn as UpdateDateColumn12 } from "typeorm";
|
|
3140
3257
|
|
|
3141
3258
|
// src/entities/issuanceBranding/IssuerLocaleBrandingEntity.ts
|
|
3142
3259
|
import { Validate as Validate9 } from "class-validator";
|
|
3143
|
-
import { ChildEntity as ChildEntity6, Column as Column25, Index as Index6, JoinColumn as JoinColumn12, ManyToOne as ManyToOne10 } from "typeorm";
|
|
3260
|
+
import { BeforeInsert as BeforeInsert20, BeforeUpdate as BeforeUpdate20, ChildEntity as ChildEntity6, Column as Column25, Index as Index6, JoinColumn as JoinColumn12, ManyToOne as ManyToOne10 } from "typeorm";
|
|
3144
3261
|
function _ts_decorate28(decorators, target, key, desc) {
|
|
3145
3262
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3146
3263
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -3162,6 +3279,48 @@ var IssuerLocaleBrandingEntity = class extends BaseLocaleBrandingEntity {
|
|
|
3162
3279
|
policyUri;
|
|
3163
3280
|
contacts;
|
|
3164
3281
|
issuerBrandingId;
|
|
3282
|
+
state;
|
|
3283
|
+
setState() {
|
|
3284
|
+
this.state = this.computeState();
|
|
3285
|
+
}
|
|
3286
|
+
computeState() {
|
|
3287
|
+
const payload = {
|
|
3288
|
+
alias: this.alias ?? null,
|
|
3289
|
+
locale: this.locale ?? null,
|
|
3290
|
+
description: this.description ?? null,
|
|
3291
|
+
clientUri: this.clientUri ?? null,
|
|
3292
|
+
tosUri: this.tosUri ?? null,
|
|
3293
|
+
policyUri: this.policyUri ?? null,
|
|
3294
|
+
contacts: this.contacts ?? null,
|
|
3295
|
+
logo: this.logo ? {
|
|
3296
|
+
uri: this.logo.uri ?? null,
|
|
3297
|
+
dataUri: this.logo.dataUri ?? null,
|
|
3298
|
+
mediaType: this.logo.mediaType ?? null,
|
|
3299
|
+
alt: this.logo.alt ?? null,
|
|
3300
|
+
dimensions: this.logo.dimensions ? {
|
|
3301
|
+
width: this.logo.dimensions.width,
|
|
3302
|
+
height: this.logo.dimensions.height
|
|
3303
|
+
} : null
|
|
3304
|
+
} : null,
|
|
3305
|
+
background: this.background ? {
|
|
3306
|
+
color: this.background.color ?? null,
|
|
3307
|
+
image: this.background.image ? {
|
|
3308
|
+
uri: this.background.image.uri ?? null,
|
|
3309
|
+
dataUri: this.background.image.dataUri ?? null,
|
|
3310
|
+
mediaType: this.background.image.mediaType ?? null,
|
|
3311
|
+
alt: this.background.image.alt ?? null,
|
|
3312
|
+
dimensions: this.background.image.dimensions ? {
|
|
3313
|
+
width: this.background.image.dimensions.width,
|
|
3314
|
+
height: this.background.image.dimensions.height
|
|
3315
|
+
} : null
|
|
3316
|
+
} : null
|
|
3317
|
+
} : null,
|
|
3318
|
+
text: this.text ? {
|
|
3319
|
+
color: this.text.color ?? null
|
|
3320
|
+
} : null
|
|
3321
|
+
};
|
|
3322
|
+
return computeCompactHash(JSON.stringify(payload));
|
|
3323
|
+
}
|
|
3165
3324
|
};
|
|
3166
3325
|
_ts_decorate28([
|
|
3167
3326
|
ManyToOne10(() => IssuerBrandingEntity, (issuerBranding) => issuerBranding.localeBranding, {
|
|
@@ -3220,6 +3379,21 @@ _ts_decorate28([
|
|
|
3220
3379
|
}),
|
|
3221
3380
|
_ts_metadata27("design:type", String)
|
|
3222
3381
|
], IssuerLocaleBrandingEntity.prototype, "issuerBrandingId", void 0);
|
|
3382
|
+
_ts_decorate28([
|
|
3383
|
+
Column25("varchar", {
|
|
3384
|
+
name: "state",
|
|
3385
|
+
length: 255,
|
|
3386
|
+
nullable: false
|
|
3387
|
+
}),
|
|
3388
|
+
_ts_metadata27("design:type", String)
|
|
3389
|
+
], IssuerLocaleBrandingEntity.prototype, "state", void 0);
|
|
3390
|
+
_ts_decorate28([
|
|
3391
|
+
BeforeInsert20(),
|
|
3392
|
+
BeforeUpdate20(),
|
|
3393
|
+
_ts_metadata27("design:type", Function),
|
|
3394
|
+
_ts_metadata27("design:paramtypes", []),
|
|
3395
|
+
_ts_metadata27("design:returntype", void 0)
|
|
3396
|
+
], IssuerLocaleBrandingEntity.prototype, "setState", null);
|
|
3223
3397
|
IssuerLocaleBrandingEntity = _ts_decorate28([
|
|
3224
3398
|
ChildEntity6("IssuerLocaleBranding"),
|
|
3225
3399
|
Index6("IDX_IssuerLocaleBrandingEntity_issuerBranding_locale", [
|
|
@@ -3308,15 +3482,15 @@ _ts_decorate29([
|
|
|
3308
3482
|
_ts_metadata28("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3309
3483
|
], IssuerBrandingEntity.prototype, "lastUpdatedAt", void 0);
|
|
3310
3484
|
_ts_decorate29([
|
|
3311
|
-
|
|
3312
|
-
|
|
3485
|
+
BeforeInsert21(),
|
|
3486
|
+
BeforeUpdate21(),
|
|
3313
3487
|
_ts_metadata28("design:type", Function),
|
|
3314
3488
|
_ts_metadata28("design:paramtypes", []),
|
|
3315
3489
|
_ts_metadata28("design:returntype", void 0)
|
|
3316
3490
|
], IssuerBrandingEntity.prototype, "updateUpdatedDate", null);
|
|
3317
3491
|
_ts_decorate29([
|
|
3318
|
-
|
|
3319
|
-
|
|
3492
|
+
BeforeInsert21(),
|
|
3493
|
+
BeforeUpdate21(),
|
|
3320
3494
|
_ts_metadata28("design:type", Function),
|
|
3321
3495
|
_ts_metadata28("design:paramtypes", []),
|
|
3322
3496
|
_ts_metadata28("design:returntype", Promise)
|
|
@@ -3567,7 +3741,7 @@ Oid4vcStateEntity = _ts_decorate31([
|
|
|
3567
3741
|
// src/entities/presentationDefinition/DcqlQueryItemEntity.ts
|
|
3568
3742
|
import { typeOrmDateTime as typeOrmDateTime17 } from "@sphereon/ssi-sdk.agent-config";
|
|
3569
3743
|
import { IsNotEmpty as IsNotEmpty12 } from "class-validator";
|
|
3570
|
-
import { BaseEntity as BaseEntity23, BeforeInsert as
|
|
3744
|
+
import { BaseEntity as BaseEntity23, BeforeInsert as BeforeInsert22, BeforeUpdate as BeforeUpdate22, Column as Column29, CreateDateColumn as CreateDateColumn15, Entity as Entity25, Index as Index8, PrimaryGeneratedColumn as PrimaryGeneratedColumn23, UpdateDateColumn as UpdateDateColumn15 } from "typeorm";
|
|
3571
3745
|
function _ts_decorate32(decorators, target, key, desc) {
|
|
3572
3746
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3573
3747
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -3686,8 +3860,8 @@ _ts_decorate32([
|
|
|
3686
3860
|
_ts_metadata31("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3687
3861
|
], DcqlQueryItemEntity.prototype, "lastUpdatedAt", void 0);
|
|
3688
3862
|
_ts_decorate32([
|
|
3689
|
-
|
|
3690
|
-
|
|
3863
|
+
BeforeInsert22(),
|
|
3864
|
+
BeforeUpdate22(),
|
|
3691
3865
|
_ts_metadata31("design:type", Function),
|
|
3692
3866
|
_ts_metadata31("design:paramtypes", []),
|
|
3693
3867
|
_ts_metadata31("design:returntype", void 0)
|
|
@@ -4654,10 +4828,19 @@ var ContactStore = class extends AbstractContactStore {
|
|
|
4654
4828
|
const result = await partyRepository.find({
|
|
4655
4829
|
where: {
|
|
4656
4830
|
id: In(initialResult.map((party) => party.id))
|
|
4657
|
-
}
|
|
4831
|
+
},
|
|
4832
|
+
relations: [
|
|
4833
|
+
"contact"
|
|
4834
|
+
]
|
|
4658
4835
|
});
|
|
4659
4836
|
debug(`getParties() resulted in ${result.length} parties`);
|
|
4660
|
-
return result.
|
|
4837
|
+
return result.filter((party) => {
|
|
4838
|
+
if (!party.contact) {
|
|
4839
|
+
console.warn(`party ${party.id} does not have an associated contact`);
|
|
4840
|
+
return false;
|
|
4841
|
+
}
|
|
4842
|
+
return true;
|
|
4843
|
+
}).map(partyFrom);
|
|
4661
4844
|
}, "getParties");
|
|
4662
4845
|
addParty = /* @__PURE__ */ __name(async (args) => {
|
|
4663
4846
|
const { identities, contact, partyType } = args;
|
|
@@ -5453,7 +5636,7 @@ import { In as In2, Not } from "typeorm";
|
|
|
5453
5636
|
var credentialBrandingFrom = /* @__PURE__ */ __name((credentialBranding) => {
|
|
5454
5637
|
const result = {
|
|
5455
5638
|
...credentialBranding,
|
|
5456
|
-
localeBranding: credentialBranding.localeBranding.map((localeBranding) =>
|
|
5639
|
+
localeBranding: credentialBranding.localeBranding.map((localeBranding) => credentialLocaleBrandingFromEntity(localeBranding))
|
|
5457
5640
|
};
|
|
5458
5641
|
return replaceNullWithUndefined(result);
|
|
5459
5642
|
}, "credentialBrandingFrom");
|
|
@@ -5471,6 +5654,19 @@ var localeBrandingFrom = /* @__PURE__ */ __name((localeBranding) => {
|
|
|
5471
5654
|
};
|
|
5472
5655
|
return replaceNullWithUndefined(result);
|
|
5473
5656
|
}, "localeBrandingFrom");
|
|
5657
|
+
var credentialLocaleBrandingFromEntity = /* @__PURE__ */ __name((localeBranding) => {
|
|
5658
|
+
const base = localeBrandingFrom(localeBranding);
|
|
5659
|
+
const result = {
|
|
5660
|
+
...base,
|
|
5661
|
+
state: localeBranding.state,
|
|
5662
|
+
claims: localeBranding.claims ? localeBranding.claims.map((claim) => ({
|
|
5663
|
+
id: claim.id,
|
|
5664
|
+
key: claim.key,
|
|
5665
|
+
name: claim.name
|
|
5666
|
+
})) : void 0
|
|
5667
|
+
};
|
|
5668
|
+
return replaceNullWithUndefined(result);
|
|
5669
|
+
}, "credentialLocaleBrandingFromEntity");
|
|
5474
5670
|
var issuerLocaleBrandingEntityFrom = /* @__PURE__ */ __name((args) => {
|
|
5475
5671
|
const issuerLocaleBrandingEntity = new IssuerLocaleBrandingEntity();
|
|
5476
5672
|
issuerLocaleBrandingEntity.alias = isEmptyString(args.alias) ? void 0 : args.alias;
|
|
@@ -5575,7 +5771,7 @@ var IssuanceBrandingStore = class extends AbstractIssuanceBrandingStore {
|
|
|
5575
5771
|
return credentialBrandingFrom(createdResult);
|
|
5576
5772
|
}, "addCredentialBranding");
|
|
5577
5773
|
getCredentialBranding = /* @__PURE__ */ __name(async (args) => {
|
|
5578
|
-
const { filter } = args ?? {};
|
|
5774
|
+
const { filter, knownStates } = args ?? {};
|
|
5579
5775
|
if (filter) {
|
|
5580
5776
|
filter.forEach((filter2) => {
|
|
5581
5777
|
if (filter2.localeBranding && "locale" in filter2.localeBranding && filter2.localeBranding.locale === void 0) {
|
|
@@ -5584,12 +5780,39 @@ var IssuanceBrandingStore = class extends AbstractIssuanceBrandingStore {
|
|
|
5584
5780
|
});
|
|
5585
5781
|
}
|
|
5586
5782
|
debug3("Getting credential branding", args);
|
|
5587
|
-
const
|
|
5783
|
+
const repository = (await this.dbConnection).getRepository(CredentialBrandingEntity);
|
|
5784
|
+
if (knownStates && Object.keys(knownStates).length > 0) {
|
|
5785
|
+
const stateQuery = repository.createQueryBuilder("branding").select([
|
|
5786
|
+
"branding.id",
|
|
5787
|
+
"branding.state"
|
|
5788
|
+
]);
|
|
5789
|
+
if (filter) {
|
|
5790
|
+
stateQuery.where(filter);
|
|
5791
|
+
}
|
|
5792
|
+
const stateResults = await stateQuery.getRawMany().then((rows) => rows.map((row) => ({
|
|
5793
|
+
id: row.branding_id,
|
|
5794
|
+
state: row.branding_state
|
|
5795
|
+
})));
|
|
5796
|
+
const dirtyIds = stateResults.filter((result3) => {
|
|
5797
|
+
const knownState = knownStates[result3.id];
|
|
5798
|
+
return !knownState || knownState !== result3.state;
|
|
5799
|
+
}).map((result3) => result3.id);
|
|
5800
|
+
if (dirtyIds.length === 0) {
|
|
5801
|
+
return [];
|
|
5802
|
+
}
|
|
5803
|
+
const result2 = await repository.find({
|
|
5804
|
+
where: {
|
|
5805
|
+
id: In2(dirtyIds)
|
|
5806
|
+
}
|
|
5807
|
+
});
|
|
5808
|
+
return result2.map((branding) => credentialBrandingFrom(branding));
|
|
5809
|
+
}
|
|
5810
|
+
const result = await repository.find({
|
|
5588
5811
|
...filter && {
|
|
5589
5812
|
where: filter
|
|
5590
5813
|
}
|
|
5591
5814
|
});
|
|
5592
|
-
return result.map((
|
|
5815
|
+
return result.map((branding) => credentialBrandingFrom(branding));
|
|
5593
5816
|
}, "getCredentialBranding");
|
|
5594
5817
|
removeCredentialBranding = /* @__PURE__ */ __name(async (args) => {
|
|
5595
5818
|
const { filter } = args;
|
|
@@ -5682,7 +5905,7 @@ var IssuanceBrandingStore = class extends AbstractIssuanceBrandingStore {
|
|
|
5682
5905
|
where: filter
|
|
5683
5906
|
}
|
|
5684
5907
|
});
|
|
5685
|
-
return credentialBrandingLocale ? credentialBrandingLocale.map((credentialLocaleBranding) =>
|
|
5908
|
+
return credentialBrandingLocale ? credentialBrandingLocale.map((credentialLocaleBranding) => credentialLocaleBrandingFromEntity(credentialLocaleBranding)) : [];
|
|
5686
5909
|
}, "getCredentialLocaleBranding");
|
|
5687
5910
|
removeCredentialLocaleBranding = /* @__PURE__ */ __name(async (args) => {
|
|
5688
5911
|
const { filter } = args;
|
|
@@ -7942,21 +8165,113 @@ var AddLinkedVpFields1763387280000 = class {
|
|
|
7942
8165
|
}
|
|
7943
8166
|
};
|
|
7944
8167
|
|
|
7945
|
-
// src/migrations/generic/
|
|
8168
|
+
// src/migrations/generic/15-AddBrandingState.ts
|
|
7946
8169
|
import Debug14 from "debug";
|
|
8170
|
+
|
|
8171
|
+
// src/migrations/postgres/1766000000000-AddBrandingState.ts
|
|
8172
|
+
var AddBrandingStatePostgres1766000000000 = class {
|
|
8173
|
+
static {
|
|
8174
|
+
__name(this, "AddBrandingStatePostgres1766000000000");
|
|
8175
|
+
}
|
|
8176
|
+
name = "AddBrandingState1766000000000";
|
|
8177
|
+
async up(queryRunner) {
|
|
8178
|
+
await queryRunner.query(`ALTER TABLE "CredentialBranding" ADD "state" character varying(255) NOT NULL DEFAULT ''`);
|
|
8179
|
+
await queryRunner.query(`ALTER TABLE "BaseLocaleBranding" ADD "state" character varying(255) NOT NULL DEFAULT ''`);
|
|
8180
|
+
}
|
|
8181
|
+
async down(queryRunner) {
|
|
8182
|
+
await queryRunner.query(`ALTER TABLE "BaseLocaleBranding" DROP COLUMN "state"`);
|
|
8183
|
+
await queryRunner.query(`ALTER TABLE "CredentialBranding" DROP COLUMN "state"`);
|
|
8184
|
+
}
|
|
8185
|
+
};
|
|
8186
|
+
|
|
8187
|
+
// src/migrations/sqlite/1766000000000-AddBrandingState.ts
|
|
8188
|
+
var AddBrandingStateSqlite1766000000000 = class {
|
|
8189
|
+
static {
|
|
8190
|
+
__name(this, "AddBrandingStateSqlite1766000000000");
|
|
8191
|
+
}
|
|
8192
|
+
name = "AddBrandingState1766000000000";
|
|
8193
|
+
async up(queryRunner) {
|
|
8194
|
+
await queryRunner.query(`ALTER TABLE "CredentialBranding" ADD COLUMN "state" varchar(255) NOT NULL DEFAULT ''`);
|
|
8195
|
+
await queryRunner.query(`ALTER TABLE "BaseLocaleBranding" ADD COLUMN "state" varchar(255) NOT NULL DEFAULT ''`);
|
|
8196
|
+
}
|
|
8197
|
+
async down(queryRunner) {
|
|
8198
|
+
await queryRunner.query(`PRAGMA foreign_keys = OFF`);
|
|
8199
|
+
await queryRunner.query(`
|
|
8200
|
+
CREATE TABLE "CredentialBranding_old"
|
|
8201
|
+
(
|
|
8202
|
+
"id" varchar PRIMARY KEY NOT NULL,
|
|
8203
|
+
"vcHash" varchar(255) NOT NULL,
|
|
8204
|
+
"issuerCorrelationId" varchar(255) NOT NULL,
|
|
8205
|
+
"created_at" datetime NOT NULL DEFAULT (datetime('now')),
|
|
8206
|
+
"last_updated_at" datetime NOT NULL DEFAULT (datetime('now'))
|
|
8207
|
+
)
|
|
8208
|
+
`);
|
|
8209
|
+
await queryRunner.query(`
|
|
8210
|
+
INSERT INTO "CredentialBranding_old" ("id", "vcHash", "issuerCorrelationId", "created_at", "last_updated_at")
|
|
8211
|
+
SELECT "id", "vcHash", "issuerCorrelationId", "created_at", "last_updated_at"
|
|
8212
|
+
FROM "CredentialBranding"
|
|
8213
|
+
`);
|
|
8214
|
+
await queryRunner.query(`DROP TABLE "CredentialBranding"`);
|
|
8215
|
+
await queryRunner.query(`ALTER TABLE "CredentialBranding_old" RENAME TO "CredentialBranding"`);
|
|
8216
|
+
await queryRunner.query(`CREATE INDEX "IDX_CredentialBrandingEntity_issuerCorrelationId" ON "CredentialBranding" ("issuerCorrelationId")`);
|
|
8217
|
+
await queryRunner.query(`CREATE INDEX "IDX_CredentialBrandingEntity_vcHash" ON "CredentialBranding" ("vcHash")`);
|
|
8218
|
+
await queryRunner.query(`
|
|
8219
|
+
CREATE TABLE "BaseLocaleBranding_old"
|
|
8220
|
+
(
|
|
8221
|
+
"id" varchar PRIMARY KEY NOT NULL,
|
|
8222
|
+
"alias" varchar(255),
|
|
8223
|
+
"locale" varchar(255) NOT NULL,
|
|
8224
|
+
"description" varchar(255),
|
|
8225
|
+
"created_at" datetime NOT NULL DEFAULT (datetime('now')),
|
|
8226
|
+
"last_updated_at" datetime NOT NULL DEFAULT (datetime('now')),
|
|
8227
|
+
"credentialBrandingId" varchar,
|
|
8228
|
+
"issuerBrandingId" varchar,
|
|
8229
|
+
"type" varchar NOT NULL,
|
|
8230
|
+
"logoId" varchar,
|
|
8231
|
+
"backgroundId" varchar,
|
|
8232
|
+
"textId" varchar,
|
|
8233
|
+
"client_uri" varchar,
|
|
8234
|
+
"tos_uri" varchar,
|
|
8235
|
+
"policy_uri" varchar,
|
|
8236
|
+
"contacts" varchar,
|
|
8237
|
+
CONSTRAINT "UQ_logoId" UNIQUE ("logoId"),
|
|
8238
|
+
CONSTRAINT "UQ_backgroundId" UNIQUE ("backgroundId"),
|
|
8239
|
+
CONSTRAINT "UQ_textId" UNIQUE ("textId"),
|
|
8240
|
+
CONSTRAINT "FK_BaseLocaleBranding_logoId" FOREIGN KEY ("logoId") REFERENCES "ImageAttributes" ("id") ON DELETE CASCADE ON UPDATE NO ACTION,
|
|
8241
|
+
CONSTRAINT "FK_BaseLocaleBranding_backgroundId" FOREIGN KEY ("backgroundId") REFERENCES "BackgroundAttributes" ("id") ON DELETE CASCADE ON UPDATE NO ACTION,
|
|
8242
|
+
CONSTRAINT "FK_BaseLocaleBranding_textId" FOREIGN KEY ("textId") REFERENCES "TextAttributes" ("id") ON DELETE CASCADE ON UPDATE NO ACTION,
|
|
8243
|
+
CONSTRAINT "FK_BaseLocaleBranding_credentialBrandingId" FOREIGN KEY ("credentialBrandingId") REFERENCES "CredentialBranding" ("id") ON DELETE CASCADE ON UPDATE NO ACTION,
|
|
8244
|
+
CONSTRAINT "FK_BaseLocaleBranding_issuerBrandingId" FOREIGN KEY ("issuerBrandingId") REFERENCES "IssuerBranding" ("id") ON DELETE CASCADE ON UPDATE NO ACTION
|
|
8245
|
+
)
|
|
8246
|
+
`);
|
|
8247
|
+
await queryRunner.query(`
|
|
8248
|
+
INSERT INTO "BaseLocaleBranding_old" ("id", "alias", "locale", "description", "created_at", "last_updated_at", "credentialBrandingId", "issuerBrandingId", "type", "logoId", "backgroundId", "textId", "client_uri", "tos_uri", "policy_uri", "contacts")
|
|
8249
|
+
SELECT "id", "alias", "locale", "description", "created_at", "last_updated_at", "credentialBrandingId", "issuerBrandingId", "type", "logoId", "backgroundId", "textId", "client_uri", "tos_uri", "policy_uri", "contacts"
|
|
8250
|
+
FROM "BaseLocaleBranding"
|
|
8251
|
+
`);
|
|
8252
|
+
await queryRunner.query(`DROP TABLE "BaseLocaleBranding"`);
|
|
8253
|
+
await queryRunner.query(`ALTER TABLE "BaseLocaleBranding_old" RENAME TO "BaseLocaleBranding"`);
|
|
8254
|
+
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_CredentialLocaleBrandingEntity_credentialBranding_locale" ON "BaseLocaleBranding" ("credentialBrandingId", "locale")`);
|
|
8255
|
+
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_IssuerLocaleBrandingEntity_issuerBranding_locale" ON "BaseLocaleBranding" ("issuerBrandingId", "locale")`);
|
|
8256
|
+
await queryRunner.query(`CREATE INDEX "IDX_BaseLocaleBranding_type" ON "BaseLocaleBranding" ("type")`);
|
|
8257
|
+
await queryRunner.query(`PRAGMA foreign_keys = ON`);
|
|
8258
|
+
}
|
|
8259
|
+
};
|
|
8260
|
+
|
|
8261
|
+
// src/migrations/generic/15-AddBrandingState.ts
|
|
7947
8262
|
var debug14 = Debug14("sphereon:ssi-sdk:migrations");
|
|
7948
|
-
var
|
|
8263
|
+
var AddBrandingState1766000000000 = class {
|
|
7949
8264
|
static {
|
|
7950
|
-
__name(this, "
|
|
8265
|
+
__name(this, "AddBrandingState1766000000000");
|
|
7951
8266
|
}
|
|
7952
|
-
name = "
|
|
8267
|
+
name = "AddBrandingState1766000000000";
|
|
7953
8268
|
async up(queryRunner) {
|
|
7954
|
-
debug14("migration:
|
|
8269
|
+
debug14("migration: adding branding state checksum columns");
|
|
7955
8270
|
const dbType = queryRunner.connection.driver.options.type;
|
|
7956
8271
|
switch (dbType) {
|
|
7957
8272
|
case "postgres": {
|
|
7958
8273
|
debug14("using postgres migration file");
|
|
7959
|
-
const mig = new
|
|
8274
|
+
const mig = new AddBrandingStatePostgres1766000000000();
|
|
7960
8275
|
await mig.up(queryRunner);
|
|
7961
8276
|
debug14("Migration statements executed");
|
|
7962
8277
|
return;
|
|
@@ -7965,7 +8280,7 @@ var CreateIssuanceBranding1659463079429 = class {
|
|
|
7965
8280
|
case "expo":
|
|
7966
8281
|
case "react-native": {
|
|
7967
8282
|
debug14("using sqlite/react-native migration file");
|
|
7968
|
-
const mig = new
|
|
8283
|
+
const mig = new AddBrandingStateSqlite1766000000000();
|
|
7969
8284
|
await mig.up(queryRunner);
|
|
7970
8285
|
debug14("Migration statements executed");
|
|
7971
8286
|
return;
|
|
@@ -7975,12 +8290,12 @@ var CreateIssuanceBranding1659463079429 = class {
|
|
|
7975
8290
|
}
|
|
7976
8291
|
}
|
|
7977
8292
|
async down(queryRunner) {
|
|
7978
|
-
debug14("migration:
|
|
8293
|
+
debug14("migration: removing branding state checksum columns");
|
|
7979
8294
|
const dbType = queryRunner.connection.driver.options.type;
|
|
7980
8295
|
switch (dbType) {
|
|
7981
8296
|
case "postgres": {
|
|
7982
8297
|
debug14("using postgres migration file");
|
|
7983
|
-
const mig = new
|
|
8298
|
+
const mig = new AddBrandingStatePostgres1766000000000();
|
|
7984
8299
|
await mig.down(queryRunner);
|
|
7985
8300
|
debug14("Migration statements executed");
|
|
7986
8301
|
return;
|
|
@@ -7989,7 +8304,7 @@ var CreateIssuanceBranding1659463079429 = class {
|
|
|
7989
8304
|
case "expo":
|
|
7990
8305
|
case "react-native": {
|
|
7991
8306
|
debug14("using sqlite/react-native migration file");
|
|
7992
|
-
const mig = new
|
|
8307
|
+
const mig = new AddBrandingStateSqlite1766000000000();
|
|
7993
8308
|
await mig.down(queryRunner);
|
|
7994
8309
|
debug14("Migration statements executed");
|
|
7995
8310
|
return;
|
|
@@ -8000,8 +8315,66 @@ var CreateIssuanceBranding1659463079429 = class {
|
|
|
8000
8315
|
}
|
|
8001
8316
|
};
|
|
8002
8317
|
|
|
8003
|
-
// src/migrations/generic/
|
|
8318
|
+
// src/migrations/generic/2-CreateIssuanceBranding.ts
|
|
8004
8319
|
import Debug15 from "debug";
|
|
8320
|
+
var debug15 = Debug15("sphereon:ssi-sdk:migrations");
|
|
8321
|
+
var CreateIssuanceBranding1659463079429 = class {
|
|
8322
|
+
static {
|
|
8323
|
+
__name(this, "CreateIssuanceBranding1659463079429");
|
|
8324
|
+
}
|
|
8325
|
+
name = "CreateIssuanceBranding1659463079429";
|
|
8326
|
+
async up(queryRunner) {
|
|
8327
|
+
debug15("migration: creating issuance branding tables");
|
|
8328
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
8329
|
+
switch (dbType) {
|
|
8330
|
+
case "postgres": {
|
|
8331
|
+
debug15("using postgres migration file");
|
|
8332
|
+
const mig = new CreateIssuanceBranding1685628974232();
|
|
8333
|
+
await mig.up(queryRunner);
|
|
8334
|
+
debug15("Migration statements executed");
|
|
8335
|
+
return;
|
|
8336
|
+
}
|
|
8337
|
+
case "sqlite":
|
|
8338
|
+
case "expo":
|
|
8339
|
+
case "react-native": {
|
|
8340
|
+
debug15("using sqlite/react-native migration file");
|
|
8341
|
+
const mig = new CreateIssuanceBranding1685628973231();
|
|
8342
|
+
await mig.up(queryRunner);
|
|
8343
|
+
debug15("Migration statements executed");
|
|
8344
|
+
return;
|
|
8345
|
+
}
|
|
8346
|
+
default:
|
|
8347
|
+
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`);
|
|
8348
|
+
}
|
|
8349
|
+
}
|
|
8350
|
+
async down(queryRunner) {
|
|
8351
|
+
debug15("migration: reverting issuance branding tables");
|
|
8352
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
8353
|
+
switch (dbType) {
|
|
8354
|
+
case "postgres": {
|
|
8355
|
+
debug15("using postgres migration file");
|
|
8356
|
+
const mig = new CreateIssuanceBranding1685628974232();
|
|
8357
|
+
await mig.down(queryRunner);
|
|
8358
|
+
debug15("Migration statements executed");
|
|
8359
|
+
return;
|
|
8360
|
+
}
|
|
8361
|
+
case "sqlite":
|
|
8362
|
+
case "expo":
|
|
8363
|
+
case "react-native": {
|
|
8364
|
+
debug15("using sqlite/react-native migration file");
|
|
8365
|
+
const mig = new CreateIssuanceBranding1685628973231();
|
|
8366
|
+
await mig.down(queryRunner);
|
|
8367
|
+
debug15("Migration statements executed");
|
|
8368
|
+
return;
|
|
8369
|
+
}
|
|
8370
|
+
default:
|
|
8371
|
+
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`);
|
|
8372
|
+
}
|
|
8373
|
+
}
|
|
8374
|
+
};
|
|
8375
|
+
|
|
8376
|
+
// src/migrations/generic/3-CreateContacts.ts
|
|
8377
|
+
import Debug16 from "debug";
|
|
8005
8378
|
|
|
8006
8379
|
// src/migrations/postgres/1690925872592-CreateContacts.ts
|
|
8007
8380
|
import { enablePostgresUuidExtension as enablePostgresUuidExtension3 } from "@sphereon/ssi-sdk.core";
|
|
@@ -8222,30 +8595,30 @@ var CreateContacts1690925872693 = class {
|
|
|
8222
8595
|
};
|
|
8223
8596
|
|
|
8224
8597
|
// src/migrations/generic/3-CreateContacts.ts
|
|
8225
|
-
var
|
|
8598
|
+
var debug16 = Debug16("sphereon:ssi-sdk:migrations");
|
|
8226
8599
|
var CreateContacts1690925872318 = class {
|
|
8227
8600
|
static {
|
|
8228
8601
|
__name(this, "CreateContacts1690925872318");
|
|
8229
8602
|
}
|
|
8230
8603
|
name = "CreateContacts1690925872318";
|
|
8231
8604
|
async up(queryRunner) {
|
|
8232
|
-
|
|
8605
|
+
debug16("migration: creating contacts tables");
|
|
8233
8606
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8234
8607
|
switch (dbType) {
|
|
8235
8608
|
case "postgres": {
|
|
8236
|
-
|
|
8609
|
+
debug16("using postgres migration file");
|
|
8237
8610
|
const mig = new CreateContacts1690925872592();
|
|
8238
8611
|
await mig.up(queryRunner);
|
|
8239
|
-
|
|
8612
|
+
debug16("Migration statements executed");
|
|
8240
8613
|
return;
|
|
8241
8614
|
}
|
|
8242
8615
|
case "sqlite":
|
|
8243
8616
|
case "expo":
|
|
8244
8617
|
case "react-native": {
|
|
8245
|
-
|
|
8618
|
+
debug16("using sqlite/react-native migration file");
|
|
8246
8619
|
const mig = new CreateContacts1690925872693();
|
|
8247
8620
|
await mig.up(queryRunner);
|
|
8248
|
-
|
|
8621
|
+
debug16("Migration statements executed");
|
|
8249
8622
|
return;
|
|
8250
8623
|
}
|
|
8251
8624
|
default:
|
|
@@ -8253,23 +8626,23 @@ var CreateContacts1690925872318 = class {
|
|
|
8253
8626
|
}
|
|
8254
8627
|
}
|
|
8255
8628
|
async down(queryRunner) {
|
|
8256
|
-
|
|
8629
|
+
debug16("migration: reverting contacts tables");
|
|
8257
8630
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8258
8631
|
switch (dbType) {
|
|
8259
8632
|
case "postgres": {
|
|
8260
|
-
|
|
8633
|
+
debug16("using postgres migration file");
|
|
8261
8634
|
const mig = new CreateContacts1690925872592();
|
|
8262
8635
|
await mig.down(queryRunner);
|
|
8263
|
-
|
|
8636
|
+
debug16("Migration statements executed");
|
|
8264
8637
|
return;
|
|
8265
8638
|
}
|
|
8266
8639
|
case "sqlite":
|
|
8267
8640
|
case "expo":
|
|
8268
8641
|
case "react-native": {
|
|
8269
|
-
|
|
8642
|
+
debug16("using sqlite/react-native migration file");
|
|
8270
8643
|
const mig = new CreateContacts1690925872693();
|
|
8271
8644
|
await mig.down(queryRunner);
|
|
8272
|
-
|
|
8645
|
+
debug16("Migration statements executed");
|
|
8273
8646
|
return;
|
|
8274
8647
|
}
|
|
8275
8648
|
default:
|
|
@@ -8279,7 +8652,7 @@ var CreateContacts1690925872318 = class {
|
|
|
8279
8652
|
};
|
|
8280
8653
|
|
|
8281
8654
|
// src/migrations/generic/4-CreateStatusList.ts
|
|
8282
|
-
import
|
|
8655
|
+
import Debug17 from "debug";
|
|
8283
8656
|
|
|
8284
8657
|
// src/migrations/postgres/1693866470001-CreateStatusList.ts
|
|
8285
8658
|
var CreateStatusList1693866470001 = class {
|
|
@@ -8485,53 +8858,53 @@ var UpdateStatusList1737110469000 = class {
|
|
|
8485
8858
|
};
|
|
8486
8859
|
|
|
8487
8860
|
// src/migrations/generic/4-CreateStatusList.ts
|
|
8488
|
-
var
|
|
8861
|
+
var debug17 = Debug17("sphereon:ssi-sdk:migrations");
|
|
8489
8862
|
var CreateStatusList1693866470000 = class {
|
|
8490
8863
|
static {
|
|
8491
8864
|
__name(this, "CreateStatusList1693866470000");
|
|
8492
8865
|
}
|
|
8493
8866
|
name = "CreateStatusList1693866470000";
|
|
8494
8867
|
async up(queryRunner) {
|
|
8495
|
-
|
|
8868
|
+
debug17("migration: creating issuance branding tables");
|
|
8496
8869
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8497
8870
|
if (dbType === "postgres") {
|
|
8498
|
-
|
|
8871
|
+
debug17("using postgres migration files");
|
|
8499
8872
|
const createMig = new CreateStatusList1693866470001();
|
|
8500
8873
|
await createMig.up(queryRunner);
|
|
8501
8874
|
const updateMig = new UpdateStatusList1737110469001();
|
|
8502
8875
|
const up = await updateMig.up(queryRunner);
|
|
8503
|
-
|
|
8876
|
+
debug17("Migration statements executed");
|
|
8504
8877
|
return up;
|
|
8505
8878
|
} else if (dbType === "sqlite" || dbType === "react-native" || dbType === "expo") {
|
|
8506
|
-
|
|
8879
|
+
debug17("using sqlite/react-native migration files");
|
|
8507
8880
|
const createMig = new CreateStatusList1693866470002();
|
|
8508
8881
|
await createMig.up(queryRunner);
|
|
8509
8882
|
const updateMig = new UpdateStatusList1737110469000();
|
|
8510
8883
|
const up = await updateMig.up(queryRunner);
|
|
8511
|
-
|
|
8884
|
+
debug17("Migration statements executed");
|
|
8512
8885
|
return up;
|
|
8513
8886
|
} else {
|
|
8514
8887
|
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`);
|
|
8515
8888
|
}
|
|
8516
8889
|
}
|
|
8517
8890
|
async down(queryRunner) {
|
|
8518
|
-
|
|
8891
|
+
debug17("migration: reverting issuance branding tables");
|
|
8519
8892
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8520
8893
|
if (dbType === "postgres") {
|
|
8521
|
-
|
|
8894
|
+
debug17("using postgres migration files");
|
|
8522
8895
|
const updateMig = new UpdateStatusList1737110469001();
|
|
8523
8896
|
await updateMig.down(queryRunner);
|
|
8524
8897
|
const createMig = new CreateStatusList1693866470001();
|
|
8525
8898
|
const down = await createMig.down(queryRunner);
|
|
8526
|
-
|
|
8899
|
+
debug17("Migration statements executed");
|
|
8527
8900
|
return down;
|
|
8528
8901
|
} else if (dbType === "sqlite" || dbType === "react-native" || dbType === "expo") {
|
|
8529
|
-
|
|
8902
|
+
debug17("using sqlite/react-native migration files");
|
|
8530
8903
|
const updateMig = new UpdateStatusList1737110469000();
|
|
8531
8904
|
await updateMig.down(queryRunner);
|
|
8532
8905
|
const createMig = new CreateStatusList1693866470002();
|
|
8533
8906
|
const down = await createMig.down(queryRunner);
|
|
8534
|
-
|
|
8907
|
+
debug17("Migration statements executed");
|
|
8535
8908
|
return down;
|
|
8536
8909
|
} else {
|
|
8537
8910
|
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`);
|
|
@@ -8540,7 +8913,7 @@ var CreateStatusList1693866470000 = class {
|
|
|
8540
8913
|
};
|
|
8541
8914
|
|
|
8542
8915
|
// src/migrations/generic/5-CreateAuditEvents.ts
|
|
8543
|
-
import
|
|
8916
|
+
import Debug18 from "debug";
|
|
8544
8917
|
|
|
8545
8918
|
// src/migrations/postgres/1701634812183-CreateAuditEvents.ts
|
|
8546
8919
|
var CreateAuditEvents1701634812183 = class {
|
|
@@ -8639,30 +9012,30 @@ var CreateAuditEvents1701634819487 = class {
|
|
|
8639
9012
|
};
|
|
8640
9013
|
|
|
8641
9014
|
// src/migrations/generic/5-CreateAuditEvents.ts
|
|
8642
|
-
var
|
|
9015
|
+
var debug18 = Debug18("sphereon:ssi-sdk:migrations");
|
|
8643
9016
|
var CreateAuditEvents1701635835330 = class {
|
|
8644
9017
|
static {
|
|
8645
9018
|
__name(this, "CreateAuditEvents1701635835330");
|
|
8646
9019
|
}
|
|
8647
9020
|
name = "CreateAuditEvents1701635835330";
|
|
8648
9021
|
async up(queryRunner) {
|
|
8649
|
-
|
|
9022
|
+
debug18("migration: creating audit events tables");
|
|
8650
9023
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8651
9024
|
switch (dbType) {
|
|
8652
9025
|
case "postgres": {
|
|
8653
|
-
|
|
9026
|
+
debug18("using postgres migration file");
|
|
8654
9027
|
const mig = new CreateAuditEvents1701634812183();
|
|
8655
9028
|
await mig.up(queryRunner);
|
|
8656
|
-
|
|
9029
|
+
debug18("Migration statements executed");
|
|
8657
9030
|
return;
|
|
8658
9031
|
}
|
|
8659
9032
|
case "sqlite":
|
|
8660
9033
|
case "expo":
|
|
8661
9034
|
case "react-native": {
|
|
8662
|
-
|
|
9035
|
+
debug18("using sqlite/react-native migration file");
|
|
8663
9036
|
const mig = new CreateAuditEvents1701634819487();
|
|
8664
9037
|
await mig.up(queryRunner);
|
|
8665
|
-
|
|
9038
|
+
debug18("Migration statements executed");
|
|
8666
9039
|
return;
|
|
8667
9040
|
}
|
|
8668
9041
|
default:
|
|
@@ -8670,23 +9043,23 @@ var CreateAuditEvents1701635835330 = class {
|
|
|
8670
9043
|
}
|
|
8671
9044
|
}
|
|
8672
9045
|
async down(queryRunner) {
|
|
8673
|
-
|
|
9046
|
+
debug18("migration: reverting audit events tables");
|
|
8674
9047
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8675
9048
|
switch (dbType) {
|
|
8676
9049
|
case "postgres": {
|
|
8677
|
-
|
|
9050
|
+
debug18("using postgres migration file");
|
|
8678
9051
|
const mig = new CreateAuditEvents1701634812183();
|
|
8679
9052
|
await mig.down(queryRunner);
|
|
8680
|
-
|
|
9053
|
+
debug18("Migration statements executed");
|
|
8681
9054
|
return;
|
|
8682
9055
|
}
|
|
8683
9056
|
case "sqlite":
|
|
8684
9057
|
case "expo":
|
|
8685
9058
|
case "react-native": {
|
|
8686
|
-
|
|
9059
|
+
debug18("using sqlite/react-native migration file");
|
|
8687
9060
|
const mig = new CreateAuditEvents1701634819487();
|
|
8688
9061
|
await mig.down(queryRunner);
|
|
8689
|
-
|
|
9062
|
+
debug18("Migration statements executed");
|
|
8690
9063
|
return;
|
|
8691
9064
|
}
|
|
8692
9065
|
default:
|
|
@@ -8696,7 +9069,7 @@ var CreateAuditEvents1701635835330 = class {
|
|
|
8696
9069
|
};
|
|
8697
9070
|
|
|
8698
9071
|
// src/migrations/generic/6-CreateDigitalCredential.ts
|
|
8699
|
-
import
|
|
9072
|
+
import Debug19 from "debug";
|
|
8700
9073
|
|
|
8701
9074
|
// src/migrations/postgres/1708525189001-CreateDigitalCredential.ts
|
|
8702
9075
|
var CreateDigitalCredential1708525189001 = class {
|
|
@@ -8804,30 +9177,30 @@ var CreateDigitalCredential1708525189002 = class {
|
|
|
8804
9177
|
};
|
|
8805
9178
|
|
|
8806
9179
|
// src/migrations/generic/6-CreateDigitalCredential.ts
|
|
8807
|
-
var
|
|
9180
|
+
var debug19 = Debug19("sphereon:ssi-sdk:migrations");
|
|
8808
9181
|
var CreateDigitalCredential1708525189000 = class {
|
|
8809
9182
|
static {
|
|
8810
9183
|
__name(this, "CreateDigitalCredential1708525189000");
|
|
8811
9184
|
}
|
|
8812
9185
|
name = "CreateDigitalCredential1708525189000";
|
|
8813
9186
|
async up(queryRunner) {
|
|
8814
|
-
|
|
9187
|
+
debug19("migration: creating DigitalCredential tables");
|
|
8815
9188
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8816
9189
|
switch (dbType) {
|
|
8817
9190
|
case "postgres": {
|
|
8818
|
-
|
|
9191
|
+
debug19("using postgres migration file for DigitalCredential");
|
|
8819
9192
|
const mig = new CreateDigitalCredential1708525189001();
|
|
8820
9193
|
await mig.up(queryRunner);
|
|
8821
|
-
|
|
9194
|
+
debug19("Postgres Migration statements for DigitalCredential executed");
|
|
8822
9195
|
return;
|
|
8823
9196
|
}
|
|
8824
9197
|
case "sqlite":
|
|
8825
9198
|
case "expo":
|
|
8826
9199
|
case "react-native": {
|
|
8827
|
-
|
|
9200
|
+
debug19("using sqlite/react-native migration file for DigitalCredential");
|
|
8828
9201
|
const mig = new CreateDigitalCredential1708525189002();
|
|
8829
9202
|
await mig.up(queryRunner);
|
|
8830
|
-
|
|
9203
|
+
debug19("SQLite Migration statements for DigitalCredential executed");
|
|
8831
9204
|
return;
|
|
8832
9205
|
}
|
|
8833
9206
|
default:
|
|
@@ -8835,23 +9208,23 @@ var CreateDigitalCredential1708525189000 = class {
|
|
|
8835
9208
|
}
|
|
8836
9209
|
}
|
|
8837
9210
|
async down(queryRunner) {
|
|
8838
|
-
|
|
9211
|
+
debug19("migration: reverting DigitalCredential tables");
|
|
8839
9212
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8840
9213
|
switch (dbType) {
|
|
8841
9214
|
case "postgres": {
|
|
8842
|
-
|
|
9215
|
+
debug19("using postgres migration file for DigitalCredential");
|
|
8843
9216
|
const mig = new CreateDigitalCredential1708525189001();
|
|
8844
9217
|
await mig.down(queryRunner);
|
|
8845
|
-
|
|
9218
|
+
debug19("Postgres Migration statements for DigitalCredential reverted");
|
|
8846
9219
|
return;
|
|
8847
9220
|
}
|
|
8848
9221
|
case "sqlite":
|
|
8849
9222
|
case "expo":
|
|
8850
9223
|
case "react-native": {
|
|
8851
|
-
|
|
9224
|
+
debug19("using sqlite/react-native migration file for DigitalCredential");
|
|
8852
9225
|
const mig = new CreateDigitalCredential1708525189002();
|
|
8853
9226
|
await mig.down(queryRunner);
|
|
8854
|
-
|
|
9227
|
+
debug19("SQLite Migration statements for DigitalCredential reverted");
|
|
8855
9228
|
return;
|
|
8856
9229
|
}
|
|
8857
9230
|
default:
|
|
@@ -8861,7 +9234,7 @@ var CreateDigitalCredential1708525189000 = class {
|
|
|
8861
9234
|
};
|
|
8862
9235
|
|
|
8863
9236
|
// src/migrations/generic/7-CreateMachineStateStore.ts
|
|
8864
|
-
import
|
|
9237
|
+
import Debug20 from "debug";
|
|
8865
9238
|
|
|
8866
9239
|
// src/migrations/postgres/1708797018115-CreateMachineStateStore.ts
|
|
8867
9240
|
var CreateMachineStateStore1708797018115 = class {
|
|
@@ -8923,30 +9296,30 @@ var CreateMachineStateStore1708796002272 = class {
|
|
|
8923
9296
|
};
|
|
8924
9297
|
|
|
8925
9298
|
// src/migrations/generic/7-CreateMachineStateStore.ts
|
|
8926
|
-
var
|
|
9299
|
+
var debug20 = Debug20("sphereon:ssi-sdk:migrations");
|
|
8927
9300
|
var CreateMachineStateStore1708098041262 = class {
|
|
8928
9301
|
static {
|
|
8929
9302
|
__name(this, "CreateMachineStateStore1708098041262");
|
|
8930
9303
|
}
|
|
8931
9304
|
name = "CreateMachineStateStore1708098041262";
|
|
8932
9305
|
async up(queryRunner) {
|
|
8933
|
-
|
|
9306
|
+
debug20("migration: creating machine state tables");
|
|
8934
9307
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8935
9308
|
switch (dbType) {
|
|
8936
9309
|
case "postgres": {
|
|
8937
|
-
|
|
9310
|
+
debug20("using postgres migration file");
|
|
8938
9311
|
const mig = new CreateMachineStateStore1708797018115();
|
|
8939
9312
|
await mig.up(queryRunner);
|
|
8940
|
-
|
|
9313
|
+
debug20("Migration statements executed");
|
|
8941
9314
|
return;
|
|
8942
9315
|
}
|
|
8943
9316
|
case "sqlite":
|
|
8944
9317
|
case "expo":
|
|
8945
9318
|
case "react-native": {
|
|
8946
|
-
|
|
9319
|
+
debug20("using sqlite/react-native migration file");
|
|
8947
9320
|
const mig = new CreateMachineStateStore1708796002272();
|
|
8948
9321
|
await mig.up(queryRunner);
|
|
8949
|
-
|
|
9322
|
+
debug20("Migration statements executed");
|
|
8950
9323
|
return;
|
|
8951
9324
|
}
|
|
8952
9325
|
default:
|
|
@@ -8954,23 +9327,23 @@ var CreateMachineStateStore1708098041262 = class {
|
|
|
8954
9327
|
}
|
|
8955
9328
|
}
|
|
8956
9329
|
async down(queryRunner) {
|
|
8957
|
-
|
|
9330
|
+
debug20("migration: reverting machine state tables");
|
|
8958
9331
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8959
9332
|
switch (dbType) {
|
|
8960
9333
|
case "postgres": {
|
|
8961
|
-
|
|
9334
|
+
debug20("using postgres migration file");
|
|
8962
9335
|
const mig = new CreateMachineStateStore1708797018115();
|
|
8963
9336
|
await mig.down(queryRunner);
|
|
8964
|
-
|
|
9337
|
+
debug20("Migration statements executed");
|
|
8965
9338
|
return;
|
|
8966
9339
|
}
|
|
8967
9340
|
case "sqlite":
|
|
8968
9341
|
case "expo":
|
|
8969
9342
|
case "react-native": {
|
|
8970
|
-
|
|
9343
|
+
debug20("using sqlite/react-native migration file");
|
|
8971
9344
|
const mig = new CreateMachineStateStore1708796002272();
|
|
8972
9345
|
await mig.down(queryRunner);
|
|
8973
|
-
|
|
9346
|
+
debug20("Migration statements executed");
|
|
8974
9347
|
return;
|
|
8975
9348
|
}
|
|
8976
9349
|
default:
|
|
@@ -8980,7 +9353,7 @@ var CreateMachineStateStore1708098041262 = class {
|
|
|
8980
9353
|
};
|
|
8981
9354
|
|
|
8982
9355
|
// src/migrations/generic/8-CreateContacts.ts
|
|
8983
|
-
import
|
|
9356
|
+
import Debug21 from "debug";
|
|
8984
9357
|
|
|
8985
9358
|
// src/migrations/postgres/1710438363001-CreateContacts.ts
|
|
8986
9359
|
var CreateContacts1710438363001 = class {
|
|
@@ -9094,30 +9467,30 @@ var CreateContacts1710438363002 = class {
|
|
|
9094
9467
|
};
|
|
9095
9468
|
|
|
9096
9469
|
// src/migrations/generic/8-CreateContacts.ts
|
|
9097
|
-
var
|
|
9470
|
+
var debug21 = Debug21("sphereon:ssi-sdk:migrations");
|
|
9098
9471
|
var CreateContacts1708525189000 = class {
|
|
9099
9472
|
static {
|
|
9100
9473
|
__name(this, "CreateContacts1708525189000");
|
|
9101
9474
|
}
|
|
9102
9475
|
name = "CreateContacts1708525189000";
|
|
9103
9476
|
async up(queryRunner) {
|
|
9104
|
-
|
|
9477
|
+
debug21("migration: updating contact tables");
|
|
9105
9478
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9106
9479
|
switch (dbType) {
|
|
9107
9480
|
case "postgres": {
|
|
9108
|
-
|
|
9481
|
+
debug21("using postgres migration file");
|
|
9109
9482
|
const mig = new CreateContacts1710438363001();
|
|
9110
9483
|
await mig.up(queryRunner);
|
|
9111
|
-
|
|
9484
|
+
debug21("Migration statements executed");
|
|
9112
9485
|
return;
|
|
9113
9486
|
}
|
|
9114
9487
|
case "sqlite":
|
|
9115
9488
|
case "expo":
|
|
9116
9489
|
case "react-native": {
|
|
9117
|
-
|
|
9490
|
+
debug21("using sqlite/react-native migration file");
|
|
9118
9491
|
const mig = new CreateContacts1710438363002();
|
|
9119
9492
|
await mig.up(queryRunner);
|
|
9120
|
-
|
|
9493
|
+
debug21("Migration statements executed");
|
|
9121
9494
|
return;
|
|
9122
9495
|
}
|
|
9123
9496
|
default:
|
|
@@ -9125,23 +9498,23 @@ var CreateContacts1708525189000 = class {
|
|
|
9125
9498
|
}
|
|
9126
9499
|
}
|
|
9127
9500
|
async down(queryRunner) {
|
|
9128
|
-
|
|
9501
|
+
debug21("migration: reverting machine state tables");
|
|
9129
9502
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9130
9503
|
switch (dbType) {
|
|
9131
9504
|
case "postgres": {
|
|
9132
|
-
|
|
9505
|
+
debug21("using postgres migration file");
|
|
9133
9506
|
const mig = new CreateContacts1710438363001();
|
|
9134
9507
|
await mig.down(queryRunner);
|
|
9135
|
-
|
|
9508
|
+
debug21("Migration statements executed");
|
|
9136
9509
|
return;
|
|
9137
9510
|
}
|
|
9138
9511
|
case "sqlite":
|
|
9139
9512
|
case "expo":
|
|
9140
9513
|
case "react-native": {
|
|
9141
|
-
|
|
9514
|
+
debug21("using sqlite/react-native migration file");
|
|
9142
9515
|
const mig = new CreateContacts1710438363002();
|
|
9143
9516
|
await mig.down(queryRunner);
|
|
9144
|
-
|
|
9517
|
+
debug21("Migration statements executed");
|
|
9145
9518
|
return;
|
|
9146
9519
|
}
|
|
9147
9520
|
default:
|
|
@@ -9151,7 +9524,7 @@ var CreateContacts1708525189000 = class {
|
|
|
9151
9524
|
};
|
|
9152
9525
|
|
|
9153
9526
|
// src/migrations/generic/9-CreateContacts.ts
|
|
9154
|
-
import
|
|
9527
|
+
import Debug22 from "debug";
|
|
9155
9528
|
|
|
9156
9529
|
// src/migrations/postgres/1715761125001-CreateContacts.ts
|
|
9157
9530
|
var CreateContacts1715761125001 = class {
|
|
@@ -9263,30 +9636,30 @@ var CreateContacts1715761125002 = class {
|
|
|
9263
9636
|
};
|
|
9264
9637
|
|
|
9265
9638
|
// src/migrations/generic/9-CreateContacts.ts
|
|
9266
|
-
var
|
|
9639
|
+
var debug22 = Debug22("sphereon:ssi-sdk:migrations");
|
|
9267
9640
|
var CreateContacts1715761125000 = class {
|
|
9268
9641
|
static {
|
|
9269
9642
|
__name(this, "CreateContacts1715761125000");
|
|
9270
9643
|
}
|
|
9271
9644
|
name = "CreateContacts1715761125000";
|
|
9272
9645
|
async up(queryRunner) {
|
|
9273
|
-
|
|
9646
|
+
debug22("migration: updating contact tables");
|
|
9274
9647
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9275
9648
|
switch (dbType) {
|
|
9276
9649
|
case "postgres": {
|
|
9277
|
-
|
|
9650
|
+
debug22("using postgres migration file");
|
|
9278
9651
|
const mig = new CreateContacts1715761125001();
|
|
9279
9652
|
await mig.up(queryRunner);
|
|
9280
|
-
|
|
9653
|
+
debug22("Migration statements executed");
|
|
9281
9654
|
return;
|
|
9282
9655
|
}
|
|
9283
9656
|
case "sqlite":
|
|
9284
9657
|
case "expo":
|
|
9285
9658
|
case "react-native": {
|
|
9286
|
-
|
|
9659
|
+
debug22("using sqlite/react-native migration file");
|
|
9287
9660
|
const mig = new CreateContacts1715761125002();
|
|
9288
9661
|
await mig.up(queryRunner);
|
|
9289
|
-
|
|
9662
|
+
debug22("Migration statements executed");
|
|
9290
9663
|
return;
|
|
9291
9664
|
}
|
|
9292
9665
|
default:
|
|
@@ -9294,23 +9667,23 @@ var CreateContacts1715761125000 = class {
|
|
|
9294
9667
|
}
|
|
9295
9668
|
}
|
|
9296
9669
|
async down(queryRunner) {
|
|
9297
|
-
|
|
9670
|
+
debug22("migration: reverting machine state tables");
|
|
9298
9671
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9299
9672
|
switch (dbType) {
|
|
9300
9673
|
case "postgres": {
|
|
9301
|
-
|
|
9674
|
+
debug22("using postgres migration file");
|
|
9302
9675
|
const mig = new CreateContacts1715761125001();
|
|
9303
9676
|
await mig.down(queryRunner);
|
|
9304
|
-
|
|
9677
|
+
debug22("Migration statements executed");
|
|
9305
9678
|
return;
|
|
9306
9679
|
}
|
|
9307
9680
|
case "sqlite":
|
|
9308
9681
|
case "expo":
|
|
9309
9682
|
case "react-native": {
|
|
9310
|
-
|
|
9683
|
+
debug22("using sqlite/react-native migration file");
|
|
9311
9684
|
const mig = new CreateContacts1715761125002();
|
|
9312
9685
|
await mig.down(queryRunner);
|
|
9313
|
-
|
|
9686
|
+
debug22("Migration statements executed");
|
|
9314
9687
|
return;
|
|
9315
9688
|
}
|
|
9316
9689
|
default:
|
|
@@ -9328,7 +9701,8 @@ var DataStoreContactMigrations = [
|
|
|
9328
9701
|
];
|
|
9329
9702
|
var DataStoreIssuanceBrandingMigrations = [
|
|
9330
9703
|
CreateIssuanceBranding1659463079429,
|
|
9331
|
-
FixCredentialClaimsReferencesUuid1741895822987
|
|
9704
|
+
FixCredentialClaimsReferencesUuid1741895822987,
|
|
9705
|
+
AddBrandingState1766000000000
|
|
9332
9706
|
];
|
|
9333
9707
|
var DataStoreStatusListMigrations = [
|
|
9334
9708
|
CreateStatusList1693866470000,
|
|
@@ -9663,6 +10037,7 @@ export {
|
|
|
9663
10037
|
credentialBrandingFrom,
|
|
9664
10038
|
credentialClaimsEntityFrom,
|
|
9665
10039
|
credentialLocaleBrandingEntityFrom,
|
|
10040
|
+
credentialLocaleBrandingFromEntity,
|
|
9666
10041
|
dcqlQueryEntityItemFrom,
|
|
9667
10042
|
dcqlQueryItemFrom,
|
|
9668
10043
|
didAuthConfigEntityFrom,
|