@sphereon/ssi-sdk.data-store 0.24.1-unstable.167 → 0.24.1-unstable.171
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/entities/contact/PhysicalAddressEntity.d.ts.map +1 -1
- package/dist/entities/contact/PhysicalAddressEntity.js +2 -1
- package/dist/entities/contact/PhysicalAddressEntity.js.map +1 -1
- package/package.json +4 -4
- package/src/entities/contact/IMetadataEntity.ts +1 -1
- package/src/entities/contact/PhysicalAddressEntity.ts +3 -2
- package/src/migrations/postgres/1701634812183-CreateAuditEvents.ts +3 -3
- package/src/utils/contact/MappingUtils.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PhysicalAddressEntity.d.ts","sourceRoot":"","sources":["../../../src/entities/contact/PhysicalAddressEntity.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EASX,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAE,mBAAmB,EAAwB,MAAM,aAAa,CAAA;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"PhysicalAddressEntity.d.ts","sourceRoot":"","sources":["../../../src/entities/contact/PhysicalAddressEntity.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EASX,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAE,mBAAmB,EAAwB,MAAM,aAAa,CAAA;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAG3C,qBACa,qBAAsB,SAAQ,UAAU;IAEnD,EAAE,EAAG,MAAM,CAAA;IAIX,IAAI,EAAG,mBAAmB,CAAA;IAI1B,UAAU,EAAG,MAAM,CAAA;IAInB,YAAY,EAAG,MAAM,CAAA;IAIrB,UAAU,EAAG,MAAM,CAAA;IAInB,QAAQ,EAAG,MAAM,CAAA;IAIjB,YAAY,EAAG,MAAM,CAAA;IAIrB,WAAW,EAAG,MAAM,CAAA;IAIpB,YAAY,CAAC,EAAE,MAAM,CAAA;IAGrB,OAAO,CAAC,EAAE,MAAM,CAAA;IAGhB,QAAQ,CAAC,EAAE,MAAM,CAAA;IAKjB,KAAK,EAAG,WAAW,CAAA;IAGnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAGhB,SAAS,EAAG,IAAI,CAAA;IAGhB,aAAa,EAAG,IAAI,CAAA;IAKpB,iBAAiB,IAAI,IAAI;IAMnB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAUhC"}
|
|
@@ -23,6 +23,7 @@ const class_validator_1 = require("class-validator");
|
|
|
23
23
|
const typeorm_1 = require("typeorm");
|
|
24
24
|
const ValidatorUtils_1 = require("../../utils/ValidatorUtils");
|
|
25
25
|
const PartyEntity_1 = require("./PartyEntity");
|
|
26
|
+
const validators_1 = require("../validators");
|
|
26
27
|
let PhysicalAddressEntity = class PhysicalAddressEntity extends typeorm_1.BaseEntity {
|
|
27
28
|
// By default, @UpdateDateColumn in TypeORM updates the timestamp only when the entity's top-level properties change.
|
|
28
29
|
updateUpdatedDate() {
|
|
@@ -83,7 +84,7 @@ __decorate([
|
|
|
83
84
|
], PhysicalAddressEntity.prototype, "countryCode", void 0);
|
|
84
85
|
__decorate([
|
|
85
86
|
(0, typeorm_1.Column)({ name: 'building_name', length: 255, nullable: true }),
|
|
86
|
-
(0, class_validator_1.
|
|
87
|
+
(0, class_validator_1.Validate)(validators_1.IsNonEmptyStringConstraint, { message: 'Blank building names are not allowed' }),
|
|
87
88
|
__metadata("design:type", String)
|
|
88
89
|
], PhysicalAddressEntity.prototype, "buildingName", void 0);
|
|
89
90
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PhysicalAddressEntity.js","sourceRoot":"","sources":["../../../src/entities/contact/PhysicalAddressEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"PhysicalAddressEntity.js","sourceRoot":"","sources":["../../../src/ent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C;;sDAC3B;AAGhB;IADC,IAAA,gBAAM,EAAC,EAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;;uDAC3B;AAKjB;IAHC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,yBAAW,EAAE,CAAC,KAAkB,EAAE,EAAE,CAAC,KAAK,CAAC,iBAAiB,EAAE;QAC7E,QAAQ,EAAE,SAAS;KACpB,CAAC;8BACM,yBAAW;oDAAA;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDAC5B;AAGhB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;8BAC9C,IAAI;wDAAA;AAGhB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;8BAC/C,IAAI;IAEpB,qHAAqH;;4DAFjG;AAKpB;IAFC,IAAA,sBAAY,GAAE;IACd,IAAA,sBAAY,GAAE;;;;8DAGd;AAIK;IAFL,IAAA,sBAAY,GAAE;IACd,IAAA,sBAAY,GAAE;;;;qDAUd;gCA1EU,qBAAqB;IADjC,IAAA,gBAAM,EAAC,iBAAiB,CAAC;GACb,qBAAqB,CA2EjC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-sdk.data-store",
|
|
3
|
-
"version": "0.24.1-unstable.
|
|
3
|
+
"version": "0.24.1-unstable.171+22915ec9",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@sphereon/pex": "^3.3.3",
|
|
18
|
-
"@sphereon/ssi-sdk.core": "0.24.1-unstable.
|
|
19
|
-
"@sphereon/ssi-types": "0.24.1-unstable.
|
|
18
|
+
"@sphereon/ssi-sdk.core": "0.24.1-unstable.171+22915ec9",
|
|
19
|
+
"@sphereon/ssi-types": "0.24.1-unstable.171+22915ec9",
|
|
20
20
|
"@veramo/core": "4.2.0",
|
|
21
21
|
"@veramo/utils": "4.2.0",
|
|
22
22
|
"blakejs": "^1.1.1",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"PostgreSQL",
|
|
48
48
|
"Contact Store"
|
|
49
49
|
],
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "22915ec91457a5fd33a6ec1c574face2434f01e0"
|
|
51
51
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IsNotEmpty, validate, ValidationError } from 'class-validator'
|
|
1
|
+
import { IsNotEmpty, Validate, validate, ValidationError } from 'class-validator'
|
|
2
2
|
import {
|
|
3
3
|
BaseEntity,
|
|
4
4
|
BeforeInsert,
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
import { getConstraint } from '../../utils/ValidatorUtils'
|
|
14
14
|
import { PhysicalAddressType, ValidationConstraint } from '../../types'
|
|
15
15
|
import { PartyEntity } from './PartyEntity'
|
|
16
|
+
import { IsNonEmptyStringConstraint } from '../validators'
|
|
16
17
|
|
|
17
18
|
@Entity('PhysicalAddress')
|
|
18
19
|
export class PhysicalAddressEntity extends BaseEntity {
|
|
@@ -48,7 +49,7 @@ export class PhysicalAddressEntity extends BaseEntity {
|
|
|
48
49
|
countryCode!: string
|
|
49
50
|
|
|
50
51
|
@Column({ name: 'building_name', length: 255, nullable: true })
|
|
51
|
-
@
|
|
52
|
+
@Validate(IsNonEmptyStringConstraint, { message: 'Blank building names are not allowed' })
|
|
52
53
|
buildingName?: string
|
|
53
54
|
|
|
54
55
|
@Column({name: 'owner_id', nullable: true})
|
|
@@ -6,17 +6,17 @@ export class CreateAuditEvents1701634812183 implements MigrationInterface {
|
|
|
6
6
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
7
|
await queryRunner.query(`CREATE TYPE "public"."Level_enum" AS ENUM('0', '1', '2', '3')`)
|
|
8
8
|
await queryRunner.query(
|
|
9
|
-
`CREATE TYPE "public"."System_enum" AS ENUM('general', 'kms', 'identity', 'oid4vci', 'credentials', 'web3', 'profile', 'contact')
|
|
9
|
+
`CREATE TYPE "public"."System_enum" AS ENUM('general', 'kms', 'identity', 'oid4vci', 'credentials', 'web3', 'profile', 'contact')`
|
|
10
10
|
)
|
|
11
11
|
await queryRunner.query(
|
|
12
|
-
`CREATE TYPE "public"."Subsystem_type_enum" AS ENUM('key', 'did_provider', 'did_resolver', 'oid4vp_op', 'oid4vci_client', 'siopv2_op', 'contact_manager', 'vc_issuer', 'vc_verifier', 'vc_persistence', 'transport', 'profile')
|
|
12
|
+
`CREATE TYPE "public"."Subsystem_type_enum" AS ENUM('key', 'did_provider', 'did_resolver', 'oid4vp_op', 'oid4vci_client', 'siopv2_op', 'contact_manager', 'vc_issuer', 'vc_verifier', 'vc_persistence', 'transport', 'profile')`
|
|
13
13
|
)
|
|
14
14
|
await queryRunner.query(`CREATE TYPE "public"."Action_type_enum" AS ENUM('create', 'read', 'update', 'delete', 'execute')`)
|
|
15
15
|
await queryRunner.query(`CREATE TYPE "public"."Initiator_type_enum" AS ENUM('user', 'system', 'external')`)
|
|
16
16
|
await queryRunner.query(`CREATE TYPE "public"."System_correlation_id_type_enum" AS ENUM('did', 'email', 'hostname', 'phone', 'user')`)
|
|
17
17
|
await queryRunner.query(`CREATE TYPE "public"."Party_correlation_type_enum" AS ENUM('did', 'email', 'hostname', 'phone')`)
|
|
18
18
|
await queryRunner.query(
|
|
19
|
-
`CREATE TABLE "AuditEvents" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "timestamp" TIMESTAMP NOT NULL, "level" "public"."Level_enum" NOT NULL, "correlationId" TEXT NOT NULL, "system" "public"."System_enum" NOT NULL, "subSystemType" "public"."Subsystem_type_enum" NOT NULL, "actionType" "public"."Action_type_enum" NOT NULL, "actionSubType" TEXT NOT NULL, "initiatorType" "public"."Initiator_type_enum" NOT NULL, "systemCorrelationIdType" "public"."System_correlation_id_type_enum", "systemCorrelationId" TEXT, "systemAlias" TEXT, "partyCorrelationType" "public"."Party_correlation_type_enum", "partyCorrelationId" TEXT, "partyAlias" TEXT, "description" TEXT NOT NULL, "data" TEXT, "diagnosticData" TEXT, "created_at" TIMESTAMP NOT NULL DEFAULT now(), "last_updated_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_AuditEvents_id" PRIMARY KEY ("id"))
|
|
19
|
+
`CREATE TABLE "AuditEvents" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "timestamp" TIMESTAMP NOT NULL, "level" "public"."Level_enum" NOT NULL, "correlationId" TEXT NOT NULL, "system" "public"."System_enum" NOT NULL, "subSystemType" "public"."Subsystem_type_enum" NOT NULL, "actionType" "public"."Action_type_enum" NOT NULL, "actionSubType" TEXT NOT NULL, "initiatorType" "public"."Initiator_type_enum" NOT NULL, "systemCorrelationIdType" "public"."System_correlation_id_type_enum", "systemCorrelationId" TEXT, "systemAlias" TEXT, "partyCorrelationType" "public"."Party_correlation_type_enum", "partyCorrelationId" TEXT, "partyAlias" TEXT, "description" TEXT NOT NULL, "data" TEXT, "diagnosticData" TEXT, "created_at" TIMESTAMP NOT NULL DEFAULT now(), "last_updated_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_AuditEvents_id" PRIMARY KEY ("id"))`
|
|
20
20
|
)
|
|
21
21
|
}
|
|
22
22
|
|