@sphereon/ssi-sdk.data-store 0.37.1 → 0.37.2-next.14
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 +1544 -502
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +84 -5
- package/dist/index.d.ts +84 -5
- package/dist/index.js +1457 -415
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/src/__tests__/credential-design-store.test.ts +419 -0
- package/src/__tests__/credential-design.entities.test.ts +205 -0
- package/src/__tests__/issuanceBranding.entities.test.ts +1 -1
- package/src/__tests__/issuanceBranding.store.test.ts +1 -1
- package/src/credentialDesign/CredentialDesignStore.ts +201 -0
- package/src/entities/credentialDesign/CredentialDesignBrandingEntity.ts +39 -0
- package/src/entities/credentialDesign/FormStepEntity.ts +32 -0
- package/src/entities/credentialDesign/MetaDataKeyEntity.ts +30 -0
- package/src/entities/credentialDesign/MetaDataSetEntity.ts +39 -0
- package/src/entities/credentialDesign/MetaDataValueEntity.ts +30 -0
- package/src/entities/credentialDesign/SchemaDefinitionEntity.ts +36 -0
- package/src/entities/credentialDesign/index.ts +6 -0
- package/src/index.ts +26 -0
- package/src/migrations/generic/18-AddCredentialDesigns.ts +64 -0
- package/src/migrations/generic/index.ts +5 -2
- package/src/migrations/index.ts +1 -0
- package/src/migrations/postgres/1773657426000-AddCredentialDesigns.ts +208 -0
- package/src/migrations/sqlite/1773657426000-AddCredentialDesigns.ts +55 -0
- package/src/utils/credentialDesign/MappingUtils.ts +147 -0
package/dist/index.js
CHANGED
|
@@ -3645,9 +3645,17 @@ MachineStateInfoEntity = _ts_decorate30([
|
|
|
3645
3645
|
Entity23("MachineStateInfoEntity")
|
|
3646
3646
|
], MachineStateInfoEntity);
|
|
3647
3647
|
|
|
3648
|
-
// src/entities/
|
|
3648
|
+
// src/entities/credentialDesign/MetaDataSetEntity.ts
|
|
3649
|
+
import { BaseEntity as BaseEntity27, Column as Column33, Entity as Entity29, Index as Index9, OneToMany as OneToMany9, OneToOne as OneToOne11, PrimaryGeneratedColumn as PrimaryGeneratedColumn28 } from "typeorm";
|
|
3650
|
+
|
|
3651
|
+
// src/entities/credentialDesign/MetaDataKeyEntity.ts
|
|
3652
|
+
import { ValueType } from "@sphereon/ssi-sdk.data-store-types";
|
|
3653
|
+
import { ValueType as ValueType2 } from "@sphereon/ssi-sdk.data-store-types";
|
|
3654
|
+
import { BaseEntity as BaseEntity23, Column as Column29, Entity as Entity25, JoinColumn as JoinColumn14, ManyToOne as ManyToOne12, OneToMany as OneToMany8, PrimaryGeneratedColumn as PrimaryGeneratedColumn24 } from "typeorm";
|
|
3655
|
+
|
|
3656
|
+
// src/entities/credentialDesign/MetaDataValueEntity.ts
|
|
3649
3657
|
import { typeOrmDateTime as typeOrmDateTime16 } from "@sphereon/ssi-sdk.agent-config";
|
|
3650
|
-
import { BaseEntity as BaseEntity22, Column as Column28,
|
|
3658
|
+
import { BaseEntity as BaseEntity22, Column as Column28, Entity as Entity24, JoinColumn as JoinColumn13, ManyToOne as ManyToOne11, PrimaryGeneratedColumn as PrimaryGeneratedColumn23 } from "typeorm";
|
|
3651
3659
|
function _ts_decorate31(decorators, target, key, desc) {
|
|
3652
3660
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3653
3661
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -3659,7 +3667,480 @@ function _ts_metadata30(k, v) {
|
|
|
3659
3667
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3660
3668
|
}
|
|
3661
3669
|
__name(_ts_metadata30, "_ts_metadata");
|
|
3662
|
-
var
|
|
3670
|
+
var MetaDataValueEntity = class extends BaseEntity22 {
|
|
3671
|
+
static {
|
|
3672
|
+
__name(this, "MetaDataValueEntity");
|
|
3673
|
+
}
|
|
3674
|
+
id;
|
|
3675
|
+
index;
|
|
3676
|
+
textValue;
|
|
3677
|
+
numberValue;
|
|
3678
|
+
booleanValue;
|
|
3679
|
+
timestampValue;
|
|
3680
|
+
metaDataKey;
|
|
3681
|
+
};
|
|
3682
|
+
_ts_decorate31([
|
|
3683
|
+
PrimaryGeneratedColumn23("uuid"),
|
|
3684
|
+
_ts_metadata30("design:type", String)
|
|
3685
|
+
], MetaDataValueEntity.prototype, "id", void 0);
|
|
3686
|
+
_ts_decorate31([
|
|
3687
|
+
Column28("integer", {
|
|
3688
|
+
name: "index",
|
|
3689
|
+
nullable: true
|
|
3690
|
+
}),
|
|
3691
|
+
_ts_metadata30("design:type", Number)
|
|
3692
|
+
], MetaDataValueEntity.prototype, "index", void 0);
|
|
3693
|
+
_ts_decorate31([
|
|
3694
|
+
Column28("text", {
|
|
3695
|
+
name: "text_value",
|
|
3696
|
+
nullable: true
|
|
3697
|
+
}),
|
|
3698
|
+
_ts_metadata30("design:type", String)
|
|
3699
|
+
], MetaDataValueEntity.prototype, "textValue", void 0);
|
|
3700
|
+
_ts_decorate31([
|
|
3701
|
+
Column28("numeric", {
|
|
3702
|
+
name: "number_value",
|
|
3703
|
+
nullable: true
|
|
3704
|
+
}),
|
|
3705
|
+
_ts_metadata30("design:type", Number)
|
|
3706
|
+
], MetaDataValueEntity.prototype, "numberValue", void 0);
|
|
3707
|
+
_ts_decorate31([
|
|
3708
|
+
Column28("boolean", {
|
|
3709
|
+
name: "boolean_value",
|
|
3710
|
+
nullable: true
|
|
3711
|
+
}),
|
|
3712
|
+
_ts_metadata30("design:type", Boolean)
|
|
3713
|
+
], MetaDataValueEntity.prototype, "booleanValue", void 0);
|
|
3714
|
+
_ts_decorate31([
|
|
3715
|
+
Column28({
|
|
3716
|
+
name: "timestamp_value",
|
|
3717
|
+
nullable: true,
|
|
3718
|
+
type: typeOrmDateTime16()
|
|
3719
|
+
}),
|
|
3720
|
+
_ts_metadata30("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3721
|
+
], MetaDataValueEntity.prototype, "timestampValue", void 0);
|
|
3722
|
+
_ts_decorate31([
|
|
3723
|
+
ManyToOne11(() => MetaDataKeyEntity, (key) => key.metaDataValues, {
|
|
3724
|
+
onDelete: "CASCADE"
|
|
3725
|
+
}),
|
|
3726
|
+
JoinColumn13({
|
|
3727
|
+
name: "key_id"
|
|
3728
|
+
}),
|
|
3729
|
+
_ts_metadata30("design:type", typeof MetaDataKeyEntity === "undefined" ? Object : MetaDataKeyEntity)
|
|
3730
|
+
], MetaDataValueEntity.prototype, "metaDataKey", void 0);
|
|
3731
|
+
MetaDataValueEntity = _ts_decorate31([
|
|
3732
|
+
Entity24("meta_data_values")
|
|
3733
|
+
], MetaDataValueEntity);
|
|
3734
|
+
|
|
3735
|
+
// src/entities/credentialDesign/MetaDataKeyEntity.ts
|
|
3736
|
+
function _ts_decorate32(decorators, target, key, desc) {
|
|
3737
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3738
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3739
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3740
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3741
|
+
}
|
|
3742
|
+
__name(_ts_decorate32, "_ts_decorate");
|
|
3743
|
+
function _ts_metadata31(k, v) {
|
|
3744
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3745
|
+
}
|
|
3746
|
+
__name(_ts_metadata31, "_ts_metadata");
|
|
3747
|
+
var MetaDataKeyEntity = class extends BaseEntity23 {
|
|
3748
|
+
static {
|
|
3749
|
+
__name(this, "MetaDataKeyEntity");
|
|
3750
|
+
}
|
|
3751
|
+
id;
|
|
3752
|
+
valueType;
|
|
3753
|
+
key;
|
|
3754
|
+
set;
|
|
3755
|
+
metaDataValues;
|
|
3756
|
+
};
|
|
3757
|
+
_ts_decorate32([
|
|
3758
|
+
PrimaryGeneratedColumn24("uuid"),
|
|
3759
|
+
_ts_metadata31("design:type", String)
|
|
3760
|
+
], MetaDataKeyEntity.prototype, "id", void 0);
|
|
3761
|
+
_ts_decorate32([
|
|
3762
|
+
Column29("simple-enum", {
|
|
3763
|
+
name: "value_type",
|
|
3764
|
+
enum: ValueType2,
|
|
3765
|
+
nullable: false
|
|
3766
|
+
}),
|
|
3767
|
+
_ts_metadata31("design:type", typeof ValueType2 === "undefined" ? Object : ValueType2)
|
|
3768
|
+
], MetaDataKeyEntity.prototype, "valueType", void 0);
|
|
3769
|
+
_ts_decorate32([
|
|
3770
|
+
Column29("text", {
|
|
3771
|
+
name: "key",
|
|
3772
|
+
nullable: false
|
|
3773
|
+
}),
|
|
3774
|
+
_ts_metadata31("design:type", String)
|
|
3775
|
+
], MetaDataKeyEntity.prototype, "key", void 0);
|
|
3776
|
+
_ts_decorate32([
|
|
3777
|
+
ManyToOne12(() => MetaDataSetEntity, (set) => set.metaDataKeys, {
|
|
3778
|
+
onDelete: "CASCADE"
|
|
3779
|
+
}),
|
|
3780
|
+
JoinColumn14({
|
|
3781
|
+
name: "set_id"
|
|
3782
|
+
}),
|
|
3783
|
+
_ts_metadata31("design:type", typeof MetaDataSetEntity === "undefined" ? Object : MetaDataSetEntity)
|
|
3784
|
+
], MetaDataKeyEntity.prototype, "set", void 0);
|
|
3785
|
+
_ts_decorate32([
|
|
3786
|
+
OneToMany8(() => MetaDataValueEntity, (value) => value.metaDataKey, {
|
|
3787
|
+
cascade: true,
|
|
3788
|
+
onDelete: "CASCADE",
|
|
3789
|
+
eager: true
|
|
3790
|
+
}),
|
|
3791
|
+
_ts_metadata31("design:type", typeof Array === "undefined" ? Object : Array)
|
|
3792
|
+
], MetaDataKeyEntity.prototype, "metaDataValues", void 0);
|
|
3793
|
+
MetaDataKeyEntity = _ts_decorate32([
|
|
3794
|
+
Entity25("meta_data_keys")
|
|
3795
|
+
], MetaDataKeyEntity);
|
|
3796
|
+
|
|
3797
|
+
// src/entities/credentialDesign/SchemaDefinitionEntity.ts
|
|
3798
|
+
import { BaseEntity as BaseEntity25, Column as Column31, Entity as Entity27, JoinColumn as JoinColumn15, ManyToMany as ManyToMany2, ManyToOne as ManyToOne13, PrimaryGeneratedColumn as PrimaryGeneratedColumn26 } from "typeorm";
|
|
3799
|
+
|
|
3800
|
+
// src/entities/credentialDesign/FormStepEntity.ts
|
|
3801
|
+
import { BaseEntity as BaseEntity24, Column as Column30, Entity as Entity26, Index as Index8, JoinTable, ManyToMany, PrimaryGeneratedColumn as PrimaryGeneratedColumn25 } from "typeorm";
|
|
3802
|
+
function _ts_decorate33(decorators, target, key, desc) {
|
|
3803
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3804
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3805
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3806
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3807
|
+
}
|
|
3808
|
+
__name(_ts_decorate33, "_ts_decorate");
|
|
3809
|
+
function _ts_metadata32(k, v) {
|
|
3810
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3811
|
+
}
|
|
3812
|
+
__name(_ts_metadata32, "_ts_metadata");
|
|
3813
|
+
var FormStepEntity = class extends BaseEntity24 {
|
|
3814
|
+
static {
|
|
3815
|
+
__name(this, "FormStepEntity");
|
|
3816
|
+
}
|
|
3817
|
+
id;
|
|
3818
|
+
tenantId;
|
|
3819
|
+
formId;
|
|
3820
|
+
stepNr;
|
|
3821
|
+
order;
|
|
3822
|
+
schemaDefinitions;
|
|
3823
|
+
};
|
|
3824
|
+
_ts_decorate33([
|
|
3825
|
+
PrimaryGeneratedColumn25("uuid"),
|
|
3826
|
+
_ts_metadata32("design:type", String)
|
|
3827
|
+
], FormStepEntity.prototype, "id", void 0);
|
|
3828
|
+
_ts_decorate33([
|
|
3829
|
+
Column30("varchar", {
|
|
3830
|
+
name: "tenant_id",
|
|
3831
|
+
nullable: true
|
|
3832
|
+
}),
|
|
3833
|
+
_ts_metadata32("design:type", String)
|
|
3834
|
+
], FormStepEntity.prototype, "tenantId", void 0);
|
|
3835
|
+
_ts_decorate33([
|
|
3836
|
+
Column30("text", {
|
|
3837
|
+
name: "form_id",
|
|
3838
|
+
nullable: true
|
|
3839
|
+
}),
|
|
3840
|
+
_ts_metadata32("design:type", String)
|
|
3841
|
+
], FormStepEntity.prototype, "formId", void 0);
|
|
3842
|
+
_ts_decorate33([
|
|
3843
|
+
Column30("integer", {
|
|
3844
|
+
name: "step_nr",
|
|
3845
|
+
nullable: true
|
|
3846
|
+
}),
|
|
3847
|
+
_ts_metadata32("design:type", Number)
|
|
3848
|
+
], FormStepEntity.prototype, "stepNr", void 0);
|
|
3849
|
+
_ts_decorate33([
|
|
3850
|
+
Column30("integer", {
|
|
3851
|
+
name: "order",
|
|
3852
|
+
nullable: true
|
|
3853
|
+
}),
|
|
3854
|
+
_ts_metadata32("design:type", Number)
|
|
3855
|
+
], FormStepEntity.prototype, "order", void 0);
|
|
3856
|
+
_ts_decorate33([
|
|
3857
|
+
ManyToMany(() => SchemaDefinitionEntity, (schema) => schema.formSteps, {
|
|
3858
|
+
cascade: true,
|
|
3859
|
+
eager: true
|
|
3860
|
+
}),
|
|
3861
|
+
JoinTable({
|
|
3862
|
+
name: "form_step_to_schema_definition",
|
|
3863
|
+
joinColumn: {
|
|
3864
|
+
name: "form_step_id",
|
|
3865
|
+
referencedColumnName: "id"
|
|
3866
|
+
},
|
|
3867
|
+
inverseJoinColumn: {
|
|
3868
|
+
name: "schema_definition_id",
|
|
3869
|
+
referencedColumnName: "id"
|
|
3870
|
+
}
|
|
3871
|
+
}),
|
|
3872
|
+
_ts_metadata32("design:type", typeof Array === "undefined" ? Object : Array)
|
|
3873
|
+
], FormStepEntity.prototype, "schemaDefinitions", void 0);
|
|
3874
|
+
FormStepEntity = _ts_decorate33([
|
|
3875
|
+
Entity26("form_step"),
|
|
3876
|
+
Index8("formstep_unique_step", [
|
|
3877
|
+
"stepNr",
|
|
3878
|
+
"formId",
|
|
3879
|
+
"order"
|
|
3880
|
+
], {
|
|
3881
|
+
unique: true
|
|
3882
|
+
})
|
|
3883
|
+
], FormStepEntity);
|
|
3884
|
+
|
|
3885
|
+
// src/entities/credentialDesign/SchemaDefinitionEntity.ts
|
|
3886
|
+
function _ts_decorate34(decorators, target, key, desc) {
|
|
3887
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3888
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3889
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3890
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3891
|
+
}
|
|
3892
|
+
__name(_ts_decorate34, "_ts_decorate");
|
|
3893
|
+
function _ts_metadata33(k, v) {
|
|
3894
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3895
|
+
}
|
|
3896
|
+
__name(_ts_metadata33, "_ts_metadata");
|
|
3897
|
+
var SchemaDefinitionEntity = class extends BaseEntity25 {
|
|
3898
|
+
static {
|
|
3899
|
+
__name(this, "SchemaDefinitionEntity");
|
|
3900
|
+
}
|
|
3901
|
+
id;
|
|
3902
|
+
tenantId;
|
|
3903
|
+
extendsId;
|
|
3904
|
+
correlationId;
|
|
3905
|
+
schemaType;
|
|
3906
|
+
entityType;
|
|
3907
|
+
schema;
|
|
3908
|
+
metaDataSet;
|
|
3909
|
+
formSteps;
|
|
3910
|
+
};
|
|
3911
|
+
_ts_decorate34([
|
|
3912
|
+
PrimaryGeneratedColumn26("uuid"),
|
|
3913
|
+
_ts_metadata33("design:type", String)
|
|
3914
|
+
], SchemaDefinitionEntity.prototype, "id", void 0);
|
|
3915
|
+
_ts_decorate34([
|
|
3916
|
+
Column31("varchar", {
|
|
3917
|
+
name: "tenant_id",
|
|
3918
|
+
nullable: true
|
|
3919
|
+
}),
|
|
3920
|
+
_ts_metadata33("design:type", String)
|
|
3921
|
+
], SchemaDefinitionEntity.prototype, "tenantId", void 0);
|
|
3922
|
+
_ts_decorate34([
|
|
3923
|
+
Column31("varchar", {
|
|
3924
|
+
name: "extends_id",
|
|
3925
|
+
nullable: true
|
|
3926
|
+
}),
|
|
3927
|
+
_ts_metadata33("design:type", String)
|
|
3928
|
+
], SchemaDefinitionEntity.prototype, "extendsId", void 0);
|
|
3929
|
+
_ts_decorate34([
|
|
3930
|
+
Column31("text", {
|
|
3931
|
+
name: "correlation_id",
|
|
3932
|
+
nullable: true
|
|
3933
|
+
}),
|
|
3934
|
+
_ts_metadata33("design:type", String)
|
|
3935
|
+
], SchemaDefinitionEntity.prototype, "correlationId", void 0);
|
|
3936
|
+
_ts_decorate34([
|
|
3937
|
+
Column31("text", {
|
|
3938
|
+
name: "schema_type",
|
|
3939
|
+
nullable: true
|
|
3940
|
+
}),
|
|
3941
|
+
_ts_metadata33("design:type", String)
|
|
3942
|
+
], SchemaDefinitionEntity.prototype, "schemaType", void 0);
|
|
3943
|
+
_ts_decorate34([
|
|
3944
|
+
Column31("text", {
|
|
3945
|
+
name: "entity_type",
|
|
3946
|
+
nullable: true
|
|
3947
|
+
}),
|
|
3948
|
+
_ts_metadata33("design:type", String)
|
|
3949
|
+
], SchemaDefinitionEntity.prototype, "entityType", void 0);
|
|
3950
|
+
_ts_decorate34([
|
|
3951
|
+
Column31("text", {
|
|
3952
|
+
name: "schema",
|
|
3953
|
+
nullable: false
|
|
3954
|
+
}),
|
|
3955
|
+
_ts_metadata33("design:type", String)
|
|
3956
|
+
], SchemaDefinitionEntity.prototype, "schema", void 0);
|
|
3957
|
+
_ts_decorate34([
|
|
3958
|
+
ManyToOne13(() => MetaDataSetEntity, (set) => set.schemaDefinitions, {
|
|
3959
|
+
onDelete: "CASCADE"
|
|
3960
|
+
}),
|
|
3961
|
+
JoinColumn15({
|
|
3962
|
+
name: "meta_data_set_id"
|
|
3963
|
+
}),
|
|
3964
|
+
_ts_metadata33("design:type", typeof MetaDataSetEntity === "undefined" ? Object : MetaDataSetEntity)
|
|
3965
|
+
], SchemaDefinitionEntity.prototype, "metaDataSet", void 0);
|
|
3966
|
+
_ts_decorate34([
|
|
3967
|
+
ManyToMany2(() => FormStepEntity, (formStep) => formStep.schemaDefinitions),
|
|
3968
|
+
_ts_metadata33("design:type", typeof Array === "undefined" ? Object : Array)
|
|
3969
|
+
], SchemaDefinitionEntity.prototype, "formSteps", void 0);
|
|
3970
|
+
SchemaDefinitionEntity = _ts_decorate34([
|
|
3971
|
+
Entity27("schema_definition")
|
|
3972
|
+
], SchemaDefinitionEntity);
|
|
3973
|
+
|
|
3974
|
+
// src/entities/credentialDesign/CredentialDesignBrandingEntity.ts
|
|
3975
|
+
import { BaseEntity as BaseEntity26, Column as Column32, Entity as Entity28, JoinColumn as JoinColumn16, ManyToOne as ManyToOne14, OneToOne as OneToOne10, PrimaryGeneratedColumn as PrimaryGeneratedColumn27 } from "typeorm";
|
|
3976
|
+
function _ts_decorate35(decorators, target, key, desc) {
|
|
3977
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3978
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3979
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3980
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3981
|
+
}
|
|
3982
|
+
__name(_ts_decorate35, "_ts_decorate");
|
|
3983
|
+
function _ts_metadata34(k, v) {
|
|
3984
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3985
|
+
}
|
|
3986
|
+
__name(_ts_metadata34, "_ts_metadata");
|
|
3987
|
+
var CredentialDesignBrandingEntity = class extends BaseEntity26 {
|
|
3988
|
+
static {
|
|
3989
|
+
__name(this, "CredentialDesignBrandingEntity");
|
|
3990
|
+
}
|
|
3991
|
+
id;
|
|
3992
|
+
textColor;
|
|
3993
|
+
backgroundColor;
|
|
3994
|
+
logo;
|
|
3995
|
+
backgroundImage;
|
|
3996
|
+
metaDataSet;
|
|
3997
|
+
};
|
|
3998
|
+
_ts_decorate35([
|
|
3999
|
+
PrimaryGeneratedColumn27("uuid"),
|
|
4000
|
+
_ts_metadata34("design:type", String)
|
|
4001
|
+
], CredentialDesignBrandingEntity.prototype, "id", void 0);
|
|
4002
|
+
_ts_decorate35([
|
|
4003
|
+
Column32("text", {
|
|
4004
|
+
name: "text_color",
|
|
4005
|
+
nullable: true
|
|
4006
|
+
}),
|
|
4007
|
+
_ts_metadata34("design:type", String)
|
|
4008
|
+
], CredentialDesignBrandingEntity.prototype, "textColor", void 0);
|
|
4009
|
+
_ts_decorate35([
|
|
4010
|
+
Column32("text", {
|
|
4011
|
+
name: "background_color",
|
|
4012
|
+
nullable: true
|
|
4013
|
+
}),
|
|
4014
|
+
_ts_metadata34("design:type", String)
|
|
4015
|
+
], CredentialDesignBrandingEntity.prototype, "backgroundColor", void 0);
|
|
4016
|
+
_ts_decorate35([
|
|
4017
|
+
ManyToOne14(() => ImageAttributesEntity, {
|
|
4018
|
+
cascade: true,
|
|
4019
|
+
eager: true,
|
|
4020
|
+
nullable: true,
|
|
4021
|
+
onDelete: "SET NULL"
|
|
4022
|
+
}),
|
|
4023
|
+
JoinColumn16({
|
|
4024
|
+
name: "logo"
|
|
4025
|
+
}),
|
|
4026
|
+
_ts_metadata34("design:type", typeof ImageAttributesEntity === "undefined" ? Object : ImageAttributesEntity)
|
|
4027
|
+
], CredentialDesignBrandingEntity.prototype, "logo", void 0);
|
|
4028
|
+
_ts_decorate35([
|
|
4029
|
+
ManyToOne14(() => ImageAttributesEntity, {
|
|
4030
|
+
cascade: true,
|
|
4031
|
+
eager: true,
|
|
4032
|
+
nullable: true,
|
|
4033
|
+
onDelete: "SET NULL"
|
|
4034
|
+
}),
|
|
4035
|
+
JoinColumn16({
|
|
4036
|
+
name: "background_image"
|
|
4037
|
+
}),
|
|
4038
|
+
_ts_metadata34("design:type", typeof ImageAttributesEntity === "undefined" ? Object : ImageAttributesEntity)
|
|
4039
|
+
], CredentialDesignBrandingEntity.prototype, "backgroundImage", void 0);
|
|
4040
|
+
_ts_decorate35([
|
|
4041
|
+
OneToOne10(() => MetaDataSetEntity, (set) => set.credentialDesignBranding, {
|
|
4042
|
+
onDelete: "CASCADE"
|
|
4043
|
+
}),
|
|
4044
|
+
JoinColumn16({
|
|
4045
|
+
name: "meta_data_set_id"
|
|
4046
|
+
}),
|
|
4047
|
+
_ts_metadata34("design:type", typeof MetaDataSetEntity === "undefined" ? Object : MetaDataSetEntity)
|
|
4048
|
+
], CredentialDesignBrandingEntity.prototype, "metaDataSet", void 0);
|
|
4049
|
+
CredentialDesignBrandingEntity = _ts_decorate35([
|
|
4050
|
+
Entity28("credential_design_branding")
|
|
4051
|
+
], CredentialDesignBrandingEntity);
|
|
4052
|
+
|
|
4053
|
+
// src/entities/credentialDesign/MetaDataSetEntity.ts
|
|
4054
|
+
function _ts_decorate36(decorators, target, key, desc) {
|
|
4055
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4056
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4057
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4058
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4059
|
+
}
|
|
4060
|
+
__name(_ts_decorate36, "_ts_decorate");
|
|
4061
|
+
function _ts_metadata35(k, v) {
|
|
4062
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4063
|
+
}
|
|
4064
|
+
__name(_ts_metadata35, "_ts_metadata");
|
|
4065
|
+
var MetaDataSetEntity = class extends BaseEntity27 {
|
|
4066
|
+
static {
|
|
4067
|
+
__name(this, "MetaDataSetEntity");
|
|
4068
|
+
}
|
|
4069
|
+
id;
|
|
4070
|
+
tenantId;
|
|
4071
|
+
name;
|
|
4072
|
+
metaDataKeys;
|
|
4073
|
+
schemaDefinitions;
|
|
4074
|
+
credentialDesignBranding;
|
|
4075
|
+
};
|
|
4076
|
+
_ts_decorate36([
|
|
4077
|
+
PrimaryGeneratedColumn28("uuid"),
|
|
4078
|
+
_ts_metadata35("design:type", String)
|
|
4079
|
+
], MetaDataSetEntity.prototype, "id", void 0);
|
|
4080
|
+
_ts_decorate36([
|
|
4081
|
+
Column33("varchar", {
|
|
4082
|
+
name: "tenant_id",
|
|
4083
|
+
nullable: true
|
|
4084
|
+
}),
|
|
4085
|
+
_ts_metadata35("design:type", String)
|
|
4086
|
+
], MetaDataSetEntity.prototype, "tenantId", void 0);
|
|
4087
|
+
_ts_decorate36([
|
|
4088
|
+
Column33("text", {
|
|
4089
|
+
name: "name",
|
|
4090
|
+
nullable: false
|
|
4091
|
+
}),
|
|
4092
|
+
_ts_metadata35("design:type", String)
|
|
4093
|
+
], MetaDataSetEntity.prototype, "name", void 0);
|
|
4094
|
+
_ts_decorate36([
|
|
4095
|
+
OneToMany9(() => MetaDataKeyEntity, (key) => key.set, {
|
|
4096
|
+
cascade: true,
|
|
4097
|
+
onDelete: "CASCADE",
|
|
4098
|
+
eager: true
|
|
4099
|
+
}),
|
|
4100
|
+
_ts_metadata35("design:type", typeof Array === "undefined" ? Object : Array)
|
|
4101
|
+
], MetaDataSetEntity.prototype, "metaDataKeys", void 0);
|
|
4102
|
+
_ts_decorate36([
|
|
4103
|
+
OneToMany9(() => SchemaDefinitionEntity, (schema) => schema.metaDataSet, {
|
|
4104
|
+
cascade: true,
|
|
4105
|
+
onDelete: "CASCADE",
|
|
4106
|
+
eager: true
|
|
4107
|
+
}),
|
|
4108
|
+
_ts_metadata35("design:type", typeof Array === "undefined" ? Object : Array)
|
|
4109
|
+
], MetaDataSetEntity.prototype, "schemaDefinitions", void 0);
|
|
4110
|
+
_ts_decorate36([
|
|
4111
|
+
OneToOne11(() => CredentialDesignBrandingEntity, (branding) => branding.metaDataSet, {
|
|
4112
|
+
cascade: true,
|
|
4113
|
+
onDelete: "CASCADE",
|
|
4114
|
+
eager: true,
|
|
4115
|
+
nullable: true
|
|
4116
|
+
}),
|
|
4117
|
+
_ts_metadata35("design:type", typeof CredentialDesignBrandingEntity === "undefined" ? Object : CredentialDesignBrandingEntity)
|
|
4118
|
+
], MetaDataSetEntity.prototype, "credentialDesignBranding", void 0);
|
|
4119
|
+
MetaDataSetEntity = _ts_decorate36([
|
|
4120
|
+
Entity29("meta_data_set"),
|
|
4121
|
+
Index9("meta_data_set_unique_tenant", [
|
|
4122
|
+
"name",
|
|
4123
|
+
"tenantId"
|
|
4124
|
+
], {
|
|
4125
|
+
unique: true
|
|
4126
|
+
})
|
|
4127
|
+
], MetaDataSetEntity);
|
|
4128
|
+
|
|
4129
|
+
// src/entities/oid4vcState/Oid4vcStateEntity.ts
|
|
4130
|
+
import { typeOrmDateTime as typeOrmDateTime17 } from "@sphereon/ssi-sdk.agent-config";
|
|
4131
|
+
import { BaseEntity as BaseEntity28, Column as Column34, CreateDateColumn as CreateDateColumn14, Entity as Entity30, PrimaryColumn as PrimaryColumn2, UpdateDateColumn as UpdateDateColumn14 } from "typeorm";
|
|
4132
|
+
function _ts_decorate37(decorators, target, key, desc) {
|
|
4133
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4134
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4135
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4136
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4137
|
+
}
|
|
4138
|
+
__name(_ts_decorate37, "_ts_decorate");
|
|
4139
|
+
function _ts_metadata36(k, v) {
|
|
4140
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4141
|
+
}
|
|
4142
|
+
__name(_ts_metadata36, "_ts_metadata");
|
|
4143
|
+
var Oid4vcStateEntity = class extends BaseEntity28 {
|
|
3663
4144
|
static {
|
|
3664
4145
|
__name(this, "Oid4vcStateEntity");
|
|
3665
4146
|
}
|
|
@@ -3673,98 +4154,98 @@ var Oid4vcStateEntity = class extends BaseEntity22 {
|
|
|
3673
4154
|
expiresAt;
|
|
3674
4155
|
tenantId;
|
|
3675
4156
|
};
|
|
3676
|
-
|
|
4157
|
+
_ts_decorate37([
|
|
3677
4158
|
PrimaryColumn2({
|
|
3678
4159
|
name: "id",
|
|
3679
4160
|
type: "varchar",
|
|
3680
4161
|
nullable: false
|
|
3681
4162
|
}),
|
|
3682
|
-
|
|
4163
|
+
_ts_metadata36("design:type", String)
|
|
3683
4164
|
], Oid4vcStateEntity.prototype, "id", void 0);
|
|
3684
|
-
|
|
3685
|
-
|
|
4165
|
+
_ts_decorate37([
|
|
4166
|
+
Column34({
|
|
3686
4167
|
name: "lookup_ids",
|
|
3687
4168
|
type: "array",
|
|
3688
4169
|
nullable: true
|
|
3689
4170
|
}),
|
|
3690
|
-
|
|
4171
|
+
_ts_metadata36("design:type", typeof Array === "undefined" ? Object : Array)
|
|
3691
4172
|
], Oid4vcStateEntity.prototype, "lookups", void 0);
|
|
3692
|
-
|
|
3693
|
-
|
|
4173
|
+
_ts_decorate37([
|
|
4174
|
+
Column34({
|
|
3694
4175
|
name: "state_id",
|
|
3695
4176
|
type: "varchar",
|
|
3696
4177
|
nullable: true
|
|
3697
4178
|
}),
|
|
3698
|
-
|
|
4179
|
+
_ts_metadata36("design:type", String)
|
|
3699
4180
|
], Oid4vcStateEntity.prototype, "stateId", void 0);
|
|
3700
|
-
|
|
3701
|
-
|
|
4181
|
+
_ts_decorate37([
|
|
4182
|
+
Column34({
|
|
3702
4183
|
name: "correlation_id",
|
|
3703
4184
|
type: "varchar",
|
|
3704
4185
|
nullable: true
|
|
3705
4186
|
}),
|
|
3706
|
-
|
|
4187
|
+
_ts_metadata36("design:type", String)
|
|
3707
4188
|
], Oid4vcStateEntity.prototype, "correlationId", void 0);
|
|
3708
|
-
|
|
3709
|
-
|
|
4189
|
+
_ts_decorate37([
|
|
4190
|
+
Column34({
|
|
3710
4191
|
name: "state",
|
|
3711
4192
|
type: "json",
|
|
3712
4193
|
nullable: false
|
|
3713
4194
|
}),
|
|
3714
|
-
|
|
4195
|
+
_ts_metadata36("design:type", typeof StateType === "undefined" ? Object : StateType)
|
|
3715
4196
|
], Oid4vcStateEntity.prototype, "state", void 0);
|
|
3716
|
-
|
|
4197
|
+
_ts_decorate37([
|
|
3717
4198
|
CreateDateColumn14({
|
|
3718
4199
|
name: "created_at",
|
|
3719
4200
|
nullable: false,
|
|
3720
|
-
type:
|
|
4201
|
+
type: typeOrmDateTime17()
|
|
3721
4202
|
}),
|
|
3722
|
-
|
|
4203
|
+
_ts_metadata36("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3723
4204
|
], Oid4vcStateEntity.prototype, "createdAt", void 0);
|
|
3724
|
-
|
|
4205
|
+
_ts_decorate37([
|
|
3725
4206
|
UpdateDateColumn14({
|
|
3726
4207
|
name: "updated_at",
|
|
3727
4208
|
nullable: false,
|
|
3728
|
-
type:
|
|
4209
|
+
type: typeOrmDateTime17()
|
|
3729
4210
|
}),
|
|
3730
|
-
|
|
4211
|
+
_ts_metadata36("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3731
4212
|
], Oid4vcStateEntity.prototype, "updatedAt", void 0);
|
|
3732
|
-
|
|
3733
|
-
|
|
4213
|
+
_ts_decorate37([
|
|
4214
|
+
Column34({
|
|
3734
4215
|
name: "expires_at",
|
|
3735
4216
|
nullable: true,
|
|
3736
|
-
type:
|
|
4217
|
+
type: typeOrmDateTime17()
|
|
3737
4218
|
}),
|
|
3738
|
-
|
|
4219
|
+
_ts_metadata36("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3739
4220
|
], Oid4vcStateEntity.prototype, "expiresAt", void 0);
|
|
3740
|
-
|
|
3741
|
-
|
|
4221
|
+
_ts_decorate37([
|
|
4222
|
+
Column34({
|
|
3742
4223
|
name: "tenant_id",
|
|
3743
4224
|
type: "varchar",
|
|
3744
4225
|
nullable: true
|
|
3745
4226
|
}),
|
|
3746
|
-
|
|
4227
|
+
_ts_metadata36("design:type", String)
|
|
3747
4228
|
], Oid4vcStateEntity.prototype, "tenantId", void 0);
|
|
3748
|
-
Oid4vcStateEntity =
|
|
3749
|
-
|
|
4229
|
+
Oid4vcStateEntity = _ts_decorate37([
|
|
4230
|
+
Entity30("Oid4vcStateEntity")
|
|
3750
4231
|
], Oid4vcStateEntity);
|
|
3751
4232
|
|
|
3752
4233
|
// src/entities/presentationDefinition/DcqlQueryItemEntity.ts
|
|
3753
|
-
import { typeOrmDateTime as
|
|
4234
|
+
import { typeOrmDateTime as typeOrmDateTime18 } from "@sphereon/ssi-sdk.agent-config";
|
|
3754
4235
|
import { IsNotEmpty as IsNotEmpty12 } from "class-validator";
|
|
3755
|
-
import { BaseEntity as
|
|
3756
|
-
function
|
|
4236
|
+
import { BaseEntity as BaseEntity29, BeforeInsert as BeforeInsert22, BeforeUpdate as BeforeUpdate22, Column as Column35, CreateDateColumn as CreateDateColumn15, Entity as Entity31, Index as Index10, PrimaryGeneratedColumn as PrimaryGeneratedColumn29, UpdateDateColumn as UpdateDateColumn15 } from "typeorm";
|
|
4237
|
+
function _ts_decorate38(decorators, target, key, desc) {
|
|
3757
4238
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3758
4239
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3759
4240
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3760
4241
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3761
4242
|
}
|
|
3762
|
-
__name(
|
|
3763
|
-
function
|
|
4243
|
+
__name(_ts_decorate38, "_ts_decorate");
|
|
4244
|
+
function _ts_metadata37(k, v) {
|
|
3764
4245
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3765
4246
|
}
|
|
3766
|
-
__name(
|
|
3767
|
-
var DcqlQueryItemEntity = class extends
|
|
4247
|
+
__name(_ts_metadata37, "_ts_metadata");
|
|
4248
|
+
var DcqlQueryItemEntity = class extends BaseEntity29 {
|
|
3768
4249
|
static {
|
|
3769
4250
|
__name(this, "DcqlQueryItemEntity");
|
|
3770
4251
|
}
|
|
@@ -3782,12 +4263,12 @@ var DcqlQueryItemEntity = class extends BaseEntity23 {
|
|
|
3782
4263
|
this.lastUpdatedAt = /* @__PURE__ */ new Date();
|
|
3783
4264
|
}
|
|
3784
4265
|
};
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
4266
|
+
_ts_decorate38([
|
|
4267
|
+
PrimaryGeneratedColumn29("uuid"),
|
|
4268
|
+
_ts_metadata37("design:type", String)
|
|
3788
4269
|
], DcqlQueryItemEntity.prototype, "id", void 0);
|
|
3789
|
-
|
|
3790
|
-
|
|
4270
|
+
_ts_decorate38([
|
|
4271
|
+
Column35({
|
|
3791
4272
|
name: "query_id",
|
|
3792
4273
|
length: 255,
|
|
3793
4274
|
type: "varchar",
|
|
@@ -3797,10 +4278,10 @@ _ts_decorate32([
|
|
|
3797
4278
|
IsNotEmpty12({
|
|
3798
4279
|
message: "A blank query id field is not allowed"
|
|
3799
4280
|
}),
|
|
3800
|
-
|
|
4281
|
+
_ts_metadata37("design:type", String)
|
|
3801
4282
|
], DcqlQueryItemEntity.prototype, "queryId", void 0);
|
|
3802
|
-
|
|
3803
|
-
|
|
4283
|
+
_ts_decorate38([
|
|
4284
|
+
Column35({
|
|
3804
4285
|
name: "version",
|
|
3805
4286
|
length: 255,
|
|
3806
4287
|
type: "varchar",
|
|
@@ -3810,40 +4291,40 @@ _ts_decorate32([
|
|
|
3810
4291
|
IsNotEmpty12({
|
|
3811
4292
|
message: "A blank version field is not allowed"
|
|
3812
4293
|
}),
|
|
3813
|
-
|
|
4294
|
+
_ts_metadata37("design:type", String)
|
|
3814
4295
|
], DcqlQueryItemEntity.prototype, "version", void 0);
|
|
3815
|
-
|
|
3816
|
-
|
|
4296
|
+
_ts_decorate38([
|
|
4297
|
+
Column35({
|
|
3817
4298
|
name: "tenant_id",
|
|
3818
4299
|
length: 255,
|
|
3819
4300
|
type: "varchar",
|
|
3820
4301
|
nullable: true,
|
|
3821
4302
|
unique: false
|
|
3822
4303
|
}),
|
|
3823
|
-
|
|
4304
|
+
_ts_metadata37("design:type", String)
|
|
3824
4305
|
], DcqlQueryItemEntity.prototype, "tenantId", void 0);
|
|
3825
|
-
|
|
3826
|
-
|
|
4306
|
+
_ts_decorate38([
|
|
4307
|
+
Column35({
|
|
3827
4308
|
name: "purpose",
|
|
3828
4309
|
length: 255,
|
|
3829
4310
|
type: "varchar",
|
|
3830
4311
|
nullable: true,
|
|
3831
4312
|
unique: false
|
|
3832
4313
|
}),
|
|
3833
|
-
|
|
4314
|
+
_ts_metadata37("design:type", String)
|
|
3834
4315
|
], DcqlQueryItemEntity.prototype, "purpose", void 0);
|
|
3835
|
-
|
|
3836
|
-
|
|
4316
|
+
_ts_decorate38([
|
|
4317
|
+
Column35({
|
|
3837
4318
|
name: "name",
|
|
3838
4319
|
length: 255,
|
|
3839
4320
|
type: "varchar",
|
|
3840
4321
|
nullable: true,
|
|
3841
4322
|
unique: false
|
|
3842
4323
|
}),
|
|
3843
|
-
|
|
4324
|
+
_ts_metadata37("design:type", String)
|
|
3844
4325
|
], DcqlQueryItemEntity.prototype, "name", void 0);
|
|
3845
|
-
|
|
3846
|
-
|
|
4326
|
+
_ts_decorate38([
|
|
4327
|
+
Column35({
|
|
3847
4328
|
name: "query",
|
|
3848
4329
|
type: "text",
|
|
3849
4330
|
nullable: false,
|
|
@@ -3852,34 +4333,34 @@ _ts_decorate32([
|
|
|
3852
4333
|
IsNotEmpty12({
|
|
3853
4334
|
message: "A blank dcql query payload field is not allowed"
|
|
3854
4335
|
}),
|
|
3855
|
-
|
|
4336
|
+
_ts_metadata37("design:type", String)
|
|
3856
4337
|
], DcqlQueryItemEntity.prototype, "query", void 0);
|
|
3857
|
-
|
|
4338
|
+
_ts_decorate38([
|
|
3858
4339
|
CreateDateColumn15({
|
|
3859
4340
|
name: "created_at",
|
|
3860
4341
|
nullable: false,
|
|
3861
|
-
type:
|
|
4342
|
+
type: typeOrmDateTime18()
|
|
3862
4343
|
}),
|
|
3863
|
-
|
|
4344
|
+
_ts_metadata37("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3864
4345
|
], DcqlQueryItemEntity.prototype, "createdAt", void 0);
|
|
3865
|
-
|
|
4346
|
+
_ts_decorate38([
|
|
3866
4347
|
UpdateDateColumn15({
|
|
3867
4348
|
name: "last_updated_at",
|
|
3868
4349
|
nullable: false,
|
|
3869
|
-
type:
|
|
4350
|
+
type: typeOrmDateTime18()
|
|
3870
4351
|
}),
|
|
3871
|
-
|
|
4352
|
+
_ts_metadata37("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3872
4353
|
], DcqlQueryItemEntity.prototype, "lastUpdatedAt", void 0);
|
|
3873
|
-
|
|
4354
|
+
_ts_decorate38([
|
|
3874
4355
|
BeforeInsert22(),
|
|
3875
4356
|
BeforeUpdate22(),
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
4357
|
+
_ts_metadata37("design:type", Function),
|
|
4358
|
+
_ts_metadata37("design:paramtypes", []),
|
|
4359
|
+
_ts_metadata37("design:returntype", void 0)
|
|
3879
4360
|
], DcqlQueryItemEntity.prototype, "updateUpdatedDate", null);
|
|
3880
|
-
DcqlQueryItemEntity =
|
|
3881
|
-
|
|
3882
|
-
|
|
4361
|
+
DcqlQueryItemEntity = _ts_decorate38([
|
|
4362
|
+
Entity31("DcqlQueryItem"),
|
|
4363
|
+
Index10([
|
|
3883
4364
|
"version"
|
|
3884
4365
|
], {
|
|
3885
4366
|
unique: false
|
|
@@ -3887,28 +4368,28 @@ DcqlQueryItemEntity = _ts_decorate32([
|
|
|
3887
4368
|
], DcqlQueryItemEntity);
|
|
3888
4369
|
|
|
3889
4370
|
// src/entities/statusList/BitstringStatusListEntryEntity.ts
|
|
3890
|
-
import { ChildEntity as ChildEntity8, Column as
|
|
4371
|
+
import { ChildEntity as ChildEntity8, Column as Column38 } from "typeorm";
|
|
3891
4372
|
|
|
3892
4373
|
// src/entities/statusList/StatusList2021EntryEntity.ts
|
|
3893
4374
|
import { Validate as Validate10 } from "class-validator";
|
|
3894
|
-
import { BaseEntity as
|
|
4375
|
+
import { BaseEntity as BaseEntity31, Column as Column37, Entity as Entity33, JoinColumn as JoinColumn17, ManyToOne as ManyToOne15, PrimaryColumn as PrimaryColumn4, TableInheritance as TableInheritance5 } from "typeorm";
|
|
3895
4376
|
|
|
3896
4377
|
// src/entities/statusList/StatusListEntities.ts
|
|
3897
|
-
import { typeOrmDateTime as
|
|
4378
|
+
import { typeOrmDateTime as typeOrmDateTime19 } from "@sphereon/ssi-sdk.agent-config";
|
|
3898
4379
|
import { StatusListCredentialIdMode, StatusListDriverType, StatusListType } from "@sphereon/ssi-types";
|
|
3899
|
-
import { BaseEntity as
|
|
3900
|
-
function
|
|
4380
|
+
import { BaseEntity as BaseEntity30, ChildEntity as ChildEntity7, Column as Column36, Entity as Entity32, OneToMany as OneToMany10, PrimaryColumn as PrimaryColumn3, TableInheritance as TableInheritance4, Unique } from "typeorm";
|
|
4381
|
+
function _ts_decorate39(decorators, target, key, desc) {
|
|
3901
4382
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3902
4383
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3903
4384
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3904
4385
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3905
4386
|
}
|
|
3906
|
-
__name(
|
|
3907
|
-
function
|
|
4387
|
+
__name(_ts_decorate39, "_ts_decorate");
|
|
4388
|
+
function _ts_metadata38(k, v) {
|
|
3908
4389
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3909
4390
|
}
|
|
3910
|
-
__name(
|
|
3911
|
-
var StatusListEntity = class extends
|
|
4391
|
+
__name(_ts_metadata38, "_ts_metadata");
|
|
4392
|
+
var StatusListEntity = class extends BaseEntity30 {
|
|
3912
4393
|
static {
|
|
3913
4394
|
__name(this, "StatusListEntity");
|
|
3914
4395
|
}
|
|
@@ -3922,40 +4403,40 @@ var StatusListEntity = class extends BaseEntity24 {
|
|
|
3922
4403
|
proofFormat;
|
|
3923
4404
|
statusListCredential;
|
|
3924
4405
|
};
|
|
3925
|
-
|
|
4406
|
+
_ts_decorate39([
|
|
3926
4407
|
PrimaryColumn3({
|
|
3927
4408
|
name: "id",
|
|
3928
4409
|
type: "varchar"
|
|
3929
4410
|
}),
|
|
3930
|
-
|
|
4411
|
+
_ts_metadata38("design:type", String)
|
|
3931
4412
|
], StatusListEntity.prototype, "id", void 0);
|
|
3932
|
-
|
|
3933
|
-
|
|
4413
|
+
_ts_decorate39([
|
|
4414
|
+
Column36({
|
|
3934
4415
|
name: "correlationId",
|
|
3935
4416
|
type: "varchar",
|
|
3936
4417
|
nullable: false
|
|
3937
4418
|
}),
|
|
3938
|
-
|
|
4419
|
+
_ts_metadata38("design:type", String)
|
|
3939
4420
|
], StatusListEntity.prototype, "correlationId", void 0);
|
|
3940
|
-
|
|
3941
|
-
|
|
4421
|
+
_ts_decorate39([
|
|
4422
|
+
Column36({
|
|
3942
4423
|
name: "length",
|
|
3943
4424
|
type: "integer",
|
|
3944
4425
|
nullable: false,
|
|
3945
4426
|
unique: false
|
|
3946
4427
|
}),
|
|
3947
|
-
|
|
4428
|
+
_ts_metadata38("design:type", Number)
|
|
3948
4429
|
], StatusListEntity.prototype, "length", void 0);
|
|
3949
|
-
|
|
3950
|
-
|
|
4430
|
+
_ts_decorate39([
|
|
4431
|
+
Column36("simple-enum", {
|
|
3951
4432
|
name: "type",
|
|
3952
4433
|
enum: StatusListType,
|
|
3953
4434
|
nullable: false
|
|
3954
4435
|
}),
|
|
3955
|
-
|
|
4436
|
+
_ts_metadata38("design:type", typeof StatusListType === "undefined" ? Object : StatusListType)
|
|
3956
4437
|
], StatusListEntity.prototype, "type", void 0);
|
|
3957
|
-
|
|
3958
|
-
|
|
4438
|
+
_ts_decorate39([
|
|
4439
|
+
Column36({
|
|
3959
4440
|
name: "issuer",
|
|
3960
4441
|
type: "text",
|
|
3961
4442
|
nullable: false,
|
|
@@ -3975,28 +4456,28 @@ _ts_decorate33([
|
|
|
3975
4456
|
}
|
|
3976
4457
|
}
|
|
3977
4458
|
}),
|
|
3978
|
-
|
|
4459
|
+
_ts_metadata38("design:type", Object)
|
|
3979
4460
|
], StatusListEntity.prototype, "issuer", void 0);
|
|
3980
|
-
|
|
3981
|
-
|
|
4461
|
+
_ts_decorate39([
|
|
4462
|
+
Column36("simple-enum", {
|
|
3982
4463
|
name: "driverType",
|
|
3983
4464
|
enum: StatusListDriverType,
|
|
3984
4465
|
nullable: false,
|
|
3985
4466
|
default: StatusListDriverType.AGENT_TYPEORM
|
|
3986
4467
|
}),
|
|
3987
|
-
|
|
4468
|
+
_ts_metadata38("design:type", typeof StatusListDriverType === "undefined" ? Object : StatusListDriverType)
|
|
3988
4469
|
], StatusListEntity.prototype, "driverType", void 0);
|
|
3989
|
-
|
|
3990
|
-
|
|
4470
|
+
_ts_decorate39([
|
|
4471
|
+
Column36("simple-enum", {
|
|
3991
4472
|
name: "credentialIdMode",
|
|
3992
4473
|
enum: StatusListCredentialIdMode,
|
|
3993
4474
|
nullable: false,
|
|
3994
4475
|
default: StatusListCredentialIdMode.ISSUANCE
|
|
3995
4476
|
}),
|
|
3996
|
-
|
|
4477
|
+
_ts_metadata38("design:type", typeof StatusListCredentialIdMode === "undefined" ? Object : StatusListCredentialIdMode)
|
|
3997
4478
|
], StatusListEntity.prototype, "credentialIdMode", void 0);
|
|
3998
|
-
|
|
3999
|
-
|
|
4479
|
+
_ts_decorate39([
|
|
4480
|
+
Column36({
|
|
4000
4481
|
type: "varchar",
|
|
4001
4482
|
name: "proofFormat",
|
|
4002
4483
|
enum: [
|
|
@@ -4006,10 +4487,10 @@ _ts_decorate33([
|
|
|
4006
4487
|
nullable: false,
|
|
4007
4488
|
default: "lds"
|
|
4008
4489
|
}),
|
|
4009
|
-
|
|
4490
|
+
_ts_metadata38("design:type", typeof CredentialProofFormat === "undefined" ? Object : CredentialProofFormat)
|
|
4010
4491
|
], StatusListEntity.prototype, "proofFormat", void 0);
|
|
4011
|
-
|
|
4012
|
-
|
|
4492
|
+
_ts_decorate39([
|
|
4493
|
+
Column36({
|
|
4013
4494
|
name: "statusListCredential",
|
|
4014
4495
|
type: "text",
|
|
4015
4496
|
nullable: true,
|
|
@@ -4029,10 +4510,10 @@ _ts_decorate33([
|
|
|
4029
4510
|
}
|
|
4030
4511
|
}
|
|
4031
4512
|
}),
|
|
4032
|
-
|
|
4513
|
+
_ts_metadata38("design:type", typeof StatusListCredential === "undefined" ? Object : StatusListCredential)
|
|
4033
4514
|
], StatusListEntity.prototype, "statusListCredential", void 0);
|
|
4034
|
-
StatusListEntity =
|
|
4035
|
-
|
|
4515
|
+
StatusListEntity = _ts_decorate39([
|
|
4516
|
+
Entity32("StatusList"),
|
|
4036
4517
|
Unique("UQ_correlationId", [
|
|
4037
4518
|
"correlationId"
|
|
4038
4519
|
]),
|
|
@@ -4052,8 +4533,8 @@ var StatusList2021Entity = class extends StatusListEntity {
|
|
|
4052
4533
|
statusPurpose;
|
|
4053
4534
|
statusListEntries;
|
|
4054
4535
|
};
|
|
4055
|
-
|
|
4056
|
-
|
|
4536
|
+
_ts_decorate39([
|
|
4537
|
+
Column36({
|
|
4057
4538
|
type: "varchar",
|
|
4058
4539
|
name: "indexingDirection",
|
|
4059
4540
|
enum: [
|
|
@@ -4062,22 +4543,22 @@ _ts_decorate33([
|
|
|
4062
4543
|
nullable: false,
|
|
4063
4544
|
default: "rightToLeft"
|
|
4064
4545
|
}),
|
|
4065
|
-
|
|
4546
|
+
_ts_metadata38("design:type", typeof StatusListIndexingDirection === "undefined" ? Object : StatusListIndexingDirection)
|
|
4066
4547
|
], StatusList2021Entity.prototype, "indexingDirection", void 0);
|
|
4067
|
-
|
|
4068
|
-
|
|
4548
|
+
_ts_decorate39([
|
|
4549
|
+
Column36({
|
|
4069
4550
|
type: "varchar",
|
|
4070
4551
|
name: "statusPurpose",
|
|
4071
4552
|
nullable: false,
|
|
4072
4553
|
default: "revocation"
|
|
4073
4554
|
}),
|
|
4074
|
-
|
|
4555
|
+
_ts_metadata38("design:type", typeof StatusPurpose2021 === "undefined" ? Object : StatusPurpose2021)
|
|
4075
4556
|
], StatusList2021Entity.prototype, "statusPurpose", void 0);
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4557
|
+
_ts_decorate39([
|
|
4558
|
+
OneToMany10((type) => StatusListEntryEntity, (entry) => entry.statusList),
|
|
4559
|
+
_ts_metadata38("design:type", Array)
|
|
4079
4560
|
], StatusList2021Entity.prototype, "statusListEntries", void 0);
|
|
4080
|
-
StatusList2021Entity =
|
|
4561
|
+
StatusList2021Entity = _ts_decorate39([
|
|
4081
4562
|
ChildEntity7(StatusListType.StatusList2021)
|
|
4082
4563
|
], StatusList2021Entity);
|
|
4083
4564
|
var OAuthStatusListEntity = class extends StatusListEntity {
|
|
@@ -4087,23 +4568,23 @@ var OAuthStatusListEntity = class extends StatusListEntity {
|
|
|
4087
4568
|
bitsPerStatus;
|
|
4088
4569
|
expiresAt;
|
|
4089
4570
|
};
|
|
4090
|
-
|
|
4091
|
-
|
|
4571
|
+
_ts_decorate39([
|
|
4572
|
+
Column36({
|
|
4092
4573
|
type: "integer",
|
|
4093
4574
|
name: "bitsPerStatus",
|
|
4094
4575
|
nullable: false
|
|
4095
4576
|
}),
|
|
4096
|
-
|
|
4577
|
+
_ts_metadata38("design:type", Number)
|
|
4097
4578
|
], OAuthStatusListEntity.prototype, "bitsPerStatus", void 0);
|
|
4098
|
-
|
|
4099
|
-
|
|
4579
|
+
_ts_decorate39([
|
|
4580
|
+
Column36({
|
|
4100
4581
|
name: "expiresAt",
|
|
4101
4582
|
nullable: true,
|
|
4102
|
-
type:
|
|
4583
|
+
type: typeOrmDateTime19()
|
|
4103
4584
|
}),
|
|
4104
|
-
|
|
4585
|
+
_ts_metadata38("design:type", typeof Date === "undefined" ? Object : Date)
|
|
4105
4586
|
], OAuthStatusListEntity.prototype, "expiresAt", void 0);
|
|
4106
|
-
OAuthStatusListEntity =
|
|
4587
|
+
OAuthStatusListEntity = _ts_decorate39([
|
|
4107
4588
|
ChildEntity7(StatusListType.OAuthStatusList)
|
|
4108
4589
|
], OAuthStatusListEntity);
|
|
4109
4590
|
var BitstringStatusListEntity = class extends StatusListEntity {
|
|
@@ -4117,8 +4598,8 @@ var BitstringStatusListEntity = class extends StatusListEntity {
|
|
|
4117
4598
|
ttl;
|
|
4118
4599
|
statusListEntries;
|
|
4119
4600
|
};
|
|
4120
|
-
|
|
4121
|
-
|
|
4601
|
+
_ts_decorate39([
|
|
4602
|
+
Column36({
|
|
4122
4603
|
type: "varchar",
|
|
4123
4604
|
name: "statusPurpose",
|
|
4124
4605
|
nullable: false,
|
|
@@ -4137,61 +4618,61 @@ _ts_decorate33([
|
|
|
4137
4618
|
}
|
|
4138
4619
|
}
|
|
4139
4620
|
}),
|
|
4140
|
-
|
|
4621
|
+
_ts_metadata38("design:type", Object)
|
|
4141
4622
|
], BitstringStatusListEntity.prototype, "statusPurpose", void 0);
|
|
4142
|
-
|
|
4143
|
-
|
|
4623
|
+
_ts_decorate39([
|
|
4624
|
+
Column36({
|
|
4144
4625
|
type: "integer",
|
|
4145
4626
|
name: "bitsPerStatus",
|
|
4146
4627
|
nullable: false
|
|
4147
4628
|
}),
|
|
4148
|
-
|
|
4629
|
+
_ts_metadata38("design:type", Number)
|
|
4149
4630
|
], BitstringStatusListEntity.prototype, "bitsPerStatus", void 0);
|
|
4150
|
-
|
|
4151
|
-
|
|
4631
|
+
_ts_decorate39([
|
|
4632
|
+
Column36({
|
|
4152
4633
|
name: "validFrom",
|
|
4153
4634
|
nullable: true,
|
|
4154
|
-
type:
|
|
4635
|
+
type: typeOrmDateTime19()
|
|
4155
4636
|
}),
|
|
4156
|
-
|
|
4637
|
+
_ts_metadata38("design:type", typeof Date === "undefined" ? Object : Date)
|
|
4157
4638
|
], BitstringStatusListEntity.prototype, "validFrom", void 0);
|
|
4158
|
-
|
|
4159
|
-
|
|
4639
|
+
_ts_decorate39([
|
|
4640
|
+
Column36({
|
|
4160
4641
|
name: "validUntil",
|
|
4161
4642
|
nullable: true,
|
|
4162
|
-
type:
|
|
4643
|
+
type: typeOrmDateTime19()
|
|
4163
4644
|
}),
|
|
4164
|
-
|
|
4645
|
+
_ts_metadata38("design:type", typeof Date === "undefined" ? Object : Date)
|
|
4165
4646
|
], BitstringStatusListEntity.prototype, "validUntil", void 0);
|
|
4166
|
-
|
|
4167
|
-
|
|
4647
|
+
_ts_decorate39([
|
|
4648
|
+
Column36({
|
|
4168
4649
|
type: "integer",
|
|
4169
4650
|
name: "ttl",
|
|
4170
4651
|
nullable: true
|
|
4171
4652
|
}),
|
|
4172
|
-
|
|
4653
|
+
_ts_metadata38("design:type", Number)
|
|
4173
4654
|
], BitstringStatusListEntity.prototype, "ttl", void 0);
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4655
|
+
_ts_decorate39([
|
|
4656
|
+
OneToMany10((type) => BitstringStatusListEntryEntity, (entry) => entry.statusList),
|
|
4657
|
+
_ts_metadata38("design:type", Array)
|
|
4177
4658
|
], BitstringStatusListEntity.prototype, "statusListEntries", void 0);
|
|
4178
|
-
BitstringStatusListEntity =
|
|
4659
|
+
BitstringStatusListEntity = _ts_decorate39([
|
|
4179
4660
|
ChildEntity7(StatusListType.BitstringStatusList)
|
|
4180
4661
|
], BitstringStatusListEntity);
|
|
4181
4662
|
|
|
4182
4663
|
// src/entities/statusList/StatusList2021EntryEntity.ts
|
|
4183
|
-
function
|
|
4664
|
+
function _ts_decorate40(decorators, target, key, desc) {
|
|
4184
4665
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4185
4666
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4186
4667
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4187
4668
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4188
4669
|
}
|
|
4189
|
-
__name(
|
|
4190
|
-
function
|
|
4670
|
+
__name(_ts_decorate40, "_ts_decorate");
|
|
4671
|
+
function _ts_metadata39(k, v) {
|
|
4191
4672
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4192
4673
|
}
|
|
4193
|
-
__name(
|
|
4194
|
-
var StatusListEntryEntity = class extends
|
|
4674
|
+
__name(_ts_metadata39, "_ts_metadata");
|
|
4675
|
+
var StatusListEntryEntity = class extends BaseEntity31 {
|
|
4195
4676
|
static {
|
|
4196
4677
|
__name(this, "StatusListEntryEntity");
|
|
4197
4678
|
}
|
|
@@ -4203,7 +4684,7 @@ var StatusListEntryEntity = class extends BaseEntity25 {
|
|
|
4203
4684
|
entryCorrelationId;
|
|
4204
4685
|
value;
|
|
4205
4686
|
};
|
|
4206
|
-
|
|
4687
|
+
_ts_decorate40([
|
|
4207
4688
|
PrimaryColumn4({
|
|
4208
4689
|
name: "statusListId",
|
|
4209
4690
|
type: "varchar",
|
|
@@ -4213,9 +4694,9 @@ _ts_decorate34([
|
|
|
4213
4694
|
Validate10(IsNonEmptyStringConstraint, {
|
|
4214
4695
|
message: "Status list id is required"
|
|
4215
4696
|
}),
|
|
4216
|
-
|
|
4697
|
+
_ts_metadata39("design:type", String)
|
|
4217
4698
|
], StatusListEntryEntity.prototype, "statusListId", void 0);
|
|
4218
|
-
|
|
4699
|
+
_ts_decorate40([
|
|
4219
4700
|
PrimaryColumn4({
|
|
4220
4701
|
name: "statusListIndex",
|
|
4221
4702
|
type: "integer",
|
|
@@ -4225,55 +4706,55 @@ _ts_decorate34([
|
|
|
4225
4706
|
Validate10(IsNonEmptyStringConstraint, {
|
|
4226
4707
|
message: "Status list index is required"
|
|
4227
4708
|
}),
|
|
4228
|
-
|
|
4709
|
+
_ts_metadata39("design:type", Number)
|
|
4229
4710
|
], StatusListEntryEntity.prototype, "statusListIndex", void 0);
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4711
|
+
_ts_decorate40([
|
|
4712
|
+
ManyToOne15(() => StatusList2021Entity, (statusList) => statusList.statusListEntries),
|
|
4713
|
+
JoinColumn17({
|
|
4233
4714
|
name: "statusListId"
|
|
4234
4715
|
}),
|
|
4235
|
-
|
|
4716
|
+
_ts_metadata39("design:type", typeof StatusListEntity === "undefined" ? Object : StatusListEntity)
|
|
4236
4717
|
], StatusListEntryEntity.prototype, "statusList", void 0);
|
|
4237
|
-
|
|
4238
|
-
|
|
4718
|
+
_ts_decorate40([
|
|
4719
|
+
Column37({
|
|
4239
4720
|
name: "credentialId",
|
|
4240
4721
|
type: "text",
|
|
4241
4722
|
nullable: true
|
|
4242
4723
|
}),
|
|
4243
|
-
|
|
4724
|
+
_ts_metadata39("design:type", String)
|
|
4244
4725
|
], StatusListEntryEntity.prototype, "credentialId", void 0);
|
|
4245
|
-
|
|
4246
|
-
|
|
4726
|
+
_ts_decorate40([
|
|
4727
|
+
Column37({
|
|
4247
4728
|
name: "credentialHash",
|
|
4248
4729
|
length: 128,
|
|
4249
4730
|
type: "varchar",
|
|
4250
4731
|
nullable: true,
|
|
4251
4732
|
unique: false
|
|
4252
4733
|
}),
|
|
4253
|
-
|
|
4734
|
+
_ts_metadata39("design:type", String)
|
|
4254
4735
|
], StatusListEntryEntity.prototype, "credentialHash", void 0);
|
|
4255
|
-
|
|
4256
|
-
|
|
4736
|
+
_ts_decorate40([
|
|
4737
|
+
Column37({
|
|
4257
4738
|
name: "correlationId",
|
|
4258
4739
|
length: 255,
|
|
4259
4740
|
type: "varchar",
|
|
4260
4741
|
nullable: true,
|
|
4261
4742
|
unique: false
|
|
4262
4743
|
}),
|
|
4263
|
-
|
|
4744
|
+
_ts_metadata39("design:type", String)
|
|
4264
4745
|
], StatusListEntryEntity.prototype, "entryCorrelationId", void 0);
|
|
4265
|
-
|
|
4266
|
-
|
|
4746
|
+
_ts_decorate40([
|
|
4747
|
+
Column37({
|
|
4267
4748
|
name: "value",
|
|
4268
4749
|
length: 50,
|
|
4269
4750
|
type: "varchar",
|
|
4270
4751
|
nullable: true,
|
|
4271
4752
|
unique: false
|
|
4272
4753
|
}),
|
|
4273
|
-
|
|
4754
|
+
_ts_metadata39("design:type", String)
|
|
4274
4755
|
], StatusListEntryEntity.prototype, "value", void 0);
|
|
4275
|
-
StatusListEntryEntity =
|
|
4276
|
-
|
|
4756
|
+
StatusListEntryEntity = _ts_decorate40([
|
|
4757
|
+
Entity33("StatusListEntry"),
|
|
4277
4758
|
TableInheritance5({
|
|
4278
4759
|
column: {
|
|
4279
4760
|
type: "varchar",
|
|
@@ -4283,17 +4764,17 @@ StatusListEntryEntity = _ts_decorate34([
|
|
|
4283
4764
|
], StatusListEntryEntity);
|
|
4284
4765
|
|
|
4285
4766
|
// src/entities/statusList/BitstringStatusListEntryEntity.ts
|
|
4286
|
-
function
|
|
4767
|
+
function _ts_decorate41(decorators, target, key, desc) {
|
|
4287
4768
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4288
4769
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4289
4770
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4290
4771
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4291
4772
|
}
|
|
4292
|
-
__name(
|
|
4293
|
-
function
|
|
4773
|
+
__name(_ts_decorate41, "_ts_decorate");
|
|
4774
|
+
function _ts_metadata40(k, v) {
|
|
4294
4775
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4295
4776
|
}
|
|
4296
|
-
__name(
|
|
4777
|
+
__name(_ts_metadata40, "_ts_metadata");
|
|
4297
4778
|
var BitstringStatusListEntryEntity = class extends StatusListEntryEntity {
|
|
4298
4779
|
static {
|
|
4299
4780
|
__name(this, "BitstringStatusListEntryEntity");
|
|
@@ -4303,25 +4784,25 @@ var BitstringStatusListEntryEntity = class extends StatusListEntryEntity {
|
|
|
4303
4784
|
statusMessage;
|
|
4304
4785
|
statusReference;
|
|
4305
4786
|
};
|
|
4306
|
-
|
|
4307
|
-
|
|
4787
|
+
_ts_decorate41([
|
|
4788
|
+
Column38({
|
|
4308
4789
|
type: "varchar",
|
|
4309
4790
|
name: "statusPurpose",
|
|
4310
4791
|
nullable: false
|
|
4311
4792
|
}),
|
|
4312
|
-
|
|
4793
|
+
_ts_metadata40("design:type", String)
|
|
4313
4794
|
], BitstringStatusListEntryEntity.prototype, "statusPurpose", void 0);
|
|
4314
|
-
|
|
4315
|
-
|
|
4795
|
+
_ts_decorate41([
|
|
4796
|
+
Column38({
|
|
4316
4797
|
type: "integer",
|
|
4317
4798
|
name: "bitsPerStatus",
|
|
4318
4799
|
nullable: true,
|
|
4319
4800
|
default: 1
|
|
4320
4801
|
}),
|
|
4321
|
-
|
|
4802
|
+
_ts_metadata40("design:type", Number)
|
|
4322
4803
|
], BitstringStatusListEntryEntity.prototype, "bitsPerStatus", void 0);
|
|
4323
|
-
|
|
4324
|
-
|
|
4804
|
+
_ts_decorate41([
|
|
4805
|
+
Column38({
|
|
4325
4806
|
type: "text",
|
|
4326
4807
|
name: "statusMessage",
|
|
4327
4808
|
nullable: true,
|
|
@@ -4340,10 +4821,10 @@ _ts_decorate35([
|
|
|
4340
4821
|
}
|
|
4341
4822
|
}
|
|
4342
4823
|
}),
|
|
4343
|
-
|
|
4824
|
+
_ts_metadata40("design:type", typeof Array === "undefined" ? Object : Array)
|
|
4344
4825
|
], BitstringStatusListEntryEntity.prototype, "statusMessage", void 0);
|
|
4345
|
-
|
|
4346
|
-
|
|
4826
|
+
_ts_decorate41([
|
|
4827
|
+
Column38({
|
|
4347
4828
|
type: "text",
|
|
4348
4829
|
name: "statusReference",
|
|
4349
4830
|
nullable: true,
|
|
@@ -4368,9 +4849,9 @@ _ts_decorate35([
|
|
|
4368
4849
|
}
|
|
4369
4850
|
}
|
|
4370
4851
|
}),
|
|
4371
|
-
|
|
4852
|
+
_ts_metadata40("design:type", Object)
|
|
4372
4853
|
], BitstringStatusListEntryEntity.prototype, "statusReference", void 0);
|
|
4373
|
-
BitstringStatusListEntryEntity =
|
|
4854
|
+
BitstringStatusListEntryEntity = _ts_decorate41([
|
|
4374
4855
|
ChildEntity8("bitstring")
|
|
4375
4856
|
], BitstringStatusListEntryEntity);
|
|
4376
4857
|
|
|
@@ -7177,11 +7658,274 @@ var cleanFilter = /* @__PURE__ */ __name((filter) => {
|
|
|
7177
7658
|
});
|
|
7178
7659
|
}, "cleanFilter");
|
|
7179
7660
|
|
|
7661
|
+
// src/credentialDesign/CredentialDesignStore.ts
|
|
7662
|
+
import { AbstractCredentialDesignStore } from "@sphereon/ssi-sdk.data-store-types";
|
|
7663
|
+
import Debug8 from "debug";
|
|
7664
|
+
|
|
7665
|
+
// src/utils/credentialDesign/MappingUtils.ts
|
|
7666
|
+
var credentialDesignFrom = /* @__PURE__ */ __name((entity) => {
|
|
7667
|
+
const result = {
|
|
7668
|
+
id: entity.id,
|
|
7669
|
+
label: entity.name,
|
|
7670
|
+
tenantId: entity.tenantId,
|
|
7671
|
+
metaDataKeys: entity.metaDataKeys?.map((key) => metaDataKeyFrom(key)) ?? [],
|
|
7672
|
+
schemaDefinitions: entity.schemaDefinitions?.map((schema) => schemaDefinitionFrom(schema)) ?? [],
|
|
7673
|
+
branding: entity.credentialDesignBranding ? credentialDesignBrandingFrom(entity.credentialDesignBranding) : void 0
|
|
7674
|
+
};
|
|
7675
|
+
return replaceNullWithUndefined(result);
|
|
7676
|
+
}, "credentialDesignFrom");
|
|
7677
|
+
var metaDataKeyFrom = /* @__PURE__ */ __name((entity) => {
|
|
7678
|
+
const result = {
|
|
7679
|
+
id: entity.id,
|
|
7680
|
+
key: entity.key,
|
|
7681
|
+
valueType: entity.valueType,
|
|
7682
|
+
metaDataValues: entity.metaDataValues?.map((value) => metaDataValueFrom(value)) ?? []
|
|
7683
|
+
};
|
|
7684
|
+
return replaceNullWithUndefined(result);
|
|
7685
|
+
}, "metaDataKeyFrom");
|
|
7686
|
+
var metaDataValueFrom = /* @__PURE__ */ __name((entity) => {
|
|
7687
|
+
const result = {
|
|
7688
|
+
id: entity.id,
|
|
7689
|
+
index: entity.index,
|
|
7690
|
+
textValue: entity.textValue,
|
|
7691
|
+
numberValue: entity.numberValue,
|
|
7692
|
+
booleanValue: entity.booleanValue,
|
|
7693
|
+
timestampValue: entity.timestampValue
|
|
7694
|
+
};
|
|
7695
|
+
return replaceNullWithUndefined(result);
|
|
7696
|
+
}, "metaDataValueFrom");
|
|
7697
|
+
var schemaDefinitionFrom = /* @__PURE__ */ __name((entity) => {
|
|
7698
|
+
const result = {
|
|
7699
|
+
id: entity.id,
|
|
7700
|
+
tenantId: entity.tenantId,
|
|
7701
|
+
extendsId: entity.extendsId,
|
|
7702
|
+
correlationId: entity.correlationId,
|
|
7703
|
+
schemaType: entity.schemaType,
|
|
7704
|
+
entityType: entity.entityType,
|
|
7705
|
+
schema: entity.schema
|
|
7706
|
+
};
|
|
7707
|
+
return replaceNullWithUndefined(result);
|
|
7708
|
+
}, "schemaDefinitionFrom");
|
|
7709
|
+
var credentialDesignBrandingFrom = /* @__PURE__ */ __name((entity) => {
|
|
7710
|
+
const result = {
|
|
7711
|
+
id: entity.id,
|
|
7712
|
+
textColor: entity.textColor,
|
|
7713
|
+
backgroundColor: entity.backgroundColor,
|
|
7714
|
+
logo: entity.logo ? imageAttributesFrom(entity.logo) : void 0,
|
|
7715
|
+
backgroundImage: entity.backgroundImage ? imageAttributesFrom(entity.backgroundImage) : void 0
|
|
7716
|
+
};
|
|
7717
|
+
return replaceNullWithUndefined(result);
|
|
7718
|
+
}, "credentialDesignBrandingFrom");
|
|
7719
|
+
var imageAttributesFrom = /* @__PURE__ */ __name((entity) => {
|
|
7720
|
+
const result = {
|
|
7721
|
+
id: entity.id,
|
|
7722
|
+
uri: entity.uri,
|
|
7723
|
+
dataUri: entity.dataUri,
|
|
7724
|
+
mediaType: entity.mediaType,
|
|
7725
|
+
alt: entity.alt,
|
|
7726
|
+
dimensions: entity.dimensions ? {
|
|
7727
|
+
id: entity.dimensions.id,
|
|
7728
|
+
width: entity.dimensions.width,
|
|
7729
|
+
height: entity.dimensions.height
|
|
7730
|
+
} : void 0
|
|
7731
|
+
};
|
|
7732
|
+
return replaceNullWithUndefined(result);
|
|
7733
|
+
}, "imageAttributesFrom");
|
|
7734
|
+
var metaDataKeyEntityFrom = /* @__PURE__ */ __name((input) => {
|
|
7735
|
+
const keyEntity = new MetaDataKeyEntity();
|
|
7736
|
+
keyEntity.key = input.key;
|
|
7737
|
+
keyEntity.valueType = input.valueType;
|
|
7738
|
+
keyEntity.metaDataValues = input.metaDataValues.map((valInput) => metaDataValueEntityFrom(valInput));
|
|
7739
|
+
return keyEntity;
|
|
7740
|
+
}, "metaDataKeyEntityFrom");
|
|
7741
|
+
var metaDataValueEntityFrom = /* @__PURE__ */ __name((input) => {
|
|
7742
|
+
const valEntity = new MetaDataValueEntity();
|
|
7743
|
+
valEntity.index = input.index;
|
|
7744
|
+
valEntity.textValue = input.textValue;
|
|
7745
|
+
valEntity.numberValue = input.numberValue;
|
|
7746
|
+
valEntity.booleanValue = input.booleanValue;
|
|
7747
|
+
valEntity.timestampValue = input.timestampValue;
|
|
7748
|
+
return valEntity;
|
|
7749
|
+
}, "metaDataValueEntityFrom");
|
|
7750
|
+
var schemaDefinitionEntityFrom = /* @__PURE__ */ __name((input) => {
|
|
7751
|
+
const schemaEntity = new SchemaDefinitionEntity();
|
|
7752
|
+
schemaEntity.tenantId = input.tenantId;
|
|
7753
|
+
schemaEntity.extendsId = input.extendsId;
|
|
7754
|
+
schemaEntity.correlationId = input.correlationId;
|
|
7755
|
+
schemaEntity.schemaType = input.schemaType;
|
|
7756
|
+
schemaEntity.entityType = input.entityType;
|
|
7757
|
+
schemaEntity.schema = input.schema;
|
|
7758
|
+
return schemaEntity;
|
|
7759
|
+
}, "schemaDefinitionEntityFrom");
|
|
7760
|
+
var credentialDesignBrandingEntityFrom = /* @__PURE__ */ __name((input) => {
|
|
7761
|
+
const brandingEntity = new CredentialDesignBrandingEntity();
|
|
7762
|
+
brandingEntity.textColor = input.textColor;
|
|
7763
|
+
brandingEntity.backgroundColor = input.backgroundColor;
|
|
7764
|
+
if (input.logo) {
|
|
7765
|
+
brandingEntity.logo = imageAttributesEntityFrom(input.logo);
|
|
7766
|
+
}
|
|
7767
|
+
if (input.backgroundImage) {
|
|
7768
|
+
brandingEntity.backgroundImage = imageAttributesEntityFrom(input.backgroundImage);
|
|
7769
|
+
}
|
|
7770
|
+
return brandingEntity;
|
|
7771
|
+
}, "credentialDesignBrandingEntityFrom");
|
|
7772
|
+
|
|
7773
|
+
// src/credentialDesign/CredentialDesignStore.ts
|
|
7774
|
+
var debug8 = Debug8("sphereon:ssi-sdk:credential-design-store");
|
|
7775
|
+
var CredentialDesignStore = class extends AbstractCredentialDesignStore {
|
|
7776
|
+
static {
|
|
7777
|
+
__name(this, "CredentialDesignStore");
|
|
7778
|
+
}
|
|
7779
|
+
dbConnection;
|
|
7780
|
+
constructor(dbConnection) {
|
|
7781
|
+
super();
|
|
7782
|
+
this.dbConnection = dbConnection;
|
|
7783
|
+
}
|
|
7784
|
+
getCredentialDesign = /* @__PURE__ */ __name(async (args) => {
|
|
7785
|
+
const { credentialDesignId } = args;
|
|
7786
|
+
debug8("getCredentialDesign", credentialDesignId);
|
|
7787
|
+
const repo = (await this.dbConnection).getRepository(MetaDataSetEntity);
|
|
7788
|
+
const result = await repo.findOne({
|
|
7789
|
+
where: {
|
|
7790
|
+
id: credentialDesignId
|
|
7791
|
+
}
|
|
7792
|
+
});
|
|
7793
|
+
if (!result) {
|
|
7794
|
+
return Promise.reject(Error(`No credential design found for id: ${credentialDesignId}`));
|
|
7795
|
+
}
|
|
7796
|
+
return credentialDesignFrom(result);
|
|
7797
|
+
}, "getCredentialDesign");
|
|
7798
|
+
getCredentialDesigns = /* @__PURE__ */ __name(async (args) => {
|
|
7799
|
+
debug8("getCredentialDesigns", args);
|
|
7800
|
+
const repo = (await this.dbConnection).getRepository(MetaDataSetEntity);
|
|
7801
|
+
const where = args?.filter?.tenantId ? {
|
|
7802
|
+
tenantId: args.filter.tenantId
|
|
7803
|
+
} : void 0;
|
|
7804
|
+
const results = await repo.find({
|
|
7805
|
+
where
|
|
7806
|
+
});
|
|
7807
|
+
return results.map(credentialDesignFrom);
|
|
7808
|
+
}, "getCredentialDesigns");
|
|
7809
|
+
addCredentialDesign = /* @__PURE__ */ __name(async (args) => {
|
|
7810
|
+
debug8("addCredentialDesign", args);
|
|
7811
|
+
const dataSource = await this.dbConnection;
|
|
7812
|
+
return dataSource.transaction(async (transactionalEntityManager) => {
|
|
7813
|
+
const metaDataSet = new MetaDataSetEntity();
|
|
7814
|
+
metaDataSet.name = args.name;
|
|
7815
|
+
metaDataSet.tenantId = args.tenantId;
|
|
7816
|
+
metaDataSet.metaDataKeys = [];
|
|
7817
|
+
metaDataSet.schemaDefinitions = [];
|
|
7818
|
+
const { design } = args;
|
|
7819
|
+
if (design) {
|
|
7820
|
+
if (design.metaDataKeys) {
|
|
7821
|
+
metaDataSet.metaDataKeys = design.metaDataKeys.map(metaDataKeyEntityFrom);
|
|
7822
|
+
}
|
|
7823
|
+
if (design.schemaDefinitions) {
|
|
7824
|
+
metaDataSet.schemaDefinitions = design.schemaDefinitions.map(schemaDefinitionEntityFrom);
|
|
7825
|
+
}
|
|
7826
|
+
if (design.branding) {
|
|
7827
|
+
metaDataSet.credentialDesignBranding = credentialDesignBrandingEntityFrom(design.branding);
|
|
7828
|
+
}
|
|
7829
|
+
}
|
|
7830
|
+
const saved = await transactionalEntityManager.save(MetaDataSetEntity, metaDataSet);
|
|
7831
|
+
return credentialDesignFrom(saved);
|
|
7832
|
+
});
|
|
7833
|
+
}, "addCredentialDesign");
|
|
7834
|
+
updateCredentialDesign = /* @__PURE__ */ __name(async (args) => {
|
|
7835
|
+
debug8("updateCredentialDesign", args);
|
|
7836
|
+
const dataSource = await this.dbConnection;
|
|
7837
|
+
return dataSource.transaction(async (transactionalEntityManager) => {
|
|
7838
|
+
const existing = await transactionalEntityManager.findOne(MetaDataSetEntity, {
|
|
7839
|
+
where: {
|
|
7840
|
+
id: args.credentialDesignId
|
|
7841
|
+
}
|
|
7842
|
+
});
|
|
7843
|
+
if (!existing) {
|
|
7844
|
+
return Promise.reject(Error(`No credential design found for id: ${args.credentialDesignId}`));
|
|
7845
|
+
}
|
|
7846
|
+
if (args.name !== void 0) {
|
|
7847
|
+
existing.name = args.name;
|
|
7848
|
+
}
|
|
7849
|
+
if (args.tenantId !== void 0) {
|
|
7850
|
+
existing.tenantId = args.tenantId;
|
|
7851
|
+
}
|
|
7852
|
+
const { design } = args;
|
|
7853
|
+
if (design) {
|
|
7854
|
+
if (design.metaDataKeys !== void 0) {
|
|
7855
|
+
await this.replaceMetaDataKeys(transactionalEntityManager, existing, design.metaDataKeys);
|
|
7856
|
+
}
|
|
7857
|
+
if (design.schemaDefinitions !== void 0) {
|
|
7858
|
+
await this.replaceSchemaDefinitions(transactionalEntityManager, existing, design.schemaDefinitions);
|
|
7859
|
+
}
|
|
7860
|
+
if (design.branding !== void 0) {
|
|
7861
|
+
await this.replaceBranding(transactionalEntityManager, existing, design.branding);
|
|
7862
|
+
}
|
|
7863
|
+
}
|
|
7864
|
+
const saved = await transactionalEntityManager.save(MetaDataSetEntity, existing);
|
|
7865
|
+
return credentialDesignFrom(saved);
|
|
7866
|
+
});
|
|
7867
|
+
}, "updateCredentialDesign");
|
|
7868
|
+
removeCredentialDesign = /* @__PURE__ */ __name(async (args) => {
|
|
7869
|
+
debug8("removeCredentialDesign", args);
|
|
7870
|
+
const repo = (await this.dbConnection).getRepository(MetaDataSetEntity);
|
|
7871
|
+
const existing = await repo.findOne({
|
|
7872
|
+
where: {
|
|
7873
|
+
id: args.credentialDesignId
|
|
7874
|
+
}
|
|
7875
|
+
});
|
|
7876
|
+
if (!existing) {
|
|
7877
|
+
return Promise.reject(Error(`No credential design found for id: ${args.credentialDesignId}`));
|
|
7878
|
+
}
|
|
7879
|
+
await repo.remove(existing);
|
|
7880
|
+
}, "removeCredentialDesign");
|
|
7881
|
+
async replaceMetaDataKeys(entityManager, existing, newKeys) {
|
|
7882
|
+
if (existing.metaDataKeys?.length) {
|
|
7883
|
+
for (const key of existing.metaDataKeys) {
|
|
7884
|
+
if (key.metaDataValues?.length) {
|
|
7885
|
+
await entityManager.remove(MetaDataValueEntity, key.metaDataValues);
|
|
7886
|
+
}
|
|
7887
|
+
}
|
|
7888
|
+
await entityManager.remove(MetaDataKeyEntity, existing.metaDataKeys);
|
|
7889
|
+
}
|
|
7890
|
+
existing.metaDataKeys = newKeys.map(metaDataKeyEntityFrom);
|
|
7891
|
+
}
|
|
7892
|
+
async replaceSchemaDefinitions(entityManager, existing, newSchemas) {
|
|
7893
|
+
if (existing.schemaDefinitions?.length) {
|
|
7894
|
+
await entityManager.remove(SchemaDefinitionEntity, existing.schemaDefinitions);
|
|
7895
|
+
}
|
|
7896
|
+
existing.schemaDefinitions = newSchemas.map(schemaDefinitionEntityFrom);
|
|
7897
|
+
}
|
|
7898
|
+
async replaceBranding(entityManager, existing, newBranding) {
|
|
7899
|
+
if (existing.credentialDesignBranding) {
|
|
7900
|
+
const oldLogo = existing.credentialDesignBranding.logo;
|
|
7901
|
+
const oldBackgroundImage = existing.credentialDesignBranding.backgroundImage;
|
|
7902
|
+
await entityManager.remove(CredentialDesignBrandingEntity, existing.credentialDesignBranding);
|
|
7903
|
+
await this.removeImageEntity(entityManager, oldLogo);
|
|
7904
|
+
await this.removeImageEntity(entityManager, oldBackgroundImage);
|
|
7905
|
+
}
|
|
7906
|
+
if (newBranding) {
|
|
7907
|
+
existing.credentialDesignBranding = credentialDesignBrandingEntityFrom(newBranding);
|
|
7908
|
+
} else {
|
|
7909
|
+
existing.credentialDesignBranding = void 0;
|
|
7910
|
+
}
|
|
7911
|
+
}
|
|
7912
|
+
async removeImageEntity(entityManager, image) {
|
|
7913
|
+
if (!image) {
|
|
7914
|
+
return;
|
|
7915
|
+
}
|
|
7916
|
+
const dimensions = image.dimensions;
|
|
7917
|
+
await entityManager.remove(ImageAttributesEntity, image);
|
|
7918
|
+
if (dimensions) {
|
|
7919
|
+
await entityManager.remove(ImageDimensionsEntity, dimensions);
|
|
7920
|
+
}
|
|
7921
|
+
}
|
|
7922
|
+
};
|
|
7923
|
+
|
|
7180
7924
|
// src/migrations/generic/index.ts
|
|
7181
7925
|
import { migrations as VeramoDataStoreMigrations, Entities as VeramoDataStoreEntities } from "@veramo/data-store";
|
|
7182
7926
|
|
|
7183
7927
|
// src/migrations/generic/1-CreateContacts.ts
|
|
7184
|
-
import
|
|
7928
|
+
import Debug9 from "debug";
|
|
7185
7929
|
|
|
7186
7930
|
// src/migrations/postgres/1659463079428-CreateContacts.ts
|
|
7187
7931
|
import { enablePostgresUuidExtension } from "@sphereon/ssi-sdk.core";
|
|
@@ -7290,30 +8034,30 @@ var CreateContacts1659463069549 = class {
|
|
|
7290
8034
|
};
|
|
7291
8035
|
|
|
7292
8036
|
// src/migrations/generic/1-CreateContacts.ts
|
|
7293
|
-
var
|
|
8037
|
+
var debug9 = Debug9("sphereon:ssi-sdk:migrations");
|
|
7294
8038
|
var CreateContacts1659463079429 = class {
|
|
7295
8039
|
static {
|
|
7296
8040
|
__name(this, "CreateContacts1659463079429");
|
|
7297
8041
|
}
|
|
7298
8042
|
name = "CreateContacts1659463079429";
|
|
7299
8043
|
async up(queryRunner) {
|
|
7300
|
-
|
|
8044
|
+
debug9("migration: creating contacts tables");
|
|
7301
8045
|
const dbType = queryRunner.connection.driver.options.type;
|
|
7302
8046
|
switch (dbType) {
|
|
7303
8047
|
case "postgres": {
|
|
7304
|
-
|
|
8048
|
+
debug9("using postgres migration file");
|
|
7305
8049
|
const mig = new CreateContacts1659463079428();
|
|
7306
8050
|
await mig.up(queryRunner);
|
|
7307
|
-
|
|
8051
|
+
debug9("Migration statements executed");
|
|
7308
8052
|
return;
|
|
7309
8053
|
}
|
|
7310
8054
|
case "sqlite":
|
|
7311
8055
|
case "expo":
|
|
7312
8056
|
case "react-native": {
|
|
7313
|
-
|
|
8057
|
+
debug9("using sqlite/react-native migration file");
|
|
7314
8058
|
const mig = new CreateContacts1659463069549();
|
|
7315
8059
|
await mig.up(queryRunner);
|
|
7316
|
-
|
|
8060
|
+
debug9("Migration statements executed");
|
|
7317
8061
|
return;
|
|
7318
8062
|
}
|
|
7319
8063
|
default:
|
|
@@ -7321,23 +8065,23 @@ var CreateContacts1659463079429 = class {
|
|
|
7321
8065
|
}
|
|
7322
8066
|
}
|
|
7323
8067
|
async down(queryRunner) {
|
|
7324
|
-
|
|
8068
|
+
debug9("migration: reverting contacts tables");
|
|
7325
8069
|
const dbType = queryRunner.connection.driver.options.type;
|
|
7326
8070
|
switch (dbType) {
|
|
7327
8071
|
case "postgres": {
|
|
7328
|
-
|
|
8072
|
+
debug9("using postgres migration file");
|
|
7329
8073
|
const mig = new CreateContacts1659463079428();
|
|
7330
8074
|
await mig.down(queryRunner);
|
|
7331
|
-
|
|
8075
|
+
debug9("Migration statements executed");
|
|
7332
8076
|
return;
|
|
7333
8077
|
}
|
|
7334
8078
|
case "sqlite":
|
|
7335
8079
|
case "expo":
|
|
7336
8080
|
case "react-native": {
|
|
7337
|
-
|
|
8081
|
+
debug9("using sqlite/react-native migration file");
|
|
7338
8082
|
const mig = new CreateContacts1659463069549();
|
|
7339
8083
|
await mig.down(queryRunner);
|
|
7340
|
-
|
|
8084
|
+
debug9("Migration statements executed");
|
|
7341
8085
|
return;
|
|
7342
8086
|
}
|
|
7343
8087
|
default:
|
|
@@ -7347,7 +8091,7 @@ var CreateContacts1659463079429 = class {
|
|
|
7347
8091
|
};
|
|
7348
8092
|
|
|
7349
8093
|
// src/migrations/generic/10-CreatePresentationDefinitions.ts
|
|
7350
|
-
import
|
|
8094
|
+
import Debug10 from "debug";
|
|
7351
8095
|
|
|
7352
8096
|
// src/migrations/postgres/1716475165345-CreatePresentationDefinitions.ts
|
|
7353
8097
|
var CreatePresentationDefinitions1716475165345 = class {
|
|
@@ -7401,30 +8145,30 @@ var CreatePresentationDefinitions1716475165344 = class {
|
|
|
7401
8145
|
};
|
|
7402
8146
|
|
|
7403
8147
|
// src/migrations/generic/10-CreatePresentationDefinitions.ts
|
|
7404
|
-
var
|
|
8148
|
+
var debug10 = Debug10("sphereon:ssi-sdk:migrations");
|
|
7405
8149
|
var CreatePresentationDefinitions1716533767523 = class {
|
|
7406
8150
|
static {
|
|
7407
8151
|
__name(this, "CreatePresentationDefinitions1716533767523");
|
|
7408
8152
|
}
|
|
7409
8153
|
name = "CreatePresentationDefinitionItems1716533767523";
|
|
7410
8154
|
async up(queryRunner) {
|
|
7411
|
-
|
|
8155
|
+
debug10("migration: creating machine state tables");
|
|
7412
8156
|
const dbType = queryRunner.connection.driver.options.type;
|
|
7413
8157
|
switch (dbType) {
|
|
7414
8158
|
case "postgres": {
|
|
7415
|
-
|
|
8159
|
+
debug10("using postgres migration file");
|
|
7416
8160
|
const mig = new CreatePresentationDefinitions1716475165345();
|
|
7417
8161
|
await mig.up(queryRunner);
|
|
7418
|
-
|
|
8162
|
+
debug10("Migration statements executed");
|
|
7419
8163
|
return;
|
|
7420
8164
|
}
|
|
7421
8165
|
case "sqlite":
|
|
7422
8166
|
case "expo":
|
|
7423
8167
|
case "react-native": {
|
|
7424
|
-
|
|
8168
|
+
debug10("using sqlite/react-native migration file");
|
|
7425
8169
|
const mig = new CreatePresentationDefinitions1716475165344();
|
|
7426
8170
|
await mig.up(queryRunner);
|
|
7427
|
-
|
|
8171
|
+
debug10("Migration statements executed");
|
|
7428
8172
|
return;
|
|
7429
8173
|
}
|
|
7430
8174
|
default:
|
|
@@ -7432,23 +8176,23 @@ var CreatePresentationDefinitions1716533767523 = class {
|
|
|
7432
8176
|
}
|
|
7433
8177
|
}
|
|
7434
8178
|
async down(queryRunner) {
|
|
7435
|
-
|
|
8179
|
+
debug10("migration: reverting machine state tables");
|
|
7436
8180
|
const dbType = queryRunner.connection.driver.options.type;
|
|
7437
8181
|
switch (dbType) {
|
|
7438
8182
|
case "postgres": {
|
|
7439
|
-
|
|
8183
|
+
debug10("using postgres migration file");
|
|
7440
8184
|
const mig = new CreatePresentationDefinitions1716475165345();
|
|
7441
8185
|
await mig.down(queryRunner);
|
|
7442
|
-
|
|
8186
|
+
debug10("Migration statements executed");
|
|
7443
8187
|
return;
|
|
7444
8188
|
}
|
|
7445
8189
|
case "sqlite":
|
|
7446
8190
|
case "expo":
|
|
7447
8191
|
case "react-native": {
|
|
7448
|
-
|
|
8192
|
+
debug10("using sqlite/react-native migration file");
|
|
7449
8193
|
const mig = new CreatePresentationDefinitions1716475165344();
|
|
7450
8194
|
await mig.down(queryRunner);
|
|
7451
|
-
|
|
8195
|
+
debug10("Migration statements executed");
|
|
7452
8196
|
return;
|
|
7453
8197
|
}
|
|
7454
8198
|
default:
|
|
@@ -7458,7 +8202,7 @@ var CreatePresentationDefinitions1716533767523 = class {
|
|
|
7458
8202
|
};
|
|
7459
8203
|
|
|
7460
8204
|
// src/migrations/generic/11-FixCredentialClaimsReferenceUuid.ts
|
|
7461
|
-
import
|
|
8205
|
+
import Debug11 from "debug";
|
|
7462
8206
|
|
|
7463
8207
|
// src/migrations/postgres/1685628974232-CreateIssuanceBranding.ts
|
|
7464
8208
|
import { enablePostgresUuidExtension as enablePostgresUuidExtension2 } from "@sphereon/ssi-sdk.core";
|
|
@@ -7671,30 +8415,30 @@ var FixCredentialClaimsReferencesUuidSqlite1741895822987 = class {
|
|
|
7671
8415
|
};
|
|
7672
8416
|
|
|
7673
8417
|
// src/migrations/generic/11-FixCredentialClaimsReferenceUuid.ts
|
|
7674
|
-
var
|
|
8418
|
+
var debug11 = Debug11("sphereon:ssi-sdk:migrations");
|
|
7675
8419
|
var FixCredentialClaimsReferencesUuid1741895822987 = class {
|
|
7676
8420
|
static {
|
|
7677
8421
|
__name(this, "FixCredentialClaimsReferencesUuid1741895822987");
|
|
7678
8422
|
}
|
|
7679
8423
|
name = "FixCredentialClaimsReferenceUuid1741895822987";
|
|
7680
8424
|
async up(queryRunner) {
|
|
7681
|
-
|
|
8425
|
+
debug11("migration: creating issuance branding uuid problem");
|
|
7682
8426
|
const dbType = queryRunner.connection.driver.options.type;
|
|
7683
8427
|
switch (dbType) {
|
|
7684
8428
|
case "postgres": {
|
|
7685
|
-
|
|
8429
|
+
debug11("using postgres migration file");
|
|
7686
8430
|
const mig = new FixCredentialClaimsReferencesUuidPG1741895822987();
|
|
7687
8431
|
await mig.up(queryRunner);
|
|
7688
|
-
|
|
8432
|
+
debug11("Migration statements executed");
|
|
7689
8433
|
return;
|
|
7690
8434
|
}
|
|
7691
8435
|
case "sqlite":
|
|
7692
8436
|
case "expo":
|
|
7693
8437
|
case "react-native": {
|
|
7694
|
-
|
|
8438
|
+
debug11("using sqlite/react-native migration file");
|
|
7695
8439
|
const mig = new FixCredentialClaimsReferencesUuidSqlite1741895822987();
|
|
7696
8440
|
await mig.up(queryRunner);
|
|
7697
|
-
|
|
8441
|
+
debug11("Migration statements executed");
|
|
7698
8442
|
return;
|
|
7699
8443
|
}
|
|
7700
8444
|
default:
|
|
@@ -7702,23 +8446,23 @@ var FixCredentialClaimsReferencesUuid1741895822987 = class {
|
|
|
7702
8446
|
}
|
|
7703
8447
|
}
|
|
7704
8448
|
async down(queryRunner) {
|
|
7705
|
-
|
|
8449
|
+
debug11("migration: reverting issuance branding uuid migration");
|
|
7706
8450
|
const dbType = queryRunner.connection.driver.options.type;
|
|
7707
8451
|
switch (dbType) {
|
|
7708
8452
|
case "postgres": {
|
|
7709
|
-
|
|
8453
|
+
debug11("using postgres migration file");
|
|
7710
8454
|
const mig = new CreateIssuanceBranding1685628974232();
|
|
7711
8455
|
await mig.down(queryRunner);
|
|
7712
|
-
|
|
8456
|
+
debug11("Migration statements executed");
|
|
7713
8457
|
return;
|
|
7714
8458
|
}
|
|
7715
8459
|
case "sqlite":
|
|
7716
8460
|
case "expo":
|
|
7717
8461
|
case "react-native": {
|
|
7718
|
-
|
|
8462
|
+
debug11("using sqlite/react-native migration file");
|
|
7719
8463
|
const mig = new CreateIssuanceBranding1685628973231();
|
|
7720
8464
|
await mig.down(queryRunner);
|
|
7721
|
-
|
|
8465
|
+
debug11("Migration statements executed");
|
|
7722
8466
|
return;
|
|
7723
8467
|
}
|
|
7724
8468
|
default:
|
|
@@ -7728,7 +8472,7 @@ var FixCredentialClaimsReferencesUuid1741895822987 = class {
|
|
|
7728
8472
|
};
|
|
7729
8473
|
|
|
7730
8474
|
// src/migrations/generic/12-CreateBitstringStatusList.ts
|
|
7731
|
-
import
|
|
8475
|
+
import Debug12 from "debug";
|
|
7732
8476
|
|
|
7733
8477
|
// src/migrations/postgres/1741895823000-CreateBitstringStatusList.ts
|
|
7734
8478
|
var AddBitstringStatusListEnumPG1741895823000 = class {
|
|
@@ -7912,14 +8656,14 @@ var CreateBitstringStatusListSqlite1741895823001 = class {
|
|
|
7912
8656
|
};
|
|
7913
8657
|
|
|
7914
8658
|
// src/migrations/generic/12-CreateBitstringStatusList.ts
|
|
7915
|
-
var
|
|
8659
|
+
var debug12 = Debug12("sphereon:ssi-sdk:migrations");
|
|
7916
8660
|
var AddBitstringStatusListEnum1741895823000 = class {
|
|
7917
8661
|
static {
|
|
7918
8662
|
__name(this, "AddBitstringStatusListEnum1741895823000");
|
|
7919
8663
|
}
|
|
7920
8664
|
name = "AddBitstringStatusListEnum1741895823000";
|
|
7921
8665
|
async up(queryRunner) {
|
|
7922
|
-
|
|
8666
|
+
debug12("migration: creating bitstring status list tables");
|
|
7923
8667
|
const dbType = queryRunner.connection.driver.options.type;
|
|
7924
8668
|
switch (dbType) {
|
|
7925
8669
|
case "postgres": {
|
|
@@ -7946,7 +8690,7 @@ var CreateBitstringStatusList1741895823000 = class {
|
|
|
7946
8690
|
}
|
|
7947
8691
|
name = "CreateBitstringStatusList1741895823000";
|
|
7948
8692
|
async up(queryRunner) {
|
|
7949
|
-
|
|
8693
|
+
debug12("migration: creating bitstring status list tables");
|
|
7950
8694
|
const dbType = queryRunner.connection.driver.options.type;
|
|
7951
8695
|
switch (dbType) {
|
|
7952
8696
|
case "postgres": {
|
|
@@ -7966,7 +8710,7 @@ var CreateBitstringStatusList1741895823000 = class {
|
|
|
7966
8710
|
}
|
|
7967
8711
|
}
|
|
7968
8712
|
async down(queryRunner) {
|
|
7969
|
-
|
|
8713
|
+
debug12("migration: dropping bitstring status list tables");
|
|
7970
8714
|
const dbType = queryRunner.connection.driver.options.type;
|
|
7971
8715
|
switch (dbType) {
|
|
7972
8716
|
case "postgres": {
|
|
@@ -7988,7 +8732,7 @@ var CreateBitstringStatusList1741895823000 = class {
|
|
|
7988
8732
|
};
|
|
7989
8733
|
|
|
7990
8734
|
// src/migrations/generic/13-CreateDcqlQueryItem.ts
|
|
7991
|
-
import
|
|
8735
|
+
import Debug13 from "debug";
|
|
7992
8736
|
|
|
7993
8737
|
// src/migrations/postgres/1726588800000-CreateDcqlQueryItem.ts
|
|
7994
8738
|
var CreateDcqlQueryItemPG1726588800000 = class {
|
|
@@ -8040,30 +8784,30 @@ var CreateDcqlQueryItemSQlite1726617600000 = class {
|
|
|
8040
8784
|
};
|
|
8041
8785
|
|
|
8042
8786
|
// src/migrations/generic/13-CreateDcqlQueryItem.ts
|
|
8043
|
-
var
|
|
8787
|
+
var debug13 = Debug13("sphereon:ssi-sdk:migrations");
|
|
8044
8788
|
var CreateDcqlQueryItem1726617600000 = class {
|
|
8045
8789
|
static {
|
|
8046
8790
|
__name(this, "CreateDcqlQueryItem1726617600000");
|
|
8047
8791
|
}
|
|
8048
8792
|
name = "CreateDcqlQueryItem1726617600000";
|
|
8049
8793
|
async up(queryRunner) {
|
|
8050
|
-
|
|
8794
|
+
debug13("migration: updating presentation definition item nullable fields");
|
|
8051
8795
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8052
8796
|
switch (dbType) {
|
|
8053
8797
|
case "postgres": {
|
|
8054
|
-
|
|
8798
|
+
debug13("using postgres migration file");
|
|
8055
8799
|
const mig = new CreateDcqlQueryItemPG1726588800000();
|
|
8056
8800
|
await mig.up(queryRunner);
|
|
8057
|
-
|
|
8801
|
+
debug13("Migration statements executed");
|
|
8058
8802
|
return;
|
|
8059
8803
|
}
|
|
8060
8804
|
case "sqlite":
|
|
8061
8805
|
case "expo":
|
|
8062
8806
|
case "react-native": {
|
|
8063
|
-
|
|
8807
|
+
debug13("using sqlite/react-native migration file");
|
|
8064
8808
|
const mig = new CreateDcqlQueryItemSQlite1726617600000();
|
|
8065
8809
|
await mig.up(queryRunner);
|
|
8066
|
-
|
|
8810
|
+
debug13("Migration statements executed");
|
|
8067
8811
|
return;
|
|
8068
8812
|
}
|
|
8069
8813
|
default:
|
|
@@ -8071,23 +8815,23 @@ var CreateDcqlQueryItem1726617600000 = class {
|
|
|
8071
8815
|
}
|
|
8072
8816
|
}
|
|
8073
8817
|
async down(queryRunner) {
|
|
8074
|
-
|
|
8818
|
+
debug13("migration: reverting presentation definition item nullable fields");
|
|
8075
8819
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8076
8820
|
switch (dbType) {
|
|
8077
8821
|
case "postgres": {
|
|
8078
|
-
|
|
8822
|
+
debug13("using postgres migration file");
|
|
8079
8823
|
const mig = new CreateDcqlQueryItemPG1726588800000();
|
|
8080
8824
|
await mig.down(queryRunner);
|
|
8081
|
-
|
|
8825
|
+
debug13("Migration statements executed");
|
|
8082
8826
|
return;
|
|
8083
8827
|
}
|
|
8084
8828
|
case "sqlite":
|
|
8085
8829
|
case "expo":
|
|
8086
8830
|
case "react-native": {
|
|
8087
|
-
|
|
8831
|
+
debug13("using sqlite/react-native migration file");
|
|
8088
8832
|
const mig = new CreateDcqlQueryItemSQlite1726617600000();
|
|
8089
8833
|
await mig.down(queryRunner);
|
|
8090
|
-
|
|
8834
|
+
debug13("Migration statements executed");
|
|
8091
8835
|
return;
|
|
8092
8836
|
}
|
|
8093
8837
|
default:
|
|
@@ -8097,7 +8841,7 @@ var CreateDcqlQueryItem1726617600000 = class {
|
|
|
8097
8841
|
};
|
|
8098
8842
|
|
|
8099
8843
|
// src/migrations/generic/14-AddLinkedVpFields.ts
|
|
8100
|
-
import
|
|
8844
|
+
import Debug14 from "debug";
|
|
8101
8845
|
|
|
8102
8846
|
// src/migrations/postgres/1763387280001-AddLinkedVpFields.ts
|
|
8103
8847
|
var AddLinkedVpFields1763387280001 = class {
|
|
@@ -8172,30 +8916,30 @@ var AddLinkedVpFields1763387280002 = class {
|
|
|
8172
8916
|
};
|
|
8173
8917
|
|
|
8174
8918
|
// src/migrations/generic/14-AddLinkedVpFields.ts
|
|
8175
|
-
var
|
|
8919
|
+
var debug14 = Debug14("sphereon:ssi-sdk:migrations");
|
|
8176
8920
|
var AddLinkedVpFields1763387280000 = class {
|
|
8177
8921
|
static {
|
|
8178
8922
|
__name(this, "AddLinkedVpFields1763387280000");
|
|
8179
8923
|
}
|
|
8180
8924
|
name = "AddLinkedVpFields1763387280000";
|
|
8181
8925
|
async up(queryRunner) {
|
|
8182
|
-
|
|
8926
|
+
debug14("migration: adding linked VP fields to DigitalCredential table");
|
|
8183
8927
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8184
8928
|
switch (dbType) {
|
|
8185
8929
|
case "postgres": {
|
|
8186
|
-
|
|
8930
|
+
debug14("using postgres migration file for AddLinkedVpFields");
|
|
8187
8931
|
const mig = new AddLinkedVpFields1763387280001();
|
|
8188
8932
|
await mig.up(queryRunner);
|
|
8189
|
-
|
|
8933
|
+
debug14("Postgres migration statements for AddLinkedVpFields executed");
|
|
8190
8934
|
return;
|
|
8191
8935
|
}
|
|
8192
8936
|
case "sqlite":
|
|
8193
8937
|
case "expo":
|
|
8194
8938
|
case "react-native": {
|
|
8195
|
-
|
|
8939
|
+
debug14("using sqlite/react-native migration file for AddLinkedVpFields");
|
|
8196
8940
|
const mig = new AddLinkedVpFields1763387280002();
|
|
8197
8941
|
await mig.up(queryRunner);
|
|
8198
|
-
|
|
8942
|
+
debug14("SQLite migration statements for AddLinkedVpFields executed");
|
|
8199
8943
|
return;
|
|
8200
8944
|
}
|
|
8201
8945
|
default:
|
|
@@ -8203,23 +8947,23 @@ var AddLinkedVpFields1763387280000 = class {
|
|
|
8203
8947
|
}
|
|
8204
8948
|
}
|
|
8205
8949
|
async down(queryRunner) {
|
|
8206
|
-
|
|
8950
|
+
debug14("migration: reverting linked VP fields from DigitalCredential table");
|
|
8207
8951
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8208
8952
|
switch (dbType) {
|
|
8209
8953
|
case "postgres": {
|
|
8210
|
-
|
|
8954
|
+
debug14("using postgres migration file for AddLinkedVpFields");
|
|
8211
8955
|
const mig = new AddLinkedVpFields1763387280001();
|
|
8212
8956
|
await mig.down(queryRunner);
|
|
8213
|
-
|
|
8957
|
+
debug14("Postgres migration statements for AddLinkedVpFields reverted");
|
|
8214
8958
|
return;
|
|
8215
8959
|
}
|
|
8216
8960
|
case "sqlite":
|
|
8217
8961
|
case "expo":
|
|
8218
8962
|
case "react-native": {
|
|
8219
|
-
|
|
8963
|
+
debug14("using sqlite/react-native migration file for AddLinkedVpFields");
|
|
8220
8964
|
const mig = new AddLinkedVpFields1763387280002();
|
|
8221
8965
|
await mig.down(queryRunner);
|
|
8222
|
-
|
|
8966
|
+
debug14("SQLite migration statements for AddLinkedVpFields reverted");
|
|
8223
8967
|
return;
|
|
8224
8968
|
}
|
|
8225
8969
|
default:
|
|
@@ -8229,7 +8973,7 @@ var AddLinkedVpFields1763387280000 = class {
|
|
|
8229
8973
|
};
|
|
8230
8974
|
|
|
8231
8975
|
// src/migrations/generic/15-AddBrandingState.ts
|
|
8232
|
-
import
|
|
8976
|
+
import Debug15 from "debug";
|
|
8233
8977
|
|
|
8234
8978
|
// src/migrations/postgres/1766000000000-AddBrandingState.ts
|
|
8235
8979
|
var AddBrandingStatePostgres1766000000000 = class {
|
|
@@ -8322,30 +9066,30 @@ var AddBrandingStateSqlite1766000000000 = class {
|
|
|
8322
9066
|
};
|
|
8323
9067
|
|
|
8324
9068
|
// src/migrations/generic/15-AddBrandingState.ts
|
|
8325
|
-
var
|
|
9069
|
+
var debug15 = Debug15("sphereon:ssi-sdk:migrations");
|
|
8326
9070
|
var AddBrandingState1766000000000 = class {
|
|
8327
9071
|
static {
|
|
8328
9072
|
__name(this, "AddBrandingState1766000000000");
|
|
8329
9073
|
}
|
|
8330
9074
|
name = "AddBrandingState1766000000000";
|
|
8331
9075
|
async up(queryRunner) {
|
|
8332
|
-
|
|
9076
|
+
debug15("migration: adding branding state checksum columns");
|
|
8333
9077
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8334
9078
|
switch (dbType) {
|
|
8335
9079
|
case "postgres": {
|
|
8336
|
-
|
|
9080
|
+
debug15("using postgres migration file");
|
|
8337
9081
|
const mig = new AddBrandingStatePostgres1766000000000();
|
|
8338
9082
|
await mig.up(queryRunner);
|
|
8339
|
-
|
|
9083
|
+
debug15("Migration statements executed");
|
|
8340
9084
|
return;
|
|
8341
9085
|
}
|
|
8342
9086
|
case "sqlite":
|
|
8343
9087
|
case "expo":
|
|
8344
9088
|
case "react-native": {
|
|
8345
|
-
|
|
9089
|
+
debug15("using sqlite/react-native migration file");
|
|
8346
9090
|
const mig = new AddBrandingStateSqlite1766000000000();
|
|
8347
9091
|
await mig.up(queryRunner);
|
|
8348
|
-
|
|
9092
|
+
debug15("Migration statements executed");
|
|
8349
9093
|
return;
|
|
8350
9094
|
}
|
|
8351
9095
|
default:
|
|
@@ -8353,23 +9097,23 @@ var AddBrandingState1766000000000 = class {
|
|
|
8353
9097
|
}
|
|
8354
9098
|
}
|
|
8355
9099
|
async down(queryRunner) {
|
|
8356
|
-
|
|
9100
|
+
debug15("migration: removing branding state checksum columns");
|
|
8357
9101
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8358
9102
|
switch (dbType) {
|
|
8359
9103
|
case "postgres": {
|
|
8360
|
-
|
|
9104
|
+
debug15("using postgres migration file");
|
|
8361
9105
|
const mig = new AddBrandingStatePostgres1766000000000();
|
|
8362
9106
|
await mig.down(queryRunner);
|
|
8363
|
-
|
|
9107
|
+
debug15("Migration statements executed");
|
|
8364
9108
|
return;
|
|
8365
9109
|
}
|
|
8366
9110
|
case "sqlite":
|
|
8367
9111
|
case "expo":
|
|
8368
9112
|
case "react-native": {
|
|
8369
|
-
|
|
9113
|
+
debug15("using sqlite/react-native migration file");
|
|
8370
9114
|
const mig = new AddBrandingStateSqlite1766000000000();
|
|
8371
9115
|
await mig.down(queryRunner);
|
|
8372
|
-
|
|
9116
|
+
debug15("Migration statements executed");
|
|
8373
9117
|
return;
|
|
8374
9118
|
}
|
|
8375
9119
|
default:
|
|
@@ -8379,11 +9123,11 @@ var AddBrandingState1766000000000 = class {
|
|
|
8379
9123
|
};
|
|
8380
9124
|
|
|
8381
9125
|
// src/migrations/generic/15-AddServiceMetadata.ts
|
|
8382
|
-
import
|
|
9126
|
+
import Debug18 from "debug";
|
|
8383
9127
|
|
|
8384
9128
|
// src/migrations/postgres/1764000000001-AddServiceMetadata.ts
|
|
8385
|
-
import
|
|
8386
|
-
var
|
|
9129
|
+
import Debug16 from "debug";
|
|
9130
|
+
var debug16 = Debug16("sphereon:ssi-sdk:migrations");
|
|
8387
9131
|
var AddServiceMetadata1764000000001 = class {
|
|
8388
9132
|
static {
|
|
8389
9133
|
__name(this, "AddServiceMetadata1764000000001");
|
|
@@ -8392,7 +9136,7 @@ var AddServiceMetadata1764000000001 = class {
|
|
|
8392
9136
|
async up(queryRunner) {
|
|
8393
9137
|
const table = await queryRunner.getTable("service");
|
|
8394
9138
|
if (!table) {
|
|
8395
|
-
|
|
9139
|
+
debug16("AddServiceMetadata: Skipping migration - service table does not exist. This is expected if Veramo DID Manager is not being used. If you need service metadata support, ensure Veramo migrations run before SSI-SDK migrations.");
|
|
8396
9140
|
console.warn("[SSI-SDK Migration] AddServiceMetadata: Skipping - service table does not exist (Veramo DID Manager not in use)");
|
|
8397
9141
|
return;
|
|
8398
9142
|
}
|
|
@@ -8400,7 +9144,7 @@ var AddServiceMetadata1764000000001 = class {
|
|
|
8400
9144
|
ALTER TABLE "service"
|
|
8401
9145
|
ADD COLUMN IF NOT EXISTS "metadata" jsonb
|
|
8402
9146
|
`);
|
|
8403
|
-
|
|
9147
|
+
debug16("AddServiceMetadata: Added metadata column to service table");
|
|
8404
9148
|
}
|
|
8405
9149
|
async down(queryRunner) {
|
|
8406
9150
|
const table = await queryRunner.getTable("service");
|
|
@@ -8415,8 +9159,8 @@ var AddServiceMetadata1764000000001 = class {
|
|
|
8415
9159
|
};
|
|
8416
9160
|
|
|
8417
9161
|
// src/migrations/sqlite/1764000000002-AddServiceMetadata.ts
|
|
8418
|
-
import
|
|
8419
|
-
var
|
|
9162
|
+
import Debug17 from "debug";
|
|
9163
|
+
var debug17 = Debug17("sphereon:ssi-sdk:migrations");
|
|
8420
9164
|
var AddServiceMetadata1764000000002 = class {
|
|
8421
9165
|
static {
|
|
8422
9166
|
__name(this, "AddServiceMetadata1764000000002");
|
|
@@ -8425,7 +9169,7 @@ var AddServiceMetadata1764000000002 = class {
|
|
|
8425
9169
|
async up(queryRunner) {
|
|
8426
9170
|
const table = await queryRunner.getTable("service");
|
|
8427
9171
|
if (!table) {
|
|
8428
|
-
|
|
9172
|
+
debug17("AddServiceMetadata: Skipping migration - service table does not exist. This is expected if Veramo DID Manager is not being used. If you need service metadata support, ensure Veramo migrations run before SSI-SDK migrations.");
|
|
8429
9173
|
console.warn("[SSI-SDK Migration] AddServiceMetadata: Skipping - service table does not exist (Veramo DID Manager not in use)");
|
|
8430
9174
|
return;
|
|
8431
9175
|
}
|
|
@@ -8435,7 +9179,7 @@ var AddServiceMetadata1764000000002 = class {
|
|
|
8435
9179
|
ALTER TABLE "service"
|
|
8436
9180
|
ADD COLUMN "metadata" text
|
|
8437
9181
|
`);
|
|
8438
|
-
|
|
9182
|
+
debug17("AddServiceMetadata: Added metadata column to service table");
|
|
8439
9183
|
}
|
|
8440
9184
|
}
|
|
8441
9185
|
async down(queryRunner) {
|
|
@@ -8443,30 +9187,30 @@ var AddServiceMetadata1764000000002 = class {
|
|
|
8443
9187
|
};
|
|
8444
9188
|
|
|
8445
9189
|
// src/migrations/generic/15-AddServiceMetadata.ts
|
|
8446
|
-
var
|
|
9190
|
+
var debug18 = Debug18("sphereon:ssi-sdk:migrations");
|
|
8447
9191
|
var AddServiceMetadata1764000000000 = class {
|
|
8448
9192
|
static {
|
|
8449
9193
|
__name(this, "AddServiceMetadata1764000000000");
|
|
8450
9194
|
}
|
|
8451
9195
|
name = "AddServiceMetadata1764000000000";
|
|
8452
9196
|
async up(queryRunner) {
|
|
8453
|
-
|
|
9197
|
+
debug18("migration: adding metadata column to service table");
|
|
8454
9198
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8455
9199
|
switch (dbType) {
|
|
8456
9200
|
case "postgres": {
|
|
8457
|
-
|
|
9201
|
+
debug18("using postgres migration file for AddServiceMetadata");
|
|
8458
9202
|
const mig = new AddServiceMetadata1764000000001();
|
|
8459
9203
|
await mig.up(queryRunner);
|
|
8460
|
-
|
|
9204
|
+
debug18("Postgres migration statements for AddServiceMetadata executed");
|
|
8461
9205
|
return;
|
|
8462
9206
|
}
|
|
8463
9207
|
case "sqlite":
|
|
8464
9208
|
case "expo":
|
|
8465
9209
|
case "react-native": {
|
|
8466
|
-
|
|
9210
|
+
debug18("using sqlite/react-native migration file for AddServiceMetadata");
|
|
8467
9211
|
const mig = new AddServiceMetadata1764000000002();
|
|
8468
9212
|
await mig.up(queryRunner);
|
|
8469
|
-
|
|
9213
|
+
debug18("SQLite migration statements for AddServiceMetadata executed");
|
|
8470
9214
|
return;
|
|
8471
9215
|
}
|
|
8472
9216
|
default:
|
|
@@ -8474,23 +9218,23 @@ var AddServiceMetadata1764000000000 = class {
|
|
|
8474
9218
|
}
|
|
8475
9219
|
}
|
|
8476
9220
|
async down(queryRunner) {
|
|
8477
|
-
|
|
9221
|
+
debug18("migration: reverting metadata column from service table");
|
|
8478
9222
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8479
9223
|
switch (dbType) {
|
|
8480
9224
|
case "postgres": {
|
|
8481
|
-
|
|
9225
|
+
debug18("using postgres migration file for AddServiceMetadata");
|
|
8482
9226
|
const mig = new AddServiceMetadata1764000000001();
|
|
8483
9227
|
await mig.down(queryRunner);
|
|
8484
|
-
|
|
9228
|
+
debug18("Postgres migration statements for AddServiceMetadata reverted");
|
|
8485
9229
|
return;
|
|
8486
9230
|
}
|
|
8487
9231
|
case "sqlite":
|
|
8488
9232
|
case "expo":
|
|
8489
9233
|
case "react-native": {
|
|
8490
|
-
|
|
9234
|
+
debug18("using sqlite/react-native migration file for AddServiceMetadata");
|
|
8491
9235
|
const mig = new AddServiceMetadata1764000000002();
|
|
8492
9236
|
await mig.down(queryRunner);
|
|
8493
|
-
|
|
9237
|
+
debug18("SQLite migration statements for AddServiceMetadata reverted");
|
|
8494
9238
|
return;
|
|
8495
9239
|
}
|
|
8496
9240
|
default:
|
|
@@ -8500,11 +9244,11 @@ var AddServiceMetadata1764000000000 = class {
|
|
|
8500
9244
|
};
|
|
8501
9245
|
|
|
8502
9246
|
// src/migrations/generic/16-MakeOpenIdClientSecretNullable.ts
|
|
8503
|
-
import
|
|
9247
|
+
import Debug21 from "debug";
|
|
8504
9248
|
|
|
8505
9249
|
// src/migrations/postgres/1767000000001-MakeOpenIdClientSecretNullable.ts
|
|
8506
|
-
import
|
|
8507
|
-
var
|
|
9250
|
+
import Debug19 from "debug";
|
|
9251
|
+
var debug19 = Debug19("sphereon:ssi-sdk:migrations");
|
|
8508
9252
|
var MakeOpenIdClientSecretNullable1767000000001 = class {
|
|
8509
9253
|
static {
|
|
8510
9254
|
__name(this, "MakeOpenIdClientSecretNullable1767000000001");
|
|
@@ -8513,13 +9257,13 @@ var MakeOpenIdClientSecretNullable1767000000001 = class {
|
|
|
8513
9257
|
async up(queryRunner) {
|
|
8514
9258
|
const table = await queryRunner.getTable("BaseConfig");
|
|
8515
9259
|
if (!table) {
|
|
8516
|
-
|
|
9260
|
+
debug19("MakeOpenIdClientSecretNullable: Skipping migration - BaseConfig table does not exist");
|
|
8517
9261
|
return;
|
|
8518
9262
|
}
|
|
8519
9263
|
const column = table.columns.find((col) => col.name === "client_secret");
|
|
8520
9264
|
if (column && !column.isNullable) {
|
|
8521
9265
|
await queryRunner.query(`ALTER TABLE "BaseConfig" ALTER COLUMN "client_secret" DROP NOT NULL`);
|
|
8522
|
-
|
|
9266
|
+
debug19("MakeOpenIdClientSecretNullable: Made client_secret nullable");
|
|
8523
9267
|
}
|
|
8524
9268
|
}
|
|
8525
9269
|
async down(queryRunner) {
|
|
@@ -8533,45 +9277,45 @@ var MakeOpenIdClientSecretNullable1767000000001 = class {
|
|
|
8533
9277
|
};
|
|
8534
9278
|
|
|
8535
9279
|
// src/migrations/sqlite/1767000000002-MakeOpenIdClientSecretNullable.ts
|
|
8536
|
-
import
|
|
8537
|
-
var
|
|
9280
|
+
import Debug20 from "debug";
|
|
9281
|
+
var debug20 = Debug20("sphereon:ssi-sdk:migrations");
|
|
8538
9282
|
var MakeOpenIdClientSecretNullable1767000000002 = class {
|
|
8539
9283
|
static {
|
|
8540
9284
|
__name(this, "MakeOpenIdClientSecretNullable1767000000002");
|
|
8541
9285
|
}
|
|
8542
9286
|
name = "MakeOpenIdClientSecretNullable1767000000002";
|
|
8543
9287
|
async up(queryRunner) {
|
|
8544
|
-
|
|
9288
|
+
debug20("MakeOpenIdClientSecretNullable: SQLite does not support ALTER COLUMN, no action needed for nullable change");
|
|
8545
9289
|
}
|
|
8546
9290
|
async down(queryRunner) {
|
|
8547
9291
|
}
|
|
8548
9292
|
};
|
|
8549
9293
|
|
|
8550
9294
|
// src/migrations/generic/16-MakeOpenIdClientSecretNullable.ts
|
|
8551
|
-
var
|
|
9295
|
+
var debug21 = Debug21("sphereon:ssi-sdk:migrations");
|
|
8552
9296
|
var MakeOpenIdClientSecretNullable1767000000000 = class {
|
|
8553
9297
|
static {
|
|
8554
9298
|
__name(this, "MakeOpenIdClientSecretNullable1767000000000");
|
|
8555
9299
|
}
|
|
8556
9300
|
name = "MakeOpenIdClientSecretNullable1767000000000";
|
|
8557
9301
|
async up(queryRunner) {
|
|
8558
|
-
|
|
9302
|
+
debug21("migration: making client_secret nullable in BaseConfig table");
|
|
8559
9303
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8560
9304
|
switch (dbType) {
|
|
8561
9305
|
case "postgres": {
|
|
8562
|
-
|
|
9306
|
+
debug21("using postgres migration file for MakeOpenIdClientSecretNullable");
|
|
8563
9307
|
const mig = new MakeOpenIdClientSecretNullable1767000000001();
|
|
8564
9308
|
await mig.up(queryRunner);
|
|
8565
|
-
|
|
9309
|
+
debug21("Postgres migration statements for MakeOpenIdClientSecretNullable executed");
|
|
8566
9310
|
return;
|
|
8567
9311
|
}
|
|
8568
9312
|
case "sqlite":
|
|
8569
9313
|
case "expo":
|
|
8570
9314
|
case "react-native": {
|
|
8571
|
-
|
|
9315
|
+
debug21("using sqlite/react-native migration file for MakeOpenIdClientSecretNullable");
|
|
8572
9316
|
const mig = new MakeOpenIdClientSecretNullable1767000000002();
|
|
8573
9317
|
await mig.up(queryRunner);
|
|
8574
|
-
|
|
9318
|
+
debug21("SQLite migration statements for MakeOpenIdClientSecretNullable executed");
|
|
8575
9319
|
return;
|
|
8576
9320
|
}
|
|
8577
9321
|
default:
|
|
@@ -8579,7 +9323,7 @@ var MakeOpenIdClientSecretNullable1767000000000 = class {
|
|
|
8579
9323
|
}
|
|
8580
9324
|
}
|
|
8581
9325
|
async down(queryRunner) {
|
|
8582
|
-
|
|
9326
|
+
debug21("migration: reverting client_secret nullable in BaseConfig table");
|
|
8583
9327
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8584
9328
|
switch (dbType) {
|
|
8585
9329
|
case "postgres": {
|
|
@@ -8601,7 +9345,7 @@ var MakeOpenIdClientSecretNullable1767000000000 = class {
|
|
|
8601
9345
|
};
|
|
8602
9346
|
|
|
8603
9347
|
// src/migrations/generic/17-AddCredentialClaimOrder.ts
|
|
8604
|
-
import
|
|
9348
|
+
import Debug22 from "debug";
|
|
8605
9349
|
|
|
8606
9350
|
// src/migrations/postgres/1768000000000-AddCredentialClaimOrder.ts
|
|
8607
9351
|
var AddCredentialClaimOrderPostgres1768000000000 = class {
|
|
@@ -8650,30 +9394,30 @@ var AddCredentialClaimOrderSqlite1768000000000 = class {
|
|
|
8650
9394
|
};
|
|
8651
9395
|
|
|
8652
9396
|
// src/migrations/generic/17-AddCredentialClaimOrder.ts
|
|
8653
|
-
var
|
|
9397
|
+
var debug22 = Debug22("sphereon:ssi-sdk:migrations");
|
|
8654
9398
|
var AddCredentialClaimOrder1768000000000 = class {
|
|
8655
9399
|
static {
|
|
8656
9400
|
__name(this, "AddCredentialClaimOrder1768000000000");
|
|
8657
9401
|
}
|
|
8658
9402
|
name = "AddCredentialClaimOrder1768000000000";
|
|
8659
9403
|
async up(queryRunner) {
|
|
8660
|
-
|
|
9404
|
+
debug22("migration: adding credential claim order column");
|
|
8661
9405
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8662
9406
|
switch (dbType) {
|
|
8663
9407
|
case "postgres": {
|
|
8664
|
-
|
|
9408
|
+
debug22("using postgres migration file");
|
|
8665
9409
|
const mig = new AddCredentialClaimOrderPostgres1768000000000();
|
|
8666
9410
|
await mig.up(queryRunner);
|
|
8667
|
-
|
|
9411
|
+
debug22("Migration statements executed");
|
|
8668
9412
|
return;
|
|
8669
9413
|
}
|
|
8670
9414
|
case "sqlite":
|
|
8671
9415
|
case "expo":
|
|
8672
9416
|
case "react-native": {
|
|
8673
|
-
|
|
9417
|
+
debug22("using sqlite/react-native migration file");
|
|
8674
9418
|
const mig = new AddCredentialClaimOrderSqlite1768000000000();
|
|
8675
9419
|
await mig.up(queryRunner);
|
|
8676
|
-
|
|
9420
|
+
debug22("Migration statements executed");
|
|
8677
9421
|
return;
|
|
8678
9422
|
}
|
|
8679
9423
|
default:
|
|
@@ -8681,23 +9425,23 @@ var AddCredentialClaimOrder1768000000000 = class {
|
|
|
8681
9425
|
}
|
|
8682
9426
|
}
|
|
8683
9427
|
async down(queryRunner) {
|
|
8684
|
-
|
|
9428
|
+
debug22("migration: removing credential claim order column");
|
|
8685
9429
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8686
9430
|
switch (dbType) {
|
|
8687
9431
|
case "postgres": {
|
|
8688
|
-
|
|
9432
|
+
debug22("using postgres migration file");
|
|
8689
9433
|
const mig = new AddCredentialClaimOrderPostgres1768000000000();
|
|
8690
9434
|
await mig.down(queryRunner);
|
|
8691
|
-
|
|
9435
|
+
debug22("Migration statements executed");
|
|
8692
9436
|
return;
|
|
8693
9437
|
}
|
|
8694
9438
|
case "sqlite":
|
|
8695
9439
|
case "expo":
|
|
8696
9440
|
case "react-native": {
|
|
8697
|
-
|
|
9441
|
+
debug22("using sqlite/react-native migration file");
|
|
8698
9442
|
const mig = new AddCredentialClaimOrderSqlite1768000000000();
|
|
8699
9443
|
await mig.down(queryRunner);
|
|
8700
|
-
|
|
9444
|
+
debug22("Migration statements executed");
|
|
8701
9445
|
return;
|
|
8702
9446
|
}
|
|
8703
9447
|
default:
|
|
@@ -8707,31 +9451,31 @@ var AddCredentialClaimOrder1768000000000 = class {
|
|
|
8707
9451
|
};
|
|
8708
9452
|
|
|
8709
9453
|
// src/migrations/generic/2-CreateIssuanceBranding.ts
|
|
8710
|
-
import
|
|
8711
|
-
var
|
|
9454
|
+
import Debug23 from "debug";
|
|
9455
|
+
var debug23 = Debug23("sphereon:ssi-sdk:migrations");
|
|
8712
9456
|
var CreateIssuanceBranding1659463079429 = class {
|
|
8713
9457
|
static {
|
|
8714
9458
|
__name(this, "CreateIssuanceBranding1659463079429");
|
|
8715
9459
|
}
|
|
8716
9460
|
name = "CreateIssuanceBranding1659463079429";
|
|
8717
9461
|
async up(queryRunner) {
|
|
8718
|
-
|
|
9462
|
+
debug23("migration: creating issuance branding tables");
|
|
8719
9463
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8720
9464
|
switch (dbType) {
|
|
8721
9465
|
case "postgres": {
|
|
8722
|
-
|
|
9466
|
+
debug23("using postgres migration file");
|
|
8723
9467
|
const mig = new CreateIssuanceBranding1685628974232();
|
|
8724
9468
|
await mig.up(queryRunner);
|
|
8725
|
-
|
|
9469
|
+
debug23("Migration statements executed");
|
|
8726
9470
|
return;
|
|
8727
9471
|
}
|
|
8728
9472
|
case "sqlite":
|
|
8729
9473
|
case "expo":
|
|
8730
9474
|
case "react-native": {
|
|
8731
|
-
|
|
9475
|
+
debug23("using sqlite/react-native migration file");
|
|
8732
9476
|
const mig = new CreateIssuanceBranding1685628973231();
|
|
8733
9477
|
await mig.up(queryRunner);
|
|
8734
|
-
|
|
9478
|
+
debug23("Migration statements executed");
|
|
8735
9479
|
return;
|
|
8736
9480
|
}
|
|
8737
9481
|
default:
|
|
@@ -8739,23 +9483,23 @@ var CreateIssuanceBranding1659463079429 = class {
|
|
|
8739
9483
|
}
|
|
8740
9484
|
}
|
|
8741
9485
|
async down(queryRunner) {
|
|
8742
|
-
|
|
9486
|
+
debug23("migration: reverting issuance branding tables");
|
|
8743
9487
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8744
9488
|
switch (dbType) {
|
|
8745
9489
|
case "postgres": {
|
|
8746
|
-
|
|
9490
|
+
debug23("using postgres migration file");
|
|
8747
9491
|
const mig = new CreateIssuanceBranding1685628974232();
|
|
8748
9492
|
await mig.down(queryRunner);
|
|
8749
|
-
|
|
9493
|
+
debug23("Migration statements executed");
|
|
8750
9494
|
return;
|
|
8751
9495
|
}
|
|
8752
9496
|
case "sqlite":
|
|
8753
9497
|
case "expo":
|
|
8754
9498
|
case "react-native": {
|
|
8755
|
-
|
|
9499
|
+
debug23("using sqlite/react-native migration file");
|
|
8756
9500
|
const mig = new CreateIssuanceBranding1685628973231();
|
|
8757
9501
|
await mig.down(queryRunner);
|
|
8758
|
-
|
|
9502
|
+
debug23("Migration statements executed");
|
|
8759
9503
|
return;
|
|
8760
9504
|
}
|
|
8761
9505
|
default:
|
|
@@ -8765,7 +9509,7 @@ var CreateIssuanceBranding1659463079429 = class {
|
|
|
8765
9509
|
};
|
|
8766
9510
|
|
|
8767
9511
|
// src/migrations/generic/3-CreateContacts.ts
|
|
8768
|
-
import
|
|
9512
|
+
import Debug24 from "debug";
|
|
8769
9513
|
|
|
8770
9514
|
// src/migrations/postgres/1690925872592-CreateContacts.ts
|
|
8771
9515
|
import { enablePostgresUuidExtension as enablePostgresUuidExtension3 } from "@sphereon/ssi-sdk.core";
|
|
@@ -8986,30 +9730,30 @@ var CreateContacts1690925872693 = class {
|
|
|
8986
9730
|
};
|
|
8987
9731
|
|
|
8988
9732
|
// src/migrations/generic/3-CreateContacts.ts
|
|
8989
|
-
var
|
|
9733
|
+
var debug24 = Debug24("sphereon:ssi-sdk:migrations");
|
|
8990
9734
|
var CreateContacts1690925872318 = class {
|
|
8991
9735
|
static {
|
|
8992
9736
|
__name(this, "CreateContacts1690925872318");
|
|
8993
9737
|
}
|
|
8994
9738
|
name = "CreateContacts1690925872318";
|
|
8995
9739
|
async up(queryRunner) {
|
|
8996
|
-
|
|
9740
|
+
debug24("migration: creating contacts tables");
|
|
8997
9741
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8998
9742
|
switch (dbType) {
|
|
8999
9743
|
case "postgres": {
|
|
9000
|
-
|
|
9744
|
+
debug24("using postgres migration file");
|
|
9001
9745
|
const mig = new CreateContacts1690925872592();
|
|
9002
9746
|
await mig.up(queryRunner);
|
|
9003
|
-
|
|
9747
|
+
debug24("Migration statements executed");
|
|
9004
9748
|
return;
|
|
9005
9749
|
}
|
|
9006
9750
|
case "sqlite":
|
|
9007
9751
|
case "expo":
|
|
9008
9752
|
case "react-native": {
|
|
9009
|
-
|
|
9753
|
+
debug24("using sqlite/react-native migration file");
|
|
9010
9754
|
const mig = new CreateContacts1690925872693();
|
|
9011
9755
|
await mig.up(queryRunner);
|
|
9012
|
-
|
|
9756
|
+
debug24("Migration statements executed");
|
|
9013
9757
|
return;
|
|
9014
9758
|
}
|
|
9015
9759
|
default:
|
|
@@ -9017,23 +9761,23 @@ var CreateContacts1690925872318 = class {
|
|
|
9017
9761
|
}
|
|
9018
9762
|
}
|
|
9019
9763
|
async down(queryRunner) {
|
|
9020
|
-
|
|
9764
|
+
debug24("migration: reverting contacts tables");
|
|
9021
9765
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9022
9766
|
switch (dbType) {
|
|
9023
9767
|
case "postgres": {
|
|
9024
|
-
|
|
9768
|
+
debug24("using postgres migration file");
|
|
9025
9769
|
const mig = new CreateContacts1690925872592();
|
|
9026
9770
|
await mig.down(queryRunner);
|
|
9027
|
-
|
|
9771
|
+
debug24("Migration statements executed");
|
|
9028
9772
|
return;
|
|
9029
9773
|
}
|
|
9030
9774
|
case "sqlite":
|
|
9031
9775
|
case "expo":
|
|
9032
9776
|
case "react-native": {
|
|
9033
|
-
|
|
9777
|
+
debug24("using sqlite/react-native migration file");
|
|
9034
9778
|
const mig = new CreateContacts1690925872693();
|
|
9035
9779
|
await mig.down(queryRunner);
|
|
9036
|
-
|
|
9780
|
+
debug24("Migration statements executed");
|
|
9037
9781
|
return;
|
|
9038
9782
|
}
|
|
9039
9783
|
default:
|
|
@@ -9043,7 +9787,7 @@ var CreateContacts1690925872318 = class {
|
|
|
9043
9787
|
};
|
|
9044
9788
|
|
|
9045
9789
|
// src/migrations/generic/4-CreateStatusList.ts
|
|
9046
|
-
import
|
|
9790
|
+
import Debug25 from "debug";
|
|
9047
9791
|
|
|
9048
9792
|
// src/migrations/postgres/1693866470001-CreateStatusList.ts
|
|
9049
9793
|
var CreateStatusList1693866470001 = class {
|
|
@@ -9249,53 +9993,53 @@ var UpdateStatusList1737110469000 = class {
|
|
|
9249
9993
|
};
|
|
9250
9994
|
|
|
9251
9995
|
// src/migrations/generic/4-CreateStatusList.ts
|
|
9252
|
-
var
|
|
9996
|
+
var debug25 = Debug25("sphereon:ssi-sdk:migrations");
|
|
9253
9997
|
var CreateStatusList1693866470000 = class {
|
|
9254
9998
|
static {
|
|
9255
9999
|
__name(this, "CreateStatusList1693866470000");
|
|
9256
10000
|
}
|
|
9257
10001
|
name = "CreateStatusList1693866470000";
|
|
9258
10002
|
async up(queryRunner) {
|
|
9259
|
-
|
|
10003
|
+
debug25("migration: creating issuance branding tables");
|
|
9260
10004
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9261
10005
|
if (dbType === "postgres") {
|
|
9262
|
-
|
|
10006
|
+
debug25("using postgres migration files");
|
|
9263
10007
|
const createMig = new CreateStatusList1693866470001();
|
|
9264
10008
|
await createMig.up(queryRunner);
|
|
9265
10009
|
const updateMig = new UpdateStatusList1737110469001();
|
|
9266
10010
|
const up = await updateMig.up(queryRunner);
|
|
9267
|
-
|
|
10011
|
+
debug25("Migration statements executed");
|
|
9268
10012
|
return up;
|
|
9269
10013
|
} else if (dbType === "sqlite" || dbType === "react-native" || dbType === "expo") {
|
|
9270
|
-
|
|
10014
|
+
debug25("using sqlite/react-native migration files");
|
|
9271
10015
|
const createMig = new CreateStatusList1693866470002();
|
|
9272
10016
|
await createMig.up(queryRunner);
|
|
9273
10017
|
const updateMig = new UpdateStatusList1737110469000();
|
|
9274
10018
|
const up = await updateMig.up(queryRunner);
|
|
9275
|
-
|
|
10019
|
+
debug25("Migration statements executed");
|
|
9276
10020
|
return up;
|
|
9277
10021
|
} else {
|
|
9278
10022
|
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`);
|
|
9279
10023
|
}
|
|
9280
10024
|
}
|
|
9281
10025
|
async down(queryRunner) {
|
|
9282
|
-
|
|
10026
|
+
debug25("migration: reverting issuance branding tables");
|
|
9283
10027
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9284
10028
|
if (dbType === "postgres") {
|
|
9285
|
-
|
|
10029
|
+
debug25("using postgres migration files");
|
|
9286
10030
|
const updateMig = new UpdateStatusList1737110469001();
|
|
9287
10031
|
await updateMig.down(queryRunner);
|
|
9288
10032
|
const createMig = new CreateStatusList1693866470001();
|
|
9289
10033
|
const down = await createMig.down(queryRunner);
|
|
9290
|
-
|
|
10034
|
+
debug25("Migration statements executed");
|
|
9291
10035
|
return down;
|
|
9292
10036
|
} else if (dbType === "sqlite" || dbType === "react-native" || dbType === "expo") {
|
|
9293
|
-
|
|
10037
|
+
debug25("using sqlite/react-native migration files");
|
|
9294
10038
|
const updateMig = new UpdateStatusList1737110469000();
|
|
9295
10039
|
await updateMig.down(queryRunner);
|
|
9296
10040
|
const createMig = new CreateStatusList1693866470002();
|
|
9297
10041
|
const down = await createMig.down(queryRunner);
|
|
9298
|
-
|
|
10042
|
+
debug25("Migration statements executed");
|
|
9299
10043
|
return down;
|
|
9300
10044
|
} else {
|
|
9301
10045
|
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`);
|
|
@@ -9304,7 +10048,7 @@ var CreateStatusList1693866470000 = class {
|
|
|
9304
10048
|
};
|
|
9305
10049
|
|
|
9306
10050
|
// src/migrations/generic/5-CreateAuditEvents.ts
|
|
9307
|
-
import
|
|
10051
|
+
import Debug26 from "debug";
|
|
9308
10052
|
|
|
9309
10053
|
// src/migrations/postgres/1701634812183-CreateAuditEvents.ts
|
|
9310
10054
|
var CreateAuditEvents1701634812183 = class {
|
|
@@ -9403,30 +10147,30 @@ var CreateAuditEvents1701634819487 = class {
|
|
|
9403
10147
|
};
|
|
9404
10148
|
|
|
9405
10149
|
// src/migrations/generic/5-CreateAuditEvents.ts
|
|
9406
|
-
var
|
|
10150
|
+
var debug26 = Debug26("sphereon:ssi-sdk:migrations");
|
|
9407
10151
|
var CreateAuditEvents1701635835330 = class {
|
|
9408
10152
|
static {
|
|
9409
10153
|
__name(this, "CreateAuditEvents1701635835330");
|
|
9410
10154
|
}
|
|
9411
10155
|
name = "CreateAuditEvents1701635835330";
|
|
9412
10156
|
async up(queryRunner) {
|
|
9413
|
-
|
|
10157
|
+
debug26("migration: creating audit events tables");
|
|
9414
10158
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9415
10159
|
switch (dbType) {
|
|
9416
10160
|
case "postgres": {
|
|
9417
|
-
|
|
10161
|
+
debug26("using postgres migration file");
|
|
9418
10162
|
const mig = new CreateAuditEvents1701634812183();
|
|
9419
10163
|
await mig.up(queryRunner);
|
|
9420
|
-
|
|
10164
|
+
debug26("Migration statements executed");
|
|
9421
10165
|
return;
|
|
9422
10166
|
}
|
|
9423
10167
|
case "sqlite":
|
|
9424
10168
|
case "expo":
|
|
9425
10169
|
case "react-native": {
|
|
9426
|
-
|
|
10170
|
+
debug26("using sqlite/react-native migration file");
|
|
9427
10171
|
const mig = new CreateAuditEvents1701634819487();
|
|
9428
10172
|
await mig.up(queryRunner);
|
|
9429
|
-
|
|
10173
|
+
debug26("Migration statements executed");
|
|
9430
10174
|
return;
|
|
9431
10175
|
}
|
|
9432
10176
|
default:
|
|
@@ -9434,23 +10178,23 @@ var CreateAuditEvents1701635835330 = class {
|
|
|
9434
10178
|
}
|
|
9435
10179
|
}
|
|
9436
10180
|
async down(queryRunner) {
|
|
9437
|
-
|
|
10181
|
+
debug26("migration: reverting audit events tables");
|
|
9438
10182
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9439
10183
|
switch (dbType) {
|
|
9440
10184
|
case "postgres": {
|
|
9441
|
-
|
|
10185
|
+
debug26("using postgres migration file");
|
|
9442
10186
|
const mig = new CreateAuditEvents1701634812183();
|
|
9443
10187
|
await mig.down(queryRunner);
|
|
9444
|
-
|
|
10188
|
+
debug26("Migration statements executed");
|
|
9445
10189
|
return;
|
|
9446
10190
|
}
|
|
9447
10191
|
case "sqlite":
|
|
9448
10192
|
case "expo":
|
|
9449
10193
|
case "react-native": {
|
|
9450
|
-
|
|
10194
|
+
debug26("using sqlite/react-native migration file");
|
|
9451
10195
|
const mig = new CreateAuditEvents1701634819487();
|
|
9452
10196
|
await mig.down(queryRunner);
|
|
9453
|
-
|
|
10197
|
+
debug26("Migration statements executed");
|
|
9454
10198
|
return;
|
|
9455
10199
|
}
|
|
9456
10200
|
default:
|
|
@@ -9460,7 +10204,7 @@ var CreateAuditEvents1701635835330 = class {
|
|
|
9460
10204
|
};
|
|
9461
10205
|
|
|
9462
10206
|
// src/migrations/generic/6-CreateDigitalCredential.ts
|
|
9463
|
-
import
|
|
10207
|
+
import Debug27 from "debug";
|
|
9464
10208
|
|
|
9465
10209
|
// src/migrations/postgres/1708525189001-CreateDigitalCredential.ts
|
|
9466
10210
|
var CreateDigitalCredential1708525189001 = class {
|
|
@@ -9568,30 +10312,30 @@ var CreateDigitalCredential1708525189002 = class {
|
|
|
9568
10312
|
};
|
|
9569
10313
|
|
|
9570
10314
|
// src/migrations/generic/6-CreateDigitalCredential.ts
|
|
9571
|
-
var
|
|
10315
|
+
var debug27 = Debug27("sphereon:ssi-sdk:migrations");
|
|
9572
10316
|
var CreateDigitalCredential1708525189000 = class {
|
|
9573
10317
|
static {
|
|
9574
10318
|
__name(this, "CreateDigitalCredential1708525189000");
|
|
9575
10319
|
}
|
|
9576
10320
|
name = "CreateDigitalCredential1708525189000";
|
|
9577
10321
|
async up(queryRunner) {
|
|
9578
|
-
|
|
10322
|
+
debug27("migration: creating DigitalCredential tables");
|
|
9579
10323
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9580
10324
|
switch (dbType) {
|
|
9581
10325
|
case "postgres": {
|
|
9582
|
-
|
|
10326
|
+
debug27("using postgres migration file for DigitalCredential");
|
|
9583
10327
|
const mig = new CreateDigitalCredential1708525189001();
|
|
9584
10328
|
await mig.up(queryRunner);
|
|
9585
|
-
|
|
10329
|
+
debug27("Postgres Migration statements for DigitalCredential executed");
|
|
9586
10330
|
return;
|
|
9587
10331
|
}
|
|
9588
10332
|
case "sqlite":
|
|
9589
10333
|
case "expo":
|
|
9590
10334
|
case "react-native": {
|
|
9591
|
-
|
|
10335
|
+
debug27("using sqlite/react-native migration file for DigitalCredential");
|
|
9592
10336
|
const mig = new CreateDigitalCredential1708525189002();
|
|
9593
10337
|
await mig.up(queryRunner);
|
|
9594
|
-
|
|
10338
|
+
debug27("SQLite Migration statements for DigitalCredential executed");
|
|
9595
10339
|
return;
|
|
9596
10340
|
}
|
|
9597
10341
|
default:
|
|
@@ -9599,23 +10343,23 @@ var CreateDigitalCredential1708525189000 = class {
|
|
|
9599
10343
|
}
|
|
9600
10344
|
}
|
|
9601
10345
|
async down(queryRunner) {
|
|
9602
|
-
|
|
10346
|
+
debug27("migration: reverting DigitalCredential tables");
|
|
9603
10347
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9604
10348
|
switch (dbType) {
|
|
9605
10349
|
case "postgres": {
|
|
9606
|
-
|
|
10350
|
+
debug27("using postgres migration file for DigitalCredential");
|
|
9607
10351
|
const mig = new CreateDigitalCredential1708525189001();
|
|
9608
10352
|
await mig.down(queryRunner);
|
|
9609
|
-
|
|
10353
|
+
debug27("Postgres Migration statements for DigitalCredential reverted");
|
|
9610
10354
|
return;
|
|
9611
10355
|
}
|
|
9612
10356
|
case "sqlite":
|
|
9613
10357
|
case "expo":
|
|
9614
10358
|
case "react-native": {
|
|
9615
|
-
|
|
10359
|
+
debug27("using sqlite/react-native migration file for DigitalCredential");
|
|
9616
10360
|
const mig = new CreateDigitalCredential1708525189002();
|
|
9617
10361
|
await mig.down(queryRunner);
|
|
9618
|
-
|
|
10362
|
+
debug27("SQLite Migration statements for DigitalCredential reverted");
|
|
9619
10363
|
return;
|
|
9620
10364
|
}
|
|
9621
10365
|
default:
|
|
@@ -9625,7 +10369,7 @@ var CreateDigitalCredential1708525189000 = class {
|
|
|
9625
10369
|
};
|
|
9626
10370
|
|
|
9627
10371
|
// src/migrations/generic/7-CreateMachineStateStore.ts
|
|
9628
|
-
import
|
|
10372
|
+
import Debug28 from "debug";
|
|
9629
10373
|
|
|
9630
10374
|
// src/migrations/postgres/1708797018115-CreateMachineStateStore.ts
|
|
9631
10375
|
var CreateMachineStateStore1708797018115 = class {
|
|
@@ -9687,30 +10431,30 @@ var CreateMachineStateStore1708796002272 = class {
|
|
|
9687
10431
|
};
|
|
9688
10432
|
|
|
9689
10433
|
// src/migrations/generic/7-CreateMachineStateStore.ts
|
|
9690
|
-
var
|
|
10434
|
+
var debug28 = Debug28("sphereon:ssi-sdk:migrations");
|
|
9691
10435
|
var CreateMachineStateStore1708098041262 = class {
|
|
9692
10436
|
static {
|
|
9693
10437
|
__name(this, "CreateMachineStateStore1708098041262");
|
|
9694
10438
|
}
|
|
9695
10439
|
name = "CreateMachineStateStore1708098041262";
|
|
9696
10440
|
async up(queryRunner) {
|
|
9697
|
-
|
|
10441
|
+
debug28("migration: creating machine state tables");
|
|
9698
10442
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9699
10443
|
switch (dbType) {
|
|
9700
10444
|
case "postgres": {
|
|
9701
|
-
|
|
10445
|
+
debug28("using postgres migration file");
|
|
9702
10446
|
const mig = new CreateMachineStateStore1708797018115();
|
|
9703
10447
|
await mig.up(queryRunner);
|
|
9704
|
-
|
|
10448
|
+
debug28("Migration statements executed");
|
|
9705
10449
|
return;
|
|
9706
10450
|
}
|
|
9707
10451
|
case "sqlite":
|
|
9708
10452
|
case "expo":
|
|
9709
10453
|
case "react-native": {
|
|
9710
|
-
|
|
10454
|
+
debug28("using sqlite/react-native migration file");
|
|
9711
10455
|
const mig = new CreateMachineStateStore1708796002272();
|
|
9712
10456
|
await mig.up(queryRunner);
|
|
9713
|
-
|
|
10457
|
+
debug28("Migration statements executed");
|
|
9714
10458
|
return;
|
|
9715
10459
|
}
|
|
9716
10460
|
default:
|
|
@@ -9718,23 +10462,23 @@ var CreateMachineStateStore1708098041262 = class {
|
|
|
9718
10462
|
}
|
|
9719
10463
|
}
|
|
9720
10464
|
async down(queryRunner) {
|
|
9721
|
-
|
|
10465
|
+
debug28("migration: reverting machine state tables");
|
|
9722
10466
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9723
10467
|
switch (dbType) {
|
|
9724
10468
|
case "postgres": {
|
|
9725
|
-
|
|
10469
|
+
debug28("using postgres migration file");
|
|
9726
10470
|
const mig = new CreateMachineStateStore1708797018115();
|
|
9727
10471
|
await mig.down(queryRunner);
|
|
9728
|
-
|
|
10472
|
+
debug28("Migration statements executed");
|
|
9729
10473
|
return;
|
|
9730
10474
|
}
|
|
9731
10475
|
case "sqlite":
|
|
9732
10476
|
case "expo":
|
|
9733
10477
|
case "react-native": {
|
|
9734
|
-
|
|
10478
|
+
debug28("using sqlite/react-native migration file");
|
|
9735
10479
|
const mig = new CreateMachineStateStore1708796002272();
|
|
9736
10480
|
await mig.down(queryRunner);
|
|
9737
|
-
|
|
10481
|
+
debug28("Migration statements executed");
|
|
9738
10482
|
return;
|
|
9739
10483
|
}
|
|
9740
10484
|
default:
|
|
@@ -9744,7 +10488,7 @@ var CreateMachineStateStore1708098041262 = class {
|
|
|
9744
10488
|
};
|
|
9745
10489
|
|
|
9746
10490
|
// src/migrations/generic/8-CreateContacts.ts
|
|
9747
|
-
import
|
|
10491
|
+
import Debug29 from "debug";
|
|
9748
10492
|
|
|
9749
10493
|
// src/migrations/postgres/1710438363001-CreateContacts.ts
|
|
9750
10494
|
var CreateContacts1710438363001 = class {
|
|
@@ -9858,30 +10602,30 @@ var CreateContacts1710438363002 = class {
|
|
|
9858
10602
|
};
|
|
9859
10603
|
|
|
9860
10604
|
// src/migrations/generic/8-CreateContacts.ts
|
|
9861
|
-
var
|
|
10605
|
+
var debug29 = Debug29("sphereon:ssi-sdk:migrations");
|
|
9862
10606
|
var CreateContacts1708525189000 = class {
|
|
9863
10607
|
static {
|
|
9864
10608
|
__name(this, "CreateContacts1708525189000");
|
|
9865
10609
|
}
|
|
9866
10610
|
name = "CreateContacts1708525189000";
|
|
9867
10611
|
async up(queryRunner) {
|
|
9868
|
-
|
|
10612
|
+
debug29("migration: updating contact tables");
|
|
9869
10613
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9870
10614
|
switch (dbType) {
|
|
9871
10615
|
case "postgres": {
|
|
9872
|
-
|
|
10616
|
+
debug29("using postgres migration file");
|
|
9873
10617
|
const mig = new CreateContacts1710438363001();
|
|
9874
10618
|
await mig.up(queryRunner);
|
|
9875
|
-
|
|
10619
|
+
debug29("Migration statements executed");
|
|
9876
10620
|
return;
|
|
9877
10621
|
}
|
|
9878
10622
|
case "sqlite":
|
|
9879
10623
|
case "expo":
|
|
9880
10624
|
case "react-native": {
|
|
9881
|
-
|
|
10625
|
+
debug29("using sqlite/react-native migration file");
|
|
9882
10626
|
const mig = new CreateContacts1710438363002();
|
|
9883
10627
|
await mig.up(queryRunner);
|
|
9884
|
-
|
|
10628
|
+
debug29("Migration statements executed");
|
|
9885
10629
|
return;
|
|
9886
10630
|
}
|
|
9887
10631
|
default:
|
|
@@ -9889,23 +10633,23 @@ var CreateContacts1708525189000 = class {
|
|
|
9889
10633
|
}
|
|
9890
10634
|
}
|
|
9891
10635
|
async down(queryRunner) {
|
|
9892
|
-
|
|
10636
|
+
debug29("migration: reverting machine state tables");
|
|
9893
10637
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9894
10638
|
switch (dbType) {
|
|
9895
10639
|
case "postgres": {
|
|
9896
|
-
|
|
10640
|
+
debug29("using postgres migration file");
|
|
9897
10641
|
const mig = new CreateContacts1710438363001();
|
|
9898
10642
|
await mig.down(queryRunner);
|
|
9899
|
-
|
|
10643
|
+
debug29("Migration statements executed");
|
|
9900
10644
|
return;
|
|
9901
10645
|
}
|
|
9902
10646
|
case "sqlite":
|
|
9903
10647
|
case "expo":
|
|
9904
10648
|
case "react-native": {
|
|
9905
|
-
|
|
10649
|
+
debug29("using sqlite/react-native migration file");
|
|
9906
10650
|
const mig = new CreateContacts1710438363002();
|
|
9907
10651
|
await mig.down(queryRunner);
|
|
9908
|
-
|
|
10652
|
+
debug29("Migration statements executed");
|
|
9909
10653
|
return;
|
|
9910
10654
|
}
|
|
9911
10655
|
default:
|
|
@@ -9915,7 +10659,7 @@ var CreateContacts1708525189000 = class {
|
|
|
9915
10659
|
};
|
|
9916
10660
|
|
|
9917
10661
|
// src/migrations/generic/9-CreateContacts.ts
|
|
9918
|
-
import
|
|
10662
|
+
import Debug30 from "debug";
|
|
9919
10663
|
|
|
9920
10664
|
// src/migrations/postgres/1715761125001-CreateContacts.ts
|
|
9921
10665
|
var CreateContacts1715761125001 = class {
|
|
@@ -10027,30 +10771,30 @@ var CreateContacts1715761125002 = class {
|
|
|
10027
10771
|
};
|
|
10028
10772
|
|
|
10029
10773
|
// src/migrations/generic/9-CreateContacts.ts
|
|
10030
|
-
var
|
|
10774
|
+
var debug30 = Debug30("sphereon:ssi-sdk:migrations");
|
|
10031
10775
|
var CreateContacts1715761125000 = class {
|
|
10032
10776
|
static {
|
|
10033
10777
|
__name(this, "CreateContacts1715761125000");
|
|
10034
10778
|
}
|
|
10035
10779
|
name = "CreateContacts1715761125000";
|
|
10036
10780
|
async up(queryRunner) {
|
|
10037
|
-
|
|
10781
|
+
debug30("migration: updating contact tables");
|
|
10038
10782
|
const dbType = queryRunner.connection.driver.options.type;
|
|
10039
10783
|
switch (dbType) {
|
|
10040
10784
|
case "postgres": {
|
|
10041
|
-
|
|
10785
|
+
debug30("using postgres migration file");
|
|
10042
10786
|
const mig = new CreateContacts1715761125001();
|
|
10043
10787
|
await mig.up(queryRunner);
|
|
10044
|
-
|
|
10788
|
+
debug30("Migration statements executed");
|
|
10045
10789
|
return;
|
|
10046
10790
|
}
|
|
10047
10791
|
case "sqlite":
|
|
10048
10792
|
case "expo":
|
|
10049
10793
|
case "react-native": {
|
|
10050
|
-
|
|
10794
|
+
debug30("using sqlite/react-native migration file");
|
|
10051
10795
|
const mig = new CreateContacts1715761125002();
|
|
10052
10796
|
await mig.up(queryRunner);
|
|
10053
|
-
|
|
10797
|
+
debug30("Migration statements executed");
|
|
10054
10798
|
return;
|
|
10055
10799
|
}
|
|
10056
10800
|
default:
|
|
@@ -10058,23 +10802,298 @@ var CreateContacts1715761125000 = class {
|
|
|
10058
10802
|
}
|
|
10059
10803
|
}
|
|
10060
10804
|
async down(queryRunner) {
|
|
10061
|
-
|
|
10805
|
+
debug30("migration: reverting machine state tables");
|
|
10062
10806
|
const dbType = queryRunner.connection.driver.options.type;
|
|
10063
10807
|
switch (dbType) {
|
|
10064
10808
|
case "postgres": {
|
|
10065
|
-
|
|
10809
|
+
debug30("using postgres migration file");
|
|
10066
10810
|
const mig = new CreateContacts1715761125001();
|
|
10067
10811
|
await mig.down(queryRunner);
|
|
10068
|
-
|
|
10812
|
+
debug30("Migration statements executed");
|
|
10069
10813
|
return;
|
|
10070
10814
|
}
|
|
10071
10815
|
case "sqlite":
|
|
10072
10816
|
case "expo":
|
|
10073
10817
|
case "react-native": {
|
|
10074
|
-
|
|
10818
|
+
debug30("using sqlite/react-native migration file");
|
|
10075
10819
|
const mig = new CreateContacts1715761125002();
|
|
10076
10820
|
await mig.down(queryRunner);
|
|
10077
|
-
|
|
10821
|
+
debug30("Migration statements executed");
|
|
10822
|
+
return;
|
|
10823
|
+
}
|
|
10824
|
+
default:
|
|
10825
|
+
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`);
|
|
10826
|
+
}
|
|
10827
|
+
}
|
|
10828
|
+
};
|
|
10829
|
+
|
|
10830
|
+
// src/migrations/generic/18-AddCredentialDesigns.ts
|
|
10831
|
+
import Debug31 from "debug";
|
|
10832
|
+
|
|
10833
|
+
// src/migrations/postgres/1773657426000-AddCredentialDesigns.ts
|
|
10834
|
+
var AddCredentialDesignsPostgres1773657426000 = class {
|
|
10835
|
+
static {
|
|
10836
|
+
__name(this, "AddCredentialDesignsPostgres1773657426000");
|
|
10837
|
+
}
|
|
10838
|
+
name = "AddCredentialDesignsPostgres1773657426000";
|
|
10839
|
+
async up(queryRunner) {
|
|
10840
|
+
await queryRunner.query(`
|
|
10841
|
+
CREATE TYPE IF NOT EXISTS "value_type" AS ENUM ('Text', 'Number', 'Boolean', 'Date');
|
|
10842
|
+
`);
|
|
10843
|
+
await queryRunner.query(`
|
|
10844
|
+
CREATE TABLE IF NOT EXISTS "meta_data_set"
|
|
10845
|
+
(
|
|
10846
|
+
"id" uuid NOT NULL DEFAULT gen_random_uuid(),
|
|
10847
|
+
"tenant_id" uuid,
|
|
10848
|
+
"name" text NOT NULL,
|
|
10849
|
+
CONSTRAINT "meta_data_set_pkey" PRIMARY KEY ("id")
|
|
10850
|
+
)
|
|
10851
|
+
`);
|
|
10852
|
+
await queryRunner.query(`
|
|
10853
|
+
CREATE UNIQUE INDEX IF NOT EXISTS "meta_data_set_unique_tenant" ON "meta_data_set" ("name", "tenant_id")
|
|
10854
|
+
`);
|
|
10855
|
+
await queryRunner.query(`
|
|
10856
|
+
CREATE TABLE IF NOT EXISTS "meta_data_keys"
|
|
10857
|
+
(
|
|
10858
|
+
"id" uuid NOT NULL DEFAULT gen_random_uuid(),
|
|
10859
|
+
"set_id" uuid NOT NULL,
|
|
10860
|
+
"key" text NOT NULL,
|
|
10861
|
+
"value_type" value_type NOT NULL,
|
|
10862
|
+
CONSTRAINT "meta_data_keys_pkey" PRIMARY KEY ("id"),
|
|
10863
|
+
CONSTRAINT "fk_meta_data_set" FOREIGN KEY ("set_id")
|
|
10864
|
+
REFERENCES "meta_data_set" ("id")
|
|
10865
|
+
)
|
|
10866
|
+
`);
|
|
10867
|
+
await queryRunner.query(`
|
|
10868
|
+
CREATE TABLE IF NOT EXISTS "meta_data_values"
|
|
10869
|
+
(
|
|
10870
|
+
"id" uuid NOT NULL DEFAULT gen_random_uuid(),
|
|
10871
|
+
"key_id" uuid NOT NULL,
|
|
10872
|
+
"index" numeric,
|
|
10873
|
+
"text_value" text,
|
|
10874
|
+
"number_value" numeric,
|
|
10875
|
+
"boolean_value" boolean,
|
|
10876
|
+
"timestamp_value" timestamp without time zone,
|
|
10877
|
+
CONSTRAINT "meta_data_values_pkey" PRIMARY KEY ("id"),
|
|
10878
|
+
CONSTRAINT "fk_meta_data_keys" FOREIGN KEY ("key_id")
|
|
10879
|
+
REFERENCES "meta_data_keys" ("id")
|
|
10880
|
+
)
|
|
10881
|
+
`);
|
|
10882
|
+
await queryRunner.query(`
|
|
10883
|
+
CREATE TABLE IF NOT EXISTS "form_step"
|
|
10884
|
+
(
|
|
10885
|
+
"id" uuid NOT NULL DEFAULT gen_random_uuid(),
|
|
10886
|
+
"tenant_id" uuid,
|
|
10887
|
+
"form_id" text,
|
|
10888
|
+
"step_nr" numeric,
|
|
10889
|
+
"order" numeric,
|
|
10890
|
+
CONSTRAINT "formstep_pkey" PRIMARY KEY ("id")
|
|
10891
|
+
)
|
|
10892
|
+
`);
|
|
10893
|
+
await queryRunner.query(`
|
|
10894
|
+
CREATE UNIQUE INDEX IF NOT EXISTS "formstep_unique_step" ON "form_step" ("step_nr", "form_id", "order")
|
|
10895
|
+
`);
|
|
10896
|
+
await queryRunner.query(`
|
|
10897
|
+
CREATE TABLE IF NOT EXISTS "schema_definition"
|
|
10898
|
+
(
|
|
10899
|
+
"id" uuid NOT NULL DEFAULT gen_random_uuid(),
|
|
10900
|
+
"tenant_id" uuid,
|
|
10901
|
+
"extends_id" uuid,
|
|
10902
|
+
"correlation_id" text,
|
|
10903
|
+
"schema_type" text,
|
|
10904
|
+
"entity_type" text,
|
|
10905
|
+
"schema" text NOT NULL,
|
|
10906
|
+
"meta_data_set_id" uuid,
|
|
10907
|
+
CONSTRAINT "schemadef_pkey" PRIMARY KEY ("id"),
|
|
10908
|
+
CONSTRAINT "fk_schemadef_metadata"
|
|
10909
|
+
FOREIGN KEY ("meta_data_set_id")
|
|
10910
|
+
REFERENCES "meta_data_set" ("id")
|
|
10911
|
+
)
|
|
10912
|
+
`);
|
|
10913
|
+
await queryRunner.query(`
|
|
10914
|
+
CREATE TABLE IF NOT EXISTS "form_step_to_schema_definition"
|
|
10915
|
+
(
|
|
10916
|
+
"form_step_id" uuid NOT NULL,
|
|
10917
|
+
"schema_definition_id" uuid NOT NULL,
|
|
10918
|
+
CONSTRAINT "pk_form_step_to_schema_definition" PRIMARY KEY ("form_step_id", "schema_definition_id"),
|
|
10919
|
+
CONSTRAINT "fk_form_step"
|
|
10920
|
+
FOREIGN KEY ("form_step_id")
|
|
10921
|
+
REFERENCES "form_step" ("id"),
|
|
10922
|
+
CONSTRAINT "fk_schema_definition"
|
|
10923
|
+
FOREIGN KEY ("schema_definition_id")
|
|
10924
|
+
REFERENCES "schema_definition" ("id")
|
|
10925
|
+
)
|
|
10926
|
+
`);
|
|
10927
|
+
await queryRunner.query(`
|
|
10928
|
+
CREATE TABLE IF NOT EXISTS "credential_design_branding"
|
|
10929
|
+
(
|
|
10930
|
+
"id" uuid NOT NULL DEFAULT gen_random_uuid(),
|
|
10931
|
+
"logo" uuid,
|
|
10932
|
+
"background_image" uuid,
|
|
10933
|
+
"text_color" text,
|
|
10934
|
+
"background_color" text,
|
|
10935
|
+
"meta_data_set_id" uuid,
|
|
10936
|
+
CONSTRAINT "credentialdesignbranding_pkey" PRIMARY KEY ("id"),
|
|
10937
|
+
CONSTRAINT "fk_credentialdesignbranding_metadata" FOREIGN KEY ("meta_data_set_id") REFERENCES "meta_data_set" ("id") ON DELETE CASCADE,
|
|
10938
|
+
CONSTRAINT "unique_meta_data_set_id" UNIQUE ("meta_data_set_id"),
|
|
10939
|
+
CONSTRAINT "fk_branding_logo" FOREIGN KEY ("logo") REFERENCES "ImageAttributes" ("id"),
|
|
10940
|
+
CONSTRAINT "fk_branding_background_image" FOREIGN KEY ("background_image") REFERENCES "ImageAttributes" ("id")
|
|
10941
|
+
);
|
|
10942
|
+
`);
|
|
10943
|
+
await queryRunner.query(`
|
|
10944
|
+
ALTER TABLE meta_data_keys DROP CONSTRAINT IF EXISTS fk_meta_data_set
|
|
10945
|
+
`);
|
|
10946
|
+
await queryRunner.query(`
|
|
10947
|
+
ALTER TABLE meta_data_keys ADD CONSTRAINT fk_meta_data_set FOREIGN KEY (set_id) REFERENCES meta_data_set(id) ON DELETE CASCADE
|
|
10948
|
+
`);
|
|
10949
|
+
await queryRunner.query(`
|
|
10950
|
+
ALTER TABLE schema_definition DROP CONSTRAINT IF EXISTS fk_schemadef_metadata
|
|
10951
|
+
`);
|
|
10952
|
+
await queryRunner.query(`
|
|
10953
|
+
ALTER TABLE schema_definition ADD CONSTRAINT fk_schemadef_metadata FOREIGN KEY (meta_data_set_id) REFERENCES meta_data_set(id) ON DELETE CASCADE
|
|
10954
|
+
`);
|
|
10955
|
+
await queryRunner.query(`
|
|
10956
|
+
ALTER TABLE meta_data_values DROP CONSTRAINT IF EXISTS fk_meta_data_keys
|
|
10957
|
+
`);
|
|
10958
|
+
await queryRunner.query(`
|
|
10959
|
+
ALTER TABLE meta_data_values ADD CONSTRAINT fk_meta_data_keys FOREIGN KEY (key_id) REFERENCES meta_data_keys(id) ON DELETE CASCADE
|
|
10960
|
+
`);
|
|
10961
|
+
await queryRunner.query(`
|
|
10962
|
+
ALTER TABLE form_step_to_schema_definition DROP CONSTRAINT IF EXISTS form_step_to_schema_definition_schema_definition_id_fkey;
|
|
10963
|
+
`);
|
|
10964
|
+
await queryRunner.query(`
|
|
10965
|
+
ALTER TABLE form_step_to_schema_definition ADD CONSTRAINT form_step_to_schema_definition_schema_definition_id_fkey FOREIGN KEY (schema_definition_id) REFERENCES schema_definition(id) ON DELETE CASCADE;
|
|
10966
|
+
`);
|
|
10967
|
+
await queryRunner.query(`
|
|
10968
|
+
ALTER TABLE form_step_to_schema_definition DROP CONSTRAINT IF EXISTS fk_schema_definition;
|
|
10969
|
+
`);
|
|
10970
|
+
await queryRunner.query(`
|
|
10971
|
+
ALTER TABLE form_step_to_schema_definition ADD CONSTRAINT fk_schema_definition FOREIGN KEY (schema_definition_id) REFERENCES schema_definition(id) ON DELETE CASCADE;
|
|
10972
|
+
`);
|
|
10973
|
+
}
|
|
10974
|
+
async down(queryRunner) {
|
|
10975
|
+
await queryRunner.query(`
|
|
10976
|
+
ALTER TABLE form_step_to_schema_definition DROP CONSTRAINT IF EXISTS fk_schema_definition;
|
|
10977
|
+
`);
|
|
10978
|
+
await queryRunner.query(`
|
|
10979
|
+
ALTER TABLE form_step_to_schema_definition ADD CONSTRAINT fk_schema_definition FOREIGN KEY (schema_definition_id) REFERENCES schema_definition(id);
|
|
10980
|
+
`);
|
|
10981
|
+
await queryRunner.query(`
|
|
10982
|
+
ALTER TABLE form_step_to_schema_definition DROP CONSTRAINT IF EXISTS form_step_to_schema_definition_schema_definition_id_fkey;
|
|
10983
|
+
`);
|
|
10984
|
+
await queryRunner.query(`
|
|
10985
|
+
ALTER TABLE form_step_to_schema_definition ADD CONSTRAINT form_step_to_schema_definition_schema_definition_id_fkey FOREIGN KEY (schema_definition_id) REFERENCES schema_definition(id);
|
|
10986
|
+
`);
|
|
10987
|
+
await queryRunner.query(`
|
|
10988
|
+
ALTER TABLE meta_data_values DROP CONSTRAINT IF EXISTS fk_meta_data_keys;
|
|
10989
|
+
`);
|
|
10990
|
+
await queryRunner.query(`
|
|
10991
|
+
ALTER TABLE meta_data_values ADD CONSTRAINT fk_meta_data_keys FOREIGN KEY (key_id) REFERENCES meta_data_keys(id);
|
|
10992
|
+
`);
|
|
10993
|
+
await queryRunner.query(`
|
|
10994
|
+
ALTER TABLE schema_definition DROP CONSTRAINT IF EXISTS fk_schemadef_metadata;
|
|
10995
|
+
`);
|
|
10996
|
+
await queryRunner.query(`
|
|
10997
|
+
ALTER TABLE schema_definition ADD CONSTRAINT fk_schemadef_metadata FOREIGN KEY (meta_data_set_id) REFERENCES meta_data_set(id);
|
|
10998
|
+
`);
|
|
10999
|
+
await queryRunner.query(`
|
|
11000
|
+
ALTER TABLE meta_data_keys DROP CONSTRAINT IF EXISTS fk_meta_data_set;
|
|
11001
|
+
`);
|
|
11002
|
+
await queryRunner.query(`
|
|
11003
|
+
ALTER TABLE meta_data_keys ADD CONSTRAINT fk_meta_data_set FOREIGN KEY (set_id) REFERENCES meta_data_set(id);
|
|
11004
|
+
`);
|
|
11005
|
+
await queryRunner.query(`DROP TABLE IF EXISTS "credential_design_branding"`);
|
|
11006
|
+
await queryRunner.query(`DROP TABLE IF EXISTS "form_step_to_schema_definition"`);
|
|
11007
|
+
await queryRunner.query(`DROP TABLE IF EXISTS "schema_definition"`);
|
|
11008
|
+
await queryRunner.query(`DROP INDEX IF EXISTS "formstep_unique_step"`);
|
|
11009
|
+
await queryRunner.query(`DROP TABLE IF EXISTS "form_step"`);
|
|
11010
|
+
await queryRunner.query(`DROP TABLE IF EXISTS "meta_data_values"`);
|
|
11011
|
+
await queryRunner.query(`DROP TABLE IF EXISTS "meta_data_keys"`);
|
|
11012
|
+
await queryRunner.query(`DROP INDEX IF EXISTS "meta_data_set_unique_tenant"`);
|
|
11013
|
+
await queryRunner.query(`DROP TABLE IF EXISTS "meta_data_set"`);
|
|
11014
|
+
await queryRunner.query(`DROP TYPE IF EXISTS "value_type"`);
|
|
11015
|
+
}
|
|
11016
|
+
};
|
|
11017
|
+
|
|
11018
|
+
// src/migrations/sqlite/1773657426000-AddCredentialDesigns.ts
|
|
11019
|
+
var AddCredentialDesignsSqlite1773657426000 = class {
|
|
11020
|
+
static {
|
|
11021
|
+
__name(this, "AddCredentialDesignsSqlite1773657426000");
|
|
11022
|
+
}
|
|
11023
|
+
name = "AddCredentialDesignsSqlite1773657426000";
|
|
11024
|
+
async up(queryRunner) {
|
|
11025
|
+
await queryRunner.query(`CREATE TABLE IF NOT EXISTS "meta_data_set" ("id" varchar PRIMARY KEY NOT NULL, "tenant_id" varchar, "name" text NOT NULL)`);
|
|
11026
|
+
await queryRunner.query(`CREATE UNIQUE INDEX IF NOT EXISTS "meta_data_set_unique_tenant" ON "meta_data_set" ("name", "tenant_id")`);
|
|
11027
|
+
await queryRunner.query(`CREATE TABLE IF NOT EXISTS "meta_data_keys" ("id" varchar PRIMARY KEY NOT NULL, "set_id" varchar NOT NULL, "key" text NOT NULL, "value_type" varchar CHECK( "value_type" IN ('Text','Number','Boolean','Date') ) NOT NULL, CONSTRAINT "fk_meta_data_set" FOREIGN KEY ("set_id") REFERENCES "meta_data_set" ("id") ON DELETE CASCADE ON UPDATE NO ACTION)`);
|
|
11028
|
+
await queryRunner.query(`CREATE TABLE IF NOT EXISTS "meta_data_values" ("id" varchar PRIMARY KEY NOT NULL, "key_id" varchar NOT NULL, "index" integer, "text_value" text, "number_value" real, "boolean_value" boolean, "timestamp_value" datetime, CONSTRAINT "fk_meta_data_keys" FOREIGN KEY ("key_id") REFERENCES "meta_data_keys" ("id") ON DELETE CASCADE ON UPDATE NO ACTION)`);
|
|
11029
|
+
await queryRunner.query(`CREATE TABLE IF NOT EXISTS "form_step" ("id" varchar PRIMARY KEY NOT NULL, "tenant_id" varchar, "form_id" text, "step_nr" integer, "order" integer)`);
|
|
11030
|
+
await queryRunner.query(`CREATE UNIQUE INDEX IF NOT EXISTS "formstep_unique_step" ON "form_step" ("step_nr", "form_id", "order")`);
|
|
11031
|
+
await queryRunner.query(`CREATE TABLE IF NOT EXISTS "schema_definition" ("id" varchar PRIMARY KEY NOT NULL, "tenant_id" varchar, "extends_id" varchar, "correlation_id" text, "schema_type" text, "entity_type" text, "schema" text NOT NULL, "meta_data_set_id" varchar, CONSTRAINT "fk_schemadef_metadata" FOREIGN KEY ("meta_data_set_id") REFERENCES "meta_data_set" ("id") ON DELETE CASCADE ON UPDATE NO ACTION)`);
|
|
11032
|
+
await queryRunner.query(`CREATE TABLE IF NOT EXISTS "form_step_to_schema_definition" ("form_step_id" varchar NOT NULL, "schema_definition_id" varchar NOT NULL, PRIMARY KEY ("form_step_id", "schema_definition_id"), CONSTRAINT "fk_form_step" FOREIGN KEY ("form_step_id") REFERENCES "form_step" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT "fk_schema_definition" FOREIGN KEY ("schema_definition_id") REFERENCES "schema_definition" ("id") ON DELETE CASCADE ON UPDATE NO ACTION)`);
|
|
11033
|
+
await queryRunner.query(`CREATE TABLE IF NOT EXISTS "credential_design_branding" ("id" varchar PRIMARY KEY NOT NULL, "logo" varchar, "background_image" varchar, "text_color" text, "background_color" text, "meta_data_set_id" varchar, CONSTRAINT "unique_meta_data_set_id" UNIQUE ("meta_data_set_id"), CONSTRAINT "fk_credentialdesignbranding_metadata" FOREIGN KEY ("meta_data_set_id") REFERENCES "meta_data_set" ("id") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT "fk_branding_logo" FOREIGN KEY ("logo") REFERENCES "ImageAttributes" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT "fk_branding_background_image" FOREIGN KEY ("background_image") REFERENCES "ImageAttributes" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION)`);
|
|
11034
|
+
}
|
|
11035
|
+
async down(queryRunner) {
|
|
11036
|
+
await queryRunner.query(`DROP TABLE IF EXISTS "credential_design_branding"`);
|
|
11037
|
+
await queryRunner.query(`DROP TABLE IF EXISTS "form_step_to_schema_definition"`);
|
|
11038
|
+
await queryRunner.query(`DROP TABLE IF EXISTS "schema_definition"`);
|
|
11039
|
+
await queryRunner.query(`DROP INDEX IF EXISTS "formstep_unique_step"`);
|
|
11040
|
+
await queryRunner.query(`DROP TABLE IF EXISTS "form_step"`);
|
|
11041
|
+
await queryRunner.query(`DROP TABLE IF EXISTS "meta_data_values"`);
|
|
11042
|
+
await queryRunner.query(`DROP TABLE IF EXISTS "meta_data_keys"`);
|
|
11043
|
+
await queryRunner.query(`DROP INDEX IF EXISTS "meta_data_set_unique_tenant"`);
|
|
11044
|
+
await queryRunner.query(`DROP TABLE IF EXISTS "meta_data_set"`);
|
|
11045
|
+
}
|
|
11046
|
+
};
|
|
11047
|
+
|
|
11048
|
+
// src/migrations/generic/18-AddCredentialDesigns.ts
|
|
11049
|
+
var debug31 = Debug31("sphereon:ssi-sdk:migrations");
|
|
11050
|
+
var AddCredentialDesigns1773657426000 = class {
|
|
11051
|
+
static {
|
|
11052
|
+
__name(this, "AddCredentialDesigns1773657426000");
|
|
11053
|
+
}
|
|
11054
|
+
name = "AddCredentialDesigns1773657426000";
|
|
11055
|
+
async up(queryRunner) {
|
|
11056
|
+
debug31("migration: adding credential designs");
|
|
11057
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
11058
|
+
switch (dbType) {
|
|
11059
|
+
case "postgres": {
|
|
11060
|
+
debug31("using postgres migration file");
|
|
11061
|
+
const mig = new AddCredentialDesignsPostgres1773657426000();
|
|
11062
|
+
await mig.up(queryRunner);
|
|
11063
|
+
debug31("Migration statements executed");
|
|
11064
|
+
return;
|
|
11065
|
+
}
|
|
11066
|
+
case "sqlite":
|
|
11067
|
+
case "expo":
|
|
11068
|
+
case "react-native": {
|
|
11069
|
+
debug31("using sqlite/react-native migration file");
|
|
11070
|
+
const mig = new AddCredentialDesignsSqlite1773657426000();
|
|
11071
|
+
await mig.up(queryRunner);
|
|
11072
|
+
debug31("Migration statements executed");
|
|
11073
|
+
return;
|
|
11074
|
+
}
|
|
11075
|
+
default:
|
|
11076
|
+
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`);
|
|
11077
|
+
}
|
|
11078
|
+
}
|
|
11079
|
+
async down(queryRunner) {
|
|
11080
|
+
debug31("migration: removing credential designs");
|
|
11081
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
11082
|
+
switch (dbType) {
|
|
11083
|
+
case "postgres": {
|
|
11084
|
+
debug31("using postgres migration file");
|
|
11085
|
+
const mig = new AddCredentialDesignsPostgres1773657426000();
|
|
11086
|
+
await mig.down(queryRunner);
|
|
11087
|
+
debug31("Migration statements executed");
|
|
11088
|
+
return;
|
|
11089
|
+
}
|
|
11090
|
+
case "sqlite":
|
|
11091
|
+
case "expo":
|
|
11092
|
+
case "react-native": {
|
|
11093
|
+
debug31("using sqlite/react-native migration file");
|
|
11094
|
+
const mig = new AddCredentialDesignsSqlite1773657426000();
|
|
11095
|
+
await mig.down(queryRunner);
|
|
11096
|
+
debug31("Migration statements executed");
|
|
10078
11097
|
return;
|
|
10079
11098
|
}
|
|
10080
11099
|
default:
|
|
@@ -10097,6 +11116,9 @@ var DataStoreIssuanceBrandingMigrations = [
|
|
|
10097
11116
|
AddBrandingState1766000000000,
|
|
10098
11117
|
AddCredentialClaimOrder1768000000000
|
|
10099
11118
|
];
|
|
11119
|
+
var DataStoreCredentialDesignMigrations = [
|
|
11120
|
+
AddCredentialDesigns1773657426000
|
|
11121
|
+
];
|
|
10100
11122
|
var DataStoreStatusListMigrations = [
|
|
10101
11123
|
CreateStatusList1693866470000,
|
|
10102
11124
|
AddBitstringStatusListEnum1741895823000,
|
|
@@ -10127,7 +11149,8 @@ var DataStoreMigrations = [
|
|
|
10127
11149
|
...DataStoreDigitalCredentialMigrations,
|
|
10128
11150
|
...DataStoreMachineStateMigrations,
|
|
10129
11151
|
...DataStorePresentationDefinitionMigrations,
|
|
10130
|
-
...DataStoreServiceMigrations
|
|
11152
|
+
...DataStoreServiceMigrations,
|
|
11153
|
+
...DataStoreCredentialDesignMigrations
|
|
10131
11154
|
];
|
|
10132
11155
|
var DataStoreMigrationsWithVeramo = [
|
|
10133
11156
|
...VeramoDataStoreMigrations,
|
|
@@ -10353,6 +11376,14 @@ var DataStoreDigitalCredentialEntities = [
|
|
|
10353
11376
|
var DataStoreMachineStateEntities = [
|
|
10354
11377
|
MachineStateInfoEntity
|
|
10355
11378
|
];
|
|
11379
|
+
var DataStoreCredentialDesignEntities = [
|
|
11380
|
+
MetaDataSetEntity,
|
|
11381
|
+
MetaDataKeyEntity,
|
|
11382
|
+
MetaDataValueEntity,
|
|
11383
|
+
FormStepEntity,
|
|
11384
|
+
SchemaDefinitionEntity,
|
|
11385
|
+
CredentialDesignBrandingEntity
|
|
11386
|
+
];
|
|
10356
11387
|
var DataStoreEntities = [
|
|
10357
11388
|
...DataStoreContactEntities,
|
|
10358
11389
|
...DataStoreIssuanceBrandingEntities,
|
|
@@ -10360,7 +11391,8 @@ var DataStoreEntities = [
|
|
|
10360
11391
|
...DataStoreEventLoggerEntities,
|
|
10361
11392
|
...DataStoreDigitalCredentialEntities,
|
|
10362
11393
|
...DataStoreMachineStateEntities,
|
|
10363
|
-
...DataStorePresentationDefinitionEntities
|
|
11394
|
+
...DataStorePresentationDefinitionEntities,
|
|
11395
|
+
...DataStoreCredentialDesignEntities
|
|
10364
11396
|
];
|
|
10365
11397
|
var DataStoreEntitiesWithVeramo = [
|
|
10366
11398
|
...VeramoDataStoreEntities2,
|
|
@@ -10381,9 +11413,13 @@ export {
|
|
|
10381
11413
|
CorrelationIdentifierEntity,
|
|
10382
11414
|
CredentialBrandingEntity,
|
|
10383
11415
|
CredentialClaimsEntity,
|
|
11416
|
+
CredentialDesignBrandingEntity,
|
|
11417
|
+
CredentialDesignStore,
|
|
10384
11418
|
CredentialLocaleBrandingEntity,
|
|
10385
11419
|
DataStoreContactEntities,
|
|
10386
11420
|
DataStoreContactMigrations,
|
|
11421
|
+
DataStoreCredentialDesignEntities,
|
|
11422
|
+
DataStoreCredentialDesignMigrations,
|
|
10387
11423
|
DataStoreDigitalCredentialEntities,
|
|
10388
11424
|
DataStoreDigitalCredentialMigrations,
|
|
10389
11425
|
DataStoreEntities,
|
|
@@ -10408,6 +11444,7 @@ export {
|
|
|
10408
11444
|
DigitalCredentialStore,
|
|
10409
11445
|
ElectronicAddressEntity,
|
|
10410
11446
|
EventLoggerStore,
|
|
11447
|
+
FormStepEntity,
|
|
10411
11448
|
IdentityEntity,
|
|
10412
11449
|
IdentityMetadataItemEntity,
|
|
10413
11450
|
ImageAttributesEntity,
|
|
@@ -10417,17 +11454,22 @@ export {
|
|
|
10417
11454
|
IssuerLocaleBrandingEntity,
|
|
10418
11455
|
MachineStateInfoEntity,
|
|
10419
11456
|
MachineStateStore,
|
|
11457
|
+
MetaDataKeyEntity,
|
|
11458
|
+
MetaDataSetEntity,
|
|
11459
|
+
MetaDataValueEntity,
|
|
10420
11460
|
OAuthStatusListEntity,
|
|
10421
11461
|
Oid4vcStateEntity,
|
|
10422
11462
|
OpenIdConfigEntity,
|
|
10423
11463
|
PDStore,
|
|
10424
11464
|
PartyEntity,
|
|
10425
11465
|
PhysicalAddressEntity,
|
|
11466
|
+
SchemaDefinitionEntity,
|
|
10426
11467
|
StatusList2021Entity,
|
|
10427
11468
|
StatusListEntity,
|
|
10428
11469
|
StatusListEntryEntity,
|
|
10429
11470
|
StatusListStore,
|
|
10430
11471
|
TextAttributesEntity,
|
|
11472
|
+
ValueType,
|
|
10431
11473
|
VeramoDataStoreEntities,
|
|
10432
11474
|
VeramoDataStoreMigrations,
|
|
10433
11475
|
activityEventEntityFrom,
|