@sphereon/ssi-sdk.data-store 0.11.1-next.106
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/LICENSE +201 -0
- package/README.md +72 -0
- package/dist/contact/AbstractContactStore.d.ts +14 -0
- package/dist/contact/AbstractContactStore.d.ts.map +1 -0
- package/dist/contact/AbstractContactStore.js +7 -0
- package/dist/contact/AbstractContactStore.js.map +1 -0
- package/dist/contact/ContactStore.d.ts +29 -0
- package/dist/contact/ContactStore.d.ts.map +1 -0
- package/dist/contact/ContactStore.js +281 -0
- package/dist/contact/ContactStore.js.map +1 -0
- package/dist/entities/contact/BaseConfigEntity.d.ts +5 -0
- package/dist/entities/contact/BaseConfigEntity.d.ts.map +1 -0
- package/dist/entities/contact/BaseConfigEntity.js +26 -0
- package/dist/entities/contact/BaseConfigEntity.js.map +1 -0
- package/dist/entities/contact/ConnectionEntity.d.ts +12 -0
- package/dist/entities/contact/ConnectionEntity.d.ts.map +1 -0
- package/dist/entities/contact/ConnectionEntity.js +66 -0
- package/dist/entities/contact/ConnectionEntity.js.map +1 -0
- package/dist/entities/contact/ContactEntity.d.ts +16 -0
- package/dist/entities/contact/ContactEntity.d.ts.map +1 -0
- package/dist/entities/contact/ContactEntity.js +105 -0
- package/dist/entities/contact/ContactEntity.js.map +1 -0
- package/dist/entities/contact/CorrelationIdentifierEntity.d.ts +12 -0
- package/dist/entities/contact/CorrelationIdentifierEntity.d.ts.map +1 -0
- package/dist/entities/contact/CorrelationIdentifierEntity.js +75 -0
- package/dist/entities/contact/CorrelationIdentifierEntity.js.map +1 -0
- package/dist/entities/contact/DidAuthConfigEntity.d.ts +11 -0
- package/dist/entities/contact/DidAuthConfigEntity.d.ts.map +1 -0
- package/dist/entities/contact/DidAuthConfigEntity.js +49 -0
- package/dist/entities/contact/DidAuthConfigEntity.js.map +1 -0
- package/dist/entities/contact/IdentityEntity.d.ts +22 -0
- package/dist/entities/contact/IdentityEntity.d.ts.map +1 -0
- package/dist/entities/contact/IdentityEntity.js +134 -0
- package/dist/entities/contact/IdentityEntity.js.map +1 -0
- package/dist/entities/contact/IdentityMetadataItemEntity.d.ts +12 -0
- package/dist/entities/contact/IdentityMetadataItemEntity.d.ts.map +1 -0
- package/dist/entities/contact/IdentityMetadataItemEntity.js +72 -0
- package/dist/entities/contact/IdentityMetadataItemEntity.js.map +1 -0
- package/dist/entities/contact/OpenIdConfigEntity.d.ts +15 -0
- package/dist/entities/contact/OpenIdConfigEntity.d.ts.map +1 -0
- package/dist/entities/contact/OpenIdConfigEntity.js +70 -0
- package/dist/entities/contact/OpenIdConfigEntity.js.map +1 -0
- 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 +27 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +99 -0
- package/dist/index.js.map +1 -0
- 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.d.ts +7 -0
- package/dist/migrations/generic/1-CreateContacts.d.ts.map +1 -0
- package/dist/migrations/generic/1-CreateContacts.js +72 -0
- package/dist/migrations/generic/1-CreateContacts.js.map +1 -0
- 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 +10 -0
- package/dist/migrations/generic/index.d.ts.map +1 -0
- package/dist/migrations/generic/index.js +14 -0
- package/dist/migrations/generic/index.js.map +1 -0
- package/dist/migrations/index.d.ts +2 -0
- package/dist/migrations/index.d.ts.map +1 -0
- package/dist/migrations/index.js +6 -0
- package/dist/migrations/index.js.map +1 -0
- package/dist/migrations/internal-migrations-ormconfig.d.ts +6 -0
- package/dist/migrations/internal-migrations-ormconfig.d.ts.map +1 -0
- package/dist/migrations/internal-migrations-ormconfig.js +29 -0
- package/dist/migrations/internal-migrations-ormconfig.js.map +1 -0
- package/dist/migrations/postgres/1659463079428-CreateContacts.d.ts +7 -0
- package/dist/migrations/postgres/1659463079428-CreateContacts.d.ts.map +1 -0
- package/dist/migrations/postgres/1659463079428-CreateContacts.js +55 -0
- package/dist/migrations/postgres/1659463079428-CreateContacts.js.map +1 -0
- 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 +7 -0
- package/dist/migrations/sqlite/1659463069549-CreateContacts.d.ts.map +1 -0
- package/dist/migrations/sqlite/1659463069549-CreateContacts.js +79 -0
- package/dist/migrations/sqlite/1659463069549-CreateContacts.js.map +1 -0
- 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/contact/IAbstractContactStore.d.ts +41 -0
- package/dist/types/contact/IAbstractContactStore.d.ts.map +1 -0
- package/dist/types/contact/IAbstractContactStore.js +3 -0
- package/dist/types/contact/IAbstractContactStore.js.map +1 -0
- package/dist/types/contact/contact.d.ts +91 -0
- package/dist/types/contact/contact.d.ts.map +1 -0
- package/dist/types/contact/contact.js +21 -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 +45 -0
- package/src/__tests__/contact.entities.test.ts +911 -0
- package/src/__tests__/contact.store.test.ts +743 -0
- package/src/__tests__/issuanceBranding.entities.test.ts +844 -0
- package/src/__tests__/issuanceBranding.store.test.ts +1884 -0
- package/src/contact/AbstractContactStore.ts +27 -0
- package/src/contact/ContactStore.ts +371 -0
- package/src/entities/contact/BaseConfigEntity.ts +8 -0
- package/src/entities/contact/ConnectionEntity.ts +48 -0
- package/src/entities/contact/ContactEntity.ts +74 -0
- package/src/entities/contact/CorrelationIdentifierEntity.ts +41 -0
- package/src/entities/contact/DidAuthConfigEntity.ts +31 -0
- package/src/entities/contact/IdentityEntity.ts +104 -0
- package/src/entities/contact/IdentityMetadataItemEntity.ts +39 -0
- package/src/entities/contact/OpenIdConfigEntity.ts +48 -0
- 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 +82 -0
- package/src/issuanceBranding/AbstractIssuanceBrandingStore.ts +41 -0
- package/src/issuanceBranding/IssuanceBrandingStore.ts +544 -0
- package/src/migrations/generic/1-CreateContacts.ts +54 -0
- package/src/migrations/generic/1-CreateIssuanceBranding.ts +54 -0
- package/src/migrations/generic/index.ts +11 -0
- package/src/migrations/index.ts +1 -0
- package/src/migrations/internal-migrations-ormconfig.ts +28 -0
- package/src/migrations/postgres/1659463079428-CreateContacts.ts +61 -0
- package/src/migrations/postgres/1685628974232-CreateIssuanceBranding.ts +83 -0
- package/src/migrations/sqlite/1659463069549-CreateContacts.ts +110 -0
- package/src/migrations/sqlite/1685628973231-CreateIssuanceBranding.ts +119 -0
- package/src/types/contact/IAbstractContactStore.ts +52 -0
- package/src/types/contact/contact.ts +101 -0
- package/src/types/index.ts +4 -0
- package/src/types/issuanceBranding/IAbstractIssuanceBrandingStore.ts +85 -0
- package/src/types/issuanceBranding/issuanceBranding.ts +120 -0
|
@@ -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;AAGlE,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,oBAAU;IA+B7C,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;AArCC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;iDACpB;AAEX;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IACnE,IAAA,0BAAQ,EAAC,uCAA0B,EAAE,EAAE,OAAO,EAAE,iCAAiC,EAAE,CAAC;;kDACzE;AAEZ;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GA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,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAA;IAC1E,qBAAqB,CAAC,OAAO,GAAG,IAAA,0BAAa,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAA;IACtF,qBAAqB,CAAC,SAAS,GAAG,IAAA,0BAAa,EAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAA;IAC5F,qBAAqB,CAAC,GAAG,GAAG,IAAA,0BAAa,EAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAA;IAC1E,qBAAqB,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"}
|
|
@@ -0,0 +1,95 @@
|
|
|
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.issuerBrandingEntityFrom = exports.IssuerBrandingEntity = void 0;
|
|
22
|
+
const typeorm_1 = require("typeorm");
|
|
23
|
+
const class_validator_1 = require("class-validator");
|
|
24
|
+
const IssuerLocaleBrandingEntity_1 = require("./IssuerLocaleBrandingEntity");
|
|
25
|
+
let IssuerBrandingEntity = class IssuerBrandingEntity 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
|
+
], IssuerBrandingEntity.prototype, "id", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ name: 'issuerCorrelationId', length: 255, nullable: false, unique: true }),
|
|
46
|
+
(0, class_validator_1.IsNotEmpty)({ message: 'Blank issuerCorrelationIds are not allowed' }),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], IssuerBrandingEntity.prototype, "issuerCorrelationId", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.OneToMany)(() => IssuerLocaleBrandingEntity_1.IssuerLocaleBrandingEntity, (issuerLocaleBrandingEntity) => issuerLocaleBrandingEntity.issuerBranding, {
|
|
51
|
+
cascade: true,
|
|
52
|
+
onDelete: 'CASCADE',
|
|
53
|
+
eager: true,
|
|
54
|
+
nullable: false,
|
|
55
|
+
}),
|
|
56
|
+
(0, class_validator_1.ArrayMinSize)(1, { message: 'localeBranding cannot be empty' }),
|
|
57
|
+
__metadata("design:type", Array)
|
|
58
|
+
], IssuerBrandingEntity.prototype, "localeBranding", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.CreateDateColumn)({ name: 'created_at', nullable: false }),
|
|
61
|
+
__metadata("design:type", Date)
|
|
62
|
+
], IssuerBrandingEntity.prototype, "createdAt", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.UpdateDateColumn)({ name: 'last_updated_at', nullable: false }),
|
|
65
|
+
__metadata("design:type", Date
|
|
66
|
+
// By default, @UpdateDateColumn in TypeORM updates the timestamp only when the entity's top-level properties change.
|
|
67
|
+
)
|
|
68
|
+
], IssuerBrandingEntity.prototype, "lastUpdatedAt", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.BeforeInsert)(),
|
|
71
|
+
(0, typeorm_1.BeforeUpdate)(),
|
|
72
|
+
__metadata("design:type", Function),
|
|
73
|
+
__metadata("design:paramtypes", []),
|
|
74
|
+
__metadata("design:returntype", void 0)
|
|
75
|
+
], IssuerBrandingEntity.prototype, "updateUpdatedDate", null);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typeorm_1.BeforeInsert)(),
|
|
78
|
+
(0, typeorm_1.BeforeUpdate)(),
|
|
79
|
+
__metadata("design:type", Function),
|
|
80
|
+
__metadata("design:paramtypes", []),
|
|
81
|
+
__metadata("design:returntype", Promise)
|
|
82
|
+
], IssuerBrandingEntity.prototype, "validate", null);
|
|
83
|
+
IssuerBrandingEntity = __decorate([
|
|
84
|
+
(0, typeorm_1.Entity)('IssuerBranding'),
|
|
85
|
+
(0, typeorm_1.Index)('IDX_IssuerBrandingEntity_issuerCorrelationId', ['issuerCorrelationId'])
|
|
86
|
+
], IssuerBrandingEntity);
|
|
87
|
+
exports.IssuerBrandingEntity = IssuerBrandingEntity;
|
|
88
|
+
const issuerBrandingEntityFrom = (args) => {
|
|
89
|
+
const issuerBrandingEntity = new IssuerBrandingEntity();
|
|
90
|
+
issuerBrandingEntity.issuerCorrelationId = args.issuerCorrelationId;
|
|
91
|
+
issuerBrandingEntity.localeBranding = args.localeBranding.map((localeBranding) => (0, IssuerLocaleBrandingEntity_1.issuerLocaleBrandingEntityFrom)(localeBranding));
|
|
92
|
+
return issuerBrandingEntity;
|
|
93
|
+
};
|
|
94
|
+
exports.issuerBrandingEntityFrom = issuerBrandingEntityFrom;
|
|
95
|
+
//# sourceMappingURL=IssuerBrandingEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IssuerBrandingEntity.js","sourceRoot":"","sources":["../../../src/entities/issuanceBranding/IssuerBrandingEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,qCAWgB;AAChB,qDAAqF;AACrF,6EAAyG;AAKlG,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,oBAAU;IA2BlD,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;AA1CC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;gDACpB;AAEX;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,qBAAqB,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACnF,IAAA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Ac,CAAC,CAC/C,CAAA;IAED,OAAO,oBAAoB,CAAA;AAC7B,CAAC,CAAA;AARY,QAAA,wBAAwB,4BAQpC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IBasicIssuerLocaleBranding } from '../../types';
|
|
2
|
+
import { IssuerBrandingEntity } from './IssuerBrandingEntity';
|
|
3
|
+
import { BaseLocaleBrandingEntity } from './BaseLocaleBrandingEntity';
|
|
4
|
+
export declare class IssuerLocaleBrandingEntity extends BaseLocaleBrandingEntity {
|
|
5
|
+
issuerBranding: IssuerBrandingEntity;
|
|
6
|
+
issuerBrandingId: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const issuerLocaleBrandingEntityFrom: (args: IBasicIssuerLocaleBranding) => IssuerLocaleBrandingEntity;
|
|
9
|
+
//# sourceMappingURL=IssuerLocaleBrandingEntity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IssuerLocaleBrandingEntity.d.ts","sourceRoot":"","sources":["../../../src/entities/issuanceBranding/IssuerLocaleBrandingEntity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAGxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAIrE,qBAEa,0BAA2B,SAAQ,wBAAwB;IAKtE,cAAc,EAAG,oBAAoB,CAAA;IAGrC,gBAAgB,EAAG,MAAM,CAAA;CAC1B;AAED,eAAO,MAAM,8BAA8B,SAAU,0BAA0B,KAAG,0BAUjF,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.issuerLocaleBrandingEntityFrom = exports.IssuerLocaleBrandingEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BackgroundAttributesEntity_1 = require("./BackgroundAttributesEntity");
|
|
15
|
+
const ImageAttributesEntity_1 = require("./ImageAttributesEntity");
|
|
16
|
+
const IssuerBrandingEntity_1 = require("./IssuerBrandingEntity");
|
|
17
|
+
const BaseLocaleBrandingEntity_1 = require("./BaseLocaleBrandingEntity");
|
|
18
|
+
const TextAttributesEntity_1 = require("./TextAttributesEntity");
|
|
19
|
+
const validators_1 = require("../validators");
|
|
20
|
+
let IssuerLocaleBrandingEntity = class IssuerLocaleBrandingEntity extends BaseLocaleBrandingEntity_1.BaseLocaleBrandingEntity {
|
|
21
|
+
};
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.ManyToOne)(() => IssuerBrandingEntity_1.IssuerBrandingEntity, (issuerBranding) => issuerBranding.localeBranding, {
|
|
24
|
+
onDelete: 'CASCADE',
|
|
25
|
+
}),
|
|
26
|
+
(0, typeorm_1.JoinColumn)({ name: 'issuerBrandingId' }),
|
|
27
|
+
__metadata("design:type", IssuerBrandingEntity_1.IssuerBrandingEntity)
|
|
28
|
+
], IssuerLocaleBrandingEntity.prototype, "issuerBranding", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ name: 'issuerBrandingId', nullable: false }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], IssuerLocaleBrandingEntity.prototype, "issuerBrandingId", void 0);
|
|
33
|
+
IssuerLocaleBrandingEntity = __decorate([
|
|
34
|
+
(0, typeorm_1.ChildEntity)('IssuerLocaleBranding'),
|
|
35
|
+
(0, typeorm_1.Index)('IDX_IssuerLocaleBrandingEntity_issuerBranding_locale', ['issuerBranding', 'locale'], { unique: true })
|
|
36
|
+
], IssuerLocaleBrandingEntity);
|
|
37
|
+
exports.IssuerLocaleBrandingEntity = IssuerLocaleBrandingEntity;
|
|
38
|
+
const issuerLocaleBrandingEntityFrom = (args) => {
|
|
39
|
+
const issuerLocaleBrandingEntity = new IssuerLocaleBrandingEntity();
|
|
40
|
+
issuerLocaleBrandingEntity.alias = (0, validators_1.isEmptyString)(args.alias) ? undefined : args.alias;
|
|
41
|
+
issuerLocaleBrandingEntity.locale = args.locale ? args.locale : '';
|
|
42
|
+
issuerLocaleBrandingEntity.logo = args.logo ? (0, ImageAttributesEntity_1.imageAttributesEntityFrom)(args.logo) : undefined;
|
|
43
|
+
issuerLocaleBrandingEntity.description = (0, validators_1.isEmptyString)(args.description) ? undefined : args.description;
|
|
44
|
+
issuerLocaleBrandingEntity.background = args.background ? (0, BackgroundAttributesEntity_1.backgroundAttributesEntityFrom)(args.background) : undefined;
|
|
45
|
+
issuerLocaleBrandingEntity.text = args.text ? (0, TextAttributesEntity_1.textAttributesEntityFrom)(args.text) : undefined;
|
|
46
|
+
return issuerLocaleBrandingEntity;
|
|
47
|
+
};
|
|
48
|
+
exports.issuerLocaleBrandingEntityFrom = issuerLocaleBrandingEntityFrom;
|
|
49
|
+
//# sourceMappingURL=IssuerLocaleBrandingEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IssuerLocaleBrandingEntity.js","sourceRoot":"","sources":["../../../src/entities/issuanceBranding/IssuerLocaleBrandingEntity.ts"],"names":[],"mappings":";;;;;;;;;;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CAAA;IAC9F,0BAA0B,CAAC,WAAW,GAAG,IAAA,0BAAa,EAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAA;IACvG,0BAA0B,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAA,2DAA8B,EAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IACrH,0BAA0B,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAA,+CAAwB,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAE7F,OAAO,0BAA0B,CAAA;AACnC,CAAC,CAAA;AAVY,QAAA,8BAA8B,kCAU1C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { IBasicTextAttributes } from '../../types';
|
|
3
|
+
export declare class TextAttributesEntity extends BaseEntity {
|
|
4
|
+
id: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
validate(): Promise<undefined>;
|
|
7
|
+
}
|
|
8
|
+
export declare const textAttributesEntityFrom: (args: IBasicTextAttributes) => TextAttributesEntity;
|
|
9
|
+
//# sourceMappingURL=TextAttributesEntity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextAttributesEntity.d.ts","sourceRoot":"","sources":["../../../src/entities/issuanceBranding/TextAttributesEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsE,MAAM,SAAS,CAAA;AACxG,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAIlD,qBACa,oBAAqB,SAAQ,UAAU;IAElD,EAAE,EAAG,MAAM,CAAA;IAIX,KAAK,CAAC,EAAE,MAAM,CAAA;IAIR,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC;CAOrC;AAED,eAAO,MAAM,wBAAwB,SAAU,oBAAoB,KAAG,oBAKrE,CAAA"}
|
|
@@ -0,0 +1,62 @@
|
|
|
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.textAttributesEntityFrom = exports.TextAttributesEntity = void 0;
|
|
22
|
+
const typeorm_1 = require("typeorm");
|
|
23
|
+
const class_validator_1 = require("class-validator");
|
|
24
|
+
const validators_1 = require("../validators");
|
|
25
|
+
let TextAttributesEntity = class TextAttributesEntity extends typeorm_1.BaseEntity {
|
|
26
|
+
validate() {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
const validation = yield (0, class_validator_1.validate)(this);
|
|
29
|
+
if (validation.length > 0) {
|
|
30
|
+
return Promise.reject(Error(Object.values(validation[0].constraints)[0]));
|
|
31
|
+
}
|
|
32
|
+
return;
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], TextAttributesEntity.prototype, "id", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ name: 'color', length: 255, nullable: true, unique: false }),
|
|
42
|
+
(0, class_validator_1.Validate)(validators_1.IsNonEmptyStringConstraint, { message: 'Blank text colors are not allowed' }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], TextAttributesEntity.prototype, "color", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.BeforeInsert)(),
|
|
47
|
+
(0, typeorm_1.BeforeUpdate)(),
|
|
48
|
+
__metadata("design:type", Function),
|
|
49
|
+
__metadata("design:paramtypes", []),
|
|
50
|
+
__metadata("design:returntype", Promise)
|
|
51
|
+
], TextAttributesEntity.prototype, "validate", null);
|
|
52
|
+
TextAttributesEntity = __decorate([
|
|
53
|
+
(0, typeorm_1.Entity)('TextAttributes')
|
|
54
|
+
], TextAttributesEntity);
|
|
55
|
+
exports.TextAttributesEntity = TextAttributesEntity;
|
|
56
|
+
const textAttributesEntityFrom = (args) => {
|
|
57
|
+
const textAttributesEntity = new TextAttributesEntity();
|
|
58
|
+
textAttributesEntity.color = (0, validators_1.isEmptyString)(args.color) ? undefined : args.color;
|
|
59
|
+
return textAttributesEntity;
|
|
60
|
+
};
|
|
61
|
+
exports.textAttributesEntityFrom = textAttributesEntityFrom;
|
|
62
|
+
//# sourceMappingURL=TextAttributesEntity.js.map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C,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAA;IAE/E,OAAO,oBAAoB,CAAA;AAC7B,CAAC,CAAA;AALY,QAAA,wBAAwB,4BAKpC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ValidationArguments, ValidatorConstraintInterface } from 'class-validator';
|
|
2
|
+
export declare class IsNonEmptyStringConstraint implements ValidatorConstraintInterface {
|
|
3
|
+
validate(value: string, args: ValidationArguments): boolean;
|
|
4
|
+
defaultMessage(args: ValidationArguments): string;
|
|
5
|
+
}
|
|
6
|
+
export declare const isEmptyString: (value: any) => boolean;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/entities/validators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAuB,4BAA4B,EAAE,MAAM,iBAAiB,CAAA;AAExG,qBACa,0BAA2B,YAAW,4BAA4B;IAC7E,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,GAAG,OAAO;IAI3D,cAAc,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM;CAGlD;AAED,eAAO,MAAM,aAAa,UAAW,GAAG,KAAG,OAE1C,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.isEmptyString = exports.IsNonEmptyStringConstraint = void 0;
|
|
10
|
+
const class_validator_1 = require("class-validator");
|
|
11
|
+
let IsNonEmptyStringConstraint = class IsNonEmptyStringConstraint {
|
|
12
|
+
validate(value, args) {
|
|
13
|
+
return !(0, exports.isEmptyString)(value);
|
|
14
|
+
}
|
|
15
|
+
defaultMessage(args) {
|
|
16
|
+
return `${args.property} must not be an empty string.`;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
IsNonEmptyStringConstraint = __decorate([
|
|
20
|
+
(0, class_validator_1.ValidatorConstraint)({ name: 'isNonEmptyString', async: false })
|
|
21
|
+
], IsNonEmptyStringConstraint);
|
|
22
|
+
exports.IsNonEmptyStringConstraint = IsNonEmptyStringConstraint;
|
|
23
|
+
const isEmptyString = (value) => {
|
|
24
|
+
return typeof value === 'string' && value.trim().length === 0;
|
|
25
|
+
};
|
|
26
|
+
exports.isEmptyString = isEmptyString;
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/validators/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,qDAAwG;AAGjG,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IACrC,QAAQ,CAAC,KAAa,EAAE,IAAyB;QAC/C,OAAO,CAAC,IAAA,qBAAa,EAAC,KAAK,CAAC,CAAA;IAC9B,CAAC;IAED,cAAc,CAAC,IAAyB;QACtC,OAAO,GAAG,IAAI,CAAC,QAAQ,+BAA+B,CAAA;IACxD,CAAC;CACF,CAAA;AARY,0BAA0B;IADtC,IAAA,qCAAmB,EAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;GACnD,0BAA0B,CAQtC;AARY,gEAA0B;AAUhC,MAAM,aAAa,GAAG,CAAC,KAAU,EAAW,EAAE;IACnD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,CAAA;AAC/D,CAAC,CAAA;AAFY,QAAA,aAAa,iBAEzB"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BaseConfigEntity } from './entities/contact/BaseConfigEntity';
|
|
2
|
+
import { BaseLocaleBrandingEntity } from './entities/issuanceBranding/BaseLocaleBrandingEntity';
|
|
3
|
+
import { ConnectionEntity, connectionEntityFrom } from './entities/contact/ConnectionEntity';
|
|
4
|
+
import { ContactEntity, contactEntityFrom } from './entities/contact/ContactEntity';
|
|
5
|
+
import { CorrelationIdentifierEntity, correlationIdentifierEntityFrom } from './entities/contact/CorrelationIdentifierEntity';
|
|
6
|
+
import { DidAuthConfigEntity, didAuthConfigEntityFrom } from './entities/contact/DidAuthConfigEntity';
|
|
7
|
+
import { IdentityEntity, identityEntityFrom } from './entities/contact/IdentityEntity';
|
|
8
|
+
import { IdentityMetadataItemEntity, metadataItemEntityFrom } from './entities/contact/IdentityMetadataItemEntity';
|
|
9
|
+
import { OpenIdConfigEntity, openIdConfigEntityFrom } from './entities/contact/OpenIdConfigEntity';
|
|
10
|
+
import { BackgroundAttributesEntity, backgroundAttributesEntityFrom } from './entities/issuanceBranding/BackgroundAttributesEntity';
|
|
11
|
+
import { CredentialBrandingEntity, credentialBrandingEntityFrom } from './entities/issuanceBranding/CredentialBrandingEntity';
|
|
12
|
+
import { CredentialLocaleBrandingEntity, credentialLocaleBrandingEntityFrom } from './entities/issuanceBranding/CredentialLocaleBrandingEntity';
|
|
13
|
+
import { ImageAttributesEntity, imageAttributesEntityFrom } from './entities/issuanceBranding/ImageAttributesEntity';
|
|
14
|
+
import { ImageDimensionsEntity, imageDimensionsEntityFrom } from './entities/issuanceBranding/ImageDimensionsEntity';
|
|
15
|
+
import { IssuerLocaleBrandingEntity, issuerLocaleBrandingEntityFrom } from './entities/issuanceBranding/IssuerLocaleBrandingEntity';
|
|
16
|
+
import { IssuerBrandingEntity, issuerBrandingEntityFrom } from './entities/issuanceBranding/IssuerBrandingEntity';
|
|
17
|
+
import { TextAttributesEntity, textAttributesEntityFrom } from './entities/issuanceBranding/TextAttributesEntity';
|
|
18
|
+
export { ContactStore } from './contact/ContactStore';
|
|
19
|
+
export { AbstractContactStore } from './contact/AbstractContactStore';
|
|
20
|
+
export { AbstractIssuanceBrandingStore } from './issuanceBranding/AbstractIssuanceBrandingStore';
|
|
21
|
+
export { IssuanceBrandingStore } from './issuanceBranding/IssuanceBrandingStore';
|
|
22
|
+
export { DataStoreMigrations } from './migrations';
|
|
23
|
+
export * from './types';
|
|
24
|
+
export declare const DataStoreContactEntities: (typeof BaseConfigEntity)[];
|
|
25
|
+
export declare const DataStoreIssuanceBrandingEntities: (typeof ImageDimensionsEntity | typeof ImageAttributesEntity | typeof TextAttributesEntity | typeof BaseLocaleBrandingEntity | typeof CredentialBrandingEntity | typeof IssuerBrandingEntity)[];
|
|
26
|
+
export { BaseConfigEntity, ConnectionEntity, ContactEntity, CorrelationIdentifierEntity, DidAuthConfigEntity, IdentityEntity, IdentityMetadataItemEntity, OpenIdConfigEntity, BackgroundAttributesEntity, CredentialBrandingEntity, ImageAttributesEntity, ImageDimensionsEntity, BaseLocaleBrandingEntity, IssuerBrandingEntity, TextAttributesEntity, CredentialLocaleBrandingEntity, IssuerLocaleBrandingEntity, metadataItemEntityFrom, connectionEntityFrom, contactEntityFrom, correlationIdentifierEntityFrom, identityEntityFrom, didAuthConfigEntityFrom, openIdConfigEntityFrom, backgroundAttributesEntityFrom, credentialBrandingEntityFrom, imageAttributesEntityFrom, imageDimensionsEntityFrom, issuerBrandingEntityFrom, textAttributesEntityFrom, issuerLocaleBrandingEntityFrom, credentialLocaleBrandingEntityFrom, };
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","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