@sphereon/ssi-sdk.data-store 0.11.1-unstable.73 → 0.12.0
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/README.md +5 -0
- package/dist/contact/AbstractContactStore.d.ts +1 -2
- package/dist/contact/AbstractContactStore.d.ts.map +1 -1
- package/dist/contact/AbstractContactStore.js.map +1 -1
- package/dist/contact/ContactStore.d.ts +1 -2
- package/dist/contact/ContactStore.d.ts.map +1 -1
- package/dist/contact/ContactStore.js +11 -11
- package/dist/contact/ContactStore.js.map +1 -1
- package/dist/entities/contact/ConnectionEntity.d.ts +1 -1
- package/dist/entities/contact/ConnectionEntity.d.ts.map +1 -1
- package/dist/entities/contact/ConnectionEntity.js +4 -4
- package/dist/entities/contact/ConnectionEntity.js.map +1 -1
- package/dist/entities/contact/ContactEntity.d.ts +1 -1
- package/dist/entities/contact/ContactEntity.d.ts.map +1 -1
- package/dist/entities/contact/ContactEntity.js +2 -5
- package/dist/entities/contact/ContactEntity.js.map +1 -1
- package/dist/entities/contact/CorrelationIdentifierEntity.d.ts +1 -1
- package/dist/entities/contact/CorrelationIdentifierEntity.d.ts.map +1 -1
- package/dist/entities/contact/CorrelationIdentifierEntity.js +3 -4
- package/dist/entities/contact/CorrelationIdentifierEntity.js.map +1 -1
- package/dist/entities/contact/DidAuthConfigEntity.d.ts +1 -1
- package/dist/entities/contact/DidAuthConfigEntity.d.ts.map +1 -1
- package/dist/entities/contact/IdentityEntity.d.ts +2 -2
- package/dist/entities/contact/IdentityEntity.d.ts.map +1 -1
- package/dist/entities/contact/IdentityEntity.js +4 -7
- package/dist/entities/contact/IdentityEntity.js.map +1 -1
- package/dist/entities/contact/IdentityMetadataItemEntity.d.ts +1 -1
- package/dist/entities/contact/IdentityMetadataItemEntity.d.ts.map +1 -1
- package/dist/entities/contact/IdentityMetadataItemEntity.js +1 -2
- package/dist/entities/contact/IdentityMetadataItemEntity.js.map +1 -1
- package/dist/entities/contact/OpenIdConfigEntity.d.ts +1 -1
- package/dist/entities/contact/OpenIdConfigEntity.d.ts.map +1 -1
- package/dist/entities/issuanceBranding/BackgroundAttributesEntity.d.ts +11 -0
- package/dist/entities/issuanceBranding/BackgroundAttributesEntity.d.ts.map +1 -0
- package/dist/entities/issuanceBranding/BackgroundAttributesEntity.js +74 -0
- package/dist/entities/issuanceBranding/BackgroundAttributesEntity.js.map +1 -0
- package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.d.ts +18 -0
- package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.d.ts.map +1 -0
- package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.js +120 -0
- package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.js.map +1 -0
- package/dist/entities/issuanceBranding/CredentialBrandingEntity.d.ts +15 -0
- package/dist/entities/issuanceBranding/CredentialBrandingEntity.d.ts.map +1 -0
- package/dist/entities/issuanceBranding/CredentialBrandingEntity.js +102 -0
- package/dist/entities/issuanceBranding/CredentialBrandingEntity.js.map +1 -0
- package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.d.ts +9 -0
- package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.d.ts.map +1 -0
- package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.js +49 -0
- package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.js.map +1 -0
- package/dist/entities/issuanceBranding/ImageAttributesEntity.d.ts +14 -0
- package/dist/entities/issuanceBranding/ImageAttributesEntity.d.ts.map +1 -0
- package/dist/entities/issuanceBranding/ImageAttributesEntity.js +92 -0
- package/dist/entities/issuanceBranding/ImageAttributesEntity.js.map +1 -0
- package/dist/entities/issuanceBranding/ImageDimensionsEntity.d.ts +9 -0
- package/dist/entities/issuanceBranding/ImageDimensionsEntity.d.ts.map +1 -0
- package/dist/entities/issuanceBranding/ImageDimensionsEntity.js +39 -0
- package/dist/entities/issuanceBranding/ImageDimensionsEntity.js.map +1 -0
- package/dist/entities/issuanceBranding/IssuerBrandingEntity.d.ts +14 -0
- package/dist/entities/issuanceBranding/IssuerBrandingEntity.d.ts.map +1 -0
- package/dist/entities/issuanceBranding/IssuerBrandingEntity.js +95 -0
- package/dist/entities/issuanceBranding/IssuerBrandingEntity.js.map +1 -0
- package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.d.ts +9 -0
- package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.d.ts.map +1 -0
- package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.js +49 -0
- package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.js.map +1 -0
- package/dist/entities/issuanceBranding/TextAttributesEntity.d.ts +9 -0
- package/dist/entities/issuanceBranding/TextAttributesEntity.d.ts.map +1 -0
- package/dist/entities/issuanceBranding/TextAttributesEntity.js +62 -0
- package/dist/entities/issuanceBranding/TextAttributesEntity.js.map +1 -0
- package/dist/entities/validators/index.d.ts +7 -0
- package/dist/entities/validators/index.d.ts.map +1 -0
- package/dist/entities/validators/index.js +27 -0
- package/dist/entities/validators/index.js.map +1 -0
- package/dist/index.d.ts +15 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +45 -5
- package/dist/index.js.map +1 -1
- package/dist/issuanceBranding/AbstractIssuanceBrandingStore.d.ts +20 -0
- package/dist/issuanceBranding/AbstractIssuanceBrandingStore.d.ts.map +1 -0
- package/dist/issuanceBranding/AbstractIssuanceBrandingStore.js +7 -0
- package/dist/issuanceBranding/AbstractIssuanceBrandingStore.js.map +1 -0
- package/dist/issuanceBranding/IssuanceBrandingStore.d.ts +31 -0
- package/dist/issuanceBranding/IssuanceBrandingStore.d.ts.map +1 -0
- package/dist/issuanceBranding/IssuanceBrandingStore.js +375 -0
- package/dist/issuanceBranding/IssuanceBrandingStore.js.map +1 -0
- package/dist/migrations/generic/1-CreateContacts.js +1 -1
- package/dist/migrations/generic/1-CreateContacts.js.map +1 -1
- package/dist/migrations/generic/1-CreateIssuanceBranding.d.ts +7 -0
- package/dist/migrations/generic/1-CreateIssuanceBranding.d.ts.map +1 -0
- package/dist/migrations/generic/1-CreateIssuanceBranding.js +72 -0
- package/dist/migrations/generic/1-CreateIssuanceBranding.js.map +1 -0
- package/dist/migrations/generic/index.d.ts.map +1 -1
- package/dist/migrations/generic/index.js +2 -1
- package/dist/migrations/generic/index.js.map +1 -1
- package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.d.ts +7 -0
- package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.d.ts.map +1 -0
- package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.js +67 -0
- package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.js.map +1 -0
- package/dist/migrations/sqlite/1659463069549-CreateContacts.d.ts.map +1 -1
- package/dist/migrations/sqlite/1659463069549-CreateContacts.js.map +1 -1
- package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.d.ts +7 -0
- package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.d.ts.map +1 -0
- package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.js +89 -0
- package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.js.map +1 -0
- package/dist/types/{IAbstractContactStore.d.ts → contact/IAbstractContactStore.d.ts} +2 -2
- package/dist/types/contact/IAbstractContactStore.d.ts.map +1 -0
- package/dist/types/contact/IAbstractContactStore.js.map +1 -0
- package/dist/types/contact/contact.d.ts.map +1 -0
- package/dist/types/contact/contact.js.map +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +21 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.d.ts +59 -0
- package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.d.ts.map +1 -0
- package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.js +3 -0
- package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.js.map +1 -0
- package/dist/types/issuanceBranding/issuanceBranding.d.ts +115 -0
- package/dist/types/issuanceBranding/issuanceBranding.d.ts.map +1 -0
- package/dist/types/issuanceBranding/issuanceBranding.js +3 -0
- package/dist/types/issuanceBranding/issuanceBranding.js.map +1 -0
- package/package.json +3 -3
- package/src/__tests__/contact.entities.test.ts +31 -31
- package/src/__tests__/contact.store.test.ts +32 -32
- package/src/__tests__/issuanceBranding.entities.test.ts +844 -0
- package/src/__tests__/issuanceBranding.store.test.ts +1884 -0
- package/src/contact/AbstractContactStore.ts +3 -2
- package/src/contact/ContactStore.ts +2 -4
- package/src/entities/contact/ConnectionEntity.ts +1 -1
- package/src/entities/contact/ContactEntity.ts +5 -7
- package/src/entities/contact/CorrelationIdentifierEntity.ts +4 -4
- package/src/entities/contact/DidAuthConfigEntity.ts +1 -1
- package/src/entities/contact/IdentityEntity.ts +6 -8
- package/src/entities/contact/IdentityMetadataItemEntity.ts +4 -4
- package/src/entities/contact/OpenIdConfigEntity.ts +1 -1
- package/src/entities/issuanceBranding/BackgroundAttributesEntity.ts +42 -0
- package/src/entities/issuanceBranding/BaseLocaleBrandingEntity.ts +86 -0
- package/src/entities/issuanceBranding/CredentialBrandingEntity.ts +78 -0
- package/src/entities/issuanceBranding/CredentialLocaleBrandingEntity.ts +33 -0
- package/src/entities/issuanceBranding/ImageAttributesEntity.ts +57 -0
- package/src/entities/issuanceBranding/ImageDimensionsEntity.ts +22 -0
- package/src/entities/issuanceBranding/IssuerBrandingEntity.ts +72 -0
- package/src/entities/issuanceBranding/IssuerLocaleBrandingEntity.ts +33 -0
- package/src/entities/issuanceBranding/TextAttributesEntity.ts +31 -0
- package/src/entities/validators/index.ts +16 -0
- package/src/index.ts +42 -5
- package/src/issuanceBranding/AbstractIssuanceBrandingStore.ts +41 -0
- package/src/issuanceBranding/IssuanceBrandingStore.ts +544 -0
- package/src/migrations/generic/1-CreateContacts.ts +1 -1
- package/src/migrations/generic/1-CreateIssuanceBranding.ts +54 -0
- package/src/migrations/generic/index.ts +2 -1
- package/src/migrations/postgres/1685628974232-CreateIssuanceBranding.ts +83 -0
- package/src/migrations/sqlite/1659463069549-CreateContacts.ts +0 -1
- package/src/migrations/sqlite/1685628973231-CreateIssuanceBranding.ts +119 -0
- package/src/types/{IAbstractContactStore.ts → contact/IAbstractContactStore.ts} +3 -2
- package/src/types/index.ts +4 -0
- package/src/types/issuanceBranding/IAbstractIssuanceBrandingStore.ts +85 -0
- package/src/types/issuanceBranding/issuanceBranding.ts +120 -0
- package/dist/types/IAbstractContactStore.d.ts.map +0 -1
- package/dist/types/IAbstractContactStore.js.map +0 -1
- package/dist/types/contact.d.ts.map +0 -1
- package/dist/types/contact.js.map +0 -1
- /package/dist/types/{IAbstractContactStore.js → contact/IAbstractContactStore.js} +0 -0
- /package/dist/types/{contact.d.ts → contact/contact.d.ts} +0 -0
- /package/dist/types/{contact.js → contact/contact.js} +0 -0
- /package/src/types/{contact.ts → contact/contact.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BackgroundAttributesEntity.js","sourceRoot":"","sources":["../../../src/entities/issuanceBranding/BackgroundAttributesEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,qCAA8H;AAE9H,mEAA0F;AAC1F,qDAAqE;AACrE,8CAAyE;AAGlE,IAAM,0BAA0B,GAAhC,MAAM,0BAA2B,SAAQ,oBAAU;IAmBlD,QAAQ;;YACZ,MAAM,UAAU,GAA2B,MAAM,IAAA,0BAAQ,EAAC,IAAI,CAAC,CAAA;YAC/D,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,WAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;aAC3E;YACD,OAAM;QACR,CAAC;KAAA;CACF,CAAA;AAzBC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;sDACpB;AAEX;IA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groundAttributesEntity } from './BackgroundAttributesEntity';
|
|
4
|
+
import { TextAttributesEntity } from './TextAttributesEntity';
|
|
5
|
+
export declare class BaseLocaleBrandingEntity extends BaseEntity {
|
|
6
|
+
id: string;
|
|
7
|
+
alias?: string;
|
|
8
|
+
locale?: string;
|
|
9
|
+
logo?: ImageAttributesEntity;
|
|
10
|
+
description?: string;
|
|
11
|
+
background?: BackgroundAttributesEntity;
|
|
12
|
+
text?: TextAttributesEntity;
|
|
13
|
+
createdAt: Date;
|
|
14
|
+
lastUpdatedAt: Date;
|
|
15
|
+
updateUpdatedDate(): void;
|
|
16
|
+
validate(): Promise<undefined>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=BaseLocaleBrandingEntity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseLocaleBrandingEntity.d.ts","sourceRoot":"","sources":["../../../src/entities/issuanceBranding/BaseLocaleBrandingEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAWX,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAA;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAI7D,qBAEa,wBAAyB,SAAQ,UAAU;IAEtD,EAAE,EAAG,MAAM,CAAA;IAIX,KAAK,CAAC,EAAE,MAAM,CAAA;IAGd,MAAM,CAAC,EAAE,MAAM,CAAA;IASf,IAAI,CAAC,EAAE,qBAAqB,CAAA;IAI5B,WAAW,CAAC,EAAE,MAAM,CAAA;IASpB,UAAU,CAAC,EAAE,0BAA0B,CAAA;IASvC,IAAI,CAAC,EAAE,oBAAoB,CAAA;IAG3B,SAAS,EAAG,IAAI,CAAA;IAGhB,aAAa,EAAG,IAAI,CAAA;IAKpB,iBAAiB,IAAI,IAAI;IAMnB,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC;CAOrC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.BaseLocaleBrandingEntity = void 0;
|
|
22
|
+
const typeorm_1 = require("typeorm");
|
|
23
|
+
const ImageAttributesEntity_1 = require("./ImageAttributesEntity");
|
|
24
|
+
const BackgroundAttributesEntity_1 = require("./BackgroundAttributesEntity");
|
|
25
|
+
const TextAttributesEntity_1 = require("./TextAttributesEntity");
|
|
26
|
+
const class_validator_1 = require("class-validator");
|
|
27
|
+
const validators_1 = require("../validators");
|
|
28
|
+
let BaseLocaleBrandingEntity = class BaseLocaleBrandingEntity extends typeorm_1.BaseEntity {
|
|
29
|
+
// By default, @UpdateDateColumn in TypeORM updates the timestamp only when the entity's top-level properties change.
|
|
30
|
+
updateUpdatedDate() {
|
|
31
|
+
this.lastUpdatedAt = new Date();
|
|
32
|
+
}
|
|
33
|
+
validate() {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
const validation = yield (0, class_validator_1.validate)(this);
|
|
36
|
+
if (validation.length > 0) {
|
|
37
|
+
return Promise.reject(Error(Object.values(validation[0].constraints)[0]));
|
|
38
|
+
}
|
|
39
|
+
return;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], BaseLocaleBrandingEntity.prototype, "id", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ name: 'alias', length: 255, nullable: true, unique: false }),
|
|
49
|
+
(0, class_validator_1.Validate)(validators_1.IsNonEmptyStringConstraint, { message: 'Blank aliases are not allowed' }),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], BaseLocaleBrandingEntity.prototype, "alias", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ name: 'locale', length: 255, nullable: false, unique: false }),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], BaseLocaleBrandingEntity.prototype, "locale", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.OneToOne)(() => ImageAttributesEntity_1.ImageAttributesEntity, {
|
|
58
|
+
cascade: true,
|
|
59
|
+
onDelete: 'CASCADE',
|
|
60
|
+
eager: true,
|
|
61
|
+
nullable: true,
|
|
62
|
+
}),
|
|
63
|
+
(0, typeorm_1.JoinColumn)({ name: 'logoId' }),
|
|
64
|
+
__metadata("design:type", ImageAttributesEntity_1.ImageAttributesEntity)
|
|
65
|
+
], BaseLocaleBrandingEntity.prototype, "logo", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.Column)({ name: 'description', length: 255, nullable: true, unique: false }),
|
|
68
|
+
(0, class_validator_1.Validate)(validators_1.IsNonEmptyStringConstraint, { message: 'Blank descriptions are not allowed' }),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], BaseLocaleBrandingEntity.prototype, "description", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.OneToOne)(() => BackgroundAttributesEntity_1.BackgroundAttributesEntity, {
|
|
73
|
+
cascade: true,
|
|
74
|
+
onDelete: 'CASCADE',
|
|
75
|
+
eager: true,
|
|
76
|
+
nullable: true,
|
|
77
|
+
}),
|
|
78
|
+
(0, typeorm_1.JoinColumn)({ name: 'backgroundId' }),
|
|
79
|
+
__metadata("design:type", BackgroundAttributesEntity_1.BackgroundAttributesEntity)
|
|
80
|
+
], BaseLocaleBrandingEntity.prototype, "background", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, typeorm_1.OneToOne)(() => TextAttributesEntity_1.TextAttributesEntity, {
|
|
83
|
+
cascade: true,
|
|
84
|
+
onDelete: 'CASCADE',
|
|
85
|
+
eager: true,
|
|
86
|
+
nullable: true,
|
|
87
|
+
}),
|
|
88
|
+
(0, typeorm_1.JoinColumn)({ name: 'textId' }),
|
|
89
|
+
__metadata("design:type", TextAttributesEntity_1.TextAttributesEntity)
|
|
90
|
+
], BaseLocaleBrandingEntity.prototype, "text", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, typeorm_1.CreateDateColumn)({ name: 'created_at', nullable: false }),
|
|
93
|
+
__metadata("design:type", Date)
|
|
94
|
+
], BaseLocaleBrandingEntity.prototype, "createdAt", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, typeorm_1.UpdateDateColumn)({ name: 'last_updated_at', nullable: false }),
|
|
97
|
+
__metadata("design:type", Date
|
|
98
|
+
// By default, @UpdateDateColumn in TypeORM updates the timestamp only when the entity's top-level properties change.
|
|
99
|
+
)
|
|
100
|
+
], BaseLocaleBrandingEntity.prototype, "lastUpdatedAt", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, typeorm_1.BeforeInsert)(),
|
|
103
|
+
(0, typeorm_1.BeforeUpdate)(),
|
|
104
|
+
__metadata("design:type", Function),
|
|
105
|
+
__metadata("design:paramtypes", []),
|
|
106
|
+
__metadata("design:returntype", void 0)
|
|
107
|
+
], BaseLocaleBrandingEntity.prototype, "updateUpdatedDate", null);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, typeorm_1.BeforeInsert)(),
|
|
110
|
+
(0, typeorm_1.BeforeUpdate)(),
|
|
111
|
+
__metadata("design:type", Function),
|
|
112
|
+
__metadata("design:paramtypes", []),
|
|
113
|
+
__metadata("design:returntype", Promise)
|
|
114
|
+
], BaseLocaleBrandingEntity.prototype, "validate", null);
|
|
115
|
+
BaseLocaleBrandingEntity = __decorate([
|
|
116
|
+
(0, typeorm_1.Entity)('BaseLocaleBranding'),
|
|
117
|
+
(0, typeorm_1.TableInheritance)({ column: { type: 'varchar', name: 'type' } })
|
|
118
|
+
], BaseLocaleBrandingEntity);
|
|
119
|
+
exports.BaseLocaleBrandingEntity = BaseLocaleBrandingEntity;
|
|
120
|
+
//# sourceMappingURL=BaseLocaleBrandingEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseLocaleBrandingEntity.js","sourceRoot":"","sources":["../../../src/entities/issuanceBranding/BaseLocaleBrandingEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,qCAYgB;AAChB,mEAA+D;AAC/D,6EAAyE;AACzE,iEAA6D;AAC7D,qDAAqE;AACrE,8CAA0D;AAInD,IAAM,wBAAwB,GAA9B,MAAM,w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AAhEY,4DAAwB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { CredentialLocaleBrandingEntity } from './CredentialLocaleBrandingEntity';
|
|
3
|
+
import { IBasicCredentialBranding } from '../../types';
|
|
4
|
+
export declare class CredentialBrandingEntity extends BaseEntity {
|
|
5
|
+
id: string;
|
|
6
|
+
vcHash: string;
|
|
7
|
+
issuerCorrelationId: string;
|
|
8
|
+
localeBranding: Array<CredentialLocaleBrandingEntity>;
|
|
9
|
+
createdAt: Date;
|
|
10
|
+
lastUpdatedAt: Date;
|
|
11
|
+
updateUpdatedDate(): void;
|
|
12
|
+
validate(): Promise<undefined>;
|
|
13
|
+
}
|
|
14
|
+
export declare const credentialBrandingEntityFrom: (args: IBasicCredentialBranding) => CredentialBrandingEntity;
|
|
15
|
+
//# sourceMappingURL=CredentialBrandingEntity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CredentialBrandingEntity.d.ts","sourceRoot":"","sources":["../../../src/entities/issuanceBranding/CredentialBrandingEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAUX,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAE,8BAA8B,EAAsC,MAAM,kCAAkC,CAAA;AACrH,OAAO,EAAE,wBAAwB,EAAkC,MAAM,aAAa,CAAA;AAEtF,qBAGa,wBAAyB,SAAQ,UAAU;IAEtD,EAAE,EAAG,MAAM,CAAA;IAIX,MAAM,EAAG,MAAM,CAAA;IAIf,mBAAmB,EAAG,MAAM,CAAA;IAa5B,cAAc,EAAG,KAAK,CAAC,8BAA8B,CAAC,CAAA;IAGtD,SAAS,EAAG,IAAI,CAAA;IAGhB,aAAa,EAAG,IAAI,CAAA;IAKpB,iBAAiB,IAAI,IAAI;IAMnB,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC;CAOrC;AAED,eAAO,MAAM,4BAA4B,SAAU,wBAAwB,KAAG,wBAS7E,CAAA"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.credentialBrandingEntityFrom = exports.CredentialBrandingEntity = void 0;
|
|
22
|
+
const typeorm_1 = require("typeorm");
|
|
23
|
+
const class_validator_1 = require("class-validator");
|
|
24
|
+
const CredentialLocaleBrandingEntity_1 = require("./CredentialLocaleBrandingEntity");
|
|
25
|
+
let CredentialBrandingEntity = class CredentialBrandingEntity extends typeorm_1.BaseEntity {
|
|
26
|
+
// By default, @UpdateDateColumn in TypeORM updates the timestamp only when the entity's top-level properties change.
|
|
27
|
+
updateUpdatedDate() {
|
|
28
|
+
this.lastUpdatedAt = new Date();
|
|
29
|
+
}
|
|
30
|
+
validate() {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
const validation = yield (0, class_validator_1.validate)(this);
|
|
33
|
+
if (validation.length > 0) {
|
|
34
|
+
return Promise.reject(Error(Object.values(validation[0].constraints)[0]));
|
|
35
|
+
}
|
|
36
|
+
return;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], CredentialBrandingEntity.prototype, "id", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ name: 'vcHash', length: 255, nullable: false, unique: true }),
|
|
46
|
+
(0, class_validator_1.IsNotEmpty)({ message: 'Blank vcHashes are not allowed' }),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], CredentialBrandingEntity.prototype, "vcHash", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ name: 'issuerCorrelationId', length: 255, nullable: false, unique: false }),
|
|
51
|
+
(0, class_validator_1.IsNotEmpty)({ message: 'Blank issuerCorrelationIds are not allowed' }),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], CredentialBrandingEntity.prototype, "issuerCorrelationId", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.OneToMany)(() => CredentialLocaleBrandingEntity_1.CredentialLocaleBrandingEntity, (credentialLocaleBrandingEntity) => credentialLocaleBrandingEntity.credentialBranding, {
|
|
56
|
+
cascade: true,
|
|
57
|
+
onDelete: 'CASCADE',
|
|
58
|
+
eager: true,
|
|
59
|
+
nullable: false,
|
|
60
|
+
}),
|
|
61
|
+
(0, class_validator_1.ArrayMinSize)(1, { message: 'localeBranding cannot be empty' }),
|
|
62
|
+
__metadata("design:type", Array)
|
|
63
|
+
], CredentialBrandingEntity.prototype, "localeBranding", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.CreateDateColumn)({ name: 'created_at', nullable: false }),
|
|
66
|
+
__metadata("design:type", Date)
|
|
67
|
+
], CredentialBrandingEntity.prototype, "createdAt", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.UpdateDateColumn)({ name: 'last_updated_at', nullable: false }),
|
|
70
|
+
__metadata("design:type", Date
|
|
71
|
+
// By default, @UpdateDateColumn in TypeORM updates the timestamp only when the entity's top-level properties change.
|
|
72
|
+
)
|
|
73
|
+
], CredentialBrandingEntity.prototype, "lastUpdatedAt", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.BeforeInsert)(),
|
|
76
|
+
(0, typeorm_1.BeforeUpdate)(),
|
|
77
|
+
__metadata("design:type", Function),
|
|
78
|
+
__metadata("design:paramtypes", []),
|
|
79
|
+
__metadata("design:returntype", void 0)
|
|
80
|
+
], CredentialBrandingEntity.prototype, "updateUpdatedDate", null);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, typeorm_1.BeforeInsert)(),
|
|
83
|
+
(0, typeorm_1.BeforeUpdate)(),
|
|
84
|
+
__metadata("design:type", Function),
|
|
85
|
+
__metadata("design:paramtypes", []),
|
|
86
|
+
__metadata("design:returntype", Promise)
|
|
87
|
+
], CredentialBrandingEntity.prototype, "validate", null);
|
|
88
|
+
CredentialBrandingEntity = __decorate([
|
|
89
|
+
(0, typeorm_1.Entity)('CredentialBranding'),
|
|
90
|
+
(0, typeorm_1.Index)('IDX_CredentialBrandingEntity_vcHash', ['vcHash']),
|
|
91
|
+
(0, typeorm_1.Index)('IDX_CredentialBrandingEntity_issuerCorrelationId', ['issuerCorrelationId'])
|
|
92
|
+
], CredentialBrandingEntity);
|
|
93
|
+
exports.CredentialBrandingEntity = CredentialBrandingEntity;
|
|
94
|
+
const credentialBrandingEntityFrom = (args) => {
|
|
95
|
+
const credentialBrandingEntity = new CredentialBrandingEntity();
|
|
96
|
+
credentialBrandingEntity.issuerCorrelationId = args.issuerCorrelationId;
|
|
97
|
+
credentialBrandingEntity.vcHash = args.vcHash;
|
|
98
|
+
credentialBrandingEntity.localeBranding = args.localeBranding.map((localeBranding) => (0, CredentialLocaleBrandingEntity_1.credentialLocaleBrandingEntityFrom)(localeBranding));
|
|
99
|
+
return credentialBrandingEntity;
|
|
100
|
+
};
|
|
101
|
+
exports.credentialBrandingEntityFrom = credentialBrandingEntityFrom;
|
|
102
|
+
//# sourceMappingURL=CredentialBrandingEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CredentialBrandingEntity.js","sourceRoot":"","sources":["../../../src/entities/issuanceBranding/CredentialBrandingEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,qCAWgB;AAChB,qDAAqF;AACrF,qFAAqH;AAM9G,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,oBAAU;IA+BtD,qHAAqH;IAGrH,iBAAiB;QACf,IAAI,CAAC,aAAa,GAAG,IAAI,IAAI,EAAE,CAAA;IACjC,CAAC;IAIK,QAAQ;;YACZ,MAAM,UAAU,GAA2B,MAAM,IAAA,0BAAQ,EAAC,IAAI,CAAC,CAAA;YAC/D,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,WAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;aAC3E;YACD,OAAM;QACR,CAAC;KAAA;CACF,CAAA;AA9CC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;oDACpB;AAEX;IAAC,IAAA,gBAAM,EAAC,EAAE,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IACxD,IAAA,eAAK,EAAC,kDAAkD,EAAE,CAAC,qBAAqB,CAAC,CAAC;GACtE,wBAAwB,CA+CpC;AA/CY,4DAAwB;AAiD9B,MAAM,4BAA4B,GAAG,CAAC,IAA8B,EAA4B,EAAE;IACvG,MAAM,wBAAwB,GAA6B,IAAI,wBAAwB,EAAE,CAAA;IACzF,wBAAwB,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAA;IACvE,wBAAwB,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;IAC7C,wBAAwB,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,cAA8C,EAAE,EAAE,CACnH,IAAA,mEAAkC,EAAC,cAAc,CAAC,CACnD,CAAA;IAED,OAAO,wBAAwB,CAAA;AACjC,CAAC,CAAA;AATY,QAAA,4BAA4B,gCASxC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IBasicCredentialLocaleBranding } from '../../types';
|
|
2
|
+
import { CredentialBrandingEntity } from './CredentialBrandingEntity';
|
|
3
|
+
import { BaseLocaleBrandingEntity } from './BaseLocaleBrandingEntity';
|
|
4
|
+
export declare class CredentialLocaleBrandingEntity extends BaseLocaleBrandingEntity {
|
|
5
|
+
credentialBranding: CredentialBrandingEntity;
|
|
6
|
+
credentialBrandingId: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const credentialLocaleBrandingEntityFrom: (args: IBasicCredentialLocaleBranding) => CredentialLocaleBrandingEntity;
|
|
9
|
+
//# sourceMappingURL=CredentialLocaleBrandingEntity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CredentialLocaleBrandingEntity.d.ts","sourceRoot":"","sources":["../../../src/entities/issuanceBranding/CredentialLocaleBrandingEntity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAA;AAE5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAErE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAIrE,qBAEa,8BAA+B,SAAQ,wBAAwB;IAK1E,kBAAkB,EAAG,wBAAwB,CAAA;IAG7C,oBAAoB,EAAG,MAAM,CAAA;CAC9B;AAED,eAAO,MAAM,kCAAkC,SAAU,8BAA8B,KAAG,8BAUzF,CAAA"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.credentialLocaleBrandingEntityFrom = exports.CredentialLocaleBrandingEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BackgroundAttributesEntity_1 = require("./BackgroundAttributesEntity");
|
|
15
|
+
const CredentialBrandingEntity_1 = require("./CredentialBrandingEntity");
|
|
16
|
+
const ImageAttributesEntity_1 = require("./ImageAttributesEntity");
|
|
17
|
+
const BaseLocaleBrandingEntity_1 = require("./BaseLocaleBrandingEntity");
|
|
18
|
+
const TextAttributesEntity_1 = require("./TextAttributesEntity");
|
|
19
|
+
const validators_1 = require("../validators");
|
|
20
|
+
let CredentialLocaleBrandingEntity = class CredentialLocaleBrandingEntity extends BaseLocaleBrandingEntity_1.BaseLocaleBrandingEntity {
|
|
21
|
+
};
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.ManyToOne)(() => CredentialBrandingEntity_1.CredentialBrandingEntity, (credentialBranding) => credentialBranding.localeBranding, {
|
|
24
|
+
onDelete: 'CASCADE',
|
|
25
|
+
}),
|
|
26
|
+
(0, typeorm_1.JoinColumn)({ name: 'credentialBrandingId' }),
|
|
27
|
+
__metadata("design:type", CredentialBrandingEntity_1.CredentialBrandingEntity)
|
|
28
|
+
], CredentialLocaleBrandingEntity.prototype, "credentialBranding", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ name: 'credentialBrandingId', nullable: false }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], CredentialLocaleBrandingEntity.prototype, "credentialBrandingId", void 0);
|
|
33
|
+
CredentialLocaleBrandingEntity = __decorate([
|
|
34
|
+
(0, typeorm_1.ChildEntity)('CredentialLocaleBranding'),
|
|
35
|
+
(0, typeorm_1.Index)('IDX_CredentialLocaleBrandingEntity_credentialBranding_locale', ['credentialBranding', 'locale'], { unique: true })
|
|
36
|
+
], CredentialLocaleBrandingEntity);
|
|
37
|
+
exports.CredentialLocaleBrandingEntity = CredentialLocaleBrandingEntity;
|
|
38
|
+
const credentialLocaleBrandingEntityFrom = (args) => {
|
|
39
|
+
const credentialLocaleBrandingEntity = new CredentialLocaleBrandingEntity();
|
|
40
|
+
credentialLocaleBrandingEntity.alias = (0, validators_1.isEmptyString)(args.alias) ? undefined : args.alias;
|
|
41
|
+
credentialLocaleBrandingEntity.locale = args.locale ? args.locale : '';
|
|
42
|
+
credentialLocaleBrandingEntity.logo = args.logo ? (0, ImageAttributesEntity_1.imageAttributesEntityFrom)(args.logo) : undefined;
|
|
43
|
+
credentialLocaleBrandingEntity.description = (0, validators_1.isEmptyString)(args.description) ? undefined : args.description;
|
|
44
|
+
credentialLocaleBrandingEntity.background = args.background ? (0, BackgroundAttributesEntity_1.backgroundAttributesEntityFrom)(args.background) : undefined;
|
|
45
|
+
credentialLocaleBrandingEntity.text = args.text ? (0, TextAttributesEntity_1.textAttributesEntityFrom)(args.text) : undefined;
|
|
46
|
+
return credentialLocaleBrandingEntity;
|
|
47
|
+
};
|
|
48
|
+
exports.credentialLocaleBrandingEntityFrom = credentialLocaleBrandingEntityFrom;
|
|
49
|
+
//# sourceMappingURL=CredentialLocaleBrandingEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CredentialLocaleBrandingEntity.js","sourceRoot":"","sources":["../../../src/entities/issuanceBranding/CredentialLocaleBrandingEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA2E;AAE3E,6EAA6E;AAC7E,yEAAqE;AACrE,mEAAmE;AACnE,yEAAqE;AACrE,iEAAiE;AACjE,8CAA6C;AAItC,IAAM,8BAA8B,GAApC,MAAM,8BAA+B,SAAQ,mDAAwB;CAS3E,CAAA;AARC;IAAC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,mDAAwB,EAAE,CAAC,kBAA4C,EAAE,EAAE,CAAC,kBAAkB,CAAC,cAAc,EAAE;QAC9H,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAC;8BACxB,mDAAwB;0EAAA;AAE7C;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,sBAAsB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;4EAC7B;AARlB,8BAA8B;IAF1C,IAAA,qBAAW,EAAC,0BAA0B,CAAC;IACvC,IAAA,eAAK,EAAC,8DAA8D,EAAE,CAAC,oBAAoB,EAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;GAC7G,8BAA8B,CAS1C;AATY,wEAA8B;AAWpC,MAAM,kCAAkC,GAAG,CAAC,IAAoC,EAAkC,EAAE;IACzH,MAAM,8BAA8B,GAAmC,IAAI,8BAA8B,EAAE,CAAA;IAC3G,8BAA8B,CAAC,KAAK,GAAG,IAAA,0BAAa,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAA;IACzF,8BAA8B,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAA;IACtE,8BAA8B,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAA,iDAAyB,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAClG,8BAA8B,CAAC,WAAW,GAAG,IAAA,0BAAa,EAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAA;IAC3G,8BAA8B,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAA,2DAA8B,EAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IACzH,8BAA8B,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAA,+CAAwB,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAEjG,OAAO,8BAA8B,CAAA;AACvC,CAAC,CAAA;AAVY,QAAA,kCAAkC,sCAU9C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { IBasicImageAttributes } from '../../types';
|
|
3
|
+
import { ImageDimensionsEntity } from './ImageDimensionsEntity';
|
|
4
|
+
export declare class ImageAttributesEntity extends BaseEntity {
|
|
5
|
+
id: string;
|
|
6
|
+
uri?: string;
|
|
7
|
+
dataUri?: string;
|
|
8
|
+
mediaType?: string;
|
|
9
|
+
alt?: string;
|
|
10
|
+
dimensions?: ImageDimensionsEntity;
|
|
11
|
+
validate(): Promise<undefined>;
|
|
12
|
+
}
|
|
13
|
+
export declare const imageAttributesEntityFrom: (args: IBasicImageAttributes) => ImageAttributesEntity;
|
|
14
|
+
//# sourceMappingURL=ImageAttributesEntity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageAttributesEntity.d.ts","sourceRoot":"","sources":["../../../src/entities/issuanceBranding/ImageAttributesEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA4F,MAAM,SAAS,CAAA;AAC9H,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AACnD,OAAO,EAAE,qBAAqB,EAA6B,MAAM,yBAAyB,CAAA;AAI1F,qBACa,qBAAsB,SAAQ,UAAU;IAEnD,EAAE,EAAG,MAAM,CAAA;IAIX,GAAG,CAAC,EAAE,MAAM,CAAA;IAIZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAIhB,SAAS,CAAC,EAAE,MAAM,CAAA;IAIlB,GAAG,CAAC,EAAE,MAAM,CAAA;IASZ,UAAU,CAAC,EAAE,qBAAqB,CAAA;IAI5B,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC;CAOrC;AAED,eAAO,MAAM,yBAAyB,SAAU,qBAAqB,KAAG,qBASvE,CAAA"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.imageAttributesEntityFrom = exports.ImageAttributesEntity = void 0;
|
|
22
|
+
const typeorm_1 = require("typeorm");
|
|
23
|
+
const ImageDimensionsEntity_1 = require("./ImageDimensionsEntity");
|
|
24
|
+
const class_validator_1 = require("class-validator");
|
|
25
|
+
const validators_1 = require("../validators");
|
|
26
|
+
let ImageAttributesEntity = class ImageAttributesEntity extends typeorm_1.BaseEntity {
|
|
27
|
+
validate() {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
const validation = yield (0, class_validator_1.validate)(this);
|
|
30
|
+
if (validation.length > 0) {
|
|
31
|
+
return Promise.reject(Error(Object.values(validation[0].constraints)[0]));
|
|
32
|
+
}
|
|
33
|
+
return;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], ImageAttributesEntity.prototype, "id", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ name: 'uri', length: 255, nullable: true, unique: false }),
|
|
43
|
+
(0, class_validator_1.Validate)(validators_1.IsNonEmptyStringConstraint, { message: 'Blank image uri are not allowed' }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], ImageAttributesEntity.prototype, "uri", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ name: 'dataUri', length: 255, nullable: true, unique: false }),
|
|
48
|
+
(0, class_validator_1.Validate)(validators_1.IsNonEmptyStringConstraint, { message: 'Blank image data uri are not allowed' }),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], ImageAttributesEntity.prototype, "dataUri", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({ name: 'mediaType', length: 255, nullable: true, unique: false }),
|
|
53
|
+
(0, class_validator_1.Validate)(validators_1.IsNonEmptyStringConstraint, { message: 'Blank image types are not allowed' }),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], ImageAttributesEntity.prototype, "mediaType", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ name: 'alt', length: 255, nullable: true, unique: false }),
|
|
58
|
+
(0, class_validator_1.Validate)(validators_1.IsNonEmptyStringConstraint, { message: 'Blank image alts are not allowed' }),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], ImageAttributesEntity.prototype, "alt", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.OneToOne)(() => ImageDimensionsEntity_1.ImageDimensionsEntity, {
|
|
63
|
+
cascade: true,
|
|
64
|
+
onDelete: 'CASCADE',
|
|
65
|
+
eager: true,
|
|
66
|
+
nullable: true,
|
|
67
|
+
}),
|
|
68
|
+
(0, typeorm_1.JoinColumn)({ name: 'dimensionsId' }),
|
|
69
|
+
__metadata("design:type", ImageDimensionsEntity_1.ImageDimensionsEntity)
|
|
70
|
+
], ImageAttributesEntity.prototype, "dimensions", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.BeforeInsert)(),
|
|
73
|
+
(0, typeorm_1.BeforeUpdate)(),
|
|
74
|
+
__metadata("design:type", Function),
|
|
75
|
+
__metadata("design:paramtypes", []),
|
|
76
|
+
__metadata("design:returntype", Promise)
|
|
77
|
+
], ImageAttributesEntity.prototype, "validate", null);
|
|
78
|
+
ImageAttributesEntity = __decorate([
|
|
79
|
+
(0, typeorm_1.Entity)('ImageAttributes')
|
|
80
|
+
], ImageAttributesEntity);
|
|
81
|
+
exports.ImageAttributesEntity = ImageAttributesEntity;
|
|
82
|
+
const imageAttributesEntityFrom = (args) => {
|
|
83
|
+
const imageAttributesEntity = new ImageAttributesEntity();
|
|
84
|
+
imageAttributesEntity.uri = (0, validators_1.isEmptyString)(args.uri) ? undefined : args.uri;
|
|
85
|
+
imageAttributesEntity.dataUri = (0, validators_1.isEmptyString)(args.dataUri) ? undefined : args.dataUri;
|
|
86
|
+
imageAttributesEntity.mediaType = (0, validators_1.isEmptyString)(args.mediaType) ? undefined : args.mediaType;
|
|
87
|
+
imageAttributesEntity.alt = (0, validators_1.isEmptyString)(args.alt) ? undefined : args.alt;
|
|
88
|
+
imageAttributesEntity.dimensions = args.dimensions ? (0, ImageDimensionsEntity_1.imageDimensionsEntityFrom)(args.dimensions) : undefined;
|
|
89
|
+
return imageAttributesEntity;
|
|
90
|
+
};
|
|
91
|
+
exports.imageAttributesEntityFrom = imageAttributesEntityFrom;
|
|
92
|
+
//# sourceMappingURL=ImageAttributesEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageAttributesEntity.js","sourceRoot":"","sources":["../../../src/entities/issuanceBranding/ImageAttributesEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,qCAA8H;AAE9H,mEAA0F;AAC1F,qDAAqE;AACrE,8CAAyE;AAG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BAAqB,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAA,iDAAyB,EAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAE3G,OAAO,qBAAqB,CAAA;AAC9B,CAAC,CAAA;AATY,QAAA,yBAAyB,6BASrC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { IBasicImageDimensions } from '../../types';
|
|
3
|
+
export declare class ImageDimensionsEntity extends BaseEntity {
|
|
4
|
+
id: string;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const imageDimensionsEntityFrom: (args: IBasicImageDimensions) => ImageDimensionsEntity;
|
|
9
|
+
//# sourceMappingURL=ImageDimensionsEntity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageDimensionsEntity.d.ts","sourceRoot":"","sources":["../../../src/entities/issuanceBranding/ImageDimensionsEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA0C,MAAM,SAAS,CAAA;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAEnD,qBACa,qBAAsB,SAAQ,UAAU;IAEnD,EAAE,EAAG,MAAM,CAAA;IAGX,KAAK,EAAG,MAAM,CAAA;IAGd,MAAM,EAAG,MAAM,CAAA;CAChB;AAED,eAAO,MAAM,yBAAyB,SAAU,qBAAqB,KAAG,qBAMvE,CAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.imageDimensionsEntityFrom = exports.ImageDimensionsEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
let ImageDimensionsEntity = class ImageDimensionsEntity extends typeorm_1.BaseEntity {
|
|
15
|
+
};
|
|
16
|
+
__decorate([
|
|
17
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
18
|
+
__metadata("design:type", String)
|
|
19
|
+
], ImageDimensionsEntity.prototype, "id", void 0);
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.Column)({ name: 'width', nullable: false, unique: false }),
|
|
22
|
+
__metadata("design:type", Number)
|
|
23
|
+
], ImageDimensionsEntity.prototype, "width", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ name: 'height', nullable: false, unique: false }),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], ImageDimensionsEntity.prototype, "height", void 0);
|
|
28
|
+
ImageDimensionsEntity = __decorate([
|
|
29
|
+
(0, typeorm_1.Entity)('ImageDimensions')
|
|
30
|
+
], ImageDimensionsEntity);
|
|
31
|
+
exports.ImageDimensionsEntity = ImageDimensionsEntity;
|
|
32
|
+
const imageDimensionsEntityFrom = (args) => {
|
|
33
|
+
const imageDimensionsEntity = new ImageDimensionsEntity();
|
|
34
|
+
imageDimensionsEntity.width = args.width;
|
|
35
|
+
imageDimensionsEntity.height = args.height;
|
|
36
|
+
return imageDimensionsEntity;
|
|
37
|
+
};
|
|
38
|
+
exports.imageDimensionsEntityFrom = imageDimensionsEntityFrom;
|
|
39
|
+
//# sourceMappingURL=ImageDimensionsEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageDimensionsEntity.js","sourceRoot":"","sources":["../../../src/entities/issuanceBranding/ImageDimensionsEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA4E;AAIrE,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,oBAAU;CASpD,CAAA;AARC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;iDACpB;AAEX;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;;oDAC5C;AAEd;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;;qDAC5C;AARJ,qBAAqB;IADjC,IAAA,gBAAM,EAAC,iBAAiB,CAAC;GACb,qBAAqB,CASjC;AATY,sDAAqB;AAW3B,MAAM,yBAAyB,GAAG,CAAC,IAA2B,EAAyB,EAAE;IAC9F,MAAM,qBAAqB,GAA0B,IAAI,qBAAqB,EAAE,CAAA;IAChF,qBAAqB,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;IACxC,qBAAqB,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;IAE1C,OAAO,qBAAqB,CAAA;AAC9B,CAAC,CAAA;AANY,QAAA,yBAAyB,6BAMrC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { IssuerLocaleBrandingEntity } from './IssuerLocaleBrandingEntity';
|
|
3
|
+
import { IBasicIssuerBranding } from '../../types';
|
|
4
|
+
export declare class IssuerBrandingEntity extends BaseEntity {
|
|
5
|
+
id: string;
|
|
6
|
+
issuerCorrelationId: string;
|
|
7
|
+
localeBranding: Array<IssuerLocaleBrandingEntity>;
|
|
8
|
+
createdAt: Date;
|
|
9
|
+
lastUpdatedAt: Date;
|
|
10
|
+
updateUpdatedDate(): void;
|
|
11
|
+
validate(): Promise<undefined>;
|
|
12
|
+
}
|
|
13
|
+
export declare const issuerBrandingEntityFrom: (args: IBasicIssuerBranding) => IssuerBrandingEntity;
|
|
14
|
+
//# sourceMappingURL=IssuerBrandingEntity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IssuerBrandingEntity.d.ts","sourceRoot":"","sources":["../../../src/entities/issuanceBranding/IssuerBrandingEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAUX,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAE,0BAA0B,EAAkC,MAAM,8BAA8B,CAAA;AACzG,OAAO,EAAE,oBAAoB,EAA8B,MAAM,aAAa,CAAA;AAE9E,qBAEa,oBAAqB,SAAQ,UAAU;IAElD,EAAE,EAAG,MAAM,CAAA;IAIX,mBAAmB,EAAG,MAAM,CAAA;IAa5B,cAAc,EAAG,KAAK,CAAC,0BAA0B,CAAC,CAAA;IAGlD,SAAS,EAAG,IAAI,CAAA;IAGhB,aAAa,EAAG,IAAI,CAAA;IAKpB,iBAAiB,IAAI,IAAI;IAMnB,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC;CAOrC;AAED,eAAO,MAAM,wBAAwB,SAAU,oBAAoB,KAAG,oBAQrE,CAAA"}
|