Skip to content

Commit

Permalink
Merge pull request #185 from Sphereon-Opensource/feature/CWALL-166
Browse files Browse the repository at this point in the history
feature/CWALL-166
  • Loading branch information
nklomp authored Apr 30, 2024
2 parents cb9c86e + a3e90f8 commit 42dc33a
Show file tree
Hide file tree
Showing 15 changed files with 4,390 additions and 3,664 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ export class ImageAttributesEntity extends BaseEntity {
@PrimaryGeneratedColumn('uuid')
id!: string

@Column({ name: 'uri', length: 255, nullable: true, unique: false })
@Column({ name: 'uri', nullable: true, unique: false })
@Validate(IsNonEmptyStringConstraint, { message: 'Blank image uri are not allowed' })
uri?: string

@Column({ name: 'dataUri', length: 255, nullable: true, unique: false })
@Column({ name: 'dataUri', nullable: true, unique: false })
@Validate(IsNonEmptyStringConstraint, { message: 'Blank image data uri are not allowed' })
dataUri?: string

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class CreateIssuanceBranding1685628974232 implements MigrationInterface {
`CREATE TABLE "ImageDimensions" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "width" integer NOT NULL, "height" integer NOT NULL, CONSTRAINT "PK_ImageDimensions_id" PRIMARY KEY ("id"))`,
)
await queryRunner.query(
`CREATE TABLE "ImageAttributes" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "uri" character varying(255), "dataUri" character varying(255), "mediaType" character varying(255), "alt" character varying(255), "dimensionsId" uuid, CONSTRAINT "UQ_dimensionsId" UNIQUE ("dimensionsId"), CONSTRAINT "PK_ImageAttributes_id" PRIMARY KEY ("id"))`,
`CREATE TABLE "ImageAttributes" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "uri" character varying, "dataUri" character varying, "mediaType" character varying(255), "alt" character varying(255), "dimensionsId" uuid, CONSTRAINT "UQ_dimensionsId" UNIQUE ("dimensionsId"), CONSTRAINT "PK_ImageAttributes_id" PRIMARY KEY ("id"))`,
)
await queryRunner.query(
`CREATE TABLE "BackgroundAttributes" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "color" character varying(255), "imageId" uuid, CONSTRAINT "UQ_imageId" UNIQUE ("imageId"), CONSTRAINT "PK_BackgroundAttributes_id" PRIMARY KEY ("id"))`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class CreateIssuanceBranding1685628973231 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`CREATE TABLE "ImageDimensions" ("id" varchar PRIMARY KEY NOT NULL, "width" integer NOT NULL, "height" integer NOT NULL)`)
await queryRunner.query(
`CREATE TABLE "ImageAttributes" ("id" varchar PRIMARY KEY NOT NULL, "uri" varchar(255), "dataUri" varchar(255), "mediaType" varchar(255), "alt" varchar(255), "dimensionsId" varchar, CONSTRAINT "UQ_dimensionsId" UNIQUE ("dimensionsId"))`,
`CREATE TABLE "ImageAttributes" ("id" varchar PRIMARY KEY NOT NULL, "uri" varchar, "dataUri" varchar, "mediaType" varchar(255), "alt" varchar(255), "dimensionsId" varchar, CONSTRAINT "UQ_dimensionsId" UNIQUE ("dimensionsId"))`,
)
await queryRunner.query(
`CREATE TABLE "BackgroundAttributes" ("id" varchar PRIMARY KEY NOT NULL, "color" varchar(255), "imageId" varchar, CONSTRAINT "UQ_imageId" UNIQUE ("imageId"))`,
Expand All @@ -32,7 +32,7 @@ export class CreateIssuanceBranding1685628973231 implements MigrationInterface {
)
await queryRunner.query(`CREATE INDEX "IDX_IssuerBrandingEntity_issuerCorrelationId" ON "IssuerBranding" ("issuerCorrelationId")`)
await queryRunner.query(
`CREATE TABLE "temporary_ImageAttributes" ("id" varchar PRIMARY KEY NOT NULL, "uri" varchar(255), "dataUri" varchar(255), "mediaType" varchar(255), "alt" varchar(255), "dimensionsId" varchar, CONSTRAINT "UQ_dimensionsId" UNIQUE ("dimensionsId"), CONSTRAINT "FK_ImageAttributes_dimensionsId" FOREIGN KEY ("dimensionsId") REFERENCES "ImageDimensions" ("id") ON DELETE CASCADE ON UPDATE NO ACTION)`,
`CREATE TABLE "temporary_ImageAttributes" ("id" varchar PRIMARY KEY NOT NULL, "uri" varchar, "dataUri" varchar, "mediaType" varchar(255), "alt" varchar(255), "dimensionsId" varchar, CONSTRAINT "UQ_dimensionsId" UNIQUE ("dimensionsId"), CONSTRAINT "FK_ImageAttributes_dimensionsId" FOREIGN KEY ("dimensionsId") REFERENCES "ImageDimensions" ("id") ON DELETE CASCADE ON UPDATE NO ACTION)`,
)
await queryRunner.query(
`INSERT INTO "temporary_ImageAttributes"("id", "uri", "dataUri", "mediaType", "alt", "dimensionsId") SELECT "id", "uri", "dataUri", "mediaType", "alt", "dimensionsId" FROM "ImageAttributes"`,
Expand Down Expand Up @@ -96,7 +96,7 @@ export class CreateIssuanceBranding1685628973231 implements MigrationInterface {
await queryRunner.query(`DROP TABLE "temporary_BackgroundAttributes"`)
await queryRunner.query(`ALTER TABLE "ImageAttributes" RENAME TO "temporary_ImageAttributes"`)
await queryRunner.query(
`CREATE TABLE "ImageAttributes" ("id" varchar PRIMARY KEY NOT NULL, "uri" varchar(255), "dataUri" varchar(255), "mediaType" varchar(255), "alt" varchar(255), "dimensionsId" varchar, CONSTRAINT "UQ_dimensionsId" UNIQUE ("dimensionsId"))`,
`CREATE TABLE "ImageAttributes" ("id" varchar PRIMARY KEY NOT NULL, "uri" varchar, "dataUri" varchar, "mediaType" varchar(255), "alt" varchar(255), "dimensionsId" varchar, CONSTRAINT "UQ_dimensionsId" UNIQUE ("dimensionsId"))`,
)
await queryRunner.query(
`INSERT INTO "ImageAttributes"("id", "uri", "dataUri", "mediaType", "alt", "dimensionsId") SELECT "id", "uri", "dataUri", "mediaType", "alt", "dimensionsId" FROM "ImageAttributes"`,
Expand Down
1 change: 1 addition & 0 deletions packages/oid4vci-holder/agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ constants:
- oid4vciHolderCreateCredentialSelection
- oid4vciHolderGetContact
- oid4vciHolderGetCredentials
- oid4vciHolderGetCredential
- oid4vciHolderAddContactIdentity
- oid4vciHolderAssertValidCredentials
- oid4vciHolderStoreCredentialBranding
Expand Down
4 changes: 3 additions & 1 deletion packages/oid4vci-holder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
"dependencies": {
"@sphereon/oid4vci-client": "0.10.3",
"@sphereon/oid4vci-common": "0.10.3",
"@sphereon/ssi-sdk-ext.did-utils": "0.18.0",
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.18.0",
"@sphereon/ssi-sdk.contact-manager": "workspace:*",
"@sphereon/ssi-sdk.core": "workspace:*",
"@sphereon/ssi-sdk.data-store": "workspace:*",
"@sphereon/ssi-sdk.issuance-branding": "workspace:*",
"@sphereon/ssi-sdk.xstate-machine-persistence": "workspace:*",
"@sphereon/ssi-sdk.issuance-branding": "workspace:*",
"@sphereon/ssi-types": "workspace:*",
"@veramo/core": "4.2.0",
"@veramo/data-store": "4.2.0",
Expand Down
Loading

0 comments on commit 42dc33a

Please sign in to comment.